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

Search This thread

RAVINTER

Member
Mar 12, 2021
18
8
Today im installed latest build from 25 October, and i see my battery drain quickly, in cpu spy i see that phone not use 652Mhz and 1036Mhz, anybody have that problem too or just me? Edit: Installed this same build once again and now lower frequencies fix but 1958Mhz not used now 🤣 Edit : Its only works for 2 minutes now back to previous situation... I try downgrade to lower build number.
 
Last edited:
  • Like
Reactions: eried1

eried1

Senior Member
May 27, 2016
420
60
Stockholm
Today im installed latest build from 25 October, and i see my battery drain quickly, in cpu spy i see that phone not use 652Mhz and 1036Mhz, anybody have that problem too or just me?
Clean flash when installing the rom followed by wiped cache usually take care of my battery problems. Gsam and AccuBatt are great if you need to investigate further and track down different culprits.
 

RAVINTER

Member
Mar 12, 2021
18
8
Clean flash when installing the rom followed by wiped cache usually take care of my battery problems. Gsam and AccuBatt are great if you need to investigate further and track down different culprits.
Im always update this rom with clean cache only and never have problems. I have installed accubattery but this not solution for that. Im checking in kernel adiutor clocks and set to 652Mhz minimal cpu frequency, but this not change anything.
 

RAVINTER

Member
Mar 12, 2021
18
8
Anyone have zips with older builds than lineage-18.1-20221002-nightly-kuntao-signed.zip and can share?
 

eried1

Senior Member
May 27, 2016
420
60
Stockholm
How's everyone idle discharge? In deep sleep I get 0.3-0.4% per hour. That is almost three times more than what I had on stock.

I use the universal GMS magisk module and Naptime to attempt to improve idle battery time.
 

eried1

Senior Member
May 27, 2016
420
60
Stockholm
Today im installed latest build from 25 October, and i see my battery drain quickly, in cpu spy i see that phone not use 652Mhz and 1036Mhz, anybody have that problem too or just me? Edit: Installed this same build once again and now lower frequencies fix but 1958Mhz not used now 🤣 Edit : Its only works for 2 minutes now back to previous situation... I try downgrade to lower build number.
That problem was fixed in January this year. Hmm. Must have been triggered again somehow.
 

eried1

Senior Member
May 27, 2016
420
60
Stockholm
I installed latest LOS on my friend's Lenovo P2. No root, stock LOS only. Google Pay, and banking apps work. SafetyNet passed (basic integrity, and CTS passed). But there is that one app, which doesn't want to start, because it's saying that system is modified or rooted. I think device fingerprint could be the problem. I was also considering rooting it and trying to use MagiskHideProps module, however there is no Lenovo's fingerprint in there. Does anyone have stock fingerprint, or have any idea how to make it work?
The app itself is local app for paying for highway (Autopay), we are from Poland.

Below are screenshot from Momo app.
Some apps are overly sensitive to custom ROMs. In Denmark I cannot use MItID no matter what tricks I pull. It somehow extracts the Lineage OS build and says that I'm rooted.
 

eried1

Senior Member
May 27, 2016
420
60
Stockholm
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.
Mike, would it be possible for someone else to take over where you left off?
 

Savonarolo

New member
Dec 12, 2022
3
0
I've followed the install instructions but I'm stuck on "patching vendor image unconditionaly...". Can anyone help?
 

en666

Senior Member
Apr 23, 2011
91
53
Lenovo p2c72, twrp 3.6.2_9-0, magisk 23.0, ext4 partitions, updated to 2022-10-23 with the updater app. Needed to restart a couple of times but then everything's smooth. Thanks for your work Mike.

So, I'm here to give my 1pence. Given atm lineageos build for this still pretty good device has been abruptly interrupted, I've managed to build the 18.1 image by myself, it's unofficial and not signed but it contains last changes and 5 Dec 2022 security string.

Bear with me, it's the first time I've built an android image from source so basically everything is still new to me and I don't have the skills nor the time to fix problems in the code.

I've installed it on a spare p2a42 I have and it worked (needed to restart couple of times clearing cache though)

 

eried1

Senior Member
May 27, 2016
420
60
Stockholm
Good effort, @en666! Greatly appreciated. It's a reliable basic daily driver even today.

Looking at the Android smartphone market I can't find a good replacement. We should do what we can to preserve this beloved baby of ours.

To anyone who wants to prolong the life of P2, the OEM batteries look like this, note specifically the logo:

100-Original-5000mAh-BL262-Battery-For-Lenovo-Vibe-P2-P2C72-P2A42-Mobile-Phone-Replacement-Batteries-Bateria-1.jpg_Q90-1.jpg_-1.jpg



Make sure the seller is reputable.
 
  • Like
Reactions: hnsaba

en666

Senior Member
Apr 23, 2011
91
53
Lenovo p2c72, twrp 3.7.0_9-0, magisk 23.0, ext4 partitions, updated to 2022-12-19 flashing my unofficial image posted above on my daily drive p2. Needed to restart a couple of times, manually clearing the cache, but then everything's smooth, including banking apps and Google pay.

@mikeioannina I know you don't maintain this anymore but thank you for your precious previous work. If you can make it into a monthly build, then it'll be great for still almost a year.
 
  • Like
Reactions: hnsaba and eried1

eried1

Senior Member
May 27, 2016
420
60
Stockholm
Lenovo p2c72, twrp 3.7.0_9-0, magisk 23.0, ext4 partitions, updated to 2022-12-19 flashing my unofficial image posted above on my daily drive p2. Needed to restart a couple of times, manually clearing the cache, but then everything's smooth, including banking apps and Google pay.

@mikeioannina I know you don't maintain this anymore but thank you for your precious previous work. If you can make it into a monthly build, then it'll be great for still almost a year.
Question: Why Magisk 23 and not 25?

Edit: Monthly builds would be great, but I'd settle for quarterly just to keep it alive. Since it is officially dropped devs have focus elsewhere.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 10
    I planned to enable monthly 18.1 builds, however the kernel is missing 2 whole years of security patches at this point. 4.9 kernel port has had no progress at all and now 4.9 is also end of life...

    Honestly not sure what to do here, I am extremely busy nowadays and don't really have time to go through 2+ years of Android Security Bulletins and apply the missing kernel patches.
    8
    First, thanks for following up the development of this worthy device and expressing your concerns.

    About the kernel, wouldn't it be better to base the work on one of the CAF android kernels which have SLTS support for example 4.19 or 5.10 (which have support until 2029 and 2030 and already include all security and functionality patches) and then only port kuntao's specific drivers to it (including camera, charger, touch, ...)?
    IMHO, this approach is far better and more straightforward in comparison to cherry picking more than 2 years of left patches and port them to an old kernel.
    In theory it's easy but in practice there are certain difficulties in porting a new kernel.

    QCOM has released 4.9 kernel that supports msm8953 SoC, but it depends on firmware and proprietary blob updates which we will obviously not get from lenovo. That can be bypassed by writing some compatibility layers in kernel to make older blobs work, and in other cases update some blobs from other devices to make it work.

    Then you have the device specific drivers that need to ported and adapted to new kernel ABI. which is also hard.

    After doing all that and making everything fully work, you are still left with 4.9 kernel which is EOL and you are left on old android version because our proprietary blobs are too old in some cases (for example camera) and they can't work easily on new android versions.

    Porting an even newer kernel like 4.19 would require also porting the base drivers for msm8953 SoC support which could also take quite a while to do properly.

    I have posted my work in progress 4.9 kernel a year ago here https://github.com/mikeNG/android_kernel_lenovo_msm8953/commits/lineage-18.1-4.9
    and nobody else seems to be interested. I have almost 30 phones to maintain now for lineage and work, so I don't really have time to dedicate and do this alone.
    4
    In theory it's easy but in practice there are certain difficulties in porting a new kernel.

    QCOM has released 4.9 kernel that supports msm8953 SoC, but it depends on firmware and proprietary blob updates which we will obviously not get from lenovo. That can be bypassed by writing some compatibility layers in kernel to make older blobs work, and in other cases update some blobs from other devices to make it work.

    Then you have the device specific drivers that need to ported and adapted to new kernel ABI. which is also hard.

    After doing all that and making everything fully work, you are still left with 4.9 kernel which is EOL and you are left on old android version because our proprietary blobs are too old in some cases (for example camera) and they can't work easily on new android versions.

    Porting an even newer kernel like 4.19 would require also porting the base drivers for msm8953 SoC support which could also take quite a while to do properly.

    I have posted my work in progress 4.9 kernel a year ago here https://github.com/mikeNG/android_kernel_lenovo_msm8953/commits/lineage-18.1-4.9
    and nobody else seems to be interested. I have almost 30 phones to maintain now for lineage and work, so I don't really have time to dedicate and do this alone.


    Thanks for describing the current situation and required steps for the future work.

    About the proprietary blobs, as far as I know (and it may be incorrect, so please you correct me), the blobs are loaded and used for API call by the device specific drivers, therefore if we have our specific drivers ported to a newer kernel, those drivers take the responsibility for loading those blobs and using them and we should not need compatibility layers. Again as said, I may be incorrect because I have a very shallow experience with android core so please let me know in that case.

    About porting those kuntao specific drivers to the newer kernel, last year I examined porting them to the QCOM's 4.9. API changes fortunately were not so horrible, sure it needs a good amount of focus, knowledge and experience and it is a demanding job, but it is not impossible if there is a strong will for development of a device, which usually it is there for new launched devices but not for an old device like Kuntao.

    I agree about your point toward porting msm8953 base drivers to e.g 4.19, as a time consuming job.

    About your last paragraph, unfortunately I only have this phone and it is my daily driver, so I could not be able to use it as a thorough test platform. I would be happy if I can provide any help, but the living situation is not promising at least currently to dedicate a specific time for this job. But please let me know if I can be of any help.

    Thanks again and regards ;)
    3
    Thanks for describing the current situation and required steps for the future work.

    About the proprietary blobs, as far as I know (and it may be incorrect, so please you correct me), the blobs are loaded and used for API call by the device specific drivers, therefore if we have our specific drivers ported to a newer kernel, those drivers take the responsibility for loading those blobs and using them and we should not need compatibility layers. Again as said, I may be incorrect because I have a very shallow experience with android core so please let me know in that case.

    About porting those kuntao specific drivers to the newer kernel, last year I examined porting them to the QCOM's 4.9. API changes fortunately were not so horrible, sure it needs a good amount of focus, knowledge and experience and it is a demanding job, but it is not impossible if there is a strong will for development of a device, which usually it is there for new launched devices but not for an old device like Kuntao.

    I agree about your point toward porting msm8953 base drivers to e.g 4.19, as a time consuming job.

    About your last paragraph, unfortunately I only have this phone and it is my daily driver, so I could not be able to use it as a thorough test platform. I would be happy if I can provide any help, but the living situation is not promising at least currently to dedicate a specific time for this job. But please let me know if I can be of any help.

    Thanks again and regards ;)
    More than happy to send you a testing p2 device if you have the skills to do the job!


    Hi. I want to download the newest LineageOS rom, but as you all know, LineageOS dropped support and download from their site isn't possible anymore. Is this site reliable? If not, where can i download the newest rom?
    Latest official 2022-10-23:

    Latest unofficial 2022-12-19 (compiled by me):
    1
    I planned to enable monthly 18.1 builds, however the kernel is missing 2 whole years of security patches at this point. 4.9 kernel port has had no progress at all and now 4.9 is also end of life...

    Honestly not sure what to do here, I am extremely busy nowadays and don't really have time to go through 2+ years of Android Security Bulletins and apply the missing kernel patches.
    First, thanks for following up the development of this worthy device and expressing your concerns.

    About the kernel, wouldn't it be better to base the work on one of the CAF android kernels which have SLTS support for example 4.19 or 5.10 (which have support until 2029 and 2030 and already include all security and functionality patches) and then only port kuntao's specific drivers to it (including camera, charger, touch, ...)?
    IMHO, this approach is far better and more straightforward in comparison to cherry picking more than 2 years of left patches and port them to an old kernel.
  • 30
    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
    12
    Builds will be available once next weekly build cycle starts.
    10
    I planned to enable monthly 18.1 builds, however the kernel is missing 2 whole years of security patches at this point. 4.9 kernel port has had no progress at all and now 4.9 is also end of life...

    Honestly not sure what to do here, I am extremely busy nowadays and don't really have time to go through 2+ years of Android Security Bulletins and apply the missing kernel patches.
    10
    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.
    8
    First, thanks for following up the development of this worthy device and expressing your concerns.

    About the kernel, wouldn't it be better to base the work on one of the CAF android kernels which have SLTS support for example 4.19 or 5.10 (which have support until 2029 and 2030 and already include all security and functionality patches) and then only port kuntao's specific drivers to it (including camera, charger, touch, ...)?
    IMHO, this approach is far better and more straightforward in comparison to cherry picking more than 2 years of left patches and port them to an old kernel.
    In theory it's easy but in practice there are certain difficulties in porting a new kernel.

    QCOM has released 4.9 kernel that supports msm8953 SoC, but it depends on firmware and proprietary blob updates which we will obviously not get from lenovo. That can be bypassed by writing some compatibility layers in kernel to make older blobs work, and in other cases update some blobs from other devices to make it work.

    Then you have the device specific drivers that need to ported and adapted to new kernel ABI. which is also hard.

    After doing all that and making everything fully work, you are still left with 4.9 kernel which is EOL and you are left on old android version because our proprietary blobs are too old in some cases (for example camera) and they can't work easily on new android versions.

    Porting an even newer kernel like 4.19 would require also porting the base drivers for msm8953 SoC support which could also take quite a while to do properly.

    I have posted my work in progress 4.9 kernel a year ago here https://github.com/mikeNG/android_kernel_lenovo_msm8953/commits/lineage-18.1-4.9
    and nobody else seems to be interested. I have almost 30 phones to maintain now for lineage and work, so I don't really have time to dedicate and do this alone.