Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
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: 35
Join Date: Jan 2009
Location: Boulder, CO
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: 253
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: 554
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: 35
Join Date: Jan 2009
Location: Boulder, CO
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: 554
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 16
Posts: 87
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 74
Posts: 195
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: 8x, Rezound, HD2. Previous: GalaxyNexus (toro), Rezound, Bionic, Thunderbolt, Charge, HTC Vision (aka T-Mobile G2), HTC Glacier (myTouch), Nexus One, HTC Touch Pro 2, Dash 3G, Dash.
Current tablets: none. Previous: TouchPad 32GB, Nook Color.
Current eReader: StoryHD. Previous: Nook Touch w/ GlowLight, Kindle Keyboard 3G, Sony PRS-505.
Nook Color/CM7 Install Instructions
deSense/debloat your Verizon Sense 3.6/4.0 ROM
 
IConrad01
Old
#10  
Senior Member
Thanks Meter 0
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)|

 
Post Reply+
Tags
cyanogenmod, swype, update
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Careers in Android: Recruiter Reveals How Resumes are Chosen – XDA Developer TV

XDA Developer TV Producer Jayce released a video a … more

HttpClient Tutorial to Upload and Download with Your App

Developers wanting to interact with the Internet need to choose a package to do the … more

Profile Flow: A Tasker Alternative

By now, we’re all quite familiar with Tasker, the personal automation app that seems to be able to … more

More Tips to Help Promote Your Android App

With over 700,000 apps in the Google Play store and more than 48 billion app installs, it’s … more