Insted of cobbling it together, try find out where the problem is.
I would first test it with another tester, not the plug in kind. One lead to black, one lead to ground = 120V
The green wire come from somewhere. Open a few close jboxes,receps,switches on that circuit and find out where it has become disconnected.
Will this create proper grounding to the ungrounded outlet, and will it be safe and/or to code?
Proper is a relative term.
Code compliant, no.
At least attempt
to repair it properly.