Help, was in recovery then I pushed a file to /sdcard, what happens!?!? - Desire Q&A, Help & Troubleshooting

So I rebooted to recovery and I push a file into /sdcard
after I shell, I check it's only file in there!! So then I reboot and then adb shell again when phone is regular mode and I don't see that file
Where did I push the file when in recovery? I can't find it next time I reboot to recovery then did LS, the file is gone! Can I delete that file or its lost/hidden or what's going on?

Im not even going to read the whole thing. If u pushed the file and u can't figure out how to reboot from recover just pull battery and restart
Sent from my SCH-I500 using XDA App

You need to mount your sd card to /sdcard.
The file was stored to / on the temporary ramdisk. Do "mount -a" in shell first.

pulser_g2 said:
You need to mount your sd card to /sdcard.
The file was stored to / on the temporary ramdisk. Do "mount -a" in shell first.
Click to expand...
Click to collapse
Thanks for the good info! SO basically the file I pushed over was removed upon rebooting correct? I just don't want that file to be on the ramdisk or sdcard anywhere since the /sdcard was not mounted.

Related

[q] Trying to push some files to phone

I'm using ADB and trying to move some files to system/etc (gps.conf to improve GPS signal) but everytime I try to mv in ADB shell it says it can't find the file I want to mv from /sdcard/ to /system/etc/
I've mounted the SD Card by typing mount sdcard and can see the file in ADB shell when typing ls.
What am I doing wrong?
I've got it to work using Root Explorer. Just wondering why I couldn't get it to work using adb
Are you S-off, if not that is why it failed. Also if you are not S-off root manager didn't move anything to system (at least until you reboot) because you don't have write access to the system partition while booted.
So if you are S-on do it again but then with the phone in recovery and don't forget to mount the system partition as read/write.
Cheers!

Problem Loading ROM

I've load many ROMS before without issues until today. I forgot to copy the ROM to the phone before flashing. So, while in recovery mode, I used "adb push <ROM.zip.." to the sdcard. This says it pushed ok. But, when I go to "choose zip from sdcard", it's no where to be found. Any ideas?
Reboot the damn thing back into the existing rom and copy it over.
Hopefully they get the "mount SD Card" working. It was nice to copy files over to the phone while in CWM.
I think you could probably copy it to where the sdcard is actually mounted at, which is /data/media/ or something like that.
player911 said:
Reboot the damn thing back into the existing rom and copy it over.
Hopefully they get the "mount SD Card" working. It was nice to copy files over to the phone while in CWM.
Click to expand...
Click to collapse
I tried and it hangs on a screen with the word "Google" and an unlocked lock at the bottom.
Mills00013 said:
I think you could probably copy it to where the sdcard is actually mounted at, which is /data/media/ or something like that.
Click to expand...
Click to collapse
Thank you. Thank you. This worked. adb push <rom name> /data/media
This placed the file at the "root" of the virtual sdcard seen by clockworkmod.
Thats great!
I'm sure it will only be a matter of time before CWR mounts that directory as default when you select to do the mount USB storage option. Alternatively (and a little more complexly), they could create a symlink at /storage to point there, temporarily while you are in CWR.

[Q] How do i transfer files to GNex when in recovery mode?

So i've made a mistake. I forgot to download GAPPS but i've already done a factory reset and installed a new rom. I cant seem to mount the usb storage trough clockwork recovery. Is there a way to push the zip file to the device?? Or what should i do?
Thanx
xclusiv8 said:
So i've made a mistake. I forgot to download GAPPS but i've already done a factory reset and installed a new rom. I cant seem to mount the usb storage trough clockwork recovery. Is there a way to push the zip file to the device?? Or what should i do?
Thanx
Click to expand...
Click to collapse
If you only forgot gapps you can restart, the ROM and the phone will work fine you just won't have Google apps. Once it's on you can just copy the file like usual and return to recovery and flash it
Sent from my Galaxy Nexus using xda premium
Good question though. What IF he didnt flash the ROM, how do you get a file on the SDcard if you cant mount it in recovery?
adb push ./"filename.zip" /sdcard
Phone will boot just fine w/o GAPPS.
But you can just use adb push <FILE> <DIRECTORY>
for example:
Code:
adb push gapps.zip /sdcard/
Thanx for the help guys =)
This happens to me all the time. The Mounts section of CWM select "mount as USB" drive. Windows should see this drive and transfer away.
merge5 said:
This happens to me all the time. The Mounts section of CWM select "mount as USB" drive. Windows should see this drive and transfer away.
Click to expand...
Click to collapse
GN internal storage can't be mounted as USB - not even in recovery.
The only way I've found to push/pull files in CWM on the GN is over ADB. If the files in /sdcard/ don't appear, go into mounts and storage, and mount /data. Then try again.
/sdcard/ is nothing more than a symlink to /data/media.
I transfer files over ADB with
'adb push update.zip /data/media/'
no need to mount /data before.
just reboot open up your computer and youll see the gnex just transfer the gapps to your sd card and then reboot in recovery to flash
cmstlist said:
GN internal storage can't be mounted as USB - not even in recovery.
The only way I've found to push/pull files in CWM on the GN is over ADB. If the files in /sdcard/ don't appear, go into mounts and storage, and mount /data. Then try again.
Click to expand...
Click to collapse
Good point. I stand corrected. That was how I did it on my OG Droid. Sorry for the confusion.
bk201doesntexist said:
/sdcard/ is nothing more than a symlink to /data/media.
I transfer files over ADB with
'adb push update.zip /data/media/'
no need to mount /data before.
Click to expand...
Click to collapse
I'm not sure why but CWM on my phone used to auto mount /data and now it doesn't anymore. So to see anything from adb in recovery, I now have to go to mounts first.
Sent from my Galaxy Nexus using Tapatalk
cmstlist said:
I'm not sure why but CWM on my phone used to auto mount /data and now it doesn't anymore. So to see anything from adb in recovery, I now have to go to mounts first.
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
What cwm version are you on, for instance?
Latest CWM touch as of today, and also tried it with latest CWM non-touch.
Incidentally I just bumped into a caveat of transferring files to the GN in recovery mode. The permissions are set strangely when you push files over ADB in recovery, and as a result when booted into the OS I was unable to rename any of the pushed files/folders or put new files in. Since the DCIM directory was one that I'd pushed over, new photos weren't saving. And I did not have permission to change permissions.
This is pretty much a brute force method - so I rebooted into recovery again, mounted /data, did adb shell, cd sdcard, and then:
chmod -R 777 *
And upon booting back into the OS, everything works properly again.
I know that messing with permissions is usually a dangerous thing. My logic was that anything stored in /sdcard is supposed to be a file that any app would be allowed to access as long as it has SD permissions - it's been that way in every version of the OS through to 4.0.
But anyway, if there's something I should do to decrease the "unsafeness" of this situation, please advise me. I guess in theory this would give a malicious app permission to execute code from /sdcard, which would make me more vulnerable?
EDIT: Okay more to report. To see the permissions properly when booted into the OS, you have to go into /data/media rather than /sdcard (same directory but permissions appear differently).
When I went in there and typed ls -n, I found that all the files I had pushed in recovery have UID & GID of 0. All files I had created afterwards had UID & GID of 1023. That explains everything. The owner is root for files that came from ADB in recovery, and media_rw for files created in the OS.
I can use chown, but it looks like the version of chown that comes with busybox does not have -R recursion implemented. Hrm. Aha! In CWM, chown does support -R. And we're off to the races. So from recovery I did:
cd /data/media
chown -R media_rw.media_rw *
cmstlist said:
Latest CWM touch as of today, and also tried it with latest CWM non-touch.
Incidentally I just bumped into a caveat of transferring files to the GN in recovery mode. The permissions are set strangely when you push files over ADB in recovery, and as a result when booted into the OS I was unable to rename any of the pushed files/folders or put new files in. Since the DCIM directory was one that I'd pushed over, new photos weren't saving. And I did not have permission to change permissions.
This is pretty much a brute force method - so I rebooted into recovery again, mounted /data, did adb shell, cd sdcard, and then:
chmod -R 777 *
And upon booting back into the OS, everything works properly again.
I know that messing with permissions is usually a dangerous thing. My logic was that anything stored in /sdcard is supposed to be a file that any app would be allowed to access as long as it has SD permissions - it's been that way in every version of the OS through to 4.0.
But anyway, if there's something I should do to decrease the "unsafeness" of this situation, please advise me. I guess in theory this would give a malicious app permission to execute code from /sdcard, which would make me more vulnerable?
EDIT: Okay more to report. To see the permissions properly when booted into the OS, you have to go into /data/media rather than /sdcard (same directory but permissions appear differently).
When I went in there and typed ls -n, I found that all the files I had pushed in recovery have UID & GID of 0. All files I had created afterwards had UID & GID of 1023. That explains everything. The owner is root for files that came from ADB in recovery, and media_rw for files created in the OS.
I can use chown, but it looks like the version of chown that comes with busybox does not have -R recursion implemented. Hrm. Aha! In CWM, chown does support -R. And we're off to the races. So from recovery I did:
cd /data/media
chown -R media_rw.media_rw *
Click to expand...
Click to collapse
that would explain it: i always use /data/media, didn't find any permission issues yet. thanks.

Root Explorer Error

I just unlocked, rooted and restored all files in my nexus. I went into root Explorer to delete unwanted files and am getting a delete failed error every time I try to delete a file. Also my screen shots are no longer saving it says storage is in use. Anybody experience anything like this after rooting?
Sent from my Galaxy Nexus
Marcg23 said:
I just unlocked, rooted and restored all files in my nexus. I went into root Explorer to delete unwanted files and am getting a delete failed error every time I try to delete a file. Also my screen shots are no longer saving it says storage is in use. Anybody experience anything like this after rooting?
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Are you trying to delete system files? Do you have SU installed? Are you clicking the R/W option. More details please.....
Several people have reported the issue with screen shot, to fix it they've had to rename the pictures folder(Seems like the folder is read only).
Swiftkey'ed on my CM9 Galaxy Nexus
No system files just old pictures, music files and other misc. It is set as r/w, also I am getting a few apps saying I need storage available that is writable. Something has to be up with the internal storage not allowing me to access or write to it.
Sent from my Galaxy Nexus
Well I am able to take screen shots by renaming he folder. However, I am still unable to write anything to my sdcard or modify files through root Explorer or any other file manager app.
Sent from my Galaxy Nexus
Root explorer - How to text edit
Hi All,
I have a problem with my root explorer. I am not able to open a file to edit. If i long press on a file , i dont get any option to open/edit the file.
i was supposed to edit gps.conf file under /system/etc but unable to do so from root explorer.
PS: i mount r/w from the root explorer every time i try..
Please help.
If you have any directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
root explorer delete failed
danger-rat said:
If you have any directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
Click to expand...
Click to collapse
i'm having this crazy "delete failed" error every time i try to delete any file in sdcart, external, and root directory (copy-paste, root, permissions works fine )
i tried to delete any remains of root explorer with es file explorer ((which works fine btw so its not a problem of partitions i think), re installed the program again but its the same . Flashed the rom from the beginning with a full wipe but its the same
this error happened first when i updated from blackmart alpha to some rootexplorer v.99. I uninstalled that but it left this error
Any idea what is causing that
I'm very curious and would appreciate it
thanks
I found a way to delete the files you suggest using Root Explorer. Go into /data/media/<navigate to the directory that you want to delete files>.. make sure the folder is mounted as r/w and delete the files you want to delete. This is how I bypassed the delete failed issue in Root Explorer...
rester555 said:
I found a way to delete the files you suggest using Root Explorer. Go into /data/media/<navigate to the directory that you want to delete files>.. make sure the folder is mounted as r/w and delete the files you want to delete. This is how I bypassed the delete failed issue in Root Explorer...
Click to expand...
Click to collapse
^^^^ this
Thank you rester, this worked for me too. Was pulling my hair out.

SOLVED! How to put files on phone while in cwm? mount sdcard not working!

so i "crashed" my nexus because i installed a wrong .zip (or anything). now it stucks on the boot logo. i just want to reflash the firmware using the cwm. unfortunately i dont have it on the phone. is there a way to put it back on??
little update...
i can now access the phone via adb BUT i cannot mount the sdcard. when i click it, it just stays "mount /sdcard".
thebigchair said:
little update...
i can now access the phone via adb BUT i cannot mount the sdcard. when i click it, it just stays "mount /sdcard".
Click to expand...
Click to collapse
sigh... this has been mentioned a lot
you cannot mount /sdcard because there is no sdcard in the phone.
you need to use adb push to get the file you want on your phone.
Zepius said:
sigh... this has been mentioned a lot
you cannot mount /sdcard because there is no sdcard in the phone.
you need to use adb push to get the file you want on your phone.
Click to expand...
Click to collapse
okey sorry...yeah done this already. haven't found the .zip so i thought the mounting was the problem.
So i pushed it again.. still no zip on sdcard?!
adb push locationofzip /data/media/
okay..and after i pushed it in /media/ i will find it on my sdcard?
/EDIT: NOWAY! you saved my day!!! wtf thx!!
thebigchair said:
okay..and after i pushed it in /media/ i will find it on my sdcard?
/EDIT: NOWAY! you saved my day!!! wtf thx!!
Click to expand...
Click to collapse
Nothing to be surprised about, /data/media/ -> /sdcard/ symlink isnt working, but we're glad you got it working.
Sent from my i9250

Categories

Resources