1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

SS 4.x - bkapps and rstapps - What R They?

Discussion in 'ChevyNo1' started by ChevyNo1, Jun 15, 2010.

  1. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    bkapps/rstapps


    These two scripts are certain to become your total backup/restore procedure if you flash ROMS as frequently as I do! They are still a work in progress, so I welcome comments and suggestions. In addition, there is some new functionality in 4.1 only; it's option is simply '-c':

    bkapps -c and
    rstapps -c

    This option is to be used alone, no others apply. This represents a COMPLETE backup/restore. What do I mean by complete? EVERYTHING, with the exception of on-screen widgets. If you know how they are programmed that would be obvious as to why. So, this even includes all of your accounts, Google/Facebook/Corporate/Twitter, and background wallpaper. It even includes your MMS messages! :)

    How quick are they?

    How about 46 seconds to backup 51 market apps, including all data, mms, etc?

    How about 2 minutes, 26 seconds, to restore all of that back?

    :icon_ banana:


    Note that only '-c' saves everything. '-a' will back up apps + data, but no accounts, no mms, desktop, etc.

    I will also note this, since I've stated this is a 'progress in works': Either use just '-c' or just '-a' along with app lists; the two right now are not playing well together. I recommend '-c' since it does everything, and I presume that's what 99% of you are looking for. In addition - this currently only stores ONE backup. Which means if you have a full backup taken, and you accidentally run bkapps again say on a fresh ROM with no apps ... you just blew away your backup. So only run this when you are doing a FULL backup. Future version will allow for multiple.




    BKAPPS

    Usage: bkapps -a [app1 app2 app3]

    -a -> Backup ALL apps and their data
    -c -> COMPLETE backup, including accounts, mms msgs, desktop, etc

    App lists are separated by spaces

    If you specify -a, everything will be backed up.
    If you want only certain apps, specify them without
    the -a option. In addition, only partial names of
    apps need to be specified, ie faceb will match on
    com.facebook.katana.

    Use rstapps to restore.




    RSTAPPS

    Usage: rstapps [app1 app2 app3] -a -f -np -nd -p -x [app1 app2 app3]

    -a -> Restore ALL apps and their data
    -c -> COMPLETE restore, including accounts, mms msgs, desktop, etc
    -f -> force reinstallation, even if local is more recent
    -np -> Don't set permissions
    -nd -> Don't restore data files
    -x -> Exclude following apps from restoration
    -p -> Fix permissions only

    App lists are separated by spaces; the list ends when the next
    parameter (ie. -f) is specified.

    In addition, only partial names of apps need to be specified,
    ie faceb will match on com.facebook.katana.

    NOTE: If apps are running when you try to restore them, they WILL be killed
  2. joshk
    Offline

    joshk New Member

    Joined:
    Jun 14, 2010
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Far Far Away....
    When I run terminal emulator on my phone I get permission denied no matter what I try to run. For instance I just tried bkapps -a and it says denied but then says be patient then says cant open /data/data
    cannot create /sdcard/chevyno1/apps/myapps.1st:: directory nonexsistant

    Says the above a couple times then finishes by saying all apps backed up??? Am I an idiot or doing something wrong. Thanks in advance for anyone who helps. By the way its all command or scripts I try not just backup or restore.

    JOSH
  3. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    Hi Josh, there was a 'bug' in the first implementation of bkapps - if you make sure to create the directory on your sdcard first (chevyno1/apps) it should work. This is fixed in the next release.
  4. joshk
    Offline

    joshk New Member

    Joined:
    Jun 14, 2010
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Far Far Away....
    Thanks for the quick reply!!

    JOSH
  5. stewp97
    Offline

    stewp97 New Member

    Joined:
    Mar 8, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    I think I got it to work. I have a file called /sdcard/chevyno1/apps/backup.tgz It is 5231374 bytes in size. I will try a restore when I update to 4.1 Thanks for your work on it!

    peter
  6. stewp97
    Offline

    stewp97 New Member

    Joined:
    Mar 8, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    I wiped and installed 4.1. After I rstapps -c and rebooted the phone a couple of times with a battery pull, I was getting FCs on most apps. I tried the ulv kernel as well since it worked well on 4.0 for me. Same FCs. I ended up re-wipping and reinstalled a nandroid backup of 4.0, then upgraded to 4.1 without wipping. Everything seems to working fine now.

    peter
  7. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    OK thanks for the feedback - hmmm, odd. I've tested this exact scenario myself several times ...
  8. stewp97
    Offline

    stewp97 New Member

    Joined:
    Mar 8, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    Could always be user error too!

    I did log into my Google account before I did the restore, and I think my apps started to download automatically from the market before I did the restore. I wonder if that might have been the problem?
  9. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    That is a possibility - I'll test it out
  10. stewp97
    Offline

    stewp97 New Member

    Joined:
    Mar 8, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    I tried it again without logging into Google first. Several apps were still giving me FCs, but mainly it was NewsRob. I tried to reinstall from the market and restore from Titanium. No luck with either method. A couple of the other apps I was having problems with seemed to work this time though.

    It looks like a great way to backup and restore the phone. I will try it again next time!

    thanks, peter
  11. B-Unit
    Offline

    B-Unit Member

    Joined:
    Mar 26, 2010
    Messages:
    300
    Likes Received:
    4
    Trophy Points:
    18
    Hey Chevy, if I apply the bkapps.zip to SS4.0, can I then use the -c switch?

    EDIT: NVM, tried it and worked great! Thanks for all your hard work on this stuff Chevy!
  12. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    Yep, glad you got it working, so no issues eh?
  13. B-Unit
    Offline

    B-Unit Member

    Joined:
    Mar 26, 2010
    Messages:
    300
    Likes Received:
    4
    Trophy Points:
    18
    The backup seemed to go without a hitch, working on the restore now, it seems to go into a loop.

    Still working on:

    com.google.android.apps.chrometophone-2
    com.keramidas.TitainiumBackup-2
    com.mhuang.overclocking-2
    com.smartandroidapps.audiowidget-2
    com.weather.Weather-2
    org.hermit.tricorder-2
    sui.m-2

    Still working on:

    repeats from there about every 10 seconds.
  14. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    Yes, I am aware of this bug ;) Are you running 4.0? Thought I had fixed this, but maybe it didn't make it into 4.1. You can just kill the terminal session - you likely will not have any issues. If you do with any of those apps listed, let me know!
  15. B-Unit
    Offline

    B-Unit Member

    Joined:
    Mar 26, 2010
    Messages:
    300
    Likes Received:
    4
    Trophy Points:
    18
    OK sounds good. What I did was install the bkapps zip on 4.0, then wiped and installed 4.1. Ill let you know how it turns out.

    EDIT: OK, those apps have icons, but they all force close when I try to open them.
  16. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    Working on a fix for ya ... hang tight
  17. stewp97
    Offline

    stewp97 New Member

    Joined:
    Mar 8, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    0
    This is what happened to me the second time too. Sorry I didn't mention it earlier. I didn't think much of it because Titanium did work after a reboot.

    peter
  18. razgueado
    Offline

    razgueado New Member

    Joined:
    Mar 8, 2010
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    0

    As I described on the Froyo thread, this looks like exactly what happened to me last night with 4.1. And some of the files listed above are among those mine spun out on, specifically Titanium and SetCPU. ROM manager also was on my list.

    Always the same sequence, first a bunch of FC messages, for running processes I assume, then a few not found errors during the CHOWN phase, then a couple more FC messages as it works, then finally a few files at the end that just keep trying, and trying, and trying. If I kill terminal and check the launcher, there are no icons for the files it was looping on. All market apps FC immediately. Apps that came from elsewhere seem to be okay.

    This was after wipe, 3 times of data and cache, 3 times of system. After application of 4.1 and reboot, I touched the Android icon to get started, then skipped tutorial and skipped setting up account. Left the use location and backup to Google checkboxes checked. Went to Dev Tools terminal, su, proper syntax for rstapps -c.

    From ADB Shell, same result as in local terminal.

    I thought maybe it had to do with the fact that I had some apps moved to SD and didn't move them back before wiping. Possible, I guess, but none of the apps its looping on were among those on the SD. Aye, caramba...should point out that I moved those apps to SD using Titanium, not Froyo. I was on the leaked Froyo previously that had the Apps2SD options disabled. Just input for your thoughts, Chevy.

    If anyone is wondering, Rstapps doesn't work at all when in recovery - not surprising, I'm sure, but I gave it a shot just for grins and giggles.

    Raz
  19. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
    Yep - there is a new 'functionality' in Froyo where it appends -# to successive installs/updates of apps - so it is wreaking a bit of havoc on rstapps ;)

    B-unit, sent you a pm. If that works I'll publish for the rest.
  20. ChevyNo1
    Offline

    ChevyNo1 Premium Member Premium Member Developer

    Joined:
    Dec 28, 2009
    Messages:
    5,354
    Likes Received:
    5
    Trophy Points:
    0
Search tags for this page

bkapps rstapps