Today (03312011) we've fixed a corrupted sdcard for real!
On your Phone:
1. parted /dev/block/mmcblk0
2. print and write down
3. delete all partitions
4. recreate partitions (see point 2)
5. format mmcblk0p1 with vfat
6. format mmcblk0p2 with ext4 (example: mke2fs -q -L data -b 4096 -m 0 -F /dev/block/mmcblk0p2)
7. reboot
Done on CyanogenMod 7.
Code:
* daemon not running. starting it now *
* daemon started successfully *
~ # umount /dev/block/mmcblk0p1
umount /dev/block/mmcblk0p1
umount: can't umount /dev/block/mmcblk0p1: Invalid argument
~ # umount /dev/block/mmcblk0p1
umount /dev/block/mmcblk0p1
umount: can't umount /dev/block/mmcblk0p1: Invalid argument
~ # umount /dev/block/mmcblk0
umount /dev/block/mmcblk0
umount: can't umount /dev/block/mmcblk0: Invalid argument
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
fdisk: can't open '/dev/block/mmcblk0': I/O error
~ # umount /dev/block/mmcblk0p1
umount /dev/block/mmcblk0p1
umount: can't umount /dev/block/mmcblk0p1: Invalid argument
~ #
:/
halp!
edit: I can manage to navigate the phone, i just cant execute some of these commands....
Nice job...now..someone with a i9000m and bad internal SD needs to try this to see if it fixes the issue...if so...we found our solution!
I have the corrupted SD card. Can't access from Android but I can mount it in ADB and all the files are there.
When I try this:
echo /dev/block/mmcblk0 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
or this:
$ dd if=/dev/zero of=/dev/mmcblk0p1
dd if=/dev/zero of=/dev/mmcblk0p1
dd: can't open '/dev/mmcblk0p1': Permission denied
I get permission denied...
Any other ideas?
risqu3 said:
Code:
* daemon not running. starting it now *
* daemon started successfully *
~ # umount /dev/block/mmcblk0p1
umount /dev/block/mmcblk0p1
umount: can't umount /dev/block/mmcblk0p1: Invalid argument
~ # umount /dev/block/mmcblk0p1
umount /dev/block/mmcblk0p1
umount: can't umount /dev/block/mmcblk0p1: Invalid argument
~ # umount /dev/block/mmcblk0
umount /dev/block/mmcblk0
umount: can't umount /dev/block/mmcblk0: Invalid argument
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
fdisk: can't open '/dev/block/mmcblk0': I/O error
~ # umount /dev/block/mmcblk0p1
umount /dev/block/mmcblk0p1
umount: can't umount /dev/block/mmcblk0p1: Invalid argument
~ #
:/
halp!
edit: I can manage to navigate the phone, i just cant execute some of these commands....
Click to expand...
Click to collapse
Looks like those devices aren't mounted, so you can't umount them.
type 'mount' to see a list of already mounted devices.
If the devices aren't mounted then you can skip onto the next step.
biochemgod said:
I have the corrupted SD card. Can't access from Android but I can mount it in ADB and all the files are there.
When I try this:
echo /dev/block/mmcblk0 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
or this:
$ dd if=/dev/zero of=/dev/mmcblk0p1
dd if=/dev/zero of=/dev/mmcblk0p1
dd: can't open '/dev/mmcblk0p1': Permission denied
I get permission denied...
Any other ideas?
Click to expand...
Click to collapse
You need to 'su' first.
OK, luckily I can still boot into Darkys ROM and su is there.
# dd if=/dev/zero of=/dev/mmcblk0p1
dd if=/dev/zero of=/dev/mmcblk0p1
/dev/mmcblk0p1: write error: No space left on device
349201+0 records in
349200+0 records out
178790400 bytes transferred in 22.746 secs (7860300 bytes/sec)
Is this error a problem?
OK, after: fat.format /dev/block/mmcblk0p1
"success to format"
damn, no change - still get the "damaged internal SD card" message.
must be some missing some mysterious Samsung-specific partition data. Can see the entire SD card through adb. Just can't mount it in Android.
Any other suggestions?
I did get the same problem a few weeks ago but after performing a format with in the settings menu it got fixed, will bookmark this thread though incase it happens again and regular format does not resolve it.
Code:
~ # mount /dev/block/mmcblk0p1
mount /dev/block/mmcblk0p1
mount: mounting /dev/block/mmcblk0p1 on /mnt/sdcard failed: I/O error
~ # fat.format /dev/block/mmcblk0p1
fat.format /dev/block/mmcblk0p1
Success to format
~ #
Still cant access it :/
risqu3 said:
Code:
~ # mount /dev/block/mmcblk0p1
mount /dev/block/mmcblk0p1
mount: mounting /dev/block/mmcblk0p1 on /mnt/sdcard failed: I/O error
~ # fat.format /dev/block/mmcblk0p1
fat.format /dev/block/mmcblk0p1
Success to format
~ #
Still cant access it :/
Click to expand...
Click to collapse
you should mount it via usb to your pc and format with windows.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
1. Flash Kernel with ADB-Support while at Recovery: h t t p://w w w.multiupload.com/3SVI4OBTD9
2. Boot into Recovery
3. adb shell
4. umount /dev/block/mmcblk0p1
5. umount /dev/block/mmcblk0p2
6. echo /dev/block/mmcblk0 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
7. In Windows simply right click the desired Device and format it. No Quickformat! Will take 2 Hours or more.#
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
theres no instruction which says "use fat.format"
Yeah but the problem is it cant umount because it returns
Code:
mount /dev/block/mmcblk0p1
mount: mounting /dev/block/mmcblk0p1 on /mnt/sdcard failed: I/O error
and
Code:
echo /dev/block/mmcblk0 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
doesn't seem to do anything as it never shows up in windows...
i think my phone is just downright screwed
First post here, hi all.
I am also having an SD Card issue on my Bell galaxy s ( have no external SD cards installed, only the 16GB internal).
History:
I upgraded from 2.1 (downloaded OCLF from Market, installed Insanity 0.93 and then to 0.94 (which has sataloop set to null under advance lagfix menu) and all was working great).
Then i decided to flash: SO_zImage_opt_ext_root_JPM-JP6_V4_2_OC.zip kernel (found here: http://forum.xda-developers.com/showthread.php?t=811660 ) via Odin and on reboot, i could not get past the galaxy S screen (buttons would stay lit).
In the clockwork recovery screen i got the message:
E: can't mount /dev/block/mmcblk0p1 (or /dev/block/mmcblk1p1)
No such file or directory
Error mounting /mnt/sdcard/!
Flashed to I9000UGJH2-PDA-Kernel-Bootloader-CL490514-Low.tar (stock ROM)
still unable to get past galaxy S screen (buttons would stay lit) and had the SD card error in recovery screen.
I ended up flashing with Eugene's Eugene_2E_JK2_Froyo.tar.md5 and pit 512 (did not check repartition)
and i am able to boot back into OS 2.2
However my SD card is showing blank or unrecognized format.
I have tried the steps in this thread and i am getting the following output in adb shell:
--------------------------------------------------------------
C:\Androidsdk\tools>adb shell
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
fdisk: can't open '/dev/block/mmcblk0': I/O error
~ # fdisk -l /dev/block/mmcblk0p1
fdisk -l /dev/block/mmcblk0p1
fdisk: can't open '/dev/block/mmcblk0p1': I/O error
~ # dd if=/dev/zero of=/dev/mmcblk0p
dd if=/dev/zero of=/dev/mmcblk0p
dd: writing '/dev/mmcblk0p': No space left on device
1+0 records in
0+0 records out
0 bytes (0B) copied, 0.000192 seconds, 0B/s
~ # dd if=/dev/zero of=/dev/mmcblk0p1
dd if=/dev/zero of=/dev/mmcblk0p1
dd: writing '/dev/mmcblk0p1': No space left on device
310337+0 records in
310336+0 records out
158892032 bytes (151.5MB) copied, 5.072773 seconds, 29.9MB/s
~ # umount /dev/block/mmcblk0p1
umount /dev/block/mmcblk0p1
umount: can't umount /dev/block/mmcblk0p1: Invalid argument
~ # umount /dev/block/mmcblk0p2
umount /dev/block/mmcblk0p2
~ # dd if=/dev/zero of=/dev/mmcblk0p2
dd if=/dev/zero of=/dev/mmcblk0p2
dd: writing '/dev/mmcblk0p2': No space left on device
1+0 records in
0+0 records out
0 bytes (0B) copied, 0.000159 seconds, 0B/s
~ # fat.format /dev/block/mmcblk0p1
fat.format /dev/block/mmcblk0p1
[pil/tfs4_posix_file_nand.c:278]Fail to read !!!
tfs4_format() fails(-5)
can not format rfs
Fail to format
~ # fat.format /dev/block/mmcblk0p2
fat.format /dev/block/mmcblk0p2
[pil/tfs4_posix_file_nand.c:278]Fail to read !!!
tfs4_format() fails(-5)
can not format rfs
Fail to format
~ #
------------------------------------------------
In clockwork recovery menu when trying to format the SD card i get the message:
E: Can't mount /dev/block/mmcblk0p1 (or /dev/block/mmcblk1p1)
(no such file or directory)
Error mounting /mnt/sdcard/!
Skipping format...
Done.
I can see the drives in Windows 7, but when i right click the drive to attempt to format it from windows i get the message: Please insert a disk into drive.
I am currently running Eugene_2E_JK2_Froyo and i tried formatting the SD card from within the phone menu but nothing actually happens, the SD card shows 0.00B of available space, if i try to download a market app i get the message not enough space.
Any suggestions?
Thx in advance!
Get it for repair... No joke nothing can be done sd card is partially dead . I got the.same problem
Sent from my GT-P1000M using XDA App
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
fdisk: can't open '/dev/block/mmcblk0': I/O error
I said "if partitiontable is ok go on".
Your partition table isn't ok.
-> Samsung support!
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
fdisk: can't open '/dev/block/mmcblk0': I/O error
so I guess it's back to bell right?
Question about FDISK:
Seems like I need su to execute fdisk. Problem is I can only give su permission from Android. Except in Android, I can't mount the sd - I can only mount it from within CWM. Does fdisk require the sd to be mounted?
I can mount and navigate the sd card using CWM and from adb (when CWM is running) just fine and access the files.
Is there no way to repair the partition table?
I'd be willing to offer a bounty for this, and I'm sure others would as well.
TIA
For those who have "Internal SD Damaged" at boot and mount error in recovery.
Try flashing JPC with repartition using 512 pit.
I did just that to fix my damaged internal SD.
Thanks StoneRoses - tried this many times with no luck.
Will try again just for fun. (back shortly)
................
OK, done - same error as before:
E:Can't mount /dev/block/mmcblk0p1
(I/O error)
E:copy_dbdata_media:Can't mount SDCARD:
:-(
I had the "Can't mount SD Card" issue, i tried a number of different combinations of flashing about 5 different firmwares (with variations of repartitioning, and not, etc.).
Nothing worked for me, couldn't mount in adb either. I finally sent it back via Bell (I bought my phone outright from T-Booth, I'm not a bell customer at all, was using unlocked on Rogers). They sent it back for me, but I am waiting to hear that they either have it back, or I have to pay more to get it fixed... We will see!
Currently trying to get this to work on my S2 and having issues.
My phone is running official KH3, CF-Rooted.
Using ubuntu.zip from here: http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-android/
This guide: http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
bootubuntu script:
Code:
#modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if ! test -d /data/local/ubuntu
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
#mknod /dev/loop1 b 7 0
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop7 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -o bind /proc $mnt/proc
mount -o bind /dev $mnt/dev
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop7
I get this error (after typing "sh bootubuntu"):
Code:
>adb shell
/ $ su
su
# cd /sdcard
cd /sdcard
# cd ubuntu
cd ubuntu
# sh ubuntu.sh
sh ubuntu.sh
modprobe: chdir(2.6.35.7-I9100XXKH3-CL479037): No such file or directory
←[H←[Jmkdir: can't create directory '/data/local/mnt': File exists
←[H←[Jchmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
eHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
# sh bootubuntu
sh bootubuntu
failed: No such file or directoryk3 on /system
bootubuntu: line 41: syntax error: unexpected end of file (expecting "then")
#
Any ideas?
I've been trying to load back track 5 on my nexus 10 and this is the error message that I get when I attempt to run bt5.
[email protected]:/ $
[email protected]:/ $ cd /sdcard/bt5
[email protected]:/sdcard/bt5 $ su
[email protected]:/storage/emulated/legacy/bt5 # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/bt5/backtrack.img
Checking loop device... MISSING
Creating loop device... OK
mount: mounting /storage on /data/local/mnt/external_sd failed: Invalid argument
No user defined mount points
net.ipv4.ip_forward = 1
chroot: can't execute '/root/init.sh': No such file or directory
Shutting down Linux ARM
umount: can't umount /data/local/mnt/external_sd: Invalid argument
1|[email protected]:/storage/emulated/legacy/bt5 #
Can someone please help me with this?
Are you rooted?
I tried to boot backtrack on samsung galaxy s4 i9500 5.0.1
rooted and I installed BusyBox 1.24.1
but I got
on terminal emulator
==================
[email protected]:/ $ su
[email protected]:/ # cd sdcard
[email protected]:/sdcard # cd bt5
tmp-mksh: cd: /sdcard/bt5: No such file or directory
2|[email protected]:/sdcard #
==================
and I tried
==================
[email protected]:/ $ su
[email protected]:/ # cd storage/emulated/0/bt5
[email protected]:/storage/emulated/0/bt5 # sh bt
mkdir failed for /data/local/mnt, File exists
losetup: /sdcard/bt5/bt5.img: No such file or directory
mount: Device or resource busy
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
bt[23]: can't create /data/local/mnt/etc/resolv.conf: No such file or directory
bt[24]: can't create /data/local/mnt/etc/resolv.conf: No such file or directory
bt[25]: can't create /data/local/mnt/etc/hosts: No such file or directory
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
chroot: can't execute '/bin/bash': No such file or directoryShutting down BackTrack ARM
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
losetup: /dev/loop7: Device or resource busy
1|[email protected]:/storage/emulated/0/bt5 #
==================
please help me
I've like to know more in general about how to run strace and debug errors in the general.
Specifically, my device was having issues and I saw errors like these in the logs.
Code:
2016-03-15 02:46:37,ERROR,QC-QMI,com.android.sdm.plugins.diagmon,linux_qmi_qmux _io_wake_unlock: Err in writing wakelock=qmuxd_port_wl_0, error [1: eek: operation not permitted]
I flashed factory images for mhc19i. With my only mods being twrp 3.0.0.1 and su 2.67, I'm seeing a lot of these qmuxd errors.
Code:
03-26 17:37:09.597 512 512 E QC-QMI : qmuxd: RX on fd=16 returned error=0 errno[2:No such file or directory]
03-26 17:37:09.598 512 512 E QC-QMI : QMUX qmux_client_id=4a not found in qmux client list, unable to remove
I'm really curious what is going on with this and I'd like to learn how to dig deeper. I tried running strace on the pid, but it wouldn't find a process using the number from logcat and qmuxd wasn't listed when I ran ps. I tried stop stopping ril-daemon and qmuxd and using strace to run qmuxd as directed in an old post.
Code:
1|[email protected]:/ $ strace -ff -v -o /sdcard/straceqmuxd -s 256 /system/bin/qmuxd
strace: Can't stat '/system/bin/qmuxd': Permission denied
1|[email protected]:/ $ su strace -ff -v -o /sdcard/straceqmuxd -s 256 /system/bin/qmuxd
sush: sush: - : unknown option
Can anyone point out where I'm going wrong or where I can learn how to troubleshoot these things?