====== Mecool KM9 Pro boot from SD card ====== This guide is for the deluxe version with 4GB RAM, 32GB ROM. It will also work for other devices, but you will need to find a matching device tree file. ===== CoreELEC 9.2 ===== - First, you need an Amlogic version of UBOOT. You can obtain it in 2 ways: - First, download Amlogic [[https://chinagadgetsreviews.com/download-amlogic-burn_card_maker-v2-0-2.html|Burn Card Maker]] and the [[https://chinagadgetsreviews.com/download-android-pie-9-0-new-firmware-for-mecool-km9-pro-tv-box.html|firmware]] file. To boot into CoreELEC on SD card you will not need the Android firmware, so it does not matter which firmware version you download, you just need it to run the Burn Card Maker software. - Run //Burn Card Maker// and burn the firmware to the SD card. When done, the card will contain 3 files, one of which is //aml_sdc_burn.UBOOT// - Download Ricky Divjakovski's [[https://forum.xda-developers.com/devdb/project/?id=26925#downloads|Amlogic Tools 6.0.0]]. Run //CustomizationTool.exe//, click **Unpack**, and select the firmware file you donwloaded in step a. //aml_sdc_burn.UBOOT// will then be available in folder //temp/level 1//. - Download [[https://coreelec.org/|CoreELEC]], select //GenericDevice// and your SoC //S905X2//. Burn it to the SD card with Rufus. - Copy a matching device tree from folder //device_trees// on the SD card to the root folder of the SD card. Rename it to dtb.img. For the Mecool KM9 Pro //g12a_s905x2_4g.dtb// works. - Finally, you need to install the UBOOT boot loader. Do not copy the file you obtained in step 1, but modify the boot sectors on the SD card, preferrably on a linux machine: - Mount the SD card and find the device with //lsblk//. The device found will be sdX. - sudo dd if=aml_sdc_burn.UBOOT of=/dev/sdX bs=1 count=442 - sudo dd if=aml_sdc_burn.UBOOT of=/dev/sdX seek=1 skip=1 bs=512 - Insert the SD card into the Android box an apply power. If the device is not bricked you will need to push the reset button while powering the device. ===== Links ===== * [[https://unix.stackexchange.com/questions/264223/how-to-modify-android-boot-sequence-in-order-to-boot-from-an-sd-card|How to Modify Android Boot Sequence in Order to Boot From an SD Card]] * [[https://forum.libreelec.tv/thread/2692-bricked-nand-how-to-create-a-usb-bootable-sd-and-libreelec-on-one-sd/|Bricked NAND - how to create a USB bootable SD]] * [[https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-recovery-sd-card-for-amlogic-tv-boxes/|How to Create a Bootable Recovery SD Card for Amlogic TV Boxes]] * [[https://loksado.com/2019/09/alt-linux-untuk-arm-amlogic-s905x/#google_vignette|ALT Linux for Arm (Amlogic S905x)]] * [[https://android.stackexchange.com/questions/5232/how-can-i-view-the-android-internal-partition-table|How can I view the Android internal partition table]] * [[https://mxqproject.com/tutorial-s905s905xs912-linux-ubuntu-mate-install-tutorial/|TUTORIAL (S905/S905X/S912): How to install Armbian Linux]]