• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[Recovery][Lenovo P2][P2a42] Official TWRP for the Lenovo P2 (3.2.2-0)

Search This thread

Liacon

Senior Member
Apr 2, 2015
86
12
I know it's a stupid question but i can't find the option, how i can set the time? The twrp it's with a different date and hour and every time i'm boot from recovery to system the time it's wrong

I'm using the version for kuntao
 
D

Deleted member 7820801

Guest
I know it's a stupid question but i can't find the option, how i can set the time? The twrp it's with a different date and hour and every time i'm boot from recovery to system the time it's wrong

I'm using the version for kuntao
There is only time zone setting in Twrp(you know, settings and clock icon). I know that the time and date are not entered manually. I think there is another problem :(
 

pootie_tang

Member
Nov 17, 2010
24
9
Budapest
this TWRP is specifically made for STOCK ROM base.
because of F2FS issues on stock kernel and missing loopback mount for F2FS and countless complains in the past of "Magisk doesn't work" or "TWRP is broken".
where it has absolutely nothing to do with TWRP or Magisk but with F2FS itself in stock kernel.
so we (mike and me) decided to separate Official TWRP and LOS-Base TWRP.

if you are switching from STOCK ROM to LineageOS or any other properly maintained Custom ROM with the F2FS fixes.
i highly recommend you use LineageOS TWRP => Scroll down to "Download a custom recovery - you can download TWRP"
that specifically Linked TWRP is made with F2FS fixes and LineageOS in mind.

yes that version supports treble but for Magisk to work you need a custom Magisk-treble version.
that custom Magisk version can be found here!
(it does say Xiaomi but works for our Lenovo P2 too!)
One question, please.

I wasn't aware about this, have been using the original TWRP versions with Lineage OS 14.1 without major issues.

I also used original TWRP 3.2.2-0 to install Lineage OS 15.1.
It was a major pain, but finally I have everything working (Magisk 16.7 beta & Xposed v90 beta 3, although Xposed doesn't work systemlessly & addons can't be flashed from Magisk or TWRP either, as /vendor mounting fails).
Trying to update via Lineage OS OTA fails after rebooting to TWRP.
Backup also fails in TWRP at system image phase (even after having flashed the latest Lineage OS 15.1 compatible TWRP).
All my partitions are ext4, except for data, which is f2fs (not sure how that transpired, though everything was ext4).

I've now flashed the latest Lineage OS 15.1 compatible TWRP, strangely takes much longer to boot that original TWRP one with same version.

I'd like to know what's the best setup for Lineage OS 15.1 with the latest custom TWRP for it.
Which partitions should be f2fs or ext4 for maximum compatibility with Magisk & Xposed?
Also, will changing them erase any data?

Thanks for any tips you can give me! ;)
 
Last edited:

celoxocis

Senior Member
Apr 12, 2010
1,597
2,174
Belgrade
I'd like to know what's the best setup for Lineage OS 15.1 with the latest custom TWRP for it.
Which partitions should be f2fs or ext4 for maximum compatibility with Magisk & Xposed?
Also, will changing them erase any data?

Thanks for any tips you can give me! ;)

stick to the latest nightly 15.1 for now. there will be a new Lineage-TWRP soon and a LOS 15.1 with latest f2fs stack which fixes all issues with magisk modules.

for a longer lifetime of your emmc I recommend to stick with f2fs for data.

yes changing from ext4 to f2fs and back will always result (requirement) with a full wipe of /data.
 
  • Like
Reactions: pootie_tang

pootie_tang

Member
Nov 17, 2010
24
9
Budapest
stick to the latest nightly 15.1 for now. there will be a new Lineage-TWRP soon and a LOS 15.1 with latest f2fs stack which fixes all issues with magisk modules.

for a longer lifetime of your emmc I recommend to stick with f2fs for data.

yes changing from ext4 to f2fs and back will always result (requirement) with a full wipe of /data.
Many thanks, I'll wait for the new Lineage TWRP before trying anything, seeing as currently I can't even backup.

I'll leave the data partition as f2fs as per your advice.

However, all the other partitions are ext4, should they stay as such when I'll be flashing the Lineage OS with newest f2fs stack?

Thank you!
 

celoxocis

Senior Member
Apr 12, 2010
1,597
2,174
Belgrade
Many thanks, I'll wait for the new Lineage TWRP before trying anything, seeing as currently I can't even backup.

I'll leave the data partition as f2fs as per your advice.

However, all the other partitions are ext4, should they stay as such when I'll be flashing the Lineage OS with newest f2fs stack?

Thank you!

ext4 for all others is normal. they are all read-only. no write wear to worry about on those.
 
  • Like
Reactions: pootie_tang

Tahir Baig

Senior Member
Jul 20, 2017
236
27
Lenovo P2
POCO M2 Pro
stick to the latest nightly 15.1 for now. there will be a new Lineage-TWRP soon and a LOS 15.1 with latest f2fs stack which fixes all issues with magisk modules.

for a longer lifetime of your emmc I recommend to stick with f2fs for data.

yes changing from ext4 to f2fs and back will always result (requirement) with a full wipe of /data.
The new special twrp for lineage 15.1, I suppose, is already available on the installation instructions page in LOS website for kuntao, right?
If yes then is it absolutely necessary to use only this special twrp for lineage to work fine?
Also can this special lineage twrp be used as a stable twrp for rooting and installing other roms (I mean can we use it as a dependable twrp for other tasks as well or is it completely for LOS 15.1 only)?
 

celoxocis

Senior Member
Apr 12, 2010
1,597
2,174
Belgrade
The new special twrp for lineage 15.1, I suppose, is already available on the installation instructions page in LOS website for kuntao, right?
If yes then is it absolutely necessary to use only this special twrp for lineage to work fine?
Also can this special lineage twrp be used as a stable twrp for rooting and installing other roms (I mean can we use it as a dependable twrp for other tasks as well or is it completely for LOS 15.1 only)?

there will be a newer one soon. but yes the one recommended is available on the devices wiki page.

in theory it can be used for all purposes. yes.
but for those who want to stick to stock ROM only I highly recommend sticking with the Official LOS. due to f2fs that comes with stock data partition and stock kernel.
 

Tahir Baig

Senior Member
Jul 20, 2017
236
27
Lenovo P2
POCO M2 Pro
in theory it can be used for all purposes. yes.
but for those who want to stick to stock ROM only I highly recommend sticking with the Official LOS. due to f2fs that comes with stock data partition and stock kernel.[/QUOTE]
You mean those who want to stick to stock ROM should use the official TWRP and not the LOS 15.1 TWRP, right?

---------- Post added at 01:45 PM ---------- Previous post was at 01:43 PM ----------

there will be a newer one soon. but yes the one recommended is available on the devices wiki page.

in theory it can be used for all purposes. yes.
but for those who want to stick to stock ROM only I highly recommend sticking with the Official LOS. due to f2fs that comes with stock data partition and stock kernel.
You mean those who are sticking to stock ROM should use official TWRP for kuntao and not the LOS 15.1 twrp which is mentioned in the kuntao lineage instructions page?
 

celoxocis

Senior Member
Apr 12, 2010
1,597
2,174
Belgrade
You mean those who are sticking to stock ROM should use official TWRP for kuntao and not the LOS 15.1 twrp which is mentioned in the kuntao lineage instructions page?

yes exactly because the f2fs.mkfs in the Lineage-TWRP version is newer and it's safer for those user that prefer the stock ROM to stick with the Official TWRP as it ships with a specifically patched f2fs.mkfs version that works properly on the stock ROM. the newer version will end up breaking proper boot for the stock ROM. it will end in an endless "encryption loop".

it's all caused by LeMotoNovo dev team using such an outdated f2fs stack when it comes to f2fs.
 

Tahir Baig

Senior Member
Jul 20, 2017
236
27
Lenovo P2
POCO M2 Pro
Off topic- Consider a phone is properly rooted with latest magisk. Now, the magisk uninstaller is used to uninstall the already flashed magisk. Will this unroot the phone? Will a phone rooted with magisk, be unrooted by using the magisk uninstaller?
 

Tahir Baig

Senior Member
Jul 20, 2017
236
27
Lenovo P2
POCO M2 Pro
I have the official twrp 3.2.2 on my P2. I want to move to LOS 15.1 and hence want to update the existing twrp to LOS twrp listed in the kuntao instructions page of lineage.
What is the process? How to update twrp without any problems?
 

Lyceus

Senior Member
Jun 15, 2017
95
25
I have the official twrp 3.2.2 on my P2. I want to move to LOS 15.1 and hence want to update the existing twrp to LOS twrp listed in the kuntao instructions page of lineage.
What is the process? How to update twrp without any problems?
On twrp site you have an instruction how to update TWRP
 

jijojamie

Senior Member
Apr 26, 2010
193
50
I have the official twrp 3.2.2 on my P2. I want to move to LOS 15.1 and hence want to update the existing twrp to LOS twrp listed in the kuntao instructions page of lineage.
What is the process? How to update twrp without any problems?

You can do it with PC and phone connected to PC in bootloader mode. You need ADB and fastboot files installed in your PC. No clues, you can google it or just ask for the procedure.

Or from existing TWRP itself. Click install and select new recovery.img (youtube it)
 
Last edited:

jijojamie

Senior Member
Apr 26, 2010
193
50
Or check the starting post:p

Actually yes, I just checked the first post. It clearly mentions everything. I just selected the last page of this thread and tried to help. BTW I am on twrp-3.2.3-0-kuntao_row. I have been using TWRP for years before owning P2 and even moded one TWRP recovery with kitchen. Blah blah..
 

Top Liked Posts

  • There are no posts matching your filters.
  • 50
    Team Win Recovery Project 3.2.2-0



    This is for the Lenovo P2a42 only! Do not flash on the Lenovo P2c72!

    WARNING: Rooting The Lenovo P2 with SuperSu currently works only in System-Mode, which prevents you from installing OTA Updates!
    INFO: Follow the full rooting steps below, in order, to allow system modifications!

    WHAT IS TWRP?

    Oh come on, you know what it is - don't try to fool me!
    In case you're serious, though...

    Team Win Recovery Project is a custom recovery for Android devices.
    It allows you to back up and restore your data, flash custom ROMs to your device, repair broken file systems, and root your device.

    Read more about TWRP here: https://twrp.me/about/

    DOWNLOAD

    You can find the Official Download here (Version: 3.2.2-0): recommended!
    https://goo.gl/UbHbkr

    You can find the Pre-Official Download here:Currently no Pre-Official!
    See Post #3


    This is the download link, for instructions on how to flash it, see below.

    You can find up to date fastboot & adb binaries here!

    FULL STEPS FOR OBTAINING ROOT

    Follow these instructions until someone nice comes along and makes a video from them (without ads):

    1. Extract/ install adb & fastboot to your computer.
      Transparent.gif
    2. Download TWRP for Lenovo P2 (P2a42).
      Transparent.gif
    3. In your ROM, go to Settings -> About device. Tap 8 times on Build number to enable Developer options.
      Transparent.gif
    4. Now go to Settings -> Developer options. (above About device)
      You need to enable OEM unlock, otherwise you might end up with boot problems or be unable to flash later on.
      Transparent.gif

      Once you tap the unlock the bootloader it will ask you to formally submit the request, when you accepted the void warranty thing you will have to wait 14 days.
      Transparent.gif
    5. After 14 days :eek: . Reboot your device into fastboot mode. To do this, (adb reboot-bootloader) or select reboot from the power menu and hold the [Volume Down] + [Power] buttons while your device reboots or boots from power off.
      Transparent.gif
    6. Once you're in fastboot mode, you need to unlock your bootloader. To do this, run this command:
      fastboot oem unlock
      WARNING: Unlocking your bootloader will erase all userdata on the device! Your device will be completely reset to factory defaults!
      Transparent.gif
    7. Once your bootloader is unlocked, you're ready to flash TWRP. To do this, run these commands in order:
      fastboot flash recovery twrp.img
      fastboot boot twrp.img

      Transparent.gif
    8. At this point, you will reach the screen asking you if you want to allow system modifications.
      By swiping right, you will trigger system modifications for TWRP and TWRP will be installed permanently!
      If you are going to root your device and follow the rest of these steps, then it is safe to swipe right and enable modifications.
      Transparent.gif
    9. If your device asks for a password to mount internal storage, and your password doesn't work or you haven't set one, see below under known issues for a fix!
      Transparent.gif

    10. If you want to be rooted see Post #2:

      UPDATING TWRP

      To update TWRP, simply download the new twrp.img on your phone, then boot into your current TWRP and flash it.
      To flash a twrp.img, navigate to [Install] -> [Flash Image] -> select your twrp.img -> [x] Recovery -> Flash!
      After that, just use [Reboot] -> [Recovery] to reboot into the updated TWRP.

      CHANGES
      • v3.0.3-0 (beta) - Initial public beta v1 release.
      • v3.0.3-0 (beta) - public beta v2 release.
        - Enable double-tap to wake in recovery
        - Fixed MTP Issues
      • v3.0.3-0 (Official) - public release.
        - fix device name for update.zip's
      • 3.1.1-0 (Official) - Official release.
        - Completely rebased on Nougat
        - Included OTA support.
      • 3.1.1-1 (Official) - Official release.
        - Fix "Format Data" when using default (f2fs)
        - Enabled OTA support.
      • 3.2.1-0 (Official) - Official release.
        - TWRP base Android 8.1
      • 3.2.2-0 (Official) - Official release.
        - TWRP 3.2.2-0 build

      FEATURES
      • MTP support
      • USB OTG storage support
      • Hardware Qualcomm-based full-disk encryption support
      • f2fs file system support (read, write, format, backup & restore)
      • exFAT file system support (read, write, format)
      • ADB root
      • Full SELinux support
      • Built in android 8.1 tree

      KNOWN ISSUES
      • SuperSU will only work by default in System-Mode because the data partition is F2FS! (by default from Lenovo)
      • SuperSu's Systemless Mode will work when the data partition is changed to EXT4!

      DECRYPTION NOT WORKING?

      If your device isn't decrypting in TWRP, chances are you set a boot up password.
      You can solve this by disabling your boot up password in your device OS's settings.
      By disabling your password your OS will rewrite your crypto key to be compatible with TWRP and TWRP will decrypt with the default password.

      WHY DOES F2FS MAKE TWRP SO SLOW?

      When TWRP boots up or wipes partitions and a few other scenarios, it checks each partition to see how much disk space is used. Ext4 handles disk usage calls quite efficiently and will finish this very fast. F2FS on the other hand is very slow when it comes to checking disk usage. We're unsure why this is. Every file on the F2FS formatted partition adds a little more time, and a device that is 30 GB full could take up to 10 minutes to boot TWRP!
      I suggest switching your data partition to ext4 - all the f2fs hype is merely from benchmarks that don't actually represent real world use (ie. you're not writing thousands of files per second)
      For someone who doesn't do lots of write access to their data partition, ext4 can actually be advantageous (it has faster access times and reads!)

      CONTACT & SUPPORT

      You can find TeamWin on IRC at #twrp on chat.freenode.net.
      You can also post in this thread and I will attempt to answer any questions you may have.

      SOURCE CODE

      TWRP: https://github.com/omnirom/android_bootable_recovery (android-7.1)
      Device tree: https://github.com/Celoxocis/android_device_lenovo_kuntao_row (android-7.1)

      CONTRIBUTIONS

      Gerrit for TWRP: http://gerrit.omnirom.org/
      Gerrit for officially supported devices: http://gerrit.twrp.me/

      XDA:DevDB Information
      Team Win Recovery Project for the Lenovo P2, Tool/Utility for the Lenovo P2

      Contributors
      celoxocis, Maintainer & Developer
      Gilotto, Closed Beta Tester
      HaJeeEs, Closed Beta Tester


      Version Information
      Status: Official
      Current Official Version: 3.2.2-0
      Official Release Date: 2018-07-07

      Created 2016-01-07
      Last Updated 2018-07-07

      Download Counter:
      Initial Beta Release v1: 57
      Initial Beta Release v2: 20
      Official Version: It's Over 5000!

      So you are generation Y? too much to read or you don't real at all? Prefer a video? Head over to Youtube!
      Video Tutorials on Youtube for Systemless Mode ROOT METHOD
      How to ROOT LENOVO P2 | Install TWRP Recovery | Works on Marshmallow Only
      How to ROOT Lenovo P2 with Android Nougat | Lenovo P2 Root Tutorial
      Thanks to TechXplicit

      You don't like command lines? Prefer to click your way through life? Take a look at the Lenovo P2 Root Tool! Head over to Youtube!
      Lenovo P2 Root Tool!
      Thanks to Varun Sai

      ----- General Information -----
      All donations which are send to me (TWRP appreciation donations)
      Will be put forward to support the Official LineageOS development.
      Donation Link, please see my signature!

      Official TWRP vs LineageOS TWRP
      I am on Lenovo's STOCK ROM! All i want is root with STOCK ROM! I don't care about treble! Is this version for me?
      YES!!!

      I hate the Lenovo STOCK ROM! I want LineageOS Official and root! I want treble and Magisk! Is this TWRP version for me?!
      NO!!! Why? Please read this!
    20
    Confirmed and working ROOT methods!

    Up-to-date: For root with Nougat please use phh's supersu
    Use version 2.59 from here
    Install phh's SuperUser in the Play Store
    to manage root access of apps.
    Simply flash it and enjoy.
    --------------------------------
    If you prefer Magisk:
    Prio to installing Magisk you will have to change the data partition from F2FS to EXT4 because the Lenovo Kernel is missing an F2F2 feature.

    How to format data to EXT4:
    Make sure while the first time you boot TWRP.
    You "KEEP SYSTEM in READ ONLY MODE" by clicking "Keep Read Only"
    then Go to:
    Wipe>Advanced Wipe>Select "Data">Repair or Change File System>Change File System>EXT4

    Install Magisk
    and once you booted up the system install Magisk manager.

    Proof that Magisk works see attachment!

    too much to read? Prefer a video? Head over to Youtube!
    Video Tutorials on Youtube for Systemless Mode ROOT METHOD
    How to ROOT LENOVO P2 | Install TWRP Recovery | Works on Marshmallow Only
    How to ROOT Lenovo P2 with Android Nougat | Lenovo P2 Root Tutorial | Works on Nougat!
    Thanks to TechXplicit

    You don't like command lines? Prefer to click your way through life? Take a look at the Lenovo P2 Root Tool! Head over to Youtube![/SIZE]
    Lenovo P2 Root Tool!
    Thanks to Varun Sai
    --------------------------------

    Outdated Root Method for Marshmallow ONLY:

    Here is for confirmed and working ROOT METHODS !!! Marshmallow ONLY !!!
    (FOR SYSTEM MODE ROOT ONLY!)

    download this pack https://goo.gl/KFtyzl
    and extract its content into the adb&minimal fasboot folder
    enter TWRP
    do
    Code:
    adb push dot.supersu /data/.supersu
    Select "ADB Sideload" in TWRP menu, (Advanced>ADB Sideload) make sure to select "Wipe Cache" and
    Swipe to to Start Sideload and use following command to push SuperSu files.
    Code:
    adb sideload SuperSU.zip

    Reboot into System. Done!

    --------------------------------
    FOR SYSTEMLESS MODE ROOT ONLY: (preferred method!) !!! Marshmallow ONLY !!!

    As i stated in the Opening Thread. SuperSu can not be installed in Systemless-Mode by default because by default the /data partition is formated in F2FS.
    More detailed explanation here: here

    The current workaround is to disable the encryption (fully optional) and wipe the /data partition and format the /data partition to EXT4, which is also supported by the boot.img (thank you Lenovo!) and install SuperSu in Systemless-Mode. EXT4 formatting can be done through the "advanced wipe" of TWRP.

    It has been tested and confirmed working. The main advantage is working OTA due to systemless SuperSu. As the OTA doesn't care if /data is actually F2FS or EXT4. Lenovo was so kind to provide both options in the stock boot.img.

    15
    Factory Images for P2a42 Marshmallow/Nougat & TWRP Test Image & Kernel Sources

    Q: I messed up help me?! :crying:
    So you screwed up and didn't follow Rule Number One in the IT-Handbook?
    Which is: Always create a backup before working on a system?

    (FACTORY IMAGES FOR Marshmallow ONLY!)

    Warning! Following images are all confirmed working for the P2a42!
    Do NOT attempt to use it on the P2c72 it will brick your device!
    If you need an P2c72 factory flasher version! Let me know i will provide you with one!

    Download the Factory State Images for Marshmallow. Which are all flashable with fastboot: https://goo.gl/JTCwKj

    Place the files you want replaced into the "Minimal ADB & Fastboot" installation directory and start it's shell:
    If you want to flash back the stock recovery. Simply run:
    Code:
    fastboot flash recovery recovery.img

    You can also replace all partitions if required.
    There is an flashall.bat file in the SW directory. Run it in case you want to restore all partitions.
    But i highly recommend to replace just the partition you messed up. In most cases it will be boot,recovery or system.

    One exception would be if you want to upgrade from an Old Firmware and you simply do not receive any OTA update files.
    In that case you want to run a complete upgrade by running the flashall.bat file.

    (FACTORY IMAGES FOR Nougat ONLY!)

    Warning! Following images are all confirmed working for the P2a42!
    Do NOT attempt to use it on the P2c72 it will brick your device!
    If you need an P2c72 factory flasher version! Let me know i will provide you with one!

    Download the Factory State Images for Nougat. Which are all flashable with fastboot: https://goo.gl/b7Dx37


    too much to read? again?! do you ever read?
    don't worry TechXplicit got you covered!
    Head over to Youtube!
    Lenovo P2 STOCK Firmware | Restore Bootlooped Lenovo P2 | How to get back to OTA updates
    Thanks to TechXplicit

    --------------------------------
    Pre-Official TWRP Images:

    TWRP 3.2.2-0 (latest version)
    Currently no Pre-Official.

    Q: Why Pre-Official?
    A: It's is an "canary build" meaning, in test phase before it gets pushed Official but it is fully tested on Marshmallow and Nougat. Even confirmed working for the P2c72.

    --------------------------------
    Lenovo P2a42 Kernel Sources for Marshmallow/Nougat:

    Official Lenovo Download Link
    13
    This is what happens if you are married to the best wife in the world!

    She buys you a Lenovo P2 as a wedding present!

    I will now proceed with bootloader unlocking and look into any issues that TWRP might have left on the P2.
    For those that did not know. I did NOT own a P2 before creating TWRP for the P2.
    However I do now! Which makes things easier.

    Big thanks for all beta testers! And a very big thanks to my wife!
    9
    I will no longer keep reading the thread and therefore no longer reply to any questions.

    It's simply a waste of time. I prefer spending the time to actually help mike in the development of the Official LOS.

    I will keep updating the Official TWRP for the Lenovo P2. No worry's there.

    For any other questions relating to "rooting" or "how to's".

    Simply follow this guidelines:
    1. Use common logic!
    2. Read the main three posts!
    3. If you don't like reading, watch the provided YouTube videos!
    4. Help each other out! < XDA is a community!
    5. See Rule No.1