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

Search This thread

giannis008

Member
Mar 22, 2019
23
0
I decided to root my phone in order to try some roms but OEM unlocking is not working. I did it 5 days ago but today I got "Lenovo ID not authorized". Can somebody help me please?
 

bataki2002

Member
Apr 1, 2020
8
0
Hello, i note in this version 4.4 crash with "lenovo part" in sytem, also android auto don't work. the version 4.2 all works perfectly.
 

hk73

Senior Member
Dec 16, 2017
72
1
What worked for me in past is yukle.exe flashing after twrp backup --- precisely yukle.exe S048 flashing + [Stock Rom] [Lenovo P2] [NOUGAT 7.0] [Deodexed_P2a42_S244_170725_ROW]b4 return to previous rom....but now don't have these files due hdd crash else will share & if i am requesting then it's been removed by xda....so if you have try these & will resolve your problem
 
Last edited:

ZephyrBlaze

Member
Oct 5, 2017
35
9
Lenovo P2
Can someone provide me with a twrp restore file? I tried to flash the stock rom but the bat file that came with it tampered with some files and I can't even boot into the stock rom
 

Top Liked Posts

  • There are no posts matching your filters.
  • 51
    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