June 2018 Factory Flash Tool - Nexus 5X Android Development

So, not sure if this belongs here, but I made a batch script to restore to 100% stock.
To use, just unzip and make sure your device can interact with ADB. If adb devices yields anything other than showing your device, including unauthorized, it will not work.
This will boot into the bootloader on its own, and also has an option at the end to re-lock the bootloader
I'll try to update this with each security update.
https://drive.google.com/open?id=1J-TdJI2XgqzXW406T3SglqlAf2XbqJaS

Related

[GUIDE] Getting started - Unlock->TWRP->root->OTA updates

As there seems to be no such guide yet and it took me quite a while to get all this information together, I thought of giving back something by putting information together for others to start.
This guide is meant for the CLT-L29 (dual SIM). Rebranding and switching your CLT-L09 (single SIM) to dual is not subject of this guide and is not adviced.
This is for a Huawei P20 Pro CLT-L29 with factory reset. Please bear with me if there really is a step missing as I try to reproduce this for the documentation with an already bootloader unlocked and previously rooted phone (root should be gone after [factory] resetting via eRecovery).
A collection of all tools used can be found here.
As always, you are doing this on your own risk, no one else can be held responsible for this.
Cheat sheet
eRecovery
The recovery sitting in the "recovery" partition. eRecovery is Huawei's recovery that is able to fix your phone by downloading the latest OTA update via WiFi if you got stuck in a boot loop for several reasons.
To boot into eRecovery:
Power down your phone (if you are stuck in a boot loop simply continue with the next step).
Hold volume up until you end up in eRecovery.
Setup your WiFi access and let it recover your phone.
If unsure, "wipe data/factory reset" to get rid of any leftovers you messed up.
Reboot and be happy that you have not fully bricked your phone.
TWRP
The recovery typically flashed to the "recovery_ramdisk" partition. TeamWin Recovery Project is what you typically use to flash ROMs, to root the phone and to install OTA updates.
Do NOT flash TWRP into "recovery" partition or you will lose eRecovery and the ability to easily recover your semi-bricked phone via WiFi!
To boot into TWRP (once flashed):
Power down your phone (if you are stuck in a boot loop simply continue with the next step).
Hold volume up and power until you end up in TWRP.
Unlock your bootloader
Get your bootloader unlock code from here https://emui.huawei.com/en/unlock_detail (available until mid of July I think). Some report to have to wait 24/48h to get their code via mail, I got mine directly.
Register via mail and do not get confused that you can not select USA or Germany or whatever country, simply use location Hong Kong.
Make sure you select "EMUI above 5.0" when entering your phone data (P20 Pro comes with EMUI 8.x).
Connect your phone via ADB. There are tons of HowTos about this, so I will not be covering this here.
Use Tool All In One to check that you can talk to your device via ADB. It will also help you installing the correct ADB USB drivers.
Unlock your bootloader using Tool All In One.
Reboot back into system.
Flash TWRP
Make sure no lock screen or other locking is set:
"Settings > Security": Remove fingerprint, face or password locking, simply set to none.
Enter developer mode, should already been done for unlocking the bootloader.
Setting > System > Developer options: Disable the display lock.
Download latest ADB & Fastboot as I will continue with the rest on command line.
Verify connection to your phone with "adb devices", this should list your phone.
Reboot into fastboot by using "adb reboot bootloader".
Verify connection to your phone with "fastboot devices", this should list your phone.
Flash TWRP by Pretoriano80 with "fastboot flash recovery_ramdisk twrp_clt_0.1.img". This TWRP is able to access the encrypted internal storage! TWRP is flashed to "recovery_ramdisk". This ensures that you can still access eRecovery if something goes wrong.
Remove the USB cable.
Reboot into TWRP. If you do not boot directly into TWRP the Huawei eRecovery might replace TWRP again. Once you booted into TWRP you are fine for future reboots.
Use "Keep Read Only" for the system partition.
Make a backup!!!
Backup your phone to internal storage (USB stick via USB-OTG adapter failed for me):
Select "Backup".
Tick all partitions (scroll down and tick all).
Swipe to Backup.
Select "Reboot System", "Do Not Install".
Back in Android make a copy of your backup located in your internal storage "/TWRP/" to an external location like your PC. Keep the backup on your phone to be able to go back quickly to this point via TWRP.
Root the stock ROM
Place "Magisk-v16.4-Beta.zip" onto the internal storage.
Power off the phone and remove the USB cable.
Boot into TWRP.
Install root and Magisk Manager:
Select "Install".
Select "Magisk-v16.4-Beta.zip"
Tick "Reboot after installation is complete".
Swipe to confirm Flash.
Select "Do Not Install".
Back in Android start "Magisk Manager" and check that it is green and therefore rooted.
Install an OTA (Over The Air) stock update
PC method
Method involving ADB based on this guide.
First make sure no OTA update gets installed automatically as this will end up in booting into TWRP and failing with the update.
Go to "Settings > System > System Update".
Open the three dots menu on the top right and select "Update Settings".
Disable automatic update download via WiFi as once updates are downloaded the phone will bug you to update and maybe tries to update itself during the night!
Start in Android but do not download the OTA update yet.
Verify connection to your phone with "adb devices", this should list your phone.
Reboot into fastboot by using "adb reboot bootloader".
Verify connection to your phone with "fastboot devices", this should list your phone.
Flash "recovery_ramdisk_nocheckP20.img" with "fastboot flash recovery_ramdisk recovery_ramdisk_nocheckP20.img". For official OTA updates that you would regularly get, the "nocheck" feature should not be needed but does not harm. This will remove TWRP and you have to flash it again after the OTA update has finished.
Reboot into Android by using "fastboot reboot".
Remove the USB cable.
Download your OTA update via "Settings > System > System Update".
Let the phone reboot to install the OTA update and follow the update until you are back in Android with your new firmware version.
Install TWRP and root again.
Standalone method
Deprecated/wrong method based on this guide.
Read first!!!
While this method should do no harm it will only ever update to CLT-L29 8.1.0.128a(C432) [hw/eu] as this is what is inside the file "update.zip" that you can currently download and that gets installed by "HuRUpdater_0.3.zip" in the same folder. This was not clearly explained in the source thread, therefore sorry about this wrong information. If you intend to update to this stock ROM continue, otherwise use the "PC method".
I will check about the best way to install OTA updates without PC interaction in the next couple of days (currently waiting for 130+ getting rolled out for me for some investigations regarding the OTA process).
First make sure no OTA update gets installed automatically as this will end up in booting into TWRP and failing with the update.
Go to "Settings > System > System Update".
Open the three dots menu on the top right and select "Update Settings".
Disable automatic update download via WiFi as once updates are downloaded the phone will bug you to update and maybe tries to update itself during the night!
Place the following files into a folder on the internal storage (for sure not all are required but this is part of the little information not clear right now):
"HuRUpdater_0.3.zip"
"recovery.img"
"update.zip"
"update_all_hw.zip"
"update_data_public.zip"
Go to "Settings > System > System Update" and check for an update.
Download the OTA update.
Do not reboot when prompted.
Make sure no lock screen or other locking is set:
"Settings > Security": Remove fingerprint, face or password locking, simply set to none.
Enter developer mode, should already been done for unlocking the bootloader.
Setting > System > Developer options: Disable the display lock.
Power down the phone.
Boot into TWRP.
Install "HuRUpdater_0.3.zip". Do not get irritated if it tells you it is for CLT-L09 instead of CLT-L29, everything is fine.
Wipe dalvik cache before rebooting.
Reboot back into Android.
Check "Magisk Manager" to see if root got removed. TWRP might get removed as well. If TWRP or root got removed, repeat the install for one or both like before.
In my case only root got removed but TWRP was kept functional. If this is the case for you as well, simply flash "Magisk-v16.4-Beta.zip" via TWRP again.
Changelog
2018-06-21
Updated/corrected wrong information collected about installing OTA updates standalone (without PC). Until further notice use the PC method.
Great post. Thank you
Very good post!
Thank you to collect all this important info!
[emoji481]
P20 Pro & Tapatalk
can i use your step above to rebranding from L29c636 to l29c432? Thanks
Barcovn said:
can i use your step above to rebranding from L29c636 to l29c432? Thanks
Click to expand...
Click to collapse
Not sure, not tested and not topic of this thread.
For my understanding, why do you want to rebrand it to C432 which is the region code as far as I understand.
Is there a BIG benefit of getting OTA updates earlier or why do you want to mess around with it ?
Xcelsior said:
Not sure, not tested and not topic of this thread.
For my understanding, why do you want to rebrand it to C432 which is the region code as far as I understand.
Is there a BIG benefit of getting OTA updates earlier or why do you want to mess around with it ?
Click to expand...
Click to collapse
yes, i mean change the region code. as i use the p20 pro since April, newer firmware ususal fix/improve performance for phone or camera. however it seem the c636 update is much slower then C432. currently i have problem with facebook lagging which inhope newer firmware fix it
This is good! I'll sticky it when I get a chance later tonight. I'm mobile atm
Maybe I'm missing something.
https://forum.xda-developers.com/hu...de-how-to-root-debrand-remove-retail-t3788326
It's been here for some time.
Nothing wrong with your guide it's decent but the info provided is actually already here mate.
Root, twrp, de-brand, OTA, it's all there
dladz said:
Maybe I'm missing something.
https://forum.xda-developers.com/hu...de-how-to-root-debrand-remove-retail-t3788326
It's been here for some time.
Nothing wrong with your guide it's decent but the info provided is actually already here mate.
Root, twrp, de-brand, OTA, it's all there
Click to expand...
Click to collapse
They're a bit different. The debrand thread is obviously good but much more specific to debranding. This is a more generic for general How-To's
dladz said:
Maybe I'm missing something.
https://forum.xda-developers.com/hu...de-how-to-root-debrand-remove-retail-t3788326
It's been here for some time.
Nothing wrong with your guide it's decent but the info provided is actually already here mate.
Root, twrp, de-brand, OTA, it's all there
Click to expand...
Click to collapse
I was reading this one as well but like matt4321 already said, it is actually for a different purpose.
And even the "ROOT ONLY" instructions are either widespread over the whole P20 Pro forum, incomplete or even outdated:
Linking to other threads with endless, partly revised instructions (on page n of the thread).
Referring to wrong official TWRP that can not use internal storage.
Hard to understand for beginners on this device (not even talking about someone who is entirely new to all of this).
Missing steps or expecting that you have already successfully flashed your first ROM (talking about advanced things like rebranding).
Don't get me wong, I am used to read a lot when it comes to custom ROMs (if you check the old part of my signature you can see that I am not actually a newbie here and my roots actually reach back to when all of the Android stuff startet at all, back when XDAs flashed HTC HD2 WinMo to Android). However I really missed a guide that actually collects all the basic information for beginners without going off roads too early.
These are more or less the steps I'm used to when I owned my nexus phones.
I have some questions:
If I root my phone and install, let's say adaway, will I be able to receive OTA? Or I will have to flash a new image manually?
If after root I relock bootloader, will I be able to unlock it again later for further modding?
This method implies that I can return to stock anytime and relock bootloader?
Thanks for the guide and answers , great job
mangusZen said:
If I root my phone and install, let's say adaway, will I be able to receive OTA? Or I will have to flash a new image manually?
Click to expand...
Click to collapse
Yes, exactly what I am doing. I need root for some apps and besides that I am happy with the stock OTA ROM, at least for the moment. OTA updates work fine so far.
The only thing as explained in my guide is that OTA updates will fail as they boot into TWRP instead of original fastboot. Therefore you need to explicitly boot into TWRP and install the downloaded OTA update with "HuRUpdater_0.3.zip".
mangusZen said:
If after root I relock bootloader, will I be able to unlock it again later for further modding?
Click to expand...
Click to collapse
From what I have read so far re-locking your bootloader is not advised. You seem to be unable to unlock it again or at least need to request another unlock code from Huawei.
At least this is my understanding of the situation so far.
mangusZen said:
This method implies that I can return to stock anytime and relock bootloader?
Click to expand...
Click to collapse
Returning to stock is even easier if you keep eRecovery working as explained in the guide (flashing TWRP only to recovery_ramdisk partition). With eRecovery you can wipe TWRP and root and let eRecovery download and install the latest official stock ROM.
Regarding the bootloader re-locking, see my answer above.
Xcelsior said:
Yes, exactly what I am doing. I need root for some apps and besides that I am happy with the stock OTA ROM, at least for the moment. OTA updates work fine so far.
The only thing as explained in my guide is that OTA updates will fail as they boot into TWRP instead of original fastboot. Therefore you need to explicitly boot into TWRP and install the downloaded OTA update with "HuRUpdater_0.3.zip".
From what I have read so far re-locking your bootloader is not advised. You seem to be unable to unlock it again or at least need to request another unlock code from Huawei.
At least this is my understanding of the situation so far.
Returning to stock is even easier if you keep eRecovery working as explained in the guide (flashing TWRP only to recovery_ramdisk partition). With eRecovery you can wipe TWRP and root and let eRecovery download and install the latest official stock ROM.
Regarding the bootloader re-locking, see my answer above.
Click to expand...
Click to collapse
Ok, so to install OTA I have to use hurupdater method and flash the OTA package manually.
For what I read and understood, but I may be wrong, the problem with relocking bootloader is encountered by who used the funkyhuawei method, that alters bootloader in some way, especially to achive the mono sim - dual sim switch.
With this you cant for now re unlock the bootloader again.
But I could be wrong and be like that for everyone, will see if someone will come up with some clarifications.
It would be nice to have the ability to return to stock, lock bootloader and use warranty
[emoji14]
Thanks for your work and answers
mangusZen said:
Ok, so to install OTA I have to use hurupdater method and flash the OTA package manually.
Click to expand...
Click to collapse
Yes, that is basically what "HuRUpdater_0.3.zip" will do, it will flash/install an OTA update that has previously been downloaded.
Wipe cache afterwards and be happy with your new up to date stock ROM version.
Xcelsior said:
Yes, that is basically what "HuRUpdater_0.3.zip" will do, it will flash/install an OTA update that has previously been downloaded.
Wipe cache afterwards and be happy with your new up to date stock ROM version.
Click to expand...
Click to collapse
I have to rename the downloaded OTA packages for huru to work, right?
mangusZen said:
I have to rename the downloaded OTA packages for huru to work, right?
Click to expand...
Click to collapse
Not for me. Just downloaded the OTA update via the EMUI system menu in Android, rebooted into TWRP and installed (aka executed) HuRu.
HuRu did the rest for me.
Tested with 120 -> 128 OTA update.
Hi It is late at night and I am not sure if I typed fastboot flash recovery twrp_clt_0.1.img instead off fastboot flash recovery_ramdisk twrp_clt_0.1.img. How can I make sure I still have erecovery? super newbie to android rooting, please help Thank you
Amowiel said:
Hi It is late at night and I am not sure if I typed fastboot flash recovery twrp_clt_0.1.img instead off fastboot flash recovery_ramdisk twrp_clt_0.1.img. How can I make sure I still have erecovery? super newbie to android rooting, please help Thank you
Click to expand...
Click to collapse
Simplest way would be to try to boot into eRocovery:
Power off the phone.
Power on the phone until you see the "you are a baddy because you unlocked your bootloader" screen.
Hold volume up (you can already hold it when powering on the phone) until you end up in eRecovery or TWRP.
If you end up in TWRP it should still be possible to recover your eRecovery with a proper backup of the "recovery" partition from any other P20 Pro.
Xcelsior said:
Simplest way would be to try to boot into eRocovery:
Power off the phone.
Power on the phone until you see the "you are a baddy because you unlocked your bootloader" screen.
Hold volume up (you can already hold it when powering on the phone) until you end up in eRecovery or TWRP.
If you end up in TWRP it should still be possible to recover your eRecovery with a proper backup of the "recovery" partition from any other P20 Pro.
Click to expand...
Click to collapse
thank you so much for such a quick reply, can confirm that my brain was not so fried and I didn't wipe my ercovery
thank you for your amazing guide, everything worked perfectly
mangusZen said:
Ok, so to install OTA I have to use hurupdater method and flash the OTA package manually.
For what I read and understood, but I may be wrong, the problem with relocking bootloader is encountered by who used the funkyhuawei method, that alters bootloader in some way, especially to achive the mono sim - dual sim switch.
With this you cant for now re unlock the bootloader again.
But I could be wrong and be like that for everyone, will see if someone will come up with some clarifications.
It would be nice to have the ability to return to stock, lock bootloader and use warranty
[emoji14]
Thanks for your work and answers
Click to expand...
Click to collapse
Actually you don't in some cases, if your simply rooted with twrp and you want to install an OTA that's been advertised to your device. All you need to do is install the nocheck recovery IMG and then take the update, reinstall twrp and magisk after the update and you're done.
If it's an update that's not advertised to your device yet then hur updater is the way.

Phone is Cycling between Bootloader Unlocked Screen and Motorola Sp

I just tried rooting my phone. The phone is cycling back and forth between the bootloader is unlocked screen and the Motorola splash screen.
To repeat some steps from a prior post.
My phone had QPR30.80-58-3 .
I downloaded that ROM and extracted the boot.img file.
I downloaded the latest Magisk Manager and installed it on my phone.
I ran through the patching process for boot.img.
I requested an unlock code from Motorola and unlocked the bootloader.
I flashed the patched boot image which patched partition b.
I flashed the patched boot image to partition a.
I rebooted which began the cycle.
I tried holding down the power button but it returns to the cycle.
I can get back to the bootloader with the Volume Down and Power buttons.
Any suggestions on what could get me back to a functioning phone, rooted or not rooted?
I would confirm the version of the boot image you flashed matches the version of the installed rom. You could also try to flash the unpatched / original boot.img to see if that gets you booting again.
dafunk60 said:
I would confirm the version of the boot image you flashed matches the version of the installed rom. You could also try to flash the unpatched / original boot.img to see if that gets you booting again.
Click to expand...
Click to collapse
I checked that the image I patched was from the QPR30.80-58-3 ROM which matched the level after the phone was updated.
I flashed that original boot image which flashed partition a and then rebooted. I did not flash partition b.
It first came up with the unlock warning screen. It sat on the Motorola splash screen for a noticeable amount of time followed by a yellow screen with a circle around the Motorola symbol. Finally it ended up on a blue Hello there screen with a yellow start button.
This screen was unresponsive. Eventually through various cyclings through all this I ended up on a screen that said Android could not boot and gave me an option of a factory reset. I did that but it did not help getting past the Hi there screen.
I went back and flashed the QPR30.80_58 image on both partitions a and b. This got me back to setting up the phone again. The phone is at QPR30.80_58. I am considering just rooting at this level.
So I tried patching the original QPR30.80_58 boot image. I did notice that it appeared the phone had automatically staged the QPRS30.80_58_3 update. I proceeded in (false) hopes that I could stop that.
It flashed the b partition. Ended up stuck in the bootloader unlock loop. I flashed the a partition but no change.
Previously I had ended up on a recovery screen automatically after some time. I could not force this to happen.
I tried flashing the original unpatched boot image but would end up on a non-functioning Hello there screen.
I tried adb recovery and adb shell but came back with device unauthorized.
I tried following some instructions on using fastboot erase userdata and fastboot erase cache. No change.
I finally found out that the Recovery menu was option off the bootloader screen. However, that came up with No command.
Lenovo Rescue did not want to recognize my XT2043-4 device.
I flashed the unpatched retail QPRS30.80_58_3 boot image to both a and b partitions. That got me back to a functioning phone. After getting through the login and setup steps I did find that it was at QPRS30.80_58_3.
Out of curiosity, I tried Lenovo Rescue again. I received a "Failed to match connected device. Reconnect device, then try again." which did not work.
Now I am at a loss.
DougPeterson said:
So I tried patching the original QPR30.80_58 boot image. I did notice that it appeared the phone had automatically staged the QPRS30.80_58_3 update. I proceeded in (false) hopes that I could stop that.
It flashed the b partition. Ended up stuck in the bootloader unlock loop. I flashed the a partition but no change.
Previously I had ended up on a recovery screen automatically after some time. I could not force this to happen.
I tried flashing the original unpatched boot image but would end up on a non-functioning Hello there screen.
I tried adb recovery and adb shell but came back with device unauthorized.
I tried following some instructions on using fastboot erase userdata and fastboot erase cache. No change.
I finally found out that the Recovery menu was option off the bootloader screen. However, that came up with No command.
Lenovo Rescue did not want to recognize my XT2043-4 device.
I flashed the unpatched retail QPRS30.80_58_3 boot image to both a and b partitions. That got me back to a functioning phone. After getting through the login and setup steps I did find that it was at QPRS30.80_58_3.
Out of curiosity, I tried Lenovo Rescue again. I received a "Failed to match connected device. Reconnect device, then try again." which did not work.
Now I am at a loss.
Click to expand...
Click to collapse
Happy to hear you have a working phone again! The lack of touchscreen response & the stuck at the hello screen issues are what others have reported when they used a boot image from a different version than on the phone. I suspect that something got confused between the version & slot somewhere along the way. As far as the Lenovo Rescue software not seeing the phone, it's communicating via ADB. If I recall correctly I needed to reauthorize the PC to connect via ADB after updating from 30.80-58 to 30.80-58-3. When I connect the phone via USB there's a popup on the phone asking to authorize the PC. Can you connect via ADB in the command line? If yes, you may want to reinstall the Lenovo software. If no, I would troubleshoot the ADB connection.
I originally rooted the 30.80-58 version. When 30.80-58-3 was released all I did was flash the unpatched boot.img, took the update OTA, let it reboot, then flash a patched boot.img from 30.80-58-3. All worked as expected, user data was intact.
dafunk60 said:
Happy to hear you have a working phone again! The lack of touchscreen response & the stuck at the hello screen issues are what others have reported when they used a boot image from a different version than on the phone. I suspect that something got confused between the version & slot somewhere along the way. As far as the Lenovo Rescue software not seeing the phone, it's communicating via ADB. If I recall correctly I needed to reauthorize the PC to connect via ADB after updating from 30.80-58 to 30.80-58-3. When I connect the phone via USB there's a popup on the phone asking to authorize the PC. Can you connect via ADB in the command line? If yes, you may want to reinstall the Lenovo software. If no, I would troubleshoot the ADB connection.
I originally rooted the 30.80-58 version. When 30.80-58-3 was released all I did was flash the unpatched boot.img, took the update OTA, let it reboot, then flash a patched boot.img from 30.80-58-3. All worked as expected, user data was intact.
Click to expand...
Click to collapse
I double checked that I had USB debugging set, given I have reset a couple of times. I revoked all USB access and reinstalled the Rescue app. I still get the Failed to match connected devices error.
fastboot device will list the phone.
adb devices or adb devices -l does not list anything and adb shell says no devices/emulators found.
If I try to get into recovery mode I get a No command screen. I have been trying to take notes on what I did but there have been gaps in all the fiddling. I may have only flashed one partition the last time I tried putting back a stock boot image.
For USB drivers I downloaded the latest from Motorola. Was that sufficient for this?
DougPeterson said:
I double checked that I had USB debugging set, given I have reset a couple of times. I revoked all USB access and reinstalled the Rescue app. I still get the Failed to match connected devices error.
fastboot device will list the phone.
adb devices or adb devices -l does not list anything and adb shell says no devices/emulators found.
If I try to get into recovery mode I get a No command screen. I have been trying to take notes on what I did but there have been gaps in all the fiddling. I may have only flashed one partition the last time I tried putting back a stock boot image.
For USB drivers I downloaded the latest from Motorola. Was that sufficient for this?
Click to expand...
Click to collapse
If you want to get into recovery, boot into the bootloader than do
Code:
fastboot reboot fastboot
That'll boot you into fastbootd which has an option to go to the real recovery
DougPeterson said:
I double checked that I had USB debugging set, given I have reset a couple of times. I revoked all USB access and reinstalled the Rescue app. I still get the Failed to match connected devices error.
fastboot device will list the phone.
adb devices or adb devices -l does not list anything and adb shell says no devices/emulators found.
If I try to get into recovery mode I get a No command screen. I have been trying to take notes on what I did but there have been gaps in all the fiddling. I may have only flashed one partition the last time I tried putting back a stock boot image.
For USB drivers I downloaded the latest from Motorola. Was that sufficient for this?
Click to expand...
Click to collapse
If adb isn't showing any devices connected that would explain why the rescue software cannot find your phone. Perhaps you don't have the correct driver installed. Windows Device Manager shows the phone as a Motorola ADB Device on my PC.
View attachment 5061327
Another possibility is that you have multiple versions of adb on your PC. Older versions won't work but the adb.exe in "C:\Program Files (x86)\Rescue and Smart Assistant" works for sure. With your phone booted into android & unlocked, plug it into your PC. Do you see the "USB debugging connected" on the phone? If you don't I would re-check that USB debugging is enabled. If you do see the debugging notification, on your PC, open a command prompt and navigate to "C:\Program Files (x86)\Rescue and Smart Assistant". Run
Code:
adb devices
Does adb find your phone?

Phone boots into fastboot, system files corrupted

Hi! My old phone is booting into fastboot mode, when I try to boot normally I get a black screen, the "Power off" button appears when I hold the power button. The bootloader is not unlocked and the phone was never rooted. Wiping the user partition does not help. It is visible in fastboot mode and I can enter stock recovery, though trying to adb sideload a stock rom returns an error (footer is wrong; signature verification failed). Trying to fastboot boot twrp or recovery.img doesn't work either. I've ran out of ideas, what should I do to get this phone to work?
Try flashing the stock ROM with fastboot. I'm pretty sure ADB doesn't let you flash onto your phone because using your phone with ADB means that it's still powered on - which can cause some issues. You can also try and unlock your bootloader through fastboot, and then flash a recovery and custom ROM.
Both failed. I attached the errors I recieved.
crepper4454 said:
Both failed. I attached the errors I recieved.
Click to expand...
Click to collapse
Try "fastboot bootloader unlock", maybe. Also: Is there a flashall.bat in the stock ROM folder? If there is: Connect your device while in fastboot, and double-click it.
crepper4454 said:
Both failed. I attached the errors I recieved.
Click to expand...
Click to collapse
Try this maybe. I know you can't wipe through the stock ROM, so, try the command: "fastboot -w". That'll wipe everything off the device.
[INDEX][Osprey][Merlin] Moto G Factory Firmware Images
Disclaimer: I am not responsible for anything that happens as a result of flashing these files. Your destiny is your own. Moto G (3rd Gen) Factory Firmware Images - Provided by Firmware TEAM - Please report broken links. New Mirrors welcome...
forum.xda-developers.com
I can wipe through stock recovery. I did fastboot -w and it cleared the cache and userdata partitions, they were already clean afaik. Typing fastboot bootloader unlock returns unknown command. There are no .bat files in my firmware. I can try downloading one from the site you linked, but I don't know what to do with it if fastboot flash does not work.
crepper4454 said:
I can wipe through stock recovery. I did fastboot -w and it cleared the cache and userdata partitions, they were already clean afaik. Typing fastboot bootloader unlock returns unknown command. There are no .bat files in my firmware. I can try downloading one from the site you linked, but I don't know what to do with it if fastboot flash does not work.
Click to expand...
Click to collapse
Try this: https://forum.xda-developers.com/t/guide-osprey-fastboot-flashing-factory-firmware-images.3187750/
It says there that the "preflash validation failed" error occurs when the firmware being flashed is older than the one already installed. I will try downloading a newer version and flashing it. Will update here.
Update: I have dowloaded a newer rom and tried to flash it. This time got different errors (picture attached, this went for every sparsechunk). I think I know the reason but I do not know how to solve it. This might not be the exact stock rom of this phone so I cannot flash it with a locked bootloader. Could someone help me finding the correct rom or suggest a different solution?
Yooooo. I have the Moto e5 Cruise and so does my wife. We bought them in 2018 from Cricket and last night hers went to emmc failure, also known scientifically as 'no worky' mode.
The phone would only load in fastboot and had tried to use my Moto RSD tool to reflash but the phone would not detect in anything but fastboot mode.. Here's where it gets interesting....
There is a piece of software called the Lenovo (which now owns Moto) Rescue and Smart Assistant that can reflash your phone back to factory, no matter your sub-variant (cricket, metro, etc). Without having a fresh backup on hand, you're going to be beholden to the last cloud sync or manual backup you have because all data will be wiped in the below process.
BTW: Just run the assistant as it seems to be the easiest 'back-to-stock/working' tool I can find. Going to fastboot alone yielded weird errors since i didn't have the unlock code for the 'fastboot oem unlock [code goes here]' command.
**RESTORATION PROCESS**
This will apply to multiple Lenovo/Moto Mobility devices. Unknown at this time how many have been impacted by this seemingly pre-planned failure on Lenovo's part.
If your phone is stuck in fastboot mode where MTK download mode does not load, nor does adb, follow these simple steps:
(NOTE: BACKUP YOUR FILES IF POSSIBLE)
1. Click the link above to be directed to the Lenovo software download page and run the installer on your PC (Sorry Mac users :'().
2. The software, once installed, will require you to sign up for OR link a google, fb, g+, etc account to it for purposes of creating a Lenovo ID. Once signed in, click on 'Rescue Now'.
3. With your phone in fastboot mode, allow the software to download the firmware for your phone.
4. Once the firmware has finished downloading and validating, click on 'Rescue Now' once again. Your phone will begin the reflashing process.
That... actually worked. The program found the required ROM and flashing went without problems. Thank you very much @kmt5150 .
crepper4454 said:
That... actually worked. The program found the required ROM and flashing went without problems. Thank you very much @kmt5150 .
Click to expand...
Click to collapse
No problemo! Glad it worked!

How To Guide Rooting the Google Pixel 6a

Rooting the Pixel 6a is just about as easy as any other factory unlocked pixel, but because so many people have had issues with unlocking their bootloaders, I figured I'd post my exact personal steps I took when a Pixel 6a came into my tech shop to be rooted, and I discovered the current bug with Rooting
What You'll Need:
- June 2022 Firmware OTA Update Installed at least: Do this on device. Do Not download the OTA update from google's firmware website.
- ADB/Fastboot/Google Drivers for Windows: I use this to install- ADB 15sec Installer
- Magisk Manager APK: Github - Magisk Github Releases
- Firmware Matching Currently Installed: Google FW page - Google Official Firmware Downloads - you need this for the boot.img file
- A Windows Computer
- A USB-C cable to connect to your phone to the computer
OEM Unlock Bug
With early units sold by Google, they're shipping with a bug where OEM Unlock stays grayed out. Here's the only way I got around this issue
1.) Log out of any Google Account on the device
2.) Connect to Wifi, check for updates without your sim card in the device. There is a bug where it will potentially download the update for your carrier sim
3.) At minimum, you should get the June 2022 security patch update. Run the update and remember which update it is for when you download the firmware to get boot.img
4.) When the update is finished, Factory Reset your device either from settings or Android recovery
5.) Go through Android setup without sim card in, and don't connect to wifi, finish setup without logging into a google account or anything
6.) When setup is done, connect to wifi and put your sim back in.
7.) Pay attention in your notifications for "Preparing your Device" notification.
8.) When that notification pops up, enable Developer options (tap build number a bunch of times)
9.) OEM Unlock should be possible to enable now. Also enable USB Debugging
Pre-Root Setup
1.) Install Magisk Manager from Github
2.) Use 7zip (or any other ZIP opening program) to extract the boot.img from your firmware download from google
-- the boot.img is inside another zip file that's in the download from google. very easy to get
3.) Put the Boot.img on your phones internal storage
4.) Open Magisk Manager, and select your Boot.img from internal storage. Patch the boot.img to make it a rooted boot.img
5.) With your phone connected to the computer, move the magisk_patched.img from sdcard/downloads to your computer
6.) If USB debugging is properly enabled, now you can open CMD and reboot to bootloader with
Code:
adb reboot bootloader
Unlocking the bootloader
1.) With the device connected, OEM Unlock enabled, and booted to bootloader, you can unlock the bootloader with the following command
Code:
fastboot flashing unlock
-- If nothing changes on your phone screen, use Device Manager to make sure the device is recognized via google drivers: vid here on that - Quick Fastboot Drivers Install Tutorial
2.) On your phone, use the volume keys to select Unlock Bootloader, then hit the power button, device should reboot back to bootloader
3.) flash the boot partition with the magisk patched boot.img
Code:
fastboot flash boot magisk_patched.img
4.) Now you can reboot back into your device and you should be rooted!
Code:
fastboot reboot
Congrats! Now you're bootloader unlocked and rooted! GrapheneOS is already available if you want a degoogled rom, haven't seen another rom pop up yet
all done from there
updating your device when rooted
I do not have a pixel 6a specifically for this right now to confirm this will work, but on every other device with OTA's, this has been my process.
1.) Download your OTA using the system update part of Settings
2.) When it pops up and is ready to restart to finish installing the update, DO NOT CLICK RESTART IN SETTINGS/SYSTEM UPDATE
3.) Go to Magisk Manager, and select Install next to Magisk
4.) Select "Install to Inactive Slot (After OTA)
5.) When its done patching the boot partition, hit restart in Magisk
Your OTA Update is now rooted
To save time and effort here is the magisk patched boot.img for June 2022 patch level, Carrier Unlocked 6a from the Google Store. Make SURE you are on build SD2A.220601.003 before flashing!
To get the `OEM Unlock` option in Developer Options to work, it's simpler to just manually flash 12.1.0 (SD2A.220601.004, Jun 2022, Verizon, Verizon MVNOs) and then wipe.
Even though it's label as Verizon, it should work for all carriers.
Hello, if we have already unlocked the bootloader, we just have to do this: start cmd then fastboot flash boot magisk_patched.img then restart the phone?
jejemc said:
Hello, if we have already unlocked the bootloader, we just have to do this: start cmd then fastboot flash boot magisk_patched.img then restart the phone?
Click to expand...
Click to collapse
Correct, though I would probably fastboot boot first just to make sure it boots up ok. When it does you can reboot to recovery and flash it.
these instructions sound like "the usual process", but for the 6a isn’t there something to patch regarding vbmeta as well?
(never had a phone that "needed" this, but in my understanding it "should" be necessary with the 6a? won’t have time to try out myself before the weekend, just asking ..)
ctfrommn said:
Correct, though I would probably fastboot boot first just to make sure it boots up ok. When it does you can reboot to recovery and flash it.
Click to expand...
Click to collapse
here it is and does and works perfectly well thank you for everything.
Im starting work on my custom kernel now so hopefully MVK for Bluejay will be ready in the coming days/weeks.
Zaxx32 said:
To save time and effort here is the magisk patched boot.img for June 2022 patch level, Carrier Unlocked 6a from the Google Store. Make SURE you are on build SD2A.220601.003 before flashing!
Click to expand...
Click to collapse
As this thread ages, not everyone will have the June 2022 update. That's why I suggested/put the steps in to do it themselves with matching firmware to what their device is on.
benji said:
To get the `OEM Unlock` option in Developer Options to work, it's simpler to just manually flash 12.1.0 (SD2A.220601.004, Jun 2022, Verizon, Verizon MVNOs) and then wipe.
Even though it's label as Verizon, it should work for all carriers.
Click to expand...
Click to collapse
This DID NOT work for me. That's why I wrote this up the way I did.
jejemc said:
Hello, if we have already unlocked the bootloader, we just have to do this: start cmd then fastboot flash boot magisk_patched.img then restart the phone?
Click to expand...
Click to collapse
If you're bootloader is already unlocked, you just have to flash the patched magisk boot img, correct. I wrote this up for those having issue with not having the ability even if it is an unlocked from google device
frank93 said:
these instructions sound like "the usual process", but for the 6a isn’t there something to patch regarding vbmeta as well?
(never had a phone that "needed" this, but in my understanding it "should" be necessary with the 6a? won’t have time to try out myself before the weekend, just asking ..)
Click to expand...
Click to collapse
Correct, these are basically the usual steps. There's nothing regarding vbmeta flashing in this case of just rooting stock firmware. You only need to do that with ROMs (GSI's mainly)
KaptinBoxxi said:
3.) flash the boot partition with the magisk patched boot.img
Code:
fastboot flash boot magisk_patched.img
Click to expand...
Click to collapse
Just a heads up. As already told by ctfrommn, it's always a better approach to first boot the magisk patched boot file. And if everything works well and good, you could then Direct Install it via Magisk.
Although directly flashing should also work, but its always better to be on the safer side.
KaptinBoxxi said:
Correct, these are basically the usual steps. There's nothing regarding vbmeta flashing in this case of just rooting stock firmware. You only need to do that with ROMs (GSI's mainly)
Click to expand...
Click to collapse
I followed your steps to a T. Still can't unlock. I'm convinced there is a fault with my device itself at this point.
stormcrank said:
I followed your steps to a T. Still can't unlock. I'm convinced there is a fault with my device itself at this point.
Click to expand...
Click to collapse
they will warranty replace if it for sure fails still. Its a silly situation, but mistakes happen
binary**# said:
Just a heads up. As already told by ctfrommn, it's always a better approach to first boot the magisk patched boot file. And if everything works well and good, you could then Direct Install it via Magisk.
Although directly flashing should also work, but its always better to be on the safer side.
Click to expand...
Click to collapse
I may not be very active on XDA, but have been rooting and rom'ing devices since the palm pre, first android phone was the droid x. I've never heard of this step, its never been needed. Its an extra pointless step that is just tethered root. You don't need to do it. As long as you don't download a random Boot.img, like the one for some reason attached to a reply on this thread and get it yourself from the firmware matching your device OR flashing Magisk via TWRP/Lineage Recovery with adb sideload, there's no reason to fastboot boot the boot.img.
You may have never run into an issue flashing a boot image but I've built thousands of roms and kernels and have learned the hard way more than once to measure twice, cut once.
That said, as long as you're simply patching a stock boot.img it's likely not an issue.
Followed all steps, on SD2A.220601.003SD2A.220601.003. OEM unlock still greyed
Nice work, Kaptinboxxi. Everything worked fine. How should we handle updates after rooting? Will a security patch break root? If so, what is the best process to root it again?
Voxilli said:
Nice work, Kaptinboxxi. Everything worked fine. How should we handle updates after rooting? Will a security patch break root? If so, what is the best process to root it again?
Click to expand...
Click to collapse
Yes, each update will require reflashing a patched kernel for the new build.
You can also do the "Install to Inactive Slot" method in Magisk to update and keep root. This has been a bit of a hit and miss for some people on the Pixel 6 series, though. The misses may be in large part be due to people having modified their partitions or not restoring the necessary images while being on a custom kernel.
OTA Upgrade Guides
The Magic Mask for Android
topjohnwu.github.io
Lughnasadh said:
You can also do the "Install to Inactive Slot" method in Magisk to update and keep root.
OTA Upgrade Guides
The Magic Mask for Android
topjohnwu.github.io
Click to expand...
Click to collapse
Good call...I guess I've never messed with that as I flash so many kernels anyway.
Lughnasadh said:
You can also do the "Install to Inactive Slot" method in Magisk to update and keep root. This has been a bit of a hit and miss for some people on the Pixel 6 series, though. The misses may be in large part be due to people having modified their partitions or not restoring the necessary images while being on a custom kernel.
OTA Upgrade Guides
The Magic Mask for Android
topjohnwu.github.io
Click to expand...
Click to collapse
That's what I've done with my OnePlus 7T for the last three years. Any repercussions for doing it this way versus patching the kernel?

Question Rebooting error after flashing firmware with Odin

Hello everyone,
I need some help with the following situation:
Using Odin I successfully flashed my Galaxy A32 5G with Android 13 (as indicated by the green PASS in Odin).
When the phone tries to reboot, I get the dreaded error message, "Can't load Android system. Your data may be corrupt....."
On my PC I issued the command, >adb devices, but no devices were found.
This is probably because I did not enable USB debugging, when the phone was still working.
I'm trying to avoid doing a factory reset, because I don't want all my data wiped.
According to the following article, you can flash an OTA file using "adb sideload" command, even without enabling USB debugging.
However, everything else I've read says that adb commands work only when USB debugging is enabled.
Fix “Can’t Load Android System Your Data May Be Corrupt” Without Reset​https://www.droidwin.com/fix-cant-load-android-system-your-data-may-be-corrupt-without-reset/
Can someone perhaps clarify whether or not USB debugging is required for using adb commands?
Thank you very much,
Peter
plee12 said:
Hello everyone,
I need some help with the following situation:
Using Odin I successfully flashed my Galaxy A32 5G with Android 13 (as indicated by the green PASS in Odin).
When the phone tries to reboot, I get the dreaded error message, "Can't load Android system. Your data may be corrupt....."
On my PC I issued the command, >adb devices, but no devices were found.
This is probably because I did not enable USB debugging, when the phone was still working.
I'm trying to avoid doing a factory reset, because I don't want all my data wiped.
According to the following article, you can flash an OTA file using "adb sideload" command, even without enabling USB debugging.
However, everything else I've read says that adb commands work only when USB debugging is enabled.
Fix “Can’t Load Android System Your Data May Be Corrupt” Without Reset​https://www.droidwin.com/fix-cant-load-android-system-your-data-may-be-corrupt-without-reset/
Can someone perhaps clarify whether or not USB debugging is required for using adb commands?
Thank you very much,
Peter
Click to expand...
Click to collapse
I think, In stock recovery only the adb sideload command works so it don't need USB Debugging to be turned ON.
aiSanaul said:
I think, In stock recovery only the adb sideload command works so it don't need USB Debugging to be turned ON.
Click to expand...
Click to collapse
Thanks for your input. Encouraged by your input, I read the article again and realized that I have to put the phone in sideload mode first.
So, I went back to the stock recovery mode and selected the menu item, "Apply update from ADB". Then I see the message on the phone, "Now send the package you want to apply....with adb sideload <filename>". Now that I thought the phone was in sideload mode, on the PC I entered ">adb devices". This time it recognized the device and displayed the device name. However, it also displayed the word, "unauthorized", after the device name. According to the article, if sideload is properly entered, it should display the word, "sideload".
Anyway I tried entering ">adb sideload update.zip", and I got the error message, "device unauthorized".
So, any idea how to get the phone to be authorized?
If this is not possible, I was thinking of replacing the stock recovery with a custom recovery like TWRP. This way I can at least back up all my data first before doing a factory reset. However, I believe installing TWRP requires the bootloader to be unlocked, which automatically wipes all data. So, this defeats the purpose of installing TWRP in the first place
Is there some trick to install TWRP without unlocking the bootloader?
Thank you
plee12 said:
Thanks for your input. Encouraged by your input, I read the article again and realized that I have to put the phone in sideload mode first.
So, I went back to the stock recovery mode and selected the menu item, "Apply update from ADB". Then I see the message on the phone, "Now send the package you want to apply....with adb sideload <filename>". Now that I thought the phone was in sideload mode, on the PC I entered ">adb devices". This time it recognized the device and displayed the device name. However, it also displayed the word, "unauthorized", after the device name. According to the article, if sideload is properly entered, it should display the word, "sideload".
Anyway I tried entering ">adb sideload update.zip", and I got the error message, "device unauthorized".
So, any idea how to get the phone to be authorized?
If this is not possible, I was thinking of replacing the stock recovery with a custom recovery like TWRP. This way I can at least back up all my data first before doing a factory reset. However, I believe installing TWRP requires the bootloader to be unlocked, which automatically wipes all data. So, this defeats the purpose of installing TWRP in the first place
Is there some trick to install TWRP without unlocking the bootloader?
Thank you
Click to expand...
Click to collapse
As you already know this is not possible without unlocking bootloader, I will explain further more to make it easy to understand.
If you don't unlock your bootloader and try flashing TWRP on your phone using ODIN Flash Tool then maybe your phone get into an veification error and your phone will end up in a softbrick. You can repair your phone by flashing your phone's stock firmware using ODIN Flash Tool, eventually you will wnd up loosing all your data.
Also unlocking bootloader in Samsung devices is so easy by turning OEM Unlocking in Developer options, but you don't seem to have access to your phone.
An Unlocked Bootloader is the PASS, which allows you to do custom thing to your phone. So without it, this won't work, maybe that is why you got that error “Can’t Load Android System Your Data May Be Corrupt”.
ALTERNATIVELY you can try flashing your phone's OLD original Stock Firmware using ODIN Flash Tool and see what happens. You can also try flashing TWRP through ODIN Flash Tool. Only flash OFFICIAL TWRP made for your device (if any), otherwise you don't have options I guess.
also Why didn't you Unlocked Bootloader before flashing a custom rom? because of warranty?
aiSanaul said:
As you already know this is not possible without unlocking bootloader, I will explain further more to make it easy to understand.
If you don't unlock your bootloader and try flashing TWRP on your phone using ODIN Flash Tool then maybe your phone get into an veification error and your phone will end up in a softbrick. You can repair your phone by flashing your phone's stock firmware using ODIN Flash Tool, eventually you will wnd up loosing all your data.
Also unlocking bootloader in Samsung devices is so easy by turning OEM Unlocking in Developer options, but you don't seem to have access to your phone.
An Unlocked Bootloader is the PASS, which allows you to do custom thing to your phone. So without it, this won't work, maybe that is why you got that error “Can’t Load Android System Your Data May Be Corrupt”.
ALTERNATIVELY you can try flashing your phone's OLD original Stock Firmware using ODIN Flash Tool and see what happens. You can also try flashing TWRP through ODIN Flash Tool. Only flash OFFICIAL TWRP made for your device (if any), otherwise you don't have options I guess.
also Why didn't you Unlocked Bootloader before flashing a custom rom? because of warranty?
Click to expand...
Click to collapse
Thanks very much for your detailed explanations and for your continued support.
Let me answer your question first about why I didn't unlock the bootloader before flashing a custom ROM. Let me backtrack and explain how this problem came about in the first place. My phone was doing an automatic system update two weeks ago (Android 13). After downloading and installing, it tried to boot up. That's when it got stuck in an infinite rebooting loop. At that point, I had no way to change any settings on the phone.
Also, to clear up any confusion, I was not trying to flash a custom ROM. I was simply trying to flash the stock ROM (Android 13), supposedly the same firmware version as the OTA that broke my phone after the automatic system update. I was thinking that perhaps there was an internet glitch during the automatic system update process, which corrupted the OS. So, I was just trying to re-install the same version as the OTA to see if that would solve the problem.
I had also thought about flashing the original version that came with the device (Android 11). But, I think I read somewhere that either Samsung phones do not allow the user to downgrade, or even if it does allow you do so, the downgrading process will wipe out the existing data on the phone. Perhaps you can confirm that or not?
In the meantime, as you suggested, I will look into how to flash TWRP.
Thank you

Categories

Resources