[ROM][7.1.2][i9305]Unofficial LineageOS 14.1 with modifications

Search This thread

nTxw

Member
Oct 10, 2016
10
2
Battery drain with active SIM card

Hello, i did a clean install and everything seems to work (Bluetooth not tested).

But I expericence strong battery drain since CM14.0 / CM14.1 also under LineageOS, but only when SIM card is "active". In flight mode with WiFi enabled, the battery last much longer. Any suggestions what could be the cause? "Ruhezustand" (hibernation) seems to consume a lot of energy.

PS: I flashed stock kitkat Modem since CM13 (i think) or CM14, not sure since when. I9305XXUFOA1
https://xdaforums.com/galaxy-s3/development-i9305/modemi9305-n-tkk-4-4-x-flashable-modems-t3296456


Thank you!
 

Attachments

  • Screenshot_20171107-173412.png
    Screenshot_20171107-173412.png
    121 KB · Views: 368
Last edited:

FloBaoti

Member
Sep 6, 2014
46
4
I have huge battery drain for a few days with this rom.
Anyone see something strange ?
 

Attachments

  • Screenshot_20171117-095841.png
    Screenshot_20171117-095841.png
    125.3 KB · Views: 252
  • Screenshot_20171117-095933.png
    Screenshot_20171117-095933.png
    128.7 KB · Views: 246
  • Screenshot_20171117-095950.png
    Screenshot_20171117-095950.png
    160.9 KB · Views: 248
  • Screenshot_20171117-100007.png
    Screenshot_20171117-100007.png
    213.2 KB · Views: 234
  • Screenshot_20171117-100041.png
    Screenshot_20171117-100041.png
    211.5 KB · Views: 228
  • Screenshot_20171117-100103.png
    Screenshot_20171117-100103.png
    97.3 KB · Views: 238
  • Screenshot_20171117-100121.png
    Screenshot_20171117-100121.png
    177.6 KB · Views: 217
  • Like
Reactions: nTxw

FloBaoti

Member
Sep 6, 2014
46
4
Yes that's what I saw. But no wakelock, no frozen app... No kernel tuning app neither.
The only thing I changed is radio (modem binary) few days ago. I switched back to previous one and I will see if that was the cause.
But if radio was the problem, shouldn't have some kernel wakelock or rild daemon locks... ?
 

nTxw

Member
Oct 10, 2016
10
2
Hi dawidd6, Hi FloBaoti, a few days ago i flashed latest 4.4.4 Stock KitKat Modem I9305XXUFQG1 as suggested in the rgib thread. Thanks to you dawidd6 for the hint!
https://xdaforums.com/showpost.php?p=74494153&postcount=542
https://samsunggalaxyrom.com/firmware/update-galaxy-s-3-lte-gt-i9305-i9305xxufqg1-android-4-4-4

First impression was it is better, but i had no time for testing so far. I use my i9305 only as second device. Most of the time in flight mode with Wi-Fi switched on, because of battery drain with "active" SIM since CM14/LineageOS.

I am not familiar with RIL topic, but I have the impression there must be some dependency to modem regarding battery drain. Because battery life is much better in flight mode with Wi-Fi on. I will charge the battery and see battery life within the next days. I also will try to install BetterBatteryStats app for monitoring.
 
Last edited:
  • Like
Reactions: dawidd6

p.a.n

Senior Member
Dec 1, 2015
242
701
Prague
Hi everyone,
I found a new board for my phone for something like 25USD and I couldn`t resist :) So here is my new build:

lineage-14.1-20171128_075344-UNOFFICIAL-i9305-ci.zip

A new feature is call recording. The other side is recorded directly from GSM, not over microphone, like some apps do. It works in the built-in dailer, but only after the call is connected - click on the the 3 dots and Record Call (see the screenshot). One more little problem is with the permissions for writing to the external card - after granting this permission, the dialer app has to be restarted (the simplest way is to restart the whole system). So it won`t work for the first time. Alternatively you can grant this permission through settings before dailer starts. I also tried Call Recorder app from F-Droid, which works completly automaticaly and out of the box (or at least the version I tested does).

Please, be careful with this, call recording may be illegal in your country.

All my changes and list of commits used for this build are in the zip file as described in OP.
 

Attachments

  • Screenshot_20171128-120759x.png
    Screenshot_20171128-120759x.png
    115.7 KB · Views: 748

rocon

New member
Nov 30, 2017
3
1
Hey, p.a.n. I'd like to move to your ROM for the F2FS support, and since official lineage seems dead. Mostly because I read an article which basically dissed the FUSE implementation and it's double caching behaviour. But I'd really can't abandon zram which means I'd need to flash the boeffla kernel for it. Correct me if I'm wrong but I think that'd would negate the point of using your ROM as it'd overwrite your kernel settings including F2FS support, right?

If so, is it possible for you to create a build with zram added to the lineageos_i9305_defconfig?
Should be around line 1186, add the lines with the pluses next to it.
Code:
# CONFIG_PARPORT is not set
CONFIG_BLK_DEV=y
+CONFIG_ZRAM=y
+CONFIG_ZRAM_LZ4_COMPRESS=y
# CONFIG_ZRAM_DEBUG is not set
# CONFIG_BLK_DEV_COW_COMMON is not set

And remove this line around #2816
HTML:
#CONFIG_ZRAM is not set

I believe zram won't init on boot by default, which means users of your ROM shouldn't take a hit, and I'd be able to verify if it works by bringing it up manually with my own init scripts. I tend to favor zram greatly because I load all my apps into RAM and prevent them from leaving with an xposed module. Keeps things snappy and saves on I/O reads/writes which I think the s3 lacks specwise.
 
Last edited:

Tremolo4

Senior Member
Dec 2, 2017
62
46
I'm having a battery drain as well, CPU is on maximum frequency 99% of the time my screen is on.
BetterBatteryStats with root permission shows the process "qmiproxy" is responsible.

I used a self-built lineage rom a few days ago to encrypt my phone, since encryption was fixed in upstream. Repo. These are @p.a.n's patches as compiled by @mtr_
I encrypted my phone immediately after I got it working. Then I noticed the battery drain / CPU usage. Maybe encryption is related?
Although the problem does not occur when switching back to @mtr_ 's ROM from here. But my phone is still encrypted (and everything works).

So, to summarize: The battery drain / qmiproxy problem happens with both my rom and @p.a.n's new rom, but not @mtr_ 's rom. So the culprit SHOULD me somewhere in the upstream changes of the last two months? Well maybe one of you has an idea :D

I found this in p.a.n's patches, maybe related?
Code:
#For EncryptionMode - remove disabled, Modify class main
service qmiproxy /system/bin/qmiproxy
    seclabel u:r:qmiproxy:s0
    class main
    user radio
    group radio gps

Edit: Ah I just noticed, maybe SELinux permissive in @mtr_'s ROM prevents the problem.

Edit 2:: Yes, setting SELinux permissive "fixes" the problem, using my rom based on @mtr_'s version of @p.a.n's patches.
 
Last edited:
  • Like
Reactions: mtr_ and dawidd6

mtr_

Senior Member
Mar 23, 2017
86
84
Correct me if I'm wrong but I think that'd would negate the point of using your ROM as it'd overwrite your kernel settings including F2FS support, right?
I'll shorten your wait time for response until @p.a.n can answer you.
@p.a.n's kernel has only 4 features changed: F2FS, SDcardFS, increased log sizes and LZMA compression for initial ramdisk(useful to fit new TWRP). Besides these 4, the ROM will work the same.
I'm having a battery drain as well, CPU is on maximum frequency 99% of the time my screen is on.
BetterBatteryStats with root permission shows the process "qmiproxy" is responsible.

I used a self-built lineage rom a few days ago to encrypt my phone, since encryption was fixed in upstream. Repo. These are @p.a.n's patches as compiled by @mtr_
I encrypted my phone immediately after I got it working. Then I noticed the battery drain / CPU usage. Maybe encryption is related?
Although the problem does not occur when switching back to @mtr_ 's ROM from here. But my phone is still encrypted (and everything works).

So, to summarize: The battery drain / qmiproxy problem happens with both my rom and @p.a.n's new rom, but not @mtr_ 's rom. So the culprit SHOULD me somewhere in the upstream changes of the last two months? Well maybe one of you has an idea :D

Edit: Ah I just noticed, maybe SELinux permissive in @mtr_'s ROM prevents the problem.

Edit 2:: Yes, setting SELinux permissive "fixes" the problem, using my rom based on @mtr_'s version of @p.a.n's patches.
Be carefull, avoid enabling SELinux on builds based on files from my repository. I never had the time to finish getting correct permissions for all things, it won't work correctly with enforced setting (for example calls notification may not display). The first time I ran @p.a.n 's rom I noticed that mDNie doesn't have correct SELinux permissions. That meant that there could be more unnoticed permissions of less used features that needed fixing.
 
Last edited:

rocon

New member
Nov 30, 2017
3
1
I'll shorten your wait time for response until @p.a.n can answer you.
@p.a.n's kernel has only 4 features changed: F2FS, SDcardFS, increased log sizes and LZMA compression for initial ramdisk(useful to fit new TWRP). Besides these 4, the ROM will work the same..

I see, it's as I feared. I guess I'll have a go at building a version with those two features sometime in the future then.

Thanks for the clarification.
 

Tremolo4

Senior Member
Dec 2, 2017
62
46
Be carefull, avoid enabling SELinux on builds based on files from my repository. I never had the time to finish getting correct permissions for all things, it won't work correctly with enforced setting (for example calls notification may not display). The first time I ran @p.a.n 's rom I noticed that mDNie doesn't have correct SELinux permissions. That meant that there could be more unnoticed permissions of less used features that needed fixing.

Yes, now that you mention it, I've had that problem of not getting calls before setting SELinux to permissive :D
Running very fine these last weeks. No crashes or modem not working problems like I've had with the "official" LineageOS.
Thanks again @p.a.n and @mtr_ and everyone else involved!
 

parkkis

New member
Jan 19, 2014
2
0
Hi guys, thanks for all the effort! - Do you like to use

lineage-14.1-20170917-UNOFFICIAL-i9305.zip (mtr_) or
lineage-14.1-20171006-UNOFFICIAL-i9305.zip (mtr_) or
lineage-14.1-20171128_075344-UNOFFICIAL-i9305-ci.zip (p.a.n)

or some other? :)
 

parkkis

New member
Jan 19, 2014
2
0
If someone is interested in my builds, he can check my AFH profile ... I'll be uploading new ones sporadically, but won't be notifying here about them.

Thank you - I try that. Had stock 4.4.4 Kitkat and flashed lineage-14.1-20171128_075344-UNOFFICIAL-i9305-ci.zip which has started rebooting on its own...stays on showing lineage logo. Have to remove battery several times a day.

Is there version history file telling about the changes/improvements you're making?
 

mtr_

Senior Member
Mar 23, 2017
86
84
Thank you - I try that. Had stock 4.4.4 Kitkat and flashed lineage-14.1-20171128_075344-UNOFFICIAL-i9305-ci.zip which has started rebooting on its own...stays on showing lineage logo. Have to remove battery several times a day.

Is there version history file telling about the changes/improvements you're making?
There aren't many changes other than the ones that come from updated LineageOS. Like I posted before https://xdaforums.com/showpost.php?p=73828872&postcount=26 . If there will be any non LineageOS based changes, they'll be in https://github.com/m-tr/android_device_samsung_i9305 or https://github.com/m-tr/android_kernel_samsung_smdk4412 . The point of my builds is to keep the old stablest RIL synced with the most up to date LineageOS 14.1. I think the most informative place to look for LineageOS changes is https://review.lineageos.org/#/q/status:merged+branch:cm-14.1 .
 
  • Like
Reactions: Oswald Boelcke

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    Hi,
    I am back with one of my builds. Again this is just result of my hobby, feel free to use it, but do it on your own risk. Also any updates will be probably sporadic.

    I wanted to publish my build as quickly as possible, becasuse I promised in another thread. So I simply took, what I have (and I am using right now). As a result there some detail I`d like to change for public release like this for the future (e.g. all the special feature enabled by default, the big dmesg buffer). Be careful. I`ll try to do better version as soon as possible. I don`t recomend this for begginers. Be sure you have backup.

    This build is based on the official LineageOS code and contains several of my changes. In some cases it could be considered as fix, improvement, but sometimes a hack or even even security risk, so please read carefully following list. All the changes I did because I wanted the system on my device behave that way (at least time to time). Take it or leave it. Please note, that all the features are enabled by default. Be careful.
    - built-in root support
    - RIL is based on stock KitKat version (works better for me than the official version)
    - the sensors libraries are also from stock KitKat (same reason as above )
    - barometer sensor is correctly recognized by the system
    - the menu button does, what it always did
    - notification led brightness can be configured by user
    - entering safe mode by holding specific keys during boot can be disabled by setprop persist.safe_mode_disabled true (this has always only annoyed me, but be sure you know you are doing)
    - device wakeup by power button can be disabled when proximity and light sensors are blocked (e.g. in a pocket). Execute setprop persist.pwrbtn_proximity_block true
    - external sdcard can be made world writeable by setprop persist.world_writable_sdcard true (be careful with this one, this opens a security risk)
    - the notification led can blink when the battery is fully charged - enable by setprop persist.blink_when_charged true
    - F2FS support
    - the notification icons are also on the lock-screen as they ware in
    previous Android versions. The carrier name is moved above the clock
    (this cannot be turned off)
    - the dmesg buffer size is increased to 16M. I set this for debugging
    and remove it in next published build.
    - ramdisk LZMA compression support
    - sdcardfs support - This is faster replacemnt for the FUSE filesystem. I backported this for higher kernel version. Although I`ve been using this for several months without any problem, please consider this experimental. Enable with setprop persist.sys.sdcardfs
    force_on

    - mount directories for sdcard are protected against writing while the sdcard is not mounted (this solves a race condition problem which allows some apps to create files in there)
    - there some other small changes related to my multiboot envrionment, czech translation, carrier name, etc.

    Source code
    In the installation zip there is a directory code_info with following content:
    roomservice.xml - roomservice.xml for the build
    commits - list of git repositories and commits used for the build
    patches - directory tree with structure reflecting the source and containing
    patches for individual projects. The idea (not always followed) is that one patch is one feature,if possible.
    code1.diff - all the patches from patches directory together
    code2.diff - changes which are not in patches directory
    diff-commits.txt - obsolete, I`ll remove this one in the future or maybe use
    it again

    The only bug I know about is occasional crash of MTP, but I didn`t notice any negative consequences. There may some problem with battery charging (the display turns on time to time without no obvious reason during charging), but it may be some hardware error (bad cable or charger).

    Since this is based on official LineageOS, thanks to everyone who contributed to it.

    I am using this build for over a week without any problem, except those mentioned above.

    Continue here, for the latest build.

    UPDATE:
    I totally forget about this yesterday - here are the proprietary files I used for this build proprietary-files-ocm13-skk-ril.tgz It is a mixture from the CM 13 official build and KitKat stock files, with modified ks file (then connect symbol is replaced with xonnect, so it doesn`t crash), maybe some other files and changes. I really don`t remember, I put this together during a long period of time. If you find any of your work inside, please accept my apologies and let me know. From my point of view it just works. If you want to apply the patches, then you will most probably want to change the hardcoded full path to these files in device/samsung/i9305/extract-files.sh.

    UPDATE:
    If you want to use anything from my patches, feel free to do so, just follow the license of the original project.
    13
    Hi everyone,
    I found a new board for my phone for something like 25USD and I couldn`t resist :) So here is my new build:

    lineage-14.1-20171128_075344-UNOFFICIAL-i9305-ci.zip

    A new feature is call recording. The other side is recorded directly from GSM, not over microphone, like some apps do. It works in the built-in dailer, but only after the call is connected - click on the the 3 dots and Record Call (see the screenshot). One more little problem is with the permissions for writing to the external card - after granting this permission, the dialer app has to be restarted (the simplest way is to restart the whole system). So it won`t work for the first time. Alternatively you can grant this permission through settings before dailer starts. I also tried Call Recorder app from F-Droid, which works completly automaticaly and out of the box (or at least the version I tested does).

    Please, be careful with this, call recording may be illegal in your country.

    All my changes and list of commits used for this build are in the zip file as described in OP.
    5
    gongrats and many thanks @p.a.n. Your rom runs very well, its awesome. :good:
    Do you mind, if I take your sources or parts of it or some files from your rom.zip for my builds? If I do so, I will mention you and what I took and give you credits.

    Thanks :) Use whatever you want from it :) just follow the license of the original project (I updated OP with similar note).
    3
    It is worth pointing out that after backing and restoring between roms, the SELinux attributes for efs files can become not correct. That can lead to something like this :
    Code:
    06-28 04:17:43.705  3799  3799 W ks      : type=1400 audit(0.0:30): avc: denied { read } for name="efs1.bin" dev=mmcblk0p11 ino=8200 scontext=u:r:qcks:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
    Code:
    06-28 04:17:43.712  3799  3799 E kickstart: Requested ID 16, file "/tombstones/qcks/efs1.bin"
    06-28 04:17:43.712  3799  3799 E kickstart: ERROR: function: open_file:80 Unable to open input file /tombstones/qcks/efs1.bin.  Error 13: Permission denied
    It results in not working RIL because of enforced SELinux. Running restorecon fixes the problem.