5,593,293 Members 33,404 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
skyjumper
Old
(Last edited by skyjumper; 2nd December 2010 at 05:21 PM.) Reason: added swype apk to list
#1  
Member - OP
Thanks Meter 4
Posts: 37
Join Date: Jan 2009
Default [GUIDE] Update CM without losing custom /system changes (ex Swype, keymap)

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
The Following 2 Users Say Thank You to skyjumper For This Useful Post: [ Click to Expand ]
 
cparekh
Old
#2  
cparekh's Avatar
Senior Member
Thanks Meter 10
Posts: 255
Join Date: Oct 2009
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.
Sometimes I forget that I have a photographic memory.
 
sundar2012
Old
#3  
Senior Member
Thanks Meter 21
Posts: 556
Join Date: Oct 2009
Location: Manhattan
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?
______________________________________________
Primary Phone
HTC Thunderbolt running Liquid/Jester ICS
Radio: 1.49.00.0406w_1, 0.01.79.0331w_1

Secondary Devices
Nexus 7 running ParanoidAndroid
Jailbroken iPhone 4
Jailbroken iPad 3

Previous Phones
HTC G2/Desire Z
Motorola Cliq (worst device I have ever had the misfortune to own)
HTC G1
 
skyjumper
Old
#4  
Member - OP
Thanks Meter 4
Posts: 37
Join Date: 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
 
sundar2012
Old
#5  
Senior Member
Thanks Meter 21
Posts: 556
Join Date: Oct 2009
Location: Manhattan
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?
______________________________________________
Primary Phone
HTC Thunderbolt running Liquid/Jester ICS
Radio: 1.49.00.0406w_1, 0.01.79.0331w_1

Secondary Devices
Nexus 7 running ParanoidAndroid
Jailbroken iPhone 4
Jailbroken iPad 3

Previous Phones
HTC G2/Desire Z
Motorola Cliq (worst device I have ever had the misfortune to own)
HTC G1
 
Kalandros
Old
(Last edited by Kalandros; 2nd December 2010 at 11:49 PM.) Reason: Didn't work.
#6  
Member
Thanks Meter 2
Posts: 41
Join Date: Jun 2009
Default 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.
 
apzalo
Old
#7  
Member
Thanks Meter 17
Posts: 89
Join Date: Nov 2010
Location: Jacksonville, FL
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
 
igashu
Old
#8  
igashu's Avatar
Member
Thanks Meter 1
Posts: 40
Join Date: 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?
 
muness
Old
#9  
Senior Member
Thanks Meter 94
Posts: 272
Join Date: Jul 2008
Quote:
Originally Posted by sundar2012 View Post
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.
Current phones: HTC Rezound, 8X.
Current tablets: Flo, Surface RT.
 
Previous phones: HTC One (my wife is using it), HD2, GalaxyNexus (toro), Rezound, Bionic, Thunderbolt, Charge, HTC Vision (aka T-Mobile G2), HTC Glacier (myTouch), Nexus One, HTC Touch Pro 2, Dash 3G, Dash.
Previous tablets: TouchPad 32GB, Nook Color.
Previous projects/useful posts: Nook Color/CM7 Install Instructions, deSense/debloat your Verizon Sense 3.6/4.0 ROM
 
IConrad01
Old
#10  
Senior Member
Thanks Meter 1
Posts: 215
Join Date: Mar 2009
@cparekh -- what e-mail app is that? Or did you just use the pre-OTA's Email.apk app?
|T-Mobile G2 (HTC Vision)|

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

Advanced Search
Display Modes


XDA PORTAL POSTS

Prevent Unwanted Butt Dialing with Smart Pocket Guard

You may recall that back in August of last year, we took a look atAir SwiperbyXDA … more

Google ATAP Details Project Ara in Developers’ Conference

Earlier today, the Google ATAP teamkicked offits first ever Project Ara … more

HTC Sense 6 Ported to the Nexus 5

The Google Nexus 5 is regarded as having everything an Android user needs or wants: timely updates, … more