Hi!
The attached file
will convert the output of gdisk -l (which you can get in termux via `tsu; gdisk -l /dev/block/mmcblk0` into a scatter file which can be used in SP Flashtool for MTK based chipsets (Planet Computers devices).
It comes with absolutely no warranty of any kind.
There are some partitions which are not listed in gdisk -l which I copied verbatim from my Cosmo Communicator.
I'd be interested how this compares with a known good scatter file, e.g. as generated by the scatter file generator for the Gemini PDA.
My intended usage is to use this to take a complete dump of my Cosmo and restore it on a spare device, however you'd be mad to attempt this with a different device without thoroughly checking the file and actually knowing what you're doing. (If you're lucky, SP flashtool might refuse to flash the data.)
It's not my fault if you brick your device.
All partitions are marked as "is_download: true" so you can dump them, but that doesn't mean that they should be flashed ("Download tab").
I'd be interested in your feedback.
P.S.: I forgot: It works like your regular unix command... If you don't give any arguments, it reads from stdin and writes to stdout, otherwise the first argument is the file to be read and the second will be the file to write (which will be truncated).
Edit: I got the terminology wrong, read back pulls the data from the device and "Download" means to flash. More in my reply.