[Samsung Galaxy J3 (2016) ROMs, Kernels, Recoveries] djeman:
.... it's not possible to change only the size of the latest partition ... it's the latest, it uses the remain space ^^

offset size name (filename) part
0 512KB BOOT (spl.img) EMMC_PART_BOOT1	/dev/block/mmcblk0boot0
0 1MB BOOT2 (spl2.img) EMMC_PART_BOOT2	/dev/block/mmcblk0boot1
0 512KB GPT Header EMMC_PART_USER	/dev/block/mmcblk0
512KB 512KB PIT (J3XNLTE.pit) EMMC_PART_USER	/dev/block/mmcblk0 + 0x80000
1MB 3MB MD5HDR (md5.img) EMMC_PART_USER	/dev/block/mmcblk0 + 0x100000
4MB 2MB SBOOT (sboot.bin) EMMC_PART_USER	/dev/block/mmcblk0p1
6MB 2MB SBOOT2 (sboot2.bin) EMMC_PART_USER	/dev/block/mmcblk0p2
8MB 1MB l_fixnv1 (nvitem1.bin) EMMC_PART_USER	/dev/block/mmcblk0p3
9MB 1MB l_fixnv2 (nvitem.bin) EMMC_PART_USER	/dev/block/mmcblk0p4
10MB 1MB pm_sys (PM_sharkl_arm7.bin) EMMC_PART_USER	/dev/block/mmcblk0p5
11MB 1MB rsvdfixnv1 EMMC_PART_USER	/dev/block/mmcblk0p6
12MB 4MB l_ldsp (SPRDLTEDSP.img) EMMC_PART_USER	/dev/block/mmcblk0p7
16MB 16MB l_modem (SPRDCP.img) EMMC_PART_USER	/dev/block/mmcblk0p8
32MB 4MB l_gdsp (SPRDGDSP.img) EMMC_PART_USER	/dev/block/mmcblk0p9
36MB 4MB l_warm (SPRDWDSP.img) EMMC_PART_USER	/dev/block/mmcblk0p10
40MB 1MB FOTA_SIG EMMC_PART_USER	/dev/block/mmcblk0p11
41MB 1MB l_runtimenv1 EMMC_PART_USER	/dev/block/mmcblk0p12
42MB 1MB l_runtimenv2 EMMC_PART_USER	/dev/block/mmcblk0p13
43MB 1MB td_runtimenv1 EMMC_PART_USER	/dev/block/mmcblk0p14
44MB 1MB td_runtimenv2 EMMC_PART_USER	/dev/block/mmcblk0p15
45MB 2MB PARAM (param.lfs) EMMC_PART_USER	/dev/block/mmcblk0p16
47MB 20MB efs (efs.img) EMMC_PART_USER	/dev/block/mmcblk0p17
67MB 5MB prodnv (prodnv.img) EMMC_PART_USER	/dev/block/mmcblk0p18
72MB 6MB RESERVED2 EMMC_PART_USER	/dev/block/mmcblk0p19
78MB 20MB KERNEL (boot.img) EMMC_PART_USER	/dev/block/mmcblk0p20
98MB 20MB RECOVERY (recovery.img) EMMC_PART_USER	/dev/block/mmcblk0p21
118MB 1MB PERSISTENT EMMC_PART_USER	/dev/block/mmcblk0p22
119MB 9MB PERSDATA (persdata.img) EMMC_PART_USER	/dev/block/mmcblk0p23
128MB 200MB CACHE (cache.img) EMMC_PART_USER	/dev/block/mmcblk0p24
328MB 2048MB SYSTEM (system.img) EMMC_PART_USER	/dev/block/mmcblk0p25
2376MB 40MB HIDDEN (hidden.img) EMMC_PART_USER	/dev/block/mmcblk0p26
2416MB - userdata (userdata.img) EMMC_PART_USER	/dev/block/mmcblk0p27

So now you have the full partition scheme.

Maybe you can use dd to change the pit file directly on the mmc but it's very dangerous if you make a mistake.

If you reinstall the rom you can modify the AP file or not flash it.

Inside the AP file you have "boot", "recovery" and "system" ... all parts than you don't want and not really important.

BL and CP are necessary.

If you dump the beginning of the mmc at the offset 0x200 you can view the GPT header followed by the partitions table.

So the first sector is the gpt header => https://en.wikipedia.org/wiki/GUID_Partition_Table

And the second sector the pit table.

I think the pit file is used by some samsung parts as the download mode ... I don't know how works "odin repartition" ^^

So how you will modify this partition table ? Only the gpt header or gpt header and pit ? With odin or only an hexadecimal editor (lba adress start and end inside the partition table) ? :)