Porting Lineage-14.1 to SM-G925F - Galaxy S6 Edge Android Development

As far as I know there is no official support on the LineageOS github for the zerolte model and that's when I decided that I'd like to change that.
I created my own device tree, but there are still some important directories and files missing to get passed the brunch command for zerolte.
If any kind soul would be able to help me make the changes specific for this model I'd be so happy.
Here's the tree: https://github.com/Umeaboy/android_device_samsung_zerolte

OK, here's the first error when running brunch zerolte:
Checking build tools versions...
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp: Unused source files: \
build/core/binary.mk:1253: external/deqp/Android.mk: libdeqp: Unused source files: \
build/core/binary.mk:1253: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc
build/core/binary.mk:1253: external/pdfium/third_party/pdfiumbigint.mk: libpdfiumbigint: Unused source files: bigint/BigInteger.cc bigint/BigIntegerUtils.cc bigint/BigUnsigned.cc bigint/BigUnsignedInABase.cc
./external/speex/Android.mk:56: TODOArm64: enable neon in libspeex
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
find: ‘/home/kristoffer/android/lineage/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates’: File or directory does not exist
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
build/core/base_rules.mk:183: *** hardware/samsung/audio: MODULE.TARGET.SHARED_LIBRARIES.audio.primary.universal7420 already defined by device/samsung/zerolte/audio.
build/core/ninja.mk:166: receipt for target ”/home/kristoffer/android/lineage/out/build-lineage_zerolte.ninja” failed
make: *** [/home/kristoffer/android/lineage/out/build-lineage_zerolte.ninja] Error 1
make: Leaving directory ”/home/kristoffer/android/lineage”
Is there's a repo missing in my manifest to get the files that are missing? When I google I can't seem to find which one.

Here's my local_manifest.

In fact there is a lineage os 14 build for s6 edge

alex.X said:
In fact there is a lineage os 14 build for s6 edge
Click to expand...
Click to collapse
Yes, but not one that works beyond the Setup guide.
Tried the Nexus zip already.

There is in fact even though it has quite a few bugs

alex.X said:
There is in fact even though it has quite a few bugs
Click to expand...
Click to collapse
Please point me to it.
As I said...... I already tried the Nexus version.

it would be so great to have a Lineage rom for our S6 edge ! is this phone so rare that it is not supported?
Still fed up with TW, but in love with this sreen.

I found a custom version of Lineage for this phone, but I'd prefer to build a clean version so that more updates/fixes come more often.
Here's the file: https://nexus-roms.eu/files/testing/zero/ResurrectionRemix-zero-multitarget-2017-06-14_1948.zip
If you don't care about loosing everything on your phone here's how to erase everything on it:
In TWRP
Click on Wipe.
Then click on Advanced wipe.
Select the following partitions to wipe:
Dalvik / ART Cache, System, Data, Internal Storage, Cache.
Now swipe to the right to wipe.
Go back one step and press Format data.
Type the word yes and press the blue button on the lower right corner that has a check mark in it.
Now, go back to main menu.
If you have downloaded the above mentioned zip file to your desktop and you have adb working on your local computer, connect the phone with a cable and type in the terminal:
Code:
adb devices
Once you've confirmed that the phone is recognized, do this command:
Code:
cd Desktop
adb push ResurrectionRemix-zero-multitarget-2017-06-14_1948.zip /sdcard/
It will take some time so grab a coffee or play with the cat.
Done?
Good!
Click Install.
Go all the way down to the bottom of that directory and click on the zip file and let it install.
Now just reboot the phone and wait until the boot is finished because the first boot will take a little while.

925I

Any news for release ???

On every lineage os rom I tried for g925f is the failure that, if I lock my phone with the powerbutton its impossible to turn it on again...I have to restart it. And also the sensitive buttons don't work

Billabomb75 said:
Any news for release ???
Click to expand...
Click to collapse
Well, there won't be one unless you're willing to help working on it.
Make a manifest that's as close as possible to Lineage stock and I'll add it to the repo and do a test build.
There aren't any repos for zerolte for Lineage as noone has added support for it.

Umeaboy said:
Well, there won't be one unless you're willing to help working on it.
Make a manifest that's as close as possible to Lineage stock and I'll add it to the repo and do a test build.
There aren't any repos for zerolte for Lineage as noone has added support for it.
Click to expand...
Click to collapse
Well I dont know how to work on android manifests

Billabomb75 said:
Well I dont know how to work on android manifests
Click to expand...
Click to collapse
https://forum.xda-developers.com/showthread.php?t=2329228 should help you learn how to do it.
I can't do ALL the work by myself you know.

Umeaboy said:
https://forum.xda-developers.com/showthread.php?t=2329228 should help you learn how to do it.
I can't do ALL the work by myself you know.
Click to expand...
Click to collapse
tnx m8 will look at

alex.X said:
In fact there is a lineage os 14 build for s6 edge
Click to expand...
Click to collapse
None of Lineage OS works on Galaxy S6 , i downloades 4 ROMs , none working. I had hope for one but when i turn screen of it doesnt come back

Its good to see Lineage is working on this.....waiting for a quick stable version from the team.
Very Thanks in advance.

[UNOFFICIAL][G920/5F][7.1.2] LineageOS 14.1 Stable Version
https://forum.xda-developers.com/galaxy-s6/orig-development/rom-lineageos-14-1-t3598775

Lol, TeamNexus always release a multitarget build here and for multitarget I mean 920/5 F/I/T/W8. You can build 925 if you want, I always build mine since my device is not supported (925S)

Related

Is there a Stock Kernel with Safetynet Patch?

I'm looking for a stock kernel that only patches Safetynet checking. Does this exist? If not, is it easy for me to "make it" myself?
I'm not sure if there's a prebuilt one, but building one yourself isn't too hard. The patch is at https://github.com/sultanxda/androi...bc05b16bbd33521c2fffaf491c5657a94bfcfc5.patch. You just follow the steps at http://source.android.com/source/building-kernels.html as usual with the following notes:
Use "kernel/msm" as the source location
Use "marlin_defconfig" as the build configuration
Apply the patch after running the git checkout command
Use the aarch64 prebuilts, not the arm ones
Cares said:
I'm looking for a stock kernel that only patches Safetynet checking. Does this exist? If not, is it easy for me to "make it" myself?
Click to expand...
Click to collapse
Depending on your motivation for a "stock kernel" you might try franco kernel. He doesn't seem to do anything that MIGHT introduce instability or strays very far from stock.
I can vouch for franco. He does minimal performance-only tweaks by default.
josephcsible said:
I'm not sure if there's a prebuilt one, but building one yourself isn't too hard. The patch is at https://github.com/sultanxda/androi...bc05b16bbd33521c2fffaf491c5657a94bfcfc5.patch. You just follow the steps at http://source.android.com/source/building-kernels.html as usual with the following notes:
Use "kernel/msm" as the source location
Use "marlin_defconfig" as the build configuration
Apply the patch after running the git checkout command
Use the aarch64 prebuilts, not the arm ones
Click to expand...
Click to collapse
Hey thanks for the tip. I went ahead and patched the no safetynet patch to the android-msm-marlin-3.18-nougat-mr1 kernel source and compiled it. I now have a Image.gz-dtb file which I zipped (I also just have a binary file named "Image"). What should I with those now, just flash those like I would one of the other kernels? And which file exactly? The gz file? or the just binary file named "Image"?
So essentially "fastboot flash kernel <file_name>"?
When I was compiling I got two warnings by the way:
drivers/soc/qcom/Kconfig:371:warning choice value used outside its choice group
drivers/soc/qcom/Kconfig:376:warning choice value used outside its choice group
Anything I should be concerned about? I've never done this before, but did a lot of reading before I went ahead and used to do some C coding back in the day, so it's not completely unknown to me.
Essentially, these are the steps I followed, after quickly installing Linux Mint:
Code:
Create a working directory in /home/$USER/ (I created /home/sakete/android)
Enter working directory
Download android kernal source
git clone https://android.googlesource.com/kernel/msm
Download prebuilt toolchain
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
cd aarch64-linux-android-4.9
export PATH=$(pwd)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
export CROSS_COMPILE=$(pwd)/bin/aarch64-linux-android-
export ARCH=arm64
export SUBARCH=arm64
Checkout specific kernel branch for Pixel/PixelXL (be in 'msm' folder)
git checkout android-msm-marlin-3.18-nougat-mr1
Get Safetynet Patch (still be in 'msm' folder)
git fetch https://github.com/sultanxda/android_kernel_oneplus_msm8996 cm-13.0-sultan
git cherry-pick abc05b16bbd33521c2fffaf491c5657a94bfcfc5
Build kernel (still be in 'msm' folder)
make clean
make mrproper
make marlin_defconfig
make -j$(grep -c ^processor /proc/cpuinfo)
I initially got some build errors, but running this command solved it: sudo apt-get install build-essential
This is a useful link for those of you who are interested in doing this as well: http://forum.xda-developers.com/showpost.php?p=69627576&postcount=7108
Hey if you can build it and post it here, that would be awesome. This is exactly what I'm looking for.
It will let me preemptively unlock my Verizon bootloader before flashing the latest OTA, while keeping Android Pay.
Has Google already posted the source for the 7.1.1 update kernel?
The source I pulled (android-msm-marlin-3.18-nougat-mr1) should be what's in the December update. It should be 7.1.1
Sakete said:
Hey thanks for the tip. I went ahead and patched the no safetynet patch to the android-msm-marlin-3.18-nougat-mr1 kernel source and compiled it. I now have a Image.gz-dtb file which I zipped (I also just have a binary file named "Image"). What should I with those now, just flash those like I would one of the other kernels? And which file exactly? The gz file? or the just binary file named "Image"?
Click to expand...
Click to collapse
The Image.gz-dtb file is the one you want.
Sakete said:
So essentially "fastboot flash kernel <file_name>"?
Click to expand...
Click to collapse
I've never done it like that, but that's apparently how Franco's kernel installs, so it's worth a shot I guess. Another way of doing it is to unpack the stock boot image with either pbatard's unmkbootimg or osm0sis's Android Image Kitchen, replace its kernel with your Image.gz-dtb, then repack and flash the new boot.img to the boot partitions.
Sakete said:
When I was compiling I got two warnings by the way:
drivers/soc/qcom/Kconfig:371:warning choice value used outside its choice group
drivers/soc/qcom/Kconfig:376:warning choice value used outside its choice group
Anything I should be concerned about? I've never done this before, but did a lot of reading before I went ahead and used to do some C coding back in the day, so it's not completely unknown to me.
Click to expand...
Click to collapse
Nothing you need to worry about.
josephcsible said:
The Image.gz-dtb file is the one you want.
I've never done it like that, but that's apparently how Franco's kernel installs, so it's worth a shot I guess. Another way of doing it is to unpack the stock boot image with either pbatard's unmkbootimg or osm0sis's Android Image Kitchen, replace its kernel with your Image.gz-dtb, then repack and flash the new boot.img to the boot partitions.
Nothing you need to worry about.
Click to expand...
Click to collapse
Great, thanks, I'll try flashing the kernel tomorrow night and will post it if successful.
Interestingly it seems that Pixel (sailfish) and Pixel XL (marlin) use the same kernel / kernel source? There at least doesn't seem to be a sailfish specific source. Will be interesting to see how it pans out tomorrow.
Sakete said:
Interestingly it seems that Pixel (sailfish) and Pixel XL (marlin) use the same kernel / kernel source? There at least doesn't seem to be a sailfish specific source. Will be interesting to see how it pans out tomorrow.
Click to expand...
Click to collapse
Indeed. The same kernel binary can run on both devices. (The ElementalX and Franco kernels don't even have separate builds for the two.)
Would you mind posting the image you built?
iPwn_ said:
Would you mind posting the image you built?
Click to expand...
Click to collapse
I'm at work now, will post it tonight.
Sent from my Pixel using Tapatalk
Stock Kernel + SafetyNet Patch applied
Well holy crap, it actually worked! Just flashed the kernel, set up android pay no problem! And everything else works just fine too.
Attached is a zip.
Steps to install (make sure you have adb and fastboot set up):
- Download file and unzip
- Reboot into bootloader (power down, hold Power + Volume Down)
- Attach device to computer
- Enter command: fastboot flash kernel <kernel_image>
- Enter command: fastboot reboot
- Disconnect device and wait for it to finish booting. That's it!
You're my hero.
Might be a lot to ask, but it would be dope if you maintained where you update the build every month for Google's latest release.
iPwn_ said:
You're my hero.
Might be a lot to ask, but it would be dope if you maintained where you update the build every month for Google's latest release.
Click to expand...
Click to collapse
I'm creating a thread in the dev section.
Edit: thread is up.
Cares said:
I'm looking for a stock kernel that only patches Safetynet checking. Does this exist? If not, is it easy for me to "make it" myself?
Click to expand...
Click to collapse
A bit late, but just for the record, ElementalX is just like stock with added features. If you don't use those features, you are essentially using the stock kernel.
I am thinking about going this route.. but I am not sure the process to flash a custom kernel on my Pixel.. would anyone be able to walk me through it? thanks!

[ROM] Official LineageOS 14.1 for GT-I9305

Official LineageOS 14.1 for Samsung Galaxy S III LTE GT-I9305
1 _
_ download odin for windows
# odin
http://forum.xda-developers.com/showthread.php?t=2711451
2 _
_ flash the latest stock rom with odin (ap button)
# I9305XXUFQG1
http://updato.com/firmware-archive-select-model?record=65E064847BE811E7963AFA163EE8F90B
3 _
_ flash twrp recovery with odin (ap button)
# twrp
https://twrp.me/devices/samsunggalaxys3internationallte.html
4 _
_ flash the os with twrp
# unofficial daily build by @walter79
http://buildyourownandroid.selfhost.eu/smartphone/daily-builds/
# official weekly build
https://download.lineageos.org/i9305
5 _
_ you can also flash gapps
# OpenGApps
http://opengapps.org/
Thanks a lot to @BlueFlame4 and @walter79 for offering their build server !
XDA:DevDB Information
[ROM] Official LineageOS 14.1 for GT-I9305, ROM for the Samsung Galaxy S III I9300
Contributors
rgib
Source Code: https://github.com/LineageOS/android_kernel_samsung_smdk4412
ROM OS Version: 7.x Nougat
Version Information
Status: Stable
Created 2017-01-20
Last Updated 2017-11-11
Great let me be the first one to thank you.
Keep Up the good work
Hi rgib, in this list of ROMs wich one is the nougat latest version for the i9305? I'm sorry I don't know the denomination.
Thanks
mop09737 said:
Hi rgib, in this list of ROMs wich one is the nougat latest version for the i9305? I'm sorry I don't know the denomination.
Thanks
Click to expand...
Click to collapse
Hi @mop09737,
the denomination is still i9305 but the build wasn't available until recently
https://visi0nary.de/builds/full/lineage-14.1-20170121-UNOFFICIAL-i9305.zip
@rgib, to build it myself, do I just have to:
repo init -b cm-14.1
repo sync --force-sync
brunch i9305
Or is there something else I have to do (maybe install some new dependencies?). I just had an error (I'm currently looking where from).
EDIT:
Found the error, attached a screenshot. Has to do with Wifi I guess.
i9305 blobs missing. check github/themuppets
JUX84 said:
Hi @mop09737,
the denomination is still i9305 but the build wasn't available until recently
https://visi0nary.de/builds/full/lineage-14.1-20170121-UNOFFICIAL-i9305.zip
@rgib, to build it myself, do I just have to:
repo init -b cm-14.1
repo sync --force-sync
brunch i9305
Or is there something else I have to do (maybe install some new dependencies?). I just had an error (I'm currently looking where from).
EDIT:
Found the error, attached a screenshot. Has to do with Wifi I guess.
Click to expand...
Click to collapse
Thanks
walter79 said:
i9305 blobs missing. check github/themuppets
Click to expand...
Click to collapse
Isn't it enough to have it in my local roomservice ?
EDIT: Just checked with 'git status' and I'm at the last commit.
Is there a way to clean up the builds files since I switched from cm-13.0 to cm-14.1, maybe there's some sort of cache or something
Hello
I try to install rom but i have a problem
In recovery during the flash of rom I have two red errors:
"Patching system image unconditionnaly:
E:unknown command [log]
E:unknown command [log]"
If i reboot after flash, phone bootloop
Did i make something wrong?
buscagoule said:
Hello
I try to install rom but i have a problem
In recovery during the flash of rom I have two red errors:
"Patching system image unconditionnaly:
E:unknown command [log]
E:unknown command [log]"
If i reboot after flash, phone bootloop
Did i make something wrong?
Click to expand...
Click to collapse
no, let's flash tomorrow's build.
JUX84 said:
Isn't it enough to have it in my local roomservice ?
EDIT: Just checked with 'git status' and I'm at the last commit.
Is there a way to clean up the builds files since I switched from cm-13.0 to cm-14.1, maybe there's some sort of cache or something
Click to expand...
Click to collapse
I completely deleted the folder contents and did a new repo init + repo sync, and apparently it just werks.
I guess some extra steps are needed when one wants to switch branches.
Is your personal build booting?
rodman01 said:
Is your personal build booting?
Click to expand...
Click to collapse
yes. let's download lineage-14.1-20170122-UNOFFICIAL-i9305.zip
thanks and ok, will try this...I finished also a build yesterday (all sources from leos 14.1), but it doesn't boot.
Stucks on leos bootanimation. Was/is there a fix on github today? Haven't seen seen changes related to smdk or i9305. Additional I got build errors with smdk-gps. I solved it with copying some files or lines from another working rom.
the new version 20170122 is still cant boot, pls help
Looks like exactly the problem I mentioned in the official cm-13.0 thread.
For me previous build booted fine, but i've must wait more time for it than usual. Didn't test latest build.
I had also bootloops with yesterdays build: 20170122. But after flashing the UPDATE-SuperSU-v2.71.zip, it boots now. So it seems, bootloop is happening because of the, from lineaos, currently removed root....
Hi, i a great pleasure to see lineage OS experiment on this device.
Do you think it will be possible that an official build coming soon?
And why this phone (better than I9300) was not fully support by cyanogen team?
Best
Optrolight
I flash 20170124 build:
Boot after flash is very, very long
I can't set up my gmail accompt only with "tap and go" method and i must connect a second phone to access the email set up
No connection data
wifi is ok
Call ok but I listen nothing and nobody hears me
No acces to my sd card with file manager
buscagoule said:
I flash 20170124 build:
Boot after flash is very, very long
I can't set up my gmail accompt only with "tap and go" method and i must connect a second phone to access the email set up
No connection data
wifi is ok
Call ok but I listen nothing and nobody hears me
No acces to my sd card with file manager
Click to expand...
Click to collapse
So why there are lot of differences between I9300 and I9305?
It's a very good question for me!!

[ROM] Unofficial LineageOS 16.0 PQ3A.190801.002] for ZTE Blade S6 (P839F30)

Code:
[I]DISCLAIMER[/I]
[COLOR="red"]Do not mirror my builds![/COLOR] Please post a link to this thread instead.
All information and files — both in source and compiled form — are provided on an as is basis.
No guarantees or warranties are given or implied. The user assumes all risks of any damages
that may occur, including but not limited to loss of data, damages to hardware, or loss of
business profits. Please use at your own risk. Note that unless explicitly allowed by the
warranty covering your device, it should be assumed that any warranty accompanying your
device will be voided if you tamper with either the system software or the hardware.
Introduction
This is my unofficial build of LineageOS 16.0 for the ZTE Blade S6 aka P839f30.
This is the first alpha release, so be aware that issues could arise.
I have tested this version with my AS variant device. Other variants have to be tested.
Click to expand...
Click to collapse
Features
working:
phone: calls, sms, data.
wifi
bluetooth
sensors
gps: mostly I have used the energy saving mode
sound
camera: rear with flash and front.
torch
headphone detection
swap back and menu button
light: button backlight, brightness control and adaptive brightness, breath light (notification and/or battery)
not working:
SELinux is permissive.
We have to test to find out.
Click to expand...
Click to collapse
Installation instructions
It is best to have installed the latest stock rom beforehand, so modem and all other vendor stuff is up to date.
If you like you can use this mod to have a unified data partition, please proceed with caution.
You will need TWRP or any other custom recovery.
Reboot into recovery and do a nand backup.
Do a factory format.
Download Rom and put it on your phone or use adb sideload.
Install the rom and then clear cache and dalvik cache.
optional: install su and/or gapps (preferable pico).
Click to expand...
Click to collapse
Changelog:
25.05.2021 - new release:
los security patch level 05.05.2021
revert some kernel changes from the last release
add some cpu governors and cpu hotplug
now with Boeffla WakeLock Blocker and other things
wireguard kernel support
22.12.2019 - 1st beta release:
los security patch level 05.12.
kernel supports EU device variant
add autosmp hotplug
add cpu governors blu_active, darkness, lionfish and relaxed
Revert CwMcu sensor driver from SU6 kernel release
24.10.2019 - 2nd alpha release:
los security patch level 05.10.
CwMcu sensor driver from SU6 kernel release, with wake lock disabled
wifi mac is loaded anyway, remove the loading in the wifi driver
give bluetooth a null mac address, to overcome force close error
kang gps from oppo
04.10.2019 - 1st alpha release:
los security patch level 05.09.
initial release of pie
Click to expand...
Click to collapse
Downloads
new release - 25.05.2021:
Google Drive.
first beta release - 22.12.2019:
Google Drive or here.
second alpha release - 24.10.2019:
Google Drive or here.
first alpha release - 04.10.2019:
Google Drive or here.
If you want root use the lineage addon package found here - download arm version.
Install it after flashing the rom or download your favourite root package and install it.
Click to expand...
Click to collapse
Sources
device
msm8916-common
vendor
kernel
Click to expand...
Click to collapse
FAQ
Here you will find some answers to common question which could arise.
Q: How to give root access to an app or adb?
A: First install the su extra package from Lineage OS or any other su tool you like. Then go into settings and about device, click there multiple times on the build number until you unlocked the developer options. Go to developer options and look for root access.
Q: I thing I found an issue, what to do now?
A: Do a logcat or grab a dmesg while having the issue, otherwise we can't say what is happening. Report as much info as possible. Quote your stock rom your device shipped with or which device variant you possess.
Click to expand...
Click to collapse
Thanks To/Credits
Code:
*aquaris-dev team
*aymende7
*PacMM79
*LineageOS team
*many others
XDA:DevDB Information
Unofficial LineageOS 16.0 [PQ3A.190801.002] P839F30, ROM for the ZTE Blade S6
Contributors
lightwars
ROM OS Version: 9.x Pie
ROM Kernel: Linux 3.10.x
Based On: LineageOS 16.0
Version Information
Status: Beta
Current Beta Version: 20191213
Beta Release Date: 2019-12-22
Created 2019-10-04
Last Updated 2019-12-22
many thanks for the new version, i will tested later :good: :highfive:
Hello, works on my ZTE Blade S6 Plus (p839f50)
but only with a fixed updater-script
from Folder: lineage-16.0-20191002-UNOFFICIAL-p839f30.zip\META-INF\com\google\android
the bold text must delete and than save the file
after the start my phone , i have a error message with bluetooth is deactivated
updater-script - original
https://filehorst.de/d/crqjwnjI
updater-script - fixed
https://filehorst.de/d/cbmctorj
new update is in the op.
just small changes and updated security patch level.
Anybody tested with EU device?
... at the moment no time to test myself (to much effort to keep my other devices up-to-date ), just wanted to ask if anybody already tested on EU device (and forgot to post ).
Gtz
Kurt
Kurt Krummbein said:
... at the moment no time to test myself (to much effort to keep my other devices up-to-date ), just wanted to ask if anybody already tested on EU device (and forgot to post ).
Click to expand...
Click to collapse
Answer my own request, gave it a try, didn't boot, screen stayed black and device went into fastboot-mode ... restored my nandroid-backup of stock-EU-B15 .
Next time, i format system and just install rom without gapps and addon-su.
Gtz
Kurt
Kurt Krummbein said:
Answer my own request, gave it a try, didn't boot, screen stayed black and device went into fastboot-mode ... restored my nandroid-backup of stock-EU-B15 .
Next time, i format system and just install rom without gapps and addon-su.
Gtz
Kurt
Click to expand...
Click to collapse
Hello Kurt,
please, if you find the time to do another test. Download the attached zip extract the boot.img and copy it to your device, flash it with twrp right after installing the lineage zip through twrp. report back if something different happens.
I splited the dtb from the zImage and attached the almost stock eu dtb, so maybe we are lucky. But I have not find any big differences in analyzing the dts of EU vs AS and kernel defconfigs EU vs AS.
I can show this files too, if somebody has a better understanding of this.
lightwars said:
Hello Kurt,
please, if you find the time to do another test. Download the attached zip extract the boot.img and copy it to your device, flash it with twrp right after installing the lineage zip through twrp. report back if something different happens.
I splited the dtb from the zImage and attached the almost stock eu dtb, so maybe we are lucky. But I have not find any big differences in analyzing the dts of EU vs AS and kernel defconfigs EU vs AS.
I can show this files too, if somebody has a better understanding of this.
Click to expand...
Click to collapse
Hi!
Well, i loaded the def's and config's into WinMerge and did a compare ... in the def's there are some different addresses, but i have now clue what the meaning of that all is :angel:. The config files look like beeing from different kernel versions, there are some options which don't exist in both, one is modularised, the other is not ... all in all quite strange.
Ok, i made a try with the boot_eu.img:
- Made a factory reset
- Flashed the LOS.zip
- Wiped caches
- unzipped the boot.img
- copied it to boot partition with dd if=boot_eu.img of=/dev/block/bootdevice/by-name/boot
- reboot
... screen goes black, one buzz .... nothing. One the PC the fastboot device appears and that's it. I was looking for tombstones, but couldn't find any ... they are stored to /data/tombstones, are they? I'm not sure, the kernel i getting up high enough to mount /data.
Cheers
Kurt
P.S.: one thing i forgot to mention ... i coulnd't find the "OEM unlock" swich in the stock system anywhere and the bootloader seems to be quite dumb, many commands from fastboot just end in a "command unknown", perhaps there's something left to do on my side (tweak in build.prop etc ... googleed for it no result ).
Kurt Krummbein said:
Ok, i made a try with the boot_eu.img:
- Made a factory reset
- Flashed the LOS.zip
- Wiped caches
- unzipped the boot.img
- copied it to boot partition with dd if=boot_eu.img of=/dev/block/bootdevice/by-name/boot
- reboot
... screen goes black, one buzz .... nothing. One the PC the fastboot device appears and that's it. I was looking for tombstones, but couldn't find any ... they are stored to /data/tombstones, are they? I'm not sure, the kernel i getting up high enough to mount /data.
Click to expand...
Click to collapse
Thanks for testing. You used the reboot system button of twrp I guess. Have you tried to reboot by pressing the power button?
I can think of two things: There is some flag in the kernel source which is called download_mode. I have seen that some devices have different default values! At the moment the value is 0, devices like the ones from bq with msm8916/msm8939 used this too, but devices from oppo with msm8939 uses a value of 1 as default. We can try this one.
Or there is a mask, which defines the restart reason so to speak says the device which mode to boot to. Here we have some differences in the meaning of the bits, a different bit shifting is used.
I can not really think that one of these causes your device to boot into download mode, because the recovery uses the same kernel on both region variants...
lightwars said:
Thanks for testing. You used the reboot system button of twrp I guess. Have you tried to reboot by pressing the power button?
I'll give that one a try .
Hope my device is not "going over the Wupper" LOL (this one has to come somewhen ...)
Click to expand...
Click to collapse
Ok, tried it ... same result. Then did a (perhaps a bit wired) test, just restored boot from my nandroid-backup. With this, the white ZTE bootscreen comes up and after some seconds it reboots to twrp.
Perhaps the dumb-bootloader refuses to boot with AS keys ... otherwise it wouldn't boot recovery. Strange puzzle.
Cheers
Kurt
Kurt Krummbein said:
Ok, tried it ... same result. Then did a (perhaps a bit wired) test, just restored boot from my nandroid-backup. With this, the white ZTE bootscreen comes up and after some seconds it reboots to twrp.
Perhaps the dumb-bootloader refuses to boot with AS keys ... otherwise it wouldn't boot recovery. Strange puzzle.
Cheers
Kurt
Click to expand...
Click to collapse
It is okay to do some unusual testings. I was doing this sort of things also, back then.
I'm not sure I get you, when you write about AS keys. Do you mean the fingerprint in the build.prop? I think I used the ones from the eu version. Maybe they build in some kind of kernel version check inside the bootloader, but only for the eu and other versions.
The cause is, that android needs an advanced kernel, so we can not use the stock kernel to boot newer android version like nougat, oreo or pie.
Sorry, I can not be of much help here, because I do not have a device with eu or some other region version. But we can try do some changes, if you like to do some more testing and maybe get something like a log, last_kmseg or ramoops. We should look to activate some of them.
Hello @Kurt Krummbein,
if you find the time please post the info you get by issuing this commands in the adb shell or on your phone in a terminal:
Code:
su
cat /sys/zte_board_id/board_id
cat /proc/device-tree/model
cat /proc/device-tree/compatible
Do this on your rom or stock rom you are using a the moment. Thank you.
For reference mine output is this:
Code:
Blade-S6:/ # cat /sys/zte_board_id/board_id
wrbA
Blade-S6:/ # cat /proc/device-tree/model
Qualcomm Technologies, Inc. MSM 8939 MTP
Blade-S6:/ # cat /proc/device-tree/compatible
qcom,msm8939-mtp qcom,msm8939 qcom,mtp
It could be that the eu variant uses another device tree inside the kernel, because the bootloader request that, but we have only this model available.
lightwars said:
Hello @Kurt Krummbein,
if you find the time please post the info you get by issuing this commands in the adb shell or on your phone in a terminal:
Code:
su
cat /sys/zte_board_id/board_id
cat /proc/device-tree/model
cat /proc/device-tree/compatible
Do this on your rom or stock rom you are using a the moment. Thank you.
For reference mine output is this:
Code:
Blade-S6:/ # cat /sys/zte_board_id/board_id
wrbA
Blade-S6:/ # cat /proc/device-tree/model
Qualcomm Technologies, Inc. MSM 8939 MTP
Blade-S6:/ # cat /proc/device-tree/compatible
qcom,msm8939-mtp qcom,msm8939 qcom,mtp
It could be that the eu variant uses another device tree inside the kernel, because the bootloader request that, but we have only this model available.
Click to expand...
Click to collapse
Mine is:
cat /sys/zte_board_id/board_id
wrbA-EUROPE
cat: /proc/device-tree/model: No such file or directory
cat: /proc/device-tree/compatible: No such file or directory
ls /proc/device-tree
/proc/device-tree: No such file or directory
Attached my build.prop ... perhaps this sheds some light .
Thx
Kurt
Kurt Krummbein said:
Mine is:
cat /sys/zte_board_id/board_id
wrbA-EUROPE
cat: /proc/device-tree/model: No such file or directory
cat: /proc/device-tree/compatible: No such file or directory
ls /proc/device-tree
/proc/device-tree: No such file or directory
Attached my build.prop ... perhaps this sheds some light .
Thx
Kurt
Click to expand...
Click to collapse
Sorry for that, I forgot that the stock kernel did not expose the device tree.
But I think I remeber the info about the model is in the logcat after boot up...
Please try this ones in a terminal on the phone or via adb shell, they should work.
Code:
su
Blade-S6:/ # cat /sys/devices/soc0/hw_platform
MTP
Blade-S6:/ # cat /sys/devices/soc0/soc_id
239
lightwars said:
Sorry for that, I forgot that the stock kernel did not expose the device tree.
But I think I remeber the info about the model is in the logcat after boot up...
Please try this ones in a terminal on the phone or via adb shell, they should work.
Code:
su
Blade-S6:/ # cat /sys/devices/soc0/hw_platform
MTP
Blade-S6:/ # cat /sys/devices/soc0/soc_id
239
Click to expand...
Click to collapse
mine is:
cat /sys/devices/soc0/hw_platform
MTP
cat /sys/devices/soc0/soc_id
268
cat /sys/devices/soc0/image_version
10:LRX22G:eng.root.20150808.123811
Gtz
Kurt
Kurt Krummbein said:
mine is:
cat /sys/devices/soc0/hw_platform
MTP
cat /sys/devices/soc0/soc_id
268
cat /sys/devices/soc0/image_version
10:LRX22G:eng.root.20150808.123811
Gtz
Kurt
Click to expand...
Click to collapse
Fantastic! Here we have an explanation. Your device reports 268 as id which equals to msm8929 and I have a device with id 239 which is msm8939. The kernel only holds a device tree blob (dtb) for the id 239. I thought that the variant were very similar, so last time I used a dtb from the eu release but only for id 239. Attached I have added a dtb for id 268. Please test this rom with that boot image.
Again, just unpack the bootASEU.img and copy it to your device, flash it after installing the lineageos zip.
Please make a backup beforehand and report back, when you have time. Happy trying out.
lightwars said:
Fantastic! Here we have an explanation. Your device reports 268 as id which equals to msm8929 and I have a device with id 239 which is msm8939. The kernel only holds a device tree blob (dtb) for the id 239. I thought that the variant were very similar, so last time I used a dtb from the eu release but only for id 239. Attached I have added a dtb for id 268. Please test this rom with that boot image.
Again, just unpack the bootASEU.img and copy it to your device, flash it after installing the lineageos zip.
Please make a backup beforehand and report back, when you have time. Happy trying out.
Click to expand...
Click to collapse
One step ahead ! Phone is booting with the new boot.img ... but ends with a bootloop.
Highest was one boot with start of the setup-wizard, but after setting language to "Deutsch (Deutschland)" (and several "Bluetooth is not working" messages) it went around again. Couldn't get logs yet ... well see :
Cheers
Kurt
Kurt Krummbein said:
One step ahead ! Phone is booting with the new boot.img ... but ends with a bootloop.
Highest was one boot with start of the setup-wizard, but after setting language to "Deutsch (Deutschland)" (and several "Bluetooth is not working" messages) it went around again. Couldn't get logs yet ... well see :
Cheers
Kurt
Click to expand...
Click to collapse
Yeah! Would be best to build the dtb from source, rather than attaching just the right one to the kernel...
The bluetooth message can be made silent, by the way what build you are using? I think the first build has not the fix for the message. The build.prop should contain this line:
Code:
ro.boot.btmacaddr=00:00:00:00:00:00
and the message should not appear.
I hope there are not any preferences with could only be applied to msm8939 and not to msm8929.
@Kurt Krummbein
Here is my latest build or just grab the boot.img from the attachment. Which has a dtb for msm8929 build from source.
Maybe this will boot without any bootloop.
lightwars said:
@Kurt Krummbein
Here is my latest build or just grab the boot.img from the attachment. Which has a dtb for msm8929 build from source.
Maybe this will boot without any bootloop.
Click to expand...
Click to collapse
For which version is your latest build? the eu?
Thanks
BR Slawo
slawoko said:
For which version is your latest build? the eu?
Thanks
BR Slawo
Click to expand...
Click to collapse
AS and hopefully EU.

[ROM][UNOFFICIAL] LineageOS 17.1 for Unihertz Atom L (20200828)

Introduction
This thread contains the LineageOS 17.1 custom firmware images for the Unihertz Atom L, a rugged Android phone released by Unihertz in July 2020, and the accompanying LineageOS Recovery used for flashing the firmware.
Please note that this ROM is one of my side projects, for which I could provide zero warranty. By installing this ROM, you acknowledge that you take all the risks that come with installing custom firmwares on your devices, including but not limited to bricking your device, losing your data, etc. You are always suggested to keep backups and make sure you know how to flash back to official ROM before trying any custom ROMs.
Please find the download links in the Download section. The following sections are guides to installing the ROM.
WARNING: DO NOT try to install this on Atom XL. This is ONLY for the Atom L.
Working Features
- All basic features (Telephony, VoLTE, Audio, Camera, NFC, WiFi, Bluetooth, ....)
- Programmable PTT (red) button (Functionality can be set in Settings - System - Buttons, under the "Search Button" section)
- 48MP camera seems to be working (unlike on many other super resolution devices)
Known Issues
- VoLTE is working (at least for me) but sometimes quirky. If you find it somehow stopped working, usually turning it off and back on again (in Settings - Network - Mobile Network) will fix it. Putting the device to SELinux Permissive mode also fixes most of the VoLTE quirks but this is not recommended (a few quirks in Enforcing mode is better than having the whole device Permissive)
Unlocking
1. Boot your Atom L to the official OS
2. Go into Settings - About phone, tap "build number" several times to enable developer settings
3. Go to Settings - System - Developer Settings, enable OEM unlocking and ADB debugging
4. Run `adb reboot bootloader` on your PC (there is no way to enter bootloader directly, only possible through adb)
5. Run `adb flashing unlock` and comfirm unlock on device (THIS WILL WIPE ALL DATA)
6. Reboot and now you should see an unlocked warning during boot screen.
Installing LineageOS Recovery
For now the only working recovery is the LineageOS Recovery, because the device's kernel does not load the touch driver in recovery mode for whatever reason, rendering TWRP useless.
1. Download `lineage_recovery_XXX.img` and `vbmeta.zip`, unpack `vbmeta.zip` to get three .img files starting with `vbmeta`
2. Run `adb reboot bootloader` to put your device in bootloader mode
3. Run `fastboot flash --disable-verification --disable-verity vbmeta vbmeta.img`
4. Run `fastboot flash --disable-verification --disable-verity vbmeta_system vbmeta_system.img`
5. Run `fastboot flash --disable-verification --disable-verity vbmeta_vendor vbmeta_vendor.img`
6. Run `fastboot flash recovery lineage_recovery_XXX.img`
7. Run `fastboot reboot recovery` to reboot into the newly-installed LineageOS Recovery
The LineageOS Recovery is operated by volume keys as selection and power as confirmation (or entering sub-menus). To return to upper levels of menus from sub-menus, press volume up until the selection goes to the first item and then disappears, then press power (i.e. there's a hidden "Go Back" item at the very top of each sub-menu).
The recovery will show a verification failed prompt for most packages that are not signed with the AOSP keys. This is safe to ignore.
Installing LineageOS 17.1
The LineageOS image must be installed via LineageOS recovery.
1. Download `lineage-17.1-Atom_L-XXX.zip`
2. Reboot your device into recovery (`adb reboot recovery` or simply hold volume up while turning power on)
3. Wipe all data (factory reset) (THIS DELETES EVEN INTERNAL STORAGE)
4. Choose Apply Update, then Apply Update from ADB
5. Run `adb sideload lineage-17.1-Atom_L-XXX.zip` from your PC
6. Wait for the process to finish. (The recovery might prompt something about verification failure, just ignore it and continue anyway)
7. At this point, you can then sideload the LATEST Magisk and OpenGAPPS Nano at your will (note that the size of the system partition might only be enough for the `nano` variant of OpenGAPPS) (If installing Magisk / OpenGAPPS fails, you can try rebooting into recovery again in advanced menus, then try installing them again)
8. Reboot into system and enjoy (Note that Magisk might cause your device to boot loop once or two but it will eventually boot)
When updating to a newer build, you have to flash the new zip, and then re-flash whatever mod you have installed previously (Magisk / GAPPS).
Download Links
LineageOS:
lineage-17.1-Atom_L-20200828-peter-signed.zip: https://mega.nz/file/bAgh1BZA#jzMs_0e9NUR9NcALXWp51ZeWttM5rl_3K5T8Or9hAW0
- Synchronized updates from LineageOS upstream.
lineage-17.1-Atom_L-20200728-peter-signed.zip: https://mega.nz/file/vBwlmL5D#wpw8RovBHyVFCLFlhQ2H5QAIb0ECXkT4of0FRijiP6A
LineageOS Recovery:
lineage_recovery_20200728.img: https://mega.nz/file/yc4Dnbyb#yx0Ci9p3q9_lfAiXkGfgWDFnRJI-JSGrv3kyawkU3fw
vbmeta:
vbmeta.zip: https://mega.nz/file/nF51mBoY#ZNY4j92wc_6a1dXch3l5r-w4VFl9QjN7YJaRMKRoEGk
XDA:DevDB Information
LineageOS 17.1 for Unihertz Atom L, ROM for the Android General
Contributors
PeterCxy
Source Code: https://cgit.typeblog.net/android/device/unihertz/Atom_L/
ROM OS Version: Android 10
Version Information
Status: Alpha
Created 2020-07-28
Last Updated 2020-07-28
How different is the Atom XL?
PeterCxy said:
Introduction
WARNING: DO NOT try to install this on Atom XL. This is ONLY for the Atom L.
Unfortunately I've got the XL version which I thought only varied from the L by the presence of a UHF radio! Can you explain to me why its not a suitable candidate for your mods which sound very good!?
And before you ask, I only got this radio for hacking so I don't mind experimenting if that is required. Please let me know if I can help.
The Bitfarmer
Click to expand...
Click to collapse
tvroman said:
PeterCxy said:
Introduction
WARNING: DO NOT try to install this on Atom XL. This is ONLY for the Atom L.
Unfortunately I've got the XL version which I thought only varied from the L by the presence of a UHF radio! Can you explain to me why its not a suitable candidate for your mods which sound very good!?
And before you ask, I only got this radio for hacking so I don't mind experimenting if that is required. Please let me know if I can help.
The Bitfarmer
Click to expand...
Click to collapse
Because Unihertz publishes completely different firmware files for the L and XL, so the safest assumption is that there is more difference than just the UHF radio. If you want to risk it, then you CAN try using this ROM on the XL, as long as you know how to revert back to official if things go wrong. (But I cannot guarantee if the kernel image from L that this ROM uses will not cause serious issues like corrupted baseband or something on the XL)
My suggestion is that instead of trying this ROM directly on the XL, someone with XL can try to modify my device tree for L, replacing the kernel, dtbo images and other vendor blobs from the ones from XL, and then re-compile the ROM for XL. This would be the proper way to handle these two devices.
Click to expand...
Click to collapse
Going XL
Hi.
Great work. :good:
I want to built a ROM for the Atom XL myself. And because I'm no expert on this (for now) I'm in search of guides and hints on how to achieve my goal.
As far as I know the biggest problem with Unihertz is that they use a Mediatek chipset with which they are not allowed to provide the sourcecode of the kernel. Or at least you have to pay for it from Mediatek.
But there are some variants of the chipset (Helio P60; mt6771) used in other mobile phones (e.g. Nokia X5) for which I was able to find kernelsources on Github. Using these and the latest Android kernel from google I tried to compile a kernel as a starting point. I was able to extract the build.config directly from the phone which helped tremendously. This should at least get me to the point where I'm able to assemble a TWRP build. But I believe that I'm still missing some (vital?) drivers which are specific to the actual device. This includes I think the missing touchscreen driver that you mentioned is preventing the recovery to be useful.
So now I'm a little bit stuck, because most of the guides to arrange a LineageOS (or any other custom ROM) build tree I found require the sourcecode from the manufacturer which we don't have. All other guides to build from scratch were too generic for my current level of expertise.
Can you please share your approach to create this build?
If you don't want to do this in the open you could also PM me.
With kind regards
ADT
a-dead-trousers said:
Hi.
Great work. :good:
I want to built a ROM for the Atom XL myself. And because I'm no expert on this (for now) I'm in search of guides and hints on how to achieve my goal.
As far as I know the biggest problem with Unihertz is that they use a Mediatek chipset with which they are not allowed to provide the sourcecode of the kernel. Or at least you have to pay for it from Mediatek.
But there are some variants of the chipset (Helio P60; mt6771) used in other mobile phones (e.g. Nokia X5) for which I was able to find kernelsources on Github. Using these and the latest Android kernel from google I tried to compile a kernel as a starting point. I was able to extract the build.config directly from the phone which helped tremendously. This should at least get me to the point where I'm able to assemble a TWRP build. But I believe that I'm still missing some (vital?) drivers which are specific to the actual device. This includes I think the missing touchscreen driver that you mentioned is preventing the recovery to be useful.
So now I'm a little bit stuck, because most of the guides to arrange a LineageOS (or any other custom ROM) build tree I found require the sourcecode from the manufacturer which we don't have. All other guides to build from scratch were too generic for my current level of expertise.
Can you please share your approach to create this build?
If you don't want to do this in the open you could also PM me.
With kind regards
ADT
Click to expand...
Click to collapse
You don't need the kernel source code to build a working ROM -- just look at my device tree for Atom L. I think you can build a working ROM for the XL by just replacing the prebuilt kernel in my device tree with the one from Atom XL and also re-extracting the vendor blobs from XL using the script in my devcie tree, then rename everything to Atom XL instead of L. I don't know if the integrated amateur radio would still work though.
PeterCxy said:
You don't need the kernel source code to build a working ROM -- just look at my device tree for Atom L. I think you can build a working ROM for the XL by just replacing the prebuilt kernel in my device tree with the one from Atom XL and also re-extracting the vendor blobs from XL using the script in my devcie tree, then rename everything to Atom XL instead of L. I don't know if the integrated amateur radio would still work though.
Click to expand...
Click to collapse
I'm already on to that.
But I seem to have trouble extracting the prebuilt kernel. None of the tools I found gave me the exact files you have got (dtb.img, dtbo.img, Image.gz). What did you use?
The best I could get were "dtb", "kernel" and "dtborecovery" (without extensions) which roughly had the same size as yours.
Also, as far as I understand it, with your initial commit (without the modifications for Lineage itself) I should be able to at least compile a recovery image but I got an error regarding a missing dtb.img file in the "out" directory.
Something seems to be missing because, my dtb file is in the "device" directory and not being transfered into "out" during building.
I'm not sure that is because I have got a different naming scheme (renamig it didn't help) or I did something wrong with the extraction.
---------- Post added at 07:30 ---------- Previous post was at 07:14 ----------
Another question I have:
Are the vbmeta-files you used to flash the recovery the ones from the original firmeware zip from unihertz or did you get them from the lineage built?
And reguarding the rather smallish system partition:
I have an idea to bypass that by using the SPFlash Tool from Mediatek. As far as I understand the settings in the scatter-file this tool does a repartitioning of the internal storage. So we only need to "decrease" the userdata, "move" some partitions inbetween and "increase" the system. Only problem is, I couldn't find a partition designated as "system" in the scatter-file, only one big "super" and a "vbmeta-system" (which for my understaning is for verified boot) partition.
What do you think?
a-dead-trousers said:
I'm already on to that.
But I seem to have trouble extracting the prebuilt kernel. None of the tools I found gave me the exact files you have got (dtb.img, dtbo.img, Image.gz). What did you use?
The best I could get were "dtb", "kernel" and "dtborecovery" (without extensions) which roughly had the same size as yours.
Also, as far as I understand it, with your initial commit (without the modifications for Lineage itself) I should be able to at least compile a recovery image but I got an error regarding a missing dtb.img file in the "out" directory.
Something seems to be missing because, my dtb file is in the "device" directory and not being transfered into "out" during building.
I'm not sure that is because I have got a different naming scheme (renamig it didn't help) or I did something wrong with the extraction.
---------- Post added at 07:30 ---------- Previous post was at 07:14 ----------
Another question I have:
Are the vbmeta-files you used to flash the recovery the ones from the original firmeware zip from unihertz or did you get them from the lineage built?
And reguarding the rather smallish system partition:
I have an idea to bypass that by using the SPFlash Tool from Mediatek. As far as I understand the settings in the scatter-file this tool does a repartitioning of the internal storage. So we only need to "decrease" the userdata, "move" some partitions inbetween and "increase" the system. Only problem is, I couldn't find a partition designated as "system" in the scatter-file, only one big "super" and a "vbmeta-system" (which for my understaning is for verified boot) partition.
What do you think?
Click to expand...
Click to collapse
> None of the tools I found gave me the exact files you have got (dtb.img, dtbo.img, Image.gz). What did you use?
There is a tool called `unpack_bootimg` in the Android source code. Just run `make unpack_bootimg` in the root directory of the Android source tree and you will get one in the output directory. (btw I have renamed those extracted files so the names won't exactly match, but you need this tool to extract the correct images. All other tools won't work properly).
> my dtb file is in the "device" directory and not being transfered into "out" during building.
Because most tools other than `unpack_bootimg` extracts dtb incorrectly.
> Are the vbmeta-files you used to flash the recovery the ones from the original firmeware zip from unihertz or did you get them from the lineage built?
Those don't matter. Either will work as long as you flash it with the correct parameters as given in my post.
> And reguarding the rather smallish system partition
No don't do that. Android 10 does not use a separate system partition anymore, instead both system, vendor and product are sub-partitions in a huge super partition. When flashing a new ROM, the partitions are automatically resized to match the new image exactly, instead of leaving free space unused like before Android 10. That's why I need to reserve space in BoardConfig.mk for gapps to be installed correctly.
Still not able to build.
PeterCxy said:
There is a tool called `unpack_bootimg` in the Android source code. Just run `make unpack_bootimg` in the root directory of the Android source tree and you will get one in the output directory. (btw I have renamed those extracted files so the names won't exactly match, but you need this tool to extract the correct images. All other tools won't work properly).
Click to expand...
Click to collapse
I'm still getting an error:
Code:
FAILED: ninja: 'out/target/product/Atom_XL/dtb.img', needed by 'out/target/product/Atom_XL/boot.img', missing and no known rule to make it
Comparing your BoardConfig.mk with mine shows a slight difference in the offset and size values which could be associated with the different kernels of the phones.
But using "unpack_bootimg" I didn't get a value for "BOARD_KERNEL_OFFSET" like you have it in your config. Could this be the problem?
Your BoardConfig.mk
My BoardConfig.mk
Do you see anything else out of the ordinary?
(Because I'm doing everything what you did step-by-step the links point to the best matching commits)
Despite not being able to compile right now I tried to press on with integrating your changes in the hopes that it will be fixed somehow later on
So I'm currently stuck on this commit of yours:
Atom_L: import overlay from official vendor
Where did you get the "config.xml" and "power_profile.xml" from? The best thing I could find was a "power_profile.xml" inside "/vendor/overlay/FrameworkResOverlay/FrameworkResOverlay.apk" which seems to be a "compiled" version of the aforementioned xml-file.
a-dead-trousers said:
I'm still getting an error:
Code:
FAILED: ninja: 'out/target/product/Atom_XL/dtb.img', needed by 'out/target/product/Atom_XL/boot.img', missing and no known rule to make it
Comparing your BoardConfig.mk with mine shows a slight difference in the offset and size values which could be associated with the different kernels of the phones.
But using "unpack_bootimg" I didn't get a value for "BOARD_KERNEL_OFFSET" like you have it in your config. Could this be the problem?
Your BoardConfig.mk
My BoardConfig.mk
Do you see anything else out of the ordinary?
(Because I'm doing everything what you did step-by-step the links point to the best matching commits)
Despite not being able to compile right now I tried to press on with integrating your changes in the hopes that it will be fixed somehow later on
So I'm currently stuck on this commit of yours:
Atom_L: import overlay from official vendor
Where did you get the "config.xml" and "power_profile.xml" from? The best thing I could find was a "power_profile.xml" inside "/vendor/overlay/FrameworkResOverlay/FrameworkResOverlay.apk" which seems to be a "compiled" version of the aforementioned xml-file.
Click to expand...
Click to collapse
> Comparing your BoardConfig.mk with mine shows a slight difference in the offset and size values which could be associated with the different kernels of the phones.
TARGET_KERNEL_OFFSET should normally always be 0x00008000. Also, your other offset values seem to be wrong too -- those values from `unpack_bootimg` cannot be filled in directly to BoardConfig.mk. Instead, you need to subtract BOARD_KERNEL_BASE from them (e.g. BOARD_RAMDISK_OFFSET should be 0x55000000 - 0x40078000, which is 0x14f88000, the same as mine). In fact, I think those parameters should be exactly the same for XL and L. Other than that, I don't think I can see much of a problem about your makefiles.
However, note that not all of my historical commits represent a compilable state of the device tree. I'd suggest you start directly from the latest state and just replace whatever is relevant instead of starting over. And there should not be much that needs changing at all except device names, fingerprints and the proprietary vendor files.
> Where did you get the "config.xml" and "power_profile.xml" from
Exactly from those apks. Just decompile them using apktool.
PeterCxy said:
TARGET_KERNEL_OFFSET should normally always be 0x00008000. Also, your other offset values seem to be wrong too -- those values from `unpack_bootimg` cannot be filled in directly to BoardConfig.mk. Instead, you need to subtract BOARD_KERNEL_BASE from them (e.g. BOARD_RAMDISK_OFFSET should be 0x55000000 - 0x40078000, which is 0x14f88000, the same as mine). In fact, I think those parameters should be exactly the same for XL and L. Other than that, I don't think I can see much of a problem about your makefiles.
Click to expand...
Click to collapse
Still giving me errors.
So I tried a very unconventional approach: I just copied the file myself into the mentioned "out/target/product/Atom_XL" folder.
For now it's still compiling. Fingers crossed.
PeterCxy said:
However, note that not all of my historical commits represent a compilable state of the device tree. I'd suggest you start directly from the latest state and just replace whatever is relevant instead of starting over. And there should not be much that needs changing at all except device names, fingerprints and the proprietary vendor files.
Click to expand...
Click to collapse
I just reached your biggest commit yet.
Can you tell me how you got the list of needed files? I hope it's not through trial-and-error.
Except for the values in "setup-makefiles.sh" only the "proprietary-files.txt" seems to be device specific. Is there anything else I need to be aware of in this commit?
P.S.: I know it is tedious to go through your commits one by one but I want to learn something of it not just simply copying what you did. To get a feeling where the biggest pitfalls are and what you did to circumvent them.
a-dead-trousers said:
Still giving me errors.
So I tried a very unconventional approach: I just copied the file myself into the mentioned "out/target/product/Atom_XL" folder.
For now it's still compiling. Fingers crossed.
I just reached your biggest commit yet.
Can you tell me how you got the list of needed files? I hope it's not through trial-and-error.
Except for the values in "setup-makefiles.sh" only the "proprietary-files.txt" seems to be device specific. Is there anything else I need to be aware of in this commit?
P.S.: I know it is tedious to go through your commits one by one but I want to learn something of it not just simply copying what you did. To get a feeling where the biggest pitfalls are and what you did to circumvent them.
Click to expand...
Click to collapse
> Still giving me errors.
Looks like that dtb.img error was totally my fault -- it was due to my jerry-rigged solution of using prebuilt dtb image that conflicted with one of Lineage's update in August and I haven't built the ROM for a month. Now I have fixed it in the latest commit.
> Can you tell me how you got the list of needed files?
All of those files are for VoLTE support and I started with the list from a commit in Redmi Note 7 Pro's device tree that imported those VoLTE blobs, and then added what was missing one by one (when something is missing the Phone process will crash and you can see what got missing in the logs). I don't think the list will be any different on Atom XL so you can just use the one in my device tree.
Hi.
Thanks to you everything is running smoothly here. But what bugs me is that TWRP is not working on our devices.
Although for the Atom there is a possibility: https://forum.xda-developers.com/android/development/twrp-modded-to-unihertz-atom-t3885793
Before I want to go public with my build I wanted to solve this last "mystery".
So I tried to include it in my current source tree according to the (official?) guide but some errors prevented me from a successful build.
Naturally I asked for some guidance at the most reasonable places I know of but got nothing so far:
https://forum.xda-developers.com/showpost.php?p=83443611&postcount=4622
https://forum.xda-developers.com/showpost.php?p=83455271&postcount=4623
https://github.com/TeamWin/android_bootable_recovery/issues/70
I even tried different repositories (omnirom/android_bootable_recovery) and revisions (android-9.0) but these resulted in missing library "type" (static vs. shared) errors so I assume these are too old for LineageOS 17.1
What I want to know is how you managed to get TWRP to built for your device even though the touchscreen wasn't working?
Did you use your LineageOS source tree or one of the many "minimal" manifests? If so, which one would be the "best" to use?
wkr ADT
@PeterCxy and @a-dead-trousers
Thanks for all the work on this so far. I've got an Atom L and have gotten the ROM's PeterCxy posted running on them as in the OP. Do either of you have a quick step-by-step workflow of how you got all the Lineage sources set up and built into the various ROMs? I'd like to be able to build the ROMs from scratch and understand the process.
If I can get caught up to where you two are at with the builds, I can help debug, test and work through issues.
dirtylimerick said:
[MENTION=5351691] Do either of you have a quick step-by-step workflow of how you got all the Lineage sources set up and built into the various ROMs? I'd like to be able to build the ROMs from scratch and understand the process.
If I can get caught up to where you two are at with the builds, I can help debug, test and work through issues.
Click to expand...
Click to collapse
I documented my steps to setup up the build environment in the readme of my repo:
https://github.com/ADeadTrousers/android_device_Unihertz_Atom_XL
But leave out the TWRP part. It isn't working yet mostly because TeamWin/android_bootable_recovery and LineageOS/android_bootable_recovery are too similar.
To figure out all the bits and pieces needed for the device I followed the commit log of @PeterCxy build.
Hi, @PeterCxy.
Finally I was able to build a TWRP recovery and surprise, surprise the touchscreen isn't working.
But during my attempts to get a working TWRP build I came acros a guide that explains how to patch the kernel to get the touchscreen to work.
https://forum.hovatek.com/thread-27132.html
So I tried to follow it but failed to identify the "end" of the zipped Image-file (step 18) to remove the payload from the gz-file. Regardless of which of the null-bytes I use for cutting I always get a warning from 7-zip that there is still data at the end.
Do you know a better approach to achieve this whole patching? Maybe even come up with a scripting solution to easily apply this patch in later builds?
wkr ADT
a-dead-trousers said:
Hi, @PeterCxy.
Finally I was able to build a TWRP recovery and surprise, surprise the touchscreen isn't working.
But during my attempts to get a working TWRP build I came acros a guide that explains how to patch the kernel to get the touchscreen to work.
https://forum.hovatek.com/thread-27132.html
So I tried to follow it but failed to identify the "end" of the zipped Image-file (step 18) to remove the payload from the gz-file. Regardless of which of the null-bytes I use for cutting I always get a warning from 7-zip that there is still data at the end.
Do you know a better approach to achieve this whole patching? Maybe even come up with a scripting solution to easily apply this patch in later builds?
wkr ADT
Click to expand...
Click to collapse
There is no sane way to solve the problem without kernel source code. Basically the stock kernel just does not load the touch screen driver in recovery mode. That patching guide is pretty out of date and I imagine it won't work on most recent kernels. The only proper way is to pressure Unihertz to actually obey GPLv2 and release their kernel source code. Or maybe someone can try reverse-engineering the kernel, but at least I won't do it because it'll just be too much of a hassle.
PeterCxy said:
There is no sane way to solve the problem without kernel source code. Basically the stock kernel just does not load the touch screen driver in recovery mode. The only proper way is to pressure Unihertz to actually obey GPLv2 and release their kernel source code.
Click to expand...
Click to collapse
I'm with you on this one, but as long as we don't have the source code we need to resort to other means to achieve our goals.
PeterCxy said:
That patching guide is pretty out of date and I imagine it won't work on most recent kernels.
Click to expand...
Click to collapse
Yeah it's from way back in 2019
Anyway, with a little bit of tinkering I was able to modify my kernel to load the touchscreen driver in recovery mode.
Here is the device tree and the manifest i used.
I wouldn't recommend to use it in it's current state at all though because the fstab needs a little bit of tinkering. Everything seems to be either unordered or not mounted properly and I fear anything you do in there now will mess up the whole device. BUT I got the touchscreen goin for me which is nice.
PeterCxy said:
Or maybe someone can try reverse-engineering the kernel, but at least I won't do it because it'll just be too much of a hassle.
Click to expand...
Click to collapse
As soon as I have everything sorted out that needs to be fixed on my build (e.g. signing, radio, included gapps working properly, TWRP) I want to dig deeper into the kernel.
There are some devices with Helios P60 out there from other vendors which offer kernel sources.
P.S.: I also uploaded a HOW-TO in my device tree.
If you or someone else wants to try it. Also if you want to you can send me a "symbl.txt" (see to the HOW-TO) extracted from your device then I can do the patching for the Atom_L too.
a-dead-trousers said:
I'm with you on this one, but as long as we don't have the source code we need to resort to other means to achieve our goals.
Yeah it's from way back in 2019
Anyway, with a little bit of tinkering I was able to modify my kernel to load the touchscreen driver in recovery mode.
Here is the device tree and the manifest i used.
I wouldn't recommend to use it in it's current state at all though because the fstab needs a little bit of tinkering. Everything seems to be either unordered or not mounted properly and I fear anything you do in there now will mess up the whole device. BUT I got the touchscreen goin for me which is nice.
As soon as I have everything sorted out that needs to be fixed on my build (e.g. signing, radio, included gapps working properly, TWRP) I want to dig deeper into the kernel.
There are some devices with Helios P60 out there from other vendors which offer kernel sources.
P.S.: I also uploaded a HOW-TO in my device tree.
If you or someone else wants to try it. Also if you want to you can send me a "symbl.txt" (see to the HOW-TO) extracted from your device then I can do the patching for the Atom_L too.
Click to expand...
Click to collapse
Happy to hear that you were able to figure the touchscreen out. I tried to port TWRP at the very beginning when I started tinkering with the device but quickly grew frustrated and just ported Lineage Recovery instead. I guess I might try patching the kernel image too at some point later.
BTW, for TWRP to work with devices released after Android 10, I'm pretty sure you need an extra set of patches that are not yet fully merged to the main TWRP repository. I remember there's some guy providing another manifest with all the patches applied but I couldn't remember the name.
Hi.
I just officially announced my build for the Atom XL:
https://forum.xda-developers.com/android/development/rom-lineageos-17-1-unihertz-atom-xl-t4171407
Could you please put a link in your first post for those in search of the Atom XL and found your thread instead. Thanks.
wkr ADT
hi @PeterCxy.
During my daily usage of the phone I encountered a strage problem:
The audio jack isn't working. Plugging in some headphones I get this slight click in the earpieces when the circuits connect but nothing else happens. Neither a "headphone" icon in the status bar nor hearing anything coming from the headphones itself. The main speaker of the phone keeps playing the music. Using bluetooth everything is working as expected though. So I used logcat to see if something is coming up during plugging in but nothing "catchy" shows up in the logs. My guess is that some (vendor?) service is missing or not started during booting. Next I checked If something shows up on logcat during boot but I'm not sure for what to look exactly. There are quite a few errors and warnings though. In my despair I started to "fix" the "avc: denied" (SEPolicy) entries. Thats when I found a specific error reguarding VoLTE. Maybe this would fix the problems you had with VoLTE in enforcing mode:
https://github.com/ADeadTrousers/an..._Atom_XL/blob/master/sepolicy/private/init.te
(The line with "socket_device:sock_file")
My provider doesn't support VoLTE so I'm not sure if this helps or not. Maybe you could check it.
Anyway can you please tell me if your device's audio jack is working or not?
If you're (by some mysterious coincidence) not affected by this, can you at least give me some pointers for what to look for to get this fixed on my side.
The Internet Is not very helpful when searching for "android audio jack" or something similiar.
Thanks in advance.
wkr ADT

Compiling Custom Recovery with GitHub Workflows

If you don't have a Linux device or don't have enough storage space to compile Custom Recovery, then maybe the following link can help you.
- Visit my GitHub repository and Fork it
(https://github.com/VThang51/ROM_Recovery-Builder)
-(Don't forget to read the README.md)
- Custom Recovery versions are supported:
+ OrangeFox-RP Builder (Fixing Bug)
+ PitchBlack-RP Builder
+ RedWolf-RP Builder
+ SkyHawk-RP Builder
+ TeamWin-RP Builder
- If the compilation is successful, please comment below. Just like TWRP, I also want to hear your story
Nice but i need to learn how to build twrp first haha
Guan Yu said:
Nice but i need to learn how to build twrp first haha
Click to expand...
Click to collapse
Nice, If you have a device tree and make sure it doesn't fail. I will guide you haha
I'm trying this out right now with the oneplus 7 pro 5g since there's like no development active on this specific model
TechX1991 said:
I'm trying this out right now with the oneplus 7 pro 5g since there's like no development active on this specific model
Click to expand...
Click to collapse
Make sure your Device tree is not corrupted. Because when it fails, it will have to start over and it takes at least 20-60 minutes
VThang0511 said:
Make sure your Device tree is not corrupted. Because when it fails, it will have to start over and it takes at least 20-60 minutes
Click to expand...
Click to collapse
I was using device trees from Lineage's github, but seems 3 devices i've tried so far all fail with
fatal: Remote branch master not found in upstream origin, error exit code 128
TechX1991 said:
I was using device trees from Lineage's github, but seems 3 devices i've tried so far all fail with
fatal: Remote branch master not found in upstream origin, error exit code 128
Click to expand...
Click to collapse
Haha, This error is quite rare if you double check the options. This error says your Branch is not "master" (It's just the Branch name on my URL). Double check the Branch name on GitHub.If you don't know, send me the device tree link and I'll compile it for you
VThang0511 said:
Haha, This error is quite rare if you double check the options. This error says your Branch is not "master" (It's just the Branch name on my URL). Double check the Branch name on GitHub.If you don't know, send me the device tree link and I'll compile it for you
Click to expand...
Click to collapse
just my luck, I get the "rare" error multiple times lol it was more for the learning of it that I was doing this. TWRP is available for the 3 devices I tried (op 7 pro 5g, op 8t and op 6t), but wanted to learn to do it so I can try it on lesser known devices like asus zenphone 1 or razer phone 2

Categories

Resources