yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] a-dead-trousers:
Flashing from the bootloader would rule out twrp as a source of errors.

Let me guess: The animated lineage logo shows up but never stops?

I use opengapps and I had the very same problem. It took me quite some time to figure this out. I don't know if it is related to A11 or anything else but Velvet (googlequicksearchbox) needs two new permissions which are not in the standard release of gapps.

https://github.com/ADeadTrousers/an...0001-Add-missing-permissions-for-Velvet.patch

As the last update of opengapps was 2 month ago they should already have noticed and fixed that by now but the whole project seems a little bit dorment lately.

I don't know the current state on microG for that matter.

If you tried to flash without wiping data and you previously (in LOS 17.1) had debugging activated you would be able to do a logcat to see if you are affected by this. It should even be possible to use adb to modify the permissons during the boot phase.

EDIT: Maybe there is a fix for that from microG then you'd need to update microG alongside LOS.
[Miscellaneous Android Development] SepticFuddy:
Actually it never makes it to the LOS screen, just goes from the bootloader security warning to off, back to the bootloader security warning. Have to SPFlash it to kill the loop because it won't even stay off. microG doesn't get flashed in, only Magisk. Riru/EdXposed/microG are all installed from within the OS. Magisk/Riru/EdXposed are needed for sig spoofing to work, since I'm not installing LOS bundled with microG

EDIT: Now back on 17.1 I'm back to having the mobile network issues on T-mobile I was having before... it worked fine when I switched back to them a couple months ago up until resetting the phone. I just don't understand...
[Miscellaneous Android Development] a-dead-trousers:
Sorry it took me a while to respond. I just needed a little bit distance to all the tedious rom related work.

Thinking about this I believe it must be related to selinux because most of the time (except in recovery) when I had this issue it was due to a faulty policy. So I suppose TWRP is working which means we might be at luck here.

1) Connect your phone to your PC

2) Try to boot into LOS once

3) When the phone reboots (should be a slight flicker on the LED) press "volume up" to boot into the recovery

4) Use your PC to capture the kernel log with "adb shell cat /proc/last_kmsg > last_kmsg.txt"

5) Search the "last_kmsg.txt" for errors or panics regarding selinux, seandroid or policy loading problems.

Maybe there is some policy interference which doesn't happen on Atom XL devices (which I'm testing on) even if one uses an Atom L rom.

The only thing I changed on 17.1 that might be connected to this is the apn list and how it is combined.

In my opinion it was faulty prior to my change cause I treated the overwrites differently (Vendor List > Google LIst >Lineage List instead of Lineage List > Google List > Vendor List). And I also did some cleanup on how the tripple apn/mcc/mnc is treated during the process. LOS/Android keeps the settings from the apn list in userdata until you switch your carrier/sim.

When did you change to T-mobile? Just to get a timeframe for searching in my changelogs.
[Miscellaneous Android Development] dijama:
Unfortunately I have the same issues with the A11 build - i 'upgrade' to the stock 11, then run everything, get to the TWRP screen about 'unmodified system partition' and i have no touchscreen input so can't proceed. kinda sucks if the newer models(?) of this phone cant be freed :(
[Miscellaneous Android Development] a-dead-trousers:
Can you please try to get me the kernel symbols from your device?

https://github.com/ADeadTrousers/tw...H.md#get-the-symbols-for-analyzing-the-kernel

Maybe the kernels are much more different than I thought and I need to modify a different part of it.
[Miscellaneous Android Development] SepticFuddy:
May 6 was the initiation of the switch. Can't guarantee I was on the latest at the time, but I will try loading that build to see if it works. Stock A11 works

BTW it is ERROR: 1 when trying to install, instead of the previous ERROR: 7 in older builds.

Searching for those phrases turned up nothing. But I'm on the XL not the L, remember? Here is last_kmsg.txt anyway

EDIT: I was also having a seriously annoying, frequent system UI hangup in 17.1. Magisk was also acting weird, for example not prompting to grant root access when it should. SeedVault would instantly fail to backup. Might have been a fluke, don't know
[Miscellaneous Android Development] a-dead-trousers:
So it might be related to my change as it was in the April build. Do you have the apn/mcc/mnc settings from your vendor so I can check if the entry is in one of the files I used for the combination (and is missing from the result)? Alternatively which entry is selected in Stock A11?

There should be more than just ERROR 1. Anyway I thought you couldn't boot. ERROR 1 is during installation.

This doesn't look like it's from my latest rom as it states "permissive=1". Both system and recovery run on "enforcing" now. (Which causes other problems but let's not get into details here)

Also if it is, the output of "avc:denied" means the rules are loading just fine. So once more I'm at a loss here.
[Miscellaneous Android Development] SepticFuddy:
T-Mobile BYOD settings

Yes, ERROR 1 is when I try to install LOS from stock A11, before flashing to "Super ()".

It's definitely "lineage-18.1-20220715-UNOFFICIAL-Atom_XL_TEE-signed.zip", with the A11 super and recovery
[Miscellaneous Android Development] a-dead-trousers:
Will look into this.

Aren't there any more lines in the log than just ERROR 1?

No, that's not what I meant. The last_kmsg.txt seems to be from a previous boot with an other rom.
[Miscellaneous Android Development] a-dead-trousers:
For me that mostly happens when "userdata" isn't cleaned from a previous failed attempt.

Uff... hopefully this is just a hickup.
[Miscellaneous Android Development] SepticFuddy:
Apparently I wasn't waiting long enough for LOS setup to kick in. Don't remember that being an issue before but whatever

Yeah I'm not sure what's going on. Eventually got it to flash, but I was having particular trouble flashing 20210508 and not 20201104... until eventually it worked. I'm afraid to update drivers though, in case it breaks completely and I have trouble downgrading.

T-Mobile seems to be working correctly on 20220327 FYI

IIRC it was just the regular "failed to install" message after that. If you really think it will help, I can try again. Wrestling with SPFlash has been a ***** though

That's... weird. I definitely ran the command after trying to boot after installing LOS 18.1 from A11 stock
[Miscellaneous Android Development] dijama:
well, im not rooted :\

it's okay, i bought a oneplus 5 and ill be tossing the atom in the box with all the other misfits lol
[Miscellaneous Android Development] a-dead-trousers:
So you're not using it anymore?

Would you be so kind to help out others by utilizing this valueable source of information?
[Miscellaneous Android Development] a-dead-trousers:
According to the apn list from the stock rom this should be it

<apn carrier="T-Mobile US LTE"
mcc="310"
mnc="260"
apn="fast.t-mobile.com"
type="default,mms,supl,rcs,xcap"
mmsc="http://mms.msg.eng.t-mobile.com/mms/wapenc"
protocol="IPV6"
network_type_bitmask="1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|19|20"
/>

It is also in my list as it overrides the LOS default which was:

<apn carrier="T-Mobile US LTE" mcc="310" mnc="260" apn="fast.t-mobile.com" mmsc="http://mms.msg.eng.t-mobile.com/mms/wapenc" type="default,supl,mms" protocol="IPV6" roaming_protocol="IPV4V6" mtu="1440" />

There is also another one taken from the google list:

<apn carrier="T-Mobile GPRS"
carrier_id = "1"
mcc="310"
mnc="260"
apn="fast.t-mobile.com"
type="default,supl,ia"
protocol="IPV6"
roaming_protocol="IP"
mtu="1440"
/>

But I don't think this would work.

Can you please check which one got selected in stock and/or check if the first one is selectable in LOS?
[Miscellaneous Android Development] SepticFuddy:
The LOS default (second one) is what is being used in 20220327, which is working. At least, that's what it looks like from inside the OS. I can't see the "MTU" value or "network type bitmask" on the access point edit screen, but "rcs" and "xcap" are missing from the "type" list, and otherwise the first two are the same.

I have no idea what the "T-Mobile GPRS" entry is for. It's always been there, never been selected, and the T-Mobile techs have never cared about it in diagnostics. "T-Mobile US LTE" is the only one of several "T-Mobile" entries they show any interest in.
[Miscellaneous Android Development] a-dead-trousers:
Like the last time: Please test.

https://github.com/ADeadTrousers/an...03-UNOFFICIAL-Atom_XL_TEE-signed-apn_test.zip
[Miscellaneous Android Development] SepticFuddy:
One problem: how do I test if installing LOS 18 still bootloops?
[Miscellaneous Android Development] a-dead-trousers:
Oh, now I understand. LOS 17.1 has the issue with the "wrong" apn and LOS 18.1 isn't booting.

Sorry, but for 17.1 I cannot do a "fixing" build cause that entitles switching my build environment back and forth. This roughly takes half a day as I don't have that much free disk space to host more than three environments (LOS test, LOS release and TWRP). Also every time I did this in the past during the transition from 17.1 to 18.1 something wasn't working quite right which took me another half a day to figure out.

Your only options would be to switch to a release prior to my change (what you basically did already) or do your own build. For that I'll prepare a fix in my 17.1 branches.

For the 18.1 bootlooping I also cannot help you.

My best guess is, that there is something interfering with selinux. During my tests I pretty much "jumped" from one phone configuration to another (XL EEA <-> XL TEE <-> L TEE <-> L EEA) and never had any problems doing so.

All I did was:

1) Making sure to have flashed the stock rom with splfash (recovery from TWRP, no super and vbmeta)

2) Booting into TWRP

( 3) Booting into Booloader ) <-- Only if it isn't working from within TWRP

4) Flashing the prepared super.img

( 5) Booting into TWRP ) <-- Only if it isn't working from within TWRP

6) Install LOS-zip

7) Wipe data with "Format" Option

8) Reboot into system
[Miscellaneous Android Development] a-dead-trousers:
One more option for 17.1:

Prepare everything for creating a super.img but before combining it modify the "apn_conf_xml" in product.img. Hopefully this won't break the signatur and is bootable afterwards.
[Miscellaneous Android Development] a-dead-trousers:
@SepticFuddy

I just released the August update and during that I figured out what was amiss:

I forgot to "push" my changes from my test repo to my release repo. Therefore I successfully tested it but didn't release it in the same configuration (wrong fingerprint).

To make 100% sure I tried it with 2022-07-15 from my release page (bootlooping) and 2022-08-22 (successfully booting)

Also the "fix" for "T-Mobil US LTE" is included.

But be cautious though:

- Bluetooth seems to have a problem with the audio channel. I just found this out while trying to connect to my car radio. So I'm in the middle of figuring out the cause.

- Intercom isn't working once again since the switch to 18.1 (no sound even when using headphones)
[Miscellaneous Android Development] SepticFuddy:
Good to know. I think I'll wait on account of the BT/Intercom stuff
[Miscellaneous Android Development] FourSilver:
I recently received notice about the manual process to upgrade. The link provided via the update notice on the Atom XL produces a 404 error.

When I go to the github page for more information on how to update, I am lost about how to locate the latest stock rom, I gather that there is a 2021-11 stock rom. However, when I go to the Unihertz repository to fetch the rom, the one available is for 2021-05.

How can I get the 2021-11 stock rom?
[Miscellaneous Android Development] SepticFuddy:
You don't see the "Android 11" folder with the 2021-11 ROM in it? From your repository link: /Atom_XL/None-EEA (or EuropeanUnion_EEA)/Android11/
[Miscellaneous Android Development] a-dead-trousers:
That is because the lineage updater is configured to use the "official" download page but this is an "unoffical" build so the device isn't listed there and cannot be found. I do however provide a "changes" url in my OTA but it is obviously being ignored.
[Miscellaneous Android Development] FourSilver:
Ah. When I clicked on it, I was expecting it to load a new page with the folder's contents. Instead, it was opened in a pane on the right side of the /Atom_XL/None-EEA page.

Thanks for the response!
[Miscellaneous Android Development] FourSilver:
That's unfortunate :(

So, every update will be done manually going forward?
[Miscellaneous Android Development] a-dead-trousers:
No, only on major updates of LOS (17.1 -> 18.1) and new stock ROM releases from unihertz

Although only the later one requires a flashing with SPFlash.
[Miscellaneous Android Development] autoflavor:
I'm unable to flash the lineage image (with the latest TWRP and lineage), either via sideload or from the SD card. Main issue would appear to be "Failed to mount /system_root (Permission Denied)".

Please see attached images. I'll leave the phone in this state until you reply.
[Miscellaneous Android Development] a-dead-trousers:
You need to flash super first (assert dynamic partition)

edit: the one I provided for stock rom 2021-11
[Miscellaneous Android Development] autoflavor:
Thanks, flashing super worked. I then ran install on lineage from external_sd; at some point when I wasn't looking, it either finished or errored, and rebooted.

Now it boots to fastboot. I am able to get to TWRP by `fastboot reboot`, followed by holding down volume up. However, adb can't see it, so I can't re-run a sideload, and the image that I'd previously copied to external_sd is no longer there. Any tips on how to recover?
[Miscellaneous Android Development] a-dead-trousers:
Are you trying to install it over LOS 17.1 or Stock Rom or doing a fresh install?
[Miscellaneous Android Development] autoflavor:
I'm not sure I understand the difference between stock rom and fresh install - but, it was unihertz's distribution, and I'm trying to install lineage over that. I followed the instructions in https://github.com/ADeadTrousers/android_device_Unihertz_Atom_LXL/blob/master/docs/HOW-TO-INSTALL.md,

with the addition of running super when we discussed that.
[Miscellaneous Android Development] FourSilver:
When I replace the super.img file in the stock ROM using the SP Flash Tool, the XL bootloops.

When I follow the steps to upgrade the vendor partition using TWRP, I get the "Failed to mount /system_root (Permission Denied)" or the ""Failed to mount /vendor partition" message.

Could you please clarify what you mean when you say to 'flash super first' as a way to address this issue? How can I troubleshoot what else I need to adjust to successfully install Lineage 18.1 and OpenGAPPS?

Also, when I follow the steps to install super.img via TWRP, the next to last step in the instructions for upgrading the vendor partition says to "Select Super (Product, Vendor, System) partition." On my XL, the menu option doesn't include 'Product, Vendor, System; instead it just says Super(). Why might this happen?
[Miscellaneous Android Development] a-dead-trousers:
Because there is nothing to boot. My super.img doesn't contain anything on system and product to be as small as possible.

Ignore these errors. I don't know why but they persist on showing.

I meant to flash the super.img I provided with every stock rom update. It's modified from the original super.img to feature more space on system for opengapps and other addons. If its not working from within TWRP you can either use SPFlash or fastboot flash.

Logcat, dmesg, kmsg, recovery log ...

Since the switch to A11 TWRP doesn't show the individual partitions anymore. I don't know yet If it's something that changed (is wrong?) in the sorces or if I need to add a (new?) option in the configuration for it to work again
[Miscellaneous Android Development] autoflavor:
So what do you recommend to move forward from the current state, @a-dead-trousers ? Looks like I have only fastboot and TWRP at my disposal.
[Miscellaneous Android Development] a-dead-trousers:
Comming from stock rom (= unihertz) you NEED to do a fresh install. So a data wipe is mandatory.

Since you already have TWRP up and running I assume you already did the unlocking. You previously wrote that you weren't able to boot proberly, the external sd isn't working properly and adb can't connect. In my experience this could all be connected to a problem with data.

So I would do a "partitial" stock rom flash using SPFlash with "super", "vbmeta_vendor", "vbmeta_system", "recovery" and "boot" NOT selected. This would reset "userdata" while keeping the recovery intact.

Next I would boot into bootloader (from within TWRP) and flash the super.img I provided.

Then boot into TWRP again and install LOS.

Before rebooting I would once more "Wipe" (or even better "Format") data.

If your external sd card / adb is not working proberly you could try to use your pc to transfer the LOS zip onto the card.
[Miscellaneous Android Development] FourSilver:
Using SPFlash caused bootloops. I had to wipe the system several times. Here is the sequence that finally worked for me (from stock ROM):

Run `adb reboot bootloader` on your PC to put the device in bootloader mode.

Run `fastboot flash super super.img`

Run `fastboot flash --disable-verification --disable-verity vbmeta vbmeta.img`

Run `fastboot flash --disable-verification --disable-verity vbmeta_system vbmeta.img`

Run `fastboot flash --disable-verification --disable-verity vbmeta_vendor vbmeta.img`

Run `fastboot flash recovery recovery.img`

All three images (super.img, vbmeta.img, recovery.img) were the latest versions available on the github repository.

Flashing LineageOS and OpenGAPPS from TWRP recovery worked without any issues. However, installing Magisk from APK didn't work for me. I had to change the file extension from apk to zip and flash that using TWRP to gain root access (I then installed the apk to finish the installation.)

The last step was to restore backed up data (backing up was recommended before flashing anything.) Using rsync over mtp was a disaster; I had to use adb-sync to restore my data.
[Miscellaneous Android Development] a-dead-trousers:
That's probably because mtp cannot access every aspect of the android file system.

I'm glad that it worked out for you in the end.

Didn't you need to wipe data too?
[Miscellaneous Android Development] FourSilver:
I did. However, for some reason, some apps (Dropbox, Nextcloud) refused to authenticate. A few hours ago, SMS stopped working and I lost phone service as well. Reverting to stock ROM restored service.

I'm about to repeat the entire process, except for rooting the device. I will also be selective about what data is restored. (Perhaps applying adb-sync to the entire internal storage is a contributing factor to the issues as well?)
[Miscellaneous Android Development] FourSilver:
It appears rooting the device has no impact on the loss of cell/mobile connectivity about three hours after a fresh install of Lineage OS. Also, I noticed SMS stopped working as well. There's no notification about the loss of connectivity.

How can I better troubleshoot this issue?
[Miscellaneous Android Development] a-dead-trousers:
Beside the usual suspects logcat, dmesg and kmesg I don't know what else you could use. Also I don't know what to look for in them for this particular issue.

My best guess is that this has something to do with your service provider. It looks like they allow you a short window of unauthorized access to complete the registration process and if it doesn't finish you get locked out.

What provider do you use? Does your contract include VoLTE?

Like I said many times before I don't have VoLTE where I live so I cannot really provide support for this. The only solution I have was taken from PeterCxy when I copied his repo and I didn't dare to change it since then as I cannot test it all.
[Miscellaneous Android Development] FourSilver:
Understood. The provider is T-Mobile, and I don't have a contract.

Since this is my daily driver, I rolled back to 2021-05 as I ran out of time to troubleshoot.
[Miscellaneous Android Development] _r_r_:
I had the same issue, luckily a USB adapter + external mouse did the job. The screen then works normally again in LineageOS.

I did need to flash the super.img as per instructions though. Thanks @a-dead-trousers for all the work!
[Miscellaneous Android Development] ljonkat:
I just want to give a short report because I am surprised, thankful, and happy everything worked out for me. Thank you very much @a-dead-trousers for the great work, and thanks to everybody else for sharing their experiences.

I bought a new Atom L a week ago (in the US). I used to be on AT&T prepaid, but I knew that was a no-go with the Atom. I switched to T-Mobile prepaid, put the new sim card in my old phone (a Nokia), and made sure everything was working.

The Atom came with Android 11, but first I struggled to figure out the build. I found something like 20210707, which just didn't seem to match anything described here. So, I made sure to check for updates on the stock ROM (there were none), and then went ahead with the latest LOS and TWRP files from @a-dead-trousers (Atom L non-European).

As described by @_r_r_, the adapter and mouse solved the issue of no-touch-input (thank you for that). TWRP is waiting for input from adb, so I just switched between adapter+mouse and computer USB connection.

Again as @_r_r_ described, I had to flash super.img since I encountered the error mentioned. After that, I installed LOS. Rebooting then left me with a weird reboot-to-TWRP-loop: LOS would boot up, but a few seconds after the main screen came up, it would power down and reboot into TWRP.

Not sure what was going on, I did

In TWRP select Wipe > Advanced Wipe.

Tick Dalvik / ART Cache, Cache, Data, Internal Storage

again, and sure enough LOS booted up as it should. Popped in the SIM card, and it has been running for a few days now, calls, text, MMS, and data working.

Thank you all, and let me know if I can help in any way.

Ljonkat
[Miscellaneous Android Development] a-dead-trousers:
The stock rom files from unihertz' google drive are named 20211117 (Nov. 17th 2021) but the vedor security updates info found in "settings->about" points to 20210705 (July 5th 2021).

As I haven't really used stock A11 much I used the rom file naming in my docs and release notes.
[Miscellaneous Android Development] a-dead-trousers:
As LOS and stock rom are quite different settings wise a wipe of userdata is needed.
[Miscellaneous Android Development] a-dead-trousers:
As more and more people are mentioning that touch isn't working in TWRP (no clue why) I'm going to include this solution into my TWRP installation guide.

Maybe someone who is still on stock rom could provide me with their kernel symbols:

https://github.com/ADeadTrousers/tw...H.md#get-the-symbols-for-analyzing-the-kernel

I'd need the ones from Atom L (EEA and TEE) and Atom XL (TEE).
[Miscellaneous Android Development] ljonkat:
That makes a lot of sense, thank you for the explanation. It may have been 20210705... I was just trying to be extra careful to not use the wrong files.

Beste Gruesse,

Ljonkat
[Miscellaneous Android Development] ljonkat:
Yea, I just don't know why I had to do it twice: before the actual flash and then again after to get out of the power-down-reboot-to-TWRP loop. It may have been because I gave up after the initial LOS flash attempt before flashing super.img. Since I rebooted into the stock ROM after that, could TWRP have "forgotten" about that original wipe? Not sure, but I hope it'll give others some pointers when encountering a similar behavior.

Thanks again,

Ljonkat
[Miscellaneous Android Development] a-dead-trousers:
TWRP didn't "forget" the wipe. The boot into stock ROM reinitialized userdata and therefore made the wipe nonexistent.