Creating Device Tree hiddenapi error - General Questions and Answers

Device tree: https://github.com/Bush-cat/android_device_samsung_gts7xlwifi
Kernel tree: https://github.com/Bush-cat/android_kernel_samsung_gts7xl
Vendor tree: WIP
Common tree: https://github.com/Bush-cat/android_device_samsung_gts7xl-common
Rom source: https://github.com/LineageOS/android/tree/lineage-18.1
Build Error: https://del.dog/motuxyrevi
Problem: hiddenapi.cc:58] No boot DEX files specified. I checked the hiddenapi.cc code and it shouldn't need dex files because it's only needed for encode. All stubs files were created successfully.
(don't look at my messy commits, I will clean them when I get a good build)

steps I tried: remove the boot dex if from hiddenapi; compile los 17.1; differrent Linux Systems (ubuntu 20.04 running in wsl2, native ubuntu 20.04, Linux mint 20.1), lots of try and error in the board config

I feel so stupid rn, the fix was changing the base makefiles, I probably removed one sometime to fix another error but now it's working

Bushcat said:
I feel so stupid rn, the fix was changing the base makefiles, I probably removed one sometime to fix another error but now it's working
Click to expand...
Click to collapse
What makefile did you replace (I have same issue)

Idk anymore, I think boardconfig

Related

can anyone offer help to a newbie plz.

I know that this source is not Lineage but I would think the basic principles for building for an supported device under Lineage would also be applicable to any other source repository.
All of the guides I have found only tell you how to build for a supported device and not any help for an unsupported one. I figured out how to sync a suitable device tree and kernel etc but since the rom source repository does not support my device I can't go any further. I can't get it to build from my sync'd local sources it keeps trying to pull stuff from the original source repository so builds fail at the start.
I have setup a local manifest for this project that sync's the device tree and a kernel and the proprietary blobs and this sync completes without error. next I ran - source build/envsetup.sh and then brunch hlte (not a supported device I know) but that throws up this error -
build/core/product_config.mk:248: * Can not locate config makefile for product "gzosp_hlte". Stop.
Device hlte not found. Attempting to retrieve device repository from GZOSP-Devices Github (http://github.com/GZOSP-Devices).
Repository for hlte not found in the GZOSP-Devices Github repository list.
If this is in error, you may need to manually add it to your .repo/local_manifests/gzosp_manifest.xml
build/core/product_config.mk:248: * Can not locate config makefile for product "gzosp_hlte". Stop.
So I think that the error basically means that github.com/GZOSP-Devices does not have the hlte device listed so can anyone tell me how to make the build point to my local repository after I have sync'd so that it at least starts to build ?
I am a newbie to rom building and have much to learn but I would really appreciate any help you guys could give.
Thanks in advance for any an all help offered.

[GUIDE] How to build an unsupported rom using sources from other roms

Hello all and welcome to my first how-to guide
I began the process of learning about ROM about 4 months ago (so excuse this post if there are any inaccuracies and please feel free to correct me in the comments - I will absolutely update this post to ensure it has the best information)
Whilst I was trying to learn, I noticed there was a lack of information regarding how the actual build process works. Many roms will provide instructions allowing you to build your own unofficial version for one of their official devices, but very rarely do they inform you as to how you may do this for a device not officially supported.
This is what I shall try and explain here.
Building for a newer version of android is another challenge, so this guide will focus on building an unsupported rom from device sources that support the same version of android (e.g building Lineage oreo from AOSCP oreo sources etc)
Requirements
A relatively fast PC with a least 4 cores (less may work but it will take a long time)
At least 8GB ram
A swap-file set up in the event that your ram is fully filled
A significant amount of storage (each build can take 150-200GB)
Set up your PC for building
Firstly, allocate Jack enough memory to complete the build process by running
Code:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
And adding that line to your ~/.bashrc file
Also (optional) enable ccache by running
Code:
export USE_CCACHE=1
and adding that to your ~/.bashrc
If you choose to use ccache, also allocate a set amount of memory to use with
Code:
ccache -M $G
Where $ is a value of your choice between 50 and 100
First things first, we need to download the main source code for the target rom
Firstly you need to sync the sources from the manifest of your chosen rom. This will normally be called android, or manifest (or something similar) and will contain some xml files layed out like the example local manifest below
Find this repo and copy the link. Then move to the location you wish the entire android code to be stored, and then perform the following command
Code:
repo init -u <url of manifest repo>.git -b <branch you want to build>
e.g. for lineage 15.1 it would be
Code:
repo init -u https://github.com/LineageOS/android.git -b lineage-15.1
Finally, run "repo sync" to download the source code. It is very large (approximately 30GB) so it will take a while. Should you need to cancel this, a simple CTRL+C will stop it, and it will continue from where it stopped next time you run repo sync
Now we need to understand which components we need to build a custom rom.
We need (anything inside the <> needs to be replaced with relevant information for your device)
A device tree. This contains all the information needed to configure the rom build to your device's needs. Often this comes as more than one repo (one for your exact device and one for the general model - e.g. for my LG G4 H815, we have the h815 repo and the g4-common repo). The format for these repos is generally android_device_<vendor>_<device model>
A kernel. This contains all the drivers and more needed for your device to be able to run Android. Often these are named using your device's chipset name and follow the format android_kernel_<vendor>_<chipset>, although occasionally they can use your model name instead of the chipset.
Proprietary blobs. These are the closed source blobs that come bundled in your OEM software and contain the non-OSS (open source software) drivers for your device. They normally come in a repo labeled proprietary_vendor_<vendor> which normally contains blobs for all the devices released by that vendor (that are supported).
Any other repos specified by the dependencies file (more on that later)
All of the above repos go into the path specified in the name - for example, android_device_<vendor>_<device model> will go into the device/<vendor>/<device model> directory.
To sync these, you should create a local manifest in the <android source>/.repo/local_manifests/ folder. Name it anything you like (make sure it's an xml file) and fill it out like so
Code:
<manifest>
<remote name="<your chosen name for this url>"
fetch="<url to your git organisation>"
revision="<branch if different to the one used in repo init (otherwise, miss out revision)>"
<project name="<name of repo inside git org>" path="<destination of the repo>" remote="<remote name chosen earlier>" revision="<revision if different to one specified above>" />
</manifest>
After adding this manifest, re-run repo sync to pull the extra repos
Understanding the device tree.
Inside the device tree (model specific one if there are more than one) there will be a file with a naming scheme along the lines of <rom brand>.mk (e.g. lineage.mk). This is the starting file for your device and is detected when you begin a build for your device. (Pie roms are currently using AndroidProducts.mk as a placeholder containing a link to this file). It contains links to the common configuration of your device (phone, tablet etc) at the top, and also specifies the name of the product (normally <rom>_<device model>) which is part of the command used to build the device.
There will also be some build prop overrides - these contain information like the device name and the build fingerprint (used to verify to google what device you are - lots of devices leave this as the last stock fingerprint to pass google CTS)
In most device trees, there will also be a <rom>.dependencies file. This contains all the additional repos needed to build for your particular device. This file is parsed automatically if you use the official methods and use the breakfast command. If you do it manually, they must be added to a local manifest.
The <device model>.mk file is what defines what open source packages need to be built in the build. Devices either include everything in this file or they can link to a product folder in which every .mk file is included.
BoardConfig(Common).mk includes configuration options for the device, and often links to config files to inform the builder of certain flags that need to be applied for the build. Similarly to the <device model>.mk, this is often linked to a board folder containing configurations
The kernel
The kernel is a massive topic and one that I cannot explain in depth here. However, for rom building it is useful to know that the defconfigs used to build a kernel are located in kernel/<chipset/device model>/arch/<arm or arm64 depending on device>/configs and the one used is normally in the format <rom>_<device model>_defconfig (e.g my lineage one is lineageos_h815_defconfig). Should you wish to change the name, simply change the name and alter the defconfig name in the BoardConfig.mk for your particular device.
So...to the main part - how do you build a rom.
Essentially there are a few main commands that are spoken about
"source build/envsetup.sh". This runs the builder script and loads all the custom commands.
"breakfast". This simply pulls the device specific code from the official repos. You do not need this if you are building unofficially
"brunch". This effectively performs breakfast, but assuming everything is synced correctly, it will finish without an issue. Then it will go on to begin the build. Normally brunch is run as brunch <rom name>_<device model>-userdebug (or eng if you are developing). User is used for OEM releases but most roms use userdebug as it is slightly more relaxed on conditions
To build a rom from unsupported sources requires a bit of thought. Firstly, ensure you have all the dependencies synced (hopefully from the target rom) as well as the device sources.
Then you need to go into the device tree and modify
The <rom>.mk file to now be renamed to your new rom.
You need to enter that file and modify any stuff relating to your old ROM look for your new rom instead (device type configurations are normally the main one here).
You need to remove any stuff inside your device tree relating to features not in your new rom.
Then run "source build/envsetup.sh"
"brunch <rom>_<device model>-userdebug"
This will hopefully begin the build and assuming everything is setup correctly, should continue through to finish building the rom of your choice
If you have any questions/issues with this process, I will be happy to answer to the best of my ability
Also, big thanks to the LineageOS guide for giving me a basis upon which to base this guide on
PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE directly
Specify Framework Compatibility Matrix Version in device manifest by adding a target-level attribute to the root element <manifest>. If PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE is 26 or 27, you can add "target-level"="1" to your device manifest instead.
how to implement this?
nadeem_naddy said:
PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE directly
Specify Framework Compatibility Matrix Version in device manifest by adding a target-level attribute to the root element <manifest>. If PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE is 26 or 27, you can add "target-level"="1" to your device manifest instead.
how to implement this?
Click to expand...
Click to collapse
Sorry for the late reply
What Android version are you building (this determines the api level). Also, what rom and device (links are helpful as I can see what it going on)
I would imagine you need something like https://github.com/LineageOS/androi...mmit/c24f0fff1fb1fc46d638e91777281ec7efc3e239
ThePiGuy said:
Sorry for the late reply
What Android version are you building (this determines the api level). Also, what rom and device (links are helpful as I can see what it going on)
I would imagine you need something like https://github.com/LineageOS/androi...mmit/c24f0fff1fb1fc46d638e91777281ec7efc3e239
Click to expand...
Click to collapse
i did not get the way to override or more precisely i dont know where to put the code to over ride this flag so i simply commented this in BoardConfig.mk itself. as it says its deprecated.
now i encounter this -
66% 2/3] glob frameworks/base/core/java/**/*.java
ninja: error: unknown target 'nitrogen_X00TD'
01:34:03 ninja failed with: exit status 1
it would be great help if you let me know from where does frameworks pick the device info in device tree. where do we need to set path.. i am building nitrogen pie for my device X00TD. thanks
the latest issue am facing is -
ninja: error: '/home/matin1117/nitrogen/out/target/common/obj/java_libraries/qcrilhook_intermediates/classes.jar', needed by '/home/matin1117/nitrogen/out/target/common/obj/packaging/boot-jars-package-check_intermediates/stamp', missing and no known rule to make it.
please suggest a fix.
thanks,
Nadeem
nadeem_naddy said:
the latest issue am facing is -
ninja: error: '/home/matin1117/nitrogen/out/target/common/obj/java_libraries/qcrilhook_intermediates/classes.jar', needed by '/home/matin1117/nitrogen/out/target/common/obj/packaging/boot-jars-package-check_intermediates/stamp', missing and no known rule to make it.
please suggest a fix.
thanks,
Nadeem
Click to expand...
Click to collapse
Is Pie ready for your device. For most ROMs it requires a lot of cherry-picking etc before it will build
ThePiGuy said:
Is Pie ready for your device. For most ROMs it requires a lot of cherry-picking etc before it will build
Click to expand...
Click to collapse
yes the device have many pie roms but i want to build nitrogen. i
can see niteogen os pie built for many other phones using sd636.
nadeem_naddy said:
yes the device have many pie roms but i want to build nitrogen. i
can see niteogen os pie built for many other phones using sd636.
Click to expand...
Click to collapse
Pie is an oddball case at the moment. Many ROMs work if you cherry-picking fixes off Gerrit (I built Pie Lineage for my G4 but it required about 20 cherry-picks off the lineage Gerrit before it built)
In your case, it looks like you are possibly missing a ril-caf repo (look in the nos.xml and you will see only the non-caf repo is being synced). You can add the caf one but it's possible it isn't ready yet
thanks a lot, i can see one ril related entry in nos.xml. let me do some research on it.
thanks a lot for all your help buddy.
iam facing this error ? can u help please..... ?
see attachment ! 
 @ThePiGuy
Thanks in advance
vignesh95 said:
iam facing this error ? can u help please..... ?
see attachment !
@ThePiGuy
Thanks in advance
Click to expand...
Click to collapse
Ok can you show me the result of
Code:
ls device/oneplus
here u have it (see attachment)
ThePiGuy said:
Ok can you show me the result of
Code:
ls device/oneplus
Click to expand...
Click to collapse
Hi @ThePiGuy
vignesh95 said:
Hi @ThePiGuy
Click to expand...
Click to collapse
ok. And now
Code:
ls device/oneplus/oneplus2
here u have it (see attachment)
ThePiGuy said:
ok. And now
Code:
ls device/oneplus/oneplus2
Click to expand...
Click to collapse
revised 
 @ThePiGuy
vignesh95 said:
revised
@ThePiGuy
Click to expand...
Click to collapse
Ok. Sorry for the late reply.
You need to open the AndroidProducts.mk file and rename the lineage_oneplus2.mk line to aosp_oneplus2.mk.
You also need to change the lineage_oneplus2.mk file so it is called aosp_oneplus2.mk, and inside it you need to change any occurrences to aosp (basically you are rebranding the device tree to use the aosp versions rather than the lineage branded ones)
ThePiGuy said:
Ok. Sorry for the late reply.
You need to open the AndroidProducts.mk file and rename the lineage_oneplus2.mk line to aosp_oneplus2.mk.
You also need to change the lineage_oneplus2.mk file so it is called aosp_oneplus2.mk, and inside it you need to change any occurrences to aosp (basically you are rebranding the device tree to use the aosp versions rather than the lineage branded ones)
Click to expand...
Click to collapse
thanks! @ThePiGuy
now i am getting this error
[944/944] including vendor/qcom/opensource/dataservices/Android.mk ...
device/oppo/common/configpanel/Android.mk: error: ConfigPanel (APPS android-arm64) missing org.lineageos.platform.internal (JAVA_LIBRARIES android-arm64)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
build/make/core/main.mk:837: error: exiting from previous errors.
20:05:06 ckati failed with: exit status 1
#### failed to build some targets (03:05 (mm:ss)) ####
Please help !
vignesh95 said:
thanks! @ThePiGuy
now i am getting this error
[944/944] including vendor/qcom/opensource/dataservices/Android.mk ...
device/oppo/common/configpanel/Android.mk: error: ConfigPanel (APPS android-arm64) missing org.lineageos.platform.internal (JAVA_LIBRARIES android-arm64)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
build/make/core/main.mk:837: error: exiting from previous errors.
20:05:06 ckati failed with: exit status 1
#### failed to build some targets (03:05 (mm:ss)) ####
Please help !
Click to expand...
Click to collapse
Sorry, I don't think I can help with that
Make sure your build environment is set up correctly (wiki.lineageos.org/devices/oneplus2/build will help with that) and also ensure you are using Pie device sources (from what I have gathered you are trying to build Pie, but if you are using device trees and kernel from Oreo or anything else then it will require much more than this guide details)
Hi bro, i want to build lineage OS for unsupported device(Xiaomi Vince), please give me the step
---------- Post added at 08:57 AM ---------- Previous post was at 07:58 AM ----------
iam get error like this
including vendor/lineage/vendorsetup.sh
build/make/core/envsetup.mk:264: error: TARGET_ARCH not defined by board config: device/xiaomi/vince/BoardConfig.mk.
15:41:16 dumpvars failed with: exit status 1
Device vince not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Repository for vince not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/make/core/envsetup.mk:264: error: TARGET_ARCH not defined by board config: device/xiaomi/vince/BoardConfig.mk.
15:41:18 dumpvars failed with: exit status 1
build/make/core/envsetup.mk:264: error: TARGET_ARCH not defined by board config: device/xiaomi/vince/BoardConfig.mk.
15:41:19 dumpvars failed with: exit status 1
** Don't have a product spec for: 'aosp_vince'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
Click to expand...
Click to collapse
Help me
Hey
I have a common device source, which has linked my device to 3 more configuration files. I tried to change lineage to other rom in every possible location I can find but on building this error comes into action.
The error is same for every AOSP based rom
[email protected]:~/AEX$ mka aex -j4
vendor/aosp/config/bootanimation.mk:32: warning: Target bootanimation res is undefined, using generic bootanimation
============================================
▄▄▄ ▓█████ ▒██ ██▒
▒████▄ ▓█ ▀ ▒▒ █ █ ▒░
▒██ ▀█▄ ▒███ ░░ █ ░
░██▄▄▄▄██ ▒▓█ ▄ ░ █ █ ▒
▓█ ▓██▒░▒████▒▒██▒ ▒██▒
▒▒ ▓▒█░░░ ▒░ ░▒▒ ░ ░▓ ░
▒ ▒▒ ░ ░ ░ ░░░ ░▒ ░
░ ▒ ░ ░ ░
░ ░ ░ ░ ░ ░
AospExtended-v6.3 9
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
EXTENDED_MOD_VERSION=AospExtended-v6.3-20190311-0935-UNOFFICIAL
TARGET_PRODUCT=aosp_fortuna3g
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-20-generic-x86_64-Linux-Mint-19
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ2A.190205.001
OUT_DIR=/home/jmpfbmx/AEX/out
PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf/msm8916 hardware/qcom/display-caf/msm8916 hardware/qcom/media-caf/msm8916
============================================
[1/1] /home/jmpfbmx/AEX/out/soong/.minibootstrap/minibp /home/jmpfbmx/AEX/out/soong/.bootstrap/build.ninja
[55/56] glob prebuilts/ndk/stl.bp
[80/80] /home/jmpfbmx/AEX/out/soong/.bootstrap/bin/soong_build /home/jmpfbmx/AEX/out/soong/build.ninja
/home/jmpfbmx/AEX/out/build-aosp_fortuna3g-cleanspec.ninja is missing, regenerating...
vendor/aosp/config/bootanimation.mk:32: warning: Target bootanimation res is undefined, using generic bootanimation
/home/jmpfbmx/AEX/out/build-aosp_fortuna3g.ninja is missing, regenerating...
vendor/aosp/config/bootanimation.mk:32: warning: Target bootanimation res is undefined, using generic bootanimation
[25/1110] including development/build/Android.mk ...
development/build/build_android_stubs.mk:43: warning: android_stubs_current
development/build/build_android_stubs.mk:43: warning: metalava_android_stubs_current metalava_android_stubs_current
development/build/build_android_stubs.mk:43: warning: android_system_stubs_current
development/build/build_android_stubs.mk:43: warning: android_test_stubs_current
development/build/build_android_stubs.mk:43: warning: metalava_android_system_stubs_current metalava_android_system_stubs_current
development/build/build_android_stubs.mk:43: warning: metalava_android_test_stubs_current metalava_android_test_stubs_current
[271/1110] including frameworks/av/camera/Android.mk ...
frameworks/av/camera/cameraserver/Android.mk:18: warning: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0
[607/1110] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:88: warning: Be careful when using the SELINUX_IGNORE_NEVERALLOWS flag. It does not work in user builds and using it will not stop you from failing CTS.
[1110/1110] including vendor/samsung/serranovexx-common/Android.mk ...
bootable/recovery/Android.mk: error: recovery (EXECUTABLES android-arm) missing libhealthd.lineage (STATIC_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
device/samsung/qcom-common/doze/Android.mk: error: SamsungDoze (APPS android-arm) missing org.lineageos.platform.internal (JAVA_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
hardware/interfaces/health/1.0/default/Android.mk: error: [email protected] (SHARED_LIBRARIES android-arm) missing libhealthd.lineage (STATIC_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
hardware/samsung/AdvancedDisplay/Android.mk: error: AdvancedDisplay (APPS android-arm) missing org.lineageos.platform.internal (JAVA_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
system/core/healthd/Android.mk: error: charger (EXECUTABLES android-arm) missing libhealthd.lineage (STATIC_LIBRARIES android-arm)
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
build/make/core/main.mk:850: error: exiting from previous errors.
10:40:35 ckati failed with: exit status 1
build/make/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
#### failed to build some targets (05:24 (mm:ss)) ####
itexpert.120 said:
Hey
I have a common device source, which has linked my device to 3 more configuration files. I tried to change lineage to other rom in every possible location I can find but on building this error comes into action.
The error is same for every AOSP based rom
[email protected]:~/AEX$ mka aex -j4
vendor/aosp/config/bootanimation.mk:32: warning: Target bootanimation res is undefined, using generic bootanimation
Click to expand...
Click to collapse
Ok so what it looks like - did you sync only the device trees and any common ones and then use the "brunch" or "breakfast" command to download the rest of the repos. If so, then it's still pulled the repos from lineage (in all the dependency files, you can see where they come from)
If you did, try finding the AEX equivalent repo and replacing that in the .dependency file that it is referred to in.
If this is not what you did, please detail what you did to get your environment

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?

Build Lineage on my own

Hello, can someone give me a hint, howto build Lineage (based on the work of @SyberHexen) on my own?
I think the most work is done, but I wan't to dig a bit deeper into it.
I know there are several guides, specific to one device but I don't know how to include the sources of SyberHexen.
Thanks!
Setup your build environment with Java and all the required packages. Setup repo and grab the source code. Clone the device, kernel and vendor trees. Go through the steps to initialize your build system then build the ROM.

samsung s6 edge+ kernel building help + drivedroid support

hello i was looking for a samsung G928G S6 (Edge plus) kernel that has a drivedroid support but i was unable to find one.
since i am familiar with linux system i decided to try and build my first kernel.
i downloaded a stock kernel source from
https://opensource.samsung.com/uploadSearch?searchValue=g928
and other custom lineage os kernel from github
https://github.com/universal7420/android_kernel_samsung_universal7420
following this guide
https://forum.xda-developers.com/galaxy-s6/general/guide-how-to-build-samsung-kernel-july-t3429355
and this guide.
https://forum.xda-developers.com/an...erence-how-to-compile-android-kernel-t3627297
this are the steps that i did
export CROSS_COMPILE=$(pwd)/bin/aarch64-linux-android-
export ARCH=arm64 && export SUBARCH=arm64
when i came to make clean step i was getting this error
aarch64-linux-android-4.9/bin/aarch64-linux-android-gcc: No such file or directory
i noticed in my toolchain folder aarch64-linux-android-gcc was missing
so i downloaded some other toolchains until i found one that has gcc
moving to next steps
make clean
make mrproper
make exynos7420-zenlte_defconfig based on stock kernel and
make lineageos_zenlte_defconfig based on lineage os kernel
when i did the make -j$(nproc --all) i get this error
make: *** [Makefile:552: scripts] Error 2 and when i checked in Makefile line 552 i found this
$(Q)$(MAKE) $(build)=$(@)
i get this error everytime i try. i use Arch linux i tried in Ubuntu same thing
Cool How about Kali-linux mod did you check it?
We have Kali-Linux mod for S6 it has drive-droid build-in
Johannes89 said:
Cool How about Kali-linux mod did you check it?
We have Kali-Linux mod for S6 it has drive-droid build-in
Click to expand...
Click to collapse
i tried it yesterday but it hangs on creating image since my device is s6 edge+ not s6
Try to create img file from other source like windows or other program and move it to your phone
so i followed your advice and tried to build on windows 10 ubuntu from their store (though i hate using windows) and it was a success. i patched drivedroid stuff in the kernel
i build one from samsung official kernel and boom! drivedroid works , after a minute i experience some never ending bootloops , in 30 seconds i can use my phone after that it boots again, the loop never ends.
i clone another kernel the lineage one , after spending the whole day building , failing ,errors , bugs, electricity issue and stuff ,
I HAVE FINALLY HAVE A DEVICE THAT WORKS NO BOOTLOOPS AND DRIVEDROID IS WORKING. though the lineage os rom has some camera problems . But yeah it was a good day

Categories

Resources