"Failed to mount 'protect_f' (Invalid argument)" while trying to flash through TWRP - General Questions and Answers

"Failed to mount 'protect_f' (Invalid argument)" while trying to flash through TWRP
My Lenovo A536 went into boot loop cycle and I have been trying to flash a new rom or even a stock one for a while, but I keep getting this error when I try and do it through TWRP.
"
Failed to mount 'protect_f' (Invalid argument)
Failed to mount 'protect_f' (Invalid argument)
"
I flashed the phone multiple times through Smart Phone Flash Tool and it doesn't seem to work either.
The farthest I have come is a loading animation of the OS but it crashes shortly after that.
When I try to mount those two partitions in the mounting section of TWRP, it doesn't want to select them.
I looked at Android Scatter file that is used to install the OS for this phone and at the part with "protect_f' and "protect_s" is says Operation type: Protected, does this have anything to do with that error?
Some people told me that the phone is just on end of it's life and it's an internal memory issue. If it is something to do with hardware side of things, can I install the OS onto my SD card (SanDisk 16GB), and run the phone through that, since, while the phone was working, I noticed option to transfer the entire phones main data to SD Card, so is that possible to do through TWRP or other tools?
I tried Vibe+, Vibe 2.0, Lollipop 5.0, Slim 6.0.1 and non of those can get boot.

Related

[Q] My Internal sdcard is corrupted! Please Help!

I Think my Internal sdcard is corrupted!
Please Help! Reflashing android won't work. I think the partition is corrupted!
Device: Google Nexus 5
Original OS: Android 5.1.0_r1 (LMY47D)
Recovery: TWRP 2.8.6.0
One day I turned my phone off, and later i decided to go into recovery. I believe I went inside Advanced Options and clicked "Fix Permissions." Then I proceeded to reboot. I was busy at the time, so when I remembered about my phone, I saw that it was still booting. It had been at least 30 minutes so I knew it was in a bootloop. I decided to go back into recovery and reflash the system.img onto it. No luck. I realized I had to try flashing the entire Nexus image (using the flash-all.bat). The phone would still not turn on. I tried flashing different versions of android, and here are my findings:
Android 5.1.0_r3, 5.1.0_r1, 5.0.1: all cause my phone to not be able to boot up (stuck on the 4 color flying animation)
Android 4.4.4, CyanogenMod (cm-11-20141008-SNAPSHOT-M11-hammerhead.zip): Allow my phone to boot up.
However, after I found that I could boot onto Android 4.4.4 and CyanogenMod, I realized that I could not get access to the sdcard!
Here are my findings:
When I go to the phone's root folder, I see a FILE called "sdcard"
When I go to \storage, I see a FILE called sdcard0
When I open camera, the app crashes (possibly because it stores pictures on the sdcard).
I tried to delete these files when I had root access with CyanogenMod but the file manager said "can't delete file." When I am in recovery mode (TWRP) however, I can see the sdcard folder and the contents. Just through every system boot, the sdcard is inaccessible.
After I realized that the problem wasn't due to the data on my phone (after flashing many system images), I realized my data partition might be corrupted. Then I went to this site and followed the directions: http://forum.xda-developers.com/goo...o-repairing-corrupted-data-partition-t2577447
The e2fsck command didn't do anything as cmd said "The superblock could not be read or does not describe a correct ext2 filesystem."
Afterwards, my friend told me to try mke2fs /dev/block/platform/msm_sdcc.1/by-name/userdata
I typed that in adb shell and something happened. I started processing blocks or something. Unfortunately now, I am unable to mount the data partition at all. I am also unable to flash the userdata.img onto my phone through fastboot.
UPDATE: When I open up twrp recovery and look in the log I see the following:
E: Could not mount /data and unable to find crypto footer.
E: Unable to mount '/data'
E: Unable to recreate /data/media folder.
Updating partition details...
E: Unable to mount '/data'
E: Unable to mount '/cache/
E: Unable to mount '/persist'
...done
E: Unalbe to mount storage.
E: Unable to mount /data/media during GUI Startup.
E: Unable to mount '/cache'
Full SELinux support is present.
E: Unable to mount '/cache'
E: Unable to Mount '/cache'
E: Unable to mount /data/media/TWRP .twrps when trying to read settings file.
E: Unable to mount '/data'
MTP Enabled
Anyone know how to fix this? Please help, I owe you so much if you can solve this! Reply to me if you're able to help, I'm also new to xda so I don't really know how messages work. Thanks!
Try taking it out and putting it back in. It happened to me too.
mygoldeneye said:
Try taking it out and putting it back in. It happened to me too.
Click to expand...
Click to collapse
By sdcard I mean the internal sdcard (/storage/emulated/0). Nexus 5 does not have an external sdcard slot anyways.
So you are saying you have no apps, no widgets, nothing... /storage/emulated/0 is your main storage which INCLUDES your system files (unless you have a phone or tablet that has a separate internal SD card - would be /storage/emulated/1 ... I am guessing)

[Completed] How to protect a portion of internal memory during OS install?

So, I have a Sprint HTC One (M7) that I tried to root following this guide:
http://www.xda-developers.com/how-to...-developer-tv/
Custom Recovery was flashed successfully (I tried both TWRP 2.5 and CWM 6.0.4.6), and I immediately got the following errors:
E:Can't mount /cache/recovery/command
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't mount /cache/recovery/last _log
E:Can't open /cache/recovery/last_log
E:Can't mount /cache/recovery/last_install
E:Can't open /cache/recovery/last_install
I can't access /cache, in short. So, I tried to find my SD card, but my phone doesn't have a slot for one, and I couldn't figure out how to write to the virtual one inside the phone, so I selected "Install zip" option in CWM and passed SuperSU-v2.46.zip through sideload, and it failed when it couldn't access cache. I was then rather foolish, and tried to just flash a ROM from Android Revolution HD, found on this thread:
http://forum.xda-developers.com/show....php?t=2265618 (I used this particular ROM:Android_Revolution_HD-One_92.0_4a9d05.zip).
Again, I passed it using sideload because I don't have an SD card. The install formatted my partitions, then at 30% (when it began to copy files), it failed. Thus, I was left with an empty phone, but an unlocked bootloader. I tried a few more things, to no avail.
I think if I could figure out how to put something in the virtual SD inside, or somehow protect the install files from being overwritten during the install, that might get me there, since I'm guessing that it's formatting over the location of the installer/image. Also, I found that if I use the "Wipe /cache" from CWM, I don't get those access cache errors, but then I can't reboot into the recovery without flashing it again, so I'm guessing that it's saving it in the /cache partition. I use the command "fastboot flash recovery CWM_image.img" to put my recovery in there, which may be a part of the problem.
Anyway, any ideas or help would be nice. I know enough to be dangerous, but clearly not enough to get myself out of this mess. Any help would be appreciated, and at this point, it would just be nice to have any OS on my phone. All HTC recovery software fails because they require a locked bootloader, but my computer won't detect a phone with no OS and a locked bootloader...
Duplicate.
http://forum.xda-developers.com/general/xda-assist/odd-problems-trying-to-root-htc-one-m7-t3164965

TWRP 3.0.2.0 on 920W8 w/6.0.1 leaves me broken :(

So I decided I would switch back to a custom rom on my phone. I reverted to stock several months ago to get the official Telus 6.0.1 update. Now that I have that, I'm trying to get TWRP installed so I can throw a ROM on, but when I get TWRP loaded, none of the other file systems are mountable and I don't see anything in the /sdcard directory or anywhere else. There are errors when trying to mount them as well.
I did flash the 6.0.1 bootloader and modem the rom dev suggested before doing the TWRP recovery, but I'm still stuck with not being able to access anything while in the recovery, and I get thrown in to a bootloop if I try to boot the OS. I can flash the Telus 6.0.1 rom back to my phone and resolve this, but I'm wondering why TWRP is "corrupting" my phone like it is. Here are the errors i'm seeing in recovery:
Could not mount /data and unable to find cryptofooter
Failed to mount '/data' (Invalid argument)
Unable to recreate /data/media folder
Failed to mount '/data' (Invalid argument)
.......done
Unable to mount storage
Failed to mount '/data' (Invalid argument)
Full SELinux support is present
Unable to mount /data/media/TWRP/.twrps
Anyone know what's going on here? I tried this same process a few weeks ago, but just resigned myself to staying on the stock Telus rom because this same issue came up.

I am having trouble rooting Samsung j7 Perx SM-J727P.

I am totally new to rooting, not sure what I've done wrong.
I started trying to root my SM-J727P by installing TWRP with Odin. This works fine, then I added the superSU v2.82 file to the device's microSD card. I went to install tab in TWRP recovery mode->select storage->Micro SD card->superSU.
Then when I try to flash it, a red message appears saying "Could not mount /data and unable to find crypto footer. Failed to mount /data (Invalid Argument). At the bottom it says "Failed to mount /system (Device or Resource Busy). Failed to mount /data (Invalid Argument.)
After this I read that I need to format storage.
I went to wipe->format data->typed yes and the same message appears, "Failed to mount /system (device or resource busy).
I'm extremely new to this so I don't really know what I'm talking about but do I need to disable dm-verity?
Any help would be greatly appreciated.
ColoPhone said:
I am totally new to rooting, not sure what I've done wrong.
I started trying to root my SM-J727P by installing TWRP with Odin. This works fine, then I added the superSU v2.82 file to the device's microSD card. I went to install tab in TWRP recovery mode->select storage->Micro SD card->superSU.
Then when I try to flash it, a red message appears saying "Could not mount /data and unable to find crypto footer. Failed to mount /data (Invalid Argument). At the bottom it says "Failed to mount /system (Device or Resource Busy). Failed to mount /data (Invalid Argument.)
After this I read that I need to format storage.
I went to wipe->format data->typed yes and the same message appears, "Failed to mount /system (device or resource busy).
I'm extremely new to this so I don't really know what I'm talking about but do I need to disable dm-verity?
Any help would be greatly appreciated.
Click to expand...
Click to collapse
I now have manually mounted system and no errors showed, after tapping reboot system, the phone entered a bootloop. Not sure if this is supposed to happen or not and if it is, how long does it take?
ColoPhone said:
I now have manually mounted system and no errors showed, after tapping reboot system, the phone entered a bootloop. Not sure if this is supposed to happen or not and if it is, how long does it take?
Click to expand...
Click to collapse
This happened to me when I was doing my first root with samsung. What I did was completely start over with a new stock ROM and TWRP. Be sure you have all the right things ticked on Odin. What I had to do with my sm-j700p was un-tick auto-restart when done, and when the TWRP was done flashing, I had to remove the battery instead of wait for it to shut down. Then QUICKLY go into recovery mode by pressing the buttons after you turn it back on. Flash ROM. If I remember correctly, I was so good from there, but the timing with samsung when pushing the buttons apparently is EVERYTHING.
And making sure it is the correct TWRP file. I also made the mistake of picking the wrong TWRP file. Same model and carrier...different year of phone. Software version number is where it's at to get the best info.
Good luck!

Phone no longer has OS and having trouble installing custom rom

Hey guys, hoping someone can save me from having to buy a new phone. I either need to fix it quickly or replace it quickly cause my job depends on having one.
I have a Moto 9 g plus.
I wanted to root my phone for a long time and today I decided to try since the Android 11 update ****ed up the camera on my phone anyway.
I followed this guide here
Root Motorola Moto G9 Plus Android 10 using TWRP and Install Magisk
When you have Stock Android on your mobile, You are almost free from bloatware apps. Even if your manufacturer put some apps, You can get rid of them in
www.androidinfotech.com
Everything seemed to be going well except that I couldn't get magisk to install, I kept getting errors in twrp.
I ended up installing the apk for magisk and used it to modify the boot file. I installed the image in twrp and on reboot, it went into a boot loop. I could go back to trwp and after swiping to factory reset, it broke the loop when I restart the phone. The problem is that now it just goes straight to the menu that you normally need to press and hold down and power to go to. I never did get to confirm if my phone was successfully rooted or not, I'm guessing no, and that that is the main problem now, as the phone won't boot up to where I can use apps, and if it isn't rooted, from what I understand, I can't install another rom?
Also, whenever I'm finished with twrp, when I press to reset it says something like "Phone no longer has OS, are you sure you want to reboot?". I read it is from wiping the data or factory reset, but I didn't actually wipe any internal memory, I can still view all files on it and on my sd card.
Maybe you guys can confirm my suspicions that I just ****ed up my phone for good or not.
This is what the error says when I attempted to install a rom, I tried with lineage and arrowos and I don't believe the problem is with the roms.
E:unable to update logical partion: /system_root
E:unable to update logical partion: /vendor
E:unable to update logical partion: /product
Failed to mount '/system_root' (Invalid argument)
Failed to mount '/vendor' (Invalid argument)
E:Unable to open /system_root/system/apex
E:Unable to load apex images from /system_root/
system/apex
MTP Enabled
Failed to mount '/system_root' (Invalid argument)
Installing zip file '/external_sd/Arrow-v12.0-odessa
-UNOFFICIAL-20211013-gapps.zip'
Flashing A/B zip to inactive slot: A
Failed to mount '/system_root' (Invalid argument)
Failed to mount '/vendor' (Invalid argument)
Step 1/2
Error applying update : 7 (ErrorCode::
kInstallDeviceOpenError)
Updater process ended with ERROR: 1
To flash addition zips, please reboot recovery to
switch to the updated slot.
Error installing zip file '/external_sd/Arrow-v12.0-odessa
-UNOFFICIAL-20211013-gapps.zip'
Updating partition details . . .
. . . done
If I try to install magisk.zip it gives this error
Failed to mount '/system_root' (Invalid argument)
Installing zip file '/external_sd/Magisk-23.0.zip
Checking for Digest file . . .
Unmounting System . . .
********************************
Magisk 23.0 Installer
********************************
- Current boot slot: b
! Cannot mount /system
- Unmounting partitions
Updater process ended with ERROR: 1
Error installing zip file 'external_sd/Magisk-v23.0.zip
Updating partition details . . .
. . . done
Thanks to anyone to offers any suggestions, this is my first time attempting this, so don't assume I know anything, I just step by step tutorials and usually don't have problems like this.

Categories

Resources