If you ever had the need to create a backup from a TV box with TWRP or other custom recovery available then there might be a way now.
But first a few words of warning:
This is not for the faint of heart and certainly not for the beginner.
I was able to create usuable backups in several ways, some are slower, some are faster.
Restoring these backups however is a different matter.
The box does not have a fully functional recovery or fastboot mode.
This means we can not just connect a USB cable and perform the actions while in recovery or bootloader mode - the later does not even exist...
Certain images can be renamed to be used with TWRP's recovery function but they can't be flashed as image files.
Long story short: You can create a backup of all vital partitions but you need a running system to write them back or a custom flash tool.
Still great for example if you want to test recoveries...
General how to:
I left the older batch files in the attached archive so people can see what other methods I used and might useful.
X96_backup.bat is current and will make a disk image on the same folder you unpacked the archive.
Recovery, Boot, Bootloader, Logo, Cache and System partitions will be created as images.
Additionally the system folder itself will be pulled from the device, same for the internal memory (userdata).
X96_userdata.bat will create a backup of the internal storage only, so all personal data and userstuff.
Similar story for the recovery but with the limitation that I don't know if the writing of the system partition on a running system is a good idea.
TWRP:
If you need a backup that can be used with TWRP then simple rename the corresponding image files the same way used in the TWRP backups - emmc.win.
Of course for this you need a wroking TWRP recovery first.
Full NAND backup:
X96_full_dump.bat will pull the entire mmcblk0 partitions from the device.
This, on a normal Android system would include all parttions of the device in question.
A lot of things are different on our boxes, so experiment with this backup however you see fit.
I included the Testdisk utility for Windows.
With this you can read the created mmcblk0 image and do a lot more - read it up if you have to.
Additional notes and "words of wisdom":
During my journey I noticed that a lot of things are totally different on our boxes compared to normal Android phones or tablets.
Some partitions are only directly present but not as a reference to any mmcblk partition.
ADB only works on a running system but not in any recovery.
Fastboot is not even present - or at least I am unable to boot into it.
My main aim was a simply way to backup userdata, the rest was just added in an attempt to create a PC based backup option.
If you need a really complete and fully working recovery that is proven to work then please check other options first.
What you do with these batch files is your thing, if you brick your device because different mount options are used then ask yourself why you did not check it first

Detailed info to get the batch files to work:
I included the ADB tools and all you need in the archive.
Just unpack to a folder on your PC and open a command promt with admin right in this folder.
Check the network settings on your box for the IP address it uses - note it.
Run adb connect yourIP - where yourIP is the IP address of your box.
Run adb root
You now have root access to your box - if it is not rooted, don't worry too much.
At this point you can just start the batch file you require.
For the experts:
A normal /cat proc/mnt won't work.
If you need the corresponding blocks you need to look in
/dev/block/platform
There should be a folder with .emmc at the end of the name.
Inside you find the "by-name" folder listing the blocks.
If you note these and list /dev/block/ you should get the amount of entries.
On my system however this does not add up, which means the manufacturer did not really care...
ls -al /dev/block/platform/d0074000.emmc/by-name
gives the corresponding dev block names.
This info might be useful if you want to try other ways of creating or restoring backups or to manipulate data on the device.
The images created from the system and data partition are only usable if you can mount them or use Testdisk.
In theory is should be possible to just push them back as done in the restore.bat but I have my doubts it will work on a running system.
TWRP creates backup images in a very similar way.
This means you can rename the corresponding images pulled from the device for the use with TWRP after renaming them accordingly.
So far however I have not found a way to properly extract the recovery to get to the data required to port a TWRP recovery from it.
Might be as easy as trimming the image and adjusting the headers, but I had no time to check this approach.
The data.img pulled contains the app data and all but again you need to mount it or use Testdisk to get to it.
I hope all this is helpful for someone and might give us more things to play with.
Archive is too big to attach, so :
Download
Comment