Last active
June 28, 2016 19:39
-
-
Save keith30xi/a42dcca590e147b71ffa20578e7e1b32 to your computer and use it in GitHub Desktop.
GenymotionPlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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.. | |
# 1) Download these files to the folder where you saved this script and ensure you do not rename them. | |
# 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=96042739161891406) | |
# gapps-lp-20141109-signed.zip (https://www.androidfilehost.com/?fid=95784891001614559 | |
# gapps-kk-20140606-signed.zip (https://www.androidfilehost.com/?fid=23501681358544845) | |
# gapps-jb-20130813-signed.zip (https://www.androidfilehost.com/?fid=23060877490000124) | |
# gapps-jb-20130812-signed.zip (https://www.androidfilehost.com/?fid=23060877490000128) | |
# gapps-jb-20121011-signed.zip (https://www.androidfilehost.com/?fid=22979706399755082) | |
# 2) Start your genymotion emulator | |
# 3) Run this script (its okay if it runs multiple times since it will simply overwrite the= settings on the emulator) | |
VERSION=`adb shell getprop ro.build.version.sdk` | |
if adb shell pm list packages | grep 'package:com.google.android.gms'; then | |
echo "Google Apps appears to already be installed" | |
exit 1; | |
fi | |
case "${VERSION}" in | |
23*) | |
GAPPS=gapps-L-4-21-15.zip | |
;; | |
22*) | |
GAPPS=gapps-L-4-21-15.zip | |
;; | |
21*) | |
GAPPS=gapps-lp-20141109-signed.zip | |
;; | |
19*) | |
GAPPS=gapps-kk-20140606-signed.zip | |
;; | |
18*) | |
GAPPS=gapps-jb-20130813-signed.zip | |
;; | |
17*) | |
GAPPS=gapps-jb-20130812-signed.zip | |
;; | |
16*) | |
GAPPS=gapps-jb-20121011-signed.zip | |
;; | |
*) | |
echo "I have no idea what version you are trying to install (${VERSION}). Is genymotion device running?" | |
exit 1 | |
esac | |
if [ ! -f Genymotion-ARM-Translation_v1.1.zip ]; then | |
echo "Please download Genymotion-ARM-Translation_v1.1.zip to this folder" | |
fi | |
if [ ! -f ${GAPPS} ]; then | |
echo "Please download ${GAPPS} to this folder" | |
fi | |
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 (if the Genymotion UI is unresponsive kill it manually)" | |
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*) | |
if [ ! -f benzo-gapps-M-20151011-signed-chroma-r3.zip ]; then | |
echo "Please download benzo-gapps-M-20151011-signed-chroma-r3.zip to this folder" | |
fi | |
read -p "When the device is restarted, signin to Google Apps by adding a Google Account in device Settings. Ignore the dialogs about Google Play crashing. 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 (if the Genymotion UI is unresponsive kill it manually)" | |
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