FORUMS
Remove All Ads from XDA

[Script][GAPPS][KitKat] make your own custom package

53 posts
Thanks Meter: 53
 
Post Reply Email Thread
Do you like to make your own GAPPS? Now you can do!

myGAPPS: create your own GAPPS for KitKat: small or big as you like it
By default you will create very small GAPPS (only 16MB)!

There are 2 scripts inside the zip filr:
"makeit.bat" will run on WINDOWS
"makeit.sh" will run on LINUX

Installing:
  1. Download my scripts http://github.com/wilmsn/myGAPPS/archive/master.zip and extract them at a place on your choice on your computer, called later. MYGAPPS-DIR
  2. Goto MYGAPPS-DIR\tools
  3. Make sure you have installed java runtime on your computer
  4. Linux user: make sure 7z is installed

Creating a GAPPS version:
  1. Download you favorite GAPPS as installable zip file
  2. Place it in MYGAPPS-DIR
  3. Start makeit.bat / makeit.sh
  4. You will find the result in \myGAPPS

Change the content of your GAPPS:

Inside the MYGAPPS-DIR/tools dir you will find 2 scripts:
  • deloldgapps.txt: Put anything in here what you would like the script to delete This will only be included if you answer "Delete old GAPPS from existing ROM [y/n]?" with y
  • instgapps.txt: Change it the way you like it This will allways be included

Tested on:
Samsung Galaxy S plus running CM 11 by ADC Team
Nexus 7 (grouper) running SlimROMs CM 11

Tested with:
GAPPS Package from ADC Team
GAPPS Package from SlimRoms

Visit my GITHUB here: http://github.com/wilmsn

Dont forget: You are responsible for your device.
I offered this script in the hope that it will be helpful to you and i do not take any responsibility for any damages that may caused by this script.
The Following 30 Users Say Thank You to wilmsn For This Useful Post: [ View ] Gift wilmsn Ad-Free
 
 
27th May 2014, 02:10 PM |#2  
wilmsn's Avatar
OP Member
Flag Muenster
Thanks Meter: 53
 
More
Update history
Update history:
30.05.2014: linux script and additional tools included
The Following User Says Thank You to wilmsn For This Useful Post: [ View ] Gift wilmsn Ad-Free
27th May 2014, 02:28 PM |#3  
eagleeyetom's Avatar
Developer Committee Lead / XDA Portal Team / Senior Moderator
Flag Gdańsk
Thanks Meter: 13,154
 
Donate to Me
More
Could you provide a working signapk.jar? The archive from link you've posted doesn't have it inside.
The Following User Says Thank You to eagleeyetom For This Useful Post: [ View ] Gift eagleeyetom Ad-Free
27th May 2014, 02:55 PM |#4  
wilmsn's Avatar
OP Member
Flag Muenster
Thanks Meter: 53
 
More
Quote:
Originally Posted by eagleeyetom

Could you provide a working signapk.jar? The archive from link you've posted doesn't have it inside.

You can find it inside the zip file: sign-master-1.zip ==> sign-master => dist
Or go to my github i forked it.
The Following User Says Thank You to wilmsn For This Useful Post: [ View ] Gift wilmsn Ad-Free
27th May 2014, 06:27 PM |#5  
eagleeyetom's Avatar
Developer Committee Lead / XDA Portal Team / Senior Moderator
Flag Gdańsk
Thanks Meter: 13,154
 
Donate to Me
More
Quote:
Originally Posted by wilmsn

You can find it inside the zip file: sign-master-1.zip ==> sign-master => dist
Or go to my github i forked it.

Sweet thanks I will feature your work in the portal
The Following 3 Users Say Thank You to eagleeyetom For This Useful Post: [ View ] Gift eagleeyetom Ad-Free
30th May 2014, 05:01 AM |#7  
broodplank1337's Avatar
Recognized Developer
Flag Nijmegen
Thanks Meter: 10,181
 
Donate to Me
More
Nice , I suggest you could maybe just add the needed binaries in the folder.

so the installing part will be reduced from 5 steps to just 1.

Installing:

Download my scripts http://github.com/wilmsn/myGAPPS/archive/master.zip and extract them at a place on your choice on your computer, called later.
Goto \tools
Extract dos2unix here
Extract 7za442.zip here
Extract here this files from the sign archive: signapk.jar http://github.com/appium/sign/raw/ma...st/signapk.jar, testkey.pk8 http://github.com/appium/sign/raw/master/testkey.pk8, testkey.x509.pem http://raw.githubusercontent.com/app...stkey.x509.pem

(Make sure you have installed java runtime on your computer)

Second, thing I wanted to say, since actually all rom builders that will need gapps are on linux you could maybe make an additional shell script, since there wont be a lot of windows users that build open source roms

here is some example of how it would be in bash/shell script (linux)

Code:
#!/bin/bash
mkdir tools
cd tools
echo "Now configuring your GAPPS...."
echo "ui_print(" ");" > updater-script
echo "ui_print("Make your own GAPPS");" >> updater-script
echo "ui_print(" ");" >> updater-script
echo "ui_print("   by N.Wilms");" >> updater-script
echo "ui_print("Mounting system...");" >> updater-script
echo "run_program("/sbin/busybox", "mount", "/system");" >> updater-script
echo "show_progress(10, 10);" >> updater-script
echo "I can delete the old GAPPS from your ROM."
echo "For Details look at "tools/deloldgapps.txt""
echo "If you have anything more to delete place it there!"
echo
echo "Delete old GAPPS from existing ROM [y/n]?:"
read delOLD 
if [[ $delOLD == "y" ]]
 cat `deloldgapps.txt` >> updater-script
echo "show_progress(10, 10);" >> updater-script
 cat `instgapps.txt` >> updater-script
echo "Now extracting ....."
7za -o..\extract ..\*.zip META-INF\CERT.RSA > output.txt
7za x -o..\extract ..\*.zip META-INF\CERT.SF >> output.txt
7za x -o..\extract ..\*.zip META-INF\MANIFEST.MF >> output.txt
7za x -o..\extract ..\*.zip META-INF\com\google\android\update-binary >> output.txt
7za x -o..\extract ..\*.zip system\addon.d\*gapps.sh >> output.txt
7za x -o..\extract ..\*.zip system\app\GoogleContactsSyncAdapter.apk >> output.txt
7za x -o..\extract ..\*.zip system\etc\permissions\com.google.android.maps.xml >> output.txt
7za x -o..\extract ..\*.zip system\etc\permissions\com.google.android.media.effects.xml >> output.txt
7za x -o..\extract ..\*.zip system\etc\permissions\com.google.widevine.software.drm.xml >> output.txt
7za x -o..\extract ..\*.zip system\etc\permissions\features.xml >> output.txt
7za x -o..\extract ..\*.zip system\framework\com.google.android.maps.jar >> output.txt
7za x -o..\extract ..\*.zip system\framework\com.google.android.media.effects.jar >> output.txt
7za x -o..\extract ..\*.zip system\framework\com.google.widevine.software.drm.jar >> output.txt
7za x -o..\extract ..\*.zip system\priv-app\CalendarProvider.apk >> output.txt
7za x -o..\extract ..\*.zip system\priv-app\GoogleBackupTransport.apk >> output.txt
7za x -o..\extract ..\*.zip system\priv-app\GoogleFeedback.apk >> output.txt
7za x -o..\extract ..\*.zip system\priv-app\GoogleLoginService.apk >> output.txt
7za x -o..\extract ..\*.zip system\priv-app\GooglePartnerSetup.apk >> output.txt
7za x -o..\extract ..\*.zip system\priv-app\GoogleServicesFramework.apk >> output.txt
7za x -o..\extract ..\*.zip system\priv-app\Phonesky.apk  >> output.txt
7za x -o..\extract ..\*.zip system\priv-app\PrebuiltGmsCore.apk >> output.txt
7za x -o..\extract ..\*.zip system\priv-app\SetupWizard.apk >> output.txt
mv updater-script ..\extract\META-INF\com\google\android  >> output.txt
echo "if you would like to add some APKs?"
echo "Copy them to the right place in the "extract" dir."
echo "Or change something else?"
echo "Now its the time!"
echo
echo "Press any key to continue"
read any
echo "Zipping"
7za a -tzip "../updateold.zip" "../extract/*" -mx
echo "Signing"
java -Xmx512m -jar signapk.jar -w testkey.x509.pem testkey.pk8 ../updateold.zip ../mygapps/mygapps.zip
cd ..
rm updateold.zip
echo "Press any key to continue"
read any

Not tested but this should somewhat do the trick on linux
The Following 3 Users Say Thank You to broodplank1337 For This Useful Post: [ View ]
30th May 2014, 05:26 AM |#8  
xdrc45's Avatar
Senior Member
Flag Great White , Michigan
Thanks Meter: 314
 
More
This is very cool!! Looking forward to trying this out and putting together my own gapps package.
Thank you for this!
The Following User Says Thank You to xdrc45 For This Useful Post: [ View ] Gift xdrc45 Ad-Free
30th May 2014, 11:01 AM |#9  
a3361035's Avatar
Senior Member
Thanks Meter: 123
 
More
Modifying other random GAPPS packages is a bad idea as those are moving targets.
This script doesn't help in determining which files belong to which app nor is deloldgapps.txt a good starting point as it would miss lots of apps for pa_gapps-modular-full.
It also doesn't update addon.d.

Something like PA GAPPS REMOVER, which actually tracks the matching GAPPS package is the way to go:
http://forum.xda-developers.com/show...52&postcount=8
The Following 3 Users Say Thank You to a3361035 For This Useful Post: [ View ] Gift a3361035 Ad-Free
30th May 2014, 12:01 PM |#10  
exodius48's Avatar
Senior Member
Flag Hatinya Nabilah
Thanks Meter: 216
 
Donate to Me
More
I have tested, could I use 19.4 MB of new gapps? @wilmsn
Old gapps 98 mb, I use PA gapps
The Following 2 Users Say Thank You to exodius48 For This Useful Post: [ View ] Gift exodius48 Ad-Free
30th May 2014, 01:00 PM |#11  
wilmsn's Avatar
OP Member
Flag Muenster
Thanks Meter: 53
 
More
Quote:
Originally Posted by exodius48

I have tested, could I use 19.4 MB of new gapps? @wilmsn
Old gapps 98 mb, I use PA gapps

Sure you can use it (of course at your own risk ). If something wents wrong just flash your original GAPPS on top of it.
Please post some details if it fails.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes