Android Trongle S3 (Amlogic s905x) – Backup, Root and dual boot Armbian Linux

Android Trongle S3 (Amlogic s905x) – Backup, Root and dual boot Armbian Linux

I recently purchased my first Android Tv box in order to experiment with a Linux installation. For £39.99, I picked up a Trongle S3 from Amazon which has an AMlogic s905x quad core Cpu, 2gb ram and 16gb eMMC storage. It came packaged with a 5v power adapter, Hdmi cable and an IR remote control. The hardware specs appear to be much stronger than a Raspberry Pi 3 for about the same price once you add a case, power adapter and micro usb cable that the Pi needs. However the Pi has a much more vibrant community and well supported Linux builds. The Android boxes tend to have a smaller following that hack together custom Android Roms or Linux distributions.

Linux can be run on or with Android in a number of different ways via Apps but I wanted to get the best out of the hardware which means booting directly to Linux. LibreElec is a minimal distro designed for running Kodi media player. I experimented with this briefly and soon discarded it as it’s heavily locked down so you can’t use it as a regular OS. The debian package manager apt-get for example is out of bounds. The next best option I could see was Armbian.

 

 

Backup

Before changing anything on the S3, take an image backup using Android debug bridge. This doesn’t require rooting the box which is itself a potential risk.

 

Android Debug mode

Navigate to Settings > About MediaBox > Build. Click here 6 times to enable Developer mode. Now go up a level to Settings > Developer options. Enable USB debugging.

 

ADB Tools

Install the Adb tools on your Linux PC. Debian/Ubuntu:

 

Perform Device Backup

Ensure the S3 is booted and connected to the network. Mine had IP 192.168.1.33. Connect to it using adb:

Accept the connection request on the S3.

Performed backup to Linux PC:

Backup completed in about 4 mins (473.9 MB).

If you ever need to restore, use this command:

See Ubuntu docs on recording android version details using these commands:

 

Recovery Partition Backup

Inserted this step here from a lesson learnt whereby I corrupted my recovery partition when attempting to install custom recovery software TWRP.

Backup using dd from the adb shell. I wrote the backup to the SD card inserted in the S3 – check and insert the correct mount path.

 

 

Root

Check your Android build isn’t already rooted by running the Root Verifier app. I galloped ahead without doing this so not sure the steps ahead actually had any impact for me. Manually install the Root Verifier app from Fdroid over adb, entering the path you saved the apk to:

Accept / proceed with the pop-up presented on the S3 asking if Google should check all custom software. Run the Root verifier App to check root status. If this returns negative, proceed to the next steps.

Followed instructions on this Freaktab post

  1. Downloaded files
  2. Copied to SD card root
  3. Navigated to Update and Backup on Android box. Select exroot.zip from the SD card and proceed…
  4. When complete rerun the Root Verifier app to confirm the device is rooted.

 

Install TWRP Recovery

Android uses a recovery partition. Stock recovery software has limited features, I wanted the flexibility that TWRP provides. Found a compatible version of TWRP for s905x devices on XDA Developers here

Another useful thread on Freaktab.

I had experienced a failed installation of TWRP on my first attempt with a different file to the one linked above. With my stock recovery not working, the only way for me to proceed with the installation was via the android shell over adb.

  1. Copy downloaded TWRP img file to SD card, insert into S3 box
  2. Connect over adb adb connect 192.168.1.33
  3. Load shell adb shell
  4. Find mounted disk then perform image write using dd. In my case, it was the following command: dd if=/mnt/media_rw/F326-C162/recovery.img of=/dev/block/recovery

 

 

Linux Setup on SD card

Followed this Armbian thread. Downloaded, extracted and wrote image to SD card mounted on /dev/sdb :

Inserted SD card into the S3. Booted successfully, initiated via adb instead of the toothpick method:

The S3 will now continue rebooting to Armbian. To boot to Android from eMMC, simply remove the SD card.

 

 

Armbian Install to internal eMMC memory

WARNING: These steps lead to me bricking my device. Unbrick method I used is documented next.

I was happy with the SD ‘live disk’ version of Armbian so decided to install to eMMC memory for optimal performance and because I wasn’t bothered about running Android. Details in Armbian docs here: https://docs.armbian.com/User-Guide_Getting-Started/

Boot to Armbian linux shell from SD card first. Then issue command:  nand-sata-install

This took about 15 minutes to install to eMMC. I attempted to Reboot….nothing happened. My S3 was bricked 😯 ! Recovery using the tooth pick method wouldn’t work either. I thought it was game over but later found a solution.

 

 

Unbrick using Amlogic USB Burning Tool

This is a Windows tool provided by Amlogic I used to re-flash Android on to eMMC. After a little trial and error, I found an alternative firmware that worked with the S3. Boot to Windows first.

Followed this Youtube video.

  1. Installed the Usb driver first from the same package in sub folder WorldCup_Device/InstallDriver.exe
  2. Next step was a little awkward, refer to the video by JustMe Roms. Connected the S3 box using a male to male usb cable (had to use the port next to the SD card slot). Connection requires holding reset button using toothpick (under the S3) and a simultaneous connection of power and usb cable. Used firmware for similar s905x box – T95x as couldn’t find one for the Trongle S3. See 4th post in this thread for the download via mega.nz. Note the T95x firmware doesn’t have drivers for the IR Remote or wifi used in the S3 but I’m looking to replace Android so this wasn’t an issue for me.

Meanwhile I emailed Trongle support to enquire about stock firmware download location, awaiting their response…

 

 

Next steps

I’m left with a working S3 that can boot Armbian from SD card. Time will tell how stable and usable this distro is on the S3. At some point I’d like to attempt another install to eMMC and if successful I’ll update this post.

 

 

References:

Similar Hardware

Documentation for the Trongle S3 was virtually non existent. I assume the same hardware is re-branded under various other names. The following devices share some similarity with the S3, useful to know when searching for documentation, software, how to guides etc:

  • MXQ 2 Pro / Plus
  • ODROID C2
  • Mini M8s ii
  • Nexbox A95x
  • T95x

4 Comments

  1. Also waiting for a working Linux System for the S905x devices. Armbian still fails, latest versions even don’t have HDMI output. Only thing that works is libreelec.

    1. Max, did you try the Armbian image linked from the armbian forum? That booted for me with display over Hdmi. Wifi and Sound didn’t work though. I read somewhere that you can extract the relevant drivers from the libreelec distribution to get them working but I didn’t try.

  2. Hi. I quickly got frustrated with the stock Android 5 and the total lack of OTA or downloadable ROM updates for this thing, and have been coming back to your page again and again to try to put a proper linux distort on it. Then, finally, today I came across this:

    http://khadas.com/vim/

    Looks like an open-source hardware project that is basically a Triangle S3 without it’s skin. There’s a GitHub repo as well as a bunch of documentation and pre-built ROMs of various distros:

    http://docs.khadas.com/basics/FirmwareResources/

    I’m gonna try these out myself, but figured you might find these useful.

Leave a Reply

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