app backup with market relinking

pandroid

Theme Developer
Theme Developer
Joined
Dec 16, 2009
Messages
850
Reaction score
0
just wanted to shed some light on a fairly new app in the market. i was going to write about it earlier but it wasnt working until recently

anyways its called Titanium Backup in the market and what it basically does is it creates a backup of select or all apps including their data. then when you need to you can restore them with their data and the market links. so that if new updates come out, the market will notify you. unlike App Manager or whatever other app backup app is out there.

EVERYTHING BELOW THIS LINE IS OUTDATED (but still works)

fairly full featured it does a job and it does it well. one thing thats really missing right now is batch restore. batch backup already exists. i spoke with the dev through email and hes planning on many features.

there a few prerequisites that are very important:
root
Busybox with LZO comopression
SQLite

if you run Titanium Backup and get one or both of the following errors:
Testing LZO compression => FAIL
Checking for SQLite => FAIL

then read on, otherwise no need to keep reading

download, unzip and copy the 2 files to your SDcard. the zip i have attached contains both Busybox with LZO compression and SQLite3

now move both busybox and sqlite3 to your current busybox location. if you dont know where that is; in the terminal, or adb, run:
Code:
which busybox
that should spit something out along the lines of "/system/bin/busybox" which means "/system/bin/" is where you will want to copy busybox and sqlite

in order to move the 2 files to, in my case, "/system/bin" i would run from adb or a terminal
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
busybox mv /sdcard/busybox /system/bin/busybox2
busybox mv /sdcard/sqlite3 /system/bin/
rm /system/bin/busybox
mv /system/bin/busybox2 /system/bin/busybox
mount -o ro,remount -t yaffs2 /dev/block/mtdblock4 /system
sync
reboot
be sure to substitute "/system/bin/" with what we found earlier

all thats left to do is run Titanium Backup again, and youre good to go

edit: changed "mtdblock3" to "mtdblock4"
 

Attachments

  • busybox+sqlite3.zip
    1,004.7 KB · Views: 2,874
I could use links for each!

When I launch Titanium I get testing root access ok (busybox 1.8.1)
LZO compression fails
SQLite failed.

Using 2.1.9 beta.

Thanks!
 
Yeah, that would be great if you could post that and any instructions on installing the two
 
I could use links for each!
When I launch Titanium I get testing root access ok (busybox 1.8.1)
LZO compression fails
SQLite failed.
Using 2.1.9 beta.
Thanks!
Yeah, that would be great if you could post that and any instructions on installing the two

i thought this thread was going to die...

please check the first post for the required files and directions :)
 
I could use links for each!
When I launch Titanium I get testing root access ok (busybox 1.8.1)
LZO compression fails
SQLite failed.
Using 2.1.9 beta.
Thanks!
Yeah, that would be great if you could post that and any instructions on installing the two

i thought this thread was going to die...

please check the first post for the required files and directions :)

Well I had kind of given up on this working since it didn't seem to when I flashed a 2.1 rom and was playing around, but once i saw this LZO compression issue, I was hoping that maybe that was the problem. So I'm gonna back everything up now (because your files both worked like a charm. THANK YOU!) and flash a fresh 2.1 rom and try a restore and see what happens!
 
Well I had kind of given up on this working since it didn't seem to when I flashed a 2.1 rom and was playing around, but once i saw this LZO compression issue, I was hoping that maybe that was the problem. So I'm gonna back everything up now (because your files both worked like a charm. THANK YOU!) and flash a fresh 2.1 rom and try a restore and see what happens!

let me know if you get it working on 2.1, id like to know.

also the dev is working on a fallback to gzip compression if LZO is absent in busybox. so we'll see how well that works

im a bit surprised this isnt getting more attention. this is probably one of my most useful apps. oh well, at least we got it :)
 
Good news and bad...

restoring data works, however, if you try and restore data to an app that isn't installed and you press 'app + data' or 'app only' you get a 'problem parsing package' error. BUT if you install the app from the market OR, which is better, use ASTRO to backup the actual apps/.apk files then do a batch reinstall, you can then restore the data to those apps pretty easily. I tried it on a few apps that i opened, started new, then restored the data and my settings and things were there.

Example: Installed Shazam on a fresh 2.1 ROM, hit the agree button, completely new app, went to Titanium to restore and re-ran it and all my tags were there again.

So basically as far as I can tell, restoring settings works, re-installing the app itself from within the program does not. At least on a 2.1 ROM...


PS. did you compile the busybox with LZO compression yourself? I was looking all over for an updated version while I was waiting for your updated post with links, and was just curious. I'm a windows person myself so I have no experience compiling UNIX binaries and things like that.
 
Good news and bad...

restoring data works, however, if you try and restore data to an app that isn't installed and you press 'app + data' or 'app only' you get a 'problem parsing package' error. BUT if you install the app from the market OR, which is better, use ASTRO to backup the actual apps/.apk files then do a batch reinstall, you can then restore the data to those apps pretty easily. I tried it on a few apps that i opened, started new, then restored the data and my settings and things were there.

Example: Installed Shazam on a fresh 2.1 ROM, hit the agree button, completely new app, went to Titanium to restore and re-ran it and all my tags were there again.

So basically as far as I can tell, restoring settings works, re-installing the app itself from within the program does not. At least on a 2.1 ROM...


PS. did you compile the busybox with LZO compression yourself? I was looking all over for an updated version while I was waiting for your updated post with links, and was just curious. I'm a windows person myself so I have no experience compiling UNIX binaries and things like that.

hrm, i think that might be a 2.1 specific issue, because it seems to work just fine for me on 2.01. i dont really feel like giving it a test right now so i cant confirm. i suggest emailing the dev. he'll probably ask you for a logcat and have a fix out pretty quickly. that what he did for me when i had issues with a forceclose on batch select.

i actually got the busybox and sqlite3 straight from the dev. i dont think he compiled it himself because he was surprised to see that LZO is not enabled by default. but im definitely capable of compiling it myself. so if you have any questions, feel free to ask
 
hrm, i think that might be a 2.1 specific issue, because it seems to work just fine for me on 2.01. i dont really feel like giving it a test right now so i cant confirm. i suggest emailing the dev. he'll probably ask you for a logcat and have a fix out pretty quickly. that what he did for me when i had issues with a forceclose on batch select.

i actually got the busybox and sqlite3 straight from the dev. i dont think he compiled it himself because he was surprised to see that LZO is not enabled by default. but im definitely capable of compiling it myself. so if you have any questions, feel free to ask

I tried it last night with a 2.0.1 ROM as well after I saw your post and I get the same package parse problem. Again, if I installed an app from the market or from ASTRO file viewer apk backups and restored my data with Titanium, the data restores fine. Must be a Droid specific problem if it works fine on the platform he's developing on..
 
Hi all,

I'm the developer of Titanium Backup.
Thank you pandroid for spreading the word :)

thereason00: I've registered here to answer your question.

Yes, as you already know, I don't have a Droid and I develop on a Linux machine tied to my rooted HTC Hero. I develop with the utmost care, yet I missed the fact that LZO compression is supported only by the busybox that is shipped in the MoDaCo 3.0 ROM that I use. When I noticed it, I released a 2.1.9 version which adds a compression check on startup, and prevents further operation unless a suitable busybox (such as the one posted here) is installed. I think this busybox is compiled by Paul (the MoDaCo admin) who also packages these ROMs.

Now, if you backed up apps or data with Titanium Backup 2.1.8 or earlier AND the non-LZO-capable busybox, you have to delete them. Without LZO, the backup itself generates zero-byte sized files. I believe that's what you have in some of your backups, which is probably why you still see problems (ie: invalid file header on apk install) with version 2.1.9.

Please try to do a fresh backup of an app with 2.1.9 (with proper busybox of course) then uninstall that app and try to restore it completely from the backup. It should work and if it doesn't, please report here and I will fix it.

As pandroid mentioned, I'm currently working on dual compression support, so it will work with any version of busybox, automatically falling back to gzip compression if needed. Current backups will be forward-compatible.

Have fun...
 
Shouldn't these be in "hack" sections since it requires root? Just asking :)
 
Hi all,

I'm the developer of Titanium Backup.
Thank you pandroid for spreading the word :)

thereason00: I've registered here to answer your question.

Yes, as you already know, I don't have a Droid and I develop on a Linux machine tied to my rooted HTC Hero. I develop with the utmost care, yet I missed the fact that LZO compression is supported only by the busybox that is shipped in the MoDaCo 3.0 ROM that I use. When I noticed it, I released a 2.1.9 version which adds a compression check on startup, and prevents further operation unless a suitable busybox (such as the one posted here) is installed. I think this busybox is compiled by Paul (the MoDaCo admin) who also packages these ROMs.

Now, if you backed up apps or data with Titanium Backup 2.1.8 or earlier AND the non-LZO-capable busybox, you have to delete them. Without LZO, the backup itself generates zero-byte sized files. I believe that's what you have in some of your backups, which is probably why you still see problems (ie: invalid file header on apk install) with version 2.1.9.

Please try to do a fresh backup of an app with 2.1.9 (with proper busybox of course) then uninstall that app and try to restore it completely from the backup. It should work and if it doesn't, please report here and I will fix it.

As pandroid mentioned, I'm currently working on dual compression support, so it will work with any version of busybox, automatically falling back to gzip compression if needed. Current backups will be forward-compatible.

Have fun...

Hi Keramidas!

Thanks for the response. You were absolutely right.. when I was selecting batch and just forcing it to rebackup everything, i guess it was seeing the old .apk's (failed) LZOP'd that were there and just assuming they didn't need backed up again because they were already there, but you were right, they were 0 byte sized. the data backup worked fine of course though.

I uninstalled Ti and deleted the whole TiBackup folder on my SD and reinstalled, backed up all programs batch (~139 :/ ) and deleted one that i had settings entered in for. I restored from Ti, App + Data both times. The install screen came up both times and successfully installed the program, however when i pressed Open, it opened the app, and my saved entries weren't there, so i hit back to go back to Ti and it FC'd. I opened my restored program again though and my entries were restored. The second time I did it, I hit install on the install screen, then just hit Done instead, and it went back to Ti and said restore successful, I opened the app and my entries were there.

I don't know if it was a program specific app close or a Ti problem. So I tried another app. Fandango this time. When I installed and hit Open when it was done it loaded like it was a fresh install, even though I said restore app + data. I went back to Ti and it didn't FC, but said it was successful. I launched Fandango again and it was still opening as if it was a fresh install. So I deleted it and restored it again through Ti, and this time I hit Done instead of Open when it was done installing. It went back to the Ti app list screen and said it was successful, I went back home and launched Fandango from the app drawer and it launched and immediately started loading up the movies in my area, which is what it did when I backed it up.

So there might be a problem that the data doesn't have a chance to load quick enough or something if the user hits Open instead of Done when restoring a program and its data.

But other than that, it seems to work very fine now! This is a GREAT app for people who like to flash new roms and try them out and take all their apps with them. And keeping the Market status with them is just gangbusters.

Now all I need is a batch restore and it'll REALLY be good to go for me :)
 
Nice app but the option to keep more than one backup per app says it requies a donation yet I see no way to donate...
 
Shouldn't these be in "hack" sections since it requires root? Just asking :)

technically its an app. the only hacking required is mainly pre install. so i would consider this a hack at all. but thats just me
 
Thanks for the response. You were absolutely right.. when I was selecting batch and just forcing it to rebackup everything, i guess it was seeing the old .apk's (failed) LZOP'd that were there and just assuming they didn't need backed up again because they were already there, but you were right, they were 0 byte sized. the data backup worked fine of course though.
Hi again,

Yes, indeed. Re-backuping an app is not enough, because Titanium Backup is (or rather: will be) capable of keeping several successive backups for each app. To conserve sd card space, several successive backups can reference the same backed up apk (based on its md5 checksum). So your 0-byte apk files would never have been overwritten, because the md5 would not have changed until a new version of those apps came out on the Market. Only then, would Titanium Backup have replaced those dodgy backups with the new app versions.

So the only (and therefore the best) way to get out of the situation was indeed to manually delete all backups which contained 0-byte files.

About the restore of app+data: yes, indeed you should not click "open" at the end of the install, because the data is restored at the end of the install, as well. I will document this in my app, thanks !

About the batch restore feature: yes, it will come soon !

Have fun :)
 
Back
Top