Scripts and methods to backup and restore all your android applications

14 Giugno 2009

we suppose that you can have the superuser privileges in your phone, aka root.
the following commands are for linux but removing the “./” should work also in windows (ot: why do you still use windows?!?!?).
after connecting the phone to the pc via USB, this command will copy (if you are in the tools folder of your android SDK) all your paid applications to the folder app-private:

./adb pull /data/app-private app-private

this command will copy all the free applications in another folder, called app:

./adb pull /data/app app

after you have all the apps in your folders simply make two new files:
one for restoring your free applications (assuming that you are always in the tools directory):

sudo gedit restore_apps.sh

with inside:

#!/bin/sh
for i in app/*.apk
do
./adb install $i
done

and one for restoring your paid apps:

sudo gedit restore_paid_apps.sh

with inside:

#!/bin/sh
for i in app-private/*.apk
do
./adb install $i
done

after you have made those two files executable, you can invoke their names (with ./ before) to execute them and restore selectively your paid or free apps back.

Tags: , , , , , , ,

Lascia un commento