Sunteți pe pagina 1din 22

How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

CNXSOFT – EMBEDDED SYSTEMS NEWS


News, Tutorials, Reviews, and How-Tos related to Embedded Linux and Android, Arduino, ESP8266,
Development Boards, TV Boxes, Mini PCs, etc..

N OV E M B E R 1 9 , 2 0 1 6 BY J E A N - LU C AU F R A N C ( C N X S O F T ) - 4 9
COMMENTS

How to Create a Bootable Recovery SD


Card for Amlogic TV Boxes

I reviewed Rikomagic MK22 TV box about two weeks ago, and with the
�rmware I had, online �rmware update was not enabled, and the company
only released .IMG �rmware 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 �rmware update is not working either, and again I only
managed to �nd .IMG �rmware for the box on GeekBuying. However, I’ve been
informed that “USB Burning Tool” �rmware can now be �ashed through a
micro SD card, or USB �ash 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 �rmware �le (twice), I ended up
This with
website usesimg
a single cookies
�rmwto improve your experience. We'll assume you're ok with this, but if you don't like these, you can
remove them Accept Read more

1 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

First we’ll need to have a tool to extract some �les from the �rmware. Create
aml-upgrade-package-extract.c with the code below which I found on
Freaktab too and slightly modi�ed it to parse the �rmware �lename:

1 #include <errno.h>
2 #include <inttypes.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <string.h>
6 #include <arpa/inet.h>
7
8 uint32_t convert(uint8_t *test, uint64_t loc) {
9   return ntohl((test[loc] << 24) | (test[loc+1] << 16) | (test[loc+2] << 8)
10 | test[loc+3]);
11 }
12
13 void main (int argc, char **argv) {
14   FILE *fileptr;
15   uint8_t *buffer;
16   long filelen;
17
18   FILE *f;
19   char *filename;
20   uint64_t record;
21   uint64_t record_loc;
22   uint64_t file_loc;
23   uint64_t file_size;
24
25 if (argc <= 1) {
26     printf("Usage: %s [firmware-file-name]\n", argv[0]);
27     exit (0);
28 }
29
30   fileptr = fopen(argv[1], "rb");
31   fseek(fileptr, 0, SEEK_END);
32   filelen = ftell(fileptr);
33   rewind(fileptr);
34
35   buffer = (uint8_t *)malloc((filelen+1)*sizeof(uint8_t));
36   fread(buffer, filelen, 1, fileptr);
37   fclose(fileptr);
38
39   for (record = 0; record < (uint8_t)buffer[0x18]; record = record + 1){
40     record_loc = 0x40 + (record * 0x240);
41
42     filename = (malloc(32));
43     sprintf(filename,"%s.%s",(char *)&buffer[record_loc+0x120], (char *)&bu
44 ffer[record_loc+0x20]);
45
46     file_loc = convert(buffer,record_loc+0x10);
47     file_size = convert(buffer,record_loc+0x18);
48
49     f = fopen(filename, "wb");
50     if (f == NULL) {
51      printf("ERROR: could not open output\n");
52      printf("the error was: %s\n",strerror(errno));
53      free(filename);
54      continue;
55     }
56     fwrite(&(buffer[file_loc]), sizeof(uint8_t), (size_t)file_size, f);
57     fclose(f);
58     free(filename);
59   }
free(buffer);
}

Now compile the tool with gcc:

1 gcc aml-upgrade-package-extract.c -o aml-upgrade-package-extract

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

2 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

1 ./aml-upgrade-package-extract aml_s912_q6330-R-BOX-PRO-3gddr-mac-20161015.im

It will extract a bunch of �les:

1 jaufranc@FX8350:~/edev/amlogic/s912$ ls
2 aml_s912_q6330-R-BOX-PRO-3gddr-mac-20161015.img logo.PARTITION
3 aml_sdc_burn.ini                                 logo.VERIFY
4 aml_sdc_burn.UBOOT                               manifest.xml
5 aml-upgrade-package-extract                      meson1.dtb
6 aml-upgrade-package-extract.c                    platform.conf
7 bootloader.PARTITION                             recovery.PARTITION
8 bootloader.VERIFY                                recovery.VERIFY
9 boot.PARTITION                                   system.PARTITION
10 boot.VERIFY                                      system.VERIFY
11 DDR.USB                                          UBOOT.USB
12 keys.conf

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

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

1 lsblk
2 NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
3 sda      8:0    0 931.5G 0 disk
4 ├─sda1   8:1    0 915.9G 0 part /media/hdd
5 └─sda2   8:2    0 15.6G 0 part
6 sdb      8:16   0 111.8G 0 disk
7 └─sdb1   8:17   0 111.8G 0 part /
8 sdc      8:32   0 931.5G 0 disk
9 └─sdc1   8:33   0 931.5G 0 part /media/jaufranc/SEAGATE EXTENSION
10 sdd      8:48   1   3.8G 0 disk
11 └─sdd1   8:49   1   3.8G 0 part /media/jaufranc/6106-E11B
12 sr0     11:0    1   630M 0 rom /media/jaufranc/CanonEOS285W
13 loop0    7:0    0    75M 0 loop /snap/ubuntu-core/423
14 loop1    7:1    0   4.3M 0 loop /snap/canonical-livepatch/17
15 loop2    7:2    0   4.3M 0 loop /snap/canonical-livepatch/15

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

1 sudo umount /dev/sdX*


2 sudo dd if=aml_sdc_burn.UBOOT of=/dev/sdX bs=1 count=442
3 sudo dd if=aml_sdc_burn.UBOOT of=/dev/sdX seek=1 skip=1 bs=512
4 sync

and �nally re-mount the SD card/�ash drive, copy the �rmware �le and
aml_sdc_burn.ini to the root of the device, and rename the �rmware to
aml_upgrade_package.img to match the string in aml_sdc_burn.ini:

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


2 cp aml_s912_q6330-R-BOX-PRO-3gddr-mac-20161015.img [device-mount-point]/aml_
3 upgrade_package.img
sudo umount /dev/sdX*

Now make sure no other USB devices or SD card are inserted in the TV box,
This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

3 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

start straightaway, but if it is partially bricked or just working �ne, 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.

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

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

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

4 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

Windows Method: Burn Card Maker


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.

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.

Leveraging the Kaseya MSP Benchmark


Survey Responses
Ad Learn how to transform your business to become a
bionic msp. Download your ebook now.
Kaseya

Download

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

5 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

Unlimited Hosting Bebas Tanpa Batas


Rp19.900/bln Gratis Domain + Certificate…
Ad Hosting Murah Unlimited Space, Database, Email,
Bandwidth, Hanya Rp 19.900/bulan.
Qwords Company

Learn more

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

…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 �le, and press “Make” button to start create a bootable
recovery (micro) SD card.

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

6 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

Unlimited Hosting Bebas Tanpa Batas


Rp19.900/bln Gratis Domain + Certificate…
Ad Hosting Murah Unlimited Space, Database, Email,
Bandwidth, Hanya Rp 19.900/bulan.
Qwords Company

Learn more

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 �rmware update will start
automatically.

Good Luck!

Related posts:

1. How to Extract a
Device Tree File from
Android Firmware
Files
2. How to Root Amlogic
S905 based MINIX
NEO U1 Box in
Windows and Linux
3. How to extract
kernel.img with
mkboot script
4. How to Open
Tronsmart Vega S89
(Elite) and Access the
Serial Console
5. How to Update
Firmware on Amlogic
S905 TV Boxes

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

7 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

A M LO G I C , A N D R O I D, L I N U X , U B U N T U , W I N D OW S 1 0

A M L O G I C , F I R M WA R E , H O W -T O , T U T O R I A L

49 Leave a Reply

CONNECT WITH:

45  4  17      28

  Subscribe    newest  oldest  most voted

GanjaBear 

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

I wonder if getting Update&Recovery to reboot via a random .zip �le on


the card would work?

 0   Reply  2 years ago

GanjaBear 

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


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

 0   Reply  2 years ago

Jean-Luc Aufranc (CNXSoft) 

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

 0   Reply  2 years ago

FGBonn 

Hi, what if i dont have the IMG �le, but have an OTA zip?? is there a way i
Guest can �ash?
This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can
 Reply
remove them Accept Read more

8 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

AARON 

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

 0   Reply  2 years ago

balbes150 

AARON :
Guest I followed the steps to make a bootable SD card, and I can con�rm
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 �les 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

 0   Reply  2 years ago

Jean-Luc Aufranc (CNXSoft) 

@FGBonn
Author If you have an OTA image, then you can just copy the �le to the micro SD
card, and use the update app to �ash 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 �xed it for you.

 0   Reply  2 years ago

Vin 

I have also the rbox pro but the 2g variant downloaded the latest
Guest �rmware.unzip the �le and got the .img �le 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

 0  Reply 2 years ago


This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

9 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

Jean-Luc Aufranc (CNXSoft)@Vin 


Sometimes to possibly check:
* Make sure all options were ticked in the window program

Author
* Make sure you download the right �rmware for your box, e.g. for R-Box
Pro you can 2GB and 3GB �rmware
* Maybe try micro SD card from 4 to 16 GB, but nothing smaller or
bigger.

 0   Reply  2 years ago

Vin 

@cnxsoft
Guest 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

 0   Reply  2 years ago

davidMetal 

I too cannot make the SD Upgrade work… I spent 4 hours last night
Guest 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 �le is not visible at all… I am assuming because it is looking for a
.ZIP �le 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 �le again and go through the steps again. I have
no idea why! can someone provide feedback?

 0   Reply  2 years ago

Jean-Luc Aufranc (CNXSoft) 

@davidMetal
Author If you used the method above with the IMG �rmware, then �ashing
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 �rmware ends with “Android failure” logo showing a


red cross, verify your �rmware MD5 (e.g. with md5sum in Linux) to
make sure it’s not corrupted. If it is, re-download the �le and/or re-
copy the �le to the micro SD card.

2 years ago
 Reply your experience. We'll assume you're
This website uses cookies to improve ok with this, but if you don't like these, you can

remove them Accept Read more

10 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

davidMetal@cnxsoft 

Thank you @cnxfsoft.


I appreciate your response.
Guest
I will review the downloaded �le again using MD5 to con�rm it is not
corrupted.

I was also thinking – the �le 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.

 0   Reply  2 years ago

davidMetal 

@cnxsoft
Guest Thank you @cnxsoft
I �gured out why the SDCard process did not work!
The �lename from Geekbuying had named the �rmware �le 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 wi� does not work! >:(

 0   Reply  2 years ago

Phatboyj 

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

or is there a speci�c method for said box?

preferably for Win10

Thanks in advance,
Phatboyj

.

 0   Reply  2 years ago

Jean-Luc Aufranc (CNXSoft) 

Author

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

11 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

@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 �le that just need to be
copied on a micro SD card to do the update.

 0   Reply  2 years ago

Poetatoman 

Hello, I have a question about my boxes for anyone that might be able to
Guest 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 “�nding” the required
installation procedures and �les out of all the “crap” all over the internet,
then installing all the accessories, a new skin, �guring 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 �nally down to the question:

Is it somehow possible to download my entire systems settings,


programs AND zip �les 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 �nd the backup �le. 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.

 0   Reply  2 years ago

Theguyuk 

@Poetatoman
Guest 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

 0   Reply  2 years ago

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

12 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

Guest 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 �xing 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.

 0   Reply  2 years ago

Jean-Luc Aufranc (CNXSoft) 

@Poetatoman
Author 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 �les, 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?

 0   Reply  2 years ago

Poetatoman 

Thanks for this input, but I am not trying to ONLY back-up just the Kodi
Guest 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 �les
for this machine. I am trying to �nd 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.

 0   Reply  2 years ago

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

13 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

Jean-Luc Aufranc (CNXSoft)@Poetatoman 


Sorry I misunderstood.

Normally companies develop the �rmware using an SDK, commit


Author changes to a version control repository, and then build the �rmware
image from that SDK before �ashing it to the board. They don’t �ash the
image to a board, then make some modi�cations 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 �ash, 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
�rmware image, instead of the doing it on the box. You could ask on
their forums if you have not done so already.

 0   Reply  2 years ago

Umar Amin 

Hi
Guest 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 wi� is connects nor its highlighting.

So pls guide me which �rmware I should install.

Regards
Umar amin

 0   Reply  2 years ago

Jean-Luc Aufranc (CNXSoft) 

@Umar Amin
Author 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 �nd the right image.
Contact your seller to try to get it.

 0   Reply  2 years ago

Meakai 

Not so sure about TWRP Manager, but regular TWRP works for me.
Guest 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

 0   Reply  1 year ago

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

14 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

IbraheemHi, 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

Guest
load/boot, only blue light appears and that’s it, any suggestion how to
recover from this?

 0   Reply  1 year ago

Jean-Luc Aufranc (CNXSoft) 

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

 0   Reply  1 year ago

lev2k 

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

 0   Reply  1 year ago

Mark 

Just have to say how pleased I am to see some source code. I received a
Guest H96 Pro+ a couple of days ago and decided to upgrade the �rmware
shortly after getting the box up and running. In exploring the procedure
for performing the upgrade, I was shocked at how many folk are willing
to download an executable from some �le-sharing site and run it on
their workstation. That’s putting a lot of trust in several parties. My
workstation is just too important to me for that kind of recklessness.

But your snippet of C source is perfectly readable. I don’t have to trust it,
because I can understand exactly what it is doing. Thanks for sharing it.
I’ll sleep more soundly tonight.

 0   Reply  1 year ago

Ted 

Hello
Guest Have anyone here been able to update the �rmware on a Rikomagic
media player using the SD (microSD) card method ? thanks

 0   Reply  1 year ago

redsparow 

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

15 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

a screen is blocked with message “upgrading…”

I also tried with USB BURNING TOOL but i have this error after few
seconds:

[23:22:06 454][HUB3-2][Inf]————-ERASE FLASH———–


[23:22:06 454][HUB3-2][Inf]–disk_initial 1
[23:22:06 454][HUB3-2][Inf]–Send command success
[23:22:07 641][HUB3-2][Err]–failed:[23:22:07 641][HUB3-2][Err]–Check
command return failed

Any idea?

Regards

[23:22:07 673][HUB3-2][Err]–[0x30201004]UBOOT/Disk initialize/Send


command/Error result

 0   Reply  1 year ago

Sandor 

Hi,
Guest
First of all; thank you for sharing this information!

I tried creating a bootable sdcard (8GB microsd) using the instructions


below. But for some reason the card becomes unreadable/unmountable
with these parameters.

sudo umount /dev/sdd1


sudo dd if=aml_sdc_burn.UBOOT of=/dev/sdd bs=1 count=442
sudo dd if=aml_sdc_burn.UBOOT of=/dev/sdd seek=1 skip=1 bs=512
sync

Not sure what I am doing wrong. I checked the dd manual and


information on this website: http://linux-sunxi.org/Bootable_SD_card
but that did not make clear for me how I should change the command to
work with my particular card. Could someone please guide me in the
right direction? I have no access to a windows machine; was thinking
about running the bootcardmaker.exe tool in Wine or another VM but
the link to the �le on Media�re seems to be expired.

Any help would be much appreciated.

Sandor

 1   Reply  1 year ago

Robert 

@Poetatoman
Guest you could use ares backup to make a full system and kodi backup to
usb… install ares on the other boxes and use the restore function to
make em all duplicates

This website uses cookies to improve


 Reply your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

16 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

GanjaBear 
@Sandor

Have you seen the very �rst comment in this thread? It’s probably a safe
Guest bet your problem is the same and it’s necessary to move the start of the
1st partition to make more room for uboot.

As for the latter part of the comment, I was simply musing on how to get
this method to work with no reset switch present. I guess it’s not
possible.

 0   Reply  1 year ago

sketchman 

Doesn’t work for me with a USB thumb drive. First time I �ashed with an
Guest SD card. Right now I don’t have one. It just boots into TWRP. Won’t do
anything else.

 0   Reply  1 year ago

Stefan 

Hi and sorry for my english.


Guest Android or another Linux distro can run directly from SDCARD ?
I have a S802H box with bad NAND and can’t replace because pcb trace
(pad) are broken.

I tried with image for ODROID C1 (S905) but is not same CPU.
Many thanks!

EEEE I3000000032940xf100110003877500EEEE
I400000004294_M8_BL1_10221D113B323EEEE
I3000000032940xbbbb000026A22525EEEE
I3000000032940xf100110003877500EEEE
I400000004294_M8_BL1_10221D113B323EEEE I6000000062940
stage is skipped63936475EEEE
I3000000032940xbbbb000126B22525
———————————————————————–
* Welcome to Hardkernel’s ODROID-C… (Built at 19:33:00 Dec 8 2014) *
———————————————————————–
CPU : AMLogic S805
MEM : 1024MB (DDR3@792MHz)

 0   Reply  1 year ago

Jean-Luc Aufranc (CNXSoft) 

@Stefan
Author It could be possible, but I don’t think there’s a ready to use image. So
you’d need to work a bit on it.
This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

17 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

I could get to the terminal, but then I did not try further.

 0   Reply  1 year ago

Stefan 

@cnxsoft
Guest Many thanks for response!
I’ll try but I don’t know if I can do something.

 0   Reply  1 year ago

Hugh 

@Sandor
Guest Perhaps you are having trouble because you are following instructions
from linux-sunxi. They are for Allwinner Technology �rmware. Perhaps
AMLogic �rmware expects a different format.

 0   Reply  1 year ago

Hugh 

@cnxsoft
Guest Thanks for this article. I’m trying to �gure out how to update an S912
box.

In you C code, you try to report strerror when the fopen fails.
Unfortunately you use errno after a printf and that printf might have
disturbed errno. The simplest �x is to combine the two printfs into one
so that errno is fetched before the printf is called.

Just to be bulletproof, I’d put “errno = 0;” immediately before the fopen.

 0   Reply  1 year ago

Ervin 

@lev2k
Guest
Did you �nd IMG for Wetek Core? I need the same (hard brick).

 0   Reply  1 year ago

aljag 

work for h96 pro plus


Guest but for h96 max plus notwork and when push make button error
L100aml_sdc_burn.uboot and bootloader.partion all not in package

 0  5 months ago
This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

18 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

Vasjka 

Guest

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

19 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

Can’t conpile

# gcc aml-upgrade-package-extract.c -o aml-upgrade-


package-extract
aml-upgrade-package-extract.c: In function ‘main’:
aml-upgrade-package-extract.c:24:1: error: stray ‘\302’ in program
�� if (argc <= 1) {
^
aml-upgrade-package-extract.c:24:2: error: stray ‘\240’ in program
�� if (argc <= 1) {
^
aml-upgrade-package-extract.c:25:1: error: stray ‘\302’ in program
��   printf("Usage: %s [�rmware-�le-name]\n", argv[0]);
^
aml-upgrade-package-extract.c:25:2: error: stray ‘\240’ in program
��   printf("Usage: %s [�rmware-�le-name]\n", argv[0]);
^
aml-upgrade-package-extract.c:25:3: error: stray ‘\302’ in program
��  printf("Usage: %s [�rmware-�le-name]\n", argv[0]);
^
aml-upgrade-package-extract.c:25:4: error: stray ‘\240’ in program
��  printf("Usage: %s [�rmware-�le-name]\n", argv[0]);
^
aml-upgrade-package-extract.c:25:5: error: stray ‘\302’ in program
  �� printf("Usage: %s [�rmware-�le-name]\n", argv[0]);
^
aml-upgrade-package-extract.c:25:6: error: stray ‘\240’ in program
  �� printf("Usage: %s [�rmware-�le-name]\n", argv[0]);
^
aml-upgrade-package-extract.c:26:1: error: stray ‘\302’ in program
��   exit (0);
^
aml-upgrade-package-extract.c:26:2: error: stray ‘\240’ in program
��   exit (0);
^
aml-upgrade-package-extract.c:26:3: error: stray ‘\302’ in program
��  exit (0);
^
aml-upgrade-package-extract.c:26:4: error: stray ‘\240’ in program
��  exit (0);
^
aml-upgrade-package-extract.c:26:5: error: stray ‘\302’ in program
  �� exit (0);
^
aml-upgrade-package-extract.c:26:6: error: stray ‘\240’ in program
  �� exit (0);
^
aml-upgrade-package-extract.c:27:1: error: stray ‘\302’ in program
�� }

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

20 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

 0   Reply  4 months ago 

Jean-Luc Aufranc (CNXSoft) 

Are you trying to compile the program in Windows? If so, you


Author
may have to convert the �le to Windows format, but if you are
running Windows 10, probably better build the program in
Windows subsystem for Linux (WSL).

 0  Reply  4 months ago 

Vasjka 

I use Archlinux
Guest
# uname -a
Linux MY-PC 4.19.9-arch1-1-ARCH #1 SMP PREEMPT Fri
Dec 14 00:58:26 UTC 2018 x86_64 GNU/Linux
Maybe you need some libraries

 0  Reply  4 months ago 

Jean-Luc Aufranc (CNXSoft) 

I think it may be a copy/paste problem. You seem to


Author
have special characters in your text �le.

 0  Reply  4 months ago 

Vasjka 

Yes, exactly, I just solved it ^^


Guest
Thank you

 0  Reply  4 months ago

Alex 

I have created a script to make life easier for some users. Feel free and
Guest complete or change it to your liking.
https://gitlab.com/satriani-vai/tv-box_card_creator/blob/master/TV-
Box_card_creator
And please report the bugs if you found any

 1   Reply  3 months ago

Nicolas 

Thanks a lot for the instructions, was really helpful. One note, on my
Guest device I had to keep the reset button held during the entire process
otherwise it would freeze (no idea why). If you have some soldering skill,
I soldered jumper cables to gnd, tx, rx pads, having a serial terminal to

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can
 Reply 1 month ago
remove them Accept Read more

21 dari 22 28/04/2019 15.46


How to Create a Bootable Recovery SD Card for Amlogic TV Boxes https://www.cnx-software.com/2016/11/19/how-to-create-a-bootable-rec...

This website uses cookies to improve your experience. We'll assume you're ok with this, but if you don't like these, you can

remove them Accept Read more

22 dari 22 28/04/2019 15.46

S-ar putea să vă placă și