I'm using the U.S. Glide running dmans cm10.1 with the Aquethys touch CWM recovery and I have messed up my USB Port and cannot transfer any data what so ever. I decided to explore alternatives to update the recovery and I found the flash_image command to be the best option as I was unable generate a cwm flashable zip from the Odin tar file (a bit too complexed for me (I have a windows pc)) and while attempting the command flash_image recovery /sdcard/recovery. Img in the phones terminal (image extracted from the new cwm built from source (great job guys!!!!)) and got a partition error and after more research found this to be a common error with people with phones containing the Emmc layout. But of course no solutions presented themselves without needing a solid USB connection. Any help or troublshooting would be appreciated! Other routes included fastboot interface but I don't think this phone uses it (correct me if I'm wrong )
Sent from my SGH-I927
wat about twrp recovery... u can find it on the goomanager app
You should try the nontouch version of cwmr. I've heard several people running into similar problems as you with the touch version.
Sent form my SGH-i927 running dman's cm10.1
Right but how do I flash it without a functional USB Port?
Sent from my SGH-I927 using xda premium
Cprager said:
Right but how do I flash it without a functional USB Port?
Sent from my SGH-I927 using xda premium
Click to expand...
Click to collapse
Connect your phone and laptop to your wifi.
Goto Settings developer options - turn on "ADB over netwrok"
adb connect 192.168.x.x:5555
Now follow this http://forum.xda-developers.com/showthread.php?t=1630519 . Replce the .img file with the glide verison of recovery.
The above should work for you, though i've not tried it myself.
awesome, I will attempt this today and report back.
Cprager said:
awesome, I will attempt this today and report back.
Click to expand...
Click to collapse
adb push recovery.img /data/local/
adb push flash_image /data/local/
(Permission denied, copied files to sdcard and then through phone moved to /data/local)
adb shell chmod 777 /data/local/recovery.img
adb shell chmod 777 /data/local/flash_image
(Operation not permitted, I then decided to run the following commands:
adb shell
su
chmod 777 /data/local/recovery.img
chmod 777 /data/local/flash_image
no errors listed, it seemed to function)
adb shell rm /data/local/rights/mid.txt
(rm failed for /data/local/rights/mid.txt, no such file or directory)
adb shell ln -s /dev/mtd/mtd1 /data/local/rights/mid.txt
(sh: syntax error: 'in' unexpected)
adb reboot
adb shell /data/local/flash_image recovery /data/local/recovery.img
(error scanning partitions: No such file or directory (seems like its failing because it doesn't know where the recovery partition is located maybe a DD command with the correct block containing the recovery partition??)
(I also tried the above in a root adb shell with the same error being encountered)
greeneyez15o said:
wat about twrp recovery... u can find it on the goomanager app
Click to expand...
Click to collapse
And what version of twrp did you flash and for what device to work on the glide? Without smashing your partitions..
Sent from my SGH-I927 using xda premium
Cprager said:
adb push recovery.img /data/local/
adb push flash_image /data/local/
(Permission denied, copied files to sdcard and then through phone moved to /data/local)
adb shell chmod 777 /data/local/recovery.img
adb shell chmod 777 /data/local/flash_image
(Operation not permitted, I then decided to run the following commands:
adb shell
su
chmod 777 /data/local/recovery.img
chmod 777 /data/local/flash_image
no errors listed, it seemed to function)
adb shell rm /data/local/rights/mid.txt
(rm failed for /data/local/rights/mid.txt, no such file or directory)
adb shell ln -s /dev/mtd/mtd1 /data/local/rights/mid.txt
(sh: syntax error: 'in' unexpected)
adb reboot
adb shell /data/local/flash_image recovery /data/local/recovery.img
(error scanning partitions: No such file or directory (seems like its failing because it doesn't know where the recovery partition is located maybe a DD command with the correct block containing the recovery partition??)
(I also tried the above in a root adb shell with the same error being encountered)
Click to expand...
Click to collapse
Try this :
Adb shell
Su
Change to the directory you have your img file in.
./flash_image recovery filexxxxxxx.img
Sent from my SGH-I927 using xda app-developers app
---------- Post added at 10:09 PM ---------- Previous post was at 09:47 PM ----------
ninthsense said:
Try this :
Adb shell
Su
Change to the directory you have your img file in.
./flash_image recovery filexxxxxxx.img
Sent from my SGH-I927 using xda app-developers app
Click to expand...
Click to collapse
You can also try doing the same from inside a terminal emulator app from within the CM10. Just found out that CM10 comes with flash_image already loaded.
Sent from my SGH-I927 using xda app-developers app
ninthsense said:
Try this :
Adb shell
Su
Change to the directory you have your img file in.
./flash_image recovery filexxxxxxx.img
Sent from my SGH-I927 using xda app-developers app
---------- Post added at 10:09 PM ---------- Previous post was at 09:47 PM ----------
You can also try doing the same from inside a terminal emulator app from within the CM10. Just found out that CM10 comes with flash_image already loaded.
Sent from my SGH-I927 using xda app-developers app
Click to expand...
Click to collapse
Just attempted the following:
adb shell
su
cd /data/local
./flash_image recovery recovery.img
"error scanning partitions: No such file or directory" I am getting the exact same error through the terminal
Cprager said:
Just attempted the following:
adb shell
su
cd /data/local
./flash_image recovery recovery.img
"error scanning partitions: No such file or directory" I am getting the exact same error through the terminal
Click to expand...
Click to collapse
drop the "./" just try "flash_image recovery recovery.img" from the terminal. Remember to be "su" and in the same directory where the recovery.img is.
ninthsense said:
drop the "./" just try "flash_image recovery recovery.img" from the terminal. Remember to be "su" and in the same directory where the recovery.img is.
Click to expand...
Click to collapse
Ok, I just did the revised commands and got a different error output:
opened terminal:
su
cd /data/local (the directory where flash_image and the recovery.img are located)
flash_image recovery recovery.img
"failed with error: -1"
I believe the Flash_image cannot find the partition housing the current recovery but am unable/don't know how to find the correct partiton
but assuming the correct one is found, do you think the below command would be a viable option?
dd if=/data/local/recovery.img of=/dev/block/mmcblk0xxxxx
Cprager said:
Ok, I just did the revised commands and got a different error output:
opened terminal:
su
cd /data/local (the directory where flash_image and the recovery.img are located)
flash_image recovery recovery.img
"failed with error: -1"
I believe the Flash_image cannot find the partition housing the current recovery but am unable/don't know how to find the correct partiton
but assuming the correct one is found, do you think the below command would be a viable option?
dd if=/data/local/recovery.img of=/dev/block/mmcblk0xxxxx
Click to expand...
Click to collapse
Delete the flash_image you've downloaded and run the command again. The flash_image is inbuilt in CM10, so i guess using that one makes more sense.
Also rename the .img file to recovery .img and place it in the root of your sdcard and issue the following command :
su
flash_image recovery /sdcard/recovery.img
ninthsense said:
Delete the flash_image you've downloaded and run the command again. The flash_image is inbuilt in CM10, so i guess using that one makes more sense.
Also rename the .img file to recovery .img and place it in the root of your sdcard and issue the following command :
su
flash_image recovery /sdcard/recovery.img
Click to expand...
Click to collapse
Same error, "failed with error: -1"
ninthsense, dd'ing the image as he said should work, something like
dd if=/path/to/cwm/boot.img of=/dev/block/mmcblk0pX
But you'll have to do some digging to figure out what X is. Flash CWM the normal way, then head boot.img and each mmcblk0pX and find the one that's identical.
And DON'T just guess; flashing the wrong partition can brick your phone.
roothorick said:
ninthsense, dd'ing the image as he said should work, something like
dd if=/path/to/cwm/boot.img of=/dev/block/mmcblk0pX
But you'll have to do some digging to figure out what X is. Flash CWM the normal way, then head boot.img and each mmcblk0pX and find the one that's identical.
And DON'T just guess; flashing the wrong partition can brick your phone.
Click to expand...
Click to collapse
didn't suggested cause i don't know the values for those xxx myself and don't want him to end up wiping/briking his phone.
ninthsense said:
didn't suggested cause i don't know the values for those xxx myself and don't want him to end up wiping/briking his phone.
Click to expand...
Click to collapse
I appreciate the concern gentlemen! i definately WILL NOT execute a command without knowing full well its purpose.
Im a PC guy so this linux command stuff is a bit newer to me, that being said, there must be a way (command) to see the partitions?
**I have currently the touch CWM so if you need me to "then head boot.img and each mmcblk0pX" to find the one thats identical I may be able to do so.
edit** don't know if this helps
cat /proc/partitions
major minor #blocks name
179 0 7552000 mmcblk0
179 1 12288 mmcblk0p1
179 2 614400 mmcblk0p2
179 3 319488 mmcblk0p3
179 4 3932672 mmcblk0p4
179 5 2048 mmcblk0p5
179 6 2097152 mmcblk0p6
179 7 16384 mmcblk0p7
259 0 5120 mmcblk0p8
259 1 8192 mmcblk0p9
259 2 8192 mmcblk0p10
259 3 524288 mmcblk0p11
179 16 512 mmcblk0boot1
179 8 512 mmcblk0boot0
179 24 7786496 mmcblk1
179 25 7785472 mmcblk1p1
Cprager said:
I appreciate the concern gentlemen! i definately WILL NOT execute a command without knowing full well its purpose.
Im a PC guy so this linux command stuff is a bit newer to me, that being said, there must be a way (command) to see the partitions?
**I have currently the touch CWM so if you need me to "then head boot.img and each mmcblk0pX" to find the one thats identical I may be able to do so.
Click to expand...
Click to collapse
Nothing really, besides just ls /dev/block/mmcblk0p*
Phone partitions are quite a bit different from computer partitions -- about half the partitions don't even have filesystems; the entire partition is dedicated to some image that is important to one thing or the other.
I've got a pretty good overview of the CGlide ICS partitions here: http://forum.xda-developers.com/showthread.php?t=2051327
From my touch recovery logs
Starting recovery on Fri Dec 28 19:23:18 2012
framebuffer: fd 4 (480 x 800)
ClockworkMod Recovery v6.0.0.1
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/mmcblk0p9 (null) 0
2 /cache ext4 /dev/block/mmcblk0p3 (null) 0
3 /data ext4 /dev/block/mmcblk0p6 (null) 0
4 /recovery emmc /dev/block/mmcblk0p8 (null) 0
5 /sdcard vfat /dev/block/mmcblk0p4 /dev/block/mmcblk0 0
6 /system ext4 /dev/block/mmcblk0p2 (null) 0
7 /efs ext4 /dev/block/mmcblk0p1 (null) 0
Note : I would advise you to pull out the file system into a .img file and keep the backup before flashing it with recover.img. Jsut in case you need to restore back to the original state
ninthsense said:
From my touch recovery logs
Starting recovery on Fri Dec 28 19:23:18 2012
framebuffer: fd 4 (480 x 800)
ClockworkMod Recovery v6.0.0.1
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/mmcblk0p9 (null) 0
2 /cache ext4 /dev/block/mmcblk0p3 (null) 0
3 /data ext4 /dev/block/mmcblk0p6 (null) 0
4 /recovery emmc /dev/block/mmcblk0p8 (null) 0
5 /sdcard vfat /dev/block/mmcblk0p4 /dev/block/mmcblk0 0
6 /system ext4 /dev/block/mmcblk0p2 (null) 0
7 /efs ext4 /dev/block/mmcblk0p1 (null) 0
Note : I would advise you to pull out the file system into a .img file and keep the backup before flashing it with recover.img. Jsut in case you need to restore back to the original state
Click to expand...
Click to collapse
YOU GUYS ROCK !!!!!
I understand the procedure for replacing the previous recovery with the new recovery.img through the DD command,
but am unsure how to backup the current one. I will do more research and run my procedure by you guys before attempting anything
**edit**
to backup:
dd if=/dev/block/mmcblk0p8 of=/sdcard/current-recovery.img
to flash new recovery:
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p8
there was an attribute listed bs=4096 (maybe bit size??)
please let me know if my commands are correct, and I will give it a go (fingers crossed lol)
Related
I erased my sd card in an attempt to get back the 8GB of storage that was missing . I successfully copied everything back to the sd but once I unmounted and turned off usb mode I got an error saying "SD card damaged. You may have to reformat it."
Now when I connect to my computer it recognizes the HOX but not the SD. Same in recovery, I get a can't mount SD error message. Can't format from the phone either.
The phone is working fine with the exception of the borked sd card. Anyone have any ideas on how I can fix it. I think that I could format the sd partition by using busybox but I don't know which partition in dev/block points to the sd.
I'm using CM9 btw, any help would be appreciated. Thanks in advance!
kchino said:
I erased my sd card in an attempt to get back the 8GB of storage that was missing . I successfully copied everything back to the sd but once I unmounted and turned off usb mode I got an error saying "SD card damaged. You may have to reformat it."
Now when I connect to my computer it recognizes the HOX but not the SD. Same in recovery, I get a can't mount SD error message. Can't format from the phone either.
The phone is working fine with the exception of the borked sd card. Anyone have any ideas on how I can fix it. I think that I could format the sd partition by using busybox but I don't know which partition in dev/block points to the sd.
I'm using CM9 btw, any help would be appreciated. Thanks in advance!
Click to expand...
Click to collapse
Settings > Storage > Erase phone storage?
If you are not worried about reintalling applications again and backed up your data, Do a factory reset by going to boot screen.
cjm1979 said:
Settings > Storage > Erase phone storage?
Click to expand...
Click to collapse
I've tried that, the sd isn't mounted so nothing shows up under storage. Just the 2GB of internal memory.
kchino said:
I've tried that, the sd isn't mounted so nothing shows up under storage. Just the 2GB of internal memory.
Click to expand...
Click to collapse
Flash the RUU MAYBE
Sent from my HTC One X using xda premium
skr_xd said:
If you are not worried about reintalling applications again and backed up your data, Do a factory reset by going to boot screen.
Click to expand...
Click to collapse
Tried that as well, nice and clean but the sd card message still appears. Thanks for the suggestions.
matmar said:
Flash the RUU MAYBE
Sent from my HTC One X using xda premium
Click to expand...
Click to collapse
I was hoping that would be my last resort. I found this thread from the flyer forum.
Only problem is I don't know which partition points to the sd.
Someone with a working operation system on a flyer was able to format the sd from the phone using busybox using this command:
mkfs.vfat /dev/block/mmcblk0p33
Maybe a dev with knowledge of the filesystem could point me to where the the sd partition lives under block and I could try the same thing?
kchino said:
I was hoping that would be my last resort. I found this thread from the flyer forum.
Only problem is I don't know which partition points to the sd.
Someone with a working operation system on a flyer was able to format the sd from the phone using busybox using this command:
mkfs.vfat /dev/block/mmcblk0p33
Maybe a dev with knowledge of the filesystem could point me to where the the sd partition lives under block and I could try the same thing?
Click to expand...
Click to collapse
they go from mmcblk0p1 - 20 not sure which is the sd sorry
kchino said:
I was hoping that would be my last resort. I found this thread from the flyer forum.
Only problem is I don't know which partition points to the sd.
Someone with a working operation system on a flyer was able to format the sd from the phone using busybox using this command:
mkfs.vfat /dev/block/mmcblk0p33
Maybe a dev with knowledge of the filesystem could point me to where the the sd partition lives under block and I could try the same thing?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1551581
skr_xd said:
http://forum.xda-developers.com/showthread.php?t=1551581
Click to expand...
Click to collapse
Thank you! Well, I tried:
su
#mkfs.vfat /dev/block/mmcblk0p14 (it returned)
lseek:Value too large for defined value type
off to research more...
I'm stuck any help?
1|[email protected]:/ # cat /proc/partitions
major minor #blocks name
179 0 30535680 mmcblk0
179 1 6144 mmcblk0p1
179 2 2048 mmcblk0p2
179 3 6144 mmcblk0p3
179 4 8192 mmcblk0p4
179 5 8192 mmcblk0p5
179 6 16384 mmcblk0p6
179 7 16384 mmcblk0p7
179 8 16384 mmcblk0p8
179 9 4096 mmcblk0p9
179 10 4096 mmcblk0p10
179 11 28672 mmcblk0p11
179 12 1310720 mmcblk0p12
179 13 327680 mmcblk0p13
179 14 26476544 mmcblk0p14
179 15 2248704 mmcblk0p15
179 16 2048 mmcblk0p16
179 17 2048 mmcblk0p17
179 18 6144 mmcblk0p18
179 19 22528 mmcblk0p19
179 20 2048 mmcblk0p20
[email protected]:/ # busybox mkfs.vfat /dev/block/mmcblk0p14
mkfs.vfat: lseek: Value too large for defined data type
I was finally able to reformat the sd partition using the instructions in the thread I shared earlier. I had to push another version of busybox to data/local/tmp, change permissions and run the mkfs.vfat to get it to work. Thanks to those that gave suggestions back in business!
try doing a factory reset in the bootloader. worked for me when nothing else would after my sd got corrupted and would not mount to PC. corruption in my case occurred by leaving the charger connected during an OTA.
Edit : sorry I see you have already sorted it !
Hello
kchino said:
I was finally able to reformat the sd partition using the instructions in the thread I shared earlier. I had to push another version of busybox to data/local/tmp, change permissions and run the mkfs.vfat to get it to work. Thanks to those that gave suggestions back in business!
Click to expand...
Click to collapse
Hey friend stuck in the same situation as you. Any help would be appreciated. Im lost as to how you took the steps to get your phone to mount again. Which busybox did u use and how did you push that script?!
kchino said:
I was hoping that would be my last resort. I found this thread from the flyer forum.
Only problem is I don't know which partition points to the sd.
Someone with a working operation system on a flyer was able to format the sd from the phone using busybox using this command:
mkfs.vfat /dev/block/mmcblk0p33
Maybe a dev with knowledge of the filesystem could point me to where the the sd partition lives under block and I could try the same thing?
Click to expand...
Click to collapse
Hey Packer, follow the steps in the thread I posted here. The SD partition for the HOX is /dev/block/mmcblk0p14 btw. It worked perfectly for me.
NOOB Status
kchino said:
Hey Packer, follow the steps in the thread I posted here. The SD partition for the HOX is /dev/block/mmcblk0p14 btw. It worked perfectly for me.
Click to expand...
Click to collapse
Brother please help I am a noob. What steps to take and how to go about this. I am very desperate and unlocked phone so no warranty. Idk how to enter that code and where. Or what to do with the /dev/block/mmcblk0p14 :/ any help would be appreciated pls?
Packer2058 said:
Brother please help I am a noob. What steps to take and how to go about this. I am very desperate and unlocked phone so no warranty. Idk how to enter that code and where. Or what to do with the /dev/block/mmcblk0p14 :/ any help would be appreciated pls?
Click to expand...
Click to collapse
Okay, no problem...
Look at this thread and make sure you have downloaded the sdk or another copy of adb and for mac. ADB and fastboot are the command line programs, you are going to use ADB to fix your phone. Look at this thread so you can use ADB and fastboot and are familiar with the commands you're gonna need to use.
Download the version of busybox listed below, unzip it and also put this in the folder with ADB before you get started. Quotes below are just used for emphasis.
1. Go into your fastboot/adb folder on your mac, you should see the file "adb" in the folder. You may need to put a "./" in front of your commands i.e. ./adb devices, or ./adb push to actually execute them... Connect your HOX to your mac with USB.
2. Open a terminal window, make sure that your term session is in the same folder that contains your adb files. You can type "ls" <enter> and you should see the adb files and any other SDK files listed. If not, in mac you can drag the icon from the the top of the finder window into your terminal and it will change to the appropriate directory for you.
3. Type ./adb devices <enter>. It should output the serial of your phone. If you don't see anything listed after ./adb devices command you probably are in wrong folder. When you see confirmation of you serial, move on...
4. The following steps are attributed to the user globatron (Thanks!) who I found the fix from on the flyer forums:
You're going to type or copy and paste the following commands to check and then reformat the partition.
./adb push busybox /data/local/tmp - (you should see okay at the end of the dialogue) This will move the busybox file to your phone needed to format.
Next type:
./adb shell - (then type su which will give you superuser if you don't have it already) your command prompt will change from the "$" to "#" don't type these.
$ su
Now just to check that the partition is still there type:
#cat /proc/partitions (you should see a list of 20 partitions, most importantly is this one)
179 14 26476544 mmcblk0p14
If you see the above line after you do your cat command go to the next steps.
Type the following or just copy and paste without the #:
# chmod 755 /data/local/tmp/busybox
# /data/local/tmp/busybox mkfs.vfat /dev/block/mmcblk0p14
That should do it. Disconnect from your computer and reboot.
THANK YOU SO FREAKING MUCH! I dont know how else to thank you! You gave my device new life, and gave me some peace of mind. I was close to trying to replace my phone; File a Claim and fulfill my warranty from SquareTrade. You have helped me so much my friend. Thank you once again. May karma be in your favor!
Packer2058 said:
THANK YOU SO FREAKING MUCH! I dont know how else to thank you! You gave my device new life, and gave me some peace of mind. I was close to trying to replace my phone; File a Claim and fulfill my warranty from SquareTrade. You have helped me so much my friend. Thank you once again. May karma be in your favor!
Click to expand...
Click to collapse
Cool, Glad it worked out. Thanks for the karma!
kchino said:
Okay, no problem...
Look at this thread and make sure you have downloaded the sdk or another copy of adb and for mac. ADB and fastboot are the command line programs, you are going to use ADB to fix your phone. Look at this thread so you can use ADB and fastboot and are familiar with the commands you're gonna need to use.
Download the version of busybox listed below, unzip it and also put this in the folder with ADB before you get started. Quotes below are just used for emphasis.
1. Go into your fastboot/adb folder on your mac, you should see the file "adb" in the folder. You may need to put a "./" in front of your commands i.e. ./adb devices, or ./adb push to actually execute them... Connect your HOX to your mac with USB.
2. Open a terminal window, make sure that your term session is in the same folder that contains your adb files. You can type "ls" <enter> and you should see the adb files and any other SDK files listed. If not, in mac you can drag the icon from the the top of the finder window into your terminal and it will change to the appropriate directory for you.
3. Type ./adb devices <enter>. It should output the serial of your phone. If you don't see anything listed after ./adb devices command you probably are in wrong folder. When you see confirmation of you serial, move on...
4. The following steps are attributed to the user globatron (Thanks!) who I found the fix from on the flyer forums:
You're going to type or copy and paste the following commands to check and then reformat the partition.
./adb push busybox /data/local/tmp - (you should see okay at the end of the dialogue) This will move the busybox file to your phone needed to format.
Next type:
./adb shell - (then type su which will give you superuser if you don't have it already) your command prompt will change from the "$" to "#" don't type these.
$ su
Now just to check that the partition is still there type:
#cat /proc/partitions (you should see a list of 20 partitions, most importantly is this one)
179 14 26476544 mmcblk0p14
If you see the above line after you do your cat command go to the next steps.
Type the following or just copy and paste without the #:
# chmod 755 /data/local/tmp/busybox
# /data/local/tmp/busybox mkfs.vfat /dev/block/mmcblk0p14
That should do it. Disconnect from your computer and reboot.
Click to expand...
Click to collapse
Hello
thank you for your instructions i have followed it exactly and i have an issue running these commands
# chmod 755 /data/local/tmp/busybox
# /data/local/tmp/busybox mkfs.vfat /dev/block/mmcblk0p14
it says not found. I have tried all different things and could not get his to work. What does the chmod 755 do?
Cheers for your help
Hi all, got my kindle fire brick. I think my partition is messed up. I bought a factory cable which able me to install twrp and i succefully(i guess) flashed energy ICS. But it prompt me "e:unable to mount '/data" e:unable to mount '/cache". I were to boot to normal boot it will just boot endlessly but i still can access to fff and twrp.i did some research on repartitioning for kindle fire but i need some guidance. Help is much appreciated
Sent from my GT-I9100 using xda app-developers app
Usually this is a fairly bad indication but do this go to the mount section in twrp and make sure there are no checks in the boxes of data and system if so uncheck them, I know you said data and cache but this should have a check in the box then try a reboot also were you previously using cwmr? If so you may have been bitten by the bug a very unsightly one that generally means the death of your kindle unless you know how to repartition around a broken emmc. What did you do prior to this that caused this to happen?
Also energy is not the best for good mounting just saying...
I was using fireparted to backup my partition when my pc suddenly shut down. Thats when everything screws up. Also my data and cache are not able to check or uncheck. I hope theres a kind soul to guide me through this process
Sent from my GT-I9100 using xda app-developers app
If you ask me I would say its toast but maybe someone knows a way to restore factory partitions I know many are looking for a solution for thier parts only kindle....
From what I understand...
Code:
fastboot oem format
...will rewrite your partition table to stock. And as long as you haven't messed with the partition sizes, your data will stay intact.
Enter:
Code:
shell cat /proc/partitions
To get a list of your current partitions and sizes to check to see if they even exist to begin with. And if so, it's likely just a case of broken or missing mountpoints.
Now, whether or not "fastboot oem format" will restore broken or missing mountpoints, I couldn't tell you for sure; I've never had to try it. But in your situation, it probably couldn't hurt to try.
You can also recreate mountpoints manually if needed.
[Edit:] It has just been explained to me that "fastboot oem format" won't do anything about mountpoints.
Assuming you can get into TWRP and run adb shell, execute the following command...
Code:
adb shell parted /dev/block/mmcblk0 unit b print
Note: version 2.2.0 is missing the parted binary, so you'll need to use 2.1.1
This will give you a detailed layout of your storage device and the filesystems for each partition. I'm running from memory here, but the right column should show the filesystem types it sees for that particular partition. For userdata (which is mounted as data) and cache, those should be ext4. If you don't see that, you need to remake those partitions.
Code:
adb shell mke2fs -T ext4 /dev/block/mmcblk0p10
adb shell mke2fs -T ext4 /dev/block/mmcblk0p11
Then you can repeat the parted command above and see if the commands worked. If the commands were successful, you can use the mount command or it's probably easier to just reboot into TWRP and it should do it automatically.
kinfauns said:
Assuming you can get into TWRP and run adb shell, execute the following command...
Code:
adb shell parted /dev/block/mmcblk0 unit b print
Note: version 2.2.0 is missing the parted binary, so you'll need to use 2.1.1
This will give you a detailed layout of your storage device and the filesystems for each partition. I'm running from memory here, but the right column should show the filesystem types it sees for that particular partition. For userdata (which is mounted as data) and cache, those should be ext4. If you don't see that, you need to remake those partitions.
Code:
adb shell mke2fs -T ext4 /dev/block/mmcblk0p10
adb shell mke2fs -T ext4 /dev/block/mmcblk0p11
Then you can repeat the parted command above and see if the commands worked. If the commands were successful, you can use the mount command or it's probably easier to just reboot into TWRP and it should do it automatically.
Click to expand...
Click to collapse
Pardon me for my Noob-ness, are the code to be execute on pc or on TWRP?
dean11 said:
Pardon me for my Noob-ness, are the code to be execute on pc or on TWRP?
Click to expand...
Click to collapse
Step back a bit and figure out how all of these things work together by reading the first 3 posts here...
http://forum.xda-developers.com/showthread.php?t=1552547
It will be a lot easier for you to understand what you are doing and why you are doing them. It will also explain how and where to run the commands.
kinfauns said:
Step back a bit and figure out how all of these things work together by reading the first 3 posts here...
http://forum.xda-developers.com/showthread.php?t=1552547
It will be a lot easier for you to understand what you are doing and why you are doing them. It will also explain how and where to run the commands.
Click to expand...
Click to collapse
OH MY GOOOOD!!!! MY KINDLE IS ALIVE!!!! THANK YOU SO MUCH @kinfauns!
kinfauns said:
Assuming you can get into TWRP and run adb shell, execute the following command...
Code:
adb shell parted /dev/block/mmcblk0 unit b print
Note: version 2.2.0 is missing the parted binary, so you'll need to use 2.1.1
This will give you a detailed layout of your storage device and the filesystems for each partition. I'm running from memory here, but the right column should show the filesystem types it sees for that particular partition. For userdata (which is mounted as data) and cache, those should be ext4. If you don't see that, you need to remake those partitions.
Code:
adb shell mke2fs -T ext4 /dev/block/mmcblk0p10
adb shell mke2fs -T ext4 /dev/block/mmcblk0p11
Then you can repeat the parted command above and see if the commands worked. If the commands were successful, you can use the mount command or it's probably easier to just reboot into TWRP and it should do it automatically.
Click to expand...
Click to collapse
I have the similar situation.
And when I use "parted" to check my kidle partition, there is no cache, and the userdata is ext2.
Number Start End Size File system Name Flags
1 131072B 262143B 131072B xloader
2 262144B 524287B 262144B bootloader
3 524288B 11010047B 10485760B dkernel
4 11010048B 212336639B 201326592B ext4 dfs
5 212336640B 229113855B 16777216B recovery
6 229113856B 296222719B 67108864B ext4 backup
7 296222720B 306708479B 10485760B boot
8 306708480B 311951359B 5242880B ext4 splash
9 311951360B 848822271B 536870912B ext4 system
10 848822272B 849000447B 178176B ext2 userdata
12 2448000000B 7748000255B 5300000256B fat32 media msftres
When I use the mke2fs to change the file system type, it returns this error
Not enough space to build proposed filesystem while setting up superblock.
Please help!
Thank you in advance!
june12 said:
I have the similar situation.
And when I use "parted" to check my kidle partition, there is no cache, and the userdata is ext2.
Number Start End Size File system Name Flags
1 131072B 262143B 131072B xloader
2 262144B 524287B 262144B bootloader
3 524288B 11010047B 10485760B dkernel
4 11010048B 212336639B 201326592B ext4 dfs
5 212336640B 229113855B 16777216B recovery
6 229113856B 296222719B 67108864B ext4 backup
7 296222720B 306708479B 10485760B boot
8 306708480B 311951359B 5242880B ext4 splash
9 311951360B 848822271B 536870912B ext4 system
10 848822272B 849000447B 178176B ext2 userdata
12 2448000000B 7748000255B 5300000256B fat32 media msftres
When I use the mke2fs to change the file system type, it returns this error
Not enough space to build proposed filesystem while setting up superblock.
Please help!
Thank you in advance!
Click to expand...
Click to collapse
I don't know who or what did that to your partition table, but partitions 10-12 are not right. It looks like mke2fs is complaining because your userdata partition is only ~178KB. I'm also a bit concerned that you've extended the media partition as far as you have. You might have some additional problems there.
The easiest way for you to get started on a fix is to get into fastboot mode with FFF and run...
Code:
fastboot oem format
That will bring your partition table back to stock, so you can run those mke2fs commands to remake those filesystems on the two partitions. You'll also have to remake the media partition in parted. You can find some instructions on how to do that here...
http://forum.xda-developers.com/showthread.php?t=1658885
Hey,
My current ROM is fine, but I can't mount data & cache in TWRP.
Nothing happens when I click mount data or mount cache in TWRP 2.6.3.1
I reflashed twrp two times and checked the md5sum.
When I try to backup my rom:
When I try a factory reset:
This is what I tried in fastboot:
Code:
fastboot oem format
...
OKAY [ 0.064s]
finished. total time: 0.065s
fastboot oem idme bootmode 4000
...
OKAY [ 0.081s]
finished. total time: 0.081s
fastboot reboot
rebooting...
finished. total time: -0.000s
adb shell cat /proc/partitions
major minor #blocks name
7 0 8348 loop0
179 0 7553024 mmcblk0
179 1 128 mmcblk0p1
179 2 256 mmcblk0p2
179 3 10240 mmcblk0p3
179 4 196608 mmcblk0p4
179 5 16384 mmcblk0p5
179 6 65536 mmcblk0p6
179 7 10240 mmcblk0p7
179 8 5120 mmcblk0p8
179 9 524288 mmcblk0p9
179 10 1164288 mmcblk0p10
179 11 262144 mmcblk0p11
179 12 5254144 mmcblk0p12
179 64 512 mmcblk0boot1
179 32 512 mmcblk0boot0
254 0 8347 dm-0
The parted command isn't working for me.
I have never repartitioned them as far as I know.
Wha't wrong with my partitions?
Without Ninthsense and Roothorick this would not be possible, and all credit for this belongs to them!
This is a guide for installing a recovery.img from your SDcard, without the use of your USB port, ODIN, or CWM
This is through the android terminal emulator app, with root permissions. or via ADB over WIFI
**The issue: I cannot transfer data at all through my USB port and was not gonna attempt flashing out of fear of brick!
I was able to extract the recovery.img from the ODIN flashable CWMrecovery 6.0.1.2 package developed by Terinfire but was unable to create a CWM flashable zip because I lack the expertise. (I still have my old CWM touch recovery developed by Aquethys).
After reaching out Ninthsense and Roothorick helped me with the command line to make this possible.
Whats needed:
1) a broke USB (don't attempt this unless its the very last option)
2) the recovery image file for this phone
3) ROOT ACCESS!!!
4) a terminal app or ADB over WIFI
Below is the Partition Table for the Glide(thanks ninthsense):
Starting recovery on Fri Dec 28 19:23:18 2012
framebuffer: fd 4 (480 x 800)
ClockworkMod Recovery v6.0.0.1
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/mmcblk0p9 (null) 0
2 /cache ext4 /dev/block/mmcblk0p3 (null) 0
3 /data ext4 /dev/block/mmcblk0p6 (null) 0
4 /recovery emmc /dev/block/mmcblk0p8 (null) 0
5 /sdcard vfat /dev/block/mmcblk0p4 /dev/block/mmcblk0 0
6 /system ext4 /dev/block/mmcblk0p2 (null) 0
7 /efs ext4 /dev/block/mmcblk0p1 (null) 0
To connect ADB over WIFI (thanks ninthsense):
Connect your phone and laptop to your wifi.
Goto Settings developer options - turn on "ADB over netwrok"
adb connect 192.168.x.x:5555
**if doing this using ADB you must enter a shell and run the su command
adb shell
su
Now do the following:
1) move "recovery.img" to root of SDcard
2) backup current recovery:
(if in terminal and not ADB over WIFI you must enter "su" before continuing)
dd if=/dev/block/mmcblk0p8 of=/sdcard/current-recovery.img
3) Install new recovery:
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p8
Thats it!!!! reboot recovery and enjoy!!!
Hey you forgot the first step :laugh: , on how to connect to the device through "ADB over network".
ninthsense said:
Hey you forgot the first step :laugh: , on how to connect to the device through "ADB over network".
Click to expand...
Click to collapse
I will modify the OP, I figured I would list the terminal steps because of its ease of use Ill add both!
**edit** done! how's that looking?
Cprager said:
I will modify the OP, I figured I would list the terminal steps because of its ease of use Ill add both!
Click to expand...
Click to collapse
Add the list of partitions as well, maybe somebody will find it useful for backing up and restoring something else as well.
ninthsense said:
Add the list of partitions as well, maybe somebody will find it useful for backing up and restoring something else as well.
Click to expand...
Click to collapse
done!
You're a life saver!!!!
Cprager said:
Without Ninthsense and Roothorick this would not be possible, and all credit for this belongs to them!
This is a guide for installing a recovery.img from your SDcard, without the use of your USB port, ODIN, or CWM
This is through the android terminal emulator app, with root permissions. or via ADB over WIFI
**The issue: I cannot transfer data at all through my USB port and was not gonna attempt flashing out of fear of brick!
I was able to extract the recovery.img from the ODIN flashable CWMrecovery 6.0.1.2 package developed by Terinfire but was unable to create a CWM flashable zip because I lack the expertise. (I still have my old CWM touch recovery developed by Aquethys).
After reaching out Ninthsense and Roothorick helped me with the command line to make this possible.
Whats needed:
1) a broke USB (don't attempt this unless its the very last option)
2) the recovery image file for this phone
3) ROOT ACCESS!!!
4) a terminal app or ADB over WIFI
Below is the Partition Table for the Glide(thanks ninthsense):
Starting recovery on Fri Dec 28 19:23:18 2012
framebuffer: fd 4 (480 x 800)
ClockworkMod Recovery v6.0.0.1
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/mmcblk0p9 (null) 0
2 /cache ext4 /dev/block/mmcblk0p3 (null) 0
3 /data ext4 /dev/block/mmcblk0p6 (null) 0
4 /recovery emmc /dev/block/mmcblk0p8 (null) 0
5 /sdcard vfat /dev/block/mmcblk0p4 /dev/block/mmcblk0 0
6 /system ext4 /dev/block/mmcblk0p2 (null) 0
7 /efs ext4 /dev/block/mmcblk0p1 (null) 0
To connect ADB over WIFI (thanks ninthsense):
Connect your phone and laptop to your wifi.
Goto Settings developer options - turn on "ADB over netwrok"
adb connect 192.168.x.x:5555
**if doing this using ADB you must enter a shell and run the su command
adb shell
su
Now do the following:
1) move "recovery.img" to root of SDcard
2) backup current recovery:
(if in terminal and not ADB over WIFI you must enter "su" before continuing)
dd if=/dev/block/mmcblk0p8 of=/sdcard/current-recovery.img
3) Install new recovery:
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p8
Thats it!!!! reboot recovery and enjoy!!!
Click to expand...
Click to collapse
:victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory:
I cannot thank you enough for this post! I was trying to locate that partition since the USB doesn't work on the Glide I am repairing, and alas! - you came and saved the day!
Thanks alot, mate!
:good::good::good::good::good::good::good::good::good::good::good::good::good::good::good::good:
Hello guys, Im a experienced user with ROMs, recovery, boot and etc but i have a problem now, and i will try to explain shortly:
AT THE MOMENT:
- I get into fastboot mode
- I get into odin downloading mode
- I have a connection with pc(win8.1)
- The computer can communicate with the phone in fastboot mode and adb(recovery)
- the drivers are installed correctly
- BOOTLOOPIN ON GOOGLE
How this happened:
I was minding my own business and my phone was on my desk when it suddenly rebooted itself and then it bootlooped forever. I had some situations when it rebooted itself but always ended in a successful boot, this time it didnt wanted to start.
What have i done till now:
- First thing i entered recovery(TWRP) and dirtyflashed my current rom version and wiped dalvik/cache. (unsuccessful)
- after several times doing the dirtyflash i finally decided to make a complete hard/factory reset the result was none (after i rebooted to recovery again ALL THE DATA WAS THERE WITHOUT ANY DIFFERENCE, like nothing happened)
- Second thing i tried flashing with Odin3 in Download mode - result was unsuccessful (Operation failed at ~45% and the phone freezed) - I tried this several times with different versions of the software and firmware on 2 different computers (same result)
- Third thing i tried to push img with ADB - no result
- Fourth thing i tried the NexusToolKit and using the UNROOT/GOBACK TO STOCK/SOFTBRICK option - operation was SUCCESSFUL (that's what the cmd console said) BUT, after around 15 mins booting on GOOGLE it started booting my old custom ROM that i had (CarbonROM) with its custom boot animation and i was WTF?! - after several minutes it finally booted the rom. As i tried to unlocked it the touchscreen and processing was very slow and unresponsive, it took around 10-15sec. to unlock the phone and then opening the home menu, and in a short delay the phone restarted itself.
- I tried deleting system,data,userdata,cache and etc with the toolkit but same resault - when i rebooted the information was still there.
- I readed alot on the forums and i found that it maybe caused my my eMMC but long ago i checked with a google store app that my chip is from the safe ones and cant go brickbug.
Some information about the phone:
Product Name - tuna
Variant - maguro 16gb
HW version - 9
Bootloader Version - primemd04
baseband version - I9250XXLJ1
carrier info - none
serial number - 0149C7ED0D020018
signing - production
lock state- unlocked
if anything needed pls ask
valkata1212 said:
Hello guys, Im a experienced user with ROMs, recovery, boot and etc but i have a problem now, and i will try to explain shortly:
AT THE MOMENT:
- I get into fastboot mode
- I get into odin downloading mode
- I have a connection with pc(win8.1)
- The computer can communicate with the phone in fastboot mode and adb(recovery)
- the drivers are installed correctly
- BOOTLOOPIN ON GOOGLE
How this happened:
I was minding my own business and my phone was on my desk when it suddenly rebooted itself and then it bootlooped forever. I had some situations when it rebooted itself but always ended in a successful boot, this time it didnt wanted to start.
What have i done till now:
- First thing i entered recovery(TWRP) and dirtyflashed my current rom version and wiped dalvik/cache. (unsuccessful)
- after several times doing the dirtyflash i finally decided to make a complete hard/factory reset the result was none (after i rebooted to recovery again ALL THE DATA WAS THERE WITHOUT ANY DIFFERENCE, like nothing happened)
- Second thing i tried flashing with Odin3 in Download mode - result was unsuccessful (Operation failed at ~45% and the phone freezed) - I tried this several times with different versions of the software and firmware on 2 different computers (same result)
- Third thing i tried to push img with ADB - no result
- Fourth thing i tried the NexusToolKit and using the UNROOT/GOBACK TO STOCK/SOFTBRICK option - operation was SUCCESSFUL (that's what the cmd console said) BUT, after around 15 mins booting on GOOGLE it started booting my old custom ROM that i had (CarbonROM) with its custom boot animation and i was WTF?! - after several minutes it finally booted the rom. As i tried to unlocked it the touchscreen and processing was very slow and unresponsive, it took around 10-15sec. to unlock the phone and then opening the home menu, and in a short delay the phone restarted itself.
- I tried deleting system,data,userdata,cache and etc with the toolkit but same resault - when i rebooted the information was still there.
- I readed alot on the forums and i found that it maybe caused my my eMMC but long ago i checked with a google store app that my chip is from the safe ones and cant go brickbug.
Some information about the phone:
Product Name - tuna
Variant - maguro 16gb
HW version - 9
Bootloader Version - primemd04
baseband version - I9250XXLJ1
carrier info - none
serial number - 0149C7ED0D020018
signing - production
lock state- unlocked
if anything needed pls ask
Click to expand...
Click to collapse
first question is, what do you mean by download mode and odin? are you not using the google galaxy nexus? for all i know, that device has fastboot but not download mode, which is a proprietary fork of fastboot (i think). am i wrong? how do you boot into download mode?
your emmc might be locked in read-only mode. when the emmc firmware data structures get corrupted beyond the firmware capacity to fix them, the firmware downgrades to read-only mode, in which you can at least recover the stored information (or part of it).
grab a different custom recovery version than the one in your phone and "fastboot flash" it. then get into the recovery. do you get the newly flashed recovery or the old one that was already on your phone?
Lanchon said:
first question is, what do you mean by download mode and odin? are you not using the google galaxy nexus? for all i know, that device has fastboot but not download mode, which is a proprietary fork of fastboot (i think). am i wrong? how do you boot into download mode?
your emmc might be locked in read-only mode. when the emmc firmware data structures get corrupted beyond the firmware capacity to fix them, the firmware downgrades to read-only mode, in which you can at least recover the stored information (or part of it).
grab a different custom recovery version than the one in your phone and "fastboot flash" it. then get into the recovery. do you get the newly flashed recovery or the old one that was already on your phone?
Click to expand...
Click to collapse
Im using the Samsung galaxy nexus and under "download mode odin" i mean VOLUME DOWN + power button. Phone got both odin and fastboot. Fastboot works in bootloader mode ( volume up + volume down + power button).
I already tried with another custom recovery different from the one currently using, yes it flashes the new one - i tried with philz and cw recovery, both booted but again i couldnt wipe everything.
Lanchon said:
first question is, what do you mean by download mode and odin? are you not using the google galaxy nexus? for all i know, that device has fastboot but not download mode, which is a proprietary fork of fastboot (i think). am i wrong? how do you boot into download mode?
your emmc might be locked in read-only mode. when the emmc firmware data structures get corrupted beyond the firmware capacity to fix them, the firmware downgrades to read-only mode, in which you can at least recover the stored information (or part of it).
grab a different custom recovery version than the one in your phone and "fastboot flash" it. then get into the recovery. do you get the newly flashed recovery or the old one that was already on your phone?
Click to expand...
Click to collapse
the galaxy nexus certainly has download mode/Odin.
it is a Samsung device, they all have this.
just like even the HTC nexus device have hboot
to the op, I wish you much luck, I cannot comment much on this, I had similar happen once and I used "fastboot boot recovery.img" and luckily was able to fix my device from there, but I see this happen sometimes to others (few threads on here about it) where they weren't able to get her back up and running I hope that is not the case for you.
---------- Post added at 12:13 AM ---------- Previous post was at 12:08 AM ----------
oh, also, do you have multiple batteries? have you tried another battery? seems simple enough, but I've heard of devices acting awry similar to this when the battery has taken a crap. (sometime the battery will act as if it's charging and holding charge just fine, but it never actually gets itself to fully charged, for example I think fully charged battery should read about 4.12 with a voltmeter, but one that's gone faulty doesn't reach that, is as if it just cannot provide enough juice needed to get things done causing the device to fail while trying to use that battery)
ashclepdia said:
the galaxy nexus certainly has download mode/Odin.
it is a Samsung device, they all have this.
just like even the HTC nexus device have hboot
to the op, I wish you much luck, I cannot comment much on this, I had similar happen once and I used "fastboot boot recovery.img" and luckily was able to fix my device from there, but I see this happen sometimes to others (few threads on here about it) where they weren't able to get her back up and running I hope that is not the case for you.
---------- Post added at 12:13 AM ---------- Previous post was at 12:08 AM ----------
oh, also, do you have multiple batteries? have you tried another battery? seems simple enough, but I've heard of devices acting awry similar to this when the battery has taken a crap. (sometime the battery will act as if it's charging and holding charge just fine, but it never actually gets itself to fully charged, for example I think fully charged battery should read about 4.12 with a voltmeter, but one that's gone faulty doesn't reach that, is as if it just cannot provide enough juice needed to get things done causing the device to fail while trying to use that battery)
Click to expand...
Click to collapse
I have one and only stock battery. TWRP has a battery counter and it seems ok it stays always on 100% when plugged in the usb. I will try to check it with a voltmeter but i doubt that the problem is from the battery.
Waiting Lanchon to asnwer
valkata1212 said:
Im using the Samsung galaxy nexus and under "download mode odin" i mean VOLUME DOWN + power button. Phone got both odin and fastboot. Fastboot works in bootloader mode ( volume up + volume down + power button).
I already tried with another custom recovery different from the one currently using, yes it flashes the new one - i tried with philz and cw recovery, both booted but again i couldnt wipe everything.
Click to expand...
Click to collapse
ok! i had 2 galaxy nexus and never realized they had download mode lol, or at least i dont remember knowing!
so to confirm: you flash any recovery and it sticks and works. you flash it using "fastboot flash recovery x.img". you ARE NOT booting it directly with "fastboot boot x.img". confirm?
this means that your emmc is not fully locked down, and is good news.
Lanchon said:
ok! i had 2 galaxy nexus and never realized they had download mode lol, or at least i dont remember knowing!
so to confirm: you flash any recovery and it sticks and works. you flash it using "fastboot flash recovery x.img". you ARE NOT booting it directly with "fastboot boot x.img". confirm?
this means that your emmc is not fully locked down, and is good news.
Click to expand...
Click to collapse
BAD NEWS: NOPE, i do not confirm, i only did fastboot boot x.img!! Now i tried fastboot flash recovery x.img, restarted bootloader, and entered to recovery and - bang - old recovery is there. It's seems that my phone is a goner right??
valkata1212 said:
BAD NEWS: NOPE, i do not confirm, i only did fastboot boot x.img!! Now i tried fastboot flash recovery x.img, restarted bootloader, and entered to recovery and - bang - old recovery is there. It's seems that my phone is a goner right??
Click to expand...
Click to collapse
ok your emmc is locked in read-only mode. i had a gnex brought to me in that condition and there was absolutely nothing i could do to fix it. writes are ignored by the emmc (but return "ok" to the kernel) and take near zero time. i tried issuing emmc erase commands, etc, and they were all ignored. i tried booting via USB (via an OMAP debugger) and i couldn't accomplish anything. there is a thread here in xda that details what i tried and what i found out. in the end, i had to replace the motherboard of that phone.
but... i know more now
there is one thing you could try: completely reset the emmc. but really, given that you didnt follow a simple fastboot flash instruction and did a fastboot boot instead makes me think that you wont be able to correctly follow the procedure to completion, but we can try.
the trick is to resize the boot partitions, and during that operation the complete emmc will be wiped. this includes the corrupted FTL data structures inside the emmc that i suspect are causing the read-only lock.
so, caveats:
-this has never ever been tried on this device or this emmc. but it was done successfully in some kindles of the same era, which have a different but similar emmc (both are samsung emmcs). take a look here but DO NOT follow that procedure:
http://forum.xda-developers.com/showthread.php?t=2413453
-everything gets wiped! including bootloaders, partition table, partitions, etc.
-the kindle can boot from usb, but the gnex cant. if the gnex is shut down or rebooted after wiping the emmc but before reconstituting the boot chain, THE DEVICE WILL BE BRICKED FOREVER and never boot again.
-if something goes wrong, BRICK.
-the procedure we will improvise and try can be plain wrong, and the device might BRICK.
-the emmc might ignore the boot partition resize command, in which case it wont brick any further, but this whole adventure would be a failure.
-actually i lied. if the device is rebooted without a proper boot chain, there is a boot-over-USB OMAP debugger that can boot it into a monitor. but reconstituting the boot chain from there might be impossible.
read everything twice and make sure you understand everything i write. ASK instead of guessing!
FROM NOW ON: everything you do, you will do it in latest release of TWRP for your device. before doing ANYTHING here, each time you boot your phone you will enter fastboot mode and "fastboot boot" this TWRP image. then you will "adb shell" to it, or "adb push/pull" to/from it.
first i need a map of your emmc. adb shell then run this and paste the output:
ls -l /dev/block/mmc*
ls -l /dev/block/platform/[whatever device name]/by-name
fdisk -l /dev/block/mmcblk0
---------- Post added at 03:25 PM ---------- Previous post was at 03:19 PM ----------
please post outputs in [ CODE ] tags so that its more readable.
Lanchon said:
ok your emmc is locked in read-only mode. i had a gnex brought to me in that condition and there was absolutely nothing i could do to fix it. writes are ignored by the emmc (but return "ok" to the kernel) and take near zero time. i tried issuing emmc erase commands, etc, and they were all ignored. i tried booting via USB (via an OMAP debugger) and i couldn't accomplish anything. there is a thread here in xda that details what i tried and what i found out. in the end, i had to replace the motherboard of that phone.
but... i know more now
there is one thing you could try: completely reset the emmc. but really, given that you didnt follow a simple fastboot flash instruction and did a fastboot boot instead makes me think that you wont be able to correctly follow the procedure to completion, but we can try.
the trick is to resize the boot partitions, and during that operation the complete emmc will be wiped. this includes the corrupted FTL data structures inside the emmc that i suspect are causing the read-only lock.
so, caveats:
-this has never ever been tried on this device or this emmc. but it was done successfully in some kindles of the same era, which have a different but similar emmc (both are samsung emmcs). take a look here but DO NOT follow that procedure:
http://forum.xda-developers.com/showthread.php?t=2413453
-everything gets wiped! including bootloaders, partition table, partitions, etc.
-the kindle can boot from usb, but the gnex cant. if the gnex is shut down or rebooted after wiping the emmc but before reconstituting the boot chain, THE DEVICE WILL BE BRICKED FOREVER and never boot again.
-if something goes wrong, BRICK.
-the procedure we will improvise and try can be plain wrong, and the device might BRICK.
-the emmc might ignore the boot partition resize command, in which case it wont brick any further, but this whole adventure would be a failure.
-actually i lied. if the device is rebooted without a proper boot chain, there is a boot-over-USB OMAP debugger that can boot it into a monitor. but reconstituting the boot chain from there might be impossible.
read everything twice and make sure you understand everything i write. ASK instead of guessing!
FROM NOW ON: everything you do, you will do it in latest release of TWRP for your device. before doing ANYTHING here, each time you boot your phone you will enter fastboot mode and "fastboot boot" this TWRP image. then you will "adb shell" to it, or "adb push/pull" to/from it.
first i need a map of your emmc. adb shell then run this and paste the output:
ls -l /dev/block/mmc*
ls -l /dev/block/platform/[whatever device name]/by-name
fdisk -l /dev/block/mmcblk0
---------- Post added at 03:25 PM ---------- Previous post was at 03:19 PM ----------
please post outputs in [ CODE ] tags so that its more readable.
Click to expand...
Click to collapse
Im doing the adb shell commands now but I have 1 question: How to find my DEVICE NAME?? im not sure what to type from all the data i get, i will wait until you respond to proceed.
EDIT: This is what i get for now:
Code:
~ # ←[6nls -l /dev/block/mmc*
ls -l /dev/block/mmc*
__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!
brw------- root root 179, 0 2015-02-05 15:26 mmcblk0
brw------- root root 179, 8 2015-02-05 15:26 mmcblk0boot0
brw------- root root 179, 16 2015-02-05 15:26 mmcblk0boot1
brw------- root root 179, 1 2015-02-05 15:26 mmcblk0p1
brw------- root root 259, 2 2015-02-05 15:26 mmcblk0p10
brw------- root root 259, 3 2015-02-05 15:26 mmcblk0p11
brw------- root root 259, 4 2015-02-05 15:26 mmcblk0p12
brw------- root root 259, 5 2015-02-05 15:26 mmcblk0p13
brw------- root root 179, 2 2015-02-05 15:26 mmcblk0p2
brw------- root root 179, 3 2015-02-05 15:26 mmcblk0p3
brw-rw---- radio radio 179, 4 2015-02-05 15:26 mmcblk0p4
brw------- root root 179, 5 2015-02-05 15:26 mmcblk0p5
brw------- root root 179, 6 2015-02-05 15:26 mmcblk0p6
brw------- root root 179, 7 2015-02-05 15:26 mmcblk0p7
brw------- root root 259, 0 2015-02-05 15:26 mmcblk0p8
brw-rw---- radio radio 259, 1 2015-02-05 15:26 mmcblk0p9
~ # ←[6n
Code:
~ # ←[6nls -l /dev/block/platform/
ls -l /dev/block/platform/
__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!
drwxr-xr-x root root 2015-02-05 15:26 omap
~ # ←[6n
Code:
~ # ←[6nls -l /dev/block/platform/omap
ls -l /dev/block/platform/omap
__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!
drwxr-xr-x root root 2015-02-05 15:26 omap2_mcspi.3
drwxr-xr-x root root 2015-02-05 15:26 omap_hsmmc.0
~ # ←[6n
Code:
~ # ←[6nfdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 1923584 15388671+ ee EFI GPT
Partition 1 does not end on cylinder boundary
~ # ←[6n
Tell me if you need something
valkata1212 said:
How to find my DEVICE NAME??
Click to expand...
Click to collapse
you should try all options!
but i think it is probably omap/omap_hsmmc.0
are you sure you are "fastboot boot" booting into the latest TWRP recovery before doing adb shell??? your fdisk command doesn't support GPT disks, that is very strange.
also do:
cat /proc/partitions
cat /proc/mounts
also from the pc (are you using linux or windows?):
create a PC folder and cd into it, then:
adb pull -p /dev/block/mmcblk0boot0
adb pull -p /dev/block/mmcblk0boot1
tell me the exact size of the two downloaded files. KEEP THESE FILES SAFE!
Lanchon said:
you should try all options!
but i think it is probably omap/omap_hsmmc.0
are you sure you are "fastboot boot" booting into the latest TWRP recovery before doing adb shell??? your fdisk command doesn't support GPT disks, that is very strange.
also do:
cat /proc/partitions
cat /proc/mounts
also from the pc (are you using linux or windows?):
create a PC folder and cd into it, then:
adb pull -p /dev/block/mmcblk0boot0
adb pull -p /dev/block/mmcblk0boot1
tell me the exact size of the two downloaded files. KEEP THESE FILES SAFE!
Click to expand...
Click to collapse
I can 100% confirm Im on the newest TWRP recovery version v2.8.4.0 flashed with fastboot boot x.img
And here are the results i got, and also those new commands:
Code:
~ # ←[6nls -l /dev/block/platform/omap/omap_hsmmc.0/by-name
ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name
__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!
lrwxrwxrwx root root 2015-02-05 18:06 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2015-02-05 18:06 cache -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2015-02-05 18:06 dgs -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2015-02-05 18:06 efs -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2015-02-05 18:06 metadata -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2015-02-05 18:06 misc -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2015-02-05 18:06 param -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2015-02-05 18:06 radio -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2015-02-05 18:06 recovery -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2015-02-05 18:06 sbl -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2015-02-05 18:06 system -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2015-02-05 18:06 userdata -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2015-02-05 18:06 xloader -> /dev/block/mmcblk0p1
~ # ←[6n
Code:
~ # ←[6ncat /proc/partitions
cat /proc/partitions
major minor #blocks name
31 0 1024 mtdblock0
179 0 15388672 mmcblk0
179 1 128 mmcblk0p1
179 2 3584 mmcblk0p2
179 3 20480 mmcblk0p3
179 4 8192 mmcblk0p4
179 5 4096 mmcblk0p5
179 6 4096 mmcblk0p6
179 7 8192 mmcblk0p7
259 0 12224 mmcblk0p8
259 1 16384 mmcblk0p9
259 2 669696 mmcblk0p10
259 3 442368 mmcblk0p11
259 4 14198767 mmcblk0p12
259 5 64 mmcblk0p13
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
~ # ←[6n
Code:
~ # ←[6ncat /proc/mounts
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
tmpfs /tmp tmpfs rw,seclabel,relatime 0 0
/dev/block/mmcblk0p11 /cache ext4 rw,seclabel,relatime,user_xattr,barrier=1,data
=ordered 0 0
/dev/block/mmcblk0p12 /data ext4 rw,seclabel,relatime,user_xattr,barrier=1,data=
ordered 0 0
/dev/block/mmcblk0p12 /sdcard ext4 rw,seclabel,relatime,user_xattr,barrier=1,dat
a=ordered 0 0
~ # ←[6n
AND THIS IS WHAT I GET WHEN I TRIED TO PULL THE FILES U ASKED: (both mmcblk0boot0/1)
Code:
E:\WugFresh Development\Nexus Root Toolkit\data\MMC>adb pull -p /dev/block/mmcbl
k0boot0
remote object '/dev/block/mmcblk0boot0' not a file or directory
lol please repeat:
ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name
using a wider terminal so that the output can be read
your partitions are:
Code:
major minor #blocks name
31 0 1024 mtdblock0
179 0 15388672 mmcblk0
179 1 128 mmcblk0p1 xloader
179 2 3584 mmcblk0p2 sbl
179 3 20480 mmcblk0p3 efs
179 4 8192 mmcblk0p4 param
179 5 4096 mmcblk0p5 misc
179 6 4096 mmcblk0p6 dgs
179 7 8192 mmcblk0p7 boot
259 0 12224 mmcblk0p8 recovery
259 1 16384 mmcblk0p9 radio
259 2 669696 mmcblk0p10 system
259 3 442368 mmcblk0p11 cache
259 4 14198767 mmcblk0p12 userdata
259 5 64 mmcblk0p13 metadata
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
---------- Post added at 03:34 PM ---------- Previous post was at 03:28 PM ----------
cat /proc/mtd
cat /proc/emmc
dd if=/dev/block/mmcblk0boot0 of=/tmp/mmcblk0boot0
dd if=/dev/block/mmcblk0boot1 of=/tmp/mmcblk0boot1
from the PC:
adb pull /tmp/mmcblk0boot0
adb pull /tmp/mmcblk0boot1
---------- Post added at 03:36 PM ---------- Previous post was at 03:34 PM ----------
get the latest philz touch recovery for gnex. fastboot boot into it, then try this again:
fdisk -l /dev/block/mmcblk0
Lanchon said:
lol please repeat:
ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name
using a wider terminal so that the output can be read
your partitions are:
Code:
major minor #blocks name
31 0 1024 mtdblock0
179 0 15388672 mmcblk0
179 1 128 mmcblk0p1 xloader
179 2 3584 mmcblk0p2 sbl
179 3 20480 mmcblk0p3 efs
179 4 8192 mmcblk0p4 param
179 5 4096 mmcblk0p5 misc
179 6 4096 mmcblk0p6 dgs
179 7 8192 mmcblk0p7 boot
259 0 12224 mmcblk0p8 recovery
259 1 16384 mmcblk0p9 radio
259 2 669696 mmcblk0p10 system
259 3 442368 mmcblk0p11 cache
259 4 14198767 mmcblk0p12 userdata
259 5 64 mmcblk0p13 metadata
179 16 2048 mmcblk0boot1
179 8 2048 mmcblk0boot0
---------- Post added at 03:34 PM ---------- Previous post was at 03:28 PM ----------
cat /proc/mtd
cat /proc/emmc
dd if=/dev/block/mmcblk0boot0 of=/tmp/mmcblk0boot0
dd if=/dev/block/mmcblk0boot1 of=/tmp/mmcblk0boot1
from the PC:
adb pull /tmp/mmcblk0boot0
adb pull /tmp/mmcblk0boot1
---------- Post added at 03:36 PM ---------- Previous post was at 03:34 PM ----------
get the latest philz touch recovery for gnex. fastboot boot into it, then try this again:
fdisk -l /dev/block/mmcblk0
Click to expand...
Click to collapse
Code:
~ # ←[6ncat /proc/mtd
cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00001000 "w25q80"
~ # ←[6n
hmm :?
Code:
~ # ←[6ncat /proc/emmc
cat /proc/emmc
cat: can't open '/proc/emmc': No such file or directory
~ # ←[6n
I downloaded and fastboot booted latest phillz and i did the command again, but the resault is the same:
Code:
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 1923584 15388671+ ee EFI GPT
Partition 1 does not end on cylinder boundary
~ #
So i pulled both mmcblk files, they are 2,048 KB each.
this is going to be redundant, buy do it just in case:
adb pull -p /dev/block/mmcblk0p##
where ## is 1 to 9 and 13 (skip 10, 11, 12)
Lanchon said:
this is going to be redundant, buy do it just in case:
adb pull -p /dev/block/mmcblk0p##
where ## is 1 to 9 and 13 (skip 10, 11, 12)
Click to expand...
Click to collapse
Done. had to do the trick with dd if=/dev/block/mmcblk0p of=/tmp/mmcblk0p first then adb pull /tmp/mmcblk0p, but i got the files now, their size range are from 64 KB to 20,480 KB (largest one)
Whats next:?
EDIT: first reboot into clean latest TWRP
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-beg bs=1M count=96
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
from the PC:
adb pull -p /tmp/mmcblk0-beg
adb pull -p /tmp/mmcblk0-end
beg should be 96MB
end should be 28MB
verify, that on the PC.
DO NOT REBOOT THE PHONE FROM THIS POINT FORWARD!
we want those files in the ramdrive
Lanchon said:
EDIT: first reboot into clean latest TWRP
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-beg bs=1M count=96
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
from the PC:
adb pull -p /tmp/mmcblk0-beg
adb pull -p /tmp/mmcblk0-end
beg should be 96MB
end should be 28MB
verify, that on the PC.
DO NOT REBOOT THE PHONE FROM THIS POINT FORWARD!
we want those files in the ramdrive
Click to expand...
Click to collapse
downloaded beg and i confirm its 98 MB but i have a problem with END, it doesnt want to copy it im tmp, i deleted the "skip=15000 part" and it came out 250 MB!! but couldnt pull it cuz it game me "no space left on device"
What should i do? Reboot and do this again or ?
valkata1212 said:
downloaded beg and i confirm its 98 MB but i have a problem with END, it doesnt want to copy it im tmp, i deleted the "skip=15000 part" and it came out 250 MB!! but couldnt pull it cuz it game me "no space left on device"
What should i do? Reboot and do this again or ?
Click to expand...
Click to collapse
reboot
redo first dd
no need to pull again
redo second dd, and tell me the error message or whatever it outputs. form now on, i recommend you dont try to fix things without posting first, one error can mean BRICK.
Lanchon said:
reboot
redo first dd
no need to pull again
redo second dd, and tell me the error message or whatever it outputs. form now on, i recommend you dont try to fix things without posting first, one error can mean BRICK.
Click to expand...
Click to collapse
Code:
E:\WugFresh Development\Nexus Root Toolkit\data\MMC>adb shell
~ # ←[6ndd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
It doesnt start the operation dont know why, just like the first time i did. Beg finished for 2-3 sec but -end just doesnt show up.
valkata1212 said:
Code:
E:\WugFresh Development\Nexus Root Toolkit\data\MMC>adb shell
~ # ←[6ndd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
dd if=/dev/block/mmcblk0 of=/tmp/mmcblk0-end bs=1M skip=15000
It doesnt start the operation dont know why, just like the first time i did. Beg finished for 2-3 sec but -end just doesnt show up.
Click to expand...
Click to collapse
you are saying:
-no error displayed
-no file created
?
does the phone stop responding?
The problem started when I flashed the philz touch recovery, and used the "Clear for new rom" in the wipe menu. I then proceeded to try to install two different roms unsuccessfully, as well as trying two different recoveries, and they always return the same error:
Code:
Mount:failed to mount /dev/block/mmcblk0p6
This is a strange error, since using the df command returns the following results:
Code:
tmpfs 683452 160 683292 0% /dev
tmpfs 683452 652 682800 0% /tmp
/dev/block/mmcblk0p42
273948 4408 269540 2% /cache
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /data
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /sdcard
/dev/block/mmcblk1p1 15540224 4846896 10693328 31% /external_sd
If I am understanding this correctly, the ROM should be installed on mmcblk0p44 since it is the internal drive and always has been, not mmcblk0p6, and I don't see why it needs access to mmcblk0p6.
I tried a method of repairing the filesystem using a mkfs.ext4 file, found in a blog.
I then used the following commands after putting the mkfs file in /tmp:
Code:
chmod 777 /tmp/mkfs.ext4
/tmp/mkfs.ext4 -b 4096 -O ^huge_file,^dir_nlink,^ext_attr,^resize_inode,^extra_isize -m 0 /dev/block/mmcblk0p37
After this, I managed to get a ROM to report installing successfully, but when I booted the phone, it got stuck in a boot loop which was better than the immediate booting to recovery, and am now getting the same error again, and I can't boot the phone at all, it just goes into recovery.
I have tried to restore from previous backups, with no luck.
Can anyone help?
jacobjake683 said:
The problem started when I flashed the philz touch recovery, and used the "Clear for new rom" in the wipe menu. I then proceeded to try to install two different roms unsuccessfully, as well as trying two different recoveries, and they always return the same error:
Code:
Mount:failed to mount /dev/block/mmcblk0p6
This is a strange error, since using the df command returns the following results:
Code:
tmpfs 683452 160 683292 0% /dev
tmpfs 683452 652 682800 0% /tmp
/dev/block/mmcblk0p42
273948 4408 269540 2% /cache
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /data
/dev/block/mmcblk0p44
4506568 707644 3798924 16% /sdcard
/dev/block/mmcblk1p1 15540224 4846896 10693328 31% /external_sd
If I am understanding this correctly, the ROM should be installed on mmcblk0p44 since it is the internal drive and always has been, not mmcblk0p6, and I don't see why it needs access to mmcblk0p6.
I tried a method of repairing the filesystem using a mkfs.ext4 file, found in a blog.
I then used the following commands after putting the mkfs file in /tmp:
Code:
chmod 777 /tmp/mkfs.ext4
/tmp/mkfs.ext4 -b 4096 -O ^huge_file,^dir_nlink,^ext_attr,^resize_inode,^extra_isize -m 0 /dev/block/mmcblk0p37
After this, I managed to get a ROM to report installing successfully, but when I booted the phone, it got stuck in a boot loop which was better than the immediate booting to recovery, and am now getting the same error again, and I can't boot the phone at all, it just goes into recovery.
I have tried to restore from previous backups, with no luck.
Can anyone help?
Click to expand...
Click to collapse
Could you please provide me with the mkfs.ext4 binary? The link in that blog has expired.
I'm also having problems with my partitions and can't flash anything. I can't relock the bootloader either.
If you have stock recovery installed on your phone, you should relock the bootloader. Then run the ruu. That should fix the problem.
Thanks in advance.
uhm said:
Could you please provide me with the mkfs.ext4 binary? The link in that blog has expired.
I'm also having problems with my partitions and can't flash anything. I can't relock the bootloader either.
If you have stock recovery installed on your phone, you should relock the bootloader. Then run the ruu. That should fix the problem.
Thanks in advance.
Click to expand...
Click to collapse
Sorry, but I do not have the file anymore due to the fact that I have gone through various hard drive formats and I don't seem to have it on the HTC anymore.
No problem. Thanks for your reply.