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.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX Rockchip RK3588 mini-ITX motherboard

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

  1. I apologize this wasn’t complete or even proof read. I’ll follow up with a part 2. Sorry for the miscommunication.

  2. @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 ?

  3. 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

  4. I think I will also let this be it and not follow up with 2nd part. It gets feet wet. If any specific questions feel free to ask.

  5. 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.

    to

  6. 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

  7. 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.

  8. It the original firmware there is an app that kicks off the service that runs on first boot. In this one it is installing in the background and the apps show up as they are installed.

  9. 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.

  10. Ohh yes spaces will stop it. If you are patient it should install them all on first boot. Might take a bit depending on how many and how big they are. Depends in launcher as well. You could script a reboot in that runs once in the preinstall script so you know when it is done.

  11. 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

    1. Open the systemui apk with winrar and replace the png with a blank one. Button is still there. Might have to deodex first.

  12. Remix OS Thank you Konsta http://www.modaco.com/forums/topic/377591-portrom38-remix-os-20-android-511-for-nexbox-a95x/  Forgot this important one

  13. Hi guys!

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

    Thanks !

  14. 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,

  15. @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/

  16. 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 ?

  17. 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

  18. 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.

  19. 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?

  20. 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

  21. 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.

  22. 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.

  23. Anthony Staunton :
    Not sure if this will do all that you require from Beyond Compare, but WinMerge can compare files/folders for you and is open source. Maybe it can replace BC for you.
    http://winmerge.org/

    Thank Anthony I have tried this among many other things, I just cant locate the cause of root getting lost in tronsmart rom when repacking .

  24. I would agree with you, However this only happens with this one firmware, I have done dozens of other amlogic firmware’s with no issues at all, Considering it only happens with the Tronsmart Port for A95X and no other firmware’s I think it’s safe to say its not on my end.

  25. @Anthony Staunton

    Once again I am using the Amlogic Firmware Customization Tool, It is for windows, It has everything it needs built into it, I built another custom firmware just last night for the A95X, Did not loose root, All you need with this tool is the java development kit, For some reason it just wont work with the Tronsmart ported firmware, No biggie the new update runs better anyways.

    KodiLoaded-A95X-Custom Firmware Patched – 201608151721- 8/19/16

    http://kodiloaded.com/smf/index.php/topic,1567.0.html

  26. Sorry, I have the silliest nube question. How do we flash the A95X by USB ? I don’t see any of the micro USB ports we usually see on these kind of devices. Only 2 standard USD ports.

  27. @Mychance

    Yup requires Type A to Type A cable. You can purchase online or make them. I sacrificed 2 cables connected the colors and have flashed with it over a hundred times without issues.

  28. Karl Johnson :
    @Mychance
    Yup requires Type A to Type A cable. You can purchase online or make them. I sacrificed 2 cables connected the colors and have flashed with it over a hundred times without issues.

    Thanks for the answer 🙂 I kinda have such a cable I got with a cheap external HDD but I am wondering if there is a special wiring like we have with the crossover ethernet cables. Am I gonna brick the box if the wires are crossed ?

  29. Is there any way to enable joystick/gamepad usb drivers for this box?

    I don’t find the latest 20160628 firmware bad, except that it includes no drivers for that…

  30. @Natalia Portillo
    You may simply need to find the driver for your joystick, a file with .ko extension. It’s possible somebody already compiled it for the box.

    If not, you’d have to build the module yourself using the kernel @ http://www.cnx-software.com/2016/08/19/amlogic-releases-linux-3-14-source-code-for-s905x-s905d-and-s912-processors-has-started-working-on-linux-4-4-android-7-0/

    The instructions @ http://www.cnx-software.com/2012/09/11/building-kernel-modules-for-allwinner-a10-devices-android/ can help you understand which modules to enable.

    If you attempt that, you may want to reverse a full day to complete the task…

  31. @Gal
    @Richard
    This may require compiling drivers for Bluetooth drivers, and/or modifying the Android firmware, which may or may not require Amlogic Android SDK. Better ask on Freaktab in case somebody managed to do it.

  32. Does anyone have a update zip firmware download link for the a95x s905x 2g/16g without reset button?
    I cannot reboot to boot loader and cannot get the box recognized properly by PC to use amlogic usb burning tool. The box is detected and disconnects intermittently. Thanks

  33. i know this is a bit off topic but i have been trying to modify a rom for an x9 android box. and as i have done many times in the past with android lolipop, but after saving the image file in customization tool, and flashing to the box, it boots into revovery. even if i simply modify the boot animation, same results. and crazy enough even without any modification to the rom, i simply pack it and try and flash it and my box only boots into recovery. i am totally frustrated. can anyone provide any help?

    thanks.
    Dave

  34. @KodiLoaded

    to fix the spaces, replace for INFILES in $APKLIST…etc with

    ls /system/preinstall/ | while read INFILES; do pm install -r “$INFILES” ;done
    then it would split it by lines not spaces

  35. Hello and thanks for this. I tried with both this and the previous version of the tool on fw from my Ugoos AM1. In both cases it says unpacked ok but there is what seems to be an error message “animation config description not correct” or something to that effect. Any idea what that is about? Cheers

  36. @Karl Johnson
    Is there a way to change output resolution from av port via build.prop?

    #UBOOTENV MTD NAME
    #ubootenv.var.bootcmd=
    #ubootenv.var.cpuclock=
    #ubootenv.var.gpuclock=
    #ubootenv.var.memsize=
    #ubootenv.var.ethaddr=
    #ubootenv.var.ipaddr=
    #ubootenv.var.gatewayip=
    ubootenv.var.outputmode=
    #ubootenv.var.screenratio=
    #ubootenv.var.oobeflag=
    ubootenv.var.480p_x=
    ubootenv.var.480p_y=
    ubootenv.var.480p_w=
    ubootenv.var.480p_h=
    ubootenv.var.480i_x=
    ubootenv.var.480i_y=
    ubootenv.var.480i_w=
    ubootenv.var.480i_h=
    ubootenv.var.576p_x=
    ubootenv.var.576p_y=
    ubootenv.var.576p_w=
    ubootenv.var.576p_h=
    ubootenv.var.576i_x=
    ubootenv.var.576i_y=
    ubootenv.var.576i_w=
    ubootenv.var.576i_h=

    I need 576i or 576p option

    Tanix TX5Pro

  37. Hi, original firmware spend to much cpu, is it possible to stop or even remove some services? In Kodi CPU utilization is below 5%…
    Regards.

  38. @Goran it depends on what you want to do with you box.

    I am only running kodi+esfile explorer+powermenu app.

    My App Folder looks like this: CaptivePortalLogin, CertInstaller, KeyChain, LatinIME, PackageInstaller, PacProcessor, superuser, webview
    Priv-app Folder: DefaultContainerService, DownloadProvider, droidlogic-res, ExternalStorageProvider, InputDevices, MediaProvider, Settings, SettingsProvider, Shell, TvSettings

    In adition you will need an Launcher or modify Kodi to run as launcher.

  39. @KyleRiemen i want to run this application HRTi without gliches, which is the application for streaming (in TS format, chunks of 5MB), it uses about 20% of CPU, maybe the app isn’t running in FullScreen mode, i don’t know, could you check this app?

    this firmware runs really well its fast and HRTi app runs also good, but not perfect, How can i determent what hogging this app?

  40. @Goran

    If it is a streaming App, it is very likely, that there is a kodi plugin for it. VideoLan player, MxPlayer all have issues sometimes with high bitrate or 4K videos, the best way to play videos and streams is to get rid of android and install openelec! It is supertiny, smooth and plays everything like a charm. https://forum.libreelec.tv/thread-2347.html

  41. @KyleRiemen
    Thnx, i wonder why is that? Because Kodi plays just fine high rate movies. I do not see CPU outage during streaming, is it the lack of graphics decoder or something?

    One more question, is there a X-ubuntu image for our hardware? I would like to try it:-)

  42. Thank you for this firmware, i have try it on my Nexbox MXQ Pro (S905 – red ribon on the corner) and it works wonderful…, just the remote control does not work, but thats ok, i only use mouse…

    I just have only a doubt, sometimes it appears a small blue icon (circle) on the right edge of the screen, like a floating button and i do not know what it is. When I click on it nothing happens (long click, double click, right click, i tried all).
    This is really weird because the icon changes every few times showing sometimes the last displayed screen, or number or just the android robot…

    I know this must be an app but wich one, and can it be deleted?

    Thank you for your imput and regards from spain.

  43. @cnxsoft, thank you forma the top…, i will try later to freeze ES app and look if it works…, will reportó…. 😉

  44. I found on the ES File Explorer app the”logger floating widget” , i supose that it shows the recent used files…. I disabled it in settings, hope thats it
    Thank you.

  45. Yes, since disabled the “Logger Floating Widget” in ES Explorer, it hasn’t appeared again…
    Thank you.

  46. I really liked this custom rom, it got faster. But it should have rom x32 because 1gb of ram complicates..and needs a 1.5Ghz kernel urgently. Because the normal of this soc is 1.5ghz. Make a rom with 1.5ghz please.

  47. I really wish there was a way to do this via Mac. Considering it’s all Linux based I don’t get why this isn’t really an option.

    1. This is a Windows based tool. You should be able to find some scripts to pull them apart being Linux. I am not sure where to find them. Or install and run Windows on virtual box

  48. Do the tools and articles i mentioned on Aug 17 not work???
    As I stated previously I have not tried to create an image myself (but will prob find the time to do it soon), but it would be handy to know how to do in linux since that’s all i ever use 😀

  49. Good read, helped a great deal, would really like to customize the launcher right n the firmware, any direction on achieving that?

  50. the box goes into sleep mode every 30 minutes, i tried to change the sitting under display, but the only options are available there is between 15 second and 30 minutes,

    How can i turn the sleep mode off?

    1. Try unpacking img in post at the very end. If you get the error then check Java version etc

  51. If you are using on newest android 7, i think Amlogic has to finalize an update to be able to use the amlogic tool

  52. @Karl Johnson

    I think you are correct – I’ve been trying to build 7.1 and having stall issues on the boot logo – something isn’t right…

  53. Hi, friend. I saw the EXTRA’s part. It’s just I want to do. How you did to change the veruy fisr image that appears when the box is turned on? How was the passes you walked in to replace the image to one that you wanted? You did that using Windows or inside Android? Or another linux system?

    1. In the first level there is a file boot logo img. You can take apart with a hex editor by hand. It is just several bmp images. The beginning of each bmp starts with BP. Take apart then put back together. I forget the exact color depth so look before you make a change.i use gimp to modify bmp.

  54. Great insights !
    Any Amlogic/other tools updates, and an equivalent tutorial for Libre/Core/Alex ELECs with Kodi Leia?

  55. Hello friend I would like a firmware modified that serves in mxq 4k mx9 mxqpro with changes in the bootanimation logo power on and with my applications installed I already have the apps and the firmware bootanimation file has to come to me in TWRP and .IMG would if you know this type of cuatomizacao and what the value thanks … I have urgency of the file aguardk contact.

  56. hi ! to all …. i need firmware for my M96X PRO+ soc (s905w)
    afther installed atvxperience firmware.img, he lost features such as BT
    after try redpoisonATV and this time not work ” bar navigation”, no wifi and too not Bt
    so i am thinking maybe other fw custom or fw stock….
    sorry for my bad English but, ..

    I NEED HELP !!!!!!….

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...
Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...