Quickly re-install all of your apps - myTouch 3G, Magic General

Just a quick note to everyone who is constantly switching between ROM's with their 'daily driver' phone.
Make sure all of your apps are backed up using Astro or AppControl. They will be backed up to /sdcard/backups/apps.
Once your new ROM is installed, and your phone has been wiped, mount your SD card on your PC.
Open a command prompt and navigate to the \backups\apps folder on your SD card.
(this assumes that your adb.exe is in your PATH)
In the command prompt, type in:
for %%f in (*.apk) do adb install %%f
Watch all of your apps install! This really saves a lot of time over using Astro or AppControl to re-install all of your apps.

Absolutely brilliant!

I've done this dozens of times over the last couple weeks. I felt so dumb finding this little snippet of code after manually installing 100+ apps every time I wanted to try a new ROM.

Huh, how about a script to back up via adb? Or backup/restore app data?
Actually, the latter is far more important =P.

I think easy backup restore is with astro file manager...

SpaceBoy2000 said:
Huh, how about a script to back up via adb? Or backup/restore app data?
Actually, the latter is far more important =P.
Click to expand...
Click to collapse
That's more difficult since the data is stored in a DB inside Android (for most apps, anyway). I noticed there is a sqlite3.exe inside the Android SDK so I assume you can query the DB using that and extract certain data, for example SMS and call history, just need to invest a bit of time reading up I think!

Related

AppBack - App Backup/Restore Via ADB

Hey everyone,
I just whipped up a quick Java based app that you can back up and restore your apps that you installed (the ones in the /data/app and /data/app-private dirs) It also backs up the settings for those apps.
I'll be adding in saving settings for apps that are in system/app later, but I thought this one was ready for a release.
You must have the /tools dir of your SDK in your path var in order for this to work.
Please verify that adb is detecting the device by running "adb devices" and make sure this there.
Un-archive the the zip and it will have a AppBack-x.x.class file in it
Usage is for backup run "java AppBack backup"
And for restore is "java AppBack restore"
This will create a dir "appback" with two dirs in it, "backup" contains the apk's and "settings" contains the app data.
If there's something you'd like to see, just post and I'll do as much as humanly possible to add it in
Note: Error handling is nasty, and future versions will be nicer (shocker isn't it )
(also, when you run it first you might get a operation not permitted error, just run it again and it *should* resolve itself, I'll fix it in the next release.)
I'm writing this right about when I should be sleeping, so I probably forgot something lol, but yeah, if you encounter an error, please report it.
Thanks alot!
Aakash Patel
Oh and btw, you might have to rename the class file to "AppBack.class"...
Nice, this should be handy, will definitly check out on my next flash. Does it handle setting the correct user owner/permissions on the folders in the data directories on a restore?
This is great, but maybe in the future let user choose what apps to backup and their settings.
Oh haha I forgot to mention that important part, you have to have root! >_<
so uh.. where does it create the appback directory, and how exactly are you supposed to run it... from the device or from a console or what.. i think i ran it but im not sure and im looking all over for a appback directory

Non-root users How to move apps to sd

Hey this took me a few hours but its relatively simple. you'll need a little knowledge of DOS or maybe i'll just spell out everything for the noobs being that i'm one. IF YOU HAVE MANUALLY INSTALLED FROYO AND THE OPTION TO MOVE APPS TO SD IS STILL GREYED AND CAN'T BE SELECTED JUST DO THIS.(i'm running windows vista)
1. download and install the android sdk (unzip folder on desktop for easy access)
2. go to my computer then click on C:\ create a new folder here called android
3. go back to the sdk folder on the desktop then open it and go to tools
4. copy the contents of the tools folder to the android folder u just created
5. connect your phone in debug mode if u don't know how to do this go to settings then applications then developement then enable the usb debugging.
6. after doing that you should be prompted to install the drivers 3 will install automatically and one will fail once that one fails select "I DON'T HAVE DISC" then browse for drivers go back to the desktop where u have the android-sdk-windows folder, then go to the usb drivers folder and press ok the adb utility driver should now install. you will also be prompted to reboot the computer in order to access it do so.
7. once rebooted connect ur phone in debug mode again. it should connect smoothly. Now open up a command prompt.
8. From here you'll need to set the path to the android folder to get access to the adb commands do this by typing "path=c:\android" to test it just type adb and you should see all sorts of crap comming up in dos if that happens ur golden.
9. Now all u do is type adb shell you should now see this sign "$" if that happens ur golden now just give the command "pm setInstallLocation 2"
10. you should see the message pm setInstallLocation 2 after which the dollar sign will appear again.
11. exit then reboot you phone and UR GOOOOOD
7
Has anyone else tried this? I assumed that the apps had to support copying to SD in order to work, but Last.FM and a few other apps I have updated to 2.2 support today, and yet I still can't copy them to SD.
xSiraris said:
Has anyone else tried this? I assumed that the apps had to support copying to SD in order to work, but Last.FM and a few other apps I have updated to 2.2 support today, and yet I still can't copy them to SD.
Click to expand...
Click to collapse
i updated to froyo last night and i have been trying to move the apps to sd but it was all greyed and couldn't be selected. i finally figured it out about an hour and a half ago after reading up on adb and stuff i decided to give it a test run cuz what ppl were saying about the apps didn't make any sense. so i tried that and VOILA worked like a charm let me know if it works for u. it did just fine for me
Apps to SD works fine with stock Froyo. The developer just has to support it. One app that does support it that I have found so far is "Armadillo Roll".
After you install, go to manage applications and you will see that the "move to SD" is not grayed out and you can in fact move it over with stock froyo.
thats a way around it man screw the developers
lordvikon said:
thats a way around it man screw the developers
Click to expand...
Click to collapse
have you rebooted your phone yet?
Well, this has been discussed in a couple of threads before, and yeah, it's a working workaround...
pm is the the package manager application which install apks.
installLocation is a parameter which has 3 values...
0 - auto (phone or app decides where to install)
1 - force internal (forces apps to install in the internal memory)
2 - force external (forces apps to install on the sd card)
So, in short, in adb shell or a terminal enumlator, if you type
> pm setInstallLocation 2
all apps will be forcefully installed on the sd card, and you can move them to the phone.
But be careful, if you install widgets and some other aps which run as background processes, they will be killed if you mount ur sd card.
Also, if you have an apk file, u can force install that to the sd card via the adb install command without performing any of the above steps.
> adb install -s AppName.apk
-s forces the app to be installed on the sd card, without that flag, the phone or app will decide where to the app will be installed...
craigacgomez said:
Well, this has been discussed in a couple of threads before, and yeah, it's a working workaround...
pm is the the package manager application which install apks.
installLocation is a parameter which has 3 values...
0 - auto (phone or app decides where to install)
1 - force internal (forces apps to install in the internal memory)
2 - force external (forces apps to install on the sd card)
So, in short, in adb shell or a terminal enumlator, if you type
> pm setInstallLocation 2
all apps will be forcefully installed on the sd card, and you can move them to the phone.
But be careful, if you install widgets and some other aps which run as background processes, they will be killed if you mount ur sd card.
Also, if you have an apk file, u can force install that to the sd card via the adb install command without performing any of the above steps.
> adb install -s AppName.apk
-s forces the app to be installed on the sd card, without that flag, the phone or app will decide where to the app will be installed...
Click to expand...
Click to collapse
so far so good! Thanks for the tip!
Used with adb but I understand you to mean this command will work using terminal emulator app? this would be an easy way to control which apps go to the sd card.
Thanks again for the original post and the clarification. I do love Android and Froyo is rockin' more every day!
help
I downloaded a terminal app and typed
pm setInstallLocation 2
And the dialog gives me an explanation of what the 0 1 2 is and dosen't move the apps. What am I doing wrong?
Ah, this actually works. You have no idea how it feels to move those space hungry navigation apps to the sd card. Perfect!
Thanks!
Awesome! It works, now I can install more games that take up way too much space
Thanks!!
How did you guys do it, I tried with a terminal on the phone but no dice. Did I do something wrong?
glwinkler said:
How did you guys do it, I tried with a terminal on the phone but no dice. Did I do something wrong?
Click to expand...
Click to collapse
Erm, I just followed instructions. I'm on unrooted N1 with Froyo.
Remember to reboot your phone for it to take effect. As Froyo categorizes apps in the application manager, you can tell which apps are installed on sdcard straightaway.
Only downside is once this takes effect, all future apps that you install will immediately be installed to your sdcard. May screw up apps that have background tasks or widgets.
lordvikon said:
thats a way around it man screw the developers
Click to expand...
Click to collapse
disgusting comment.
Without the developers you would have nothing. NOTHING.
Don't do this, you're gonna end up with malfunction applications and then you're gonna get pissed at the developers for your own stupidity.
As i have written on my blog, you need to be aware of a few things:
"Don’t move apps that require a background service running all the time. Things like twitter, widgets, streaming apps (internet radio) and IM apps (you need the notifications even if you use the SD card for something else) should stay on the internal storage because they will break when you’ll use your sd card as a mass storage on your PC.
All the apps you’re going to install from now on will default to the SD card. In case you know for sure that the app uses a background service we advise moving it to the phone’s internal storage."
What you can do is to enable this trick, move all the apps you want to the sd card and reverse the trick so all your future apps will default to whatever setting they have.
lordvikon said:
Hey this took me a few hours but its relatively simple. you'll need a little knowledge of DOS or maybe i'll just spell out everything for the noobs being that i'm one. IF YOU HAVE MANUALLY INSTALLED FROYO AND THE OPTION TO MOVE APPS TO SD IS STILL GREYED AND CAN'T BE SELECTED JUST DO THIS.(i'm running windows vista)
1. download and install the android sdk (unzip folder on desktop for easy access)
2. go to my computer then click on C:\ create a new folder here called android
3. go back to the sdk folder on the desktop then open it and go to tools
4. copy the contents of the tools folder to the android folder u just created
5. connect your phone in debug mode if u don't know how to do this go to settings then applications then developement then enable the usb debugging.
6. after doing that you should be prompted to install the drivers
7
Click to expand...
Click to collapse
Done step 1-5 and when i connect phone i dont get prompt to install drivers???
Please help
This worked like a charm, just gotta remember it when I install new apps (or revert it)
glwinkler said:
How did you guys do it, I tried with a terminal on the phone but no dice. Did I do something wrong?
Click to expand...
Click to collapse
If you want done from terminal, you need root(su). or use ADB save you from trouble.
The only issue with this method is market lost most of downloaded apps link after reboot the phone. Untill you install or upgrade any apps, then the link will refresh.
Use AppBrain check for any update first, then only need install one update. Go back to stock market, everything come back.
BTW: leave phone idle for 1 min after start the phone, otherwise some apps(home screen or app draw) will show default Icon. Phone need time to refresh the apps from SD.Hope next android release can mount SD before phone try to search for Apps(Like the APP2SD on root).

Android Commander.

I just want to give props to a program for windows called Android Commander. I am not sure if its been mentioned on the Vibrant forum yet, but it got me out of a major jam today.
Android Commander is basically ADB with an easy to use interface. It lets you pull and push files to and from your pc to your Android device.
Story:
I tried to MM the Androdena theme but it seems the framework was corrupted and caused me to keep me in a forceclose loop not letting mount or boot or really do anything. I did make a nandroid backup but some how deleted the CW update zip from my sd at an earlier date and could only boot up into the stock recovery. I was ok with having to reflash the stock rom using Odin, but needed some important pictures that I took for work. Needless to say I starting freaking out. I have ADB set up but only know a few basic commands and I'm sure what I needed to be done could have been done from there. I started searching for solutions on Google and found this awesome program.
I was first able to move the picture folder from my sd card to my pc, then move and rename the CW update.zip to root of the sd card in turn letting me boot into CW recovery and restoring my nandroid.
The only thing I needed to do was to make sure my device was online through ADB and Android Commander was able to find the device and show me all my files and such. Its a great program, and I highly recommend it if you are not familiar with ADB.
I will need to check this out when I get home. I want an easy way to remove the bloatware on my phone.
it seems like an interesting program, and would be good, but for me it doesn't show that i have root. it tells me "root no" and when i use the console in it and use the su command it tells me no. but still a good program over all, i did some looking around and i believe it will only show you have root access if you have an APP2SD installed. i might be wrong with that, but atleast if anyone else has the same trouble with it please let me know if you figure a work around.
ps, you can view root files and folders just not push or pull anything from them.
Yep, I am seeing the same thing.
I did some research on Google and this is what I came up with:
"adb remount and adb root are protected commands and need either a rooted kernel or a flashed recovery model to run" - Source: Rastaman-FB
ah I see. That's good to know. I guess ill be sticking with just the normal ADB. But I think the program will still be very useful for other stuff considering we don't have to mount the USB so no rescan media after the unmount. That alone is a keeper for me. Thanks again for the information pal.
Sent from my SGH-T959 using XDA App
I must say
I have been using android commander since his 1st beta on all my android rooted phone..
It is the best android tool Out there.
Im usually private about the tools I use but
Android Commander (By PanPiotr) is the best and easiest adb GUI tools out there.
Features
Explore files:
- copy multiple files/dirs between Phone and PC
- copy multiple files/dirs between Phone folders
- delete multiple files/dirs from Phone
- new dir and rename options
- drag&drop multiple files/dirs in to progrm
- drag&drop files/dirs between program tabs
- partitions size info
- bookmarks
Manage apps:
- windows integration
- backup multiple apps to any dir on Phone/PC
- batch/single apps install
- install as private
- update
- batch/single uinstall apps
- uninstall with option to keep data or not
Console:
- type any shell command
- run sh script from PC
and more…
- flashing zip and img files
- options to reboot, reboot to recovery, reboot to bootloader, power off phone
- screenshots (beta)
Stupid question. I accidently deleted my update.zip file and I attempted to reflash another rom. Of course now I'm stuck at the Vibrant Logo and tried to use this app. It says its trying to connect, but never does. I have SDK installed, but I think its the version from when I was tinkering with the G1.
I got into Download mode with the BIG yellow triangle, but my PC never seems to show anything connected via USB unless I try connecting via Recovery.
This app sounded like something would help me since I'm not very good at ADB, but I guess I'm having issues getting over the first hurtle is seems. LOL
Qverse said:
I have been using android commander since his 1st beta on all my android rooted phone..
It is the best android tool Out there.
Im usually private about the tools I use but
Android Commander (By PanPiotr) is the best and easiest adb GUI tools out there.
Features
Explore files:
- copy multiple files/dirs between Phone and PC
- copy multiple files/dirs between Phone folders
- delete multiple files/dirs from Phone
- new dir and rename options
- drag&drop multiple files/dirs in to progrm
- drag&drop files/dirs between program tabs
- partitions size info
- bookmarks
Manage apps:
- windows integration
- backup multiple apps to any dir on Phone/PC
- batch/single apps install
- install as private
- update
- batch/single uinstall apps
- uninstall with option to keep data or not
Console:
- type any shell command
- run sh script from PC
and more…
- flashing zip and img files
- options to reboot, reboot to recovery, reboot to bootloader, power off phone
- screenshots (beta)
Click to expand...
Click to collapse
I'd say it's ok at best. I don't know of any other ADB GUI tools but this one doesn't work well with my Vibrant.
StrayPanda said:
I'd say it's ok at best. I don't know of any other ADB GUI tools but this one doesn't work well with my Vibrant.
Click to expand...
Click to collapse
I'm going to have to agree with this. Is nice to have but doesn't play nice with the vibrant.
Sent from my SGH-T959 using XDA App
It sometimes is very slow in reading internal sd memory on samsung vibrant and it loads up as a blank screen. Disconnecting usb cable and refreshing does the trick for me.
Sent from my SGH-T959 using XDA App

( Q) easier way to run a batch of applications back on the n1

hello n1 users, had a question i was hoping someone can help me with. im constantly putting new roms into my nexus one and with the almost daily updates, im getting tired of wiping and running a batch of applications on titanium backup back onto the phone. Right now i just check the boxes next to the app i want installed back onto the phone from a list of backed up apps but it requires me to press "install" and "done" after every single app installs. is there a method you guys use where you can push a button and it loads up all the apps at once that you backed up and wont require me to push "install" and "done" after each app ?
In Titanium, select menu, then batch, then restore all...
Sent from my Nexus One using XDA App
thats what i do already but as it puts each backed up app it asks me "install" and then "done".....pretty much i'd like it to be able to walk away from my phone as it restores instead of confirming each app restore.
I think the paid version overcomes this issue. The free version has you confirming after every install.
Sent from my Nexus One
oh ok, got it, thank you imperial. that alone is worth the 6 bucks and a tedious task. i shall make the purchase. thanks again guys
If you want to restore app data as well as your apps, Titanium Backup is your best option. If you want to install the apps only, use a file manager like Astro to back up all apks, save them to your computer, and when you're ready to install them, navigate to the folder in which all the apps are saved and run the command
Code:
adb install *.apk
crawler9 said:
If you want to restore app data as well as your apps, Titanium Backup is your best option. If you want to install the apps only, use a file manager like Astro to back up all apks, save them to your computer, and when you're ready to install them, navigate to the folder in which all the apps are saved and run the command
Code:
adb install *.apk
Click to expand...
Click to collapse
I'm not sure (?) if adb supports wildcards in this case.
If not, something like this will do:
for $f in (*.apk) do abd install $f
djmcnz said:
I'm not sure (?) if adb supports wildcards in this case.
If not, something like this will do:
for $f in (*.apk) do adb install $f
Click to expand...
Click to collapse
+1
I used to do this too, but ever since I've used apps2sdext I haven't had the need. i.e those apps survive between ROMs, updates etc. (all 200+ )

Backup and Restore data applications shell command

Hello,
I am a junior ROM's cooker and I do many resets on my terminal.
This forced me to configure all the applications each time, and I really don't like the backup application that is not exactly what they do ...
So I made ​​my own script to backup/restore (which I now share), and can be used either for a manual backup//restore and to automate backups via cron.
My Samsung Galaxy S2 ROM includes support for cron commands, and I have programmed the cron to make a backup of the (configured) apps data each hour, but this is not necessary.
Also, the command test if a backup is outdated before recreate.
You can use the command for backup
backup-restore-apps-data.sh --backup
Click to expand...
Click to collapse
or to restore a previously backup
backup-restore-apps-data.sh --restore
Click to expand...
Click to collapse
In order to configure, you can make a
directory "backup-data-data" in the root
of the sdcard.
Next, you need to create a serie of directories
for each application that you're interested on preserve
(the name of the directory is the name of the
application package [com.android.browser, by example]).
Enjoy!

Categories

Resources