yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] neo901:
Finally, I found out few interesting things :)

Indeed it overwrites recovery to stock one during boot. So in my version of Atom the only way to open custom recovery is:

1. Flash custom recovery

2. fastboot reboot

3. very quickly hold vol+ button

All other options like fastboot boot customrecovery.img or adb reboot recovery are resulting that recovery is replaced with stock version ;(

But now I have another problem - recovery for AtomL built by PeterCXY is not working on my Atom L. Recovery that you built is working - but when I trying to install AtomL ROM it interrupts process saying that I am trying to install ROM for Atom L to Atom XL phone :)
[Miscellaneous Android Development] landsome:
Thanks. The problems persist with wifi and 4g off. And they happen randomly - and increasingly frequently - in the same places..

Others report the latest stock update made it worse.

Do you get this with LOSQ (the reason why I asked on this forum, in fact)?
[Miscellaneous Android Development] GameHunter1:
I have the same problem
[Miscellaneous Android Development] bamill88:
I too am unable to boot into recovery, and the above steps are not working. Flashing the vbmeta partitions proceeds without error. I am able to flash the recovery partition without any issue as well.

When the device reboots after flashing recovery, I hold the vol+ button and I get the normal splash screen with the "orange state" warning. There briefly appears a 1-2 pixel wide green line across the left 2/3 of the very top of the screen. Is this some kind of loading indicator for Lineage recovery? After several seconds, the phone reboots and, if I do not hold the vol+ button, it boots back into the stock system. If I continue holding the vol+ button, I remain in this splash screen boot loop.

Any suggestions? Thanks
[Miscellaneous Android Development] a-dead-trousers:
Not that I'm aware of. But honestly I don't use bluetooth that often. Only In my car and there this never happend (so far).

---------- Post added at 20:48 ---------- Previous post was at 20:36 ----------

Yeah, that sounds about right: The recovery for the Atom XL (mine) is in fact only for the Atom XL.

You need to contact PeterCXY (I haven't heard from him in a while though) to check what is wrong. Maybe something got changed between his first build (when he started his work) and his latest build (I doubt that he tested every step of the installation procedure with every build he did).

Alternatively you could try to setup a build environment with his device tree and do a build with the latest LineageOS sources yourself ;)
[Miscellaneous Android Development] neo901:
I think PeterCxy is not responding in this thread for a long time ;(

Maybe you can recommend some good guidance how correctly build LOS recovery?

Thanks in advance
[Miscellaneous Android Development] dirtylimerick:
[MENTION=11181497]neo901[/MENTION] [MENTION=10729897]GameHunter1[/MENTION] [MENTION=11213789]bamill88[/MENTION]

If you don't mind waiting a few days to a week, I can drop scratch-built binaries (OS & Recovery) for the Atom L, to see if they work for you. And I should be able to publish my device tree and build scripts then as well if you want to try building your own. As of now though, the README in [MENTION=7624432]a-dead-trousers[/MENTION] device tree is a good walkthrough of building your own images. You'll just have to swap his device tree in with the Atom L one from [MENTION=5351691]PeterCxy[/MENTION].
[Miscellaneous Android Development] GameHunter1:
That would be nice!
[Miscellaneous Android Development] Bray90820:
I second this I would really like to get Lineage installed on my new Atom L
[Miscellaneous Android Development] landsome:
Just a sec... The 20200728 build does not work either? Or is it just the last one (0828)?
[Miscellaneous Android Development] neo901:
No chance to test - recovery is not working
[Miscellaneous Android Development] Bray90820:
Its the 20200728 recovery that doesn't install

---------- Post added at 04:32 AM ---------- Previous post was at 04:30 AM ----------

Yeah I can confirm that the recovery is not working here ether
[Miscellaneous Android Development] landsome:
Thanks. Clear now.
[Miscellaneous Android Development] dirtylimerick:
Here's the dropbox link. XDA forums don't let me post outside links until I post more, so add dropbox dot com in front of the line below to get the files.

/sh/ht03m0bx6solizs/AAB6CEYomVwrgIxn7tkUl_3wa?dl=0

It contains a scratch-built recovery and lineage OS image, the md5 for the lineage OS image, the vbmeta.zip from PeterCxy's OP, and a "flash_device.sh" script that will walk through the process of flashing the recovery and OS described in the OP. You can also just open the script in an editor and run the commands individually if you want move through the process and check every step. I used a nearly identical device tree to PeterCxy, so hopefully that works for you all. My device tree and build scripts aren't ready for prime time yet.

One big disclaimer up front, I'm a very experienced engineer, but this is my first effort building and flashing lineage OS. Although it went relatively smoothly for me, proceed at your own risk. It worked just fine on my Atom L. Good luck, I hope this helps.
[Miscellaneous Android Development] Bray90820:
Same issue as before. After I flash the recovery I run fastboot reboot recovery it tells me fastboot: usage: unknown reboot target recovery. When I reboot and hold power up I get a green line on top. Then it reboots to the stock ROM and the recovery is back to stock.
[Miscellaneous Android Development] neo901:
Thank you for your efforts. Unfortunately the same story as with PeterCxy recovery - it is not working on my Atom L.

I am wondering why recovery from [MENTION=7624432]a-dead-trousers[/MENTION] for Atom XL is running well? There should be some secret :)
[Miscellaneous Android Development] Bray90820:
Are you saying the Atom XL recovery works on the Atom L if so can you please link me to that
[Miscellaneous Android Development] GameHunter1:
https://github.com/ADeadTrousers/android_device_Unihertz_Atom_XL/releases
[Miscellaneous Android Development] Bray90820:
While that recovery does install and boot lineage does not install hangs at 47%
[Miscellaneous Android Development] GameHunter1:
Yes, that's why we need Atom L recovery
[Miscellaneous Android Development] a-dead-trousers:
47% is very interesting.

That's the moment when the rom-file is completly transmitted and the recovery should begin with the installation process.

Normally that's when the screen on the phone starts scolling through the various steps of the installation ("installing system.new.dat, installing vendor.new.dat, ...")

If it hangs at 47%, it is either a problem with the signature (sometimes I need to confirm that the signature is not valid to move on) or with the "partitioning".

I suspect that the lineage recovery (like twrp) has some problems with the new super-partition layout of Android 10.

For expample, mounting or deleting /system from inside the recovery is not possible, I either get a "not found" or "not mounted".
[Miscellaneous Android Development] Bray90820:
Yes it actually says "signature verification failed continue with installation" I click yes and the install ends with error code 7
[Miscellaneous Android Development] neo901:
Well, recovery you built for XL starts normally flashing Atom L and then terminates with the message "... you are trying to flash Atom L firmware on Atom XL". For me it seems not to be an issue with mounting or signature, but with some check being failed.
[Miscellaneous Android Development] GameHunter1:
Yes, I confirm that flashing of Atom L lineage using Atom XL recovery stops with the message "... you are trying to flash Atom L firmware on Atom XL"
[Miscellaneous Android Development] a-dead-trousers:
Error 7?

Why didn't you say so in the first place? ;)

This guide should help you modifying the updater script: https://android-fix.com/android-errors/61-status-error-7-twrp.html

BUT I only recommend it as means of last resort.

It's definitely better to fix the recovery for the Atom L.

[MENTION=11099571]dirtylimerick[/MENTION] did you do your build as "user", "eng" or "userdebug" (default) and did you sign your build or not?

The recovery I released for the Atom XL currently is "userdebug" and not signed.

With my current (unreleased) build I'm on "user" and signed but I didn't update my recovery because of other issues. So maybe the error is somehow connected with the build flags.

Another reason could be selinux (something I'm currently struggeling with). There are some rules that should not apply for recovery and others that should not apply for system (see rild.te and fastboot.te in the original device tree from [MENTION=5351691]PeterCxy[/MENTION])

I had quite some problems to integrate these being in "user" and with "neverallows" enabled so they could be faulty in their original form.

---------- Post added at 07:54 ---------- Previous post was at 07:28 ----------

Normally, when something goes wrong with selinux in the system during boot, my phone reboots into fastboot (bootloader) and stops right there.

Using recovery one would be able to check the /proc/last_kmsg to see what's causing the boot hang. But with the recovery not working I dont know how to check the logs, especially being the recovery the one that doesn't work. :(

---------- Post added at 07:58 ---------- Previous post was at 07:54 ----------

The only thing that comes to my mind that should work is opening the phone, soldering a serial cable onto the board and reading all bootstage logs directly from the chip. :cool:
[Miscellaneous Android Development] dirtylimerick:
I'm not sure off the top of my head. Where would I check? I've used the process from your README files with [MENTION=5351691]PeterCxy[/MENTION] 's Atom L device tree. So I didn't change any build variables there.
[Miscellaneous Android Development] neo901:
Check here:

https://source.android.com/setup/develop/new-device#build-variants
[Miscellaneous Android Development] a-dead-trousers:
Then it should be "userdebug" (default)

You need to specifically add the build flavour to the breakfast/brunch command e.g. `breakfast lineage-Atom_L-user` (I wasn't aware of that at the time I was writing the README)

I'm more and more convinced that sepolicy might be the problem here. Especially the short flickering and the immediate switch to the "next best" bootoption reminds me of the behaviour I had with me cluelessly tinkering with selinux.

Try to leave out the sepolicy rules (remove or comment out BOARD_PLAT_PRIVATE_SEPOLICY_DIR in BoardConfig.mk).

Setting the whole build to permissive (set androidboot.selinux in BOARD_KERNEL_CMDLINE to "permissive") would not work I guess, because if there really is a faulty rule it could still crash the loading process.
[Miscellaneous Android Development] dirtylimerick:
I'm not sure if it's userdebug in my (and [MENTION=5351691]PeterCxy[/MENTION]) build. If you look at [MENTION=5351691]PeterCxy[/MENTION] original device tree, in BoardConfig.mk and lineage_Atom_L.mk, there are the lines

BOARD_KERNEL_CMDLINE := bootopt=64S3,32N2,64N2 buildvariant=user androidboot.selinux=enforcing

and

PRIVATE_BUILD_DESC="Atom_L-user 10 QP1A.190711.020 root.20200312.145449 release-keys"

respectively.

This would make me think it's doing a 'user' build variant. I'm still new to building lineage though, so maybe those don't take precedent. I can try changing those options to userdebug, rebuilding, and reposting ROMs to see if there's any difference.
[Miscellaneous Android Development] a-dead-trousers:
No don't do that. The build flavour cannot be set within BoardConfig.mk. It needs the be provided on the command line as I said before.

Instead remove the line BOARD_PLAT_PRIVATE_SEPOLICY_DIR and therefore disable the additional policies.
[Miscellaneous Android Development] dirtylimerick:
OK, building now. Will flash the file on my device and post them if they work first thing tomorrow (EST).
[Miscellaneous Android Development] dirtylimerick:
Files are up, built without the SELinux policy line in BoardConfig.mk file. There is a sub-directory in the original link called 'no_selinux_policy'. Those are the new files. Try them out and let us know how it goes.
[Miscellaneous Android Development] GameHunter1:
It doesn't work. The recovery hangs at boot with a green line at the top of the screen, exactly as before
[Miscellaneous Android Development] Bawlsack:
so is it safe to flash this to atom l i just received? :confused:
[Miscellaneous Android Development] a-dead-trousers:
[MENTION=11099571]dirtylimerick[/MENTION] did you do a "clean" build (clearing "out"-directory)?

I forgot to mention that it could be (for the BOARD_PLAT_PRIVATE_SEPOLICY_DIR at least) that some parts of it stay behind in the "intermediates" of the build process. After moving the sepolicies for my device to a different location and greatly extending them I could still find some artefacts from my previous approaches (mainly the comments I've put into them) in the resulting sepolicy folder on the device.

I had to do a `make clobber` (or just deleting the contents of "out") to get rid of these artefacts.
[Miscellaneous Android Development] dirtylimerick:
I'm fairly certain I did, but I'll run one from scratch just to be sure.
[Miscellaneous Android Development] dirtylimerick:
The build files in the previously linked dropbox no_selinux_policy folder have been updated. They are definitely build without the BOARD_PLAT_PRIVATE_SEPOLICY_DIR line included in the BoardConfig.mk file. Let me know how it goes.
[Miscellaneous Android Development] bamill88:
I just gave the recovery in this upload a shot with no luck. I'm still getting the green line as before.
[Miscellaneous Android Development] dirtylimerick:
Well, I'm real new to building lineage, so I don't have any ideas for next steps for debugging that issue with the recovery. Sorry. The best I can do is suggest building from scratch? My device tree is linked below. It's based off of PeterCxy's Atom_L device tree and a-dead-trousers documentation. I also added scripts and included some tools binaries the scripts will look for. It's tested on Ubuntu 18.04. If you have a similar environment, then cloning the repo and running

> cd Atom_L

> ./scripts/newbuild.sh

should run the build (over a number of hours). In it's current state, it will ask for your sudo password mid-script. Hope this helps.

https://github.com/dirtylimerick0/Atom_L

Unfortunately, everything has loaded and worked for me on my Atom L. I've been using my build from 11/06/20 since that date without any real issue. If I was able to re-create the recovery issue, I would help debug more.

[MENTION=7624432]a-dead-trousers[/MENTION] et al., If you have any other suggestions on next steps, for the other users or for me to try, I've automated all this stuff so it's easy to try new things.
[Miscellaneous Android Development] bamill88:
I haven't built Lineage myself, but I think it's about time I get into it. Thanks for the suggestion.
[Miscellaneous Android Development] a-dead-trousers:
Sorry. For now I'm struggling with my build too, but in the long run I'm planning on a "common" device tree for for both models ;)

What I did after [MENTION=5351691]PeterCxy[/MENTION] last commit was doing logcat over logcat to find all the bits an pieces that Unihertz/Mediatek put into "system" and is needed by "vendor" to work.

Connecting the phone to your computer, rebooting it and running "adb -d logcat > logcat.txt" you could log the boot process for example.
[Miscellaneous Android Development] dirtylimerick:
Good to know. If you want to use your device tree git repo to track/log issues you're currently dealing with. Is can try to address them simultaneously on the Atom L to keep the two in sync, and get a 2nd set of eyes on things. I think you had said TWRP and building Gapps were outstanding issues. Has that changed at all?
[Miscellaneous Android Development] a-dead-trousers:
Actually the audio jack is more pressing.

Next would be to find out what's missing for Google Camera to work.
[Miscellaneous Android Development] landsome:
Afaik it's hard to find/mod a working gcam for a mediatek chip.
[Miscellaneous Android Development] a-dead-trousers:
That explains a LOT :p

The logcat from starting openCamera and Google Camera is nearly the same while the first one runs smoothly and the later one crashes immediately.
[Miscellaneous Android Development] magnetosphere:
Any idea where the Atom XL thread went? ;o;
[Miscellaneous Android Development] Bray90820:
What's the status of this as of right now I can't get the correct recovery booted on my Atom
[Miscellaneous Android Development] a-dead-trousers:
It didn't survive the forum update. :cry:

I'm currently waiting for the operators to respond wether they can resurect it or not.

In the meantime I'm also waiting for the latest update of Unihertz to get posted on Google Drive to be able to include the kernel and newest libraries into my next buidl.
[Miscellaneous Android Development] a-dead-trousers:
I just found out it's back online:

https://xdaforums.com/t/rom-10-0-un...or-unihertz-atom-xl-alpha-2020-10-01.4171407/
[Miscellaneous Android Development] Treeoctopus:
Hiya -- first off thanks for all efforts on this specialist device. I cannot wait to have a smaller screen phone in this age of giant overblown phones.

So, in the absence of

I've got a Atom L in transit here to Australia and I just wanted to confirm that TWRP for ATom XL is 1) launchable (although it possibly gets overwritten) 2) can create a TWRP backup in case things go wrong and 3) can flash magisk and get root for stock ROM

While waiting for a working Lineage the goal is to at least get root on the stock ROM.... is this going to work?

Thanks!
[Miscellaneous Android Development] a-dead-trousers:
TWRP is not working. Wether on Atom L or Atom XL. With mine I did at least get the touchscreen to work but flashing a rom doesn't work. The device keeps bootlooping. So Backup with TWRP is not possible for now. I'm waiting for 3.5.0.0 and a possible better Android 10 / Treble support.

Root with Magisk should (in theory) be possible though by modifying the boot.img inside the Stock Rom updates and then flashing the whole thing using SPFlash Tool. Beware that this also factory resets the phone. Learned it the hard way. Stock Rom can be downloaded from https://drive.google.com/drive/u/0/folders/0By1nhWOmuw2KdDhTUlFOZHpXQjg?sort=13&direction=a but the latest update from 2020-12-03 isn't online yet.
[Miscellaneous Android Development] GameHunter1:
I've successfully rooted my Atom L using instructions in the top of this thread and lineage recovery image from the Atom XL thread. Unfortunately it is not possible to flash the lineageos to my phone using this "not native" recovery.
[Miscellaneous Android Development] Hilal GR BRO:
Hlo plzzz make a better gaming os for fortuna3g with insane gaming kernel clock speed thank you!
[Miscellaneous Android Development] landsome:
Does one have to have a custom recovery to flash LOS? Does not sideloading via adb directly in bootloader work?
[Miscellaneous Android Development] a-dead-trousers:
For sideload to work you need a piece of software (e.g. recovery) on the phone to communicate with that is able to run the necessary updater_script instructions.

What you want to achieve is a simple flash and to do that you need to use fastboot.

I just did that with a modified super.img. Because of some assert-failure during the resizing of the partitions inside super.img using sideload I was forced to do that. I wanted to update the vendor partition with the latest stock ROM but something went bad so I wasn't able to switch back to Lineage using the sideload method.

As soon as I have the time I'm going to post a How-To for that on my github.

(I'll need this because I'm quite certain that this might happen more often)

Maybe this approach can also be used by those who are not able to get the recovery working.

EDIT:

Im too lazy ;)

Here is the guide I used: https://xdaforums.com/t/editing-system-img-inside-super-img-and-flashing-our-modifications.4196625/

I just combined vendor.img from stock and system.img and product.img from lineage into one super.img for flashing. The images need to be in ext4 format and not in sparse format hence you will need simg2img if you are using the ones from your build-tree. If you want to use those from a ROM zip package you need to do a little bit more: https://github.com/danielmmmm/dat2img
[Miscellaneous Android Development] a-dead-trousers:
Hello everyone.

What was long is finally good!

With the recent release of TWRP 3.5.0 I was finally able to get it to work with my Atom XL.

But that made me wonder: Was it really just that easy?

So I decided to go for it and build one too for your Atom Ls.

Releases · ADeadTrousers/twrp_device_Unihertz_Atom_L_EEA

Device tree for the Unihertz Atom L EEA (european union) - ADeadTrousers/twrp_device_Unihertz_Atom_L_EEA

github.com

Enjoy.
[Miscellaneous Android Development] landsome:
Wow! Thanks a lot. That's wonderful. Now let's the hope the ROM works just as well. (Should we try PeterCxy's version, what do you think?)
[Miscellaneous Android Development] Treeoctopus:
Thank you GameHunter1 - I've just received one in the mail and your post is just what I was hoping for.

Here we go....
[Miscellaneous Android Development] landsome:
So how about trying the new twrp recovery?
[Miscellaneous Android Development] Treeoctopus:
Alright, good news in that I managed to reflash it entirely with an older version of SPFlasher, although getting it to actually recognise the device was hit or miss.

The bootloader was still unlocked after this.

I reactivated ADB debugging- ran the correct triplet of adb vbmeta commands:

a) fastboot flash --disable-verification --disable-verity vbmeta vbmeta.img

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

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

Then flashed the recent TWRP recovery and rebooted into it no worries

d) terminal: fastboot flash recovery recovery.img

e) terminal: fastboot reboot recovery

f) tested that it would load Android properly before trying Magisk - it loaded fine

g) sideloaded Magisk Magisk-v20.2.zip

h) and then get stuck back at that black screen of "fastboot" death.

So it seems the main problem might be the Magisk.

Any ideas?

Perhaps flashing Magisk via a zip file instead?

GameHunter1, I reread your post a few times, can you please be so kind as to provide some detail on how you actually rooted it from the Lineage Recovery? Does the recovery.img on the Atom XL thread somehow also root it as well as install the Lineage OS?