[Q] Can't Access Storage - Partition & Format? - HTC Vivid, Raider, Velocity

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
~ #

Related

[Q] Where is the boot partition in Optimus Black?

I wanted to extract boot.img from an existing rom, following this wiki:
http://android-dls.com/wiki/index.p..._Images#Structure_of_boot_and_recovery_images
But it seems that on Stock Rom (actually I'm using Zeus rom, based on stock) there is no /proc/mtd that would tell me where to find the "boot" partition. I think it should be one of these:
179 0 1912832 mmcblk0
179 1 128 mmcblk0p1
179 2 512 mmcblk0p2
179 3 6144 mmcblk0p3
179 4 6144 mmcblk0p4
179 5 2048 mmcblk0p5
179 6 2048 mmcblk0p6
179 7 8192 mmcblk0p7
179 8 660480 mmcblk0p8
179 9 1161088 mmcblk0p9
179 10 65536 mmcblk0p10
179 11 128 mmcblk0p11
179 12 128 mmcblk0p12
179 16 15637504 mmcblk1
179 17 15633408 mmcblk1p1
Do anyone know where the boot partition is hiding? Or have an idea on how to find where it is?
Here are some of the partitions:
Code:
loop0 =
/dev/block/mmcblk0 =
/dev/block/mmcblk0p1 =
/dev/block/mmcblk0p2 =
/dev/block/mmcblk0p3 = /boot
/dev/block/mmcblk0p4 = /recovery
/dev/block/mmcblk0p5 = /lgdrm
/dev/block/mmcblk0p6 = /dvp/userdata
/dev/block/mmcblk0p7 =
/dev/block/mmcblk0p8 = /system
/dev/block/mmcblk0p9 = /data
/dev/block/mmcblk0p10 = /cache
/dev/block/mmcblk0p11 =
/dev/block/mmcblk0p12 =
/dev/block/mmcblk1 =
/dev/block/mmcblk1p1 = /sdcard
dm-0 =

How I fixed my bricked Nexus 5 (corrupted userdata, bootlooping)

Hi everyone,
First of all - apologies if this is in the wrong forum. First time I post something, so not too sure if this is the right place.
I've been struggling with my Nexus 5 for the past 3 days after I attempted a factory reset. After trying everything I could find, I managed to combine some strategies from different threads, and got some help from a friend who is a linux specialist. As it has been REALLY HARD for me to fix this, I thought I would post the solution in case anyone is seeing the same issue.
Summary of my issue:
I attempted a factory reset to cleanup the phone. That was really all I intended to do.
The factory reset got stuck on "erasing". After 30 minutes waiting, I forced the phone to reboot. Then everything went downhill.
My Nexus 5 started bootlooping. It wouldn't even get in recovery mode.
I've flashed ClockWorkMod Recovery, and tried to format everything and start again. The processes to wipe partitions would fail.
Flashing stock also failed, as things would hang on "erasing cache".
I found references on multiple threads about things to try - from flashing other ROMs, to formatting the file system manually, and basically trying every step of a flashing a stock installation manually.
The bottom line is everything would hang because the system could not mount the /data partition.
When I tried to use "e2fsck" to check /userdata partition, it would give me an error about the file system being corrupted, and suggesting to use a different superblock.
Some threads here in XDA suggested to use CWM and TWRP to format the partition, as that would usually fix the problem. It didn't work in my case.
The system would basically hang when trying to format /data, with any method I tried.
When using the "dmesg" command, I would also see lots of errors with superblocks when trying to mount "/data".
I considered it could be a hardware issue, but I was not seeing problems with the other partitions (/cache, /system, /recovery, and so on).
Solution:
I fixed the problem by removing the partition, recreating it with "ext2" file system, then upgrading to "ext4" manually, and finally flashing the system images again WITHOUT flashing userdata.
Every time I flash "userdata", the partition just gets corrupted.
This is the step by step on how I did it:
1) Start the phone on bootloader by holding power button + volume down. Flash CWM recovery through fastboot.
Download CWM recovery from here: https://clockworkmod.com/rommanager
I'm using windows, so I opened a command prompt on the "Android SDK\platform-tools" folder.
run: "fastboot flash recovery <CWM_Recovery_Folder>\recovery-clockwork-6.0.4.5-hammerhead.img"
2) Reboot in recovery mode, so that it would load ADB. In the command prompt I ran "adb shell" so I could use the linux tools
Use "parted /dev/block/mmcblk0" to open the parted tool for the mmc block.
Use command "print" to list all partitions. You should see something like this:
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.7MB 1049kB sbl1
3 68.7MB 69.2MB 524kB rpm
4 69.2MB 69.7MB 524kB tz
5 69.7MB 70.3MB 524kB sdi
6 70.3MB 70.8MB 524kB aboot
7 70.8MB 72.9MB 2097kB pad
8 72.9MB 73.9MB 1049kB sbl1b
9 73.9MB 74.4MB 524kB tzb
10 74.4MB 75.0MB 524kB rpmb
11 75.0MB 75.5MB 524kB abootb
12 75.5MB 78.6MB 3146kB modemst1
13 78.6MB 81.8MB 3146kB modemst2
14 81.8MB 82.3MB 524kB metadata
15 82.3MB 99.1MB 16.8MB misc
16 99.1MB 116MB 16.8MB ext4 persist
17 116MB 119MB 3146kB imgdata
18 119MB 142MB 23.1MB laf
19 142MB 165MB 23.1MB boot
20 165MB 188MB 23.1MB recovery
21 188MB 191MB 3146kB fsg
22 191MB 192MB 524kB fsc
23 192MB 192MB 524kB ssd
24 192MB 193MB 524kB DDR
25 193MB 1267MB 1074MB ext4 system
26 1267MB 1298MB 31.5MB crypto
27 1298MB 2032MB 734MB ext4 cache
28 2032MB 31.3GB 29.2GB ext4 userdata
29 31.3GB 31.3GB 5632B grow
Click to expand...
Click to collapse
3) Remove the existing data partition by running command "rm 28" .
4) Recreate the partition and the file system with "mkpartfs". I didn't use all parameters at once, but just informed the proper values as requested by the tool:
(parted) mkpartfs
mkpartfs
mkpartfs
Partition name? []? userdate
userdate
userdate
File system type? [ext2]? ext2
ext2
ext2
Start? 2032MB
2032MB
2032MB
End? 31.3GB
31.3GB
31.3GB
Click to expand...
Click to collapse
5) The partition should now be recreated as "ext2" file system. I've set the partition name with:
(parted) name 28 userdata
name 28 userdata
name 28 userdata
Click to expand...
Click to collapse
If you print again, you should see the new partition as ext2 file system:
(...)
28 2032MB 31.3GB 29.2GB ext2 userdata
(...)
Click to expand...
Click to collapse
6) Upgrade the FS from ext2 to ext4 by using make_ext4fs:
make_ext4fs -l 29236371456 -b 4096 -g 32768 -i 8192 -I 256 -j 32768 -L msdos -a /data /dev/block/mmcblk0p28
Now here is the interesting part. When I tried to run "flash-all" from the google stock image, this is what I would see when it ran the format script on the userdata partition:
OKAY [ 13.186s]
formatting 'userdata' partition...
Creating filesystem with parameters:
Size: 29236371456
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 7137786
Block groups: 218
Reserved block group size: 1024
Created filesystem with 11/1785856 inodes and 156120/7137786 blocks
sending 'userdata' (139109 KB)...
writing 'userdata'...
OKAY [ 16.625s]
finished. total time: 29.811s
Click to expand...
Click to collapse
When I manually ran the make_ext4fs, the only difference was I added a label "msdos" and this was the result:
Creating filesystem with parameters:
Size: 29236371456
Block size: 4096
Blocks per group: 32768
Inodes per group: 48
Inode size: 256
Journal blocks: 32768
Label: msdos
Blocks: 7137786
Block groups: 218
Reserved block group size: 1024
Click to expand...
Click to collapse
Almost the same thing, but with a difference in "Inodes per group": stock script shows 8192, and running manually it shows 48.
I have no idea why is that. Honestly I know very little about linux and its file systems, so I don't know what that means.
After I did this, I was FINALLY able to mount the "/data" partition.
8) Checked the file system with e2fsck. It now worked fine:
~ # e2fsck /dev/block/mmcblk0p28
e2fsck /dev/block/mmcblk0p28
e2fsck 1.41.14 (22-Dec-2010)
msdos: clean, 11/10464 files, 45158/7137786 blocks
~ #
9) Manually flash google stock system, cache, boot, and bootloader.
I was using this image: hammerhead-ktu84p-factory-35ea0277.tgz
I uncompressed this to a folder, and also uncompressed the image-hammerhead-ktu84p.zip.
So I ran:
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash boot boot.img
After this, I rebooted the system and it loaded, after loooooong 3 days reading through everything I could on XDA!
These were some of the threads that helped me in one way or another to get to this solution:
http://forum.xda-developers.com/showpost.php?p=26285877&postcount=12
http://forum.xda-developers.com/google-nexus-5/help/help-nexus-5-bricked-clearing-cache-t2564509
http://forum.xda-developers.com/google-nexus-5/help/stuck-erasing-doing-factory-reset-t2530342
http://forum.xda-developers.com/google-nexus-5/orig-development/nexus-5-f2fs-t2668486
http://forum.xda-developers.com/goo...o-repairing-corrupted-data-partition-t2577447
http://forum.xda-developers.com/showthread.php?t=1441928
http://forum.xda-developers.com/google-nexus-5/help/help-nexus-5-bricked-clearing-cache-t2564509
http://forum.xda-developers.com/google-nexus-5/help/help-stuck-bootloop-t2515338
http://forum.xda-developers.com/google-nexus-5/help/stuck-google-logo-recovery-mode-t2898337
I really hope no one else had the same "luck" as I did, since this problem has been a nightmare.
But in case you unfortunately do... hope this helps!
Great guide. Might become handy for other users. It should be stickied
Why would you force reboot while factory resetting in the first place lol
Sent from my Nexus 5
Good guide but a bricked phone is rendered useless, hence the name 'bricked.' If your phone can still power on, it is not bricked. You said your self you got it out of a bootloop. That's essentially all you had, a bootloop, and you were able to figure out what was wrong with it.
Just a heads up so we don't throw that term around loosely since a lot of people do so.
You can't bring a phone back from a brick. I think JTAG is an option but its for Samsung phones only. (Feel free to correct me if I'm wrong.)
dicecuber said:
Why would you force reboot while factory resetting in the first place lol
Sent from my Nexus 5
Click to expand...
Click to collapse
Yeap, I know it sounds stupid but the factory reset was hanging, lol.
I tried multiple times and it would hang every time. I left it running for more than 3h once and nothing happened.
jayRokk said:
Good guide but a bricked phone is rendered useless, hence the name 'bricked.' If your phone can still power on, it is not bricked. You said your self you got it out of a bootloop. That's essentially all you had, a bootloop, and you were able to figure out what was wrong with it.
Just a heads up so we don't throw that term around loosely since a lot of people do so.
You can't bring a phone back from a brick. I think JTAG is an option but its for Samsung phones only. (Feel free to correct me if I'm wrong.)
Click to expand...
Click to collapse
Thanks for clarifying! I thought bricked also meant "the phone is about to go useless, but there is a tiny hope", lol.
Is there a way to correct the thread name?
You're right - it was only bootlooping.
There's soft-brick and hard-brick.
Wysłane z mojego Nexus 5
rm 28
3) Remove the existing data partition by running command "rm 28": im getting a error on this step .
need help..
How did the phone become bricked? What was the phone doing before trying to unbrick?
audit13 said:
How did the phone become bricked? What was the phone doing before trying to unbrick?
Click to expand...
Click to collapse
dont know how it got bricked..in morning when i wake up its suddenly start showing the boot only for hours. I've tried flashig it.evertime got flash write failure for bootloader and other images except boot.img .i've checked for emmc its fine and showing the device partion.
I'm using nexus 5 16gb device.pls anyone help
I assume the bootloader is unlocked since you are able to flash the boot.img. Try this: re-lock the bootloader, reboot to fastboot and see if the bootloader remains locked. If the bootloader unlocks itself, this is an indication that the memory chip is damaged. Also try flashing the older stock ROM available.
audit13 said:
I assume the bootloader is unlocked since you are able to flash the boot.img. Try this: re-lock the bootloader, reboot to fastboot and see if the bootloader remains locked. If the bootloader unlocks itself, this is an indication that the memory chip is damaged. Also try flashing the older stock ROM available.
Click to expand...
Click to collapse
havn't tried to lock the bootloader but tried all these after reading too many posts but dont't what the issue is?...pls have a look into this..
_____________________________________________
C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>adb shell
~ # list users
/sbin/sh: list: not found
~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 949780 128 949652 0% /dev
tmpfs 949780 0 949780 0% /storage
tmpfs 949780 0 949780 0% /mnt/secure
tmpfs 949780 0 949780 0% /mnt/fuse
~ # cat /proc/partitions
major minor #blocks name
179 0 15388672 mmcblk0
179 1 65536 mmcblk0p1
179 2 1024 mmcblk0p2
179 3 512 mmcblk0p3
179 4 512 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 2048 mmcblk0p7
179 8 1024 mmcblk0p8
179 9 512 mmcblk0p9
179 10 512 mmcblk0p10
179 11 512 mmcblk0p11
179 12 3072 mmcblk0p12
179 13 3072 mmcblk0p13
179 14 512 mmcblk0p14
179 15 16384 mmcblk0p15
179 16 16384 mmcblk0p16
179 17 3072 mmcblk0p17
179 18 22528 mmcblk0p18
179 19 22528 mmcblk0p19
179 20 22528 mmcblk0p20
179 21 3072 mmcblk0p21
179 22 512 mmcblk0p22
179 23 512 mmcblk0p23
179 24 512 mmcblk0p24
179 25 1048576 mmcblk0p25
179 26 30720 mmcblk0p26
179 27 716800 mmcblk0p27
179 28 13404138 mmcblk0p28
179 29 5 mmcblk0p29
179 32 4096 mmcblk0rpmb
~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
~ # mount -o,rw /system
~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
/dev/block/platform/msm_sdcc.1/by-name/system on /system type ext4 (rw,seclabel,
relatime,data=ordered)
~ # moutn -o,rw /cah←[J
/sbin/sh: moutn: not found
~ # mount -o,rw /cache
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/cache on /cache failed: I
nvalid argument
~ # mount -o,rw /data
mount: mounting /dev/block/platform/msm_sdcc.1/by-name/userdata on /data failed:
Invalid argument
~ # mount -o,rw /sdcard
mount: can't find /sdcard in /etc/fstab
~ # ls -l
drwxr-xr-x 2 root root 0 Jan 1 09:39 boot
drwxr-xr-x 2 root root 0 Jan 1 09:39 cache
-rwxr-x--- 1 root root 288392 Jan 1 00:00 charger
drwxr-xr-x 3 root root 0 Jan 1 09:39 data
drwxr-xr-x 2 root root 0 Jan 1 09:39 datadata
-rw-r--r-- 1 root root 3976 Jan 1 00:00 default.prop
drwxr-xr-x 10 root root 4480 Jan 1 09:39 dev
drwxr-xr-x 2 root root 0 Jan 1 09:39 emmc
drwxr-xr-x 2 root root 0 Jan 1 09:39 etc
drwxr-xr-x 2 root root 0 Jan 1 09:39 external_sd
-rw-r--r-- 1 root root 9375 Jan 1 00:00 file_contexts
-rw-r----- 1 root root 953 Jan 1 00:00 fstab.goldfish
-rw-r----- 1 root root 2653 Jan 1 00:00 fstab.hammerhead
-rwxr-x--- 1 root root 179556 Jan 1 00:00 init
-rwxr-x--- 1 root root 2708 Jan 1 00:00 init.rc
drwxr-xr-x 2 root root 0 Jan 1 09:39 internal_sd
drwxrwxr-x 5 root system 0 Jan 1 09:39 mnt
dr-xr-xr-x 127 root root 0 Jan 1 00:00 proc
-rw-r--r-- 1 root root 2161 Jan 1 00:00 property_contexts
drwxr-xr-x 2 root root 0 Jan 1 09:39 recovery
drwxr-xr-x 3 root root 0 Jan 1 00:00 res
drwx------ 2 root root 0 Dec 1 2013 root
drwxr-x--- 2 root root 0 Jan 1 00:00 sbin
drwxr-xr-x 2 root root 0 Jan 1 09:39 sd-ext
lrwxrwxrwx 1 root root 11 Jan 1 09:39 sdcard -> /data/media
-rw-r--r-- 1 root root 711 Jan 1 00:00 seapp_contexts
-rw-r--r-- 1 root root 74942 Jan 1 00:00 sepolicy
d---r-x--- 2 root sdcard_r 40 Jan 1 09:39 storage
dr-xr-xr-x 12 root root 0 Jan 1 09:39 sys
drwxr-xr-x 14 root root 4096 Jan 1 00:00 system
drwxrwxr-x 2 root shell 0 Jan 1 09:39 tmp
-rw-r--r-- 1 root root 272 Jan 1 00:00 ueventd.goldfish.rc
-rw-r--r-- 1 root root 2204 Jan 1 00:00 ueventd.hammerhead.rc
-rw-r--r-- 1 root root 5897 Jan 1 00:00 ueventd.rc
~ # cat recovery.fstab
cat: can't open 'recovery.fstab': No such file or directory
~ # cat recovery.fstab.bak
cat: can't open 'recovery.fstab.bak': No such file or directory
~ # system /bin
/sbin/sh: system: not found
~ # system/bin
/sbin/sh: system/bin: Permission denied
~ # e2fsck
Usage: e2fsck [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
[-E extended-options] device
Emergency help:
-p Automatic repair (no questions)
-n Make no changes to the filesystem
-y Assume "yes" to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external_journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list
~ # -p
/sbin/sh: -p: not found
~ # p
/sbin/sh: p: not found
~ # e2fsck -p
Usage: e2fsck [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
[-E extended-options] device
Emergency help:
-p Automatic repair (no questions)
-n Make no changes to the filesystem
-y Assume "yes" to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external_journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list
~ # c
/sbin/sh: c: not found
~ # e2fsckc
/sbin/sh: e2fsckc: not found
~ # e2fsck c
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open c
Possibly non-existent device?
~ # e2fsck -c
Usage: e2fsck [-panyrcdfvtDFV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j external_journal]
[-E extended-options] device
Emergency help:
-p Automatic repair (no questions)
-n Make no changes to the filesystem
-y Assume "yes" to all questions
-c Check for bad blocks and add them to the badblock list
-f Force checking even if filesystem is marked clean
-v Be verbose
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external_journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list
~ # e2fsck -y /dev/block/platform/msm_sdcc.1/by-name/persist
e2fsck 1.41.14 (22-Dec-2010)
/dev/block/platform/msm_sdcc.1/by-name/persist: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway? yes
e2fsck: unable to set superblock flags on /dev/block/platform/msm_sdcc.1/by-name
/persist
~ # cat /proc/partitions
major minor #blocks name
179 0 15388672 mmcblk0
179 1 65536 mmcblk0p1
179 2 1024 mmcblk0p2
179 3 512 mmcblk0p3
179 4 512 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 2048 mmcblk0p7
179 8 1024 mmcblk0p8
179 9 512 mmcblk0p9
179 10 512 mmcblk0p10
179 11 512 mmcblk0p11
179 12 3072 mmcblk0p12
179 13 3072 mmcblk0p13
179 14 512 mmcblk0p14
179 15 16384 mmcblk0p15
179 16 16384 mmcblk0p16
179 17 3072 mmcblk0p17
179 18 22528 mmcblk0p18
179 19 22528 mmcblk0p19
179 20 22528 mmcblk0p20
179 21 3072 mmcblk0p21
179 22 512 mmcblk0p22
179 23 512 mmcblk0p23
179 24 512 mmcblk0p24
179 25 1048576 mmcblk0p25
179 26 30720 mmcblk0p26
179 27 716800 mmcblk0p27
179 28 13404138 mmcblk0p28
179 29 5 mmcblk0p29
179 32 4096 mmcblk0rpmb
~ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 949780 128 949652 0% /dev
tmpfs 949780 0 949780 0% /storage
tmpfs 949780 0 949780 0% /mnt/secure
tmpfs 949780 0 949780 0% /mnt/fuse
/dev/block/platform/msm_sdcc.1/by-name/system
1033516 1020920 12596 99% /system
~ #
C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot dev
ices
034dd8de828dd06c fastboot
C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot for
mat system
Creating filesystem with parameters:
Size: 1073741824
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 4096
Label:
Blocks: 262144
Block groups: 8
Reserved block group size: 63
Created filesystem with 11/65536 inodes and 8536/262144 blocks
target reported max download size of 1073741824 bytes
erasing 'system'...
OKAY [ 0.187s]
sending 'system' (18800 KB)...
OKAY [ 0.813s]
writing 'system'...
FAILED (remote: flash write failure)
finished. total time: 1.188s
C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot for
mat cache
Creating filesystem with parameters:
Size: 734003200
Block size: 4096
Blocks per group: 32768
Inodes per group: 7472
Inode size: 256
Journal blocks: 2800
Label:
Blocks: 179200
Block groups: 6
Reserved block group size: 47
Created filesystem with 11/44832 inodes and 5813/179200 blocks
target reported max download size of 1073741824 bytes
erasing 'cache'...
FAILED (remote: failed to erase partition)
finished. total time: 0.219s
C:\Program Files (x86)\WugFresh Development\Nexus Root Toolkit\data>fastboot for
mat bootloader
Formatting is not supported for file system with type ''.
_______________________________________________________
Try the suggestion about relocking there bootloader and checking to see if it stays locked. If it doesn't stay locked, I would replace the motherboard.
When trying to delete partition 28, I get:
Error: Input/output error during write on /dev/block/mmcblk0
Anybody else got this and found a way to solve it?
audit13 said:
I assume the bootloader is unlocked since you are able to flash the boot.img. Try this: re-lock the bootloader, reboot to fastboot and see if the bootloader remains locked. If the bootloader unlocks itself, this is an indication that the memory chip is damaged. Also try flashing the older stock ROM available.
Click to expand...
Click to collapse
Thanks, I've been reading for quite some time looking for a solution to fix my Nexus 5 (I bought it brick just to fix it), and it does exactly what you mention here in your post. It recognize fastboot, it lock the bootloader but when the phone reboot, it display bootloader unlock. It doesn't let me flash the recovery img. by computer.
Thanks
The motherboard's flash memory is defective which means you'll need to replace the motherboard to have functional phone.

Partition layout and structure

In case anyone need it
Code:
ADF -> /dev/block/mmcblk0p61
APD -> /dev/block/mmcblk0p60
abl -> /dev/block/mmcblk0p27
ablbak -> /dev/block/mmcblk0p28
apdp -> /dev/block/mmcblk0p31
asdf -> /dev/block/mmcblk0p62
asusfw -> /dev/block/mmcblk0p51
bluetooth -> /dev/block/mmcblk0p40
bluetoothbak -> /dev/block/mmcblk0p41
boot -> /dev/block/mmcblk0p12
cache -> /dev/block/mmcblk0p58
cmnlib -> /dev/block/mmcblk0p17
cmnlib64 -> /dev/block/mmcblk0p18
cmnlib64bak -> /dev/block/mmcblk0p20
cmnlibbak -> /dev/block/mmcblk0p19
ddr -> /dev/block/mmcblk0p38
devcfg -> /dev/block/mmcblk0p49
devcfgbak -> /dev/block/mmcblk0p50
devinfo -> /dev/block/mmcblk0p30
dip -> /dev/block/mmcblk0p29
dpo -> /dev/block/mmcblk0p33
dsp -> /dev/block/mmcblk0p26
factory -> /dev/block/mmcblk0p64
frp -> /dev/block/mmcblk0p52
fsc -> /dev/block/mmcblk0p42
fsg -> /dev/block/mmcblk0p11
hyp -> /dev/block/mmcblk0p7
hypbak -> /dev/block/mmcblk0p8
keymaster -> /dev/block/mmcblk0p15
keymasterbak -> /dev/block/mmcblk0p16
keystore -> /dev/block/mmcblk0p48
limits -> /dev/block/mmcblk0p35
logdump -> /dev/block/mmcblk0p53
logfs -> /dev/block/mmcblk0p37
mdtp -> /dev/block/mmcblk0p23
mdtpbak -> /dev/block/mmcblk0p24
mdtpsecapp -> /dev/block/mmcblk0p21
mdtpsecappbak -> /dev/block/mmcblk0p22
misc -> /dev/block/mmcblk0p47
modem -> /dev/block/mmcblk0p25
modemst1 -> /dev/block/mmcblk0p44
modemst2 -> /dev/block/mmcblk0p45
msadp -> /dev/block/mmcblk0p32
persist -> /dev/block/mmcblk0p46
pmic -> /dev/block/mmcblk0p9
pmicbak -> /dev/block/mmcblk0p10
priv -> /dev/block/mmcblk0p63
rawdump -> /dev/block/mmcblk0p56
recovery -> /dev/block/mmcblk0p59
rpm -> /dev/block/mmcblk0p5
rpmbak -> /dev/block/mmcblk0p6
sec -> /dev/block/mmcblk0p39
splash -> /dev/block/mmcblk0p34
ssd -> /dev/block/mmcblk0p43
sti -> /dev/block/mmcblk0p54
storsec -> /dev/block/mmcblk0p55
system -> /dev/block/mmcblk0p13
toolsfv -> /dev/block/mmcblk0p36
tz -> /dev/block/mmcblk0p3
tzbak -> /dev/block/mmcblk0p4
userdata -> /dev/block/mmcblk0p66
vbmeta -> /dev/block/mmcblk0p57
vendor -> /dev/block/mmcblk0p14
version -> /dev/block/mmcblk0p65
xbl -> /dev/block/mmcblk0p1
xblbak -> /dev/block/mmcblk0p2
Code:
Number Start End Size File system Name Flags
1 67.1MB 79.7MB 12.6MB xbl
2 79.7MB 92.3MB 12.6MB xblbak
3 92.3MB 96.5MB 4194kB tz
4 96.5MB 101MB 4194kB tzbak
5 101MB 101MB 524kB rpm
6 101MB 102MB 524kB rpmbak
7 102MB 102MB 524kB hyp
8 102MB 103MB 524kB hypbak
9 103MB 103MB 524kB pmic
10 103MB 104MB 524kB pmicbak
11 104MB 106MB 2097kB fsg
12 134MB 201MB 67.1MB boot
13 201MB 4496MB 4295MB ext4 system
14 4496MB 5335MB 839MB ext4 vendor
15 5335MB 5336MB 1049kB keymaster
16 5336MB 5337MB 1049kB keymasterbak
17 5337MB 5338MB 1049kB cmnlib
18 5338MB 5339MB 1049kB cmnlib64
19 5339MB 5340MB 1049kB cmnlibbak
20 5340MB 5341MB 1049kB cmnlib64bak
21 5341MB 5346MB 4194kB mdtpsecapp
22 5346MB 5350MB 4194kB mdtpsecappbak
23 5350MB 5383MB 33.6MB mdtp
24 5383MB 5417MB 33.6MB mdtpbak
25 5417MB 5532MB 115MB fat16 modem
26 5532MB 5549MB 16.8MB ext4 dsp
27 5549MB 5550MB 1049kB abl
28 5550MB 5551MB 1049kB ablbak
29 5551MB 5552MB 1049kB dip
30 5552MB 5552MB 4096B devinfo
31 5552MB 5552MB 262kB apdp
32 5552MB 5553MB 262kB msadp
33 5553MB 5553MB 1024B dpo
34 5553MB 5587MB 34.2MB splash
35 5587MB 5587MB 4096B limits
36 5587MB 5588MB 1049kB toolsfv
37 5637MB 5646MB 8389kB logfs
38 5704MB 5705MB 1049kB ddr
39 5705MB 5705MB 16.4kB sec
40 5705MB 5706MB 1049kB bluetooth
41 5706MB 5707MB 1049kB bluetoothbak
42 5771MB 5771MB 1024B fsc
43 5771MB 5771MB 8192B ssd
44 5771MB 5773MB 2097kB modemst1
45 5773MB 5776MB 2097kB modemst2
46 5776MB 5809MB 33.6MB ext4 persist
47 5809MB 5810MB 1049kB misc
48 5810MB 5811MB 524kB keystore
49 5811MB 5812MB 1049kB devcfg
50 5812MB 5813MB 1049kB devcfgbak
51 5813MB 5880MB 67.1MB ext4 asusfw
52 5880MB 5880MB 524kB frp
53 5880MB 5948MB 67.1MB logdump
54 5948MB 5950MB 2097kB sti
55 5973MB 5973MB 131kB storsec
56 6040MB 6174MB 134MB rawdump
57 6174MB 6174MB 65.5kB vbmeta
58 6174MB 6541MB 367MB ext4 cache
59 6541MB 6608MB 67.1MB recovery
60 6644MB 6853MB 210MB ext4 APD
61 6853MB 6898MB 44.0MB ext4 ADF
62 6898MB 6931MB 33.6MB ext4 asdf
63 6931MB 6932MB 524kB priv
64 6932MB 6942MB 10.5MB ext4 factory
65 6979MB 6979MB 131kB version
66 7046MB 62.5GB 55.5GB ext4 userdata
Code:
1 0 8192 ram0
1 1 8192 ram1
1 2 8192 ram2
1 3 8192 ram3
1 4 8192 ram4
1 5 8192 ram5
1 6 8192 ram6
1 7 8192 ram7
1 8 8192 ram8
1 9 8192 ram9
1 10 8192 ram10
1 11 8192 ram11
1 12 8192 ram12
1 13 8192 ram13
1 14 8192 ram14
1 15 8192 ram15
179 0 61071360 mmcblk0
179 1 12288 mmcblk0p1
179 2 12288 mmcblk0p2
179 3 4096 mmcblk0p3
179 4 4096 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 512 mmcblk0p7
179 8 512 mmcblk0p8
179 9 512 mmcblk0p9
179 10 512 mmcblk0p10
179 11 2048 mmcblk0p11
179 12 65536 mmcblk0p12
179 13 4194304 mmcblk0p13
179 14 819200 mmcblk0p14
179 15 1024 mmcblk0p15
179 16 1024 mmcblk0p16
179 17 1024 mmcblk0p17
179 18 1024 mmcblk0p18
179 19 1024 mmcblk0p19
179 20 1024 mmcblk0p20
179 21 4096 mmcblk0p21
179 22 4096 mmcblk0p22
179 23 32768 mmcblk0p23
179 24 32768 mmcblk0p24
179 25 112640 mmcblk0p25
179 26 16384 mmcblk0p26
179 27 1024 mmcblk0p27
179 28 1024 mmcblk0p28
179 29 1024 mmcblk0p29
179 30 4 mmcblk0p30
179 31 256 mmcblk0p31
259 0 256 mmcblk0p32
259 1 1 mmcblk0p33
259 2 33424 mmcblk0p34
259 3 4 mmcblk0p35
259 4 1024 mmcblk0p36
259 5 8192 mmcblk0p37
259 6 1024 mmcblk0p38
259 7 16 mmcblk0p39
259 8 1024 mmcblk0p40
259 9 1024 mmcblk0p41
259 10 1 mmcblk0p42
259 11 8 mmcblk0p43
259 12 2048 mmcblk0p44
259 13 2048 mmcblk0p45
259 14 32768 mmcblk0p46
259 15 1024 mmcblk0p47
259 16 512 mmcblk0p48
259 17 1024 mmcblk0p49
259 18 1024 mmcblk0p50
259 19 65536 mmcblk0p51
259 20 512 mmcblk0p52
259 21 65536 mmcblk0p53
259 22 2048 mmcblk0p54
259 23 128 mmcblk0p55
259 24 131072 mmcblk0p56
259 25 64 mmcblk0p57
259 26 358400 mmcblk0p58
259 27 65536 mmcblk0p59
259 28 204800 mmcblk0p60
259 29 43008 mmcblk0p61
259 30 32768 mmcblk0p62
259 31 512 mmcblk0p63
259 32 10240 mmcblk0p64
259 33 128 mmcblk0p65
259 34 54190063 mmcblk0p66
179 32 4096 mmcblk0rpmb

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.

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 ?
.

Categories

Resources