[Android General] motopig:
TVPad 4 is fourth in a series of Android-based IPTV settop boxes targeting the worldwide Chinese communities at large, although it seems to work well as a basic Android TV box. Support for all its predecessors (TVPad 1-3) have been discontinued. This guide will only focus on TVPad 4, model M418. Also this device have been banned from US and upgrading it may "brick" it - more on this later.

The method I used below is gathered from various sources elsewhere but not much on rooting and ADB. This is a compilation of all the most important info in one place. I am not sure if its bootloader is locked or not, but the Android 4.4 kernel sources can be found at openlinux.amlogic.com.

Physical specs:

AmLogic S805 SoC: ARM Cortex-A5, quad-core 1.5Ghz, Mali450 graphics, 1080p H.265 support

~1GB RAM

microSD card slot

HDMI out

USB-A port

Hardware needed:

To fully complete the process you'll need:

Monitor/TV with HDMI port

USB hub

microSD card

USB drive (optional)

USB keyboard

USB mouse

The remote that came with your box

Files needed:

* TVPad 4 5.054 firmware + TWRP 2.8.1.0: https://tvpadtalk.ca/discussion/1071/downgrading-tvpad-4-to-5-054/p1

The TWRP seems to be the modified from the one for AmLogic k200. Only the one from above work; the one from TWRP themselves do not.

* TVPad 4 5.066 OTA update: http://www.phoneunlock.com/forum/viewtopic.php?f=5&t=590

If you have this box and are in the US, do NOT do 5.066 update; your box is going to be banned. Might as well go all out and repurpose it into a general purpose Android TV box; but for the rest of the world, this update directs your box to different servers where it's mostly business as usual. You should be able to go direct from 5.054 to 5.066 following this guide, despite what others say.

* Root zip: http://www.freak-tab.de/finless/s89_root_update.zip

* APK install hint file:

Create a file named batchinstall.banana with contents below:

directory=

checkapp=no

Preparation

1. Download the 5.054 firmware and unzip into root of your microSD card. You should have recovery.img and TWRP folder. They are the TWRP recovery and a 5.054 TWRP backup respectively. Devices boots from recovery.img on root of microSD card if detected.

2. NON-US ONLY: Download the 5.066 OTA update to microSD root.

3. Download root zip to microSD root.

4. Put batchinstall.banana and any APKs you want to install on your USB drive or microSD. There is a APK pack of 23 apps for Cantonese speakers or 29 apps for Manadarin speakers available out there, but I haven't bothered. I included an updated SuperSU, ES File Explorer (preferably an older version; I used 4.0.4.9; newer ones are heavily loaded with ads), VLC, Firefox, AdAway, Terminal Emulator (by Jack Palevich). The last 4 being open source should also be available from F-Droid. Substitutions can be made to taste but Terminal Emulator is required to enable ADB (see below).

Enter Recovery

You will need to use stock recovery for OTA update AND TWRP for 5.054 firmware and root.

1. Connect HDMI monitor and USB hub to device. Connect USB keyboard and mouse to the hub. Leave power disconnected.

2. Look for a hole on the underside. If you have one, stick an iPhone/iPad SIM ejector pin in it and feel for a button. If able, this is the recovery button and you may skip to step 6.

3. Pull off the 4 rubber feet on the bottom and remove 4 screws under them.

4. Pry around the seams and lift the bottom cover off.

5. You either have a recovery button on the PCB or an empty spot for it. If no button, you'll have to short the bottom two contacts where the button is supposed to be (with all ports on the top edge).

6. Insert microSD card into "TF" slot. IMPORTANT: Leave popped out to enter stock recovery; fully insert to enter TWRP.

7. Press and hold the recovery button (or short the contacts) while plugging it in. Keep it pressed (or contacts shorted) until the recovery or TWRP appears.

8. Operate stock recovery with keyboard and TWRP with mouse.

Re-flash 5.054 - Downgrade/Unbrick

People do this to recover from "use restricted" or some other server errors after this thing is sued out of the States. I have also used it to recover from a soft brick situation.

1. Fully insert microSD card. Enter TWRP.

2. Select Restore. Choose External SD for storage.

3. Select the only available package to restore.

4. Swipe to Restore.

5. When complete, do not reboot yet. Return to main menu and select Wipe. Swipe to Factory Reset.

6. US ONLY: Remain in TWRP and proceed to step 2 of rooting.

7. NON-US ONLY: Return to main menu and select Reboot, Recovery. Immediately after screen go blank, push the microSD card again to eject it. It will pop out half way. Leave it hanging there. Proceed to update 5.066 next.

Update to 5.066 - NON-US ONLY! New server and Play Store support.

1. Enter stock recovery.

2. Fully insert microSD card.

3. Select Apply update from EXT and press Enter.

4. Select your 5.066 update file and press Enter.

5. When update complete, unplug power. Proceed to rooting.

Rooting

This is too easy with TWRP.

1. Fully insert microSD card. Enter TWRP.

2. Select Install, then the root zip file. Swipe to install.

3. Reboot into system and proceed with initial setup.

Kingroot also works but leaves some very persistent crap and questionable apps on the system so I do not recommend rooting using it.

Sideload apps

Plug the USB drive with your apps and batchinstall.banana file into the device or hub. Batch installer will appear. Select Batch Install and check that all apps you are installing are there and checked, then select Install.

Enable ADB

TVPad 4 does not have a USB slave port so ADB is only through TCP/IP. Steps below assume you have adb working on your computer.

1. Connect a USB mouse if not already.

2. Move mouse to right half of top of screen then drag down. Click on the gear to enter regular Android Settings app.

3. Enable Developer Options - About Mediabox, click Build Number 7 times.

4. Enable USB Debugging in Developer Options.

5. Open Terminal Emulator (sideload it if you haven't already).

6. Type in the following:

$ su
(Grant root if prompted)
# setprop service.adb.tcp.port 5555
# mount -o remount,rw /system
(Make the same setprop change in /system/build.prop - uncomment or add the line)
# stop adbd
# start adbd

7. Find the IP address of your TVPad from its own over-simplified settings page.

8. Open a command prompt/terminal on your computer and do this:

> adb connect <TVPAD IP ADDRESS>
(Authorize your computer on the TVPad.)
> adb devices
(confirm its IP is listed and not "unauthorized")
> adb shell
$ su
(grant root if prompted)
#
(success!)
# chmod 660 /data/misc/adb/adb_keys
(Double check permissions the public key file of authorized ADB clients)

9. Reboot and check that the change stays.

You're done! Now you have full control of this little TV box even after its server go under for good.

Additional apps

Kodi 15.2 seems to work on this box. 16.1 is untested. 17.x will not work since it requires Lollipop. Download from kodi.tv.

If all you want out of TVPad is TVB programming, the official app TVBAnywhere works on this box. About US$100/yr subscription for its own original programming only. Oh and it doesn't serve the States either. Go figure.

The gapps framework added with 5.066 is very minimal and doesn't work for eg. maps. You'll need to get it from apkpure. Use version 11.0.38-030-155006848.

I'm still looking for a decent launcher.

Credits:

https://www.youtube.com/watch?v=6evvWebosnU

https://www.youtube.com/watch?v=ZtY_qdYzmPs

https://www.youtube.com/watch?v=W2heIbUdZVE