[SOLVED] "Failed to mount '/data' (invalid argument)" after "fastboot -w" - Shield Android TV Q&A, Help & Troubleshooting

[SOLVED] "Failed to mount '/data' (invalid argument)" after "fastboot -w"
Hi
I have a power saving system that cut the power while I was wiping user data (fastboot -w) after flashing a new rom
and now I end up with this TWRP screen (TWRP is still installed):
{
"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"
}
Code:
Failed to mount '/data' (invalid argument)
Unable to recreate /data/media folder
Updating partition details...
Failed to mount '/data' (invalid argument)
...done
Unable to mount storage
Failed to mount '/data' (invalid argument)
Full SELinux is present
Failed to mount /data/media/TWRP/.twrps
Running recovery commands
Failed to mount '/data' (invalid argument)
Formating Cache using make_ext4fs...
Failed to mount '/data' (invalid argument)
Done processing script file
Renamed stock recovery file in /system to prevent the stock ROM from replacing TWRP.
I tried to restore the nvidia stock 3.1 recovery but it boot loops (nvidia logo then will eventually display this twrp screen then will loop).
Can someone please guide me as what to do next?
Thanks a lot
[SOLVED] in TWRP > format data
Type "yes"
"Data" is formatted and the shield boots/can be accessed in adb/fastboot

I guess it is normal - TRWP can't handle Samsung encryption

Düdeldü said:
I guess it is normal - TRWP can't handle Samsung encryption
Click to expand...
Click to collapse
Hi Düdeldü
thanks for the answer but I don't understand....
we are talking nvidia shiled not my note4...
please explain
I suspect I need to find the pit for the shield and flash it with heimdall....
not too sure what to do exactly...
thanks

Related

[Q] corrupted EFS

Hello, well I ran out of battery and recharged, when turned the phone back on it has no IMEI, tried different things going from reflash the firmware, change sim card, flash radios, etc, even flashed CM and several other roms aosp roms.
At the end i went back to stock with ODIN but the device its stuck in samsung logo and if go to recovery it says failed to mount /efs (file too larger).. nvm this i falsh cf autotoot in order to be able to follow this:
ptolomeo said:
We finally fixed it. I'll post the solution in case it can help anyone else...
The S3 got stuck in the Samsung logo screen:
{
"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"
}
When entering the recovery it gave us this error "E: failed to mount /efs (Invalid argument)"
As we already know, the /efs folder contains all the personalized information of the mobile (IMEI number, carrier lock, etc). So if we like to play with ROMs, we should be aware of this detail and make several backups of this VERY IMPORTANT folder, and preferably store them out of the mobile, in the computer for example.
in case we mess up the /efs folder, we are likely to have no other solution than bringing it to the authorized Samsung dealer for repair. No one is going to lend us the EFS backup from their mobile, as doing that we would likely clone their IMEI -which is, BTW, unlegal.
So we first flashed with PC-ODIN a STOCK ROM (I9300XXDLJ4_I9300PHEDLI1_PHE). We tried different ones (one file, 4 files) and none of them solved our problem as the problem was with the /efs partition and I don't think any ROM will touch that...
After flashing the ROM we also flashed Chainfire's CF-Root (CF-Auto-Root-m0-m0xx-gti9300)
We boot up the mobile in recovery mode (Volume UP + Power + Home), we connected to the PC through ADB SHELL.
Our first surprise, trying to partition:
#mke2fs / dev/block/mmcblk0p3
sh: mke2fs: not found
It seems that mke2fs is a command provided by busybox, and it's not present in the stock ROM.I downloaded a precompiled busybox version from busybox.net and pushed it in the S3
Code:
PC> adb shell mkdir /data/busybox
PC> adb push busybox /data/busybox
PC> adb shell
$su
#cd /data/busybox
#chmod 775 busybox
#./busybox --install
once installed we could use mke2fs command properly:
Code:
# busybox mke2fs /dev/block/mmcblk0p3
busybox mke2fs /dev/block/mmcblk0p3
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
5136 inodes, 20480 blocks
1024 blocks (5%) reserved for the super user
First data block=1
Maximum filesystem blocks=262144
3 block groups
8192 blocks per group, 8192 fragments per group
1712 inodes per group
Superblock backups stored on blocks:
8193
and after that mounting the partition in the /efs folder
Code:
#busybox mount -w -t ext4 /dev/block/mmcblk0p3 /efs
busybox mount -w -t ext4 /dev/block/mmcblk0p3 /efs
With the EFS folder fixed, we ADB PUSHED the backup of ur efs folder (efs.tar), we unpackaged it (busybox tar xfv efs.tar) and moved it's content to the newly fixed /efs folder.
Reboot and ready to go:
Click to expand...
Click to collapse
but then when I try to use the tool http://forum.xda-developers.com/showthread.php?p=42407269 I type ADB SHELL it connects and the type SU and says does not exist.. if do mkdir directly it says acces denied.. so I asume that the phone is not rootes even tho I have flashed cf auto root.. so i just falsh philz recovery and flash CM or any kind of Rooted kernel and keep happening the same thing over and over..
so the thing its I DO have an efs backup but I CAN NOT restore it by any method.. would apreciate any help here to get my phone going again.. thanks in advance
If your efs backup is tar.gz format , just unpack it with winrar or 7zip , you'll get efs folder upon extraction just delete phone's efs folder contents and copy extracted efs backup folder contents to phone with root explorer and reboot.
That's it.
sent from marijuanated muffin cut into pieces by My Shining Katana
kangerX said:
If your efs backup is tar.gz format , just unpack it with winrar or 7zip , you'll get efs folder upon extraction just delete phone's efs folder contents and copy extracted efs backup folder contents to phone with root explorer and reboot.
That's it.
sent from marijuanated muffin cut into pieces by My Shining Katana
Click to expand...
Click to collapse
OK you got my attention but HOW do I "just delete phone's efs folder content and copy extracted efs backup folder content to phone " as I clearely stated that the phone WON'T boot to Android its in samsung boot loop but i can acces recovery and odin modes
I can connect the phone to the pc and DO TeamViewer IF someone is able to help me..
any help there?
Enviado desde mi GT-N7100 usando Tapatalk
msedek said:
any help there?
Enviado desde mi GT-N7100 usando Tapatalk
Click to expand...
Click to collapse
Flash philz cwm recovery.
Then via recovery go to mounts and storage and mount efs:
adb shell
cd efs
adb push file_name_here (from your extracted backup)
Click to expand...
Click to collapse
Then you have to set the required permissions file by file.
Here is the permissions of my efs folder:
-rw-rw-r-- 00000000.authtokcont
drwxrwxr-x /FactoryApp
drwxrwxr-x /bluetooth
drwxr-xr-x /carrier
drwxrwx--- /drm
-rw------- gyro_cal_data
-rw-r--r-- h2k.dat
-rw------- hw_offset
drwxrwxr-x /imei
drwxrwxr-x /log
-rw-rw---- ss_data
drwxrwxr-x /wifi
-rw-r--r-- wv.keys
-rwxrwxr-x imei/mps_code.dat
-rw-rw-r-- wifi/.mac.info
Thanks

[Q] Storage space running out - but what's using it?

I realize there's plenty of threads with more or less the exact same topic. But I haven't found an answer in any of them that helps my situation.
Alright here's the deal:
I'm getting the "Storage space running out"-notification. And apps are starting to FC.. My phone is a i9505 and I'm currently running Carbon. But this was a problem with CM 10.2 too.
Here's what confuses me:
Code:
[email protected]:/data # busybox df -m
Filesystem 1M-blocks Used Available Use% Mounted on
...
/dev/block/platform/msm_sdcc.1/by-name/userdata
9351 9300 50 99% /data
...
/dev/fuse 9351 9300 50 99% /mnt/shell/emulated
...
/dev/block/vold/179:33
30688 25851 4837 84% /storage/sdcard1
Those should be the interesting bits (I'm showing off my 32GB external card here as well). Right, so I'm using 99%, or 9300MB.
Now here's how I check what's taking up the space:
Code:
[email protected]:/ # du -d1 -m /data
1 /data/dontpanic
3404 /data/media
1 /data/misc
1 /data/local
252 /data/data
1 /data/app-private
176 /data/app-asec
203 /data/app-lib
939 /data/app
1 /data/property
1 /data/ssh
1 /data/radio
321 /data/dalvik-cache
1 /data/resource-cache
1 /data/lost+found
1 /data/drm
1 /data/mediadrm
1 /data/security
4 /data/system
1 /data/wpstiles
1 /data/wiper
1 /data/shared
1 /data/fota
1 /data/time
1 /data/bluetooth
1 /data/audio
1 /data/.ssh
1 /data/tombstones
1 /data/nfc
1 /data/user
6 /data/qcks
1 /data/backup
1 /data/anr
5302 /data
du sums it up for us: 5302MB on /data
DiskUsage is showing me "System data" is taking up the space, but it doesn't tell me what or where:
{
"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"
}
I've checked solutions mentioned in related threads (all over the internets):
* The "/datadata" issue - I don't have this directory
* The "lost + found" - It's 1MB as you can see
* The "/data/log" issue - I don't have this directory
So what am I missing?
Well wouldn't you know. After a reboot the usage is down and df reports the same as du. I'm still confused as to what took up the space though.. I even got Java exceptions (from DiskUsage) saying the disk was full.

HTC One M7 does not start - after making Wipes Data, Cache and Dalvik

HTC One M7 does not start - after making Wipes Data, Cache and Dalvik Team Wim Recovery Projetct 3.0.2-0
No OS installend!
1 - ADB commands ok
2 - Drives ok
3 - recovery mode ok
NOTE:
HTC One M7 RUU Collection not recovered.
Unknown error.
LOGs: Team Wim Recovery Projetct 3.0.2-0
Updating partition details...
...done
Unable to find partition for '/system'
Unable to find partition for '/data'
Unable to find partition for '/cache'
Full SELinux support is present...
Unable to find partition for '/cache'
Unable to find partition for '/cache'
Phone Info:
Model : M7_UL
IMEI : #################
Build : 7.19.401.51
CID : HTC__001
HBoot : 1.61.0000
MID : PN0710000
Security : ON
Region : HTC_WWE
Model ID : PN0710000,
CID : HTC__001,HTC__J15,HTC__E11,HTC__203,HTC__102,HTC__405,HTC__Y13,HTC__A07,HTC__304,HTC__032,HTC__016,
MainVer : 7.19.401.51,
{
"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"
}
No storage
rodrigocm said:
HTC One M7 does not start - after making Wipes Data, Cache and Dalvik Team Wim Recovery Projetct 3.0.2-0
No OS installend!
1 - ADB commands ok
2 - Drives ok
3 - recovery mode ok
NOTE:
HTC One M7 RUU Collection not recovered.
Unknown error.
LOGs: Team Wim Recovery Projetct 3.0.2-0
Updating partition details...
...done
Unable to find partition for '/system'
Unable to find partition for '/data'
Unable to find partition for '/cache'
Full SELinux support is present...
Unable to find partition for '/cache'
Unable to find partition for '/cache'
Phone Info:
Model : M7_UL
IMEI : #################
Build : 7.19.401.51
CID : HTC__001
HBoot : 1.61.0000
MID : PN0710000
Security : ON
Region : HTC_WWE
Model ID : PN0710000,
CID : HTC__001,HTC__J15,HTC__E11,HTC__203,HTC__102,HTC__405,HTC__Y13,HTC__A07,HTC__304,HTC__032,HTC__016,
MainVer : 7.19.401.51,
No storage
Click to expand...
Click to collapse
Pretty normal that the recovery can't find any partition if you wiped everything. Was your bootloader re-locked when flashing the RUU? It must be when S-ON.
alray said:
Pretty normal that the recovery can't find any partition if you wiped everything. Was your bootloader re-locked when flashing the RUU? It must be when S-ON.
Click to expand...
Click to collapse
What do you install?
M7_UL
7.19.401.51 decrypted (s-off only)
7.19.401.51 Signed
How do I install?
Thanks for answering friend.

[QUESTION] External SD card as usrdata

i'm using adoptable storage patch (found here on xda) to expand internal data storage on my J500FN with Android 6.0.1, but i'm not so satisfied, increment in space for app is very limited also with adoptable storage.
i found this discussion on xda, in which the author had changes fstab to use sdcard as /data partition.
he said that SD card must be partitioned before run the modded kernel, it must have a small FAT32 partition at begin, and EXT4 partition for the main size.
how can i do the same on J500FN ?
my fstab is:
Code:
# 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 /system ext4 ro,errors=panic,noload,block_validity wait,verify
/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer
/dev/block/bootdevice/by-name/efs /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/platform/7824900.sdhci/by-name/persistent /persistent emmc defaults defaults
# VOLD
/dev/block/bootdevice/by-name/hidden /preload ext4 defaults voldmanaged=preload:auto
/devices/soc.0/7864900.sdhci/mmc_host/mmc* auto vfat defaults voldmanaged=sdcard:auto,encryptable=userdata
/devices/platform/msm_hsusb_host/usb* auto auto defaults voldmanaged=usb:auto
fstab made by the author of the post is:
Code:
# 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 /system ext4 ro,barrier=1 wait
/dev/block/platform/7864900.sdhci/mmcblk1p2 /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard,errors=panic wait,check,encryptable=/dev/block/bootdevice/by-name/extra
/dev/block/bootdevice/by-name/frp /persistent emmc defaults defaults
/devices/soc.0/7864900.sdhci/mmc_host auto vfat defaults voldmanaged=ext_sd:auto,noemulatedsd
if i patch my fstab as follow:
Code:
# 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 /system ext4 ro,errors=panic,noload,block_validity wait,verify
/dev/block/platform/7864900.sdhci/mmcblk1p2 /data ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer
/dev/block/bootdevice/by-name/efs /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/platform/7824900.sdhci/by-name/persistent /persistent emmc defaults defaults
# VOLD
/dev/block/bootdevice/by-name/hidden /preload ext4 defaults voldmanaged=preload:auto
/devices/soc.0/7864900.sdhci/mmc_host/mmc* auto vfat defaults voldmanaged=sdcard:auto
/devices/platform/msm_hsusb_host/usb* auto auto defaults voldmanaged=usb:auto
do you think i will obtain the same result on my J500FN ?
i reply by myself
i tried with this modified fstab.qcom:
Code:
# 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 /system ext4 ro,errors=panic,noload,block_validity wait,verify
/dev/block/mmcblk1p2 /data ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer
/dev/block/bootdevice/by-name/efs /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check
/dev/block/platform/7824900.sdhci/by-name/persistent /persistent emmc defaults defaults
# VOLD
/dev/block/bootdevice/by-name/hidden /preload ext4 defaults voldmanaged=preload:auto
/devices/soc.0/7864900.sdhci/mmc_host/mmc* auto vfat defaults voldmanaged=sdcard:auto
/devices/platform/msm_hsusb_host/usb* auto auto defaults voldmanaged=usb:auto
and also with these lines changed in init.rc:
Code:
on charger
mount ext4 /dev/block/bootdevice/by-name/system /system wait ro
wait /dev/block/mmcblk1p2
check_fs /dev/block/mmcblk1p2 ext4
mount ext4 /dev/block/mmcblk1p2 /data nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
chown system system /data
it works!!!
in attach you will find the boot.img for rom J500FNXXS1BQG1, last MM for J500FNITV1BPL1
How to use:
1- you need a PC tools like MiniToolPartitionWizard to create 2 partitions on your SD card. The first MUST BE FAT32, the second MUST BE EXT4. Use the size you wish, i suggest to use a 32GB SD card U3 type, with 8GB for FAT32, 24GB for EXT4.
2- insert SD into Phone
3- power up phone into download mode: Volume DN + Home + Power, and then Volume UP to confirm the question on screen.
4- connect Phone to PC, run Odin, load my KERNEL.TAR file as "AP", and flash.
5- Phone reboot and this first reboot is very long, wait and don't turn off phone.
6- Now you will have first setup wizard.
Note:
A- every boot is slower than normal, also when you connect the cable to charge phone while is off.
B- if you use TWRP or other custom recovery, what the recovery do related to /DATA partition is still on old /Data on internal memory, new /DATA partition on SD is not visible in recovery mode.
C- executing a Factory Reset by phone setup, don't reset the new /DATA partition on SD card, but it clear the old /DATA on internal memory
D- if you don't do any Factory reset, wipe Dalvik, or other operation on /DATA from recovery, your old phone status remain in memory like a nandroid backup, so you can return back to previous state simply flashing again the original Kernel.
just an update.
in attach new boot.img with Magisk 15.3 installed, to enable root.
to load on phone, follow this steps:
1- reboot in recovery (i use TWRP 3.0.2.0)
2- from PC run this command from folder where you downloaded my "boot.img":
Code:
adb push boot.img /dev/block/mmcblk0p16
3- reboot normally
4- install MagiskManager follow instructions from this topic on XDA
here is the result:
{
"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"
}
this is memory performance with a microSD type SanDisk Extreme PRO 64GB
and this is memory performance before the mod:
Final:
remember this boot.img is for stock rom J500FNXXS1BQG1, last MM for J500FNITV1BPL1

[GUIDE] Overlapping Partition Tables? Let's fix that

WARNING! Main partition table overlaps the first partition by 6 blocks!
You will need to delete this partition or resize it in an other utility.
This guide is to help those, facing this message, who have been in a mixup when repartitioning their Google Pixel 2 XL devices with the introduction of Android 12 and later ROMs/GSI Images.
More specifically this situation occurs when one follows Dollscythe's 3.8GiB system guide, followed by my (PixelExperience) repartition script.
No worries, let's solve this.
DISCLAIMER:
I AM NOT RESPONSIBLE IF THESE FOLLOWING INSTRUCTIONS ARE NOT EXECUTED PROPERLY.
KINDLY TRIPLE CHECK THE COPIED COMMANDS BEFORE EXECUTING THEM.
ANY ALTERATION TO THE PARTITIONS NOT MENTIONED BELOW COULD CAUSE SERIOUS ISSUES.
Firstly, let's understand why this occurs.
When it comes to repartitioning using sgdisk, with the case of the PixelExperience repartition method, blocks strictly defined from a starting to an ending logical sector.
(FYI: 1 logical sector = 4096 bytes)
When a user follows Dollscythe's 3.8GiB system guide, using parted, in contrast to sgdisk, the logical system sectors are modified to allow 3.8GiB of size.
Whilst this method is ideal for those planning to either flash GSI images which require specifically a larger system image, rather than making use of both product and system_ext partitions on PixelExperience and other ROMs, it is not ideal to mix them both up with each other.
(Both product and system_ext partitions offload large data from the system image, with such system apps like GApps)
So to break this down:
System is modified to adapt to 3.8GiB.
Logical starting and ending sectors system_a, system_b, pstore, aes_a, aes_b, align_parti and userdata partitions are modified.
PixelExperience script attempts to delete stock partition's userdata, but instead conflicts with 3.8GiB table.
Partition table becomes overlapped. (numerical partition numbers are not in order)
That is why it is important to keep track of which partition table your device is currently running, before making any further alterations to your system's table.
To check your current partition table, reboot into a custom recovery that supports the ADB interface via platform tools and:
Code:
adb shell
Code:
sgdisk --print /dev/block/sda
The output of this command should indicate what table you are currently running, depending on the sizes of both system_a and system_b partitions (2.5GiB on stock), or any added ones such as product and system_ext.
So double check that you are running the stock partition table before undergoing any of the guides mentioned above.
It is also worth noting that Pixel 2 XL (taimen) devices, do not revert to the stock partition table upon flashing the stock image.
This behaviour is not the same for Pixel 2 (walleye) devices, as when the stock image is flashed, the partition table is reverted to default.
(This is due to LG and HTC's bootloader behaving in different ways.)
Now, let's untie this knot!
Got the error now? Let's get started.
In short, we're going to undo the changes made, that includes both system_a and system_b partitions to the device, and redo it carefully.
Since sgdisk (installed on the device, by default) is unable to make any changes if it is found in an overlapping state, we will be using parted instead.
Download parted
Ensure you are in an ADB supported custom recovery.
Using platform-tools on an external device, push parted to the device:
Code:
adb push path/to/parted /sbin
Enter adb shell:
Code:
adb shell
Change permissions of parted:
Code:
chmod 777 /sbin/parted
Execute parted:
Code:
parted /dev/block/sda
Print current partition table:
Code:
p free
Remove overlapped partitions (when prompted, return ignore)
Code:
rm 17
rm 16
rm 15
rm 12
rm 11
rm 10
rm 9
rm 8
Recreate stock partitions
Code:
mkpart system_a ext4 169MB 2853MB
mkpart system_b ext4 2853MB 5538MB
mkpart pstore 5538MB 5546MB
mkpart aes_a 5546MB 5547MB
mkpart aes_b 5547MB 5548MB
mkpart align_parti 5548MB 5549MB
mkpart userdata ext4 5549MB 62400MB (for 64GB)
mkpart userdata ext4 5549MB 126300MB (for 128GB)
Wipe -> Format Data -> Yes
Wipe -> Factory Reset
Reboot -> Bootloader
That is what it takes to resort back to the stock partition table.
If done successfully (check via sgdisk --print /dev/block/sda), you can proceed to executing any repartition guide.
Reserved
Hello,
can someone please help me?
I tried to follow the guide to reset the partitions to default, but unfortunately it didn't work. Currently my partitions look like this:
{
"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"
}
What must i do now to reset the partitions correctly?
I think only ext2 on system_a is incrorrect. It must be ext4?
@PixelBoot you have a small typing error on 9. Recreate Stock Partions:
mkpart system_a ext4 169MB 2853MBmkpart system_b ext4 28533MB 5538MB
On system_b you have 28533MB insteat of 2853MB
Edit: I think i have corrected it now:
I have make these additional steps in fastboot:
fastboot format:ext4 system_a
fastboot format:ext4 system_b
fastboot format:ext4 userdata
Device is booting now with Factrory Image

Categories

Resources