yashsingh1/xdaforums huggingface dataset:
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Siva Mk:
Stop fighting like kids.. there are lot of YouTube tutorials too. Do check other sources before asking for easier methods.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Kadyo:
Dear Moderator,

I've been rooting my phone since 2013 and XDA is a big help. This is my first time posting because I can't stand all this arguments.

Kindly clean the thread.

By the way before I buy a phone I make sure to read all threads/forum related to my new device. Reading is a must.

Thank you and more power XDA. Waiting patiently for official lineage.:D
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
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
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] realista87:
i have a doubt.

at this link https://twrp.me/devices/lenovop2a42.html i read:

Your device needs to be unlocked before it can flash custom images. To unlock your device type:

fastboot oem unlock

is it ok to unlock in this way or i need to use the OS built in feature of login into lenovo account and wait 14 days?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] PL15:
Yes you have to login lenovo account and wait till 14 days..
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] vishtgod:
Guys please help me i want to root my phone and online it says oem unlocking

Is there any process so that i can do oem unlocking quickly because I don't want to wait for 14 days so rooting and installation of rom can be done quick or not please suggest????
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] gamefreaksuraj:
Without bootloader unlock you can do nothing
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] mojoman11:
Hey guys. A small question. Im going to flash an aicp rom and then root it. I'm more comfortable with super su rather than magisk. Do I have to change the partition from f2fs to ext4 before flashing the addonsu. Zip?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] ALISTON PRINCE FERNANDEZ:
Nup u dont need to change to ext4.you can flash super su in f2fs partition
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] abhayruparel:
I have found a way to remove the lock icon shown on every reboot on a device with unlocked bootloader. If you are interested have a look here https://xdaforums.com/lenovo-p2/themes/mod-remove-bootloader-unlocked-warning-t3657120

Feel free to include this in main thread if you want to.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Varun Sai:
I am going to upload a video in this today
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] bnayagrawal:
Any solution for this problem?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] kamesh_kraken:
What are the default File Systems on each partitions? Please help me out. Got a P2 from my friend. He didn't knew how to use it. So he went crazy with it. I'm going to flash the deodexed Nougat S244.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] kamesh_kraken:
Hey! I'm super close to restoring your backup and getting the IMEI back. But always endsup in E:Unable to find file system (first period). E: Unknown restore method for '/persist'

It would be helpful if it restores that. Don't know what to do. Help me out! Thanks
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] bnayagrawal:
Can anyone who has unlocked his bootloader give me your Lenovo I'd and password so that I can unlock it instantly without waiting for 10days
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] PL15:
Over smart guy spotted :laugh:
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] bnayagrawal:
Watch your tongue. Its 9 days left so I was frustrated of waiting
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] PL15:
Who will give you his/her id password? Any? Keep calm and wait when 14 days over you good to go.:good:
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] bnayagrawal:
I created a new Lenovo account to check if again have to wait for 14days, but no the time is not linked with the account hence that method won't work sadly.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] PL15:
Yea that's why i called you ovrsmart :good: don't take on ur heart broh.. :fingers-crossed:
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] bnayagrawal:
I am not offended but theres nothing wrong in trying different methods.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] vish.tgod:
Brother I installed 2.79 and I'm stuck at bootlogo why so?? I followed all the methods please help
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] vojv0da:
Need help quickly, I set all partition to ext4

/System /Data /Cache everything works but I wonder if that can brick my phone? It's better to change system and cache to f2fs and leave data ext4? Thanks
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] pranavateja99:
f2fs or ext4 only for data. Just leave rest and do it for data alone.

Also it's the ROM support that speak of either of Ext4 or f2fs. Some support both. But you can onky install on 1 type,either f2fs or ext4 at a time.

Everytime..clear cache, dcache,system,data.

Next select data alone and change file system to f2fs or ext4.

Next flash whatever you want..

---------- Post added at 02:17 AM ---------- Previous post was at 02:09 AM ----------

Don't think there is something on other side., For now there is nothing...., Also remember timer don't a break warranty,...it's a the command unlock bootloader change your boot screen with added lock symbol, this defines your carry in warranty. when you unlock it update to highest stock update ever released....first Take twrp backup before you start playing and store it in safe place....SD card or PC. If you are from India, no point in unlocking now...wait till official linage support. Aicp works well,but not that great of what you loose..

---------- Post added at 02:26 AM ---------- Previous post was at 02:17 AM ----------

I heard magisk don't work with f2fs., SuperSU will., Correct me if not., Bcz till date I am not so particular on which one to format for root. I just tried to root on what ever it came....

SuperSU is detected by most banks, some apps like Netflix etc.

Magisk with google check passed and hide option make this detection impossible for those apps..

---------- Post added at 02:35 AM ---------- Previous post was at 02:26 AM ----------

There in nothing seperate file system for each.

Now I feel you gonna messup with his phone. If he dont know much ,how did he messed post bootloader unlock crap.

Clear data, system, cache..... Select data alone to change file system you want.

I think this stock deodexed work both both f2fs and ext4.

If you gonna root using magisk then stay with ext4. Else f2fs.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] kamesh_kraken:
He knew like overall flashing a custom ROM and stuff. Now I couldn't find /persist and /modem partition. IMEI is empty (now I discovered). that is the reason why no signal. I managed to get the IMEI back. But still not working. Could be because of persist and modem? Help me out!
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] pranavateja99:
https://xdaforums.com/lenovo-p2/how-to/lost-imeipls-help-to-restore-t3660407/post73502648

After above process,try to Search in XDA for twrp backup for efs, modem.

XDA users has shared p2 twrp backups.

For imei, it's your efs backup does better Job that other alternatives..

In worst case of imei, you need to follow some process of writing them into.

Msg me on whats...
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] t-mobile_mda:
hey..

can u pls share modemst1 and modemst2 for p2a42 device..? or qcn file..?

my device baseband is unknown..
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] pranavateja99:
Bootloader unlocked p2, Fastboot don't allow you to flash those modem files....better way is to flash S048 and update till S244 through OTA.

If imei is not the problem this serial stock update processes bring back modest files.

If you gonna restore via twrp backup, then not all partitions being restored, so some still facing no signal issue due to the mismatch of some files
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] t-mobile_mda:
yes fastboot flashing is not possbile because of unlocked bootloader.. is there any other way to install s048 update w/o fastboot..? i have only this fw P2a42_S048_161111_ROW_fastboot..

imeis r blank..imei 1 and imei 2.. qcn can solve the signal issue..? if diag is activating..
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] pranavateja99:
Fastboot works,but unlocked bootloader don't permit to flash modem related files...,6-7 files can't be flashed, rest will flash.

So Try 1-8 steps in below link.

https://xdaforums.com/lenovo-p2/dev...cial-twrp-lenovo-p2-3-0-t3533659/post73506567

This restores missing file partitions, but for imei you need to work, you get signal, but phone never latches to network or nothing works bcz of no imei,

I know efs partion has imei and other info, if you have backup it's good, else try some hard methods on XDA or try restoring someone TWRP backup....I haven't been in this situation of no imei.

Refer this http://en.miui.com/thread-260943-1-1.html

for process to try, Google and XDA search qpsk tools writing imei for Lenovo p2. When you are in deepcrap, everything is your friend to be tried. So search more.I don't want to play with mine to give you exact imei solution.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] realista87:
i flashed the twrp and swiped right to allow modifications. ok... but....what is the key combination to enter twrp? on other phnes it is power + vol up. this does not work.

i tested power + vol down but it enters in fastboot.

EDIT: ah i tested power + BOTH vol + and - and i entered ! it is a strange combination of buttons... not?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] widewozzy:
Full step needs correction. Fastboot code for flashing twrp.img not mentioned.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Varun Sai:
Change boot logo of Lenovo P2

[youtube]Oe0jEGORG2s[/youtube]
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Single_Core:
I had stock android 7.0 clean install, no passwords(Default device encryption is enabled by default).

I unlocked the bootloader through the official channels, then I flashed the latest TWRP from the official website.

Each time I try to flash a new ROM or wipe /factory reset. I receive the following message: "Unable to format /data to decrypt the data"(Something along those lines)

Then when I format the /data partition to EXT4 and back to F2FS it works. I can wipe it all.

Then I continued with install "AospExtended ROM V4.5" which boots but when it's done it started encryption the enitre device, reboot and fails to boot.

Now either this is a ROM TWRP or 'my own' related problem.

Any help?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] mojoman11:
Did you flash gapps? Remember to flash the rom and gapps at the same time while only wiping cache in-between.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Single_Core:
I don't think that relates to my problem of the "encryption" part? Or is it normal on this phone, does it do that on any ROM ?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Varun Sai:
Flash miui 8 custom ROM in Lenovo P2

[youtube]G8KWMy0ig-s[/youtube]
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] zalaTheOne:
Please post links in another thread

This is for TWRP
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] abhayruparel:
OP I'm having issues using backup and restore using TWRP whenever I try to restore backup of another ROM after booting even though I'm entering correct p/w it's showing incorrect p/w

Please push an update fixing this.

(ps i know we can delete lock screen from data/system)

Thanks and regards

Abhay Ruparel
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] ALISTON PRINCE FERNANDEZ:
+1
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
I had to sent my Crystal Ball into the ether realm for repair.

So you will need to pastebin the recovery.log to trace that issue's cause.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] ALISTON PRINCE FERNANDEZ:
Here it is

https://drive.google.com/file/d/0By8ins7YS0RPMjRhNTVKdGJwc0k/view?usp=drivesdk
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Ud311:
If I unlock bootloader (which take 14 days) ,after rooting and change some settings and then disable OEM bootloader.

Is there is any chance that warranty when not be void and null...
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] mojoman11:
After unlocking bootloader your warranty is void and it cannot be relocked
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Sutcliffe9:
Just rooted with Magisk and everything is working great.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Dakatar:
Hello everybody! Can i change f2fs to ext4 without erase data partition?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] PL15:
No. Never not only data partition also internal storage will be erased.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Milan-XDA:
i'm in fastboot but i get the message <waiting for any device>. How can i make my PC detect my phone?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] PL15:
Install proper drivers thn try
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Milan-XDA:
My phone doesn't have official drivers on manufacturer's site, but Windows update did the trick. I just had to launch it manually.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
The very first line in the Opening Thread clearly states that this TWRP is not to be flashed on the P2C72. Doing so is at your own risk.

It has been in the opening thread since the very beginning.

I do not have an Chinese P2C72 to test and build and TWRP for it. Nor do I ever plan to.

You should have been aware of the fact that any P2a42 bought from aliexpress and bestbuy and others are all Chinese P2C72 with the system image replaced.

I can help you out with the factory flasher for the P2C72. As it sounds to me what you are stuck in fastboot mode.

Try accessing your device via fastboot commands.

If you don't have any fastboot access you are probably stuck in EDL mode and my factory flasher package can't help you.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] abhayruparel:
Some other member did shared the recovery.log so I haven't shared.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] ALISTON PRINCE FERNANDEZ:
If u have access to twrp recovery than download stock rom in sd card than put that sd card in device,,clean system and flash stock rom,,,i faced the same issue(p2a42)when flashed that supersu zip,,i recovered my device with backup,,i download oneteam supersu zip and flashed rooted successfully,,,many users are rooted with and flashed custom roms on p2c72,,hope you restore your device

Ps:to boot into recovery hold power button and volume atleast

For 10 sec
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] lp2yisdfu:
Yes you are right, it does say "This is for the Lenovo P2a42 only! Do not flash on the Lenovo P2c72!" I think the confusion comes from the fact that the phone says P2a42 in the about phone.

I thought that once it had been updated to P2a42, the phones were identical, but evidently I was wrong, my mistake, hence this situation with an expensive brick.

Yes please, if you could help with the factory flasher for the P2C72 I would really appreciate it, I am very much stuck at the moment.

I can enter fastboot, and recovery, I managed to replace TWRP with stock recovery so there should be no problem running those commands, the only issue is that the bootloader is unlocked so some files flag an error when you write to them due to permissions lock.

Thank you :)

---------- Post added at 10:22 AM ---------- Previous post was at 10:21 AM ----------

Thank you for the advice :)
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
I've sent you an PM. check your inbox.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] abhayruparel:
Mr. Fernandez has uploaded the recovery.log so I haven't uploaded mine. Will upload mine also in a day or two.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
I've already checked his logs. There is nothing that suggest an issue with the decryption. So the problem must be elsewhere.

I will release a new build once mike's work hits official.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] abhayruparel:
Alright. Once again Thanks for working on TWRP and maintaining it.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] vipulviswanathan:
Why should the partition be changed to EXT4

Like for real. F2FS shows wayy better read and write speeds than EXT4. So can someone tell me why this is done ? Why is it required to change this in order to install SU ?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] gh0st85:
I'm still on stock and didn't change anything but the recovery to twrp. And using magisk root without a problem. I didn't flash in twrp btw, created a modified boot.img and flashed it with fastboot, but since a recent update you can do this directly with the latest magisk manager.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
Seriously? You are asking why? But are quoting the answer right there??

Let me put it in a bigger font and bold for those who don't like reading.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] ndreyit:
Are you solved your problem?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] lp2yisdfu:
Just want to say thank you to celoxocis, for providing the options here to open up our phones, and also for helping me fix my phone after I bricked it by providing me with the correct recovery image and instructions. I had a real panic back there because I had only just bought the phone 2 weeks ago, and I was scared it was dead forever.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] Ban#Shee:
Hello , I have little problem becouse my /data is empty :crying: and idk what to do
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] lp2yisdfu:
Just a quick update, I went through all the steps again but I followed this post

https://xdaforums.com/lenovo-p2/how-to/guide-changing-p2c72-to-p2a42-flashing-t3636804

So for those who have a p2c72 that was flashed to p2a42 firmware from Chinese sellers such as Gearbest, please refer to the above guide.

The only difference was for the p2c72 he says to change the filesystem to ext4, whereas your guide only says to do so if rooting with Magisk.

After installing SuperSU correctly rootchecker actually said it's not rooted, so I have installed LineageOS and I may try to simply flash the SuperSU package made for Lineage as it seems more reliable, in theory.

I'm still hoping for the Official LineageOS release for the P2, and also for Orea Android 8 to make it onto the phone, this was essentially the whole reasoning behind all these steps, I like having an up to date phone, but Lenovo do not want to provide further updates past 7.0

Edit: Using Lineage OS SU for root was very easy, it is working fine, and I just wish I had done that the first time around 2 weeks ago, and saved myself the massive headache of bricking my device.

Now just waiting for these great devs, really appreciate all the free help/support, and especially the releases put out. Deserving donations for sure.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] pluscsc:
Sorry for the ignorance, if I just wanted to install TWRP, in order to have the original rom backup, is it possible? That is, does TWRP work seamlessly with the original rom? Will I continue to receive Lenovo update (OTA) normally?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] :
Yes, original rom can be backed up. But ota updates can not be installed. By the way, I do not think there will be new updates.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] bkkvarma93:
I used Resurrection Remix & came back to stock rom using twrp. Now there is 125mb ota update available for Lenovo p2 which will stable my device a bit. When I try to update it it restarts to twrp & process stops.

Is there any way to update my stock rom?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] garvit girotra:
Ota updates can only be installed by the stock recovery. One thing you can do is install stock recover from twrp as recovery and reboot to reboot to confirm that stock recovery is correctly installed or not if yes then reboot the device to system and download ota again and install it
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] bkkvarma93:
Thanks Man. Where can I find the stock recovery of Lenovo p2?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] garvit girotra:
Google it or check the devs of p2 in androidfilehost site and under that site there is 1 deve name kale77. Under that Dev folder you can have the stock recovery
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] phaleg:
I am reading before buying eventually this phone...

I understand that modding P2 is much harder than with Nexus phones, where you have toolkits to help you.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
I never messed with the nvram settings of a phone.

I leave that to those that like to play with fire.

not sure what these users you mentioned did wrong.

I have flashed my lenovo P2 countless times and even bricked it to the point I couldn't enter fastboot anymore. but I was always able to get back and never lost my imei. because I created backups of every single partition (even those not included in the factory flasher).

it always depends on knowledge and skill of the user.

we are currently testing a new twrp build for the official los.

out of three los dev's I was the one with f2fs issues. until we figure out and pin point exactly what's causing these issues. there won't be a public release. because you can imagine the countless posts if such a problematic build would get released.

same goes for the official los which is in the works and being tested by at least 5 los devs including me.

and until we all are satisfied and sure that there won't be any issues at all. we won't push it public.

but I can tell you that much. those that are waiting for the official los. are in for a real treat :good:
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
Why would you need the kernel configuration?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] wzedlare:
To create defconfig.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
I have the stock defconfig. I can provide you the defconfig. But I meant what are you planning to do?
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] wzedlare:
I am planning to make cyanogenmod 13 for our device, I need the defconfig.I would appreciate if you provide :)
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] celoxocis:
I was planning to do the same, sometime in the future but if you feel like doing it yourself. Your welcome.

You will need to clean up the vendor kernel sources. Without cleaning them up you won't be able to build a kernel successfully.

I've cleaned it up all the way except the camera drivers. F2FS was problematic but if you know where to look for sources it's an quick fix. I took it from Motorola Mobility's Github (Moto Z Play).

I will push my kernel tree soon to github.

I'm currently trying to build TWRP on Omni 6.0 to push it official but it keeps breaking. It's probably missing msm8953 keymaster changes.

So it might take a while till it's official.

It builds fine on CM13 but they handle keymaster differently in the build barrier.
[Lenovo P2 ROMs, Kernels, Recoveries, & Other Devel] wzedlare:
I made a device and vendor tree based on moto z play and used the kernel source directly from lenovo, I need defconfig to compile the kernel :)