Compiling Custom Recovery with GitHub Workflows - General Topics

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

Related

Requesting Repository Forks

If you wish to request omni forks a repository from AOSP, in order to implement a patch into omni, please post this request here. Eventually this will be carried out via jira (http://jira.omnirom.org)
When posting, please give the path to the repository, and a link to what you want to merge, or a description.
For example if you wish to cherry pick a patch into it, a link to the patch and brief description of the reason for the patch.
We'll then have that repository forked and made available on github and gerrit, permitting you to submit your change.
Before you request, please check on github to ensure it isn't already forked!
For example :
frameworks/base - Needing forked so I can introduce multi window functionality (link here to information)
hardware/broadcom/libbt - Mainly for board-specific configurations (link), but newer CM commits also look promising.
If new device bringups aren't planned yet, ignore the followings:
device/lge/p880 and kernel/lge/p880 - Device bringup (kernel has a non-standard naming at CM repo, it should be android_kernel_lge_x3 (x3 is the board name))
vendor/lge (maybe Omni should create one from scratch)
Adam77Root said:
hardware/broadcom/libbt - Mainly for board-specific configurations (link), but newer CM commits also look promising.
If new device bringups aren't planned yet, ignore the followings:
device/lge/p880 and kernel/lge/p880 - Device bringup (kernel has a non-standard naming at CM repo, it should be android_kernel_lge_x3 (x3 is the board name))
vendor/lge (maybe Omni should create one from scratch)
Click to expand...
Click to collapse
We do have a vendor/lge with just mako, although I'm not sure if its current location.
Vendor blob repos are a legal mess, which is why CM kept them at TheMuppets. We'll likely do something similar if we haven't already (I haven't synced since coming home.) Among other reasons to keep them separate is in the case of a DMCA takedown - usually that happens only to a single repo (see the HTC vendor repos earlier this year) but there's always the risk that damage might be more widespread.
android_external_clang
http://review.cyanogenmod.org/#/c/29799/2
Needed for building my msm8960 device (Motorola Photon Q, xt897c).
arrrghhh said:
android_external_clang
http://review.cyanogenmod.org/#/c/29799/2
Needed for building my msm8960 device (Motorola Photon Q, xt897c).
Click to expand...
Click to collapse
CM bootable recovery and some commits over system core
Black_Prince said:
CM bootable recovery and some commits over system core
Click to expand...
Click to collapse
No for CWM - We're working on forking TWRP in, but some fixes still need to be made to allow it to work on devices with unified recovery/boot image. (Probably one of the biggest holdups for the exynos 4210 family - Sonys with unified boot/recovery can at least use Dees_Troy's FOTAKernel trick).
Getting CWM to build in a tree requires hacks all over the tree in multiple repositories. TWRP is much more self-contained, but needs some tweaks to the build system in order to get it to build properly on a userdebug (as opposed to eng) build.
Entropy512 said:
No for CWM - We're working on forking TWRP in, but some fixes still need to be made to allow it to work on devices with unified recovery/boot image. (Probably one of the biggest holdups for the exynos 4210 family - Sonys with unified boot/recovery can at least use Dees_Troy's FOTAKernel trick).
Getting CWM to build in a tree requires hacks all over the tree in multiple repositories. TWRP is much more self-contained, but needs some tweaks to the build system in order to get it to build properly on a userdebug (as opposed to eng) build.
Click to expand...
Click to collapse
Hmm but until the twrp is ported should i test build for some galaxy devices like SG S2 note 1 with cwm ?
It will make me to push changes to git in device tree ... and will be easy to add support
Black_Prince said:
Hmm but until the twrp is ported should i test build for some galaxy devices like SG S2 note 1 with cwm ?
It will make me to push changes to git in device tree ... and will be easy to add support
Click to expand...
Click to collapse
I'll pull up a remote to use for bootable/recovery until we fork (unless plodey already forked it) from TWRP, won't be able to provide it until tonight.
However, right now, it will only build a working recovery if you do an eng build instead of userdebug. If Dees_Troy's talk at BABBQ is ever posted, that's what I was talking about when I trolled him at the end.
Something like:
Code:
. build/envsetup.sh && brunch custom_n7000-eng
or something like that.
Old
def WriteRawImage(self, mount_point, fn):
"""Write the given package file into the partition for the given
mount point."""
fstab = self.info["fstab"]
if fstab:
p = fstab[mount_point]
partition_type = common.PARTITION_TYPES[p.fs_type]
args = {'device': p.device, 'fn': fn}
if partition_type == "MTD":
self.script.append(
'write_raw_image(package_extract_file("%(fn)s"), "%(device)s");'
% args)
elif partition_type == "EMMC":
self.script.append(
'package_extract_file("%(fn)s", "%(device)s");' % args)
Requested
def WriteRawImage(self, mount_point, fn):
"""Write the given package file into the partition for the given
mount point."""
fstab = self.info["fstab"]
if fstab:
p = fstab[mount_point]
partition_type = common.PARTITION_TYPES[p.fs_type]
args = {'device': p.device, 'fn': fn}
if partition_type == "MTD":
self.script.append(
'package_extract_file("%(fn)s", "/tmp/boot.img");'
'write_raw_image("/tmp/boot.img", "%(device)s");' % args
% args)
elif partition_type == "EMMC":
self.script.append(
'package_extract_file("%(fn)s", "%(device)s");' % args)
elif partition_type == "BML":
self.script.append(
('assert(package_extract_file("%(fn)s", "/tmp/%(device)s.img"),\n'
' write_raw_image("/tmp/%(device)s.img", "%(device)s"),\n'
' delete("/tmp/%(device)s.img"));') % args)
else:
raise ValueError("don't know how to write \"%s\" partitions" % (p.fs_type,))
Flash error in write raw image ...
Also can u cherry pick these commits https://github.com/CyanogenMod/android_system_core/commits/cm-10.2/mkbootimg/unpackbootimg.c
My internal SD card isnt got recognsied , there must be some commits missing in vold ...
I dont even know it got formatted or what in flashing ...
All things working WIFI BLUTOOTH TETHERING CALL DATA MSG MMS OMNITORCH
Also u may have look over https://github.com/CyanogenMod/andr...mmit/f22626cdbecfe27c96f205710173458eab14e1a1
and https://github.com/CyanogenMod/andr...mmit/aee5f78ddec238cec016849acaf1d3007b8b1507
https://android.googlesource.com/platform/hardware/broadcom/libbt
Must haz patch:
https://github.com/CyanogenMod/andr...mmit/4028192a4fe8289bf9b7fb202a2bb2c0d85d98c3
//edit: xplod sorted it out already.
android_packages_apps_PackageInstaller
For
HALO and a feat which enables us to see version of the installed and gonna install app
I need this to make it work with my Samsung galaxy s4
I'm not sure if this is the correct thread, but the following two would be great for i9305 support
smdk4412-qcom-common -> needed for i9305 and t0lte (EDIT: I see this one has now been added)
Thanks!
Hey @pulser_g2,
wondering if i could have the following repositories added in for jf devices,
all features are fully functional with these repositories : branch: cm-10.2 for all
device_samsung_jf-common
android_device_samsung_jflteatt
android_kernel_samsung_jf
CyanogenMod/android_hardware_samsung
CyanogenMod/android_device_samsung_msm8960-common
CyanogenMod/android_device_samsung_qcom-common
@pulser_g2
I just talked to @maxwen and he told me i should post here the needed stuff:
I managed to fix the radio issues today on m7, but i need additionally these commits:
https://github.com/TheMuppets/proprietary_vendor_htc/commit/7bbbe83823525090e7d94c47b439c09a254b380f
https://github.com/TheMuppets/proprietary_vendor_htc/commit/19ed957678d13b489da78d704b27811030688078
https://github.com/TheMuppets/proprietary_vendor_htc/commit/51b006bc8f05757c7dd82361ce6d985e996af360
and please DO NOT merge this: https://github.com/TheMuppets/proprietary_vendor_htc/commit/2b86687a460030199fa42d49207957ce285c1a53
as its not needed and breaks build (I allready have everything in m7-common so no need for vendor)
Thanks in advance
@pulser_g2
we dont need to update anything, please forget my post above, i managed to get it working without all these commits and the right vendor
hardware/qcom/gps - Needing forked so I can build the needed GPS module into my Omnirom build.
The link to this repository is: https://github.com/CyanogenMod/android_hardware_qcom_gps/tree/cm-10.2
I hope it gets included, this saves me a ton of time pulling stuff from other repositories.
Greetings PsychoGame
Galaxy S I9000 (galaxysmtd)
@pulser_g2 Device repos are already forked. Kernel is missing: https://github.com/OmniGalaxyS/android_kernel_samsung_aries
It has android-4.3 and android-4.4 branches up.
Device rocking with Omni!
See you!
Fail
PsychoGame said:
hardware/qcom/gps - Needing forked so I can build the needed GPS module into my Omnirom build.
The link to this repository is: https://github.com/CyanogenMod/android_hardware_qcom_gps/tree/cm-10.2
I hope it gets included, this saves me a ton of time pulling stuff from other repositories.
Greetings PsychoGame
Click to expand...
Click to collapse
I also need android_hardware_qcom_gps (probably best from https://github.com/markcs/android_hardware_qcom_gps/tree/cm-11.0)

Porting Lineage-14.1 to SM-G925F

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)

Building kernel from Xiaomi's source for cereus (probably, cactus too)

Since Xiaomi released source code for kernel, I tried to build it.
https://github.com/Dhoine/android_kernel_cereus
Current status of this - it compiles, boots, but unusable.
Bugs:
Broken bluetooth
Broken wifi
Soft-reboots after some time
Propably, more bugs that remained undiscovered because of reboots.
Tested with miui 9 on cereus 3/32.
--------
You can test builded kernel using this:
GDrive
Use Carliv image Kitchen to repack your rom's boot.img, then flash it via fastboot (UNLOCKED BOOTLOADER REQUIRED). To restore working state after testing, flash stock boot image again.
WARNING
Our kernel uses android regular boot.img format, not MTK.
---------
If you want to build this, any manual for building kernel will fit. I used google's android arm eabi 4.9 toolchain, our arch is arm, defconfig is cereus_defconfig.
For now, I don't have enough time to take a closer look at this (work, university exams), so, any help (last_kmsg, dmesg, pull requests) will be appreciated.
Wait seriously? Does that mean that i can buil LOS rom now? I have my UbuntuVM with whole LOS source code downloaded but i got stuck at no kernel found for cereus. So it might work now(Im extremely new to linux) I'll try to build the rom asap
TanRayCz said:
Wait seriously? Does that mean that i can buil LOS rom now? I have my UbuntuVM with whole LOS source code downloaded but i got stuck at no kernel found for cereus. So it might work now(Im extremely new to linux) I'll try to build the rom asap
Click to expand...
Click to collapse
This kernel for now won't really help with building los. I haven't find any device tree for our SoC (or close). MTK always requre a ton of patches to android sources. But i have reference MTK 9.0 android sources for this SoC - ALPS (can't share, it's probably illegal, but you can find them on 4pda.ru, if you want). It builds on almost unmodified reference device tree, but i haven't tested it on device. First, we need to make this kernel usable.
[email protected] said:
This kernel for now won't really help with building los. I haven't find any device tree for our SoC (or close). MTK always requre a ton of patches to android sources. But i have reference MTK 9.0 android sources for this SoC - ALPS (can't share, it's probably illegal, but you can find them on 4pda.ru, if you want). It builds on almost unmodified reference device tree, but i haven't tested it on device. First, we need to make this kernel usable.
Click to expand...
Click to collapse
This may not really help, but can you try that kernel again after upgrading to MIUI 10.2.4 ?
EDIT : See https://www.kimovil.com/en/list-smartphones-by-processor/mediatek-helio-p22-mt6762 for a list of devices with MT6762. Probably we can check out their trees?
EDIT 2 : It seems like our Redmi 6 is the only device with available kernel source in that list.
EDIT 3 : Try this?
minhducsun2002 said:
EDIT : See https://www.kimovil.com/en/list-smar...lio-p22-mt6762 for a list of devices with MT6762. Probably we can check out their trees?
EDIT 2 : It seems like our Redmi 6 is the only device with available kernel source in that list.
Click to expand...
Click to collapse
Maybe them exists, but I haven't found them.
minhducsun2002 said:
This may not really help, but can you try that kernel again after upgrading to MIUI 10.2.4 ?
---------------------
EDIT 3 : Try this?
Click to expand...
Click to collapse
I finally finished my university exams, so now I have some free time to play with it.
The kernel you link is just forked xiaomi sources merged to linux 4.9 kernel. It shouldn't be buildable at all, since there is the same problem in sources I "fixed" with this.
Probably, this too.
[email protected] said:
I finally finished my university exams, so now I have some free time to play with it.
The kernel you link is just forked xiaomi sources merged to linux 4.9 kernel. It shouldn't be buildable at all, since there is the same problem in sources I "fixed" with this.
Probably, this too.
Click to expand...
Click to collapse
[email protected] said:
Maybe them exists, but I haven't found them.
Click to expand...
Click to collapse
You're right, they're identical.
By the way, I couldn't find any implementation available for our Helio P22; the chipset itself is fairly new, thus not many devices have the source code available.
minhducsun2002 said:
This may not really help, but can you try that kernel again after upgrading to MIUI 10.2.4 ?
Click to expand...
Click to collapse
Ok, i've tested it on latest GS. It seems to work a way better. At least, it doesnt reboot after few seconds of usage. It makes things a lot easier.
Tested a few more things:
-sound - works
-camera (both photo and video) - works
- mobile data - works
- phone calls - work
- dual sim -works
- all sensors work
The only thing i was unable to test is gps. It didn't worked for me, but i was inside 9-floor building near the window to inner corner of building... So idk.
And usb otg - since i don't have adapder.
After this I can tell, that there are only 2 major bugs - wifi and bluetooth.
Maybe gps, fm radio and exfat too. This is modules loading problem, I think (though, there shouldn't be any modules, drivers are marked as built-in in config, but .ko files for them exist in /vendor/lib/modules)
[email protected] said:
Ok, i've tested it on latest GS. It seems to work a way better. At least, it doesnt reboot after few seconds of usage. It makes things a lot easier.
Tested a few more things:
-sound - works
-camera (both photo and video) - works
- mobile data - works
- phone calls - work
- dual sim -works
- all sensors work
The only thing i was unable to test is gps. It didn't worked for me, but i was inside 9-floor building near the window to inner corner of building... So idk.
And usb otg - since i don't have adapder.
After this I can tell, that there are only 2 major bugs - wifi and bluetooth.
Maybe gps, fm radio and exfat too. This is modules loading problem, I think (though, there shouldn't be any modules, drivers are marked as built-in in config, but .ko files for them exist in /vendor/lib/modules)
Click to expand...
Click to collapse
Yeah, Treble definitely makes things easier.
Nevertheless I'm trying to integrate those kernel modules into the compiled zImage - there's no modprobe in Android, sadly.
Adding modules support and disabling modules versions check in config didn't help.
I can't find any source files in kernel sources, from which these modules can be built. Maybe, they are built from separate platform code (they are placed in vendor, so...) Need to download ALPS (brrr, around 50 gb of tar.bz2 archives) to check it.
I've looked into reference mediatek 4.9 kernel sources and found this:
Code:
# Do build-in for Makefile checking
# export CONFIG_WLAN_DRV_BUILD_IN=y
ifeq ($(CONFIG_WLAN_DRV_BUILD_IN),y)
PATH_TO_WMT_DRV = vendor/mediatek/kernel_modules/connectivity/common
PATH_TO_WLAN_CHR_DRV = vendor/mediatek/kernel_modules/connectivity/wlan/adaptor
PATH_TO_WLAN_DRV = vendor/mediatek/kernel_modules/connectivity/wlan/core/gen4m
ABS_PATH_TO_WMT_DRV = $(srctree)/../$(PATH_TO_WMT_DRV)
ABS_PATH_TO_WLAN_CHR_DRV = $(srctree)/../$(PATH_TO_WLAN_CHR_DRV)
ABS_PATH_TO_WLAN_DRV = $(srctree)/../$(PATH_TO_WLAN_DRV)
# check wlan driver folder
ifeq (,$(wildcard $(ABS_PATH_TO_WMT_DRV)))
$(error $(ABS_PATH_TO_WMT_DRV) is not existed)
endif
ifeq (,$(wildcard $(ABS_PATH_TO_WLAN_CHR_DRV)))
$(error $(ABS_PATH_TO_WLAN_CHR_DRV) is not existed)
endif
ifeq (,$(wildcard $(ABS_PATH_TO_WLAN_DRV)))
$(error $(ABS_PATH_TO_WLAN_DRV) is not existed)
endif
$(warning symbolic link to $(PATH_TO_WMT_DRV))
$(warning symbolic link to $(PATH_TO_WLAN_CHR_DRV))
$(warning symbolic link to $(PATH_TO_WLAN_DRV))
$(shell unlink $(srctree)/$(src)/wmt_drv)
$(shell unlink $(srctree)/$(src)/wmt_chrdev_wifi)
$(shell unlink $(srctree)/$(src)/wlan_drv_gen4m)
$(shell ln -s $(ABS_PATH_TO_WMT_DRV) $(srctree)/$(src)/wmt_drv)
$(shell ln -s $(ABS_PATH_TO_WLAN_CHR_DRV) $(srctree)/$(src)/wmt_chrdev_wifi)
$(shell ln -s $(ABS_PATH_TO_WLAN_DRV) $(srctree)/$(src)/wlan_drv_gen4m)
# for gen4m options
export CONFIG_MTK_COMBO_WIFI_HIF=axi
export MTK_COMBO_CHIP=CONNAC
export WLAN_CHIP_ID=6765
export MTK_ANDROID_WMT=y
# Do build-in for xxx.c checking
subdir-ccflags-y += -D MTK_WCN_REMOVE_KERNEL_MODULE
subdir-ccflags-y += -D MTK_WCN_BUILT_IN_DRIVER
obj-y += wmt_drv/
obj-y += wmt_chrdev_wifi/
obj-y += wlan_drv_gen4m/
endif
No such code in xiaomi's source. And this prooves my words: these modules CAN BE BUILT IN and SOURCES FOR THEM ARE IN ALPS. I have to download this ton of ****...
-------
I tried to backpors drivers from 9.0 - no success. It compiles,but doesn't boot. I tried to hack modules loading - no success too.
[email protected] said:
Adding modules support and disabling modules versions check in config didn't help.
I can't find any source files in kernel sources, from which these modules can be built. Maybe, they are built from separate platform code (they are placed in vendor, so...) Need to download ALPS (brrr, around 50 gb of tar.bz2 archives) to check it.
Click to expand...
Click to collapse
Most of the time those binaries are not open-source (you probably know vendor blobs for Google devices are too, but that is a different story). Nevertheless I don't really get why kernel modules are placed in
Code:
/vendor
- after all, mobile devices don't have hot-plugging hardware that requires dynamic LKM loading, why do they separate them out?
I'll attempt to crawl the web for those sources while waiting for Mi Unlock to allow my device being unlocked (the waiting period sucks).
[email protected] said:
I've looked into reference mediatek 4.9 kernel sources and found this:
No such code in xiaomi's source. And this prooves my words: these modules CAN BE BUILT IN and SOURCES FOR THEM ARE IN ALPS. I have to download this ton of ****...
-------
I tried to backpors drivers from 9.0 - no success. It compiles,but doesn't boot. I tried to hack modules loading - no success too.
Click to expand...
Click to collapse
1. Backports? How?
2. In which file did you got those lines?
3. Indeed those modules' source are removed from our tree - if you have the link, I don't really mind having another 50GB occupied on my PC to get those source code.
minhducsun2002 said:
1. Backports? How?
2. Indeed those modules' source are removed from our tree - if you have the link, I don't really mind having another 50GB occupied on my PC to get those source code.
Because attached below is the existence of the modules. /shrug
Click to expand...
Click to collapse
I already said that i have leaked mtk alps 9.0 sources These modules have sources, they are not prebuilt. I managed to built in them, but kernel doesn't boot at all after that. And i can't take any logs because the system dies before adb init.
Ok, after one little, but very cruel hack modules are fixed. Enjoy testing the kernel.
https://drive.google.com/open?id=1Z3p2fAWOZFyp045QMNV6vhLZvj9ZZPSY
[email protected] said:
Ok, after one little, but very cruel hack modules are fixed. Enjoy testing the kernel.
Click to expand...
Click to collapse
does it work well?
Lonewolf_1210 said:
does it work well?
Click to expand...
Click to collapse
Users from 4pda reported it fully working.
---------------------
Soon will be build with usb network adapters support enabled (requested by romanxdream from 4pda).
P.S. I'm not adding everything requested to kernel. But this was only config modification.
-------
I don't check xda often, so there can be a huge delay in my responses.
[email protected] said:
Users from 4pda reported it fully working.
---------------------
Soon will be build with usb network adapters support enabled (requested by romanxdream from 4pda).
P.S. I'm not adding everything requested to kernel. But this was only config modification.
-------
I don't check xda often, so there can be a huge delay in my responses.
Click to expand...
Click to collapse
Great job then, hope for a custom rom coming soon
Ok, download link to all versions. I'll edit the first post later.
https://drive.google.com/open?id=1yEZRS8L8bPgkk58tT5Uv2b-vsLqk7aql
Should we make a telegram group for this?

[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

Question abut command "lunch" for AOSiP huawei honor 5x

I am trying build my own rom from source code, but when i reached to command "lunch", i got an error,
..............................................................................................................................................................
build/make/core/product_config.mk:243: error: Can not locate config makefile for product "Huawei".
17:09:43 dumpvars failed with: exit status 1
build/make/core/product_config.mk:243: error: Can not locate config makefile for product "Huawei".
17:09:45 dumpvars failed with: exit status 1
** Don't have a product spec for: 'Huawei'
** Do you have the right repo manifest?
...........................................................................................
I tried "lunch Huawei Honor 5x", "lunch device_huawei_kiwi". "lunch kiwi", still got a same error.
Can anyone tell me what is the right name of Huawei Honor 5x for ASOiP. Thanks in advance.
david3709 said:
I am trying build my own rom from source code, but when i reached to command "lunch", i got an error,
..............................................................................................................................................................
build/make/core/product_config.mk:243: error: Can not locate config makefile for product "Huawei".
17:09:43 dumpvars failed with: exit status 1
build/make/core/product_config.mk:243: error: Can not locate config makefile for product "Huawei".
17:09:45 dumpvars failed with: exit status 1
** Don't have a product spec for: 'Huawei'
** Do you have the right repo manifest?
...........................................................................................
I tried "lunch Huawei Honor 5x", "lunch device_huawei_kiwi". "lunch kiwi", still got a same error.
Can anyone tell me what is the right name of Huawei Honor 5x for ASOiP. Thanks in advance.
Click to expand...
Click to collapse
What software tools are you using to build your ROM?
Thanks for your response.
I did not use any software, i follow the instruction of AlaskaLinuxUser, he has lot of videos for compling custom rom.
I am working in Ubuntu 22.04, and openjdk18, the latest git and repo. And i also use lineage os instruction(https://wiki.lineageos.org/devices/kiwi/build) for reference.
The manifest is from "https://github.com/AOSiP/platform_manifest/tree/pie"
Before command "lunch", everything is ok, and "repo sync -j 4 -c" is fine, no error.
This error looks like the name of device is wrong.
For Lineageos 17.1, i am using "kiwi", it works and already flashed my compiling rom on my phone, and everything is working fine, just sometimes has response lag problem. That is the reason i want to try another rom, i can not accept response lag, want to good performance.
There is office AOSiP rom for my phone, i just want to try to build my own rom for practice and later do some changes.
I am using terminal to build my own rom, and stuck on "lunch", can not find the right device name for honor 5x. need help.
david3709 said:
I am using terminal to build my own rom, and stuck on "lunch", can not find the right device name for honor 5x. need help.
Click to expand...
Click to collapse
david3709 said:
Thanks for your response.
I did not use any software, i follow the instruction of AlaskaLinuxUser, he has lot of videos for compling custom rom.
I am working in Ubuntu 22.04, and openjdk18, the latest git and repo. And i also use lineage os instruction(https://wiki.lineageos.org/devices/kiwi/build) for reference.
The manifest is from "https://github.com/AOSiP/platform_manifest/tree/pie"
Before command "lunch", everything is ok, and "repo sync -j 4 -c" is fine, no error.
This error looks like the name of device is wrong.
For Lineageos 17.1, i am using "kiwi", it works and already flashed my compiling rom on my phone, and everything is working fine, just sometimes has response lag problem. That is the reason i want to try another rom, i can not accept response lag, want to good performance.
There is office AOSiP rom for my phone, i just want to try to build my own rom for practice and later do some changes.
Click to expand...
Click to collapse
Using newer ROMs on older devices is going to cause lag, that is normal. The problem is not the ROM, the problem is your hardware wasn't designed to use newer, more demanding software.
yes, you are right, that is why i want to try android PIE, the reason for building AOSiP Pie is i want to do more practice, after more try, i can really build my own custom rom, right now what i only can do now is to rebuild some custom rom.

Categories

Resources