coreelec:eemc

Please read the entire document thoroughly before using the tool.

This command line tool was written by Team CoreELEC exclusively for use with Amlogic devices running CoreELEC

The tool can be used for a safe installation of CoreELEC to internal eMMc storage. There is a choice between dual and single boot mode.

HINT: Prior to using the tool, make a backup.

  • CoreELEC Amlogic-ng running from SD Card or USB Flash Drive
  • Amlogic device running Android as base system

Following devices are officially supported by Team CoreELEC:

  • Khadas VIM3
  • Khadas VIM3L
  • Minix
  • Beelink

For generic devices, read this disclaimer before proceeding.

  1. SD
  2. USB
  3. eMMc

If the system fails to boot from eMMc, it still can be booted from external media with CoreELEC installed.

A bricked device can be recovered by using Burncardmaker or the AML USB Burning Tool.

ceemmc can be used to install CoreELEC on internal eMMc in two different modes

Dual boot mode installation

  • Android is still bootable and can be entered by the CoreELEC shut down menu item: Reboot from eMMc/NAND
  • If CoreELEC is installed in dual boot mode it can be removed from the internal eMMc. On removal the device will get restored like it was prior to the CoreELEC installation.
  • The disadvantage is that not all storage of the internal eMMc can be used. Around 5GB of internal storage is lost in this mode because of the Android partition layout. The amount of lost storage depends on vendor/device.

Single boot mode installation

  • Android is removed and only CoreELEC can be booted from internal eMMc
  • This type of installation will allow the maximum amount of the storage available from eMMc to be used. Just ~64MB is lost because of the bootloader.
  • The disadvantage is that CoreELEC can not be removed like in dual boot mode. Since the firmware was overwritten, the device needs to be restored with vendor firmware.

The vendor bootloader remains untouched for both installation modes

Please read this section carefully before performing an Android vendor firmware update/upgrade

  • If CoreELEC co-exists with Android on the same eMMc, it is required to remove the CoreELEC installation from internal eMMc prior to updating/upgrading the vendor Android firmware, otherwise the OTA firmware update/upgrade will fail!
  • Restoring the vendor firmware results in complete loss of the CoreELEC installation on internal eMMc. Team CoreELEC recommends to create a backup first.

1. Dual boot mode installation

A. Booted from SD card or USB flash drive

  1. Use option [6] to create a backup of the CoreELEC installation on eMMc.
  2. Once the backup is finished, use option [7] to remove the CoreELEC installation from eMMc.
  3. The device is now ready to be upgraded by an Android image or a OTA update.
  4. After the Android upgrade/update the device bootloader environment has been reset to defaults. Therefore CoreELEC will no longer start from internal eMMc, SD Card or USB Flash Drive. Boot once from a SD card or USB flash drive with CoreELEC on it by using one of the commonly used methods like pushing and holding the reset button while powering on the device.
  5. After one successful boot of CoreELEC from external media, the backup created earlier can be used to (re)-install CoreELEC dual mode to eMMc by using option [2]

B. Booted from current CoreELEC installation on eMMc

  1. Use option [1] to make a copy of the internal CoreELEC installation to an insert SD Card or USB Flash Drive.
  2. When the copy process is finished, reboot the device to boot CoreELEC from an SD Card or USB Flash Drive, and proceed in the left column with step 2. of: “Booted from SD card or USB flash drive”.

2. Single boot mode installation

A. Booted from SD card or USB flash drive

  1. Use option [3] to create a backup of the internal CoreELEC installation.
  2. The device is now ready for recovery by a vendor firmware image.
  3. After the Android recovery has completed, the backup created earlier can be used to (re)install CoreELEC in single mode to eMMc by using option [4].

B. Booted from current CoreELEC installation on eMMc

  1. Use option [1] to create a copy of the internal CoreELEC installation to an insert SD Card or USB Flash Drive.
  2. When the copy is finished reboot the device to boot CoreELEC from SD Card or USB Flash Drive, and proceed in the left column with step 2. of: “Booted from SD card or USB flash drive”.

Option Migrate
This option can be used to migrate the current CoreELEC dual mode installation on internal eMMc to a standalone installation. Use this option if Android can be removed and gain access to the maximum available amount of storage from the internal eMMc. There is no option to roll back this operation as Android will be removed.
Option Renew
This option can be used to renew the current CoreELEC installation on internal eMMc. The tool ceemmc will ask if data on internal eMMc /flash and/or /storage should be renewed. Be aware that all existing data on the renewed chosen partition will be lost. This option can be used if CoreELEC is for example no longer able to boot from eMMc. Never use this option to update CoreELEC on eMMc. User data may get lost.
Option Copy
This option can be used to create a bootable copy of the current CoreELEC installation on eMMc to an insert SD Card or USB Flash Drive. All user data on the partition chosen to copy to will be overwritten on the target media. If non-existent, the current used CoreELEC partition layout will be created on the target media. This requires the SD Card or USB Flash Drive to be formatted prior to copying the data over.
Option Backup
This option can be used to create a backup of the current CoreELEC installation on eMMc. The backup data will be saved at: /storage/backup/eMMC_backup/coreelec_flash if the flash partition is chosen, or /storage/backup/eMMC_backup/coreelec_storage if the storage partition is chosen on the current used CoreELEC boot device. Any existing backup on the CoreELEC boot device will be replaced by the current backup when using this option. When using migrate or renew with option backup, this is the backup that will be restored.

SSH into CoreELEC.

The tool has a short and long help description. Use -h for the short and –help for the long description:

   CoreELEC:~ # ceemmc -h
   
   Starting CoreELEC eMMC installation tool...
   Usage: ceemmc [options]
   
   This tool is written by Team CoreELEC, vpeter, Portisch
   
   [options]
   
   -v             verbose output
   -h, --help     print this help

Depending on boot scenarios, the tool options are different:

  • CoreELEC is booted from external media and:
    1. not installed on eMMc
    2. installed on eMMc together with Android
    3. installed on eMMc by itself
  • 4. CoreELEC booted from eMMc

A. CoreELEC can be installed in dual boot mode

   Use CoreELEC data from
     [1] current used SD or USB device
         Install CoreELEC on eMMC without removing Android from the device.
         Dual boot of Android and CoreELEC is possible.
         Not all memory of the eMMC can be used because of Android.
     
     [2] existing backup on current used SD or USB device
         Install CoreELEC on eMMC without removing Android from the device.
         Dual boot of Android and CoreELEC is possible.
         Not all memory of the eMMC can be used because of Android.
         An existing backup of the CoreELEC data on on current
         used SD or USB device will be used for installation.
     

B. CoreELEC can be installed stand-alone

        
   Use CoreELEC data from
     [3] current used SD or USB device
         Install CoreELEC on eMMC and remove Android from the device.
         Only boot of CoreELEC is possible.
         The maximum of memory of the eMMC is used.
     
     [4] existing backup on current used SD or USB device
         Install CoreELEC on eMMC and remove Android from the device.
         Only boot of CoreELEC is possible.
         The maximum of memory of the eMMC is used.
         An existing backup of the CoreELEC data on on current          
         used SD or USB device will be used for installation.

A. Migrate CoreELEC dual boot to single boot installation

   Use CoreELEC data from
     [1] current used SD or USB device
         Install CoreELEC on eMMC and remove Android from the device.
         Only boot of CoreELEC is possible.
         The maximum of memory of the eMMC is used.
         All existing CoreELEC data on eMMC will be removed
         and the new data from current used SD or USB device
         will be copied to eMMC.
     
     [2] the existing data on eMMC
         Install CoreELEC on eMMC and remove Android from the device.
         Only boot of CoreELEC is possible.
         The maximum of memory of the eMMC is used.
         The existing CoreELEC data on eMMC will be used for installation.

B. Renew current CoreELEC dual boot installation on eMMc

   Use CoreELEC data from
     [4] current used SD or USB device
         All existing CoreELEC data on eMMC will be removed
         and the new data from current used SD or USB device
         will be copied to eMMC.
     
     [5] existing backup on current used SD or USB device
         All existing CoreELEC data on eMMC will be removed and
         the new data from an existing backup from current
         used SD or USB device will be copied to eMMC.
     
     [6] Make a backup of current CoreELEC dual boot installation 
         on eMMC to current used SD or USB device
         Make a backup of all CoreELEC data on flash and/or storage
         partition on eMMC to the current used SD or USB device
     
     [7] Remove current CoreELEC dual boot installation on eMMC
         All existing CoreELEC data on eMMC and the existing
         CoreELEC dual boot installation on eMMC will be removed.

Renew current CoreELEC single boot installation on eMMc

   Use CoreELEC data from
     [1] current used SD or USB device
         All existing CoreELEC data on eMMC will be removed
         and the new data from current used SD or USB device
         will be copied to eMMC.
     
     [2] existing backup on current used SD or USB device
         All existing CoreELEC data on eMMC will be removed and
         the new data from an existing backup from current
         used SD or USB device will be copied to eMMC.
     
     [3] Make a backup of current CoreELEC single boot installation 
         on eMMC to current used SD or USB device
         Make a backup of all CoreELEC data on flash and/or storage
         partition on eMMC to the current used SD or USB device
     [1] Make a copy of current CoreELEC installation on eMMC to current
         used SD or USB device
         Make a copy of all CoreELEC data on flash and/or storage
         partition on eMMC to the current used SD or USB device

The -x parameter allows for use of the tool with generic devices.

Any support request for generic devices will be ignored by Team CoreELEC

Before proceeding, ensure to have a functional firmware image of the device, and the knowledge and tools to recover or restore the devices firmware.
It is recommended to install CoreELEC in dual boot mode on unsupported hardware as this allows for easier recovery.

WARNING: THIS TOOL MAY BRICK THE DEVICE

  CoreELEC:~ # ceemmc -x
  
  Starting CoreELEC eMMC installation tool...
  
  System is not supported: sm1_s905x3_4g_1gbit!
  
  There is NO official support by Team CoreELEC
  if you continue to run this tool!
  Continue? [y]: