FORUMS

[GUIDE] Getting started - Unlock->TWRP->root->OTA updates

117 posts
Thanks Meter: 41
 
By Xcelsior, Senior Member on 19th June 2018, 11:55 AM
Post Reply Email Thread
As there seems to be no such guide yet and it took me quite a while to get all this information together, I thought of giving back something by putting information together for others to start.
This guide is meant for the CLT-L29 (dual SIM). Rebranding and switching your CLT-L09 (single SIM) to dual is not subject of this guide and is not adviced.

This is for a Huawei P20 Pro CLT-L29 with factory reset. Please bear with me if there really is a step missing as I try to reproduce this for the documentation with an already bootloader unlocked and previously rooted phone (root should be gone after [factory] resetting via eRecovery).
A collection of all tools used can be found here.
As always, you are doing this on your own risk, no one else can be held responsible for this.

Cheat sheet
  1. eRecovery
    The recovery sitting in the "recovery" partition. eRecovery is Huawei's recovery that is able to fix your phone by downloading the latest OTA update via WiFi if you got stuck in a boot loop for several reasons.

    To boot into eRecovery:
    • Power down your phone (if you are stuck in a boot loop simply continue with the next step).
    • Hold volume up until you end up in eRecovery.
    • Setup your WiFi access and let it recover your phone.
    • If unsure, "wipe data/factory reset" to get rid of any leftovers you messed up.
    • Reboot and be happy that you have not fully bricked your phone.
  2. TWRP
    The recovery typically flashed to the "recovery_ramdisk" partition. TeamWin Recovery Project is what you typically use to flash ROMs, to root the phone and to install OTA updates.
    Do NOT flash TWRP into "recovery" partition or you will lose eRecovery and the ability to easily recover your semi-bricked phone via WiFi!

    To boot into TWRP (once flashed):
    • Power down your phone (if you are stuck in a boot loop simply continue with the next step).
    • Hold volume up and power until you end up in TWRP.

Unlock your bootloader
  1. Get your bootloader unlock code from here https://emui.huawei.com/en/unlock_detail (available until mid of July I think). Some report to have to wait 24/48h to get their code via mail, I got mine directly.
    • Register via mail and do not get confused that you can not select USA or Germany or whatever country, simply use location Hong Kong.
    • Make sure you select "EMUI above 5.0" when entering your phone data (P20 Pro comes with EMUI 8.x).
  2. Connect your phone via ADB. There are tons of HowTos about this, so I will not be covering this here.
  3. Use Tool All In One to check that you can talk to your device via ADB. It will also help you installing the correct ADB USB drivers.
  4. Unlock your bootloader using Tool All In One.
  5. Reboot back into system.

Flash TWRP
  1. Make sure no lock screen or other locking is set:
    • "Settings > Security": Remove fingerprint, face or password locking, simply set to none.
    • Enter developer mode, should already been done for unlocking the bootloader.
    • Setting > System > Developer options: Disable the display lock.
  2. Download latest ADB & Fastboot as I will continue with the rest on command line.
  3. Verify connection to your phone with "adb devices", this should list your phone.
  4. Reboot into fastboot by using "adb reboot bootloader".
  5. Verify connection to your phone with "fastboot devices", this should list your phone.
  6. Flash TWRP by Pretoriano80 with "fastboot flash recovery_ramdisk twrp_clt_0.1.img". This TWRP is able to access the encrypted internal storage! TWRP is flashed to "recovery_ramdisk". This ensures that you can still access eRecovery if something goes wrong.
  7. Remove the USB cable.
  8. Reboot into TWRP. If you do not boot directly into TWRP the Huawei eRecovery might replace TWRP again. Once you booted into TWRP you are fine for future reboots.
  9. Use "Keep Read Only" for the system partition.

Make a backup!!!
  1. Backup your phone to internal storage (USB stick via USB-OTG adapter failed for me):
    • Select "Backup".
    • Tick all partitions (scroll down and tick all).
    • Swipe to Backup.
    • Select "Reboot System", "Do Not Install".
    • Back in Android make a copy of your backup located in your internal storage "/TWRP/" to an external location like your PC. Keep the backup on your phone to be able to go back quickly to this point via TWRP.

Root the stock ROM
  1. Place "Magisk-v16.4-Beta.zip" onto the internal storage.
  2. Power off the phone and remove the USB cable.
  3. Boot into TWRP.
  4. Install root and Magisk Manager:
    • Select "Install".
    • Select "Magisk-v16.4-Beta.zip"
    • Tick "Reboot after installation is complete".
    • Swipe to confirm Flash.
    • Select "Do Not Install".
  5. Back in Android start "Magisk Manager" and check that it is green and therefore rooted.

Install an OTA (Over The Air) stock update
PC method

Method involving ADB based on this guide.
  1. First make sure no OTA update gets installed automatically as this will end up in booting into TWRP and failing with the update.
    • Go to "Settings > System > System Update".
    • Open the three dots menu on the top right and select "Update Settings".
    • Disable automatic update download via WiFi as once updates are downloaded the phone will bug you to update and maybe tries to update itself during the night!
  2. Start in Android but do not download the OTA update yet.
  3. Verify connection to your phone with "adb devices", this should list your phone.
  4. Reboot into fastboot by using "adb reboot bootloader".
  5. Verify connection to your phone with "fastboot devices", this should list your phone.
  6. Flash "recovery_ramdisk_nocheckP20.img" with "fastboot flash recovery_ramdisk recovery_ramdisk_nocheckP20.img". For official OTA updates that you would regularly get, the "nocheck" feature should not be needed but does not harm. This will remove TWRP and you have to flash it again after the OTA update has finished.
  7. Reboot into Android by using "fastboot reboot".
  8. Remove the USB cable.
  9. Download your OTA update via "Settings > System > System Update".
  10. Let the phone reboot to install the OTA update and follow the update until you are back in Android with your new firmware version.
  11. Install TWRP and root again.

Standalone method

Deprecated/wrong method based on this guide.

Read first!!!
While this method should do no harm it will only ever update to CLT-L29 8.1.0.128a(C432) [hw/eu] as this is what is inside the file "update.zip" that you can currently download and that gets installed by "HuRUpdater_0.3.zip" in the same folder. This was not clearly explained in the source thread, therefore sorry about this wrong information. If you intend to update to this stock ROM continue, otherwise use the "PC method".

I will check about the best way to install OTA updates without PC interaction in the next couple of days (currently waiting for 130+ getting rolled out for me for some investigations regarding the OTA process).
  1. First make sure no OTA update gets installed automatically as this will end up in booting into TWRP and failing with the update.
    • Go to "Settings > System > System Update".
    • Open the three dots menu on the top right and select "Update Settings".
    • Disable automatic update download via WiFi as once updates are downloaded the phone will bug you to update and maybe tries to update itself during the night!
  2. Place the following files into a folder on the internal storage (for sure not all are required but this is part of the little information not clear right now):
    • "HuRUpdater_0.3.zip"
    • "recovery.img"
    • "update.zip"
    • "update_all_hw.zip"
    • "update_data_public.zip"
  3. Go to "Settings > System > System Update" and check for an update.
  4. Download the OTA update.
  5. Do not reboot when prompted.
  6. Make sure no lock screen or other locking is set:
    • "Settings > Security": Remove fingerprint, face or password locking, simply set to none.
    • Enter developer mode, should already been done for unlocking the bootloader.
    • Setting > System > Developer options: Disable the display lock.
  7. Power down the phone.
  8. Boot into TWRP.
  9. Install "HuRUpdater_0.3.zip". Do not get irritated if it tells you it is for CLT-L09 instead of CLT-L29, everything is fine.
  10. Wipe dalvik cache before rebooting.
  11. Reboot back into Android.
  12. Check "Magisk Manager" to see if root got removed. TWRP might get removed as well. If TWRP or root got removed, repeat the install for one or both like before.
    In my case only root got removed but TWRP was kept functional. If this is the case for you as well, simply flash "Magisk-v16.4-Beta.zip" via TWRP again.

Changelog
  • 2018-06-21
    1. Updated/corrected wrong information collected about installing OTA updates standalone (without PC). Until further notice use the PC method.
The Following 27 Users Say Thank You to Xcelsior For This Useful Post: [ View ] Gift Xcelsior Ad-Free
19th June 2018, 12:06 PM |#2  
maddoguk's Avatar
Senior Member
Flag Trowbridge
Thanks Meter: 51
 
More
Great post. Thank you
19th June 2018, 12:31 PM |#3  
doromax's Avatar
Senior Member
Thanks Meter: 38
 
More
Very good post!
Thank you to collect all this important info!


P20 Pro & Tapatalk
19th June 2018, 12:52 PM |#4  
Member
Thanks Meter: 17
 
More
can i use your step above to rebranding from L29c636 to l29c432? Thanks
19th June 2018, 02:07 PM |#5  
OP Senior Member
Thanks Meter: 41
 
More
Quote:
Originally Posted by Barcovn

can i use your step above to rebranding from L29c636 to l29c432? Thanks

Not sure, not tested and not topic of this thread.

For my understanding, why do you want to rebrand it to C432 which is the region code as far as I understand.
Is there a BIG benefit of getting OTA updates earlier or why do you want to mess around with it ?
The Following User Says Thank You to Xcelsior For This Useful Post: [ View ] Gift Xcelsior Ad-Free
19th June 2018, 02:53 PM |#6  
Member
Thanks Meter: 17
 
More
Quote:
Originally Posted by Xcelsior

Not sure, not tested and not topic of this thread.

For my understanding, why do you want to rebrand it to C432 which is the region code as far as I understand.
Is there a BIG benefit of getting OTA updates earlier or why do you want to mess around with it ?

yes, i mean change the region code. as i use the p20 pro since April, newer firmware ususal fix/improve performance for phone or camera. however it seem the c636 update is much slower then C432. currently i have problem with facebook lagging which inhope newer firmware fix it
19th June 2018, 07:30 PM |#7  
matt4321's Avatar
Retired Senior Moderator - When red-headed people are above a certain social grade their hair is auburn
Flag Reading, UK
Thanks Meter: 7,011
 
More
This is good! I'll sticky it when I get a chance later tonight. I'm mobile atm
19th June 2018, 09:46 PM |#8  
dladz's Avatar
Senior Member
Flag Liverpool
Thanks Meter: 3,106
 
Donate to Me
More
Maybe I'm missing something.

https://forum.xda-developers.com/hua...etail-t3788326

It's been here for some time.

Nothing wrong with your guide it's decent but the info provided is actually already here mate.

Root, twrp, de-brand, OTA, it's all there
19th June 2018, 11:38 PM |#9  
matt4321's Avatar
Retired Senior Moderator - When red-headed people are above a certain social grade their hair is auburn
Flag Reading, UK
Thanks Meter: 7,011
 
More
Quote:
Originally Posted by dladz

Maybe I'm missing something.

https://forum.xda-developers.com/hua...etail-t3788326

It's been here for some time.

Nothing wrong with your guide it's decent but the info provided is actually already here mate.

Root, twrp, de-brand, OTA, it's all there

They're a bit different. The debrand thread is obviously good but much more specific to debranding. This is a more generic for general How-To's
20th June 2018, 12:10 AM |#10  
OP Senior Member
Thanks Meter: 41
 
More
Quote:
Originally Posted by dladz

Maybe I'm missing something.

https://forum.xda-developers.com/hua...etail-t3788326

It's been here for some time.

Nothing wrong with your guide it's decent but the info provided is actually already here mate.

Root, twrp, de-brand, OTA, it's all there

I was reading this one as well but like matt4321 already said, it is actually for a different purpose.

And even the "ROOT ONLY" instructions are either widespread over the whole P20 Pro forum, incomplete or even outdated:
  • Linking to other threads with endless, partly revised instructions (on page n of the thread).
  • Referring to wrong official TWRP that can not use internal storage.
  • Hard to understand for beginners on this device (not even talking about someone who is entirely new to all of this).
  • Missing steps or expecting that you have already successfully flashed your first ROM (talking about advanced things like rebranding).
Don't get me wong, I am used to read a lot when it comes to custom ROMs (if you check the old part of my signature you can see that I am not actually a newbie here and my roots actually reach back to when all of the Android stuff startet at all, back when XDAs flashed HTC HD2 WinMo to Android). However I really missed a guide that actually collects all the basic information for beginners without going off roads too early.
20th June 2018, 10:28 AM |#11  
mangusZen's Avatar
Senior Member
Flag Bologna,Italy
Thanks Meter: 370
 
More
These are more or less the steps I'm used to when I owned my nexus phones.
I have some questions:

If I root my phone and install, let's say adaway, will I be able to receive OTA? Or I will have to flash a new image manually?

If after root I relock bootloader, will I be able to unlock it again later for further modding?

This method implies that I can return to stock anytime and relock bootloader?

Thanks for the guide and answers , great job
Post Reply Subscribe to Thread

Tags
guide, ota, root, twrp, unlock

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes