yashsingh1/xdaforums huggingface dataset:
[Nexus 5X Original Android Development] mskip:
Can someone with an UNLOCKED bootloader please enter fastboot mode, then run option 25 to open a command prompt. Run the following:

fastboot-toolkit oem unlock 2>_errorlog.log

Then paste the contents of the _errorlog.log file back here. It should be something like:

...

FAILED (remote: Already Unlocked)

finished. total time: 0.002s

but I need to know the exact error message to put it in to the toolkit bootloader unlock procedure. The sooner I can get this the sooner I can upload new device modules to everyone with a lot of fixes/improvements over existing procedures.

Mark.
[Nexus 5X Original Android Development] lilchicano:
So attempting it out with just oem unlock resulted in an error code similar to how you wanted, but when appempting with the 2>_errorlog.log i had no luck in finding anything in the cmd, or a file on the computer if that what was supposed to happen

Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Unified_Android_ToolKit>fastboot-toolkit oem unlock
...
FAILED (remote: Already unlocked)
finished. total time: 0.013s

C:\Unified_Android_ToolKit>fastboot-toolkit oem unlock 2>_errorlog.log

C:\Unified_Android_ToolKit>

if by chance i missed something let me know, id be happy to continue to find things out.
[Nexus 5X Original Android Development] mskip:
Thank you you gave me the info I needed and I also found a better way of detecting the device is already bootloader unlocked.

Mark.
[Nexus 5X Original Android Development] mskip:
Update available for Nexus 5X Main Module

ChangeLog:

+Fixed bootloader lock/unlock procedures to work properly on all devices

+Rewrote root by custom recovery process for all Android versions up to 6.0.0

+Added Fix Rename Recovery Restore file by pushing/flash with custom recovery

+Added a lot more user friendly text to several routines

+Added advisory to disable forced encryption on newer devices before rooting

+Improved flash zip file via custom recovery procedure

+Various other minor adjustments/improvements to procedures

If you don’t have the pro version of your chosen device you can download the Toolkit from http://www.skipsoft.net/?page_id=1069 and donate to the Nexus 5X device module at http://skipsoft.net/donate/?toolkit=Nexus5X, enter your activation code when received and autoupdate to the latest version.

I need sleep now but I will update the main module in all the nexus device module packages in the morning. You can then update the main module to the latest version by closing the Toolkit, running ToolkitClean.exe and selecting the device/devices you want to update. You can then restart the Toolkit and select your device to download the latest public device module.

Mark.
[Nexus 5X Original Android Development] mskip:
Device module update available for all users

I completed the update of the main module file (dated 02nd Nov 2015) last night after 4 days of coding testing and debugging which improves most of the Toolkit procedures. Unlock, relock, backup apps, flash zip files, rename stock recovery restore files, root, unroot procedures have all been reworked, debugged (as much as I can see) and improved.

ChangeLog:

+Fixed bootloader lock/unlock procedures to work properly on all devices

+Rewrote root by custom recovery process for all Android versions up to 6.0.0

+Added Fix Rename Recovery Restore file by pushing/flash with custom recovery

+Added a lot more user friendly text to several routines

+Added advisory to disable forced encryption on newer devices before rooting

+Improved flash zip file via custom recovery procedure

+Various other minor adjustments/improvements to procedures

AutoUpdates have already been pushed to pro users but everyone can download the new module file easily as follows:

1. Make sure the Toolkit is closed.

2. Run ToolkitClean.exe from the installation folder.

3. Clean the module files and settings by selecting your device from the list.

4. Restart the Toolkit, select your device from the list and new module files will be downloaded.

Mark.
[Nexus 5X Original Android Development] mskip:
Busy week for Android devices..

New images appeared for the Nexus 5X this morning (or yesterday im not sure) and I have updated the Toolkit for full support including root.

Changelog [v1.0.4]:

+Added Support [including download/flash/root] for Android 6.0.0 MDB08L

+Added Support [including download/flash/root] for Android 6.0.0 MDB08M

+Added 6.0.0 MDB08L/MDB08M stock images to download/flash directly from Toolkit

+kpatch/disable forced encryption boot images for above added and enabled

AutoUpdates have already been pushed for Pro users. Just run the Toolkit, select your device and the update will be waiting.

Everyone else can update to the latest version as follows:

1. Make sure the Toolkit is closed.

2. Run ToolkitClean.exe from the installation folder.

3. Clean the module files and settings by selecting your device from the list.

4. Restart the Toolkit, select your device from the list and new module files will be downloaded.

Note: If you don't have update via AutoUpdate then the MD5 checksum file to check the firmware image has downloaded correctly will not be updated. You can download the _googleimagesmd5.ini below (you need to download the zip and extract the ini file) and move it to the tools folder in the Toolkit installation folder to fix that. If you don't want to do this then you will just get a message after downloading the stock image saying the checsum cannot be verified that but you can just bypass that message to continue to the flash stage.

If you don’t have the pro version of your chosen device and want to go Pro you can download the Toolkit from http://www.skipsoft.net/?page_id=1069 and donate to the device module at http://www.skipsoft.net/?page_id=703, enter your activation code when received and autoupdate to the latest version.

I am also posting the kpatch files here for MDB08L and MDB08M builds to decrypt the system and enable root for people who do not want to use the Toolkit to get the files.

Enjoy, Mark.
[Nexus 5X Original Android Development] rampino:
i always get "the bootloader is already unlocked" eventho it isnt.. am i doing something wrong?

edit: nevermind. got it
[Nexus 5X Original Android Development] scumfromohio:
I'm getting an issue when selecting build. After it downloads it says its missing file root/nexus 5x then when it goes back to the select your build screen it says detected build: bullhead 6.0 MDA69E I did unlock the bootloader with the other tool before i found this one. So its connecting im not sure whats wrong?
[Nexus 5X Original Android Development] acsontos:
I have installed your MDB08M patched boot file and flashed the M system image file. Than I have manually flashed SuperSu 2.52 through TWRP.

I'm getting and error message at startup " There’s an internal problem with your device. Contact with your manufacturer)

What did I wrong? Your tool says: everything is fine, patched kernel installed etc.

thank you
[Nexus 5X Original Android Development] acsontos:
I have solved the problem. Please see my new post on next page.
[Nexus 5X Original Android Development] Jayliya:
Question

Will relocking the bootloader reset the tamper flag and do you have any information regarding QFuse
[Nexus 5X Original Android Development] mskip:
I have made some kpatch files for the MDA89E and MDA89F builds, enabled root/decryption support for those builds and updated autoupdate and module files. Read the post below on how to update your files and everything should work fine.

Mark.
[Nexus 5X Original Android Development] mskip:
Updated module files to enable root/decryption support for MDA89E,MDA89F builds for ALL users (Pro and Public)

I have made some kpatch files for the MDA89E and MDA89F builds, enabled root/decryption support for those builds and updated autoupdate and module files.

Pro users can just start the Toolkit as normal. After you have selected your device you will be notified an AutoUpdate is available and can update everything. SIMPLE.

Non Pro users have a few extra steps.

1. Exit the Toolkit if it is open.

2. Run ToolkitClean.exe from the intallation folder (or the Start Menu)

3. Select the Nexus 5X from the list (option 05)

4. Type 'y' or 'yes' (without the quotes) to delete the existing module files and settings for the Nexus 5X

5. Restart the Toolkit, select the Nexus 5X and new module files will be downloaded/installed

If you want to donate to the Nexus 5X project please do it through the Toolkit (after selecting the device at startup) so you get the right code fast.

Enjoy, Mark.
[Nexus 5X Original Android Development] Lalson:
Hey guys, i'm little bit confused.. I want to root phone, but i don't know how to proceed. I have already unlock bootloader. And now should i install TWRP , disable enforced encrypting and than root phone?

Thanks in advance. :)
[Nexus 5X Original Android Development] bsinc1962:
Is there anyway to sideload a factory update image without wiping all your data with the toolkit?
[Nexus 5X Original Android Development] acsontos:
If you are going to get the following message at startup after using this tool:

" There’s an internal problem with your device. Contact with your manufacturer"

than something went wrong, like as it happened to me. In this case you should manually flash the desired firmware version (like M). Make sure and ERASE every file through ADB, before you reflash the image files (like cache, vendor, system etc).

for example:

fastboot erase cache

fastboot flash cache cache.img (or you use whatevernamexxx.img if you renamed it earlier)

Do not restart the device immediately.

If you want a DECRYPTED device, than restart the device to TWRP Recovery Mode and hit the

FORMAT DATA partition (type "yes")

If you want to ROOT your device, than you need to flash the "boot-kpatch-mdb08m-bullhead.zip" image (or "E" or "I" etc depends on your firmware version)

Once you finished you can restart your device and set it up. Turn the USB debugging mode on, download the BETASuperSu2.52.zip, copy the file to the device and restart it again to Recovery Mode.

Flash the SuperSu, reboot and you are done. You have a rooted device on the latest M build. You also can update the SuperSu to 2.56. It will work.

Last thing: if you want to get B12 on T-Mobile, than flash the older M8994F-2.6.22.0.56 radio through ADB.

It is working on the "I" and "M" build for sure.

My phone is running on the latest M build. It's rooted, decrypted and I also have B12.

thank you
[Nexus 5X Original Android Development] mskip:
Just start the root procedure (option 4,1) and it will take you through everything you need to do.

Mark.
[Nexus 5X Original Android Development] GTOJim:
Thanks yesterday I ran into the exact issue you describe, the option to root caused the problem.
[Nexus 5X Original Android Development] mskip:
You can't sideload an AOSP factory image, it can only be done through fastboot. If you have an OTA update zip then you can sideload it through stock recovery with option 16,2,1.

You can however select the download/flash (option 9,1) and then choose not to format userdata after the flash. This will leave your internal storage untouched and all your settings, installed apps will still be there.

Mark.
[Nexus 5X Original Android Development] Lalson:
Thank you for quick reply. But i'm having MDA89E and root options is disabled for me.. I thought that you enabled it(THIS POST)

I have cleaned toolkit twice, delete toolkit and download last version (1.4.3), but it is still disabled for me.

Error message for is : All root routines have been disabled...
[Nexus 5X Original Android Development] mskip:
Sorry that was my error I forgot to change 1 variable in the setup file which disabled root routines..

Clean the device module and try again and it should be enabled now.

Mark.
[Nexus 5X Original Android Development] Lalson:
Well i tried to root my phone and i got bootloop. I chose 4-1. I had ulocked bootloader and enabled usb debuging.

Toolkit installed twrp. Twrp started and asked me to allow modifing some files (Not sure what was it.. Something about next google updates can rewrite twrp)

I was waiting if toolkit do something, but it after while jumped back to nexus5x menu.. So i just click to reboot my phone, where i allow to TWRP root my phone and than i got bootloop.

Any idea what i did wrong?
[Nexus 5X Original Android Development] mskip:
I don't know why the device booted to TWRP without first copying the root zip file to the device (which it should do whilst in Android), then it should boot to fastboot and flash the kpatch file before booting to TWRP to flash the zip.

Also did you see a message asking to decrypt the device before attempting root? Until dees_troy can enable decryption support in TWRP it is not possible to use TWRP with an encrypted device (you should get stuck in an unlock screen).

The reason you got the actual bootloop is because the kpatch boot image file (which enables rooting in Android 6) had not been flashed before rooting. As you selected to let TWRP root the device it did not flash the modified boot image which then caused the problem. If you go to the root/Nexus5X folder in the toolkit then you should see a boot-kpatch-*build*-bullhead.img file:

Copy this file to the Toolkit root folder (same as toolkit.exe) and rename it boot.img

Manually reboot the device to fastboot mode

In the toolkit main menu select option 25 to open a command prompt

Plug the usb cable in to your device

In the command prompt type:

fastboot-toolkit flash boot boot.img ( to flash the kpatch boot image)

fastboot-toolkit reboot (to reboot the device)

It should then boot up properly. I would recommend decrypting the device to be safe (also a little bit faster).

Mark.
[Nexus 5X Original Android Development] Lalson:
Yes it asked me, and i allow it.. I followed your procedure. And it boot up.

I installed superSU by toolkit and it says my phone is not rooted.

I tried root it again by 4-1. And it always boot to TWRP toolkit also recognise i'm in twrp, than it write something(too fast to read) and get back to nexus5x menu.
[Nexus 5X Original Android Development] mskip:
Is it at all possible to video the screen whilst the message pops up and upload it somewhere like dropbox or mediafire so I can see whats wrong?

Mark.
[Nexus 5X Original Android Development] Lalson:
Last line is visible about 2 sec, after it quit to nexus5x menu.

And phone is in main TWRP menu.

(Descyption is allowed)

Here is toolkit:

[IMG="Toolkit img"]http://xdaforums.com/attachment.php?attachmentid=3532794&d=1446795018[/IMG]
[Nexus 5X Original Android Development] mskip:
Can you remember the exact options you chose before getting to that point. Did you choose to unlock the bootloader as part of the root process? Or to decrypt the device before rooting as part of the root process?

I found an error that sets the toolkit going in the wrong direction when a certain set of options are chosen but it would be useful to get more info.

Mark.
[Nexus 5X Original Android Development] Lalson:
nexus5x menu - 4 - 1 - than it ask me if i want to decrypt phone (I allways chose yes.. ) - than start root process like in the picture

I unlock bootloader by: nexus5x menu - 3... So i have never unlock bootloader in root process..
[Nexus 5X Original Android Development] mskip:
Fixed this. Now testing as many options as I can. If someone wants to help test I can post the file here.

Updates will be uploaded tonight.

Mark.
[Nexus 5X Original Android Development] mskip:
Device module v1.0.6 update available for ALL users (Pro and Public)

Changelog:

+Fixed root routine going wrong when a certain set of options is selected

+Added more information to users in root, recovery, unlock, decryption routines

+Added detection in unlock routine for oem unlock option not being enabled

+Added Bootloop fix when rooting by twrp message at exit [option 22,2]

+Updated TWRP Custom Recovery to 2.8.7.2 with support for encrypted devices

I WOULD RECOMMEND ALL USERS UPDATE TO THIS MODULE TO FIX MANY SMALL BUGS AND IMPROVE THE TOOLKIT EXPERIENCE.

Pro users can just start the Toolkit as normal. After you have selected your device you will be notified there is an update available and can auto update. SIMPLE.

Non Pro users have a few extra steps.

1. Exit the Toolkit if it is open.

2. Run ToolkitClean.exe from the intallation folder (or the Start Menu)

3. Select the Nexus 5X from the list (option 05)

4. Type 'y' or 'yes' (without the quotes) to delete the existing module files and settings for the Nexus 5X

5. Restart the Toolkit, select the Nexus 5X and new module files will be downloaded/installed

6. After you choose your build the new Custom Recovery TWRP will be downloaded and set for use.

If you want to donate to the Nexus 5X project please do it through the Toolkit (after selecting the device at startup) so you get the right code fast.

If someone could give it a thorough testing (root, unlock, disable encryption, recovery) and let me know if there are any bugs or if its all good then I can update the modules for all the other nexus devices.

Enjoy, Mark.
[Nexus 5X Original Android Development] Lalson:
I have tried it.. Unlocked bootloader, than enabled usb debuging, and than start root process..

It asked if i have unlocked bootloader and usb debuging enabled so i answered yes.. -> booted to fastboot and do there something -> asked me to apply patch -> yes -> phone rebooted ->selecting language and immediately dialog: com.google....gapps has stopped.. this has shown 6 times.. -> setting my Imprint -> lock screen as a gesture -> confirming gesture ->dialog: "Setting" has stopped -> put me back to setting my Imprint..

EDIT:

When i skipped Finger print and continue process, finally i have rooted my phone.

Just Setting-> Security -> App Setting has stopped..

And camera not working for me
[Nexus 5X Original Android Development] mskip:
What build is your device running?

Mark.
[Nexus 5X Original Android Development] lilchicano:
gave it a shot with the 4,3 option and ran into no issues what so ever! fully rooted, and all the good stuff!
[Nexus 5X Original Android Development] tlopez1973:
ok so i unlocked the bootloader rooted my phone and cant get into twrp ?? very time i try to boot into twrp recovery it boot into stock recovery did i miss a step ??and i am uncrypt
[Nexus 5X Original Android Development] mskip:
Is that flashing TWRP and then booting to it?

I guess the 5X has the stock recovery restore files present which will restore the stock recovery on reboot. Use option 5 from the main menu to rename the files and custom recovery should stick. Let me know how it goes.

Mark.
[Nexus 5X Original Android Development] tlopez1973:
thanks ill try it
[Nexus 5X Original Android Development] mskip:
Deleted. Already answered.

Mark.
[Nexus 5X Original Android Development] MurdocZero:
What's sparse system.img? I flashed the latest factory image and when it came time to flash system it flashed sparse system.img. It updated successfully and everything seems fine but it's not something I've encountered in the past when updating my old N4.
[Nexus 5X Original Android Development] dave2775:
Do I have to flash newest M factory image before using your toolkit or can I do it with the toolkit?
[Nexus 5X Original Android Development] mskip:
Option 9,1 from the main menu can download, extract and flash ANY build for the Nexus 6P up to the latest MDB08M automatically. No need to update first and the Toolkit can do it a lot more safely.

It also supports all the builds including root if you do not want to update the build you are on now.

Mark.
[Nexus 5X Original Android Development] Roshi69:
you my friend are a life saver!

I got myself into a bootloop and was easily able to get back to a stock image using your tool.

I initially used it to unlock bootloader, root and install TWRP.

Great instructions and a truely powerful tool thanks so much!
[Nexus 5X Original Android Development] mskip:
As far as I know the sparse format is a compression method to split a larger image in to smaller chunks to reduce transfer time and make it easier to flash a larger image (which would normally be much larger than the available ram used for flashing. This is more useful on newer devices where the system image is much bigger than it used to be.

Mark.
[Nexus 5X Original Android Development] mskip:
Thank you. Glad you managed to fix your device by yourself (with a little help from the Toolkit).

How did you get in to a bootloop?

Mark.
[Nexus 5X Original Android Development] MurdocZero:
Is this a feature of toolkit or part of the factory image? The reason I turned to the toolkit was because adb kept failing to flash anything other than the bootloader and radio. Kept saying system.img was missing even though it was in the proper folder
[Nexus 5X Original Android Development] mskip:
No it is not a special feature of the Toolkit.

When you said adb kept failing im guessing you actually meant fastboot kept failing? How did you try to flash the system.img file? Did you extract the files from the zip and flash separately or just use the fastboot -w update image* command (which is known to be buggy). The Toolkit extracts every image and flashes them individually to give a much safer flash.

Mark.
[Nexus 5X Original Android Development] Roshi69:
I installed a layer theme and it wouldn't boot up.

Then tried to wipe and reflash the ROM with the same results.

Was able to restore to previous backup and boot but was getting constant NFC and System UI Force Closes.

Had to flash a factory image and reinstall root/recovery
[Nexus 5X Original Android Development] mskip:
TESTERS NEEDED

The TWRP openrecoveryscript (used to flash zip files automatically) works fine on the Nexus 6P and has just been enabled to provide a much simpler root method. I'm hoping its the same with the 5X but I need someone to test the openrecoveryscript, ALLINONE and sideload features in TWRP before I can enabled it for all users. It needs testing with an encrypted device and decrypted device so if anyone has knowledge of flashing and know what they are doing and can help test then please post here and I will send a pm with the updater.

I will also give testers an activation code so they can test the ALLINONE procedure.

Thanks, MArk.
[Nexus 5X Original Android Development] Andeh23:
I was playing around with unlocking & rooting using this tool, but I found some apps I want to use do a root/unlock check so chose to go back to stock (MB08i). Once I did that, I was getting the warning errors that my device is corrupt, and I was unable to apply the latest security patch. I flashed the latest factory stock ROM (MB08M) successfully, but am still getting errors that my device is corrupt. On a hunch, I tried to flash the stock recovery again with the toolkit. It appears to work up until it gets to "rebooting device..", where it then says "error: device '(null)'" and does not reboot. If I then try to boot into recovery using the volume rocker & power keys from the Fastboot mode, it fails and just shows the android with the red exclamation.

Any suggestions on how to fix this?

Edit: I read the help files and now am in the stock recovery (didn't know about hidden menu). Is the corruption error going to go away if I do a factory reset?

Edit 2: I did a factory reset, then relocked the bootloader, and still am getting the Google corruption warning. Is it possible to get rid of that, or is that a result of having ever unlocked the device?