1

I'm sure this question has been asked before, but I'm unable to find a good answer that I can understand, so bear with me:

I've recently installed TWRP & LineageOS 15 on my Moto G5 (cedric), although I'm sure I messed the process up a bit, because I had almost-bricked my phone in the meantime and don't really understand how I solved it either. Now everything is working again, except for the fact that when I (re)start my phone, it automatically boots into TWRP instead of LineageOS. The way I boot into LineageOS anyway, is to tell TWRP to reboot into the bootloader (or go to the bootloader directly with the volume key trick), and then from the bootloader I use 'start'.

A possible solution that I've found on the internet involved changing / erasing the misc partition, as it would be responsible for directing a boot to either TWRP or LineageOS. However, other google results tell me that erasing misc could gravely upset your phone.

The main question is: Is it correct that zero-ing the misc partition is a solution to this boot issue, as the possible solution states? Or is it misleading and the boot issue is probably something else entirely?

Here's the hexdump of the current contents of my misc partition (the result of first copying it to my computer with dd if=/dev/block/bootdevice/by-name/misc of=/storage/FE84-1705/misc.img and adb pull ..., and then running hexdump -C misc.img):

hexdump -C misc.img 
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000800  62 6f 6f 74 2d 72 65 63  6f 76 65 72 79 00 00 00  |boot-recovery...|
00000810  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000840  72 65 63 6f 76 65 72 79  0a 2d 2d 77 69 70 65 5f  |recovery.--wipe_|
00000850  64 61 74 61 0a 2d 2d 72  65 61 73 6f 6e 3d 77 69  |data.--reason=wi|
00000860  70 65 5f 64 61 74 61 5f  76 69 61 5f 72 65 63 6f  |pe_data_via_reco|
00000870  76 65 72 79 0a 00 00 00  00 00 00 00 00 00 00 00  |very............|
00000880  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001500  71 65 20 30 2f 30 00 00  00 00 00 00 00 00 00 00  |qe 0/0..........|
00001510  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00001520  31 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |1...............|
00001530  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00100000

And this is the result of running fdisk -l misc.img:

Disk misc.img: 1 MiB, 1048576 bytes, 2048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Furthermore, I've installed TWRP 3.2.1-0-cedric and LineageOS 15.0-20171125_073252-UNOFFICIAL-cedric.

1

I went ahead and changed it anyway, and the answer is YES.

The qe 0/0 part has something to do with Motorola's way of assessing whether the phone is and/or has been rooted, and the last 1 I don't understand. I went ahead and used hexedit to remove only the boot-recovery and recovery.--wipe_data.--reason=wipe_data_via_recovery parts, then transferred and wrote the new image back to the misc partition; and now the phone starts up to LineageOS automatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.