[GUIDE] Unlock bootloader, root the device and install any custom ROM! (ALE-L23/21)

Did this work for you?

  • Yes

    Votes: 42 72.4%
  • No

    Votes: 16 27.6%

  • Total voters
    58
Search This thread

tralph3

Senior Member
Aug 16, 2016
146
63
Hi all! So, you have a P8 lite in your pocket and you hate EMUI? Well, that was my case too, it's uncustomizable, ugly, and removes plenty of features from android stock. I do not like it one bit, and I like even less the fact that this phone is getting no more updates, ever. This sucks, it all sucks, luckily we can say "F all that" and do whatever we want with this device, provided you follow this guide.

I am making this guide because I want to condensate every single thing I know about this device in one single thread. One big guide to help all of you out installing custom ROMs. Without this, you would have to do research along multiple threads, often with conflicting information, and what's even worse, DEAD LINKS! There's nothing more frustrating than finally finding the solution to your problem, just one download away, just to be greeted by a dead link, and you would need to scout for another file that may or may not work... ugly stuff.

So, the point of this is to bring up to date info so you can make this device rock. This guide assumes you have Huawei's EMUI 4.0 installed which runs on Android 6.0. I'm also assuming you have your bootloader locked, and I will explain how to unlock it FOR FREE. No need to pay to some shady site in order to access what effectively belongs to you.

These are the requirements for this guide:

Code:
#USB cable
#A PC
#Some charge on the device to ensure nothing goes wrong
#An SD Card
#Patience

Before beggining, a quick disclaimer:

Code:
#It's not my objective to break your device, however there's always a risk when doing these kind of things.
#When you follow this guide's steps your are accepting the risks and are taking full responsiblity for whatever may happen to your device.
#Don't blame me for breaking your stuff if that happens, all I'm listing here worked for me, and should work for you.
#I won't be babysitting anybody to help solve their specific problems, don't PM me asking me why X doesn't work.
#I am unaware if this works in other versions of this device, but I'm positive this works on both ALE-L23 and ALE-L21
#If you have a "CAM-XXX" device, it's highly likely this works for you too, but as with everything, TRY AT YOUR OWN RISK.
#YOU HAVE BEEN WARNED!

Ok, so let's begin. As the title says, the guide is applicable to any custom ROM. However, I will be installing Lineage OS 14.1 which runs on (almost stock) Android 7.1.2. Regardless, the final step where we install the custom ROM is interchangable, and you can use whichever you please.

This process WILL wipe all of your data (except SD card). Make sure to make a backup of everything you want to save (app configs, photos, videos and whatever else).

1. DOWNGRADING TO ANDROID 5

As you may know, Huawei has stopped providing bootloader unlock codes for very stupid reasons. This has led to many unable to unlock their bootloader and having to pay for third party apps in hopes they don't get scammed. There are some trustworthy sites where you can get these at a fee tho (mainly DC Unlocker at 4 bucks), so if you want to pay up to avoid having to downgrade to Android 5, you can do so. However, I understand that you may not want to pay at all, I didn't want to either.

To get the bootloader unlock code, we need root, and to get root, we need Android 5. Why? Because getting root in Android 6 requires us to flash some zips, and for that we need TWRP, and for that we need an unlocked bootloader, everyhing closes up very nicely. So, we have no choice but to downgrade.

An SD card is not needed for this process, but it is going to be required at a later point, so why not use it now too?

NOTE: It may be a good idea to make a factory reset at this point, to avoid issues. For that, do the following:

  1. Turn your phone off.
  2. Boot the phone by holding the power button and the volume up button at the same time.
  3. Wait untill the Huawei logo appears, then let go of both buttons.
  4. You should be in recovery mode, navigate with the volume keys to the "Wipe data/factory reset" option.
  5. Select it with the power button and wipe everything.
  6. Reboot the device with the option in the menu.
  7. Once the device has booted up, follow the guide.


Alright, once that's done, connect your phone to the PC to transfer some files:

NOTE: There's two Stock Android 5s downloads ("HW_Android_5_Transition.zip" and "HW_Stock_Android_5.zip"). One is a transition package, as the name implies, and the other is Huawei's EMUI 3.1 in all of it's glory. What's the difference? The transition package is a much smaller file that is designed to downgrade the phone from EMUI 4.0 (Android 6) to EMUI 3.1 (Android 5). If you are running EMUI 4.0 (which should be the case) then you can use the transition package which will take less to download. If you have another version (i.e. EMUI 4.1) you should use "HW_Stock_Android_5.zip". However, the latter is the safe bet. If you are not sure which one to use, use "HW_Stock_Android_5.zip". The process is exactly the same for both packages.

  1. Extract the "UPDATE.APP" file from "HW_Stock_Android_5.zip" or "HW_Android_5_Transition.zip".
  2. Navigate to your phone's internal memory or SD card (whichever you want to use) and locate a folder called "dload". If there's not one, create it.
  3. Put the "UPDATE.APP" file inside of the "dload" folder.
  4. Turn your phone off.
  5. Once it's off, press the power button and the two volume buttons until you see the Huawei logo.

That should make the phone recognize the "update" and start flashing it. Once it finishes, it will try to boot by itself, so pressing those 3 buttons was your last input until the phone boots into Android 5. It will take a long time for it to both finish and boot, don't be afraid, the phone is not bricked. If you think the phone is indeed bricked because it has been stuck at the logo screen for way to long (longer than an hour) then proceed to the "Unbricking" section of this guide. However, it's highly unlikely that this will happen, as Huawei checks the file before flashing it, so if it's incompatible with your device it should not do anything and boot again into Android 6 with everything untouched.

2. ROOTING ON ANDROID 5 AND EXTRACTING BOOTLOADER UNLOCK CODE

Once you are in Android 5, we will need to root the device. Download KingRoot (proved to work) or another one click root app of your choice. I'm aware of KingRoot's bad reputation because of the spyware accusations, but the phone will be wiped anyway and we are sure it works, so it doesn't really harm at all. If you still don't want to use it, check with other apps, I haven't done so myself so I don't know what else works.

Once your phone is rooted, we will need to use the terminal for the first time. We will need to setup ADB and Fastboot, if you already have that, skip this step.

  1. Extract the "platform-tools" folder from the zip and place it somewhere nice.
  2. Shift right click on a blank space INSIDE of the "platform-tools" folder.
  3. Select "Open command window here".

This should be enough to get ADB working, but we need to make some config on the phone itself too.

  1. Go to Settings -> About Phone
  2. Look for a line that says "Build Number" and tap it multiple times.
  3. When the message saying "You are now a developer" pops up, go back and enter the new "Developer Options" menu.
  4. In there, look for an option called "USB Debugging" and turn it on.
  5. Connect the phone to your PC via USB cable.
  6. A message should have popped up on the phone asking for permission to use USB Debugging, tap on "Always allow from this PC" and then on "Allow".

NOTE: If the message doesn't pop up, you can try a number of things. I prefer to tap the "Revoke USB debugging authorizations" button to ensure that no PC is authorized, so the message must pop up at some point. Once you revoked authorizations, disconnect and connect the phone again, if you still don't see it, try to select MTP as the transfer protocol. If not, then PTP, if you still don't see it install Hi Suite on your PC and open it, it should pop up now.

Once you have everything working, type the following in the terminal in your PC:

Code:
adb devices

If you see a serial number there, that's your phone, and that means everything is set up correctly (make sure you don't have any other device attached to your PC, or you could confuse the two and make bad stuff happen for that other device). If you don't see it, make sure USB Debugging is enabled. You can try to use different cables if you still have problems. Now type:

Code:
adb shell

And then:

Code:
su -c "grep -m1 -aoE 'WVLOCK.{14}[0-9]{16}' /dev/block/mmcblk0p7 |grep -aoE '[0-9]{16}'"

KingRoot (or the app you used to root) should prompt you (in your phone) if you want to give ADB root access, make sure to allow it to make this work. This should give you your unlock code. SAVE IT INTO A TXT FILE AND COPY THAT FILE TO ALL OF YOUR PCS, ALL OF YOUR CLOUD ACCOUNTS AND ALL OF YOUR MOBILE DEVICES.

(Maybe the terminal gets stuck at this point, press CTRL + D (or C) to get it unstuck).

Seriusly tho, it didn't happen to me, but it is a possibility that your Bootloader can re lock after doing some of the things that follow, in which case you will need to unlock it again, and if you don't have that code... it's back to square one.

3. GOING BACK TO ANDROID 6

Now that we have done all that we wanted on Android 5, it's time to go back. The process is exactly the same.

  1. Extract the "UPDATE.APP" file from the "HW_Stock_Android_6.zip" file and move it to the dload folder (SD card or Internal).
  2. Turn off your phone and turn it on again with all three buttons pressed.
  3. Wait.
  4. ???
  5. Profit.

So, we're back on Android 6. Why did we go back you may ask? Why did we not just flash our precius custom ROM? Well, for once, this gives people the chance to stay on EMUI if all they wanted was to unlock the bootloader and maybe root on Android 6 (which I will explain how to do too, in case you want to). Another, more important reason, we need Android 6 to install the B895/B896 update, which is a requirement for any custom ROM (mainly Android 7.0+) if you don't want any problems with your SIM card (and others that may arise).

4. UNLOCKING BOOTLOADER AND FLASHING TWRP

Now, we need to turn on USB Debugging again, and to allow our PC... again. Do so, and check that everything is right with:

Code:
adb devices

If that's the case, then type the following:

Code:
adb reboot bootloader

Your phone will reboot, and you should see a white screen with a wasted android above a green text saying "PHONE LOCKED". If that's the case, take a moment to say goodbye to that green text, because it will soon turn very red. We will need to unlock the bootloader with the code you got from the previous steps, for that type the following:

Code:
fastboot oem unlock ****************

In place of the "****************" you must enter your code, of course. And that was it, now the green text is replaced with a red "PHONE UNLOCKED". This are good news. Now, we need to flash our custom recovery if we want to do anything fancy with the device. For that, extract the "recovery.img" file from the "TWRP_3.1.1.zip" file and paste it into the same folder where all of the ADB files are located (where "adb.exe" is). Now type:

Code:
fastboot flash recovery recovery.img

This will flash TWRP into your device, hooray! Now type:

Code:
fastboot reboot

And your device should turn back on, today is a bright day my son. Now you must take a decision, do you want to flash a custom ROM and get very nice and fancy features or do you want to stay with what you have? If you prefer Huawei's EMUI 4.0, then follow to the next step. If you want to flash custom ROMs, then skip the next one.

5. ROOTING ON ANDROID 6 (OPTIONAL)

I don't know why you would prefer EMUI over... anything else really, but it's your call. I'll tell you how to root it so you can at least take some advantage of it. You see that file called "HW_Android_6_Root.zip"? Extract it, inside there will be... another folder called Root... huh? Redundant. Anyway, inside of that there should be two zips. 1.zip and 2.zip. You will need to place the folder called "Root" inside of your SD card or your internal storage. Then, go back to the terminal and type:

Code:
adb reboot recovery

You should reboot into TWRP, isn't it nice? Anyway, we have to flash some zips! Go to "wipe" first and wipe the "Cache" partition and the "Dalvik" partition. Once that's done, go to install and navigate to the Root folder your placed... well, you know where. Select 1.zip and flash it, once it's finished reboot the device. If TWRP prompts you to install it's app, DO NOT DO IT. Once the phone has rebooted (it will take longer because of the cache and dalvik wipe), repeat the process but flash 2.zip this time, reboot and your phone should be rooted. This is the end of the line for you now, as you don't want to make anything else to the phone. However, you can go to the final chapter where I explain how to install Xposed framework, if you want more customization. EMUI doesn't like Xposed very much, so there's little you can do with it, but it's something I guess.

6. INSTALLING THE B895/B896 UPDATE

So, you followed the power user path, the one we all really want deep down. That's cool, I respect you. We gotta use that custom recovery we just flashed, but first we need to transfer some files into our phone's memory. We need to install an update to the phone, for which you need Android 6 (that you should already have anyway). There's two different updates, B895 and B896. As you may guess, B896 is newer. However, any of these two will (or rather should) work without issues. I personally used B896, but some people claim B895 is more stable. I can't find a difference really, but the process is the same regardless of which you choose. Once you have made that decision, move "B895_update.zip" or "B896_update.zip" to your phone's internal storage or SD card AS IS (don't extract it). Then type into the terminal:

Code:
adb reboot recovery

You should be in TWRP now. Go to wipe and select the "Cache" and "Dalvik" partitions ONLY, then wipe them. Once that's done, go to install and flash your update of choice. Once finished, reboot the device. If TWRP prompts you to install it's app, DO NOT DO IT. The boot should take longer than usual because of the "Cache" and "Dalvik" wipe... and because of the update too. Once booted, you should be in EMUI 4.1. Go to settings and into "About Phone". In there, look for a field called "IMEI". If you see a number, that means you did everything properly, if you see "unkown" or nothing at all, then that means you lost your IMEI... which means you will have connectivity issues. To fix this, you will need to do a full wipe (so, boot into recovery (we lost TWRP due to the update) and then go to wipe, in there select everything except SD card) and follow the steps again starting from 3, this time flashing the other update (so if you flashed B895, flash B896 this time and vice versa)).

Now, this last step we made has wiped our custom recovery... so sad. We have to flash it again, but we are almost finished!! Now it's time for you to move the custom ROM you want to your SD card (SD card is mandatory, as we will wipe internal storage). You should also move your custom ROM of choice. If you want root, also move the "SuperSUv82.zip" file.

OPTIONAL:

If you want Gapps, that means the Google apps, so PlayStore, Google services and such (and you really should want them, as Android without PlayStore is kinda rough), then you need to download them separately.

So, go to the Gapps website and select the pacakge you want. You NEED to choose the ARM64 platform, the android version depends on the ROM you are flashing, so check which version it runs, and the package itself is personal preference. Here you can see a comparison of each package, detailing what each one contains so you can make a decision. The aroma package is kinda bugged, I would avoid it. Choose wisely, as flashing another Gapps package once you have flashed a different one can and most likely will cause issues. If you want my opinion, I would stick to the nano package. It offers the basic Google functionality and allows you to download other Google apps you may need/use with the PlayStore once you are booted up.

Once you choose your package, move it to your phone's SD card along with the ROM and the SuperSU zip if you want it.


Check that USB Debugging is still enabled, and then type:

Code:
adb reboot bootloader

Once into the bootloader, flash the custom recovery once again with:

Code:
fastboot flash recovery recovery.img

Then:

Code:
fastboot reboot

Once booted up again, type:

Code:
adb reboot recovery

And now it's time to drop the bomb, say bye bye to EMUI, and say hello to... whatever it is you are installing.

7. FLASHING YOUR CUSTOM ROM OF CHOICE

MOST CUSTOM ROMS REQUIRE AN LTE CAPABLE SIM IN ORDER TO HAVE CELLULAR NETWROK WORKING CORRECTLY, THIS DEPENDS ON A ROM TO ROM BASIS, DO YOUR RESEARCH BEFORE FLASHING

Once in TWRP, go to wipe and check every box, I'm serius, check everything except the SD card. Once that's finished, the moment of glory has come. Go to install and flash your ROM. It will take a while, and when that's done reboot. The phone should boot into your ROM. If you want either Gapps or SuperSU, make a quick setup and enable USB Debugging again, then reboot to recovery with:

Code:
adb reboot recovery

Once in TWRP, go to install and flash the Gapps package and the SuperSU zip (in that order) if you want it. Reboot. That should be it! You are done!

8. UNBRICKING

I don't know why, but with all the flashing and the testing I've done you would have thinked that I should have suffered of a brick state at least once... that was, luckily, not the case. I haven't suffered a single brick. I don't know if I'm extremely lucky or if this phone is tremendously resilient, but the case is I haven't had any issues of this kind.

However, I can understand that it is a possibility, so if this happens to you my best advice is to do the following: Boot into recovery mode (either stock or TWRP depending on where in the whole process you got stuck), make a full wipe and apply the update from "HW_Stock_Android_6.zip" with the dload folder and the three buttons method. That should get it unstuck, if not... try the same with the "HW_Stock_Android_5.zip" 's "UPDATE.APP".

9. INSTALLING XPOSED FRAMEWORK (OPTIONAL)

What? A custom ROM is not enough for you? Getting freed from EMUI is not enough? Well fear not then, because there's one last step for the true power user, for that man who thinks that everything is not enough, the good old Xposed Framework *queue fireworks and trumpets.

So, you need to install the Xposed Installer apk. Get it from here, and ONLY THERE. I once installed an apk from another source... ended up being adware, not fun. The apk is at the very bottom of the thread. You will also need the framework itself, get it from here.

Get the latest (arm64) version for your ROM. This depends on what Android version it is running on:

Code:
SDK21 = Android 5.0
SDK22 = Android 5.1
SDK23 = Android 6.0
SDK24 = Android 7.0
SDK25 = Android 7.1
SDK26 = Android 8.0
SDK27 = Android 8.1

You should also get the uninstaller in case things go south.

Once you got the files, install the apk on your phone. Open the app once. Transfer the framework and the uninstaller into your SD or internal storage. Boot into TWRP recovery and install the framework, reboot the device.

NOTE: Android 6.0 takes about 20 mins to boot, wait about an hour before deciding that it's bricked. Android 7.1.2 took me about 2 mins. I'm unaware of the boot times of other versions, but be aware that it can take LONG. If you think it really got bricked, boot into TWRP again and flash the uninstaller. That should get it unstuck and you can either try again or leave it as is.

----------------------------------------------------------------------------

Well guys, that's all I got, quite a big write up huh? I don't really have nothing else to say, just remember that what you are doing here is at your own risk and I don't want anybody blaming me for the bad things that can happen. I will proceed to leave you with the download links so you can try this yourself. I'm currently running Lineage OS 14.1 which features Android Nougat 7.1.2 on my Huawei P8 lite ALE-L23, I've never been happier to be free from the manufacturer's ROM.

DOWNLOADS

(The B895 and B896 update's links are not mine)

Huawei's Stock Android 5:
Android Filehost
Mediafire

Huawei's Android 5 Transition:
Android Filehost
Mediafire

Huawei's Stock Android 6:
Android Filehost
Mediafire

Huawei's Android 6 Root:
Android Filehost
Mediafire

EMUI 4.1 (B895):
Android Filehost

EMUI 4.1 (B896):
Android Filehost

Platform-Tools:
Android Filehost
Mediafire

TWRP 3.1.1:
Android Filehost
Mediafire

Gapps:
Open Gapps

SuperSU:
Android Filehost
Google Drive
 
Last edited:

ilmatte

Member
May 10, 2015
14
2
Samsung Galaxy S6
Hi,
I didn't understand what do you mean whan you write: Once booted, you should be in EMUI 4.1. If you retained your IMEI, you are in good path, if not... then do a factory reset (wipe everything) and repeat the steps starting from 3.
Could you explain it better?
Thank you
 

tralph3

Senior Member
Aug 16, 2016
146
63
Hi,
I didn't understand what do you mean whan you write: Once booted, you should be in EMUI 4.1. If you retained your IMEI, you are in good path, if not... then do a factory reset (wipe everything) and repeat the steps starting from 3.
Could you explain it better?
Thank you
Yes, it's basically this: If you go into the "About Phone" section you will see that there's a field detailing your IMEI. I won't lie, I don't know exactly what it is, but it's a unique number for every phone and has something to do with your cellular network connection.

If you messed up at some point, you can lose your IMEI (i.e. you won't see it in that field or it will say "unknown" or something of the sort). If that happens, then it means you did something wrong, and proceeding in this state will make you have problems with your connection. The signal would be really unstable and it would be practically unusable.

To make a simpler check, if you have a cellular network connection, and can make calls and send/receive SMS on EMUI 4.1, then you won't have any problems.
 

ilmatte

Member
May 10, 2015
14
2
Samsung Galaxy S6
Ah ok it wasn't so clear but I know what an imei is :D luckily it didn't erase it in my case. Anyway, I don't know how to thank you bro! You saved my life. I beleived to be screwed when I learned that Huawei stopped releasing the bootloader unlock code. How stupid they are. I blamed them through the customer support. I'm running lineage now! Kiss my ass Huawei! :p
 

tralph3

Senior Member
Aug 16, 2016
146
63
Ah ok it wasn't so clear but I know what an imei is :D luckily it didn't erase it in my case. Anyway, I don't know how to thank you bro! You saved my life. I beleived to be screwed when I learned that Huawei stopped releasing the bootloader unlock code. How stupid they are. I blamed them through the customer support. I'm running lineage now! Kiss my ass Huawei! :p
Glad to hear I helped! Mind dropping a thank on the main thread? Hope you enjoy your phone ;)
 

BelisTT

New member
Jun 25, 2017
4
3
Thanks <3 -notes

Thank you tralph3, you make my life so easy, great easy guide. I have a few suggestions for improving clarity:
  • Step 1. "Stock_Android_5.zip" contains "transitional" android 6.0 ALE-L21C900B500 firmware According to including Spanish documentation "3., 3.1 Download the Android5.0 update package" It must be downloaded another 5.0 firmware. I use this 5.0 firmware to make kingroot preform root.
    Firmware: huaweidl.com/download/p8-lite/ale-l21/b204/


  • Look for a line that says "Compilation Number" and tap...
    Step 2. second point 2. Change to "Build Number"

  • su -c "grep -m1 -aoE 'WVLOCK.{14}[0-9]{16}' /dev/block/mmcblk0p7 |grep -aoE '[0-9]{16}'"
    Step 2. getting unlock code. After executing command. Add step -Kingsroot display root access prompt ALLOW it.
t
Thanks for your work.
 
  • Like
Reactions: tralph3

tralph3

Senior Member
Aug 16, 2016
146
63
Thank you tralph3, you make my life so easy, great easy guide. I have a few suggestions for improving clarity:
  • Step 1. "Stock_Android_5.zip" contains "transitional" android 6.0 ALE-L21C900B500 firmware According to including Spanish documentation "3., 3.1 Download the Android5.0 update package" It must be downloaded another 5.0 firmware. I use this 5.0 firmware to make kingroot preform root.
    Firmware: huaweidl.com/download/p8-lite/ale-l21/b204/



  • Step 2. second point 2. Change to "Build Number"


  • Step 2. getting unlock code. After executing command. Add step -Kingsroot display root access prompt ALLOW it.
t
Thanks for your work.

Thanks for pointing this stuff out, I'll make those changes you suggested and try to fix some typos too. So, what I gather from what you told me about that Android 5 thing is that in order to correctly flash the update I'm providing you NEED to be in Android 6, right? Whereas with the one you are providing me it should boot into Android 5 regardless of what you currently have. If that's the case, I'll include both and tell people of the distinction between the two so they can use the one they want/need (after all, the transition package is much smaller and easier to download). I'll download the package and upload it to Android Filehost along with everything else. I think I'll keep the mediafire downloads as a mirror. I'll get to that, thanks.
 

Badoolo

Member
Oct 6, 2019
8
1
Does this also work for the PRA-LX1 version?
I have Android 8.0 on it and absolutely no idea what EMUI version or eben the firmware version.

I want to put crDroid on this phone because EMUI ... you know, it's bad.

Otherwise: I am ok with paying these 4€ if this payed unlock works.
WHICH of all these DC Unlocker Apps do I need for getting the unlock code?
 

tralph3

Senior Member
Aug 16, 2016
146
63
Does this also work for the PRA-LX1 version?
I have Android 8.0 on it and absolutely no idea what EMUI version or eben the firmware version.

I want to put crDroid on this phone because EMUI ... you know, it's bad.

Otherwise: I am ok with paying these 4€ if this payed unlock works.
WHICH of all these DC Unlocker Apps do I need for getting the unlock code?


DON'T TRY ANY OF THIS. All of what I've detailed is for the P8 lite 2015, your phone is a different 2017 version that's basically another completely different phone with the same name, because Huawei doesn't know how to namr their devices. You have a different chipset, doing anything of what's described here will most likely brick your phone. With that said, maybe the bootloader unlock method works IF YOU FIND ANOTHER WAY TO ROOT YOUR PHONE. DON'T ROLL BACK TO ANDROID 5 WITH THE FILES I'M PROVIDING PLEASE.

This forum is dedicated to P8 lite 2015, you can see there's a different forum for 2017. Good luck.
 

Ax1qwer

Senior Member
Feb 25, 2013
788
374
Hello, I have ALE-L21 with EMUI 4.0.3 - MM 6.0 - version B633 and i can not downgrade to android 5, phone says : update failed, or stuck on 5%. could someone help me please ?

I tried a lot of stock ROMs, 5.0 , 6.0 etc, nothing worked for me.

Thanks,
 

tralph3

Senior Member
Aug 16, 2016
146
63
Hello, I have ALE-L21 with EMUI 4.0.3 - MM 6.0 - version B633 and i can not downgrade to android 5, phone says : update failed, or stuck on 5%. could someone help me please ?

I tried a lot of stock ROMs, 5.0 , 6.0 etc, nothing worked for me.

Thanks,
Are you using the stock package or the transition package? If you are using the transition package, try stock.
 

Ax1qwer

Senior Member
Feb 25, 2013
788
374
I tried both, with no success. And many others.

I tried to update via internal storage and SDcard too, with no success.

If phone is connected to pc, updating stuck on 5%, if not connected to PC, update fails.
 
Last edited:

tralph3

Senior Member
Aug 16, 2016
146
63
I tried both, with no success. And many others.

I tried to update via internal storage and SDcard too, with no success.

If phone is connected to pc, updating stuck on 5%, if not connected to PC, update fails.
Did you wipe all of your data with the stock recovery? If nothing works then I could suggest you to try to apply the downgrade with sideload. (Boot into recovery and select to apply update from adb, then you type adb sideload <filename>)

I'm clueless on why it doesn't work on your device, it should.

Also, you can try to flash the stock android 6 rom first, that's an older emui version (4.0). If you can flash that, then maybe you can flash android 5 after it.
 

Wazu786

Member
Oct 19, 2019
12
5
i have tried intalling both the 5.0 stock roms but it always fails at 5%. i got ALE-L21C02B896 with emui 4.1 and android 6.0. i've been trying different guides but all lead me to dead ends. please help
thanks in advance
 

razorfancy

Senior Member
Apr 19, 2013
258
66
Porto
i have tried intalling both the 5.0 stock roms but it always fails at 5%. i got ALE-L21C02B896 with emui 4.1 and android 6.0. i've been trying different guides but all lead me to dead ends. please help
thanks in advance

I have the exact same firmware(ALE-L21C02B896) that you have and I also cant downgrade to android 5.0 using any of the tutorials that I found in XDA Furum.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    So I recently 'lost' my HTC One E8. Its battery turned into a spicy pillow, and I had it removed. Sadly I couldn't buy a new battery for it, so it's currently residing in my drawer. It was a good phone, and was really fun to work on, like putting in custom roms and recoveries. Anyway, I had to get a replacement phone. In my profile you can see my device inventory. The Nokia 5.1 was a candidate, but the charging port was funny and it was really slow with its built in Android 10, and Nokia made it impossible to downgrade. So that was out of the question. The Nokia 1 was actually ok, no issues with it, but I eventually picked another phone (The Hauwei P8 Lite), since it was a little small, and perhaps slow, for my tastes. Then there was the LG K8, which I actually used before switching to my HTC One E8. Sadly, its charging port was also funny and its Android version (6.0) was to old for my use case, and the lack of custom roms didn't help. The Samsungs were not my phones exactly, so they didn't count. The Oneplus 3... My goodness, what a shame. It is bricked (not by me I found it in a bin XD), and I tried everything to make it work, but nothing worked. I am not giving up on it, but damn man.

    That leaved one choice... The Hauwei P8 Lite! It had no problems, and while it had Android 6, which again, was to old for my use case, it actually had good custom roms available! Perfect!

    I eventually settled on https://xdaforums.com/t/rom-8-1-stable-lineageos-15-1-for-p8-lite.3928723/, since it seemed stable enough from all the newest comments in that post. And it was also Android 8.1, which was as low as I was willing to go (and as high as I was willing to go as well).

    And then I found your guide. And my goodness what a good guide!

    So you might be asking, "Why the heck are you replying with such useless information?!? What does this help with?!?" And to that I answer, while the guide was pretty good, there was many problems that I had to solve on my own, and I am going to say what I did to make this phone work, for all the people coming here, wondering how to fix [insert random issue here].

    So, here we go!

    Problem 0.5: The Erecovery not having a factory reset option
    Yeah idk either, wasn't really a problem, since I just did it from the phones settings, but weird either way.

    Problem 1: Downgrading to Android 5
    This one was pretty funny, since when I first tried it, it either got stuck at 5% or gave an error. Then one error pranked me, since it seemed to be actually working at first, no errors, no getting stuck at 5%. Then, when it completed, the truth settled in... Literally nothing changed. I rage quit for a few hours and tried again. All I did different was absolutely nothing, I did the same thing as when I first started, putting stock Android 5 onto my SD card, and then doing the 3 button press. And it worked for some reason. I still don't know wtf changed for it to work, but hey, all I care about is that it worked. The only theory I got is that I did a double format of my SD card, and did a double factory reset of my phone.

    Problem 2: The rooting process
    So when I finally downgraded to Android 5, it was time to get KingRoot. It didn't work. I reinstalled it a few times, and got it from different sources, but nothing worked. It gave a network error, for those wondering. I eventually got something else called Kingoroot ( https://www.kingoapp.com/ ), and it got stuck at 90%, but when I exited the app and went back in, it was magically rooted, as if 100% didn't exist. Idk either. But hey, it was rooted!

    Problem 2.5: USB Debugging permission message not coming up
    Was weird, but the 'adb devices' command worked, so it didn't seem to matter. Also it eventually appeared a little later.

    Problem 3: Bootloader driver issue
    The rooting process went quite well, and I managed to get the unlocking code, although the shell command that gave it to me was a little bit silly. I got it working by ctrl + v the command and pressing enter a few times. I already got adb & fastboot ++ set up, so that was good too. And downgrading back to Android 6 went smoothly.
    The bootloader part is where problem 3 comes in. When I typed in 'adb reboot bootloader', it worked fine, but when I tried 'fastboot devices', no device showed up, and when I tried to give the phone my unlock code, nothing happened. I tried to exit the bootloader by pressing the up button a lot (as it said), but that didn't work. I eventually found out that holding the power button exits. I fixed the issue with this video:
    and I successfully unlocked my bootloader! I also successfully flashed the recovery that you recommended (I will get to the problems that I had with it later).

    Problem 4: Flashing issues
    Part 6 of your guide went perfectly! Part 7 is were I got issues. The recovery you recommended simply didn't install the custom rom I was wanting to use. It kept on giving me error 7. I tried the 'editing meta-inf' fix that I found in this forum, but that didn't help. This led me down a short recovery rabbit hole. To summarize:

    https://xdaforums.com/t/twrp-3-2-3-0-ale-all-versions-huawei-p8lite-alice-18-59-18-02-2019.3609582/ didn't work. When I tried to enter the recovery, I just met erecovery. Maybe I did something wrong, but I eventually just didn't use it.

    https://eu.dl.twrp.me/grace/twrp-3.1.1-0-grace.img.html this one almost made me think I bricked my phone. Basically, it doesn't work, at least for me.

    https://xdaforums.com/t/twrp-openkirin-3-1-1-0-all-versions-huawei-p8lite.3583180/ I didn't try, since the recovery I picked worked fine (will be mentioned below).

    https://sourceforge.net/projects/darkjoker360-developements/files/Huawei/P8 Lite/Oreo/LineageOS-15.1/recovery/ worked, but, to be frank... Was kinda crappy.

    https://drive.google.com/file/d/1YzswB1paNu5QDQGsqO9M_3khhdvZHqZr/view I both didn't try it and don't even know were it's from or were I even found it.

    https://drive.google.com/file/d/1dX04OAwMlI398V8c-gv4PEv3xKkKdiLP/view Is the one I went with. It works quite nicely, and actually installed my rom(s), although it has a small issue were it reboots after a while of not using it, so if you are gonna use it make sure to tap on something random in the recovery to make sure that doesn't happen. Would recommend. Oh yeah, its from @Thespartann

    Honorable mention goes to: https://orangefox.download/device/alice , since it also worked fine. I would recommend this one as well.

    Also, SuperSU just didn't work on any of the recoveries, for some reason. I eventually gave up on it. I installed Magisk, which isn't related to SuperSU, but whatever. Also, Gapps installed fine.
    Also, I used adb sideload to flash my OS, Gapps, and Magisk instead.


    Problem 5: Google app's non stop stopping
    After many hours of work, I finally got to the OS. I noticed a problem immediately though, Google just wouldn't stop crashing, which made first set up impossible to go through, since I connected to WI-FI, and a lot of the setup required the Google app to not crash EVERY 2 SECONDS AHH.

    I fixed it by:
    1. https://stackoverflow.com/questions...rough-adb-using-the-adb-monkey-command-but-it | using the command from this link to open the settings app. In the settings app I removed my account that I added, and also disconnected from the internet.

    2. https://droidwin.com/how-to-uninstall-google-app-on-android-via-adb-command/ | I used this to uninstall the Google app.

    3. the first set up finally worked and finished up.

    4. https://www.apkmirror.com/apk/googl...-download/?redirected=thank_you_invalid_nonce | I got the Google app from here (since the Play Store doesn't allow you to use it without signing in, and signing in requires Google), and transferred it to my phone, and installed it.

    All of that fixed the Google app issues.


    Aaaaannnnddd that's it! After that I settled in to the new OS. I made a few tweaks in the settings, such as:

    1. Deleting and disabling apps that I don't use (not many, LineageOS doesn't have bloatware really)
    2. Going to developer options and disabling animations, forcing GPU rendering, and enabling a feature that makes it so that a long press of the back button force stops the app that you are currently in. This feature was very useful on my slightly unstable HTC One E8, and might come useful for this Hauwei, but I'm yet to tell.

    The rest of my tweaks were personalization.


    Thanks for reading my reply! All I can say is wow! What a ride! Learned so many new things, and had a lot of fun!

    Last notes:
    I haven't installed Xposed yet, and will very soon!
    The phone is the ALE-L21 model of the Hauwei P8 Lite
    The rom (at least according to me) is perfectly usable as a daily driver, but I only had the rom for a day, so maybe to soon to say.
    This was much more difficult to get working than the HTC One E8 lol.
    I didn't buy all the phones in my device inventory the second my HTC broke. They are all phones that I used to use that resided in my cupboard (and still do).
    I found the HTC and Oneplus in a bin at Lidl. The HTC was in perfect condition, and the Oneplus is bricked.
    The rom that I use shows that the IMEI code is unknown, which I got scared of, but after sifting through my selected roms thread right here on XDA, I found the creator saying that that's normal. Note that that's not normal for EMUI 4.1, as mentioned in the guide I am replying to.
    I would recommend looking at https://revanced.app/, have fun ;)
    The sensors for my rom are disabled
    Use https://devcheck.app/ for system info.

    Now that I look back, I missed a few recoveries:

    And for those wanting to try roms not older than Android 8, here are some options I found:

    Please note that I haven't tested these roms and recoveries, I'm just listing them here for those who want to quickly find options.

    Oh yeah, OP, do you still use the P8?

    If you have any questions, recommendations or corrections, feel free! And have a nice day!
    1
    Wow, I'm so sorry you had so many issues, but thanks for providing your workarounds. The guide follows my experience for the most part, which was much more straight forward.

    I would still be using the P8 lite, but one day I woke up and the power button just decided to not work anymore. I got around it for a bit by making the phone wake up with the volume keys, and then getting an app I could put on the home screen to lock the phone.

    Then a couple of weeks later it just refused to turn on, at all. It just decided to die out of the blue.

    I am on a Xiaomi Redmi Note 10S right now. Great device, and has official support for Lineage, so I won't have to deal with all these pesky bugs unofficial ports usually have.
  • 35
    Hi all! So, you have a P8 lite in your pocket and you hate EMUI? Well, that was my case too, it's uncustomizable, ugly, and removes plenty of features from android stock. I do not like it one bit, and I like even less the fact that this phone is getting no more updates, ever. This sucks, it all sucks, luckily we can say "F all that" and do whatever we want with this device, provided you follow this guide.

    I am making this guide because I want to condensate every single thing I know about this device in one single thread. One big guide to help all of you out installing custom ROMs. Without this, you would have to do research along multiple threads, often with conflicting information, and what's even worse, DEAD LINKS! There's nothing more frustrating than finally finding the solution to your problem, just one download away, just to be greeted by a dead link, and you would need to scout for another file that may or may not work... ugly stuff.

    So, the point of this is to bring up to date info so you can make this device rock. This guide assumes you have Huawei's EMUI 4.0 installed which runs on Android 6.0. I'm also assuming you have your bootloader locked, and I will explain how to unlock it FOR FREE. No need to pay to some shady site in order to access what effectively belongs to you.

    These are the requirements for this guide:

    Code:
    #USB cable
    #A PC
    #Some charge on the device to ensure nothing goes wrong
    #An SD Card
    #Patience

    Before beggining, a quick disclaimer:

    Code:
    #It's not my objective to break your device, however there's always a risk when doing these kind of things.
    #When you follow this guide's steps your are accepting the risks and are taking full responsiblity for whatever may happen to your device.
    #Don't blame me for breaking your stuff if that happens, all I'm listing here worked for me, and should work for you.
    #I won't be babysitting anybody to help solve their specific problems, don't PM me asking me why X doesn't work.
    #I am unaware if this works in other versions of this device, but I'm positive this works on both ALE-L23 and ALE-L21
    #If you have a "CAM-XXX" device, it's highly likely this works for you too, but as with everything, TRY AT YOUR OWN RISK.
    #YOU HAVE BEEN WARNED!

    Ok, so let's begin. As the title says, the guide is applicable to any custom ROM. However, I will be installing Lineage OS 14.1 which runs on (almost stock) Android 7.1.2. Regardless, the final step where we install the custom ROM is interchangable, and you can use whichever you please.

    This process WILL wipe all of your data (except SD card). Make sure to make a backup of everything you want to save (app configs, photos, videos and whatever else).

    1. DOWNGRADING TO ANDROID 5

    As you may know, Huawei has stopped providing bootloader unlock codes for very stupid reasons. This has led to many unable to unlock their bootloader and having to pay for third party apps in hopes they don't get scammed. There are some trustworthy sites where you can get these at a fee tho (mainly DC Unlocker at 4 bucks), so if you want to pay up to avoid having to downgrade to Android 5, you can do so. However, I understand that you may not want to pay at all, I didn't want to either.

    To get the bootloader unlock code, we need root, and to get root, we need Android 5. Why? Because getting root in Android 6 requires us to flash some zips, and for that we need TWRP, and for that we need an unlocked bootloader, everyhing closes up very nicely. So, we have no choice but to downgrade.

    An SD card is not needed for this process, but it is going to be required at a later point, so why not use it now too?

    NOTE: It may be a good idea to make a factory reset at this point, to avoid issues. For that, do the following:

    1. Turn your phone off.
    2. Boot the phone by holding the power button and the volume up button at the same time.
    3. Wait untill the Huawei logo appears, then let go of both buttons.
    4. You should be in recovery mode, navigate with the volume keys to the "Wipe data/factory reset" option.
    5. Select it with the power button and wipe everything.
    6. Reboot the device with the option in the menu.
    7. Once the device has booted up, follow the guide.


    Alright, once that's done, connect your phone to the PC to transfer some files:

    NOTE: There's two Stock Android 5s downloads ("HW_Android_5_Transition.zip" and "HW_Stock_Android_5.zip"). One is a transition package, as the name implies, and the other is Huawei's EMUI 3.1 in all of it's glory. What's the difference? The transition package is a much smaller file that is designed to downgrade the phone from EMUI 4.0 (Android 6) to EMUI 3.1 (Android 5). If you are running EMUI 4.0 (which should be the case) then you can use the transition package which will take less to download. If you have another version (i.e. EMUI 4.1) you should use "HW_Stock_Android_5.zip". However, the latter is the safe bet. If you are not sure which one to use, use "HW_Stock_Android_5.zip". The process is exactly the same for both packages.

    1. Extract the "UPDATE.APP" file from "HW_Stock_Android_5.zip" or "HW_Android_5_Transition.zip".
    2. Navigate to your phone's internal memory or SD card (whichever you want to use) and locate a folder called "dload". If there's not one, create it.
    3. Put the "UPDATE.APP" file inside of the "dload" folder.
    4. Turn your phone off.
    5. Once it's off, press the power button and the two volume buttons until you see the Huawei logo.

    That should make the phone recognize the "update" and start flashing it. Once it finishes, it will try to boot by itself, so pressing those 3 buttons was your last input until the phone boots into Android 5. It will take a long time for it to both finish and boot, don't be afraid, the phone is not bricked. If you think the phone is indeed bricked because it has been stuck at the logo screen for way to long (longer than an hour) then proceed to the "Unbricking" section of this guide. However, it's highly unlikely that this will happen, as Huawei checks the file before flashing it, so if it's incompatible with your device it should not do anything and boot again into Android 6 with everything untouched.

    2. ROOTING ON ANDROID 5 AND EXTRACTING BOOTLOADER UNLOCK CODE

    Once you are in Android 5, we will need to root the device. Download KingRoot (proved to work) or another one click root app of your choice. I'm aware of KingRoot's bad reputation because of the spyware accusations, but the phone will be wiped anyway and we are sure it works, so it doesn't really harm at all. If you still don't want to use it, check with other apps, I haven't done so myself so I don't know what else works.

    Once your phone is rooted, we will need to use the terminal for the first time. We will need to setup ADB and Fastboot, if you already have that, skip this step.

    1. Extract the "platform-tools" folder from the zip and place it somewhere nice.
    2. Shift right click on a blank space INSIDE of the "platform-tools" folder.
    3. Select "Open command window here".

    This should be enough to get ADB working, but we need to make some config on the phone itself too.

    1. Go to Settings -> About Phone
    2. Look for a line that says "Build Number" and tap it multiple times.
    3. When the message saying "You are now a developer" pops up, go back and enter the new "Developer Options" menu.
    4. In there, look for an option called "USB Debugging" and turn it on.
    5. Connect the phone to your PC via USB cable.
    6. A message should have popped up on the phone asking for permission to use USB Debugging, tap on "Always allow from this PC" and then on "Allow".

    NOTE: If the message doesn't pop up, you can try a number of things. I prefer to tap the "Revoke USB debugging authorizations" button to ensure that no PC is authorized, so the message must pop up at some point. Once you revoked authorizations, disconnect and connect the phone again, if you still don't see it, try to select MTP as the transfer protocol. If not, then PTP, if you still don't see it install Hi Suite on your PC and open it, it should pop up now.

    Once you have everything working, type the following in the terminal in your PC:

    Code:
    adb devices

    If you see a serial number there, that's your phone, and that means everything is set up correctly (make sure you don't have any other device attached to your PC, or you could confuse the two and make bad stuff happen for that other device). If you don't see it, make sure USB Debugging is enabled. You can try to use different cables if you still have problems. Now type:

    Code:
    adb shell

    And then:

    Code:
    su -c "grep -m1 -aoE 'WVLOCK.{14}[0-9]{16}' /dev/block/mmcblk0p7 |grep -aoE '[0-9]{16}'"

    KingRoot (or the app you used to root) should prompt you (in your phone) if you want to give ADB root access, make sure to allow it to make this work. This should give you your unlock code. SAVE IT INTO A TXT FILE AND COPY THAT FILE TO ALL OF YOUR PCS, ALL OF YOUR CLOUD ACCOUNTS AND ALL OF YOUR MOBILE DEVICES.

    (Maybe the terminal gets stuck at this point, press CTRL + D (or C) to get it unstuck).

    Seriusly tho, it didn't happen to me, but it is a possibility that your Bootloader can re lock after doing some of the things that follow, in which case you will need to unlock it again, and if you don't have that code... it's back to square one.

    3. GOING BACK TO ANDROID 6

    Now that we have done all that we wanted on Android 5, it's time to go back. The process is exactly the same.

    1. Extract the "UPDATE.APP" file from the "HW_Stock_Android_6.zip" file and move it to the dload folder (SD card or Internal).
    2. Turn off your phone and turn it on again with all three buttons pressed.
    3. Wait.
    4. ???
    5. Profit.

    So, we're back on Android 6. Why did we go back you may ask? Why did we not just flash our precius custom ROM? Well, for once, this gives people the chance to stay on EMUI if all they wanted was to unlock the bootloader and maybe root on Android 6 (which I will explain how to do too, in case you want to). Another, more important reason, we need Android 6 to install the B895/B896 update, which is a requirement for any custom ROM (mainly Android 7.0+) if you don't want any problems with your SIM card (and others that may arise).

    4. UNLOCKING BOOTLOADER AND FLASHING TWRP

    Now, we need to turn on USB Debugging again, and to allow our PC... again. Do so, and check that everything is right with:

    Code:
    adb devices

    If that's the case, then type the following:

    Code:
    adb reboot bootloader

    Your phone will reboot, and you should see a white screen with a wasted android above a green text saying "PHONE LOCKED". If that's the case, take a moment to say goodbye to that green text, because it will soon turn very red. We will need to unlock the bootloader with the code you got from the previous steps, for that type the following:

    Code:
    fastboot oem unlock ****************

    In place of the "****************" you must enter your code, of course. And that was it, now the green text is replaced with a red "PHONE UNLOCKED". This are good news. Now, we need to flash our custom recovery if we want to do anything fancy with the device. For that, extract the "recovery.img" file from the "TWRP_3.1.1.zip" file and paste it into the same folder where all of the ADB files are located (where "adb.exe" is). Now type:

    Code:
    fastboot flash recovery recovery.img

    This will flash TWRP into your device, hooray! Now type:

    Code:
    fastboot reboot

    And your device should turn back on, today is a bright day my son. Now you must take a decision, do you want to flash a custom ROM and get very nice and fancy features or do you want to stay with what you have? If you prefer Huawei's EMUI 4.0, then follow to the next step. If you want to flash custom ROMs, then skip the next one.

    5. ROOTING ON ANDROID 6 (OPTIONAL)

    I don't know why you would prefer EMUI over... anything else really, but it's your call. I'll tell you how to root it so you can at least take some advantage of it. You see that file called "HW_Android_6_Root.zip"? Extract it, inside there will be... another folder called Root... huh? Redundant. Anyway, inside of that there should be two zips. 1.zip and 2.zip. You will need to place the folder called "Root" inside of your SD card or your internal storage. Then, go back to the terminal and type:

    Code:
    adb reboot recovery

    You should reboot into TWRP, isn't it nice? Anyway, we have to flash some zips! Go to "wipe" first and wipe the "Cache" partition and the "Dalvik" partition. Once that's done, go to install and navigate to the Root folder your placed... well, you know where. Select 1.zip and flash it, once it's finished reboot the device. If TWRP prompts you to install it's app, DO NOT DO IT. Once the phone has rebooted (it will take longer because of the cache and dalvik wipe), repeat the process but flash 2.zip this time, reboot and your phone should be rooted. This is the end of the line for you now, as you don't want to make anything else to the phone. However, you can go to the final chapter where I explain how to install Xposed framework, if you want more customization. EMUI doesn't like Xposed very much, so there's little you can do with it, but it's something I guess.

    6. INSTALLING THE B895/B896 UPDATE

    So, you followed the power user path, the one we all really want deep down. That's cool, I respect you. We gotta use that custom recovery we just flashed, but first we need to transfer some files into our phone's memory. We need to install an update to the phone, for which you need Android 6 (that you should already have anyway). There's two different updates, B895 and B896. As you may guess, B896 is newer. However, any of these two will (or rather should) work without issues. I personally used B896, but some people claim B895 is more stable. I can't find a difference really, but the process is the same regardless of which you choose. Once you have made that decision, move "B895_update.zip" or "B896_update.zip" to your phone's internal storage or SD card AS IS (don't extract it). Then type into the terminal:

    Code:
    adb reboot recovery

    You should be in TWRP now. Go to wipe and select the "Cache" and "Dalvik" partitions ONLY, then wipe them. Once that's done, go to install and flash your update of choice. Once finished, reboot the device. If TWRP prompts you to install it's app, DO NOT DO IT. The boot should take longer than usual because of the "Cache" and "Dalvik" wipe... and because of the update too. Once booted, you should be in EMUI 4.1. Go to settings and into "About Phone". In there, look for a field called "IMEI". If you see a number, that means you did everything properly, if you see "unkown" or nothing at all, then that means you lost your IMEI... which means you will have connectivity issues. To fix this, you will need to do a full wipe (so, boot into recovery (we lost TWRP due to the update) and then go to wipe, in there select everything except SD card) and follow the steps again starting from 3, this time flashing the other update (so if you flashed B895, flash B896 this time and vice versa)).

    Now, this last step we made has wiped our custom recovery... so sad. We have to flash it again, but we are almost finished!! Now it's time for you to move the custom ROM you want to your SD card (SD card is mandatory, as we will wipe internal storage). You should also move your custom ROM of choice. If you want root, also move the "SuperSUv82.zip" file.

    OPTIONAL:

    If you want Gapps, that means the Google apps, so PlayStore, Google services and such (and you really should want them, as Android without PlayStore is kinda rough), then you need to download them separately.

    So, go to the Gapps website and select the pacakge you want. You NEED to choose the ARM64 platform, the android version depends on the ROM you are flashing, so check which version it runs, and the package itself is personal preference. Here you can see a comparison of each package, detailing what each one contains so you can make a decision. The aroma package is kinda bugged, I would avoid it. Choose wisely, as flashing another Gapps package once you have flashed a different one can and most likely will cause issues. If you want my opinion, I would stick to the nano package. It offers the basic Google functionality and allows you to download other Google apps you may need/use with the PlayStore once you are booted up.

    Once you choose your package, move it to your phone's SD card along with the ROM and the SuperSU zip if you want it.


    Check that USB Debugging is still enabled, and then type:

    Code:
    adb reboot bootloader

    Once into the bootloader, flash the custom recovery once again with:

    Code:
    fastboot flash recovery recovery.img

    Then:

    Code:
    fastboot reboot

    Once booted up again, type:

    Code:
    adb reboot recovery

    And now it's time to drop the bomb, say bye bye to EMUI, and say hello to... whatever it is you are installing.

    7. FLASHING YOUR CUSTOM ROM OF CHOICE

    MOST CUSTOM ROMS REQUIRE AN LTE CAPABLE SIM IN ORDER TO HAVE CELLULAR NETWROK WORKING CORRECTLY, THIS DEPENDS ON A ROM TO ROM BASIS, DO YOUR RESEARCH BEFORE FLASHING

    Once in TWRP, go to wipe and check every box, I'm serius, check everything except the SD card. Once that's finished, the moment of glory has come. Go to install and flash your ROM. It will take a while, and when that's done reboot. The phone should boot into your ROM. If you want either Gapps or SuperSU, make a quick setup and enable USB Debugging again, then reboot to recovery with:

    Code:
    adb reboot recovery

    Once in TWRP, go to install and flash the Gapps package and the SuperSU zip (in that order) if you want it. Reboot. That should be it! You are done!

    8. UNBRICKING

    I don't know why, but with all the flashing and the testing I've done you would have thinked that I should have suffered of a brick state at least once... that was, luckily, not the case. I haven't suffered a single brick. I don't know if I'm extremely lucky or if this phone is tremendously resilient, but the case is I haven't had any issues of this kind.

    However, I can understand that it is a possibility, so if this happens to you my best advice is to do the following: Boot into recovery mode (either stock or TWRP depending on where in the whole process you got stuck), make a full wipe and apply the update from "HW_Stock_Android_6.zip" with the dload folder and the three buttons method. That should get it unstuck, if not... try the same with the "HW_Stock_Android_5.zip" 's "UPDATE.APP".

    9. INSTALLING XPOSED FRAMEWORK (OPTIONAL)

    What? A custom ROM is not enough for you? Getting freed from EMUI is not enough? Well fear not then, because there's one last step for the true power user, for that man who thinks that everything is not enough, the good old Xposed Framework *queue fireworks and trumpets.

    So, you need to install the Xposed Installer apk. Get it from here, and ONLY THERE. I once installed an apk from another source... ended up being adware, not fun. The apk is at the very bottom of the thread. You will also need the framework itself, get it from here.

    Get the latest (arm64) version for your ROM. This depends on what Android version it is running on:

    Code:
    SDK21 = Android 5.0
    SDK22 = Android 5.1
    SDK23 = Android 6.0
    SDK24 = Android 7.0
    SDK25 = Android 7.1
    SDK26 = Android 8.0
    SDK27 = Android 8.1

    You should also get the uninstaller in case things go south.

    Once you got the files, install the apk on your phone. Open the app once. Transfer the framework and the uninstaller into your SD or internal storage. Boot into TWRP recovery and install the framework, reboot the device.

    NOTE: Android 6.0 takes about 20 mins to boot, wait about an hour before deciding that it's bricked. Android 7.1.2 took me about 2 mins. I'm unaware of the boot times of other versions, but be aware that it can take LONG. If you think it really got bricked, boot into TWRP again and flash the uninstaller. That should get it unstuck and you can either try again or leave it as is.

    ----------------------------------------------------------------------------

    Well guys, that's all I got, quite a big write up huh? I don't really have nothing else to say, just remember that what you are doing here is at your own risk and I don't want anybody blaming me for the bad things that can happen. I will proceed to leave you with the download links so you can try this yourself. I'm currently running Lineage OS 14.1 which features Android Nougat 7.1.2 on my Huawei P8 lite ALE-L23, I've never been happier to be free from the manufacturer's ROM.

    DOWNLOADS

    (The B895 and B896 update's links are not mine)

    Huawei's Stock Android 5:
    Android Filehost
    Mediafire

    Huawei's Android 5 Transition:
    Android Filehost
    Mediafire

    Huawei's Stock Android 6:
    Android Filehost
    Mediafire

    Huawei's Android 6 Root:
    Android Filehost
    Mediafire

    EMUI 4.1 (B895):
    Android Filehost

    EMUI 4.1 (B896):
    Android Filehost

    Platform-Tools:
    Android Filehost
    Mediafire

    TWRP 3.1.1:
    Android Filehost
    Mediafire

    Gapps:
    Open Gapps

    SuperSU:
    Android Filehost
    Google Drive
    3
    Here in 2023 I have a Huawei ALE-L21 device I cost a lot to get the apk to root the device I leave it here for anyone who wants to unlock their device in my case I will use it to play retro games.
    2
    So I recently 'lost' my HTC One E8. Its battery turned into a spicy pillow, and I had it removed. Sadly I couldn't buy a new battery for it, so it's currently residing in my drawer. It was a good phone, and was really fun to work on, like putting in custom roms and recoveries. Anyway, I had to get a replacement phone. In my profile you can see my device inventory. The Nokia 5.1 was a candidate, but the charging port was funny and it was really slow with its built in Android 10, and Nokia made it impossible to downgrade. So that was out of the question. The Nokia 1 was actually ok, no issues with it, but I eventually picked another phone (The Hauwei P8 Lite), since it was a little small, and perhaps slow, for my tastes. Then there was the LG K8, which I actually used before switching to my HTC One E8. Sadly, its charging port was also funny and its Android version (6.0) was to old for my use case, and the lack of custom roms didn't help. The Samsungs were not my phones exactly, so they didn't count. The Oneplus 3... My goodness, what a shame. It is bricked (not by me I found it in a bin XD), and I tried everything to make it work, but nothing worked. I am not giving up on it, but damn man.

    That leaved one choice... The Hauwei P8 Lite! It had no problems, and while it had Android 6, which again, was to old for my use case, it actually had good custom roms available! Perfect!

    I eventually settled on https://xdaforums.com/t/rom-8-1-stable-lineageos-15-1-for-p8-lite.3928723/, since it seemed stable enough from all the newest comments in that post. And it was also Android 8.1, which was as low as I was willing to go (and as high as I was willing to go as well).

    And then I found your guide. And my goodness what a good guide!

    So you might be asking, "Why the heck are you replying with such useless information?!? What does this help with?!?" And to that I answer, while the guide was pretty good, there was many problems that I had to solve on my own, and I am going to say what I did to make this phone work, for all the people coming here, wondering how to fix [insert random issue here].

    So, here we go!

    Problem 0.5: The Erecovery not having a factory reset option
    Yeah idk either, wasn't really a problem, since I just did it from the phones settings, but weird either way.

    Problem 1: Downgrading to Android 5
    This one was pretty funny, since when I first tried it, it either got stuck at 5% or gave an error. Then one error pranked me, since it seemed to be actually working at first, no errors, no getting stuck at 5%. Then, when it completed, the truth settled in... Literally nothing changed. I rage quit for a few hours and tried again. All I did different was absolutely nothing, I did the same thing as when I first started, putting stock Android 5 onto my SD card, and then doing the 3 button press. And it worked for some reason. I still don't know wtf changed for it to work, but hey, all I care about is that it worked. The only theory I got is that I did a double format of my SD card, and did a double factory reset of my phone.

    Problem 2: The rooting process
    So when I finally downgraded to Android 5, it was time to get KingRoot. It didn't work. I reinstalled it a few times, and got it from different sources, but nothing worked. It gave a network error, for those wondering. I eventually got something else called Kingoroot ( https://www.kingoapp.com/ ), and it got stuck at 90%, but when I exited the app and went back in, it was magically rooted, as if 100% didn't exist. Idk either. But hey, it was rooted!

    Problem 2.5: USB Debugging permission message not coming up
    Was weird, but the 'adb devices' command worked, so it didn't seem to matter. Also it eventually appeared a little later.

    Problem 3: Bootloader driver issue
    The rooting process went quite well, and I managed to get the unlocking code, although the shell command that gave it to me was a little bit silly. I got it working by ctrl + v the command and pressing enter a few times. I already got adb & fastboot ++ set up, so that was good too. And downgrading back to Android 6 went smoothly.
    The bootloader part is where problem 3 comes in. When I typed in 'adb reboot bootloader', it worked fine, but when I tried 'fastboot devices', no device showed up, and when I tried to give the phone my unlock code, nothing happened. I tried to exit the bootloader by pressing the up button a lot (as it said), but that didn't work. I eventually found out that holding the power button exits. I fixed the issue with this video:
    and I successfully unlocked my bootloader! I also successfully flashed the recovery that you recommended (I will get to the problems that I had with it later).

    Problem 4: Flashing issues
    Part 6 of your guide went perfectly! Part 7 is were I got issues. The recovery you recommended simply didn't install the custom rom I was wanting to use. It kept on giving me error 7. I tried the 'editing meta-inf' fix that I found in this forum, but that didn't help. This led me down a short recovery rabbit hole. To summarize:

    https://xdaforums.com/t/twrp-3-2-3-0-ale-all-versions-huawei-p8lite-alice-18-59-18-02-2019.3609582/ didn't work. When I tried to enter the recovery, I just met erecovery. Maybe I did something wrong, but I eventually just didn't use it.

    https://eu.dl.twrp.me/grace/twrp-3.1.1-0-grace.img.html this one almost made me think I bricked my phone. Basically, it doesn't work, at least for me.

    https://xdaforums.com/t/twrp-openkirin-3-1-1-0-all-versions-huawei-p8lite.3583180/ I didn't try, since the recovery I picked worked fine (will be mentioned below).

    https://sourceforge.net/projects/darkjoker360-developements/files/Huawei/P8 Lite/Oreo/LineageOS-15.1/recovery/ worked, but, to be frank... Was kinda crappy.

    https://drive.google.com/file/d/1YzswB1paNu5QDQGsqO9M_3khhdvZHqZr/view I both didn't try it and don't even know were it's from or were I even found it.

    https://drive.google.com/file/d/1dX04OAwMlI398V8c-gv4PEv3xKkKdiLP/view Is the one I went with. It works quite nicely, and actually installed my rom(s), although it has a small issue were it reboots after a while of not using it, so if you are gonna use it make sure to tap on something random in the recovery to make sure that doesn't happen. Would recommend. Oh yeah, its from @Thespartann

    Honorable mention goes to: https://orangefox.download/device/alice , since it also worked fine. I would recommend this one as well.

    Also, SuperSU just didn't work on any of the recoveries, for some reason. I eventually gave up on it. I installed Magisk, which isn't related to SuperSU, but whatever. Also, Gapps installed fine.
    Also, I used adb sideload to flash my OS, Gapps, and Magisk instead.


    Problem 5: Google app's non stop stopping
    After many hours of work, I finally got to the OS. I noticed a problem immediately though, Google just wouldn't stop crashing, which made first set up impossible to go through, since I connected to WI-FI, and a lot of the setup required the Google app to not crash EVERY 2 SECONDS AHH.

    I fixed it by:
    1. https://stackoverflow.com/questions...rough-adb-using-the-adb-monkey-command-but-it | using the command from this link to open the settings app. In the settings app I removed my account that I added, and also disconnected from the internet.

    2. https://droidwin.com/how-to-uninstall-google-app-on-android-via-adb-command/ | I used this to uninstall the Google app.

    3. the first set up finally worked and finished up.

    4. https://www.apkmirror.com/apk/googl...-download/?redirected=thank_you_invalid_nonce | I got the Google app from here (since the Play Store doesn't allow you to use it without signing in, and signing in requires Google), and transferred it to my phone, and installed it.

    All of that fixed the Google app issues.


    Aaaaannnnddd that's it! After that I settled in to the new OS. I made a few tweaks in the settings, such as:

    1. Deleting and disabling apps that I don't use (not many, LineageOS doesn't have bloatware really)
    2. Going to developer options and disabling animations, forcing GPU rendering, and enabling a feature that makes it so that a long press of the back button force stops the app that you are currently in. This feature was very useful on my slightly unstable HTC One E8, and might come useful for this Hauwei, but I'm yet to tell.

    The rest of my tweaks were personalization.


    Thanks for reading my reply! All I can say is wow! What a ride! Learned so many new things, and had a lot of fun!

    Last notes:
    I haven't installed Xposed yet, and will very soon!
    The phone is the ALE-L21 model of the Hauwei P8 Lite
    The rom (at least according to me) is perfectly usable as a daily driver, but I only had the rom for a day, so maybe to soon to say.
    This was much more difficult to get working than the HTC One E8 lol.
    I didn't buy all the phones in my device inventory the second my HTC broke. They are all phones that I used to use that resided in my cupboard (and still do).
    I found the HTC and Oneplus in a bin at Lidl. The HTC was in perfect condition, and the Oneplus is bricked.
    The rom that I use shows that the IMEI code is unknown, which I got scared of, but after sifting through my selected roms thread right here on XDA, I found the creator saying that that's normal. Note that that's not normal for EMUI 4.1, as mentioned in the guide I am replying to.
    I would recommend looking at https://revanced.app/, have fun ;)
    The sensors for my rom are disabled
    Use https://devcheck.app/ for system info.

    Now that I look back, I missed a few recoveries:

    And for those wanting to try roms not older than Android 8, here are some options I found:

    Please note that I haven't tested these roms and recoveries, I'm just listing them here for those who want to quickly find options.

    Oh yeah, OP, do you still use the P8?

    If you have any questions, recommendations or corrections, feel free! And have a nice day!
    2
    @tralph3 hats off to you... having written a couple of tutorials myself i can see the passion and work behind this guide.Excellent and most useful work for those few still using this device.Thanks a lot!

    Glad I could help ;) This is still my daily driver to this day. The battery is pretty busted at this point and it only stays alive for about 5 hours or less. I should buy a new one but they are expensive so I'll keep using this while I can. When I do get a new one, you can be sure I'll make a guide for it too, I love to customize my devices.
    1
    Thanks <3 -notes

    Thank you tralph3, you make my life so easy, great easy guide. I have a few suggestions for improving clarity:
    • Step 1. "Stock_Android_5.zip" contains "transitional" android 6.0 ALE-L21C900B500 firmware According to including Spanish documentation "3., 3.1 Download the Android5.0 update package" It must be downloaded another 5.0 firmware. I use this 5.0 firmware to make kingroot preform root.
      Firmware: huaweidl.com/download/p8-lite/ale-l21/b204/


    • Look for a line that says "Compilation Number" and tap...
      Step 2. second point 2. Change to "Build Number"

    • su -c "grep -m1 -aoE 'WVLOCK.{14}[0-9]{16}' /dev/block/mmcblk0p7 |grep -aoE '[0-9]{16}'"
      Step 2. getting unlock code. After executing command. Add step -Kingsroot display root access prompt ALLOW it.
    t
    Thanks for your work.