[Q] Factory reset issues - Nexus 7 Q&A, Help & Troubleshooting

I'm having some issues factory resetting my wife's Nexus 7.
The device has been running 4.4.0 for a while and was fine until it started boot lopping (gets to the lockscreen, sits there for a few seconds then eventually locks up and reboot).
It's completely stock (though I had it unlocked and rooted at some point).
I can get to bootloader mode but recovery shows "no command". I am sometimes able to bypass the error and get to recovery, full wipe did nothing.
I was able to get connected using Fastboot and tried wiping the device and returning it to stock using a factory image.
Everything appears to run correctly but when the device restarts nothing has been wiped and the rebooting issue remains.
I've tried to load a temp custom recovery (twrp) and it does load into it. I then tried to use the wipe feature within twrp but then again nothing really gets wiped.
At this point I'm not entirely sure what else to try to wipe it and reload.
I can only fastmode - adb doesn't work unless i flash the temp custom recovery which doesn't seem to help me do anything.

When you softboot a recovery, are you able to mount any filesystems (/cache, /system, /data)?
e.g. using adb check to see what is mounted
Code:
C:\bleh> adb shell cat /proc/mounts
do any of them (/cache, /system, /data) that are already mounted indicate that they are mounted read-only?
for each filesystem (in /cache, /system, /data) that are not mounted, try mounting them "by hand"
e.g. /data partition
Code:
C:\bleh> adb shell mount /data
do any of these mount attempts fail? If not, repeat
Code:
C:\bleh> adb shell cat /proc/mounts
did any of them mount read-only (instead of rw as they should have)?
Now go and unmount them all
Code:
C:\bleh> adb shell umount /sdcard
C:\bleh> adb shell umount /data
C:\bleh> adb shell umount /system
C:\bleh> adb shell umount /data
Now go through each of these filesystems and check them manually with "e2fsck" (TWRP has this, I don't know about CWM). You will be checking the block devices mmcblk0p{3,4,{9|10}}.
NOTE:
Grouper /data partition -> mmcblk0p9
Tilapia /data partition -> mmcblk0p10
These checks do not alter anything (-n option):
Code:
C:\bleh> adb shell e2fsck -f -n /dev/block/mmcblk0p3
C:\bleh> adb shell e2fsck -f -n /dev/block/mmcblk0p4
C:\bleh> adb shell e2fsck -f -n /dev/block/mmcblk0p9 [b][color=red]( Grouper Only! )[/color][/b]
C:\bleh> adb shell e2fsck -f -n /dev/block/mmcblk0p10 [b][color=red]( Tilapia Only! )[/color][/b]
Any errors for any of these other than complaints about lost+found being missing?
All of the above are just sanity checks to see if the typical ext4 filesystems used by Android are being created correctly during the fastboot flashing operations you performed. This is not a solution; I will respond based on what you report.
You may also want to capture a kernel log of the soft-booted recovery, e.g.
Code:
C:\bleh> adb shell dmesg > soft-booted-recovery-kernel-log.txt
Post the above kernel log to pastebin or somewhere instead of putting it in this thread.
OK, your turn.

Here it is, log file attached.
>adb shell cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
/dev/block/mmcblk0p4 /cache ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,d
ata=ordered 0 0
>adb shell mount /data
>adb shell cat /proc/mounts
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
/dev/block/mmcblk0p4 /cache ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,d
ata=ordered 0 0
/dev/block/mmcblk0p9 /data ext4 rw,seclabel,relatime,user_xattr,acl,barrier=1,da
ta=ordered 0 0
>adb shell umount /sdcard
umount: can't umount /sdcard: Invalid argument
>adb shell umount /data
>adb shell umount /system
umount: can't umount /system: Invalid argument
>adb shell e2fsck -f -n /dev/blo
ck/mmcblk0p9
e2fsck 1.41.14 (22-Dec-2010)
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found. Fix? no
Inode 213776 was part of the orphaned inode list. IGNORED.
Inode 214478 was part of the orphaned inode list. IGNORED.
Inode 245302 was part of the orphaned inode list. IGNORED.
Inode 245303 was part of the orphaned inode list. IGNORED.
Inode 245305 was part of the orphaned inode list. IGNORED.
Inode 245311 was part of the orphaned inode list. IGNORED.
Inode 245343 was part of the orphaned inode list. IGNORED.
Inode 245344 was part of the orphaned inode list. IGNORED.
Deleted inode 277997 has zero dtime. Fix? no
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: -852836 -(884198--884199) +1228639 +(1256263--1256268
) -(1285498--1285501) -(1285514--1285515) +(1285529--1285530) -1293833 -1293860
+(1293862--1293872) +(1293885--1293886) -1937108
Fix? no
Free blocks count wrong for group #10 (8976, counted=9160).
Fix? no
Free blocks count wrong for group #13 (2049, counted=3073).
Fix? no
Free blocks count wrong for group #35 (16707, counted=16481).
Fix? no
Free blocks count wrong for group #37 (6352, counted=6355).
Fix? no
Free blocks count wrong for group #38 (6105, counted=6119).
Fix? no
Free blocks count wrong for group #41 (7987, counted=9016).
Fix? no
Free blocks count wrong for group #61 (2838, counted=2814).
Fix? no
Free blocks count wrong (1129965, counted=1163188).
Fix? no
Inode bitmap differences: -213776 -214478 -(245302--245303) -245305 -245311 -(2
45343--245344) -277997
Fix? no
Free inodes count wrong for group #26 (5659, counted=5658).
Fix? no
Free inodes count wrong for group #61 (539, counted=536).
Fix? no
Free inodes count wrong (854105, counted=859572).
Fix? no
/dev/block/mmcblk0p9: ********** WARNING: Filesystem still has errors **********
/dev/block/mmcblk0p9: 28903/883008 files (3.6% non-contiguous), 2395923/3525888
blocks

samw52000 said:
Here it is, log file attached.
...
Click to expand...
Click to collapse
I'll look at your kernel log in a little bit, but here's what sticks out.
1) Your userdata filesystem (mmcblk0p9) is corrupted - mildly. That shouldn't happen (although when it is bad you get pages and pages and pages of error output).
2) Your cache filesystem was mounted rw, but that doesn't necessarily mean that it was clean. You never ran a "e2fsck" check on either mmcblk0p3 or mmcblk0p4 (system and cache, respectively). Either that or they were clean and you didn't show the output. Which was it?
You should run the e2fsck checks on those as well and report back.
The recommendation that I will make for flashing the factory image is as follows:
1) Skip the bootloader flashing if you already have the matching bootloader version installed
2) Using fastboot, erase and format all three partitions cache, system, userdata:
Code:
fastboot erase cache
fastboot erase system
fastboot erase userdata **
fastboot format cache
fastboot format system
fastboot format userdata
** note this destroys all your data (but it sounds like you have either backed up your device or have moved beyond caring about this). I don't believe there is any reason for doing a fastboot erase of the boot partition (although I suppose if the bootloader understands "TRIM" behaviors, it would be possible that a "fastboot erase boot" operation changes the availability of pages in that partition for use in the wear-leveling free pool during subsequent writing operations. In the interest of safety, I would never allow the 4 sequential letters "boot" to appear in a "fastboot erase" command - to avoid accidentally doing something horrific like "fastboot erase bootloader". Better to simply skip erasing of the boot partition ("fastboot erase boot") than to run the risk of making a typing error and accidentally nuke the bootloader. (I don't even understand why the unlocked bootloader should allow erasure of the bootloader partition.)
3) Repeat the steps in my previous posts to check that the filesystems are being created cleanly by the fastboot format operation:
(3a) Soft-boot into a custom recovery and
Code:
umount /cache
umount /system
umount /data
e2fsck -f -n /dev/block/mmcblk0p3 [color=grey]# (system)[/color]
e2fsck -f -n /dev/block/mmcblk0p4 [color=grey]# (cache)[/color]
e2fsck -f -n /dev/block/mmcblk0p9 [color=grey]# (userdata [b][color=red]Grouper Only![/color][/b])[/color]
e2fsck -f -n /dev/block/mmcblk0p10 [color=grey]# (userdata [b][color=red]Tilapia Only![/color][/b])[/color]
They should all be clean, other than a complaint about lost+found being missing.
4) Now, perform the flashing of the factory boot.img & system.img - NOTHING ELSE. The important point here is to NOT FLASH "userdata.img" from the factory image.
Code:
fastboot flash system system.img
fastboot flash boot boot.img
5) Repeat the steps in my previous posts to check that the /system filesystem is clean, e.g.
Code:
umount /system
e2fsck -f -n /dev/block/mmcblk0p3
.
If everything is clean, go ahead and try booting the tablet into the normal OS
[Edit] I looked through your (recovery) kernel boot log.
I didn't see anything terribly unusual, except some indications of EXT4 filesystem repair. That shouldn't be happening, but could have been caused by:
- a kernel crash or maybe bootlooping
- you hard-crashing the device by holding the power button down > 15 seconds.
The good news is that I don't see anything unusual happening where the kernel reads the device partitioning information
---------- Post added at 10:53 AM ---------- Previous post was at 10:25 AM ----------
PS
I the post above - after step 3a - you can manually check to be sure that everything has really been erased from those three partitions by mounting each of /cache, /data, and /system, and then running a "df" command. The usage should be pretty close to 0% for all 3 of them.
BTW, I was a little sloppy above about giving the recovery terminal commands without prefixing them with "adb shell". I assumed that you know that you can just
Code:
adb shell
... (linux commands)
exit
with the custom recovery (soft-)booted, and then you will be sort of "logged in" to the device. You can tell the difference because of the command prompt you get. "Logged in" to the android device's recovery, it will be a "#" character. If you are on the PC you'll have the DOS/cygwin prompt, .e.g "C:\some-path-or-other>". You might already know that, but I thought I should mention it.

Man I truly appreciate the help!!!
Ok so this is what I've done:
>adb shell umount /cache
>adb shell umount /system
umount: can't umount /system: Invalid argument
>adb shell umount /data
>adb shell e2fsck -f -n /dev/block/mmcblk0p3
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p3: 1309/41664 files (2.1% non-contiguous), 158713/166400 blocks
>adb shell e2fsck -f -n /dev/block/mmcblk0p4
e2fsck 1.41.14 (22-Dec-2010)
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 16 has zero dtime. Fix? no
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Inode bitmap differences: -16
Fix? no
Free inodes count wrong (28336, counted=28335).
Fix? no
/dev/block/mmcblk0p4: ********** WARNING: Filesystem still has errors **********
/dev/block/mmcblk0p4: 16/28352 files (0.0% non-contiguous), 3666/113408 blocks
>adb shell e2fsck -f -n /dev/block/mmcblk0p9
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Device or resource busy while trying to open /dev/block/mmcblk0p9
Filesystem mounted or opened exclusively by another program?
>fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 0.016s]
finished. total time: 0.016s
>fastboot erase system
******** Did you mean to fastboot format this partition?
erasing 'system'...
OKAY [ 0.016s]
finished. total time: 0.016s
>fastboot erase userdata
******** Did you mean to fastboot format this partition?
erasing 'userdata'...
OKAY [ 0.031s]
finished. total time: 0.031s
>fastboot format cache
erasing 'cache'...
OKAY [ 0.031s]
formatting 'cache' partition...
Creating filesystem with parameters:
Size: 464519168
Block size: 4096
Blocks per group: 32768
Inodes per group: 7088
Inode size: 256
Journal blocks: 1772
Label:
Blocks: 113408
Block groups: 4
Reserved block group size: 31
Created filesystem with 11/28352 inodes and 3654/113408 blocks
sending 'cache' (9052 KB)...
writing 'cache'...
OKAY [ 1.625s]
finished. total time: 1.657s
>fastboot format system
erasing 'system'...
OKAY [ 0.031s]
formatting 'system' partition...
Creating filesystem with parameters:
Size: 681574400
Block size: 4096
Blocks per group: 32768
Inodes per group: 6944
Inode size: 256
Journal blocks: 2600
Label:
Blocks: 166400
Block groups: 6
Reserved block group size: 47
Created filesystem with 11/41664 inodes and 5415/166400 blocks
sending 'system' (12416 KB)...
writing 'system'...
OKAY [ 2.173s]
finished. total time: 2.204s
>fastboot format userdata
erasing 'userdata'...
OKAY [ 0.031s]
formatting 'userdata' partition...
Creating filesystem with parameters:
Size: 14442037248
Block size: 4096
Blocks per group: 32768
Inodes per group: 8176
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 3525888
Block groups: 108
Reserved block group size: 863
Created filesystem with 11/883008 inodes and 96825/3525888 blocks
sending 'userdata' (137526 KB)...
writing 'userdata'...
OKAY [ 26.130s]
finished. total time: 26.161s
Then I ran this again:
>adb shell umount /cache
>adb shell umount /system
umount: can't umount /system: Invalid argument
>adb shell umount /data
>adb shell e2fsck -f -n /dev/block/mmcblk0p3
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p3: 1309/41664 files (2.1% non-contiguous), 158713/166400 bloc
ks
>adb shell e2fsck -f -n /dev/block/mmcblk0p4
e2fsck 1.41.14 (22-Dec-2010)
Warning: skipping journal recovery because doing a read-only filesystem check.
Pass 1: Checking inodes, blocks, and sizes
Deleted inode 16 has zero dtime. Fix? no
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Inode bitmap differences: -16
Fix? no
Free inodes count wrong (28336, counted=28335).
Fix? no
/dev/block/mmcblk0p4: ********** WARNING: Filesystem still has errors **********
/dev/block/mmcblk0p4: 16/28352 files (0.0% non-contiguous), 3666/113408 blocks
>adb shell e2fsck -f -n /dev/block/mmcblk0p9
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Device or resource busy while trying to open /dev/block/mmcblk0p9
Filesystem mounted or opened exclusively by another program?
>fastboot flash system "c:\users\...\data\Factory_Images\nakasi-kot49h-factory-5e9db5e1\image-nakasi-kot49h\system.img"
erasing 'system'...
OKAY [ 0.016s]
sending 'system' (625382 KB)...
OKAY [ 75.438s]
writing 'system'...
OKAY [ 27.602s]
finished. total time: 103.055s
>fastboot boot "c:\users\...\data\Factory_Images\nakasi-kot49h-factory-5e9db5e1\image-nakasi-kot49h\boot.img"
downloading 'boot.img'...
OKAY [ 0.609s]
booting...
OKAY [ 0.031s]
finished. total time: 0.641s
Device automatically restarted here - same thing happened, my wallpaper was still up as if nothing had happened.
C:\Users\Sam Wagner\Desktop\Nexus 7 Toolkit\data>adb shell umount /system
umount: can't umount /system: Invalid argument
>adb shell e2fsck -f -n /dev/block/mmcblk0p3
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p3: 1309/41664 files (2.1% non-contiguous), 158713/166400 blocks
Now the tablet will still boot to the lock screen and shows the wallpaper that's been set before... Sticks there for a few seconds then restarts.
I'm just not understanding why it would tell me that it's deleted stuff but isn't doing any of it.
Also like I mentioned before the stock recovery shows "no command" every time I tried to load into it - I've managed to get past this to the second where you can select the full factory wipe but as everything else it didn't wipe anything.

I guess I would like to see some unambiguous evidence that there really are still files present after erasing the partitions and doing the format (but before flashing the boot.img and system.img files).
That is
fastboot erase cache
fastboot erase system
fastboot erase userdata
fastboot format cache
fastboot format system
fastboot format user data
fastboot boot your-custom-recovery-image.img
(... custom recovery boot completes... )
adb shell mount /system
adb shell mount /data (will fail if already mounted)
adb shell mount /cache (will fail if already mounted )
(... and finally ...)
adb shell df /system /data /cache
or if you please you could do
adb shell ls -ld /data/*
adb shell ls -ld /system/*
adb shell ls -ld /cache/*
both /data and /system should be empty; /cache might have a few files from activity in the custom recovery.
Or at least that's the way it *should* behave.
PS The "no command" message displayed by the stock recovery is normal.

Tried that and it appears that the format commands do process but they don't appear to be deleting anything again.
>fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 0.016s]
finished. total time: 0.016s
>fastboot erase system
******** Did you mean to fastboot format this partition?
erasing 'system'...
OKAY [ 0.016s]
finished. total time: 0.016s
>fastboot erase userdata
******** Did you mean to fastboot format this partition?
erasing 'userdata'...
OKAY [ 0.031s]
finished. total time: 0.031s
>fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 0.016s]
finished. total time: 0.016s
>fastboot erase system
******** Did you mean to fastboot format this partition?
erasing 'system'...
OKAY [ -0.000s]
finished. total time: 0.016s
>adb shell mount /system
>adb shell mount /data
mount: mounting /dev/block/mmcblk0p9 on /data failed: Device or resource busy
>adb shell mount /cache
mount: mounting /dev/block/mmcblk0p4 on /cache failed: Device or resource busy
>adb shell df /system /data /cache
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/mmcblk0p3 655104 624356 30748 95% /system
/dev/block/mmcblk0p9 13881856 9229124 4652732 66% /data
/dev/block/mmcblk0p4 446488 7524 438964 2% /cache
When I ls the data partition I'm still seeing all the files and apps installed.
I'm not sure if there is a way to use the adb shell to format the partition (or maybe a recursive rm -f).
I'm also not entirely sure if it would actually do anything since it's not doing it in fastboot.
Like you mentioned at this point I'm not concerned about any of the data on the device as I do have backups. I just want to have it completely wiped and start from scratch.
Would having rooted the device at any point (and unlocked the bootloader) have anything to do with it?
I was running on Stock rooted for a while but then when my wife started to have problems with the device boot looping I ended up going back to stock (using the flash stock + unroot feature) and the "soft-bricked/bootloop" option).
I recall being able to side load 4.4.2 and everything seemed to work for a little while but it's doing the same thing now which makes me wonder if anything was actually fixed when I reloaded it last.
I did a complete wipe when I migrated to 4.4.0 which worked.

Same problem
Quite a few others have same "Read Only" problem I think.
I have tried everything. Seems to obey... but reverts to previous condition.
I reckon it is a hardware problem.
I've ordered a 2nd user motherboard for mine.
samw52000 said:
Tried that and it appears that the format commands do process but they don't appear to be deleting anything again.
>fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 0.016s]
finished. total time: 0.016s
>fastboot erase system
******** Did you mean to fastboot format this partition?
erasing 'system'...
OKAY [ 0.016s]
finished. total time: 0.016s
>fastboot erase userdata
******** Did you mean to fastboot format this partition?
erasing 'userdata'...
OKAY [ 0.031s]
finished. total time: 0.031s
>fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 0.016s]
finished. total time: 0.016s
>fastboot erase system
******** Did you mean to fastboot format this partition?
erasing 'system'...
OKAY [ -0.000s]
finished. total time: 0.016s
>adb shell mount /system
>adb shell mount /data
mount: mounting /dev/block/mmcblk0p9 on /data failed: Device or resource busy
>adb shell mount /cache
mount: mounting /dev/block/mmcblk0p4 on /cache failed: Device or resource busy
>adb shell df /system /data /cache
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/mmcblk0p3 655104 624356 30748 95% /system
/dev/block/mmcblk0p9 13881856 9229124 4652732 66% /data
/dev/block/mmcblk0p4 446488 7524 438964 2% /cache
When I ls the data partition I'm still seeing all the files and apps installed.
I'm not sure if there is a way to use the adb shell to format the partition (or maybe a recursive rm -f).
I'm also not entirely sure if it would actually do anything since it's not doing it in fastboot.
Like you mentioned at this point I'm not concerned about any of the data on the device as I do have backups. I just want to have it completely wiped and start from scratch.
Would having rooted the device at any point (and unlocked the bootloader) have anything to do with it?
I was running on Stock rooted for a while but then when my wife started to have problems with the device boot looping I ended up going back to stock (using the flash stock + unroot feature) and the "soft-bricked/bootloop" option).
I recall being able to side load 4.4.2 and everything seemed to work for a little while but it's doing the same thing now which makes me wonder if anything was actually fixed when I reloaded it last.
I did a complete wipe when I migrated to 4.4.0 which worked.
Click to expand...
Click to collapse

samw52000 said:
Tried that and it appears that the format commands do process but they don't appear to be deleting anything again.
>adb shell df /system /data /cache
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/mmcblk0p3 655104 624356 30748 95% /system
/dev/block/mmcblk0p9 13881856 9229124 4652732 66% /data
/dev/block/mmcblk0p4 446488 7524 438964 2% /cache
When I ls the data partition I'm still seeing all the files and apps installed.
Click to expand...
Click to collapse
Ugh. Well, you gave it a try. But that does seem to strongly implicate the hardware.
samw52000 said:
I'm not sure if there is a way to use the adb shell to format the partition (or maybe a recursive rm -f).
I'm also not entirely sure if it would actually do anything since it's not doing it in fastboot.
Click to expand...
Click to collapse
There is the utility mke2fs in the recovery. But yeah, If the bootloader can't write it seems highly unlikely that the linux kernel would be able to.
The only other moon-shot-odds thing I can think of (which is admittedly extremely far fetched) is that somehow the "persistent state" managed by the bootloader has some kind of read-only toggle in it (something like a software test mode?) that got flipped, and erasing all partitions in the device plus the bootloader before immediately re-flashing the bootloader** could change something. The worst case conclusion of this kind of activity would be a harder bricking, but it sounds like the hardware is written off already. More likely, the fastboot operations would act just the same (read-only but no errors thrown), and you would never really change *anything* on the tablet. (The only way to tell if it succeeded might be to flash a different bootloader version than the one presently on the tablet as it display's it's version number on the fastboot splash screen) As I said though, this is a pretty wild idea, and frankly the chances that the entire eMMC flash chip went read-only in totality is a far simpler explanation.
Sux that your wife's personal info is going to enter a wastestream of undetermined disposition. Puts someone with a legitimate warranty claim concerning hardware in the awkward position: "destroy the memory chip now and lose my warranty - or throw my personal information into the wind in order to claim my warranty?".
Sorry.
** I'm not recommending that anybody willy-nilly erases and reflash their bootloader; it is just too dangerous. It should be regarded as last-ditch move of desperation - which is where the OP is now. Perhaps the erasure of all partitions at once allows the eMMC chip to rotate flash pages out of (and thus other pages in the device into) the bootloader partition as part of device-wide wear leveling?
But because I brought it up, I should oblige myself to state the following safety measures when bootloader flashing is performed manually:
- phone/tablet battery is fully charged (& even better if the fastboot/adb PC is a laptop w/ a working battery)
- verify the length and MD5/SHA-1 signatures of all flashable image files before beginning
- make absolutely certain that no power loss or rebooting of the device will occur between the time the "fastboot erase bootloader " command and the "fastboot flash bootloader bootloader-image-file.img" commands are performed. (The most obvious way to insure this is to perform them back-to-back, the flash performed straight away after the erase).
- the behaviors of the new bootloader don't take effect until a hardware reset, so the moment of truth after flashing a new bootloader is the command:
fastboot reboot-bootloader
.

Has anyone ever successfully resolved this? I am having the exact same issue as the OP and have tried everything I can think of. It seems like the partitions and bootloader are somehow write-protected; preventing data from being wiped or new data flashed.
Help!
Sent from my iPhone using Tapatalk

I haven't yet... Pretty much wrote the device off but will try the last recommendation as a last try soon just not hoping for much!

still no luck... last ditch was to wipe the bootloader and reload. Same thing happens.
I tried to even let the device drain completely to see if this would somehow help clear the storage... i guess i would have to wait many years for that to really happen
o well, I ordered a 2013 16GB model... hopefully it won't be an issue with that one.
The old one will likely go up on ebay for parts (less the memory modules that I'll likely remove).

Related

[Q] Semi-soft hard non-brick - just looking for ideas

Anyway, I was using Miui V3 2.4.20 [2.6.35], and Google maps wasn't very happy with it. So I decided it was time to move on to the .32 kernal version, since the developer was going that way too. Downloaded a stock rom with .32 kernal, went to the pink screen and flashed, and then boot loop.
Luckily, I'm awesome, so my phone won't die on me. Tried flashing some roms through clockwork, no bootloop, just stuck at huawei logo. Tried flashing some stock roms, and at about 98% done flashing it goes error. Some parts get flashed causing my recovery reverts to stock, but I'm still stuck at the huawei logo.
Also, in clockworkmod I get errors mounting data and emmc, so that might be a problem. Other partitions mount fine.
I'm sure I'll find a solution eventually, so there's no rush. I've been in similar situations before. Just wanted to see what other people had used for similar situations. So if you know of something that would help, please let me know.
Found these through search (I'll do a better search again later), i will try them tomorrow:
http://forum.xda-developers.com/showpost.php?p=18944228&postcount=4
http://forum.xda-developers.com/showthread.php?t=1683249
http://forum.xda-developers.com/showthread.php?t=1689469
http://forum.xda-developers.com/showthread.php?t=1682501
http://forum.xda-developers.com/showthread.php?t=1011527
After reading a lot of threads, attempting to flash a lot of roms (stock and others), replacing all kinds of images, and offering a sacrifice to the cellphone gods, still at the same problem:
To reiterate problem:
1) Stuck/reboots at Huawei logo
2) Flashing stock roms via pink screen never finish installing, get error message at ~95% finished (During install, unpacks fine)
3) Flashing roms via recovery say they installed, but still boot problem
4) This problem occurred while trying to downgrade from .35 to .32
My next step is to try using Linux to put the Dload folder on the internal SD card and try installing from there. I have a feeling it is related to the partitions having problems. I used both the "get back pink screen" and "data partition resize," maybe something went wrong with them that only appeared when I tried to go back to stock. I'll find out more when I install linux and can see if the partitions are OK or not.
I've always wanted to try linux, and now that my phone is broke I have found the motivation to do so. So a word of advice for people for people wanting to try linux but are too lazy to download the linux file: Soft-brick your phone, it gives you motivation.
UPDATE: I'm pretty sure my partition table is broke pretty bad. In adb shell, df gives me:
Filesystem Size Used Free
/dev 173M 64K 172M
/system 203M 200M 2M
/cache 127M 4M 123M
and that's it. No /HWUserData, /.cust_backup, /mnt/asec, /mnt/obb, or /data.
Would someone be as kind as to tell me how to fix the partition table? I've got a soldering iron, duct tape and super glue. Also, I'm not afraid to buy a "box" to do some Jtag stuff.
Anybody know what Blefish uses to format the phone memory? I read on his tumbler page and his github that he has altered the partition table (he split the /hwuserdata into three sections, which means he has the ability to create partitions) If I can get that tool, then I have a plan:
0) If my understanding is correct, the updates don't install because the needed partitions are missing, which causes an error. I guess the updates won't create partitions, just alter them.
1) Use the tool blefish used to setup the partition table as described in this thread: http://forum.xda-developers.com/showthread.php?t=1504488
2) Once the partitions are back, i should at least be able to get the blue screen, if I'm good, then I can put all right files in /dev/sdb1, which will get me the pink screen.
3) Using the blue/pink screen, I can install stock firmware, which should correct any problems that the partition table has. Maybe even install android.
4) Do the happy dance
5) ???
6) Profit
I've done my homework, searched the forums, made a plan, and cleaned my room. Someone please give me some feedback and at least let me know if I'm heading in the right direction.
typci said:
Anybody know what Blefish uses to format the phone memory?
Click to expand...
Click to collapse
I am using fdisk, the main partitioning tool for MBR table. You can check the table by doing fdisk /dev/block/mmcblk0 and then "p" which should print the current partition table. From there, you can also modify the partitions.
Sent from my U8800 using Tapatalk 2
Blefish said:
I am using fdisk, the main partitioning tool for MBR table. You can check the table by doing fdisk /dev/block/mmcblk0 and then "p" which should print the current partition table. From there, you can also modify the partitions.
Sent from my U8800 using Tapatalk 2
Click to expand...
Click to collapse
Awesome. I used to use fdisk back in the dos days, so I just need to brush up on my skills and learn the adb specifics. I really need to take the time to go learn all the commands associated with adb.
INTERESTING UPDATE: If I flash a rom with locked boot loader, I still get the pink screen but it doesn't work, i.e. I can't access the image folder via windows. If I flash a rom without a locked boot loader, pink screen works. Granted none of these roms actually fully flash, I still get the error near the end.
Fdisk = Permission denied, su = permission denied. Rooted boot image prevents me from getting into recovery, which means adb won't work. Any other way to get root? I'll try flashing a custom rom when I can get clockworkmod working again. For some reason I can't get recovery to load via vol+ & power.
Also something weird is going on. When it boots, it reboots once, then goes to stock recovery, tries to do a factory reset, gets errors on formating. Also in windows two removable disks appear, but I can access them. I take it that they represent the internal SD card and maybe the pink screen image folder partition. Tomorrow I'll try linux and see what happens.
UPDATE:
1) I can't use FDISK because SU won't work. I'm not sure how SU/root works on a software/partition bricked phone.
2) Rooted boot.img won't boot into recovery. SuperOneClick won't work because it can't find the data partition (probably because I don't have one).
3) I was going to try flashing a custom rom but for some reason I can't get clockworkmod working again. The phone will boot into stock recovery on it's own, after a couple of reboots. However, if I change the boot.img or recovery.img to anything else, it gets stuck at huawei logo or boot loop.
4) Unbuntu LiveCD won't work (says it can't find the kernal) even though I used the installer from the website and tried it both via cd and flash drive. Working on installing a dual-boot system now.
I'm really striking out here. Couple of questions if anyone would care to answer.
1) Besides recovery, how else can I establish an adb connection? Pink screen and huawei logo give me device not found.
2) Is there a root exploit available that doesn't require a data partition or is there a root exploit I can modify so it doesn't require a data partition? It's OK if it's a manual exploit, while I'm new with android/adb, I got plenty of experience with command prompt input from back in the dos days.
Also learned there is a HuaWei office in my town. Don't know what they do there, but if I don't make any progress after I couple more days, I'll go find out.
typci said:
UPDATE:
1) I can't use FDISK because SU won't work. I'm not sure how SU/root works on a software/partition bricked phone.
2) Rooted boot.img won't boot into recovery. SuperOneClick won't work because it can't find the data partition (probably because I don't have one).
3) I was going to try flashing a custom rom but for some reason I can't get clockworkmod working again. The phone will boot into stock recovery on it's own, after a couple of reboots. However, if I change the boot.img or recovery.img to anything else, it gets stuck at huawei logo or boot loop.
4) Unbuntu LiveCD won't work (says it can't find the kernal) even though I used the installer from the website and tried it both via cd and flash drive. Working on installing a dual-boot system now.
I'm really striking out here. Couple of questions if anyone would care to answer.
1) Besides recovery, how else can I establish an adb connection? Pink screen and huawei logo give me device not found.
2) Is there a root exploit available that doesn't require a data partition or is there a root exploit I can modify so it doesn't require a data partition? It's OK if it's a manual exploit, while I'm new with android/adb, I got plenty of experience with command prompt input from back in the dos days.
Also learned there is a HuaWei office in my town. Don't know what they do there, but if I don't make any progress after I couple more days, I'll go find out.
Click to expand...
Click to collapse
On pink screen, your device is just like any other mass storage device. So you can still use fdisk on ubuntu with the correct /dev/sdX path. You can also format the data/system/cache using other tools if you need to.
Sent from my U8800 using Tapatalk 2
Sweet, so I just need to get Unbuntu working. I still can't figure out why the live CD/flash drive didn't work. Oh, well. When I get off of work I'll get to installing the dual-boot system. Thanks for your help.
typci said:
Sweet, so I just need to get Unbuntu working. I still can't figure out why the live CD/flash drive didn't work. Oh, well. When I get off of work I'll get to installing the dual-boot system. Thanks for your help.
Click to expand...
Click to collapse
i actually understood nothing from your posts but i would like to congratulate you for being a user who does research before asking ppl something
and I gladly give you a bump
JaymzBond said:
i actually understood nothing from your posts but i would like to congratulate you for being a user who does research before asking ppl something
and I gladly give you a bump
Click to expand...
Click to collapse
Thanks. Unfortunately the project is on hold for a couple of days. My electric motorcycle has been having some problems and I've been repairing it. Also, I think I found out why linux wasn't working. Apparently the "alternative" downloads aren't useable as a live CD, which is why the kernal wasn't there. Anyway, it's been a great learning experience. Maybe after I "break" my phone enough times I'll learn enough to become a developer.
Doing some research before getting back to working on the phone.
Looks like Blefish is talking about using linux's fdisk, when I was trying to use adb's fdisk. That would certainly allow me to bypass the su problem with adb. I think I got all the correct files for my linux livecd, so that shouldn't be a problem. After I'm done with my workout, I'll try it out and see how it goes. It's time to learn how to use linux.
Update: Got unbuntu working. Storage devices are all /media instead of /dev like I was expecting. But I think I'm not looking in the right place.
Plugged in phone via pink screen and 3 drives came up:
System - has system stupp (app, bin, etc, fonts, ...) - sdb12
256 MB File system - image folder with all the .img and .mbn files - sdb1
136 MB File system - has fotapkg, lost+found, recovery folders- filesystem type ext3/ext4 - I'm not sure what this is, maybe sdb6? If it was data (sdb13) then I wouldn't get the error in recovery, If it was the internal SD card the filesystem should be vfat. If someone knows better, please let me know.
For some reason I don't have permission to access the lost+found folder, or so Unbuntu tells me.
Tried to used fdisk with system, got error: I don't know how to handle files with mode 40755
Also found some recovery log files in the fotapkg and recovery folders. I'll post it here incase someone can get some more useful information out of it. Does anyone know what all these (null) mean?
Tomorrow I'll get to work on learning how to use unbuntu and fdisk.
Starting recovery on Sun Jan 6 00:03:50 1980
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (480 x 800)
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null)
1 /boot vfat /dev/block/mmcblk0p1 (null)
2 /fat vfat /dev/block/mmcblk0p1 (null)
3 /cache ext4 /dev/block/mmcblk0p6 (null)
4 /data_pseudo ext4 /dev/block/mmcblk0p13 (null)
5 /misc emmc /dev/block/mmcblk0p7 (null)
6 /recovery vfat /dev/block/mmcblk0p1 (null)
7 /HWUserData vfat /dev/block/mmcblk0p14 (null)
8 /system ext4 /dev/block/mmcblk0p12 (null)
9 /sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
I:cmdline: console=ttyDCC0 androidboot.hardware=huawei androidboot.localproppath=hw/default androidboot.emmc=true androidboot.image=recovery androidboot.mode=user androidboot.baseband=msm
Ita_move_command_file
I:Got arguments from boot message
Command: "recovery" "--wipe_data" "--wipe_cache"
Formatting /cache...
Creating filesystem with parameters:
Size: 136314880
Block size: 4096
Blocks per group: 32768
Inodes per group: 4160
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 33280
Block groups: 2
Reserved block group size: 15
Created filesystem with 11/8320 inodes and 1585/33280 blocks
E:failed to mount /data_pseudo (No such file or directory)
E:failed to mount /data_pseudo (No such file or directory)
Formatting /data...
Need size of filesystem
E:format_volume: make_extf4fs failed on /dev/block/mmcblk0p13
E:failed to mount /data_pseudo (No such file or directory)
E:failed to mount /data_pseudo (No such file or directory)
Formatting /cache...
Creating filesystem with parameters:
Size: 136314880
Block size: 4096
Blocks per group: 32768
Inodes per group: 4160
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 33280
Block groups: 2
Reserved block group size: 15
Created filesystem with 11/8320 inodes and 1585/33280 blocks
Data wipe failed.
wipe internal sdcard fail.
It could be that the data partition (originally mmcblk0p13) got wiped out and now mmcblk0p13 is internal sd card. Here's the original partition table:
Code:
Disk /dev/block/mmcblk0: 3959 MB, 3959422976 bytes
1 heads, 16 sectors/track, 483328 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 30721 245760 b Win95 FAT32 CUST
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 * 30721 30783 500 4d Unknown SBL1
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 30783 31158 3000 46 Unknown TZ
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 31158 483328 3617363+ 5 Extended EBR
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 32769 34304 12288 59 Unknown OEMINFO/BOOTLOADER IMAGES
/dev/block/mmcblk0p6 40961 57600 133120 4c Unknown CACHE
/dev/block/mmcblk0p7 65537 65599 500 5a Unknown MISC
/dev/block/mmcblk0p8 73729 74112 3072 58 Unknown FSG?
/dev/block/mmcblk0p9 81921 82795 7000 50 Unknown ADSP
/dev/block/mmcblk0p10 90113 90496 3072 4a Unknown MODEM_ST1
/dev/block/mmcblk0p11 98305 98688 3072 4b Unknown MODEM_ST2
/dev/block/mmcblk0p12 106497 134656 225280 83 Linux SYSTEM
/dev/block/mmcblk0p13 139265 216064 614400 83 Linux USERDATA
/dev/block/mmcblk0p14 221185 483328 2097152 69 Unknown INTERNAL_SD
The sdb6 is indeed cache, and it is used for recovery communication between Android.
If everything would be ok, it would mount sdb1, sdb6, sdb12, sdb13 and sdb14 inside Ubuntu, so it seems that something is wrong at the end.
If you have 14 partitions, use disk utility from Ubuntu and try manually formatting the 13 for ext4 and 14 for vfat. Taking ownership is not needed, it should work either way.
Blefish, thanks for the help. Got unbuntu up and working along with fdisk and identified the phone.
I have 13 partitions (including one empty one) , not 14. Here's the print out:
[email protected]:~$ sudo fdisk /dev/sde
omitting empty partition (13)
Command (m for help): p
Disk /dev/sde: 3959 MB, 3959422976 bytes
1 heads, 62 sectors/track, 124729 cylinders, total 7733248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 1 491520 245760 b W95 FAT32
/dev/sde2 * 491521 492520 500 4d QNX4.x
/dev/sde3 492521 498520 3000 46 Unknown
/dev/sde4 498521 7733247 3617363+ 5 Extended
/dev/sde5 524288 548863 12288 59 Unknown
/dev/sde6 655360 921599 133120 4c Unknown
/dev/sde7 1048576 1049575 500 5a Unknown
/dev/sde8 1179648 1185791 3072 58 Unknown
/dev/sde9 1310720 1324719 7000 50 OnTrack DM
/dev/sde10 1441792 1447935 3072 4a Unknown
/dev/sde11 1572864 1579007 3072 4b Unknown
/dev/sde12 1703936 2154495 225280 83 Linux
Comparing with your partition table I see two differences:
1) the ending block of sde1 is 491520 on mine and on the original it is 30721, however the blocks are the same, so that is probably not a problem
2) sde13 is empty, and sde14 is missing.
This actually makes sense. When I was using MIUI, I reduced the size of the internal sd to near zero, since MIUI could only either the internal or external sd, not both. After trying to downgrade, I had a problem, so I tried to restore the internal sd card back to stock size, just to bring my phone back to stock. Something must have gone when I did that.
So if I understand the problem correctly, to fix this I need to:
1) Split sde13 into 2 partitions
2) Format sde13 to ext4 and sde14 to vfat
3) Try installing adroid again
Do I need to name the partitions a certain name or do anything else?
In the mean time I'll be looking into how to use disk utility and fdisk to deal with sde13 and sde14.
Had an idea that I only need sde13 (data) to get things working again, the system shouldn't need sde14 (internal sd) to work.
So I went to disk utility, found Qualcomm MMC storage and tried to format the free 2.9GB at the end. Got an error:
Error creating partition: helper exited with exit code 1: In part_add_partition: device_file=/dev/sde, start=1103101952, size=2856000000, type=0x83
Entering MS-DOS parser (offset=0, size=3959422976)
MSDOS_MAGIC found
looking at part 0 (offset 512, size 251658240, type 0x0b)
new part entry
looking at part 1 (offset 251658752, size 512000, type 0x4d)
new part entry
looking at part 2 (offset 252170752, size 3072000, type 0x46)
new part entry
looking at part 3 (offset 255242752, size 3704180224, type 0x05)
Entering MS-DOS extended parser (offset=255242752, size=3704180224)
readfrom = 255242752
MSDOS_MAGIC found
readfrom = 255243264
MSDOS_MAGIC found
readfrom = 255243776
MSDOS_MAGIC found
readfrom = 255244288
MSDOS_MAGIC found
readfrom = 255244800
MSDOS_MAGIC found
readfrom = 255245312
MSDOS_MAGIC found
readfrom = 255245824
MSDOS_MAGIC found
readfrom = 255246336
MSDOS_MAGIC found
readfrom = 1140842496
No MSDOS_MAGIC found
Exiting MS-DOS extended parser
Exiting MS-DOS parser
MSDOS partition table detected
containing partition table scheme = 1
got it
Error: Invalid partition table on /dev/sde -- wrong signature 0.
ped_disk_new() failed
So, my partition table is corrupt? I'll need to figure out how to fix this.
Here's some options I've found:
http://forum.xda-developers.com/showpost.php?p=21572216&postcount=12
ksatta mentions a couple of ideas:
1) If someone backed up their phone using dd, I could use that to restore my phone.
Here's a link on how to do it: http://linuxpoison.blogspot.com/2009/04/creating-backuprestore-images-using-dd.html
dd if=/dev/sdX | gzip > /home/sdX.bin.gz
where sdX is the U8800
2) I could clone someone's partition table. If someone could give me a copy of their MBR that should work.
Here's a link on how to do it: http://embraceubuntu.com/2005/10/20/backing-up-the-mbr/
Create a backup of your MBR by doing a:
dd if=/dev/sdX of=MBR-backup bs=512 count=1
That should read “create a disk dump of the input file, which is /dev/sdx (change to hda, or hdb or sda, depending on where the MBR is on your computer), and save it in the output-file MBR-backup in the directory from where the command is issued. Backup the first sector only, while you are at it”.
3) gparted - it's some kind of partition tool. Might be able to use it to fix the error. Not sure how to use it though.
For now I'm going to look into gparted for Ubuntu. If someone can help me out with a dd backup or cloning the partition table that would be awesome.
UPDATE: For people following this thread, and to keep me more organized, I'll start adding more of the important resources I find. They may one day help you fix your phone.
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/434463
Seems a guy fixed his the same error with gparted. However it wasn't on a phone. Also I'm seem a lot of people refer to sfdisk. I'll need to learn more about it.
https://answers.launchpad.net/ubuntu/+question/113539
"I got an answer in a forum, which looks easy.
Do a
sudo fdisk /dev/sda
then type
w
to write partition table, without any modification of it.
The signature should be fixed."
Is this safe to do to my phone? I know I'll have to write the MBR eventually, but I have to get it right the first time. If I screw up, I may not be able to connect to ubuntu anymore. Anyway, the guy said it fixed the error with his harddrive, so it's worth a try.
http://www.thegeekstuff.com/2010/09/linux-fdisk/
How to use fdisk, in case anyone needs to know
So my new plan is to:
1) dd Backup and MBR backup - in case I break it worse than it is
2) try to fix with fdisk w or gparted
I think the change in start and end is caused by Ubuntu using cylinders/sectors/blocks. Should not too much difference though.
Using MBR restore would not work here, as it restores the main 4 partitions list. MBR uses EBR aswell, which is located at the beginning of every extended partition. So we would have to copy the EBR of every partition.
I'd suggest deleting sde13, adding sde13 and sde14.
When adding sde13, note that starting block should be at the end of sde12, so simply insert last block of sde12 there. If it gives error, simply press enter as it automatically finds free block after the last one. End block could be for example +500M so fdisk automatically finds the correct end block. Do the same for sde14, but note the start block again. sde14 end block should be the last block there is on the card.
After you've done that, do w to write and if it tells you to restart or something, unplug the phone, take out the battery and restart to pink screen again. Then try to use disk utility again or gparted (have not tested this) to reformat sde13 and sde14 to ext4 and vfat.
You should be safe until you don't mess with the primary partitions, especially the mmcblk0p2 and mmcblk0p3.
Thanks again for the reply, Blefish. I may have just fixed it. I'll know soon enough.
I did two things:
1) sudo fdisk /dev/sde12 followed by w
2) sudo fdisk /dev/sde followed by w
After that it enabled me to add the 13 and 14 partition. I used disk utility so I didn't have to worry about the blocks. Afterwards they mounted in ubuntu like they should.
UPDATE: Not quite fixed, but the rom installed without error. So I think the partition problem is fixed.
Now I just have a boot loop. I'll go back to ubuntu, clear the cache, and try installing from the internal sdcard
2nd UPDATE: Stock recovery gives and error about mounting the cache partition. However CWM mounts it fine. My partition problems may not be over.
3rd UPDATE: genokolar's "Custom you partition" file to return to stock file deletes my partition 13 and 14. Had 13 and 14 back working, used the file as per instructions, afterwards ubuntu drive utililty shows 13 and 14 as "free." So that is where part of my problem comes from.
4th UPDATE: Fixed the problem with stock recovery. Turns out froyo doesn't like ext4 partitions. Changed cache partition to ext3, no more error.
Here are some exerts from the CMW log when I tried to flash cyanongen. Can anyone tell me if any of these errors are problems, and if they are what they mean?
W:Unable to get recovery.fstab info for /datadata during fstab generation!
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!
I:Checking for extendedcommand...
I:Skipping execution of extendedcommand, file not found...
failed to open /sys/class/android_usb/android0/state: No such file or directory
-- Installing: /sdcard/CM7-070512.zip
Finding update package...
I:Update location: /sdcard/CM7-070512.zip
Opening update package...
Installing update...
unmount of /system failed; no such volume
package_extract_file: no backup_initd.sh in package
set_perm: chown of /tmp/backup_initd.sh to 0 0 failed: No such file or directory
set_perm: chmod of /tmp/backup_initd.sh to 777 failed: No such file or directory
about to run program [/tmp/backup_initd.sh] with 2 args
run_program: execv failed: No such file or directory
run_program: child exited with status 1
Pass 5: Checking group summary information
/dev/block/mmcblk0p12: 11/56448 files (0.0% non-contiguous), 7142/225280 blocks
mount: failed to mount /dev/block/mmcblk0p12 at /system: Invalid argument
set_perm: chown of 0750 to 0 2000 failed: No such file or directory
set_perm: chmod of 0750 to 755 failed: No such file or directory
set_perm: chown of /system/etc/init.qcom.post_boot.sh to 0 2000 failed: No such file or directory
set_perm: chmod of /system/etc/init.qcom.post_boot.sh to 555 failed: No such file or directory
set_perm: chown of /system/xbin/apply_firewall to 0 0 failed: No such file or directory
set_perm: chmod of /system/xbin/apply_firewall to 6755 failed: No such file or directory
set_perm: chown of /system/xbin/apply_theme to 0 0 failed: No such file or directory
set_perm: chmod of /system/xbin/apply_theme to 6755 failed: No such file or directory
set_perm: chown of /system/xbin/dumplog to 0 0 failed: No such file or directory
set_perm: chmod of /system/xbin/dumplog to 6755 failed: No such file or directory
set_perm: chown of /system/xbin/mv2sd to 0 0 failed: No such file or directory
set_perm: chmod of /system/xbin/mv2sd to 6755 failed: No such file or directory
set_perm: chown of /system/xbin/ota to 0 0 failed: No such file or directory
set_perm: chmod of /system/xbin/ota to 6755 failed: No such file or directory
Updating BOOT Image...
about to run program [/tmp/backup_initd.sh] with 2 args
run_program: execv failed: No such file or directory
run_program: child exited with status 1
Installation complete!script result was [Installation complete!]
Install from sdcard complete.
failed to open /sys/class/android_usb/android0/state: No such file or directory
My phone is fixed. I have no idea how it became fixed, but it is fixed.
I placed b518 on the internal sd card, and installed it. Then bootloop. So I held both volume keys+power to try another rom. It installed again. Went to recovery, it did a factory reset. Bootloop. Went back to recovery to see if I could wipe the sd card. No option for it, so I did another factory reset and rebooted my phone. I left my phone bootlooping for a minute while I looked online for a Huawei service center, and then my phone booted. I gues it got scared and didn't want to go to a service center.
This been a great learning experience, although at times a major headaches. I want to thank blefish for all his help. Thanks to this, i've bee reading his blog and other stuff, and now will follow some of his other projects.
Now to downgrade back to 2.2!!!!
UPDATE: All official roms are working correctly (b136, b138, b518, b528), recovery (5.0.2.6) works. However I haven't been able to get a single custom rom to work. Tried a couple .32 MIUI and CM, but they all stick at the huawei logo. Did factory reset and dalvik wipe, get error can't mount /sd-ext during dalvik wipe, and still doesn't boot.
Maybe I need to try a newer verison of CWM? I tried the newer versions before, and I didn't like them. Buggy and often wouldn't find my sd card.
This thread must be made sticky because it consists of pure information about dealing with soft-bricks. Thanks a lot for your curiosity, you're my hero.

Localization of bad blocks?

Hello,
is there a (simple) way to get the location of the bad blocks, based on their hex address reported by mtty / info 8 ? Maybe without the need to install the ROM from scratch and save the log file?
...nobody?
i was wondering if my device has developed any bad blocks the other day. so the next time i had to restore my rom from a backup, i decided to look into it, using whatever steps/concepts i could remember.
i wanted to know which partition(s) had bad blocks, as opposed to a raw address that has to be interpreted later on. i remembered reading here that ClockworkModRecovery's "recovery.log" will contain this information when a partition or all partitions are formatted.
so i have a habit of formatting all partitions (except sd's FAT32) before i restore a backup. i did so and told CWM to copy the recovery.log to my sd's FAT32. perhaps you can use the same approach, i.e. take a CWM backup, then wipe all partitions, copy the recovery.log, and restore your backup. effectively, you will get your rom back just the way you left it and you will have determined if your device has bad blocks and how many and in which partitions.
then i continued with the restore.
when i had time later on, i opened the "recovery.log" i had copied earlier and noticed that it contained the following (notice the part in bold+underline below):
Code:
-- Wiping cache...
Formatting /cache...
Cache wipe complete.
rm: can't remove '/data/dalvik-cache': No such file or directory
rm: can't remove '/cache/dalvik-cache': No such file or directory
rm: can't remove '/sd-ext/dalvik-cache': No such file or directory
Dalvik Cache wiped.
-- Formatting boot...
Formatting /boot...
-- Formatting system...
Formatting /system...
-- Formatting data...
Formatting /data...
[U][B]mtd: erase failure at 0x09020000[/B][/U]
Formatting /sdcard/.android_secure...
I:Formatting unknown device.
rm: can't remove '.' or '..'
rm: can't remove '.' or '..'
-- Formatting cache...
Formatting /cache...
-- Formatting sd-ext...
Formatting /sd-ext...
mke2fs 1.41.12 (17-May-2010)
warning: 256 blocks unused.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=64 blocks, Stripe width=64 blocks
65664 inodes, 262144 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
8 block groups
32768 blocks per group, 32768 fragments per group
8208 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Writing inode tables: 0/81/82/83/84/85/86/87/8done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.6 (30-May-2009)
Setting default hash algorithm to tea (2)
All partitions formatted.
mtd: successfully wrote block at 0
I:Set boot command ""
mtd: successfully wrote block at 0
I:Set boot command ""
0+1 records in
0+1 records out
116 bytes (116B) copied, 0.002137 seconds, 53.0KB/s
dd: can't open '/tmp/fstypes': No such file or directory
so i guess that part means there is a bad block in my data partition...of course some other partitioning could make the bad block land in some other partition.
but what i remember reading here on xda is that the phone's internal NAND management avoids bad blocks until all "spare" blocks are used up. after that, software (i.e. ClockworkModRecovery) can mark blocks as bad at the filesystem level...so really nothing to worry about (i think!) unless there are so many bad blocks that you have to "expand" one or more partitions' sizes to compensate for the bad blocks.
i hope the above helps...!

[Q] Nexus 7 (2012) Stuck in a boot loop, recovery fails from being read only

Hi and thanks to anyone who decides to help me as my knowledge is limited.
I decided to flash KitKat as I play a WebView based game and thought the WebView Chromium of KitKat might make it run faster as it ran pretty slow. On the Paranoid Google+ page it says you need TWP 2.6 later and other sites say 2.6.x. I had 2.6.0.0, so did a backup of boot, data, system and recovery using TWRP, copied them to a PC and then tried installing KitKat, it failed. So I updated to TWRP 2.6.3.0 and it failed again, tried a second time and it updated
The game didn't work well on KitKat, so I restored my original version. I then decided to take screenshot of game not working on KitKat to complain, so tried installing KitKat again forgetting to update to 2.6.3.0 as the restoration of the backup restored the prevous 2.6.0.0 recovery, was a noob and tried again and i'm now left with a Nexus 7 in a boot logo loop.
Restoring the backup fails, as does installing the KitKat Zip or Opensensation . If I try flashing TWRP 2.6.3.0 via fastboot, it says success, but when I reboot the recovery i'm still in 2.6.0.0. I can boot into 2.6.3.0 using "fastboot boot", but it still won't restore the backup or flash. I also have a backup of the OpenSensation rom (wanted to try PDroid and it was the only rom I could find prepatched) which I made on 2.6.3.0, that won't restore either.
The error i'm getting in TWRP is "symlink: some failed"", "can't open destination log file: '/cache/recovery/log'" and "E:Unable to open '/cache/recovery/log'"
This is the end part of recovery.log in tmp
Code:
E:TWFunc::Copy_Log -- Can't open destination log file: '/cache/recovery/log'
I:Copying file /cache/recovery/log to /cache/recovery/last_log
I:Attempt to load settings from settings file...
I:Loading settings from '/data/media/0/TWRP/.twrps'.
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/015d2109a660180c'
E:Unable to open '/cache/recovery/.version'.
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Switching packages (TWRP)
I:Set page: 'wipe'
I:Set page: 'action_page'
Formatting Cache using make_ext4fs function.
Creating filesystem with parameters:
Size: 464519168
Block size: 4096
Blocks per group: 32768
Inodes per group: 7088
Inode size: 256
Journal blocks: 1772
Label:
Blocks: 113408
Block groups: 4
Reserved block group size: 31
Created filesystem with 11/28352 inodes and 3654/113408 blocks
E:Unable to open '/cache/recovery/.version'.
Wiping data without wiping /data/media ...
I:Unable to unlink '/data/local/tmp/init.rc: Read-only file system'
I:Unable to unlink '/data/data/com.android.providers.applications/lib: Read-only
file system'
I:Unable to unlink '/data/app-asec/com.acrossair.tvguideuk-1.asec: Read-only fil
e system'
I:Unable to unlink '/data/app/org.mozilla.firefox_beta-1.apk: Read-only file sys
tem'
I:Unable to unlink '/data/property/persist.sys.NV_STEREOCTRL: Read-only file sys
tem'
I:Unable to unlink '/data/dalvik-cache/[email protected]@[email protected]: Read-on
ly file system'
I:Unable to unlink '/data/gps/glgpsctrl: Read-only file system'
I:Unable to unlink '/data/user/0: Read-only file system'
I:Unable to unlink '/data/system/entropy.dat: Read-only file system'
I:Unable to unlink '/data/backup/pending/journal-1737016036.tmp: Read-only file
system'
I:Unable to unlink '/data/sensors/KXTF9_Calibration.ini: Read-only file system'
I:Unable to unlink '/data/lightsensor/AL3010_Config.ini: Read-only file system'
I:Unable to unlink '/data/anr/traces.txt: Read-only file system'
I:Unable to unlink '/data/tombstones/tombstone_00: Read-only file system'
Done.
Updating partition details...
I:Data backup size is 1537MB, size: 6058MB, used: 4595MB, free: 1330MB, in data/
media: 3058MB.
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Set page: 'action_complete'
I:Set page: 'clear_vars'
I:Set page: 'wipe'
I:Set page: 'action_page'
Formatting cache using make_ext4fs function.
Creating filesystem with parameters:
Size: 464519168
Block size: 4096
Blocks per group: 32768
Inodes per group: 7088
Inode size: 256
Journal blocks: 1772
Label:
Blocks: 113408
Block groups: 4
Reserved block group size: 31
Created filesystem with 11/28352 inodes and 3654/113408 blocks
E:Unable to open '/cache/recovery/.version'.
Wiping data without wiping /data/media ...
I:Unable to unlink '/data/local/tmp/init.rc: Read-only file system'
I:Unable to unlink '/data/data/com.android.providers.applications/lib: Read-only
file system'
I:Unable to unlink '/data/app-asec/com.acrossair.tvguideuk-1.asec: Read-only fil
e system'
I:Unable to unlink '/data/app/org.mozilla.firefox_beta-1.apk: Read-only file sys
tem'
I:Unable to unlink '/data/property/persist.sys.NV_STEREOCTRL: Read-only file sys
tem'
I:Unable to unlink '/data/dalvik-cache/[email protected]@[email protected]: Read-on
ly file system'
I:Unable to unlink '/data/gps/glgpsctrl: Read-only file system'
I:Unable to unlink '/data/user/0: Read-only file system'
I:Unable to unlink '/data/system/entropy.dat: Read-only file system'
I:Unable to unlink '/data/backup/pending/journal-1737016036.tmp: Read-only file
system'
I:Unable to unlink '/data/sensors/KXTF9_Calibration.ini: Read-only file system'
I:Unable to unlink '/data/lightsensor/AL3010_Config.ini: Read-only file system'
I:Unable to unlink '/data/anr/traces.txt: Read-only file system'
I:Unable to unlink '/data/tombstones/tombstone_00: Read-only file system'
Done.
Updating partition details...
I:Data backup size is 1537MB, size: 6058MB, used: 4595MB, free: 1330MB, in data/
media: 3058MB.
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Set page: 'action_complete'
I:Set page: 'clear_vars'
I:Set page: 'wipe'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:Set page: 'flash_zip'
Installing '/sdcard/pa_aosp_grouper.zip'...
Checking for MD5 file...
I:Cannot find file /sdcard/pa_aosp_grouper.zip.md5
Skipping MD5 check: no MD5 file found.
Verifying zip signature...
I:read key e=3
I:read key e=65537
I:comment is 1738 bytes; signature 1720 bytes from end
I:whole-file signature verified against key 0
I:Zip contains SELinux file_contexts file in its root. Extracting to /file_conte
xts
Creating filesystem with parameters:
Size: 681574400
Block size: 4096
Blocks per group: 32768
Inodes per group: 6944
Inode size: 256
Journal blocks: 2600
Label:
Blocks: 166400
Block groups: 6
Reserved block group size: 47
Created filesystem with 11/41664 inodes and 5415/166400 blocks
minzip: Extracted 2 file(s)
minzip: Error writing 32768 bytes from zip file from 0xbe95d794: Read-only file
system
minzip: Process function elected to fail (in inflate)
minzip: Can't extract entry to file.
minzip: Error extracting "/system/framework/framework-res.apk"
minzip: Extracted 418 file(s)
symlink: failed to remove /system/fonts/DroidSans-Bold.ttf: Read-only file syste
m
symlink: failed to symlink /system/fonts/DroidSans-Bold.ttf to Roboto-Bold.ttf:
File exists
script aborted: symlink: some symlinks failed
symlink: some symlinks failed
E:Error executing updater binary in zip '/sdcard/pa_aosp_grouper.zip'
Error flashing zip '/sdcard/pa_aosp_grouper.zip'
Updating partition details...
I:Data backup size is 1537MB, size: 6058MB, used: 4595MB, free: 1330MB, in data/
media: 3058MB.
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Set page: 'flash_done'
Which says update fails because file system is read only.
I've tried Nexus Tookit and it says it was successful. Used the stock rom before the most recent one.
Code:
Flash Stock + Unroot...
------------------------------------------------------------------
erasing 'boot'...
OKAY [ 0.011s]
finished. total time: 0.011s
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 0.022s]
finished. total time: 0.022s
erasing 'recovery'...
OKAY [ 0.022s]
finished. total time: 0.022s
******** Did you mean to fastboot format this partition?
erasing 'system'...
OKAY [ 0.032s]
finished. total time: 0.032s
******** Did you mean to fastboot format this partition?
erasing 'userdata'...
OKAY [ 0.028s]
finished. total time: 0.029s
sending 'bootloader' (2100 KB)...
OKAY [ 0.279s]
writing 'bootloader'...
OKAY [ 0.724s]
finished. total time: 1.004s
rebooting into bootloader...
OKAY [ 0.006s]
finished. total time: 0.007s
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
--------------------------------------------
Bootloader Version...: 4.23
Baseband Version.....: N/A
Serial Number........: 015d2109a660180c
--------------------------------------------
checking product...
OKAY [ 0.040s]
checking version-bootloader...
OKAY [ 0.023s]
sending 'boot' (4896 KB)...
OKAY [ 0.644s]
writing 'boot'...
OKAY [ 0.018s]
sending 'recovery' (5432 KB)...
OKAY [ 0.720s]
writing 'recovery'...
OKAY [ 0.023s]
erasing 'system'...
OKAY [ 0.017s]
sending 'system' (529061 KB)...
OKAY [ 66.865s]
writing 'system'...
OKAY [ 8.887s]
erasing 'userdata'...
OKAY [ 0.026s]
formatting 'userdata' partition...
Creating filesystem with parameters:
Size: 6453985280
Block size: 4096
Blocks per group: 32768
Inodes per group: 8048
Inode size: 256
Journal blocks: 24620
Label:
Blocks: 1575680
Block groups: 49
Reserved block group size: 391
Created filesystem with 11/394352 inodes and 52512/1575680 blocks
sending 'userdata' (102525 KB)...
writing 'userdata'...
OKAY [ 51.792s]
erasing 'cache'...
OKAY [ 0.018s]
formatting 'cache' partition...
Creating filesystem with parameters:
Size: 464519168
Block size: 4096
Blocks per group: 32768
Inodes per group: 7088
Inode size: 256
Journal blocks: 1772
Label:
Blocks: 113408
Block groups: 4
Reserved block group size: 31
Created filesystem with 11/28352 inodes and 3654/113408 blocks
sending 'cache' (9052 KB)...
writing 'cache'...
OKAY [ 3.181s]
rebooting...
finished. total time: 132.412s
But It has no effect. It's still stuck in a boot loop and if I reboot into recovery it's still TWRP 2.6.0.0. I can browse data/data using ADB sh and all data still hasn't been deleted. When using ADB, I can push files to root but once I reboot the device they are gone. If I do ADB Shell mount after attemping to install someone via TWRP I get
Code:
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)/dev/block/mmcblk0p9 on /data type ext4 (ro,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/block/mmcblk0p9 on /sdcard type ext4 (ro,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/block/platform/sdhci-tegra.3/by-name/APP on /system type ext4 (ro,seclabel,nodev,noatime,nodiratime,user_xattr,acl,barrier=1,data=ordered)
/dev/block/mmcblk0p4 on /cache type ext4 (ro,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered)
If I then go into the mount menu and remove ticks in boxes and put them back I get
Code:
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
/dev/block/mmcblk0p9 on /data type ext4 (rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/block/mmcblk0p9 on /sdcard type ext4 (rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/block/mmcblk0p4 on /cache type ext4 (rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered)
/dev/block/mmcblk0p3 on /system type ext4 (rw,seclabel,relatime,user_xattr,acl,barrier=1,data=ordered)
but if I try writing to cache, system, sdcard, data, it instantly switches back to ro and faiils. ADB push says it succeeds and file appears on device when it is mounted as RW, but is gone on reboot.
If I boot into recovery TWRP 2.6.0.0 and type adb devices, I get
Code:
List of devices attached
0123456789ABCDEF recovery
Which obviously I know is iffy.
If I do fastboot boot <TWRP 2.6.3.0>
and do adb devices, I get
Code:
List of devices attached
015d2109a660180c recovery
If it means anything, previously i've taken screenshots on the device and deleted others. Then connected to a PC in normal mode and what I see in the screenshot directory was from before those changes.
If it also has a bearing, when I connect the Nexus to the PC it tells me it can perform faster when connected to a USB2.0 port which it is. It Also has the power recharge problem, to get it to recharge I have to plug the usb cable in, remove usb cable and reinsert within 10 seconds, turn the screen off and leave it alone. As solution posted on Google Forums, but it used to charge normally.
I had a similar problem the other day and used the toolkit to flag an even earlier build (4.2) and I could boot.
Then do the OTA updates which will update your bootloader and then reflash whatever you like.
---------- Post added at 06:24 AM ---------- Previous post was at 06:23 AM ----------
I had a similar problem the other day and used the toolkit to flag an even earlier build (4.2) and I could boot.
Then do the OTA updates which will update your bootloader and then reflash whatever you like.
Thanks for your suggestion, unfortunately if I flash any stock which doesn't have the same boot loader as the device already has the flash fails. I get
Code:
writing 'bootloader'...
FAILED (remote: ())
so no error code and fastboot crashes after a couple of more steps. I can't write to the device at all, formatting, erasing does nothing even if it says it was successful. in TWRP I can't delete any file or change the permissions on any file.
So it's not something I know about, but i'm assuming the boot loader gets verified straight after being flashed, as my device will still have 4.23 regardless of what's being flashed the verification fails and fastboot on both the PC and Nexus 7 crashes. On the Nexus 7 in top left corner I see 'Signature Match'.
I also can't relock the bootloader. If I do "Fastboot OEM lock" it says success, If I immediately then try "Fastboot OEM Unlcock" it says it can't be done as device is already unlocked. It's like it's a hardware write flash failure, but it's a very big coincidence it happened when I was using TWRP.
Also tried removing the battery connector for a few minutes, did nothing.
Did you get anywhere with this? I've got the same symptoms - it "pretends" to flash partitions, but does nothing. Same error trying to downgrade the bootloader.
The installed OS has become flakey because its state never changes - it seems the whole device is stuck in read-only mode.
I'm suspecting its a write off
Oh - and I don't think its to do with TWRP - I had CWM installed, but I hadn't done anything but used the device for about a week - I have stock 4.4 + CWM + Superuser - and was happily using it until today when it started rebooting whenever I write much (like install updates). I think something about the flash has just "gone bad" - or perhaps been marked as non-writeable.
Same here..
I have experienced same problem.
My N7 is in Groudhog Day mode!
Whatever I do it reverts to its condition a fortnight ago... before rebooting.
It goes through all the motions... but Groundhog Day after reboot.
Must be hardware I think.
Any comments?????
whitty_nexus said:
Did you get anywhere with this? I've got the same symptoms - it "pretends" to flash partitions, but does nothing. Same error trying to downgrade the bootloader.
The installed OS has become flakey because its state never changes - it seems the whole device is stuck in read-only mode.
I'm suspecting its a write off
Oh - and I don't think its to do with TWRP - I had CWM installed, but I hadn't done anything but used the device for about a week - I have stock 4.4 + CWM + Superuser - and was happily using it until today when it started rebooting whenever I write much (like install updates). I think something about the flash has just "gone bad" - or perhaps been marked as non-writeable.
Click to expand...
Click to collapse
Has anyone managed to solve this? I'm having the same problem. Bootloops and whenever I try to wipe data in TWRP (factory reset) it doesn't actually wipe anything. Help!
Sent from my iPhone using Tapatalk
I've followed this up with Google Support (I bought the tablet from the play-store), and with it in the warranty period they offered an RMA replacement. They didn't have any hints or tips other than attempting to boot in safe-mode and factory reset the device (first-level standard support script), after factory reset failed they offered replacement.
This is only of help if your warranty is still in good standing - hint they were only interested in drop-damage or water-damage - unlocked bootloaders are no problem - although (a) I'm running stock and (b) Australian consumer law may give better protection than other locations.
Breaking news is that my wife's tablet failed in exactly the same way 3 weeks later. Her's had only ever been stock - in fact its bootloader was locked until the KitKat OTA reported errors applying due to mismatched system APKs. I suspect that was the first sign of bad flash. I unlocked and flashed stock KitKat. Then had ~3 weeks of no problems, now this. Hope that helps someone.
pwllheli said:
It goes through all the motions... but Groundhog Day after reboot.
Must be hardware I think.
Any comments?????
Click to expand...
Click to collapse
mattsolberg said:
Has anyone managed to solve this? I'm having the same problem. Bootloops and whenever I try to wipe data in TWRP (factory reset) it doesn't actually wipe anything. Help!
Click to expand...
Click to collapse
Well, just an update. Same problems still persisting. No solution yet. I contacted Google support but as I'm outside of the warranty period, I'm S.O.L.
Anyone with some other ideas?
Sent from my iPhone using Tapatalk
Just adding a "ME TOO!". Makes me feel better that I am not alone... No matter how I flash, it says its successful, but on reboot, all is as it was before flash... Suppose I could get a Nexus 7 with a broken screen and fix it now... :/
I may consider myself lucky : it is late 2018 and my good old Nexus 7 2012 has fall into the Groundhog Day mode a couple of months ago... No way to flash, erase data or reset... Even erasing my personal files when connected to a PC doesn't work : all files are back after reboot... Bye bye Cyanogen ROM...
Turns out the read only issue is a known issue of hardware failure. I did end up replacing the motherboard and it was a good decision. Not too expensive and not super hard to do. I use an ASOP Nouget build.
Sent from my LGLS992 using Tapatalk

[SCRIPT] Fix partition table for Android 4.4

Since the gapps for 4.4 need very much space wee need bigger system partitions.
I've created a script which automates this process and increases them both to 840MB.
the space is taken from the userdata partition.
You should backup your whole phone before doing this(storage will not be touched but you shouldn't take the risk)
I tested it with 32GB version only so if you want to know if it will work for 16gb, too give me the output of this command:
parted -s /dev/block/mmcblk0 print
Download:
http://d-h.st/FWz
Instructions:
1) boot into CWM
2) adb push repartition.sh /tmp
3) adb shell chmod 0777 /tmp/repartition.sh
4) adb shell /tmp/repartition.sh
5) adb reboot recovery
6) now you can do all the usual stuff like enabling TDB and installing ROM's
Sounds great but I cannot test it, since I dont have any parted binaries (at least in my 4.1.1 Wajk Wiui ROM) ? Can you please tell me where I can get them.
Second Question:
Im currently running TDB:
System 1 latest WIUI 4.1.1 v5 ROM
System 2 MIUI v6 1.9.19
Both system partitions are completely full (usage 98 %) and the same with the data partitions ( usage 97 % )!
Would it be possible to decrease /sdcard space and repartition it like the following with TDB enabled:
system 800 mb
system1 800 mb
data 1500 mb
data1 1500 mb
sdcard *the rest*
thanks in advance
sounds like you tried to repartition from Android
You need to boot to CWM - you have parted there.
Sorry I hate people who just ask stupid questions before reading the instructions carefully ...silly me sorry for that...
What about the second question, is it possible to either increase the data partitions for less space on /sdcard ?
there isn't sth. like a data1 partition. we have one data partition only that's why we need the TDB hack.
other than that it's possible but you should backup all your data and restore it afterwards.
m11kkaa said:
there isn't sth. like a data1 partition. we have one data partition only that's why we need the TDB hack.
other than that it's possible but you should backup all your data and restore it afterwards.
Click to expand...
Click to collapse
Ok got it.
So following your instructions and editing script like the following should work ?
Code:
change_table() {
ui_print "parted: delete"
parted -s /dev/block/mmcblk0 rm 23 || return 1 # system
parted -s /dev/block/mmcblk0 rm 24 || return 1 # system1
parted -s /dev/block/mmcblk0 rm 25 || return 1 # cache
parted -s /dev/block/mmcblk0 rm 26 || return 1 # userdata
parted -s /dev/block/mmcblk0 rm 27 || return 1 # storage
ui_print "parted: create"
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 336MB 1176MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 1176MB 2016MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 2016MB 2419MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 2419MB 6515MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 6515MB 31.3GB || return 1
ui_print "parted: name"
parted -s /dev/block/mmcblk0 name 23 system || return 1
parted -s /dev/block/mmcblk0 name 24 system1 || return 1
parted -s /dev/block/mmcblk0 name 25 cache || return 1
parted -s /dev/block/mmcblk0 name 26 userdata || return 1
parted -s /dev/block/mmcblk0 name 27 storage || return 1
return 0
}
Code:
ui_print "format partitions"
for NUM in 23 24 25 26 27
do
if ! format_partition "$NUM"; then
ui_print "Failed format partition $NUM"
exit 1
fi
done
already did full backup of sdcard, i just dont know if i should disable TDB before i stat repartitioning ... I dont know how TDB works to split the data partition thats my problem :/
yes that should work.
You don't need to disable TDB because your whole data partition will be wiped and it stores the TDB configuration(that means that TDB automatically gets disabled).
Had some errors but now its working fine ..thanks
unmount sdcard in CWM. It's a bug of this script.
Nice to hear it works now.
7 days ago Phone not start because partition corrupt
Hello
First do not panic is not the fault of your script but for you experience with mi2s and partitions are the few people in the world that can save my phone.
I'm playing a game phone(Xiaomi m2s 16GB) hang and one or more partitions are corrupt (I think this is the problem). But all de documentation than i find to delete o edit partition not work. Fastboot rom installation all ok but always only start with white logo. Mirecovery works perfectly and CWM by ivan works but temporally with this command sudo fastboot boot recovery.img
This is the result of your script
check environment
/sbin/mount
/sbin/umount
/sbin/parted
/sbin/tune2fs
/sbin/e2fsck
dump old table
unmount partitions
umount: can't umount /system: Invalid argument
umount: can't umount /system1: No such file or directory
umount: can't umount /data: Invalid argument
umount: can't umount /data_root: Invalid argument
umount: can't umount /sdcard: Invalid argument
change partition table
parted: delete
parted: create
Error: Unable to satisfy all constraints on the partition.
Failed changing table
OTHER TEST
/dev/block # e2fsck -fDp /dev/block/mmcblk0p24
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p24
/dev/block/mmcblk0p24:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
/dev/block # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p24
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: Bad magic number in super-block while trying to open /dev/block/mmcblk0p24
Couldn't find valid filesystem superblock.
I try to delete partition and create a new one but fail.
(parted) rm 24
rm 24
(parted) mkpartfs primary ext2 872 1409
mkpartfs primary ext2 872 1409
Error: Unable to satisfy all constraints on the partition.
I FOUND THIS IN XDA FORUM BUT I HAVEN'T IMAGE TO TEST
adb push mmcblk0p19_repaired.img /tmp/
adb shell dd if=/tmp/mmcblk0p19_repaired.img of=/dev/block/mmcblk0p19
adb reboot bootloader
MY PARTITION TABLE SYSTEM1 NOT HAVE FILESYSTEM EXT4
[email protected]:~/Escritorio/recovery$ sudo adb shell parted -s /dev/block/mmcblk0 print
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 89.1MB 89.1MB fat16 modem
2 89.1MB 178MB 89.1MB fat16 modem1
3 178MB 179MB 524kB sbl1
4 179MB 179MB 524kB sbl2
5 179MB 180MB 1049kB sbl3
6 180MB 181MB 1049kB rpm
7 181MB 182MB 1049kB tz
8 182MB 183MB 524kB DDR
9 183MB 187MB 4194kB aboot
10 187MB 188MB 1049kB misc
11 188MB 191MB 2990kB logo
12 191MB 192MB 799kB m9kefs1
13 192MB 193MB 799kB m9kefs2
14 193MB 193MB 1024B m9kefsc
15 193MB 201MB 8501kB bk1
16 201MB 202MB 799kB m9kefs3
17 202MB 268MB 66.3MB bk2
18 268MB 284MB 15.7MB boot
19 284MB 300MB 15.7MB boot1
20 300MB 316MB 15.7MB recovery
21 316MB 327MB 11.5MB bk3
22 327MB 336MB 8389kB ext4 persist
23 336MB 872MB 537MB ext4 system
24 872MB 1409MB 537MB system1
25 1409MB 1812MB 403MB ext4 cache
26 1812MB 5570MB 3758MB ext4 userdata
27 5570MB 15.8GB 10.2GB ext4 storage
Xiaomi Mi2 32GB
XIAOMI MI2 32GB ONLY
For those using a single MIUI ROM I've made a partition table with system1 set to 1024Mb.
Run the attached from CWM (in /tmp).
Aternus said:
XIAOMI MI2 32GB ONLY
For those using a single MIUI ROM I've made a partition table with system1 set to 1024Mb.
Run the attached from CWM (in /tmp).
Click to expand...
Click to collapse
Can you explain a little more? Does it only leave 1 system partition? Can I flash it like a regular zip?
Enviado desde mi MI 2S mediante Tapatalk
any step by step manual how to change partition? with all necessary downloads etc...
or.... is it possible to delete system2 with all its parts? - for me I'd to use system1 only
Why can not I change the size of the system partition?
Already tried several times, with disabled TDB and with enabled TDB.
Full wipe did and still no result.
P.S. I have already been able to do any repartitioning.
Code:
PS C:\Android> adb push repartition.sh /tmp
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
21 KB/s (3797 bytes in 0.169s)
PS C:\Android> adb shell chmod 0777 /tmp/repartition.sh
PS C:\Android> adb shell /tmp/repartition.sh
check environment
/sbin/mount
/sbin/umount
/sbin/parted
/sbin/tune2fs
/sbin/e2fsck
dump old table
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
unmount partitions
umount: can't umount /system: Invalid argument
umount: can't umount /system1: No such file or directory
umount: can't umount /data: Invalid argument
umount: can't umount /sdcard: Invalid argument
change partition table
parted: delete
parted: create
parted: name
format partitions
format: /dev/block/mmcblk0p23
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p23
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p23
Possibly non-existent device?
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p23: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p23: 11/500856 files (0.0% non-contiguous), 62917/1000445 blocks
format: /dev/block/mmcblk0p24
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p24: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p24: 11/262144 files (0.0% non-contiguous), 49386/524289 blocks
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p24: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p24: 11/262144 files (0.0% non-contiguous), 49386/524289 blocks
format: /dev/block/mmcblk0p25
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p25: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p25: 11/196608 files (0.0% non-contiguous), 32935/393217 blocks
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p25: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p25: 11/196608 files (0.0% non-contiguous), 32935/393217 blocks
format: /dev/block/mmcblk0p26
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first. Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p26: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p26: 11/399200 files (9.1% non-contiguous), 28951/798348 blocks
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/mmcblk0p26: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p26: 11/399200 files (9.1% non-contiguous), 28951/798348 blocks
Done.
PS C:\Android> adb reboot recovery
PS C:\Android>
UPD. The problem was that I was using Windows Povershell
Run the script from the command line and everything turned out.
Thanks!
I have to format first system and system1 in recovery to apply this script, because I have and error :
tmp/repartition.sh lin 115 can´t create /sdcard/parted_12_06_2014_FDFD6F4CB043F4956D9CAD053C3738AA.
DO MOUNT your SDCARD
then Follow the instruction
duhh...
I modified the script a little bit for 1 ROM usage. System1 is 840MB as in the original and System2 is 5MB. The rest goes into userdata. This is for the 16GB version.
Ok! I did again and umount the sdcard abd it worked fine.
Thanks
I found a better way
If u reboot into dload mode, u can change the partition table from your computer
The problem is that most partition managers don't support changing the GPT Partition names and that's why I added support for that to GParted.
GParted supports booting from Live CD/USB so Windows/Mac users aren't left out.
http://i.imgur.com/3SwSXs2.png
I pushed the patch to GParted repo's and I'll inform u once there're any news.
from my point of view the best way for use is:
- system (system1) - let 1024 MB
- system1 (system2) - let 10 MB
- userdata (apps) - let 4096 MB (take it from sdcard) - but maybe more

Corrupt partition /data

Okay so I recently updated my s4(att) from cyanogen 12 to cyanogen 13 (latest nightly). I went to settings/security and chose encrypt phone. After about 30 minutes of encrypting it reboot and got stuck in a bootloop. I thought no problem Ill just reflash. I go to reflash my backup and it says error mounting /data. I try formating data, factory reset, and installing the rom from scratch. It seems my data partition corrupt. So I figure fastboot. Yet upon loading fastboot I cant get adb to see my device. I think I got the right drivers installed. But nothing. Any help would be greatly appreciated.
Edit: fixed.
Solution:
I found this and was able to shell in via adb and format the partition.
f you wish to wipe the /data partition completely (including media like photos), follow the below instructions:
Boot into recovery.
Run adb shell in a terminal (Linux) or Command Prompt ("CMD", Windows). After a few seconds, you should see a line containing ~ #.
WARNING. Triple-check the command that you are entering here. White space and capitalization are important. Make any mistake here and you may accidentally wipe your whole flash memory including recovery images.
NOTE: if you want to encrypt your partition later, you have to leave 16KiB unallocated space on the end of the partition.
In the adb shell, run the command mke2fs -t ext4 /dev/block/mmcblk0p12. Substitute /dev/block/mmcblk0p12 and ext4 according to the recovery filesystem table (for /data). Output when running the command:
~ # mke2fs -t ext4 /dev/block/mmcblk0p12
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
755904 inodes, 3022848 blocks
151142 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=3095396352
93 block groups
32768 blocks per group, 32768 fragments per group
8128 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
(Optional) Install new firmware (E.g. CM 10.1).
Reboot.
(Optional) In order to encrypt the partition while clearing your whole data partition, run vdc cryptfs enablecrypto wipe PIN_OR_PASSWORD (before Android 5.0) or vdc cryptfs enablecrypto wipe password PASSWORD_IN_HEX (since Android 5.0, see this post for details).
Reconfigure device, choose language, enter name, install apps, etc.
source: android .stackexchange. com/questions/33398/cannot-factory-reset-after-encrypting
(sorry cant post links yet)
of course always check your formatting the correct partition first

Categories

Resources