FORUMS
Remove All Ads from XDA

[Guide]Lenovo S5 K520: TWRP, Root and Decrypt data

21 posts
Thanks Meter: 13
 
By C4lculated, Junior Member on 24th December 2018, 12:59 PM
Post Reply Email Thread
Hello everyone, after struggling for a few hours I managed to finally disable force encryption in my phone (so that TWRP could backup the data partition).
I'd like to write a quick list of what I did in the form of a guide to unlocking the bootloader, installing TWRP and getting root with Magisk. I'm just a user, not a developer and this guide is brief, it's not a detailed tutorial and does not include trivial steps (like how to install drivers for your OS).

Warnings: Although small, there is always the chance this bricks your phone. I take no responsibilities.
This will factory reset your phone so back up everything before you start.


My phone is Lenovo S5 (K520) Global version (see screenshot) I don't know if this will work for other firmwares.



Prerequisites:If you chose to use Micro SD card, you can insert it now.
Note: I know there is a way to push these files directly to TWRP from PC through USB instead of using SD Card/Flash drive but I've never tried it.

Lets start:
1. Go to 'Settings>About phone' and tap on "Lenovo version" several times until developer options are enabled.
2. Go to 'Settings>System>Developer options' and enable "OEM unlocking" (Note: for me this option was greyed out and I had to connect to wifi and wait for a minute or two).
Optional: Enable "USB debugging" if you wish to enter fastboot via ADB.
3. Turn off the phone and press and hold 'Volume down'+'Power' buttons until you see "fastboot mode" on the phone screen (alternatively, don't turn off the phone and instead enter fastboot mode via ADB (adb.exe reboot bootloader)).
4. Connect the phone to the PC via USB and open a command prompt in the location that you installed fastboot binary to.
Type (after each command press enter):
Code:
fastboot devices
To verify that the phone is recognized. And if it is type:
Code:
fastboot oem unlock
Now on the phone LCD navigate to "Yes" with volume buttons and press power to select it.
Your phone will factory reset, this will take a few minutes. Let it finish.

5. Put the TWRP image in your fastboot path. I used "recovery-twrp-3.2.3-crn-seoul(v3.2.3-1).img" downloaded from this URL:
https://forum.xda-developers.com/and...twrps-t3863860
But I included 2 more files that I found (I did not try them).

6. Enter fasboot mode again and type:
Code:
fastboot flash recovery recovery-twrp-3.2.3-crn-seoul(v3.2.3-1).img
(Substitute "recovery-twrp-3.2.3-crn-seoul(v3.2.3-1).img" with the recovery filename of you choice)

7. If successful, disconnect the USB cable and enter Recovery mode, do not turn off or reboot the phone because upon restart the phone will revert to stock recovery (I.E. delete TWRP).
To enter Recovery mode press and hold 'Volume down'+'Power' buttons until you see "fastboot mode" and from there choose "Recovery mode" with the volume buttons and confirm with the power button.
(Alternatively, you can try holding 'Volume up'+'Power' to directly enter Recovery mode but I found it a little finicky)

8. In TWRP, swipe to allow changes. Press cancel when asked for a password to decrypt data.
If you chose to use a USB flash drive with an OTG adapter, connect it and mount it (Mount>usb-otg).

9. Go to Wipe>format data, type "yes" and confirm (if you have any data like installed apps, contacts etc., it will be deleted).

10. Go to Install and install "Disable_Dm-Verity_ForceEncrypt_12.16.2018.zip".
The files will be in (/external_sd/ or /usb-otg/).

11. Install "Magisk-v18.0.zip"

Important note: If you want to keep encryption (if you don't care if TWRP can't access /data/) and just obtain root, skip steps 9 and 10.

12. Reboot to system and wait for a few minutes for the initial setup.


If for some reason boot fails (nothing happens after 10 minutes) and you can still enter TWRP (hold 'Volume up'+'Power'), then you can revert the changes by restoring the stock boot image (TWRP>Install>Install image>boot.img - put a checkmark on "boot").


If this worked for you, please tell us by replying to this thread.
The Following 2 Users Say Thank You to C4lculated For This Useful Post: [ View ] Gift C4lculated Ad-Free
 
 
10th January 2019, 09:41 PM |#2  
Junior Member
Thanks Meter: 2
 
More
Thanks a lot man. This phone is a beast in quality/price when talking about hardware. Costs a bit more than 100€ and has the same hard than others at 180-200€ at least. Bad thing is software but with TWRP and root everything is possible . Just found what project treble is, amazing possibilities. Can't beliebe nobody replied yet to yor post. Its a great guide and you show all the sources from where your downloads come. As you said in another thread its better this way so people can trust your content more:

Quote:
Originally Posted by C4lculated

I also wanted to root but I didn't want to run a bunch of unknown programs (from XN Logos), so I managed to install TWRP and root with magisk. I wrote a guide on how to do it:
https://forum.xda-developers.com/gen...crypt-t3882402

I am yet waiting for my Lenovo S5 to arrive but I will give this guide a try. I was about to follow XN logos (stupdroid) guide/software but I prefer yours. Just one question... have you checked whether the TWRP v3.2.3 (latest) from dmilz make proper working backups? Can I trust that a full backup will be loaded correctly after installing any unofficial ROM, to go back to stock if necessary? I made once the mistake of relying a TWRP and later I found out that one was ok for flashing but didn't create working backups. I asked him also the same question, but I guess you also tried yourself to make a backup and restore from it using TWRP.

Next step will be to flash an Android 8.1 or 9 GSI rom (did I already say I'm amazed by GSI/project treble roms? just found about them last days). I will update you about my luck following your guide
The Following User Says Thank You to acost91 For This Useful Post: [ View ] Gift acost91 Ad-Free
26th January 2019, 01:35 PM |#3  
Member
Thanks Meter: 3
 
More
does anyone enable lte bands, 4 and 28?
22nd February 2019, 10:35 AM |#4  
Junior Member
Flag Jakarta
Thanks Meter: 1
 
More
just bought this phone, currently on shipping..
I'll first try with twrp + aosp 9 GSI
3rd March 2019, 10:11 PM |#5  
Junior Member
Thanks Meter: 0
 
More
Hi man, have you upgrade to gsi
Quote:
Originally Posted by acost91

Thanks a lot man. This phone is a beast in quality/price when talking about hardware. Costs a bit more than 100€ and has the same hard than others at 180-200€ at least. Bad thing is software but with TWRP and root everything is possible . Just found what project treble is, amazing possibilities. Can't beliebe nobody replied yet to yor post. Its a great guide and you show all the sources from where your downloads come. As you said in another thread its better this way so people can trust your content more:



I am yet waiting for my Lenovo S5 to arrive but I will give this guide a try. I was about to follow XN logos (stupdroid) guide/software but I prefer yours. Just one question... have you checked whether the TWRP v3.2.3 (latest) from dmilz make proper working backups? Can I trust that a full backup will be loaded correctly after installing any unofficial ROM, to go back to stock if necessary? I made once the mistake of relying a TWRP and later I found out that one was ok for flashing but didn't create working backups. I asked him also the same question, but I guess you also tried yourself to make a backup and restore from it using TWRP.

Next step will be to flash an Android 8.1 or 9 GSI rom (did I already say I'm amazed by GSI/project treble roms? just found about them last days). I will update you about my luck following your guide

Kindly drop the procedure am hitting brick with all the method i used .🤣🤣😂🤣🤣😂🤣🤣
6th March 2019, 01:56 AM |#6  
Junior Member
Thanks Meter: 0
 
More
Stock firmware lenovo k520
I have tried your method on ROM that is based on China and also globally, and TWRP was successfully installed, and I have also tried several Rom GSI, and only AOSP Extended is successful, but with Bluetooth bugs it cannot be turned on, if others want flash files and stock firmware for k520, just let me know, thanks.
7th March 2019, 07:21 PM |#7  
Junior Member
Thanks Meter: 0
 
More
Working on S5 Pro too?
Hi! Can it work on S5 Pro too? I really want to root this device and I don't find out a way to get this happening. Thanks!
19th March 2019, 07:57 PM |#8  
Junior Member
Thanks Meter: 1
 
More
Does this work for s5 pro l58041?
Thanks
22nd March 2019, 11:03 AM |#9  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by B4ph0

I have tried your method on ROM that is based on China and also globally, and TWRP was successfully installed, and I have also tried several Rom GSI, and only AOSP Extended is successful, but with Bluetooth bugs it cannot be turned on, if others want flash files and stock firmware for k520, just let me know, thanks.

Hi! Sorry for offtopic!
Could you please PM me the link on AOSP extended image which you installed. Thank you!
The Following User Says Thank You to mlnbb For This Useful Post: [ View ] Gift mlnbb Ad-Free
17th May 2019, 10:06 PM |#10  
Senior Member
Flag Ploiesti
Thanks Meter: 14
 
More
Hello! Did somebody managed to install GCAM to Lenovo S5? I'm trying and I can;t do this, magisk modules are not loading...
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes