11

I'm trying to flash google apps into a genymotion emulator. I can do this using the drag and drop feature, but it's required for my project that the google apps .zip is already loaded into the genymotion machine and it's flashed internally. (To avoid having to interact with the desktop)

I've checked questions like this where the flashing is achieved but using the clockworkmod recovery (Which I couldn't install on genymotion). Since there's no docs on the genymotion recovery mode I can't find the commands to flash the zip, but I'm pretty sure they exist.

Which commands can be used for flashing a .zip from the terminal?

The commands can also be run in the machine that's holding the genymotion.

2 Answers 2

33

Genymotion VMs contain some special scripts that interface with their launcher and skin controls. The one that you need is /system/bin/flash-archive.sh which is what gets run when you drag & drop a .zip archive.

You can run flash-archive.sh directly using ADB or from a process within the VM. So if you have the zip in /sdcard/Download/gapps.zip, you can run the following command from the host machine:

adb shell flash-archive.sh /sdcard/Download/gapps.zip
adb reboot

Don't forget to install the ARM translation package first, if applicable. It can be done using the same sequence.

1
  • I tried with this but not working, the Error is like : can't execute : Permission denied Dec 11, 2018 at 7:42
1

Paul's answer is good.

Also, we will soon release features related to continuous integration and automation. A command line tool will be included on these features. It allows you to do all what you can do with your mouse, but through the command line. It will be available to paid licenses.

You can find a demo we did at Droidcon Paris here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.