# [Write-Up] Preservation of Apps



## HalosGhost (Jun 29, 2011)

Those of us who played Portal and Portal 2 had the fantastic feeling of walking through a grill of electricity giving you that completely clean feeling for each new stainless test chamber.

Well, many of us in the Android community want to feel the same with each ROM flash, and so begins the wiping and formatting. While this is all fine and good, there are many a ROM that dislike having things be restored by TiBU or other backup applications, and lest we not forget that there are plenty of things that can't be backed up by these utilities.

Enter the genius of the CyanogenMod team. A while ago, the team realized that this issue existed and wanted to include a utility to solve the problem without requiring an extra interface (i.e., a new application or needing something to be coded by someone else). Thus, backuptool.sh was born. Among other things, such as automatically backing up GAPPS across flashes, the backuptool allows you to specify mods or customizations that you have made to be restored as well.

In order to do this, all you need to do is put the paths of the items which you want to be restored in a simple text file named custom_backup_list.txt which must be stored in /system/etc. One of the tricks to this file, though, is that the backuptool assumes you're working in /system, so in the paths, you don't need to include system. For instance, if you want to keep a font that you switched out for Droid Sans, you would put the following lines in the custom_backup_list.txt:

```
/fonts/DroidSans.ttf<br />
/fonts/DroidSans-Bold.ttf
```
I haven't yet tested to see if it supports wildcards, but if I understand how it works correctly, it wouldn't shock me if it did.

*[EDIT]A friend of mine tested to see if wildcards could work, but apparently they are not supported. Again, I have not tested this myself. Feel free to try if you'd like  [/EDIT]*

The current version of my custom_backup_list.txt looks like this:

```
# System Binaries<br />
/bin/su<br />
/xbin/busybox<br />
/xbin/bash<br />
<br />
# User Binaries<br />
/xbin/nano<br />
/xbin/lynx<br />
/xbin/htop<br />
/bin/curl<br />
<br />
# System Applications<br />
/app/Superuser.apk<br />
/app/RomManager.apk<br />
<br />
# System Fonts<br />
/fonts/Clockopia.ttf<br />
/fonts/DroidSans.ttf<br />
/fonts/DroidSans-Bold.ttf<br />
/fonts/DroidSansMono.ttf<br />
/fonts/DroidSerif-Regular.ttf<br />
/fonts/DroidSerif-Bold.ttf<br />
/fonts/DroidSerif-Italic.ttf<br />
/fonts/DroidSerif-BoldItalic.ttf<br />
```
Feel free to use this and build upon it as you see fit.

Happy flashing! And all the best,

-HG


----------



## milan616 (Jun 21, 2011)

Any chance we could get a link to the tool


----------



## RevNumbers (Jun 6, 2011)

just taking a quick look at the script I don't see why i wouldn't support wildcards... but i haven't tested it either, lol 

Rev


----------



## HalosGhost (Jun 29, 2011)

"milan616 said:


> Any chance we could get a link to the tool


Actually, it's built-in to cyanogenmod, so if you're running a CM ROM, then you already have it. However, I could post the update tool and people could try it with other ROMs. No promises on it working.

All the best,

-HG

Posted from my own Mecha.


----------

