Hybris‐boot without full SFOS SDK - sailfishos-sony-nagara/main GitHub Wiki
These are instructions how to iterate over kernel booting before even building device config repos and rootfs image.
First, under your android/
checkout (say, AOSP14 r67 today), you can
- remove all
out/
files (or just make another checkout underhadk/
https://github.com/mer-hybris/droid-hal-sony-zambezi/tree/master/
1. Check out some hybris repos - as in e.ghybris/busybox
(master)hybris/hybris-boot
(master)hybris/mer-kernel-check
(master)actually not needed nowhybris-patches
(branch: hybris-sony-aosp-14)external/libhybris
from https://github.com/mer-hybris/libhybris.git- enter that folder and issue
git submodule init && git submodule update
2. Build kernel and check
$ . build/envsetup.sh
$ lunch aosp_xqcq54-ap2a-userdebug
$ kernel/sony/msm-5.15/common-kernel/build-kernels-clang.sh -p nagara -O ../../../../out/target/product/nagara/obj/kernel
$ hybris/mer-kernel-check/mer_verify_kernel_config out/target/product/nagara/obj/kernel/.config
3. Prepare for logs.
- in hybris-boot's init script, right before
sleep 60
write cp -f /init.log /data/init.log
- From AOSP recovery, format the data partition as ext4. (this is sda94 on pdx224)
4. Build hybris-boot or hybris-recovery (needs a patch to use header version, see this org's hybris-boot)
$ make lz4
$ make hybris-boot
5. Flash, boot, flash AOSP back, grab logs:
- Enter fastboot and issue
fastboot flash boot hybris-boot.img
- Select "Reboot system now" and start a "wall clock"
- While the system starts booting you can already issue the next command to revert to AOSP:
fastboot flash boot boot.img
- Before the 60 seconds pass, start pressing the Volume-Up button.
- On reboot, the Volume-up button enters fastboot and the old AOSP boot is flashed
Issuefastboot reboot fastboot
. You might want to issue that twice in case the first time it errors out.- Issue
fastboot reboot recovery
adb shell
(adb root
first if needed). Mount/data
and see if it hasinit.log