Bl301 injection, problems, help,

Thank you for your time and work trying to solve this issue! :slight_smile:

I’m having the same issue with my Beelink GT1 mini (S905X2, 4GB).

The injection seemed to be successful:

blgtmini:~ # inject_bl301  
Starting bootloader blob BL301 injection tool...

This tool can be used to update the bootloader
blob BL301 of the vendor bootloader on the internal
eMMC. This bootloader blob BL301 is customized by
Team CoreELEC to support all wake-up features like
CEC, Wake-On-LAN, IR, and GPIO wake-up from
suspend or power off state!

Device serial number: 280b40000xx71800000xx4354b48xxxx
Using CPU type G12A (28): S905D2, S905X2
Using binary type because of CoreELEC DT-ID: Generic
Using /dev/bootloader as bootloader partition
Found TOC_HEADER at:            0x00010210
Name:                           AA640001
Serial Number:                  12345678
Flags:                          0

UUID:                           9766FxxD89BEExx9AE5D78Axx0608xxx
Offset Address:                 0x5C000 (absolute: 0x6C210)
Size:                           0xE570
Flags:                          0x0
Found BL30 blob image at:       0x0006C210
Amlogic magic:                  @AML
Old signature:                  EDCBF47E5F527D8AD93AE5962D8F01B615B7C02AE1498774
Using BL301.bin:                Generic_28_29_bl301.bin
New signature:                  EDCBF47E5F527D8AD93AE5962D8F01B615B7C02AE1498774
Update of BL301.bin on eMMC is not needed, exit now...

But after a reboot and then shutting down using the Kodi GUI the box still won’t start by pressing the power button on the remote.

I’ve not read the whole thread, yet, but I also tried:

fw_setenv upgrade_step 3

reboot, shutdown, still no reaction.

Some more info (happy to provide more!):

blgtmini:~ # fw_printenv bootfromsd
bootfromsd=if mmcinfo; then run cfgloadsd; if fatload mmc 0 ${loadaddr} kernel.i
mg; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi; fi

You need to remove # in this line # remotewakeup='0x31ce4db2' of config.ini
I think 0x31ce4db2 is your ir power code, if not then change it too

Correct, it needs to be enabled in config.ini.

Use this guide:

Thank you, it works fine now! :slight_smile:

The IR code for my box (Beelink GT1 mini, S905X2) was: 0xa659ff00

1 Like

Hi, I have an X96 Air P2 (S905x3, 4gb/32gb, dual band wifi, gigabit ethernet). If I shutdown the box from Android the remote can turn it back on fine, if I shutdown from coreelec the remote can’t turn it back on and I have to toggle the power, any ideas as it’s super inconvenient.

Can this sort it? I’ve noticed on the nightlies it’s built into the coreelec menu now although the “IR Remote Power Code” has limited options and not matched mine so I’ve not tried it. Assistance appreciated.


Have you tried to run inject_bl301?

And you need to setup your IR waje up code in config.ini:

In last nigthly there is a new hardware section in CoreELEC settings. There you easily can run the BL301 injection and setup a common IR wake up code.

Did you try inject_bl301 ?

I haven’t run it yet as it doesn’t list it as the S905X3 as compatible so I was asking if it was safe, I’ve seen it in the coreelec menu but it only had limited options and you can’t see the code to check it matches mine, does it use the config.ini if I don’t select one of those? Also should the config.ini be totally empty other than just the wake up code?

The inject_bl301 is compatible with SM1 CPU since a few nightlies.
There right now only “standard” IR wake up codes in the Kodi addon. But the manual method is still working.

1 Like

I confirm the BI301 injection works on X96air but I’ve one doubt
do I need to remove # from the lines?


IR setup

Setup a custom keycode to wake the N2 from suspend or poweroff

You can stop kodi and eventlircd and use “ir-keytable -u” to obtain a compatible u-boot

IR keycode


decode_type can be one of the following:

NEC=‘0x0’, DUOKAN=‘0x1’, TOSHIBA=‘0x2’, RCA=‘0x3’, RC5=‘0x4’, RC6A=‘0x5’, NEC_TOSHIBA_2IN1=‘0x6’,

NEC_RCA_2IN1=‘0x7’, RCMM=‘0x8’, NEC_RC5_2IN1=‘0x9’, NEC_RC5_2IN1=‘0xa’, RC6=‘0xb’

decode_type=‘0x0’ # NEC

remote power key mask:

Some IR protocols implement a toggle bit, this can be ignored by the “and” mask:

RC5=‘0x37ff’, RC6=‘0x1effff’, RC6A=‘0xffff7fff’



You only need to remove the # from the remotewakeup, decode_type, and remotewakeupmask lines when setting the remote wakeup code.

As @Portisch pointed out you can select a remote from the gui by going to Settings > CoreELEC > Hardware >IR Remote Power Code There is currently the option of setting the code for remote, Beelink, Minix, Hardkernel, Khadas, and MCE(microsoft media centre, or remotes set to emulate this) remotes from the gui. Other remotes can still be added by editing the config.ini the same way as before.

I will be adding a custom remote option to the settings gui that will allow you to set any remote you want from the gui. However doing so will take a little longer to implement.

1 Like

Thanks, that sorted it for me, it’ll be good when custom codes can be set via the interface as I’ve got friends who find using putty a bit too technical.

I’ve read that in last nighly build was added support to GXL/GXM into inject_bl301 project. This mean that, can it be installed on S912/S905 boards like Minix U9-H?


The tool inject_bl301 is supporting now Amlogic V2 bootloader encryption what is used for GX* boards. Sometimes it’s also used for G12* boards.

The bl301 blobs itself are not finished yet. Also the implementation of Amlogic-ng on GXL/GXM isn’t finished yet.


So, until blobs are not finished cannot be used in gxl/glm boards?

Is there intention to finish inject_bl301 for old boards eventually? If so, many thanks!

Using this bootloader patch on Beelink GT1 Mini w/firmware build: 004P0 (Is latest firmware package to date for this device);

Under CoreELEC

Powering Off: Yes, TV-Yes ( Using rc_keymaps )
Powering On: Yes, TV-Yes

Now Under eMMC ( Android Pie )

Powering Off: Yes
Powering On: No ( so this is broke after the patching. )

1 Like

I do hope so. I have a S912 box that really could use this!

Here I’m having this exact issue with the X96 Air (S905X3). Rebooting to Android from within CE, then shutting down the box with the remote. The remote won’t turn it on again, it needs to be unplugged and plugged in again. CE on and off works fine without any Android.