Unable to use fastboot boot after the December update - Xiaomi Mi A1 Questions & Answers

I was helping out on the Kernel porting thread, and since I've updated my phone to the December patches, I'm unable to boot any kernel except TWRP and the stock kernel. Fastboot says that the current active slot is b.
After running fastboot boot boot.img, my phone still boots into the old kernel. I tried to flash the boot_a and boot_b, but after that my phone doesn't power on at all.
Any ideas how I can boot custom kernels again?

Alright. Turns out I had to downgrade aboot.

Related

[Q] Stuck at boot animation after flashing 5.1

I was using 5.0.1, with stock bootloader, stock recovery, actually stock everything except SuperSU added.
I downloaded the 5.1 image from Google, and tried flashing it:
fastboot flash bootloader bootloader-mako-makoz30f.img
fastboot reboot-bootloader
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1701.06.img
fastboot reboot-bootloader
fastboot update image-occam-lmy47o.zip
Got some missing sig errors, and "failed to allocate xxxxxxxxx bytes" error. Thus after searching for more information I ended up unpacking image-occam-lmy47o.zip and running:
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash cache cache.img
Then rebooted. The result is an endless boot animation, regardless of anything I try. Tried restoring my TWRP backup, reflashing 5.1, reflashing 5.0.1, always the same. Last logcat line at boot:
E/kickstart( 233): Sahara protocol completed
Then it's just stuck there. For minutes. For tens of minutes. Looks like forever. Anyone else ever seen this problem, and happens to have a solution? (Preferably without losing my data)
Edit: After a few hours I restored the original (or so I hope) state, by wiping, then flashing 5.0.1, then restoring my backup. But now I don't dare to try flashing 5.1 again. Still would love to hear ideas from who might have seen this problem and knows a solution.
After you've flashed the factory image boot into the stock recovery and do a factory reset.
Sent from my Nexus 9 using XDA Free mobile app
IVBela said:
I was using 5.0.1, with stock bootloader, stock recovery, actually stock everything except SuperSU added.
I downloaded the 5.1 image from Google, and tried flashing it:
fastboot flash bootloader bootloader-mako-makoz30f.img
fastboot reboot-bootloader
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1701.06.img
fastboot reboot-bootloader
fastboot update image-occam-lmy47o.zip
Got some missing sig errors, and "failed to allocate xxxxxxxxx bytes" error. Thus after searching for more information I ended up unpacking image-occam-lmy47o.zip and running:
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash cache cache.img
Then rebooted. The result is an endless boot animation, regardless of anything I try. Tried restoring my TWRP backup, reflashing 5.1, reflashing 5.0.1, always the same. Last logcat line at boot:
E/kickstart( 233): Sahara protocol completed
Then it's just stuck there. For minutes. For tens of minutes. Looks like forever. Anyone else ever seen this problem, and happens to have a solution? (Preferably without losing my data)
Edit: After a few hours I restored the original (or so I hope) state, by wiping, then flashing 5.0.1, then restoring my backup. But now I don't dare to try flashing 5.1 again. Still would love to hear ideas from who might have seen this problem and knows a solution.
Click to expand...
Click to collapse
You only really need to flash the following (unless there is a new bootloader and radio):
fastboot flash boot boot.img
fastboot flash recovery recovery.img (if you are running custom recovery you can skip flashing this)
fastboot flash system system.img
metpage said:
You only really need to flash the following (unless there is a new bootloader and radio):
fastboot flash boot boot.img
fastboot flash recovery recovery.img (if you are running custom recovery you can skip flashing this)
fastboot flash system system.img
Click to expand...
Click to collapse
There was a new radio, but that worked (I accidentally booted normally after flashing it). The rest is the same that I did, except the cache, guess next time I'll try doing it without flashing that one. Do I not have to wipe the cache partition either? (And no custom recovery here, I boot TWRP from my PC via fastboot.)
Edit: Who understands this.... I tried it again tonight, flashed radio, then fastboot update image-occam-lmy47o.zip worked, no error this time, no unpacking, nothing. Just a successful update this time.
Guess that wipe was needed, maybe something was already corrupted before I tried flashing the first time.
Case closed.

need help urgent

hi everyone i am running on nougat stock rom successfully unlock my bootloader and follow this step to root my phone but after installing twrp and flash supersu and i restart my phone it again boots into twrpi am not able to boot into system.
It only boot into fastboot and recovery
plz help me here i have indian moto g4 plus.
this the link which i follow
https://www.youtube.com/watch?v=dK2uacpjGwc&t=64s
Yeah, that Youtube guide is for rooting under Marshmallow - Nougat is more stringent and rooting with the stock kernel, as you've found out, will cause boot issues. A reliable way to root on Nougat is to flash a custom kernel onto your device.
Do you have a backup in TWRP to fall back to?
If so, and you've restored it, or if you don't have a backup of your system, then try rebooting back to TWRP and flash ElementalX v1.04 onto your device (either from a SD card or by plugging your device into your computer and try using 'adb push' to transfer ElementalX v1.04 to your device's internal storage). https://forum.xda-developers.com/moto-g4-plus/development/kernel-elementalx-g4-0-01-t3424836 for ElementalX. Hopefully then, you'll be able to boot.
For rooting under Nougat with SuperSU, have a look at this guide: https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918
I faced the same problem when I unlocked my bootloader because for some reason on some models the phone will wipe the whole system partition instead of just the data. If you want to use a custom rom then you are able to flash that with twrp no problems but if you want the stock rom back you will hava to flash it either with fasboot (will flash stock recovery) or use a twrp backup someone made of the stock rom (nougat) I just did a google search for *moto g4 plus stock rom twrp backup* and clicked on the first link which contains guides for both methods (I cannot post links sorry)
Hope I could help
echo92 said:
Yeah, that Youtube guide is for rooting under Marshmallow - Nougat is more stringent and rooting with the stock kernel, as you've found out, will cause boot issues. A reliable way to root on Nougat is to flash a custom kernel onto your device.
Do you have a backup in TWRP to fall back to?
If so, and you've restored it, or if you don't have a backup of your system, then try rebooting back to TWRP and flash ElementalX v1.04 onto your device (either from a SD card or by plugging your device into your computer and try using 'adb push' to transfer ElementalX v1.04 to your device's internal storage). https://forum.xda-developers.com/moto-g4-plus/development/kernel-elementalx-g4-0-01-t3424836 for ElementalX. Hopefully then, you'll be able to boot.
For rooting under Nougat with SuperSU, have a look at this guide: https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918
Click to expand...
Click to collapse
Tried element kernel but the results will be same boot into twrp
Can anyone have stock rom for indian dual sim variant of moto g4 plus firmwares?
rakesh595160 said:
Tried element kernel but the results will be same boot into twrp
Can anyone have stock rom for indian dual sim variant of moto g4 plus firmwares?
Click to expand...
Click to collapse
If you're after Nougat v7.0 Dec 2016, NPJ25.93-14 https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369
Nougat v7.0 March 2017, NPJS25.93-14.4 https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138
Bear in mind flashing either may wipe your device (and thus your data and internal storage), if you can, try to back up your key files via TWRP to your computer.
If you're downloading the same firmware as the build you have at the moment, you may be able to save your data and restore your system by using these commands, however be prepared to use all the flash commands (including wipes) if it doesn't work:
Code:
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.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 system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
echo92 said:
If you're after Nougat v7.0 Dec 2016, NPJ25.93-14 https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369
Nougat v7.0 March 2017, NPJS25.93-14.4 https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138
Bear in mind flashing either may wipe your device (and thus your data and internal storage), if you can, try to back up your key files via TWRP to your computer.
If you're downloading the same firmware as the build you have at the moment, you may be able to save your data and restore your system by using these commands, however be prepared to use all the flash commands (including wipes) if it doesn't work:
Click to expand...
Click to collapse
I just flash revivour os ut boots my phone well nkw how do i root my devices?
rakesh595160 said:
I just flash revivour os ut boots my phone well nkw how do i root my devices?
Click to expand...
Click to collapse
If you've flashed revivorOS, the rooting instructions are on the opening post of that ROM... https://forum.xda-developers.com/mo...om-npjs25-93-14-4-deodexed-debloated-t3587180

Nexus 6p with custom recovery is in bootloop!

Hi there! I recently got my first android phone so wanted to install Lineage os 15.1 but messed it up right away as it's in now in boot loop! Here's what I did:
It was on Android 8.0 angler-opr5.170623.011-factory-0e60ceb6 but I unlocked its boot loader and installed custom recovery and I successfully flashed in the fastboot , vendor, radio and boot loader from Lineage OS 15.1 thread, now instead of following the rest of instructions, I madly decided to reboot the device using fastboot reboot and now I don't see anything except these colored circles which is what boot loop probably is! Please help me find a solution! Thank you!
edited: I have successfully entered into bootloader mode but don't know how to proceed!
I'd flash all the stock firmware in bootloader and start over. Grab the latest firmware package from Google's site, extract it, then run:
fastboot flash bootloader bootloader.img (name changes with version)
fastboot reboot-bootloader
fastboot flash radio radio.img (name changes with version)
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
Reboot to system
You'll probably have to flash your custom recovery again in bootloader after the first boot. It usually reverts back to stock.
https://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928/page1
Part 10 in the thread above^
I recommend you installing an easy official ROM.
With them all you need to do is a clean flash of the ROM
Since I'm still a noob so I need to muster up courage to proceed but I really appreciate your valuable input guys!! Cheers!! :good:
edited: I have successfully installed stock firmware! cheers!

Moto G4 only boots in fastboot

Hi,
I have a problem with a Moto G4. I tried to root the device and think I f***** up a bit.
After successfully installing TWRP I tried to install SuperSu using adb sideload and afterwards the device wouldn't boot anymore. Only fastboot and the recovery are still working. If I try to boot the device it just turns off. A factory reset didn't help.
I tried installing a LineageOS but nothing changed. It still boots into fastboot.
Can anybody help?
squanch123 said:
Hi,
I have a problem with a Moto G4. I tried to root the device and think I f***** up a bit.
After successfully installing TWRP I tried to install SuperSu using adb sideload and afterwards the device wouldn't boot anymore. Only fastboot and the recovery are still working. If I try to boot the device it just turns off. A factory reset didn't help.
I tried installing a LineageOS but nothing changed. It still boots into fastboot.
Can anybody help?
Click to expand...
Click to collapse
I forgot to say that I at first didn't install supersu systemless.
After I noticed that the device wouldn't boot anymore I tried installing it again systemless.
squanch123 said:
I forgot to say that I at first didn't install supersu systemless.
After I noticed that the device wouldn't boot anymore I tried installing it again systemless.
Click to expand...
Click to collapse
Hmm, did you wipe your system and data in TWRP before flashing LineageOS? You do not require root to flash LineageOS, just an unlocked bootloader and a compatible TWRP recovery (taking care to note if you need the 32 bit or 64 bit TWRP recovery for the respective custom ROM).
Also, with rooting on our G4/Plus, if you are on stock Nougat, you must flash a custom kernel (e.g. ElementalX) before you root. You'll otherwise experience the boot failures you're experiencing. Thus, to root on stock Nougat, unlock bootloader, flash/boot TWRP, backup, then flash ElementalX, then flash SuperSU/magisk.
Without knowing the current state of your device, I would suggest re-flashing your device with the stock firmware. Can you remember what stock firmware you had on your device before rooting initially?
echo92 said:
Hmm, did you wipe your system and data in TWRP before flashing LineageOS? You do not require root to flash LineageOS, just an unlocked bootloader and a compatible TWRP recovery (taking care to note if you need the 32 bit or 64 bit TWRP recovery for the respective custom ROM).
Also, with rooting on our G4/Plus, if you are on stock Nougat, you must flash a custom kernel (e.g. ElementalX) before you root. You'll otherwise experience the boot failures you're experiencing. Thus, to root on stock Nougat, unlock bootloader, flash/boot TWRP, backup, then flash ElementalX, then flash SuperSU/magisk.
Without knowing the current state of your device, I would suggest re-flashing your device with the stock firmware. Can you remember what stock firmware you had on your device before rooting initially?
Click to expand...
Click to collapse
Hi, thanks for your reply
Yes, I wiped system data and cache before flashing lineage. I just tried it again and I am still stuck in fastboot.
Unfortunately I don't remember the stock firmware version. Should I just try to flush the custom kernel and supersu afterwards?
squanch123 said:
Hi, thanks for your reply
Yes, I wiped system data and cache before flashing lineage. I just tried it again and I am still stuck in fastboot.
Unfortunately I don't remember the stock firmware version. Should I just try to flush the custom kernel and supersu afterwards?
Click to expand...
Click to collapse
Hmm, did you know if the flash of LineageOS reported okay within TWRP? Just out of interest, which TWRP and which build of LineageOS are you flashing (e.g. are you using the 32 bit TWRP or 64 bit TWRP, and are you flashing the 32 or 64 bit Lineage OS)?
That's confusing that even pressing 'start' in fastboot reboots your device rather than booting, even with a custom ROM... What happens if you boot to TWRP and try to reboot via TWRP? Is there a system to boot to?
Without the stock system on your device, there's no point to re-flashing the custom kernel/SuperSU, since you should have LineageOS on your device. Do you have a TWRP backup you could restore before you tried to root? If not, then what's your device model number (and if you can remember it, what software channel you're on, e.g. retus, reteu etc). ?
echo92 said:
Hmm, did you know if the flash of LineageOS reported okay within TWRP? Just out of interest, which TWRP and which build of LineageOS are you flashing (e.g. are you using the 32 bit TWRP or 64 bit TWRP, and are you flashing the 32 or 64 bit Lineage OS)?
That's confusing that even pressing 'start' in fastboot reboots your device rather than booting, even with a custom ROM... What happens if you boot to TWRP and try to reboot via TWRP? Is there a system to boot to?
Without the stock system on your device, there's no point to re-flashing the custom kernel/SuperSU, since you should have LineageOS on your device. Do you have a TWRP backup you could restore before you tried to root? If not, then what's your device model number (and if you can remember it, what software channel you're on, e.g. retus, reteu etc). ?
Click to expand...
Click to collapse
Yes, everything was ok with the flash.
I am using lineage-14.1-20180516-nightly-athene-signed and twrp-3.2.1-0-athene. I didn't see any options to choose between 32 and 64 bit. (Download pages: https://download.lineageos.org/athene#!name https://eu.dl.twrp.me/athene/)
It doesn't matter how I try to boot (powerbutton, fastboot, recovery) I always directly end up in fastboot.
No I don't have a backup. When I got the device it was resetted so I saw no point in making one :/ It is an XT1622 and it should be reteu.
squanch123 said:
Yes, everything was ok with the flash.
I am using lineage-14.1-20180516-nightly-athene-signed and twrp-3.2.1-0-athene. I didn't see any options to choose between 32 and 64 bit. (Download pages: https://download.lineageos.org/athene#!name https://eu.dl.twrp.me/athene/)
It doesn't matter how I try to boot (powerbutton, fastboot, recovery) I always directly end up in fastboot.
No I don't have a backup. When I got the device it was resetted so I saw no point in making one :/ It is an XT1622 and it should be reteu.
Click to expand...
Click to collapse
Okay, so they should both be 32 bit, so no worries there. There do seem to be a few reports of boot issues on the more recent official LineageOS builds https://forum.xda-developers.com/moto-g4-plus/development/rom-cyanogenmod-14-1-t3522101/page280 but I don't know if they are still existing on the build you've flashed.
As it's likely your device has been reset when you flashed LineageOS (I don't know if there are still files on your internal storage, which you can view in TWRP, so back up if you do have files), you may wish to look into a stock firmware flash. Here's the April 2018 NPJS25.93-14-18 firmware, which appears to be the build released to EU devices: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 You do not have to re-lock your bootloader if you don't wish to - if you wish to leave your bootloader unlocked, then flash the stock firmware via fastboot with the following flashing commands:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.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 system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
Flashing these files via ADB should put a fresh copy of the latest firmware onto your device, which should then boot. If it does boot, then you can proceed with rooting (flash TWRP, then back up, then flash ElementalX or vegito, then flash SuperSU or magisk).
echo92 said:
Okay, so they should both be 32 bit, so no worries there. There do seem to be a few reports of boot issues on the more recent official LineageOS builds https://forum.xda-developers.com/moto-g4-plus/development/rom-cyanogenmod-14-1-t3522101/page280 but I don't know if they are still existing on the build you've flashed.
As it's likely your device has been reset when you flashed LineageOS (I don't know if there are still files on your internal storage, which you can view in TWRP, so back up if you do have files), you may wish to look into a stock firmware flash. Here's the April 2018 NPJS25.93-14-18 firmware, which appears to be the build released to EU devices: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 You do not have to re-lock your bootloader if you don't wish to - if you wish to leave your bootloader unlocked, then flash the stock firmware via fastboot with the following flashing commands:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.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 system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
Flashing these files via ADB should put a fresh copy of the latest firmware onto your device, which should then boot. If it does boot, then you can proceed with rooting (flash TWRP, then back up, then flash ElementalX or vegito, then flash SuperSU or magisk).
Click to expand...
Click to collapse
Thanks for the help!
I can boot the stock rom and I have root access. However if I start or shut down the device it goes to fastboot. From there I can boot or shut down the device and everything seems to work Do you know how I can boot directly without fastboot?
squanch123 said:
Thanks for the help!
I can boot the stock rom and I have root access. However if I start or shut down the device it goes to fastboot. From there I can boot or shut down the device and everything seems to work Do you know how I can boot directly without fastboot?
Click to expand...
Click to collapse
Hmm, try booting back to the bootloader, attach your device to your computer, then open ADB. In ADB, type 'fastboot oem fb_mode_clear' without the quotes. Press enter to submit, then reboot and see if your device boots to system rather than to fastboot.
This command should clear fastboot mode (though useful when flashing).
echo92 said:
Hmm, try booting back to the bootloader, attach your device to your computer, then open ADB. In ADB, type 'fastboot oem fb_mode_clear' without the quotes. Press enter to submit, then reboot and see if your device boots to system rather than to fastboot.
This command should clear fastboot mode (though useful when flashing).
Click to expand...
Click to collapse
Yes that worked
Thank you very much for your help :victory:

OOS 11.1.2.2 Stable Boot

Can anyone post a OOS 11.1.2.2 Stable Boot IMG?
Having a bootloop issue after trying to flash TWRP/PBRP and want to at least get booting to the ROM again, it would seem I have a corrupt/bad boot image.
Gunna post it here myself
Extracted from the official update package using Payload-Dumper
EDIT: Found it posted here too-
OOS stable boot image and patched magisk boot image both for 11.1.1.1.
Leaving this here as i ended up boot looping from installing custom kernel, and it being a new release i was pulling my hair trying to figure this out. Flashed through fastboot with "fastboot flash boot_a XX.img, fastboot flash boot_b XX.img"...
forum.xda-developers.com
Instructions to do it yourself from the Official ROMs-
OOS stable boot image and patched magisk boot image both for 11.1.1.1.
Leaving this here as i ended up boot looping from installing custom kernel, and it being a new release i was pulling my hair trying to figure this out. Flashed through fastboot with "fastboot flash boot_a XX.img, fastboot flash boot_b XX.img"...
forum.xda-developers.com

Categories

Resources