yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] a-dead-trousers:
Use the official firmware straight from unihertz to restore your phone.

https://drive.google.com/drive/u/0/...ection=a&resourcekey=0-KHJPIYVPw2iHL--cceWyaw

If you are not authorized, just send a request. Usually they grant access within one workday.

As for A12 and beyond:

I don't see any benefits to have a newer OS than the kernel is built with. The phone doesn't "magically" get new "features" that the hardware/kernel doesn't support. Furthermore the encryption between A11 and A12+ changed so you'd not only get zero new features but will also most certainly lose some functionality. Especially in TWRP as they don't support a "hybrid" mode (A11 + A12).

If I got some time, I'll take a look into upgrading to A12 but in the meantime my LOS 18.1 is a fully supported kernel and OS bundle which I update as soon as a security patch is released. So there is no (major) disadvantage compared to higher OS versions.

At the latest when Lineage drops their support for A11 and lower devices I'll have to figure something out. :eek:

If someone really wants to use a GSI for their devices, feel free to do so, but ask the questions regarding how to set it up, the actual developer of the GSI. As far as I know you'd need to patch the fstab in order to get everything bootable:

https://github.com/ADeadTrousers/android_device_Unihertz_Atom_LXL/tree/master/rootdir/etc

I'm not sure if this is incorporated in every GSI out there. Also special hardware features might not work (for example FM radio) as the vendor portion uses special services to access those.
[Miscellaneous Android Development] feanor_twh:
I downloaded the firmware you told me, used the official Unihertz tool and revived the dead phone. THANK YOU!

Now I would like to know why Lineage didn't work on my device. If it's not going to be supported, can I at least get root on the stock firmware?

The restored firmware is Android 10. Is it better to update to A11 for rooting, or is it better to stay on A10?

I'm almost convinced that my phone is EEA. However the firmware I just reset is "Non EEA". Could that cause the disaster with Lineage?

Thanks, again.
[Miscellaneous Android Development] a-dead-trousers:
You are welcome.

What was the problem? I need more information. Like, "there was a green line on the top of the screen" then it would mean you used the wrong stock rom release with my rom.

Mine uses the 2021-11 release. The 2023-01/2022-12 release has the same kernel but the DMR on the Atom XL isn't working with LOS in this one so I haven't bothered to upgrade yet.

With magisk it is possible. Simply modify the boot.img within the magisk app and then flash it via fastboot or with the spflash tool.

The A11 is newer, so there are probably less security issues.

Not really. I tried different combinations and the only problem comes when switching between L and XL.

You are welcome, again.
[Miscellaneous Android Development] feanor_twh:
I don't remember well, I did a lot of operations, but if I remember correctly I ended up with a bootloop immediately after flashing.

It seems likely that it started from an incorrect version, the one I currently have is compilation 20210423. I don't know if it is the same as 2021-11, I can't find that id.

I understand from what you say that I can put EEA, Non-EEA, A10, A11 firmware, and this will not cause incompatibilities, thank you.

The Unihertz-MDL tool fails more than a fairground shotgun. Right now, for example, it is impossible for me to flash another A11 stock firmware, again and again it gives the error "DA ERROR". I have read somewhere that the Linux version works better, do you have known of this? I haven't found it either.

Thanks again.
[Miscellaneous Android Development] a-dead-trousers:
It's inside the "Android 11" folder named "202111...." (the naming scheme corresponds with the release date)

You need to have the corresponding version of the stock rom installed though. Besides that I was able to run the Atom L stock rom and LOS on my Atom XL so they seem to be quite similar.

For me it's the other way round. WIndows works best and Linux doesn't.

I use v5.2216 from this source https://spflashtools.com/category/windows

The v6 is not compatible with the Atom L/XL and v5.2316 also gives the "DA ERROR" for me.

If you want to use it NEVER do a "Format" or "Format All". That will also wipe the IMEI from the phone and you won't be able to connect to a network anymore.
[Miscellaneous Android Development] feanor_twh:
I mean that I don't know how to check the release number in the system installed on my device. All I see is compilation 20210423.

I am about to install the stock firmware 2021111720_g63v71c2k_dfl_seea_R1.zip (EuropeanUnion_EEA) and then install its ROM v20231115-alpha (EEA). It's okay?
[Miscellaneous Android Development] a-dead-trousers:
That is a date: 2021-04-23

And closest to that would be the A10 release 202105... which is also a date

They have built it on the previous date and packed everything on the later (after testing and so on)

Yes.

Offtopic: I've got multiple google accounts and I just figured out that I can't see all files with every account. So to be clear, currently there should be one A10 release in each main folder for all variants (L/XL and EEA/TEE) and two A11 releases in the "Android 11" subfolders on google drive.

The A10 releasea are from 2021-05 and the A11 releases are from 2021-11 and 2022-12/2023-01 respectively.
[Miscellaneous Android Development] feanor_twh:
Flashed 2021111720_g63v71c2k_dfl_seea_R1.zip. Success.

Flashed lineage-18.1-20231115-UNOFFICIAL-Atom_XL_EEA-signed.zip. Error assert failed: update_dynamic_partitions(package_extract_file("dynamic_partitions_op_list"))

Flashed super-2021-11-seea.7z (super.img), then flashed lineage-18.1-20231115-UNOFFICIAL-Atom_XL_EEA-signed.zip again. Success.

Bootloop.
[Miscellaneous Android Development] a-dead-trousers:
Can you please elaborate on this?
[Miscellaneous Android Development] feanor_twh:
Having followed all the steps in the tutorial, after flashing LOS I rebooted and it showed the Orange state - boot in 5 seconds message, after which it rebooted and returned to the same point over and over again. I was very surprised because everything had gone without any complications except for the error of resizing partitions (which was also corrected)
[Miscellaneous Android Development] a-dead-trousers:
immediate black screen or do you see the LOS logo?

Can you do "cat /var/log/syslog" from within twrp after the bootloop happend (Simply press vol+ to enter twrp) and post the contents here
[Miscellaneous Android Development] feanor_twh:
The problem occurs when flashing vbmeta.img (from LineageOS), I discovered it by chance while testing with the original firmware.

When I disable AVB using:

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

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

I get bootloop, but by reflashing vbmeta_system.img and vbmeta_vendor.img (Stock ROM) using:

fastboot --disable-verification --disable-verity flash vbmeta_system vbmeta_system.img

fastboot --disable-verification --disable-verity flash vbmeta_vendor vbmeta_vendor.img

then the system boots again. But I have tested this only with stock firmware, understanding that LineageOS needs its own vbmeta.img.
[Miscellaneous Android Development] a-dead-trousers:
Not really. You could use the stock vbmeta.img or any other "empty" img. The important thing is "--disable-verification --disable-verity".

What baffles me is that you bootloop with the vbmeta.img I provided and the stock rom ones seem to work. DId you unlock the bootloader?
[Miscellaneous Android Development] feanor_twh:
yes, everything unlocked and TWRP installed. Basically everything done except flashing "LOS", I tried to boot the stock firmware, and I found the bootloop. I flashed the original vbmeta again and everything was fixed.

Another thing I noticed is that the stock firmware does not remove TWRP no matter how many times it boots.

The stock rom also doesn't work with your vbmeta.img. But if you say that "any" vbmeta.img will do, then at this point flashing LOS should work. I'll try today or tomorrow.
[Miscellaneous Android Development] feanor_twh:
I have postponed the test because I am busy and the Atom is my smartphone for daily use.

These days I have seen that there are several apps that seem exclusive to Unihertz but quite useful:

- toolbox (magnifying glass, level, compass, etc.)

- intelligent assistance (has a pretty good Appblocker, network traffic manager and other useful settings)

- ZaZa Remote (the best IR app I've seen so far)

- intercom (solid and easy to use)

Which of these apps are included with LOS? Could the ones that are not there be installed later?

Thank you.
[Miscellaneous Android Development] a-dead-trousers:
Sadly this is so "hardwired" into the system I wasn't able to extract all needed parts. Basically it's an app that calls other apps and if one is missing or missing some parts ... and there are tons of apps on the device. Most of them I believe are region variants of Google apps. (called op1, op1 and so on)

Never used that one.

Yeah but it's also a massive spyware for Baidu & Co.

That's included only for the Atom XL (obviously)
[Miscellaneous Android Development] fxtentacle:
Hi there :) I just wanted to say

THANK YOU 😃

I've been using this ROM as my daily driver on an Atom L EEA since about April and it's been working very well for me.

I have completely 0 experience with Android OS dev, but I did some projects building custom Jetson and ESP32 firmware. So if there is something where you need detailed debug logs or something easy, I might be able to help. That said, I wouldn't know of any issues that I encountered that would need debugging (y)
[Miscellaneous Android Development] a-dead-trousers:
Theoretically yes. One just needs to extract them from the stock rom and integrate/install it into LOS.

If someone is willing to do that and can give me a list of all the needed files I can integrate them in my roms.

I just don't have the time (and the need) for it.
[Miscellaneous Android Development] edmundgabo84:
Hello all,

First, thanks a-dead-trousers, et. al for the work on this device. I was able to get the latest L18.1 release on my Atom L but quickly confirmed the lack of VoLTE/4G. T-Mobile USA is stopping 2G service in April and my current Japan-only Sony phone doesnt support USA VoLTE. So my plan was to try Lineage on the Atom L after verifying VoLTE worked on stock, which it does.

Since Lineage wasnt going to work for me I followed the instructions on the GitHub to reflash the original fw and ran into the same issue as feanor_twh, bricked.

I've requested access to the official tool for the past week with no response, so I was hoping someone could share it with me. I understand its the Lunar New Year and people are likely not in office in China, but I have tried every SPFlashTool version I could find pre-5.2316 and have run into seemingly every possible error with the software. Alas I am a little desperate.

This is not my first rodeo with alt OS' on Android devices, but my first MediaTek device and have learned they are finicky.

Appreciate everyones time and efforts.
[Miscellaneous Android Development] a-dead-trousers:
I'm trying to get volte up and running but I can't figure out what's missing. My provider recently announced to have activated volte and phasing out of 3G so there is some kind of pressure on my side too. 😅

As for the bricking/unbricking of your phone I've sent you a PM including a link to the latest stock rom on my gdrive. I recommend using SPFlash v5.2216 as the later releases seem to have an issue with correctly identifying the Atom.

https://spflashtools.com/category/windows
[Miscellaneous Android Development] edmundgabo84:
I can only offer to help with researching / testing VoLTE. Don't have the experience building ROMs.

Ill try again with your stock and 5.2216 but I was running into the dreaded STATUS_EXT_RAM_EXCEPTION error prior and Ill follow up with results.

Thanks again.
[Miscellaneous Android Development] SepticFuddy:
I'm glad this came up because I was just considering finally trying to upgrade to 18.1 again, and I'm also on T-Mobile (in a remote area with especially finnicky coverage). SMS has unfortunately become more critical as of late, so I'm less able to play guinea pig than before
[Miscellaneous Android Development] edmundgabo84:
Well I was able to get SPFlash to 'Download Only' the firmware once. I've tried dozens of times, on multiple PCs, and the one time I didn't chose 'Firmware Upgrade' it seems to work. Anyways I'm going to open a separate thread for unbricking this thing to keep this thread on track.
[Miscellaneous Android Development] a-dead-trousers:
The future of Atom L /XL​

For those of you who are wondering, why I haven't made the move to Android 12+ / LineageOS 19.1+. I wasn't sure if the tweaks I made will hold when changing to a not officially unihertz supported system.

Recently I started with the work anyway but pretty soon ran into my first showstopper. TWRP (or rather A12) includes new libraries (namely tzdata) which are so huge that the recovery won't load as the ramdisk became to big. So I was considering to switch to another custom recovery. But finding one that doesn't include a fancy (and rather huge) UI wasn't so fruitful.

And right now I found information that there is a tremendous showstopper in the kernel itself.

https://lineageos.org/Changelog-28/

In the latest LOS changelog they talked about "Deprecations" and mentioned that in order to advance their builds from 18.1 onwards they need eBPF functionality built into the kernel. My research concludes that this started with 4.16 and our kernel is still 4.14.

So therefore I don't have high hopes that our dear phones will ever get a (fully working) A12+ release.
[Miscellaneous Android Development] careloads:
I have an Atom L inbound. Can you recommend the best option for stable debloat/degoogle? Your 18.1 work looks great but I just wondered if any other options were known. Thanks for dedication!
[Miscellaneous Android Development] ljonkat:
Just curious, @a-dead-trousers, will there be an upcoming release with security fixes for LOS 18.1? I saw your post about A12, but I had hoped A11 will continue to see security fixes. As always, thanks for the great work!

[Edit] Never mind... it appears 18.1 won't see any more security updates. Sad! Any recommendations on how to proceed with the Atom?
[Miscellaneous Android Development] a-dead-trousers:
I'm currently trying to get LOS 19.1 to work on the Atom L/XL. But don't get your hopes up too soon as I rarely have time working on it for now and there are many shims that need to be added in order to get the vendor binaries of A11 working in A12.
[Miscellaneous Android Development] ljonkat:
Thank you for the response and for trying to make LOS 19.1 work on Atom L/XL. I am trying not to get too excited... but my fingers are crossed and I am pressing the thumbs :). Rock on!
[Miscellaneous Android Development] lllmartini:
I have an Atom XL that used to work perfectly , but after a crash I reloaded the firmware and it started to display:

TEE: not activated

Google: Not activated

in red on the top rignt corner in chinese.

If I attempt to load lineaneos it complains abut the tee signature , and the partition size and fails to load.

Any of the stock images I tried all work fine , but display the red message and disable the 4g radio. Only wifi and the DMR radios work.

Is there any way to fix this ?
[Miscellaneous Android Development] a-dead-trousers:
I did the same thing to my "test" device. AFAIK it will show up when during flashing something went wrong. I wasn't able to get rid of it as it seems to be built into the rom itself and not part of the hardware (like the knox counter). As I don't use the stock roms anymore this is not a big issue for me. For my lineageOS rom you'd need the stock rom dated 2021-11 installed first. I wasn't able to get everything working with the ones from 2023-01 and as it doesn't include any secuity updates (still at 2021-11) I didn't bother to work out the kinks. You also need the modified super.img I provided with my rom. Besides having the right partition sizes needed the rest ist 100% stock.

Edit: Actually 2023-01 and 2021-11 are both vendor security level 2021-07-05
[Miscellaneous Android Development] a-dead-trousers:
A little heads up on LOS 19.1/A12:

Yesterday I was confident enough to update my daily driver phone. So far I did not encounter any major issues (at least from my perspective). I will test it a little bit further in my daily routine to see if something shows up in the long run (e.g. battery drainage). Expect a release in line with the next security update cycle of LOS. (https://www.lineageoslog.com/19.1)
[Miscellaneous Android Development] ljonkat:
This is fantastic news!!! Thank you for the amazing work! Can't wait...
[Miscellaneous Android Development] a-dead-trousers:
19.1 is live.

Please consider this an early built as I haven't got time to test if every built is at least bootable on my dev device for now. The recovery is not able to decrypt (and probably never ever will again) as it's now officially getting too big (thanks to tzdata) for the phone to load.
[Miscellaneous Android Development] ljonkat:
Wow, 19.1 installed without any problems. All settings and data is preserved. Well done, @a-dead-trousers, thank you! I will keep an eye out for any issues and report back. So far, so fantastic!
[Miscellaneous Android Development] JoeRifle:
Hey guys, I got 2 questions if I may:

1. Does the rom increase battery life by a substantial amount? Stock gives me about 29 hrs @ very very light use. What kind of battery life are you guys getting?

2. Does the rom come signed with a private key or a test key? And what is the kernel string? (this goes towards PlayIntegrity compatibility)

A quote from the PI module's thread:

Thx.
[Miscellaneous Android Development] a-dead-trousers:
Battery life depends on usage. By deactivating wifi (also background scanning), gps and bluetooth my phone lasts about 5 days. I don't really need wifi as my ISP provides enough GB per month to last three month. As for gps and bluetooth I only activate them when I really need those.

The roms are signed with my private key.

The kernel string is "4.14.186-gdbd1babdc-dirty".

SafetyNet is passing fine

PlayIntegrity passes only basic integrity

(as device integrity does not pass I suspect it detects the "orange state" of the bootloader)

Edit:

Using [MODULE] Play Integrity Fix (SafetyNet fix) I was able to also get green device integrity.

strong integrity is still unreachable though.
[Miscellaneous Android Development] JoeRifle:
@a-dead-trousers

Thank you for your kind and comprehensive reply.

Yes, if you have a properly signed rom you can attain device integrity. Which is all that is needed atm for certain applications ;)

I am startled as to the amount of uptime that you report though. I can barely attain 26 hrs on a full load with very minor usage on the ofw. After having deactivated the wlan, I can now reach 50 hrs round about.

Is it such a huge difference coming from the ofw? How come? What did the devs of the ofw do so wrong?

I will try your rom one of these days and report back. What a difference...50 hrs vs 120 hrs. DAMN - now there must be some drain somewhere in the ofw then ;)
[Miscellaneous Android Development] a-dead-trousers:
As far as I know there is the "issue" of A-GPS keeping the wifi active even when both (wifi and gps) are turned off. This I found out with BetterBatteryStats on my old phone. Therefore I always disable the "background scanning" option.

By the way BBS is a great app for the purpose of finding drainage. It needs root to properly work though and as I mentioned earlier, using Magisk and the PlayIntegrity module should hide it.

As for my rom, I think in the LOS 19.1 release is a slight hickup: Unlocking via fingerprint is mysteriosly gone missing. I found out about that only just yesterday because I didn't use it even in 18.1 as it kept getting disabled after a few unintentional unlocking attempts from caring the phone in my pocket.

As for the fingerprint sensor itself this could contribute to a higher battery usage too as it needs to be powered on in order to detect an unlocking attempt.

(Just like it is with face unlock and the front camera)
[Miscellaneous Android Development] JoeRifle:
Thanks again. What background scanning? Is it under wlan or gps - or do you plainly mean energy savings toggle?

I am already rooted and hidden on the ofw. I do not care much about fingerprint actually - although it would be nice to support it oc. I care foremost about robustness, security and watts (which sucks atm) :p

The installation / device (atom l) is new over here, so it is no problem for me to test roms atm. Lineage has good reputation - as do xda devs ;) - so I figured I might be able to solve the OBVIOUS drain in the ofw.

Damn - what a failure in programming that is. Compare it to Samsung e.g. Same sized battery will run 5 days no problem when new.
[Miscellaneous Android Development] a-dead-trousers:
The problem is that the option changed over the years and was moved around a lot. Under LOS 19.1 it's located under "GPS > WLAN (or wifi?) search"
[Miscellaneous Android Development] JoeRifle:
I found sth like this under GPS --> Google Wifi Search. Turned that off. Also turned on Energy Savings Mode and Reduced Background Data.

After that I turned on Flight Mode and WLAN separately. Bluetooth and Mobile Data are off.

I now also have those 4-5 days runtime. LOL, that energy curve looks totally different.

WHAT A FAILURE! This is on the OFW atm.

@a-dead-trousers Does your ROM fix this issue? Or does the issue with energy usage (WLAN active all the friggin time) persist?
[Miscellaneous Android Development] a-dead-trousers:
Not sure. I haven't tested it in that context. Like I said, I've always deactivated it right from the start and never run my rom with it active for a loger period of time. However while investigating on this I found an option in the developer settings (5xtapping on build-number) which is aptly named "Throtteling of wifi search". Maybe this was introduced in A12 (can't recall that from A11) and maybe it helps with this issue while not needing to deactivate the whole feature.
[Miscellaneous Android Development] JoeRifle:
I have the option under A11 - but this was already enabled by me b4. So at least for me, this was not the underlying issue. Usually, I tend to take as much control as possible (within reasonable bounds) over a ROM anyhow. So I also turned off "keep mobile data always active" in dev options.

Seems to me that the moment I let it communicate whatsoever over the carrier band (airplane off) I get the drain. And it is totally unrelated to wifi, because wifi drains nothing itself. I will further investigate because I actually love the performance when in airplane...it gives me frigging 10 days when mostly idle.

PS Starting to wonder whether it has to do with 2G/3G/4G settings and VoLTE / VoWIFI. Really strange all this...

EDIT It definetly has to do with this. When dropping to 2G I basically get the same times as on airplane (well not really, but u get the point)...damn what is this. Never had this with a Samsung.

Of course, if this is the case then another ROM will probably not fix it unless it comes with a different driver or sth. I suppose.
[Miscellaneous Android Development] a-dead-trousers:
Now that you mention it:

I had this too one time when I was stying in an area with bad reception with my old Samsung. 4G was awailable but very faint so the phone needed to boost the signal. That sucked my battery dry in under one day (it normally lasted up to 2 days). So, yes, that could be a problem too and is not due to a programming error in the rom.