yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] sparkst:
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.
[Miscellaneous Android Development] a-dead-trousers:
Thanks for your test report.

Honestly I didn't do much on the wifi/bluetooth front. I just copied what PeterCxy did for the Atom L. His work, what I seen so far, is just trying to get the devices to work without longtime support. Mostly for project treble though.

Also during my development, I nearly resatarted the phone every day, so longtime useage wasn't covered by my test too. I also don't use wifi that much cause it dranis the battery faster and also I got a very cheap mobile phone contract (15GB for 8€). The downside is that I don't have the means to test VoLTE either because it's not included. So I can only hope that PeterCxy work holds for those in need.

Glad that someone was able to positivly test the UHF Radio. I had another handheld at home but wasn't able to communicate. My guess was that it wasn't working because the other device used an encrypted subchannel I wans't able to set in the intercom app.

The Magisk thing is another topic. Because of the often flashing of the phone and the recovery not able to decrypt data (anonother thing I'm workng on) I had to reflash magisk everytime. So I also came up with a way to "integrate" Magisk into the release-zip. I'm not sure though if I should integrate it into my "official" unofficial release.

The only time I've encounterd problems with adb is on recovery or when using intercom. but I will keep an eye on this.

wkr ADT
[Miscellaneous Android Development] GilouXDAD:
Hi,

Happy owner of an Atom XL, I'm mostly concerned about the ham radio feature, it seems that it's not an issue… So I'll try your build on mine, also I'm not that familiar with LineAge and Android in general, but I'm a sysadmin and a dev, so I may be able to do nice feedback here ;)

Thanks for your work on that phone, and looking forward to working on that with you guys!
[Miscellaneous Android Development] clewis.it:
here are the errors:

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 };

libsepol.check_assertions: 3 neverallow failures occurred

I deleted those 3 lines from the neverallow file, and it sounds like wombatch deleted the whole file. So, I'm going to try modifying policy.conf instead to see if that gives us different results.

The serial port enabled notification is just strange though. I googled it and it is apparently designed for the android emulator to test rs-232 communication.

Serial console enabled Performance is impacted. To disable, check bootloader

I recently created an Android emulator with Android version R. It showing an Android system notification "Serial console enabled Performance is impacted. To disable, check bootloader" Can someone

stackoverflow.com

Other links I found said to enter an engineering code to disable it or to download a new version of LOS.

https://xdaforums.com/t/serial-console-enabled-performance-is-impacted-any-know-how-to-fix.4472943/

Maybe this is just something that got enabled after your build and me and wombatch just had the bad luck to see it. After I try building again after modifying policy.conf, I will try updating sources again and building. I will keep you updated on my progress.
[Miscellaneous Android Development] clewis.it:
wait, is policy.conf the output of processing these selinux files? I don't see a policy.conf file anywhere besides the out folder.
[Miscellaneous Android Development] a-dead-trousers:
Possible.

The selinux policies are partial static and dynamic. The main portion can be found in system/sepolicy/prebuilts but I've seen others in a lineage context too although I cant find them right now.
[Miscellaneous Android Development] clewis.it:
Alright. I'm probably not going to mess with this again until Friday. I just disabled the android developer notification on my install. That serial console doesn't seem to impact anything.
[Miscellaneous Android Development] a-dead-trousers:
About that serial port message:

I haven't changed anything about the kernel. Only the recovery has the touchscreen driver flipped from "boot" mode to "recovery" mode and as long as you haven't changed the command line I don't see a reason for it to behave differently on your device.

In the comments on stackoverflow however they mentioned a problem with a faulty usb cable (bad pin).

Maybe that's the cause.
[Miscellaneous Android Development] clewis.it:
If I had a cable plugged in, I would possibly agree. But, since 2 of us have the same notification, and neither of us have kernel mods (this time), and I don't have a cable plugged in, I'm inclined to dismiss that possibility.

I just did a complete stock ROM reload and followed your install guide after, so I shouldn't have any leftover issues from kernel testing. Also, your ROM didn't have this notification. Only the user built ones seem to. Could it have something to do with the platform keys? My trust app says I'm using the public keys.
[Miscellaneous Android Development] a-dead-trousers:
Oh, yeah. My builds are "user" builds and I signed them:

https://wiki.lineageos.org/signing_builds
[Miscellaneous Android Development] clewis.it:
Quick question, any idea what's causing the popping sound when Intercom receives a signal? It's a loud pop, even when the volume is turned all the way off. I think it only affects the phone speaker, not sure about wired headsets. I don't hear it when using bluetooth.
[Miscellaneous Android Development] Tenshi65535:
I have met exactly the same issue. Any idea so far?

Update: not exactly the same. These occur when I tried to build the system.
[Miscellaneous Android Development] a-dead-trousers:
You only need to extract the files from system.img. You don't need to extract boot.img as I (falsely) described in my build guide.

When trying to use the unpack_bootimg that is built alongside LOS you first need to have every dependency met which includes the stock rom files you mentioned. So either you use a prebuilt unpack_bootimg or you leave out the boot.img portion of the guide (for the first time building that is).
[Miscellaneous Android Development] Tenshi65535:
Thanks for the reply. I'll try prebuild unpack_bootimg method first.

Update: still no luck.

[100% 182/182] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja

FAILED: out/soong/build.ninja

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', n

ote that some jars may be filtered out by module constraints

internal error: failed to find a dex jar path for module 'mediatek-ims-base', no

te 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-commo

n', note that some jars may be filtered out by module constraints

internal error: failed to find a dex jar path for module 'mediatek-telephony-bas

e', note that some jars may be filtered out by module constraints

internal error: failed to find a dex jar path for module 'mediatek-telephony-com

mon', note that some jars may be filtered out by module constraints

15:26:04 soong bootstrap failed with: exit status 1
[Miscellaneous Android Development] a-dead-trousers:
When do you get this error?

You need to run extract-files.sh before building anything.
[Miscellaneous Android Development] Tenshi65535:
When running the actual build. Files have been extracted from the stock rom already.

Quite confused as the generated Android.bp seems alright?

soong_namespace {

}

android_app_import {

name: "ImsService",

owner: "Unihertz",

apk: "proprietary/priv-app/ImsService/ImsService.apk",

certificate: "platform",

dex_preopt: {

enabled: false,

},

privileged: true,

}

dex_import {

name: "mediatek-common",

owner: "Unihertz",

jars: ["proprietary/framework/mediatek-common.jar"],

}

dex_import {

name: "mediatek-framework",

owner: "Unihertz",

jars: ["proprietary/framework/mediatek-framework.jar"],

}

dex_import {

name: "mediatek-ims-base",

owner: "Unihertz",

jars: ["proprietary/framework/mediatek-ims-base.jar"],

}

dex_import {

name: "mediatek-ims-common",

owner: "Unihertz",

jars: ["proprietary/framework/mediatek-ims-common.jar"],

}

dex_import {

name: "mediatek-telecom-common",

owner: "Unihertz",

jars: ["proprietary/framework/mediatek-telecom-common.jar"],

}

dex_import {

name: "mediatek-telephony-base",

owner: "Unihertz",

jars: ["proprietary/framework/mediatek-telephony-base.jar"],

}

dex_import {

name: "mediatek-telephony-common",

owner: "Unihertz",

jars: ["proprietary/framework/mediatek-telephony-common.jar"],

}
[Miscellaneous Android Development] Tenshi65535:
Just have this problem fixed by re-sync the repo. Seems that some files are broken in my machine.

Another problem occur that ninja is not finding the prebuild Image.gz. I'm quite sure it is at the right location. Is this related to permissions?

FAILED: ninja: 'device/Unihertz/Atom_L_TEE/prebuilt/boot/Image.gz', needed by 'out/target/product/Atom_L_TEE/kernel', missing and no known rule to make it

Update: Fixed by chmod 666. Sorry for bothering.
[Miscellaneous Android Development] a-dead-trousers:
Finally I was able to get the decryption to work on TWRP 3.7.0_11-0 for our devices. 🥳

Head on over to my other thread to get the download links

https://xdaforums.com/t/recovery-11...hertz-atom-l-and-xl-alpha-2023-04-16.4218703/
[Miscellaneous Android Development] ljonkat:
Thank you @a-dead-trousers, great work! The latest TWRP and LOS ROM work swell, no issues on non-european.

Wondering if there are any news about Android 12 for the Atom from Unihertz... I just love this thing!
[Miscellaneous Android Development] a-dead-trousers:
Thanks.

The thing with Unihertz is that they usually only do one major update for their devices (Atom from 8 to 9; Atom L/XL from 10 to 11). For that matter I don't think we will see a A12 release for our devices. They do release some irregular updates though. Like the one from 2022-12 but this only changed some minor things and the kernel is still from 2021. Additionally they moved the recovery retrieveal feature to vendor and therefore it would always overwrite any custom recovery on boot. That's why I didn't bother to update my Roms.

That doesn't mean that the current kernel can't support A12 at all. It's just that I haven't got time to test it yet. First I want to get everything smothed out on A11 (mainly the DMR for the XL is left) before moving on to A12. Maybe I'm also delaying that move because I fear the journey will be a bumpy (or lets say buggy) one. I'm expecting many features won't work due to incompatibilities between the libraries on vendor and (LOS-)system. As I was figuring out what's causing me so much trouble in TWRP to get it to work I tried to use the previous A10 implementation of it but that was lacking some needed functions for the A11 vendor libraries. Also a developer of TWRP mentioned that A12 won't be able to decrypt A11 Roms therefore I'm not very convinced that it would work out of the box. At least not without some elaborate tinkering.
[Miscellaneous Android Development] ljonkat:
Thank you for the detailed background and info. I certainly understand finishing up everything for A11 has priority, and it is certainly much appreciated. Keep up the great work!
[Miscellaneous Android Development] agarwaen163:
Hello @a-dead-trousers, I recently commented on your Github for the XL offering to potentially be of support with the Intercom app.

So I've been attempting the build from scratch following your guide for the Atom_XL_TEE variant. I've gotten to the actual build part with `brunch`, but then compilation fails with an error I'm unsure of the cause (see attached file for console output of error).

I followed the extraction method listed using the Unihertz Stock Rom (specifically build / zip: `2023011016_g63v71c2k_dfl_stee.zip`. Is this one ok to use?), and even got the steps for boot.img and recovery.img to work, however I'm unsure if I'm supposed to do anything (like mount or copy the files elsewhere) from the generated `boot` and `recovery` directories. I assume from reading other parts that these files aren't needed and thus may be unrelated. Anyways, I've applied the `apply.sh` patch file and attempted to re `repo sync` the repo a few times, but with no success.

Any ideas what could be causing this?

I'm on x86 Debian 11 for context if it's any help. Anyways, please see attached error log file.

Copied here too:

Spoiler content hidden.
[Miscellaneous Android Development] a-dead-trousers:
@agarwaen163

I think you forgot to actually atttach a log file.

And yes, the boot.img / recovery.img is not required for a simple built as thoses files are already part of my device tree. It's just there for if someone wants to "upgrade" or "downgrade" the device tree for other stock rom versions. Maybe I should clearify that in my guide a little bit better.
[Miscellaneous Android Development] a-dead-trousers:
Oh. that's my Magisk repo.

It's not working so well and I thought I had it removed from the build guide. My bad.

The problem here is, that the script requires an already existing boot.img but that gets build later in the process. I haven't found a solution for that yet but I can offer two workarounds:

1) Do not not include magisk at all. Don't forget to remove the folder under "vendor"

2) Comment out these two lines https://github.com/ADeadTrousers/an..._Atom_LXL/blob/master/deviceCommon.mk#L66-L67 and build the rom. Uncoment the two lines once again and build once more. In the end you need to manually add the boot.img from the "out" driectory into the final zip file to have magisk installed alongside the rom.
[Miscellaneous Android Development] agarwaen163:
That was it, thank you! Build has completed now, I had to install `openjdk-11-jdk` to get through one final hickup. I appreciate the help and the effort. Will report back once I've been able to test flashing and hopefully get a chance to use it.
[Miscellaneous Android Development] agarwaen163:
Hello again. I have successfully flashed both the latest release image from the github and my built image into mostly working OS's. It seems to work fine for about 50 seconds and then it spits me back out into TWRP after the restart. I can click `Reboot System` in TWRP and get back to LOS but then it will repeat this error again the same way indefinitely.

I didn't click on the `Lineage Recovery` option when LOS was first installed though, not sure if it's best to replace TWRP yet? Also did not include magisk.
[Miscellaneous Android Development] a-dead-trousers:
Which stock rom did you have installed prior to lineage?
[Miscellaneous Android Development] grandmagoblin:
Okay so, I did a custom build using your guides and stuff. Is there anything that would limit the camera resolution? My camera is currently pulling up as 11MP max. I have tried using the Open Camera and another third party camera, same result. I cannot use Google Camera since it crashed upon reopening. Any ideas?
[Miscellaneous Android Development] agarwaen163:
Build Number: Unihertz_Atom_XL_20210729

I originally tried with the updated super.img from 2021-05, that didn't work, then I updated it to 2021-11 and that seemed to work (wasn't sure which to use). Is there a different stock rom I need to flash it back to / another step I need to do?

I don't have a windows machine but I'm sure I can get it working with Debian if it's possible(?)
[Miscellaneous Android Development] a-dead-trousers:
Hmmm... I seem to have missed that. It was once 48MP on my device and now it's 11MP too. Some others reported the same phenomenon but I couldn't reproduce it. Now I can. *hurray*

I think this might have happend when switching from A10 (LOS 17.1) to A11 (LOS 18.1).

You need to have the same stock rom version installed as the kernel that is used in boot.img. There are some driver and bootloader partitions included that need to be updated alongside the kernel and the vendor partition (part of super.img).

You can use the info from my UPGRADE guide to do a "partial" flash of the stock rom to not need a full installation

https://github.com/ADeadTrousers/android_device_Unihertz_Atom_LXL/blob/master/docs/HOW-TO-UPGRADE.md

An other reason for immediate reboot could be an "incompatible" data partition. The only way to correct this would be a full wipe.
[Miscellaneous Android Development] grandmagoblin:
Has anyone else reported any issues with cellular? It's weird. I can use data and text message, but I cannot make any calls. It does not even get to the dial tone. I will see about running a pcap, and see if I can capture what is going on.
[Miscellaneous Android Development] agarwaen163:
Alright... well that was arduous af on linux, but I think I have come to a solution.

First, https://www.xda-developers.com/bypass-mediatek-sp-flash-tool-authentication-requirement/ this guide on bypassing the sp-flash-tool authentication was required as I couldn't get the SP_Flash_Tool to work via any means on Linux.

This guide by Miss Montage was super helpful for getting the actual flash_tool to run at all in linux, with the libpng12.so.0 issues being solved the most simply by just downloading a later version (this is the exact link/version I used: v5-2228). (it's also possible to build that dependency yourself and ln -s the .so, but new version didnt require this).

But running on my normal Debian 11 install I kept running into this error no matter what I attempted:

Connect BROM failed: STATUS_ERR(-1073676287)
Disconnect!
BROM Exception! ( ERROR : STATUS_ERR (-1073676287) , MSP ERROE CODE : 0x00.

So I first got the fireiso listed in the first article running. All steps after this are on the fireiso OS:

From there I installed the correct linux version of the SP_Flash_Tool as listed above, and copied the 2021-11 version of the Unihertz Stock ROM over too.

Next, I cloned the exploits_collection and copied `default_config.json5` and `payloads` to the `bypass_utility-v.1.4.2` directory. I then ran the `./main.py` as specified in the first article.

Next, I plugged in the Atom XL phone using the factory shipped usb cable while holding the Volume+ button. The python script ran briefly and exited.

Then, without unplugging the phone, I started `./flash_tool` from the same terminal. Following your instructions on Upgrading the Stock ROM I specified the scatter file and selected `Download` from the drop down menu.

EDIT: `Download` still resulted in bootloops after everything. Try `Firmware Upgrade` instead.

My phone had booted into TWRP during this time, so it was simple enough to click `Reboot` `Fastboot` from here (important thing is to boot the phone into fastboot), which is where the `./flash_tool` finally worked for me.

(Back on Debian 11)

Following this, I had to follow the normal steps for installing Lineage, including installing TWRP via the recovery.img, updating the super.txt to the 2021-11 version, wiping the data as specified in the install guide, and then installing via the SD card method.

The first time I tried this I got an error about it failing to unmount `vendor` partition at the end of the install in TWRP. The phone then bootlooped.

I got back into TWRP and redid the last part of installing the Lineage Zip, and this time I didn't get any errors on the install.
[Miscellaneous Android Development] agarwaen163:
Hm well it would seem that I've run into the same error as before. Reflashing https://drive.google.com/file/d/1JUYt3HCFqUQrpWj1lGF0F7axVPXaQAR5/view?usp=share_link this image still gives me the same stock ROM version at the end of flashing STOCK (Build Number: Unihertz_Atom_XL_20210729). (And thus the same lineageOS bootloop errors). I have tried Firmware Upgrade and Download Only now. I matched the super.img too. What exactly was the Stock ROM you used and where did you get it? AFAIK this should all match now, but my build of 20210729 makes me wonder if the firmware upgrade simply restored it somehow(?) or more likely that something is off. Should I be using the 2023 release from Unihertz drive?

Finally, it seems after "Firmware Upgrade" to the stock rom mentioned and now I can't unlock fastboot at the beginning of the flash process. I will post any updates as I make them.

Edit: Was forgetting to reenable "OEM Unlock" option. I have updated to the 2023 version of the Stock Unihertz ROM but same result and build number. Still experimenting.
[Miscellaneous Android Development] a-dead-trousers:
@agarwaen163

You did quite the effort to get sp flash tool working in linux. I'll need to try that too.

I'm using the stock package starting with 20211117 including the kernel with build date 2021-11-17 and security patch level 2021-07-05.

The 20230110 package contains the same kernel and therefore in my opinion isn't worth the effort of providing an update.

For the bootlooping I'm pretty much out of ideas. The only bootloops I had were with non matching rom partitions (EEA vs. TEE and/or different release dates) and "incorrect" data partitions. You could try to flash userdata only using sp flash tool instead of doing a wipe but I doubt that would make a difference.

Only way possible now to tackle this would be to logcat and dmesg the boot process and see if something out of the ordinary shows in the logs.
[Miscellaneous Android Development] a-dead-trousers:
Let me guess: You're using VoLTE.

I just recently found an error in the logs while trying to get the DMR of the XL to work. Reguarding the name of the executable involved 'vtservice' my guess is that it might be related to VoLTE. I already found a possible workaround for this but currently it's not performing as it should.

https://github.com/ADeadTrousers/an...mmit/f9b38ff159a6090b0c7b75a209a2f11d9e0b6c6b