[Q] How to restore back to factory settings after using towel root - Nexus 7 (2013) Q&A

I have rooted my device using towel root which doesn't unlock the boot loader. I then used the twrp manager to install custom recovery. I am wondering how to restore everything back to factory as all the tutorials I have seen so far require an unlocked boot loader. Any help will be appreciated, thank you.

Flash a stock r for your phone
swagg blasted from TMO LG G3

jailbreakkid23 said:
Flash a stock r for your phone
swagg blasted from TMO LG G3
Click to expand...
Click to collapse
If I download a stock image from google and flash it from my nexus 7 using twrp will everything be restored to factory settings?

If the boot loader is locked does that mean I can just do a normal factory reset on the device and it will remove the recovery and root?

fastboot
Jordydaman said:
If the boot loader is locked does that mean I can just do a normal factory reset on the device and it will remove the recovery and root?
Click to expand...
Click to collapse
you have to install stock ROM by adb mode using fastboot command
you can't flash stock ROM via custom recovery.

@SidDev said:
you have to install stock ROM by adb mode using fastboot command
you can't flash stock ROM via custom recovery.
Click to expand...
Click to collapse
Would you mind finding a link for me ? I have never encountered this before as I have always unlocked the bootloader to root but this time I used towel root which was different as explained above.

Doesn't the boot loader have to be unlocked to flash a ROM via adb?

try this and press thanks
Jordydaman said:
Doesn't the boot loader have to be unlocked to flash a ROM via adb?
Click to expand...
Click to collapse
nope,
Step 1: Download the ADB/Fastboot files and the
USB drivers for Windows based PC first. The the
latest factory image for your Nexus device can be
downloaded directly from Google’s website .
ADB/Fastboot – Mac , Windows
USB drivers for Windows
Extract the contents of the ADB/Fastboot ZIP file
inside a new folder called ‘google’ on your desktop.
Extract and transfer the contents of the factory
image inside this folder as well. The list of files will
include a ZIP file containing the codename of your
Android device, two files with “flash-all” names, and
a bootloader image file. All the extracted contents of
the factory image should be inside the same folder
as the ADB and Fastboot file, otherwise you will get
a file not found error.
Make sure to install the ADB drivers as well if you
are running a Windows based PC.
Step 2: Now, reboot your Nexus device in bootloader
mode. This is usually done by switching off the
device, and pressing the Volume down + Volume Up
+ Power button simultaneously. If that does not
work, try the Volume down + Power button
combination.
After the device has booted into bootloader mode,
connect it to your PC.
Step 3: Open a new Terminal or Command Prompt
window, and navigate to the ‘google’ folder that you
created in Step 1. Before we start flashing the
factory image, we need to make sure that your
Nexus device is being detected by the PC.
fastboot devices
If you are using a Mac, then you need to prefix a “./”
before every Fastboot command. So, the above
command will look something like this on a Mac -:
./fastboot devices
The above command should confirm if your device is
indeed being detected by your PC or not. If it is,
then proceed to the steps below. If not, repeat the
steps above again. Make sure that you have properly
installed the drivers and are inside the correct
folder.
If you are running Windows, copy-paste the following
command in the command prompt window -:
flash-all.bat
On a Mac, copy-paste the following command -:
./flash-all.sh
The script will then automatically flash the full
factory image on your Nexus device. Once the
factory image has been flashed, your device will
automatically reboot. Keep in mind that the first boot
might take some time so please be patient.
If the flash-all.sh script gives you a fastboot not
found error on your Mac, open up the file in Text Edit
and add a “./” before every fastboot command.
The flash-all script included in the factory image
might not work for all. It has always been pretty
unreliable and has only worked once for me in the
last 2 years. If you are in the same boat as me, you
will have to flash each partition manually on your
device. This is slightly cumbersome though.
The command to manually flash a partition via
fastboot is “fastboot flash partition filename.img”. In
the factory image that you extracted in Step 1, you
will notice there is another ZIP file. Extract the
contents of that ZIP file inside the ‘google’ folder.
Now, its time to manually flash the partitions to your
Nexus device. We will first begin with the bootloader.
fastboot flash bootloader filename.img
Then, we will flash all other partitions. They don’t
necessarily need to be in the same order as I have
listed them below. The names of the image files in
the factory image will clearly indicate the partition
they are intended for as well.
fastboot flash boot filename.img
fastboot flash radio filename.img
fastboot flash recovery filename.img
fastboot flash userdata filename.img
fastboot flash system filename.img

Thank you very much I will try this today.

I couldn't flash all and when I flashed the bootloader it came up with failed bootloader is locked?

Enter this command to unlock the bootloader:
fastboot oem unlock
After unlocking, you can run flash-all.bat (or run manual fastboot commands to flash).

Related

Galaxy Nexus Stuck on Google Screen

I have a GSM Galaxy nexus that boots into fastboot and odin but when ever i flash stock or go into recovery it gets stuck on that dreaded google bootlogo . I have literaly tried everything and that google logo is not leaving !!
Try reverting everything back to stock using [GNex TOOLKIT V6.1]
http://forum.xda-developers.com/showthread.php?t=1392310
eliasgkphoto said:
Try reverting everything back to stock using [GNex TOOLKIT V6.1]
http://forum.xda-developers.com/showthread.php?t=1392310
Click to expand...
Click to collapse
I've already tries reverting back to stock and after its done it just immediately goes to the google screen and stays that way
You should try to flash the stock images manually in fastboot if you haven't done so already. I'm not a fan of Toolkits.
Download the stock files: https://developers.google.com/android/nexus/images#yakju
You must extract the .tgz file first and then extract the .tar file inside.
Navigate the folder until you see the radio bootloader and factory image.
Put those three files in the folder on your computer where you have fastboot.exe
Boot into the bootloader.
Type fastboot devices - to make sure your phone is connected.
Then these commands.
Code:
fastboot flash bootloader bootloader-maguro-primela03.img
fastboot reboot bootloader
fastboot flash radio radio-maguro-i9250xxla02.img
fastboot reboot bootloader
fastboot -w update image-yakju-imm76i.zip
Hopefully it will boot
Still nothing
El Daddy said:
You should try to flash the stock images manually in fastboot if you haven't done so already. I'm not a fan of Toolkits.
Download the stock files: https://developers.google.com/android/nexus/images#yakju
You must extract the .tgz file first and then extract the .tar file inside.
Navigate the folder until you see the radio bootloader and factory image.
Put those three files in the folder on your computer where you have fastboot.exe
Boot into the bootloader.
Type fastboot devices - to make sure your phone is connected.
Then these commands.
Code:
fastboot flash bootloader bootloader-maguro-primela03.img
fastboot reboot bootloader
fastboot flash radio radio-maguro-i9250xxla02.img
fastboot reboot bootloader
fastboot -w update image-yakju-imm76i.zip
Hopefully it will boot
Click to expand...
Click to collapse
I tried it and it didn't work. I also noticed that on the bottom of the gnex it says "fastboot command read error -2147483647" any ideas? I am officially clueless. I am offering 20 dollars to anyone who can fix this
i have found ABSOLUTELY NOTHING regarding this "FASTBOOT COMMAND READ ERROR -2147483647" that can actually fix it. everything from flashing stock via odin, uninstall and reinstall sdk, differnt usb cables, ubuntu 12.04 and win7. seems to no fix...please help. this started after flashing koush JB update via rom manager
Same thing for me but its stuck at the boot animation and it just started

[Q] Flashing to pure stock 4.3 with the latest bootloader, recovery, etc.?

I know this may have been answered several times. I did a search too, but to be honest couldn't find something to the point.
Can someone post an easy guide of the files to download and the commands to type in the Command Prompt to install 4.3?
I'm currently on 4.2.2 (LiquidSmooth). Rooted obviously with TWRP recovery. I have the ADB and fastboot drivers installed in my PC.
This is what I want to know.
1. Flashing pure stock 4.3 and wipe everything (including SDcard - I will take a backup)
2. Updating the bootloader
3. Updating the radio
4. Updating the stock recovery
5. Installing TWRP recovery for 4.3
Will be glad if someone could help me.
Thank you.
you didnt search very well...
there's a return to stock thread in the general section.
Just use this: http://forum.xda-developers.com/showthread.php?t=1766475
Read last 3-4 pages.
AbhishekS said:
I know this may have been answered several times. I did a search too, but to be honest couldn't find something to the point.
Can someone post an easy guide of the files to download and the commands to type in the Command Prompt to install 4.3?
I'm currently on 4.2.2 (LiquidSmooth). Rooted obviously with TWRP recovery. I have the ADB and fastboot drivers installed in my PC.
This is what I want to know.
1. Flashing pure stock 4.3 and wipe everything (including SDcard - I will take a backup)
2. Updating the bootloader
3. Updating the radio
4. Updating the stock recovery
5. Installing TWRP recovery for 4.3
Will be glad if someone could help me.
Thank you.
Click to expand...
Click to collapse
search again... and in short if u are flashing your rom with stock image u dont have to install the bootloader and radio img again... search how to flash stock image using adb..
Sent from my Galaxy Nexus using xda premium
AbhishekS said:
I know this may have been answered several times. I did a search too, but to be honest couldn't find something to the point.
Can someone post an easy guide of the files to download and the commands to type in the Command Prompt to install 4.3?
I'm currently on 4.2.2 (LiquidSmooth). Rooted obviously with TWRP recovery. I have the ADB and fastboot drivers installed in my PC.
This is what I want to know.
1. Flashing pure stock 4.3 and wipe everything (including SDcard - I will take a backup)
2. Updating the bootloader
3. Updating the radio
4. Updating the stock recovery
5. Installing TWRP recovery for 4.3
Will be glad if someone could help me.
Thank you.
Click to expand...
Click to collapse
Hi, let me try to help you
Galaxy Nexus is my first smartphone. So i'm pretty new at flashing things. I did some research last year to learn how to flash stuff in it and that's how i learned to make a fresh install:
-Make sure you have the SDK platform-tools and the Galaxy Nexus driver properly installed on your PC. Also, make sure you have USB debuging enabled on your device.
-Download the factory image that fits your phone at https://developers.google.com/android/nexus/images
-Open up the tgz file you just downloaded and extract the files:
-boot.img
-bootloader-maguro-primemd04.img
-radio-maguro-i9250xxlj1.img
-recovery.img
-system.img
-userdata.img
Extract the files in the platform-tools folder to make things easier.
-Connect your Nexus to your PC, open the command prompt, go to the platform-tools folder and type
(Do not turn off, disconnect or close the cmd prompt windows until everything is done. Again, make sure you have the nexus driver properly installed on your Windows)
Code:
adb reboot-bootloader
(this command will reboot your device to recovery mode)
With your device on recovery mode, type the following commands to erase your device:
Code:
fastboot erase boot
Hit enter, then:
fastboot erase cache
Hit enter, then:
fastboot erase recovery
Hit enter, then:
fastboot erase system
Hit enter, then:
fastboot erase userdata
-Now you're going to flash the new files you have downloaded and extracted steps before:
Code:
fastboot flash bootloader bootloader-maguro-primemd04.img
(or whatever name your bootloader img file has. In this case the bootloader file is "bootloader-maguro-primemd04.img")
Code:
fastboot reboot-bootloader
(you'll need to reboot after flashing the bootloader)
Code:
fastboot flash radio radio-maguro-i9250xxlj1.img
Flash the radio
Code:
fastboot reboot-bootloader
Reboot again
Code:
fastboot flash system system.img
Flash system
Code:
fastboot flash userdata userdata.img
Code:
fastboot flash boot boot.img
Code:
fastboot flash recovery recovery.img
Code:
fastboot reboot-bootloader
We are almost done!
Code:
fastboot erase cache
Code:
fastboot reboot
Done! Reboot to Android. The first boot may take some more time than the usual. Don't worry!
-
If you want to flash a custom recovery, download it from their website, go into fastboot mode and flash it using the command to flash the recovery.
Code:
fastboot flash recovery [recovery filename].img
The same command used when flashing the recovery on the fresh install above
That's the way i learned how to do it from scratch. In case someone more experienced has any thoughts about it, i'd like to hear as i'm not an expert and learned by researching it on my own...
This is how it's done, PROPER. Well done, mnoguti.
a maguro wrote this.
@mnoguti: You have said that to flash a custom recovery, one needs to go to the recovery mode and flash the custom recovery, but you said that flashing the stock recovery should be done in bootloader.
Is it fine to flash custom recovery from bootloader instead of recovery?
AbhishekS said:
@mnoguti: You have said that to flash a custom recovery, one needs to go to the recovery mode and flash the custom recovery, but you said that flashing the stock recovery should be done in bootloader.
Is it fine to flash custom recovery from bootloader instead of recovery?
Click to expand...
Click to collapse
you don't have to go into the recovery mode to flash recovery, just boot into fastboot mode and flash recovery using command:
fastboot flash recovery recovery.img
Click to expand...
Click to collapse
obviously replace the recovery.img with the name of the custom recovery file you downloaded, make sure the custom recovery file is in the same folder as fastboot/adb otherwise you'll have to do it like:
fastboot flash recovery C:\Downloads\recovery.img
Click to expand...
Click to collapse
Yes, that's what I thought. Thank you.
I had initially felt that stock recovery can flashed only in bootloader and custom recoveries can be flashed only by booting into stock recovery. But somewhere in my mind had a doubt on it and so asked. Thanks for clearing the doubt.
And a big thanks to @mnoguti for posting those steps. Worked like a charm for me.
Obviously he meant fastboot mode..
a manta wrote this.
AbhishekS said:
Yes, that's what I thought. Thank you.
I had initially felt that stock recovery can flashed only in bootloader and custom recoveries can be flashed only by booting into stock recovery. But somewhere in my mind had a doubt on it and so asked. Thanks for clearing the doubt.
And a big thanks to @mnoguti for posting those steps. Worked like a charm for me.
Click to expand...
Click to collapse
It's "fastboot mode". Sorry for the mistake!
I've updated my post and now it's right

How to restore Download Mode if all you have is Fastboot

This is for the people [myself earlier] who cannot boot into Android (bootloop or worse), have no download mode, no recovery and can only boot into Fastboot. Download the file below, I have included fastboot (for windows) and the appropriate files to flash, all you have to do is run the commands in order below, then boot into download mode.
fastboot erase boot
fastboot erase aboot
fastboot erase recovery
fastboot erase laf
fastboot flash boot 6-boot.img
fastboot flash aboot 4-boot.img
fastboot flash recovery 10-recovery.img
fastboot flash laf 11-laf.img
fastboot reboot
It is best to use the CMD.exe file in the folder provided so you will already be running the commands from that folder without having to change directories. If you're on Linux then make sure you have Fastboot installed then run Terminal from the folder and run the same commands. This will restore the STOCK download mode and recovery partitions not TWRP or CWM.
Download Here
Artifesto said:
This is for the people [myself earlier] who cannot boot into Android (bootloop or worse), have no download mode, no recovery and can only boot into Fastboot. Download the file below, I have included fastboot (for windows) and the appropriate files to flash, all you have to do is run the commands in order below, then boot into download mode.
fastboot erase boot
fastboot erase aboot
fastboot erase recovery
fastboot erase laf
fastboot flash boot 6-boot.img
fastboot flash aboot 4-boot.img
fastboot flash recovery 10-recovery.img
fastboot flash laf 11-laf.img
fastboot reboot
It is best to use the CMD.exe file in the folder provided so you will already be running the commands from that folder without having to change directories. If you're on Linux then make sure you have Fastboot installed then run Terminal from the folder and run the same commands. This will restore the STOCK download mode and recovery partitions not TWRP or CWM.
Download Here
Click to expand...
Click to collapse
How would one go about repairing a broken download mode when all I can do is boot into a broken recovery? I cannot issue any fastboot commands as the device is only recognized as an ADB Bridge device. Are there ADB equivalent commands to accomplish the same things as you have detailed here?
SPRINT LS980 (was on Rooted Stock C and borked phone with D OTA) and a broken TWRP 2.7.1.0 Recovery
natefuhr said:
How would one go about repairing a broken download mode when all I can do is boot into a broken recovery? I cannot issue any fastboot commands as the device is only recognized as an ADB Bridge device. Are there ADB equivalent commands to accomplish the same things as you have detailed here?
SPRINT LS980 (was on Rooted Stock C and borked phone with D OTA) and a broken TWRP 2.7.1.0 Recovery
Click to expand...
Click to collapse
well you should never install any OTA with a custom recovery install. you should always keep at least one backup on your phone to restore to in these events. but i would try downloading a rom and installing via sideload before nuking any partitions. which is easy with TWRP. the sideload menu should be in Advanced then ADB Sideload and the command is adb sideload filename.zip and it will take awhile depending on the file size. make sure the file name is simple and it is placed in the folder you are running the sideload from.
Artifesto said:
well you should never install any OTA with a custom recovery install. you should always keep at least one backup on your phone to restore to in these events. but i would try downloading a rom and installing via sideload before nuking any partitions. which is easy with TWRP. the sideload menu should be in Advanced then ADB Sideload and the command is adb sideload filename.zip and it will take awhile depending on the file size. make sure the file name is simple and it is placed in the folder you are running the sideload from.
Click to expand...
Click to collapse
Yes yes I know... it was a moment of weakness late at night and I didn't think before telling the girl to go ahead and upgrade. That being said... Part of the problem now is that the one backup she made just up and disappeared. The ADB sideload option just hangs and never actually does anything. The original Stock Rooted file I had still on the sd partition doesn't fix the issue when I flash it... it looks like it flashes ok but on the next boot it just drops me back into TWRP right where I began. And download mode is still borked.
So let's talk thermonuclear resolution on this motherlover.... where do I begin?
Sent from my SM-N900P using Tapatalk
natefuhr said:
Yes yes I know... it was a moment of weakness late at night and I didn't think before telling the girl to go ahead and upgrade. That being said... Part of the problem now is that the one backup she made just up and disappeared. The ADB sideload option just hangs and never actually does anything. The original Stock Rooted file I had still on the sd partition doesn't fix the issue when I flash it... it looks like it flashes ok but on the next boot it just drops me back into TWRP right where I began. And download mode is still borked.
So let's talk thermonuclear resolution on this motherlover.... where do I begin?
Sent from my SM-N900P using Tapatalk
Click to expand...
Click to collapse
hmmmmm.... I've been able to get my G2 into fastboot by holding Volume + and Pwr after it setting for awhile turned off.. may be stupid but have you tried that button combo or Volume + and Volume - with Pwr
Could u tell me the command cause i went adb sideload filename.zip and it comes up file not found and i put it in my platform-tools folder any ideas i have adb version 1.30...it was above the version that they said you need on the twrp site
whatsamatta u alumni 1990-2011
Fastboot???
Artifesto said:
This is for the people [myself earlier] who cannot boot into Android (bootloop or worse), have no download mode, no recovery and can only boot into Fastboot. Download the file below, I have included fastboot (for windows) and the appropriate files to flash, all you have to do is run the commands in order below, then boot into download mode.
fastboot erase boot
fastboot erase aboot
fastboot erase recovery
fastboot erase laf
fastboot flash boot 6-boot.img
fastboot flash aboot 4-boot.img
fastboot flash recovery 10-recovery.img
fastboot flash laf 11-laf.img
fastboot reboot
It is best to use the CMD.exe file in the folder provided so you will already be running the commands from that folder without having to change directories. If you're on Linux then make sure you have Fastboot installed then run Terminal from the folder and run the same commands. This will restore the STOCK download mode and recovery partitions not TWRP or CWM.
Download Here
Click to expand...
Click to collapse
How do I get to fastboot. I can get to recovery but that's it. Download is not working. The Vol+/- and Power just gets me to key controls.
deathsquad737 said:
Could u tell me the command cause i went adb sideload filename.zip and it comes up file not found and i put it in my platform-tools folder any ideas i have adb version 1.30...it was above the version that they said you need on the twrp site
whatsamatta u alumni 1990-2011
Click to expand...
Click to collapse
i would try to rename your rom to something simple, like rom.zip. there cannot be any spaces in the name and it does need to be in the same folder you run the command from like you seem to be doing.
gelito81 said:
How do I get to fastboot. I can get to recovery but that's it. Download is not working. The Vol+/- and Power just gets me to key controls.
Click to expand...
Click to collapse
did you try vol+ and power together? When a functioning rom is installed it asks to do a factory reset but it may get into fastboot if you nuked that partition. i haven't tried this yet but if you're in adb sideload in twrp maybe the command
Code:
adb reboot fastboot
might help
Artifesto said:
i would try to rename your rom to something simple, like rom.zip. there cannot be any spaces in the name and it does need to be in the same folder you run the command from like you seem to be doing.
did you try vol+ and power together? When a functioning rom is installed it asks to do a factory reset but it may get into fastboot if you nuked that partition. i haven't tried this yet but if you're in adb sideload in twrp maybe the command
Code:
adb reboot fastboot
might help
Click to expand...
Click to collapse
Tried all of the above.... they all just send me into recovery or broken download mode
damn
I'm screwed. I gave this a try and now all I get is a black screen. The phone will connect to my computer but I can't send any commands to it through the command prompt. When it connects to the computer it opens a bunch of different drives and says I need to format them. I can't get into download mode and when I try to send a command in the prompt it just says waiting for device. Any ideas?
Edit: It shows up in device manager like this: http://i.imgur.com/NXGxpcX.png
http://forum.xda-developers.com/showthread.php?t=2582142 try that
Sent from my VS980 4G using XDA Free mobile app
how i can enter in FASTBOOT mode ?
I'm not sure if you can help me here. I have a Verizon G2 and am trying to reset to factory for a repair. I am trying to get into download mode, but only get fastboot when pressing volume up while powered off and plugging in my USB cord. Any help would be greatly appreciated.
razer_ins said:
how i can enter in FASTBOOT mode ?
Click to expand...
Click to collapse
Flash xdabbbeb 24a bootstack zip
WHATSAMATTA U ALUMNI
---------- Post added at 08:46 PM ---------- Previous post was at 08:45 PM ----------
Crossxcalibur said:
I'm not sure if you can help me here. I have a Verizon G2 and am trying to reset to factory for a repair. I am trying to get into download mode, but only get fastboot when pressing volume up while powered off and plugging in my USB cord. Any help would be greatly appreciated.
Click to expand...
Click to collapse
Read 2 post above yours i answered your ?
WHATSAMATTA U ALUMNI
For everyone who is having issues with drivers see the video below to get fastboot to work:
https://www.youtube.com/watch?v=NaK5OxUeDKM

Nexus 7 - 2nd gen: update failed to Lollipop 5.1

HI everyone,
I updated "successfully" from Kitkat to 5.0.2 on my rooted (stock ROM) Nexus 7 second gen.
Unfortunately, when I tried to upgrade to 5.1 everything seem to be normal until the device rebooted and it went through the "update process". 3/4 the way through, the green droid went on his back and the "ERROR" message appeared.
I wiped the cache partition but that doesn't help. I tried to download the update in safe mode, but no success. I also find it odd that each time I reboot my device, I get a message from Android that it is "updating my apps".
If I didn't have any apps and a lot of data on my Nexus, I would wipe the device clean but I'd rather avoid this, if at all possible.
Is there a way to upgrade to 5.1 or reinstall 5.0.2 without losing everything?
Thanks
Michael Carleone said:
Is there a way to upgrade to 5.1 or reinstall 5.0.2 without losing everything?
Click to expand...
Click to collapse
No problem. As you rooted it before then presumably it is unlocked and equipped with custom recovery, so all you have to do is:
boot TWRP
connect PC
transfer data and APKs to PC
flash OS
If you don't have TWRP installed, then boot it like this fastboot boot twrp-3.0.2-0-flo.img
k23m said:
No problem. As you rooted it before then presumably it is unlocked and equipped with custom recovery, so all you have to do is:
boot TWRP
connect PC
transfer data and APKs to PC
flash OS
If you don't have TWRP installed, then boot it like this fastboot boot twrp-3.0.2-0-flo.img
Click to expand...
Click to collapse
Hi,
Thanks for the reply. I rooted with Kingroot. I don't believe I have a custom recovery. The bootloader is locked as shown when I boot into recovery mode.
I want to avoid transferring my data and APK files to my PC.
Should I assume there is no way of reinstalling the OS without wiping out the device?Also, there is no link in the above quote: fastboot boot twrp-3.0.2-0-flo.img
Since I got no other replies, I went and restored to factory image. I do have another question. I hope I get a better response there: http://forum.xda-developers.com/nex...a/nexus-7-2013-wifi-root-marshmallow-t3515072
Thanks for the reply.
Can we compare using fastboot flashing TWRP vs Nexus Root Tool Kit: http://www.wugfresh.com/nrt/? I ended up using this utility instead because it was pretty much one click and it didn't require command lines and for whatever reason, I found instructions using fastboot a bit confusing. Which method is better or has more advantages? I left my bootloader unlocked.
Incidentally, I think there was something wrong with my Nexus image. As a result, I did use Google's instructions on how to flash etc. the OEM image. Instructions weren't ideal but I managed to figure things out: https://developers.google.com/android/images
The instructions are here which I assume would be similar if I wanted to fastboot TWRP?
To flash a system image:
Download the appropriate system image for your device below, then unzip it to a safe directory.
Connect your device to your computer over USB.
Start the device in fastboot mode with one of the following methods:
Using the adb tool: With the device powered on, execute:
adb reboot bootloader
Using a key combo: Turn the device off, then turn it on and immediately hold down the relevant key combination for your device. For example, to put a Nexus 5 ("hammerhead") into fastboot mode, press and hold Volume Up + Volume Down + Power as the device begins booting up.
If necessary, unlock the device's bootloader by running:
fastboot flashing unlock
or, for older devices, run:
fastboot oem unlock
The target device will show you a confirmation screen. (This erases all data on the target device.)
Open a terminal and navigate to the unzipped system image directory.
Execute the flash-all script. This script installs the necessary bootloader, baseband firmware(s), and operating system.
Once the script finishes, your device reboots. You should now lock the bootloader for security:
Start the device in fastboot mode again, as described above.
Execute:
fastboot flashing lock
or, for older devices, run:
fastboot oem lock
Locking bootloader will wipe the data on some devices. After locking the bootloader, if you want to flash the device again, you must run fastboot oem unlock again, which will wipe the data.
Click to expand...
Click to collapse
Also, I could've sworn that when I rooted KitKat on my Nexus, my data wasn't wiped out. I don't recall doing anything to the bootloader. I can't recall which method I used, but I know for certain I didn't use the Nexus Root Toolkit. I should've recorded my steps when I rooted.
i rooted my nexus 7 using towel root on kitkat .. i unrooted using supersu... and ota untill marhsmallow with out a problem never use kingroot as its so un stable.

NO RPMB (how to install TWRP, a new ROM and using Magisk)

Hello, I have sent my phone to warranty and after that I received a phone with NO RPMB and after many frustrations I found (with help of many users and forums) how to workaround this..
To start:
Download boot image from here
Download twrp from the official website
Change the name to boot.img and twrp.img and put it in the platform-tools folder
Open the terminal there
Download your favourite rom
Enter fastboot mode on your phone
!!!!After this you will loose all of your data!!!!
Paste this to the terminal
fastboot oem unlock
(select yes on your phone)
fastboot flash boot boot.img
fastboot flash recovery twrp.img
fastboot format userdata
fastboot format cache
Reboot to recovery (if it doesn't enter at the first time enter download mode again and restart to recovery)
After that you have twrp and can flash every rom.. yay!!!
Wipe everything.
Copy the rom zip to your phone using MTP
Install your fancy new rom
If you want to install magisk:
Install the magisk manager.
On the app select install and select patch image file. (it will create a new boot image already patched)
After that install the new image (patched_boot.img) using twrp
Do a clean instalation of your ROM (recomended) or a Factory Reset first
Reboot to twrp
Select install
Click in install image
Select patched_boot.img
Select install to boot partition
Reboot.
Install magisk manager and do the sugested setup.
You now have magisk working
Thanks to all the users that helped me!!
I had real trouble getting twrp to work the last time I tried this a few months ago. Followed the steps here and am now on pixel experience with magisk. Thanks!
Hello, im in the same situation of NO RPMB. This procedure will permanently lets have bootloader unlocked?
About Magisk, i can install it in usual way once im in the recovery? (I mean download latest stable version for Bullhead and flash via TWRP).
Thanks.
sigibian said:
Hello, im in the same situation of NO RPMB. This procedure will permanently lets have bootloader unlocked?
About Magisk, i can install it in usual way once im in the recovery? (I mean download latest stable version for Bullhead and flash via TWRP).
Thanks.
Click to expand...
Click to collapse
My bootloader is still unlocked after following this guide
For Magisk:
-Install your custom ROM and boot it up (without root)
-Then extract the boot.img from the ROM zip file and save it on your phone storage.
-Install the Magisk manager apk
-In Magisk manager, select install Magisk> choose the patch boot image option and -Select the boot.img you previously saved.
Once it's done, reboot into twrp and flash the patched boot.img. When you reboot Magisk will be working.
I've had no issues with my bootloader, even after an ota update for pixel experience.
Thank you, i will try it.
Another question. I never tried dowload mode before, as i read in other post i should Plug USB cable into pc, Hold volume up and power at the same time and plug phone into usb that's already connected to pc, right?
When in download mode i can fire up fastboot commands like im in bootloader mode?
So then after do last command fastboot format cache i can reboot to recovery from terminal using adb reboot recovery or i can / should do it from device?
About twrp it's ok to use the latest 3.2.3.0 official version or the 3.2.1 4core version from here as someone suggested from Reddit? https://forum.xda-developers.com/nexus-5x/development/recovery-twrp-3-2-1-4-core-t3796656
sigibian said:
Thank you, i will try it.
Another question. I never tried dowload mode before, as i read in other post i should Plug USB cable into pc, Hold volume up and power at the same time and plug phone into usb that's already connected to pc, right?
When in download mode i can fire up fastboot commands like im in bootloader mode?
So then after do last command fastboot format cache i can reboot to recovery from terminal using adb reboot recovery or i can / should do it from device?
About twrp it's ok to use the latest 3.2.3.0 official version or the 3.2.1 4core version from here as someone suggested from Reddit? https://forum.xda-developers.com/nexus-5x/development/recovery-twrp-3-2-1-4-core-t3796656
Click to expand...
Click to collapse
The official twrp works for fine for me, haven't tried the 4 core version but it can't hurt to try if you need it.
Power off your phone then press and hold volume - and power to enter bootloader, then connect to your pc and follow the steps in the OP
So i have to enter in bootloader mode? At point 6 of OP there is written to enter in the download mode, this makes me confusing.
Can anyone explain me latest 2 commands why they are needed?
fastboot format userdata
fastboot format cache
sigibian said:
So i have to enter in bootloader mode? At point 6 of OP there is written to enter in the download mode, this makes me confusing.
Can anyone explain me latest 2 commands why they are needed?
fastboot format userdata
fastboot format cache
Click to expand...
Click to collapse
This thread is fairly comprehensive;
https://forum.xda-developers.com/nexus-5x/general/moto-nexus-5x-sticky-roll-t3207487
Holding volume - and power takes you to fastboot mode (download mode essentially), theres also an option to reboot into recovery (selectable using the volume keys.)
Formatting user data and cache is necessary prior to installing a new rom (especially if moving from stock). You lose all data (back up first!) But a clean flash is the best place to start.
baddesthad said:
This thread is fairly comprehensive;
https://forum.xda-developers.com/nexus-5x/general/moto-nexus-5x-sticky-roll-t3207487
Holding volume - and power takes you to fastboot mode (download mode essentially), theres also an option to reboot into recovery (selectable using the volume keys.)
Formatting user data and cache is necessary prior to installing a new rom (especially if moving from stock). You lose all data (back up first!) But a clean flash is the best place to start.
Click to expand...
Click to collapse
Thanks for the explanation but for installing a new ROM usually you can do factory reset directly in TWRP, plus doing all the wipes, this should be enough.
About fastboot mode and download mode, they are completely different, fastboot mode: vol down + power, download mode for LG: Plug USB cable into pc, Hold volume up and power at the same time and plug phone into usb.
My question is what i can do in download mode? As OP says after entering download mode open terminal and use fastboot commands.
sigibian said:
Thanks for the explanation but for installing a new ROM usually you can do factory reset directly in TWRP, plus doing all the wipes, this should be enough.
About fastboot mode and download mode, they are completely different, fastboot mode: vol down + power, download mode for LG: Plug USB cable into pc, Hold volume up and power at the same time and plug phone into usb.
My question is what i can do in download mode? As OP says after entering download mode open terminal and use fastboot commands.
Click to expand...
Click to collapse
You need to use vol- and power to go into fastboot mode then connect to the pc. As for userdata and cache, if you don't clean them when coming from stock you will have issues (your data will be encrypted if you're on stock?). As I said this guide worked for me. The op was talking about fastboot mode in the 6th option (also there is much more information in the thread I linked above)
sorry for the confusing i wanted to say fastboot mode..
i knew the thread that you are saying but most people doesn't want to search so I made a little thread only with the needed parts..
I use it myself so I have a place to remember all the steps when I need to change the rom to a new one or when I make experiments and brick my phone XD
If anyone know anything else that should be in here just say, I really want to improve the post
Hi. I just went through the whole process several times (I have tried the different modified boot images from the dedicated post) and my device is still locked [emoji24] any suggestions?
fhartane said:
Hi. I just went through the whole process several times (I have tried the different modified boot images from the dedicated post) and my device is still locked [emoji24] any suggestions?
Click to expand...
Click to collapse
your device will always be locked this is a workaround to get twrp, new roms and magisk while it stays locked..
with twrp usable it won't matter if you are locked or not
PedroM.CostaAndrade said:
your device will always be locked this is a workaround to get twrp, new roms and magisk while it stays locked..
with twrp usable it won't matter if you are locked or not
Click to expand...
Click to collapse
Thanks for the answer. You mean that now I have twrp, I can flash custom Roms with my bootloader locked without any issue?
Envoyé de mon ONEPLUS A3003 en utilisant Tapatalk
Yes if you have TWRP you can install custom ROMs, custom Kernel's, magisk, super su, etc..
the locked bootloader only prevents you from using fastboot commands like the one needed for installing custom recovery
Now that you have TWRP you can use it for everything
Hello everyone, I also have a nexus 5x with motherboard that has been replaced under warranty and unfortunately I can't keep the bootloader unlocked.
I tried the procedure you have indicated, but at this point there is the problem, because after inserting the boot.img and twrp.img inside the phone, then when I go to do the unlocking procedure with 'fastboot oem unlock (select yes on your phone) 'in practice the memory is deleted on the phone, so I lose the previously uploaded files, and therefore I can no longer continue with the flash procedure of boot.img and twrp.img because they are no longer present in memory.
I hope I made myself understood, maybe I am wrong, or is there a way to solve this problem?
Fabiojoker said:
Hello everyone, I also have a nexus 5x with motherboard that has been replaced under warranty and unfortunately I can't keep the bootloader unlocked.
I tried the procedure you have indicated, but at this point there is the problem, because after inserting the boot.img and twrp.img inside the phone, then when I go to do the unlocking procedure with 'fastboot oem unlock (select yes on your phone) 'in practice the memory is deleted on the phone, so I lose the previously uploaded files, and therefore I can no longer continue with the flash procedure of boot.img and twrp.img because they are no longer present in memory.
I hope I made myself understood, maybe I am wrong, or is there a way to solve this problem?
Click to expand...
Click to collapse
fastboot is for the files on your PC not your phone
you need to put the files inside of platform-tools and then open cmd inside it and use the fastboot commands
fastboot will take the files of your PC
Hello, thank you for your information, since I haven't done modding on phones for a long time, I didn't remember exactly the procedure with fastboot and therefore I didn't understand where I had to put the files, but in the end I did it.
Thank you
PedroM.CostaAndrade said:
fastboot is for the files on your PC not your phone
you need to put the files inside of platform-tools and then open cmd inside it and use the fastboot commands
fastboot will take the files of your PC
Click to expand...
Click to collapse
Why is a custom boot image needed? I don't want to root.

Categories

Resources