ROM Android: Flash boot image

From OnnoWiki
Jump to navigation Jump to search

Installing the custom kernel on Samsung devices

This was not only the scariest, but most frustrating part of the whole process. The CyanogenMod docs mention using installboot, but for reasons I have yet to figure out that didn’t work for me. I suspect because I didn’t build a whole ROM but just the kernel. Anyway PsychoI3oy on #cyanogenmod-dev mentioned that heimdall would be the easiest way to install the ROM. Unlike Ye Olde Odin, heimdall is open source and thus is happily in the Ubuntu repos. So I just installed heimdall

sudo apt-get install heimdall-flash

booted my phone into download mode (HOLD VolDown + Power + Home, then VolUp when you see the prompt), download the PITfile - it’s sorta like a partition table?

sudo heimdall download-pit --file t0lte.pit

boot into download mode again, and upload the boot image:

sudo heimdall flash --pit ~/t0lte.pit --BOOT ~/android/system/out/target/product/t0lte/boot.img.

Note that the string BOOT can be found by looking at heimdall print-pit --file t0lte.pit

After installing the boot image, you still need to install the related modules. In my case everything except for wifi worked fine without the modules, but still, you need wifi. So after boot, you enable debug mode by clicking ‘Settings -> About Phone -> Build Number’ a million times, then enable adb, then run the following commands:

adb root
adb remount
for i in $OUT/system/lib/modules/*;
do
    adb push $i /system/lib/modules/
done
adb shell chmod 644 /system/lib/modules/*



Referensi