FORUMS

20140606 KK Gapps-slim and custom for CM11

2,545 posts
Thanks Meter: 2,261
 
By samep, Senior Member on 22nd July 2014, 12:26 AM
Post Reply Email Thread
gapps-slim1.6_CM11_kk4.4.4.zip (your link to simplicity) change-log coming to post #7.

Recent changes:
Google Play 5.0.31
Google Play services 6.1.74
new Link2SD script added to avoid remounting script and reboot after gapps flash; thanks to Fiouz @ XDA for original script
edited 70-gapps.sh to set default media tones; no guarantees, seemed to work the one-time I tried it. Test it; adjust to preference.
Removed Google Calendar and corrected script to allow CM Calendar to update with nightlies, when applicable.
more script changes to hopefully make the important steps 2-4 below less important (let me know)
more suggestions at post 6


Important! (prior to flash):
1) BACKUP; if you want to skip steps 2-4 or if your encounter problems, goto recovery and wipe data, manually format system, flash CM ROM, flash gapps, restore user apps only (not any Google Apps unless they are missing; ie, Google Search. Missing apps found in Google Play store)
2) goto Manage apps/Downloaded and uninstall updates to Google Play and Google Play Services (this update places Google Play 4.9.13 and Google Play Services 6.1.09 in /system
3) launch a root browser and goto /system/addon.d and delete 70-gapps.sh and 91-cm.sh
4) it's helpful to uninstall keyboards other than the Google L development keyboard used in this gapps (use Titanium Backup or Link2SD to uninstall it); the integrated scripts will remove CM-AOSP KB (Have a preference for a different keyboard? -see post 5)
Note: Your CM Nightly updates can be downloaded and installed by the integrated CMUpdater without overfilling system. Also, gapps will be restored as flashed until 70-gapps.sh is removed or the system is manually formatted prior to ROM flash. Relax; it's auto-magically done without returning to recovery each update. More bloat is being removed -see change-log post 5



Suggested use: Flash prior to next CM11 nightly update to:
1) automatically remove CM wallpapers and AOSP keyboard with each CM11 update. Still supported but epicmtd is now a mini ROM build
2) automatically backup and restore /system gapps with each CM11 update (includes: Google Play version 5.0.31, Google Play Services 6.1.11 and Google L developer edition keyboard (with three themes in advanced settings).
(suggestions and disclaimers)
*Recommend flashing initially as clean install; scripts have been modified to flash prior to nightly but dirty flash at own risk. Subsequent updates of CM 11 nightlies can be done retaining userdata, if preferred, but do so at own risk.
**If not using with clean install on initial flash, may require manual removing of original keyboard in /data partition.
***A recommended trial of these gapps could be done prior to flashing another CM nightly. Backup first. If flashing this shows problems, the userdata may need wiping or manual cleaning prior to flashing nightly and gapps. Once in place and functioning, the /system/addons.d scripts will restore minimal gapps and Google L keyboard as well as remove the bloat each update. Therefore, you can simply use the integrated CM Updater in System settings/About phone/CyanogenMod updates to download and update without manually flashing in recovery.
****Any missing Google apps should be available in Google Play.
FYI: deleting the /system/addon.d scripts manually or manually formatting system partition will defeat the auto backup and restore of this custom gapps with bloat melt.

Advantage? Free up available system and data space occupied by infrequently used gapps or outdated ones. No manual bloat melt or modifying ro partitions required. Automatically repeats manual steps... advanced users can modify to automate most manual steps repeated in CM nightly updates. (One step I still repeat manually after each boot is to cycle location toggle.)

(hints and suggestions for advanced users)
You can add your own preferred user apps at /data/app location of .zip archive using your computer but only recommend that for clean installs. If so, use this once for dirty flashing over existing userdata, your updated custom version once for each clean install. (more after disclaimer)
*disclaimer: nightlies sometimes require clean installs due to changes; dirty flash and customize this at own risk. Always backup prior to flash in case of problems.

Within reason, I can attempt to help with in-demand changes to this. To edit for more /system app removal, look into META-INF\com\google\android\updater-script and follow the method in original to make changes take each gapps flash for clean install. You'll also need to edit /system/addon.d/91-cm.sh following that method to make same changes permanent. To add user apps for clean installs, simply download to computer, open the archive and copy your preferred user apps to /data/app folder (updater-script is already modified for permissions).

Note: for those of you that like to manually format /system prior to flashing nightlies, I've looked at the CM11 updater-script and normal format does indeed take place after backing up per addon.d scipts. For example, the CM50 script actually backs up your /system/etc/hosts and rewrites to same location after its normal system partition format. This is useful for those that use apps that modify hosts to block ads. But, formatting prior to flashing could be useful if you happen to suspect a /system/addon.d backed up script was causing you problems.

Note2: I had given up on using addon.d scripts to restore scripts like Link2SD or Xposed framework but now seem to have some scripts that work for CM Updater updates over userdata; they simply eliminate a couple of manual steps within the applications and the reboot that would follow those steps. This is a safer mod, minimizing risks using the existing user scripts rather than flashing an individual's personal script. Post 3 may contain a future update for advanced users with additional scripts for backing up and restoring Link2SD sdext2 partition remount script backup and restore during CM update as well as Xposed framework /system/bin/app_process and app_process.orig backup and restore as needed. WIP; update coming soon.

Note3:There is potential to gain more system partition space available but preferences vary. Keep in mind that scripts will only impact /system partition. A customized version would be required if advanced users wish to add user apps to /data/app like user tools and apps that load quicker in a flash rather than download or side-load apps.

Note4: I've read other CM forums and latest gapps are recommended. Looking through the changes, I agree. I will try to keep this updated, if needed.
The Following 3 Users Say Thank You to samep For This Useful Post: [ View ] Gift samep Ad-Free
24th July 2014, 04:49 AM |#2  
OP Senior Member
Thanks Meter: 2,261
 
More
added CM Updater support!
Thanks to CMNein and blowtorch in this thread:
[Tutorial] CM9/CM10/CM10.1 back up script along with one other source that I lost in tapatalk, got this CM Updater support working for CM11 Nightlies for both backup and restore gapps as well as melting the bloat. If anyone knows the other source, please let me know so I can thank and give credit but the script is almost identical to the one linked.

Same apps; different scripts. Flash this one to make the backup and restore proper and continual (follow the asterisk comments for conditions)

change log:
1) added appropriate support to 70-gapps.sh to backup the right gapps and keyboard when flashing new nightly without requiring flash of gapps each time(*)
2) added new 91-cm.sh script to melt the bloat each time OTA CM Nightly is flashed.
3) consequently, changes 1 & 2 now make it possible to update CM Nightlies without having to flash gapps each time(**). I came to this realization a bit late

(*)provided that system is not manually formatted (Allow the CM scripts to backup, format system and restore gapps.)
Note: to use different gapps, format system manually or delete /system/addon.d/70-gapps.sh prior to flashing new gapps)

(**)System settings/About phone/CyanogenMod updates/update types: All versions (press the nightly version for changelog; icon gives option to download, install or indicates current version installed) Limit visits to recovery

In summary: you can flash this once and forget about flashing gapps again on nightlies. Works with the integrated CM Updater also (manually formatting system or deleting /system/addon.d/70-gapps.sh and 91-cm.sh will keep these changes from automatically restoring. Editing those scripts can save you time and pose less risk editing ro partition prior to boot.)

version 1.1
The Following 2 Users Say Thank You to samep For This Useful Post: [ View ] Gift samep Ad-Free
9th August 2014, 03:45 PM |#3  
OP Senior Member
Thanks Meter: 2,261
 
More
advanced user scripts for Link2SD and Xposed framework
gapps-SlimAdv1.2_kk-20140606-signed.zip
(Outdated; merged scripts into one release. See post #4)
refer to edited OP for advanced user discussion (spoiler or hidden text)
same gapps but added a couple of new scripts to support backup and restore of Link2SD and Xposed framework when updating CM with integrated updater while retaining userdata

changelog:
1) added 89link2sd.sh script to backup and restore user's mount script at /system/etc/init.d when updating CM
2) added 90-exposed.sh script to backup and restore /system/bin/app_process if using Xposed framework. Thanks to rovo89; script pulled from link in his OP

Note: if not using either of the above applications, just use version 1.1 referenced in previous posts.
Note2: if one of these scripts do not apply, you can open archive of zip and delete the script not needed without breaking the zip for flashing.

Disclaimer: Use at own risk; currently testing on CM Nightly 20140809.
The Following User Says Thank You to samep For This Useful Post: [ View ] Gift samep Ad-Free
20th August 2014, 09:20 PM |#4  
OP Senior Member
Thanks Meter: 2,261
 
More
If you've encountered CM theme or theme update install errors with Google Play since the 4.9.13 update, this gapps update may help; install and use the workaround below the changelog... if not having issues, stay with what works until a CM 4.4.4 Gapps is released.

changelog:
1) updated Google Play to 4.9.13; installs to system partition
2) removed backup/restore of /system/priv-app/GmsCore.apk in /system/addon.d/70-gapps.sh (no longer needed for CM updates)
(after next CM update, you should see a little more system partition available space)


Note: this update includes the advanced scripts 90-xposed.sh and 89link2sd.sh; open zip archive and delete from /system/addon.d if not needed (optional but not necessary; the scripts are there if ever needed for Link2SD or Xposed framework mods).
Note2: this update is only intended for those encountering update or install error in the new Google Play version 4.9.13 (don't update if not having issues; follow the workaround, if needed).

Install instructions:
If you have Google Play version 4.9.13, it's most likely on the data partition. Wipe its data in System settings/apps/Downloaded/Google Play Store and Uninstall the update.
Flash the updated Gapps. If having problems, go to System settings/apps/All and clear data to Google Play services, Google Play Store and Google Services Framework and reboot.

Workaround:
for Google Play Store install errors -24, -110: go to System settings/apps/All and clear data to Google Play services, Google Play Store and Google Services Framework and reboot.
If you encounter Google Play install install error -401 or -400, consider your CM theme may be causing this and revert back to original CM holo (Default) theme in System settings/Themes, freeze Link2SD and Link2SD Plus, go to System settings/apps/All and clear data to Google Play services, Google Play Store and Google Services Framework and reboot. After successfully installing or updating the problematic application, select desired CM theme and unfreeze Link2SD. The 400 hundred series install errors may be rare but I've notified the application developers of the issue.


Notes for Link2SD users:
1) after a CM update, launch the Link2SD application, wait for it to load and "clean up the 2nd partition" in the "more"/left tab slide-out. Don't click OK but read the details and note that you most likely need to "Link dalvik-cache" files in the "more"/left tab slide-out after each update. I've found it's important to wait until the application fully loads to check; otherwise, you may be causing more steps to get your linked files restored and keep the redundant files out of the internal memory.
2) if you have Google Play services update 5.0.89 in Downloaded tab of System settings/Apps, you no longer need the dalvik-cache file [email protected]@[email protected] (you can safely delete it when running the "clean up the 2nd partition" in the "more"/left tab slide-out (if deleting, reboot once more) . You should not see it again after updating CM with the CM updater.


gapps-Slimv1.3-_kk-20140606-updated.zip
1st October 2014, 08:41 PM |#5  
OP Senior Member
Thanks Meter: 2,261
 
More
change-log for gapps-slim1.4_CM11_kk4.4.4.zip update
Still don't see an official CM gapps for Android 4.4.4; this is an OTA update pulled from apk's pushed to my phone by Google
gapps-slim1.4_CM11_kk4.4.4.zip

Important: see OP (post 1) for update instructions; the old scripts need to be flushed and replaced. The gapps flash/updater-script should take care of that but to be sure, follow the manual steps.

Themes: some themes or theme updates pulled from Google Play WILL (if you have Link2SD installed and sdext2 partition is visible) give you an update error -401 If this happens to you, the workaround in post # 4 above still applies.

change-log:
removed cm-91.sh bloat remover script and integrated into a new 70-gapps.sh
removed more bloat; necessary for larger Google Play and Google Play Services moving to /system
want custom ring tones? look into /system/addon.d/70-gapps.sh for ideas (for those that can edit scripts)


Warning: many media tones were removed as bloat. Check your tones for correctness; if needed, I can add these back in.

Note:
there is a limited space left in system if you choose to risk adding some back in. During testing, the old method was actually maximizing system capacity before the bloat was removed. Therefore, a change to delete the bloat prior to writing/restoring the larger apps from gapps was necessary. If you've ever experienced lag after installing or restoring gapps during CM updates, these scripts are necessary to avoid that mishap. The scripts and updates also keep the updates from landing in /data partition, using more of your internal storage space while the system space is not utilized to its fullest capacity (until next Google update pushed OTA). If you've tried this update before, please try it again and make sure no redundant updates are in /data partition.


Tones retained:
ringtones: Orion, Themos, Kuma
alarms: Argon
notifications: Argon, Altair, Proxima


Extra bloat removed:
Apollo.apk
Galaxy4.apk
NoiseField.apk
HoloSpiralWallpaper.apk
LiveWallpapers.apk
LiveWallpaperspicker.apk
MagicSmokeWallpapers.apk
VideoEditor.apk
VisualizationWallpapers.apk
PhaseBeam.apk
PhotoTable.apk
PhotoPhase.apk
MediaUploader.apk
The Following 2 Users Say Thank You to samep For This Useful Post: [ View ] Gift samep Ad-Free
11th October 2014, 12:06 AM |#6  
OP Senior Member
Thanks Meter: 2,261
 
More
New Google Play, Services and more scripts
gapps-slim1.5_CM11_kk4.4.4.zip

What's new:
[HIDE]Google Play 5.0.31
Google Play services 6.1.11
new 88-link2sd.sh script added to avoid remounting script and reboot after gapps flash; thanks to Fiouz @ XDA for original script
more script changes to hopefully make the important steps 2-4 from OP less important (let me know)

What's important?
see OP, post 1. You can try the easy way of flashing prior to next nightly or unofficial nightly; the scripts should restore gapps and keep the ROM build "mini"
Check your tones; pull from another nightly ROM or customize as this is done in /system/addon.d/70-gapps.sh script
Xposed framework support was removed; if you need the script, pull from an older gapps version or from here; the bottom script. Hit the thanks button while you're there (the script inspired the latest 88-link2SD.sh used in this gapps release)
The Following User Says Thank You to samep For This Useful Post: [ View ] Gift samep Ad-Free
18th October 2014, 10:17 AM |#7  
OP Senior Member
Thanks Meter: 2,261
 
More
gapps-slim1.6_CM11_kk4.4.4.zip (Update)
gapps-slim1.6_CM11_kk4.4.4.zip

Changes:
Removed Google Calendar and corrected script to allow CM Calendar to actually update, when CM applies applicable update
updated Google Play Services to 6.1.74
attempted to set default media tones within the 70-gapps.sh; no guarantees. Thought it worked the one time I tried it but without data wipe so IDK.

FYI: can't test the flashes against the Epic any longer; mine got traded-in for the Note 4 ($200 BB gift card), Friday Oct. 17, 2014. Retired. Farewell Epic forum. Peace.
The Following 2 Users Say Thank You to samep For This Useful Post: [ View ] Gift samep Ad-Free
Post Reply Subscribe to Thread

Tags
customized, gapps cm11, slim for small partitions

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

Advanced Search
Display Modes