[Q] Adb pull of /data/media folder? - Android Q&A, Help & Troubleshooting

I know it's weird, but basically when I flashed a 4.2 ROM about a month ago, I thought I lost all my files. But after snooping around, I found them in /data/media.
So I'm trying to use adb pull to get the files onto my PC. I do: adb pull /data/media \Downloads\New Folder and it just gives me a list of a bunch of adb commands I could use. So does anyone know how I can get the /data/media folder to my computer? I can't copy it to /sdcard/ because it's over 20GB and won't fit.
Also, I have the Sprint Galaxy Nexus...and yes, I'm rooted. My phone shows up when I do the adb devices command.

I decided just to do: adb pull /data/media and it looks like it's working. Sorry.

Andr3wD said:
I decided just to do: adb pull /data/media and it looks like it's working. Sorry.
Click to expand...
Click to collapse
You probably forgot this post existed, but just so you know the problem was having spaces in your local file path. If you enclosed the local path in quotes (assuming the path was valid) it works fine.

You probably forgot you replied (lol), but thanks for the help... this fits in with what I wanted to do too. Same problem, 4.2 upgrade, thought all my internal media stuff disappeared... decided to do a backup, but MTP is really slow and sucks, so I was looking into ways to use adb to backup my storage.

Related

Location of the Apps

kinda new to the rooting thing but now that i got it down pat i am comfortable trying to find app on it. I know that they are store on the phone instead of the cd card.
What i am wanting to do is pull my apps off the phone and store them on my pc move them to phone and install them using ASTRO.
The problem is finding the apps ... how do i mount the phone itself to the pc rather than the SD Card.
Work running: XP
Home: Ubuntu 9.11, Windows 7
wrath112 said:
kinda new to the rooting thing but now that i got it down pat i am comfortable trying to find app on it. I know that they are store on the phone instead of the cd card.
What i am wanting to do is pull my apps off the phone and store them on my pc move them to phone and install them using ASTRO.
The problem is finding the apps ... how do i mount the phone itself to the pc rather than the SD Card.
Work running: XP
Home: Ubuntu 9.11, Windows 7
Click to expand...
Click to collapse
System apps - /system/app
Installed - /data/app
okay that's where they are.
how to i get that to show up on the PC.
when mounted no there is no:
/system/app
/data/app
also in astro says there are 0 files in the /data/app
wrath112 said:
okay that's where they are.
how to i get that to show up on the PC.
when mounted no there is no:
/system/app
/data/app
also in astro says there are 0 files in the /data/app
Click to expand...
Click to collapse
Not sure if Astro can find system files or not. I use root explorer.
These commands are every where, do a lil searching next time.
adb shell
/system/bin/mount -o remount,rw /dev/block/mtdblock3 /system
cd /system/app
ls
you will see all the apks listed. do the same to get to the other dir. if yuo want to pull them, search. i dont have my cheat sheet with me at work to give them to you.
Appoligies
I got the adb shell now on my PC at work lol. I am such a good employee. I work in the IT Dept. and things are slow right now. I have even cleaned. Messing with the phone is a last resort.
I will let you know if i figure it out. There are a lot of how-to's out there. Next time i will JFGI (just f***ing google it)
thanks

[Q] ADB, Odin & SuperOne Click

Any one out there that can help me understand the last part of Adb.
lol.
I learned how to use Odin and superoneclick.
Now I am on Adb.
I read all I can on Team Whiskeys and XDA website and other googled websites. I installed everything and did the My computer/system properties/advance/Enviroment Variables/Path entries.
I start ADB and then I do in command prompt "adb devices" and whoopie I see my phone.
NOW WHAT?
No body on the instructions or website that I have read goes past that.
How do I push down a Rom to overwrite the system with the new Rom I want to try?
Hope someone out in the Forum has really done this before and will post how they do it.
Need to find someone smart enough to finish the instructions.
Thanks,
CatfishKnight
with adb you can copy files to your sd card or system without ever having to mount your sd card to your phone. that's the main thing I use it for
for instance, I have a rom named Trigger_281.zip on my desktop, to push it I would do
Code:
adb push Trigger_281.zip /sdcard/Trigger_281.zip
you can also pull files by using "adb pull <location of file on phone>"
and so on.
Furthermore if you ever need shell access you can do "adb shell" and run unix commands from console instead of on the phone
birgertime said:
with adb you can copy files to your sd card or system without ever having to mount your sd card to your phone. that's the main thing I use it for
for instance, I have a rom named Trigger_281.zip on my desktop, to push it I would do
Code:
adb push Trigger_281.zip /sdcard/Trigger_281.zip
you can also pull files by using "adb pull <location of file on phone>"
and so on.
Furthermore if you ever need shell access you can do "adb shell" and run unix commands from console instead of on the phone
Click to expand...
Click to collapse
Thanks for showing me how to push to my phone. Now do I install it. In recovery mode as a zip? I thought adv installed it and I just rebooted and it was installed.
birgertime said:
with adb you can copy files to your sd card or system without ever having to mount your sd card to your phone. that's the main thing I use it for
for instance, I have a rom named Trigger_281.zip on my desktop, to push it I would do
Code:
adb push Trigger_281.zip /sdcard/Trigger_281.zip
you can also pull files by using "adb pull <location of file on phone>"
and so on.
Furthermore if you ever need shell access you can do "adb shell" and run unix commands from console instead of on the phone
Click to expand...
Click to collapse
Thanks for showing me how to push to my phone. Now do I install it. In recovery mode as a zip? I thought adb installed it and I just rebooted and it was installed.
It just moves the file to the phone. You have to flash the file yourself if it is a flashable.
You can push a .jpg file if you want, it doesn't matter, it only moves it.
And I think you're getting confused with the 'adb install' command. You can install NON-system APKs by doing that.
Code:
adb install someprogram.apk
birgertime said:
It just moves the file to the phone. You have to flash the file yourself if it is a flashable.
You can push a .jpg file if you want, it doesn't matter, it only moves it.
And I think you're getting confused with the 'adb install' command. You can install NON-system APKs by doing that.
Code:
adb install someprogram.apk
Click to expand...
Click to collapse
I guess I was confused on what ADB could do.
I thought it could push down a Rom and install it onto the phone.
Then I would disconnect it and reboot the phone and I would have the newer rom installed.
I didn't know that it only pushed the ROM onto the sdcard and then I would install the zip from the phone itself.
Finally I got an answer to my question.
LOL.
I have tried on the team whiskey site to and no one answered it. Also all the stuff I read on it really didn't tell me that either.
I really appreciate your answer in helping me understand it.
I am also using Trigger 2.8 like you. But you said you had Trigger2.8.1 saved??
I have only seen Trigger 2.8 today.
^ birgertime is the developer of Trigger. He is already cooking something new in the kitchen.
s15274n said:
^ birgertime is the developer of Trigger. He is already cooking something new in the kitchen.
Click to expand...
Click to collapse
Duhhh... I missed that... LOL. I am brain fried!!! I have installed Odin, SuperOneClick, and ADM. I have be learning all three but was having trouble with understanding what ADB could do. Been reading lots and lots about it all day. Whew. I am tired. Ever instruction got down to connecting and seeing your phone and then it would end there. Finally I got an answer from Birgertime. Thanks.
I have 4 different roms saved to my phone to switch between if I want too. But I love Trigger 2.8 with Overclock v2. Also I am seeing 9 sats out of 11 on my gps. With Overclock v2 and using CPUBoostPro I am right at 2000 with Quadrant.

[Q] Can't delete CWM Nandroid backups

Hi guys, having an odd problem.
I've made some nandroid backups (about three) via CWM Recovery, and I can't seem to browse to them, or delete them.
It's definitely taking up space, and I'm not sure what to do now.
A backup that I made straight to my external SD card however, seems to be browse-able, so I'm a bit confused now.
Attached are some screenshots from ES File Browser (with root access turned on).
The last screenshot is going to /storage/sdcard0/clockworkmod/ (same directory, but now I can't seem to see anything about "backups").
I've also tried to delete these backups straight from CWM Recovery, but CWM says that it can't access the folder.
Oddly enough, if I do another backup (straight to internal), it seems to put all the files in /sdcard/Clockworkmod/backups but never to be accessed again.
Anyone have any ideas?
Delete via Windows Explorer .
jje
JJEgan said:
Delete via Windows Explorer .
jje
Click to expand...
Click to collapse
Thanks for the suggestion, but nope, that didn't work. (Obviously tried that first).
The folder was shown as empty via Windows.
After a lot of digging and trying different things (including Root Explorer and Terminal Emulator), I've managed to delete it.
I'll post the instructions so other people who may have similar problems in the future can follow it.
First, you'll need ADB and you'll need to reboot into CWM Recovery.
Once you've gotten that sorted, boot into CWM Recovery and go to "mount and storage" and then select "mount /data".
This will mount the /data structure which we need to use.
Afterwards in CMD, use the following:
Code:
adb root
adb shell
After this, you should be logged in as ~ (root)
Proceed to go into the directory using the cd function. (PROTIP: Use the ls function to check where you're going.)
You need to get to ../clockworkmod/backup/
You'll find that you can finally access the /backup/ folder, and you'll then be able to delete the files. Please note that the below command will delete ALL the files within this folder.
Code:
rm -rf *
Afterwards, do
Code:
cd ..
to get back to the ../clockworkmod/ folder and then run the below code to delete the now empty /backup/ folder:
Code:
rmdir backup
no, to be logged in as root you need to type in "su"

[Q] Can't write to /storage/sdcard0/

This is a mystery. I have a Verizon Samsung Galaxy Note 2, running 4.1.1, rooted. A few days ago I ran out of space on the internal storage so I wanted to move /data/media/Download to /mnt/extSdCard/ and then symlink to it. But I screwed up and accidentally moved all of /data/media to the external SD card. I realized I did that and immediately moved it back to /data/. I did this using the Move command in RootExplorer.
Now I find I can no longer write to /storage/sdcard0/. For example, my S-Note files go there but when I try to save a note it says "Unable to save file". I have another app that also keeps data there and it too complains that it can't write to its own directory on /storage/sdcard0/. I also find there are files on sdcard0 I can't delete myself either with RootExplorer or from a terminal window, even with a "#" prompt.
/sstorage/sdcard0 has perms of 775, owned by root in group sdcard_rw. /storage has perms 775, owned by system in group sdcard_r.
I'm really stumped here. What the heck did I do to my phone? Any help would be *greatly* appreciated. Thanks!
Michele31415 said:
This is a mystery. I have a Verizon Samsung Galaxy Note 2, running 4.1.1, rooted. A few days ago I ran out of space on the internal storage so I wanted to move /data/media/Download to /mnt/extSdCard/ and then symlink to it. But I screwed up and accidentally moved all of /data/media to the external SD card. I realized I did that and immediately moved it back to /data/. I did this using the Move command in RootExplorer.
Now I find I can no longer write to /storage/sdcard0/. For example, my S-Note files go there but when I try to save a note it says "Unable to save file". I have another app that also keeps data there and it too complains that it can't write to its own directory on /storage/sdcard0/. I also find there are files on sdcard0 I can't delete myself either with RootExplorer or from a terminal window, even with a "#" prompt.
/sstorage/sdcard0 has perms of 775, owned by root in group sdcard_rw. /storage has perms 775, owned by system in group sdcard_r.
I'm really stumped here. What the heck did I do to my phone? Any help would be *greatly* appreciated. Thanks!
Click to expand...
Click to collapse
Do you have a nandroid backup? extsdcard and sdcard0 will stay untouched but maybe all you need its the system and data back to working order. I figure that's the first idea. I couldn't say what's happened though.
MunkinDrunky said:
Do you have a nandroid backup? extsdcard and sdcard0 will stay untouched but maybe all you need its the system and data back to working order. I figure that's the first idea. I couldn't say what's happened though.
Click to expand...
Click to collapse
That would be nice but unfortunately I don't have nandroid. I just back up my files to the external SD card with Titanium Backup and then store a copy on my PC. To be honest, I was afraid of screwing up something by running nandroid so I never got it.
In the meantime, none of my apps that are parked on /storage/sdcard0 run anymore, all claiming they can't create files there. The only thing I've been able to do there is chmod and chown but it doesn't seem to help. If I delete a file with Root Explorer, it says it's deleted but when I refresh the directory, it's still there.
I don't see how the two could be related, but I keep coming back to /data/media. I also have a Galaxy S3 that's working. /data/media on the S3 is 775, whereas it was 770 on the Note 2. I changed it to 775 and rebooted - didn't help. I changed the group of /storage from sdcard_r to sdcard_rw - didn't help either.
Could you tell me what the properties are on your Note 2 of /data, /data/media, /storage, and /storage/sdcard0? I'm thinking that Root Explorer munged up something when I moved /data/media/ to the extSdCard and then back again. The subdirectories and files are all there but sdcard0 isn't happy now.
Thanks very much for the reply.
Michele31415 said:
That would be nice but unfortunately I don't have nandroid. I just back up my files to the external SD card with Titanium Backup and then store a copy on my PC. To be honest, I was afraid of screwing up something by running nandroid so I never got it.
In the meantime, none of my apps that are parked on /storage/sdcard0 run anymore, all claiming they can't create files there. The only thing I've been able to do there is chmod and chown but it doesn't seem to help. If I delete a file with Root Explorer, it says it's deleted but when I refresh the directory, it's still there.
I don't see how the two could be related, but I keep coming back to /data/media. I also have a Galaxy S3 that's working. /data/media on the S3 is 775, whereas it was 770 on the Note 2. I changed it to 775 and rebooted - didn't help. I changed the group of /storage from sdcard_r to sdcard_rw - didn't help either.
Could you tell me what the properties are on your Note 2 of /data, /data/media, /storage, and /storage/sdcard0? I'm thinking that Root Explorer munged up something when I moved /data/media/ to the extSdCard and then back again. The subdirectories and files are all there but sdcard0 isn't happy now.
Thanks very much for the reply.
Click to expand...
Click to collapse
Did you want to know what permissions those directories have?
/data rwx rwx --x
/data/media rwx rwx ---
MunkinDrunky said:
Did you want to know what permissions those directories have?
/data rwx rwx --x
/data/media rwx rwx ---
Click to expand...
Click to collapse
Yes, thanks. That's the same I have on the Note 2, so that's not the problem (though oddly enough, on the S3, /data/media is rwxrwxr-x).
Still, it has to be *some* permission somewhere that's wrong and is preventing apps from writing or deleting files they have in sdcard0. What about /storage? I've got:
/storage r-xr-x--- owner=system, group = sdcard_r
/storage/sdcard0 rwxrwxr-x, owner = root, group = sdcard_rw
/storage in particular doesn't seem correct. ???
FWIW, here's someone else with the exact same problem - unfortuntely he didn't get a resolution: http://androidforums.com/android-lounge/716573-unable-delete-move-files-directories-sdcard0.html
And this one too: http://android.stackexchange.com/questions/30113/cant-delete-any-files-in-my-download-folder I tried the same things suggested there and they didn't work for me either.
I dont know enough about the permission system. You said you tried terminal. Maybe try another root enabled file explorer. I've only used es and root browser. Maybe your binaries need to be updated.
You might consider starting fresh if you can't find a solution. From here on out I'd take care to be meticulous and read up on the how to threads for rooting and unlocking bootloader just so you have an idea of where what your going to do fits in with everything else. It sounds like you've just beet rooted and left your phone stock.
Perhaps the internal memory need to be reformatted and everything taken back to a stock working order? If your bootloader is unlocked and you have a custom recovery (like twrp or cw) you could back up all contents of your ext and internal sd to a computer, do a nandroid backup(just in case), and back up your apps with titanium, then wipe everything, system data cache dalvick through recovery then reformat internal sd and re flash the stock rooted image of 4.1.1 or 4.1.2.
If your bootloader is locked up still you could use Odin to get back to stock factory image. You would no longer be rooted but you can then reroot. This is always the end of the line and one can run into some bigger problems here.
MunkinDrunky said:
I dont know enough about the permission system. You said you tried terminal. Maybe try another root enabled file explorer. I've only used es and root browser. Maybe your binaries need to be updated.
Click to expand...
Click to collapse
Yup - I've tried Root Explorer, File Expert, Terminal Emulator, and adb USB from the PC. Same result from all of them. Oddly enough, Root Explorer and FE both claim that files I select on /storage/sdcard0 have been deleted, but when I refresh the file list, they're baaaack...
MunkinDrunky said:
You might consider starting fresh if you can't find a solution. From here on out I'd take care to be meticulous and read up on the how to threads for rooting and unlocking bootloader just so you have an idea of where what your going to do fits in with everything else. It sounds like you've just beet rooted and left your phone stock.
Click to expand...
Click to collapse
Yes, I only flashed the Verizon rooted stock ROM because that's all I needed. I just want to be able to use apps like Titanium Backup, get rid of that stupid clicking sound the camera makes, and other things you need root for. I'm happy with the other features of the standard ROM. I never bothered unlocking the boot loader.
MunkinDrunky said:
Perhaps the internal memory need to be reformatted and everything taken back to a stock working order? If your bootloader is unlocked and you have a custom recovery (like twrp or cw) you could back up all contents of your ext and internal sd to a computer, do a nandroid backup(just in case), and back up your apps with titanium, then wipe everything, system data cache dalvick through recovery then reformat internal sd and re flash the stock rooted image of 4.1.1 or 4.1.2.
Click to expand...
Click to collapse
Yes, I've considered that, and it may come to that. But it's not a very intellectually appealing solution. It's sort of like burning down your house because you've got termites. I'm still hoping there's a less drastic solution. In the meantime, this may be locking the barn door after the horse is gone, but I downloaded a nandroid app and took a nandroid backup. Don't know if wiping and then restoring that will also restore the problem.
MunkinDrunky said:
If your bootloader is locked up still you could use Odin to get back to stock factory image. You would no longer be rooted but you can then reroot. This is always the end of the line and one can run into some bigger problems here.
Click to expand...
Click to collapse
Yup, if that doesn't do it, it's time for a new phone
UPDATE:
I started looking at /data/media and comparing permissions there to what my S3 was showing. It seems /data/media was owned by media_rw in group media_rw on the Note2, but owned by root in group root on the S3. So in adb on the Note 2 I did #chown root:root /data/media. To my surprise, that worked. I then changed the permission from 770 to 775 to match what the S3 has. I then tried saving an S-Note - didn't work. So I went into /data/media/S Note and changed *its* owner/group to root, and permissions to 777 also. I tried saving a note and ... success! It saved it OK.
I'm starting to think that when I copied /data/media back to /data from /mnt/extSdCard/data/media, Root Explorer bollixed up the owner/group/permissions. I'm going to try some other directories there and see if that helps too. And see if this survives a reboot. So that's some progress at least...
That is indeed good news. At least the permission will work through terminal on a subdirectory basis in the media dir. You could recursively change permission for all subdirectory in media. I belive -R probably best to Google that.
MunkinDrunky said:
That is indeed good news. At least the permission will work through terminal on a subdirectory basis in the media dir. You could recursively change permission for all subdirectory in media. I belive -R probably best to Google that.
Click to expand...
Click to collapse
Well that seems to have done it. Everything is working once again. In the final analysis, it appears that you just can't change permissions or delete files from /storage/sdcard0/. However, this is apparently just a mount point (I may be wrong here) for /data/media/ and you *can* change permissions/owners/etc. there. Once I did that, the apps I had that had installed themselves on sdcard0/ started working again. Go figure.
And as a bonus, I got the motivation I needed to start doing nandroid backups and learned a little about the storage hierarchy of Android. So big thumbs up for taking the time to read all this and help me out.
Michele31415 said:
Well that seems to have done it. Everything is working once again. In the final analysis, it appears that you just can't change permissions or delete files from /storage/sdcard0/. However, this is apparently just a mount point (I may be wrong here) for /data/media/ and you *can* change permissions/owners/etc. there. Once I did that, the apps I had that had installed themselves on sdcard0/ started working again. Go figure.
And as a bonus, I got the motivation I needed to start doing nandroid backups and learned a little about the storage hierarchy of Android. So big thumbs up for taking the time to read all this and help me out.
Click to expand...
Click to collapse
Yeah I leaned more bout this too. As an after thought, I have only ever moved items from sdcard0 to extsdcard by going to /storage then copying items from one to another. I too believe this is just a mount point. Nevertheless, probably most items in /data/media you were trying to move to extsdcard are found in sdcard0 and accessible through the mounting folder: /storage, well at least /downloads are there in /storage/sdcard0/ and i have always navigated to /storage first then to /sdcard0/ to grab /downloads or /android/data/ to copy to external whatever.
I know the thread is more than a year old, but I have the same issue here on the Xperia T.
Can't write on /storage/sdcard0
However, I have no idea what to do to fix it. I found a step by step actionplan here:
http://forum.cyanogenmod.org/topic/104879-cm12-issue-with-sd-card-and-wifi-network-detection/
is this what you did?

[Q] how to adb pull files/photos, which directory path?

My HOX+ is stuck on bootloop, but I'm trying to save my photos from it before I try to revive it (had photos of a very important event before phone went dead, it's really important so I really don't want to lose them). How do I transfer files off it (can't mount from recovery)? Tried using ./adb pull, but which directory path I need to pull the files from? (I'm using Mac)
The threads I read says to pull /sdcard/DCIM but doesn't work (remote object '/sdcard/DCIM' does not exist). My understanding is that HOX+ has a different way to store files, so I don't know how the directory works.
Thanks in advance!
allmidnighter said:
My HOX+ is stuck on bootloop, but I'm trying to save my photos from it before I try to revive it (had photos of a very important event before phone went dead, it's really important so I really don't want to lose them). How do I transfer files off it (can't mount from recovery)? Tried using ./adb pull, but which directory path I need to pull the files from? (I'm using Mac)
The threads I read says to pull /sdcard/DCIM but doesn't work (remote object '/sdcard/DCIM' does not exist). My understanding is that HOX+ has a different way to store files, so I don't know how the directory works.
Thanks in advance!
Click to expand...
Click to collapse
adb pull /sdcard
(Or use the most recent TWRP that has MTP mountable)

Categories

Resources