• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][11][OFFICIAL] LineageOS 18.1 for Lenovo P2

Search This thread

educowley

Member
Aug 19, 2020
14
0
Hi, thanks for that good ROM, only two issues for me: power off alarm doesn't not work and volume in calls is too loud in minimum.
Thks
 

hk73

Senior Member
Dec 16, 2017
67
1
Hi there, please use English on this board.

Yes, on a couple of P2 spare devices I went back to stock ROM from LOS, using Deodexed stock 7.0 rom:


It works fine!
Thanks for helping. Have few questions.



1) Flashing astrid 652 fix battery drain?

2) p2c72 nougat official eng rom with or without gapps ?

3) If possible can you share yukle.exe from stock?

4) modem erase via fastboot modem, modemst1,2 - then flashing backup of EFS + MODEM [{(TWRP) of modem baseband version (20r-MM) bt backup was done on deodex 7.0}] - gives battery drain? upon checking power manager shows NO SIGNAL TIME rise despite great signal on calls,sms etc - & if somehow solving no signal rise then CPU usage rising on screen-off in power manager stock (048,062,232,233,244,251,252) .... flashing stock bootloader lock, unlock, QCN, ota etc.... WHAT IS CORRECT WAY TO FLASH MODEM SO BATTERY WON'T DRAIN ON SCREEN OFF ?

5) Have you tried flashing p2c72 CN(nougat) on p2a42 ? Your baseband version 20r, 6r, 13r ?

6) As per your experience most stable, BEAST SOT BATTERY friendly, In CALL audio recording --- Los--14,15,16,17,18,19..or Deodex 7.0....?


Sorry for too many questions...
 
Last edited:

en666

Senior Member
Apr 23, 2011
74
36
Thank you. did you use the fastboot method? or twrp?
If I remember correctly I've used twrp on one and fastboot on the other, but it should really be the same I think.


1) Flashing astrid 652 fix battery drain?
Didn't flash it because the two .so files inside the Astridxx solution I don't know were are coming from and @Astridxx didn't answer. I didn't even find the project on GitHub.

2) p2c72 nougat official eng rom with or without gapps ?
Unfortunately just last week thieves have broken into my house, also stealing those two spare devices, so I don't remember very clearly, but I think the 7.0 I've linked some days ago has the PlayStore and everything. Maybe question for @dbrlsn

3) If possible can you share yukle.exe from stock?
As above, question for @dbrlsn

4) modem erase via fastboot modem, modemst1,2 - then flashing backup of EFS + MODEM [{(TWRP) of modem baseband version (20r-MM) bt backup was done on deodex 7.0}] - gives battery drain? upon checking power manager shows NO SIGNAL TIME rise despite great signal on calls,sms etc - & if somehow solving no signal rise then CPU usage rising on screen-off in power manager stock (048,062,232,233,244,251,252) .... flashing stock bootloader lock, unlock, QCN, ota etc.... WHAT IS CORRECT WAY TO FLASH MODEM SO BATTERY WON'T DRAIN ON SCREEN OFF ?
Have no idea what you're talking about, not really into android/Los coding

5) Have you tried flashing p2c72 CN(nougat) on p2a42 ? Your baseband version 20r, 6r, 13r ?
No I didn't. I have flashed that image I posted on two P2c72. Please let me know if it works on a p2a42

6) As per your experience most stable, BEAST SOT BATTERY friendly, In CALL audio recording --- Los--14,15,16,17,18,19..or Deodex 7.0....?
I've tried stock and from 16 onwards. Have to say: probably stock is the SOTtest, but I personally won't go back at all, mainly for app support. Needed to go back on those two spare devices because the replacement screens were burning (literally on fire) with new kernels; never understood why but yet never researched.
16 was SOTting very well but personally I like 18.1 stability, smoothness and features, and looking forward for 19..(@mikeioannina ?)

Sorry for too many questions...
Sorry to not be able to answer all of them, but you are more than welcomed!
 

hk73

Senior Member
Dec 16, 2017
67
1
If I remember correctly I've used twrp on one and fastboot on the other, but it should really be the same I think.



Didn't flash it because the two .so files inside the Astridxx solution I don't know were are coming from and @Astridxx didn't answer. I didn't even find the project on GitHub.
Ok... tried few hours ago but no difference in my case
Unfortunately just last week thieves have broken into my house, also stealing those two spare devices, so I don't remember very clearly, but I think the 7.0 I've linked some days ago has the PlayStore and everything. Maybe question for @dbrlsn
I think i feel more bad than you because your sot & baseband info's maybe could have guided me in right direction & would have made my restoration process TIMELIER.....
yukle.exe is file we get in stock 048 restoration firmware....by username abhay but now it's no more available...that file saved me Lot's of time because it restore stock great than other flash.all (lock -bootloader) or start.bat (unlock bootloader)......but i got fluke to get it back no one here uploading its just size in kb's
Have no idea what you're talking about, not really into android/Los coding

Ok.


No I didn't. I have flashed that image I posted on two P2c72. Please let me know if it works on a p2a42
Sorry didn't understand -you have p2c72 or p2a42 ? Have you flashed or posted ? In any case essence of question how is your experience on CHINESE nougat Firmware ?

I've tried stock and from 16 onwards. Have to say: probably stock is the SOTtest, but I personally won't go back at all, mainly for app support. Needed to go back on those two spare devices because the replacement screens were burning (literally on fire) with new kernels; never understood why but yet never researched.
16 was SOTting very well but personally I like 18.1 stability, smoothness and features, and looking forward for 19..(@mikeioannina ?)
You mean screen on time best on los 16 than stock nougat or deodex nougat ?
Sorry to not be able to answer all of them, but you are more than welcomed!
😉 You given time to reply is appreciated.....👍
 

x_fight

Member
Jan 27, 2010
22
24
Como
someone can add the step to install certificate to request oem unlock
https://forums.lenovo.com/t5/P2-P2a42-Smartphones/bootloader-unlock/m-p/5052203
it wasn't easy to find that information

1. you go to this site with a Desktop Firefox: https://unlockrowapi.lenovo.com

2. It is ok that it says 'Error 400 Bad Request' etc...

3. Click on the 'Secure Lock' left to the address

4. Click on 'Connection is Secure'

5. Click on 'More Information'

6. Click on 'Show Certificate'

7. Then Download all Certificates on all Tabs left to right 'unlockrowapi.lenovo.com', 'Secure Site Pro CA G2', 'DigiCert Global Root CA'

Then you have all the needed Certificates.

8. Move certificate on phone

9. Then, on the Lenovo P2, import the issuer certificate by navigating to Settings->Security->Credential Storage->Install From Storage.
The phone will open up a file browser intent, where you can select the certificate. It will then ask you how you want to import the certificate. Choose "VPN / apps". You can give it any name you like afterwards.
 

bojkonil

Member
Dec 16, 2021
6
3
Regarding battery drain issues and deep sleep drain in particular.
I remember It's been discussed before but maybe some people missed it, others may be unwilling to tinker with the kernel, or are just too busy to go into it, but alirazaagha mentioned fixing the battery drain issues by flashing BlaZeMaX kernel. Sadly my phone glitched every time i tried one of the versions but 1 thing stuck with me. Max frequency BlaZeMaX kernel allows is 2208Mhz while LOS's kernel is set to 2016Mhz.
So recently I decided to give BlaZeMaX kernel another try, just play around with the max frequency and voltages.
So far i've been unable to make my phone stable at 2208Mhz, but I have no issues at lower frequencies.
And best of all - deep sleep battery drain is gone.
Now it drains only 1-2% per night and overall experience is same as LOS16.
My current settings are Min Frequency 1036Mhz, Max Frequency - 2150Mhz. Alucard governor.
 
  • Like
Reactions: InsideShocker
Jan 10, 2013
32
1
Regarding battery drain issues and deep sleep drain in particular.
I remember It's been discussed before but maybe some people missed it, others may be unwilling to tinker with the kernel, or are just too busy to go into it, but alirazaagha mentioned fixing the battery drain issues by flashing BlaZeMaX kernel. Sadly my phone glitched every time i tried one of the versions but 1 thing stuck with me. Max frequency BlaZeMaX kernel allows is 2208Mhz while LOS's kernel is set to 2016Mhz.
So recently I decided to give BlaZeMaX kernel another try, just play around with the max frequency and voltages.
So far i've been unable to make my phone stable at 2208Mhz, but I have no issues at lower frequencies.
And best of all - deep sleep battery drain is gone.
Now it drains only 1-2% per night and overall experience is same as LOS16.
My current settings are Min Frequency 1036Mhz, Max Frequency - 2150Mhz. Alucard governor.
What software did you use to adjust CPU settings?
 
Jan 10, 2013
32
1
Use SmartPack-Kernel Manager, it is a heavily modified version of Kernel Adiutor developed by Willi Ye.
Thanks - heard of it but will give it a try. Planning to revert my P2 back to original stock and OTA it to the latest before re-flashing Lineage. Hoping a scorched-earth reboot will solve a few issues it may have picked up through tinkering...
 

hnsaba

Senior Member
Sep 17, 2017
104
26
Is it possible to flash a custom kernel on this ROM (official LOS with encrypted data)?

Edit: yes it went without any problem. I compiled LOS kernel with GCC 10 and flashed.
 
Last edited:

amdyss

Senior Member
Jun 15, 2017
528
90
Bialystok
Had an issue with the latest update. As usual the package downloaded, reboot to twrp and then phone fail to boot up. Had to install previous build manually.
 

bgxx

Member
Jul 23, 2013
20
6
Lenovo P2
Had an issue with the latest update. As usual the package downloaded, reboot to twrp and then phone fail to boot up. Had to install previous build manually.
FYI, I had no issue with the latest update. Procedure is the same, package download, start update, reboot to twrp (ver. 3.5.2_9-0) and then boot. Everything is working properly.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Next build will be including the battery drain fix, sorry it took so long I haven't really checked this thread in a long time.
    4
    Will we get LineageOS 19.0?
    At the current state, no. 3.18 kernel is missing essential functionality for android 12. I have started some experiments with 4.9 kernel here: https://github.com/mikeNG/android_kernel_lenovo_msm8953/commits/lineage-18.1-4.9

    It's in very early state so I can't promise that will ever become fully functional. At the moment I have only tested recovery booting and display/volume button navigation work, however usb and touch aren't working so I can't debug much further yet.
    3
    First, thanks a lot for your work. Having 4.9 on our device would be a great advancement. The hardware is still capable with the day's standards for a mid-range phone so please keep it going.
    Second, I have started porting 4.9 to our device in the past week (It is my first experience with porting a kernel to an android phone). I cloned the latest CAF tag for msm8953 (64 bit, android 11)and ported some parts of code like the lenovo camera v2 to it. I compiled it with GCC10 successfully. Other hardware driver seem to be present on the CAF (I may be wrong here). But wit a similar configuration of kernel with 3.18 (and also with adapted msm8953-perf_defconfig), it does not boot and will reboot just after "fastboot boot boot.img". I used dts from 3.18.140 tree.
    Telling the above story, I want to say that I will be happy if I could provide any help.

    Best of luck.

    Edit: I replaced old dts files with new ones from your repo. Now after issuing "fastboot boot boot.img" phone seems to hang after a short vibration and blue led lights up. (pressing the power button for a few seconds makes device reboot to its previous healthy state)
    You should probably just switch to the whole kernel, it has required commits to boot on kuntao (eg. https://github.com/mikeNG/android_k...mmit/619498f1ac595610b454f8afb14118d2c4b57601 )

    So far it's missing charger driver (doesn't compile on 4.9 so it's disabled in defconfig), camera stack isn't ported (needs API hacks in order for old userspace blobs to be compatible) and OTG support is missing (required commit wasn't compiling on 4.9). Also some parts of dts are commented out but I don't remember a lot about these commits in general, I started this project originally in summer 2020 but abandoned it until now where I added the above linked commit that fixes the basic boot issue.
    1
    We will miss you...
    How it became so irreparable?
    It happened 2 and a half weeks ago.
    I was in conversation with a person who had just contacted me, when the conversation was suddenly cut off.
    I tried to call this person back several times but nothing happened.
    I couldn't hear anything anymore : no ringstone.
    I tried to send a SMS, but nothing happened.
    I also tried to send an email, but nothing happened.

    I went to a well-known repairer in my region who did a lot of testing, in my presence (it took a lot of time).
    His conclusion was : maybe I can fix the phone except for the internal memory, but it will definitely cost you more than buying a new one.

    Namely, this repairer does not sell new smartphones.
    1
    At the current state, no. 3.18 kernel is missing essential functionality for android 12. I have started some experiments with 4.9 kernel here: https://github.com/mikeNG/android_kernel_lenovo_msm8953/commits/lineage-18.1-4.9

    It's in very early state so I can't promise that will ever become fully functional. At the moment I have only tested recovery booting and display/volume button navigation work, however usb and touch aren't working so I can't debug much further yet.

    First, thanks a lot for your work. Having 4.9 on our device would be a great advancement. The hardware is still capable with the day's standards for a mid-range phone so please keep it going.
    Second, I have started porting 4.9 to our device in the past week (It is my first experience with porting a kernel to an android phone). I cloned the latest CAF tag for msm8953 (64 bit, android 11)and ported some parts of code like the lenovo camera v2 to it. I compiled it with GCC10 successfully. Other hardware driver seem to be present on the CAF (I may be wrong here). But wit a similar configuration of kernel with 3.18 (and also with adapted msm8953-perf_defconfig), it does not boot and will reboot just after "fastboot boot boot.img". I used dts from 3.18.140 tree.
    Telling the above story, I want to say that I will be happy if I could provide any help.

    Best of luck.

    Edit: I replaced old dts files with new ones from your repo. Now after issuing "fastboot boot boot.img" phone seems to hang after a short vibration and blue led lights up. (pressing the power button for a few seconds makes device reboot to its previous healthy state)
  • 25
    Code:
    #include <std_disclaimer.h>
    /*
    * Your warranty is now void.
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.
    *

    Installation:
    If you are on stock OS, you need a custom recovery first. You can get the recommended LineageOS recovery in the official installation instructions link below.
    You can use TWRP for installation, however it is no longer officially supported since we do not have full control of its update cycle and potential issues.
    Previous recommended TWRP image: twrp-3.2.3-20190209-kuntao.img

    If you are coming from stock or other ROMs, you need to make a factory reset.
    As always, make sure to backup before installing this ROM.

    Detailed installation instructions:
    Install LineageOS on kuntao

    Detailed upgrade instructions from previous version:
    Upgrade LineageOS on kuntao

    Download link:
    LineageOS Downloads

    Recommended Google Apps package:
    MindTheGapps (choose ARM64 11.0 zip)

    Changelog:
    Changes for kuntao

    Bug reports:
    How to submit a bug report
    LineageOS GitLab

    Donate to support development:
    Donate via PayPal to mikeioannina
    Donate via PayPal to LineageOS

    Source Code:
    https://github.com/LineageOS

    ROM Firmware Required:
    Any version of stock 6.0. Recommended P2a42_S251_171107_ROW
    10
    Builds will be available once next weekly build cycle starts.
    8
    Next build will be including the battery drain fix, sorry it took so long I haven't really checked this thread in a long time.
    4
    Will we get LineageOS 19.0?
    At the current state, no. 3.18 kernel is missing essential functionality for android 12. I have started some experiments with 4.9 kernel here: https://github.com/mikeNG/android_kernel_lenovo_msm8953/commits/lineage-18.1-4.9

    It's in very early state so I can't promise that will ever become fully functional. At the moment I have only tested recovery booting and display/volume button navigation work, however usb and touch aren't working so I can't debug much further yet.
    4
    @mikeioannina

    Minimum CPU frequency of both clusters locked at 1036 MHz on los 18.1

    Causing that error:
    ANDR-PERF: Unable to link to gPerfHal death notifications!