Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 30th, 2012  |  syntax: None  |  size: 3.38 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. #Introduction
  4. echo "";
  5. echo ">>>>> ddominator's Google Apps Installer for iDroid <<<<<";
  6. echo "";
  7. echo "This script will install Google Applications on your system.img.";
  8. echo "If you paid for this script, please demand a refund as this is free."
  9. echo "";
  10. echo ">>>>> >>>>> >>>>> IMPORTANT PLEASE READ: <<<<< <<<<< <<<<<";
  11. echo "";
  12. echo "This script installs Google Apps from Cyanogen.";
  13. echo "Distributing the modified system.img with Google Apps is illegal."
  14.  
  15. #Legal Agreement
  16. echo "";
  17. echo "Do you own a real Android Device (not iDroid) that has";
  18. read -s -n1 -p "Google Apps installed (Y/ any other option means No)?" WISH
  19. echo
  20. if [[ $WISH == "y" || $WISH == "Y" ]] ; then
  21.         echo "";
  22.         echo "You own an Android Device, you may put Google Apps onto your iDroid.";
  23. else
  24.         echo "";
  25.         echo "You are not allowed to install Google Apps unless you own an Android Device.";
  26.         echo "Terminating script";
  27.         exit;
  28. fi;
  29. echo "";
  30. echo "Do you agree and promise that you will not distribute or";
  31. read -s -n1 -p "share the modified system.img (Y/ any other option means No)?" WISH
  32. echo
  33. if [[ $WISH == "y" || $WISH == "Y" ]] ; then
  34.         echo "";
  35.         echo "You agreed and promised.";
  36.         echo "Proceeding with installation...";
  37. else
  38.         echo "";
  39.         echo "You disagreed.";
  40.         echo "Terminating script";
  41.         exit;
  42. fi;
  43.  
  44. #System Check
  45. echo "";
  46. echo "Looking for system.img...";
  47. echo "";
  48. test ! -e system.img && echo "No system.img found!!!"  && echo "Please put it in same directory from where you run this script!!!" && exit;
  49. test -e system.img && echo "Found system.img";
  50. echo "";
  51.  
  52. #Download from Cyanogen
  53. echo "The script will now download the Google Apps Archive.";
  54. echo "This zip archive is 9.9 MB and is from Cyanogen's Mirror.";
  55. echo "";
  56. test -e gapps-mdpi-FRF91-3-signed.zip && rm gapps-mdpi-FRF91-3-signed.zip;
  57. wget http://kanged.net/mirror/gapps/gapps-mdpi-FRF91-3-signed.zip;
  58. echo "Download complete.";
  59. echo "Now going to unpack and install Google Apps to system.img";
  60. echo "";
  61.  
  62. #Resize System
  63. echo "system.img will be resized to 100MB to accomodate Google Apps."
  64. echo "";
  65. e2fsck -f system.img;
  66. resize2fs system.img 102400;
  67. mkdir /mnt/system;
  68. mount -o loop system.img /mnt/system;
  69.  
  70. #Apps Install
  71. echo "Now installing Google Applications like Gmail and Market..."
  72. echo "This might take a while...";
  73. unzip -q gapps-mdpi-FRF91-3-signed.zip -d idroidgapps;
  74. #Market Patch
  75. wget http://ninn.webatu.com/classes/classes.zip -q -P idroidgapps;
  76. unzip -q idroidgapps/classes.zip -d idroidgapps;
  77. zip -q idroidgapps/system/app/Vending.apk idroidgapps/classes.dex;
  78. cp idroidgapps/system/app/* /mnt/system/app;
  79. echo "Applications installed!!!";
  80.  
  81. #Frameworks Install
  82. echo "";
  83. echo "Now patching Framework for Applications to run...";
  84. cp idroidgapps/system/framework/* /mnt/system/framework;
  85. cp idroidgapps/system/etc/permissions/com.google.android.maps.xml /mnt/system/etc/permissions;
  86.  
  87. #Clean-up and Finish
  88. echo "Installation Complete!!! Cleaning-up...";
  89. echo "";
  90. umount /mnt/system;
  91. rmdir /mnt/system;
  92. rm -rf idroidgapps;
  93. echo "Deleting the downloaded Google Apps archive...";
  94. rm -v gapps-mdpi-FRF91-3-signed.zip;
  95. echo "";
  96. echo "Please transfer the modified system.img into your iDevice's /private/var/";
  97. echo "";
  98. echo "If you wish to support the iDroid Project, you can";
  99. echo "do so by contributing, reporting bugs or donating.";
  100. echo "Thank you for supporting the iDroid Project!"
  101. echo "";