How to unroot and relock recovery? (fully revert to stock) - Nexus 5X Q&A, Help & Troubleshooting

I have unlocked and rooted Nexus 5x and would like to revert back to stock + relock bootloader.
What is the easiest and safest way to achieve this?

download fastboot and fastboot drivers then download latest factory image from here https://developers.google.com/android/images?hl=en and unzip it now you should have 6 files but we are gona use only 3 bootloader-bullhead-something.img radio-bullhead-something.img image-bullhead-something.zip now flash bootloader
fastboot flash bootloader bootloader-something.img then fastboot reboot-bootloader then fastboot flash radio-bullhead-something.img and fastboot reboot-bootloader now unzip the other file and cd into it then fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash system system.img fastboot flash vendor vendor.img fastboot flash userdata userdata.img and finaly fastboot flash cache cache.img now start your device and if it boots normaly reboot to bootloader again and run fastboot flashing lock (this is gonna wipe all your data so dont set up anything just make sure it boots)

or just run flash-all

Related

Stock Kernel for Primo U (CID HTC__J15)?

Hi guys,
I was wondering if anyone had the stock Kernel for the PrimoU HTC One V. If anyone does, can they supply me with it?
Thank you,
-M
Here you go...
Umm, is that what I need to revert to stock? (Kernel + Recovery?)
-M
Flashing RUU to revert to stock
- you must have the correct RUU for your device.
- if you are not sure, download CID Getter from Play Store and run it, it will show your CID.
- with your CID, you may be able to find a correct RUU for your device
then (even though some people may not agree with this, but this will bring no harm and it is noob-proof) do this:
1- flash a stock recovery.img
fastboot flash recovery recovery_signed.img
fastboot reboot-bootloader
fastboot erase cache
2- flash a stock boot.img
fastboot flash boot boot_signed.img
fastboot reboot-bootloader
fastboot erase cache
3- re-lock bootloader
fastboot oem lock
fastboot reboot-bootloader
fastboot erase cache
4- flash RUU

Lost Recovery mode!!!???

I did the follwoing:
fastboot -i 0x2970 erase recovery
fastboot -i 0x2970 flash recovery /Users/xxxx/Desktop/androidtools1/cm-13.0-20160418-SNAPSHOT-ZNH0EAO2NN-crackling-recovery.img
fastboot reboot
all went well- terminal reported ok
then reboot into recovery mode to install the cm13.zip file - failed!
device does not boot into recovery. I get black screen and dead device.
device comes back to life after battery is out and in again.
so no recovery mode menu.
any ideas what to do next?
wisdomlight said:
I did the follwoing:
fastboot -i 0x2970 erase recovery
fastboot -i 0x2970 flash recovery /Users/xxxx/Desktop/androidtools1/cm-13.0-20160418-SNAPSHOT-ZNH0EAO2NN-crackling-recovery.img
fastboot reboot
all went well- terminal reported ok
then reboot into recovery mode to install the cm13.zip file - failed!
device does not boot into recovery. I get black screen and dead device.
device comes back to life after battery is out and in again.
so no recovery mode menu.
any ideas what to do next?
Click to expand...
Click to collapse
normally I just do
Code:
fastboot flash recovery <recovery-image-file>
Also how do you attempt to boot recovery?
- VolDn+Pwr ?
- adb reboot recovery ?
What if you flash stock recovery or twrp?
do you actually write <recovery-image-file> ??
I thought the actual .img file needs flashing. ??
either way - VolDn+Pwr and adb. = black screen dead device.
I thought cm-13.img is stock recovery. I downloaded it from cyanogen
twrp needs rooted device. I am trying to instal the OTA update from 12.1 to 13.0 and it doesn't work. and i was advised to un-root my device.
so now i have a un-rooted device but with no recovery.
arrrghhh
wisdomlight said:
do you actually write <recovery-image-file> ??
I thought the actual .img file needs flashing. ??
either way - VolDn+Pwr and adb. = black screen dead device.
I thought cm-13.img is stock recovery. I downloaded it from cyanogen
twrp needs rooted device. I am trying to instal the OTA update from 12.1 to 13.0 and it doesn't work. and i was advised to un-root my device.
so now i have a un-rooted device but with no recovery.
arrrghhh
Click to expand...
Click to collapse
if you unpack cm-13.0-ZNH0EAS2NH-crackling-signed-fastboot-2306277a34.zip from cyngn.com you may try to flash stock COS 13.0 as follows:
Code:
fastboot flash splash splash.img
fastboot flash modem NON-HLOS.bin
fastboot flash aboot emmc_appsboot.mbn
fastboot flash hyp hyp.mbn
fastboot flash rpm rpm.mbn
fastboot flash sbl1 sbl1.mbn
fastboot flash tz tz.mbn
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot flash userdata userdata.img
fastboot flash system system.img

Flashing Instructions stock rom. Please HELP

Can anybody provide with the flashing instruction for moto g5
yolomonkey said:
Can anybody provide with the flashing instruction for moto g5
Click to expand...
Click to collapse
Assuming you have fastboot installed on your pc
Download firmware and unzip to where you have fastboot
Open command prompt at fastboot location with firmware
type the following although I have marked lines that you should not use unless you have to as flashing wrong firmware can damage your device
Code:
fastboot oem fb_mode_set Only required if you wish to relock bootloader - if not skip it
fastboot flash partition gpt.bin Do not use unless you want to repartition your device - incorrect file will damage your phone
fastboot flash bootloader bootloader.img Do not use unless you want to replace the bootloader - flashing wrong file will hard brick
fastboot flash logo logo.bin No need to flash if you are going to flash a custom rom after and have already flashed a modded version
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 modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata Will erase everything on internal storage but you need to do it
fastboot erase customize Not sure about this - might be for other device
fastboot erase clogo Not sure about this - might be for other device
fastboot oem fb_mode_clear Only required to relock bootloader if you used the very first command
fastboot reboot
NOt working
My device keeps booting to the recovery
even though i flashed my recovery. it boots to twrp
yolomonkey said:
My device keeps booting to the recovery
even though i flashed my recovery. it boots to twrp
Click to expand...
Click to collapse
have you read the FAQs on my twrp thread because the answer is there (assuming you have flashed a custom rom and can boot it through the bootloader by selecting start)
TheFixItMan said:
have you read the FAQs on my twrp thread because the answer is there (assuming you have flashed a custom rom and can boot it through the bootloader by selecting start)
Click to expand...
Click to collapse
could you please link it. I am so grateful for you replying this fast
yolomonkey said:
could you please link it. I am so grateful for you replying this fast
Click to expand...
Click to collapse
https://forum.xda-developers.com/g5/development/official-twrp-3-1-1-0-moto-g5-t3699737
FAQs are on 2nd post

Pixel XL Bootloop

Hello Everyone,
My Pixel XL is going in bootloop after working for sometime. I have to factory reset it via recovery to get it working again. I am attching log which i got via ADB when it boot up. Can somebody help me with that?
No root no unlocked bootloader.
rkravi85 said:
Hello Everyone,
My Pixel XL is going in bootloop after working for sometime. I have to factory reset it via recovery to get it working again. I am attching log which i got via ADB when it boot up. Can somebody help me with that?
No root no unlocked bootloader.
Click to expand...
Click to collapse
No log
Sorry My Bad @Homeboy76
Have you tried these steps below?
If you have modified a little the stock android (hosts file, root, kernel, etc.), you may experience a fail in OTA update;
If you have a bootloop/soft brick/not sure of the state of your android system;
This WILL NOT delete your data and apps. This will remove your custom kernel/root/hosts/recovery through (which is a good thing because it will be clean then).
1) Download your system image for Marlin (Pixel XL) on google website.
download the latest version
2) Unzip the file marlin-nde63v-factory-______.zip
3) Unzip inside the new directory (marlin-nde63v) the image-marlin-_____.zip
Execute fastboot commands (assuming the bin is on your PATH)
Code:
fastboot reboot-bootloader
fastboot flash radio radio-marlin-*.img
fastboot reboot-bootloader
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash system system.img
fastboot flash system_b system_other.img
fastboot flash vendor vendor.img
fastboot flash modem modem.img
fastboot reboot
to add TWRP;
fastboot boot /path/to/twrp.img
then In TWRP, install twrp.zip for permanent twrp. Goodluck!

I guess i bricked my only phone....:-/

Okay, so im new to this stuff and still i managed to root the phone and flash RR 7.1.2. But i tried to unroot it and this happend:
I only have access to the bootloader and thats it. No recovery, no ROM nothing....when i start ti, it says that my phoe is unlocked and its dangerous and that the phone will boot in 5 secs but it never does....plz help me..and i wanna know where can i learn about all this stuff...its freaking me out since this the only phone i have.....plz help me..
You have two options
1 - flash twrp recovery and then use it to flash a custom rom
Assuming you have named the recovery image recovery.img
fastboot flash recovery recovery.img
https://drive.google.com/open?id=1MLlljM7BzMj9Da57LeyBHyg81cHdW1cB
Then wipe system data cache/format data & follow procedure to flash a custom rom
2 - flash stock rom firmware which can be found (plenty of guides out there for how to just search)
https://mirrors.lolinet.com/firmware/moto/cedric/official/
If you have unlocked the bootloader it will always says your device is not secure unless you flash a modified boot image
TheFixItMan said:
You have two options
1 - flash twrp recovery and then use it to flash a custom rom
Assuming you have named the recovery image recovery.img
fastboot flash recovery recovery.img
https://drive.google.com/open?id=1MLlljM7BzMj9Da57LeyBHyg81cHdW1cB
Then wipe system data cache/format data & follow procedure to flash a custom rom
2 - flash stock rom firmware which can be found (plenty of guides out there for how to just search)
https://mirrors.lolinet.com/firmware/moto/cedric/official/
If you have unlocked the bootloader it will always says your device is not secure unless you flash a modified boot image
Click to expand...
Click to collapse
Dude, I'm a total idiot at this stuff...
I was trying to flash the stock ROM by some help from a youtube channel called Andoid Doctor. I used the codes he gave me and the stock firmware he provided me for cedric. But all my computer showed was some slot error.
I'd really appreciate it if you helped me out.
Astitva_ said:
Dude, I'm a total idiot at this stuff...
I was trying to flash the stock ROM by some help from a youtube channel called Andoid Doctor. I used the codes he gave me and the stock firmware he provided me for cedric. But all my computer showed was some slot error.
I'd really appreciate it if you helped me out.
Click to expand...
Click to collapse
Firmware must be the same or newer
See the link in my post above for all the firmware - choose the right one for your region
If you don't know which to choose just use this one
https://mirrors.lolinet.com/firmwar...ubsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
Commands are (assuming you know how to use & have fastboot already setup as you have already unlocked the bootloader)
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin (only flash if newer version of android eg going from nougat to oreo)
fastboot flash bootloader bootloader.img (only flash if going to a newer version of android)
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 system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot oem fb_mode_clear
fastboot reboot
TheFixItMan said:
fastboot flash recovery recovery.img
https://drive.google.com/open?id=1MLlljM7BzMj9Da57LeyBHyg81cHdW1cB
Then wipe system data cache/format data & follow procedure to flash a custom rom
Click to expand...
Click to collapse
Wasn't trying to go back to stock myself (though I did have to in the end) but this was the only rom I found that worked full stop. Thanks so much for this.

Categories

Resources