app backup with market relinking

Discussion in 'Android Applications' started by pandroid, Jan 4, 2010.

  1. pandroid
    Offline

    pandroid Theme Developer Theme Developer

    Joined:
    Dec 16, 2009
    Messages:
    855
    Likes Received:
    0
    Trophy Points:
    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"

    Attached Files:

  2. thereason00
    Offline

    thereason00 New Member

    Joined:
    Dec 27, 2009
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    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!
  3. psycopcs
    Offline

    psycopcs New Member

    Joined:
    Jan 2, 2010
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Yeah, that would be great if you could post that and any instructions on installing the two
  4. pandroid
    Offline

    pandroid Theme Developer Theme Developer

    Joined:
    Dec 16, 2009
    Messages:
    855
    Likes Received:
    0
    Trophy Points:
    0
    i thought this thread was going to die...

    please check the first post for the required files and directions :)
  5. thereason00
    Offline

    thereason00 New Member

    Joined:
    Dec 27, 2009
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    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!
  6. pandroid
    Offline

    pandroid Theme Developer Theme Developer

    Joined:
    Dec 16, 2009
    Messages:
    855
    Likes Received:
    0
    Trophy Points:
    0
    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 :)
  7. thereason00
    Offline

    thereason00 New Member

    Joined:
    Dec 27, 2009
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    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.
  8. pandroid
    Offline

    pandroid Theme Developer Theme Developer

    Joined:
    Dec 16, 2009
    Messages:
    855
    Likes Received:
    0
    Trophy Points:
    0
    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
  9. thereason00
    Offline

    thereason00 New Member

    Joined:
    Dec 27, 2009
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    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..
  10. Keramidas
    Offline

    Keramidas New Member

    Joined:
    Jan 6, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Switzerland
    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...
  11. Martin030908
    Offline

    Martin030908 DF Super Moderator

    Joined:
    Nov 1, 2009
    Messages:
    8,805
    Likes Received:
    0
    Trophy Points:
    0
    Shouldn't these be in "hack" sections since it requires root? Just asking :)
  12. thereason00
    Offline

    thereason00 New Member

    Joined:
    Dec 27, 2009
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    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 :)
  13. forkup
    Offline

    forkup New Member

    Joined:
    Oct 31, 2009
    Messages:
    317
    Likes Received:
    0
    Trophy Points:
    0
    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...
  14. pandroid
    Offline

    pandroid Theme Developer Theme Developer

    Joined:
    Dec 16, 2009
    Messages:
    855
    Likes Received:
    0
    Trophy Points:
    0
    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
  15. Keramidas
    Offline

    Keramidas New Member

    Joined:
    Jan 6, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Switzerland
    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 :)
  16. Keramidas
    Offline

    Keramidas New Member

    Joined:
    Jan 6, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Switzerland
    Yes forkup, good catch :)

    The easiest way would have been to publish a "donate" (or pro) version on the Market, but unfortunately, pay-for apps can't be published from Switzerland yet !

    So, what would be the preferred option(s) for you guys ?

    a) I take PayPal donations and send a tiny "unlocking" app by e-mail in return. When installed, it unlocks full fonctionality in Titanium Backup.

    b) I take PayPal donations and send a serial number in return. Full fonctionality is unlocked when e-mail address & serial are entered in Titanium Backup.

    c) Same as "a" but I publish the unlocking app on the slideme.org marketplace, which accepts app sellers from anywhere.

    Please "vote", or propose your own options...

    PS: Concerning option "b": I have a Paypal "premier" account, and I haven't look at the fees for small transactions yet..
  17. pandroid
    Offline

    pandroid Theme Developer Theme Developer

    Joined:
    Dec 16, 2009
    Messages:
    855
    Likes Received:
    0
    Trophy Points:
    0
    last thing i want to do is download another app. not a user of slideme either. i vote for serial, until google allows paid apps from Switzerland then post a donate version :)
  18. forkup
    Offline

    forkup New Member

    Joined:
    Oct 31, 2009
    Messages:
    317
    Likes Received:
    0
    Trophy Points:
    0
    Agreed, I'll vote for option b.
  19. Keramidas
    Offline

    Keramidas New Member

    Joined:
    Jan 6, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Switzerland
    Ok, thanks for your input ! Following your preferences, and thanks to my cryptography "foolish years", option B is implemented and done :)

    It is not possible today to use short *and* safe serial numbers, it's either one or the other. Therefore I decided to go for a license file.

    It's a less than 1kB file that looks like this:

    Code:
    # This is your license file for Titanium Backup.
    #
    # Instructions:
    # - Copy this file to the root directory of your SD card
    # - Start Titanium Backup and verify that your registration info is displayed
    # - Optional: delete this file from your SD card
    #
    generation=1
    #
    customerName=Joe Average
    customerEmail=joe.average@aol.com
    #
    signature=@@@(big hex number)@@@
    
    So you don't even need to type anything :icon_ banana:
    I hope you'll like this ! Oh, and one last question before we go live, I'm not sure what a fair price would be. Maybe a fixed price like $6 ? Or some "pay what you like" thing ?

    A lot of things will be added in the future, but that also depends on how many people want to contribute :)
  20. Keramidas
    Offline

    Keramidas New Member

    Joined:
    Jan 6, 2010
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Switzerland
    Hi all,

    I have published a new version on the Market, 2.2.4 beta, with integrated SQLite (for people who don't have it in their ROM).

    Please report if you have any problems !
Search tags for this page
android attach app to market
,
android relink market apps
,
backup market apps
,
error with data backup titanium backup
,
how to relink an app with market with help of titanium backu
,

how to relink apps to market

,
how to restore and relink uninstalled apps on android
,

relink apps to market

,
relink apps to market no root
,
there was a problem parsing the package titanium backup
,
titanium backup and sqlite
,
titanium backup attach to market
,
titanium backup checking for sqlite support
,
titanium backup error parsing package
,
titanium backup error with data backup