Skip to content

Instantly share code, notes, and snippets.

@AaronRietschlin
Forked from keith30xi/GenymotionPlay.sh
Created June 28, 2016 18:58
Show Gist options
  • Save AaronRietschlin/f1269d53338d7a4a41ca6ab0d056b1fe to your computer and use it in GitHub Desktop.
Save AaronRietschlin/f1269d53338d7a4a41ca6ab0d056b1fe to your computer and use it in GitHub Desktop.
GenymotionPlay
#!/bin/bash
# The MIT License (MIT)
# Copyright (c) 2016 30xi, LLC
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE..
# Download these files to the folder where you save gapps.sh and rename them so that you don't have to remember what date is what.
# Genymotion-ARM-Translation_v1.1.zip (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
# benzo-gapps-M-20151011-signed-chroma-r3.zip (https://www.androidfilehost.com/?fid=24052804347835438)
# gapps-L-4-21-15.zip (https://www.androidfilehost.com/?fid=96039337900114811 or http://downloadandroidrom.com/file/gapps/5.1/gapps-L-4-21-15.zip)
# gapps-5.1-4-21-15.zip (https://www.androidfilehost.com/?fid=96039337900114811 or http://downloadandroidrom.com/file/gapps/5.1/gapps-L-4-21-15.zip)
# gapps-5.0-20141109-signed.zip (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
# gapps-4.4.4-20140606-signed.zip (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
# gapps-4.3-20130813-signed.zip (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
# gapps-4.2-20130812-signed.zip (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
# gapps-4.1-20121011-signed.zip (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)
VERSION=`adb shell getprop ro.build.version.sdk`
case "${VERSION}" in
23*)
GAPPS=gapps-L-4-21-15.zip
;;
22*)
GAPPS=gapps-5.1-4-21-15.zip
;;
21*)
GAPPS=gapps-5.0-20141109-signed.zip
;;
19*)
GAPPS=gapps-4.4.4-20140606-signed.zip
;;
18*)
GAPPS=gapps-4.3-20130813-signed.zip
;;
17*)
GAPPS=gapps-4.2-20130812-signed.zip
;;
16*)
GAPPS=gapps-4.1-20121011-signed.zip
;;
*)
echo "I have no idea what version you are trying to install (${VERSION}). Is genymotion device running?"
exit 1
esac
echo "Sending Genymotion ARM Translation"
adb push Genymotion-ARM-Translation_v1.1.zip /sdcard/Download/
echo "Sending Google Apps ${GAPPS}"
adb push ${GAPPS} /sdcard/Download/
echo "Flashing Genymotion"
adb shell "/system/bin/flash-archive.sh /sdcard/Download/Genymotion-ARM-Translation_v1.1.zip"
echo "Flashing Google Apps"
adb shell "/system/bin/flash-archive.sh /sdcard/Download/${GAPPS}"
echo "Rebooting"
adb reboot
kill $(ps aux | grep '[G]enymotion.app/Contents/MacOS/Player.app/Contents/MacOS/player ' | awk '{print $2}')
echo "Restart your Genymotion Device in the UI."
case "${VERSION}" in
23*)
read -p "When the device is restarted, signin to Google Apps. Press [Enter] key after signin and an additional file will be flashed..."
echo "Sending benzo-gapps-M-20151011-signed-chroma-r3.zip"
adb push benzo-gapps-M-20151011-signed-chroma-r3.zip /sdcard/Download/
echo "Flashing benzo-gapps-M-20151011-signed-chroma-r3.zip"
adb shell "/system/bin/flash-archive.sh /sdcard/Download/benzo-gapps-M-20151011-signed-chroma-r3.zip"
echo "Rebooting"
adb reboot
kill $(ps aux | grep '[G]enymotion.app/Contents/MacOS/Player.app/Contents/MacOS/player ' | awk '{print $2}')
echo "Restart your Genymotion Device in the UI"
;;
*)
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment