반응형
앱 모의해킹 및 분석 목적으로 매우 유용 & 강력한 KernelSU(https://github.com/tiann/KernelSU)를 올려 봅시다.

갤럭시 s10 lineageOS 12 커스텀롬에 올려볼것입니다.

 

- 사전준비사항
Windows10, Ubuntu 22.04.3 VM 에서 진행
갤럭시 s10 exynos9820 AOS12 루팅(https://hackcatml.tistory.com/162 참고)
LineageOS 12 커스텀롬 준비(https://lineage-archive.timschumi.net/ 에서 lineage-19.1-xxx-beyond1lte-signed.zip 다운로드)
 
- Build Kernel

커널 빌드에 대략 20분 정도 소요됨(ubuntu vm 8g ram, 2 core cpu 기준)

# Install prerequisites
# If you use ubuntu or ubuntu based distro then you need to install these tools:
sudo apt-get install build-essential libncurses-dev libtinfo5 bc bison flex libssl-dev libelf-dev heimdall-flash android-tools-adb android-tools-fastboot curl p7zip-full

# Install avbtool
wget -q https://android.googlesource.com/platform/external/avb/+archive/refs/heads/master.tar.gz -O - | tar xzf - avbtool.py
chmod +x avbtool.py
sudo mv avbtool.py /usr/local/bin/avbtool

# Install mkbootimg
wget -q https://android.googlesource.com/platform/system/tools/mkbootimg/+archive/refs/heads/master.tar.gz -O - | tar xzf - mkbootimg.py gki
chmod +x mkbootimg.py
sudo mv mkbootimg.py /usr/local/bin/mkbootimg
sudo mv gki $(python -c 'import site; print(site.getsitepackages()[0])')

# Install mkdtboimg
wget -q https://android.googlesource.com/platform/system/libufdt/+archive/refs/heads/master.tar.gz -O - | tar --strip-components 2 -xzf - utils/src/mkdtboimg.py
chmod +x mkdtboimg.py
sudo mv mkdtboimg.py /usr/local/bin/mkdtboimg

# Get the sources
git clone https://github.com/awakened1712/android_kernel_samsung_exynos9820.git
cd android_kernel_samsung_exynos9820
git submodule update --init --depth 1 -j $(nproc)
git clone --depth=1 https://github.com/kdrag0n/proton-clang.git

# Kernel Build
export PATH=~/android_kernel_samsung_exynos9820/proton-clang/bin:${PATH}
make O=out ARCH=arm64 CC=clang exynos9820-beyond1lte_defconfig
make O=out ARCH=arm64 CC=clang CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnueabi- AR=llvm-ar NM=llvm-nm OBJCOPY=llvm-objcopy OBJDUMP=llvm-objdump STRIP=llvm-strip -j12

 

 

out/arch/arm64/boot/Image 파일 생성됨

 

 

AnyKernel3(https://github.com/osm0sis/AnyKernel3) 디렉터리에 Image 파일 옮기고 압축

 

※ anykernel.sh

### AnyKernel3 Ramdisk Mod Script
## osm0sis @ xda-developers

### AnyKernel setup
# global properties
properties() { '
kernel.string=ExampleKernel by osm0sis @ xda-developers
do.devicecheck=0
do.modules=0
do.systemless=1
do.cleanup=1
do.cleanuponabort=0
device.name1=
supported.versions=
supported.patchlevels=
supported.vendorpatchlevels=
'; } # end properties


### AnyKernel install
## boot files attributes
boot_attributes() {
set_perm_recursive 0 0 755 644 $ramdisk/*;
set_perm_recursive 0 0 750 750 $ramdisk/init* $ramdisk/sbin;
} # end attributes

# boot shell variables
block=/dev/block/platform/13d60000.ufs/by-name/boot;
is_slot_device=0;
ramdisk_compression=auto;
patch_vbmeta_flag=auto;

# import functions/variables and setup patching - see for reference (DO NOT REMOVE)
. tools/ak3-core.sh;

# boot install
dump_boot; # use split_boot to skip ramdisk unpack, e.g. for devices with init_boot ramdisk

write_boot; # use flash_boot to skip ramdisk repack, e.g. for devices with init_boot ramdisk
## end boot install

 

- Kernel 플래싱 

TWRP 리커버리 --> wipe --> format data --> yes --> advanced wipe --> Dalvik / System / Data / Cache 체크 & wipe --> lineageos19.1, nikgapps(https://sourceforge.net/projects/nikgapps/files/Releases/NikGapps-S/21-Jun-2023/, 기본 구글 앱 설치용), multidisabler, twrp_bootlogo, anykernel.zip 순서대로 플래싱 --> reboot

multidisabler-samsung-3.2.zip
0.00MB
TWRP_Bootlogo.zip
0.50MB

 

 

- KernelSU apk 설치

https://github.com/tiann/KernelSU/releases 에서 최신버전 KernelSU.apk 다운로드 받아서 adb install 로 설치하면 끝

반응형

'Information Security > Android' 카테고리의 다른 글

Galaxy S9 PixelExperience 13 + KernelSU  (8) 2023.10.27
Move User Certs KernelSU Module  (0) 2023.10.21
Frida Unreal Engine Dumper  (8) 2023.08.20
What Happens If You Implement PltHook?  (0) 2023.07.30
PmsHook 해봅시다  (0) 2023.05.30

+ Recent posts