[Android Apps and Games] ronaksv:
Well I browsed through all the forums and I could not find anything that I am going to explain. There are some tits-bits here and there, but I hope this proves to be useful.

I will also explain if you have a xrecovery backup, then how to extract your games and progress from there.

Many of you might be switching ROMs very frequently or upgrading/downgrading their Android. While doing this, we lose all our apps and games and more importanly the game's PROGRESS, if we do not save them.

There are apps available to save apps/games and progress but there is a way to do all these thing MANUALLY. This for those who want the control in their hands :), like me.

PART A:

Here's how you do:

1) Create a backup folder on the sdcard with a name that you like. eg. mybackup

1) from your filemanager or from the shell, browse to the directory /data/app and do ls -l. You will get a list of apps which you have installed.

2) Select the app that you want to save/backup and move it to sdcard folder that you have created. The names here would be long but it will be almost similar to the name you see in the UI.

For eg.

cp uk.co.aifactory.moveitfree.apk /sdcard/mybackup

. would be the command to backup Move It game.

3) Now go to the the directory /data/data and do a ls -l. browse through the list and find a directory which matches the name of the apk without the .apk extension.

for Eg. for the 'move it' game, you will find a directory uk.co.aifactory.moveitfree

Move this directory to the backup folder

cp -r uk.co.aifactory.moveitfree /sdcard/mybackup

.

For those working on shell, remember to do cp "-r" as you are copying a directory.

You are done!!. You have backed up your app and all the progress related to that app.

Now you can copy mybackup folder to your PC or keep it in the sdcard if you have enough space. Its your choice...

PART B:

How to get the progress and games back after flashing the ROM or after wipeout.

Its easy. Just reverse the steps mentioned above.

1) copy the .apk file from your backup folder to /data/app through filemanager or shell.

Eg.

cp /sdcard/mybackup/uk.co.aifactory.moveitfree.apk /data/app

2) copy the data directory to the location /data/data.

Eg.

cp -r /sdcard/mybackup/uk.co.aifactory.moveitfree /data/data

You are back to business, just browse through your apps and enjoy the games from where you left.

UPDATE :

For Angry Birds, when you are done with the above steps, delete the file

/data/data/com.rovio.angrybirdsrio/files/settings.lua

It app will not open up if you dont do it.

-----------------------------------------------------------------------------------------------------------------

Those who have already backedup their ROMs and not saved their apps as mentioned above, dont worry, I have a solution for that too. I am specifically going to explain the method to get it from xrecovery backup.

When you backup your ROM or system using xRecovery, it stores all the data inside /sdcard/xrecovery/backup/<date>.

Inside that folder, there are 3 img files.

cache.img

system.img

data.img

data.img contains all the data/app/games that you had installed, while system.img contains everything that came bundled with ROM. It might differ a bit per devices, but mostly its data.img

I tried to open this file ".img" with a lot of extraction tools but none could help. Atlast, i got help from our great <zdzihu>, and he said, he saves the archive with yaffs2 compression.

There is an app "unyaffs2" which you can use to extract the contents of the archive. Get it from here http://xdaforums.com/showthread.php?t=910255

This app will extract the contents to the folder where you ask it to. Once you have your data, repeat the above mentioned steps to get your apps and games running!!