Question [SPESN] Help to restore the memory partition table - Redmi Note 11 (spes/spesn)

Friends, please help
Deleted the internal memory partition table.
Can anyone give a listing of the tayulitsa sections:
Code:
adb shell
sgdisk --print /dev/block/sda
Or maybe if someone has a gpt.bin dump:
Code:
adb shell
dd if=/dev/block/sda of=/external_sd/gpt.bin bs=8 count=2176
I have a version with 128GB of internal memory, but it will work with the other - I'll figure it out.

Code:
Number Start (sector) End (sector) Size Code Name
1 6 7 8.0 KiB A02C ssd
2 8 8199 32.0 MiB A026 persist
3 8200 8455 1024.0 KiB A01F misc
4 8456 8967 2.0 MiB FFFF countrycode
5 8968 9095 512.0 KiB A02D keystore
6 9096 9223 512.0 KiB FFFF frp
7 9224 41991 128.0 MiB FFFF minidump
8 41992 566279 2.0 GiB 8300 cust
9 566280 2794503 8.5 GiB FFFF super
10 2794504 2794519 64.0 KiB FFFF vbmeta_system_a
11 2794520 2794535 64.0 KiB FFFF vbmeta_system_b
12 2794536 2798631 16.0 MiB FFFF metadata
13 2798632 2831399 128.0 MiB A039 rescue
14 2831400 2835495 16.0 MiB FFFF gsort
15 2835496 2837543 8.0 MiB FFFF ffu
16 2837544 14024698 42.7 GiB A03A userdata
Something like this? @Shaman_RSHU . Got Spesn 64gb variant.

NeoPreacher said:
Code:
Number Start (sector) End (sector) Size Code Name
1 6 7 8.0 KiB A02C ssd
2 8 8199 32.0 MiB A026 persist
3 8200 8455 1024.0 KiB A01F misc
4 8456 8967 2.0 MiB FFFF countrycode
5 8968 9095 512.0 KiB A02D keystore
6 9096 9223 512.0 KiB FFFF frp
7 9224 41991 128.0 MiB FFFF minidump
8 41992 566279 2.0 GiB 8300 cust
9 566280 2794503 8.5 GiB FFFF super
10 2794504 2794519 64.0 KiB FFFF vbmeta_system_a
11 2794520 2794535 64.0 KiB FFFF vbmeta_system_b
12 2794536 2798631 16.0 MiB FFFF metadata
13 2798632 2831399 128.0 MiB A039 rescue
14 2831400 2835495 16.0 MiB FFFF gsort
15 2835496 2837543 8.0 MiB FFFF ffu
16 2837544 14024698 42.7 GiB A03A userdata
Something like this? @Shaman_RSHU . Got Spesn 64gb variant.
Click to expand...
Click to collapse
Oh thanks! It helped me a lot. I think now I can do without gpt.bin, doing everything manually using the sgdisk command in adb shell.

Related

Messedup data partition. Need fdisk log

Help..Can any one upload log for S2 x526 command "fdisk /dev/block/mmcblk0 " while the phone is in TWRP.
I accidentally clicked resize partition in TWRP 3.1.1.0 x526 while converting to f2fs. Now the data partition is same as sdcard. Any way to reduce it to earlier size of 4GB. It is not causing any problem but i wont be able to create back up since data is fused to sdcard. My internal storage partition is missing . I tried these methods but nothing worked.
1. Install stock rom -
2. Install Lineage
3. Install AICP
I need e2fsck commands to restore it back. Can any one upload log for S2 x526 command "fdisk /dev/block/mmcblk0 " while the phone is in TWRP.
please provide fdisk -l /dev/block/mmcblk0 output. This command has to be run while the phone is in TWRp. I have attached mine.
Code:
C:\adb>adb shell
~#fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 61071360 sectors, 1148M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 56 entries
First usable sector is 34, last usable sector is 61071326
Number Start (sector) End (sector) Size Code Name
1 131072 303103 84.0M 0700 modem
2 393216 393217 1024 0700 fsc
3 393218 393233 8192 0700 ssd
4 393234 394257 512K 0700 sbl1
5 394258 395281 512K 0700 sbl1bak
6 395282 396305 512K 0700 rpm
7 396306 397329 512K 0700 rpmbak
8 397330 401425 2048K 0700 tz
9 401426 405521 2048K 0700 tzbak
10 405522 406545 512K 0700 hyp
11 406546 407569 512K 0700 hypbak
12 407570 440337 16.0M 0700 dsp
13 440338 443409 1536K 0700 modemst1
14 443410 446481 1536K 0700 modemst2
15 446482 446483 1024 0700 OEMCONFIG
16 446484 577555 64.0M 0700 oeminfo
17 655360 655423 32768 0700 DDR
18 655424 658495 1536K 0700 fsg
19 658496 658527 16384 0700 sec
20 658528 760927 50.0M 0700 splash
21 760928 762975 1024K 0700 aboot
22 762976 765023 1024K 0700 abootbak
23 765024 896095 64.0M 0700 boot
24 896096 1027167 64.0M 0700 recovery
25 1027168 1029215 1024K 0700 devinfo
26 1048576 1114111 32.0M 0700 persist
27 1179648 9568255 4096M 0700 system
28 9568256 10092543 256M 0700 cache
29 10092544 10094591 1024K 0700 misc
30 10094592 10095615 512K 0700 factory
31 10095616 10096639 512K 0700 bootconfig
32 10096640 10097663 512K 0700 rootconfig
33 10097664 10098687 512K 0700 recoveryconfig
34 10098688 10099711 512K 0700 letvconfig
35 10099712 10100735 512K 0700 letveui
36 10100736 10101759 512K 0700 letvsecure
37 10101760 10102783 512K 0700 letvreserve
38 10102784 10164223 30.0M 0700 kernellog
39 10164224 10165247 512K 0700 keystore
40 10165248 10165311 32768 0700 config
41 10165312 10296383 64.0M 0700 oem
42 10354688 10354751 32768 0700 limits
43 10485760 10486783 512K 0700 mota
44 10486784 10487295 256K 0700 devcfg
45 10487296 10489343 1024K 0700 dip
46 10489344 10554879 32.0M 0700 mdtp
47 10554880 10555903 512K 0700 syscfg
48 10555904 10564095 4096K 0700 mcfg
49 10616832 10617343 256K 0700 cmnlib
50 10617344 10617855 256K 0700 keymaster
51 10617856 10618367 256K 0700 cmnlibbak
52 10618368 10618879 256K 0700 keymasterbak
53 10747904 10748415 256K 0700 apdp
54 10748416 10748927 256K 0700 msadp
55 10748928 10748943 8192 0700 dpo
56 10748944 61071326 23.9G 0700 userdata

Successfully moved data partition /data to microSD card /dev/block/mmcblk1p2 by editing /vendor/etc/fstab.qcom

I have unlocked my redmi 7A using unlock tool provided by Xiomi.
I can boot TWRP by:
adb reboot-bootloader
fastboot flash recovery 'TWRP-3.3.1-1003-REDMI7A-CN-wzsx150.img'
fastboot reboot
and holding volume key. ( up or down I don't remember)
I also flashed vbmeta to Disable VerifiedBoot:
fastboot flash --disable-verification vbmeta vbmeta.img
because I was modifying /vendor
Now redmi 7A was running twrp and was connected to my ubuntu PC using USB cable.
On PC I typed:
adb shell
now I got root shell. I created a directory in /mnt to mount /vendor partition.
# mkdir /mnt/dirName
# mount /dev/block/mmcblk0p58 /mnt/dirName
How did I know that /dev/block/mmcblk0p58 was /vendor? Previously I had copied all of phone's emmc flash disk to PC by:
** On PC **
adb pull /dev/block/mmcblk0
I mounted mmcblk0 image file using:
[email protected]:/home/username# losetup --show --nooverlap --partscan --find '/path/to/mmcblk0'
** output **
/dev/loop20
got partition table information using:
** On PC **
[email protected]:/home/username# gdisk /dev/loop20
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Number Start (sector) End (sector) Size Code Name
1 40 55 8.0 KiB A029 fsc
2 56 71 8.0 KiB A02C ssd
3 72 87 8.0 KiB A024 dpo
4 88 119 16.0 KiB A01D sec
5 120 183 32.0 KiB A01A DDR
6 184 247 32.0 KiB A040 limits
7 248 311 32.0 KiB FFFF config
8 312 383 36.0 KiB 8300 bk1
9 384 511 64.0 KiB 8300 bk2
10 512 639 64.0 KiB FFFF vbmeta
11 640 767 64.0 KiB 0700 vbmetabak
12 768 1023 128.0 KiB 8300 bk3
13 1024 1535 256.0 KiB FFFF devcfg
14 1536 2047 256.0 KiB FFFF devcfgbak
15 2048 2559 256.0 KiB A022 apdp
16 2560 3071 256.0 KiB A023 msadp
17 3072 4095 512.0 KiB A012 sbl1
18 4096 5119 512.0 KiB 0700 sbl1bak
19 5120 6143 512.0 KiB A018 rpm
20 6144 7167 512.0 KiB 0700 rpmbak
21 7168 8191 512.0 KiB 0700 mota
22 8192 9215 512.0 KiB A02D keystore
23 9216 10239 512.0 KiB A018 syscfg
24 10240 12287 1024.0 KiB FFFF cmnlib
25 12288 14335 1024.0 KiB FFFF cmnlibbak
26 14336 16383 1024.0 KiB FFFF cmnlib64
27 16384 18431 1024.0 KiB FFFF cmnlib64bak
28 18432 20479 1024.0 KiB FFFF keymaster
29 20480 22527 1024.0 KiB FFFF keymasterbak
30 22528 24575 1024.0 KiB A01F misc
31 24576 26623 1024.0 KiB A015 aboot
32 26624 28671 1024.0 KiB 0700 abootbak
33 28672 30719 1024.0 KiB FFFF dip
34 30720 32767 1024.0 KiB 8300 bk4
35 32768 36863 2.0 MiB A016 tz
36 36864 40959 2.0 MiB 0700 tzbak
37 40960 49151 4.0 MiB 0700 mcfg
38 49152 65535 8.0 MiB A03A devinfo
39 65536 81919 8.0 MiB FFFF dtbo
40 81920 98303 8.0 MiB 0700 dtbobak
41 98304 114687 8.0 MiB A027 modemst1
42 114688 131071 8.0 MiB A028 modemst2
43 131072 147455 8.0 MiB A02A fsg
44 147456 163839 8.0 MiB 8300 bk5
45 163840 196607 16.0 MiB A036 splash
46 196608 229375 16.0 MiB 0700 dsp
47 229376 262143 16.0 MiB 0700 dspbak
48 262144 327679 32.0 MiB A026 persist
49 327680 393215 32.0 MiB A026 persistbak
50 393216 458751 32.0 MiB FFFF mdtp
51 458752 524287 32.0 MiB FFFF mdtpbak
52 524288 655359 64.0 MiB A036 boot
53 655360 786431 64.0 MiB A025 recovery
54 786432 917503 64.0 MiB FFFF logdump
55 917504 1441791 256.0 MiB A039 cache
56 1441792 1703935 128.0 MiB 0700 modem
57 1703936 7995391 3.0 GiB A038 system
58 7995392 10092543 1024.0 MiB A038 vendor
59 10092544 11141119 512.0 MiB A03A cust
60 11141120 11272191 64.0 MiB 8300 userdata
Command (? for help): q
[email protected]:/home/username#
you may observe that size of userdata is 64MB that is because I resized the image to reduce it's size.
from above we can see that /vendor is partition 58 that is /dev/block/mmcblk0p58
after mounting I edited /vendor/etc/fstab.qcom using nano
** On redmi 7A:
# nano /mnt/dirName/etc/fstab.qcom
I changed
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,fileencryption=ice,quota,reservedsize=128M
to
# /dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,fileencryption=ice,quota,reservedsize=128M
/dev/block/mmcblk1p2 /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,quota,reservedsize=128M
notice that I have also removed fileencryption=ice mount option to disable encryption.
I also changed
/devices/platform/soc/7864900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
/devices/soc/7864900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
to
# /devices/platform/soc/7864900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
# /devices/soc/7864900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
to disable mountng of fat32 partition on sdcard as external sdcard
I inserted 128gb microSD card ( class 10 ) into USB card reader and connected the card reader to Ubuntu PC. created GPT patition table on microSD. left 16 GB space at begining of microSD empty so that ext4 fs is aligned with flash storage blocks. created 1 fat32 partition and 1 ext4 partition on sdcard.
after editing fstab I unmounted /vendor and turned off the phone using:
# poweroff
Inserted microSD into phone and turned on. It took few minutes on first boot.
On setup screen do not enter lockscreen password or pattern. because Phone shows incorrect password even if password is correct. I was locked out of my phone because of password error. I had to delete some file/ files ( I don't remember filename ) from /data by connecting microSDcard to pc to remove screen lock.
Microsd card is slightly slower that emmc nand. I have noticed that the phone took slightly longer to start a game after moving /data to microSD. I am on stock rom and haven't updated after fstab modification. Sometimes there is "Updater has stopped" error 1 or 2 minutes after boot.
Pros:
prevents damage to EMMC NAND caused by writes as most reads/writes are from microSD.
easly increase storage by using larger sdcard.
Cons:
cannot use screen lock. phone will be unlocked always.
Phone may have issues after OS update. Or can't update at all. (I have not updated so cann't say)
stock fstab file:
###################################################################################################
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,avb
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,fileencryption=ice,quota,reservedsize=128M
/devices/platform/soc/7864900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
/devices/soc/7864900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
/devices/platform/soc/78db000.usb/msm_hsusb_host* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
/devices/soc/78db000.usb/msm_hsusb_host* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
/dev/block/bootdevice/by-name/config /frp emmc defaults defaults
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=ubject_r:firmware_file:s0 wait
/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait
###################################################################################################
Modified fstab file:
###################################################################################################
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,avb
# /dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,fileencryption=ice,quota,reservedsize=128M
/dev/block/mmcblk1p2 /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,quota,reservedsize=128M
# /devices/platform/soc/7864900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
# /devices/soc/7864900.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd,encryptable=footer
/devices/platform/soc/78db000.usb/msm_hsusb_host* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
/devices/soc/78db000.usb/msm_hsusb_host* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
/dev/block/bootdevice/by-name/config /frp emmc defaults defaults
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=ubject_r:firmware_file:s0 wait
/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait
###################################################################################################
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
How you root miui 10.2.7.0.Please tell me..
RsAbubokor3 said:
How you root miui 10.2.7.0.Please tell me..
Click to expand...
Click to collapse
I have not rooted my phone.
Hi, can you please do a tutorial? Because I need to do this to my redmi 7a, but i'm very new on all this. I'l be very thankful with you
LucianoApP said:
Hi, can you please do a tutorial? Because I need to do this to my redmi 7a, but i'm very new on all this. I'l be very thankful with you
Click to expand...
Click to collapse
I wrote all the steps in the post. you need:
1. usb sdcard reader.
2. 8 gb usb flash drive (for ubuntu OS)
3. ubuntu OS ( to set up sdcard.)
4. twrp.img available on this forum.
5. vbmeta.img available on this forum.
reply and I will guide you.

[502SO][Boot Loader Unlocked]my phones flashmode is dead. help me

i flashed US ROM ,after i flashed JP ROM.Then I got an error in partition.sin and almost all partitions were corrupted.
I fixed it to some extent with fastboot, but flashmode is not working.
Gleen LED flashing every 3 seconds, does not recognize on computer.
My phone:502SO(JP Softbank)
Boot loader unlocked
Working:TWRP,Stock,fastboot
Broken:flashmode
Please tell me how to fix flash mode.
TWRP in fdisk -f /dev/block/mmcblk0
Code:
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 61071360 sectors, 1148M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61071326
Number Start (sector) End (sector) Size Code Name
1 256 4351 2048K 0700 TA
2 8192 40959 16.0M 0700 LTALabel
3 40960 45055 2048K 0700 xbl
4 45056 49151 2048K 0700 xblbak
5 49152 53247 2048K 0700 tz
6 53248 57343 2048K 0700 tzbak
7 57344 58343 500K 0700 rpm
8 58344 59343 500K 0700 rpmbak
9 59344 60367 512K 0700 hyp
10 60368 61391 512K 0700 hypbak
11 61392 62415 512K 0700 pmic
12 62416 63439 512K 0700 pmicbak
13 65536 69631 2048K 0700 fsg
14 69632 71679 1024K 0700 aboot
15 71680 73727 1024K 0700 abootbak
16 73728 204799 64.0M 0700 boot
17 204800 205823 512K 0700 keymaster
18 205824 206847 512K 0700 keymasterbak
19 206848 207359 256K 0700 cmnlib
20 207360 207871 256K 0700 cmnlibbak
21 207872 208383 256K 0700 cmnlib64
22 208384 208895 256K 0700 cmnlib64bak
23 208896 403455 95.0M 0700 modem
24 403456 436223 16.0M 0700 dsp
25 436224 436225 1024 0700 devinfo
26 436232 436743 256K 0700 apdp
27 436744 437255 256K 0700 msadp
28 437256 437257 1024 0700 dpo
29 437264 504111 32.6M 0700 splash
30 504112 506159 1024K 0700 ddr
31 506160 506415 128K 0700 sec
32 506416 506431 8192 0700 ssd
33 507904 511999 2048K 0700 modemst1
34 516096 520191 2048K 0700 modemst2
35 524288 1048575 256M 0700 cache
36 1048576 1114111 32.0M 0700 persist
37 1114112 1115135 512K 0700 keystore
38 1115136 1115391 128K 0700 devcfg
39 1115392 1115647 128K 0700 devcfgbak
40 1115648 1116671 512K 0700 frp
41 1116672 1120767 2048K 0700 sti
42 1120768 1939967 400M 0700 oem
43 1939968 2021887 40.0M 0700 s1sbl
44 2021888 2103807 40.0M 0700 s1sblbak
45 2103808 2234879 64.0M 0700 FOTAKernel
46 2234880 2300415 32.0M 0700 rdimage
47 2301952 2322431 10.0M 0700 apps_log
48 2326528 2359295 16.0M 0700 diag
49 2359296 2461695 50.0M 0700 carrier
50 2465792 2506751 20.0M 0700 Qnovo
51 2506752 2506951 100K 0700 tzs1attest
52 2506952 2507151 100K 0700 tzs1attestbak
53 2507152 2508175 512K 0700 tzs1sbl
54 2508176 2509199 512K 0700 tzs1sblbak
55 2514944 45744127 20.6G 0700 userdata
56 45744128 61063167 7480M 0700 system
I fixit.
sim1222 said:
TWRP in fdisk -f /dev/block/mmcblk0
Code:
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 61071360 sectors, 1148M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61071326
Number Start (sector) End (sector) Size Code Name
1 256 4351 2048K 0700 TA
2 8192 40959 16.0M 0700 LTALabel
3 40960 45055 2048K 0700 xbl
4 45056 49151 2048K 0700 xblbak
5 49152 53247 2048K 0700 tz
6 53248 57343 2048K 0700 tzbak
7 57344 58343 500K 0700 rpm
8 58344 59343 500K 0700 rpmbak
9 59344 60367 512K 0700 hyp
10 60368 61391 512K 0700 hypbak
11 61392 62415 512K 0700 pmic
12 62416 63439 512K 0700 pmicbak
13 65536 69631 2048K 0700 fsg
14 69632 71679 1024K 0700 aboot
15 71680 73727 1024K 0700 abootbak
16 73728 204799 64.0M 0700 boot
17 204800 205823 512K 0700 keymaster
18 205824 206847 512K 0700 keymasterbak
19 206848 207359 256K 0700 cmnlib
20 207360 207871 256K 0700 cmnlibbak
21 207872 208383 256K 0700 cmnlib64
22 208384 208895 256K 0700 cmnlib64bak
23 208896 403455 95.0M 0700 modem
24 403456 436223 16.0M 0700 dsp
25 436224 436225 1024 0700 devinfo
26 436232 436743 256K 0700 apdp
27 436744 437255 256K 0700 msadp
28 437256 437257 1024 0700 dpo
29 437264 504111 32.6M 0700 splash
30 504112 506159 1024K 0700 ddr
31 506160 506415 128K 0700 sec
32 506416 506431 8192 0700 ssd
33 507904 511999 2048K 0700 modemst1
34 516096 520191 2048K 0700 modemst2
35 524288 1048575 256M 0700 cache
36 1048576 1114111 32.0M 0700 persist
37 1114112 1115135 512K 0700 keystore
38 1115136 1115391 128K 0700 devcfg
39 1115392 1115647 128K 0700 devcfgbak
40 1115648 1116671 512K 0700 frp
41 1116672 1120767 2048K 0700 sti
42 1120768 1939967 400M 0700 oem
43 1939968 2021887 40.0M 0700 s1sbl
44 2021888 2103807 40.0M 0700 s1sblbak
45 2103808 2234879 64.0M 0700 FOTAKernel
46 2234880 2300415 32.0M 0700 rdimage
47 2301952 2322431 10.0M 0700 apps_log
48 2326528 2359295 16.0M 0700 diag
49 2359296 2461695 50.0M 0700 carrier
50 2465792 2506751 20.0M 0700 Qnovo
51 2506752 2506951 100K 0700 tzs1attest
52 2506952 2507151 100K 0700 tzs1attestbak
53 2507152 2508175 512K 0700 tzs1sbl
54 2508176 2509199 512K 0700 tzs1sblbak
55 2514944 45744127 20.6G 0700 userdata
56 45744128 61063167 7480M 0700 system
Can you teach me how do your treads I m just a newbie dont know anything
Click to expand...
Click to collapse

EDL partitions cloning

Hi,
As Redmi 4A are already pretty cheap I wanted to experiment a bit. I have two of them, which one of them had unlocked bootloader and second did not.
I used emmcdl.exe to dump all partitions from one with unlocked bootloader:
Code:
# PartNum PartName StartSec NumSecs
# PartNum PartName StartSec NumSecs
1 modem 131072 172032
2 fsc 393216 2
3 ssd 393218 16
4 sbl1 393234 1024
5 sbl1bak 394258 1024
6 rpm 395282 1024
7 rpmbak 396306 1024
8 tz 397330 4096
9 tzbak 401426 4096
10 devcfg 405522 512
11 devcfgbak 406034 512
12 dsp 406546 32768
13 modemst1 439314 3072
14 modemst2 442386 3072
15 DDR 524288 64
16 fsg 524352 3072
17 sec 527424 32
18 splash 655360 40960
19 aboot 786432 2048
20 abootbak 788480 2048
21 boot 790528 131072
22 recovery 921600 131072
23 devinfo 1052672 2048
24 system 1054720 6291456
25 cache 7471104 524288
26 persist 7995392 65536
27 misc 8060928 2048
28 keystore 8062976 1024
29 config 8064000 64
30 oem 8064064 131072
31 limits 8257536 64
32 mota 8388608 1024
33 dip 8389632 2048
34 mdtp 8391680 65536
35 syscfg 8457216 1024
36 mcfg 8458240 8192
37 lksecapp 8519680 256
38 lksecappbak 8519936 256
39 cmnlib 8520192 512
40 cmnlibbak 8520704 512
41 cmnlib64 8521216 512
42 cmnlib64bak 8521728 512
43 keymaster 8522240 512
44 keymasterbak 8522752 512
45 apdp 8650752 512
46 msadp 8651264 512
47 dpo 8651776 16
48 cust 8781824 1048576
49 userdata 9830400 51240927
and then I have written them to the second Redmi 4A (I dumped them again, checked CRC sums which were fine). I hoped I got clone of the phone. Unfortunately I did not. I lost imei's and what is more phone stopped charging. WiFi and other functions are working working.
Are persist and modemst partitions that contain information about sensors and imei's?
Do you have idea what may went wrong as clonning partitions went OK ?
.

I erased my Vendor by accident on my Redmi 4A! Does anyone have a backup? :')

I erased my Vendor by accident on my Redmi 4A! Does anyone have a backup? :')
I Was booted into TWRP and I thought it was like samsung, so erased vendor, dalvik art cache ect.
Little did I knew was that I had deleted the EFS. So yea now if you have a Redmi 4A Vendor.img I would
love to have it since Bluetooth and Wifi Doesn't work
P.S. Sorry for my bad english, im just new here! )
ASCX_A20e said:
Does anyone have a backup? :')
Click to expand...
Click to collapse
Just download the firmware and extract it. That's it.
Redmi 4A – MIUI Download Xiaomi Official ROM
WoKoschekk said:
Just download the firmware and extract it. That's it.
Click to expand...
Click to collapse
It doesnt include a vendor.img sadly...
ASCX_A20e said:
It doesnt include a vendor.img sadly...
Click to expand...
Click to collapse
It does. I guarantee.
WoKoschekk said:
Just download the firmware and extract it. That's it.
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Are sure your device has a partition /vendor? Is it a system-as-root device? Below you see the partition table of your Redmi 4A. There's no partition /vendor and for that reason no one has a backup of it.
Code:
GPT fdisk (gdisk) version 1.0.9
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Warning! Secondary partition table overlaps the last partition by
9830399 blocks!
You will need to delete this partition or resize it in another utility.
Disk gpt_main0.bin: 34 sectors, 17.0 KiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 52 entries
Main partition table begins at sector 2 and ends at sector 14
First usable sector is 34, last usable sector is 0
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 131072 303103 84.0 MiB 0700 modem
2 393216 393217 1024 bytes A029 fsc
3 393218 393233 8.0 KiB A02C ssd
4 393234 394257 512.0 KiB A012 sbl1
5 394258 395281 512.0 KiB 0700 sbl1bak
6 395282 396305 512.0 KiB A018 rpm
7 396306 397329 512.0 KiB 0700 rpmbak
8 397330 401425 2.0 MiB A016 tz
9 401426 405521 2.0 MiB 0700 tzbak
10 405522 406033 256.0 KiB FFFF devcfg
11 406034 406545 256.0 KiB FFFF devcfgbak
12 406546 439313 16.0 MiB 0700 dsp
13 439314 442385 1.5 MiB A027 modemst1
14 442386 445457 1.5 MiB A028 modemst2
15 524288 524351 32.0 KiB A01A DDR
16 524352 527423 1.5 MiB A02A fsg
17 527424 527455 16.0 KiB A01D sec
18 655360 696319 20.0 MiB A036 splash
19 786432 788479 1024.0 KiB A015 aboot
20 788480 790527 1024.0 KiB 0700 abootbak
21 790528 921599 64.0 MiB A036 boot
22 921600 1052671 64.0 MiB A025 recovery
23 1052672 1054719 1024.0 KiB A03A devinfo
24 1054720 7346175 3.0 GiB A038 system
25 7471104 7995391 256.0 MiB A039 cache
26 7995392 8060927 32.0 MiB A026 persist
27 8060928 8062975 1024.0 KiB A01F misc
28 8062976 8063999 512.0 KiB A02D keystore
29 8064000 8064063 32.0 KiB FFFF config
30 8064064 8195135 64.0 MiB FFFF oem
31 8257536 8257599 32.0 KiB A040 limits
32 8388608 8389631 512.0 KiB 0700 mota
33 8389632 8391679 1024.0 KiB FFFF dip
34 8391680 8457215 32.0 MiB FFFF mdtp
35 8457216 8458239 512.0 KiB A018 syscfg
36 8458240 8466431 4.0 MiB 0700 mcfg
37 8519680 8519935 128.0 KiB FFFF lksecapp
38 8519936 8520191 128.0 KiB FFFF lksecappbak
39 8520192 8520703 256.0 KiB FFFF cmnlib
40 8520704 8521215 256.0 KiB FFFF cmnlibbak
41 8521216 8521727 256.0 KiB FFFF cmnlib64
42 8521728 8522239 256.0 KiB FFFF cmnlib64bak
43 8522240 8522751 256.0 KiB FFFF keymaster
44 8522752 8523263 256.0 KiB FFFF keymasterbak
45 8650752 8651263 256.0 KiB A022 apdp
46 8651264 8651775 256.0 KiB A023 msadp
47 8651776 8651791 8.0 KiB A024 dpo
48 8781824 9830399 512.0 MiB A03A cust
49 9830400 9830399 0 bytes A03A userdata
WoKoschekk said:
It does. I guarantee.
Click to expand...
Click to collapse
look at this bro, no there isnt
WoKoschekk said:
Are sure your device has a partition /vendor? Is it a system-as-root device? Below you see the partition table of your Redmi 4A. There's no partition /vendor and for that reason no one has a backup of it.
Code:
GPT fdisk (gdisk) version 1.0.9
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Warning! Secondary partition table overlaps the last partition by
9830399 blocks!
You will need to delete this partition or resize it in another utility.
Disk gpt_main0.bin: 34 sectors, 17.0 KiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 98101B32-BBE2-4BF2-A06E-2BB33D000C20
Partition table holds up to 52 entries
Main partition table begins at sector 2 and ends at sector 14
First usable sector is 34, last usable sector is 0
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 131072 303103 84.0 MiB 0700 modem
2 393216 393217 1024 bytes A029 fsc
3 393218 393233 8.0 KiB A02C ssd
4 393234 394257 512.0 KiB A012 sbl1
5 394258 395281 512.0 KiB 0700 sbl1bak
6 395282 396305 512.0 KiB A018 rpm
7 396306 397329 512.0 KiB 0700 rpmbak
8 397330 401425 2.0 MiB A016 tz
9 401426 405521 2.0 MiB 0700 tzbak
10 405522 406033 256.0 KiB FFFF devcfg
11 406034 406545 256.0 KiB FFFF devcfgbak
12 406546 439313 16.0 MiB 0700 dsp
13 439314 442385 1.5 MiB A027 modemst1
14 442386 445457 1.5 MiB A028 modemst2
15 524288 524351 32.0 KiB A01A DDR
16 524352 527423 1.5 MiB A02A fsg
17 527424 527455 16.0 KiB A01D sec
18 655360 696319 20.0 MiB A036 splash
19 786432 788479 1024.0 KiB A015 aboot
20 788480 790527 1024.0 KiB 0700 abootbak
21 790528 921599 64.0 MiB A036 boot
22 921600 1052671 64.0 MiB A025 recovery
23 1052672 1054719 1024.0 KiB A03A devinfo
24 1054720 7346175 3.0 GiB A038 system
25 7471104 7995391 256.0 MiB A039 cache
26 7995392 8060927 32.0 MiB A026 persist
27 8060928 8062975 1024.0 KiB A01F misc
28 8062976 8063999 512.0 KiB A02D keystore
29 8064000 8064063 32.0 KiB FFFF config
30 8064064 8195135 64.0 MiB FFFF oem
31 8257536 8257599 32.0 KiB A040 limits
32 8388608 8389631 512.0 KiB 0700 mota
33 8389632 8391679 1024.0 KiB FFFF dip
34 8391680 8457215 32.0 MiB FFFF mdtp
35 8457216 8458239 512.0 KiB A018 syscfg
36 8458240 8466431 4.0 MiB 0700 mcfg
37 8519680 8519935 128.0 KiB FFFF lksecapp
38 8519936 8520191 128.0 KiB FFFF lksecappbak
39 8520192 8520703 256.0 KiB FFFF cmnlib
40 8520704 8521215 256.0 KiB FFFF cmnlibbak
41 8521216 8521727 256.0 KiB FFFF cmnlib64
42 8521728 8522239 256.0 KiB FFFF cmnlib64bak
43 8522240 8522751 256.0 KiB FFFF keymaster
44 8522752 8523263 256.0 KiB FFFF keymasterbak
45 8650752 8651263 256.0 KiB A022 apdp
46 8651264 8651775 256.0 KiB A023 msadp
47 8651776 8651791 8.0 KiB A024 dpo
48 8781824 9830399 512.0 MiB A03A cust
49 9830400 9830399 0 bytes A03A userdata
Click to expand...
Click to collapse
i erased /vendor by accident and I dont have a backup
ASCX_A20e said:
i erased /vendor by accident and I dont have a backup
Click to expand...
Click to collapse
As you can see above, there is no partition /vendor. The Redmi 4A is not a system-root device. So, /vendor is /system/vendor and you must flash the system.img to /system. That will restore your vendor files.
WoKoschekk said:
As you can see above, there is no partition /vendor. The Redmi 4A is not a system-root device. So, /vendor is /system/vendor and you must flash the system.img to /system. That will restore your vendor files.
Click to expand...
Click to collapse
my bad, i flashed system.img but it didnt fix sadly, wifi turns off when i turn it on.. any ideas?
ASCX_A20e said:
any ideas?
Click to expand...
Click to collapse
yes... flash the complete firmware and go back to stock.

Categories

Resources