Properly installing LineageOS 14.1 on Honor 5X (KIW-L21) - Honor 5X Questions & Answers

Good evening XDA Developers Forum,
I am trying to figure out how to install LineageOS 14.1 on a Huawei Honor 5X without getting into too much hassle. (If you are not interested in my chit-chat, I recommend reading only the bold text.)
Why do I need help? I tried to install LineageOS 14.1 right after buying a fresh new Honor 5X following the instructions at the LineageOS-Wiki*, but things didn't went as expected. After 5 days of macgyvering the (suspectedly) bricked phone I managed to get it running again, but not yet with LinageOS. So I wanted to share my experiences to help others having similar problems and I want to avoid too much stress with the next steps. (* I wanted to link to the Wiki, but due to being a new user, I am not allowed to. You may follow the kiwi-Install-Instructions in the LineageOS-Wiki.)
Kind of disclaimer: I've modified my mobile devices a few times in the past years. I rooted and installed CyanogenMod 12.1 and later an XDA-Dev-built Android 7.1.2 on a Nexus 7 3G 2012. I rooted and installed CyanogenMod 12.1 and later 13.0 on a Nexus 5. I stumbled over some problems, but after some trial and error everything worked. Therefore I thought I was a bit experienced and could easily do that stuff with a phone that is listed as "supported"... I didn't ignore mandatory steps of the LineageOS Wiki. I did RTFM and read this forum. I often found questions being close to my problems, but sometimes I didn't understand the answer or often the answers didn't work for me. I hated to see how this forum tried to help new users that didn't reply on questions and how some new users neither followed the instructions nor posted their solution. I promise not to let the thread die before I summarize a solution. As soon as I'm allowed to, I'll link all the files I used to their source, I kept track of them all.
You may skip the history passage if you're not interested in the pre-story or if you don't want to profit of my trial and error experience. So here comes what I did until today:
Update Google USB drivers, already have adb and fastboot installed
Buy a new Huawei Honor 5X
Check its attributes: It's a KIW-L21 with a Huawei version of Android installed, version 5.1.1 and EMUI 3.1. This device is called "kiwi".
Successfully receive unlock code via Huawei
Root the phone via fastboot, until the fastboot & rescue mode screen says "OEM Unlocked, FRP Unlocked"
Flash TWRP 3.1.1.0 (kiwi) to recovery
Push lineage-14.1-20170809-nightly-kiwi-signed.zip to /sdcard on the phone
Wipe cache, system and data
Start install of the above LineageOS .zip file in TWRP
Installation getting aborted with "assert failed: kiwi.verify_trustzone(...) ==1" and ending with an "Error 7"
Learn from the forums that I should have installed "stock MM" first. "MM" seems to be Marshmallow, also known as Android 6.0
Search for images of "stock MM", end with a complete mess of gigabytes of dozens of images, differing by region (Arab/Europe/Americas/etc.), build numbers, firmware stuff, model numbers... oh crap, I don't understand a word
Extract different "stock recoverys" from multiple firmware packages, try to combine them with all kinds of firmwares
Flash stock recovery "recovery_l21_b130.img" to recovery, put SD card with /dload/UPDATE.APP (KIW-L21C432B130CUSTC432D005.dload.modaco.zip) into phone, reboot with Volume-up + power button, start factory reset, end with "data and cache format failed"
Flash stock recovery "recovery_l21_b130.img" to recovery, put SD card with /dload/UPDATE.APP (08_Huawei_KIW-L21_Firmware_C432B130CUSTC432D005_Android 5.1_EMUI 3.1_Finland.zip) into phone, reboot with Volume-up + power button, start factory reset, end with "data and cache format failed"
Flash stock recovery "RECOVERY.img" (from Extracted_L21_B130.zip) to recovery, put SD card with /dload/UPDATE.APP (08_Huawei_KIW-L21_Firmware_C432B130CUSTC432D005_Android 5.1_EMUI 3.1_Finland.zip) into phone, reboot with Volume-up + power button, start factory reset, end with "data and cache format failed"
All of the issues resulted in a boot loop
Wife getting mad because I bricked her new phone and wasted nights for it
Finally find this nice file depot of the Honor 5X in this forum but do not understand all the different headers or the structure of the list
Find out that the used firmware versions may have been too old (although I thought I should have used "stock" and therefore the oldest ones)
Try my luck with flashing L21_B130\RECOVERY.img (from Extracted_L21_B130.zip) to recovery, used "KIW-L21 C432B350 - D003" from the file depot to copy its UPDATE.APP to /dload/ at the external SD card, held both volume buttons and the power button until reboot
The Honor reboots into an autorecovery mode, installing the file from UPDATE.APP automatically and for the first time not cancelling the process
Great success!
I feel myself like I "unbricked" the phone
I am now holding a running Huawei-crippled Android 6.0.1 in my hands
My current situation is a running Huawei Honor 5X with a Huawei-branded Android 6.0.1, EMUI 4.0, build KIW-L21C432B350, custom version CUSTC432D003, fastboot & rescue mode screen saying "PHONE Unlocked". Unfortunately – you may have noticed – that is not LineageOS 14.1, which I actually wanted to install. How do I do that? Should I just follow the wiki instructions? Do I now have a "stock MM installed"? Doesn't it become uninstalled when I wipe system in TWRP before I install LineageOS?
When I try to read information of the phone via "fastboot getvar all", I just get an empty value after "all:". Why is that?
Rather than struggling over anything else when I try to follow the LineageOS wiki install guide again: What should I do or check first? I do not want to get a "kiwi.verify_trustzone" error again. How do I avoid that?
Thanks for your patience in advance!

You're on B350 and it's a good firmware to go (my phone was using it before 'conversion'). Flash twrp via fastboot, clear system/data/caches (backup your and app data first! if you want) and just flash Lineage + gapps (at once, no reboot between). You should be fine.

You are good to go

I have the problem that i cant get MM on it. I am still on b160.
I copied the dload folder for b330 on it and went to updater, menu, local update, update.app and press install
My phone reboots into twrp and nothing happens. I also cant boot into stock recovery. When i press vol up, vol down and power, my phone restarts over and over again. When i release the Buttons it just boots into android.
How do i get b300+ on it?

Activehannes said:
I have the problem that i cant get MM on it. I am still on b160.
I copied the dload folder for b330 on it and went to updater, menu, local update, update.app and press install
My phone reboots into twrp and nothing happens. I also cant boot into stock recovery. When i press vol up, vol down and power, my phone restarts over and over again. When i release the Buttons it just boots into android.
How do i get b300+ on it?
Click to expand...
Click to collapse
You can't flash stock images with twrp. You'll have to revert recovery back to stock one (extract image from b160) and then try to update.

ok that was a little bit to fast. do i need to download stock recovery and flash it via adb? because i got TWRP on it this way.

Activehannes said:
I have the problem that i cant get MM on it. I am still on b160.
Click to expand...
Click to collapse
Please do not steal my thread topic. I am trying to complete a tutorial.

you literally had the same problem I have. You had TWRP on it and tried to get stock recovery back to install MM. wouldn't it be part of a tut to explain how you did that? And since you know the answer, cant you tell me?

It worked! I finally got LineageOS working. Thanks to ShadySquirrel and PalakMi for your verification of my installation!
So here is my ultimate tutorial how to install LineageOS 14.1 (= Android 7.1.2) on a brand new Huawei Honor 5X KIW-L21 that comes originally with a Huawei branded Android 5.1.1:
Step 0: Preparation
You have up to date Google USB drivers installed
adb and fastboot are working
You know how to check checksums
You checked your device: It's a KIW-L21 with a Huawei version of Android installed, version 5.1.1 and EMUI 3.1. Your device is called "kiwi".
With your detailed device information, you ordered an unlocking password from Huawei (except your phone is already rooted)
Step 1: Install Stock MM (= Marshmallow = Android 6.0)
Root the phone via fastboot until the fastboot & rescue mode screen says "OEM Unlocked, FRP Unlocked"
You can reach the fastboot & rescue mode screen by plugging your phone via USB to a PC and keep volume-down + power buttons pushed until you see the Honor logo
Download the following images and its checksums and check them to avoid corrupted files:
- Stock recovery image from Extracted_L21_B130.zip: L21_B130\RECOVERY.img
- Stock MM from this nice file depot of the Honor 5X in this forum: KIW-L21 C432B350 - D003
Flash the stock recovery to the phone with fastboot when you are at the fastboot & rescue mode screen: "fastboot flash recovery RECOVERY.img"
Copy the UPDATE.APP of the above file to /dload/ at an external SD card and put it into the phone
Hold both volume buttons and the power button until reboot
The Honor reboots into an autorecovery mode, installing the file from UPDATE.APP automatically
Wait until it's ready and be happy about your Honor 5X with Stock MM
Check if you are at this status: Huawei Honor 5X with a Huawei-branded Android 6.0.1, EMUI 4.0, build KIW-L21C432B350, custom version CUSTC432D003, fastboot & rescue mode screen saying "PHONE Unlocked"
Step 2: Install LineageOS
Download the following images and its checksums and check them to avoid corrupted files:
- TWRP 3.1.1.0 recovery image for the Honor 5X (kiwi): twrp-3.1.1-0-kiwi.img
- LinageOS 14.1 nightly build for kiwi devices: lineage-14.1-20170816-nightly-kiwi-signed.zip
- Open GApps package for ARM64 / Android 7.1 (in my case I choose "pico" to have the calendar and Google Play): open_gapps-arm64-7.1-pico-20170819.zip
Place the files where you can reach them from your adb/fastboot-console
Connect phone via USB to PC
Keep volume-down + power buttons pressed until phone restarts and shows Honor logo, release buttons; "Fastboot & Rescue Mode" screen should appear
On PC, check with "fastboot devices" if phone is connected and ready to go (should list an ID and the state "fastboot")
Flash recovery with "fastboot flash recovery twrp-3.1.1-0-kiwi.img"; should report sending and writing with two "OKAY" messages and a "finished"
Try to start recovery mode by keeping volume-up + power buttons pressed until Honor logo appears, release buttons and wait ~ 20 seconds
In my case, this started the Huawei eRecovery – you don't want that (and it's not part of the LineageOS wiki)
Navigate with the volume buttons to "Reboot" and press the power button; phone should boot normally
Once your old Android is up again, activate USB-debugging
Check if adb is connected to your PC with "adb devices"; you must allow access to the device on your phone when prompted, the device should appear with the serial number and the state "device"
Restart into the recovery mode you really want with "adb reboot recovery" and wait until TWRP boots; allow writing on its first start
Check if adb is connected to your PC with "adb devices"; the device should appear with the serial number and the state "recovery"
Push LineageOS image and Google apps to phone with "adb push lineage-14.1-20170816-nightly-kiwi-signed.zip /sdcard/" and "adb push open_gapps-arm64-7.1-pico-20170819.zip /sdcard/"; both should report transferred size and time
Do not forget to push the md5 checksums if you are paranoid like me
Backup everything to an external SD card from the Backup menu in TWRP (needed 4021 MB of space and took ¼ hour in my case)
Seriously, backup! Even though you haven't done anything with the phone yet. You have a running firmware, that's worth a lot
In TWRP, select "Wipe" and then "Advanced Wipe"
Check "Cache", "Data" and "System" and swipe to wipe
Go "Back" to return to main menu, then select "Install"
As you have backed up to an external SD card, "Select Storage" to "Internal Storage"
Navigate to "/sdcard", select lineage-14.1-20170816-nightly-kiwi-signed.zip and swipe to confirm flash; should not take more than a minute
When it's done, do not reboot but navigate back to "Install" and install Google apps by selecting open_gapps-arm64-7.1-pico-20170819.zip and swiping to flash
Once installation has finished, return to the main menu, select "Reboot", and then "System"; the Honor logo will appear shortly
LineageOS 14.1 is now being initialized
Disconnect phone from PC
Profit!
I'll provide links to the images as soon as this forum allows me to.

Activehannes said:
you literally had the same problem I have. You had TWRP on it and tried to get stock recovery back to install MM. wouldn't it be part of a tut to explain how you did that? And since you know the answer, cant you tell me?
Click to expand...
Click to collapse
You are right, sorry, I was being too harsh. I'd like to post the link to the recovery image I've had success with, but I am not allowed to do so. Maybe you'll find it when you look for it and follow the instructions of my last post (Step 1). Does it work?

Et tu said:
It worked! I finally got LineageOS working. Thanks to ShadySquirrel and PalakMi for your verification of my installation!
So here is my ultimate tutorial how to install LineageOS 14.1 (= Android 7.1.2) on a brand new Huawei Honor 5X KIW-L21 that comes originally with a Huawei branded Android 5.1.1:
Step 0: Preparation
You have up to date Google USB drivers installed
adb and fastboot are working
You know how to check checksums
You checked your device: It's a KIW-L21 with a Huawei version of Android installed, version 5.1.1 and EMUI 3.1. Your device is called "kiwi".
With your detailed device information, you ordered an unlocking password from Huawei (except your phone is already rooted)
Step 1: Install Stock MM (= Marshmallow = Android 6.0)
Root the phone via fastboot until the fastboot & rescue mode screen says "OEM Unlocked, FRP Unlocked"
You can reach the fastboot & rescue mode screen by plugging your phone via USB to a PC and keep volume-down + power buttons pushed until you see the Honor logo
Download the following images and its checksums and check them to avoid corrupted files:
- Stock recovery image from Extracted_L21_B130.zip: L21_B130\RECOVERY.img
- Stock MM from this nice file depot of the Honor 5X in this forum: KIW-L21 C432B350 - D003
Flash the stock recovery to the phone with fastboot when you are at the fastboot & rescue mode screen: "fastboot flash recovery RECOVERY.img"
Copy the UPDATE.APP of the above file to /dload/ at an external SD card and put it into the phone
Hold both volume buttons and the power button until reboot
The Honor reboots into an autorecovery mode, installing the file from UPDATE.APP automatically
Wait until it's ready and be happy about your Honor 5X with Stock MM
Check if you are at this status: Huawei Honor 5X with a Huawei-branded Android 6.0.1, EMUI 4.0, build KIW-L21C432B350, custom version CUSTC432D003, fastboot & rescue mode screen saying "PHONE Unlocked"
Step 2: Install LineageOS
Download the following images and its checksums and check them to avoid corrupted files:
- TWRP 3.1.1.0 recovery image for the Honor 5X (kiwi): twrp-3.1.1-0-kiwi.img
- LinageOS 14.1 nightly build for kiwi devices: lineage-14.1-20170816-nightly-kiwi-signed.zip
- Open GApps package for ARM64 / Android 7.1 (in my case I choose "pico" to have the calendar and Google Play): open_gapps-arm64-7.1-pico-20170819.zip
Place the files where you can reach them from your adb/fastboot-console
Connect phone via USB to PC
Keep volume-down + power buttons pressed until phone restarts and shows Honor logo, release buttons; "Fastboot & Rescue Mode" screen should appear
On PC, check with "fastboot devices" if phone is connected and ready to go (should list an ID and the state "fastboot")
Flash recovery with "fastboot flash recovery twrp-3.1.1-0-kiwi.img"; should report sending and writing with two "OKAY" messages and a "finished"
Try to start recovery mode by keeping volume-up + power buttons pressed until Honor logo appears, release buttons and wait ~ 20 seconds
In my case, this started the Huawei eRecovery – you don't want that (and it's not part of the LineageOS wiki)
Navigate with the volume buttons to "Reboot" and press the power button; phone should boot normally
Once your old Android is up again, activate USB-debugging
Check if adb is connected to your PC with "adb devices"; you must allow access to the device on your phone when prompted, the device should appear with the serial number and the state "device"
Restart into the recovery mode you really want with "adb reboot recovery" and wait until TWRP boots; allow writing on its first start
Check if adb is connected to your PC with "adb devices"; the device should appear with the serial number and the state "recovery"
Push LineageOS image and Google apps to phone with "adb push lineage-14.1-20170816-nightly-kiwi-signed.zip /sdcard/" and "adb push open_gapps-arm64-7.1-pico-20170819.zip /sdcard/"; both should report transferred size and time
Do not forget to push the md5 checksums if you are paranoid like me
Backup everything to an external SD card from the Backup menu in TWRP (needed 4021 MB of space and took ¼ hour in my case)
Seriously, backup! Even though you haven't done anything with the phone yet. You have a running firmware, that's worth a lot
In TWRP, select "Wipe" and then "Advanced Wipe"
Check "Cache", "Data" and "System" and swipe to wipe
Go "Back" to return to main menu, then select "Install"
As you have backed up to an external SD card, "Select Storage" to "Internal Storage"
Navigate to "/sdcard", select lineage-14.1-20170816-nightly-kiwi-signed.zip and swipe to confirm flash; should not take more than a minute
When it's done, do not reboot but navigate back to "Install" and install Google apps by selecting open_gapps-arm64-7.1-pico-20170819.zip and swiping to flash
Once installation has finished, return to the main menu, select "Reboot", and then "System"; the Honor logo will appear shortly
LineageOS 14.1 is now being initialized
Disconnect phone from PC
Profit!
I'll provide links to the images as soon as this forum allows me to.
Click to expand...
Click to collapse
Hi I want the same kind of tutorial for KIW-L22 also. I tried almost every methods to flash any custom ROM. But all ended up as a failure. WhatI did was, I was in KIW-L22C675B360 version of EMUI. I unlocked the bootloader the official way, flashed twrp as proposed by TWRP site (fastboot flash recovery my-twrp.img). I booted into recovery successfully. I BackedUp all my partitions (Thank god that I did this). Then I wiped my Data, Dalvik-Cache, Cache, System, Android Secure. Then I flashed the latest Lineage OS (lineage-14.1-20170816-nightly-kiwi-signed.zip) and flashed the latest Open Gapps nano. Then I rebooted. There was no problem with the installation. Then the boot animation started loading and I was waiting to see LineageOS. :crying: :crying: But all of a sudden, the boot animation freezes and the phone starts rebooting. This was happening all the time no matter how many times the phone rebooted. I thought it might be a ROM problem and i went back to twrp by holding power up when the phone rebooted. Wipes all as before and flashed certain other ROMs like AospExtended, MIUI 8 (PatchRom), etc but neither of them booted. I don't know what to do after that and I restored my old TWRP backup and now I'm on stock EMUI KIW-L22C675B360. I would be thankful if I get a solution to solve this problem. Waiting eagerly for answers.

Uvneshkumar said:
Hi I want the same kind of tutorial for KIW-L22 also. I tried almost every methods to flash any custom ROM. But all ended up as a failure. WhatI did was, I was in KIW-L22C675B360 version of EMUI. I unlocked the bootloader the official way, flashed twrp as proposed by TWRP site (fastboot flash recovery my-twrp.img). I booted into recovery successfully. I BackedUp all my partitions (Thank god that I did this). Then I wiped my Data, Dalvik-Cache, Cache, System, Android Secure. Then I flashed the latest Lineage OS (lineage-14.1-20170816-nightly-kiwi-signed.zip) and flashed the latest Open Gapps nano. Then I rebooted. There was no problem with the installation. Then the boot animation started loading and I was waiting to see LineageOS. :crying: :crying: But all of a sudden, the boot animation freezes and the phone starts rebooting. This was happening all the time no matter how many times the phone rebooted. I thought it might be a ROM problem and i went back to twrp by holding power up when the phone rebooted. Wipes all as before and flashed certain other ROMs like AospExtended, MIUI 8 (PatchRom), etc but neither of them booted. I don't know what to do after that and I restored my old TWRP backup and now I'm on stock EMUI KIW-L22C675B360. I would be thankful if I get a solution to solve this problem. Waiting eagerly for answers.
Click to expand...
Click to collapse
The problem is with the B360, you should have been on an update before b360

PalakMi said:
The problem is with the B360, you should have been on an update before b360
Click to expand...
Click to collapse
Now after flashing the rom, I flashed a zip called "BaPatch.zip" and after that Lineage booted successfully.

Uvneshkumar said:
Now after flashing the rom, I flashed a zip called "BaPatch.zip" and after that Lineage booted successfully.
Click to expand...
Click to collapse
Good to know :highfive:

@Et tu, Brute? : mate, I followed your instructions but the device ended up in bootloop. Any help?
m on twrp 3.2.2.0
Lineage OS v14.1 (29th Jun build)
Gapps 7.1 x64 pico

Related

Serious problem

Hello, XDA-Members,
long story short, I tried to flash CM-13 on my Honor 5X(KIW-L21 B340). Well, that didn't work and the phone always booted into TWRP. So I flashed FlymeOS because I couldn't flash the stock rom anymore(No matter why.).
It worked perfectly, and I were able to use my phone. After restarting my phone it booted back into TWRP, tried to wipe and all that stuff and even re-flashed Flyme OS, but still booted into TWRP. I was so UPSET that I deciced to flash the original RECOVERY.img for my Honor 5X. Well and from there I made it worse.
Windows and Linux don't recognize my phone. Windows just shows an empty E:\ drive. Reinstalled Google USB drivers, reinstalled driver etc. Didn't work. Now, when I start my phone it boots into the honor 5x recovery. I got these options available:
- Reboot system now
- Wipe data/factory reset
- Wipe cache partition
So, well. I can't install a rom anymore. As well when trying to connect my phone to ADB it won't work either. ADB doesn't recognize my phone. I made a big bull****, tbh. Installed HI-Care as well, but it doesn't get recognized either. I can also boot into Huawei eRecovery, connect to my wifi because it says it can download the stock rom. Guess what, it always said failed so I'm not able to do this either.
I'm really stuck. Anybody got an idea? Thanks in advance!
dunios said:
Hello, XDA-Members,
long story short, I tried to flash CM-13 on my Honor 5X(KIW-L21 B340). Well, that didn't work and the phone always booted into TWRP. So I flashed FlymeOS because I couldn't flash the stock rom anymore(No matter why.).
It worked perfectly, and I were able to use my phone. After restarting my phone it booted back into TWRP, tried to wipe and all that stuff and even re-flashed Flyme OS, but still booted into TWRP. I was so UPSET that I deciced to flash the original RECOVERY.img for my Honor 5X. Well and from there I made it worse.
Windows and Linux don't recognize my phone. Windows just shows an empty E:\ drive. Reinstalled Google USB drivers, reinstalled driver etc. Didn't work. Now, when I start my phone it boots into the honor 5x recovery. I got these options available:
- Reboot system now
- Wipe data/factory reset
- Wipe cache partition
So, well. I can't install a rom anymore. As well when trying to connect my phone to ADB it won't work either. ADB doesn't recognize my phone. I made a big bull****, tbh. Installed HI-Care as well, but it doesn't get recognized either. I can also boot into Huawei eRecovery, connect to my wifi because it says it can download the stock rom. Guess what, it always said failed so I'm not able to do this either.
I'm really stuck. Anybody got an idea? Thanks in advance!
Click to expand...
Click to collapse
Shut down the phone
plug the phone into your windows PC
hold volume down + power to enter the bootloader
from windows open the command prompt - type fastboot devices hit enter (your phone serial number will display)
type fastboot flash recovery TWRP.img (be sure to use this TWRP and it's named TWRP.img and in the same folder as fastboot)
after the file is flashed successfully hold power + volume up + volume down
after 5 seconds let go of power and continue to hold the volume buttons until TWRP boots
From TWRP you can now copy the CM13.zip and Gapps.zip to your phone and wipe/factory reset - then install them one by one
be sure their are no errors .. if you see errors choose reboot recovery and try the flash again until it succeeds.
first boot of cm13 will take some time, be patient
Thanks,
I recovered my phone. Awesome!

[GUIDE] [A2017G] Install TWRP, Unlock BL, Flash Custom ROM

<disclaimer> I take no credit for anything in this guide. A BIG Thanks goes out to @tennear, @Unjustified Dev, @DrakenFX and @Starvirus. They are the ones who figured out the process described below and provided the excellent LineageOS 14.1 ROM. I just wrote this all-in-one-guide because I think the information is way too cluttered and spread over these forums.</disclamer>
<disclaimer> If you're not 100% sure what you're about to do, please first scroll down to the bottom of this post to see a list of DON'T's, a few things you SHOULD ABSOLUTELY NOT DO if you want to keep using your device.</disclaimer>
After having had quite some phones (Moto Defy +, Oneplus One, Nexus 5x,...) and having flashed a lot of ROMs on them, I thought I had quite some experience in these matters. Alas. Unlike Oneplus, ZTE would rather not have users fiddling with their devices. There are also three versions of the Axon 7 called the A2017 (China), A2017G (Global) and A2017U (USA), each with some minute differences from the others. This makes unlocking BL, flashing a custom recovery and installing custom ROMs not so easy on this device.
The following guide describes how to go from a stock, not rooted, locked bootloader A2017G on Marshmallow Firmwares (B03 to B10) to an unlocked bootloader TWRP recovery LineageOS 14.1 A2017G. A2017U users, this guide should work for you too, but I hear there's an alternative, easier process exclusively for A2017U users. A2017 users do not proceed, this guide won't work for you. Users on stock Nougat, do not proceed, this guide won't work for you. You need to downgrade to Marshmallow first. Even A2017G or A2017U Marshmallow users must proceed with caution. There's always a tiny chance this process bricks your device. By following this guide, you will lose all your data on your internal memory. Please backup before proceeding. The data on your SD card should be safe.
A) Flashing TWRP Recovery to your device.
Q: Why do I need TWRP?
A: TWRP is a custom recovery system. It lets your backup your system in case anything goes wrong. It also lets you flash custom ROMs and zip files containing patches like viper4android or A.R.I.S.E. (audio) and root your device via SuperSU.
0) Boot up a windows computer with a 64bits processor. Verify your Axon 7 is charged at least 75%. Temporarily disable your antivirus software to allow axon7tool to work.
1) Backup all the data of your phone's internal memory that you don't want to lose. Copy it to your PC
2) Download the axon7tool from here: http://www.filedropper.com/axon7tool-15-win64
3) Download minimal adb and fastboot from here: https://www.androidfilehost.com/?fid=457095661767103465
4) Unzip the minimal adb and fastboot file, place the folder with the files in it somewhere you can easily find it
5) Place the axon7tool exe in the same folder as adb.exe and rename it to "axon7tool.exe" (it's easier to work with that way)
6) Download the TWRP .img and .bin files from here: https://drive.google.com/open?id=0B4UVMBVpYdVwcnlaZU1NRldoRjA
7) Place the TWRP .img file in the same folder as "adb.exe" and "axon7tool.exe", rename it to "recovery.img"
8) Make a copy of the "recovery.img" file and name it "recovery.bin". Leave it in the same folder
9) Go to settings in your phone and go to "About Phone". Tap "Build Number" 7 times to make the Developer Options available
10) Go to "Developers options" and tick "Allow OEM unlock" and "Android Debugging"
11) Connect your Axon 7 to your PC
12) Open a command window by holding shift and right-clicking in a blank space in the folder where the "adb.exe", " axon7tool.exe", "recovery.img" and "recovery.bin" files are located. Click "Open command window here"
13) Type "adb devices" and hit enter. You should see one device with some code listed
14) Type "adb reboot edl" and hit enter. Your device will reboot to EDL mode. It appears to be off, but it is in fact in EDL mode.
15) Go to Device Manager on your pc and verify your Axon 7 is listed as "QUSB_BULK"
16) In command, type "axon7tool -r gpt boot recovery" and hit enter
17) After it is executed, your phone will reboot. Wait until it has fully booted.
18) In command, type "adb reboot edl"
19) Verify you now have 3 backup files in your ADB folder for gpt, recovery and boot. These are backup files in case something goes wrong
20) In command, type "axon7tool -w recovery"
21) Wait until it finishes
22) Your phone should reboot
23) Shut down your phone and boot it to TWRP by holding both the power and volume up button to verify you have TWRP
24) TWRP might ask you for a password. If it does, simply tap cancel. It will ask you if you want to modify system. Swipe to agree
NOTE: if you have problems connecting to your phone as QUSB_BULK, download Zadig and replace your drivers with WinUSB ones. If axon7tool doesn't recignise your device even when connected as QUSB_BULK, try killing adb.exe via task manager before retrying.
B) Unlock the bootloader
Q: Why do I need to unlock the bootloader?
A: With an unlocked bootloader, you can install custom ROMs.
1) Go to https://mega.nz/#F!rcFCQZ7C!vn457hU1zDwc0uVpvm5otw and download the aboot.img file from there (1024Kb). Put it in the same folder you used in the previous process
2) Download this file: https://www.androidfilehost.com/?fid=529152257862665656
3) Unzip the file and copy/cut the file called "fastboot_unlock.img"
4) Paste that file in the folder where "adb.exe", "axon7tool.exe", "recovery.img", "recovery.bin" and "aboot.img" are located
5) If there's none open, open a new command window in that folder again (Shift + right-click and "open command window here")
6) Type "adb push aboot.img /sdcard/" and hit enter
7) Type "adb push fastboot_unlock.img /sdcard/" and hit enter
8) Type "adb shell dd if=/dev/block/bootdevice/by-name/fbop of=/sdcard/fbop_lock.img" and hit enter
9) Type "adb shell dd if=/dev/block/bootdevice/by-name/aboot of=/sdcard/aboot_lock.img" and hit enter
10) Type "adb pull /sdcard/fbop_lock.img" and hit enter
11) Type "adb pull /sdcard/aboot_lock.img" and hit enter
12) Type "adb shell dd if=/sdcard/fastboot_unlock.img of=/dev/block/bootdevice/by-name/fbop" and hit enter
13) Type "adb shell dd if=/sdcard/aboot.img of=/dev/block/bootdevice/by-name/aboot" and hit enter
14) Type "Adb reboot bootloader" and hit enter to go to the bootloader
15) Type "Fastboot oem unlock" and hit enter
16) Follow the instructions on your phone and use the volume and power buttons to confirm you want to unlock your bootloader
17) Boot into TWRP by holding both power and volume up button
18) Type "Wipe" and choose "Format Data"
NOTE: If you get a permissions denied issue, try doing these steps while your device is in TWRP.
C) Update bootstack, Install LineageOS 14.1 and update your TWRP to latest version
Q: Why do I need Lineage OS 14.1?
A: It's a custom ROM that's a lot smoother than any available stock rom for any of the Axon 7 versions. Aside from an audio bug (the speakers make a rattling noise when the volume is turned higher than 80-90%) it's perfect. You can however find quite some other decent ROMS here.
Q: Why do I need the latest TWRP?
A: Tenfar's signed TWRP version is the only one that will be accepted by a locked phone, so you need to flash that version first to unlock your bootloader. You should however not use it for backing up and restoring, since it contains fatal flaws that can lead to bricking your phone. Update it using the steps below.
1) Download the latest unofficial Lineage OS 14.1 ROM from here: https://www.androidfilehost.com/?fid=457095661767134540
2) Download the A2017G Nougat bootstack from here: https://www.androidfilehost.com/?fid=673368273298930583 (A2017U users: your bootstack is here
3) Download the latest TWRP .img from here: https://build.nethunter.com/twrp/zte/twrp-3.0.4-1-ailsa_ii.img
4) Download a Google Apps version from here: http://opengapps.org/?arch=arm64&api=7.1/ .You must use an ARM64 file since that is the type of the CPU in the Axon 7. You must use 7.1 Gapps since that's the android version Lineage OS 14.1. is based on. Which one you choose is up to you, the "smaller" you go the less google apps will be installed as stock. You can always download the ones you miss via the play store after having installed LineageOS
5) Put the bootstack, the LineageOS and the chosen Gapps zips on your MicroSD card. Also put the TWRP.img on there
6) Flash the A2017G Nougat bootstack: Flash -> select the bootstack file on the microSD card
7) Flash LineageOS 14.1, then flash the Gapps zip file (again via TWRP)
8) Update your TWRP recovery by choosing "Install" and then clicking "Install Image" (bottom right) and selecting the TWRP .img file
9) Wipe dalvik, cache and data
10) Reboot
11) Enjoy your phone
In the unlikely case that you're greeted by a screen that asks you for a password because your system is somehow encrypted, reboot to TWRP and format your data partition to ext4 instead of f2fs (wipe -> advanced)
If your phone doesn't pop up as QUSB_BULK in EDL, you probably installed the driver that came with the phone. The device will pop up below Ports (COM & LPT) on Device Manager as Qualcomm something-something USB device. Uninstall that driver and reinstall winUSB drivers through Zadig.
If axon7tool fails with a what() and STD-exception and whatnot - if you installed the Zadig driver
Go to Device Manager, right click QUSB__BULK and Uninstall, then use the "adb reboot edl" command. Install the winUSB driver via Zadig. Reboot the phone by holding the power button about 10 seconds. Enter the command adb reboot edl again. Enter "axon7tool -r gpt boot recovery" in command.
If LOS refuses to install and you get the error axon7.verify_trustzone, install the universal bootloader (A2017X_B15_UniversalBootloader) before the N Modem.
So, the steps after you get access to TWRO are: 1) Install univ. BL (A2017X_B15_... .zip); 2) Install A2017G_N_modem.zip; 3) Install LOS14.1 zip; 4) Optionally, install Gapps; 5) Flash TWRP img
DON'T's:
- DO NOT use the signed TWRP (3.0.2) to backup or restore, it might brick your device
- DO NOT use this guide when you're on locked stock nougat, you need to downgrade to Marshmallow first
- DO NOT flash the wrong N bootstack. There's a different version for G and U devices
- DO NOT use this guide if you're on an A2017 (Chinese) device
- DO NOT unplug your cable from your PC or Axon while axon7tool is doing it's magic
- DO NOT make a mistake or typo, it can be fatal
- DO NOT try flashing random zips or files or formatting this and that when your device doesn't act according to the guide, post your issue instead
- DO NOT wipe anything else than Data, Dalvik and Cache in TWRP
ADDITIONAL STEPS:
- You can opt to root your device by flashing the latest SuperSU zip file
- You can opt to upgrade your unofficial LineageOS to the latest official version to receive weekly OTA updates
First of all, thanks a lot for this guide! But I saw the TWRP image is actually for the A2017U version. I read in the forum that flashing this on the G-version could soft brick your phone.
So the question is, can I just flash this on my A2017G or is there even a version for the european model?
PsyJoe said:
First of all, thanks a lot for this guide! But I saw the TWRP image is actually for the A2017U version. I read in the forum that flashing this on the G-version could soft brick your phone.
So the question is, can I just flash this on my A2017G or is there even a version for the european model?
Click to expand...
Click to collapse
Both the aboot.img and the TWRP.img come from A2017U versions. For the moment, we do not know if there is any difference in the aboot file between A2017U and A2017G, but it's highly unlikely. @tennear sent me a tool to read the partitions on my A2017G and the result showed the partitions were the same as those in the A2017U model.
For the moment, there's only one TWRP version, made for A2017U, but it seems to work on all models. I quote tennear here:
tennear said:
Unpacking the TWRP image for A2017U, it says:
ro.product.model=A2017U
So this recovery seems to be specific to A2017U.
But unpacking the TWRP image for A2017 (China), it says:
ro.product.model=ZTE A2017U
Hmm, different but still A2017U.
I don't have the TWRP image for A2017G (yet), so I can't tell what it says. But given the above, and that the G and U models are almost identical, I am thinking the A2017U image will run on all devices.
Click to expand...
Click to collapse
I suspect nearly all bricks on A2017G devices happen when A2017G users use tenfar's tool to unlock the BL. There's a lot of margin for error, for example with the whole COM ports shizzle. I advise not to go down that route. I also advise against trying to flash a rooted image through TWRP without unlocking your bootloader. Especially the command "axon7root.exe -p 4 -b -r" (flashing both boot.img and recovery.img at the same time) seems to kill specifically A2017G devices, that seem to have an extra "DFU" mode, which the A2017 and A2017U devices don't seem to have. A2017G devices get stuck in that mode and there's no way to get them out again.
TL;DR I think the risk isn't in flashing TWRP, but in flashing both boot and recovery at the same time, in the axon7root tool and in flashing a rooted stock rom without unlocking BL.
Thank you for this one thread guide. Should make it a lot easier.
Maybe you can add a few words and links to the B03 files that allow a downgrade from higher versions.
You have a typo in step 14), should be adb not ab
Controllerboy said:
30) TWRP might ask you for a password. If it does, simply tap cancel. It will ask you if you want to modify system. Swipe to agree
Click to expand...
Click to collapse
Hi,
So, the backup can be restored, even if we cancel the password? Isn't the backup encrypted than?
Also, when we do swipe to agree to modify the system partition, is flashing SuperSU enough to gain root?
I'm not so much interested in installing a custom ROM (yet) but do want a safe way to gain root.
Thanks for your time and efford,
Edit: And all this is safe (step A) when on B08?
Cheers,
/Cacti
For twrp. It work fine, i just flash it on my 2017G and everything is good.
Just the lastest version of SuperSU didn't work. I use 2.65
Znuf said:
For twrp. It work fine, i just flash it on my 2017G and everything is good.
Just the lastest version of SuperSU didn't work. I use 2.65
Click to expand...
Click to collapse
Hi,
Thanks Znuf, I'll give it a go then.
Cheerz,
/Cacti
Controllerboy said:
15) Go to Device Manager on your pc and verify your Axon 7 is listed as "QDL_BULK"
16) In command, type "axon7tool -r gpt" and hit enter
Click to expand...
Click to collapse
*sigh*
My device manager (Win7 x64) lists my A2017G as QUSB_BULK (and no red led, just a black screen) after reboot to EDL and the axon7tool sais not connected.
Anyone knows whats up with that and how to solve that?
TIA,
Cheerz,
/Cacti
le_cactus said:
*sigh*
My device manager (Win7 x64) lists my A2017G as QUSB_BULK (and no red led, just a black screen) after reboot to EDL and the axon7tool sais not connected.
Anyone knows whats up with that and how to solve that?
TIA,
Cheerz,
/Cacti
Click to expand...
Click to collapse
Hi
I don't think "QUSB_BULK" is bad, nor the lack of the red LED. When I did the process on my device it also showed different states at different attempts. I also had to try multiple times before axon7tool detected it.
If I were you, I would try to shut down your device completely, restart and try to boot to EDL again by using command "adb reboot edl". Alternatively, you could try removing your device from USB, then shutting it down, then holding both volume buttons while connecting it to your PC. Some G devices don't boot to EDL this way, but some do.
Just keep trying multiple times. Axon7tool doesn't work in any other mode than EDL, so you can't do any damage by using the tool in a wrong mode.
Controllerboy said:
Hi
I don't think "QUSB_BULK" is bad, nor the lack of the red LED. When I did the process on my device it also showed different states at different attempts. I also had to try multiple times before axon7tool detected it.
If I were you, I would try to shut down your device completely, restart and try to boot to EDL again by using command "adb reboot edl". Alternatively, you could try removing your device from USB, then shutting it down, then holding both volume buttons while connecting it to your PC. Some G devices don't boot to EDL this way, but some do.
Just keep trying multiple times. Axon7tool doesn't work in any other mode than EDL, so you can't do any damage by using the tool in a wrong mode.
Click to expand...
Click to collapse
Thanks for the tips, I'll keep trying both methods.
Cheers,
/Cacti
le_cactus said:
Thanks for the tips, I'll keep trying both methods.
Cheers,
/Cacti
Click to expand...
Click to collapse
I give up. Or at least at this computer.
Just to be sure, the QDL_BULK/QUSB__BULK, shoild it be an unknown device, one with a yellow exclamation mark? Or should I install a driver for it, and if so where do i find it? Google didn't help me out today
I'll try another pc, see if that does work.
Cheers,
/Cacti
I think we've found your problem. There shouldn't be a yellow exclamation mark, your PC should really have drivers for your device. On my PC, this wasn't needed, but can you try to download and open Zadig?
When connected in EDL mode, search for your device by ticking the box "show all devices" (in one of the options dropout links in the top bar). You should see "QUSB_BULK" again. Select "WinUSB drivers" and install those. See if your PC recognises your device in EDL after doing that and try finding it with axon7tool. A reboot of your phone might be needed.
Hi,
i unlock my A2017G b06 with a slightly different way (Starvirus + draken FX TWRP) but i forgot to make a backup of stock rom before flash cm13.
Can you please make a clean one and share it.
Thanks in advance
Thanks for the description.
For your information. As you can see in tennears thread, you can short cut steps 16 - 22 to "axon7tool -r gpt recovery boot". This saves a lot of time and reboots.
Also, in the BL unlock steps, "wipe data" most commonly not enough. You need "format data".
Killerdog said:
I unlock my A2017G b06 with a slightly different way (Starvirus + draken FX TWRP) but i forgot to make a backup of stock rom before flash cm13.
Can you please make a clean one and share it.
Click to expand...
Click to collapse
Here's the file from DrakenFX: http://forum.xda-developers.com/showpost.php?p=68873485&postcount=3
Flash bootstack only once, then flash BO6 stock ZIP. In my experience it doesn't replace TWRP with stock recovery, even when you're not rooted.
DeJe63 said:
Thanks for the description.
For your information. As you can see in tennears thread, you can short cut steps 16 - 22 to "axon7tool -r gpt recovery boot". This saves a lot of time and reboots.
Also, in the BL unlock steps, "wipe data" most commonly not enough. You need "format data".
Click to expand...
Click to collapse
Thanks for the tricks. I didn't know you could do all three commands at once. I'll update my guide.
Will this work for B08 or should I go all the way back to "B03 (or others)" ??
Tutorial looks good and simple, big thanks!
In general it works.
For some reason I was not able to update from DragenFX B06 to OTA B08. So I flashed stock recovery, stock B06, OTA B08 and just flashed back TWRP with axon7tool...and it worked. But it may be that I make some mistakes on the way to B08.
I was at BL unlock before.
Controllerboy said:
I think we've found your problem. There shouldn't be a yellow exclamation mark, your PC should really have drivers for your device. On my PC, this wasn't needed, but can you try to download and open Zadig?
When connected in EDL mode, search for your device by ticking the box "show all devices" (in one of the options dropout links in the top bar). You should see "QUSB_BULK" again. Select "WinUSB drivers" and install those. See if your PC recognises your device in EDL after doing that and try finding it with axon7tool. A reboot of your phone might be needed.
Click to expand...
Click to collapse
Hi,
That worked flawlessly on my Win7 box, but I have general USB problems on that device. Got timeouts a few times during the axon7tool -r commands, so I don't dare doing a axon7tool -w command on that machine. So I stepped over to my Win10 x64 machine, but that machine it keeps identifying it as a "Qualcomm HS-USB QDLoader 9008 (COM3) device." :crying: axon7tool -r gives my a "Failed to connect"
Thanks for the help though, much appreciated.
Cheers,
/Cacti
I would agree that it's not a wise idea to write a custom recovery to a phone when the connection between the phone and the PC is unstable.
However, that doesn't solve your problem. Seems like your PC decided to install some drivers that are incompatible with the axon7tool.
Did you already try to uninstall the Qualcomm drivers via device manager and reconnect your device to pc? Did you try Zadig on your win10 machine?
There's a guide on the internet to (temporarily) disable automatic driver installation for new USB devices. Perhaps you could do that and then use Zadig to install WinUSB?
To be honest, if that doesn't work I don't really know other things to try. Except visiting someone you know with a Win7 64bit PC, that is
Controllerboy said:
I would agree that it's not a wise idea to write a custom recovery to a phone when the connection between the phone and the PC is unstable.
However, that doesn't solve your problem. Seems like your PC decided to install some drivers that are incompatible with the axon7tool.
Did you already try to uninstall the Qualcomm drivers via device manager and reconnect your device to pc? Did you try Zadig on your win10 machine?
There's a guide on the internet to (temporarily) disable automatic driver installation for new USB devices. Perhaps you could do that and then use Zadig to install WinUSB?
To be honest, if that doesn't work I don't really know other things to try. Except visiting someone you know with a Win7 64bit PC, that is
Click to expand...
Click to collapse
Thanks for the tips. I'll let you know how things work out.
Cheers,
/cacti

[HELP] DLOAD recovery broken

First of all, thanks for the great guides published here and all the work that went into them. They help resolve a lot of issues.
Unfortunately I encountered an issue today on my KIW-L21 that I can't find a solution for in the published guides. Today a stock update (installed via TWRP) got stuck on first boot and somehow managed to break the DLOAD recovery option (accessed by pressing Vol Up+Down when powering up the phone). Whenever I try to enter the DLOAD recovery mode now, the phone is not flashing the UPDATE.APP from the dload folder on the SD card anymore, but is showing an update screen (looks like a usb plug in a circle). This process stays on 5% for a while and then just reboots the phone into the regular system. So no option to recover from the UPDATE.APP anymore. Otherwise the phone still seems to be working fine.
Here's what I did to run into the problem:
- Successfully flash 5.1_EMUI 3.1_C432B140 firmware found in the Honor 5X repository on XDA via DLOAD recovery
- Flash TWRP (twrp-3.3.1-0-kiwi) via fastboot
- Download update to 6.0.1_EMUI 4.0_C432B350CUSTC432D003 via the regular update option
- After download the phone automatically booted into TWRP to install the update
- Reboot after TWRP flashed the update got stuck on boot and the DLOAD recovery got replaced by that update feature
Since then I booted into TWRP recovery again and installed AOSiP 9.0 + Magisk after wiping data/system/cache. This worked fine and AOSiP is booting and working correctly. The only issue now is that the DLOAD recovery did not get restored that way. That behavior stayed the same.
I tried eRecovery (reports an error after connecting to the wifi network, but this did not work before either) and stock recovery (extracted from B140 firmware and flashed via fastboot) without success. Both stock recovery options failed with an error message but did not provide any details regarding the issue.
Is the lost DLOAD recovery a known issue? Not sure if a partial update is stuck somewhere and needs to be deleted or if the DLOAD recovery function can be flashed via fastboot to fix this.
*** UPDATE 1
Here's some additional things I tried to fix the issue and that I noticed during those attempts:
- Recovery via HiSuite unfortunately does not seem to work. When booted into the bootloader HiSuite does not recognize the device. When booted into AOSiP, the phone is recognized, but the HiSuite app installed on the phone fails to work due to missing location authorizations. It doesn't ask for them though, just displays an error pop-up that leads to settings where I don't have the option to enable location access for the app. When manually checking the location permission for apps HiSuite is not among those that I can enable/disable this for.
- TWRP recovery can't be accessed from the phone despite flashing it via "fastboot flash recovery twrp.img". When launching recovery on the phone I end up in EMUI stock recovery. I can access and use TWRP via "fastboot boot twrp.img" though.
- I tried using the DLOAD update with the dload folder copied to the internal storage (local SD card). This did not change the phone getting stuck at a 5% update instead of the EMUI firmware flash.
- The local dload folder however seemed to have an impact on the stock recovery. While the stock recovery failed with an error before, it now gets the stuck at 99% done and a reboot just restarts the stock factory reset. I did find a way to exit this loop without waiting for the battery to drain (reboot with both volume buttons pressed into the update mode I don't want, reboot regularly once it stops on 5%) that got me back into a running/reset AOSiP.
- I can't boot into EDL mode via ADB (adb reboot edl). I was hoping HiSuite might help in that mode, but the command just rebooted the phone into AOSiP.
- The 5% update issue does not get resolved by disconnecting the phone from a cable during the operation. I read on XDA that this solved the issue for other HUAWEI devices, did unfortunately not work for mine.
- I noticed the bootloader does not show the FRP info anymore on the screen of the phone. It just shows "PHONE Unlocked". Not sure if that is important or just changed to this after unlocking the bootloader a few days ago.
The fact the flashing the recovery partition with TWRP does not seem to work properly suggests a partitioning issue to me. Is there a way to repartition the device and manually flash the relevant partitions via fastboot or some other tool?
If anyone knows how to fix the issue, a pointer in the right direction would be appreciated.
[SOLVED]
I finally managed to fix the issue by reverting to stock in several steps.
Tools required:
- Stock Firmware (I used the C432B140 I downloaded from the XDA Honor 5X repository)
- ADB/Fastboot toolset
- Huawei Update Extractor
- Stock firmware UPDATE.APP in dload folder on SD card installed in phone
1. I extracted BOOT.IMG, RECOVERY.IMG and SYSTEM.IMG from the full stock firmware
2. I rebooted the phone into bootloader (using command "adb reboot bootloader")
3. I flashed the stock recovery image (using command "fastboot flash recovery RECOVERY.IMG)
4. I flashed the stock system image (using command "fastboot flash system SYSTEM.IMG)
5. I flashed the stock boot image (using command "fastboot flash boot BOOT.IMG")
6. I rebooted the phone (using command "fastboot reboot"), this rebooted the phone in a stock B140 / B350 hybrid stock EMUI
7. I entered the ProjectMenu by entering *#*#2846579#*#* on in the phone app and chose "4. Software Upgrade" > "1. SDCard Upgrade" and confirmed that I want to perform the update.
8. The phone finally rebooted into the regular EMUI dload updater and reflashed stock firmware C432B140 to my phone
Afterwards the recovery from dload could also be started via Vol Up+Down when powering up the phone.
Hope this helps someone else fix the issue in case anyone encounters this.
I am facing a very similar issue on a KIW-L21 (running a custom ROM though).
Can anyone guide me to whether the steps presented can be modified to work coming from a custom ROM?

[GUIDE] Step by Step install for Android 10 from Stock Oreo

There are a number of generic installation guides for custom roms eg https://www.xda-developers.com/how-to-install-custom-rom-android/
However this one is specifically for the LG G6 and tested using the US997 model. It worked for me, but I welcome comments on how to improve it.
Create a folder on the PC for all the downloads and files
Download phone driver from LG website
https://www.lg.com/us/support/help-library/lg-mobile-drivers-and-software-CT10000027-20150179827560
Download ADB/Fastboot https://developer.android.com/studio/releases/platform-tools (You need to unzip once downloaded)
(I had an error "adb server version (31) doesn't match this client (41) killing". I searched my PC and found an older version which I had used for another phone and deleted the folders and reinstalled from the download)
Ensure the phone is backing up. (Google backup is working, you have all your photos music etc downloaded) the next steps will wipe the phone
Remove the PIN/Password/Fingerprints from the phone so it will boot without any security.
Unlock the bootloader
https://developer.lge.com/resource/mobile/RetrieveBootloader.dev
The phone will then reboot and do a complete wipe so you need to wait a while for Android to setup.
Telegraph has the latest news on LG G6 ROMs and Recovery. From here I got the links for SHRP recovery which seems more up to date for LG G6 than TWRP. (https://web.telegram.org/#/[email protected])
https://sourceforge.net/projects/pa-g6/files/Releases/SHRP/20.07.2020/US997/
I named the downloaded file "recovery" (You need the .img file not the ZIP)
There are lots of active ROMS for LG G6 I have Lineage installed on another phone which works really well, but Havoc seems the most popular on the G6.
Download the ROM and Gapps https://opengapps.org/ (I used Nano, remember G6 is 64bit)
You will also need to update the bootloader. This was the latest I found for the US997
https://androidfilehost.com/?fid=1899786940962575226
(I missed the bootloader the first time and Gapps will not flash, I was helped by the LG G6 community on Telegram https://web.telegram.org/#/[email protected])
Now you have downloaded all you need
Then connect the phone to the PC and ensured you have ADB debug on in developer options and boot the phone into fastboot
On the PC open a command prompt in the folder you have all the files:
adb reboot bootloader
To load the recovery to the phone :
Fastboot flash recovery recovery.img
YOU MUST NOW BOOT DIRECTLY TO RECOVERY. Do not reboot to Android as this will automatically reset recovery to the stock version.
Unplug the USB cable and reboot to recovery (hold volume down + power button).. continue holding until phone reboots...
As soon as you see the LG logo on the screen.. let go of the power button then quickly press it again (never letting go of volume down).
Keep holding until you see the Factory Reset screen. Click thru the factory reset screens using the volume buttons to move up/down and power button to select. Choose "Yes" twice (saying you want to reset the phone it should boot into your new recovery. Despite what the screen says it won't actually factory reset/wipe your data... as long as you've installed a custom recovery and have not booted into Android since then.
Most likely you will be asked the password to decrypt the data folder. I tried my phone PIN and other default passwords suggested on the internet. I eventually found that this is a known issue and you need for cancel out of this screen and go and "FORMAT DATA"
Reboot directly to recovery (select reboot recovery in Skyhawk), this time you should not be asked for the decryption password.
I recommend you backup your current setup before making changes. If you hit issues you can use the recovery to restore. My SD card slot is broken (Poor LG design) so I plugged a USB thumb drive into the USB C slot and did a full backup. (No data since I just formatted it).
Wipe the partitions before you flash
Full wipe ("The only option you ever need")
Select Advanced and wipe system partition.
FLASH (You need to put the ZIP files either on the USB drive as I did, or copy to your SD card, or you can use ADB sideloader from the PC to push the files to the phone). The USB drive seems the easiest since you can plug it into your PC to load the files then plug it into the phone to read them.
Flash in the following order
Bootloader
ROM
Gapps
After Installing wipe cache and Davik
Reboot
It will do lots of processing while setting up. Ensure it stays cool (remove case and leave it plugged in with the screen off)
Donate to the developer of your new ROM at the end when it works.
I have been running my LG G6 on Android 10 for a few weeks and thought I would share my observations, I am using Havoc 3.7 installed with Skyhawk, I did not root the phone.
Likes : Very smooth experience, phone feel like it is running much faster. Very stable, I had one surprise reboot in the time I have used it. No issues (so far) with installing or using any apps including banking. Much lower use of storage, I have 6GB free.
Same : Battery life is about the same as before.
Gaps : Cannot encrypt, VOLTE doesn't work (which may become a big issue for T-Mobile and AT&T soon), when being used the phone gets much warmer than it did before and the wifi setting randomly turns off.
Next Steps: I am going to try Lineage which has released some fixes for the WIFI issue and report back.
I'm trying to follow the instructions as per this guide for the tmo version of G6 (H87220g) and I'm running into a roadblock on the recovery flash:
[[email protected] tmp]$ mkdir skyhawk
[[email protected] tmp]$ cd skyhawk && 7z x ../SHRP_v2.3.2_us997-233920072020.zip
[[email protected] skyhawk]$ fastboot flash recovery recovery.img
Sending 'recovery' (36936 KB) OKAY [ 1.252s]
Writing 'recovery' FAILED (remote: 'unknown command')
fastboot: error: Command failed
Click to expand...
Click to collapse
I downloaded the Skyhawk zip from the PA download link, unzipped it and used the recovery.img file found inside the zip as part of the fastboot command. Is this incorrect ?
Yes, you need the recovery.img file to flash via fastboot. Have you successfully unlocked the boot loader? You cannot replace recovery without unlocking.
You also need to ensure you have the appropriate files for your phone I have a US997 but as you have H872 you would need skyhawk for the H872 in the notes above you are still using US997.
bootloader is unlocked as per:
https://forum.xda-developers.com/tmobile-g6/how-to/unlock-bootloader-tmo-t3578099
fastboot flash is failing and I'm not the only one it seems like based on comments here and reddit...
I gonna try out @runningnak3d guide and see if that works...
This guide is for the US997. The H872 has a much more complicated process to install recovery : https://forum.xda-developers.com/tmobile-g6/how-to/root-h872-to-including-11g-t3775518

H915 - Installing Lineage 18.1 (Unlock Bootloader, TWRP, Root Optional)

Hi All,
With the recent launch of LineageOS 18.1 I decided to take the plunge and get it installed on my fully stock Videotron/Freedom H915. Since I had to smash together info from a half dozen other threads, I figured I'd gather it all together here for folks with a Canadian phone trying to make this work.
Since I knew absolutely nothing coming into this, I'm going to go a little more detailed on this write-up. If you've been flashing ROMs since the old days of Cyanogenmod you can probably skim half of this.
Disclaimer : I'm not responsible for any bricked phones or other negative outcomes. This is what worked for me, but I'm far from being an expert. If you continue past this point you agree to take your time, do your reading, be responsible for your own device/actions and not hold me or the forum accountable for anything that might go wrong. You've been warned.
IMPORTANT NOTE #1
If you've picked up an H915 on ebay and you are intending to use it on a network other than the one it's SIM locked on, make sure you do the whole SIM unlock process on the stock ROM either before you get started at all, or once you've reverted to the vulnerable stock ROM after Step 1 below.
I actually use Telus as my provider and I wasted a bunch of time trying to figure out why I couldn't get signal because only the stock ROM will prompt you for a SIM Unlock code. Lineage will just sit there dumbly and not allow you to enable data.
Once you've unlocked the SIM it will stay unlocked from that point forward, just make sure to unlock it and verify your SIM is working with LTE on the stock ROM before you get started.
IMPORTANT NOTE #2
Use LGUP's "DUMP" feature to take a backup of ALL partitions on your phone before you start. If you're reading this thinking "I just bought this phone off ebay, there's nothing on it I care about", take the backup anyway. You never know when you might need a copy of the modem partitions or other things from your phone's original build. It came in super handy for me in troubleshooting the process. So go do a backup!
Current Issues:
If signal is too weak to connect to a tower (or non-existent), the OS tends to crash with a modem error. Still trying to figure this one out.
I think I can get this working without first jumping to US996 but haven't had a chance to verify that. If I do I'll update the thread.
Download Prerequisites
Links working as of 2021-06-29
LGUP with patch
Link
Working adb/fastboot environment
Instructions
Download
Fastboot Drivers
Link
Universal ADB Driver
Link
Videotron/Freedom H915 Android 7 (Nougat) version E - H91510e_00_VTR_CA_OP_1205.kdz
Link
USA General US996 Android 7 (Nougat) version F - US99610f_00_1205.kdz
Link
APK for Terminal Emulator
Link or Alternate Link
LG V20 Root Package Original (v4?)
Link
Old TWRP for Root Package
Link
Videotron/Freedom H915 Modem Partition Image
Link
Lineage Install Zip for H910 (grab the latest, I'm using lineage-18.1-20210506-nightly-h910-signed.zip which is already out of date)
Link
MindTheGapps
Link
(Optional, for rooting) Magisk
Link
Different Boot Modes
For those not familiar with these phones, there are three different "modes" the phone can boot into. Here's a quick reference on how to boot into each one.
Download Mode
This mode is used for pushing KDZ files or individual partition backups using LGUP
Turn Off Phone
Hold the Up-Volume Button
Insert USB-C Cable with other end already plugged into PC
Bootloader (aka Fastboot) Mode
The H915 doesn't come with this mode by default. If you try it, you'll just get battery charging. We'll be temporarily converting the phone to a US996 in order to use the DirtySanta exploit to replace the bootloader partition with a leaked Engineering aboot.
This mode is used with the fastboot tool to load the TWRP utility into the Recovery partition.
Turn Off Phone
Hold the Down-Volume Button
Insert USB-C Cable with other end already plugged into PC
Recovery Mode
The recovery mode on a stock phone is used to perform a factory reset. We will be using the Factory Reset a couple times with the stock ROMs, then replacing the contents of the recovery partition with the TWRP tool that allows us to format partitions, load partition images, and sideload apps and LineageOS itself.
Turn Off Phone
Hold the Down-Volume Button
Press and hold Power-On (rear fingerprint sensor/button). When LG Logo appears, release power button for 1 second then press and hold again
When "Factory Data Reset" appears, release all buttons
Press Volume Down to highlight "Yes" then press power button to select the option
Repeat for the confirmation
Note about flashing KDZ files using LGUP
You can flash KDZ files onto the phone using LGUP from two places - either with the phone in "Download Mode", or with the phone booted into the OS with the USB Options set to "File Transfer" and USB Debugging turned on.
The difference between these two is when it performs the OS compatibility check.
In Download Mode it's the code of the Download Mode partition that does the check. In the OS, it's the OS that does the check before booting to Download Mode and bypassing Download Mode's check.
Why is this important? Because when converting from one phone to another (Say, an H915 to a US996 like we do below), you initially can't flash the KDZ using LGUP's "Upgrade" function. You can only use "Partition DL" to replace the contents of partitions with the contents of the KDZ. This kind of works, but ends up with a phone that will sometimes identify as a H915 (in Download Mode) but sometimes identify as a US996 (in the OS). To clean it up, once you've done the Partition DL method, you can do it again from the OS and use the Upgrade method to get a really clean install.
It works going back the other way as well when you want to return to stock.
If this doesn't make sense, don't worry. You don't need to fully understand it to follow the instructions below, I just found it to be interesting info that didn't seem to appear in other threads.
Process Overview
Revert the phone to an old/vulnerable stock Nougat ROM for Videotron/Freedom Mobile
Enable Dev Options
Dump contents of US996 KDZ partitions over top of existing partitions
Cleanup by re-flashing US996 KDZ partitions over top of existing partitions
Transfer files to the SDCard and install Terminal Emulator
Unlock the Bootloader using the DirtySanta exploit
Boot to old TWRP and install new TWRP
Boot to new TWRP, install LineageOS, Google Apps, and flash modem partition image
Reboot to LineageOS
Actual Process
1 - Revert the phone to an old/vulnerable stock Nougat ROM for Videotron/Freedom Mobile
We need to be on Nougat for this to work, so if you're on Oreo you have to downgrade to Nougat before we begin. I chose a Nougat ROM for the H915 that's vulnerable to the DirtySanta exploit because I know it works and because I'm hoping in the future to be able to skip converting the phone to a US996 if possible.
Boot phone into Download Mode
Launch LGUP with Patch
Select "Upgrade" radio button
Select bin file : H91510e_00_VTR_CA_OP_1205.kdz
Click Start
When finished phone will reboot
1.5 - Do this if Step 1 Failed... Otherwise continue to Step 2
Depending on what's loaded on your phone when you start, it might complain about doing Step 1. This should allow us to bypass the issue and allow Step 1 to work. You can use this step if you've already converted the phone to another model as long as it's not bricked.
Boot phone into download mode
Launch LGIP with Patch
Select "PartitionDL" radio button
Select bin file : H91510e_00_VTR_CA_OP_1205.kdz
Click Start
Click the "Select All" partitions checkbox and click OK. When done it will reboot.
If it hangs or loops on reboot, boot into "Recovery Mode" (which at this point will Factory Reset the OS)
The phone boots into the OS
Quickly go through setup wizard. Skip as many things as possible.
Go Settings - General - About Phone - Software Info - Make sure it identifies as H91510e
Change the USB Option mode to "File Transfer"
Then repeat Step 1, but from inside the OS instead of in Download Mode
2 - Enable Dev Options and File Transfer Mode
We need these enabled after every time we flash the OS so that our LGUP and adb commands will work. You'll get used to doing these steps a bunch.
Quickly go through setup wizard. Skip as many things as possible.
Unplug USB-C cable
Swipe down from the top and change from USB Charging mode to File Transfer mode
Settings - General - About Phone - Software Info
Tap on Build Number many times until it unlocks Developer Mode
Go back 2 menus and enter the new "Developer Options" menus
Make sure "Enable OEM Unlock" is enabled
Enable "USB Debugging" (will be greyed out if USB-C cable is still attached)
Go back to main screen
Plug USB-C cable back in.
A pop-up will appear asking to Allow USB Debugging. Check the "Always Allow" box and tap OK
3 - Dump contents of US996 KDZ partitions over top of existing partition
The Videotron/Freedom KDZ has no Bootloader/Fastboot mode. If you try to enter bootloader mode you'll just end up charging the battery. So we have to cross-flash the US996 KDZ to get a phone with a bootloader which we can then replace with the engineering version using the DirtySanta exploit.
Boot phone into download mode
Launch LGUP with Patch
Select "PartitionDL" radio button
Select bin file : US99610f_00_1205.kdz
Click Start
Click the "Select All" partitions checkbox and click OK
When the phone boots back into the OS, repeat all of Step 2.
Note: If it asks for a password on startup, follow the "Boot to Recovery" steps and since
we don't have anything loaded in the recovery partition it will wipe/erase the phone
and remove the password.
4 - Cleanup by re-flashing US996 KDZ partitions over top of existing partitions
As mentioned in the "Note about flashing KDZ files using LGUP" section above, after you use the PartitionDL method you get a kind of dirty phone image that doesn't always identify as its new model. To clean up, we repeat the process in Upgrade Mode, taking advantage of the fact that at least the OS now identifies as US996 even if Download Mode doesn't. After this, Download Mode will also identify as US996.
Starting booted into the OS with a USB-C cable attached (File Transfer mode, USB Debugging on):
Launch LGUP with Patch
Select "Upgrade" radio button
Select bin file : US99610f_00_1205.kdz
Click Start
When the phone boots back into the OS, repeat all of Step 2.
5 - Transfer files to the SDCard and install Terminal Emulator
We will need some files on the SDCard in the phone in order to install them, either inside the OS (in the case of Terminal Emulator), or later on from TWRP. The Terminal Emulator will be used for the DirtySanta exploit so we need to get that installed now.
Make sure the USB Connection is set to Data Transfer mode and copy the following files to the SDCard:
APK for Terminal Emulator
twrp-3.5.1_9-0-us996.img
h915freedommobilemodem.img
Enable installing apps from unknown sources by:
Settings - General - Fingerprints and Security - Unknown sources (turn it On)
Install Terminal Emulator:
Tools - File Manager
Choose "Allow" when prompted
Click the up-arrow next to "Internal Storage"
Choose SD Card
Scroll down and tap on jackpal.androidterm-1.0.70-71-minAPI4.apk
Install
6 - Unlock the Bootloader using the DirtySanta exploit
The US996 KDZ has a bootloader but it's locked. In order to unlock it we need to use the DirtySanta exploit to give us permissions to replace the Bootloader/Fastboot with a leaked engineering version.
Starting booted into the OS with a USB-C cable attached (File Transfer mode, USB Debugging on):
Settings - General - About Phone - Software Info
Verify that Software Version lists as US99610f
Copy the twrp-3.0.2-1-us996.img file into the folder containing the LG V20 Root Package
Open a command prompt window and change to the folder containing the LG V20 Root Package and run "Step1.bat"
It will push multiple files to the phone and apply some patches/exploits.
This proces will take 5 minutes and put you out at an "elsa:/ $" prompt
At this "elsa:/ $" prompt in your command prompt window type the following:
run-as con
chmod 0777 /storage/emulated/0/*
On the phone, launch Terminal Emulator and run the following:
id
Verify that the string which comes back contains the string "context-u:r:untrusted_app".
If not, run Step1.bat again, else continue forward
Enter the follosing command into Terminal Emulator (be very careful to type it properly):
applypatch /system/bin/atd /storage/emulated/0/dirtysanta
If that command came back with an error, close and re-open Terminal Emulator and try again
The command should begin to patch another file. This will take 5 minutes and will return you to the "elsa:/ $" prompt in Terminal Emulator when it has finished
Open another command prompt to the same folder and run "Step2.bat"
This step will download backup copies of the boot and aboot partitions from the phone then boot the phone into bootloader/fastboot mode.
You'll know it worked if the first line at the top of the phone screen appears in red
In the command prompt window, run Step3.bat
It will flash boot1.img and the TWRP Recovery image multiple times then restart the phone
The phone will hang, no matter how long it's left. Wait 5 minutes (at least until the logo re-loads once) then do the following:
Unplug the USB-C cable
Remove the battery from the phone to turn it off
Replace the battery
Boot into Fastboot mode and run the following commands in your command prompt:
fastboot flash boot bootbackup.img
Remove the USB-C cable and battery to turn off the phone. Then replace the battery and enter Recovery Mode
The phone will show a big red exclamation mark saying "Your device is corrupt". This is normal. It will go away after a few seconds then boot into recovery. This error screen is the result of the engineering "aboot" image that was flashed to give us an unlocked bootloader and will always happen on boot.
7 - Boot to old TWRP and install new TWRP
The old version of TWRP recovery will load. Don't ask me why we can't just go straight to new TWRP above, it didn't work well when I tried it.
If it asks for a password to decrypt data, click Cancel
Swipe to allow modifications
Install - Select Storage - MicroSD Card - OK
Install Image - Scroll down and tap the "twrp-3.5.1_9-0-us996.img"
Select the Recovery partition and swipe to confirm flash
Back to main menu
Reboot - Recovery
8 - Boot to new TWRP, install LineageOS, Google Apps, and flash modem partition image
The new version of TWRP will load:
Check the "Never show this screen during boot again" box
Swipe to allow modifications
Wipe - Format Data - type "yes" to continue
This is likely to fail the first time. Repeat it to properly format the data partition.
Go back to Main Menu - Wipe - Advanced Wipe - Select "Dalvik / ART Cache", "System", and "Cache"
Swipe to wipe
Back to main menu
Advanced - ADB Sideload
Plug in USB-C cable
Swipe to start sideload
In command prompt window on PC type the following:
adb sideload lineage-18.1-20210506-nightly-h910-signed.zip
When complete tap "back" and "ADB Sideload" and swipe again to apply another file:
adb sideload MindTheGapps-11.0.0-arm64-20210412_124247.zip
If you want to root the phone (completely optional, not necessary for this process), now is the time to do it. Tap "back" and "ADB Sideload" and swipe again to apply another file:
adb sideload Magisk-v23.zip
Go back to main menu - Install - Install Image - tap the h915freedommobilemodem.img file
Select the Modem partition and swipe to confirm flash
Remove USB-C cable
9. Reboot to LineageOS
Go back to main menu - Reboot - System - Swipe to reboot
References where I got the info to make this tutorial
Official Lineage 18.1 for LG V20 Release Thread
LineageOS Wiki for H910
DirtySanta Bootloader Unlock and Root Guide (Original)
H910 Rooting Thread (Cross-flash H915 then DirtySanta to US996)
H915 Root, TWRP using DirtySanta [WorkingSignals]
Noob Friendly Root TWRP using DirtySanta
General info about Modem Hardware, Firmware, Radio Interface Layer
[Reserved]
thank you so much. i need it
Great job for writing a complete how-to guide!
Thank You, You saved my old V20 H915​
hi have you been able to find a better modem?
btw i'm not able to decrypt under twrp, can you?
Just want to confirm, it's only guide wich works for me. But I have issues with modem:
1. When I tried to change mode of modem, "prefered network type", phone stayed in the loop of the kernel panic "modem crash"
2. It were difficult to revert changes back. Finally, safe mode (in order to get it, you need to press volume up and volume down in the same time, during LinageOS booting process) helped me - when I disabled airplan mode, I had 2-10 seconds until next kernel panic. And in ~10 attempts, I were able to finally switch modem's mode to GSM/WDCMA/LTE
3. I used this phone 3 days, and once the kernel panic (because of modem) happened again
Any ideas what to do with modem? Also, the picture "Your phone is corrupt" is not fan Any ideas how to change it?
I did my best to follow all the instructions but after step 7's reboot I just get blocks full of static. I can tell it's trying to do fresh install setup though from what's peeking through the blocks.
Riot54 said:
I did my best to follow all the instructions but after step 7's reboot I just get blocks full of static. I can tell it's trying to do fresh install setup though from what's peeking through the blocks.
Click to expand...
Click to collapse
This is normal. Flash a kernel that's patched for dirty santa OR, cover the proximity sensor on boot and keep it covered until boot is complete.
That worked, thanks.
After multiple attempts going back and forth with step 6, I finally did it! I might switch to Lighthouse or Arros but I wouldn't have gotten this far without your guide.

Categories

Resources