[Moto G5S Plus Questions & Answers] santoshx99:
When I was using Moto e2. I messed up with IMEI. And I downloaded the whole factory firmware and flashed it via fastboot using PC. But I lost my precious data.

This post is made for Noobs.

Now I am using Sanders XT1804 and would like to share a short and quick method to backup and understanding IMEI partitions. I am listing here the partition layout of XT1804 Indian variant with block no. And will tell you how to backup and restore the partitions easily by using DD command in terminal emulator app. Pls. read it carefully.

sbl1 mmcblk0p1

rpm mmcblk0p2

tz mmcblk0p3

devcfg mmcblk0p4

aboot mmcblk0p5

cmnlib mmcblk0p6

cmnlib64 mmcblk0p7

keymaster mmcblk0p8

prov mmcblk0p9

sbl1bak mmcblk0p10

rpmbak mmcblk0p11

tzbak mmcblk0p12

devcfgbak mmcblk0p13

abootbak mmcblk0p14

cmnlibbak mmcblk0p15

cmnlib64bak mmcblk0p16

keymasterbak mmcblk0p17

provbak mmcblk0p18

modem mmcblk0p19

fsc mmcblk0p10

ssd mmcblk0p21

dsp mmcblk0p22

DDR mmcblk0p23

sec mmcblk0p24

utags mmcblk0p25

utagsBackup mmcblk0p26

modemst1 mmcblk0p27

modemst2 mmcblk0p28

fsg mmcblk0p29

persist mmcblk0p30

frp mmcblk0p31

cid mmcblk0p32

logo mmcblk0p33

carrier mmcblk0p34

metadata mmcblk0p35

kpan mmcblk0p36

boot mmcblk0p37

recovery mmcblk0p38

misc mmcblk0p39

limits mmcblk0p40

mota mmcblk0p41

dip mmcblk0p42

syscfg mmcblk0p43

logs mmcblk0p44

apdp mmcblk0p45

msadp mmcblk0p46

dpo mmcblk0p47

padA mmcblk0p48

sp mmcblk0p49

hw mmcblk0p50

oem mmcblk0p51

cache mmcblk0p52

system mmcblk0p53

data mmcblk0p54

Requirements:-

1) Stock ROM or any custom ROM

2). ROOT

3) any Terminal Command app from Playstore.

For IMEI u must backup modem, modemst1 and modemst2.

Block no. are mmcblk0p19, mmcblk0p27, mmcblk0p28.

To backup modem partition:-

Open terminal emulator app first type "su" and then

dd if=/dev/block/mmcblk0p19 of=/sdcard/modem.img

To restore modem partition:-

dd if=/sdcard/modem.img of=/dev/block/mmcblk0p19

In the same way,

To backup modemst1 and modemst2 type:-

dd if=/dev/block/mmcblk0p27 of=/sdcard/modemst1.img

dd if=/dev/block/mmcblk0p28 of=/sdcard/modemst2.img

To restore modemst1 and modemst2:-

dd if=/sdcard/modemst1.img of=/dev/block/mmcblk0p27

dd if =/sdcard/modemst2.img of=/dev/block/mmcblk0p28

You must copy that .IMG file to other storage or external device.

The partition block no. may vary with different variants of Sanders(G5S PLUS) above one is for XT1804 only.

Modemst1 is for SIM1 and modemst2 for SIM2 IMEI.

In the same way u can backup all the necessary partitions. Just replace the filename with "xxx.img" .IMG is necessary to make the image with IMG. format. I would recommend u do all the necessary partitions backup in your sdcard and than move this images to ur pc or pen drive.

Such as persist, carrier, modem, modemst1, modemst2 etc.

Once u do the backup and u bricked ur device in future. Don't worry, you can restore it anytime if u want.

Just install ADB in ur pc. Go to fastboot mode in ur mobile. Place the file in ADB folder on windows.

Type this command to restore/flash partitions.

For modem partition

fastboot flash modem modem.img

Do enjoy and keep flashing custom roms. Cheers:D