Android TV Launcher Pushed to Google Play

Over the past decade, the tech universe has seen two drastic and widely contrasting changes with … more

Cyngn, OnePlus, Micromax – The Legal Battle

Recently, a battle has been waging in India over the rights to distribute the commercial … more

Lean Mean Battery Power Saving App Review

We talk a lot about battery topics here at XDA TV. We talk about everything from Power Banks to USB … more

Android 5.1 Possibly Coming February 2015

Google released Android 5.0 just over a month ago, and since then Lollipop has been trying to … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE] Update CM without losing custom /system changes (ex Swype, keymap)

OP skyjumper

2nd December 2010, 06:13 PM   |  #1  
OP Member
Thanks Meter: 4
 
37 posts
Join Date:Joined: Jan 2009
There's a really simple way to prevent CyanogenMod from overwriting your custom /system changes during an update. Create the file '/system/etc/custom_backup_list.txt' with a list of files within /system that you don't want to be overwritten.

For example, to prevent CM from wiping out Swype, open adb shell and type this:
Code:
mount -o remount,rw /system
cd /system/etc
echo lib/libSwypeCore.so >custom_backup_list.txt
echo app/Swype.apk >>custom_backup_list.txt
cd /
mount -o remount,ro /system
If you use teferi's custom keymap, do this:
Code:
mount -o remount,rw /system
cd /system/etc
echo lib/libSwypeCore.so >custom_backup_list.txt
echo app/Swype.apk >>custom_backup_list.txt
echo usr/keylayout/vision-keypad.kl >>custom_backup_list.txt
echo usr/keychars/vision-keypad.kcm.bin >>custom_backup_list.txt
cd /
mount -o remount,ro /system
Then the next time you flash CM, your changes to /system will still be there. If you want to see why this works, take a look at /system/bin/backuptool.sh

Hope this helps
Last edited by skyjumper; 2nd December 2010 at 06:21 PM. Reason: added swype apk to list
The Following 2 Users Say Thank You to skyjumper For This Useful Post: [ View ]
2nd December 2010, 08:24 PM   |  #2  
cparekh's Avatar
Senior Member
Thanks Meter: 10
 
255 posts
Join Date:Joined: Oct 2009
More
Thanks! This is great; now I can easily keep my Email.apk that doesn't require me to enter a alphanumeric password every time I want to use the phone.
2nd December 2010, 10:25 PM   |  #3  
Senior Member
Flag Manhattan
Thanks Meter: 21
 
556 posts
Join Date:Joined: Oct 2009
More
CM probably needs to overwrite build.prop but I've been changing the LCD density in this file. Is there a way to use a seperate file to override the lcd density so that i can let CM overwrite build.prop but still maintain lcd density after a flash?
2nd December 2010, 10:38 PM   |  #4  
OP Member
Thanks Meter: 4
 
37 posts
Join Date:Joined: Jan 2009
Whatever commands you put in /data/local/userinit.sh will run at boot. So in adb shell, type this for a density of 215:
Code:
cd /data/local
echo setprop qemu.sf.lcd_density 215 >userinit.sh
2nd December 2010, 11:41 PM   |  #5  
Senior Member
Flag Manhattan
Thanks Meter: 21
 
556 posts
Join Date:Joined: Oct 2009
More
awesome! thank you!

Don't suppose you would know how to get the CM update to not install/auto delete after installation apks like ADWLauncher and wifi calling?
3rd December 2010, 12:15 AM   |  #6  
Member
Thanks Meter: 2
 
41 posts
Join Date:Joined: Jun 2009
Thank you!
This may be the long lost solution to my Swype and Cyan Problems. The new Release Candidates are destroying my swype and not liking it's return after installing the new Cyan. So, if this can basically help me update without losing much, it's a god send. Especially the LCD density.

You're a genius.

Thank you.


Hmm, seems the issue is still persistent. Thanks though.
Last edited by Kalandros; 3rd December 2010 at 12:49 AM. Reason: Didn't work.
3rd December 2010, 03:01 AM   |  #7  
Member
Flag Jacksonville, FL
Thanks Meter: 17
 
94 posts
Join Date:Joined: Nov 2010
More
Should userinit.sh and custom_backup_list.txt survive the upgrade or should they both be included in the backup list file?

Sent from my HTC Vision using XDA App
3rd December 2010, 03:25 AM   |  #8  
igashu's Avatar
Member
Thanks Meter: 2
 
40 posts
Join Date:Joined: Mar 2009
If you look at the actual script, it seems that it ignores the backuptool if .installscript exists, and in practice, I've noticed that nothing gets saved when flashing via ROM Manager. Is this, in fact, what's happening, and is there a way around it?
3rd December 2010, 05:13 AM   |  #9  
Senior Member
Thanks Meter: 98
 
280 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by sundar2012

awesome! thank you!

Don't suppose you would know how to get the CM update to not install/auto delete after installation apks like ADWLauncher and wifi calling?

You can put the following in /data/local/userinit.sh:

Quote:

mount -o rw,remount /system

for apk in ADWLauncher.apk MS-HTCVISION-KNT20-02.apk
do
rm -f /system/app/$apk
done

for package in com.android.launcher
do
pm uninstall $package
done

mount -o ro,remount /system
exit 0

I haven't tried this for removing the Wifi Calling app, so ymmv. I remove a much larger set of apps myself (facebook, email, live wallpapers, amazon mp3 store, DSPManager, FileManager, Browser). http://wiki.cyanogenmod.com/index.php?title=Barebones has a list of apps that can be removed safely.
3rd December 2010, 06:14 AM   |  #10  
Senior Member
Thanks Meter: 2
 
215 posts
Join Date:Joined: Mar 2009
More
@cparekh -- what e-mail app is that? Or did you just use the pre-OTA's Email.apk app?

Post Reply Subscribe to Thread

Tags
cyanogenmod, swype, update
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes