CWM 6.0.0.5, can't mount /sdcard to flash SuperSU - Samsung Galaxy Nexus

Following the instructions in this thread http://forum.xda-developers.com/showthread.php?t=1769301 I'm trying to root my Galaxy Nexus. All has gone well up until the point where I'm trying to flash SuperSU.zip from within CWM. I have the .zip in my /sdcard/ directory, but I cannot mount /sdcard from CWM. It just says E: Can't mount /sdcard/
I don't really want to experiment too much in trying to figure it out for fear of screwing up my phone somehow. This is my first experience unlocking/rooting a Nexus device with command line tools, so I don't know if adb or fastboot would be of service. I'm not as familiar with them as I wish I were.
Advice?
EDIT: I just noticed that I inadvertently put this in General rather than Q&A. If a mod could move it (or delete it so I can remake it and not have the same thread floating around twice), that would be great. Sorry.

Related

[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.

FYI CWM With latest .14 ICS release

I went throught the process to root and install unlocked bootloader after upgrading from stock hc to stock 14 ics build. Everything seemed to work well untill trying to install CWM.
EVerytime I rebooted to try to get into CWM I got the old recovery. It seems I had to rename install-recovery.sh. However when I tried to rename with term emu apparently the easy root method no longer works and system remained ro. In order to resolve I had to mount -o remount, rw /system/ then rename install-recovery, then re-run the cwm script.
paronowitz said:
I went throught the process to root and install unlocked bootloader after upgrading from stock hc to stock 14 ics build. Everything seemed to work well untill trying to install CWM.
EVerytime I rebooted to try to get into CWM I got the old recovery. It seems I had to rename install-recovery.sh. However when I tried to rename with term emu apparently the easy root method no longer works and system remained ro. In order to resolve I had to mount -o remount, rw /system/ then rename install-recovery, then re-run the cwm script.
Click to expand...
Click to collapse
I'm confused. Even if the root script from ZN was installed successfully which I can confirm and many other members who have ran this rom have confirmed, you would still need to mount /system some how. Whether it is from rootexplorer, es file manager, or directly from the terminal emulator as you did. That script roots the tab and makes /system/ mountable in various apps it doesn't make /system/ RW constantly. I'm glad you got it taken care of though.
Yup that what I'm saying. I started with a freshly clean install. I tried running the an method several times. I was able to install unlocked boot loader howver I had no rw access to /system unless I manually remounted. Every time I reboot I have to remount again
Well I would think BEFORE updating to .014 you should remove bootloader.blob and anything else that relates to changing recovery from the .014 update before attempting to flash. Otherwise you would end up with a stock bootloader again.
don't forget to remove the installrecovery script from the etc folder too just a fyi
@paronowitz
You might want to try rooting again. I'm currently on Zeronull's release, and I can mount /system fine from root explorer without having to mount it first through terminal emu. I've gotten into the habit of re-rooting roms on the tab.
I had not problem accessing /system. I could not change or delete anything in is specifically the install_recovery.sh without remounting it rw
if memory serves me right the install package for twrp removed the install recoveryinstall script.
paronowitz said:
I had not problem accessing /system. I could not change or delete anything in is specifically the install_recovery.sh without remounting it rw
Click to expand...
Click to collapse
Well I apparently had no problems with root, until I tried to edit anything in /system. After re-rooting I could mount /system, AND edit/delete install_recovery.sh.
The OP had said he was renaming install-recovery.sh from the terminal emulator. Like I said in my post earlier the root script doesn't make /system/ rw constantly and the terminal emulator does not auto mount /system/ rw. So even if the script is working, you would have to use the same commands if you are using the termnal to rename. Also, by making /system/ rw you are making /system/etc rw, and this allows you to edit the file you were attempting to edit. So when I am referring to mounting /system/ as rw, we are talking about the same thing. /etc/ is a shortcut to /system/etc.
paronowitz said:
I went throught the process to root and install unlocked bootloader after upgrading from stock hc to stock 14 ics build. Everything seemed to work well untill trying to install CWM.
EVerytime I rebooted to try to get into CWM I got the old recovery. It seems I had to rename install-recovery.sh. However when I tried to rename with term emu apparently the easy root method no longer works and system remained ro. In order to resolve I had to mount -o remount, rw /system/ then rename install-recovery, then re-run the cwm script.
Click to expand...
Click to collapse
It sounds like you may want to just execute the commands by hand. The script will make assumptions that may not hold true for your current configuration.
Look HERE
Check out the Eew245's root method. It give you the most control since you do it by hand. If you don't have adb you can use the one supplied in the ZeroNull easy unlock package(careful to not run the scripts at the wrong time and such though). Anyway Im out of time today. It sounds like as others have said you probably just need to
su
mount -o remount,rw /system
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.BAK
Then reflash cwm if you overwrote recovery when you updated.
NoSudo said:
It sounds like you may want to just execute the commands by hand. The script will make assumptions that may not hold true for your current configuration.
Look HERE
Check out the Eew245's root method. It give you the most control since you do it by hand. If you don't have adb you can use the one supplied in the ZeroNull easy unlock package(careful to not run the scripts at the wrong time and such though). Anyway Im out of time today. It sounds like as others have said you probably just need to
su
mount -o remount,rw /system
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.BAK
Then reflash cwm if you overwrote recovery when you updated.
Click to expand...
Click to collapse
That's exactly what I had to do.
edit - miss-post

[Q] Cant mount "mount /sdcard in CWM

hi guys,
i was coming back from CM10 to stock 4.1.1 on my nexus and when in CWM, i deleted all the content on sdcard by accident.
now there is no zip file on the sd card to install the rom,
I tried mounting sdcard and copy but it doesnt mount.when i press mount /sdcard, nothing happens>(doesnt show the partition on computer and doesnt go ot :unmount /sdcard.)
Im stuck in here and dont know what to do.
please help!
use search, or read a few pages back, you'll find your answer.
sent from my i9250
A quick search yielded this useful thread.
http://forum.xda-developers.com/showthread.php?t=1916108&highlight=recovery+mount+sdcard
i tried ODIN to stock but the ODIN software does not find the phone on any port when it is connected. i installed all drivers but still nothing.
cant i use ODIN for this ? thanks
adb push whateverromyouwant.zip /storage/sdcard0
Since nobody did explain why it can't mount, I will.
GALAXY NEXUS HAS NO SDCARD. It only has folder that is used as sdcard. CWM doesn't know that, thus making that mount feature useless on Galaxy Nexus
Like El Daddy said, connect your computer while your phone is in recovery mode, open cmd on the directory where you have fastboot.exe, then type "adb push ROMNAME.zip /sdcard/". You will also need to place your ROM file into the directory where you have fastboot.exe
Since that's done, please use search next time. There are too many threads talking about this exact problem.
Besides, using adb is more badass
Sent from my Galaxy Nexus using xda app-developers app
kyokeun1234 said:
You will also need to place your ROM file into the directory where you have fastboot.exe
Click to expand...
Click to collapse
or adb.exe, depending on what are you trying to do. one could also add said folder to $PATH and have the commands system-wide to avoid the need of placing files to flash/push on the same folder that the binaries are.
note: if pushing to /sdcard/ doesnt work in recovery, push to /data/media.
sent from my i9250
bk201doesntexist said:
or adb.exe, depending on what are you trying to do. one could also add said folder to $PATH and have the commands system-wide to avoid the need of placing files to flash/push on the same folder that the binaries are.
note: if pushing to /sdcard/ doesnt work in recovery, push to /data/media.
sent from my i9250
Click to expand...
Click to collapse
Thanks for extra info
Just to add (and clarify) a bit to what was said:
1) if we are talking about mounting as in getting read/write access to /sdcard via ADB, it is already mounted by default in CWM. The /sdcard is just a symlink to /data/media, and /data is mounted by default when you boot CWM.
2) if we are talking about mounting as in USB Mass Storage, mounting /sdcard is not possible for the same reason in point #1: /sdcard is just a symlink to /data/media.
kyokeun1234 said:
Since nobody did explain why it can't mount, I will.
GALAXY NEXUS HAS NO SDCARD. It only has folder that is used as sdcard. CWM doesn't know that, thus making that mount feature useless on Galaxy Nexus
Like El Daddy said, connect your computer while your phone is in recovery mode, open cmd on the directory where you have fastboot.exe, then type "adb push ROMNAME.zip /sdcard/". You will also need to place your ROM file into the directory where you have fastboot.exe
Since that's done, please use search next time. There are too many threads talking about this exact problem.
Click to expand...
Click to collapse
Thank you so much, really solve my big problem
so much easier
for those who will come to this thread with the same problem, there is the very simple solution. use any of the Toolkits from this forum ( N-Cry or Nexus 4 Toolkit 2.0 ) and from the recovery menu select install from Sideload, after that launching ( pushing ) the ROM via sideload from the Tookit. Works like a charm.
Mango Polo said:
for those who will come to this thread with the same problem, there is the very simple solution. use any of the Toolkits from this forum ( N-Cry or Nexus 4 Toolkit 2.0 ) and from the recovery menu select install from Sideload, after that launching ( pushing ) the ROM via sideload from the Tookit. Works like a charm.
Click to expand...
Click to collapse
1) this is the galaxy nexus, not the nexus 4
2) just say no to toolkits
3) adb is not hard
4) fastboot is also, not hard.

Need help recovering my files

Okay, so I updated my GSM Galaxy Nexus to the newest nightly of CyanogenMod and it ****ed things up royally, and I neglected to make a backup this time unfortuneatly.
I've tried flashing new ROMs ontop of it, but it doesn't fix the issue.
Right now my device boots, but shows a the home screen without any icons. I also have no navigation bar (app drawer/task manager/back button). Also, Trechbucket FC repeatedly. I can't find any of my files on the phone, even through adb, but when I go into settings and look under STORAGE and click photos, it shows me a gallery of all my photos.
Somehow my SD card is separated into /sdcard/0/ and /sdcard/legacy/ and my photos/downloads/everything is in legacy.
I've tried pulling using adp to grab all of my files, but it says the directory doesn't exist, (maybe I'm doing it wrong). I begun to try to pull the entire /sdcard/ and it did pull close to 2GB of audiobooks I had on there, but it was taking forever and I wanted to selectively pull photos/documents instead. I'm not even sure if I had let it continue if it'd have pulled my photos.
I type in adb pull /sdcard/DCIM /sdcard/ and it tells me that '/sdcard/DCIM' does not exist. I also tried /sdcard/DCIM/ and same thing.
Yet I can find it easily while in shell....
I think it's possible some of my files are hidden? I can use file explorer (by using Settings>Storage>audio>Explorer to see that all my files are under SDCARD/Legacy but I try to adb pull from that and it doesn't exist.
I'm really confused....
Any help either fixing my phone or pulling my data (which is on here) so I can erase/start clean?
I'd much appreciate your help.
Thanks.
A quick search in this forum of 'sdcard 4.2' will explain why this happens.
Anyway, fix is to use adb to pull /data/media (instead of /sdcard)
FriedSushi87 said:
Okay, so I updated my GSM Galaxy Nexus to the newest nightly of CyanogenMod and it ****ed things up royally, and I neglected to make a backup this time unfortuneatly.
I've tried flashing new ROMs ontop of it, but it doesn't fix the issue.
Right now my device boots, but shows a the home screen without any icons. I also have no navigation bar (app drawer/task manager/back button). Also, Trechbucket FC repeatedly. I can't find any of my files on the phone, even through adb, but when I go into settings and look under STORAGE and click photos, it shows me a gallery of all my photos.
Somehow my SD card is separated into /sdcard/0/ and /sdcard/legacy/ and my photos/downloads/everything is in legacy.
I've tried pulling using adp to grab all of my files, but it says the directory doesn't exist, (maybe I'm doing it wrong). I begun to try to pull the entire /sdcard/ and it did pull close to 2GB of audiobooks I had on there, but it was taking forever and I wanted to selectively pull photos/documents instead. I'm not even sure if I had let it continue if it'd have pulled my photos.
I type in adb pull /sdcard/DCIM /sdcard/ and it tells me that '/sdcard/DCIM' does not exist. I also tried /sdcard/DCIM/ and same thing.
Yet I can find it easily while in shell....
I think it's possible some of my files are hidden? I can use file explorer (by using Settings>Storage>audio>Explorer to see that all my files are under SDCARD/Legacy but I try to adb pull from that and it doesn't exist.
I'm really confused....
Any help either fixing my phone or pulling my data (which is on here) so I can erase/start clean?
I'd much appreciate your help.
Thanks.
Click to expand...
Click to collapse
i had this problem and thought I broke my SD card. But after a little exploring I found that Android 4.2 uses a new mounting point for SD card. My old SD card content was in /data/media, new sdcard content is in /data/media/0
I would recommend you either use adb or use terminal emulator to move your old files back to the new location. If you choose to use a file manager to do this, most likely it will be quite slow. I am assuming terminal emulator only does a low level dir path change while a file manager does an actual copy/move
Sent from my Galaxy Nexus using xda premium
DZYR said:
A quick search in this forum of 'sdcard 4.2' will explain why this happens.
Anyway, fix is to use adb to pull /data/media (instead of /sdcard)
Click to expand...
Click to collapse
Thanks so much. That did the job. Now I've just got a weird /0/ directory with everything in it.
coferjinelong said:
i had this problem and thought I broke my SD card. But after a little exploring I found that Android 4.2 uses a new mounting point for SD card. My old SD card content was in /data/media, new sdcard content is in /data/media/0
I would recommend you either use adb or use terminal emulator to move your old files back to the new location. If you choose to use a file manager to do this, most likely it will be quite slow. I am assuming terminal emulator only does a low level dir path change while a file manager does an actual copy/move
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
I used ADB because I couldn't access terminal emulator because the phone had a botched update and wasn't working properly.
All's good now except for the fact that I've lost all my text messages..... and stuff...

stuck @ bootloader/cwm

Hi, i flashed a maguro rom and got stuck at bootscreen.
i couldnt mount my sdcard in cwm, because it made a 0/ directory and couldnt find sd_ext
i had no other rom on my sd card, so i started looking for a way out, ended up formatting my sdcard ..
no sweat : -) lmao
next i got the sdk, installed the fastboot driver , ok, i got connection to my device.
but apparently to push a rom i need ADB, and i cant get ADB working, neither when im in cwm or on fastboot mode.
so i need access to the sdcard inside the Phone, i checked youtube , but dissasembling the Phone doesnt reveal the sd card :/
its soldered in there or smthn.
please help me get a rom on my sdcard.
Thanks in advance for any responses.
Grtz
Woah woah woah woah woah. Slow down! How did this escalate to unsoldering the sdcard so quickly? All the files you had WERE still on your sdcard in the /0/ folder. Pretty sure you deleted them all when you formatted your sdcard. I think you can push the files via adb?. Would have been really simple if you would have searched/asked before formatting.
adb working
WiredPirate said:
Woah woah woah woah woah. Slow down! How did this escalate to unsoldering the sdcard so quickly? All the files you had WERE still on your sdcard in the /0/ folder. Pretty sure you deleted them all when you formatted your sdcard. I think you can push the files via adb?. Would have been really simple if you would have searched/asked before formatting.
Click to expand...
Click to collapse
I got adb working in clockwordmod now, i pushed the cwm10 rom, renamed it to update.zip
and used this command : adb push update.zip /sdcard/update.zip
it transfers and gives me the speed message in the cmd prompt.
but when i then reboot and go into fastboot i type fastboot update /sdcard/update.zip , it says cant find file.
also when im in cwm and i try to "install zip from sdcard" -> "choose zip from sdcard" i get message in the advanced-log :
using data/media for /sdcard/ , im looking now for a command to browse the directory structure of my Phone.
is this possible with adb?
any tips are greatly appreciated !
Grtz
flashed , trying to boot now..loading...
in my last post i said it was using /data/media for sdcard/
so i adb pushed the file to /data/media and in clockworkmod , selected choose from sdcard
and it worked ! i saw update.zip , installed it, im now running cyanogmod10.
thanks for the reply's even tought it didnt help.
any effort is appreciated.
Thanks! bye! =)

Categories

Resources