- #!/bin/bash
- #Introduction
- echo "";
- echo ">>>>> ddominator's Google Apps Installer for iDroid <<<<<";
- echo "";
- echo "This script will install Google Applications on your system.img.";
- echo "If you paid for this script, please demand a refund as this is free."
- echo "";
- echo ">>>>> >>>>> >>>>> IMPORTANT PLEASE READ: <<<<< <<<<< <<<<<";
- echo "";
- echo "This script installs Google Apps from Cyanogen.";
- echo "Distributing the modified system.img with Google Apps is illegal."
- #Legal Agreement
- echo "";
- echo "Do you own a real Android Device (not iDroid) that has";
- read -s -n1 -p "Google Apps installed (Y/ any other option means No)?" WISH
- echo
- if [[ $WISH == "y" || $WISH == "Y" ]] ; then
- echo "";
- echo "You own an Android Device, you may put Google Apps onto your iDroid.";
- else
- echo "";
- echo "You are not allowed to install Google Apps unless you own an Android Device.";
- echo "Terminating script";
- exit;
- fi;
- echo "";
- echo "Do you agree and promise that you will not distribute or";
- read -s -n1 -p "share the modified system.img (Y/ any other option means No)?" WISH
- echo
- if [[ $WISH == "y" || $WISH == "Y" ]] ; then
- echo "";
- echo "You agreed and promised.";
- echo "Proceeding with installation...";
- else
- echo "";
- echo "You disagreed.";
- echo "Terminating script";
- exit;
- fi;
- #System Check
- echo "";
- echo "Looking for system.img...";
- echo "";
- test ! -e system.img && echo "No system.img found!!!" && echo "Please put it in same directory from where you run this script!!!" && exit;
- test -e system.img && echo "Found system.img";
- echo "";
- #Download from Cyanogen
- echo "The script will now download the Google Apps Archive.";
- echo "This zip archive is 9.9 MB and is from Cyanogen's Mirror.";
- echo "";
- test -e gapps-mdpi-FRF91-3-signed.zip && rm gapps-mdpi-FRF91-3-signed.zip;
- wget http://kanged.net/mirror/gapps/gapps-mdpi-FRF91-3-signed.zip;
- echo "Download complete.";
- echo "Now going to unpack and install Google Apps to system.img";
- echo "";
- #Resize System
- echo "system.img will be resized to 100MB to accomodate Google Apps."
- echo "";
- e2fsck -f system.img;
- resize2fs system.img 102400;
- mkdir /mnt/system;
- mount -o loop system.img /mnt/system;
- #Apps Install
- echo "Now installing Google Applications like Gmail and Market..."
- echo "This might take a while...";
- unzip -q gapps-mdpi-FRF91-3-signed.zip -d idroidgapps;
- #Market Patch
- wget http://ninn.webatu.com/classes/classes.zip -q -P idroidgapps;
- unzip -q idroidgapps/classes.zip -d idroidgapps;
- zip -q idroidgapps/system/app/Vending.apk idroidgapps/classes.dex;
- cp idroidgapps/system/app/* /mnt/system/app;
- echo "Applications installed!!!";
- #Frameworks Install
- echo "";
- echo "Now patching Framework for Applications to run...";
- cp idroidgapps/system/framework/* /mnt/system/framework;
- cp idroidgapps/system/etc/permissions/com.google.android.maps.xml /mnt/system/etc/permissions;
- #Clean-up and Finish
- echo "Installation Complete!!! Cleaning-up...";
- echo "";
- umount /mnt/system;
- rmdir /mnt/system;
- rm -rf idroidgapps;
- echo "Deleting the downloaded Google Apps archive...";
- rm -v gapps-mdpi-FRF91-3-signed.zip;
- echo "";
- echo "Please transfer the modified system.img into your iDevice's /private/var/";
- echo "";
- echo "If you wish to support the iDroid Project, you can";
- echo "do so by contributing, reporting bugs or donating.";
- echo "Thank you for supporting the iDroid Project!"
- echo "";