[ROM][10.0][UNOFFICIAL] LineageOS 17.1 for Unihertz Atom L and XL [Alpha] [2022-04-21]

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

a-dead-trousers

Senior Member
Jul 28, 2016
402
1
177
Samsung Galaxy S5 Mini
When I use the fastboot flash commands for the vbmeta partitions, it reports 'OKAY', so I'm working on the assumption that the previous fastboot flashing unlock step was successful. Is this a valid conclusion?
Yes.
Yeah it just doesn't work for me. Holding volume up just makes the phone boot loop until I let go.
Hmm... Does it "flicker" before rebooting?
My best guess is that TWRP simply crashes and forces a reboot. From the top of my head the reason for that kind of behaviour can only be the encryption or trustkernel. I started my work with a non-functional encryption. After that I already had a working system so I probably never really tested the stock rom scenario with encryption activated.
To finally get encryption to work on recovery and not messing up the system I needed to do a copy of the encryption keys to a temp location. Trustkernel under TWRP uses this temp location for booting up. Maybe this isn't the right thing to do while there are no keys present to copy OR the data partition is already encrypted, trustkernel detects that the keys are invalid and therefore refuses to work as a security measure.

If it is the later you can try to flash "userdata" either the same way as you did with recovery or using SPFlash (only select the "userdata" partition). As Image you could use the one provided in the stock rom.

If it is the former you should be able to boot with a TWRP release where the encryption isn't setup the way it is now (for the L TEE that means v20210415). After you have installed LOS the encryption should be properly setup and you should be able to flash the latest TWRP release from within TWRP.

Please try the "userdata" flash first and if that's not working try the older release. If it's just an encryption problem I can solve this quite easily by extending the installation section. If it's the other thing I need to do a deeper investigation to find the cause (meaning I once more need to start testing installation procedure from a genuine stock rom :()
 
Last edited:
Feb 10, 2021
33
1
Hmm... Does it "flicker" before rebooting?
No, no flicker. Just a long wait on the boot screen until reboot.

you can try to flash "userdata" either the same way as you did with recovery or using SPFlash (only select the "userdata" partition). As Image you could use the one provided in the stock rom.
I got into fastboot with the device as-is (was) and flashed userdata and recovery back to back. No change in behavior trying to boot to recovery.

you should be able to boot with a TWRP release where the encryption isn't setup the way it is now (for the L TEE that means v20210415). After you have installed LOS the encryption should be properly setup and you should be able to flash the latest TWRP release from within TWRP.
I flashed this recovery as well, with the device as-is (was) with no change in behavior.

--

With your info in hand, I wanted to try each suggestion with a fresh setup, rather than as-was, starting from the stock ROM (2021-05) in the green state.

Attempt #1: Booted up, enable debugging and OEM unlocking, adb to get to bootloader, flashing unlock, reboot, enable debugging again, adb to get back to bootloader, vbmeta flashing (all okay), flash v20210415 TWRP, fastboot reboot, then green line of death when trying to boot to recovery. Holding the power button for N seconds reboots properly into the system.

Re-flashed to stock green state again.

Attempt #2: Booted up, enable debugging and OEM unlocking, adb to get to bootloader, flashing unlock, reboot, enable debugging again, adb to get back to bootloader, vbmeta flashing (all okay), flash userdata from stock rom (same version I used for stock reset), flash v20210810 TWRP, fastboot reboot, and then we're back to bootlooping until I release the volume up key.

So, I'm still where I was. Is my unit a unicorn? Defective?
 

a-dead-trousers

Senior Member
Jul 28, 2016
402
1
177
Samsung Galaxy S5 Mini
... adb to get to bootloader, flashing unlock, reboot, enable debugging again, adb to get back to bootloader, vbmeta flashing (all okay), ...
You can do all this all in one step without having to reboot. Sorry, if my instructions weren't clear on that.

Maybe this is also causing your problem:
The reboot into stock rom initializes the encryption once more. While the stock rom for the TEE is simply named "Atom L" I had to add the suffix "TEE". The reason for that is my "Atom L" repo contains the shared parts for "EEA" and "TEE" so maintaining the various flavours is a little bit easier to handle. When I started with that I wasn't running into any troubles so I kept that. Only later when trying to setup encryption I stumbled on some problem related to the "version"-String. As soon as I used a higher version on the recovery (2099-12-31 for example) it locked me out of system for good because it silently "upgraded" the encryption keys. Maybe this also includes the device name (I wouldn't be suprised).

If that's the solution I will update my installation instructions acordingly.
 

a-dead-trousers

Senior Member
Jul 28, 2016
402
1
177
Samsung Galaxy S5 Mini
Starting fresh from 202105 ROM, and doing all of the fastboot flashing in one go, I got the same result as before. Won't get past boot splash until I let go of the volume button.
Honestly, I'm out of ideas.
Maybe, just a last resort, you could try to use the EEA region instead of TEE (stock rom + twrp + los).

Has anyone else had these kind of problems with my TEE release? Or asking the opposite, has anyone successfully installed one of the TEE releases?
 
Feb 10, 2021
33
1
Maybe, just a last resort, you could try to use the EEA region instead of TEE (stock rom + twrp + los).
Well, the EEA stock + TWRP got me to be able to get into TWRP, so that's a step! Maybe Scamazon sent me a Euro model?!

However when I try to perform the wipe, I get "Could not mount /data and unable to find crypto footer" followed by a series of "unable to mount..." for various subdirs under /data. Then, some "unable to mount..." messages for other directories that say permission denied.

I get the same result whether I choose to "keep the system read only" or "allow modifications" when first getting into TWRP.
 

a-dead-trousers

Senior Member
Jul 28, 2016
402
1
177
Samsung Galaxy S5 Mini
Well, the EEA stock + TWRP got me to be able to get into TWRP, so that's a step! Maybe Scamazon sent me a Euro model?!
Nope, the phones are identical. The difference is the software. I was able to switch between Atom L/XL and TEE/EEA with my original Atom XL EEA witout problems. As far as I know there is an additional warning about too loud volumes while using headphones amongst other things that differ in the EEA release.
However when I try to perform the wipe, I get "Could not mount /data and unable to find crypto footer" followed by a series of "unable to mount..." for various subdirs under /data. Then, some "unable to mount..." messages for other directories that say permission denied.

I get the same result whether I choose to "keep the system read only" or "allow modifications" when first getting into TWRP.
That's because after the fastboot reset there is no /data. You need to install LOS next to setup everything else.

EDIT:
So EEA works fine while TEE has "issues". I'll need to test this in detail. Maybe I can find something. At least you can use your phone now.
 
Feb 10, 2021
33
1
That's because after the fastboot reset there is no /data. You need to install LOS next to setup everything else.
Progress.

Got into TWRP, tried flashing Lineage EEA zip, got the "update_dynamic_partitions" error, flashed the resized super image, and then tried the lineage zip a second time, with the following error.

Code:
Patching system image unconditionally...
E1001: Failed to update system image.
Updater process ended with ERROR: 7
Error installing zip file lineage...EAA-signed.zip

Though this isn't the same error as before (no partitions errors reported), I tried flashing the super a second time, but no change.

I feel like I'm *so* close here.
 

a-dead-trousers

Senior Member
Jul 28, 2016
402
1
177
Samsung Galaxy S5 Mini
As TWRP is working now please check the contents in the partition "persist" (Mount and then File Explorer).
There should be two folders t6 and t6_twrp. Delete the later and clear the first of it's contents. After that you should be able to use TWRP for TEE.

If that is not working or you still getting error 1001 you may put the cart before the horse.
With this guide you can build a complete TEE super.img to flash (either via fastboot or from within TWRP) as an alternative to installing a zip archive. In a nutshell you will be doing what the installation procedure inside TWRP is doing. Then you only need to flash boot.img and you are good to boot into system. After you have setup the system with that you should be able to get TWRP running.
 
Feb 10, 2021
33
1
As TWRP is working now please check the contents in the partition "persist" (Mount and then File Explorer).
There should be two folders t6 and t6_twrp. Delete the later and clear the first of it's contents. After that you should be able to use TWRP for TEE.
To make sure that I understand correctly, I simply need to get into TWRP, delete the referenced files, and then I should be able to use the TEE stock ROM + TEE TWRP + TEE Lineage? To ask another way, is removing those files under "persist" the solution to the issues I've had with using the TEE files?
 

a-dead-trousers

Senior Member
Jul 28, 2016
402
1
177
Samsung Galaxy S5 Mini
To make sure that I understand correctly, I simply need to get into TWRP, delete the referenced files, and then I should be able to use the TEE stock ROM + TEE TWRP + TEE Lineage? To ask another way, is removing those files under "persist" the solution to the issues I've had with using the TEE files?
Maybe.
As far as I know the files under t6 are part of the encryption and (re-)created during the first time setup. Therefore this is the only reason I can think of that TWRP won't boot. If you are unsure you can copy the contents onto a sdcard for safekeeping.

After that you should reflash the latest TEE stock rom to make sure everything is in order. Uncheck vbmeta*, super and recovery so you don't need to redo the whole unlock/flash procedure. Alternatively you can select my recover.img and super.img in spflash to use instead of the stock files if you want to cut some more corners. TWRP (or better yet trustkernel) should have no reason to not let you boot into the recovery as it has no more information of the stock rom left.

If that's not working the only option left I can offer is the creation of a super.img according to the guide from my previous post. This I had to do several times during the beginning when I had trouble to get the recovery properly up and running. I messed up the system more times than I can think of and didn't have a backup at hand. Back then I only had one device which was also my daily driver so I had to get creative in getting it back to work.
 

a-dead-trousers

Senior Member
Jul 28, 2016
402
1
177
Samsung Galaxy S5 Mini
Okay, now I was able to reproduce the issue with my backup/test phone.
I've setup stock L TEE and was trying to boot into twrp which didn't work.
I'll look into it more deeply.

EDIT:
TEE recovery won't boot.
EEA recovery was able to boot properly AND decrypt data.

So my guess that it is related to the encryption is not the reason. I'll try to get this tackeld down.

EDIT2:
Got it.
Somehow I used the kernel of the XL TEE not only for the XL EEA but also for the L TEE. Also the L TEE kernel cannot be properly patched to get the touchscreen to work therefore I had to use the L EEA kernel which seems to do the trick just like the XL TEE does for the XL EEA.

@it_unihertz_when_i_pee Can you please test the release 20220130 on your device and see if it is working for you too. Thanks.

In the meantime I'll also test all my other recovery releases.
Sorry for the inconvenience.
 
Last edited:
Feb 10, 2021
33
1
Okay, now I was able to reproduce the issue with my backup/test phone.
I've setup stock L TEE and was trying to boot into twrp which didn't work.
I'll look into it more deeply.

EDIT:
TEE recovery won't boot.
EEA recovery was able to boot properly AND decrypt data.

So my guess that it is related to the encryption is not the reason. I'll try to get this tackeld down.

EDIT2:
Got it.
Somehow I used the kernel of the XL TEE not only for the XL EEA but also for the L TEE. Also the L TEE kernel cannot be properly patched to get the touchscreen to work therefore I had to use the L EEA kernel which seems to do the trick just like the XL TEE does for the XL EEA.

@it_unihertz_when_i_pee Can you please test the release 20220130 on your device and see if it is working for you too. Thanks.

In the meantime I'll also test all my other recovery releases.
Sorry for the inconvenience.
Almost there it seems. Appreciate the effort all this time.

Starting from 202105 stock, and going through the usual procedure with the 20220130 recovery, I was able to reliably get into TWRP, which is great.

However, I've tried flashing the 20220122 TEE Lineage zip with both adb sideload and SD card, but neither one actually seems to boot. In both cases I just get a bootloop until I press volume up to get back to TWRP to try again.

With sideloading, when I swipe to enable sideloading, I get "failed to mount /system_root (permission denied). The sideload command from my PC completes, with no errors, at 47%. The phone reports "script succeeded, result was [1.000...]. When I click Reboot System, the phone reports "No OS installed!"

When installing the zip from an SD card, the whole process goes without any hint of a problem. Same "script succeeded" message, but no warning after clicking Reboot. However, the phone just stays at the splash screen until it gives up and tries again or I hold volume up to get back to TWRP.

I'm going to keep trying various wipes and tweaks to the process and will report any success.

Edit: whoops, double posted, must have misclicked. Can't delete the other one apparently?
 

a-dead-trousers

Senior Member
Jul 28, 2016
402
1
177
Samsung Galaxy S5 Mini
However, I've tried flashing the 20220122 TEE Lineage zip with both adb sideload and SD card, but neither one actually seems to boot. In both cases I just get a bootloop until I press volume up to get back to TWRP to try again.
I seem to have neglected the L TEE pretty bad lately: Another kernel mixup.
Fixed it with release 20220131.
Once more sorry for the inconvenience.
 
Feb 10, 2021
33
1
I seem to have neglected the L TEE pretty bad lately: Another kernel mixup.
Fixed it with release 20220131.
Once more sorry for the inconvenience.
Great success! The process worked exactly as expected this time around. From stock to lineage in about 10 minutes flat.

Once again, I appreciate all your time and effort with these ROMs and troubleshooting.

Now I get to figure out how to get mobile data working with my local carrier.
 
Feb 10, 2021
33
1
What's your carriers name?
Appalachian Wireless.

To clarify the issue, phone calls and texts work fine as-is. Mobile data is the only issue. So the APN isn't too far off.

Normally it should work out of the box as I integrated a rather extensive apn list directly from google.
There is an "Appalachian" entry in the list. I was able to use the techniques from this stackexchange post to query the list from an adb shell, and I found the following entry:

Code:
# content query --uri content://telephony/carriers --where "name='Appalachian'"
Row: 0 _id=3270, name=Appalachian, numeric=310750, mcc=310, mnc=750, carrier_id=1813, apn=VZWINTERNET, user=, server=, password=, proxy=, port=, mmsproxy=, mmsport=80, mmsc=http://mms.ekn.com, authtype=-1, type=default,mms,dun,supl, current=NULL, protocol=IPV4V6, roaming_protocol=IPV4V6, carrier_enabled=1, bearer=0, bearer_bitmask=12288, network_type_bitmask=12288, mvno_type=, mvno_match_data=, sub_id=1, profile_id=0, modem_cognitive=0, max_conns=0, wait_time=0, max_conns_time=0, mtu=0, edited=0, user_visible=1, user_editable=1, owned_by=1, apn_set_id=0, skip_464xlat=-1

However, some of this information does not align with the suggested APN information found in search results, specifically the 'apn' value. Some sites say it should be 'internet', some say 'VZWINTERNET'... I will freely admit all search results I can find are dubious, and AW doesn't publish the APN details (as far as I can find). I took a couple of tries at using the "content insert" commands to create an APN from the adb shell, with the only difference being the 'apn' value, set to a few different values. I was still able to call/text, but no data. This further leads me to think that the existing carrier setting is correct except for the 'apn' value.

Alternatively are you able to manually enter an APN (settings > network > mobile > extended)?
No. See attached screenshot for the only two APNs that show. The 3-dot menu only has "reset to default" as an option.

I found a zipped XML file that is supposed to represent "all APNs, as known to Google" but I was not able to flash it successfully with TWRP. This is probably the wrong approach anyway, but I thought I would mention it on the list of things I had tried.
 

Attachments

  • Screenshot_20220201-010618_Settings.png
    Screenshot_20220201-010618_Settings.png
    29.1 KB · Views: 4

a-dead-trousers

Senior Member
Jul 28, 2016
402
1
177
Samsung Galaxy S5 Mini
The 'apn' value is just the name that is shown in the apn list and has no bearing on the functionality.
What worries me is that Applechain is in fact in the list but doesn't get selected while XFinity and StraightTalk do for some reason.
So for my understanding that means some other parameters (mmc, mns, carrier_id, ... ) which the system uses to query the list are off. Therefore the wrong entries are selected. But I don't know how the selection works in detail and which information from the sim card / network dial-in are being used.

Can you check your "all APNs, as known to Google" file if the three apns in question (applechain, xfinity, straighttalk) are on that list and if there is a difference (besides the 'apn' value) to the one on the phone? The most significant information for the apn to work should be the 'mmsc' value. Maybe this will better help you to identify the three apns on the list even if they are named differently.

Maybe togehter we can figure out why applechain is overlain by the two others.

EDIT:
Do you have another android phone at hand where mobile data is working whith applechain and you can check the apn settings that show up in the apn list from adb?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    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 17.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 working but only with a headset
    • Face Unlock isn't available
    • 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

    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 17.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 10
    ROM Kernel: Linux 4.x
    Based On: LineageOS

    Version Information
    Status:
    Alpha

    Created 2020-10-02
    Last Updated 2022-04-21
    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.