[Xpost from Q&A] Can't delete, flash, wipe atrix

sjbayer3

Senior Member
Jan 30, 2009
237
9
0
I am using the latest CWM Touch, I tried flashing the non-touch version but as I described before it appears to flash fine, but when I open recovery its still the touch version.

I have had luck with deleting some things on my internal card through ADB. Is there any way I can wipe through adb, or try to repair my internal card from ADB?

I guess, is there any way to mount the internal drives like /data /cache and try to repair them, or reformat them through adb or windows file manager?

(as a side note this hsows the internal storage http://www.ifixit.com/Teardown/Motorola+Atrix+4G+Teardown/4964/2)
 
Last edited:

sjbayer3

Senior Member
Jan 30, 2009
237
9
0
Another update,

Using ADB shell, I ran "parted" and "print" to look at the internal card:

Code:
parted /dev/block/mmcblk0p18
print
This revealed:

Code:
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0p18: 11.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

(parted)
Which means the internal card isn't showing anything. Is there a way to reformat this?

When I try to make a new partition I get an error:

Code:
Command (m for help): n
n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
1
First cylinder (1-351056, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-351056, default 351056):
Using default value 351056

Command (m for help): w
w
The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Invalid argument
I was getting instructions from this thread: http://forum.xda-developers.com/showthread.php?t=1806059 and http://android.bytearrays.com/android/how-to-partition-sd-card/
 
Last edited:

Tomicasta

Member
Dec 30, 2011
6
1
0
Another update,

Using ADB shell, I ran "parted" and "print" to look at the internal card:

Code:
parted /dev/block/mmcblk0p18
print
This revealed:

Code:
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0p18: 11.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

(parted)
Which means the internal card isn't showing anything. Is there a way to reformat this?
I tried to repart all mmcblk0p(number), but, when I save the changes, an error appears... For me, the partition table is complete, but, i can't do any changes on it..
i have windows 7, but i tried un 4 computers.. (xp, vista, and 7 32/64 bits) I use the same fastboot than before (that worked fine in many times) and now nothing.. I used scripts, tried Th3Bill's wiping tools, but nothing, i have the non-touch recovery cwm v5.0.2.7-atrix5
 

ravilov

Senior Member
Jan 26, 2010
2,219
1,344
0
localhost
You're all doing it wrong. You can't (re)partition mmcblk0p18 since it already is a partition. What do you think the p18 means? :p
So it's not at all surprising if parted shows no partitions on it, in fact it would be worrisome if it DID show some partitions.
 

Tomicasta

Member
Dec 30, 2011
6
1
0
You're all doing it wrong. You can't (re)partition mmcblk0p18 since it already is a partition. What do you think the p18 means? :p
So it's not at all surprising if parted shows no partitions on it, in fact it would be worrisome if it DID show some partitions.
sorry, i know that p18 it is a partition, i explained bad, i tried to delete the partitions in mmcblk0 , and recreate them, I tried to format them too, but with no luck...
Not with printed, but with other comands, I got this View attachment 1458742 , I tried to format or delete those partitions, and create them after.. but no luck..
 

ravilov

Senior Member
Jan 26, 2010
2,219
1,344
0
localhost
sorry, i know that p18 it is a partition, i explained bad, i tried to delete the partitions in mmcblk0 , and recreate them, I tried to format them too, but with no luck...
Not with printed, but with other comands, I got this View attachment 1458742 , I tried to format or delete those partitions, and create them after.. but no luck..
Yeah, you can't touch the partition table either. That's baked into the bootloader AFAIK.
Internal flash storage is very much unlike your normal everyday disk drive so don't think of it as such.

Ravilov, can you check out http://forum.xda-developers.com/showthread.php?t=1806059

It shows a good conversation that follows the commands I posted above and I think it shows that there is a way to wipe the partition using the commands.

I have found that cache and data seem to be having an issue when formatting.

Is there a way to fdisk or chkdsk on them?
Yeah, I've seen that thread but sadly I have nothing to recommend as I have no idea what's going on.
There is a badblocks utility on Linux, no idea if it's present on Android (either full OS or recovery), but if it is you can try using that.
 

upndwn4par

Inactive Recognized Developer
Jan 22, 2012
3,640
10,375
0
New Jersey
I am using the latest CWM Touch, I tried flashing the non-touch version but as I described before it appears to flash fine, but when I open recovery its still the touch version.

I have had luck with deleting some things on my internal card through ADB. Is there any way I can wipe through adb, or try to repair my internal card from ADB?

I guess, is there any way to mount the internal drives like /data /cache and try to repair them, or reformat them through adb or windows file manager?

(as a side note this hsows the internal storage http://www.ifixit.com/Teardown/Motorola+Atrix+4G+Teardown/4964/2)
I know you tried to flash a different recovery, but did you try with ROM Manager? You might get different results.

Also, did you try Th3Bill's wiping tools I posted? Might not work, but you are at the point you need to try everything.

I am not aware of any adb wiping or formatting commands.
 

ravilov

Senior Member
Jan 26, 2010
2,219
1,344
0
localhost
If literally everything else fails, you can try using dd. You use it like this, either from the terminal or (preferrably) adb shell:
Code:
dd if=/dev/zero of=/dev/block/mmcblk0p[b]XX[/b]
XX is the partition number. Here are some popular partitions:
10 - recovery
11 - boot
12 - system
13 - osh/vendor/webtop
15 - cache
16 - data
17 - preinstall
18 - internal storage (EMMC)
The dd command, when used in this way, will (or at least should) wipe the entire filesystem, filling the whole partition with zeros.
Now if even this doesn't work, then it is VERY likely your internal flash drive is just fried in some way.
 
Last edited:

boonemeat

Senior Member
Aug 1, 2010
231
116
0
If literally everything else fails, you can try using dd. You use it like this, either from the terminal or (preferrably) adb shell:
Code:
dd if=/dev/zero of=/dev/block/mmcblk0p[b]XX[/b]
XX is the partition number. Here are some popular partitions:


The dd command, when used in this way, will (or at least should) wipe the entire filesystem, filling the whole partition with zeros.
Now if even this doesn't work, then it is VERY likely your internal flash drive is just fried in some way.
Tried wiping a couple partitions with this method including system and it still booted up to the same rom. I think the phone is done for. Plus all of the sudden the digitizer is failing as well. Everything is getting worse, force closes up the wazoo and just all around funky behavior. Another guy posted in the q and a about his emmc being messed up after using one of the ICS leak roms. Is this possibly why they cancelled the update!??
 

sjbayer3

Senior Member
Jan 30, 2009
237
9
0
Tried wiping a couple partitions with this method including system and it still booted up to the same rom. I think the phone is done for. Plus all of the sudden the digitizer is failing as well. Everything is getting worse, force closes up the wazoo and just all around funky behavior. Another guy posted in the q and a about his emmc being messed up after using one of the ICS leak roms. Is this possibly why they cancelled the update!??
Its really strange that you are having the EXACT same problem as me, cannot wipe or change anything... digitizer failing along the left side (not the edge, but middle left)

I am gonna try the "dd" command, but I assume it wont work since... we have done all the same things and neither of us had any success so far.
 

sjbayer3

Senior Member
Jan 30, 2009
237
9
0
Well, I tried the DD commands and the same result. It still boots up into the phone, and nothing appears to be deleted.

It's almost as if we have READ ability, but not WRITE ability. You would think if I couldn't wipe the /data or /cache, it wouldn't boot, but it is reading those partitions. Its just not able to write to them, or to wipe them.
 

coolnow

Senior Member
Dec 4, 2010
247
93
0
Manchester
The people who seem to have the same problem WITHOUT any hardware defects (such as digitizer failing): does your CWM mess up when mounting /emmc/ and then trying to write to it?

When i mounted my EMMC partition, i could see everything on it and copy my important stuff off. I then tried to copy a new rom.zip and it froze at 20MB copied and locked up my laptop before i yanked the cable, then it made sure to tell me an I/O error occured. I think i know that ;)
No matter what i do on the phone, after failing to write to emmc once, i couldn't read nor write (nor format) the internal storage via my computer, but a reboot of the phone fixed that because i could see my contents again. Also, anything i did to the internal storage (e.g delete a file) would not actually delete it. Moral of the story: you'll be rebooting the phone a lot.

After that, CWM would not touch my EMMC, nor would it write to any other partition unless i rebooted the phone first (e.g after mounting and unmounting EMMC, i couldn't wipe /data/, but after a fresh reboot, i wiped /data/ first thing and it worked.) After i wiped /cache, /data, /system and all of them wiped without problems, i knew it was just my emmc partition that was causing all this. I rebooted and mounted emmc again.

The steps i did with Diskpart are here: http://forum.xda-developers.com/showpost.php?p=33748230&postcount=6

What i basically did was clean the emmc partition and build a fresh one using the disk management tool. However, CWM still didn't play nice but at least the lockups on my laptop went away. I then used an SD card and copied a rom onto it and used it in CWM to flash a rom. Surprisingly, it worked. All partitions were wiped and flashed and the phone was rebooting!

After booting into android, i could still see internal storage at 0 bytes. It was still corrupted, but android informed me of that and offered to format it :D i let it happen and my internal storage problems have been fixed!
 
  • Like
Reactions: sjbayer3

sjbayer3

Senior Member
Jan 30, 2009
237
9
0
The people who seem to have the same problem WITHOUT any hardware defects (such as digitizer failing): does your CWM mess up when mounting /emmc/ and then trying to write to it?

When i mounted my EMMC partition, i could see everything on it and copy my important stuff off. I then tried to copy a new rom.zip and it froze at 20MB copied and locked up my laptop before i yanked the cable, then it made sure to tell me an I/O error occured. I think i know that ;)
No matter what i do on the phone, after failing to write to emmc once, i couldn't read nor write (nor format) the internal storage via my computer, but a reboot of the phone fixed that because i could see my contents again. Also, anything i did to the internal storage (e.g delete a file) would not actually delete it. Moral of the story: you'll be rebooting the phone a lot.

After that, CWM would not touch my EMMC, nor would it write to any other partition unless i rebooted the phone first (e.g after mounting and unmounting EMMC, i couldn't wipe /data/, but after a fresh reboot, i wiped /data/ first thing and it worked.) After i wiped /cache, /data, /system and all of them wiped without problems, i knew it was just my emmc partition that was causing all this. I rebooted and mounted emmc again.

The steps i did with Diskpart are here: http://forum.xda-developers.com/showpost.php?p=33748230&postcount=6

What i basically did was clean the emmc partition and build a fresh one using the disk management tool. However, CWM still didn't play nice but at least the lockups on my laptop went away. I then used an SD card and copied a rom onto it and used it in CWM to flash a rom. Surprisingly, it worked. All partitions were wiped and flashed and the phone was rebooting!

After booting into android, i could still see internal storage at 0 bytes. It was still corrupted, but android informed me of that and offered to format it :D i let it happen and my internal storage problems have been fixed!
I am going to try this.

However, when I reboot into recovery, how do I get diskpart (aka windows) to see my phones partitions?
 

coolnow

Senior Member
Dec 4, 2010
247
93
0
Manchester
I am going to try this.

However, when I reboot into recovery, how do I get diskpart (aka windows) to see my phones partitions?
Go to Mounts and Storage in recovery and go right down to "mount usb". Don't try to copy anything onto the internal partition as it should lock it up and you'll have to reboot phone again. When internal storage shows up in Windows then you can carry on with the diskpart stuff :good:
 
  • Like
Reactions: sjbayer3

sjbayer3

Senior Member
Jan 30, 2009
237
9
0
Okay, so in "Mounts and Storage" the only item mounted is /cache, but you are saying to not adjust which are mounted/unmounted here and go straight to bottom and click mount USB storage.

I think this is loading just my external SD card:

DISKPART> list disk

Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 119 GB 0 B
Disk 1 Online 7177 MB 0 B
Disk 2 No Media 0 B 0 B

where my external sd card is about 7 GB
 

coolnow

Senior Member
Dec 4, 2010
247
93
0
Manchester
Okay, so in "Mounts and Storage" the only item mounted is /cache, but you are saying to not adjust which are mounted/unmounted here and go straight to bottom and click mount USB storage.

I think this is loading just my external SD card:

DISKPART> list disk

Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 119 GB 0 B
Disk 1 Online 7177 MB 0 B
Disk 2 No Media 0 B 0 B

where my external sd card is about 7 GB
Take your SD card out for now. You'll need it later.

Try doing the same thing, is anything showing? If not, then mount emmc and then try mounting USB, but that shouldn't be necessary because it shows up just when i mount usb.

If it doesn't show up, reboot the phone (still without SD) and then mount storage.
 

sjbayer3

Senior Member
Jan 30, 2009
237
9
0
Take your SD card out for now. You'll need it later.

Try doing the same thing, is anything showing? If not, then mount emmc and then try mounting USB, but that shouldn't be necessary because it shows up just when i mount usb.

If it doesn't show up, reboot the phone (still without SD) and then mount storage.
Interesting, when I try to "mount usb storage" it says

Code:
E: Unable to write to ums lunfile (No such file or directory)
This happens both if emmc is mounted or unmounted.

However, I CAN access EMMC from ADB. Is there a way to run these commands from there?

**Update**
I was just checking EMMC from ADB and it looks like I am not able to access it. God, I wish I could just find a way to format the whole thing somehow from ADB.
 
Last edited:

coolnow

Senior Member
Dec 4, 2010
247
93
0
Manchester
Interesting, when I try to "mount usb storage" it says

Code:
E: Unable to write to ums lunfile (No such file or directory)
This happens both if emmc is mounted or unmounted.

However, I CAN access EMMC from ADB. Is there a way to run these commands from there?

**Update**
I was just checking EMMC from ADB and it looks like I am not able to access it. God, I wish I could just find a way to format the whole thing somehow from ADB.
That message came up for me too but the partition still mounted on Windows. Strange... you sure nothing pops up in diskpart? The message will continue to occur until all these steps have been completed.
 

sjbayer3

Senior Member
Jan 30, 2009
237
9
0
When it gave me that error, it immediatly removed me from the "mount" page. Something is not letting the emmc drive mount.

Okay, here is the last thing I can try:

In parted I run "Check 1" on my partition:

Code:
check 1
Error: File system was not cleanly unmounted!  You should run e2fsck.  Modifying an unclean file system could cause severe corruption.
Ignore/Cancel? I
I
Error: File system has an incompatible feature enabled.  Compatible features are has_journal, dir_index, filetype, sparse_super and large_file.  Use tune2fs or debugfs to remove features.
(parted)
Anyone know what this means, or if theres something I could to to start it over?