Can't mount /sdcard in adb - Android Software/Hacking General [Developers Only]

I couldn't load my nandroid backups, I had a Run nandroid-mobile.sh via adb instead.
Battery was almost full, sdcard had plenty of space, did not rename my files.
So after hours of googling and viewing this forum, I think I found a solution.
I found this guide. ( Couldn't post the link, but you should be able to find it in google )
But then I had another huge big wall in my way.
I was stuck at the mounting part, I can't mount it, it just says
mount: mounting /dev/block/mmcblk0p1 on /sdcard failed: No such file or directory.
Is there something missing I need to download?
Btw I'm using HTC HERO GSM.
Help would be SERIOUSLY appreciated.
Thanks.

I even formatted my SD Card...

Sorry the problem fixed by itself, how do I lock my own topic?

Related

[Q] SD Card will not mount in Nexus S

Attempting to partition sd card with ext4 -a process I completed multiple times successfully on a Nexus One, the process appeared to complete but now the phone will not mount the sd card. I've tried a wipe/reset, to no avail. I can still access and partition the sd card through adb, but the phone cannot mount it to format/partition, restore from recovery, partition sd-card from within ClockWork Recovery, nothing. I've re-partitioned the sd card through adb, which indicated a successful completion, but the phone still refuses to mount the sd card. If this weren't a Nexus S with it's cursed internal sd-card I would simply swap out the sd card with another or format it externally like all the google topics I pull up on the subject suggest.
Is this fixable or has the fused sd-card scenario become a liability?
Common Error messages:
Can't mount /sdcard
Can't mount /sdcard/.android_secure
Phone: Nexus S
Recovery Img: ClockworkMod Recovery 3.0.2.4
Rom: CM 7.0.3 (now wiped, cannot put back on since sd card won't mount)
fstab:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
Can mount everything except the last one, /sdcard.
I've attempted all: wipe/reset, format using clockwork, partition using clockwork, partition using adb, changing fstab, etc etc.
All topics I've found on the net end up being resolved by taking out the sd-card and formatting externally or using different card. i've had a N1 for well over a year and done far worse without problems, this phone seems to be very fragile for a 'developer' phone.
Jacks0n said:
Attempting to partition sd card with ext4 -a process I completed multiple times successfully on a Nexus One, the process appeared to complete but now the phone will not mount the sd card. I've tried a wipe/reset, to no avail. I can still access and partition the sd card through adb, but the phone cannot mount it to format/partition, restore from recovery, partition sd-card from within ClockWork Recovery, nothing. I've re-partitioned the sd card through adb, which indicated a successful completion, but the phone still refuses to mount the sd card. If this weren't a Nexus S with it's cursed internal sd-card I would simply swap out the sd card with another or format it externally like all the google topics I pull up on the subject suggest.
Is this fixable or has the fused sd-card scenario become a liability?
Common Error messages:
Can't mount /sdcard
Can't mount /sdcard/.android_secure
Phone: Nexus S
Recovery Img: ClockworkMod Recovery 3.0.2.4
Rom: CM 7.0.3 (now wiped, cannot put back on since sd card won't mount)
fstab:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
Can mount everything except the last one, /sdcard.
I've attempted all: wipe/reset, format using clockwork, partition using clockwork, partition using adb, changing fstab, etc etc.
All topics I've found on the net end up being resolved by taking out the sd-card and formatting externally or using different card. i've had a N1 for well over a year and done far worse without problems, this phone seems to be very fragile for a 'developer' phone.
Click to expand...
Click to collapse
Are you able to go with ADB through the directories?
and yeah, false Section! Q&A would be better
I am having the same issue. I actually just got my phone back from Samsung support (which is real ****ty) because the SD card started having I/O issues.
According to the ticket information they replaced the PCB.
Anyway, I immediately installed Clockwork recovery and transferred the latest Blandroid rom to the root of the SD card. No matter what I do I cannot mount the SD card from the recovery menu or format it from the recovery menu. Mounting USB storage works fine, though.
Hiya I got the same problem
Any salutation yet ?
Yeah. Don't format the internal storage with clockworkmod etc.
I have that issue I cant even open phone now
albundy2010 said:
Yeah. Don't format the internal storage with clockworkmod etc.
Click to expand...
Click to collapse
Hi The phone just stuck in boot logo I can patch iso file from adb though but I cant mount or even wipe devlink cache I dont know what to do ?
Did you ever get this resolved? If so, can you tell me how you did it?
Jouten said:
Did you ever get this resolved? If so, can you tell me how you did it?
Click to expand...
Click to collapse
1.power off...on it back...test it
2.plug your usb cable, boot into recovery..will heard usb sound from your PC, if does not work, try several times plug the usb untill you get usb sound...unplug, then reboot...
3.fresh install ROM...
Yeah, don't mess with the internal memory. I semi-bricked a Droid Incredible one time doing that. It ended up making all the internal partitions FAT. Took me hours to fix it. Be careful. I am afraid to even do it on my crespo4g. When I mount it in gparted running Linux Mint, the internal sd card showed up as not partitioned. I didn't even think about trying to partition it thinking back on the Incredible.
A solution, at least, for flashing/updating roms
Just happened to me, using CM9 after enabling the encryption I can't access the /data /sdcard paths. It would be nice to be able to read them but for me the biggest problem was how to update to the latest CM9 nighty.
In the end I've tricked the clockwork recovery to think the cache partition is the sdcard. I'll post the method in case someone find it useful.
1. Tranfer the update to the cache partition.
- Normally big enough, wipe it from the cwm if there is not enough space
adb push update-cm-9-20120305-NIGHTLY-crespo-signed.zip /cache/update.zip
2. Log into the phone and mount cache to sdcard.
adb shell
mount /dev/block/mtdblock4 /sdcard
3. Go into the cwm option to flash the uploaded package, it wont give you the mount error as we already mounted /sdcard
4. After the update log again and clear the update package, and unmount /sdcard
adb shell
rm /cache/update.zip
umount /sdcard
As long as you don't have to wipe you can continue updating and using your encrypted storage without much trouble
Help, internal storage not showing
Hi,
I wanted to go back from CM9 to Stock rom, but now I did something wrong (don't know what exactly) and my device is still on CM, but unable to access the internal storage. I cannot even take pictures or access it through CWM.
Any thoughts?
Hi i flash locky another CWR AND IT'S FIX LUCKY ME B^)
Sent from my Nexus S using xda app-developers app
getting SD card back
rellivisit said:
Hi,
I wanted to go back from CM9 to Stock rom, but now I did something wrong (don't know what exactly) and my device is still on CM, but unable to access the internal storage. I cannot even take pictures or access it through CWM.
Any thoughts?
Click to expand...
Click to collapse
I have had no luck using multiple methods to partition sd card with Nexus S. Each time I can view the modified fat32 partition from windows, add files etc, but cannot be recognised from within CWM recovery.
Left me unable to reflash roms etc.
The only thing which has worked for me is to use mini tool for windows and mount usb storage from recovery. Do a refresh from mini tool and it should come up in the list of drives. delete the partition(s) you find there (not your notebook ones of course), and reformat it as fat 32.
CWM>Advanced>Reboot recovery, move over your rom to the sd card, then try to find it in CWM, should now show up :fingers-crossed:

[Q] [RESOLVED!] Help! Recovery Can't Mount SD Card

Can't mount SD card in recovery. See http://bit.ly/LgBTUN.
Tried fix permissions, mount sdcard in recovery says Error mounting /sdcard, other stuff too. Still no go.
Found forum posts with same problem in several HTC phones but don't think the fix works for TF101.
I'd like to put the Megatron ROM on my TF101 though I'd be happy just to get ASUS upgrades. They keep failing - I think from my Dvorak keyboard mod (see device config below).
Any ideas?
TF101. Stock, rooted rom with modded key mapping for Dvorak keyboard when docked. Android Version 3.2.1. Kernel 2.6.36.3 [email protected] #1, Build Number HTK75.US_epad.8.6.5.19-20111107.
Can you still boot Android or did you already wipe?
I also see ROM manager, which is usually bad news for the TF...
That's a rather old recovery, if you can get ADB access you can try my PERI tool to reflash a newer recovery that should mount properly, and then flash a ROM with that.
Good luck!
First, thanks for the help.
I tried your tool. Besides having entertaining comments, it just left me frustrated.
You can see some screenshots at https://docs.google.com/open?id=0B46V3MQdpAUOek1GRGlvS0FKTms
I'm wondering if the problem is that I can't mount / as RW. Perhaps I'm just not getting the right args to adb's mount command. I think I should be able to remount / RW as I can run "adb shell" and then "su" to get the "#" prompt.
I do think part of the problem is that /sdcard is not actually my sdcard. It is a symlink to /mnt/sdcard which is where the physical sdcard is mounted.
I tried to modify init.ventana.rc. I think that is the right file - I just found it by poking my head around. This is what I wanted to change:
Code:
on early-init
mount debugfs debugfs /sys/kernel/debug
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
But I can't mount / RW so I can't change it. I tried this:
Code:
$ adb root
adbd cannot run as root in production builds
$
I'm definitely rooted. I can su to root in ADB. I also have a SuperUser that seems to be working.
Update: I can mount / RW via ES File Explorer. I can then adb shell, su, and then update files in /. I pushed my updated init.ventana.rc but when I rebooted it reverted to the original.
I'm terribly frustrated.
Any ideas? I seem to have a totally useless CWM. I can't even put a file on /sdcard/update.zip because the sdcard isn't booted when I'm in recover.
Once I get / mounted RW, can I just copy a working CWM into some system directory?
I've spent half my day messing around with this thing. I'm very comfortable with the command line and would happily do a manual install if someone could tell me how to do that.
I tried the adb equivalent of:
Code:
run_program("/sbin/busybox", "dd", "if=/tmp/recoveryblob", "of=/dev/block/mmcblk0p4");
using the 5.5 recoveryblob but it didn't seem to do anything. If I just knew the magic commands, I'd be happy to do them.
Hi there.
I just released the beta version of my EasyFlasher tool.
Try using that, it'll flash Rogue Recovery for you which should successfully mount the sdcard.
You may need to use that (It's Nvflash based) It won't work on a Tf101G or Sl101 though. Give it a shot.
PERI didn't work because your ADB drivers don't work.
Thanks for your help. I finally got a working CWM by following this thread. I then flashed the CWMs you pointed to.
Problem solved.
Though I can always f-up my upgrade to CM9 and be back here for help in a few hours.
Too Funny
I just posted my thanks reply and then noticed that you two pointed me to the solution that I found.
I appreciate your help and timeliness (and your nvflash program too).
Neil
Got my TF101 BK70 SBK1 in same situation and this thread helped me a lot.
Just put my tf into apx mode (hold up + power for 7 seconds, screen stays black but device manager can see APX device connected, then use Universal Naked drivers to fix it.
After that, just open EasyFlasher and choose which recovery you want.
I also had the same problem, I didn't see this thread so I used this workaround:
if you have the keyboard dock you can mount an external usb drive as the sdcard (under the mount options) and do all the backups/flashing from there
Sent from my Transformer using xda app-developers app
There are two sd cards, the internal sd card which is the phone's built-in USB storage, and external sd card which is the removable sd card that is physically located at the back of the phone and is sealed by your phone's battery.
so technically speaking you should be choosing the "choose zip from external sd card" based on how you described storing your rom.
I'm not sure as to why your sdcard is unmounted, but you can remount it back using CWM. There should be a "mounts and storage" section in CWM menu, where you can remount the internal USB storage by selecting "mount /sdcard".
If you want to recover the data in your Android phone, just go to http://android-recovery.net/.
Need help with this can't mount /sd card /
Here is what I am getting (pics). This is on the Tf101 with CWM via 1 click root method

[q] no internal storage

I flash with odin and make mistakes.
Flashed:
CSC in PDA
PDA in CSC
Click to expand...
Click to collapse
So everytime I entered recovery I get this kind of messages
E:failed to mount /data (No such file or directory)
E: failed to mount /sdcard (File exists)
E: copy_cache _media: Can't mount /sdcard
your storage not prepared yet,p lese use UI menu for format and reboot actions
E:failed to mount data (Invalid Argument)
Click to expand...
Click to collapse
And I get Bootlop on samsung logo (the second one)
Don't know why, none Roms managed to boot EXCEPT THIS ONE (CM7) http://forum.xda-developers.com/showthread.php?t=1527359
BUT I'm facing this bugs:
#No internal storage at all (It says 0 and can't install google play apps because it says that I have no free space)
#Reboot erase all config and apps installed. It takes the phone like it recently flashed the rom.
#EFS is missing (Have backup, restored, but the problem above makes all difficult)
I'm thinking that the /device files might be corrrupted. But I don't know how to solve this.
try flashing pit file
mehran 92 said:
try flashing pit file
Click to expand...
Click to collapse
Done it 3493493414 times.
jutopa said:
Code:
E:failed to mount /data (No such file or directory)
E: failed to mount /sdcard (File exists)
E: copy_cache _media: Can't mount /sdcard
your storage not prepared yet,p lese use UI menu for format and reboot actions
E:failed to mount data (Invalid Argument)
Click to expand...
Click to collapse
It looks like that the eMMC is not working, /sdcard and /data are on it.
I don't think the problem is due to the fact that you wrongly flashed the files. As long as you don't mess with bootloaders, things can most of the time be fixed.
It looks like an hardware failure, but I could be wrong. I've no ways to determine it.
Anyway, the eMMC is not the most important memory in our device, you can replace it with the external SD. There are several ways to do it, some users posted their solution here in the forum, this for example.
loSconosciuto said:
It looks like that the eMMC is not working, /sdcard and /data are on it.
I don't think the problem is due to the fact that you wrongly flashed the files. As long as you don't mess with bootloaders, things can most of the time be fixed.
It looks like an hardware failure, but I could be wrong. I've no ways to determine it.
Anyway, the eMMC is not the most important memory in our device, you can replace it with the external SD. There are several ways to do it, some users posted their solution here in the forum, this for example.
Click to expand...
Click to collapse
Yeah, I'm starting to think that.
I will try to swap SDs.
But I have a question. My main problem is that most of ROMS don't boot. Don't know why, but the only ROMs I managed to boot are CM7 and MIUI 2.3 also. Why this? If I try a different rom it gets stuck in bootloop or doesn't even install it at all.
If a swap sd would this limitation of roms will be solved? I mean, this swapping is permanent or it goes away every time I flash a new build????
jutopa said:
Yeah, I'm starting to think that.
I will try to swap SDs.
But I have a question. My main problem is that most of ROMS don't boot. Don't know why, but the only ROMs I managed to boot are CM7 and MIUI 2.3 also. Why this? If I try a different rom it gets stuck in bootloop or doesn't even install it at all.
If a swap sd would this limitation of roms will be solved? I mean, this swapping is permanent or it goes away every time I flash a new build????
Click to expand...
Click to collapse
I can't explain why CM7 is working, there could be several reasons (/cache is inside the OneNAND, it's using your SD card for /data etc...).
The changes for the swap are usually in the kernel ramdisk or /system and both of them are entirerly wiped during ROM updates, so you should do them on every ROM update.

fstab.qcom modification

I just got my first Android Device (Moto E) and tried to get around the small internal memory by using the sdcard instead of the internal memory for /data. As the KitKat mounting procedure does not seem to be based on vold.fstab anymore, the usual guides to doing that don't apply.
So my idea was to format the sdcard with ext4 and modify the /fstab.qcom file to mount the sdcard as /data instead of the internal data partition. But here's where I don't know how to proceed, as adb shell don't seem to have access to the proper partition during flashboot (though having mounted the rootfs parition which should contain those files?) and is unable to write to the file once the system is running.
I'd appreciate if anyone can point me in the right direction on how to do that.
lunaticat said:
I just got my first Android Device (Moto E) and tried to get around the small internal memory by using the sdcard instead of the internal memory for /data. As the KitKat mounting procedure does not seem to be based on vold.fstab anymore, the usual guides to doing that don't apply.
So my idea was to format the sdcard with ext4 and modify the /fstab.qcom file to mount the sdcard as /data instead of the internal data partition. But here's where I don't know how to proceed, as adb shell don't seem to have access to the proper partition during flashboot (though having mounted the rootfs parition which should contain those files?) and is unable to write to the file once the system is running.
I'd appreciate if anyone can point me in the right direction on how to do that.
Click to expand...
Click to collapse
A little late in the game (I am trying to do the same), but I come across this:
http://forum.xda-developers.com/showthread.php?t=443994
boot partition populates the rootfs. So hack the boot.img (unpack to analyze), and you may find your answer. Hope this helps.
I will give it a shot in the next week.

[Q] Move /data to SD card

I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Binero said:
I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Click to expand...
Click to collapse
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Jason Hyunwoo said:
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Click to expand...
Click to collapse
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Binero said:
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Click to expand...
Click to collapse
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Jason Hyunwoo said:
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Click to expand...
Click to collapse
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Binero said:
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Click to expand...
Click to collapse
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Jason Hyunwoo said:
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Click to expand...
Click to collapse
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Binero said:
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Click to expand...
Click to collapse
or you could edit look at other *.rc files!
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
sndsnd said:
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
Click to expand...
Click to collapse
I want to mount my sd card to my /data. That simply creates a symbolic link.
Jason Hyunwoo said:
or you could edit look at other *.rc files!
Click to expand...
Click to collapse
There is only 2 rc files, and one of them is specific to my recovery image.

Categories

Resources