Skip to content

Instantly share code, notes, and snippets.

@silvae86
Last active June 20, 2023 03:40
Show Gist options
  • Save silvae86/ea11c430b659ced3d2765fa3312f6c1b to your computer and use it in GitHub Desktop.
Save silvae86/ea11c430b659ced3d2765fa3312f6c1b to your computer and use it in GitHub Desktop.
Flashing a boot.img (Kernel, for example) in an Android mobile phone via adb shell
#Tested with Samsung Galaxy Note 3 (your mobile phone may have different paths and partitions!!)
#check adb connection...
adb devices
#copy the boot.img image to the mobile phone (in this case, the root of the SD Card)
adb push <path_to_your_boot.img_extracted_from_custom_rom_zip>/boot.img /external_sd/boot.img
#open shell
adb shell
#flash the image into the /boot partition
```bash
dd if=/external_sd/ROMS/boot.img of=/dev/block/platform/msm_sdcc.1/by-name/boot
```bash
#Clean Cache and Dalvik Cache, Reboot into System!
@boylklk9515
Copy link

Hello,
Can I use it to flash boot.img and bootloader.img due to unlock bootloader instead using command "fastboot flashing unlock"
My device is locked bootloader and can not unlock by the command "fastboot flashing unlock""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment