[SOLVED] [adb] backup not working for Temple Run - Android Software/Hacking General [Developers Only]

Hi everyone,
I am using Nexus 7 running Android 4.1.2 (Google's factory image, stock recovery, bootloader unlocked, rooted) and my laptop is running Arch Linux. I want to use 'adb backup' command to backup my games' progress.
I've tried four games:
Code:
com.gameloft.android.ANMP.GloftN3HM
com.imangi.templerun
com.rovio.amazingalex.premium
com.zeptolab.ctr.paid
I run commands like this:
Code:
adb backup -f foobar.ab com.bar.foo
And here are the results:
Code:
-rw-r----- 1 wzyboy wzyboy 7.0M 2012-11-12 11:41 com.gameloft.android.ANMP.GloftN3HM.ab
-rw-r----- 1 wzyboy wzyboy 4.5K 2012-11-12 12:05 com.imangi.templerun.ab
-rw-r----- 1 wzyboy wzyboy 29K 2012-11-12 11:36 com.rovio.amazingalex.premium.ab
-rw-r----- 1 wzyboy wzyboy 614K 2012-11-12 11:40 com.zeptolab.ctr.paid.ab
As you can see, Three of them are of normal sizes, but the backup file of game 'Temple Run' is very small, only 4.5K. Actually, when I use 'adb restore' to restore them, the progress of 'Temple Run' will not be restored at all! The other three backup files are just fine.
I've tried a few times, the backup file of Temple Run is still very small.
Could anyone help?

same here
adb backup produces empty files. Happening to me too, on two devices, with any app I try to backup.

tomerk said:
adb backup produces empty files. Happening to me too, on two devices, with any app I try to backup.
Click to expand...
Click to collapse
Well, I figured out why.
'adb backup', given specific app, will only backup its data in /data partition, and will not backup its data in USB shared storage. And Temple Run stores its record (highest store, lifetime run, etc) in USB shared storage ( /sdcard/Android/data/some.package.name/ ). Though 'adb backup -shared' can handle USB shared storage, it backups up the WHOLE shared storage, which is huge!
So, to backup records of Temple Run, we need to backup its USB shared storage directory.

wzyboy said:
Hi everyone,
I am using Nexus 7 running Android 4.1.2 (Google's factory image, stock recovery, bootloader unlocked, rooted) and my laptop is running Arch Linux. I want to use 'adb backup' command to backup my games' progress.
I've tried four games:
Code:
com.gameloft.android.ANMP.GloftN3HM
com.imangi.templerun
com.rovio.amazingalex.premium
com.zeptolab.ctr.paid
I run commands like this:
Code:
adb backup -f foobar.ab com.bar.foo
And here are the results:
Code:
-rw-r----- 1 wzyboy wzyboy 7.0M 2012-11-12 11:41 com.gameloft.android.ANMP.GloftN3HM.ab
-rw-r----- 1 wzyboy wzyboy 4.5K 2012-11-12 12:05 com.imangi.templerun.ab
-rw-r----- 1 wzyboy wzyboy 29K 2012-11-12 11:36 com.rovio.amazingalex.premium.ab
-rw-r----- 1 wzyboy wzyboy 614K 2012-11-12 11:40 com.zeptolab.ctr.paid.ab
As you can see, Three of them are of normal sizes, but the backup file of game 'Temple Run' is very small, only 4.5K. Actually, when I use 'adb restore' to restore them, the progress of 'Temple Run' will not be restored at all! The other three backup files are just fine.
I've tried a few times, the backup file of Temple Run is still very small.
Could anyone help?
Click to expand...
Click to collapse
In order to be able to restore an app's data, you need to have the apk installed first on provide the apk in the backup, otherwise won't work. adb restore does not automatically download the apk from Google Play.
Read more here:
[GUIDE] How to extract, create or edit android adb backups
I've tested Temple Run and Temple Run 2 personally, and adb backup doesn't work for them since the developer has established that savegames are not stored on backups. If you uninstall the game, you will remove also the savegame from he sdcard without chances of recovering it. This is an example of a bad designed application. Titanium Backup successfully saves and restores savegames in this cases, root is required.

Temple Run Oz is the only one that stores savegames on adb backups. Temple Run, Temple Run 2 and Temple Run Brave don't, so you have to backup data in sdcard prior to uninstall them, or you'll lose the savegames forever.

scandiun said:
Temple Run Oz is the only one that stores savegames on adb backups. Temple Run, Temple Run 2 and Temple Run Brave don't, so you have to backup data in sdcard prior to uninstall them, or you'll lose the savegames forever.
Click to expand...
Click to collapse
Great explaination! Thanks!

Related

[How to] Transfer Angry Birds progress from a jailbroken iPhone to a rooted Android

Some steps may be unnecessary and some could be performed using different tools.
The general idea is that there are two files that need to be copied from your iPhone to your Android phone matching the owner and permission.
The tools you use are up to you and depend on your skills.
If you find ways of achieving this without jailbreaking or rooting your phone please post them. Probably a combination of iTunes backups and Titanium may work.
To follow this guide you will need:
- A jailbroken iPhone.
- A rooted Android phone
- Some knowledge of Unix-like system, access using ssh your phone, permissions, gid:uid owner, etc. It's not rocket science but I'm not going to explain these concepts here.
1. Getting highscores.lua and settings.lua
1.1 Jailbreak your iPhone if you haven't done it yet.
1.2 Download i-Funbox in your computer. If you don't use Windows, you can install Openssh on Cydia and follow this guide accessing your iPhone with a ssh/scp client to copy these files. Files are in /private/var/mobile/Applications/(very long string)/Documents
1.3 Connect your iPhone, open i-Funbox and click User Applications.
1.4 Find Angry Birds folder, go to Documents folder and copy highscores.lua and settings.lua to your computer.
We are done with the iPhone. I'm assuming that in your Android phone you have installed Angry Birds, successfully completed one level at least and closed the app completely.
2. Copying highscores.lua and settings.lua
2.1 Root your Android phone if you haven't done it yet and install SSHDroid from the Android Market.
2.2 Open SSHDroid and wait until it generates the keys.
2.3 Access your phone using a ssh client.
2.4 On Android, highscores.lua and settings.lua are in /data/data/com.rovio.angrybirds/files/
Code:
cd /data/data/com.rovio.angrybirds/files/
2.5 Backup highscores.lua and settings.lua renaming them to highscores.bak and settings.bak
Code:
mv highscores.lua highscores.bak
mv settings.lua settings.bak
2.6 Copy iPhone's highscores.lua and settings.lua to /data/data/com.rovio.angrybirds/files/ (any scp client you know how to use)
2.7 Check the gid:uid owner and permissions of highscores.bak and settings.bak
Code:
ls -l
total 48
-rw-rw---- 1 10069 10069 52 Nov 19 13:24 ServerIPsList
-rw-rw---- 1 10069 10069 18 Nov 19 13:24 ab9ee6142b1cbf238e7b5f3fde8977d5dd9dfc53
-rw-rw-rw- 1 10069 10069 96 Nov 19 13:24 highscores.bak
-rw------- 1 0 0 15920 Nov 19 13:31 highscores.lua
-rw-rw---- 1 10069 10069 7692 Nov 19 13:24 last_response_for_Burstly_Banner_Ad
-rw-rw---- 1 10069 10069 2659 Nov 19 13:24 last_response_for_Burstly_Interstitial_Ad
-rw-rw-rw- 1 10069 10069 816 Nov 19 13:24 settings.bak
-rw------- 1 0 0 1888 Nov 19 13:31 settings.lua
2.8 Change owner and permissions accordingly
Code:
chown 10069:10069 highscores.lua settings.lua
chmod =rw,=rw,=rw highscores.lua settings.lua
2.9 Change timestamps
Code:
touch -r highscores.bak highscores.lua
touch -r settings.bak settings.lua
2.10 Verify .bak and .lua files now have same permissions, uid:gid and timestamps
Code:
ls -l
total 48
-rw-rw---- 1 10069 10069 52 Nov 19 13:24 ServerIPsList
-rw-rw---- 1 10069 10069 18 Nov 19 13:24 ab9ee6142b1cbf238e7b5f3fde8977d5dd9dfc53
-rw-rw-rw- 1 10069 10069 96 Nov 19 13:24 highscores.bak
-rw-rw-rw- 1 10069 10069 15920 Nov 19 13:24 highscores.lua
-rw-rw---- 1 10069 10069 7692 Nov 19 13:24 last_response_for_Burstly_Banner_Ad
-rw-rw---- 1 10069 10069 2659 Nov 19 13:24 last_response_for_Burstly_Interstitial_Ad
-rw-rw-rw- 1 10069 10069 816 Nov 19 13:24 settings.bak
-rw-rw-rw- 1 10069 10069 1888 Nov 19 13:24 settings.lua
14. Open Angry Birds and enjoy.
I'm so busy at the moment and I can't create a step by step guide including jailbreak, rooting or applications to access both iPhone and Android. If anybody is interested in doing it, please feel free to do so. Not given credit is necessary.
I hope this usefu!
fombuena said:
If you find ways of achieving this without jailbreaking or rooting your phone please post them. Probably a combination of iTunes backups and Titanium may work.
Click to expand...
Click to collapse
It's not possible without a root, because application data is private to it. Titanium also requires root to do backups.
YOU ARE A GOD! Thank you so much for this! I've put a ridiculous amount of time into all 3 games on my iPod touch. Since getting an Android tablet a number of months ago, I've quit playing the games because I like it so much better on the tablet screen, but I really didn't want to play through all of them 3 starring everything again. I suppose I'm a bit OCD about it. Rovio has been hinting at some sort of cross platform sync for the games since last spring, but the feature still hasn't shown up yet. My guess is that whatever the cause of the delay is, they will probably just introduce it with the inevitable Angry Birds 2 instead.
Anyway, I've been looking around for months trying to find a way to edit the Android score files or something to get the scores matching those on my iPod. I know there's tons of unlocking apps, but I didn't want to just unlock the levels. I wanted a way to move my stuff from the iPod to my tablet, and retire my Apple device!
As of last night, I found this thread. Instructions were simple enough and it worked like a charm! Thank you again so much for this information! My 3 year old loves playing it on the tablet as well, but he gets frustrated because I hadn't unlocked many levels. Thanks again!!
---------- Post added at 08:21 AM ---------- Previous post was at 08:13 AM ----------
Brut.all said:
It's not possible without a root, because application data is private to it. Titanium also requires root to do backups.
Click to expand...
Click to collapse
Root is definitely necessary for the Android side, but for the IOS side, there are a number of apps that can extract and browse files from an iTunes backup. My iPod was already jailbroken so I used the SSH procedure, but I don't think there's any reason why you couldn't use one of those apps to pull the LUA files out of the iTunes backup. Assuming that works, that would mitigate the need to jailbreak your IOS device.
You might be able to get around the Android root by using one of the Angry Birds backup utilities on the market, if there's a way to replace the LUA files in a backup from one of those apps. Some of those Angry Birds backup apps don't require root. The only problem is that you would need some way of viewing the time stamp and owner permissions of the current LUA files for the game. I'm not sure if there's any way to view that information without root. Can you view the entire file system (not edit) without root access?
Hardest part is getting the files of the iphone.
Getting them on the android device is easy if you have a dropbox account. Rooted phone or tablet is not necessary, works with both.
There is a utility on the android market which allows backup to the device or to your dropbox account. Play all three games once on your android device, backup to dropbox and let it sync back to your pc.
Rename the files you got from the iphone to match those from your android device or in my case the ipod touch and overwrite the files in your dropbox. Let dropbox sync back with the cloud and then run the utility on the android device and this time restore.
Your in game scores, settings etc will be exactly as your apple device.
Simples
backlund said:
As of last night, I found this thread. Instructions were simple enough and it worked like a charm! Thank you again so much for this information! My 3 year old loves playing it on the tablet as well, but he gets frustrated because I hadn't unlocked many levels. Thanks again!!
Click to expand...
Click to collapse
I'm so glad it was helpful and it worked for you. I wasn't sure if it was going to be of any use but decided it was worth to put it on writing.
I see there are more ways of doing this as I suspected. I hope people add info here or in any other posts so someone dealing with it can find more options.
transfer angry birds progress
I like this post. It meets my need.
Brut.all said:
It's not possible without a root, because application data is private to it. Titanium also requires root to do backups.
Click to expand...
Click to collapse
jailbreak is not needed.
jerrywhite928 said:
I like this post. It meets my need.
Click to expand...
Click to collapse
I like it thanks
Wow, brilliant solution. Only work for jailbroken iPhone? i usually use this app to transfer data from iPhone to Android. Although it costs a few bucks, it's more efficient to do with an automated solution instead of hands.

Backup Skype data with ADB does not work

Hello,
when I try to backup my Skype files (chat, messages,...) via ADB, I try this:
Code:
adb backup -noapk -f Skype.ab com.raider.skype
It will generate a 0 Byte Skype.ab file.
When I try this:
Code:
adb backup -all
It will backup some appdata like from Teamviewer.
My question:
How can I backup / save the Skype data via ADB?
My device is a Nexus 5 with Android 6 stock rom without root.
I hope someone can help me.

How to Backup "The Trail" from Kongregate

Hello,
did anyone create a good Backup of the App "The Trail" from Kongregate?
https://play.google.com/store/apps/details?id=com.kongregate.mobile.thetrail.google
I did a Backup on my Pixel with Titanium Backup Pro and installed the App on my Nexus 5, both Phones are rooted. Restore went with no success, I start from the beginning.
Any Ideas how to backup this App correctly?
Cheers
KobiP
Hey,
I have to replace my pixel with another one and want to move the game now. I tried different things:
- restore with titanium backup pro
- backup "/sdcard/.kongregate" and "/sdcard/Android/data/com.kongregate.mobile.thetrail.google/" from old phone and push it to the new
- install from play store, start it once, then restore only data from titanium backup.
All this didn't help. Does anyone know how to backup and restore 'The Trail'?
Cheers
Hey,
I was finally successfull with moving the game to my new phone. Here is what I did:
Install on the new phone the game and start it once. Play for a minute to make sure all files are downloaded. Then I boot into recovery to make sure that I have full access to all files (somehow adh shell behaves weird if I do it booted to Android)
Code:
#boot to recovery on both phones
adb reboot recovery
#check for the files, permissions
adb shell
cd /sdcard/Android/data/com.kongregate.mobile.thetrail.google/files/
ls -la
#I got this:
#-rw-rw-r-- 1 media_rw media_rw 354257 Mar 27 16:05 trail.confirmed
#-rw-rw-r-- 1 media_rw media_rw 352474 Mar 27 16:06 trail.sav
#-rw-rw-r-- --> 664, group and owner are both 'media_rw'
#backup data from old phone
adb pull -a /sdcard/Android/data/com.kongregate.mobile.thetrail.google/files/ sdcard
#delete old sav on the new phone (just to be sure)
adb shell
cd /sdcard/Android/data/com.kongregate.mobile.thetrail.google/files/
rm trail.sav
rm trail.confirmed
exit
#then I push the data to the device
adb push trail.sav /sdcard/Android/data/com.kongregate.mobile.thetrail.google/files/
adb push trail.confirmed /sdcard/Android/data/com.kongregate.mobile.thetrail.google/files/
#last I restore the file ownership and permissions like they were before
adb shell
cd /sdcard/Android/data/com.kongregate.mobile.thetrail.google/files/
chown media_rw trail.sav
chgrp media_rw trail.sav
chmod 664 trail.sav
#repeat for trail.confirmed
exit
I hope this helps someone. Sad that the developers of this game don't manage to create a backup / restore option as it seems to be easy now.
Cheers

[Guide] Whatsapp - manually restore messages with just /data/data/com.whatsapp (root)

I needed to restore my Whatsapp messages without having a proper whatsapp backup, in cloud or local, just a TWRP data partition backup (without userdata, thanks to encryption and some other unrelated problems), so, having only data/data/com.whatsapp directory with the unencrypted databases and files to work with, the usual solutions discussed here weren't an option. In my case, fully replacing the com.whatsapp folder and changing its permissions, as some other sources recommend, resulted in Whatsapp crashing for reasons I ignore. Such info was on the right track and after trying all kind of stuff I finally was able to restore my messages. My steps were as follows, hopefully it works for you too:
Requirements:
A backup of /data/data/com.whatsapp, it should have the databases and files subdirectories.
Rooted Android phone with Whatsapp uninstalled.
Basic terminal usage knowledge. (Should be possible to do it with a decent enough file browser but I won't cover it, feel free to adapt it)
If you need to manually extract com.whatsapp from a TWRP backup:
Locate the different data.ext4.win### files in the TWRP backup.
Rename them adding .tar at the end of the name and open them with Winrar/7zip.
If the .tar contains another data.ext4.win###, extract it and repeat the process.
Once you have access to the actual contents inside the files, locate the file which has the data/data/com.whatsapp directory.
Extract that com.whatsapp directory.
Once you have your copy of com.whatsapp:
Copy your backup of com.whatsapp directory to your phone (I will use /sdcard/com.whatsapp as example).
Install Whatsapp but DO NOT RUN IT. Try to use the same version. (Probably works between versions to some extent)
Install an Android terminal emulator and launch it. (Tested with termux)
Elevate, enter /data/data and show the permissions of the installed Whatsapp com.whatsapp directory:
Code:
$ su
# cd /data/data
# ls -ld com.whatsapp
You'll see something similar to:
Code:
drwx------ 10 u0_a117 u0_a117 4096 2020-03-09 17:28 com.whatsapp
Take note of the user/group, will have u0_a# format. (In my case will be u0_a117)
Enter into that directory:
Code:
# cd com.whatsapp
Copy files and databases directories from your transferred com.whatsapp copy in step 1 to your install location. (Don't forget the final space and dot)
Code:
# cp -R /sdcard/com.whatsapp/databases .
# cp -R /sdcard/com.whatsapp/files .
Change both directories owner and group to the one seen in step 5.
Code:
# chown -R u0_a117:u0_a117 databases
# chown -R u0_a117:u0_a117 files
Check the permissions to be 100% sure that the user/group are correct.
Code:
# ls -lad *es
Launch Whatsapp.
Whatsapp will ask you to configure your phone number. Once you're done, you'll see your messages right there.
If Whatsapp crashes after launching it, you wrote a wrong user/group when changing permissions. Whatsapp overwrites the contents of com.whatsapp before crashing, so you'll need to reinstall Whatsapp and start again. The user/group will be a different one each time you install it.
My system was buggy, not being possible to boot and backup via TitaniumBackup or similar..
I tried your method and worked perfectly via OrangeFox Recovery (with the terminal and the included file manager that facilitates copy/paste operations)
Thank you very much!!
Thank you for this tutorial. I have the same difficulty as the first respondent, in that my miui system is buggy and constantly restarting so no time to do a chat backup with the normal procedure. I also have orange fox recovery so I shall try to follow your instructions to the detail. Hopefully all will go well; I shall post back later with the results.
Yaagod said:
My system was buggy, not being possible to boot and backup via TitaniumBackup or similar..
I tried your method and worked perfectly via OrangeFox Recovery (with the terminal and the included file manager that facilitates copy/paste operations)
Thank you very much!!
Click to expand...
Click to collapse
Did you introduce any variation or it worked straight off?
One thing that worries me is checking all the permissions
Thanks a lot! I'd just drop my device and it's screen broke, and I was able to "transplant" my WhatsApp installation to another device just fine!
I was trying something similar to this long ago (but also copying some whatsapp-related files from /data/user/0/) and it didn't work, maybe they were related to authentication? Anyway, if it works I don't care
Very nice guide.
you can skip the chown part and use
Code:
cp -rp databases files /data/local/tmp/
to keep the permissions and ownership.
And i think that
Code:
pm clear com.whatsapp
will do the work, you don't need to uninstall if the app opens after the installation.
.
It worked! You are great!
Thanks a lot
does this still work, iv tried exact but whatsapp keeps closing
I just want to say a big THANK YOU. I can confirm that it's still working.
As I have no root on my phone I have used the internal Terminal of TWRP Recovery instead of an app and executed the commands there. They were running without problems (except the command "su" of course) and WhatsApp recognized my previous data.
Custom ROM died yesterday, not able to do backups, recovery had problems too, so I managed to find some Whatsapp inside a TWRP Backup.
I'm unable to work with terminal, can't change directories, maybe because of Android 13. But with total commander app I'm able to move file and database folder and rearrange owner, group and permissions. at least I'm pretty sure to get it right. whatsapp still crashes.

Temporary root without losing data for full backup using Swift Backup?

Hello.
I transitioned from my S7 to a newer one.
I want to do a full backup of apps but now possible without root. My newer one is rooted, my S7 not.
I tried very shady methods like Kingroot and Kingoroot, no success. I know they aren't recommended at all ,spyware and tons of crap.
I want to root my S7 without losing data. Is it possible?
After that, I will reflash and fix a bit my venerable S7 for nostalgic and secondary reasons. It's showing it's age but I like it.
You can backup your data without root with ADB. Download ADB tools and use these commands:
1. This will backup all your app data at the destination folder, i.e. the folder you're using to execute adb commands. adb backup -f all -all -apk -nosystem
2. This will backup all your apps at the destination folder,
Bash:
for APP in $(adb shell pm list packages -3 -f)do
adb pull $( echo ${APP} | sed "s/^package://" | sed "s/base.apk=/base.apk /").apk
done
To restore the backup open CMD in the backup folder and use these commands:
1. To install backed up apk, adb install application.apk
2. To install backed up data, adb restore application.backup
Thanks a lot!

Categories

Resources