Android 11 samsung galaxy S21 Ultra - custom boot stuck

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Android 11 samsung galaxy S21 Ultra - custom boot stuck

Min Chow
Hi

I am trying to do some customization on S21 Ultra 5G SM-G998B

The source code is obtained from Samsung open source (SM-G998B_RR_Opensource.zip - G998BXXS2AUBB)

Firmware G998BXXS2AUBB_G998BOXM2AUBB_.zip  is downloaded from sammobile

Step 1) Extract boot.img from firmware

The boot.img is extracted from the firmware's  AP_G998BXXS2AUBB_CL20701476_QB38432109_REV01_user_low_ship_MULTI_CERT_meta_OS11.tar (using 7-zip and unpack with lz4)

The boot.img is then unpacked as follows:

$ ./unpack_bootimg.py --boot_img ./sambootimg/boot.img --out ./out

boot_magic: ANDROID!

kernel_size: 28807680

ramdisk size: 697174

os version: 11.0.0

os patch level: 2021-03

boot image header version: 3

command line args: androidboot.selinux=permissive

This step will output the following files: kernel, ramdisk and mkbootimg_args.json


Step 2) Building kernel


After  building the samsung open source kernel (no changes have been made to Kernel code), the Image is obtained at arch/arm64/boot

I understand that Android 11 is based on ver 3 header. The boot.img only consists of Kernel and ramdisk


Step 3) Make boot.img

This kernel image (Image) together with ramdisk is created as follows:

$ ./mkbootimg.py --kernel ./myBootimg/Image --ramdisk ./out/ramdisk --header_version 3 --os_version 11.0.0 --os_patch_level 2021-03 --cmdline androidboot.selinux=permissive --out ./myBootimg/boot.img


$ tar -cvf boot.img.tar boot.img 

This created boot.img.tar


Step 4) Magisk patch

After tar, this boot.img.tar is patched according to the magisk procedure which gives magisk_patched-22006_CjCUM.tar

The patched download to phone via the Odin utility successfully

After phone restart, it hang at Samsung screen (with the Android robot)

Can someone advise if I missed out any other important steps?

regards

Min

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/c621dba4-f7cb-4265-b178-11f8d935986dn%40googlegroups.com.