How to Customize Amlogic Android Firmware – A Tutorial with NEXBOX A95X (S905) TV Box

CNXSoft: Bear in mind that there are multiple versions of Nexbox A95X. Yesterday, I published the review of Nexbox A95X with Android 6.0, with the model based on Amlogic S905X processor. In this article, Karl had a look at Nexbox A95X with Amlogic S905 processor, which he purchased a couple of months ago, but since he was not happy with the Android 5.1 firmware, he decided to customize it.

Karl here with a review of the Nexbox A95X S905 box. This took a while to even start. I received the box about 2 months ago and I dived right in and broke it. I didn’t have factory firmware, and wasn’t cautious enough and bricked it. I found some firmware that worked but it didn’t work very well for me. Email’s to Nexbox directly didn’t help and I was stuck with a bricked box… I later found someone who had factory firmware and was kind enough to share and I was back in business. But I still didn’t like it, as it felt sluggish when doing anything else besides Kodi and missing notifications and navigation bar.

Click to Enlarge
Click to Enlarge
Click to Enlarge
Click to Enlarge

Quest to find better firmware

There is a dirty little secret with these boxes and it is a little unfair to the manufacturers who do make good software but you can just about flash any firmware on any matching processor box. The biggest thing is to match the WiFi chip. They will sometimes brick hard and to restore requires shorting pins on the NAND flash. It is pins 29 and 30 on this one (TBC). Short the pins while connect to PC, and apply power and you are able to flash new firmware. I never had to do it on this one. The A95X has an RTL8189ETV WiFi chip as can be seen in the picture above. So I did some searching for “S905 RTL8189 Firmware” and I found some, but they were not any better. If WiFi doesn’t matter and you have Ethernet you will have better luck or can use a USB to Ethernet adapter if the firmware supports it.

Review Turned into a How To

I wasn’t happy with anything (I know….I am needy). So what do we do? Go and try a manufacturer’s who put out good software regardless of WiFi and Ethernet. I had used Tronsmart’s S905 firmware on another box and it is pretty good. So I started there and flashed it and the box booted but without WiFi, nor Ethernet, and I assume no remote control either (I don’t typically use the remote and test with Logitech K400R). So I tried to use this firmware as ROM to port from, and now the time consuming part starts…

Setup

Before we begin I will put out the typical disclaimer that you assume all risk and don’t blame me. If you don’t want to have to do this buy a box from a good manufacturer. Several stand out… search for reviews in CNX Software, or other forums.

I do all my work in Windows, so no Linux is necessary but just recently upgraded to Windows 10 and with bash opens up some additional possibilities I have yet to explore. I did try mounting an img but it doesn’t support it yet.

Below is the main software that I use. If you know any other alternatives please leave a comment. Especially Beyond Compare only 30 day evaluation. It is not too expensive and I use it for other things. Install all the programs below with defaults and it should work except the Customization Tool. Install it to someplace other than Program Files. It will save button presses when needing elevated privileges.

Customization Tool

I will be going to go over the basics of this tool. When you first load the tool it will be in Chinese. The 2nd menu Item in the top will set it to English, and it will remember it the rest of the time.

Amlogic_Customization_English

The first step is to unpack the img files. Press the load button, and you will be prompted to what you want to unpack. I check them all at this point except the bottom one. There is an issue right now with the tool with the last one. Then choose the img we are porting to. This will take a while. Amlogic_CustomizationTool_Load

Amlogic_Customization_Tool_Settings

Once the img is unpacked navigate to where you installed the customization tool and rename the tmp directory to Tronsmart.

NEXBOX-A95X-Customization

Now repeat the process again with the Nexbox Stock img. Don’t close the Customization Tool until we are done.

Now we have 2 img’s fully unpacked and in each directory we have 2 folders: Level 1 and Level 2. Level 1 has all the individual partitions and we won’t be doing anything in there today. Level 2 has the different partitions broken out so we can manipulate them. We will only have to go into system to do this port.

NEXBOX-A95X_System

Now in the Nexbox firmware,  delete app, fonts, framework, media, priv-app in the system directory, and copy them over from Tronsmart.

At this point go back to the Customization Tool Press the Pack button and save it somewhere. If I was doing this the first time I would flash and do some testing to see if it booted, Wifi, remote etc. This also gets you to a good spot to go back to so in case something goes bad you don’t have to do the whole thing over again. As you are exploring it is good to do this often to save some headache and time.

Beware once you pack an img, as you must close the customization tool down and unpack the last one you packed. There is a bug if you pack make a change test then pack again without restarting and reopening. All the img’s after that first pack won’t be able to be unpacked by the tool.

Final Tweaks

Here is our chance to remove all the bloat and clean the img up. When I clean an img I take a picture of the app drawer with my phone and remove any unwanted apps from the app directory or priv-app directory. Be aware there is also a pre-install directory that won’t install anything. I removed everything to tidy up. I did try to fix quickly but didn’t spend much time on it.

I also replaced the Tronsmart boot animation with a different one. It is in the media directory.

Extra’s

You can also modify boot img and logos with this tool. I use gimp to modify logos. First I would navigate to the logo folder in the level 2 directory. The largest file bootup is a bmp file. Rename to bootup.bmp, right click on it go to properties and note the dimensions and bit depth. In this case it is a 32bit 1280×720 bmp img. Find whatever picture or logo…your imagination is the limit but you have to make sure your dimension and bit depth are exact. In gimp you export to bmp and choose 32 bit…if done correctly your file will be the exact same size as the original. Rename bootup and delete the original. When done you can pack and enjoy your new logo. I believe the tool itself will import but I like to do it by hand. The only thing I use the tool for is to unpack and pack the img.

Troubleshooting

So we haven’t touched a couple tools so far. That is a good thing. But if we did run into some trouble Beyond compare can drastically reduce the time to find. With this tool you can compare all the files from the stock rom, and the rom you are porting to. If I ran into troubles with booting start with comparing kernel in level 2. Maybe in one of the rc files a reference something differently. This can lead to many hours lost. I have lost many and not succeeded. Be prepared to do lots of reading and research. I included HXD and Notepad++ if you had to modify a file. In the Windows notepad it doesn’t recognize Linux carriage returns.

If you’d just like to install the custom image on your NEXBOX A95X (Amlogic S905 only) TV box, here’s the custom firmware link.

Support CNX Software - Donate via PayPal or become a Patron on Patreon

115
Leave a Reply

avatar
104 Comment threads
11 Thread replies
18 Followers
 
Most reacted comment
Hottest comment thread
40 Comment authors
jbgANIBAL MACHADO JUNIORs. hippyJohn SmithЛеонид Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
reaper1129
Guest
reaper1129

The server at http://www.freak-tab.de is taking too long to respond.

Jean-Luc Aufranc (CNXSoft)
Admin

@reaper1129
They must have a server problem now. Alternative link: https://yadi.sk/d/smG7GklHrnsfJ

reaper1129
Guest
reaper1129

@cnxsoft
Thanks

mdel
Guest
mdel

@Karl
can i assume you also got a A95X box without the back heatsink plate (check A95X s905x cnxsoft teardown), only the tiny heatsink as show on your picture above ?

notso stoopid
Guest
notso stoopid

Karl
I would like to discuss a very unique S905x firmware customization project with you
Please call and leave message on +1 703 677 8538

Thanks

KodiLoaded
Guest

Karl Johnson :
Links missing. Beware the freaktab is still down right now.
TWRP for MiniMX that works Thank you Sabai http://www.freak-tab.de/abdul_pt/aml/TWRP_MiniMX.img
TWRP for A95X Thank you Konsta http://www.modaco.com/forums/topic/377557-recovery-twrp-302-0-for-nexbox-a95x/
LibreElec Thank you Sabai https://forum.libreelec.tv/thread-524.html
Also one user pointed out preinstall doesn’t work in the ported rom. To fix Unpack the Tronsmart Port Finished with the customization tool and navigate to init.amlogic.board.rc Line 90 change in the 2nd level kernel.


Shell

on property:init.svc.bootanim=stopped
#start preinstall
start rootservice

123

on property:init.svc.bootanim=stopped#start preinstallstart rootservice

to


Shell

on property:init.svc.bootanim=stopped
start preinstall
start rootservice

123

on property:init.svc.bootanim=stoppedstart preinstallstart rootservice

I tried this, preinstall is still not working

KodiLoaded
Guest

Here’s a thought, Would you simply upload the corrected init.amlogic.board.rc file for us ?

KodiLoaded
Guest

Ok I got it working, But not right, In the tronsmart rom it just boots up, some apps are installed and others appear when they feel like it, Why does it install this way, On the NEXBOX-A95X.img rom it actually has a pre install screen during boot and everything gets installed before its finished booting.

KodiLoaded
Guest

I found my problem, If you have an app named like this ( Advanced Task Manager.apk ) It will not install.
But if you rename it to ( Taskmanager.apk ) It installs just fine. How hard would it be to make the tronsmart rom install on first boot, Seems this can take a few reboots for everything to show up.

KodiLoaded
Guest

I just added the kodi.zip extract back to the preinstall.sh and now that’s working again too.

#!/system/bin/sh
MARK=/data/local/symbol_kodi_addons_installed
if [ ! -e $MARK ]; then
busybox rm -rf /storage/sdcard0/Android/
busybox unzip /system/media/kodi.zip -d storage/sdcard0/
touch $MARK
echo “OK, installation complete.”
fi
MARK=/data/local/symbol_thirdpart_apks_installed
PKGS=/system/preinstall/
LOGTEXT=/data/local/log.txt
if [ ! -e $MARK ]; then
touch $LOGTEXT
echo “booting the first time, so pre-install some APKs.”
echo “booting the first time, so pre-install some APKs.” >> /data/local/log.txt
#busybox find $PKGS -name “*\.apk” -exec sh /system/bin/pm install {} \;
APKLIST=’ls /system/preinstall/*.apk’
for INFILES in $APKLIST
do
echo $INFILES >> /data/local/log.txt
/system/bin/pm install -r $INFILES
done
# NO NEED to delete these APKs since we keep a mark under data partition.
# And the mark will be wiped out after doing factory reset, so you can install
# these APKs again if files are still there.
# busybox rm -rf $PKGS
echo “OK, installation complete.”
echo “OK, installation complete.” >> /data/local/log.txt
touch $MARK
fi
exit 1

KodiLoaded
Guest

I dont suppose you know how to remove rocketclean from the navbar permanently ?

KodiLoaded
Guest

Hmm thanks but I think I will disable my Navbar, Stock remote wont navigate it

KodiLoaded
Guest

Screenshot of the Preloaded rom I just packed for myself

https://s9.postimg.org/r50500svj/Screenshot_2015_01_01_00_02_49.png

ZepperDude
Guest
ZepperDude

Will the new firmware allow for the use of USB Bluetooth adapters?

Vadim K
Guest
Vadim K

Hi guys!

Did anyone have any luck enabling status & navbars? Or can anyone confirm that exposed with gravity box can do the trick?

Thanks !

KodiLoaded
Guest
Vadim K
Guest
Vadim K

KodiLoaded :
@Vadim K
Use the Tronsmart ported rom its has both working
http://www.mediafire.com/download/fbyc6cuftp4x8qb/Tronsmart+Port+to+A95X+S905.zip

thanks for the tip! Will it work with the newer a95x which runs on s905x?

KodiLoaded
Guest

@Vadim K

No its only for the S905

Vadim K
Guest
Vadim K

@KodiLoaded
too bad 🙁 … any other ‘manual’ way I can add the status/key bars?

KodiLoaded
Guest

@Vadim K

None that I am aware of.

ZepperDude
Guest
ZepperDude

KodiLoaded – Silly question based on not enough caffeine this morning. How do I install your custom image? I have it downloaded and see that it contains the TronSmart .img file as well as a Vidon APK. Thanks,

KodiLoaded
Guest

@ZepperDude

That is not my firmware, I am not sure who did it but it runs really well on my box, You need a Male A to Male A USB cable.

https://www.amazon.com/Super-Feet-Male-Cable-Generic/dp/B000BSJFFC

If you dont have one you can always cut 2 usb cables in half and put the 2 male ends together, Wires are color coded so you cant mess it up.

Then you need the Amlogic Burn Tool.

https://www.dropbox.com/sh/9y3e0xge4tpcjh2/AADQ93wDcgeRct2dX2AjjwrBa/setup_v2.0.8.exe?dl=0

Here are instructions how to use it.

http://www.cnx-software.com/2014/04/16/how-to-firmware-upgrade-amlogic-s802/

Mr d
Guest
Mr d

Does this rom work for a95x android 6.0.1 ram 2gb rom 8gb?

KodiLoaded
Guest

NO this rom is for the A95X with the S905 not the S905X

KodiLoaded
Guest

Does anyone have any idea why when you edit the firmware for this box in the Amlogic firmware builder then repack .img root seems to be lost most of the time ?

SkItZo
Guest
SkItZo

Hi all

I have been trying to flash this firmware with he usb burning tool however either my a95x is not detected by windows when in recovery or when it is connected to the pc, i press the recovery button, it sits at the a95x boot screen screen and is detected but fails with send command/usb control setup error

Any help would be appreciated

Thanks

KodiLoaded
Guest

SkItZo :
Hi all
I have been trying to flash this firmware with he usb burning tool however either my a95x is not detected by windows when in recovery or when it is connected to the pc, i press the recovery button, it sits at the a95x boot screen screen and is detected but fails with send command/usb control setup error
Any help would be appreciated
Thanks

Load the firmware IMG file into the USB burn-tool, Click start.

Now with the power cable ( NOT ) connected to the A95X

Connect USB to PC/Lap

Plug the USB Cable into the rear most port on the A95X

Firmware will start to load, When it reaches 100% unplug USB Cable and close burntool.

Boot up A95X with newly loaded firmware.

SkItZo
Guest
SkItZo

@KodiLoaded
Still got the same message sadly. I think it might be my usb a to usb a cable
Thanks for the help though 🙂

KodiLoaded
Guest

Where are you getting this message, still sounds like your doing it wrong.

Goran
Guest
Goran

i have the same issue, it seems that my usb cable isn’t good. i made it by my self. just use two male cables, and solder the wires with the same color. is it possible to update img with TWRP 3.0.2-0?
and whitch is the most rear usb port? near TF?

KodiLoaded
Guest
Goran
Guest
Goran

thnx, i locate the OTG USB port, but what about drivers, and recognizing device? perhaps some direction?

KodiLoaded
Guest

The drivers are installed when you install the Amlogic USB Burn Tool, Pay attention when you install it you well get a separate window that opens up for the driver install, Here is a link to the latest USB Burn Tool.

https://drive.google.com/open?id=0B4otF-iFi7U2STlkTklKYjJvZ0k

Goran
Guest
Goran

yep, but acording to the libusb-win32-bin-README.txt in C:\Program Files (x86)\Amlogic\USB_Burning_Tool\libusb-win32-bin-1.2.6.0, there isn’t any dll, or sys in those locations. i have win7 x64 N and latest UBT.

i’m now at TWRP, USB is conencted, and UBT fireup/importted/started, but i do not have anyconnection on my laptop USB hub

KodiLoaded
Guest
Goran
Guest
Goran

it finally works, but there is a problem, i have 8Gb and 1Gb RAM version, so after i write your image, i have 0B NAND device;-) i succefully restore from backup original image.

KodiLoaded
Guest

The firmware on this page is for the A95X 8G-1G S905 Version, Not the S905X

Goran
Guest
Goran

how i can be shure that i have this version? on the bottom, it say A95X 8G-1G S905 on the sticker.

KodiLoaded
Guest

Then you have the correct version, The other version would have had Android 6 on it and not 5.1.1

Goran
Guest
Goran

so what image should i then try?

Goran
Guest
Goran

yep, it works, but it is striped down, no application, no kodi, poor remote support, but it is fast.

KodiLoaded
Guest

Goran, Visit my forum http://kodiloaded.com/smf.

Signup and send the Admin D-Bones a message, I will have a new firmware fully loaded shortly.

KodiLoaded
Guest

Apparently the Tronsmart+Port+to+A95X+S905.zip was done wrong, Once you unpack and repack even if you dont touch anything root is lost. Does not happen with the Nexbox firmware.