Home > AMLogic, Android, Linux, Ubuntu, Windows 10 > How to Create a Bootable Recovery SD Card for Amlogic TV Boxes

How to Create a Bootable Recovery SD Card for Amlogic TV Boxes

November 19th, 2016 Leave a comment Go to comments

I reviewed Rikomagic MK22 TV box about two weeks ago, and with the firmware I had, online firmware update was not enabled, and the company only released .IMG firmware for Amlogic USB Burning Tool, a windows only tools that’s not well designed, and requires some procedure that vary slightly from boxes to boxes which in some cases forces to buy a male to male USB cable.

I’ve now started reviewing R-Box Pro TV box also based on Amlogic S912 processor, online firmware update is not working either, and again I only managed to find .IMG firmware for the box on GeekBuying. However, I’ve been informed that “USB Burning Tool” firmware can now be flashed through a micro SD card, or USB flash drive with all recent Amlogic TV boxes, so I’ve tried this method instead of R-Box Pro, and decided to report my experience in this post following some instructions on Freaktab made by user Calc. I’ll show instructions in Linux (which could be further streamlined), and then Windows.

Linux Method

After downloading and extracting the rar’ed firmware file (twice), I ended up with a single img firmware files (aml_s912_q6330-R-BOX-PRO-3gddr-mac-20161015.img).

First we’ll need to have a tool to extract some files from the firmware. Create aml-upgrade-package-extract.c with the code below which I found on Freaktab too and slightly modified it to parse the firmware filename:


Now compile the tool with gcc:


and run the thing on the firmware file:


It will extract a bunch of files:


You’ll just need aml_sdc_burn.ini and aml_sdc_burn.UBOOT, plus the IMG file itself to create a bootable mass storage device.

Now find the device for your micro SD card (formatted with FAT32) with lsblk:


In my case it’s /dev/sdd, but I’ll use /dev/sdX in the instructions below, just change the command with yours.


and finally re-mount the SD card/flash drive, copy the firmware file and aml_sdc_burn.ini to the root of the device, and rename the firmware to aml_upgrade_package.img to match the string in aml_sdc_burn.ini:


Now make sure no other USB devices or SD card are inserted in the TV box, and insert your bootable (micro) SD card or USB flash drive into the TV box. If your TV box is fully bricked, you have nothing to do, and the update should start straightaway, but if it is partially bricked or just working fine, you still need to press the recovery button, apply power, and release the button in order to enter recovery mode. The upgrade should then start automatically as shown below.

micro-sd-card-firmware-update

Patiently wait for the update to complete and you should be all good. Please note that I first tried with a USB flash drive, and the method did not work. Once the update is complete, you’ll see the “Android success” logo.

amlogic-firmware-update-successAt this point, remove the micro SD card, and power cycle the board to complete the final steps of the update, and within one or two minutes you should get the Android launcher. If instead the firmware ends with “Android failure” logo showing a red cross, verify your firmware MD5 (e.g. with md5sum in Linux) to make sure it’s not corrupted. If it is, re-download the file and/or re-copy the file to the micro SD card.

Windows Method

If you are a Windows user it’s much easier as you just need to use Burn_Card_Marker tool (bootcardmaker.exe), which you can download here. The documentation shows the interface as shown below.

burn_card-maker-english

But after starting the program in Windows 7, and changing language with the top menu, second option to English, it stayed in Chinese language and looked like the screenshot below instead.

burn_card_maker_v2-0-2

[Update: After changing the Language to English, select the third option in the top menu to apply the change…amlogic-card-maker-menu

…restart the app, and it will be in English.]

It’s not really a big issue, but you can still select your SD card device (F: drive in my case), load the file, and press “Make” button to start create a bootable recovery (micro) SD card.
amlogic-create-bootable-card

You’ll get a “Success!” pop-up window and the end, and the content of the SD card will show the firmware, and the two aml_sdc_burn files.

burn-card-maker-files

Now you can insert the micro SD card in the TV box, enter recovery menu with the pin hole or other method for your TV box, and firmware update will start automatically.

Good Luck!

  1. GanjaBear
    November 20th, 2016 at 21:39 | #1

    On a 2GB card, the partition start had to be moved or UBOOT didn’t fit. (mount failure after dd’ing)

    I wonder if getting Update&Recovery to reboot via a random .zip file on the card would work?

  2. GanjaBear
    November 20th, 2016 at 21:48 | #2

    @cnxsoft Copying aml_sdc_burn.UBOOT is probably redundant, no?

    > cp aml_sdc_burn.ini aml_sdc_burn.UBOOT [device-mount-point]

  3. November 21st, 2016 at 10:12 | #3

    @GanjaBear
    It could be, but at first I had troubles without it, and when I tried the Windows method, I discovered the tool also copied that file to the micro SD card.

  4. FGBonn
    November 27th, 2016 at 06:42 | #4

    Hi, what if i dont have the IMG file, but have an OTA zip?? is there a way i can flash?

  5. AARON
    November 28th, 2016 at 06:21 | #5

    I followed the steps to make a bootable SD card, and I can confirm that it in fact does NOT start right away. All it does is go to the recovery menu.

  6. balbes150
    November 28th, 2016 at 15:27 | #6

    AARON :
    I followed the steps to make a bootable SD card, and I can confirm that it in fact does NOT start right away. All it does is go to the recovery menu.

    In Linux, you can try to create boot card of these files for this manual. You need to follow two boot loader entries.

    dd if=u-boot.bin.sd.bin of=/dev/mmcblk0 conv=fsync bs=1 count=442

    dd if=u-boot.bin.sd.bin of=/dev/mmcblk0 conv=fsync bs=512 skip=1 seek=1

    https://yadi.sk/d/U41GQWcJsapLV

  7. November 28th, 2016 at 19:21 | #7

    @FGBonn
    If you have an OTA image, then you can just copy the file to the micro SD card, and use the update app to flash it, or enter recovery mode and select your micro SD card to complete the update. If your device is bricked then you can’t use the OTA image, you need the IMG one.

    @AARON
    I’m assuming you used the Linux method. Maybe I missed a step in the instructions, but it did work for me. Please let us know if balbes150 extra line fixed it for you.

  8. Vin
    December 10th, 2016 at 08:08 | #8

    I have also the rbox pro but the 2g variant downloaded the latest firmware.unzip the file and got the .img file downloaded burn card maker tool and make a bootable sd card. When i used it in the sd card and reset using the toothpick method the robot logo and x appear and does nothing. When i create it to a 4gig usb disk it just went to the stock recovery. Pls help me

  9. December 10th, 2016 at 09:18 | #9

    @Vin
    Sometimes to possibly check:
    * Make sure all options were ticked in the window program
    * Make sure you download the right firmware for your box, e.g. for R-Box Pro you can 2GB and 3GB firmware
    * Maybe try micro SD card from 4 to 16 GB, but nothing smaller or bigger.

  10. Vin
    December 10th, 2016 at 21:19 | #10

    @cnxsoft
    Yes all option are tick in the burn card maker. R-BOX Pro 2+16GB PC Upgrade Firmware–>this is what i downloaded from geekbuying website. For the sd card i used 8 gig and for the usb disk its 4db. So im wondering what am i missing

  11. davidMetal
    January 13th, 2017 at 12:52 | #11

    I too cannot make the SD Upgrade work… I spent 4 hours last night using the tools and step described above. I insert the 4gb SD card and press the reset button – I get a green android with red cross only.
    If I remove the SD and go to recovery, I navigate to the SD card but the .IMG file is not visible at all… I am assuming because it is looking for a .ZIP file instead…

    Life would be ALOT EASIER if they simply provided the .ZIP version instead (right)??? There would be no need for SD burn tools. I am trying to re-download the IMG file again and go through the steps again. I have no idea why! can someone provide feedback?

  12. January 13th, 2017 at 14:10 | #12

    @davidMetal
    If you used the method above with the IMG firmware, then flashing should start automatically. In you get into the recovery menu that means something did not work.

    I also had a red cross Android before due to a corrupted download:

    If instead the firmware ends with “Android failure” logo showing a red cross, verify your firmware MD5 (e.g. with md5sum in Linux) to make sure it’s not corrupted. If it is, re-download the file and/or re-copy the file to the micro SD card.

  13. davidMetal
    January 13th, 2017 at 18:21 | #13

    @cnxsoft
    Thank you @cnxfsoft.
    I appreciate your response.
    I will review the downloaded file again using MD5 to confirm it is not corrupted.

    I was also thinking – the file name of the latest R-Box Pro 3g on the geekbuying site includes “(” “)” parenthesis…

    I have a theory if I remove the non alpha characters before I use the burn tool I may have better luck? Unfortunately, I will not have a chance to try it again for another 2 days. 🙁

    I will keep you posted if this works.

  14. davidMetal
    January 23rd, 2017 at 16:25 | #14

    @cnxsoft
    Thank you @cnxsoft
    I figured out why the SDCard process did not work!
    The filename from Geekbuying had named the firmware file with special characters… I removed “(” and “)” and “+” and the upgrade by sd card worked.

    I still have NO WIFI but this is seperate to the topic on this page. I am so furious the wifi does not work! >:(

  15. Phatboyj
    February 25th, 2017 at 07:53 | #15

    @cnxsoft
    Will this method work to flash a Mecool BB2-Pro s912 Box with 3Gb DDR4 16GB Rom

    or is there a specific method for said box?

    preferably for Win10

    Thanks in advance,
    Phatboyj

    .

  16. February 25th, 2017 at 09:05 | #16

    @Phatboyj
    That’s for Amlogic TV boxes, so it should work in BB2 Pro too.
    If it does not then revert to Amlogic burning tool method.

    Note that many companies simply release a ZIP file that just need to be copied on a micro SD card to do the update.

  17. Poetatoman
    March 15th, 2017 at 22:20 | #17

    Hello, I have a question about my boxes for anyone that might be able to help.
    I have purchase 4 separate Mini M8S II S905X boxes that have identical pre-installed setups. They came with Kodi 16 installed and I updated ONE of them to Kodi 17. After this ALL of the installed content associated with Kodi was gone. Being a newbie to these type boxes but a veteran of computer world, I spent weeks of “finding” the required installation procedures and files out of all the “crap” all over the internet, then installing all the accessories, a new skin, figuring out customizing new skin, testing all the apps (which Kodi has now shut off access to some in version17), and setting the cache correctly with ares wizard.
    Now finally down to the question:

    Is it somehow possible to download my entire systems settings, programs AND zip files COMPLETELY from this machine to a SD card and then install ALL that info including settings on these 3 other identical machines? Or use a USB to USB cable and somehow copy the system from the one to the other?

    If so ANY instructions or links would be GREATLY appreciated!

    This would undoubtedly save me a week of setup on each machine. I did a backup of this machine on a USB stick. Using the system backup AND then the Kodi backup. Then inserted the USB into the other machine. It wouldn’t find the backup file. I then installed Kodi 17 on the second machine and tried again. I also tried backup with ares wizard and still the second machine would not use the backup.

  18. Theguyuk
    March 15th, 2017 at 23:46 | #18

    @Poetatoman
    If you go on Google Play, you can install the Complete Kodi setup Wizard by The app guru

    It can install or remove builds with a button click. I recommend it to you 🙂

  19. Poetatoman
    March 16th, 2017 at 04:23 | #19

    Yes, However I lose ALL my custom skin settings, favorites list, optional programs, ect., PLUS the last 4 weeks of work just to start all over again, no thanks…

    I’m looking to copy my entire ROM to SD and then copy that to the 3 other identical machines.
    So far I’ve tried:
    1. ROM Manager, (which was GREAT at fixing permissions to everything and I’m pretty sure it accomplished rooting. It has the option of Installing ROM from SD card, but NOT to save current ROM to SD card.) I also don’t really understand how to use it which may be my problem on this one.
    2. TWRP Manager (which states upon startup that the program is NO LONGER able to choose SD for backup and MUST use the ROM drive which makes NO sense. 4.7 GB of info backing up to an 8 GB ROM with 4.7 GB already there. Not sure how that would even work.
    3. Superuser which seems to just want you to upgrade to PRO to even use it so is USELESS to me.

  20. March 16th, 2017 at 09:15 | #20

    @Poetatoman
    From your comment above, I understand you’ve already use Kodi backup & restore instructions @ http://kodi.wiki/view/Backup using the Backup add-on. But while you can backup your Kodi 17 files, you can’t restore then on a similar model also pre-installed with Kodi 17.

    If so, I don’t have a solution, but have you already asked on Kodi forums?

  21. Poetatoman
    March 16th, 2017 at 21:27 | #21

    Thanks for this input, but I am not trying to ONLY back-up just the Kodi program. I purchased 4 identical Amlogic S905X boxes. After 4 weeks of customizing 1 of them, I now want to “copy” the ENTIRE BOXE’S ROM from this 1 machine to the other 3 directly, with USB, OR with SD. Kodi PLUS ALL the other base programs other than Kodi that come on before Kodi.
    I see many ways of downloading other peoples AND update .img files for this machine. I am trying to find out if there is any program or hardware which will copy this particular box’s ENTIRE SYSTEM. Then put it on the other boxes. It seems that this (should) be possible. After all the producer made 1 and then copied that system to thousands after it. Would this technology make it out to the public or is it just done by the manufacturer ONLY? Thanks again! The MBOX’s main backup won’t load into another machine either.

  22. March 17th, 2017 at 09:48 | #22

    @Poetatoman
    Sorry I misunderstood.

    Normally companies develop the firmware using an SDK, commit changes to a version control repository, and then build the firmware image from that SDK before flashing it to the board. They don’t flash the image to a board, then make some modifications there, and read it back.

    There might be a way, but I just don’t know it. You could use dd to backup the complete eMMC flash, and then dump it on another device. This could word, but this could also brick your target device. The guys at freaktab are very good at this, but I think they do the changes inside the firmware image, instead of the doing it on the box. You could ask on their forums if you have not done so already.

  23. Umar Amin
    April 3rd, 2017 at 05:07 | #23

    Hi
    I just reinstalled the software of my Android tv box i.e CSA93 32 GB ROM 3 GB ram. But after reinstalling I lost my connection to WiFi.

    Neither my wifi is connects nor its highlighting.

    So pls guide me which firmware I should install.

    Regards
    Umar amin

  24. April 3rd, 2017 at 09:04 | #24

    @Umar Amin
    The likely reason you don’t have WiFi anymore is because the image you used is not made for your TV box. You need to find the right image. Contact your seller to try to get it.

  25. Meakai
    May 2nd, 2017 at 07:49 | #25

    Not so sure about TWRP Manager, but regular TWRP works for me.
    Boot into recovery, select storage and backup the data partition only, or the boot,system and data partitions to ensure that all boxes are identical. Boot into recovery, select storage and restore on the other three boxes.

    Just search for TWRP+S905X

  26. Ibraheem
    May 10th, 2017 at 15:28 | #26

    Hi, I have H96 pro plus, and tried the bootable card method, and on the boot, it only showed H96 logo and then no more display, and no further activity, plus my box doesn’t load/boot, only blue light appears and that’s it, any suggestion how to recover from this?

  27. May 10th, 2017 at 16:48 | #27

    @Ibraheem
    If the SD card methods above do not work, then try Amlogic USB burning tool.

  28. lev2k
    June 17th, 2017 at 17:11 | #28

    Does somebody have a download link for a “Wetek Core” full .img file?
    Not just the ***** OTA file…

  1. No trackbacks yet.