Did my SD Card Slot Partially Burn Out? Unable to boot SD anymore - 1 month old VIM


Hey there guys, I recently picked up a VIM as I was looking for an s905x device. Worked great with Android in EMMC and Libreelec (kszaq builds) on SD card… However the other night it appears my SD card slot is either partially fried or malfunctions. Symptoms are very odd…

I can no longer BOOT from the SD card, but the SD card will work INSIDE of android if running from EMMC. I can mount, format, write, read from it inside Android … I just can’t boot from it anymore. This is what happened:

  1. Was updating my Libreelec (SD) to latest build, update was successful. During the reboot process, the box didn’t display the Khadas boot logo, and immediately powered off. Subsequent tries to boot with SD inserted resulted in same behavior (box immediately powering off).

  2. Tried new SD cards/images including official Khadas ones - box would just shut off. I left it for a while and setup a few fresh SD cards, and eventually was able to get the machine to not power off, but when booted, it would stay @ the Khadas boot logo forever (with SD inserted)

  3. Re-flashed official Khadas Android - now it doesn’t halt at the boot screen any more when the SD is inserted… however it just skips past and boots Android like no SD card is present.

So this is where I am now. I can’t get anything to boot from SD card, but the SD card works if I mount it from within Android… very odd. I have tried a mix of different OS’s that used to run fine from SD card. No go on any of them.

I have the Khadas hooked up to serial for debugging, and I am trying to figure out what I should be looking for.

If the SD slot is damaged after just over a month of occasional usage, I’m gonna be pretty bummed out. Would cost me 60% of what I paid for it, to return it.

If the SD slot is damaged, is there any way that I can install Libreelec to the EMMC… or create my own Libreelec(latest)/Android EMMC dual boot??

Or install Libreelec to EMMC via USB or any other way?

Thanks fellas.


Okay, so after I flashed the stock Khadas Android (both 6 and 7), the machine would boot the EMMC always, regardless if there was an SD card in there. So running kermit wasn’t showing much (at least to me… but I am by no means proficient with it).

I downloaded one of balbes Ubuntu ROM’s which contains the multiboot mod you can flash from the “Software Update” area of Android. After flashing this, I can get the machine to freeze @ the Khadas boot logo when trying to load an SD image.

This is my kermit log from trying to load balbes latest Ubuntu image:


Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.

TE: 97292

BL2 Built : 13:48:56, Sep 23 2016.
gxl g7459bd4 - jianxin.pan@droid06

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x10100000, size: 0x00015400
Load bl33 from eMMC, src: 0x00038200, des: 0x01000000, size: 0x000a6400
NOTICE: BL3-1: v1.0(debug):fb68908
NOTICE: BL3-1: Built : 18:30:11, Nov 1 2016
aml log : bl31 normal boot !
[Image: gxl_v1.1.3154-065f772 2016-09-29 14:08:54 yan.wang@droid05]
64 61 d7 75 8c eb 82 57 c1 92 72 7f [0.338072 Inits done]
secure task start!
high task start!
low task start!
INFO: BL3-1: Initializing runtime services
WARNING: No OPTEE provided by BL2 boot loader
ERROR: Error initializing runtime service opteed_fast
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address = 0x1000000
INFO: BL3-1: Next image spsr = 0x3c9

U-Boot 2015.01-g207958a (Jan 21 2017 - 11:58:03)

Relocation Offset is: 76ecc000
register usb cfg[0][1] = 0000000077f5f1a8
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpp: vpp_init
boot_device_flag : 1
Nand PHY Ver: © 2013 Amlogic Inc.
init bus_cycle=6, bus_timing=7, system=5.0ns
reset failed
get_chip_type and ret:fffffffe
get_chip_type and ret:fffffffe
chip detect failed and ret:fffffffe
nandphy_init failed and ret=0xfffffff1
MMC: aml_priv->desc_buf = 0x0000000073ecc6b0
aml_priv->desc_buf = 0x0000000073ece9d0
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
[mmc_startup] mmc refix success
[mmc_init] mmc init success
mmc read lba=0x14000, blocks=0x400
start dts,buffer=0000000073ed1270,dt_addr=0000000073ed1270
parts: 11
00: logo 0000000002000000 1
01: recovery 0000000002000000 1
02: rsv 0000000000800000 1
03: tee 0000000000800000 1
04: crypt 0000000002000000 1
05: misc 0000000002000000 1
06: instaboot 0000000020000000 1
07: boot 0000000002000000 1
08: system 0000000040000000 1
09: cache 0000000020000000 2
10: data ffffffffffffffff 4
get_dtb_struct: Get emmc dtb OK!
overide_emmc_partition_table: overide cache
[mmc_get_partition_table] skip partition cache.
Partition table get from SPL is :
name offset size flag

0: bootloader 0 400000 0
1: reserved 2400000 4000000 0
2: cache 6c00000 20000000 2
3: env 27400000 800000 0
4: logo 28400000 2000000 1
5: recovery 2ac00000 2000000 1
6: rsv 2d400000 800000 1
7: tee 2e400000 800000 1
8: crypt 2f400000 2000000 1
9: misc 31c00000 2000000 1
10: instaboot 34400000 20000000 1
11: boot 54c00000 2000000 1
12: system 57400000 40000000 1
13: data 97c00000 13a400000 4
mmc read lba=0x12000, blocks=0x2
mmc read lba=0x12002, blocks=0x2
mmc_read_partition_tbl: mmc read partition OK!
eMMC/TSD partition table have been checked OK!
mmc env offset: 0x27400000
In: serial
Out: serial
Err: serial
set hdmitx VIC = 16
config HPLL = 2970
HPLL: 0xc000027b
config HPLL done
j = 4 vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
rx version is 1.4 or below div=10
hdmtix: set audio
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
read emmc dtb
Net: dwmac.c9410000
[OSD]load fb addr from dts
[OSD]failed to get fb addr for logo
[OSD]use default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]load fb addr from dts
[OSD]failed to get fb addr for logo
[OSD]use default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=3840, height=2160
amlkey_init() enter!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0
[KM]Error:f[key_manage_query_size]L507:key[usid] not programed yet
[KM]Error:f[key_manage_query_size]L507:key[mac] not programed yet
[KM]Error:f[key_manage_query_size]L507:key[deviceid] not programed yet
get_cpu_id flag_12bit=1
saradc - saradc sub-system

saradc saradc open - open a SARADC channel
saradc close - close the SARADC
saradc getval - get the value in current channel
saradc get_in_range - return 0 if current value in the range of current channel

gpio: pin GPIOAO_2 (gpio 102) value is 1
get_cpu_id flag_12bit=1
Product checking: pass!
Hit Enter or space or Ctrl+C key to stop autoboot – : 0
(Re)start USB…
USB0: USB3.0 XHCI init start
Register 2000140 NbrPorts 2
Starting the controller
scanning bus 0 for devices… 2 USB Device(s) found
scanning usb for storage devices… 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 1 **
** Bad device usb 2 **
** Bad device usb 3 **
card in
[mmc_init] mmc init success
Device: SDIO Port B
Manufacturer ID: 1b
OEM: 534d
Name: 00000
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.9 GiB
mmc clock: 40000000
Bus Width: 4-bit
reading s905_autoscript
1545 bytes read in 4 ms (377 KiB/s)

Executing script at 01020000

** Bad device usb 0 **
** Bad device usb 1 **
** Bad device usb 2 **
** Bad device usb 3 **
reading uInitrd
5147729 bytes read in 281 ms (17.5 MiB/s)
reading zImage
17484288 bytes read in 953 ms (17.5 MiB/s)
reading dtb.img
** Unable to read file dtb.img **
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
read emmc dtb

Loading init Ramdisk from Legacy Image at 13000000 …

Image Name: uInitrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 5147665 Bytes = 4.9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum … OK
load dtb from 0x1000000 …

Flattened Device Tree blob at 01000000

Booting using the fdt blob at 0x1000000
Loading Ramdisk to 739d1000, end 73eb9c11 … OK
Loading Device Tree to 000000001fff3000, end 000000001ffff4dc … OK
fdt_instaboot: no instaboot image

Starting kernel …

uboot time: 6507712 us


By my eyes there seems to be a few areas of concern, but I am unsure. Hopefully someone is good reading these things. If there is anything else I can provide, please tell me.

Thanks everyone!


Hi veronica,

As you said, you can mount and write SD card in Android, I think the SD slot is OK.

If you reflash the rom, then the environment variables for booting to LibreELEC are missing, so you can’t boot to SD card.
And you can try to activate the multi-boot again in Android(using the launch application in Android “Update&Backup”).



Add according to instructions, the correct dtb file to the media.


Thanks Balbes!

Pretty sure I was using the right one, but I was trying other OS’s because LE still wouldn’t boot, so I may have overlooked it.

I will update this in a few minutes with a new kermit log, of loading LE with the proper DTB that Kszaq provided for his builds.

The SD card slot was working fine one minute… Then immediately after an LE update, stopped allowing boot altogether.


In my second post, I explained that I had already flashed the multiboot mod in the “Update” section of Android. But thank you for your idea!


Kermit logs attached to bottom of this post

Okay I started over fresh:

  1. Reflashed stock android.
  2. Applied your multiboot mod via “Update” inside Android.
  3. Setup new LE SD card with proper DTB, and setup Armbian SD with proper DTB.
  4. Trying to boot LE SD image results in box freezing @ Khadas screen forever. Tried 25 times with same result.
  5. Tried booting Armbian Ubuntu build from SD - It did indeed boot!! BUT…
    This is where it gets weird
  6. Tried booting LE SD image again, hoping that after successfully getting Armbian to boot, it might somehow work… but no… now the box DOES INDEED GO PAST the Khadas boot logo momentarily, but it simply shuts off/powers off…

So trying to boot any version of LE now results in the box powering off. I have tried 7 different builds/versions of LE with zero luck. The box just powers off now. The “powering off” only started after successfully booting Armbian. Previous to booting Armbian, the box halted @ the Khadas boot logo.

Booting balbes Armbian does seem to work but now LE simply shuts off during boot…

Here are the Kermit logs:

Kermit Log - LE SD No Boot - Causing Auto Power Off

Kermit Log - Armbian - Success Boot??

Hopefully someone can see something in those logs. I don’t understand why the box is powering off.


Remove dtb file from SD card with Libreelec (Kszaq)
or try


Same result unfortunately for both :anguished:

So I was looking up the message it displays right before it powers off “domain-0 init dvfs: 4” and I found the following post here on the forums discussing something similar:

Can anyone test if they can get LE working if they flash a NEW SD card? My old one worked fine until an LE update, now I can’t boot any version via SD.

All my other s905 devices are working just fine with it. I had another s905x device for a while but gave it away when the VIM arrived so can’t test other s905x boxes.

EDIT2: I have now tried the following:

  1. Erase EMMC entirely via serial
  2. Setup Uboot on SD card - can boot Uboot successfully
  3. Setup LE on flash drive. Uboot can see/start “kernel.img” on USB but results in the same message and VIM does not load LE successfully : “domain-0 init dvfs: 4”
  4. I have also tried putting Uboot on the LE sd card which does exactly the same as above. Uboot WILL load, but LE will NOT boot.


To verify that SD card and VIM, follow these steps

  1. Restore the regular firmware Android Vim_Marshmallow_Root_170303.
  2. Download the image LE.


  1. Unzip and burn the image to a USB flash drive or SD card (neither of which do not change in a captured image).
  2. To activate this media multiboot.
  3. To check the work LE from the external media.

If everything will work, then the hardware VIM1 OK and the grounds of misbehaviour SD card LE you used previously.



With your advise I was able to get Kszaq LE builds to launch with the following combination ONLY:

  1. Erase EMMC clean
  2. Flash Android Vim_Marshmallow_Root_170303 to EMMC
  3. To flash multiboot - Setup FAT16 SD/USB of 500MB and put these two files on it: https://yadi.sk/d/srrtn6kpnsKz2/update_uboot/v05
  4. Insert SD card with above files when VIM is off. Power on, go to “Update System” and apply multiboot patch. Allow to reboot.
  5. Power off VIM
  6. Setup LE SD card (kszaq build) with kszaq DTB - BOOT FAILURE
  7. Changed DTB to the one Balbes150 supplied above: https://yadi.sk/d/PTMTLQPs3Lhhr9


So, for anyone reading this who can’t get kszaq latest builds to boot (v8.2) - please use EXACTLY the stuff that I posted above. I do remember that I had Android Nougat working OK with his builds previously, but LE had been upgraded many times since the original SD install which I suspect prevented this problem from happening until I reached his latest 8.1.9 build. I was using kszaq original DTB file with 8.2 builds… likely because I flashed the SD card many versions before and simply upgraded instead of reflashing. I can’t get any fresh LE SD 8.2 builds to boot without the updated DTB Balbes150 provided.

The problem seems to be with the DTB file provided by kszaq. However, I’m pretty certain I tried the updated DTB provided by Balbes150 above when I was previously trying to boot LE SD with Nougat on the EMMC which didn’t work either. I will have to try a bunch of combinations to see which versions work better. I was also previously using the “Armbian multiboot patch” - not sure if it would cause any differences.

Balbes150 gets all the credit for solving this one!

Thanks a million good sir.