[ROM][10][OFFICIAL] LineageOS 17.1 for P2

Search This thread

eried1

Senior Member
May 27, 2016
279
20
Stockholm
I am still on stock Nougat, thinking of upgrading to either 9.0 or 10. Is the FM radio really that much of culprit in draining battery life? I am assuming 10 simply requires more juice. One could of course try and tweak CPU settings, but this seems like a common issue among all Android users, not only this ROM.
 
Last edited:

en666

Member
Apr 23, 2011
41
20

P2c72, Los 17.1 20210221, twrp 3.5.0, ext4 (no pin), magisk.

"Nope" for me as well.

What I have tried:
I literally removed the app using total commander (as root) from /system/priv-app/FMRadio/. Over the days nothing has really changed in terms of battery drainage. Average ~36hours with ~8:30 on screen; usual Android10 drain trend in my case.
 

Kielbek

Senior Member
Nov 29, 2012
201
113
Yes, if you dislike idle drain, dont know why a phone needs to drain battery this much when its not being used? And why does the FM radio need to drain battery when its not even being used?
It doesn't. Looking on the history of P2 forum, you're only trying to assume that this is the problem. One guy posted that his SoT increased by 1 hour, another dude said something about permissions and hurr durr, it's FM fault for sure!
Give me the hard facts. If you're basing your theory on post of random person then we don't have anything to talk about. Lots of people on xda post such stupid things about battery life after installing weekly update. You need to make longer tests in similiar conditions to prove anything, not 1 charge like this dude mentioned. Boring.
 

hnsaba

Senior Member
Sep 17, 2017
77
23
The best battery backup was on the LOS-16, it was really above expectations. I hope Mike or any other experienced man can find the cause of this decrease and resolve it. That is boring on such a capable device.
 

cara7mel

Member
Jan 27, 2021
14
3
It doesn't. Looking on the history of P2 forum, you're only trying to assume that this is the problem. One guy posted that his SoT increased by 1 hour, another dude said something about permissions and hurr durr, it's FM fault for sure!
Give me the hard facts. If you're basing your theory on post of random person then we don't have anything to talk about. Lots of people on xda post such stupid things about battery life after installing weekly update. You need to make longer tests in similiar conditions to prove anything, not 1 charge like this dude mentioned. Boring.

I beg to differ…

I’m a long time (20+ years) CB & ham radio user. A radio device, regardless of frequency, with a poor or no antenna uses more power and drains the battery quickly. On same principle in the remote areas the phone “chase” the cell towers signal, does a lot of tower chasing / switching and uses more battery. In such remote areas is recommended to switch the phone OFF or use air-plane mode to save battery!

Remember that P2 oem software phone has a function for the button on left side to switch to power save mode when all background apps are OFF to save battery!

The P2 phone uses the headset as antenna for FM Radio app and most of the time the headset (antenna) is not plugged in. The FM Radio app might scan, when the phone is idle, in the background 24/7 for FM radio stations.

On the same analogy what are the details and the hard facts why a simple FM Radio receiver app needs to be ON all time on the background 24/7 use CPU time/power and have such system level permissions for location (GPS receiver) microphone and telephone?

The FM Radio app permissions were changed to system app level on 6 May 2020, that is 2 weeks from the Lineage OS 17.1 release. The last lineage OS 16.0 release (19 April 2020) the FM Radio app did not require any special permissions.

Coincidences? Maybe? Maybe not!?!?

I’m sure that everyone agree that a clean and lean operating system with no bloatware is more power efficient and uses less battery!

PS I'm the dude who said something about permissions... :);):cool:
 
Last edited:

cara7mel

Member
Jan 27, 2021
14
3
Im on mokee 9 and battery drain is 2% over night so FM Radio is not a problem for me.

Having a different OS can make THE difference!

There is NO battery drain and NO problems with FM Radio in Lineage OS 16.0 (Android 9)
In this screenshot are the FMRadio app permissions in LineageOS 17.1 from P2a42 January 2021 build.

FMRadio_info.png


Can you post a screenshoot from your phone and give some details about mokee 9 OS ?
 
Last edited:

Sutcliffe9

Senior Member
Mar 13, 2014
725
170
Leeds
Having a different OS can make THE difference!

There were battery drain and no problems with FM Radio in Lineage OS 16.0 (Android 9)
In this screenshot are the FMRadio app permissions in LineageOS 17.1 from P2a42 January 2021 build.

View attachment 5240045

Can you post a screenshoot from your phone and give some details about mokee 9 OS ?
 

Attachments

  • Screenshot_20210304-200728.jpg
    Screenshot_20210304-200728.jpg
    709.8 KB · Views: 42
  • Screenshot_20210304-200711.jpg
    Screenshot_20210304-200711.jpg
    804.4 KB · Views: 42
  • Screenshot_20210304-200739.jpg
    Screenshot_20210304-200739.jpg
    241.3 KB · Views: 41
  • Screenshot_20210304-200754.jpg
    Screenshot_20210304-200754.jpg
    211.1 KB · Views: 42

Kielbek

Senior Member
Nov 29, 2012
201
113
I’m a long time (20+ years) CB & ham radio user. A radio device, regardless of frequency, with a poor or no antenna uses more power and drains the battery quickly. On same principle in the remote areas the phone “chase” the cell towers signal, does a lot of tower chasing / switching and uses more battery. In such remote areas is recommended to switch the phone OFF or use air-plane mode to save battery!

Remember that P2 oem software phone has a function for the button on left side to switch to power save mode when all background apps are OFF to save battery!

The P2 phone uses the headset as antenna for FM Radio app and most of the time the headset (antenna) is not plugged in. The FM Radio app might scan, when the phone is idle, in the background 24/7 for FM radio stations.
What? Cool, but stop philosophizing. I don't care about what you do, so that essay is completely unnecessary as in the end it is completely unrelated and has nothing to do with the case. You're assuming something on your theoretical knowledge, not testing.

On the same analogy what are the details and the hard facts why a simple FM Radio receiver app needs to be ON all time on the background 24/7 use CPU time/power and have such system level permissions for location (GPS receiver) microphone and telephone?
Again, you're making assumptions that FM Radio does something (which it doesn't btw.) with no hard evidence. You didn't do any tests to confirm that it's AOSP radio fault, and I'm sure of that, because otherwise you would've share your results already. Instead, you're trying to defend your point with this unrelated wall of text and prove something... yeah, what?

The FM Radio app permissions were changed to system app level on 6 May 2020, that is 2 weeks from the Lineage OS 17.1 release. The last lineage OS 16.0 release (19 April 2020) the FM Radio app did not require any special permissions.

Coincidences? Maybe? Maybe not!?!?
Sure. I don't know if you already realised this (apparently not), but this change is project-wise, it was commited on 16.0 branch, and most importantly - it applies to ALL of the devices. Even better, this change is applied to other ROMs aswell. It's completely unrelated to what you reported about permissions aswell. That doesn't matter though as content of this commit is thing from the past anyway.
This clearly says that you're incapable of reading with understanding.

Permissions you're seeing in settings are built into FM app for years. They were just overriden back then by that xml. However, this commit changed it all. So you're seeing permissions that FM app have defined in its manifest. But again, this applies to all of the devices.
Not to mention that included vendor apps (/system/priv-app) do have root-level permissions anyways.
And no, third party apps can't exploit this, so this ain't an attack vector.

I’m sure that everyone agree that a clean and lean operating system with no bloatware is more power efficient and uses less battery!
Cool story. Maybe strip your OS to the bare minimum in such case, like some people do, build it and enjoy your "lightweight and power efficient" broken OS. Don't forget to add battery booster scripts and other crap. Not like the official builds are bloat-free already and completely fine on that matter.

So yeah, what you're saying is all speculations and "maybe"s. You clearly not understand what are you talking about. I don't blame you for that, but if you wanna discuss such things, then drop your speculations and dig deeper, straight for the facts. Do some in-depth testing at least and research the topic.
Someone before you posted that removing FM app didn't change anything for him. I can tell you for sure that FM app presence doesn't matter too, based on facts. I would say it's 2 vs 1. "I think" and one, not very reliable report like "11 > 12h SoT" is just nothing. Battery endurance is fluctuating too much to say that 1h improvement in one test is something you can trust, lol. Even if I have BTS nearby and not going outside I experience very ranging results. People just tend to create such posts after installing weeklies/nightlies, even if literally nothing has changed between builds. They're experiencing big placebo like that often.

If you want to know my opinion on this, then I would call this thing as more probable:
I am assuming 10 simply requires more juice. One could of course try and tweak CPU settings, but this seems like a common issue among all Android users, not only this ROM.
There was huge jump in required specs to build a ROM starting from A10, then next one in A11. Maybe there was a jump for end-users devices too.
I can't tell for sure. It might be just a nasty bug too. 18.1 is too broken in current state for P2 to even consider testing if something has changed for better.
 
Last edited:
  • Like
Reactions: eried1

cara7mel

Member
Jan 27, 2021
14
3
There was huge jump in required specs to build a ROM starting from A10, then next one in A11. Maybe there was a jump for end-users devices too.
I can't tell for sure. It might be just a nasty bug too. 18.1 is too broken in current state for P2 to even consider testing if something has changed for better.


Thanks for details and to take your time to share your hands-on expertise, in-depth knowledge and insider Lineage OS 18 development status/issues.
 

Kielbek

Senior Member
Nov 29, 2012
201
113
Thanks for details and to take your time to share your hands-on expertise, in-depth knowledge and insider Lineage OS 18 development status/issues.
No problem. I'm not an insider though. I just built 18.1 on my own from sources that were available at the time of building to see where we are.
Can't say that I'm some kind of pro either. I just analyzed the topic a bit and checked out on these rumors if this makes any sense. It didn't, but I disabled FM radio feature completely anyway and checked this out, just to be sure. Android ports are hacky due to some parts of them being closed-source (thanks to OEMs), so it was worth giving it a shot, because some bugs are just weird and shouldn't be happening when you first look at it. That didn't make any difference though.
About these permissions... The commit you shared was kinda related to the thing, but you thought it added these "new" permissions for FM app. Commit itself didn't mention location permission for example. It's because it overriden FM app permissions actually and revoked it and rest of them. Since it was introduced on 16.0 tree, FM app in 16.0 builds, before it was merged, most likely had all of these permissions too. That's why they're unrelated to the battery drain at all. The latter commit I mentioned in my earlier post was introduced on 17.1 branch and it kinda reversed this behavior, so that's why you're seeing them again.
I can't tell why they can't be disabled and where this behavior is defined tho but it doesn't matter much as I said earlier.

You can also take a look at how priv-app allowlisting works in android documentation.
 

cara7mel

Member
Jan 27, 2021
14
3
No problem. I'm not an insider though. I just built 18.1 on my own from sources that were available at the time of building to see where we are.
Can't say that I'm some kind of pro either. I just analyzed the topic a bit and checked out on these rumors if this makes any sense. It didn't, but I disabled FM radio feature completely anyway and checked this out, just to be sure. Android ports are hacky due to some parts of them being closed-source (thanks to OEMs), so it was worth giving it a shot, because some bugs are just weird and shouldn't be happening when you first look at it. That didn't make any difference though.
About these permissions... The commit you shared was kinda related to the thing, but you thought it added these "new" permissions for FM app. Commit itself didn't mention location permission for example. It's because it overriden FM app permissions actually and revoked it and rest of them. Since it was introduced on 16.0 tree, FM app in 16.0 builds, before it was merged, most likely had all of these permissions too. That's why they're unrelated to the battery drain at all. The latter commit I mentioned in my earlier post was introduced on 17.1 branch and it kinda reversed this behavior, so that's why you're seeing them again.
I can't tell why they can't be disabled and where this behavior is defined tho but it doesn't matter much as I said earlier.

You can also take a look at how priv-app allowlisting works in android documentation.

Very interesting post…especially the bold sentence!

You admitted that are not an insider, neither a pro and for sure you don’t have the in depth-knowledge because you admitted that you don’t have a clue why the FM Radio permissions can not be disabled or where “this behaviour is defined”

Obviously you didn’t get it but my previous post is 100% pure irony for lack of etiquette definitely not a praise. I just tickle your ego, and give you more rope… Just a bait for a bully!

Q.E.D.
goodbye!
over and out
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    I might release some unofficial 18.1 builds for broader testing, I haven't had time to look into remaining issues yet.
    1
    LineageOS 18.1 is Released officially. But is not avalible for Lenovo P2 :(
    Major problems yet to be fixed for our P2. In case you haven't noticed, there is no 11 ROM for P2 working 100% yet, even though plenty of 11 ROMs have been released to the public. Wifi display is still not working and probably also some other things I don't know about.
    1
    version from 4.04 works for me, installation made in twrp
  • 70
    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 TWRP recovery in the official installation instructions link below.
    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.

    More detailed instructions at:
    Install LineageOS on kuntao

    Download link:
    LineageOS Downloads

    Recommended Google Apps package:
    Open GApps (choose ARM64 as Platform and 10.0 as Android, use the Variant you want. Recommended nano package)

    Required TWRP recovery
    twrp-3.2.3-20190209-kuntao.img
    Using official TWRP is not supported

    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

    XDA:DevDB Information
    Official LineageOS 17.1 for P2, ROM for the Lenovo P2

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

    ROM OS Version: Android 10
    ROM Kernel: Linux 3.x
    ROM Firmware Required: Any version of stock 6.0. Recommended: P2a42_S251_171107_ROW
    Based On: LineageOS

    Version Information
    Status:
    Nightly

    Created 2020-04-23
    Last Updated 2020-04-23
    35
    I finally made some progress, this took a long time of debugging...
    Screenshot_20210111-055518_Settings.png
    30
    First build should be up tomorrow, let's hope everything goes well.
    25
    There has been no progress in the audio issue, mostly because I can't reproduce it reliably. I've been running builds for 1+ week and didn't manage to get the bug. I've merged some patches that should fix fingerprint crashing on devices with broken or semi broken hardware, which should save some battery (untested). I've also merged some commits that should improve the dark camera preview issues, also not very well tested.
    21
    I have disabled builds temporarily because I can't figure out this issue.
    Also it looks like a similar issue is present on 16.0 https://gitlab.com/LineageOS/issues/android/-/issues/1679 which means I have to look even deeper :/
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone