Successfully moved data partition /data to microSD card /dev/block/mmcblk1p2 by editing /vendor/etc/fstab.qcom - Redmi 7A Guides, News, & Discussion

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.

Related

[Q] Can't Access Storage - Partition & Format?

I used the Vivid Toolkit for Noobs and unlocked the bootloader, flashed the recovery to CWM, flashed the kernel using the .IMG kernel file in Virtuous Inquisition v4.0.2.1, rooted, copied Virtuous Inquisition over to the phone, went to recovery, and...
wipe data/factory reset
wipe cache partition
install zip from sdcard
Virtuous Inquisition installed and I am using it now. However, if I go to SETTINGS > STORAGE something happens to where the phone goes back to the Home Screen and displays...
"Unfortunately, Settings has stopped."
I can press OK to close that message, but something isn't right.
If I enable USB Storage and look on my computer, I only have 8.82 GBs of storage? I realize some is locked by Android, but I would think I would be allowed more than 8.82 GBs.
I would like to repartition then reformat the phone and reinstall Virtuous Inquisition v4.0.2.1. What is the best and easiest way for a noob to do this?
Yeah something isn't right...
d:\Root\Data>adb shell
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Error: Can't have overlapping partitions.
(parted)
(parted) quit
quit
quit
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Warning: deleting partitions after 60
Disk /dev/block/mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 17 128 4d Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 17 49 256 51 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 49 4094 32367 5d Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 4094 1923584 15355920 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 4095 4096 16 5a Unknown
/dev/block/mmcblk0p6 4097 4129 256 73 Unknown
/dev/block/mmcblk0p7 4129 6684 20442+ 5b Unknown
/dev/block/mmcblk0p8 6684 6716 256 5c Unknown
/dev/block/mmcblk0p9 6716 6844 1024 45 Unknown
/dev/block/mmcblk0p10 6844 6876 256 47 Unknown
/dev/block/mmcblk0p11 6876 7132 2048 46 Unknown
/dev/block/mmcblk0p12 7132 7260 1024 4c Unknown
/dev/block/mmcblk0p13 7260 7264 32 39 Unknown
/dev/block/mmcblk0p14 7264 8032 6144 34 Unknown
/dev/block/mmcblk0p15 8032 8160 1024 36 Unknown
/dev/block/mmcblk0p16 8161 8192 256 76 Unknown
/dev/block/mmcblk0p17 8193 13313 40960 77 Unknown
/dev/block/mmcblk0p18 13313 18433 40960 77 Unknown
/dev/block/mmcblk0p19 18433 19457 8191 74 Unknown
/dev/block/mmcblk0p20 19457 20480 8190+ 74 Unknown
/dev/block/mmcblk0p21 20481 24576 32768 7a Unknown
/dev/block/mmcblk0p22 24577 26625 16384 48 Unknown
/dev/block/mmcblk0p23 26625 28672 16383 71 Unknown
/dev/block/mmcblk0p24 28673 30720 16381+ 76 Unknown
/dev/block/mmcblk0p25 30720 31232 4096 4a Unknown
/dev/block/mmcblk0p26 31232 31744 4096 4b Unknown
/dev/block/mmcblk0p27 31744 32256 4096 59 Unknown
/dev/block/mmcblk0p28 32257 32768 4096 5a Unknown
/dev/block/mmcblk0p29 32769 163840 1048575+ 83 Linux
/dev/block/mmcblk0p30 163841 167902 32489+ 19 Unknown
/dev/block/mmcblk0p31 167902 167902 4 88 Unknown
/dev/block/mmcblk0p32 167902 167934 256 23 Unknown
/dev/block/mmcblk0p33 167934 167936 16 89 Unknown
/dev/block/mmcblk0p34 167937 692224 4194303+ 83 Linux
/dev/block/mmcblk0p35 692225 729088 294911+ 83 Linux
/dev/block/mmcblk0p36 729089 1887744 9269248 c Win95 FAT32 (LB
A)
/dev/block/mmcblk0p37 1887745 1887753 64 90 Unknown
/dev/block/mmcblk0p38 4095 4096 16 5a Unknown
/dev/block/mmcblk0p39 4097 4129 256 73 Unknown
/dev/block/mmcblk0p40 4129 6684 20442+ 5b Unknown
/dev/block/mmcblk0p41 6684 6716 256 5c Unknown
/dev/block/mmcblk0p42 6716 6844 1024 45 Unknown
/dev/block/mmcblk0p43 6844 6876 256 47 Unknown
/dev/block/mmcblk0p44 6876 7132 2048 46 Unknown
/dev/block/mmcblk0p45 7132 7260 1024 4c Unknown
/dev/block/mmcblk0p46 7260 7264 32 39 Unknown
/dev/block/mmcblk0p47 7264 8032 6144 34 Unknown
/dev/block/mmcblk0p48 8032 8160 1024 36 Unknown
/dev/block/mmcblk0p49 8161 8192 256 76 Unknown
/dev/block/mmcblk0p50 8193 13313 40960 77 Unknown
/dev/block/mmcblk0p51 13313 18433 40960 77 Unknown
/dev/block/mmcblk0p52 18433 19457 8191 74 Unknown
/dev/block/mmcblk0p53 19457 20480 8190+ 74 Unknown
/dev/block/mmcblk0p54 20481 24576 32768 7a Unknown
/dev/block/mmcblk0p55 24577 26625 16384 48 Unknown
/dev/block/mmcblk0p56 26625 28672 16383 71 Unknown
/dev/block/mmcblk0p57 28673 30720 16381+ 76 Unknown
/dev/block/mmcblk0p58 30720 31232 4096 4a Unknown
/dev/block/mmcblk0p59 31232 31744 4096 4b Unknown
/dev/block/mmcblk0p60 31744 32256 4096 59 Unknown
Partition table entries are not in disk order
~ #

[Q+A] CM12 nightly does not mount sdcard0

Hi all,
I've recently installed the CM 12 20150830-NIGHTLY on my Sony Xperia T. After a few bumps in the road, everything seems to be working except for one thing: The internal sdcard (sdcard0) does not seem to mount.
The camera app tells me to insert an SD card before using it, and the brower won't download files off the Internet, etc.
Here's the specifics:
The permissions in /mnt/media_rw seem off for the internal sdcard:
[email protected]:/mnt/media_rw # ll
drwx------ media_rw media_rw 1972-11-13 17:42 sdcard0
drwxrwx--- media_rw media_rw 1970-01-01 01:00 sdcard1
drwx------ media_rw media_rw 1972-11-13 17:42 usbdisk
Click to expand...
Click to collapse
.. and there's no way to change them:
[email protected]:/mnt/media_rw # chmod 755 sdcard0
Unable to chmod sdcard0: Read-only file system
Click to expand...
Click to collapse
My mounttable does not mention anything being mounted as sdcard0:
[email protected]:/mnt/media_rw # mount | grep sdcard
/dev/block/vold/179:33 /mnt/media_rw/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
Click to expand...
Click to collapse
And my partition table does seem have an obvious target that I would use as sdcard0:
[email protected]:/mnt/media_rw # fdisk -l /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 31105024 sectors, 2900M
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 31104990
Number Start (sector) End (sector) Size Code Name
1 256 4351 2048K 0700 TA
2 4352 7423 1536K 0700 Boot
3 7424 10495 1536K 0700 Boot2
4 12288 53247 20.0M 0700 Kernel
5 53248 55295 1024K 0700 TZ
6 57344 63487 3072K 0700 modemst1
7 65536 71679 3072K 0700 modemst2
8 73728 79871 3072K 0700 fsg
9 79872 90111 5120K 0700 ramdump
10 90112 106495 8192K 0700 apps_log
11 106496 139263 16.0M 0700 FOTAKernel
12 139264 2654207 1228M 0700 System
13 2654208 3166207 250M 0700 Cache
14 3166208 12695312 4652M 0700 Userdata
15 12695313 31104990 8989M 0700 SDCard
Click to expand...
Click to collapse
Before installing CM, the partition called SDCard was used as the internal sdcard on Sony's stock ROM, but not it's not mounted anywhere. I believe that's the issue, but I don't know how to make CM mount it correctly at boot. I'd much appreciate any hints you could give.
Thanks,
EDIT: After googling and adb'ing for hours the answer turned out to be the simplest and most obvious thing that I should have tried first: Go to Settings->Storage and hit Erase SD Card. The phone does its magic and everything works!
Now, move along

[HELP] What happened here? Hardbrick after partitioning?

My device: MotoX (ghost)
Hey guys,
Today i pushed "parted" to my /sbin, chmodded 0755 and removed/recreated my userdata partition removing 5mb of total.. (to try to solve a known encryption bug of CM). Then, i reboot.
Now MY PHONE LOOKS HARD BRICKED!
How it is possible? i just deleted/recreated the userdata partition,
yes parted create on format ext2, but the next step is to convert to ext4 > f2fs..
but my phone does not start!
Black screen
No fastboot
lsusb does not list the usb connection..
Pressing the ON = doesn't boot
Pressing vol down + power = doesn't boot
Inserting charger = doesn't boot
No Lights on.
Battery is ok (i think), i started working w/ 100%.
full log of my actions here:
Code:
$ adb push sdparted/parted /sbin
3067 KB/s (346680 bytes in 0.110s)
~/droid $ adb shell
~ # ls
boot init.qcom.sh sepolicy
cache init.rc sideload
charger init.recovery.qcom.rc supersu
data license sys
default.prop proc system
dev property_contexts tmp
etc recovery twres
file_contexts res ueventd.qcom.rc
fstab.qcom root ueventd.rc
init sbin usb-otg
init.mmi.boot.sh sdcard
init.mmi.touch.sh seapp_contexts
~ # chmod 0755 /sbin/parted
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131kB 105MB 105MB ext4 modem
2 105MB 107MB 1536kB sbl1
3 107MB 108MB 1536kB sbl2
4 108MB 109MB 526kB sbl3
5 110MB 111MB 524kB aboot
6 112MB 112MB 145kB rpm
7 112MB 112MB 215kB tz
8 113MB 113MB 524kB utags
9 113MB 114MB 1049kB logs
10 114MB 117MB 3150kB padA
11 117MB 119MB 1536kB sbl2Backup
12 119MB 121MB 2097kB sbl3Backup
13 121MB 123MB 1536kB abootBackup
14 123MB 123MB 512kB rpmBackup
15 123MB 124MB 512kB tzBackup
16 124MB 124MB 524kB utagsBackup
17 124MB 126MB 1671kB padB
18 126MB 129MB 3146kB modemst1
19 129MB 132MB 3146kB modemst2
20 132MB 134MB 2097kB mbl
21 134MB 135MB 655kB hob
22 135MB 135MB 8192B dhob
23 135MB 143MB 8389kB ext4 persist
24 143MB 143MB 8192B ssd
25 143MB 147MB 3146kB ext2 fsg
26 147MB 148MB 1049kB sp
27 148MB 148MB 524kB misc
28 148MB 151MB 3146kB ext3 pds
29 151MB 151MB 131kB cid
30 151MB 156MB 4194kB logo
31 156MB 160MB 4194kB clogo
32 160MB 161MB 1049kB devtree
33 161MB 171MB 10.5MB boot
34 171MB 182MB 10.5MB recovery
35 182MB 190MB 8389kB kpan
36 190MB 1257MB 1067MB cache
37 1257MB 1258MB 1049kB padC
38 1258MB 2869MB 1611MB ext4 system
39 2869MB 2982MB 113MB customize
40 2982MB 15.8GB 12.8GB userdata
(parted) rm 40
rm 40
(parted) mkpartfs primary ext2 2982MB 15695MB
mkpartfs primary ext2 2982MB 15695MB
(parted) name 40 userdata
name 40 userdata
(parted) quit
quit
Information: You may need to update /etc/fstab.
.. and rebooted using twrp reboot/system button.
Wtf is happened?
any ideas how to solve this?
thanks.
Umm, gpt.bin corrupted.. Head towards the unbrick thread..

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