yashsingh1/xdaforums huggingface dataset:
[Android General] AlaskaLinuxUser:
For the group: New HD kernel videos are out for the 64 bit kernel modifications, including Audio mods, and Video mods, like FauxSound, KCAL, and there is even a video where I show you KPPD video control, so if you have a chance, be sure to check those out! Up next is OrangeFox and RedWolf recoveries!
[Android General] lucki1000:
If I download the Android source kernel can I modifying them that it works on my phone ?
[Android General] AlaskaLinuxUser:
You can certainly give it a try, but it will take a lot of dedication and hard work. :good:
[Android General] pvineeth97:
How to separate device specific changes from the kernel? Apparently, LG offers zip files for their kernel with no commit history. If I am able to separate the device specific changes from the kernel then I can merge those device specific changes to a newer CAF tag.
[Android General] AlaskaLinuxUser:
Without a commit history, this is very difficult to do.

However, if you want to compare your kernel to the generic kernel, you will see what is device specific. E.g, if your kernel is 3.18.27 for your phone, you can download the generic 3.18.27 kernel source, and compare to see what is different in your kernel, which should be device specific. However, CAF is another animal entirely. I've ventured into CAF a time or two, but I'm not super familiar with it. It is probably my weakest area of Android development. :silly:
[Android General] AlaskaLinuxUser:
Hey everyone!

Just a quick update: I've started releasing the videos for building alternative recoveries like Orange Fox and Red Wolf! Be sure to check them out! Links are in the opening post.

Thanks for watching!
[Android General] pvineeth97:
Look at the /firmware/verinfo.txt file. You will get the CAF tag there. Moreover, you need to rebase the kernel you got from the OEM with the CAF tag kernel. You will get the device specific changes.
[Android General] mail.kumar.2309:
Hi

Is it possible to start afresh without using any existing device tree?

I mean is it possible to compile TWRP recovery and Lineage OS ROM from Lineage OS'/TWRP's source code and Device's source code(includes vendor files from Samsung) ?

Also the second video of the playlist builds the ROM for "jfltexx" for which the tree already exists.

What if the tree doesn't exist, or if I want to build for a completely new device(port a new device to LineageOS)?

Regards

Kumar Abhishek
[Android General] nextheart:
I want to delete some apps (like email, wallpaper) from custom rom zip before flashing through TWRP. How can I do it?

My Device: MI A1

ROM: https://xdaforums.com/mi-...mi-mi-t3766990

Thank you in advance.
[Android General] IvanHephaestus:
Hey, AKLU, I asked about media codecs issue, i just simply added TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS := 0x02000000

to BroadConfig and now everything is working fine
[Android General] AlaskaLinuxUser:
Absolutely! In the op, there is a link to the advanced building thread, where I build a device tree from scratch for a BLU phone, the life one x2. Or on my YouTube channel, watch the playlist called " creating a device tree from scratch". :good:

Great question, the best way to do that is by compiling it yourself, and removing the app you don't want from the build. That is what this thread is all about. Most ROMs now have a system image rather than individual files, but here on XDA are several threads on how to unpack that image, edit, and repack it. :good:

Great work! I'm glad someone could help you! I'm sure that you thanked them for their time. Way to go! And thanks for coming back to share that with me, as I did not know the answer, but now, we do! That's how XDA should work! :good: :D
[Android General] AlaskaLinuxUser:
As I mentioned in the previous post, I have an entire series about building a device tree from scratch, but your other question was about adding a tree that existed, but was not on the list....

As you watch through the series, you will see for Oreo that I add a device tree through local manifest files. This concept can be used for any android version.

In the old non HD series, I also edit a lineage tree to use it on aokp. Which may be helpful to you as well. :good:
[Android General] DJABHipHop:
Would this apply to aosp as well AKS using a LineageOS device tree to build AOSP
[Android General] AlaskaLinuxUser:
Yes, all of these videos show principles that you can use in different situations. :good:

Side note, in my opinion, building aosp and omnirom are the hardest ROMs to build by converting from something else. For what it is worth. :cowboy:
[Android General] n.pikota:
it possible to build LOS15.1 with android 8.0 kernel source?
[Android General] AlaskaLinuxUser:
Yes, it is. Do you have a more specific scenario in mind? :D
[Android General] DJABHipHop:
how would add the opengapps to my rom there included every time i build any my device
[Android General] n.pikota:
thanks for answering. I ask if you do not have to change the kernel source code. Because the kernel is android 8.0 and LOS15 is android 8.1
[Android General] rajesh@xda:
Thanks lot for your effort in bringing this guide:good: . I am just beginner and I have built my own nougat kernel from lineage source but selinux status was set as permissive by default . Is there any way to change selinux status to enforcing in kernel source itself and i need to recompile again. My device is YU yureka with arm64 arch and i used uber tool chain to compile on ubuntu 18.04 LTS . I need your help:)
[Android General] sebbe312:
Hi,

Sorry if this has been asked before, but will this guide work on MacOS Mojave?
[Android General] AlaskaLinuxUser:
Great question! You certainly can, there are two methods:

#1. Build open gapps when you build the ROM. Follow this guide: https://github.com/opengapps/aosp_build/blob/master/README.md

To add open gapps to your manifest, and actually build your own gapps into the ROM.

#2. Add the gapps in your zip file after the ROM build is complete. Follow this guide: https://xdaforums.com/showpost.php?p=76805455&postcount=3

Typically, people don't to that anymore because of legal issues. For personal use it is okay to do so, but there are several questions regarding distribution. Proceed at your own risk. :good:
[Android General] AlaskaLinuxUser:
You bet. There are only subtle changes between 8 and 8.1 I don't recall many big kernel source changes, but I only did that for one phone, so I think you will be fine, but if not, then it is a great leaning activity! :good:

In your board config make file, there is a line called the kernel command line. At the end of that line, add this:

androidboot.selinux=permissive

That will force selinux to permissive every boot. :good:

The guide as a whole does not cover MacOS. However, many people build on Mac, and the portions of this guide about how to build android, modify kernels, etc, are still the same.

To follow this guide exactly, you could also use virtual box on your Mac so you can run Ubuntu and follow the guide exactly as recorded. :good:
[Android General] DJABHipHop:
Thenk For the Advice
[Android General] _JaSoN_:
thanks for the videos finally i think i found out how to build a rom for the xiaomi mido since i stuck at getting that **** build since it is not in the official los 16 branch

already deleted everything because i got so angry haha reinstalling everything now and hope to get it working this time lol

never build a rom before but i really wanna learn this :)
[Android General] n.pikota:
I'm trying to build LOS15.1 for unsupported device and I get this error https://hastebin.com/keholovona.sql
[Android General] AlaskaLinuxUser:
Great! I hope these videos help!

This error log does not show enough output to diagnose the error.

No problem!
[Android General] n.pikota:
https://drive.google.com/file/d/18oW4U2lJuket1fcySbtC5vV60OzcS95Y/view?usp=drivesdk
[Android General] AlaskaLinuxUser:
Great! Now I see the problem.

So, I want to help you learn how to solve the issue yourself.

Search that file for the words "error:" and "failed:" with the colon. Lines that start with that phrase are your problem. So, what do you see?
[Android General] AlaskaLinuxUser:
You are not building for your device. You are not using your device tree. Look at your code output above: TARGET_PRODUCT=aosp_arm

You are building genetic aosp arm, not your device, so it is not reading your tree at all. So build your device with lunch_(your device)-eng :good:
[Android General] n.pikota:
Thanks for the answer. Now I understand how to see where the error is.
[Android General] TeamPrimeOS:
Thanks, most useful one.
[Android General] rajesh@xda:
Thanks lot in helping me in my previous doubt and it worked:good:I am able to compile kernel successfully and got kernel "image" file at end but not "zimage". I am using arm64 device..is it possible to get kernel zimage from kernel image file? Moreover I have only dts files and not dtb files at kernel source file arch/arm64/boot. How to generate dt.img file for each kernel. I used dtbtool but not able to generate dt.img due to missing of dtb files.!
[Android General] AlaskaLinuxUser:
Great question.

Essentially, you need dtbTool. It comes with Android source code when you download it. If you are building standalone, you need to search GitHub for dtbTool and download it.

How to create dt.img
The dtbTool is a standalone application that will process the DTBs generated during the kernel build, to create the table of device tree image, simply run:

dtbTool -o dt.img -s <pagesize> ./arch/arm64/boot/dts/qcom/

This article explains it in more detail:

https://github.com/96boards/documentation/wiki/Dragonboard-Boot-Image

Hope that helps! :good:

Do you have pcmanfm file manager? If so, just use "shift+ctrl+f" and you can click the content tab. Under "file contains" block, put "android.hidl.base@1.0" and see how many files come up with that in them. All of the files should be in the system/libhidl/transport/base/1.0 folder. Any that are in the device/<whatever brand> folder, you should consider editing them and removing those lines, since it is already defined. :good:
[Android General] AlaskaLinuxUser:
Just a quick update!

Red Wolf Recovery videos are up! I also made a new playlist (in OP and YouTube) that is just a list of all the videos that have a compilation error in them. Sort of a whos who of common (or not so common) errors for a quick reference.

Thanks for watching!
[Android General] rajesh@xda:
Thank you so much. You are awesome:victory:
[Android General] rajesh@xda:
with downloaded skales and dtbtool , got error message on applying above command from kernel source folder "No valid dtbs found".

Attached my error report herewith and how to build DTB files from kernel source..?
[Android General] AlaskaLinuxUser:
So, do they actually exist in that folder?
[Android General] rajesh@xda:
Compiled oreo kernel and to to test my kernel , I extracted the boot.img from a one of the oreo custom rom ( Unofficial lineage 15.1 ROM ) of my device and unpacked the boot.img (mkbootimg tool) , patched my kernel in it , repacked boot.img and flashed on my device. ROM booted well and everything is working fine but

wifi is not working

. And also noticed for that ROM patched with any oreo kernel,ROM boots only when kernel is assigned in permissive mode. when changed to enforcing mode on kernel command line, ROM stuck in boot animation..!

How to overcome above problem.:confused:
[Android General] AlaskaLinuxUser:
For the WiFi, is your WiFi listed as =m in your kernel config file?

If it is, then you also need to copy the proper module to the phone and set the proper permission. See this video: https://www.youtube.com/watch?v=jRr...cX1yE1nnhWBrZtuVz5YC2OPfQVVp&t=7s&app=desktop
[Android General] rajesh@xda:
Thanks lot. got fixed wifi issue:good: Your videos helped me lot in gaining knowledge about android. undoubtedly,your service will be boon for many beginners in rom and kernel development.:good:I dont have high end machine to compile ROMs, so i m interested in compiling kernels on my own. Kindly do video tutorials on creating standalone boot.img for ROM versions[N/O/P] so that it can be flashed with any custom rom of that particular version of android as desired. I have subscribed your youtube channel and interested in watching your videos:) can you tell me how to create ramdisk image of a particular kernel..?
[Android General] AlaskaLinuxUser:
As you know already, from the great work you are doing, you can break down boot images and put your kernel into it.

However, to build just the boot image, you can watch my video series on 64 bit kernel modification.

https://www.youtube.com/playlist?list=PLRJ9-cX1yE1m7MN7uSNCJl-phEs8ZmKsB

Essentially, if you want to build your own boot image, you download all the Android source code for whichever ROM you want to use it on, and then, just like in the videos, you run:

$ . build/envsetup.sh
$ lunch <ROM>_<YOUR DEVICE>-<Variant>
$ mka bootimage

And it will make just the boot image. You can see me doing this process many times in the 64 bit kernel modification series. Hope that helps! :good:
[Android General] rajesh@xda:
How to add policy to SELinux from ROM side to allow ViPER4Android app to work in enforcing mode.? Resurrection remix ROM did that on nougat...! How to add that feature to other nougat ROMs..?

https://github.com/ResurrectionRemix/android_system_sepolicy/tree/nougat-7.1.2
[Android General] AlaskaLinuxUser:
I'm not sure. I don't use viper4android. They do have their own thread here on XDA, perhaps that would help. :good:
[Android General] fazilbaig786:
Its very helpful
[Android General] AlaskaLinuxUser:
This video will literally show you everything to do on this kernel for over clocking the CPU.... https://www.youtube.com/watch?v=qBg...-vkgsj61U-Zv3fjzwZ&index=71&t=43s&app=desktop

Also, your stats are very aggressive. I recommend you start small and work up to higher frequencies. :good:
[Android General] rajesh@xda:
Could you explain how to use lunch command for my device. I have downloaded all sources and I am trying to build boot.img for lineage 14.1 (7.1.2) and my device is name is "yureka" with code name "tomato"..provide lunch command..!:confused: I used command " lunch lineage_tomato-userdebug " is it the right way to use that command..?
[Android General] AlaskaLinuxUser:
I need a few more details. What are you building? What system are you using, and what videos or tutorials are you following? :confused:

Yes, so in your case:

$ . build/envsetup.sh

$ lunch lineage_tomato-userdebug

$ mka bootimage

:good:
[Android General] krishV:
I am trying to build for Xiaomi mi max hydrogen and I am using aosp_arm64_eng, and follow your building custom ROM tutorials
[Android General] heindrix:
Hello sir [MENTION=7026648]AlaskaLinuxUser[/MENTION],

Before asking questions, i would like to say thank you very much to you for your effort of making android building videos, it's really helping for a newbie like me, newbie in Linux OS, and newbie in Android OS.

Yesterday, i decide to learn from your videos, so i try to build a ROM, this is the information :

- ROM : LineageOS 16.0 (android pie)

https://github.com/LineageOS

For the vendor files i extract it from flashable zip ROM.

- Device : Mi Mix (codename : lithium)

- Systems : Ubuntu 18.10 (64-bit) in VMware, memory assigned 8GB, processors assigned 2 cores

When i do brunch, there's a couple error because of some files doesn't exists in vendor directory and i've removed the references of it (some apk that not much important based on i search on google).

And after that, i do brunch once again, and this error shown up and at this point of learning i don't know what's wrong and how to fix it.

I've tried to clear out $out directory and re-brunch again but the error still occur, so this is another issue.

Please help me for it sir, thank you very much.
[Android General] prabhjot368:
hi aklu sir, I'm here again to ask for your help in adding features to my device kernel.. i am able to build kernel but i want to add some features like hotplugs, intelliplugs, fast charging. i saw your videos and bit confused about the board versions bcoz im using a msm8916 and you make videos on msm8974 .. so the required files should be the same for both the boards or i have to find somewhere else for my specific board?

bcoz i tried to add fast charging by faux123 but my kernel source code files aren't the same as they are shown in faux123's files..
[Android General] rajesh@xda:
All custom Oreo roms for my device boots in permissive SELinux mode by default. you once said "androidboot.selinux=permissive " is the key in kernel command line. To change to enforce i removed that command but ROM resulted in boot loop..:confused: ROM boots well only when "androidboot.selinux=permissive " is present. I dont know what actually happens here..! (tried some things like ro.secure= 1 to 0 on default.prop in ramdisk but nothing solved this issue ) ..any suggestions..?:)
[Android General] dargonswim:
First of all, thank you again for all the help you give us.

In the end I managed to make a compilation of lineage nougat in MIPAD successfully, but after making all the loading bootanimation the screen remains black and makes the bootanimation again. To see what happens I have to do an adb logcat, but adb doesn't work for me, it only does it in recovery mode.

How could I activate USB debugging in the lineage source and be able to use logcat?

I tried to make a compilation lineage_mocha-eng and even a mka bootimage but I can't get adb to see the tablet.

Thanks
[Android General] AlaskaLinuxUser:
I think we have a miss communication.

androidboot.selinux=permissive will make selinux permissive.

Removing it makes it selinux enforcing. If it will not boot while enforcing, then your selinux make files are not giving proper permission. I unfortunately don't have time to go through each of them with you. You can look at similar device trees with that SoC, perhaps that will help. :good:

Your files will be different. The principles will be the same, the idea of how is the same, but the actual code and individual files will be different. You should look on github for similar kernels or phones with the same SoC. :good:

You should not build arm64, you should build hydrogen. Follow this guide, it is for your phone:

https://wiki.lineageos.org/devices/hydrogen/build

That will work much better. :good:
[Android General] AlaskaLinuxUser:
You need this repository:

https://github.com/TheMuppets/proprietary_vendor_xiaomi

It has the files you need. :good:
[Android General] krishV:
Can I build lineage os 16.0 for Xiaomi mi max hydrogen
[Android General] rajesh@xda:
Thank you ..Yes it is:good:..In case of nougat, this problem solved when i created my own boot.img from ROM source and flashed on my device. I am able boot on both SElinux mode (credits to you). I am going to try the same thing on oreo as well..:good:
[Android General] AlaskaLinuxUser:
The latest that has been built is 15.0 for your device. I recommend that you build that first, make sure it works, to get the experience. Then, once that works, you can work on upgrading the tree for 16.0. :good:

Great work! :good:
[Android General] krishV:
Sir, I have already started lineage os 16.0 repo sync and it's now 98%done and how can I upgrade tree 15 to 16 any tutorials please send me link
[Android General] AlaskaLinuxUser:
The latest that has been built is 15.0 for your device. I recommend that you build that first, make sure it works, to get the experience. Then, once that works, you can work on upgrading the tree for 16.0.
[Android General] krishV:
Yea sir, but I am using lineage 15.1 is it works for my device and I have found lineage 16.0 for my device in GitHub this the link and how can I build for this source code https://github.com/MiMax-Pie/android_device_xiaomi_hydrogen

Please can you help me sir and tell me how to upgrade device tree from lineage 15 to 16
[Android General] AlaskaLinuxUser:
Well, if you have that tree that is 16.0, then you don't have to upgrade your 15 tree to 16. Just add that repo to your local manifest and build it. :good:
[Android General] krishV:
Thank you sir, can you tell how to add the tree to the repo I mean how to do that to my local manifest and build it

Please tell me in detail because I am new to this
[Android General] AlaskaLinuxUser:
We were all new to this once. :)

I recommend that you watch my video series so you can learn all the things that I already said and taught, including how to do that.

The video for that is: https://www.youtube.com/watch?v=qZz...LRJ9-cX1yE1m8k9gztsQnnXDg1G4X1f6z&app=desktop

But I recommend you watch them all. Doing so will answer a lot of your questions. :good:
[Android General] rajesh@xda:
Building oreo rom for my device..getting error

" ninja: no work to do

/build.ninja Android.bp

Fatal error : runtime: out of memory "

I followed same procedure for nougat but no such error..i am not compiling entire rom but i do only the kernel and boot image part..In nougat built started running with " kati to generate build lineage tomato.ninja....and make was successful..!

Followed same procedure for oreo but got above said error..

Building lineage oreo ..lineage has recently stopped oreo support for my device but unofficial build is available..i added all kernel and vender trees in right place but stuck with ninja error..!

Need help..:confused:
[Android General] DJABHipHop:
How do I apply shims to my device? I'm trying to patch my devices camera but I'm having no luck
[Android General] AlaskaLinuxUser:
Hey everyone!

I just posted this video on my YouTube channel, where I explain that due to a few changes locally, I'll be taking a short break from making more videos in this series, but I hope to get back to it soon! You can check out the video here:

https://www.youtube.com/watch?v=NsO8_LG8mWA&t=20s

Thanks again for all of your support, and I look forward to getting back to this in the future. As always, the threads will stay open, and I will try to stop in and answer a few questions from time to time. Please remember that there is now over 24 hours of video where I explain most of the basic and standard, as well as a few more advanced questions. So if you need answers, I recommend that you watch the videos, and if you don't find the answer you need, then be sure to ask here or in your device specific Q&A thread on XDA! :good:
[Android General] zelendel:
Yeah winters up here can put a damper on things lol
[Android General] heindrix:
Hi sir [MENTION=7026648]AlaskaLinuxUser[/MENTION],

It's me again who try to build LineageOS 16.0 for Mi Mix (lithium).

I've tried your suggestion for using proprietary from TheMuppets, but the error still the same.

Even when i use proprietary from another source, it's the same.

This is the my manifest :

And i've attached logs too.

Please help if you have time, thanks a lot.
[Android General] zelendel:
If I recall correctly you can not build for Xiaomi devices the same way as others with out a ton of extra work. They use a patch rom system. I maybe wrong as it has been a while since I had to look how to build for one of those devices as they are not sold in my country.
[Android General] heindrix:
Okay, yesterday i got through the built process.

I used Ubuntu 18.10 before, and after i switch to Ubuntu 16.04, the build process runs fine.

Some threads says that, to prevent build error on Ubuntu 18.04/18.10, you should add LC_ALL=C before brunch process, so you type : LC_ALL=C BRUNCH <DEVICE>, but i don't if it's really works because i've switched to Ubuntu 16.04.

Today i finished the build but it's bootloop when i try it on my device, i'll try to find out the problem by myself first.
[Android General] AlaskaLinuxUser:
Hendrix,

Were you able to solve this? Did you watch my videos on pulling tombstones?