yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] autoflavor:
How do I recover a device that won't charge? I ran into some issues when I attempted the instructions a few months ago; whatever I did then, the device would reboot to fastboot but no further. Plugging a charger cable in shows the battery icon (behind the fastboot text) but doesn't actually charge the battery.

I attempted to start the flashing process from square one this afternoon; unfortunately, when I attempt to flash vbmeta.img, I get an error that the battery isn't charged:

```

fastboot --disable-verification --disable-verity flash vbmeta ~/Downloads/vbmeta.img

Rewriting vbmeta struct at offset: 0

Sending 'vbmeta' (4 KB) FAILED (remote: 'low power, need battery charging.')

```

Is there any way to get it to a point that it'll charge, so that I can do the rest of the install?
[Miscellaneous Android Development] a-dead-trousers:
Have you tried to reflash the stock rom with spflash?

AFAIK the charging is bound to the boot partition (kernel) being able to boot therefore I assume something went wrong with that. Reflashing the stock rom should give you the ability to charge the battery once more either from a power off state or by booting into (a stable) system.
[Miscellaneous Android Development] autoflavor:
Thanks. I took a look at https://github.com/ADeadTrousers/an...om_LXL/blob/master/docs/HOW-TO-FLASH-STOCK.md, and it seems that MediaTek's UI has changed since you wrote that tutorial. What do I want to select for "Download XML" and "Authentication File"?

View attachment 5793655

And, do I want the image under the region name (https://drive.google.com/drive/folders/1vdpRcZ2aGlpLCPVi3vh3EE6UjVZzSMq8?sort=13&direction=a) or the image under "Android 11" (https://drive.google.com/drive/folders/1GcIfIyB87voF3bHriEdDJxjTr-oqzuc9?sort=13&direction=a).

I no longer use either of my Atom XLs (either the semi-bricked one or the other functional one), but I was hoping to donate one of them if I can recover it.
[Miscellaneous Android Development] a-dead-trousers:
You'd need spflash v5.

Sorry, I'd need to update that guide. v6 isn't compatible with the phone.

I'd suggest you use the latest rom (A11). The one directly under region name is A10.
[Miscellaneous Android Development] wombatch:
Well Christmas has past, I've poked and prodded a bit. I got a lot fixed by checking the installed libraries and removing any duplicates.

In the end (K)ubuntu told me I should be upgrading soon so I decided to start again and install a new system. Following that I still get what looked like memory shortage errors during compile and not knowing where to put any parameters I started Linux to just a shell with no fancy Xserver/Client ruinning. This worked great, a massive speed increase with the build and it runs pretty much to the end ("pretty much" being sadly the issue) .

The error log flags this as the error

..

Output:

In file included from /mnt/store/android/lineage/frameworks/native/opengl/libs/EGL/egl_object.cpp:17:

In file included from frameworks/native/opengl/libs/EGL/egl_object.h:24:

In file included from external/libcxx/include/string:505:

In file included from external/libcxx/include/string_view:176:

In file included from external/libcxx/include/__string:57:

In file included from external/libcxx/include/algorithm:642:

In file included from external/libcxx/include/cstring:61:

external/libcxx/include/string.h:92:20: error: source file is not valid UTF-8

char* strrchr<A8> char* __s, int __c) {return __libcpp_strrchr(__s, __c);}

^

external/libcxx/include/string.h:92:13: error: redefinition of 'strrchr' as different kind of symbol

char* strrchr( char* __s, int __c) {return __libcpp_strrchr(__s, __c);}

^

external/libcxx/include/string.h:90:13: note: previous definition is here

const char* strrchr(const char* __s, int __c) {return __libcpp_strrchr(__s, __c);}

^

external/libcxx/include/string.h:92:20: error: expected ';' after top level declarator

char* strrchr( char* __s, int __c) {return __libcpp_strrchr(__s, __c);}

^

external/libcxx/include/string.h:92:38: error: expected unqualified-id

char* strrchr( char* __s, int __c) {return __libcpp_strrchr(__s, __c);}

^

external/libcxx/include/string.h:92:37: error: expected ';' after top level declarator

char* strrchr( char* __s, int __c) {return __libcpp_strrchr(__s, __c);}

^

external/libcxx/include/string.h:92:45: error: expected ';' after top level declarator

char* strrchr( char* __s, int __c) {return __libcpp_strrchr(__s, __c);}

^

6 errors generated.

Error while processing /mnt/store/android/lineage/frameworks/native/opengl/libs/EGL/egl_object.cpp.

...

but there is so much going on with this that I really don't understand I have no idea where to look first do you have any ideas or can you suggest a good forum or discussion group that would be able to offer me some advice?
[Miscellaneous Android Development] a-dead-trousers:
I think this is the main problem here. Something during the `repo sync` seems to be messing up your files.

To confirm this you should start by comparing the file(s) from the source repo with the ones on your computer.

Use file `.repo\manifests\default.xml` (hidden folder) as a guide. So for `external/libcxx` it would be `LineageOS/android_external_libcxx` on github.

Next you should figure out the cause. Maybe it's a download error or a problem with your filesystem/harddrive?
[Miscellaneous Android Development] clewis.it:
Hey. I've tried to research this a bit more, but I can't find any better explanation for the inability to boot GSI's than what you described. So, I would like to go ahead and patch the kernel for permissive mode just to test if this is the issue. If it boots, then we can figure out where to go from there. Would you still be willing to provide a guide for patching the kernel for permissive mode?

In the meantime, I'm working on compiling my own copy of lineage from your repo, so I can test some changes to the 11/2021 version of Intercom. Just some minor stuff that I personally like to see (longer names for areas/channels/contacts, fix FRS/GMRS frequencies, add Repeater frequencies for GMRS). Also, I'm going to try to rearrange the DMR receive group and contact display so it can display on separate lines. I made a list of DMR ID/Callsign/Name for contacts, and it won't display the whole thing when they are on the same line.
[Miscellaneous Android Development] wombatch:
Thank you for your support, I did wonder, it does look kind of obvious I agree. Anyway I wasn't too sure what and how to get something out of github to do a comparison with, in my old life i would have taken a binary copy and compared the two but I have no idea how i would do such a thing here.

I ran a little test using

iconv -f utf8 [filename] -t utf8 -o /dev/null

against each of the files in my

android/lineage/external/libcxx/include and they all come back as valid UTF-8.

My suspicion is that (if this really is the problem) that it is because my system is set to "en_GB.UTF-8" rather than the more usual "en_US.UTF-8" maybe someone out there will know???
[Miscellaneous Android Development] wombatch:
Well who knows? After much fiddling and several restarts I got to the end of the build. This is the second time I have got there and for me not at all satisfactorily either time (there are always crashes at some point)

I am now starting again (why not 😂 ) new system, new copy of the repository. Of course this brings up another problem, the repo sync mostly works but fails to get one module

Checking out: 74% (640/864) platform/packages/providers/TvProvidererror: Cannot checkout platform/prebuilts/maven_repo/android: Manife

stInvalidRevisionError: revision refs/tags/android-11.0.0_r46 in platform/prebuilts/maven_repo/android not found

Checking out: 74% (640/864), done in 6.862s

error: in `sync --force-sync`: revision refs/tags/android-11.0.0_r46 in platform/prebuilts/maven_repo/android not found

I checked the http address and "r46" seems to be there if i hunt (I have no idea what I am doing :eek:) at

refs/tags/android-11.0.0_r46 - platform/prebuilts/maven_repo/android - Git at Google

android.googlesource.com

rerunning the sync just gets me the same result, can i somehow change the reference or download manually?
[Miscellaneous Android Development] a-dead-trousers:
Delete the two folders `.repo/projects/platform/packages/providers/TvProvidererror.git` and `platform/packages/providers/TvProvidererror`

Sometimes when the manifest gets changed and some of the repos switch to other sources it doesn't get updated in the lokal git and therefore the revisions mismatch. The only way I know of to resolve this is to delete the local git inside .repo and it's checkout.
[Miscellaneous Android Development] wombatch:
Thanks for all your help, I didn't have the paths exactly as you mention in the above update only

.repo/projects/packages/providers/TvProvider.git and no TvProvidererror.git

Anyway I deleted that, got some different errors and eventually it ran and produced the same error...

I started again with a clean repository!

I am very fruistrated by this process, although I thought it would be hard, i has expected that if you fix one problem you move onto the next. Now I am starting to think this stuff is black magic and I certainly now am of the view that the whole android build process is based more on luck than science, syncing the repository should be the easy part ( and should be consistent, broken in the same place always) if it goes wrong here there is not much hope for the rest is there!

Is it like this for everyone, do you need to wear lucky socks or something when you do it?

My new empty repo sync fails with

fatal: missing blob object 'afca372d09294bb0a42ae05161b9a457152099fe'

error: remote did not send all necessary objects

error: Cannot fetch platform/prebuilts/clang/host/darwin-x86 from https://android.googlesource.com/platform/prebuilts/clang/host/darwin-x86

Fetching: 100% (2/2), done in 20m21.054s

error: Cannot checkout platform/external/deqp: ManifestInvalidRevisionError: revision refs/tags/android-11.0.0_r46 in platform/external/deqp not

found

error: in `sync --force-sync`: revision refs/tags/android-11.0.0_r46 in platform/external/deqp not found

I'll make an incantation over it, boil up the eye of newt and toe of frog ;) and keep trying in the hope that one day i will find an explanation for the inconsistencies this process can throw up!
[Miscellaneous Android Development] a-dead-trousers:
Sometimes I get errors while syncing but they are mostly due to an unstable internet connection (wifi) or server errors and will eventualy go away after some waiting. The big problem with los (or aosp as a whole) in this context is the sheer size of all the repos combined which takes an insane amount of traffic on first time initialization.

The later re-syncs are much smoother in my experience.
[Miscellaneous Android Development] ps3shitshow:
Hello, I am using Lineage OS on Atom XL and it is good so far. Noticed new update for stock rom in 2023, can we extract intercom app from it and check what is new/changed? Maybe install it or include it in next LOS update?
[Miscellaneous Android Development] wombatch:
Hi, just a thank you for all your help. It seems that the repo sync was "unreliable" because I had 2 network connections, turning one off before the sync seems to have fixed that problem 🥳

I ran the build a few times trying to figure out why i am having so much trouble and eventually made some changes to ulimits to double the stack size to 16384 and the open files to 2048. It seems to have made a massive difference, of course there are still loads of warnings during the build and I had to remove zz_neverallow.te to get it to complete.

Incredibly I know have a build that i consider to have been created in a reasonable manner running on my phone.

I do have a message about serial console being enabled and of course after installing microg it hung with the lineage boot line.

Ah well, getting closer 🙂 Do you have any idea about this serial console thing? I guess I need to rebuild the kernel (which my build tells me I am using a pre-built kernel and this is not advised?)
[Miscellaneous Android Development] a-dead-trousers:
Thanks. I've also seen the new files. I'll include them starting in one of my future updates but I'm still waiting for the Atom L releases.
[Miscellaneous Android Development] a-dead-trousers:
Good to know. My main problem was an unreliable wifi router which seemed to have had a problem with many DNS requests/connections.

That is odd. Although the neverallows are not crucial I never had problems with them.

What does the message say? Did you include the patch for signature spoofing yet?

As long as mediatek/unihertz don't relases their sources we won't be able to build a replacement for the kernel. Maybe there are some compatible kernels out there but they won't offer full functionality (DMR, Encryption, Sensors, ...).
[Miscellaneous Android Development] wombatch:
Perhaps following my massive learning curve I'll try the never allows again.

I ran the patch and that seems fine, the signature spoof checker shows that spoofing is supported and microg does some of it's function installed as a normal app but when installed as a privileged app the boot just hangs with the lineage boot line moving across the screen until it gives up and boots into TWRP.

For the serial console, I assumed it was something you had set because when I tried one of your builds before I started this I didn't get that message!

I should probably start yet again and try to fix each error now starting with the neverallow!
[Miscellaneous Android Development] a-dead-trousers:
I've just tested the new release:

- No raise in vendor security updates (it's still on July 2021)

- The kernel is still v4.14.186

- The baseband is still v162

- The recovery retention script was moved into vendor so everytime you boot into LOS the recovery gets overwritten.

Therefore I'll NOT include stock rom 2023-01 into my builds for now. It's simply not worth the effort.
[Miscellaneous Android Development] clewis.it:
I have the same issue on my build. There are 3 lines in neverallows that i had to delete to get this to compile. I had gotten errors saying these conflicted with some always allows. When i rebuilt i will set it back to your original file and i will try removing the alwsys allows instead. Sorry, i didnt think to save a copy of the error. Maybe keeping the neverallows will fix the serial port notification (which i also got).
[Miscellaneous Android Development] a-dead-trousers:
If you could provide me with the problematic neverallows I'll remove them from my code.

Like I said these rules are not vital. I only included them to be on par with the stock rom.

The serial port notification is intriguing though. Can you elaborate on that a little bit more?
[Miscellaneous Android Development] tapa_t:
Yep, been there, done that.

To stop the boot loop, start up the SP Flash Tool you used to flash the boot image,

(If you didn't use SP, you need to download and set one up now)

You can straight up flash the stock boot that will stop the boot loop immediately.

Or, if you don't want to flash anything yet, just do a "readback" of something small, like the preloader (or it can be anything random because you are not going to ever use it anyway).

In the brief moment in between two of the endless booting, SP tool will catch your device in POWER OFF state and do the flash or the readback. Doing so will stop the device from booting up again. That will give you and your XL a break.

Hope it helps
[Miscellaneous Android Development] a-dead-trousers:
As a last resort a SPFlash of the stock rom should fix essentially everything but that also deletes userdata.

To boot into bootloader (not fastboot) however you need to press vol down (the menu is chineese though). Vol up is for recovery. Keeping pressing power will keep the phone rebooting. Normally, after a failed boot the phone will reboot into recovery and a failed recovery boot into fastboot (at least during my failed TWRP tests I encounterd this behaviour). Booting directly into fastboot is only possible through ADB (called "bootloader" but is indeed "fastboot")
[Miscellaneous Android Development] a-dead-trousers:
Readback? Does this mean SPFLash does not only do flashing operations but can also extract the rom straight from the phone?
[Miscellaneous Android Development] tapa_t:
Sure does.

Open SP Flash Tool and go to "Readback" tab.

Hitting "Add" creates a new entry in the list.

Double click on an entry opens a dialog to ask where and what file to save, then which sector and physical address of emmc to readback from.

The rest is similar to flashing: you hit "Readback" button and plug in your device while it's powered off. Wait and done.
[Miscellaneous Android Development] a-dead-trousers:
Good news everyone!

The latest update is online on Google Drive (2020-11-04). At a first glimpse they didn't change much (substantial). Added some new apps (YT Music *Yuck*) and updated some others. No removed libraries whatsoever.

Can someone please check, what timestamp the latest build (announced 2020-12-03) has when received OTA?
[Miscellaneous Android Development] SepticFuddy:
I've been in a moving process for a few weeks, but I never could actually get the update OTA. Most of the time it could not resolve the hostname regardless of what network I was on, and on the rare occasions it did manage to get something, trying to install the update would always fail. So I had to remind Unihertz to post the ROM onto the google drive. Finally just got around to updating manually.

"Current version" says "Unihertz_Atom_XL_20200928_20201104-1643". Not sure if "1643" is a timestamp or just part of a build number, but that's the best I can do.
[Miscellaneous Android Development] dirtylimerick:
@a-dead-trousers

Sorry to cross the L and XL streams, but do you have USB tethering or WiFi hot spot working in your Lineage OS ROM? My Atom L ROM does not.
[Miscellaneous Android Development] a-dead-trousers:
"Don't cross the streams." - Egon Spengler, PhD 👻

Honestly I haven't needed tethering or hot spot until now. So I wasn't aware that the settings for them are missing. I opend a bug-report for this in my github and will look into it as soon as I have the time. Personally I think it's only a configuration issue because WiFi is working fine so there is nothing against it working out of the box.
[Miscellaneous Android Development] dirtylimerick:
I figured as much. I was just shocked to not see it addressed in any of my internet searches.
[Miscellaneous Android Development] desolaar:
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.
[Miscellaneous Android Development] landsome:
Hi! Thanks for the effort.

I am wondering: are you forking LOS Treble for this release?

I ask because I also have a Cubot Kingkong Mini, also a recent (2019) small MTK device, and to my surprise it works almost perfectly well with Treble-editions of AOSP10/LOS17 and now even AOSP11/LOS18, without any specific custom optimizations.

Or is the Atom X/L a poor Treble implementation?
[Miscellaneous Android Development] a-dead-trousers:
The version @PeterCxy did for the Atom L (that I forked mine of) seems to be Treble-based. He also does many other projects on github which are related to Treble-devices (and look nearly the same configuration-wise) so I belive this confirms my assessment.

Honestly I don't know exactly how to distinguish between a Treble-based and a non Treble-based ROM but as far as I understand it the "main" feature involves Generic System Images introduced with Android 8. It needs a strict devision into system, vendor and product partitions. As long as the vendor partition is not being "changed" every Treble-based third party ROM should run out of the box as long as the same kernel (or kernel branch?) is used. So system (e.g. LOS) and product (e.g. additional apps) can be changed without compromising the functionality.

BUT as far as this separation goes, unihertz (and also MTK) did a very poor job. Many things that are clearly vendor (configuration, additional binaries) or product specific are found in system. Therefore simply building the ROM is not enough. You need to also copy many additional files from the stock ROM.

Espacially the amateur radio for the Atom XL is a mess:

The binaries are in "system" and configuration like SELinux is in "vendor" so both partitions cannot work without the other.

Currently I'm not planning to specifically integrate this ROM into project Treble.

As far as my knowledge goes it is a (kind of) Treble-based ROM and that's enough for me.

Don't get me wrong. I did a little bit of resarch in project treble and I'm quite certain that even though the amateur radio is such a mess it should be possible to do a build in project treble style but it involves tinkering with (or even restructuring) the vendor partition which I honestly don't have the time to do.
[Miscellaneous Android Development] landsome:
Thanks for the detailed explaining. It's very illuminating and clarifying. (And too bad Unihertz did not do proper Treble devices - it would have saved everybody plenty of headache.)
[Miscellaneous Android Development] Romanowski:
Hello,

Anyone running this as daily driver?

Will radio be fixed in future, or I should get Atom L?

Thank you
[Miscellaneous Android Development] a-dead-trousers:
Yeah, me, the OP ;)

As you might (or rather might not have) read in the first post: I'm working on it.
[Miscellaneous Android Development] a-dead-trousers:
LOS comes with it's own Cell Broadcast Receiver so no need to get that from stock which is essentially the same cause android doesn't include it (maybe some legal ****) so the vendor needs to provide it and they all use a default implementation and rebrand it.

One question remains though:

I found an overlay that states to provide a configuration interface for CBR. Is that also legally mandated in the U.S.? Default in LOS is no configuration interface.
[Miscellaneous Android Development] SepticFuddy:
I'm honestly not sure. Every phone I've used in recent memory had the ability to disable alerts by type, with presidential always greyed out. They've always all been on by default, so I'd lean towards including that to make sure things can be disabled. Amber Alerts can get pretty obnoxious