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:
    153
    Ratings:
    +5
    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 Member

    Joined:
    Jun 14, 2010
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Far Far Away....
    Ratings:
    +0
    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:
    153
    Ratings:
    +5
    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 Member

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

    JOSH
  5. stewp97
    Offline

    stewp97 Member

    Joined:
    Mar 8, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +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 Member

    Joined:
    Mar 8, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +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:
    153
    Ratings:
    +5
    OK thanks for the feedback - hmmm, odd. I've tested this exact scenario myself several times ...
  8. stewp97
    Offline

    stewp97 Member

    Joined:
    Mar 8, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +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:
    153
    Ratings:
    +5
    That is a possibility - I'll test it out
  10. stewp97
    Offline

    stewp97 Member

    Joined:
    Mar 8, 2010
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +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:
    302
    Likes Received:
    4
    Trophy Points:
    18
    Ratings:
    +4
    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:
    153
    Ratings:
    +5
    Yep, glad you got it working, so no issues eh?
  13. B-Unit
    Offline

    B-Unit Member

    Joined:
    Mar 26, 2010
    Messages:
    302
    Likes Received:
    4
    Trophy Points:
    18
    Ratings:
    +4
    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:
    153
    Ratings:
    +5
    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:
    302
    Likes Received:
    4
    Trophy Points:
    18
    Ratings:
    +4
    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.
Search tags for this page

bkapps rstapps