[ROM][11.0][UNOFFICIAL] LineageOS 18.1 for Unihertz Atom L and XL [Alpha] [2023-05-14]

Should the OTA update feature be enabled in the next build?

  • Yes, I'll overlook the montly updates otherwise.

    Votes: 1 100.0%
  • No, I don't have enough mobile data for a montly update cycle.

    Votes: 0 0.0%

  • Total voters
    1
  • Poll closed .
Search This thread

wombatch

Member
Jan 18, 2012
44
2

What patching options are we talking about here?
Well i tried Tingle, that seems to fail with because the file mount of /system does not work, it seems that maybe /system here is mounted as /system_root (sorry i often get a bit lost in Android mounts)!
I tried Nanodroid, as an installation under Magisk it gave me the boot loop (the lineage boot line ran for a long time and eventually drops into TWRP)
I tried NanoDroid from TWRP that again fails because it can't find the files to patch.

Sorry not to include lots of logs and messages here I thought I would start with a quick question to see if it had been done. There is an entry in the microg wiki saying it can't be done above android 10 , yet the patching systems above imply they will work.

I could of course take the device tree and TRY (i've never done it before) to build my own patched rom based on your work, however early days so maybe there are working options out there that I just haven't found yet!
 

a-dead-trousers

Senior Member
Jul 28, 2016
476
1
186
Samsung Galaxy S5 Mini
Well i tried Tingle, that seems to fail with because the file mount of /system does not work, it seems that maybe /system here is mounted as /system_root (sorry i often get a bit lost in Android mounts)!
Yeah, that's TWRPs mount point.
I tried Nanodroid, as an installation under Magisk it gave me the boot loop (the lineage boot line ran for a long time and eventually drops into TWRP)
I tried NanoDroid from TWRP that again fails because it can't find the files to patch.

Sorry not to include lots of logs and messages here I thought I would start with a quick question to see if it had been done. There is an entry in the microg wiki saying it can't be done above android 10 , yet the patching systems above imply they will work.

I could of course take the device tree and TRY (i've never done it before) to build my own patched rom based on your work, however early days so maybe there are working options out there that I just haven't found yet!
So according to this
https://github.com/microg/GmsCore/wiki/Prerequisites
One would only need signature spoofing to be able to use microG, am I right?
 

wombatch

Member
Jan 18, 2012
44
2
Hello, sorry I am probably doing something very stupid but i am trying to follow your build process, I get as far as building unpack_bootimg and the build fails saying it is unable to find a dex jar path for several mediatek modules.
I copy the errors below, do you have any idea what I might have done wrong?

out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
internal error: failed to find a dex jar path for module 'mediatek-common', note that some jars may be filtered out by module constraints
internal error: failed to find a dex jar path for module 'mediatek-framework', note that some jars may be filtered out by module constraints
internal error: failed to find a dex jar path for module 'mediatek-ims-base', note that some jars may be filtered out by module constraints
internal error: failed to find a dex jar path for module 'mediatek-ims-common', note that some jars may be filtered out by module constraints
internal error: failed to find a dex jar path for module 'mediatek-telecom-common', note that some jars may be filtered out by module constraints
internal error: failed to find a dex jar path for module 'mediatek-telephony-base', note that some jars may be filtered out by module constraints
internal error: failed to find a dex jar path for module 'mediatek-telephony-common', note that some jars may be filtered out by module constraints
23:49:33 soong bootstrap failed with: exit status 1
 

a-dead-trousers

Senior Member
Jul 28, 2016
476
1
186
Samsung Galaxy S5 Mini
F**K!
I think I've made a "recursive" error in my build guide:
In order to unpack you need to setup the build environment but to do that you need the files you want to extract in the first place.
hmm...
BUT, You are in luck:
You don't need "boot.img", "recovery.img" or "unpack_bootimg" for the build process. This is only needed If you want to start with your own device tree for extracting the kernel and the commandline.
Maybe I should make this more clear in my guide.
All you need is the second half: "imjtool", "super.img", "system.img", "vendor.img" and "product.img".
Also as "imjtool" is able to extract "boot.img" and "recovery.img" too I should consider to drop the "unpack_bootimg" altogether.
 

]ZZZ[

New member
Feb 7, 2008
1
0
Hello. First of all I would like to thank a-dead-trousers for his work and motivation!

I suppose that have the same issues as wombatch - signatures spoofing at this LOS 18.1 unofficial ROM. As far as I understand, according this https://github.com/microg/GmsCore/wiki/Signature-Spoofing, there is no such builtin feature at LOS. But for official ROMs, microG maintainers provides it. After clean install your LOS 18.1 and microG from f-droid repo, I see error at logcat, when I try to run some payment app:

W GooglePlayServicesUtil: xxx.app-name requires Google Play services, but their signature is invalid.

I've tried to solve it via LSposed modules (fakeGapps, Core patch and app specific patches), but no luck, app just crashing. Also, I've tried to built spoof services according this https://forum.xda-developers.com/t/signature-spoofing-on-unsuported-android-11-r-roms.4214143. Spoof checker says - OK, but my app crashes again(.
 

wombatch

Member
Jan 18, 2012
44
2
F**K!
I think I've made a "recursive" error in my build guide:
In order to unpack you need to setup the build environment but to do that you need the files you want to extract in the first place.
hmm...
BUT, You are in luck:
You don't need "boot.img", "recovery.img" or "unpack_bootimg" for the build process. This is only needed If you want to start with your own device tree for extracting the kernel and the commandline.
Maybe I should make this more clear in my guide.
All you need is the second half: "imjtool", "super.img", "system.img", "vendor.img" and "product.img".
Also as "imjtool" is able to extract "boot.img" and "recovery.img" too I should consider to drop the "unpack_bootimg" altogether.
Thanks for this, a bit of a delay I've been a bit occupied elsewhere, anyhow this has moved me on a bit (to my next stumbling block).
I'm probably going to have a couple of things here, firstly I was trying to to get the vendor blobs from a mount of a stock img file, there are many failures but the first is
Extracting 368 files in ./android/lineage/device/Unihertz/Atom_L_EEA/../../../device/Unihertz/Atom_L/../../../device/Unihertz/Atom_LXL/proprietary-files.txt from ./unihertz/extracted:
- bin/AudioSetParam
- bin/batterywarning
- bin/boot_logo_updater
- bin/camerapostalgo
- bin/connsyslogger
- bin/dpci
!! bin/dpci: file not found in source
there are in total around 80 items listed as missing.
In an attempts to get around this i this I used the script
android/lineage/device/Unihertz/Atom_L_EEA/extract-files.sh
to get the files from my rooted lineage phone. With this there were only 22 files flagged as missing so I copied them from the mounted images above.
At thus point I was hoping i was in a state to be able to run a build :-o
Sadly not yet :-(
It is not very far into the build when I get
vendor/mediatek/libfmcust/custom.cpp:43:10: fatal error: '../../../packages/apps/FMRadio/jni/fmr/fmr.h' file not found
I can't find it either but then doing a find on my local filesystem wasn't likely to help, i tried a repo resync but the failure is still the same. I am sure I must have made lots of mistakes but I really don't know where to start looking and how.
I imagine this header file should have come from the sync of the repository, is is possible that I've made a big mess of that? How would I force it to start again or check to see what errors the sync had?
 

a-dead-trousers

Senior Member
Jul 28, 2016
476
1
186
Samsung Galaxy S5 Mini
Extracting 368 files in ./android/lineage/device/Unihertz/Atom_L_EEA/../../../device/Unihertz/Atom_L/../../../device/Unihertz/Atom_LXL/proprietary-files.txt from ./unihertz/extracted:
- bin/AudioSetParam
- bin/batterywarning
- bin/boot_logo_updater
- bin/camerapostalgo
- bin/connsyslogger
- bin/dpci
!! bin/dpci: file not found in source
there are in total around 80 items listed as missing.
That could be a problem with file permissions. Simply check the missing files and either grant access to them or the containing folder to yourself (chown ... ).
In an attempts to get around this i this I used the script
android/lineage/device/Unihertz/Atom_L_EEA/extract-files.sh
to get the files from my rooted lineage phone. With this there were only 22 files flagged as missing so I copied them from the mounted images above.
Same here. Although the permissions are granted from the mtp moint point of view. You'd need to uese "su" in that case but I don't know where in the script you'd need to change that. I did only use the stock rom for the extraction and never the phone.
At thus point I was hoping i was in a state to be able to run a build :-o
Sadly not yet :-(
You'd NEED to run the script to get the files properly installed in the resulting rom. The script will not only copy the files but also write the build rules needed.
It is not very far into the build when I get
vendor/mediatek/libfmcust/custom.cpp:43:10: fatal error: '../../../packages/apps/FMRadio/jni/fmr/fmr.h' file not found
I can't find it either but then doing a find on my local filesystem wasn't likely to help, i tried a repo resync but the failure is still the same. I am sure I must have made lots of mistakes but I really don't know where to start looking and how.
I imagine this header file should have come from the sync of the repository, is is possible that I've made a big mess of that? How would I force it to start again or check to see what errors the sync had?
It's part of the package "LineageOS/android_packages_apps_FMRadio". Which I totally forget to remove the "remove" from the build docs. My bad.
Just remove this line from your roomservice.xml:
<remove-project name="LineageOS/android_packages_apps_FMRadio"/>
 

wombatch

Member
Jan 18, 2012
44
2
That could be a problem with file permissions. Simply check the missing files and either grant access to them or the containing folder to yourself (chown ... ).

Same here. Although the permissions are granted from the mtp moint point of view. You'd need to uese "su" in that case but I don't know where in the script you'd need to change that. I did only use the stock rom for the extraction and never the phone.

You'd NEED to run the script to get the files properly installed in the resulting rom. The script will not only copy the files but also write the build rules needed.

It's part of the package "LineageOS/android_packages_apps_FMRadio". Which I totally forget to remove the "remove" from the build docs. My bad.
Just remove this line from your roomservice.xml:
<remove-project name="LineageOS/android_packages_apps_FMRadio"/>
Thanks very much, I scrubbed what I had and restarted. This time all the modules were found in the extraction (I think probably i was using the wrong stock rom file (I had a few as a result of the tinkering))
Anyway that all seems to go ok I changed the roomservice.xml resynced the repository and then tried the build again..
This time it fails here..
[ 0% 272/105357] build out/target/product/Atom_L_EEA/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml
FAILED: out/target/product/Atom_L_EEA/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml
/bin/bash -c "(rm -f out/target/product/Atom_L_EEA/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml ) && (python vendor/lineage/tools/custom_apns.py out/target/product/Atom_L_EEA/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml device/sample/etc/apns-f
ll-conf.xml device/Unihertz/Atom_LXL/etc/apns-conf-keep.xml device/Unihertz/Atom_LXL/etc/apns-conf.xml device/Unihertz/Atom_LXL/etc/apns-conf-additional.xml )"
Traceback (most recent call last):
File "vendor/lineage/tools/custom_apns.py", line 62, in <module>
main(sys.argv)
File "vendor/lineage/tools/custom_apns.py", line 30, in main
raise ValueError("Wrong number of arguments %s" % len(argv))
ValueError: Wrong number of arguments 6
23:40:29 ninja failed with: exit status 1

Clearly this is tring to build Lineage APN values into the system but I have no idea why it should be going wrong unless somehow I am building for the wrong sort of Atom? Sorry to be such a pain.
 

wombatch

Member
Jan 18, 2012
44
2
Thanks very much, I scrubbed what I had and restarted. This time all the modules were found in the extraction (I think probably i was using the wrong stock rom file (I had a few as a result of the tinkering))
Anyway that all seems to go ok I changed the roomservice.xml resynced the repository and then tried the build again..
This time it fails here..
[ 0% 272/105357] build out/target/product/Atom_L_EEA/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml
FAILED: out/target/product/Atom_L_EEA/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml
/bin/bash -c "(rm -f out/target/product/Atom_L_EEA/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml ) && (python vendor/lineage/tools/custom_apns.py out/target/product/Atom_L_EEA/gen/ETC/apns-conf.xml_intermediates/apns-conf.xml device/sample/etc/apns-f
ll-conf.xml device/Unihertz/Atom_LXL/etc/apns-conf-keep.xml device/Unihertz/Atom_LXL/etc/apns-conf.xml device/Unihertz/Atom_LXL/etc/apns-conf-additional.xml )"
Traceback (most recent call last):
File "vendor/lineage/tools/custom_apns.py", line 62, in <module>
main(sys.argv)
File "vendor/lineage/tools/custom_apns.py", line 30, in main
raise ValueError("Wrong number of arguments %s" % len(argv))
ValueError: Wrong number of arguments 6
23:40:29 ninja failed with: exit status 1

Clearly this is tring to build Lineage APN values into the system but I have no idea why it should be going wrong unless somehow I am building for the wrong sort of Atom? Sorry to be such a pain.
I have to admit I am totally lost in the build process :-( I commented out the following lines in device/Unihertz/Atom_LXL/BoardConfigCommon.mk

# We need this for apns-conf to include more settings
#CUSTOM_APNS_FILE := device/sample/etc/apns-full-conf.xml \
# $(DEVICE_COMMON_PATH)/etc/apns-conf-keep.xml \
# $(DEVICE_COMMON_PATH)/etc/apns-conf.xml \
# $(DEVICE_COMMON_PATH)/etc/apns-conf-additional.xml

In order to get this build to run further and then maybe fix the apn issue later somehow.
I was feeling quite optimistic until I had a failure with this Address SANitizer section

/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c 30 -o out/target/product/Atom_L_EEA/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/Atom_L_EEA/obj/ETC/sepolicy.recovery_intermediates
/sepolicy.recovery.conf ) && (out/host/linux-x86/bin/sepolicy-analyze out/target/product/Atom_L_EEA/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp permissive > out/target/product/Atom_L_EEA/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ) && (if [ \"userdebug\" = \"user\" -a -s out/target/product/Atom_L_EEA/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ]; then echo \"==========\" 1>&2; echo \"ERROR: permissive domains not allowed i
n user builds\" 1>&2; echo \"List of invalid domains:\" 1>&2; cat out/target/product/Atom_L_EEA/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains 1>&2; exit 1; fi ) && (mv out/target
/product/Atom_L_EEA/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/Atom_L_EEA/obj/ETC/sepolicy.recovery_intermediates/sepolicy )"
libsepol.report_failure: neverallow on line 82 of device/Unihertz/Atom_LXL/sepolicy/private/zz_neverallow.te (or line 64741 of policy.conf) violated by allow llkd em_app:process { ptrace };
libsepol.report_failure: neverallow on line 74 of device/Unihertz/Atom_LXL/sepolicy/private/zz_neverallow.te (or line 64733 of policy.conf) violated by allow llkd capability_app:process { ptrace };
libsepol.report_failure: neverallow on line 68 of device/Unihertz/Atom_LXL/sepolicy/private/zz_neverallow.te (or line 64727 of policy.conf) violated by allow llkd apmsrv_app:process { ptrace };

Can anyone give me any pointers as to where and what I can look at?
 

wombatch

Member
Jan 18, 2012
44
2
I am sure I must have done something silly here, all my issues seem to come from the Atom_LXL files?
I am clearly missing (screwed up) something basic because there is no way that vendor/lineage/tools/custom_apns.py can run with more than 3 arguments and yet here in the BoardConfigCommon we see 4 arguments?
Similarly these selinux issues seem? (although i didn't try yet) to come from device/Unihertz/Atom_LXL/sepolicy/private/zz_neverallow.te
My roomservice.xml looks like this
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="ADeadTrousers/android_device_Unihertz_Atom_LXL" path="device/Unihertz/Atom_LXL" remote="github" revision="master" />
<project name="ADeadTrousers/android_vendor_mediatek_libfmcust" path="vendor/mediatek/libfmcust" remote="github" revision="master" />
<!-- For the Atom L model add -->
<project name="ADeadTrousers/android_device_Unihertz_Atom_L" path="device/Unihertz/Atom_L" remote="github" revision="master" />
<!-- For the Atom L region eea add -->
<project name="ADeadTrousers/android_device_Unihertz_Atom_L_EEA" path="device/Unihertz/Atom_L_EEA" remote="github" revision="master" />
</manifest>

Is that correct or have i misunderstood what should be there?
 

a-dead-trousers

Senior Member
Jul 28, 2016
476
1
186
Samsung Galaxy S5 Mini
I've already updated my build docs because of your feedback. Thank you.
I am sure I must have done something silly here, all my issues seem to come from the Atom_LXL files?
I am clearly missing (screwed up) something basic because there is no way that vendor/lineage/tools/custom_apns.py can run with more than 3 arguments and yet here in the BoardConfigCommon we see 4 arguments?
You forgot to apply the patches which include my extension for custom_apns.py
Similarly these selinux issues seem? (although i didn't try yet) to come from device/Unihertz/Atom_LXL/sepolicy/private/zz_neverallow.te
My roomservice.xml looks like this
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="ADeadTrousers/android_device_Unihertz_Atom_LXL" path="device/Unihertz/Atom_LXL" remote="github" revision="master" />
<project name="ADeadTrousers/android_vendor_mediatek_libfmcust" path="vendor/mediatek/libfmcust" remote="github" revision="master" />
<!-- For the Atom L model add -->
<project name="ADeadTrousers/android_device_Unihertz_Atom_L" path="device/Unihertz/Atom_L" remote="github" revision="master" />
<!-- For the Atom L region eea add -->
<project name="ADeadTrousers/android_device_Unihertz_Atom_L_EEA" path="device/Unihertz/Atom_L_EEA" remote="github" revision="master" />
</manifest>

Is that correct or have i misunderstood what should be there?
Maybe there were some changes on the last LOS update. Haven't tried to built it yet. If you are sure this is the only problem you can leave out the zz_neverallow.te altogether by simply deleting it. It's just some policies I've ported over from the stock rom. As they are only targeting things to "never allow" it's quite save to not have it all along.
 

wombatch

Member
Jan 18, 2012
44
2
I've already updated my build docs because of your feedback. Thank you.

You forgot to apply the patches which include my extension for custom_apns.py

Maybe there were some changes on the last LOS update. Haven't tried to built it yet. If you are sure this is the only problem you can leave out the zz_neverallow.te altogether by simply deleting it. It's just some policies I've ported over from the stock rom. As they are only targeting things to "never allow" it's quite save to not have it all a
I've already updated my build docs because of your feedback. Thank you.

You forgot to apply the patches which include my extension for custom_apns.py

Maybe there were some changes on the last LOS update. Haven't tried to built it yet. If you are sure this is the only problem you can leave out the zz_neverallow.te altogether by simply deleting it. It's just some policies I've ported over from the stock rom. As they are only targeting things to "never allow" it's quite save to not have it all along.
Haha, I am not SURE of anything, this is the first time I have ever tried to build a ROM and the first time I have ever tried to build anything as large as this.
Maybe I am blind (I am quite old ;-) ) but I cant see where the patches including custom_apns.py are mentioned/referenced in the build instructions, could you give me a clue (I assumed any changes would come with the repo sync)?
Just for your reference (no idea if it is useful to you), I removed zz_neverallow.te and still have the APNS commented out, but with that the build fails at
68% 69192/101441] target C++: libfmjni <= packages/apps/FMRadio/jni/fmr/fmr_core.cpp
perhaps this is linked to the removal of the line
<remove-project name="LineageOS/android_packages_apps_FMRadio"/>
from roomservice.xml ?
Thanks so much for your help and feedback :)
 

a-dead-trousers

Senior Member
Jul 28, 2016
476
1
186
Samsung Galaxy S5 Mini
Haha, I am not SURE of anything, this is the first time I have ever tried to build a ROM and the first time I have ever tried to build anything as large as this.
Maybe I am blind (I am quite old ;-) ) but I cant see where the patches including custom_apns.py are mentioned/referenced in the build instructions, could you give me a clue (I assumed any changes would come with the repo sync)?
You're totally right! I also forgot that in my build doc too. So I just updated it. (see the mentioning of apply.sh)
Just for your reference (no idea if it is useful to you), I removed zz_neverallow.te and still have the APNS commented out, but with that the build fails at
68% 69192/101441] target C++: libfmjni <= packages/apps/FMRadio/jni/fmr/fmr_core.cpp
perhaps this is linked to the removal of the line
<remove-project name="LineageOS/android_packages_apps_FMRadio"/>
from roomservice.xml ?
I think this is also related to the missing patches as I had to remove some (unnecessary?) errors from the build script of FMradio. If this still persists after applying the patches please share the full error log.
Thanks so much for your help and feedback :)
No, thank you, as you're pretty much the first one to "testdrive" my build doc and pointing out the errors.
 

wombatch

Member
Jan 18, 2012
44
2
You're totally right! I also forgot that in my build doc too. So I just updated it. (see the mentioning of apply.sh)

I think this is also related to the missing patches as I had to remove some (unnecessary?) errors from the build script of FMradio. If this still persists after applying the patches please share the full error log.

No, thank you, as you're pretty much the first one to "testdrive" my build doc and pointing out the errors.
I retried with your patch apply script. i still had to remove the device/Unihertz/Atom_LXL/sepolicy/private/zz_neverallow.te file but the build is going much better now.
Sadly it still stops but this time around 87% through with what appears to be a java run time error. I'll have to dig a bit and see what i find.
Small comment about your apply script, I am building without GAPPS and the script exits rather untidily with

applying vendor_opengapps_build to vendor/opengapps/build
./device/Unihertz/Atom_LXL/patch/apply.sh: line 24: cd: /mnt/store/android/lineage/vendor/opengapps/build: No such file or directory

Not a big deal but maybe there could be a check in there to see if GAPPS has been taken from the repository before trying to patch it , I was going to change it ( but as you can see I have bigger problems) :)
 

a-dead-trousers

Senior Member
Jul 28, 2016
476
1
186
Samsung Galaxy S5 Mini
Sadly it still stops but this time around 87% through with what appears to be a java run time error. I'll have to dig a bit and see what i find.
Maybe you've not the correct java version set up.
See here for the requirements https://source.android.com/docs/setup/start/requirements
Small comment about your apply script, I am building without GAPPS and the script exits rather untidily with

applying vendor_opengapps_build to vendor/opengapps/build
./device/Unihertz/Atom_LXL/patch/apply.sh: line 24: cd: /mnt/store/android/lineage/vendor/opengapps/build: No such file or directory

Not a big deal but maybe there could be a check in there to see if GAPPS has been taken from the repository before trying to patch it , I was going to change it ( but as you can see I have bigger problems) :)
Yeah. I also get this error on my "regular" builds. But because it is the last patch to be applied ("vendor" luckily comming very late in the alphabet) it's no big problem. Only If there ever be a "W...", "X...", "Y..." or "Z..." patch it would not work anymore.

Maybe the "exit 1" on the "cd" could be replaced with a test and warning messege. I simply copied from another repo without much thinking.
 

wombatch

Member
Jan 18, 2012
44
2
Maybe you've not the correct java version set up.
See here for the requirements https://source.android.com/docs/setup/start/requirements

Yeah. I also get this error on my "regular" builds. But because it is the last patch to be applied ("vendor" luckily comming very late in the alphabet) it's no big problem. Only If there ever be a "W...", "X...", "Y..." or "Z..." patch it would not work anymore.

Maybe the "exit 1" on the "cd" could be replaced with a test and warning messege. I simply copied from another repo without much thinking.
Thanks I cant see anything wrong with the java setup, maybe the disk space was a bit light but i now have 168G free before i run the brunch command (hopefully that's ok).
As far as I can see it is always using the java from the repository

Environment Variables:
JAVA_HOME=/mnt/store/android/lineage/prebuilts/jdk/jdk11/linux-x86
PATH=/mnt/store/android/lineage/prebuilts/build-tools/path/linux-x86:/mnt/store/android/lineage/out/.path
SHELL=/bin/bash
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f1f3eb3a6bd, pid=2198, tid=2210
#
# JRE version: OpenJDK Runtime Environment (11.0.4) (build 11.0.4+0-5935077)
# Java VM: OpenJDK 64-Bit Server VM (11.0.4+0-5935077, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x5066bd] RegionNode::is_unreachable_region(PhaseGVN*) const+0x23d
--------------- S Y S T E M ---------------
OS:DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"
uname:Linux 5.15.0-56-generic #62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 UTC 2022 x86_64
libc:glibc 2.31 NPTL 2.31
rlimit: STACK 8192k, CORE 0k, NPROC 256489, NOFILE 1024, AS infinity, DATA infinity, FSIZE infinity
load average:13.77 4.52 2.97

/proc/meminfo:
MemTotal: 65788664 kB
MemFree: 20602952 kB
MemAvailable: 55851524 kB
Buffers: 2484600 kB

I saw something about libc being somehow mismatched or there being multiples, I am not sure about this but am trying to check. I have to go away for a couple of days now and Christmas is getting perilously close so it may be that I don't get much time to look at this again for a while.
 

clewis.it

Senior Member
Nov 1, 2006
351
174
Hi @a-dead-trousers. I have a few questions. I hope you can provide some answers.

1. Is the vbmeta.img file that you supply the same as the stock image, or is it modified? If it is modified, what are the modifications?

2. I have tried to install generic system image (GSI) files on my device (non-eu atom xl). On the android 10 version of vendor and kernel, it can install and boot, but on the android 11 version, GSI's will not boot. Any ideas why they can't boot? It just reboots to recovery after a few seconds.

3. Since the a11 version of TWRP doesn't support encryption, I decided to try disabling forced encryption. This was successful, but had the side effect of breaking WiFi, Sim cards, and the fingerprint sensor. They all worked again after re-enabling encryption on the data partition (which of course means I can't make backups of data). Any ideas how I can resolve this?

Any answers or even hints will be appreciated. Feel free to pm me if you don't want to discuss this publicly.
 

a-dead-trousers

Senior Member
Jul 28, 2016
476
1
186
Samsung Galaxy S5 Mini
Hi @a-dead-trousers. I have a few questions. I hope you can provide some answers.

1. Is the vbmeta.img file that you supply the same as the stock image, or is it modified? If it is modified, what are the modifications?
No, it's the result of the LOS build process. Currently it's only used as a dummy to deactivate AVB. Maybe later it'll become relevant when trying to get AVB working (yellow state)
2. I have tried to install generic system image (GSI) files on my device (non-eu atom xl). On the android 10 version of vendor and kernel, it can install and boot, but on the android 11 version, GSI's will not boot. Any ideas why they can't boot? It just reboots to recovery after a few seconds.
AFAIK the GSI images are trying to switch selinux to "permissive" in order to circumvent the need to supply special policies for the individual vendor partitions of the various devices. With the latest rom Unihertz removed this option (or rather followed Google's recommendation to not have this "debug" option in user builds) in the kernel. Every try to use "setenforce 0" is terminated with an error and setting "androidboot.selinux=permissive" in the kernel command line results in a bootloop.

In my attempts to get TWRP decryption to work (I think) I was able to patch the kernel in a way to have it in a continuous "permissive" state. Although I don't recommend this at all I can provide you with a guide to patch the v4.14 kernel.
3. Since the a11 version of TWRP doesn't support encryption, I decided to try disabling forced encryption. This was successful, but had the side effect of breaking WiFi, Sim cards, and the fingerprint sensor. They all worked again after re-enabling encryption on the data partition (which of course means I can't make backups of data). Any ideas how I can resolve this?
Just wait a little bit longer. I'm still trying to get TWRP decryption to work. Currently I identified a bunch of files which prevent the recovery from booting. On the other hand these files are essential for the decryption. Everyone I was asking told me that could only be happening because of file dependencies which are not met. Although I'm still not convinced that this is the underlying problem I'm currently trying to built a working prototype which includes the files in a non-readable form and have them transformed during the boot process.
Any answers or even hints will be appreciated. Feel free to pm me if you don't want to discuss this publicly.
See my answers above. I don't see this as "rocket science" and therefore no secrecy is required ;)
 

clewis.it

Senior Member
Nov 1, 2006
351
174
No, it's the result of the LOS build process. Currently it's only used as a dummy to deactivate AVB. Maybe later it'll become relevant when trying to get AVB working (yellow state)

AFAIK the GSI images are trying to switch selinux to "permissive" in order to circumvent the need to supply special policies for the individual vendor partitions of the various devices. With the latest rom Unihertz removed this option (or rather followed Google's recommendation to not have this "debug" option in user builds) in the kernel. Every try to use "setenforce 0" is terminated with an error and setting "androidboot.selinux=permissive" in the kernel command line results in a bootloop.

In my attempts to get TWRP decryption to work (I think) I was able to patch the kernel in a way to have it in a continuous "permissive" state. Although I don't recommend this at all I can provide you with a guide to patch the v4.14 kernel.

Just wait a little bit longer. I'm still trying to get TWRP decryption to work. Currently I identified a bunch of files which prevent the recovery from booting. On the other hand these files are essential for the decryption. Everyone I was asking told me that could only be happening because of file dependencies which are not met. Although I'm still not convinced that this is the underlying problem I'm currently trying to built a working prototype which includes the files in a non-readable form and have them transformed during the boot process.

See my answers above. I don't see this as "rocket science" and therefore no secrecy is required ;)
Thanks for all that info. Good stuff.

I will look into the gsi issue a bit more before asking for your instructions, but that seems like a reasonable explanation.

Looking forward to your next TWRP release. Thanks again for all your hard work.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I resolved my own issue with rerunning the patches. So false alarm.
    1
    hi guys, i saw that the rom has been updated to android 11! thats awesome! is the DMR still broken with the fully flashed rooted rom?

    I haven't had a chance to try it since I don't have anyone to try it with. I can say that the app boots up and is stable, and I have not had it crash or anything, but I have not been able to try the call quality or routing. I am working on getting another Atom XL to test with, so I will let you know when I test it.
  • 7
    500px-Lineage_OS_logo.svg.png


    Code:
    * 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.

    This is a LineageOS 18.1 ROM for the Helios P60 based Atom L (Atom_L) and Atom XL (Atom_XL), two rugged Android phones released by Unihertz in July 2020.

    This ROM supports both devices as well as both regional variants!
    You need to make sure which device and variant you need!


    LineageOS is a free, community built, aftermarket firmware distribution of Android 10.0 (Q), which is designed to increase performance and reliability over stock Android for your device.

    LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit our Gerrit Code Review. You can also view the changelog for a full list of changes & features.

    Not Working
    • VoLTE is working but has some issus with SELinux in enforcing mode
    • LiveDisplay is not working (and probably never will)
    • DMR (Atom XL) is not working
    • Bluetooth audio channel is working (although it's set to use the fallback instead of A2DP)
    • You tell me

    Releases
    Atom L EEA (european union)
    Atom XL EEA (european union)
    Atom L TEE (non-european union)
    Atom XL TEE (non-european union)

    How to install
    How to update
    How to upgrade

    Links
    TWRP
    Common device tree
    Device tree Atom L (model)
    Device tree Atom XL (model)
    Device tree Atom L EEA (european union)
    Device tree Atom XL EEA (european union)
    Device tree Atom L TEE (non-european union)
    Device tree Atom XL TEE (non-european union)
    Bug reporting

    2023-05-14
    * May security updates included
    * Updated HardwareKeyMapper to only rely on AccessibilityService
    2023-04-20
    * April security updates included
    2023-03-23
    * March security updates included
    2023-02-18
    * February security updates included
    2023-01-12
    * January security updates included
    2022-12-12
    * December security updates included
    2022-11-14
    * November security updates included
    2022-10-09
    * October security updates included
    * Workaround for bluetooth audio not working with A2DP
    2022-09-22
    * September security updates included
    2022-08-22
    * August security updates included
    * Switched from NavButtonRemap to HardwareKeyMapper for PTT integration
    2022-07-15
    * Switched to LOS 18.1
    * July 2021 vendor updates included (needs vendor to be upgraded manually)
    * July security updates included
    2022-04-21
    * April security updates included
    * Extended apn list included
    2022-03-27
    * March security updates included
    2022-02-16
    * February security updates included
    * Updated apns-conf.xml with stock entries
    2022-01-31 (Only for Atom L TEE)
    * Fixing a mixup of the prebuilt kernel
    2022-01-22
    * January security updates included
    2021-12-16
    * December security updates included
    2021-11-14
    * November security updates included
    2021-10-10
    * October security updates included
    2021-09-16
    * New icon for NavButtonRemap
    * LineageOS OTA updates enabled
    * September security updates included
    2021-08-10
    * August security updates included
    2021-07-14
    * July security updates included
    2021-06-16
    * May vendor updates included (needs vendor to be upgraded manually)
    * June security updates included
    * FMRadio is working now
    * Nav Button Remap included
    2021-05-10
    * May security updates included
    2021-04-15 2021-04-21
    * April security updates included
    * FMRadio is working now, without sound
    * Raised the size of the system and product partition to support bigger gapps installs
    * Combining the work for the Atom L and XL
    2021-03-09
    * March security patches included
    * Built for the first time using a combined Atom L/XL device tree
    2021-02-11
    * February security patches included
    * Notification LED is working now
    * Included FMRadio app (but not working)
    2021-01-24
    * Intercom DMR is working now
    * Audio Jack fixed
    * Wifi Hotspot and USB Tethering are enabled
    2021-01-16
    * January security patches included
    * Switched to TWRP recovery
    2020-12-19
    * December security patches included
    * Updated for stock release 2020-11-04 (announced 2020-12-03), needs vendor to be updated separately
    * !!! untested (for now) !!!
    2020-11-10
    * Rom build variant is "user" and is signed with release keys
    * Recovery is still build variant "userdebug" and signed with test keys
    * November security patches included
    * Intercom doesn't crash anymore (but still doesn't work either)
    * Some apps and sepolicies included from stock rom
    2020-10-01
    * Initial Alpha build released

    Help from other developers is certainly welcome. Currently only myself is working on this ROM.

    Credit and Thanks

    • LineageOS team
    • @PeterCxy for starting the work on the Atom L

    Enjoy! (y)

    XDA:DevDB Information
    LineageOS 18.1 for Unihertz Atom L and XL, ROM for the Android General

    Contributors
    a-dead-trousers
    Source Code: https://github.com/ADeadTrousers/android_device_Unihertz_Atom_LXL

    ROM OS Version: Android 11
    ROM Kernel: Linux 4.x
    Based On: LineageOS

    Version Information
    Status:
    Alpha

    Created 2020-10-02
    Last Updated 2023-05-14
    2
    Good news my fellow Atom XL Users: DMR is working (kind of) even in the current release! :)

    BUT

    only with a freeset :confused:

    During my struggles to get the mediatek code integrated into LOS I encountered many problems. One was that I muted the phone entirely. So with every step I took I did a full sound check including audio jack and headphones. That's how I found out that the sound of the DMR was working all along even without any modifications. It's just not able to "access" the built in microphone and speaker.
    This feels quite familiar as I had some issues with the audio jack in the beginning but the other way round. So maybe some settings I changed to get the audio jack to work were counteracting this.

    Just to let you all know, that there is still some progress on my part.
    2
    Hi everyone!

    I am not sure whether I have ever posted on these forums at all, but this one got me seriously intrigued and for the first time I felt the sudden urge to jump in and assist if I can.

    Just received my Atom XL yesterday afternoon (which seems to be just the best phone I have ever owned), and I have started to look for options to replace the stock ROM or at least root it so I can remove the bloat and Google crap before I actually start using the phone as a phone.

    I am really happy to see we already have a working Lineage build for this - so huge thanks to everyone for the efforts so far!

    My other phone is a Blackview BV9100 for which there was not much to be found in terms of customization, and since the manufacturer software updates are non-existent I had to figure out everything by myself - which means I have some experience, so if there is anything I can provide to help fixing the current issues, just let me know. I will give a shot at rooting the XL tonight but keep the OS otherwise untouched for a while if needed. I see flashing a Magisk patched boot.img caused a bootloop for someone, so I will see if I can get it to work somehow.

    In the meantime I will have a look at the issue updates on Github as well to see what is the actual status.
    2
    First impressions: install went smoothly, I'm so happy to have a Google apps free install. I'll try features, but so far, no show stopper, it feels good!
    2
    Thanks for all the help above on flashing with the sdtool. I've been using the 11/10 build for the past couple months and have recently updated to the 1/24 build. Already noticed a few fixes for things that I use.

    Here is a list of things I encountered in the 11/10 build with notes as to what I've seen in the 1/24 build so far.


    Wifi/bluetooth randomly turning off - For some reason, wifi/bluetooth would just turn off after about 1-2 days of uptime. Toggling it back on through the menu brought it back up. Unsure if resolved, need more time to test.

    Bluetooth failing to connect to anything after days of uptime - After a few days, bluetooth would just die and require a restart of the phone to fix. Toggling bluetooth off/on again had no effect. Unsure if resolved, need more time to test.

    Wifi calling would only work on the first wifi network connected to - A quick test of toggling off wifi and reconnecting seems to allow wifi calling to still work. Will continue to see if it continues.

    Disconnecting wifi - Phone disconnects from 5GHz wifi every 30 minutes and reconnects, even with strong signal. Will disable 5GHz on the AP to see if it continues to do this tonight on 2.4GHz. This might be an issue with my AP.

    UHF radio not working - Tested with my ham radio, able to broadcast and receive now.

    Magisk unable to display the root access dialogue - Works now and apps can be granted root

    ADB over usb sometimes not working - Haven't seen this issue yet, but it was random before. Will continue to watch for this.