Walton Primo RX5 (Primo_RX5)
Device: Walton Primo RX5 (Running on mt6735) Codename: Primo_RX5 Recovery: TWRP 3.2.1 (Unofficial, Ported from Coolpad Note 3 Lite device.) Recovery Source > http://zerodevelopers.blogspot.com/2018/01/twrp-321-coolpad-note-3-lite.html Kernel: 3.18.19 (Stock) ROM: Amigo OS 3.2 (Android 6.0, Arm64) Partition Layout: Stock Factory Layout
Dump Log: repit-dump.log
I want to shrink /system (partition no. 20) a little bit and add that bit to /data (partition no. 22) But /cache (partition no. 21) size will be same as previous
Please help.
hi,
some newer devices have a signed GPT (partition table). on such devices, altering the GPT hard-bricks the device. this is the reason i mostly stopped development of REPIT.
make sure you read this. you can try running the strings command on images of your bootloaders (or post the images here) to get hints on the situation of your device. strings can usually rule out signatures, but it can also result in false positives.
to recover from a hard brick you would need an image of your eMMC and the ability to program the eMMC with a JTAG probe. if you do not know what JTAG is, then assume you have no way to recover your device.
please decide whether you want to risk testing a REPIT port on your device.
thanks!
hi,
sorry for the long delay. are you still interested in this?
thanks!
Actually, I'm sorry.
I couldn't get the strings command and fastboot isn't working on my PC 😣
And my device does not have any bootloader image or partition available. Typical Old MTK chipset 😐
after looking at your partition table:
Number Start End Size File system Name Flags
0.00MiB 0.50MiB 0.50MiB Free Space
1 0.50MiB 3.50MiB 3.00MiB proinfo
2 3.50MiB 8.50MiB 5.00MiB nvram
3 8.50MiB 18.5MiB 10.0MiB ext4 protect1
4 18.5MiB 28.5MiB 10.0MiB ext4 protect2
5 28.5MiB 29.0MiB 0.50MiB lk
6 29.0MiB 29.5MiB 0.50MiB para
7 29.5MiB 45.5MiB 16.0MiB boot
8 45.5MiB 61.5MiB 16.0MiB recovery
9 61.5MiB 69.5MiB 8.00MiB logo
10 69.5MiB 79.5MiB 10.0MiB expdb
11 79.5MiB 80.0MiB 0.50MiB seccfg
12 80.0MiB 82.0MiB 2.00MiB oemkeystore
13 82.0MiB 88.0MiB 6.00MiB secro
14 88.0MiB 96.0MiB 8.00MiB keystore
15 96.0MiB 101MiB 5.00MiB tee1
16 101MiB 106MiB 5.00MiB tee2
17 106MiB 107MiB 1.00MiB frp
18 107MiB 139MiB 32.0MiB ext4 nvdata
19 139MiB 176MiB 37.0MiB metadata
20 176MiB 4144MiB 3968MiB ext4 system
21 4144MiB 4544MiB 400MiB ext4 cache
22 4544MiB 14893MiB 10350MiB ext4 userdata
23 14894MiB 14909MiB 16.0MiB flashinfo
14910MiB 14910MiB 0.50MiB Free Space
i'm assuming your last stage bootloader is the lk partition, harboring Little Kernel.
to pull the partition to your PC, you can boot TWRP, make sure you can connect to it using adb, and issue this command on your PC:
adb pull /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/lk lk.img
you can then run strings lk.img or post the file here and i'll take a look.
otherwise you may want to blindly try REPIT and take the risk. your MTK device is old, it might not have a signed GPT, but there is always a risk.
From earlier, I didn't thought that strings can be run onto almost anything, even from TWRP.
I don't have that much CLI knowledge 😐
But I'm advancing bit by bit ☺
But, as you said, I backed up lk.img and got the strings extracted. lk.img.strings.txt
i didn't find references to GPT signatures in those strings, but that is not a conclusive test.
let's try directly finding a signature instead.
try this command on TWRP to dump the first 0.5MB of your eMMC, which has the GPT and possibly its signature:
dd if=dev/block/mmcblk0 count=1024 of=/tmp/gpt.bin
then adb pull the gpt.bin file and post it here (you might need to zip it or change the extension).
I pulled it out using terminal emulator without going to TWRP. I hope that It's okay. gpt.zip
i see the protective MBR, the GPT partition header, and 23 GPT partitions. no trace of any signatures. i believe this devices is not protected with GPT signatures.
REPIT should work on this device.
you can debloat your OS, shrink /system to whatever you can and shrink /cache to 32MB to gain space in /data.
however you seem to have a stock OS.
stock OSes are typically protected by dm-verity, which means that any change to the /system partition will make the phone not boot.
you need a kernel without dm-verity to modify the system partition.
once /system is modified, OEM updates will not apply (but on old phones there are no updates). for this reason, the /cache partition is not needed anymore.
if your OS has dm-verity enabled, you cannot use REPIT.
a system-less version of REPIT could be made for your device that ignores system and allows you to move space from /cache to /data. i don't think it is worth the trouble though.
I do use Custom ROMs of Android Nougat a lot, but still prefer the old Modified Stock Android MM ROM (that I'm still using) very much.
I have removed the device data encryption by Factory Reset from TWRP, and also modified the System Partition a little. I also removed auto encryption of Data partition (in /etc/recovery.fstab, "forceencrypt >> encryptable") by making own TWRP from source.
And I guess dm-verity is removed by SuperSU.
So, no encryption issue should be left.
And yes, my OEM stopped giving OTA in the late 2017 😩
So, /cache is really not usefull, but shrinking it from 400 MB to 100~120 MB and keeping it is not that bad I think.
P.S:
I'm also looking for an extra suggestion.
My partition table don't have a separate /vendor partition space.
If you could add script to make a Vendor partition with only 200 MB after the shrunken System Partition as well, then the partition table would be one step ahead for Treble Implementation in the future (though I have no Kernel Sources available, but if I manage to make an Upstreamed one, hopefully, one day).