yashsingh1/xdaforums huggingface dataset:
[Nexus 5X General] SlimSnoopOS:
This is a guide to flash the factory image. Not a rom.

Your gapps package probably does not come with a Camera app. Install it from the Play Store or online from APK Mirror.
[Nexus 5X General] ph4nt0m-kmf:
can u tell me the way from / to DCIM in internal storage plz... thanx

:confused:
[Nexus 5X General] fvisagie:
You mean the path to your DCIM folder? I don't have root access right now, but if memory serves, something like

/sdcard/DCIM

and

/data/media/0/DCIM

(assuming you're user '0').
[Nexus 5X General] aboaboit:
readonly system vs Google Safety Net API

First off, thanks for the guide: the unlocking part was especially useful to me.

However, I'm not sure there is no benefit at all, allow me to describe my case: using SafetyNet Helper(*) on my 5X, rooted following this guide, I get a failure message. To the best of my understanding, this means an app using Google Safety Net API is able to detect the device has been tampered with in some way.

Since the 5X is now my primary phone, I used my older N5 to run a test, replicating as closely as possible the setup of the 5X: back to latest stock, then TWRP, SuperSU, AdAware systemless helper and AdAware.

With one key difference: I told TWRP to keep system read-only. Rootchecker confirms the phone is rooted but this time the SafetyNet Helper gave me a green success message.

If anyone has time to replicate my findings, I'd be happy to hear the results; otherwise, the next time I have to wipe the 5X I'll try keeping system readonly and see if that is indeed the reason.

(*) let's forget for a moment that I came across that Helper while trying to understand the reason why Android Pay would be visible only briefly on an un-activated phone, regardless of rooting, and that I later found out that the true reason is the country :silly: :rolleyes:
[Nexus 5X General] sfhub:
I don't know the specific list of what Android Pay and the Safetynet helper app are checking for, but I can tell you that if you mount /system just once read/write, even if you've made no changes, the /system partition is considered corrupted.

This is because there are mount times updated in the superblock and this will no longer match the merkel hash-tree used by dm-verity. Once even one block doesn't match the hash-tree, even if it is meta-data, the volume is considered corrupted.
[Nexus 5X General] marek287:
I have question. I have:

1. unlocked bootloader

2. installed twrp-3.0.2-0-bullhead.img

After entering , it only freeze (shows only TWRP background).

fastboot format userdata solves this issue.

After installing ROM ( Pure Nexus and Chroma) it stuck into google logo. No bootup.

What I am doing wrong?
[Nexus 5X General] aboaboit:
It might be the case here, though I ran some tests on a N5 and found out that even SuperSU compatibility mode causes the SNH checks to fail.
[Nexus 5X General] SlimSnoopOS:
Try this. Hold Power and Volume Down for a few seconds. The phone should reboot into TWRP so you can wipe Art/Dalvik Cache then boot up.
[Nexus 5X General] sfhub:
I couldn't speak for N5, but I have SuperSU installed in boot.img (systemless root) and I can pass SafetyNet helper checks on MTC19Z. I don't use Android Pay so couldn't tell you if it worked.
[Nexus 5X General] marek287:
I return to stock and made step by step every point and wipe Art/Dalvik Cache but still after flashing rom I get only Google logo on boot.
[Nexus 5X General] fvisagie:
Did you wipe data also after installing the custom ROM (and before booting into it)?
[Nexus 5X General] marek287:
Full wipe before installing rom.
[Nexus 5X General] queerquirks:
You can boot back into stock? If can't then gotta factory reset back to clean stock and redo root and recovery installation.

If no issues, try re downloading your preferred rom and kernel, could be some issue with the first download.

Full wipe and go back into TWRP, follow rom installations from the rom page itself.

How long did it get stuck at Google logo? In extreme cases, it take up to 15-20mins but usually about 3-5mins.
[Nexus 5X General] Mawth:
If you haven't already, try:

fastboot format userdata
[Nexus 5X General] roca4th01:
should I input this code 1 by 1 or paste it all

fastboot flash bootloader C:\bullhead\images\bootloader-bullhead-bullhead-xx.xx.img

fastboot reboot-bootloader

fastboot flash radio C:\bullhead\images\radio-bullhead-bullhead-xx.xx.img

fastboot reboot-bootloader

fastboot flash boot C:\bullhead\images\boot.img

fastboot erase cache

fastboot flash cache C:\bullhead\images\cache.img

fastboot flash recovery C:\bullhead\images\recovery.img

fastboot flash system C:\bullhead\images\system.img

fastboot flash vendor C:\bullhead\images\vendor.img
[Nexus 5X General] ulxerker:
1 by 1.
[Nexus 5X General] ph4nt0m-kmf:
no root

sorry, what i meant was that when it starts twrp it asks for a password to decrypt data, i tryed all my passwords and it didnt work and i dont remember to having being entering a password for it. so, please, can u tell me the way to have access to dcim....
[Nexus 5X General] sfhub:
Are you running Android N or M?

I don't think TWRP works with encryption on Android N.

If M, are you using latest version of TWRP?

Have you flashed TWRP onto recovery partition or are you loading it over usb using fastboot boot?
[Nexus 5X General] nokiagye:
Same here is there any way to root and accept otas with encrypted on? On n?
[Nexus 5X General] antroid88:
Try flashfire. If it fails to flash ota, you can download full image and flash it with flashfire. It will be the same.
[Nexus 5X General] Kmf2b:
I donno if i aam n or m and i did it whit fastboot
[Nexus 5X General] roca4th01:
can i update my phone via OTA even if my bootloader is unlock? no root no twrp install
[Nexus 5X General] alfick3:
Yes. Search around and you'll find that question asked, and answered, many numerous times.

---------- Post added at 23:38 ---------- Previous post was at 23:37 ----------

How can you not know if your phone has Android M or N? Is it 6.0.1 or 7.0?
[Nexus 5X General] roca4th01:
I mean can I update to android N
[Nexus 5X General] alfick3:
Yes.
[Nexus 5X General] Kmf2b:
it is 6.0.1
[Nexus 5X General] alfick3:
Then you have Android M.
[Nexus 5X General] AG22:
Hello.

Trying to follow your beginning steps, I couldn't find "Extra > Google Support Library", only found Google USB Drivers. What should I do? This is my first time using those tools.

https://postimg.org/image/uxwsxsn7r/a009ee90/

[IMG="Image"]https://postimg.org/image/uxwsxsn7r/[/IMG]

Best regards.
[Nexus 5X General] ulxerker:
it says "Extras> Android Support Library" in the tutorial and I see it within SDK Manager.
[Nexus 5X General] AG22:
Sorry, I typed wrong. But i can't find Android Support Library.

Please, see the attached file.

Regards.
[Nexus 5X General] ulxerker:
alternately download the minimal fastboot/adb package here.
[Nexus 5X General] AG22:
Thanks, I'll get this minimal fastboot/adb package. After download this, since what step i should continue following?

Do you know why this option is missing?

EDIT

I found the solution. I don't know why,but you have to check the box "Obsolete", then you'll have the option "Android Support Library (Obsolete)".
[Nexus 5X General] ulxerker:
first, follow the instructions of the minimal package. second, follow the HowTo step by step depending what you want to do (i.e. root, flash ROM, etc.).
[Nexus 5X General] AG22:
Thanks again.

I've changed my previous post, explaining how to find that option.
[Nexus 5X General] kernelkode:
user data wiped?

I want root, which has a prereq of unlocked bootloader. The unlocking bootloader step says:

What exactly does this mean? Is this like a factory reset?

I don't want to lose my current setup just to get root.

Thanks.
[Nexus 5X General] rocketsaucev2:
Yes, unlocking will wipe the device, a factory reset
[Nexus 5X General] SlimSnoopOS:
Your entire phone gets erased when you unlock the bootloader or lock the bootloader. Backup your data to a computer before following these steps. There is no alternative. Bootloader must be unlocked if you want root access.
[Nexus 5X General] Hgat:
I am trying to install my Google USB Driver.

This is what I have done:

Windows 10 > Device Manager > Nexus 5X > Update Driver > Browse my computer for driver software > Let me pick from a list of device drivers on my computer > Have Disk

I then input the <sdk>/extras/google/usb_driver/android_winusb.inf file I have, but I get the following message:

The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems.

Any ideas?

I have already tried changing the USB transfer mode to PTP.

Many thanks
[Nexus 5X General] berndblb:
Google how to disable driver verification in Windows 10.
[Nexus 5X General] fvisagie:
I know it had some initial issues, but has anybody recently used adb backup to try restore the phone to its previous state after unlocking? If so, what were the results?
[Nexus 5X General] sfhub:
The Google USB driver doesn't have the bootloader USB IDs for N5X.

You actually don't need to install any external drivers on win10. There is a builtin driver that works with adb and mtp. For the bootloader interface, go into devmgmt.msc and update the driver, choose search net for driver and it will install something called Marshall London bootloader interface. This is a bootloader driver for a phone made by Marshall London (the music company) but it works fine for bootloader since that phone is android-based.
[Nexus 5X General] QuadPiece:
Fantastic guide, thank you.

Installed CM13 + SuperSU + Xposed with no issues
[Nexus 5X General] Hgat:
I've sorted it now - most grateful for your replies
[Nexus 5X General] Janny82:
Hello,

today I got my brand new Nexus 5X. I ran the setup process and worked with for about 10 minutes. Then the screen was black and did not respond to any command. Then the 5X rebooted and I had to enter the startup PIN. I entered it and then it was stuck again. I switched it off by holding the power button for about 10 seconds.

Now i am not able to start it again. The only thing is that I can enter the fastboot mode, but it does not allow me to flash an new image, because the unlocking of the bootloaders fails.. I did not enable the dev mode in the 10 minutes I got in the beginning.

And now I am stuck. Recovery is not working, too. The first time starting it, the device says that i have a corrupted system and now only the android guy with a red mark is there.

I am quite experienced with flashing Nexus devices, but at this point I am stuck. Even the google logo does not appear when trying to start it normally. Did I receive a faulty device?

Is there chance to recover my brand new 5X 32GB?

Kind regards.
[Nexus 5X General] sfhub:
As to trying to recover, search for LGUP and 5x.

It seems like your EMMC might be failing though, so if you have a chance to replace that is what I would do. "Corrupt" out of the box can really only happen (unless everyone is seeing it) if the EMMC is having problems.
[Nexus 5X General] Janny82:
Thanks, but now the device seems to be completely dead. No more fastboot showing or anything. Opened a case with LG.

Gesendet von iPhone mit Tapatalk
[Nexus 5X General] Trooper27:
Is this root guide still valid for the Android N DP5?
[Nexus 5X General] Nexedy:
Hey thank you so much for this guide! Everything I needed was here. :p
[Nexus 5X General] Mountainfisher:
I have owned a motorla droid, droid 4 , Samsung S5, and sony Z3V and rooted them all but I am by all means not a rooting guru. I would say I am basically a noob. I bought the 5X. Did my due diligance in researching the whole bootloader unlock, twrp, and root. Yesterday got my files in order on computer and today did the processs in about 20 minutes. Everything works great. Thanks everyone.
[Nexus 5X General] waldox:
Just wanted to say thanks for this amazing guide. Thanks! :good:
[Nexus 5X General] Pumpino:
My new 5X is running MDB08L. It appears that the boot.img for this version isn't available in the other thread. How do I get around this?

Will flashing a modified boot.img be required every time an update is sideloaded?
[Nexus 5X General] Pumpino:
Is an unlocked bootloader required for sideloading OTA updates via ADB or Wug's Nexus Toolkit?
[Nexus 5X General] Heisenberg:
Attention!

TWRP 2.8.7.2 has been released for this device and is now able to decrypt. This means you don't need to format userdata anymore, I'll be updating the guide properly later, I have a killer migraine at the moment.
[Nexus 5X General] duckxtales:
thanks for the tutorial! but i think i'm stuck trying to do a fastboot oem unlock as its not being recognized. but adb is recognizing it. widnows beblow:

im not sure what im doing wrong. i downloaded the fastboot from the google developer page where you select what tools you want to install.
[Nexus 5X General] Forge36:
[MENTION=4153349]Heisenberg[/MENTION] Thank you for the guide! I was able to unlock/root/flash in with confidence following your instructions.

I also updated to the November security patch the next day, just my luck: FYI I needed to flash the cache.img and vendor.img to resolve an error message.

I am also able to verify the decrypt is working with the latest twrp version (2.8.7.2 at the time of posting). Head's up to others: The GUI changed so don't be worried.

No extra steps required other than flashing recovery.

---------- Post added at 05:07 AM ---------- Previous post was at 05:04 AM ----------

I'm not certain but it looks like you forgot to enable debugging on your phone. Make sure you accept the prompt on your phone once connected to your computer.
[Nexus 5X General] gerg004:
Maybe someone here can help...I've posted this 3 other places but nobody wants to respond/doesn't know...

How or where can one store data (TiBu Backups etc) on the internal storage so it doesn't get wiped during a clean wipe prior to a new ROM install??
[Nexus 5X General] joetheshmo:
On a computer
[Nexus 5X General] Heisenberg:
You don't need to wipe internal storage when flashing a ROM.
[Nexus 5X General] gerg004:
Right, but there's got to be a way to store it in the phone without needing to move to a pc.

But when "wipe data" is chosen it wipes everything. Including whatever is in the "SD Card" folder. Or do you mean we don't need to wipe data when flashing a ROM?
[Nexus 5X General] Heisenberg:
If you follow my instructions and manually wipe system, data, cache, and dalvik cache in the

advanced wipe

menu it won't touch your internal storage.
[Nexus 5X General] rekd0514:
Yes, I believe that is the case until we have another solution.

I don't think that is required. You should be able to do adb sideload with the stock recovery. The toolkit doesn't work on the 5X yet.

---------- Post added at 09:02 AM ---------- Previous post was at 08:55 AM ----------

You could try this command.

Also make sure usb debugging is turned on in android. Sometimes unplugging the USB cable and putting it back will make the device recognized by adb/fastboot as well.

That will work the same as flashing the new image.
[Nexus 5X General] Paragon_X:
Is there a guide for someone on a Mac?
[Nexus 5X General] blackcatvn:
Can I have a question.

If I root it, can I still update my 5x over OTA or I must unroot and relock bootloader to get update over OTA.

Thanks !
[Nexus 5X General] allard1997:
Today I got my 5X and also did a system update. I'm on build MDB08L now but I see the boot.img is only for MDB08I. Do I need to wait until there is a new boot.img before I can install TWRP?
[Nexus 5X General] rekd0514:
No the OTA will not work. We will have to flash the factory images again with the no wipe option. You don't have to lock the bootloader again. Just flash the TWRP recover and root/SuperSU.

I believe we have to wait for the modified boot image.

or does this mean we will no longer need the modified boot image?
[Nexus 5X General] gildan27:
Couple things from my experience: The first time I tried this, I got the "com.google.process.gapps has stopped working" perpetual error message. I followed the directions from https://developers.google.com/android/nexus/images?hl=en#bullhead for reverting to stock (I used MDB08M).

I then followed these instructions again and it worked fine (I skipped decryption).

The modified boot.img appears to still be required even with TWIRP supporting decryption. I attempted to skip flashing it the modified boot.img, but TWIRP wouldn't flash without it (looked like it worked but it was still stock when recovery booted). If you extract the files for MDB08M from the Nexus download page, you will see that it still uses the MDB08I bootloader, so the current modified one works fine with MDB08M.

I'm now on MDB08M and fully rooted. Hope this helps someone.
[Nexus 5X General] reddv1:
Here are modified boot images for MDB08L & MDB08M

bullhead-mdb08l-mboot.zip (not tested yet)

bullhead-mdb08m-mboot.zip (tested working)

These boot images have the following modifications per Chainfires instructions, just like the modified mdb08i boot image:

- patched sepolicy

- disabled dmverity

- disabled forceencrypt
[Nexus 5X General] netpc02:
Showing 403 error in MDB08M link...

And modified boot.img from MDB08L is not compatible with MDB08M system. DO NOT FLASH!
[Nexus 5X General] Abdo 200984:
Updates

Will i receive Android

updates

from system updates after

rooting

my nexus 5x ?? :confused: :confused:
[Nexus 5X General] sfhub:
You'll receive the updates but will harmlessly fail to install.
[Nexus 5X General] Zackptg5:
Best thing to do is follow the update portion of the op
[Nexus 5X General] Darke5tShad0w:
Or use flashfire which will also reinstate root for you.
[Nexus 5X General] DJBhardwaj:
Yes, the procedure is the same. You would first want to decrypt first.
[Nexus 5X General] fvisagie:
Why do you suggest that?
[Nexus 5X General] DJBhardwaj:
About the decryption? Just my personal preference. :good:
[Nexus 5X General] rms4067:
I'm not sure what the deal is, but this guide needs updated. I'm not even on #1 and there are issues. I followed everything step and ran into multiple issues.

1) I installed the Andriod SDK as instructed.

2) I selected the Android SDK Tools and Android SDK Platform-tools from the tools tree.

3) I selected the Android Support Repository (it's called repository now - should update that) and the Google USB Driver.

4) I installed those 4 items.

5) Next I checked to see that the adb version was installed correctly, that went as the guide said it would.

6) Then I typed adb devices and nothing came up. After some ****ing around I see that the adb driver isn't installed (that is what windows 7 called it). After some googling, I found that I had to go to device manager and have the driver wizard seach C:/SDK to do it. Upon doing that my phone popped up a message about giving debugging permission to this computer (I allowed that). After that my device ID came up, great.

7) Next I wanted to test fastboot. My bootloader is still locked mind you but according to the guide I should connect the phone while it's in the bootloader and issue the command "fastboot devices" - nothing comes up. So this is where I am stuck at - there is an unknown "Andriod" driver in the device manager that I cannot update and have no idea how to (google has nothing for me).

What am I doing wrong?

For reference,

Running Windows 7 Professional

Phone is brand new
[Nexus 5X General] shupsta2010:
How will this work for Android 7.0 Nougat?

Will this guide work for Android 7.0 Nougat? I'm hoping so.

---------- Post added at 01:05 AM ---------- Previous post was at 01:02 AM ----------

I think I had close to this same issue, so any help would be great :good:
[Nexus 5X General] sfhub:
You aren't really doing anything wrong. Google USB drivers don't have the fastboot USB IDs for this phone. For your "unknown" driver try letting windows search for a driver. On Win10 it comes up with Marshall London Bootloader Interface, which will work fine because that is another phone that uses android and has the same USB ID for bootloader.

I think a lot of people just don't notice it because win10 adb drivers work out of the box for this phone and by default everyone probably just has win10 search for drivers it can't find. The Google USB drivers definitely do not have the USB IDs for fastboot.

I don't remember how win7 works and whether driver signature enforcement is turned on but if you want you can try these older drivers I modified to include the USB IDs for 5x. I don't remember when windows started enforcing catalogs and signatures so I can't tell you for sure they'll work on your system. They work on xp and vista.

http://xdaforums.com/nexus-5x/general/psa-fix-adb-doesnt-winxp-t3403955

---------- Post added at 10:00 PM ---------- Previous post was at 09:59 PM ----------

For 7.0, it'll work but you'll need to take the extra step to leave your userdata unencrypted or else TWRP won't be able to read your userdata.
[Nexus 5X General] ulxerker:
I assume there will be a new version of TWRP that handles encrypted data as soon as N has been released. If so, the procedures would be exactly the same for N like in this guide.
[Nexus 5X General] rms4067:
I don't remember how win7 works and whether driver signature enforcement is turned on but if you want you can try these older drivers I modified to include the USB IDs for 5x. I don't remember when windows started enforcing catalogs and signatures so I can't tell you for sure they'll work on your system. They work on xp and vista.

-Thank you for responding. I failed to update my original response to say that I fixed it. So with windows 7, at least on my computer, the Google USB Drivers installed the necessary drivers. But windows didn't automatically link it to any of them. That's why I had to manually add them. But for the fastboot driver, I had to go into device manager and add legacy hardware, pick it from the list, and I was good to go.
[Nexus 5X General] sfhub:
Yes, the Google USB drivers have the USB IDs necessary for 5x adb. However they don't have the USB IDs necessary for 5x fastboot. The USB IDs change depending on what mode you are in.

On Win10, the builtin drivers will work with 5x adb without needing the Google USB drivers. On Win10, for fastboot, if you ask the system to search for drivers over network, it will find drivers for fastboot that will work, but they will be called Marshall London Bootloader Interface. For many people they have Win10 configured to automatically search for better drivers so it wouldn't even be a manual search process. So basically for Win10 it is mostly irrelevant whether the Google USB drivers or instructions regarding drivers in this thread work or not, because it will just automatically work.

This just explains why many people wouldn't even notice if the instructions in the first post didn't actually result in working fastboot. It is mainly winxp/vista/win7 folks that will notice this problem because they don't have builtin drivers that work for adb and fastboot.
[Nexus 5X General] alfick3:
That's why I like Linux, it works well.
[Nexus 5X General] ultrapirate:
Is it ok if an efs backup is made over a rooted device with a custom kernel, or should the backup be made directly when twrp is flashed after unlocking the bootloader?
[Nexus 5X General] jbarcus81:
Maybe I downloaded the wrong file but the instructions to return to stock points to file names that I don't see?
[Nexus 5X General] ultrapirate:
you downloaded the OTA image, you want the factory image

here's the link to the latest factory image for version 6.0.1 (MTC20F)

you can get them from this page

https://developers.google.com/android/nexus/images
[Nexus 5X General] SlimSnoopOS:
It is ok. Personally, I did a backup of my EFS while on a custom rom. Just make an EFS backup before flashing anything that way you have a safe EFS backup to work with.