[HELP] Nexus 5 die, can't enter recovery mode (only Bootloader mode) - Nexus 5 Q&A, Help & Troubleshooting

Hello,
My phone fell to the floor and since than can't boot.
I see the google logo and then it turning off.
I can't enter recovery mode.
I can enter bootloader mode, tried to re-flash the rom (factory) with -w (wipe) and still can't boot / enter recovery mode.
Any suggestions?
Thanks!

time for a new phone

If the screen is okay, get a nexus 5 with a busted screen and swap internal components.

I have the same problem, but allow me to add some more details:
When trying to go to recovery, i got a dead droid with a red sign on it. See my post on android enthusiasts: /questions/169999/stuck-in-bootloop-and-flash-recovery-doesnt-work-on-nexus-5/170395 (can't post url from my account)
From fast boot, I could flash a recovery (my fastboot is unlocked) but it gave no results: still had the dead droid (tried with twrp, cwm, and stock rom).
After that I gave up trying to get back my data and tried flashing the whole stock rom, but it when bad. Now when trying to flash anything I got errors:
Code:
$ sudo ./fastboot flash cache cache.img
target reported max download size of 1073741824 bytes
erasing 'cache'...
OKAY [ 0.125s]
sending 'cache' (13348 KB)...
OKAY [ 0.630s]
writing 'cache'...
FAILED (remote: flash write failure)
finished. total time: 0.936s
- or -
Code:
$ sudo ./fastboot flash system system.img
target reported max download size of 1073741824 bytes
erasing 'system'...
FAILED (remote: failed to erase partition)
finished. total time: 0.118s
The only good news is I realized I could boot to any arbitrary recovery without flashing it with:
Code:
$ sudo ./fastboot boot recovery.img.twrp
Most functions on recory wouldn't work (it says it can't mount most partitions), but from where I can get an
Code:
adb shell
. I tried various steps but without success so far:
Code:
~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/recovery
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/recovery
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>
Code:
~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/system
e2fsck 1.41.14 (22-Dec-2010)
system: clean, 1939/65536 files, 254904/262144 blocks
Code:
~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/cache
e2fsck 1.41.14 (22-Dec-2010)
/dev/block/platform/msm_sdcc.1/by-name/cache: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? y
yes
e2fsck: unable to set superblock flags on /dev/block/platform/msm_sdcc.1/by-name/cache
I think I managed to somehow mess up my partition system, and I don't know much how to recover it, anyone have clues or can suggest something ?

You may need to replace the power button on the motherboard. If the phone keeps booting and then restarting when the Google logo appears, the power button might be your culprit. It was for me, and after a trip to my local repair shop, it is as good as new.

Fvolfrine said:
You may need to replace the power button on the motherboard. If the phone keeps booting and then restarting when the Google logo appears, the power button might be your culprit. It was for me, and after a trip to my local repair shop, it is as good as new.
Click to expand...
Click to collapse
The power button works fine on my phone. It's isn't constantly rebooting, but it gets stuck at the booting animation. I can use the power normally in the bootloader and it behaves as expected.

biaib said:
The power button works fine on my phone. It's isn't constantly rebooting, but it gets stuck at the booting animation. I can use the power normally in the bootloader and it behaves as expected.
Click to expand...
Click to collapse
I have the same problem sir.
were you able to solve your issue?
If yes please explain how?

If the phone is stuck at the boot animation, try flashing the oldest Kit Kat ROM from the Google site: https://developers.google.com/android/images

ahiel2 said:
Hello,
My phone fell to the floor and since than can't boot.
I see the google logo and then it turning off.
I can't enter recovery mode.
I can enter bootloader mode, tried to re-flash the rom (factory) with -w (wipe) and still can't boot / enter recovery mode.
Any suggestions?
Thanks!
Click to expand...
Click to collapse
Well I Still am trying to fix that issue since almost 2 years now.....
My guesses are that eMMC is damaged when you thre your phone.
If you do find a solution please do let me know.
Thanks!

Related

Nexus s eMMC dead, or what?

Unlocked Nexus s i9023 stuck on google logo. Tried to wipe cache/ re-flash in recovery...but unable to mount sdcard. "E:Unable to mount /sdcard"
I have tried: Fastboot.. flashing boot and recovery works.
system and userdata ain't
sending 'userdata' (18796 KB)...
OKAY [ 2.511s]
writing 'userdata'...
FAILED (remote: Write Fail)
finished. total time: 2.539s
On phone screen "Verified EXT4 image!" in red
Odin3 v1.83 with download mode gives write error and on phone screen red txt
KA3...New eMMC Support Fail
Stock android recovery wipe data/factory reset does do nothing.
Sideload...on TWRP recovery.
C:\Users\Jaani\Desktop\adb>adb push rom.zip /sdcard
2788 KB/s (153760279 bytes in 53.839s)
Then try to install zip. Failed, unable to mount storage.
Any ideas?
Lock and unlock bootloader. If still not working then eMMC dead.
smit.sanghavi said:
Lock and unlock bootloader. If still not working then eMMC dead.
Click to expand...
Click to collapse
C:\Users\Jaani\Desktop\adb>fastboot oem lock
...
OKAY [ 0.048s]
finished. total time: 0.051s
C:\Users\Jaani\Desktop\adb>fastboot oem unlock
...
FAILED (remote: Erase Fail)
finished. total time: 21.708s
C:\Users\Jaani\Desktop\adb>fastboot oem unlock
...
FAILED (remote: Erase Fail)
finished. total time: 1.671s
So long eMMC...
smit.sanghavi said:
So long eMMC...
Click to expand...
Click to collapse
Also tried that hairdryer trick, didn't help.
Try a new usb cable! I know it sounds a little tooo easy but I had same problem. I finally found that the cable has to be really snug in fit. I mean real tight that it almost feels like it wont fit. It seems that if there is just a slight bit of play the signal gets pooched somehow and then everything reports dead.
Once you get a cable that fits real well, adb, fastboot and the whole nine yards will work and life will be grand again. It took a while and a few returns to Staples and Best Buy and Future Shop til I found the right one and when i did i bought two spare just becuase and I haven't had any problems since.
I just retired my Nexus S in late November (which was my daily driver since it came out) for a Nexus 5. The S is now running CM11 KK4.4.2 and surprisingly much much smoother than JB but there ain't no looking back after having a N5.
Good luck!
Ezee-E said:
Try a new usb cable! I know it sounds a little tooo easy but I had same problem. I finally found that the cable has to be really snug in fit. I mean real tight that it almost feels like it wont fit. It seems that if there is just a slight bit of play the signal gets pooched somehow and then everything reports dead.
Once you get a cable that fits real well, adb, fastboot and the whole nine yards will work and life will be grand again. It took a while and a few returns to Staples and Best Buy and Future Shop til I found the right one and when i did i bought two spare just becuase and I haven't had any problems since.
I just retired my Nexus S in late November (which was my daily driver since it came out) for a Nexus 5. The S is now running CM11 KK4.4.2 and surprisingly much much smoother than JB but there ain't no looking back after having a N5.
Good luck!
Click to expand...
Click to collapse
Tried 7 different cables. Original Samsung, Nokia, LG's and Kindle. No success. =(
Hi, i have like problem.
I think device has incorrect fstab and partitions configuration.
Nexus S has flash memory chip, parted to some blocks.
Code:
ls /dev/block/platform/s5pc110-onenand
mtdblock0 mtdblock1 mtdblock2 mtdblock3 mtdblock4 mtdblock5 mtdblock6
it is eMMC?
---------- Post added at 07:04 AM ---------- Previous post was at 06:57 AM ----------
markeshov said:
Hi, i have like problem.
I think device has incorrect fstab and partitions configuration.
Nexus S has flash memory chip, parted to some blocks.
Code:
ls /dev/block/platform/s5pc110-onenand
mtdblock0 mtdblock1 mtdblock2 mtdblock3 mtdblock4 mtdblock5 mtdblock6
it is eMMC?
Click to expand...
Click to collapse
jaani8
can you show ouput from your device?
ls /dev/block/platform
markeshov said:
Hi, i have like problem.
I think device has incorrect fstab and partitions configuration.
Nexus S has flash memory chip, parted to some blocks.
Code:
ls /dev/block/platform/s5pc110-onenand
mtdblock0 mtdblock1 mtdblock2 mtdblock3 mtdblock4 mtdblock5 mtdblock6
it is eMMC?
---------- Post added at 07:04 AM ---------- Previous post was at 06:57 AM ----------
jaani8
can you show ouput from your device?
ls /dev/block/platform
Click to expand...
Click to collapse
Seems same. TWRP recovery.
~ # ←[6nls /dev/block/platform
ls /dev/block/platform
s5pc110-onenand
~ # ←[6n
~ # ←[6nls /dev/block/platform/s5pc110-onenand
ls /dev/block/platform/s5pc110-onenand
mtdblock0
mtdblock1
mtdblock2
mtdblock3
mtdblock4
mtdblock5
mtdblock6
/dev/block/platform/s5pc110-onenand # ←[6ncd mtdblock0
cd mtdblock0
/sbin/sh: cd: can't cd to mtdblock0
Up!
jaani8 said:
Unlocked Nexus s i9023 stuck on google logo. Tried to wipe cache/ re-flash in recovery...but unable to mount sdcard. "E:Unable to mount /sdcard"
I have tried: Fastboot.. flashing boot and recovery works.
system and userdata ain't
sending 'userdata' (18796 KB)...
OKAY [ 2.511s]
writing 'userdata'...
FAILED (remote: Write Fail)
finished. total time: 2.539s
On phone screen "Verified EXT4 image!" in red
Odin3 v1.83 with download mode gives write error and on phone screen red txt
KA3...New eMMC Support Fail
Stock android recovery wipe data/factory reset does do nothing.
Sideload...on TWRP recovery.
C:\Users\Jaani\Desktop\adb>adb push rom.zip /sdcard
2788 KB/s (153760279 bytes in 53.839s)
Then try to install zip. Failed, unable to mount storage.
Any ideas?
Click to expand...
Click to collapse
Try to Relock the Bootloader and then again Unlock it, then try all you did if failed again then eMMc is dead.
There is 1% chance of fixing your phone even by a technisian. Because he needs to pull out the dead eMMc and paste a new one. As nexus devices dont support SD card otherwise you could have flashed your device over SD card. The eMMc on Nexus is pasted one so its very difficult to plug it out sucessfully.
You may need to change the mainboard of your phone if You need the mainboard contact me...
Good Luck

[Tool] SparseConverter v1.0.1

About:
fastboot stores each file it receives in RAM before flashing it to your Android device.
For this reason, large partitions (such as the /system partition) must be splitted using the "compressed ext4 file system sparse image format",
this format is defined by the AOSP (Android Open Source Project) and was designed for the single purpose of flashing a large partition.
If you tried to flash system.img from backup and received the "Invalid sparse file format at header magi" error, you have come to the right place.
The Solution:
SparseConverter is a tool that can create / decompress compressed ext4 file system sparse image format (e.g. system.img_sparsechunk1).
Note for Motorola phone owners:
The factory images from Motorola contains a 128KB motorola header and a 4KB motorola footer, if you decompress those images you may want to remove the header and footer.
I had no problem using the standard Android fastboot with my unlocked Moto G and flashing images without the Motorola header / footer.
(If you keep the header / footer, then you must use Motorola's fastboot)
Usage Examples:
SparseConverter.exe /compress D:\system.img E:\ 256MB
( will compress D:\system.img to 256MB sparse files starting from E:\system.img_sparsechunk1 )
SparseConverter.exe /decompress E:\system.img_sparsechunk1 D:\system.img
( will decompress E:\system.img_sparsechunk1, E:\system.img_sparsechunk2 and etc. to D:\system.img )
The software may contain bugs and/or limitations that may result in damage to your phone, I take no responsibility for any damage that may occur.
For additional information about the "compressed ext4 file system sparse image format" see libsparse/sparse_format.h
p.s. Source code in C# is provided, Windows XP \ 2003 users must install the .Net Framework 2.0 before running this tool.
How can i flash system.img when is too large. i have compressed it using this tool, now how to flash?
Everything is explained in the original post, You need to use fastboot.exe which is part of the ADT bundle (Android Development Tools).
tal.aloni said:
Everything is explained in the original post, You need to use fastboot.exe which is part of the ADT bundle (Android Development Tools).
Click to expand...
Click to collapse
fastboot flash system system.img_sparsechunk1 ?
Not working for me. :/
It will be downloaded to device, but not flashed.
yes,
fastboot flash system system.img_sparsechunk1
fastboot flash system system.img_sparsechunk2
fastboot flash system system.img_sparsechunk3
make sure the system partition size match the image that you're trying to flash, to flash a bigger image you'll have to reflash the partition table and all the partitions (boot, recovery etc.)
p.s. not sure what "not working" means, what error do you get exactly?
tal.aloni said:
yes,
fastboot flash system system.img_sparsechunk1
fastboot flash system system.img_sparsechunk2
fastboot flash system system.img_sparsechunk3
make sure the system partition size match the image that you're trying to flash, to flash a bigger image you'll have to reflash the partition table and all the partitions (boot, recovery etc.)
p.s. not sure what "not working" means, what error do you get exactly?
Click to expand...
Click to collapse
Here is my error code, after attemp to flash system system.img_sparechunk1:
FAILED (remote: flash_cmds error!)
partition size match, it is system dump from another same device.
Sorry, I'm not familiar with this error.
tal.aloni said:
Sorry, I'm not familiar with this error.
Click to expand...
Click to collapse
I have Rooted my ASUS Tablet, and deleted something in system, now i am soft-bricked.
Now i cannot do somethnig, only use fastboot, butt i cannot flash system.
So i must waiting to developers, to port CWM/TWRP for my device.
Hi, I'm trying to convert a userdata.img file (60GB!) so I can flash it with fastboot onto my phone, when I run the tool I get this
Code:
C:\Users\Matt\Documents\SparseConverter_1.0.0>sparseconverter /compress C:\Users
\Matt\Documents\userdata.img "C:\Users\Matt\Documents\userdata sparse" 256MB
Image size is not a multiple of 4096 bytes
Does this mean that it won't convert my image? Thanks
EDIT: Also I know this image is valid as under linux
Code:
[email protected]:~$ sudo mount -t ext4 -o loop /home/matt/userdata.img /home/matt/ext4
[sudo] password for matt:
[email protected]:~$ sudo su
[email protected]:/home/matt# cd ext4
[email protected]:/home/matt/ext4# ls
anr bugreports dontpanic media resource-cache user
app cam_socket1 dpm mediadrm security
app-asec cam_socket2 drm misc shared
app-lib connectivity fdAlbum nfc system
app-private dalvik-cache local opponvitems time
backup data lost+found property tombstones
Hi Matt,
ext4 allocates storage space in units of "blocks". A block is a group of sectors between 1KiB and 64KiB, and the number of sectors must be an integral power of 2. Block size is specified at mkfs time and typically is 4KiB.
Click to expand...
Click to collapse
The sector size for most flash devices is 4096 bytes.
The "compressed ext4 file system sparse image format" assumes that the image is going to be flashed to a flash device, and thus expects its size to be a multiple of 4096 bytes.
I'm not sure how you created this user data partition image, the size of a proper image (for flashing purposes) should be a multiple of 4096 bytes.
Edit: BlockSize can be set to 512 instead of 4096 in SparseConverter source code (SparseCompressionHelper.cs).
tal.aloni said:
Hi Matt,
The sector size for most flash devices is 4096 bytes.
The "compressed ext4 file system sparse image format" assumes that the image is going to be flashed to a flash device, and thus expects its size to be a multiple of 4096 bytes.
I'm not sure how you created this user data partition image, the size of a proper image (for flashing purposes) should be a multiple of 4096 bytes.
Click to expand...
Click to collapse
I ran into this issue as well. I am trying to compress the userdata image from my phone that was previously bricked and I'd like to find a way to hold onto this data.
Thank you!
hazard666 said:
I ran into this issue as well. I am trying to compress the userdata image from my phone that was previously bricked and I'd like to find a way to hold onto this data.
Thank you!
Click to expand...
Click to collapse
How did you create this image? are you sure it's a raw image?
if it's indeed a raw image, you could append a the necessary amount of zero bytes to the image (e.g. using HxD) and then you could compress it.
I'm not sure what you mean by "hold onto this data", this tool is to prepare an image for flashing, if you're trying to access the files there are other methods (e.g. linux).
Awesome, I use this tool to compress system file of Motorola X2014 of 2.7GB that I was not able to flash it... works great, thank you so much
Great progress! In my case
I generate my system.img.raw by
adb root
adb wait-for-device
adb shell "dd if=/dev/block/platform/f9824900.sdhci/by-name/system of=/sdcard/system.img.raw"
adb pull -p /sdcard/system.img.raw
1st Trail below will NOT works, but at the end you will see my solution:
Windows cmd log:
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>sparseconverter /compress system.img.raw .\ 536870912
...
pause
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>fastboot flash system system.img.raw_
sparsechunk1
target reported max download size of 536870912 bytes
erasing 'system'...
OKAY [ 0.591s]
sending 'system' (524284 KB)...
OKAY [ 1.350s]
writing 'system'...
OKAY [ 13.953s]
finished. total time: 15.897s
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>fastboot flash system system.img.raw_
sparsechunk2
target reported max download size of 536870912 bytes
erasing 'system'...
OKAY [ 0.532s]
sending 'system' (524287 KB)...
OKAY [ 1.351s]
writing 'system'...
OKAY [ 8.678s]
finished. total time: 10.565s
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>fastboot flash system system.img.raw_
sparsechunk3
target reported max download size of 536870912 bytes
erasing 'system'...
OKAY [ 0.524s]
sending 'system' (411515 KB)...
OKAY [ 1.075s]
writing 'system'...
OKAY [123.069s]
finished. total time: 124.671s
Please note even we pass the fastboot flashing, but it does NOT works after flash is finished, the phone can reboot to Linux logo, but block there, can not start Android Animation and go to desktop.
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>adb shell
- exec '/system/bin/sh' failed: No such file or directory (2) -
SO, SOLUTION is:
as an conclusion, it seems fastboot can not manage the multi input images well, BUT it can handle a single compressed image files, so set the max image side to the partition size to 2684354560 can make fastboot works well.
I need to find my original dd output file system.img.raw in 2.5GB, then:
Windows cmd logs:
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>sparseconverter /compress system.img.raw .\ 2684354560
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>fastboot flash system system.img.raw_sp
arsechunk1
target reported max download size of 536870912 bytes
erasing 'system'...
OKAY [ 0.767s]
sending sparse 'system' (521371 KB)...
OKAY [ 4.530s]
writing 'system'...
OKAY [ 9.577s]
sending sparse 'system' (511116 KB)...
OKAY [ 6.465s]
writing 'system'...
OKAY [ 10.833s]
sending sparse 'system' (445892 KB)...
OKAY [ 6.274s]
writing 'system'...
OKAY [139.377s]
finished. total time: 177.831s
that will bring my system.img.raw back to my phone WELL
you can see my rooted su is there, ^_^:
E:\AzlunData\DEV Tools\ImageBakupsCMD\SYS GMS+Root+AzAppsMDP>adb shell
[email protected]:/ $ su
su
[email protected]:/ #
Matt, hazard666,
I was wrong, there is no restriction on BlockSize , you're welcome to download SparseConverter source code and set BlockSize to 512 (in SparseCompressionHelper.cs),
please let me know if this helps.
tal.aloni said:
Note for Motorola phone owners:
The factory images from Motorola contains a 128KB motorola header and a 4KB motorola footer, if you decompress those images you may want to remove the header and footer.
I had no problem using the standard Android fastboot with my unlocked Moto G and flashing images without the Motorola header / footer.
(If you keep the header / footer, then you must use Motorola's fastboot)
Click to expand...
Click to collapse
Hi, I used your tool to decompress sparsechunks into a single system image for the Moto X 2014 XT1097, AT&T. This is needed as a preliminary step in order to get root.
The next step is to convert the image into an ext4 format. However, the instructions we have to do that require using linux command simg2img and it doesn't like the header. The errors are:
"Invalid sparse file format at header magi
Failed to read sparse file"
"Bad magic"
or
"Error reading sparse file header"
How do we get rid of this header? Thanks!
JulesJam said:
How do we get rid of this header? Thanks!
Click to expand...
Click to collapse
I usually do it manually with HxD (hex editor).
JulesJam said:
The next step is to convert the image into an ext4 format. However, the instructions we have to do that require using linux command simg2img and it doesn't like the header.
Click to expand...
Click to collapse
I think you're confused, once the image is decompressed, it's no longer a sparse file, you shouldn't use simg2img (to convert it to raw image, because it's already been done).
instead, you can just mount the image, for ext4 it would be:
Code:
sudo mount -t ext4 -o loop,offset=131072 system.img mnt/
and when you're done customizing:
Code:
sudo ./make_ext4fs -l 840M -a system mysystem.img mnt/
sudo umount mnt
(note that I've used offset=131072 instead of removing the header)
tal.aloni said:
I think you're confused, once the image is decompressed, it's no longer a sparse file, so you shouldn't use simg2img.
Click to expand...
Click to collapse
Yeah, I am definitely confused, lol!
tal.aloni said:
instead, use something along the line of (note that I've used offset=131072 instead of removing the header):
Code:
sudo mount -t ext4 -o loop,offset=131072 system.img mnt/
sudo ./make_ext4fs -l 840M -a system mysystem.img mnt/
sudo umount mnt
Click to expand...
Click to collapse
Ok great, I will have someone who knows linux try that. What we want is a single file system image in ext4 format so hopefully that will work!
Thanks!
tal.aloni said:
I usually do it manually with HxD (hex editor).
I think you're confused, once the image is decompressed, it's no longer a sparse file, you shouldn't use simg2img (to convert it to raw image, because it's already been done).
instead, you can just mount the image, for ext4 it would be:
Code:
sudo mount -t ext4 -o loop,offset=131072 system.img mnt/
and when you're done customizing:
Code:
sudo ./make_ext4fs -l 840M -a system mysystem.img mnt/
sudo umount mnt
(note that I've used offset=131072 instead of removing the header)
Click to expand...
Click to collapse
JulesJam said:
Yeah, I am definitely confused, lol!
Ok great, I will have someone who knows linux try that. What we want is a single file system image in ext4 format so hopefully that will work!
Thanks!
Click to expand...
Click to collapse
And I'm someone who's running a Linux distro!
After the second command I'm getting a memory allocation error though
"error: do_inode_allocate_extents: Failed to allocate 6524 blocks"
tal.aloni said:
I think you're confused, once the image is decompressed, it's no longer a sparse file, you shouldn't use simg2img (to convert it to raw image, because it's already been done).
Click to expand...
Click to collapse
Also, just to be complete, the way I am going to modify/root the ext4 image is by using TWRP on a bootloader unlocked device according to these instructions:
http://forum.xda-developers.com/showpost.php?p=60389310&postcount=177
It worked for the XT1096 so it should work for the XT1097. Once we get the rooted ext4 image, we have a tool to flash it to the XT1097 that bypasses the signature check. Our bootloaders are locked so we have to do it this way.

[GUIDE][BRICKED] [BOOTS ONLY TO RECOVERY][All ASUS TRANFORMERS]

This is a general users guide to unbrick your Transformer tablet.
This guide will help you if your Asus tablet will only boot into recovery
and the command
Code:
adb reboot-bootloader
does not work to get you booted back to bootloader screen ..
If the above command works then skip to the first fastboot command ..
WHAT YOU NEED
An Asus tablet that will only boot into recovery …
Woking adb and fastboot on your PC
Windows drivers (if using Windows)
A fully charged tablet
Asus data cable
Stock firmware blob (from Asus's web site, make sure you get the right one)
_that's bootit.ko (unzipped and placed with fastboot.exe)
Downloads
Asus Stock firmware---MAKE SURE YOU GET THE CORRECT SKU FOR YOUR TRANSFORMER TABLET
click me
_that's bootit.ko----click me
INSTRUCTIONS
Extract your stock firmware in your downloads folder twice...You will see a blob file rename it boot.blob and move it to the same folder as your fastboot.exe or if in linux to your home folder
Unzip the bootit.ko and place it wth the above blob file.
Let start with this command to make sure that your PC can see your table as an ADB device in recovery
Code:
adb devices
OUTPUT
Code:
[email protected] ~ $ adb devices
List of devices attached
015c7d7a445c260c recovery
Then lets push the bootit.ko to the root of the device like this
Code:
adb push bootit.ko /
OUTPUT
Code:
[email protected] ~ $ adb push bootit.ko /
673 KB/s (27690 bytes in 0.040s)
Then lets insmod this .ko file
Code:
adb shell insmod /bootit.ko
This should reboot the tablet into the bootloader menu, lets verifiy.
Once in the bootloader screen lets make sure your PC can see the device in fastboot.
Code:
fastboot devices
OUTPUT
Code:
[email protected] ~ $ fastboot devices
015c7d7a445c260c fastboot
So now its time to erase the misc & cache partitions, as that is most likely the partitions that is making it boot to recovery...
Code:
fastboot erase misc
OUTPUT
Code:
[email protected] ~ $ fastboot erase misc
erasing 'misc'...
OKAY [ 1.021s]
finished. total time: 1.021s
Code:
fastboot erase cache
OUTPUT
Code:
[email protected] ~ $ fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 2.096s]
finished. total time: 2.096s
Once these two command run with OKAY as the OUTPUT .
It is time to make sure we can reboot into the bootloader with the hardware buttons
So from where you are at in the bootloader screen use the VOL DOWN & POWER buttons to boot the tab back into the bootloader screen ..
Run these command in fastboot in this order
The next command is to just verify your computer can see your device
Code:
fastboot devices
OUTPUT
Code:
[email protected]:~ > fastboot devices
015d2bbce2501405 fastboot
Code:
fastboot erase system
OUTPUT
Code:
[email protected]:~ > fastboot erase system
******** Did you mean to fastboot format this partition?
erasing 'system'...
OKAY [ 2.954s]
finished. total time: 2.954s
Code:
fastboot erase recovery
OUTPUT
Code:
[email protected]:~ > fastboot erase recovery
erasing 'recovery'...
OKAY [ 1.945s]
finished. total time: 1.945s
Code:
fastboot -w
OUTPUT
Code:
[email protected]:~ > fastboot -w
erasing 'userdata'...
OKAY [ 23.188s]
formatting 'userdata' partition...
Creating filesystem with parameters:
Size: 29618601984
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 7231104
Block groups: 221
Reserved block group size: 1024
Created filesystem with 11/1810432 inodes and 157662/7231104 blocks
sending 'userdata' (139133 KB)...
writing 'userdata'...
OKAY [ 26.358s]
erasing 'cache'...
At this point it will either hangs on erasing 'cache'
Or it will give you an error, either way you will need to
reboot the tablet back into fastboot with the hardware buttons
Once that is done continue on the path
Code:
fastboot erase boot
OUTPUT
Code:
[email protected]:~ > fastboot erase boot
erasing 'boot'...
OKAY [ 1.209s]
finished. total time: 1.209s
Code:
fastboot erase misc
OUTPUT
Code:
[email protected]:~ > fastboot erase misc
erasing 'misc'...
OKAY [ 0.978s]
finished. total time: 0.978s
Code:
fastboot erase cache
OUTPUT
Code:
[email protected]:~ > fastboot erase cache
******** Did you mean to fastboot format this partition?
erasing 'cache'...
OKAY [ 2.843s]
finished. total time: 2.843s
Code:
fastboot -i 0x0B05 flash system boot.blob
During the sending/writing process of this step you will get the blue bar on your screen.....
OUTPUT
Code:
[email protected]:~ > fastboot -i 0x0B05 flash system boot.blob
erasing 'system'...
OKAY [ 2.339s]
sending 'system' (800927 KB)...
OKAY [133.094s]
writing 'system'...
[OKAY [178.036s]
finished. total time: 313.469s
Code:
fastboot -i 0x0B05 reboot
OUTPUT
Code:
[email protected]:~ > fastboot -i 0x0B05 reboot
rebooting...
finished. total time: 0.020s
Let it boot into stock ROM ...
Credits
@_that for his bootit.ko
TEAM CROMBi and TEAM ZOMBi-X @sbdags @hardslog
Troubleshooting
Here is some troubleshooting
Check out this thread for fasboot.exe, adb.exe and driver help ...CLICK ME
@lj50036
A typo on your very first command: adb device?
Edit: What would you recommend if the userdata is corrupted and have only fastboot/adb? fastboot format data-partition? Thanks...
LetMeKnow said:
@lj50036
A typo on your very first command: adb device?
Edit: What would you recommend if the userdata is corrupted and have only fastboot/adb? fastboot format data-partition? Thanks...
Click to expand...
Click to collapse
Fixed let me know if you see anymore ..
Thx @LetMeKnow
LetMeKnow said:
@lj50036
A typo on your very first command: adb device?
Edit: What would you recommend if the userdata is corrupted and have only fastboot/adb? fastboot format data-partition? Thanks...
Click to expand...
Click to collapse
I am going to get to this once you have fastboot back and you can boot with hardware buttons then its just like @Buster99's
guide but there is one very important command that he leaves out ..
I will post the rest of the guide after bit ...
Thx Josh
Here is the original thread where the bootit module was tested for the first time -> http://forum.xda-developers.com/showthread.php?t=2291974
The problem was that the installed recovery was too old and incompatible with the bootloader and so could not access the eMMC at all. The bootloader command to boot to recovery is stored in the MSC partition (mmcblk0p3), and the recovery could not clear it. Since the bootloader checks the MSC partition before checking for volume-down, it is impossible to get to fastboot without some additional kick in the butt (aka "bootit.ko").
The correct bootit.ko file to use is the one in "bootit-bootloader.zip": http://forum.xda-developers.com/attachment.php?attachmentid=1985941&d=1369339132 - the older version turned out to be too weak. Note that this is a zipped kernel module, not a recovery-installable ZIP. You need to unzip it on your PC before adb push.
After making it to the bootloader menu and working fastboot, you can fastboot flash a current version of TWRP and install the custom ROM of your choice. No real need for the stock blob, unless you want to make sure you have the current bootloader and a known working ROM.
Here is another thread where bootit.ko didn't help, maybe it was really a hardware problem. But lots of good background info from me. -> http://forum.xda-developers.com/showthread.php?t=2437376
And here is another success story -> http://forum.xda-developers.com/showthread.php?p=47525770
_that said:
Here is the original thread where the bootit module was tested for the first time -> http://forum.xda-developers.com/showthread.php?t=2291974
The problem was that the installed recovery was too old and incompatible with the bootloader and so could not access the eMMC at all. The bootloader command to boot to recovery is stored in the MSC partition (mmcblk0p3), and the recovery could not clear it. Since the bootloader checks the MSC partition before checking for volume-down, it is impossible to get to fastboot without some additional kick in the butt (aka "bootit.ko").
The correct bootit.ko file to use is the one in "bootit-bootloader.zip": http://forum.xda-developers.com/attachment.php?attachmentid=1985941&d=1369339132 - the older version turned out to be too weak. Note that this is a zipped kernel module, not a recovery-installable ZIP. You need to unzip it on your PC before adb push.
After making it to the bootloader menu and working fastboot, you can fastboot flash a current version of TWRP and install the custom ROM of your choice. No real need for the stock blob, unless you want to make sure you have the current bootloader and a known working ROM.
Here is another thread where bootit.ko didn't help, maybe it was really a hardware problem. But lots of good background info from me. -> http://forum.xda-developers.com/showthread.php?t=2437376
And here is another success story -> http://forum.xda-developers.com/showthread.php?p=47525770
Click to expand...
Click to collapse
Thx _that I did update the OP with the correct bootit.ko ...
lj50036 said:
Thx _that I did update the OP with the correct bootit.ko ...
Click to expand...
Click to collapse
Great stuff! Thanks for this thread Josh!
Now , if I understand this correctly, the insmod command injects a command into the kernel to boot straight to the bootloader before checking misc to break that 'forced reboot to recovery' cycle.
Kinda correct?
In another thread @_that stated once that
Code:
fastboot getvar all
does not return misc as a supported partiton and that
Code:
fastboot erase misc
only "theoretically" erases misc partition. Is that confirmed now?
You guys are great! So much fun to learn this...
I tried to follow this but i get this output:
After pushing bootit.ko to the root and insmod, the transformer reboots directly in the bootloader.
When try fastboot devices, nothing happens just the next line to fill in a command.
Also, when trying then to fastboot erase misc, it hangs with 'waiting for devices'..
lvrijn said:
I tried to follow this but i get this output:
After pushing bootit.ko to the root and insmod, the transformer reboots directly in the bootloader.
When try fastboot devices, nothing happens just the next line to fill in a command.
Also, when trying then to fastboot erase misc, it hangs with 'waiting for devices'..
Click to expand...
Click to collapse
Did you have a working fastboot driver on your PC before you got into this pickle?
Give us a detailed description on why you tried this procedure.
berndblb said:
Did you have a working fastboot driver on your PC before you got into this pickle?
Give us a detailed description on why you tried this procedure.
Click to expand...
Click to collapse
Thanks for the advice.
It was not the driver, if was my fastboot and adb .exe, i think an old version?
I now downloaded from here http://forum.xda-developers.com/showthread.php?t=2588979
And these are working!
So if someone ever have problems command doesn't recognize fastboot commands, its not always the driver! It can also be the fastboot.exe
This transformer is working again !
lvrijn said:
Thanks for the advice.
It was not the driver, if was my fastboot and adb .exe, i think an old version?
I now downloaded from here http://forum.xda-developers.com/showthread.php?t=2588979
And these are working!
So if someone ever have problems command doesn't recognize fastboot commands, its not always the driver! It can also be the fastboot.exe
This transformer is working again !
Click to expand...
Click to collapse
Great to see you up and running...:good:
I did add a Troubleshooting post number 3
The Josh
berndblb said:
Great stuff! Thanks for this thread Josh!
Now , if I understand this correctly, the insmod command injects a command into the kernel to boot straight to the bootloader before checking misc to break that 'forced reboot to recovery' cycle.
Kinda correct?
In another thread @_that stated once that
Code:
fastboot getvar all
does not return misc as a supported partiton and that
Code:
fastboot erase misc
only "theoretically" erases misc partition. Is that confirmed now?
You guys are great! So much fun to learn this...
Click to expand...
Click to collapse
No, I dont think it injects anything into the kernel as there may not even be one in the LNX partition ..
The bootit.ko module comes from the source of the kernel code..
Also the /misc partition is a full partition as shown here ..
Code:
mmcblk0p3
Offset: 1292369920 (0x4d080000)
Size: 2097152 (0x200000)
File system size: 512 * 4096 = 2097152 (fully occupies partition)
Linux rev 1.0 ext3 filesystem
Not mounted
Permissions: GID system can manipulate
Contains: Empty file system
Purpose: Recovery /misc
Referenced by: /system/lib/libandroid_runtime.so recovery ramdisk: /etc/recovery.fstab
Note: File system is referenced in recovery as emmc, not ext3!
Thx Josh
lj50036 said:
No, I dont think it injects anything into the kernel as there may not even be one in the LNX partition ..
Click to expand...
Click to collapse
I think berndblb meant that insmod injects something into the *currently running* kernel, which it does. It's used for loading additional kernel modules, usually drivers. When a module is loaded, its "init" function is called by the kernel so that it can hook its functionality into the proper kernel subsystems. My bootit.ko's init function simply reboots the tablet - without properly terminating processes, unmounting filesystems, etc. - so it should only be loaded when no partitions are mounted.
_that said:
I think berndblb meant that insmod injects something into the *currently running* kernel, which it does. It's used for loading additional kernel modules, usually drivers. When a module is loaded, its "init" function is called by the kernel so that it can hook its functionality into the proper kernel subsystems. My bootit.ko's init function simply reboots the tablet - without properly terminating processes, unmounting filesystems, etc. - so it should only be loaded when no partitions are mounted.
Click to expand...
Click to collapse
Nothing like _that to put you in your place....
lj50036 said:
Nothing like _that to put you in your place....
Click to expand...
Click to collapse
I'm trying to get back to a working recovery. Now I get a cycle of TWRP splash screens. This method looks promising because it appears to rebuild all of the partitions. I can use the Vol Down + Power keys to get to the bootloader (us_epad-10.6.1.14.10-20130801 A03. Can I skip to the fastboot steps? I had Crombi-kk running with rom2sd before I broke something trying to upgrade to zombie-x.
Thanks!
awilson77584 said:
I'm trying to get back to a working recovery. Now I get a cycle of TWRP splash screens. This method looks promising because it appears to rebuild all of the partitions. I can use the Vol Down + Power keys to get to the bootloader (us_epad-10.6.1.14.10-20130801 A03. Can I skip to the fastboot steps? I had Crombi-kk running with rom2sd before I broke something trying to upgrade to zombie-x.
Thanks!
Click to expand...
Click to collapse
You can skip all the way down to the command "fastboot erase misc". It should kick you out of twrp cycling...good luck..:fingers-crossed:
LetMeKnow said:
You can skip all the way down to the command "fastboot erase misc". It should kick you out of twrp cycling...good luck..:fingers-crossed:
Click to expand...
Click to collapse
Thx!
Back up and running! Thanks!!!

Partition Repair

Hi everyone
Been flashing ROM for a while now, on many different devices so I am not a total noob!
But this morning I tried to fastboot flash the new 5.0 preview. I was running the previous L preview build before.
I did all the correct steps, and fastboot reported success but the phone won't boot. Just stuck in a bootloop. I ended up flashing back to 4.4 and flashing TWRP. TWRP Boots, but it won't recognize any other partitions. No /cache, no /data etc. It just gives a mounting errror. I definitely dowloaded the correct version and the hashs matched, so I am not sure why this is happening.
I followed this guide to repair partition: http://forum.xda-developers.com/goo...o-repairing-corrupted-data-partition-t2577447
But when I run 'e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata' I get:
~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/userdata
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>
Is there a way to repair this?
In general this phone is messed up, and my replacement comes in on Monday. Currently GPS doesn't work, and the battery can't hold a charge. So I guess it's OK that this happened, but I would still like to fix it if there is anything I can do.
BTW Doing 'fdisk -l' reports nothing.
geoldr said:
Hi everyone
Been flashing ROM for a while now, on many different devices so I am not a total noob!
But this morning I tried to fastboot flash the new 5.0 preview. I was running the previous L preview build before.
I did all the correct steps, and fastboot reported success but the phone won't boot. Just stuck in a bootloop. I ended up flashing back to 4.4 and flashing TWRP. TWRP Boots, but it won't recognize any other partitions. No /cache, no /data etc. It just gives a mounting errror. I definitely dowloaded the correct version and the hashs matched, so I am not sure why this is happening.
I followed this guide to repair partition: http://forum.xda-developers.com/goo...o-repairing-corrupted-data-partition-t2577447
But when I run 'e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata' I get:
~ # e2fsck /dev/block/platform/msm_sdcc.1/by-name/userdata
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/platform/msm_sdcc.1/by-name/userdata
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>
Is there a way to repair this?
In general this phone is messed up, and my replacement comes in on Monday. Currently GPS doesn't work, and the battery can't hold a charge. So I guess it's OK that this happened, but I would still like to fix it if there is anything I can do.
BTW Doing 'fdisk -l' reports nothing.
Click to expand...
Click to collapse
I'm no expert but have corrupted enough filesystems and been through these errors before.
Taking a look at the man page for e2fsck I see that you can use an alternative superblock if the primary is corrupted using the -b superblock . Using mke2fs -n will print out where all the superblocks were created. Pop that number after the -b.
Have you already run e2fsck -p?
I'm guessing you have already been to the man page, but for anyone else out there:
http://http://linux.die.net/man/8/e2fsck
Today I got the same error than you when I executed the e2fsck command.
I though the partition was damaged but not, the partition was only disspeared.
So I found other therad that said that if the previous command generate error, just try this command:
make_ext4fs /dev/block/platform/msm_sdcc.1/by-name/userdata
It will regenerate the partition, then you can run the e3fsck command and ensure your partitions are recovered and fixed.

Is It Possbile For E5 Play To Be Rooted and Encrypted At the Same Time?

Hello all,
I successfully rooted my phone, so that's good. Part of the instructions are to remove the encryption. Now that it's rooted would it be possible to turn encryption back on? What would happen if I deleted /vendor/etc/fstab.qcom? I'm sure I'd lose my /sdcard/ stuff, but I just did anyway to remove the encryption. (Magisk Manager has settings "Preserve force encryption" and "Preserve AVB 2.0/dm-verity" that I'm not sure what does, but I suspect it's something to do with encryption).
Thanks
Kinda answered my own question. I ran across a menu pick in settings somewhere and clicked on "Encrypt Phone", "note this will take an hour" or something like that. It seems that the phone is encrypted and rooted at this point. What's the old adage, "What could possibly go wrong?", "There's only one way to find out!" TWRP is still on the recovery partition, but can't decrypt the phone. So, probably no backup from TWRP. I wonder what the other drawbacks might be? Hmm.
We have posted TWRP that decrypts so you can ditch my decrypt.zip and you may stay rooted and encrypted as you wish.
Check karthick's thread here:
https://forum.xda-developers.com/moto-e5/development/recovery-twrp-3-2-3-x-moto-e5-plus-t3912189
whodat711 said:
We have posted TWRP that decrypts so you can ditch my decrypt.zip and you may stay rooted and encrypted as you wish.
Check karthick's thread here:
https://forum.xda-developers.com/moto-e5/development/recovery-twrp-3-2-3-x-moto-e5-plus-t3912189
Click to expand...
Click to collapse
Excellent. Thank you!
Well, wait a minute. I put recovery twrp-3.3.1-0-james.img on a Moto-E5 Play (XT1921-2) and it wouldn't boot into recovery. Put previous recovery on and boots into recovery, but of course no decrypt.
This talks about Hanna being updated. https://forum.xda-developers.com/showpost.php?p=79697573&postcount=56
Is twrp-3.3.1-0-james.img supposed to work?
Thanks
Successfully Updated System On Rooted, Encrypted Moto E5 Play
I'm not seeing a lot of information about my particular phone here - Moto E5 Play I bought at Target, XT1921-2. So, I'll post my notes about how I updated it. Note, these are notes - not instructions. Maybe they'll help somebody though. Also note, I'm kinda flying by the seat of my pants here. I really don't know if this is the best/easiest way to update the system. For instance, I'm using a TWRP that doesn't support encryption on this phone. I'm going to try the Hannah TWRP that claims to support encryption at some point, but I haven't yet. All that being said, here's what I did (and it worked).
Code:
# These are notes, not instructions. They assume you know stuff like power
# off before inserting or removing SD card.
# Retrieve un-encrypted SD card from hiding place unknown by adversaries and install in phone.
# Change to Swipe security in case something goes bad.
# Titanium Backup in case something goes bad.
# Copy stuff from /sdcard/ to /external_sd/ in case something goes bad.
# Following this posting:
# https://forum.xda-developers.com/moto-e5/how-to/firmware-moto-e5-xt1944-4-dual-sim-t3820901
# Getting firmware from here:
# https://mirrors.lolinet.com/firmware/moto/james/official/RETUS/
# Download XT1921-2_JAMES_RETUS_8.0.0_OPPS27.91-121-7_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
cd /space/Android/e5play/
mv ~/Downloads/XT1921-2_JAMES_RETUS_8.0.0_OPPS27.91-121-7_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip .
mkdir update
cd update/
unzip ../XT1921-2_JAMES_RETUS_8.0.0_OPPS27.91-121-7_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
# These are vim editor commands, which might be helpful to someone well versed
# in viming. The upshot is, massage update/servicefile.xml to look like the
# fastboot commands below.
# :r servicefile.xml
# Addresses from '.'. Always reset the cursor before executing.
# :.,$s/^ *<step operation="\([^"]*\)" var="\([^"]*\)"\/>/fastboot \1 \2
# :.,$s/^ *<step operation="\([^"]*\)" partition="\([^"]*\)"\/>/fastboot \1 \2/
# :.,$s/^ *<step MD5="\([^"]*\)" filename="\([^"]*\)" operation="\([^"]*\)" partition="\([^"]*\)"\/>/fastboot \3 \4 \2/
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash vendor vendor.img
fastboot flash oem oem.img
fastboot erase DDR
fastboot oem fb_mode_clear
# Note, also flashed stock recovery. Don't know if this was necessary.
# Now used the phone's system to take the security update.
# Got "bad key" when updating. Seemed to work anyway. Remembered seeing
# this. It seems like these images are unsigned, which isn't a big deal because
# the bootloader is unlocked.
# [[email protected] update]$ fastboot flash boot boot.img
# Sending 'boot' (16384 KB) OKAY [ 0.517s]
# Writing 'boot' (bootloader) Image signed with key bad key
# OKAY [ 0.565s]
# Finished. Total time: 1.085s
# [[email protected] update]$ fastboot flash recovery recovery.img
# Sending 'recovery' (16484 KB) OKAY [ 0.522s]
# Writing 'recovery' (bootloader) Image signed with key bad key
# OKAY [ 1.779s]
# Finished. Total time: 2.303s
# Used Magisk Manager to download Magisk as a zip file. Move the zip file to
# the un-encrypted SD card.
adb shell
cd sdcard/Download/
mv Magisk-v19.3\(19300\).zip /storage/04C7-5787/
cd /space/Android/e5play
fastboot flash recovery twrp_james.img
# Boot into TWRP recovery.
# Swipe to allow modifications.
# Mount Micro SD card (the un-encrypted SD card).
# Use TWRP to install /external_sd/Magisk-v19.
# Reboot system.
# Have root and updated system. Yeah!
# Remove un-encrypted SD card from phone and hide it from adversaries.

Categories

Resources