[Guide]How To Compile Kernel (Especially for Redmi Note 5A) - Xiaomi Redmi Note 5A Guides, News, & Discussion

Hi guys , it is a common fact that kernel runs linux. Without kernel, linux won't be usable. One of linux family is Android. Okay, so after that preamble, i just want to share to you "How To Compile Kernel (Especially for Redmi Note 5A)"​
So, Let's start !​Prerequisites :
1. Laptop/PC with Linux installed (i prefer Ubuntu based distro, for other distributions i'll update if i have tested​2. Already installed needed package (you'll see list below)​3. Internet connection (Optional if you have prepared all)​
Stages :
1. Install all needed packages by typing this command in terminal (if you encounter any error just delete the package that causes error)
Code:
sudo apt-get install git –core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib adb
2. Get the compiler(gcc) by typing this command in terminal
Code:
git clone <url> gcc
3. Get the kernel source from github or gitlab or whatever the service is by typing this command in terminal
Code:
git clone –b <branch name> https://github.com/xxx/xxx
Compile :
After all required components are ready, now let's start compiling our kernel. Run terminal in your kernel folder and type commands below :
1. First, we have to export(to tell the computer) the path of our compiler(gcc) by typing this command :
Code:
export CROSS_COMPILE=/home/<your host>/<gcc folder>/bin/<toolchain prefix>
Example :
Code:
export CROSS_COMPILE=/home/nayef/gcc/bin/aarch64-linux-android-
2. Second, we have to export(to tell the computer) the architecture for our devices. Fortunately Redmi Note 5A has ARM 64 bit architecture, so it should be "arm64".
Code:
export ARCH=arm64 && export SUBARCH=arm64
3. Third, before compiling, let's configure our devices configuration by using available defconfig, usually our devs name it "ugglite_defconfig", but from official Xiaomi source it is "ugglite_msm8937_defconfig" . There are many sources of Redmi Note 5A Kernel. PM me if you want the list.
Code:
make O=out <defconfig name>
Example:
Code:
make O=out ugglite_defconfig
4. Now, let's compile it by typing this commands below
Code:
make O=out -j4
Reference :
nathanchance thread
Android Google Source

Hey man, does the wifi work after compiling the kernel?
I am trying to compile redmi 5a kernel from source.
Even though device boots with new kernel , the wifi doesn't work.
The guid at https://github.com/MiCode/Xiaomi_Kernel_OpenSource/wiki/How-to-compile-kernel-standalone
talks about non-dtbo and include-dtbo. What are those? Can you give me some idea.

Partha Dip said:
Hey man, does the wifi work after compiling the kernel?
I am trying to compile redmi 5a kernel from source.
Even though device boots with new kernel , the wifi doesn't work.
The guid at https://github.com/MiCode/Xiaomi_Kernel_OpenSource/wiki/How-to-compile-kernel-standalone
talks about non-dtbo and include-dtbo. What are those? Can you give me some idea.
Click to expand...
Click to collapse
you have to add prima wlan drivers to get wifi working correctly

Bro plz help me .tell me the source and toolchain you use plz bro reply plz I request
Bro plz tell me toolchain and source you use

Mind sending me the guide that you use to root your Redmi 5A? I'm not so interested into building my own kernel from source, as I don't really see any benefits of doing so unless I'm changing compilation flags which, at least right now, is not my intention.
I have experience with Linux, but I'm having a few questions that I cannot come up with the answer and some technical issues which I'm still trying to overcome, and I've seen several guides from several people each doing different stuff to achieve the same goal and I'm lost on which one to follow and why, as most of them are oversimplified and are merely a set of instructions without further explanation, and I would hate to brick my phone because of it (although it's a old phone so that's not that bad).
Also the github page you mentioned has an outdated version of the Linux kernel.
Also since the Redmi 5A runs armv8 (aarch64) you could run any Linux distribution you like, right? Obviously it has to have support out of the box in the iso for touch screen otherwise you can't do anything, but I should be fine installing a generic distribution that ships with aarch64 and touch input, right? Worst case scenario it doesn't ship with the drivers required for some components to works, as you mentioned with wi-fi, but that's a matter of installing it on the system.

Related

cyanogenmod development

I want to port cyanogenmod to archos
Are there any developers who know how to download the source of cnm and archos firmware
I'm a game developer and I have no experience with drivers but we can compare are achos devices with other cnm supported devices, the nexus s has the same processor, so we don't have to create a driver for that
Compare list (Update 24 June)
processor is the same as in the droid 2
touchscreen = ?
sound hardware =
screen hardware =
You should take a look at the [DEVELOPEMENT] Cyanogen thread on the Dev subforum - think they'll be pretty happy to see you over there!
fisha21 said:
You should take a look at the [DEVELOPEMENT] Cyanogen thread on the Dev subforum - think they'll be pretty happy to see you over there!
Click to expand...
Click to collapse
Yes, but I'm a newcomer and I can't post a replay there
coen22 said:
Yes, but I'm a newcomer and I can't post a replay there
Click to expand...
Click to collapse
im the thread starter at the post above
Just post 6 posts and you can post at dev section
Lennb said:
im the thread starter at the post above
Just post 6 posts and you can post at dev section
Click to expand...
Click to collapse
Thx, but what do think of my idea
coen22 said:
Thx, but what do think from my idea
Click to expand...
Click to collapse
Im happy, if anyone want to help, but
we need a guy who really have android developement knowledge
Anyone?
I still can't reply to the main thread of cyanogenmod [DEV]
The first thing we have to do is a hardware research
the archos gen8 devices have a
First
Processor: Arm cortex-A8 <-- same as galaxy s, and nexus s
Screen: <--- ?
Then
Touchscreen: <--- ?
Later
Camera: <--- ?
Camera A43: <--- ?
WiFi: <--- ?
Sound: <--- ?
Software buttons
I think we should first make the processor and the screen working, then we are able to debug the device using adb
And we are able to view debug codes on archos
Because all drivers are included in the kernel, what would be the outcome of running say AOSP gingerbread on top of the current kernel?
Archos didn't make much changes to the kernel and the system compared to other manufactures like HTC and it's Sense ROM.
Sorry for this rant, but I cant help myself.
Guys, stop the nonsense regarding not being an android dev and thusnot being able to get anything done. Are you not capable of learning? Please dont reply with negative until you ve tried.
I'm a linuxadmin. It took me 2 hours to get a CM build just by following the instructions. How much longer would it take to rip the drivers ad add them to the image? My guess is that if you start with CM 6 (froyo?) you ll be done in a few days.
So please stop begging for an android dev and all the idle talk of how you think you might get things to work. Just get started with the cyanogenmod build guide already!
Again sorry for the rant
wvl0 said:
Sorry for this rant, but I cant help myself.
Guys, stop the nonsense regarding not being an android dev and thusnot being able to get anything done. Are you not capable of learning? Please dont reply with negative until you ve tried.
I'm a linuxadmin. It took me 2 hours to get a CM build just by following the instructions. How much longer would it take to rip the drivers ad add them to the image? My guess is that if you start with CM 6 (froyo?) you ll be done in a few days.
So please stop begging for an android dev and all the idle talk of how you think you might get things to work. Just get started with the cyanogenmod build guide already!
Again sorry for the rant
Click to expand...
Click to collapse
Ho year sure, downloading sources for a supported device and building the entire thing is not rocket science and can be easily done by following the wiki.
But building one for an unsupported device is an other story.
It requires a good knowledge and a lot of spare time.
The knowledge can be learned online but it requires a lot more spare time too and many of us don't have that spare time, unfortunately.
do you?
I'm not here to lecture people on how they spend their time. I simply want to point out that waiting for a dev to come along to fix your woes isn't the right way to get a project started. Besides, all the time spent on forum posts will nicely accumulate into a plentiful amount of time that can be spent on learning.
If there is an dev interested in building a rom, they will. No need to create some kind of placeholder containing information you think someone might want.
The open source way is to scratch your own itch.
Just on the technical side of things. If you port the cyanogen froyo version, you should simply be able to use the same drivers archos uses. So there isn't going to be any development involved, just compiling stuff.
As to your last question, I surely don't have to reply.
wvl0 said:
I'm not here to lecture people on how they spend their time.
Click to expand...
Click to collapse
I see , what are you here for ?
I simply want to point out that waiting for a dev to come along to fix your woes isn't the right way to get a project started. Besides, all the time spent on forum posts will nicely accumulate into a plentiful amount of time that can be spent on learning.
If there is an dev interested in building a rom, they will. No need to create some kind of placeholder containing information you think someone might want.
The open source way is to scratch your own itch.
Just on the technical side of things. If you port the cyanogen froyo version, you should simply be able to use the same drivers archos uses. So there isn't going to be any development involved, just compiling stuff.
As to your last question, I surely don't have to reply.
Click to expand...
Click to collapse
Well that was one of the useless posts found on this thread. Thank you for adding yours to the list
Hey guys, please join us at the Developer Thread.]
Its better to have only one thread
sibere said:
I see , what are you here for ?
Well that was one of the useless posts found on this thread. Thank you for adding yours to the list
Click to expand...
Click to collapse
Touché. I guess I'll just add what I learned then.
How to get your buildsystem up and running on Ubuntu Oneiric 64bit.
Before following this guide: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
Do this first, just to avoid having to install individual packages later on:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Code:
apt-get install bison build-essential curl flex g++-4.3-multilib gcc-4.3-multilib git-core g++-multilib gnupg gperf lib32ncurses5-dev lib32readline5-dev lib32z1-dev libc6-dev-i386 libesd0-dev libncurses5-dev libsdl1.2-dev libsdl-dev libwxgtk2.6-dev ncurses-dev pngcrush schedtool squashfs-tools sun-java6-jdk zip zlib1g-dev
I think I ran into compile issues with gcc-4.6, so I switched over to 4.4
Code:
rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
Then following this guide to get ADB running with your tablet:
http://forum.xda-developers.com/archive/index.php/t-892847.html
Now you can follow the Sholes build guide.
You might run into compile issues. This bug report includes a fix:
http://code.google.com/p/cyanogenmod/issues/detail?id=2455
and in case you run into this one:
frameworks/base/core/java/android/widget/ListView.java:3631: warning 13: Method android.widget.ListView.getCheckItemIds: (at)Deprecated annotation and (at)deprecated doc tag do not match
Checking API: checkapi-last
(unknown): error 17: Field org.apache.http.protocol.HTTP.EXPECT_CONTINUE has changed value from "100-Continue" to "100-continue"​
Solve it by:
The error here is that someone needs to change the "100-continue" line on line 63 of file external/apache-http/src/org/apache/http/protocol/HTTP.java to "100-Continue"​
And there's this one too:
Code:
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host C++: libutils <= frameworks/base/libs/utils/RefBase.cpp
frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1
make: *** Waiting for unfinished jobs....
Which can be fixed by edditing frameworks/base/libs/utils/Android.mk
Change the line:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
To:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
This should give you a few files that possibly can be flashed to our tablets:
Code:
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
Happy Hacking.
[edit]
Here's the result, just in case anyone is brave enough to flash it.
http://www.megaupload.com/?d=7PCNF69Z
[/edit]
[edit 2]
I guess the next step would be editing the img files to order to add the necessary drivers.
You need YAFFS2 support to mount these files. YAFFS2 isn't included in this version of ubuntu however.
So get yaffs2:
Code:
git clone ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
..and get a nice old kernel, considering the current version in git doesn't support 2.6.39 cleanly.
Code:
wget http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.13.tar.bz2
untar your kernel sources.
then follow the instructions included with YAFFS:
Code:
cd yaffs-dir
./patch-ker.sh c m linux-tree
complains that linux-tree/fs/yaffs2 already exists
rm -rf linuux-tree/fs/yaffs2
./patch-ker.sh c m linux-tree
Copy your /boot/config-XXX to the directory you unpacked your kernel tarball.
run a:
Code:
make oldconfig
Now add YAFFS to your config using
Code:
make menuconfig
(Filesystems->Miscellaneous filesystems->yaffs)
..compile and reboot ubuntu into your own kernel containing yaffs2 support
mount your img files with
Code:
mount -o loop -t yaffs2 filename mountpoint
[/edit 2]
[edit 3]
So apparently building cyanogenmod doesn't mean you're building a full rom, you have to do the kernel seperately (as far as I can tell ATM):
http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source
there was no /proc/config.gz, so i ripped the urkdroid kernel .config file instead
also getting an arm toolchain working seemed tedious, so I followed the advice in on the wiki and got one from:
http://www.codesourcery.com/sgpp/lite/arm/portal/subscription3053
Had to tell the compile process where to find the arm compiler. Think I'm actually using one I downloaded from Ubuntu's repository instead of the one from the above link - oh well.
Code:
[email protected]:~/android/kernel/cm-kernel# make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j`grep 'processor' /proc/cpuinfo | wc -l`
[/edit 3]
wvl0 said:
Touché. I guess I'll just add what I learned then.
How to get your buildsystem up and running on Ubuntu Oneiric 64bit.
Before following this guide: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
Do this first, just to avoid having to install individual packages later on:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
Code:
apt-get install bison build-essential curl flex g++-4.3-multilib gcc-4.3-multilib git-core g++-multilib gnupg gperf lib32ncurses5-dev lib32readline5-dev lib32z1-dev libc6-dev-i386 libesd0-dev libncurses5-dev libsdl1.2-dev libsdl-dev libwxgtk2.6-dev ncurses-dev pngcrush schedtool squashfs-tools sun-java6-jdk zip zlib1g-dev
I think I ran into compile issues with gcc-4.6, so I switched over to 4.4
Code:
rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
Then following this guide to get ADB running with your tablet:
http://forum.xda-developers.com/archive/index.php/t-892847.html
Now you can follow the Sholes build guide.
You might run into compile issues. This bug report includes a fix:
http://code.google.com/p/cyanogenmod/issues/detail?id=2455
and in case you run into this one:
frameworks/base/core/java/android/widget/ListView.java:3631: warning 13: Method android.widget.ListView.getCheckItemIds: (at)Deprecated annotation and (at)deprecated doc tag do not match
Checking API: checkapi-last
(unknown): error 17: Field org.apache.http.protocol.HTTP.EXPECT_CONTINUE has changed value from "100-Continue" to "100-continue"​
Solve it by:
The error here is that someone needs to change the "100-continue" line on line 63 of file external/apache-http/src/org/apache/http/protocol/HTTP.java to "100-Continue"​
And there's this one too:
Code:
host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
host SharedLib: libneo_cs (out/host/linux-x86/obj/lib/libneo_cs.so)
host C++: libutils <= frameworks/base/libs/utils/RefBase.cpp
frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1
make: *** Waiting for unfinished jobs....
Which can be fixed by edditing frameworks/base/libs/utils/Android.mk
Change the line:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
To:
Code:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
This should give you a few files that possibly can be flashed to our tablets:
Code:
Install system fs image: out/target/product/generic/system.img
Target ram disk: out/target/product/generic/ramdisk.img
Target userdata fs image: out/target/product/generic/userdata.img
Happy Hacking.
[edit]
Here's the result, just in case anyone is brave enough to flash it.
http://www.megaupload.com/?d=7PCNF69Z
[/edit]
[edit 2]
I guess the next step would be editing the img files to order to add the necessary drivers.
You need YAFFS2 support to mount these files. YAFFS2 isn't included in this version of ubuntu however.
So get yaffs2:
Code:
git clone ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
..and get a nice old kernel, considering the current version in git doesn't support 2.6.39 cleanly.
Code:
wget http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v2.6.35/linux-2.6.35.13.tar.bz2
untar your kernel sources.
then follow the instructions included with YAFFS:
Code:
cd yaffs-dir
./patch-ker.sh c m linux-tree
complains that linux-tree/fs/yaffs2 already exists
rm -rf linuux-tree/fs/yaffs2
./patch-ker.sh c m linux-tree
Copy your /boot/config-XXX to the directory you unpacked your kernel tarball.
run a:
Code:
make oldconfig
Now add YAFFS to your config using
Code:
make menuconfig
(Filesystems->Miscellaneous filesystems->yaffs)
..compile and reboot ubuntu into your own kernel containing yaffs2 support
mount your img files with
Code:
mount -o loop -t yaffs2 filename mountpoint
[/edit 2]
[edit 3]
So apparently building cyanogenmod doesn't mean you're building a full rom, you have to do the kernel seperately (as far as I can tell ATM):
http://wiki.cyanogenmod.com/index.php?title=Building_Kernel_from_source
there was no /proc/config.gz, so i ripped the urkdroid kernel .config file instead
also getting an arm toolchain working seemed tedious, so I followed the advice in on the wiki and got one from:
http://www.codesourcery.com/sgpp/lite/arm/portal/subscription3053
Had to tell the compile process where to find the arm compiler. Think I'm actually using one I downloaded from Ubuntu's repository instead of the one from the above link - oh well.
Code:
[email protected]:~/android/kernel/cm-kernel# make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j`grep 'processor' /proc/cpuinfo | wc -l`
[/edit 3]
Click to expand...
Click to collapse
That looks very good
wvl0 said:
Touché. I guess I'll just add what I learned then.
How to get your buildsystem up and running on Ubuntu Oneiric 64bit.
Before following this guide: http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Sholes
Click to expand...
Click to collapse
This may be my misunderstanding but I thought this guide only teaches you how to compile your own cyanogen build for the Motorola Sholes. It even states that you need a sholes with a working copy of cyanogenmod installed. This guide will only work for devices which are already supported by the cyanogenmod team, and is not a guide to build for unsupported devices. At least, that was my understanding from spending most of a day crawling around the cyanogenmod wiki.
Part of the build process involves pulling proprietary system files from the device. I guess one starting point would be to work out which files these are, then obtain the files from the archos. However, this stuff takes time to learn and I have very little to spare, like most. But then, neither am I asking someone else to do it, or sitting waiting for it.
If it comes, it comes...
Building for a compatible CPU architecture should at least give you a semi bootable ROM, after that you have to get the drivers in.
Considering we have the source and are using the same kernel versions, we can just recompile the drivers for our kernel.
wvl0 said:
Building for a compatible CPU architecture should at least give you a semi bootable ROM, after that you have to get the drivers in.
Considering we have the source and are using the same kernel versions, we can just recompile the drivers for our kernel.
Click to expand...
Click to collapse
Thank, you guys!
Could you please joyn my Thread for CM Developement, so other guys could help?
One thread is better than two
Finally, guys with Knowledge work on a CM, how can i help?
You could help by completely taking over, 'cause I don't want a cyanogen rom per se, I just want to show people that you don't have to be a developer to compile a rom.
wvl0 said:
You could help by completely taking over, 'cause I don't want a cyanogen rom per se, I just want to show people that you don't have to be a developer to compile a rom.
Click to expand...
Click to collapse
Okey, i understand^^
Could you tell me a few steps to compile the CM ?, i think the drivers we'll do later

[GUIDE][TUT]Building a kernel from source[EASY WAY]

Hi guys!
I wrote this guide because after a few month of kernel development i found useful tools and tricks than helped me a lot and speeded up my work and i want to share with you this knowledge.
Setup computer and download sources​
Code:
Minumum reqirement:
* C knowledge
* Ubuntu 12.04 or higher, 32 bit or 64 bit (13.10 if you want use Kdevelop + linux kernel plugin)
* Internet connection, possibly fast and unlimited
* the boot.img of the ROM you want to support with your kernel (AOSP, SENSE etc etc...)
* [URL="http://forum.xda-developers.com/showthread.php?t=2519416"]zImage switcher[/URL]
NOTE:
Some toolchains dont work on 32 bit. Using 64 bit is recommended.
Install required package:
Linux 12.04;
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
linux 13.10(and above):
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 qt4-dev-tools wget libncurses5 git-core nautilus-open-terminal
and restart your PC.
Download Source:
Go to /home/, create a new folder called "kernel", and enter in that folder.
right click somewhere in "kernel" folder and select "open terminal here" (CooL AH?)
and run
Code:
git clone https://github.com/pawitp/android_kernel_samsung_i9082.git -b cm-11.0
Download the toolchain
There are a lot of toolchain, stock, linaro optimized, based on gcc 4.7, based on gcc 4.8 the choice is yours! in this tutorial we use google gcc 4.8 toolchain.
NOTE:
this toolchain below will not work with 32 bit. Use the arm-eabi-4.4.3, from the ndk toolchains, and if you need any help on its path, or anything, reply in this thread.
Go to /home/, create a new folder called "toolchains", and enter in that folder.
right click -> open terminal here
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
Build the kernel​
Build the kernel:
in this part we will work in "/home//kernel/android_kernel_samsung_i9082" folder, i'll call it
go to "/arch/arm/configs" and copy "cyanogenmod_i9082_defconfig" to
rename cyanogenmod_i9082_defconfig to ".config"
open a terminal window in
type:
Code:
make ARCH=arm CROSS_COMPILE=/home/toolchains/arm-eabi-4.8/bin/arm-eabi- > compileLog
and the compilation will start.
Some explanation:
"ARCH=arm" tells to compiler what arch the kernel is made for
"CROSS_COMPILE=xxxxxx" tells to "make" the compiler to use
"> compileLog" saves all the messages in a file called compileLog, it's easier to read than terminal window
Click to expand...
Click to collapse
Pack the kernel to boot.img:
Unpack zImage switcher somewhere, i'll call that folder .(for 32 bit, download both 64 bit and 32 bit and copy the files "mkbootfs" "mkbootimg" from tools folder of 32 bit one and replace these files with the files in tools folder of 64 bit one)
copy the stock boot.img and your zImage in the folder , you can find it in /arch/arm/boot.
run the script
Code:
./repack.sh
now in there's a new file called newBoot.img, that's your kernel!
to find the modules (*.ko files) open a teminal windows to and type
Code:
find ./ -name "*.ko" -exec cp {} <absolute/path/destination/folder> \;
now you have the boot.img and the modules, download a custom kernel and use the flashable zip to make your flashable zip, just replace the modules and the boot.img!
Add features​Add features to kernel:
"Woah! i'd like to add smartass v2 governor and sio i/o scheduler to my kernel"
First you need to find a git repository that contains smartass v2 governor and sio i/o scheduler, then the commit that added the governor and sio i/o scheduler.
for example https://github.com/akiratoriyama/an...mmit/6a43329a08ec0282e951049ae15a497b121aa8ef
Open a terminal window in
type:
Code:
git remote add akiratoriyama https://github.com/akiratoriyama/android_kernel_samsung_i9082.git -b experimental
git fetch akiratoriyama
git cherry-pick 6a43329a08ec0282e951049ae15a497b121aa8ef
NOTE:
I have used akiratoriyama's github as reference. If you want to add any other features,like f2fs or frandom module, you can ask the dev to help you or you can simply cherry-pick the code. Remember to thank everyone you borrowed the code from and mention them in your thread, whenever you release your kernel.
in termial window type:
Code:
make ARCH=arm xconfig
will open a new window where you can configure your kernel's features
press ctrl+f (find) and serach for "smartass2" and "sio" and tick the checkbox. save clicking the floppy disk in upper left corner.
the modified configuration file will be saved in ".config"
now we can build the kernel again, but first type
Code:
make ARCH=arm clean CROSS_COMPILE=/home/toolchains/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi-
this will remove all the compiled files of previous build.
View git commits history​you can easly view all the commits in your repo:
open a terminal window in and type
Code:
gitk
will open a GUI where you can see all the commits, what files were modified for each commit, the author of the commit.
you can also revert commits.
There are other GUI for git, i also like "gitg"
Hacking the kernel
suggested by @pirlano​for easy work on kernel sources, add features & co. you can use kdevelop + linux kernel plugin, here is a guide
http://www.gnurou.org/code/kdevelop-kernel
and a video guide:
http://video.linux.com/videos/kernel-browsing-and-hacking-using-kdevelop
NOTE: for linux kernel plugin ubuntu 13.10 is required
CREDITS:
@rmbq, this is his guide. I just modified and compiled it especially for our device. Thanks,rmbq.
this guide only applies to kk based kernels. if you want to build a stock kernel,just download sources of 4.2 and start building!!!
If you have any doubts or questions,dont hesitate to reply in this thread.
Thanks for using my github as reference but I'd like to recommend my last 2 commits for adding smartassH3 to be included in this guide as they were clean and more proper IMO. This+k2wl's guide will help newbies to compile a kernel.
akiratoriyama said:
Thanks for using my github as reference but I'd like to recommend my last 2 commits for adding smartassH3 to be included in this guide as they were clean and more proper IMO. This+k2wl's guide will help newbies to compile a kernel.
Click to expand...
Click to collapse
But I just used those commits as reference. If users think that these commits are not proper, they can revert them and use your smartassh3 commit.
Sent from my GT-I9082 using Tapatalk Pro.

[GUIDE] Building independent system apps from Lollipop source for OnePlusOne

#This is a simple guide to download, modify and build system apps on CM12.0 based Blisspop fork for bacon device (OnePlusOne)
#Last edited: 2015-01-23
Was trying to modify some system app functionalities and it turns out the methods of decompiling - modify smali - recompiling did not work well. So had to try building from source. After three days of trials and errors, I succeeded in building the desired system apps without having to compile the entire rom. There is a similar guide on XDA-University, and also the same guide I went to for answers first. But that is largely out-dated, so I'm not going to cover it here. Most of the readings I did was on XDA and CM Wiki, so I thought I'd post my findings here as a way of appreciation, and hopefully will reduce the amount of research for folks with similar needs.
For people who want to build entire Lollipop rom from source, GRMrGecko wrote an excellent guide here:
http://forum.xda-developers.com/oneplus-one/general/guide-building-lollipop-oneplus-one-t2947949
And to make things easier, I'm going to use bits from GRMrGeCko's guide so readers of this thread won't need to jump to other links to figure out exactly how.
So, how do you build system apps without having to build the entire rom?
1. Establishing android develop environment. Install 64bit version of Unbutu, I used the iso with 'AMD64" in it, and the version is 14.04. Make sure you allocate more than 60G for source code and building - those tend to take significant storage. In my case, I was using an Asus 1215T laptop, with an ancient single core AMD CPU, and 2G memory, plus 500G hard disk.
Once installed, ctrl+alt+T to open the terminal and Install the following items via apt-get:
sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
As per the instructions on the wiki for building CM, if you use a 32bit system, do not install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev.
#Install the latest version of Java's development kit using the following:
sudo apt-get install openjdk-7-jdk
#Install the Android Development Kit using the following.
sudo apt-get install android androidsdk-uiautomatorviewer android-copyright android-src-vendor android-emulator android-tools-adb android-headers android-tools-adbd androidsdk-ddms android-tools-fastboot androidsdk-hierarchyviewer android-tools-fsutils androidsdk-traceview
#Then, install repo:
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
reboot your system or use the following in terminal to load the .profile file again:
. ~/.profile
2. make a folder (any name would do) to store the code. Go into the folder (i.e. cd /home/uersername/BlissPop) and get the source codeyou'll only get the latest main branch this way - I suppose. All commands in terminal console have assumed that the source code root folder is current folder)
repo init -u https://github.com/TeamBliss-LP/android.git -b lp5.0
repo sync
#Note: this will download the specified branch lp5.0 (lollipop 5.0 of Blisspop) onto your local drive. The source as of Jan. 23, 2015 is 10+GB, so be patient and try different vpn connections to get the most desirable speed. It took me overnight to download the source code.
3. Build
#Note: This is the tricky part. The existing documentation of Blisspop or other similar open source project does not explicitly explain whether you need to sync full project tree to be able to just compile specific modules (i.e. Source Folder/packages/apps/Email). After experimentation, the answer is a most definite yes. The reason is that system apps usually have many framework-level dependencies, which means downloading the entire source code is the safest way to ensure a successful build. However, you don't need to build the entire rom, or firmware, which takes hours on a single core Asus 1215T.
#To compile specific system apps. After repo sync
a) initiate build environment
. build/envsetup.sh
breakfast bacon
#Note, if you encounter device tree related errors in build steps below, try repeating the above two steps, and run repo sync after breakfast bacon. This, according to CM documentation, will download the specific device tree into the local repository.
b) build the specific app and all its dependencies
#go into the app folder (i.e. cd /home/username/Blisspop/packages/apps/Email)
mma
# Wait until the compilation is over, this on a single core AMD Asus 1215T takes about 2-3 minutes.
#The compiled and signed app should be in out/product/bacon/Email folder. Ready to be copied and flashed using root explorer in your OnePlus's system/app folder.
#When rebuild an app after mma has been executed at least once, no need to build all dependencies, hence:
#go into the app folder (i.e. cd /home/username/Blisspop/packages/apps/Email)
mm
FC's
I did everything as per ur guide and build settings.apk for tomato(YU Yureka) but i am getting FC
Rohan459 said:
I did everything as per ur guide and build settings.apk for tomato(YU Yureka) but i am getting FC
Click to expand...
Click to collapse
That's because there're many dependencies... this settings.apk most likely won't work on other roms than blisspop...
Gesendet von meinem A0001 mit Tapatalk
Aavion said:
That's because there're many dependencies... this settings.apk most likely won't work on other roms than blisspop...
Gesendet von meinem A0001 mit Tapatalk
Click to expand...
Click to collapse
I downloaded CM sources and flashed it on CM ROM then to didnt worked

[ROM][COMPILING][HELP]LMX210ULMA K8+ custom rom and kernel Q&A

I am in no way resposible for any negative effects to your device by trying any of this for yourself. Including bricking your device, divorce, nuclear meltdown, zombie apocalypse or any other malfeasance. Try at your own risk.
Hi guys
Im still a jr member here and learning but ive rooted a few phones and ported a twrp and now I want to build a custom kernel and ROM for my new phone the K8+ 2018 LMX210ULMA. I plan to do this all from the phone im building the ROM for using termux and Anlinux to install Ubuntu and all the proper build essentials. So lets get started!!!
First i have some questions and then ill note where i am in my project. Ive actually been working on this for a while using this and that thread but i have some questions i have never been able to find answers to. Like.......
1. Does the kernel source code need to be unpacked in the same folder as the device source code?
2. How can i build seperate modules like bootloader or recovery or anything else.
3. Is there a way for some one who has a locked network carrier device to build a kernel that is unlocked.
4. How do you find device, vendor and kernel trees for a device that hasnt been publicly built yet?
5. When installing dependency libraries to ubuntu what do i do when Ubuntu is unable to locate a package. For examle: lib32ncurses5-dev lib32z-dev and lib32esd1.0-dev
Ok now lets get to setting up the envrinonment or at least what i have so far.
A rooted phone is needed to get the job done as far as far as i know so you might want to work on that first. My particular phone variant doesnt seem to have a recovery option just yet due to some bit of hiding of hiding the fastboot mode but im hoping by compiling a custom ROM and Kernel i can alleviate that and help myself and all the other good folks that want to fully root thier phone and also learn to make thier own custom ROM.
So far im rooted using a temp root that utilizes an exploit called mtk-su. It gives basic root privilages and allowed me to make a couple changes to my build prop like adoptable storage and allow some changes here and there with out upsetting the system partition to much.
You will need adoptable storage storage for this to work as repo will need to unload ton of source code to your device so 32+ gigs of internal storage will be needed.
Im not going to go into the specifics of the two forementiined needs but a quick search should point you in the right direction and get you going.
1. Install termux and installed the basic packages in the welcome plus:
Code:
pkg install libandroid-support libandroid-support-static libandroid-shmem libandroid-shmem-static libusb libusb-static libccid
2. Install Anlinux and follow the instructions to build Ubuntu within the termux environment. Make sure to do it as root which is essential for this to work correctly.
3. Install a vnc viewer. I dont really use it. It would be nice to have a way to use a web browser with in it but so far no go.
4. Once you have Ubuntu built and started its time to install more dependecies. Yay!
Code:
apt-get install sudo
Code:
sudo apt-get install software-properties-common
Code:
sudo apt-get install bison build-essential curl ccache flex libncurses5-dev libsdl1.2-dev libxml2 libxml2-utils lzop pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev git-core make android-sdk gperf openjdk-8-jdk -y
So far i have been able to install all but 3 of the dependecies needed. Lib32ncurses5-dev lib32z1-dev and lib32esd0-dev any one knowing a work around or way to locate and install them please for the love of android speak up.
5. Now lets do some more setting up the build environment with repo. I have tp say repo is a pretty cool tool here but it has its problems. First the repo init command is sketchy and doesnt always work. I had a hard time with it at first. Second even though you tell it which manifest exactly you want to download it will download others as well and draw source code from every other build. This is a problem as it downloads every pre-built toolchain in the repisitory and almost every android repository in existance. They talk about the source code from repo taking up so much space well that is exactly why. Ive been compiling in C++ for years and i have never seen such a mess. But so be it. Maybe the android gods will straighten it out someday and make it easier and consume less space by only downloading the appropriate source code needed by your specific build.
This is the end of this post so i have to finish up on the next BRB
Ok im back. Hows going androids? I am not a robot! But a few of my friends might disagree with statement.
I left off and we were about to finish up the build environment and get repo started so lets do that and i will tell you about the first big snag in the project next to not being able to find those three dependency libraries stated above.
Here we go first we create a new bin folder just for compiling android in the HOME folder of your ubuntu operating system then we set its path, download the repo launcher and set up our scripts.
By the way i probably should have mentioned this earlier but i assume every body at this point has some command line experience and should know that you copy these comnands and paste them one at a time. Please do not copy a whole code block at one time and paste it to your terminal or your gonna have a bad time like when you pizza when you are supposed to french fry.
Code:
mkdir ~/bin
PATH=~/bin:$PATH
cd ~/bin
curl
i can't help you much but i hope you won't brick your device. it would be easier for Mediatek there you can always restore from SP Flash Tool. for Qualcomm your only chance is to put it into EDL mode/ Qualcomm HS-USB QDLoader 9008 Driver with test point and flash with QPST/ LGUP. I recommend to figure out how to unbrick before you start flashing lk
also maybe helpful this link for understanding boot chain
http://www.lieberbiber.de/2015/07/05/mediatek-details-little-kernel
Any body know why i when i try to finish my lil tutorial here i cant do any more code blocks?
it's a bug in forum. i can't even post ls -l
i don't know much about compiling but i would scan lk.bin for strings containing oem fastboot commands (if they still left somewhere), and then scan the whole source code for respective strings in order to find the required build tree
Um well the problem is that im not familiar with the source code components and there are soooooooo
many components and lil info and no common place so far but here to ask questions and where do i start my questions.
Like what is the bootloader source code called. I guess i could load it up in android studio and do a search of all strings that way.
Right now im trying to grasp why all of a sudden 3 lmx210 variants known to be easily bl unlockable are now not. Lg is pkaying dumb or thier drones arent equipped with the proper knowledge
idk download from opensource.lge.com and search for fastboot
Code:
grep -ir fastboot .
kernel-3.18/arch/arm/boot/compressed/sdhi-shmobile.c
kernel-3.18/arch/parisc/kernel/process.c
kernel-3.18/drivers/gpu/drm/i915/i915_params.c
kernel-3.18/drivers/gpu/drm/i915/intel_display.c
kernel-3.18/drivers/gpu/drm/i915/intel_fbdev.c
kernel-3.18/drivers/mfd/si476x-cmd.c
kernel-3.18/drivers/misc/mediatek/usb2jtag/Kconfig
kernel-3.18/drivers/net/ethernet/broadcom/tg3.c
kernel-3.18/include/linux/mfd/si476x-platform.h
btw why don't you cross-compile on linux machine, this would be probably easier as it seems it is well documented.
if one can help you re-enable fastboot in lk then its member @xyz`
Ok i want to do an experimental kernel build for my Alcatel tetra to try some things i hope to implement into my lmx210 build.
Can someone help me figure out to add a few of these options...'
Overclocked cpu or adjustable clock speed
Devtmpfs so i can fastboot other phones
power enabled otg
Loop device
Also which android kernel source should i download. Upstream or experimental or what. I just know i need a 4.4 + kernel
Alexcs.... Its an experimental issue with compiling on phone to see if there is a way to configure the system to allow for every thing needed to be able to do so. I cant always get to my pc and dont always have the option to dual boot or ubuntu. Some folks may not have access at all or only enough time to flash thier phone.
In this case the person compiling could build thier rom on thier device then take it and flash it when they can get to a pc
Ok i need some help here. pleeeeeeeaaaassee
i have been trying to compile a kernel for the Aristo 2 LMX210MA for three days and im about to lose it. My steps this far....
install ubuntu 18 on aristo 2
mkdir -p ~/kernel
cd ~/kernel
copied kernel source from storage and tar xvzf'd it
read the read me file for instruction and to get the name of the prebuilt tool chain. downloaded the toolchain and copied it to the /kernel/msm-3.18/android folder in ubuntu fs and tar xvzf`d it there as per read me file. made a few tweaks to the defconfig file. i wanted to build a devtmpfs and have full fs control over otg devices.
now i run these commands from msm-3.18 folder.........
mkdir -p out
make ARCH=arm O=./out cv1_lao_com-perf_defconfig
every thing goes fine til i run the next command and then it says no such file or directory for the androideabi-gcc file that is clearly in the tool chain and in the right place. and yes i set my path right i yell at the compiler on my phone.
make ARCH=arm O=./out CROSS_COMPILE=$(pwd)/root/kernel/kernel/msm-3.18/android/arm-linux-androideabi-4.9/bin/arm-linux-androideabi- KERNEL_COMPRESSION_SUFFIX=gz -j4
hello is there any one there. Any one at all
Ok i have been trying to compile a rom for months and i cant seem to get any where. I get errors about a freaking gcc wrapper and i have followed the advice i have seen on comoiling rom threads but i still get the errors. Its either that or the toolchains are crap.
Also have a question about compiling lg source code. When all is said and over with will it finish up as a kdz file? Im thinking it has too since thats the only way to flash thier firmware because they are locking up possibilities to unlock the bootloader.
I managed to compile my first kernel tonight. i know the zimage is the one i pack into my spkit image folder but dont know which of the split images to repkace
Ok i think it would be the only one in split image that matches the file type of zimage. I repacked it and flashed it via fast boot but both the repacked and magisk-patched.img return to fastboot upon booting
I wonder what could have gone wrong. The only things i changed were the config_mausb otg hotplug abd devtmpfs
Something i learned from reading the .config file in the out directory after doing the defconfig is that unless you compile your kernel on a pc first and remove a config there is no way to build android or a kernel on your device. Which explains months of aggravation and wonder. Yea they prohibit it but you can change the value and then do as you please

How to build LineageOS 17.1 for the Lenovo Tab4 10 Plus

Introduction
After being a user of LineageOS for some years, I wanted to do the next step and also be able to create my own build of LOS. After some futile attempts I finally succeeded in building LOS 17.1 for the Lenovo Tab 4 10 Plus. Meanwhile even the fingerprint sensor is working, so that I think it's time to upload my builds somewhere and share them with others. In the meantime I thought it might be interesting for some out there to get a step by step instruction on how to build LOS for the Tab 4 10 Plus.
Part 1: Setting up Ubuntu 20.04 as build system
I'm a Windows user myself. Since building LOS (AFAIK) is requiring a Linux system for building (I tried with Windows Subsystem for Linux once but failed), I went for installing Ubuntu 20.04 inside a VM. VMWare Player is IMO a good choice because it's free and it allows routing USB devices to the guest system, so that it's even possible to use adb commands from within the Linux guest system and access an Android device attached via USB to the host. For this build of LOS this is not necessary, but it can be nice. But probably any VM software or, of course, a native Ubuntu 20.04 will do.
I used the following settings for the Ubuntu VM:
- 16 GB RAM
- 250 GB HDD (8 GB I used as swap space, the rest I gave to the mount point "/")
- USB compatibility I set to 3.1 and set the checkboxes for showing all USB devices and for sharing them with the VM
The above USB settings don't matter for the build. But with less RAM (inkl. swap) or less HDD space I had problems during my first attempts, even though I suspect that a bit less or RAM and HDD space might be possible. But with these settings you should be on the safe side. I opted for the full Ubuntu installation, because I did not want any tools missing that might be needed for the build. Perhaps the minimal installation would also do.
Part 2: Building LOS
There is an official documentation on how to build LOS (in this case for the device "bacon") which can be found here: https://wiki.lineageos.org/devices/bacon/build
During my first attempts of building LOS some of the commands, e.g. "repo sync" would initially fail. As far as I understood this is due to the "python" command missing in Ubuntu 20.04 after the initial setup. "python3" is available. So the first thing I did is adding a symlink "python" that points to python3:
sudo ln -s /usr/bin/python3 /usr/bin/python
After this we can follow the official LOS build documentation for some steps. So first download the Android platform tools from Google and then move to the directory where you downloaded the zip file to, e.g. via
cd Downloads
Next unzip the file (mind that the version no. inside the zip might need to get adjusted):
unzip platform-tools_r31.0.2-linux.zip -d ~
Like the build docs say we now need to add some lines to the file ~/.profile. So type
nano ~/.profile
This will start the nano editor. There right-click and paste the following lines and the end of the file:
# add Android SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
PATH="$HOME/platform-tools:$PATH"
fi
Then press Ctrl O, Enter and Ctrl X to save and exit and then make sure that the changes get used:
source ~/.profile
Next the documentation says that a couple of software packages need to get installed. As of writing this guide, this can be done via
sudo apt-get install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev
Afterwards some folders need to get created:
mkdir -p ~/bin
mkdir -p ~/android/lineage
Next the repo command needs to get downloaded and made executable:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
After this we again need to source the .profile file:
source ~/.profile
The ~/bin directory is already added to the path in the .profile of Ubuntu 20.04, so that there is no need to add it.
Next we need to setup the user email and name for the git commands. So replace the email address and name in the following commands:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
Now we can change to the LineageOS directory we created above and check out the code:
cd ~/android/lineage
repo init -u https://github.com/LineageOS/android.git -b lineage-17.1
repo sync
Next I set up the build environment via
source build/envsetup.sh
At this point we need to deviate from the official build documentation and create a file .repo/local_manifests/TBX704.xml with the specific configuration for the Tab 4 10 Plus:
mkdir .repo/local_manifests
nano .repo/local_manifests/TBX704.xml
Then paste the following XML code into this file, then use Ctrl O, Enter and Ctrl X to save and exit:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_device_lenovo_TB8703" path="device/lenovo/TB8703" remote="github" />
<project name="LineageOS/android_device_lenovo_TB8704" path="device/lenovo/TB8704" remote="github" />
<project name="LineageOS/android_device_lenovo_TBX704" path="device/lenovo/TBX704" remote="github" />
<project name="LineageOS/android_device_lenovo_tb-common" path="device/lenovo/tb-common" remote="github" />
<project name="lenovo-devs/android_kernel_lenovo_msm8953" path="kernel/lenovo/msm8953" remote="github" />
<!-- Vendor -->
<project name="lenovo-devs/proprietary_vendor_lenovo" path="vendor/lenovo" remote="github" revision="lineage-17.1-gxfp" />
</manifest>
Afterwards I again executed
source build/envsetup.sh
Not sure if the last one is needed, but it won't hurt. In the same way I'm not sure whether the following repo sync -c is necessary or whether we might have skipped the repo sync above and only use the following command, but I did
repo sync -c
Now we are ready to prepare the build for the Lenovo Tab 4 10 Plus and then start the build.
lunch lineage_TBX704-userdebug
mka bacon
This will take some hours. You might have noticed that I skipped setting up ccache, which is done in the official documentation. This is not a necessary but an optional step. For the first build this won't matter. For subsequent builds activating ccache might speed up the build. But it also uses up some space on the hard drive (the recommendation in the build docs is 50GB, or 20GB when activating compression). Once the build was finished successfully, you should find the zip file with the LOS image in out/target/product/TBX704/.
Thanks for sharing @Ecthelion4
A quick couple of questions.
1. Can you share details of the machine (RAM, HDD/SSD, OS, OEM) on which you build this !
2. Any details on if this would work with 8Gigs of RAM?
3. Any ideas on if this can work on MacBook Air M1 with 16Gigs of RAM + 256 Gigs of SSD?
Thanks
VGisHere said:
Thanks for sharing @Ecthelion4
A quick couple of questions.
1. Can you share details of the machine (RAM, HDD/SSD, OS, OEM) on which you build this !
2. Any details on if this would work with 8Gigs of RAM?
3. Any ideas on if this can work on MacBook Air M1 with 16Gigs of RAM + 256 Gigs of SSD?
Thanks
Click to expand...
Click to collapse
Re 1: I'm working on a Windows 10 machine with an AMD Ryzen CPU. But the exact machine specs aren't that important, as long as you fulfill the minimum specs I listed in Part 1 above. More CPU cores of course help for getting the build done more quickly.
Re 2: If you can't affort to add more than 8 GB of physical RAM, then I would assume that the build will still work, as long as you assign 16 GB or more of swap space.
Re 3: The limiting factor in this setup could be the harddisk space. Would it be possible to add an external harddisk and then build on that device? An additional question will be whether to use a VM or not. I don't know whether there is VMWare or another VM solution that would allow you to create an Ubuntu 20.04 image on one of the latest M1 BacBooks. If that is the case, then you could try using my above build instructions on such a VM. I am not sure, though, whether everything will work the same way on the ARM-based M1 CPU, but it should do. For a native MacOS M1 build I cannot help. A search on the internet might reveal better instructions for this than mine.
How's the OS working on your tablet? I have a TB-X704F and am pretty fed up with the lack of official updates.
bryangb said:
How's the OS working on your tablet? I have a TB-X704F and am pretty fed up with the lack of official updates.
Click to expand...
Click to collapse
It's working fine, just like the LOS 17.1 version from codeworkx. There is a separate thread for the 17.1 version for the Tab 4 10 Plus where I posted the latest builds.
Hey, thanks for this!
Funny I find this thread when looking for a guide on "how to build android" and it points to exactly my device!
I am interested in building LOS for lenovo TB8704 myself and I have a pretty good understanding of how it works based on your tutorial.
One thing I don't fully understand is. You pull the sources from LineageOS/android_device_lenovo_tb-common but lenovo-devs/android_device_lenovo_tb-common is used in the other TB8704 thread ( [ROM][UNOFFICIAL][10.0][tb8704f/x/v] LineageOS 17.1 for Lenovo TAB 4 8 plus) which is a fork of the first repo. Is there any reason for that? Especially because there is not difference for the branch 17.1. Same for lenovo-devs/android_device_lenovo_TB8704.
Besides that. When you build a new rom, with the latest security fixes, how do you do that? I assume you merge an other repo first? Do you have any idea how that works?
That would be great. I want to get my understanding straight before I jump into hours of compiling.
Thanks again, really appreciate your time writing this guide.
Greeting
sxe said:
Hey, thanks for this!
Funny I find this thread when looking for a guide on "how to build android" and it points to exactly my device!
I am interested in building LOS for lenovo TB8704 myself and I have a pretty good understanding of how it works based on your tutorial.
One thing I don't fully understand is. You pull the sources from LineageOS/android_device_lenovo_tb-common but lenovo-devs/android_device_lenovo_tb-common is used in the other TB8704 thread ( [ROM][UNOFFICIAL][10.0][tb8704f/x/v] LineageOS 17.1 for Lenovo TAB 4 8 plus) which is a fork of the first repo. Is there any reason for that? Especially because there is not difference for the branch 17.1. Same for lenovo-devs/android_device_lenovo_TB8704.
Besides that. When you build a new rom, with the latest security fixes, how do you do that? I assume you merge an other repo first? Do you have any idea how that works?
That would be great. I want to get my understanding straight before I jump into hours of compiling.
Thanks again, really appreciate your time writing this guide.
Greeting
Click to expand...
Click to collapse
Regarding the fork of the Lenovo common device code I can't tell you why this was done. I only took the existing repos I found in the first posting, got some help from codeworkx with some details about building the code and then setup a build. Maybe codeworkx can answer this question, but I cannot. If there are no changes in the forked repo, then it might be possible to simply use the original repo. Perhaps you can try it out?
When starting a new build I usually do cd ~/android/lineage in my existing VMWare image, then source build/envsetup.sh, then repo sync -c (perhaps adding switches for forcing the sync, if the simple sync should fail), then lunch lineage_TBX704-userdebug, followed by mka bacon.
Ah that was fast. Thanks
Yeah I might do that. Problem is, I am not in any position to judge the outcome. So I wouldn't know what differences to looks for, especially cause I installed the rom for the first time yesterday. I am running Linux anyway tho, so I don't use a VM and building shoudl be much faster.
CHeers
Hey mate, I am running my own rom now, so it was successful.
Now teh fun begis figuring out if there is other stuff to tweak. A different kernel maybe or who knows what.
Thanks again!
Hi, I am trying to use this guide to build with lineage 19.0 source, let me know if this guide works just by replacing 17.1 with 19.0. TIA
I never tried, but I would expect it's not so easy as to just exchange the version.
2 years ago I made a docker-compose for the lenovo. I have *not* been using it ever since however the good news is that in those days I was able to run it from Docker-desktop (so on windows). Have a look if you are interested its using the 18.1 version of lineage. as my docker-desktop is now 'broken' I cannot see if it works It still works after today's changes even on WSL, my 32 GB laptop is struggling though. https://github.com/rutgerellen/lenovo_tab4plus_build_docker <-- look at this

Categories

Resources