[General Questions and Answers] Ereniemis:
Hello,

I'm modding the RM330 android device.

I've built the LineageOS17.1 and since the system.img is larger than the original I needed to repartition the device.

I've done it using "parted" but I screwed up probably.

The device doesn't have home button, volume buttons etc. I am able to get only to the FASTBOOT, the device is "corrupt and cannot be trusted" so I can't boot into recovery and the device doesn't support fastboot boot recovery.img so I can't easily get to the recovery to modify fstab or the partitions again.

The old state:

(parted) print
Model: MMC FN62BB (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 67.1MB 159MB 92.3MB fat16 modem msftdata
2 201MB 201MB 1024B fsc
3 201MB 201MB 8192B ssd
4 201MB 202MB 524kB sbl1
5 202MB 202MB 524kB sbl1bak msftdata
6 202MB 203MB 524kB rpm
7 203MB 203MB 524kB rpmbak msftdata
8 203MB 206MB 2097kB tz
9 206MB 208MB 2097kB tzbak msftdata
10 208MB 208MB 262kB devcfg
11 208MB 208MB 262kB devcfgbak
12 208MB 225MB 16.8MB ext4 dsp msftdata
13 225MB 227MB 1573kB modemst1
14 227MB 228MB 1573kB modemst2
15 268MB 268MB 32.8kB DDR
16 268MB 270MB 1573kB fsg
17 270MB 270MB 16.4kB sec
18 336MB 347MB 11.5MB splash
19 403MB 404MB 1049kB aboot
20 404MB 405MB 1049kB abootbak msftdata
21 405MB 413MB 8389kB dtbo
22 413MB 422MB 8389kB dtbobak msftdata
23 422MB 422MB 65.5kB vbmeta
24 422MB 422MB 65.5kB vbmetabak msftdata
25 422MB 489MB 67.1MB boot
26 489MB 556MB 67.1MB recovery
27 556MB 557MB 1049kB devinfo
28 557MB 1375MB 818MB ext2 system
29 1375MB 2423MB 1049MB ext2 vendor
30 2483MB 2751MB 268MB ext4 cache
31 2751MB 2785MB 33.6MB ext4 persist
32 2785MB 2786MB 1049kB misc
33 2786MB 2787MB 524kB keystore
34 2787MB 2787MB 32.8kB config
35 2787MB 2799MB 12.6MB ext4 dji_persist
36 2799MB 2800MB 524kB djita
37 2819MB 2819MB 32.8kB limits
38 2886MB 2886MB 524kB mota msftdata
39 2886MB 2887MB 1049kB dip
40 2887MB 2921MB 33.6MB mdtp
41 2921MB 2921MB 524kB syscfg
42 2921MB 2926MB 4194kB mcfg msftdata
43 2953MB 2953MB 131kB lksecapp
44 2953MB 2953MB 131kB lksecappbak
45 2953MB 2954MB 1049kB cmnlib
46 2954MB 2955MB 1049kB cmnlibbak
47 2955MB 2956MB 1049kB cmnlib64
48 2956MB 2957MB 1049kB cmnlib64bak
49 2957MB 2958MB 1049kB keymaster
50 2958MB 2959MB 1049kB keymasterbak
51 3020MB 3020MB 262kB apdp
52 3020MB 3020MB 262kB msadp
53 3020MB 3020MB 8192B dpo
54 3020MB 3557MB 537MB ext4 blackbox
55 3557MB 7818MB 4261MB ext4 userdata

I've merged 28 and 29 using rm 29 -> resizepart 28 and used all of the space from 28 and 29 for system.

I've resizepart 55 to make the partition smallerby 1GB

I've created partition 56 vendor

Sicne the parted told me that I maybe want to edit the etc/fstab I did edit the "vendor" from mmcblk29 to mmcblk56.

Rebooted and the device seems as corrupt and I can't do anything.

Fastboot getvar all OLD STATE:

C:\adb>fastboot getvar all
(bootloader) version:0.5
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:0
(bootloader) variant:QRD eMMC
(bootloader) unlocked:yes
(bootloader) secure:yes
(bootloader) version-baseband:
(bootloader) version-bootloader:
(bootloader) logical-block-size:0x200
(bootloader) erase-block-size:0x200
(bootloader) display-panel:
(bootloader) off-mode-charge:0
(bootloader) charger-screen-enabled:0
(bootloader) max-download-size: 0x1fdffc00
(bootloader) partition-type:userdata:ext4
(bootloader) partition-size:userdata: 0xfdf79e00
(bootloader) partition-type:blackbox:raw
(bootloader) partition-size:blackbox: 0x20000000
(bootloader) partition-type:dpo:raw
(bootloader) partition-size:dpo: 0x2000
(bootloader) partition-type:msadp:raw
(bootloader) partition-size:msadp: 0x40000
(bootloader) partition-type:apdp:raw
(bootloader) partition-size:apdp: 0x40000
(bootloader) partition-type:keymasterbak:raw
(bootloader) partition-size:keymasterbak: 0x100000
(bootloader) partition-type:keymaster:raw
(bootloader) partition-size:keymaster: 0x100000
(bootloader) partition-type:cmnlib64bak:raw
(bootloader) partition-size:cmnlib64bak: 0x100000
(bootloader) partition-type:cmnlib64:raw
(bootloader) partition-size:cmnlib64: 0x100000
(bootloader) partition-type:cmnlibbak:raw
(bootloader) partition-size:cmnlibbak: 0x100000
(bootloader) partition-type:cmnlib:raw
(bootloader) partition-size:cmnlib: 0x100000
(bootloader) partition-type:lksecappbak:raw
(bootloader) partition-size:lksecappbak: 0x20000
(bootloader) partition-type:lksecapp:raw
(bootloader) partition-size:lksecapp: 0x20000
(bootloader) partition-type:mcfg:raw
(bootloader) partition-size:mcfg: 0x400000
(bootloader) partition-type:syscfg:raw
(bootloader) partition-size:syscfg: 0x80000
(bootloader) partition-type:mdtp:raw
(bootloader) partition-size:mdtp: 0x2000000
(bootloader) partition-type:dip:raw
(bootloader) partition-size:dip: 0x100000
(bootloader) partition-type:mota:raw
(bootloader) partition-size:mota: 0x80000
(bootloader) partition-type:limits:raw
(bootloader) partition-size:limits: 0x8000
(bootloader) partition-type:djita:raw
(bootloader) partition-size:djita: 0x80000
(bootloader) partition-type:dji_persist:raw
(bootloader) partition-size:dji_persist: 0xc00000
(bootloader) partition-type:config:raw
(bootloader) partition-size:config: 0x8000
(bootloader) partition-type:keystore:raw
(bootloader) partition-size:keystore: 0x80000
(bootloader) partition-type:misc:raw
(bootloader) partition-size:misc: 0x100000
(bootloader) partition-type:persist:raw
(bootloader) partition-size:persist: 0x2000000
(bootloader) partition-type:cache:ext4
(bootloader) partition-size:cache: 0x10000000
(bootloader) partition-type:system:ext4
(bootloader) partition-size:system: 0x420d9400
(bootloader) partition-type:vendor:raw
(bootloader) partition-size:vendor: 0x30c00000
(bootloader) partition-type:devinfo:raw
(bootloader) partition-size:devinfo: 0x100000
(bootloader) partition-type:recovery:ext4
(bootloader) partition-size:recovery: 0x4000000
(bootloader) partition-type:boot:raw
(bootloader) partition-size:boot: 0x4000000
(bootloader) partition-type:vbmetabak:raw
(bootloader) partition-size:vbmetabak: 0x10000
(bootloader) partition-type:vbmeta:raw
(bootloader) partition-size:vbmeta: 0x10000
(bootloader) partition-type:dtbobak:raw
(bootloader) partition-size:dtbobak: 0x800000
(bootloader) partition-type:dtbo:raw
(bootloader) partition-size:dtbo: 0x800000
(bootloader) partition-type:abootbak:raw
(bootloader) partition-size:abootbak: 0x100000
(bootloader) partition-type:aboot:raw
(bootloader) partition-size:aboot: 0x100000
(bootloader) partition-type:splash:raw
(bootloader) partition-size:splash: 0xb00000
(bootloader) partition-type:sec:raw
(bootloader) partition-size:sec: 0x4000
(bootloader) partition-type:fsg:raw
(bootloader) partition-size:fsg: 0x180000
(bootloader) partition-type:DDR:raw
(bootloader) partition-size:DDR: 0x8000
(bootloader) partition-type:modemst2:raw
(bootloader) partition-size:modemst2: 0x180000
(bootloader) partition-type:modemst1:raw
(bootloader) partition-size:modemst1: 0x180000
(bootloader) partition-type:dsp:raw
(bootloader) partition-size:dsp: 0x1000000
(bootloader) partition-type:devcfgbak:raw
(bootloader) partition-size:devcfgbak: 0x40000
(bootloader) partition-type:devcfg:raw
(bootloader) partition-size:devcfg: 0x40000
(bootloader) partition-type:tzbak:raw
(bootloader) partition-size:tzbak: 0x200000
(bootloader) partition-type:tz:raw
(bootloader) partition-size:tz: 0x200000
(bootloader) partition-type:rpmbak:raw
(bootloader) partition-size:rpmbak: 0x80000
(bootloader) partition-type:rpm:raw
(bootloader) partition-size:rpm: 0x80000
(bootloader) partition-type:sbl1bak:raw
(bootloader) partition-size:sbl1bak: 0x80000
(bootloader) partition-type:sbl1:raw
(bootloader) partition-size:sbl1: 0x80000
(bootloader) partition-type:ssd:raw
(bootloader) partition-size:ssd: 0x2000
(bootloader) partition-type:fsc:raw
(bootloader) partition-size:fsc: 0x400
(bootloader) partition-type:modem:raw
(bootloader) partition-size:modem: 0x5800000
(bootloader) hw-revision:10001
(bootloader) serialno:4767962f
(bootloader) kernel:lk
(bootloader) product:QC_Reference_Phone
all:
Finished. Total time: 1.058s

Fastboot getvar all NEW STATE:

h:\adb\Android-Image-Kitchen-master>fastboot getvar all
(bootloader) version:0.5
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:0
(bootloader) variant:QRD eMMC
(bootloader) unlocked:no
(bootloader) secure:yes
(bootloader) version-baseband:
(bootloader) version-bootloader:
(bootloader) logical-block-size:0x200
(bootloader) erase-block-size:0x200
(bootloader) display-panel:
(bootloader) off-mode-charge:1
(bootloader) charger-screen-enabled:1
(bootloader) max-download-size: 0x1fdffc00
(bootloader) partition-type:system:ext4
(bootloader) partition-size:system: 0x72cd9400
(bootloader) partition-type:devinfo:raw
(bootloader) partition-size:devinfo: 0x100000
(bootloader) partition-type:recovery:ext4
(bootloader) partition-size:recovery: 0x4000000
(bootloader) partition-type:boot:raw
(bootloader) partition-size:boot: 0x4000000
(bootloader) partition-type:vbmetabak:raw
(bootloader) partition-size:vbmetabak: 0x10000
(bootloader) partition-type:vbmeta:raw
(bootloader) partition-size:vbmeta: 0x10000
(bootloader) partition-type:dtbobak:raw
(bootloader) partition-size:dtbobak: 0x800000
(bootloader) partition-type:dtbo:raw
(bootloader) partition-size:dtbo: 0x800000
(bootloader) partition-type:abootbak:raw
(bootloader) partition-size:abootbak: 0x100000
(bootloader) partition-type:aboot:raw
(bootloader) partition-size:aboot: 0x100000
(bootloader) partition-type:splash:raw
(bootloader) partition-size:splash: 0xb00000
(bootloader) partition-type:sec:raw
(bootloader) partition-size:sec: 0x4000
(bootloader) partition-type:fsg:raw
(bootloader) partition-size:fsg: 0x180000
(bootloader) partition-type:DDR:raw
(bootloader) partition-size:DDR: 0x8000
(bootloader) partition-type:modemst2:raw
(bootloader) partition-size:modemst2: 0x180000
(bootloader) partition-type:modemst1:raw
(bootloader) partition-size:modemst1: 0x180000
(bootloader) partition-type:dsp:raw
(bootloader) partition-size:dsp: 0x1000000
(bootloader) partition-type:devcfgbak:raw
(bootloader) partition-size:devcfgbak: 0x40000
(bootloader) partition-type:devcfg:raw
(bootloader) partition-size:devcfg: 0x40000
(bootloader) partition-type:tzbak:raw
(bootloader) partition-size:tzbak: 0x200000
(bootloader) partition-type:tz:raw
(bootloader) partition-size:tz: 0x200000
(bootloader) partition-type:rpmbak:raw
(bootloader) partition-size:rpmbak: 0x80000
(bootloader) partition-type:rpm:raw
(bootloader) partition-size:rpm: 0x80000
(bootloader) partition-type:sbl1bak:raw
(bootloader) partition-size:sbl1bak: 0x80000
(bootloader) partition-type:sbl1:raw
(bootloader) partition-size:sbl1: 0x80000
(bootloader) partition-type:ssd:raw
(bootloader) partition-size:ssd: 0x2000
(bootloader) partition-type:fsc:raw
(bootloader) partition-size:fsc: 0x400
(bootloader) partition-type:modem:raw
(bootloader) partition-size:modem: 0x5800000
(bootloader) hw-revision:10001
(bootloader) serialno:4767962f
(bootloader) kernel:lk
(bootloader) product:QC_Reference_Phone
all:
Finished. Total time: 0.722s

So the fastboot doesn't "see" vendor and userdata partitions and the device is "corrupt" and since the device doesn't use ramdisk in boot.img, there is only recovery ramdisk I can't directly modify fstab to give the correct information about partitions.

Do anyone have an idea what can be done?

I don't have firehose for the device or anything, so I can't repartition in EDL.

Thank you.