[Q] EEE - how to dump everything? - Eee Pad Transformer Q&A, Help & Troubleshooting

I don't know if ADB is even the best tool to do this, but I want to be able to copy the entire file system off the EEE pad onto a pc. I want everything, starting from the "/" root directory. I want the entire file system and all files copied over so I can work with them on the pc.
I have root (verified by # when entering adb shell and various root apps successfully running.)
My thought was to do "adb pull /" from a dos shell (running windows 7), but not everything copies over. I get lots of messages about "skipping special file", I dont get the /data/data directory, etc etc.
Is there a tool or some way to copy over the entire file system starting from "/" ?
Thank you.

Nvflash will let you download the APP partition which is the system folder. It's an ext4 filesystem that you can mount and poke around.
USP is the data partition.
Be careful not to format your TF!
Clockwork mod will backup the system.img and you can either mount or unyaffs this. I forget which one. Same for data.img
sent from my cyanogen(mod) vision

Is the data.img same as the USP partition? Is the system.img same as the APP partition?
which I can then mount and explore?
I don't want to edit anything, I only want to examine.
In particular, I want to take a snapshot of all the files and filesystem (directory structures, files, etc) before an app is run. After the app is run and exited, I want to take another snapshot and look at what has changed. If there are new files created, existing files edited, etc. I want to search for strings (grep), etc.
I was hoping I could copy all the files to do this, but perhaps there is another way like one of those you suggested (nvlash, clockwordmod, ??)
Thank you.

Nvflash and clockworkmod wouldn't be used on a running system. You might want to look in the /proc and caches, but I'm not an expert on this.
sent from my cyanogen(mod) vision

gee one said:
Nvflash and clockworkmod wouldn't be used on a running system. You might want to look in the /proc and caches, but I'm not an expert on this.
Click to expand...
Click to collapse
Expert or not, I really appreciate your advice.
I took your initial suggestion to be to use NVflash and/or clockworkmod to make backups of the device. It seems from some other threads I've read that the tablet drive consists of up to 15 or 16 partitions, two of which are USP and APP.
So conceivably I could back those up "before", and mount the backup images somewhere to look at, preferably on a pc.
Then, I could install and run the app in question, and use NvFlash and/or CWM again to make backup images, and look at them for comparison.
On another note, I tried installing busybox and running cp to move, for example, /data to the external SD card, but I think I need a bigger SD card.
I wonder if
busybox cp / /Removable/MicroSD/targetdirectory
would work to copy everything?

The danger with that is that some directories and files are virtual- /proc and I think /var are virtual directories. Files like dev/null dev/zero would be problematic!
You might want to do specific parts, such as /data, or even /data/data/your.app's.java.name.here
You could use "find ." and write a script to pull everything with adb, but it would take forever, so it might not be a true snapshot.
Have you looked at the ddms or some of the other tools in the android SDK?

Sorry to confuse. By snapshot I did not mean screenshot. I meant just a record of the state of the device at that point in time. Meaning, all the files before the app was run. Then all the files (any new ones, changes to existing ones, any deleted) AFTER the app was run. I want to look at what has changed.
Still, thanks for the ddms idea. I have to look at any other tools in the adb environment that could be useful.

Related

Backing up apps / data (plus archiving/restore idea)

Ok, even though I have market and browser cache being saved to my sdcard, I still occasionally run into space issues due to the small /data partition. Prior to removing apps, I decided to back up my apps and data.
I have backed up my data partition using:
busybox tar -cvf /sdcard/data_backup_20081206.tar /data
After saving a copy to my computer via USB, I did MD5 checksum checks to make sure no corruption during the copy. I still need to do tests to see if I ever have corruption based on the thread in this forum.
* Anyone else making backups using other methods (rsync, etc.)?
--------------------------------------
This got me thinking to some other phone OS's that don't really run apps from SDCARDS, but rather store them and copy them to the phone prior to running them.
I would think that we could (with root access) write an app that moves files from the /data folders to a /sdcard/dataarchive folder, when you wanted to archive an app you don't use much and wanted to save space. Then the Archiver app could restore the files when you eventually wanted to run the app.
* Is there an easy way to see what files are used by each app? Someone mentioned a manifest file at one point.
For example, it looks like neocore is at minimum using:
/data/dalvik-cache/[email protected]@[email protected]
/data/app/com.qualcomm.qx.neocore.apk
/data/data/com.qualcomm.qx.neocore
* Is there a thread someone could point me to that better explains the whole APK packaging and storage of applications and their data?
** Is the structure usually just as above, except just replacing com.qualcomm.qx.neocore with the proper app name?
** When do things get saved to app-private?
O' great community... thanks for your help.
-oldsk00lz
i was looking for a way to synch my /Music and my /Pictures so I came across this blog. im mounting the g1's sdcard on a linux machine in this scenario
http://philnelson.name/tag/rsync/
heres my script that i use. hope this helps a little.
Code:
#!/bin/bash
echo "Syncing /Music /media/FC30-3DA9/Music for updates to /media/E0E4-AA14................................................................."
rsync -rvv /media/FC30-3DA9/Music /media/E0E4-AA14
echo "Syncing /Music /media/E0E4-AA14 for updates to /media/FC30-3DA9/Music................................................................."
rsync -rvv /media/E0E4-AA14/Music /media/FC30-3DA
echo "Syncing /Music /media/E0E4-AA14 for updates to /media/FC30-3DA9/Music................................................................."
rsync -rvv /media/E0E4-AA14/dcim /media/FC30-3DA9/Pictures/g1Cam

how can i write a file to the / directory

i want to save a file to the / directory of my phone.
when using adb in recovery mode with $su and mount -a, it seems as if i'm able to us cp to move a file to it, ls shows the file afterwards.
but after booting, the file is gone.
i tried it with a update.zip, same result.
anybody has an idea why this is so and if there is a solution to my problem?
thanks
use root explorer from the market....you can simply copy the file you need to the "/" directory with this app!
I think / is in RAM. There are system and data partitions on internal flash, but there isn't / one, right?
@androgiallo i don't know about root explorer, bur SU File Manager & Terminal couldn't do the trick ...
@Brut.all to be honest, i don't know what you're talking about ... does your reply mean it's futile or rather that there might be a solution?
btw, thanks for maps[brut] and even more for apktool.
der_bert said:
@Brut.all to be honest, i don't know what you're talking about ... does your reply mean it's futile or rather that there might be a solution?
Click to expand...
Click to collapse
I mean "/" isn't persistent - I think it is created in the RAM when you turn on your device, then you could change its contents, but after rebooting it's gone.
For sure there is a way to install something there. If I'm right about that RAM, then there should be somewhere some image of initial contents of "/" partition (they are copied to RAM at boot) - probably in boot.img . So it's possible, but not that easy as just copying a file to "/".
These are just my guesses, maybe I'm wrong.
Ahh and why do you want to place some file to "/"? Why not to e.g. /data/?
i use a keyfile for my password manager and i have to enter the path to it manually every time i open the database, so i want to keep the path as short as possible ...

[Q] How to copy a /data file from unrooted Nexus S [I9020XXKD1]?

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!

Now that root is getting closer, PLEASE BACK UP!!

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

How I was able to recover from a soft brick and what I've learned.

I'm posting this information because 1 I was asked to and 2 I feel it could be helpful for the "MORE ADVANCED" users.
Do Not try any of my methods, None of them. Unless you WANT to brick your phone.
With that said, here to the best of my memory is what I have done.
I pulled my framework-res file as well as the other 3 that relate to it and tried to theme them. It worked a few times and after tweaking I eventually broke the permission of the files.. Hence putting me in a bootloop.
What I did..
Thankfully I had the Bionic Safestrap installed. (DO NOT INSTALL THE SAFESTRAP) So, I was able to boot into the safestrap and use adb commands. This took some toying around. For the sake of saving people from bricking i'm not going to list all of the adb commands. But I had to mount both the /sdcard and /systemorig. Now simple enough, I just went through and rm every file from inside the folders. (Do not rm the folder, You will not be able to recover the folder and no you can not push the folder) rm all files from /systemorig /apps /osh etc.. then push all my restore files (backup made with safestrap) to the /sdcard. (For some reason they have to be placed on the sdcard before being copied to the root directory otherwise it breaks the permission of the files, idk y?) A few times in order to mount /systemorig as full rw I had to quick toggle safe mode. Now cp all files from the sdcard to their places on the phone turn safe mode off if you had to enable it and reboot. Bam, You just recovered from a soft brick. I have also used this method to restore webtop after breaking that also. Yes it does take a long time to restore and it is cumbersome but at least you can do it. I was also able to mount /emmc to /sdcard and flash a rom from the razr (yes i knew at this point it wouldn't work, this was a test) although it did not boot it did unpack and fully install the rom in the correct locations and it looked as though it would with a little more code boot from the sdcard. What i'm playing with now is trying to use the overclock method from the razr on my a2 but seems how I don't know exactly what files are being changed i'm being cautious. Sorry guys I'm not exactly a linux guy, I do what I can and I am always learning.
I'll edit this post as more info comes to mind. But to let you know I have been able to play with most files w/o fear of bricking so long as you don't mess up the .rc files in /systemorig you will always be able to boot into safestrap.

Categories

Resources