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

Search This thread

en666

Senior Member
Apr 23, 2011
98
67
The monthly build idea for @mikeioannina comes from this Gerrit message:


Which makes a point in saying that abandoned projects can be still on the official LineageOS monthly build pipelines, so to prolong the distro for about a year. Let's keep the fingers crossed for @mikeioannina to read our comments here!

I keep magisk v23 because since v24 the owner deprecated and removed the embedded 'hide' functionality, now coming with a third party module.
The 'hide' together with disabling Magisk manager (I've made an Automate script for this, Post in thread '[How To] Bypass Lloyds and Santander Root Detection' https://forum.xda-developers.com/t/...antander-root-detection.3837206/post-87421041) still work great for my banking apps!
 

eried1

Senior Member
May 27, 2016
432
67
Stockholm
The monthly build idea for @mikeioannina comes from this Gerrit message:


Which makes a point in saying that abandoned projects can be still on the official LineageOS monthly build pipelines, so to prolong the distro for about a year. Let's keep the fingers crossed for @mikeioannina to read our comments here!

I keep magisk v23 because since v24 the owner deprecated and removed the embedded 'hide' functionality, now coming with a third party module.
The 'hide' together with disabling Magisk manager (I've made an Automate script for this, Post in thread '[How To] Bypass Lloyds and Santander Root Detection' https://forum.xda-developers.com/t/...antander-root-detection.3837206/post-87421041) still work great for my banking apps!
Thanks for the disabling idea! Will have to try it out. Think I've done it before, but without success for a very stubborn bank app that detects LOS. Should be done using different combos of modules, apps and specific magisk settings.
 

mikeioannina

Recognized Developer
Mar 22, 2011
1,969
27,112
Ioannina
Lenovo P2
Xiaomi Mi Mix 2
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.
 

hnsaba

Senior Member
Sep 17, 2017
112
36
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.
 
Last edited:
  • Like
Reactions: mahmutpekkara

omginput

New member
Jan 5, 2023
2
0
First, thanks for following up the development of this worthy device and expressing your concerns.

About the kernel, wouldn't it 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.
Sounds not bad
 

mikeioannina

Recognized Developer
Mar 22, 2011
1,969
27,112
Ioannina
Lenovo P2
Xiaomi Mi Mix 2
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.
 

hnsaba

Senior Member
Sep 17, 2017
112
36
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 ;)
 

Gigantus198

New member
Dec 27, 2018
2
0
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?
 

en666

Senior Member
Apr 23, 2011
98
67
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):
 

hnsaba

Senior Member
Sep 17, 2017
112
36
More than happy to send you a testing p2 device if you have the skills to do the job!

Thanks a lot for your generous help toward development of this device!

As I said in the last paragraph of my previous post, the personal life situation is currently pressuring so I can't dedicate a specific time to this job. On the other hand my experience with android core development is shallow, therefore even if I have a test device, I would not be able to play a meaningful role alone without help of an expert ;(
 

RAVINTER

Member
Mar 12, 2021
21
8
@mikeioannina Can u send me older weekly builds than this: lineage-18.1-20221002-nightly-kuntao-signed.zip You delete all form github and i can't downgrade now, i need older builds because newest works very bad for me.
 

en666

Senior Member
Apr 23, 2011
98
67
@mikeioannina Can u send me older weekly builds than this: lineage-18.1-20221002-nightly-kuntao-signed.zip You delete all form github and i can't downgrade now, i need older builds because newest works very bad for me.

I do not have the one you've requested, but these are some older packages:

lineage-18.1-20220626-nightly-kuntao-signed.zip

lineage-18.1-20221016-nightly-kuntao-signed.zip

lineage-18.1-20221023-nightly-kuntao-signed.zip
 
  • Like
Reactions: hnsaba

RAVINTER

Member
Mar 12, 2021
21
8

en666

Senior Member
Apr 23, 2011
98
67
@RAVINTER , thanks to @leo_97 I've recently discovered the unofficial LOS 19.1 (android 12) for our beloved P2 and so far I find it perfect, even the alarm clock started to work again when the device is switched off, like on the stock, and the battery drain is gone. You may give it a try! You'll need to reset your phone though, didn't find a way to do a dirty flash.

 

Top Liked Posts

  • 1
    By newest you mean 18.1? What worked badly on it for you? I'm still on 15.1 and wondering if any upgrade is worth it, like if the newer ones don't ruin autonomy or something.


    How much battery drain is gone? I saw someone up-thread recommending LOS 16 for max battery, would you say this 19.1 is comparable to that?

    I'm thinking of upgrading from 15.1 because of all the security improvements added since then, but ideally without increasing battery drain since I'm already at 81% capacity after 5 years of usage.

    @donjoe0 if you're concerned about security, then the latest OFFICIAL los release is 18.1, it was maintained by mikeioannina and then discontinued a few months ago because P2 kernel is old and requires lot of effort to move it forward.
    Compared to 15.1, 18.1 battery drain was ok, not exceptional. Say 35-40 hours life with a little more than 8h of sot.

    Unofficial roms are a couple of following builds for los18.1, los 19.1, based on android 12, and los 20, based on android 13, thanks to @leo_97

    I have tried to summarise years of P2 LOSes for you, hope to have been useful.
  • 1
    By newest you mean 18.1? What worked badly on it for you? I'm still on 15.1 and wondering if any upgrade is worth it, like if the newer ones don't ruin autonomy or something.


    How much battery drain is gone? I saw someone up-thread recommending LOS 16 for max battery, would you say this 19.1 is comparable to that?

    I'm thinking of upgrading from 15.1 because of all the security improvements added since then, but ideally without increasing battery drain since I'm already at 81% capacity after 5 years of usage.

    @donjoe0 if you're concerned about security, then the latest OFFICIAL los release is 18.1, it was maintained by mikeioannina and then discontinued a few months ago because P2 kernel is old and requires lot of effort to move it forward.
    Compared to 15.1, 18.1 battery drain was ok, not exceptional. Say 35-40 hours life with a little more than 8h of sot.

    Unofficial roms are a couple of following builds for los18.1, los 19.1, based on android 12, and los 20, based on android 13, thanks to @leo_97

    I have tried to summarise years of P2 LOSes for you, hope to have been useful.
  • 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.