[Q] How to create a Google Apps flashable zip from the stock ROM ?

From it says


It is possible to perform a "backup" of the Google Apps on your device and then "restore" them, but this does take additional steps which are not covered here.

I'd like to know how can I do this.
I've searched all across the forum but had no luck. It looks like some kind of trade secret.

I know that it's not just a matter of pulling the apk files. Because I can see that the zip has .apk, .jars, .so, configuration and certificate files.
I'm guessing this is done by extracting the files from a system.img.
But how is this done?
Is there some script available to build a gapps zip from a system.img file?

Another thing is that my OnePlus phone doesn't has an official LP update yet (although CM12 and their gapps work fine) so I suspect this would have to be done using the stock ROM of another device, maybe a Nexus. Is this correct?

Any help is appreciated.


Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by plubowitz
10 minutes ago
Last post by jazmin68
1 hour ago
Last post by gsipes
2 hours ago
Last post by jacobs.abbey
1 hour ago
Last post by elinore.keeling
1 hour ago
Last post by glover.ova
4 hours ago
Last post by marvin.josue
3 hours ago