MiCode / Xiaomi_Kernel_OpenSource

Xiaomi Mobile Phone Kernel OpenSource
8.71k stars 3.22k forks source link

fastboot boot command is bugged on Xiaomi MTK devices #2356

Open pjgowtham opened 2 years ago

pjgowtham commented 2 years ago

The best practice for installing TWRP seems to be to inject ramdisk after using fastboot boot twrp.img command. But when this command is broken on the firmware side, I have to make new TWRP build everytime you push OTA cos the wifi/BT/etc kernel modules wont load if the TWRP kernel (latest stock kernel at the time of building) does not match cos devices nowadays use recovery as boot.

It sometimes says "successful" but ends up booting into system rather than TWRP even when twrpfastboot=1 cmdline (forces to boot twrp) is on and randomly throws error: Too many links even with using usb 2 hub.

It would make life a lot easier if you could fix this on your MTK lineup devices. If you cant fix it, release devices with dedicated recovery partition, Thanks.

willzyx-hub commented 2 years ago

The best practice for installing TWRP seems to be to inject ramdisk after using fastboot boot twrp.img command. But when this command is broken on the firmware side, I have to make new TWRP build everytime you push OTA cos the wifi/BT/etc kernel modules wont load if the TWRP kernel (latest stock kernel at the time of building) does not match cos devices nowadays use recovery as boot.

It sometimes says "successful" but ends up booting into system rather than TWRP even when twrpfastboot=1 cmdline (forces to boot twrp) is on and randomly throws error: Too many links even with using usb 2 hub.

It would make life a lot easier if you could fix this on your MTK lineup devices. If you cant fix it, release devices with dedicated recovery partition, Thanks.

Hello, i agree with you this is MTK bootloader failure (lk.img) the boot command doesn't seem to work and it's return an error

$fastboot boot (name of file).img Sending (name of file).img -> OKAY Booting... -> FAILED : (Status read failed (No such device) ) and ofc @mi-code you're From Xiaomi Team pls make it work by patching lk.img because only you can build and sign the lk.img Thanks :)

ramabondanp commented 2 years ago

They will never do that tho. Its happpen in all mediatek devices not only Xiaomi, but other also. The solution is simple just do fastboot flash boot then reboot to twrp -> restore stock boot.img and do ramdisk patching. No offense.

lattice0 commented 2 years ago

On my Poco M3:


fastboot boot Image
creating boot image...
creating boot image - 35883008 bytes
Sending 'boot.img' (35042 KB)                      OKAY [  0.837s]
Booting                                            FAILED (remote: 'unknown command')
fastboot: error: Command failed
Sushrut1101 commented 2 years ago

please fix it asap it's really annoying

YuKongA commented 2 years ago

+1

hamjin commented 2 years ago

It seems that Mediatek does not want to add fastboot boot

royal-cloud commented 2 years ago

Here i thought i was the only with the same problem 😭 Mediatek is just trashy sometimes

XxMarcelo commented 2 years ago

tente esses comandos : fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img fastboot flash boot "arquivo twrp" fastboot reboot recovery E se não funcionar é só baixar uma ROM fastboot atual do seu dispositivo e extrair o arquivo boot. img e fazer esse comando: fastboot flash boot boot.img O arquivo vbmeta.img também é encontrado quando extrai a ROM fastboot, por favor avise se funcionar..