Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - TauPan

Pages: [1]
1
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.

2
Yesterday a new version of Magisk became available on the Beta Channel (21.0).

As with the Gemini the direct update method will fail, but fortunately the custom os installer on the sd card from planet gives us a method to upgrade on the device.

I had success with the following steps yesterday:

1.) I started termux and got root with tsu. Obviously this requires that you are booted into rooted android. Then I checked the partition table with gdisk -l /dev/block/mmcblkp0 and noted that the boot partition is number 30. I think this is identical if you partioned in the custom os installer. So the command to dump the unrooted boot partition is:

dd if= /dev/block/mmcblk0p30 of=boot-original.img

2.) Start magisk, Tap on "Install" for the new magisk version, and under "method" choose "patch file".

3.) Create a backup of the rooted boot image from planet, if something fails you can use that to restore the old version.

4.) copy the magisk-patched.img file to the original filename of the rooted boot image from planet. The filename is "root-boot.img".

5.) Boot to recovery and launch the custom os installer then install "rooted android" to the correct partition.

After the next reboot to the rooted android you should see the updated version in magisk manager. (I would post a screenshot, but attachments are disabled at the moment.)

Have fun!

3
I don't know if it's plain obvious but I just noticed today that scatter files can be simply parsed as yaml (e.g. from python).
Code: [Select]
>>> import yaml
>>> with open('Cosmo_MT6771_Android_full_stock_edited_scatter.txt') as f:
...   obj = yaml.load(f)
...
>>> type(obj)
<class 'list'>
>>> obj[0]
{'general': 'MTK_PLATFORM_CFG', 'info': [{'block_size': 131072, 'platform': 'MT6771', 'project': 'k71v1_64_bsp', 'storage': 'EMMC', 'config_version': 'V1.1.2', 'boot_channel': 'MSDC_0'}]}                                           
>>> obj[1]                                                                                                                                                                                                                             
{'type': 'SV5_BL_BIN', 'boundary_check': True, 'partition_index': 'SYS0', 'storage': 'HW_STORAGE_EMMC', 'is_upgradable': True, 'physical_start_addr': 0, 'linear_start_addr': 0, 'reserve': 0, 'region': 'EMMC_BOOT_1', 'partition_size': 1048576, 'partition_name': 'preloader', 'is_download': True, 'operation_type': 'BOOTLOADERS', 'empty_boot_needed': False, 'is_reserved': False, 'file_name': 'preloader_k71v1_64_bsp.bin'}

As you can see, the return value is a list and the order is identical to the order in the file. I don't know if the general section is always first and followed by the partitions.

I've been meaning to write a small python script that can rename the readback dumps automatically (by matching the `partition_index` to the last part of the `ROM_<nn>` filename). Maybe I'll get around to that at some point.

This is probably valid for all MTK devices, not just from Planet Computers.

Pages: [1]