Sample Header Ad - 728x90

Partition table modified by parted is not saved in Galaxy J5 SM-J500FN

1 vote
1 answer
481 views
I booted to TWRP recovery and tried to shrink /system and extend /data in the following way:
parted /dev/block/mmcblk0

(parted) unit s
(parted) print free
The output (original partition table):
Model: MMC H8G4u! (sd/mmc)
Disk /dev/block/mmcblk0: 15269888s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
 
Number  Start      End        Size       File system  Name        Flags
        34s        8191s      8158s      Free Space
 1      8192s      38911s     30720s                  apnhlos     msftdata
 2      38912s     156543s    117632s                 modem       msftdata
 3      156544s    157567s    1024s                   sbl1
 4      157568s    157631s    64s                     ddr
 5      157632s    161727s    4096s                   aboot
 6      161728s    162751s    1024s                   rpm
 7      162752s    163775s    1024s                   qsee
 8      163776s    164799s    1024s                   qhee
 9      164800s    170943s    6144s                   fsg
10      170944s    170975s    32s                     sec
11      170976s    192511s    21536s                  pad         msftdata
12      192512s    212991s    20480s                  param
13      212992s    241663s    28672s     ext4         efs
14      241664s    247807s    6144s                   modemst1
15      247808s    253951s    6144s                   modemst2
16      253952s    280575s    26624s                  boot
17      280576s    311295s    30720s                  recovery
18      311296s    336897s    25602s                  fota
19      336898s    351215s    14318s                  backup      legacy_boot
20      351216s    357359s    6144s                   fsc
21      357360s    357375s    16s                     ssd
22      357376s    373759s    16384s     ext4         persist
23      373760s    374783s    1024s                   persistent
24      374784s    393215s    18432s     ext4         persdata
25      393216s    4653055s   4259840s   ext4         system
26      4653056s   5062655s   409600s    ext4         cache
27      5062656s   5206015s   143360s    ext4         hidden
28      5206016s   15269847s  10063832s  ext4         userdata
        15269848s  15269854s  7s         Free Space
Then I removed last 3 partitions and resized /system:
(parted) rm 28
(parted) rm 27
(parted) rm 26
(parted) resizepart 25 3186687
 
(parted) mkpart physical ext4 3186688 3596287
(parted) name 26 cache
 
(parted) mkpart physical ext4 3596288 3602431
(parted) name 27 hidden
 
(parted) mkpart physical ext4 3602432 15269847
(parted) name 28 userdata
 
(parted) quit
Then you need to sync changes to be able to mount /system again:
sync
blockdev --flushbufs /dev/block/mmcblk0
partprobe
However, nothing is changed.
parted /dev/block/mmcblk0 print free
After mounting partitions in TWRP or after reboot to system the partition sizes remain old. What am I doing wrong? Has Samsung Galaxy J5 (SM-J500FN) any hardware lock?
Asked by Politechniczny (151 rep)
Nov 27, 2021, 02:37 AM
Last activity: Dec 10, 2021, 07:25 PM