Город МОСКОВСКИЙ
00:07:27

Compile Android kernel(32bit) in Android(arm64 device)[Userland App] [Read Description]

Аватар
Совершенствование жизни
Просмотры:
31
Дата загрузки:
02.05.2024 10:48
Длительность:
00:07:27
Категория:
Обучение

Описание

*** Info : this tutorial is for arm64 devices.
if your device and your kernel source is same,(device,kernel=32bit/64bit) then you just need to install gcc and g++ ***

in this video,device is arm64(64bit) and kernel source that i want to compile is 32bit so i need arm compiler(arm-linux-gnueabi) to compile kernel.

My Device - Redmi note 4(arm64)(64bit)
Kernel Source - Moto G 2014(arm)(32bit)

***** Note :: some older kernel requires older version of gcc so this kernel was accepting gcc version 5.
You can install latest version by

apt install gcc-arm-linux-gnueabi *****

App name - Userland (proot)
You can use termux(proot),both are same but userland is slower than termux
For the best performance,use chroot [ Ubuntu chroot zip or linux deploy or kali linux nethunter (root) ]

Steps :

1)Download kernel source that you want to compile ,move zip to home directory and unzip it
For move : "mv path_of_file destination_folder"

"unzip x.zip"

2) Command :

for arm kernel

sudo apt install gcc g++-arm-linux-gnueabi gcc-5-arm-linux-gnueabi lzop ccache make python flex unzip bc libncurses5-dev

For armhf kernel

sudo apt install g++-arm-linux-gnueabi gcc-5-arm-linux-gnueabihf lzop ccache make python flex unzip bc libncurses5-dev

3)export ARCH=arm

4)make yourphonename_defconfig

in my case its "make titan_defconfig"

5) for any changes
"make menuconfig

6) export CROSS_COMPILE=arm-linux-gnueabi-

7) make -j(no. of cores) CC=arm-linux-gnueabi-gcc-5


Note :

To access internel storage
In userland "cd /host-rootfs/sdcard"
in termux "cd /sdcard"

Рекомендуемые видео