Noob question here, how do i make a backup on this phone? do i need to unlock bootloader? it was so easy on the hero lol
I am also wondering this. I have a new stock NS4G with 2.3.4. I would like to root it, but my understanding is that is only possible on 2.3.4 if I unlock the bootloader also... right? Which will wipe my data.
Is there ANY option I have to backup data while not rooted? Specifically some saved games I have... Plants vs Zombies and Cut the Rope... I've spent (wasted) way too much time on those games to lose my saves!
I think game data saves are stored in/data/data/
I'm not 100% on this. See if you can back that folder up. Again, I'm not 100% on this. Do your research and come back to confirm but im about 75% certain it's /data/data/ but don't take my word.
Hmm... using androzip on phone, I browse to /data and I see no contents. :-( But there are some other directories outside of SDcard that I can see contents. Weird.
You do have permissions to access the data files themselves, but you do not have permissions to see the folder contents. So you need someone rooted who has those games installed to give you the path and filenames for the save files. Then download terminal emulator and
cat /data/data/com.happy.gamex/subfolder/gamesave1.poo > /sdcard/backup/com.happy.gamex/subfolder/gamesave1.poo
Make sure the file copied correctly (the new one is not empty). Then backup the sdcard, as that will get wiped, too. After you root, play a couple levels so the game will recreate the save files. Then to put your info back:
cat /sdcard/backup/com.happy.gamex/subfolder/gamesave1.poo > /data/data/com.happy.gamex/subfolder/gamesave1.poo
Thanks for the info Max, that sounds promising. Very strange to have access permissions but not "see" permissions... never heard of that in my other computing experience. Now to find somebody to help me. I wonder if I can use SDK to install games there and see some directory structure in the emulated device to answer the question? I did a google search for Plants vs Zombies and found one guy saying it's impossible with that game, rooted or not... but I still want to find out for myself.
The111 said:
Thanks for the info Max, that sounds promising. Very strange to have access permissions but not "see" permissions... never heard of that in my other computing experience. Now to find somebody to help me. I wonder if I can use SDK to install games there and see some directory structure in the emulated device to answer the question? I did a google search for Plants vs Zombies and found one guy saying it's impossible with that game, rooted or not... but I still want to find out for myself.
Click to expand...
Click to collapse
Well, I'm having trouble installing PvZ on my virtual device, but I have some other things installed and would like to browse my device directories, but I think they are all buried in .img files in my virtual device on my Windows machine. Any tips on getting inside these .img files to look around?
The111 said:
Thanks for the info Max, that sounds promising. Very strange to have access permissions but not "see" permissions... never heard of that in my other computing experience. Now to find somebody to help me. I wonder if I can use SDK to install games there and see some directory structure in the emulated device to answer the question? I did a google search for Plants vs Zombies and found one guy saying it's impossible with that game, rooted or not... but I still want to find out for myself.
Click to expand...
Click to collapse
It's the way linux permissions work. If a folder has execute but not read permissions, you can access subfolders and files, but cannot read the folder contents. If one of the files in it has read access, you can copy it, even though you can't see the actual file listing.
Maximilian Mary said:
You do have permissions to access the data files themselves, but you do not have permissions to see the folder contents. So you need someone rooted who has those games installed to give you the path and filenames for the save files. Then download terminal emulator and
cat /data/data/com.happy.gamex/subfolder/gamesave1.poo > /sdcard/backup/com.happy.gamex/subfolder/gamesave1.poo
Make sure the file copied correctly (the new one is not empty). Then backup the sdcard, as that will get wiped, too. After you root, play a couple levels so the game will recreate the save files. Then to put your info back:
cat /sdcard/backup/com.happy.gamex/subfolder/gamesave1.poo > /data/data/com.happy.gamex/subfolder/gamesave1.poo
Click to expand...
Click to collapse
This appears to be untrue.
I finally found (via another forum) the complete path to one of the saved game files I was interested in:
/data/data/com.zeptolab.ctr/shared_prefs/CtrApp.xml
So I tried in terminal: "cat /data/data/com.zeptolab.ctr/shared_prefs/CtrApp.xml > /sdcard/test.xml"
result: "/data/data/com.zeptolab.ctr/shared_prefs/CtrApp.xml: Permission denied"
The111 said:
This appears to be untrue.
I finally found (via another forum) the complete path to one of the saved game files I was interested in:
/data/data/com.zeptolab.ctr/shared_prefs/CtrApp.xml
So I tried in terminal: "cat /data/data/com.zeptolab.ctr/shared_prefs/CtrApp.xml > /sdcard/test.xml"
result: "/data/data/com.zeptolab.ctr/shared_prefs/CtrApp.xml: Permission denied"
Click to expand...
Click to collapse
Ahh... so frustrating. I want to upgrade to 2.3.5 rooted, and if I know for sure I have to lose these files, then I guess I'll lose them. But if there is any way at all to save them obviously I want to figure that out before I cross the point of no return...
Related
Hi there,
Is there a way to temporary root my Nexus S [I9020XXKD1] or alternatively a non-root way to access /data so that I can copy a file in and out? Essentially I want to be able to backup and restore some game saves
Most posts I've read basically have folks saying "Just root it", which is good advice to most but isn't right for me - I really don't want to have to wipe my phone and I'd also like to be able to dip my toe into rooting before taking a full leap. That, and aside from needing this one file in /data my phone works exactly as I'd like it to
I only need "su" access for a brief moment to copy off a file to and from /data. I set up the android sdk but ADB didn't work because of the protection of "production builds".
VISIONary seemed like the right kind of thing, but I don't believe it works for the Nexus S or recent firmware, so while temp rooting would be nice so would any solution that allows me to backup and restore some files in /data.
At the moment I am wondering if writing an apk of my own that copies/replaces this one file is the way to go - but that seems perversely long way around!
So any help/suggestions most appreciated
There is no temporary root for the Nexus S. You're either rooted, or you're not. However, if, perchance, you are on Android 2.3.2 or earlier, you might be able to root without wiping.
Without root, you cannot see the files in /data, but you can read/write the files directly if they have the proper permissions and you know the exact path/filenames. After poking around a bit, it seems that read & write permissions vary among apps. Most apps have full permissions reserved for the parent app. Some allow other apps/user to read some files, and read+write others. (The permissions being app-specific, if it can't be done by command line, I doubt it could be done by creating an app, either.)
So, what is the game? Perhaps I can do some exploring.
If you have the old bootloader (2.3.2 i think) you can boot a recovery without flashing. From you computer use "adb boot recovery.img" and boot clockwork recovery. From there you can mount and access the filysystems.
Sent from my Nexus S using XDA App
Maximilian Mary said:
There is no temporary root for the Nexus S. You're either rooted, or you're not. However, if, perchance, you are on Android 2.3.2 or earlier, you might be able to root without wiping.
Without root, you cannot see the files in /data, but you can read/write the files directly if they have the proper permissions and you know the exact path/filenames. After poking around a bit, it seems that read & write permissions vary among apps. Most apps have full permissions reserved for the parent app. Some allow other apps/user to read some files, and read+write others. (The permissions being app-specific, if it can't be done by command line, I doubt it could be done by creating an app, either.)
So, what is the game? Perhaps I can do some exploring.
Click to expand...
Click to collapse
Thanks I figured as much. The game is Dungeon Hunter 2 and essentially I am trying to implement a simple fix to make my save game work again (the fix is here: http://forum.xda-developers.com/showthread.php?t=1042675 a few posts down) but it requires root. So I do know the exact paths and filename.
Thank you for your helpful answer
Ok, I'm not having any luck here, and it's pissing me off. FYI, I don't have that game, so I'm testing it with Angry Birds. I can read and copy the file just fine, but I can't modify it without using root. The data file itself has read/write access, but the containing folder (files/) is read-only, so I can't overwrite the file after I've modified it. Since the file itself has r/w access, I wonder if it would work to modify the file directly, instead of using an outside program to modify it then overwriting it. (I'm a bit ignorant of the finer points of linux permissions.) This would require an app that would allow you to open and modify a file by typing the full path & filename, instead of just browsing the directory tree. You could also try < adb pull /data/data/com.gameloft.android.TBFV.GloftD2HP.ML/files/dh2_000.savegame dh2_000.savegame > (using the correct path, if that's not it). Then see if < adb push dh2_000.savegame /data/data/com.gameloft.android.TBFV.GloftD2HP.ML/files/dh2_000.savegame > works. The fact that you can copy the file out is promising, anyway. So even if you had to root, you could backup the file before rooting wipes everything, then fix it & back it up after you had root.
Btw, what version of Android are you on?
Edit: I think I'm getting somewhere. While you can't modify the file itself, you can modify the file contents. So something like this might work: < adb shell >
< more /sdcard/dh2_000.savegame > /data/data/com.gameloft.android.TBFV.GloftD2HP.ML/files/dh2_000.savegame >
So the next step is to get some help from someone who has the game and is rooted as to the exact path to the savegame file. Once we have that, I think we're golden. (Or, let me know if adb pull works with the path I guessed at.)
wow! Thank you for your help
In answer to your questions: my Nexus s is running 2.3.4 and you are correct about the file path (many other kind xda users died to bring us those paths ) is /data/data/com.gameloft.android.TB with the filename being dh2_000.savegame
I don't want to drive you to distraction! If I could back it up I probably would go ahead then and root the phone given how complexplaying with a non-rooted phone is!
I will try the adb pull method and let you know how I get on.
Thank you again for your help and for showing me why I probably do want to root!
If you want to delete an app, change a file or whatever when you get root, please be smart about it. Think before you delete something. Have a plan B (a failback plan). If you don't know how you will fix whatever you're about to potentially break, DON'T DO IT.
Try to learn ADB. I know it's not for everyone, but it may pull you out of the fire later. Think before you do anything.
No matter what Android device it is, someone always has a post saying "Help! I deleted <insert app here> and I need it back!" Here are some tips:
Don't freeze or delete an app using Titanium Backup without knowing if it will crash your phone or not
If you're using ADB, rename a file instead of deleting it if you're not sure if it will crash your phone or not
Your /system folder is like the base operating system folder (think C:\Windows); before you change something BACK IT UP!
Code:
adb pull /system <destination_folder>
Since we only have temp root for now, if you're disabling packages, back up the packages.xml file
Code:
adb pull /data/system/packages.xml <destination_folder>
Learn from others' mistakes; if someone bricks their phone, read the thread and figure out how NOT to screw yourself and your phone
Heard of measure twice, cut once? Read three times, execute once. Listen to the Devs. Be nice to them. Don't piss them off. They do this on their own time.
Please be smart about whatever you do to your phone. We can't be dumb smart phone users. If you don't know something, ask in the appropriate section or thread. If you know something, don't tease others for not knowing. The occasional flame is funny and all, but at some point someone has to learn whatever they don't know - someone is going to have to step up and help them.
Thanks dawg...
I think and SD backup and Nandroid recovery backup on root will be good enough? <not condascending...just asking from your adb opinion?>
ROM_Guest said:
Thanks dawg...
I think and SD backup and Nandroid recovery backup on root will be good enough? <not condascending...just asking from your adb opinion?>
Click to expand...
Click to collapse
I think of that as another layer. We're not there with the Sensation yet, but I always think it's a good idea to use any and all methods best suited for what you're doing.
For example, if you're flashing a theme someone customized which could change multiple apk and jar files, a Nandroid backup is best.
When someone goes to remove an apk or freeze an app, they usually don't think to take a Nandroid backup (because deleting or freezing takes only a second - Nandroid backups take longer).
1) we don't have that functionality yet and 2) it's very common for someone to try to freeze a critical app which can cause a boot loop, which can easily be fixed by adb (if a Nandroid is not available).
i tried:
adb pull / backup/
it started building a file list and then started the copy. after a time (dont know excatly when because i let it run beside) it stoped working at:
pull: /sys/devices/platform/msm_adc/batt_id -> backup/sys/devices/platform/msm_adc/batt_id
nothing more happend. now i got 4883 files, a total of 3.1 GB, backup directory. but it seems not all files are in. when i browse through the phone dir i see much more files in the dirs.
is there any other way of getting a complete backup? when i rerun the command will it skip the files it allready dumped to disk? any other command?
thx!!!
daSn00p said:
i tried:
adb pull / backup/
it started building a file list and then started the copy. after a time (dont know excatly when because i let it run beside) it stoped working at:
pull: /sys/devices/platform/msm_adc/batt_id -> backup/sys/devices/platform/msm_adc/batt_id
nothing more happend. now i got 4883 files, a total of 3.1 GB, backup directory. but it seems not all files are in. when i browse through the phone dir i see much more files in the dirs.
is there any other way of getting a complete backup? when i rerun the command will it skip the files it allready dumped to disk? any other command?
thx!!!
Click to expand...
Click to collapse
All you really need is /system and /data if you want a complete backup. I know you see other files+folders, but those are mounted by the OS and kernel... or whatever. Someone with more Linux experience can explain better than I can. But if you want a complete backup, just get /system and /data.
The /system folder is like getting the base OS. The /data is all your user/personal data.
dumping /system worked fine: 1366 files pulled. 0 files skipped.
when trying to dump /data it freezes again and allways again at:
pull: /data/d/smem_log/dump_cont -> ../backup2/data/d/smem_log/dump_cont
so i dumped every dir in data manually only /data/d is missing now. but there are so many dirs in it, i dont want to dump every dir on its own
any idea?
daSn00p said:
dumping /system worked fine: 1366 files pulled. 0 files skipped.
when trying to dump /data it freezes again and allways again at:
pull: /data/d/smem_log/dump_cont -> ../backup2/data/d/smem_log/dump_cont
so i dumped every dir in data manually only /data/d is missing now. but there are so many dirs in it, i dont want to dump every dir on its own
any idea?
Click to expand...
Click to collapse
That should be good enough for now. No one else is doing this manually, so until we get an official root this is all you can do to backup. Once we get permanent root, titanium backup will do most of this for us.
I would only make backups of anything you change or delete at this point, but that's just me.
Sent from my HTC Sensation 4G using XDA App
hello... I have desire hd with miui 1.7.8 but this is not relevant.. i backed up everything from 1.7.2 restored now to 1.7.8 but cut the rope chrashes. reinstalled, it works but lost all savegame
I analyzed the files, there are 2 mysql db and one xml with hash inside, copying the old one manually to install folder does not help
does anybody know the logic of this savegame ? how to restore the old one ? i have the data...
thank you..
cheers
Ping
Sent from my HTC Desire HD using XDA App
I been toying with this a while, i had same issue, only way i've come close is to use root explorer and in the data/ data folder replace all the current folders but "Lib" and after that the game loads without crashing, all levels show and work. heres the ***** part. If you close the game instead of hitting home button or reboot the phone you start exactlywhere your save left off. any new levels you did arent saved. i'm still tinkering, hope this helps.
I've got the same problem too , i backed up my save which was on CM7 Nightly b4 i full wiped and installed Miui 1.7.8, Ive tried copy the files via Adb shell and RootExplorer and in both cases it recognise's the 244 stars i have backed up, But refuses to save any progress thats made after that point.
Ive tried changing the file permissions to R/W incase its read only causing the problems and all that does is the nxt time i launch CutTheRope it pops up a Force Close box.
Edit //
if found this via google search http://android.modaco.com/topic/342768-copy-cut-the-rope-game-progress-from-free-to-paid-requires-adb-and-root/page__p__1747484#entry1747484 , which is copy free to paid save games..
ive done these steps and seems to save atm
i copied the database folder and the shared_prefs folder to /data/data/com.zeptolab.ctr.paid/
then i did 2 commands via adb including the app_id i located from the linked post my app_id was 044 your will more than likely not be the same as mine.
adb shell chown 10044:10044 /data/data/com.zeptolab.ctr.paid/shared_prefs/
and
adb shell chown 10044:10044 /data/data/com.zeptolab.ctr.paid/databases/*
and ive set R/w permissions to user read / write / execute , group to read / write and execute and Other to just execute
I got this working on version 1.1.1.
The path of the savegame file seems to be different. Here are the steps I followed:
Open game and complete at least one level
Check the app number (mine was 10146)
Code:
ls -l /dbdata/databases/com.zeptolab.ctr.paid/shared_prefs/CtrAppPaid.xml
Copy your former file (can be either paid or free version)
Code:
cp /path.to.file/CtrAppPaid.xml /dbdata/databases/com.zeptolab.ctr.paid/shared_prefs/CtrAppPaid.xml
Now set the permissions (use app number from point 1)
Code:
chown 10146:10146 /dbdata/databases/com.zeptolab.ctr.paid/shared_prefs/CtrAppPaid.xml
Open the game and you should have all your levels from the previous savegame
I actually did all the steps on the phone with Terminal Emulator.
nhaga said:
I got this working on version 1.1.1.
Click to expand...
Click to collapse
First of all, thanks for your solution.
But there is no "CtrAppPaid.xml" in the previous version of Cut The Rope. I've found only a file called "com.rainman.cuttherope_preferences.xml" in the dbdata/databases/com.rainman.cutherope/shared_prefs folder. Unfortunately your method did not work with this file. Can you give me any advice?
Thank you very much!
I am having the same issue. I tried following the steps from that link, but have had no success. I'm trying to transfer from the ad supported version to the paid version. I've completed 4 boxes with 3 stars on every level and would hate to have to start over!
Just use the file called CtrApp.xml
mapester said:
and ive set R/w permissions to user read / write / execute , group to read / write and execute and Other to just execute
Click to expand...
Click to collapse
I been working on this myself and I have so far been able to get v1.3.1 to see all 525 of my stars but Im having the issue where it doesn't save my progress.
Can you tell me the commands to change the file permissions to see if it will save my progress?
Use Root Explorer
Copy CtrApp.xml from:
Code:
data/data/com.zeptolab.ctr/shared_prefs/
to
Code:
data/data/com.zeptolab.ctr.paid/shared_prefs/
Rename CtrApp.xml to CtrAppPaid.xml
Voi-la
@up
This method not working, after start the game said "restore progres from other version... yes/no" Clicked yes but there is nothing restored
So I got my shield last week and have rooted it and I have been able to move all my apps to external sd. So far so good, but I want to move my save game from construction simulator to my shield. I don't have a problem getting the files off my m8 but I can't paste them to the folder in the mnt directory of the shields internal memory. I think I don't have permissions to write to it. Does anyone know how I can change this? I searched the forum but can't find it.
Thanks,
Sam.
The shield rocks!!!
Volleymansam said:
So I got my shield last week and have rooted it and I have been able to move all my apps to external sd. So far so good, but I want to move my save game from construction simulator to my shield. I don't have a problem getting the files off my m8 but I can't paste them to the folder in the mnt directory of the shields internal memory. I think I don't have permissions to write to it. Does anyone know how I can change this? I searched the forum but can't find it.
Thanks,
Sam.
The shield rocks!!!
Click to expand...
Click to collapse
The only way I know how to change permissions is by downloading ES File Explorer, long press on a file / folder and tap "Properties". From there you can change permissions. Keep in mind that ES File Explorer will only work if you have SuperUser or SuperSU installed on your rooted device.
In your case I bet you can change the permissions of the "mnt directory" to both read and write. Let me know if it worked out
Thanks for the reply, I checked what you said about the permissions in the file Explorer, it turns out the write permission was fine, I just didn't have the root Explorer option ticked!
I don't know why but I stuffed around trying to copy files from my phone to my shield and couldn't get it working. And then I figured titanium backup would make things much easier, made a backup on my phone, emailed it to my shield and bang construction simulator is ready to play with my profile loaded.
Thanks for the help, next time I'll make it easier on myself!
Volleymansam said:
Thanks for the reply, I checked what you said about the permissions in the file Explorer, it turns out the write permission was fine, I just didn't have the root Explorer option ticked!
I don't know why but I stuffed around trying to copy files from my phone to my shield and couldn't get it working. And then I figured titanium backup would make things much easier, made a backup on my phone, emailed it to my shield and bang construction simulator is ready to play with my profile loaded.
Thanks for the help, next time I'll make it easier on myself!
Click to expand...
Click to collapse
Happy to know that all worked out! GO SHIELD!!! ^_^
***MUNKY-TOOL***
IS AN ONBOARD ANDROID UTILITY
FEATURES
[*]Copy system.img
[*]Copy boot.img
[*]Backup efs
[*]Logcat
[*]Backup and Restore Contacts
[*]Out For A Rip
Munky-tool will locate and copy most partitions without you having to track down paths. This is convenient if you use a ROM kitchen, or just want to make a backup of your system without using custom recovery. Some devices do have weird partition names, and munky-tool will not find them. If this happens to you, run the following command in terminal emulator
Code:
ls /dev/block/platform/*/by-name
Paste the output and your device name in the comments, and I will work your device in if possible.
INSTRUCTIONS
Download zip or clone git
Place extracted munky-tool folder in system partition (must be able to set permissions)
Set permissions of munky-tool script (not the directory) to at least 775 (rwx rwx rw)
Open terminal emulator and key in 'su' for root permissions
cd to the munky-tool directory
Type ./munky-tool to execute the script and start the utility
DOWNLOAD
github
Dude once again you're creativity and hard work is paying off. Great job man
Style point for the rip bud!
Sounds very helpfull and as markbencze already replyed I gues it's working on the O+O too. Have to try it in the next days.
thx markbencze for sharing.
SaschaKH said:
Sounds very helpfull and as markbencze already replyed I gues it's working on the O+O too. Have to try it in the next days.
thx markbencze for sharing.
Click to expand...
Click to collapse
Yes. I tested it on my OPO. It went out for a rip. It will run on any device, and it will find the partitions on most.
Where's the download link dude, i'm not find download link from github ?
itsnie said:
Where's the download link dude, i'm not find download link from github ?
Click to expand...
Click to collapse
On the right side of page near the clone url, there should be a button that says download as zip.
Just realized you have to be in desktop view to see the download as zip button. I will post an additional link a little later.
Just added backup and restore contacts.
N-i-c-e!
Thank you.
I've been working on the same sort of thing, and trying to figure out how to get adb connected to the phone with debugging off, for those people (I won't use the word I'm thinking of) who don't make backups, then break the screen, or bootloop the phone. Your script makes finding the data partition trivial, but I'm still working on the "force debugging on from outside" part.
But munky is going to be part of my phone from now on.
Rukbat said:
N-i-c-e!
Thank you.
I've been working on the same sort of thing, and trying to figure out how to get adb connected to the phone with debugging off, for those people (I won't use the word I'm thinking of) who don't make backups, then break the screen, or bootloop the phone. Your script makes finding the data partition trivial, but I'm still working on the "force debugging on from outside" part.
But munky is going to be part of my phone from now on.
Click to expand...
Click to collapse
Thanks, man. Glad to hear you like it.
mike the inkman said:
***MUNKY-TOOL***
IS AN ONBOARD ANDROID UTILITY
FEATURES
[*]Copy system.img
[*]Copy boot.img
[*]Backup efs
[*]Logcat
[*]Backup and Restore Contacts
[*]Out For A Rip
Munky-tool will locate and copy most partitions without you having to track down paths. This is convenient if you use a ROM kitchen, or just want to make a backup of your system without using custom recovery. Some devices do have weird partition names, and munky-tool will not find them. If this happens to you, run the following command in terminal emulator
Code:
ls /dev/block/platform/*/by-name
Paste the output and your device name in the comments, and I will work your device in if possible.
INSTRUCTIONS
Download zip or clone git
Place extracted munky-tool folder in system partition (must be able to set permissions)
Set permissions of munky-tool script (not the directory) to at least 775 (rwx rwx rw)
Open terminal emulator and key in 'su' for root permissions
cd to the munky-tool directory
Type ./munky-tool to execute the script and start the utility
DOWNLOAD
github
Click to expand...
Click to collapse
Good Tool, do you already plan to support restore EFS? which make a full loop of running time change the EFS setting without a PC,
this can help to me to control the modem band preset selections for network testing purpose.
Azlun said:
Good Tool, do you already plan to support restore EFS? which make a full loop of running time change the EFS setting without a PC,
this can help to me to control the modem band preset selections for network testing purpose.
Click to expand...
Click to collapse
It is usually done in bootloader, but I am pretty sure I can make it work. Just need to test it before I release it. I am also going to release this as an apk soon. (Don't know how soon, but I probably won't have time for a few weeks)
An app that we can point new users to that will back up their userdata partition? Fantastic!
Rukbat said:
An app that we can point new users to that will back up their userdata partition? Fantastic!
Click to expand...
Click to collapse
Yeah, I think it will fill a need. I am going to do an APK to do the things from this script, and a corresponding GUI Linux package for APK modding, and maybe do something for Windows as I get time. In the process of moving somewhat unexpectedly, so it is taking longer than I would have liked.