TWRP cannot access internal storage - OnePlus 5 Questions & Answers

I'm currently running the stock OOS 4.5.8 with the official TWRP v3.1.1.1 & magisk installed. Last night I received the latest OTA update notice on the phone, now since my phone has been rooted, I know that I needed to download the whole OS file. So I downloaded the full OOS 4.5.10 and copied the zip file to the root directory of the phone, but when I tried to flash the zip file via twrp, I noticed that I cannot locate the file with twrp's built-in file manager, nor could I gain any access to my phone's internal storage. Also, when I booted into TWRP, it asked for a password, I was able to get in by simply pressing cancel. I'm not sure if that action has contributed towards the actual issue.
I tried to use the USB OTG function by placing the OS file on an USB stick, but TWRP failed to detect that as well. So I'm running out of ideas here....
I believe that the culprit is the permission setting problem, and started googling around for a bit, that's when I found this string of codes (quoted below for reference), while the codes from the tutorial could potentially rectify the permission issue, I just want to make sure that the codes won't wipe all the data off from my phone. Can someone please confirm this? Alternatively, if there are other solutions, please let me know. Thanks in advance.
casual_kikoo said:
If you say you can't read/write your internal memory when your phone is booted, it seems to be a permissions problem: follow this tutorial in TWRP to get good permissions back.
Click to expand...
Click to collapse

The problem is that the data on your phone is encrypted. If you set up a pin to unlock your phone when it boots up you enter the same pin into TWRP. Then it can decrypt your data. If you cancel out of the password screen then TWRP doesn't have access to your data which is why you can't find your folder.

jhs39 said:
The problem is that the data on your phone is encrypted. If you set up a pin to unlock your phone when it boots up you enter the same pin into TWRP. Then it can decrypt your data. If you cancel out of the password screen then TWRP doesn't have access to your data which is why you can't find your folder.
Click to expand...
Click to collapse
Thanks mate, that fixed everything. Much appreciated. :good:

Related

Flashed TWRP and rooted, now my file system is encrypted?

I somehow got my filesystem encrypted when I flashed TWRP and rooted. When I try to boot into TWRP, I have to enter a password to be able to see anything or do any modifications. What happened?
I didnt have this problem on my Axon but googled.
http://forum.xda-developers.com/google-nexus-5/help/twrp-password-t2511049
I have no idea if this will help you or not but it will wipe data so your phone will be factory reset. Do at your own risk.
Twerkules said:
I somehow got my filesystem encrypted when I flashed TWRP and rooted. When I try to boot into TWRP, I have to enter a password to be able to see anything or do any modifications. What happened?
Click to expand...
Click to collapse
bhint15 said:
I didnt have this problem on my Axon but googled.
http://forum.xda-developers.com/google-nexus-5/help/twrp-password-t2511049
I have no idea if this will help you or not but it will wipe data so your phone will be factory reset. Do at your own risk.
Click to expand...
Click to collapse
This is from the Thread @bhint15 posted ,
Hit cancel at the password screen, then go into Wipe and then do a factory reset by swiping. Then go back into Wipe and press the 'Format data' button. You have to type 'Yes', and it will take a few seconds. After that everything should work normally.
Click to expand...
Click to collapse
and the reason why ask for password is cuz Axon 7 Data/Storage is Automatically encrypted out of the box, that's why you don't or not going to find any sort of encryption data setting under Settings and That's the reason a lot of users here have issues trying to get back to stock or something similar.....
This may give you some insight.
https://youtu.be/y0fHGJY-vFE
For me it's the Axon 7. I like the bigger res screen, the upcoming daydream compatibility and superior audio and non-Apple like OS.
The Honor 8 dies seem to have a better camera, but I can live with that. Plus I have an LG G5 for when I want photos.
You just have to decide witch Frasier is more important to you.
RojasTKD said:
This may give you some insight.
https://youtu.be/y0fHGJY-vFE
For me it's the Axon 7. I like the bigger res screen, the upcoming daydream compatibility and superior audio and non-Apple like OS.
The Honor 8 dies seem to have a better camera, but I can live with that. Plus I have an LG G5 for when I want photos.
You just have to decide witch Frasier is more important to you.
Click to expand...
Click to collapse
Wrong Thread mate LoL,
DrakenFX said:
Wrong Thread mate LoL,
Click to expand...
Click to collapse
What the neck how did u end up here....
Disregard ?
DrakenFX said:
This is from the Thread @bhint15 posted ,
and the reason why ask for password is cuz Axon 7 Data/Storage is Automatically encrypted out of the box, that's why you don't or not going to find any sort of encryption data setting under Settings and That's the reason a lot of users here have issues trying to get back to stock or something similar.....
Click to expand...
Click to collapse
Alright, I managed to be able to write to /system temporarily by formatting the Data partition in TWRP, then rebooting back into TWRP. However, after rebooting into OS and setting up my phone, I rebooted into TWRP and was faced with the encryption password prompt again! Does the filesystem just re-encrypt itself when you start the OS, or am I doing something wrong?
Twerkules said:
Alright, I managed to be able to write to /system temporarily by formatting the Data partition in TWRP, then rebooting back into TWRP. However, after rebooting into OS and setting up my phone, I rebooted into TWRP and was faced with the encryption password prompt again! Does the filesystem just re-encrypt itself when you start the OS, or am I doing something wrong?
Click to expand...
Click to collapse
I gave up for now. I tried for 4 days to fix this. In the end I have 30 days to return the phone. Hopefully someone will figure out a work around for this issue. I really like using twrp. I have not read a comment on here of anyone being able to boot into system then back into twrp with out having to enter a password to decrypt. I hope someone out there can do it and they figure out a way to fix it for the rest of us..
HonestOtter said:
I gave up for now. I tried for 4 days to fix this. In the end I have 30 days to return the phone. Hopefully someone will figure out a work around for this issue. I really like using twrp. I have not read a comment on here of anyone being able to boot into system then back into twrp with out having to enter a password to decrypt. I hope someone out there can do it and they figure out a way to fix it for the rest of us..
Click to expand...
Click to collapse
When does twrp prompt for password? I just booted into TWRP and it didn't prompt me. Then I simply booted back into the rom. Never prompted for a password.
runderekrun said:
When does twrp prompt for password? I just booted into TWRP and it didn't prompt me. Then I simply booted back into the rom. Never prompted for a password.
Click to expand...
Click to collapse
As soon as I get into TWRP it asks me for the password. I can continue into TWRP but I can't mount or modify the /system partition (it reads as 0b in TWRP File Browser). No idea how to fix, but I'm glad it's not just me having this issue.
As of right now, it looks like we are going to have to wait for custom ROMs for a fix, unless TWRP gets an update just for this. I saw a thread here asking users for info for final tweaks on a CM13 port to the Axon 7.
Twerkules said:
As soon as I get into TWRP it asks me for the password. I can continue into TWRP but I can't mount or modify the /system partition (it reads as 0b in TWRP File Browser). No idea how to fix, but I'm glad it's not just me having this issue.
As of right now, it looks like we are going to have to wait for custom ROMs for a fix, unless TWRP gets an update just for this. I saw a thread here asking users for info for final tweaks on a CM13 port to the Axon 7.
Click to expand...
Click to collapse
Which bootloader unlock did you do? I wonder, why would this not happen to me but happen to you? I am willing to test anything that needs to be tested.
You cannot fix that. Like DrakenFX said, the partition encrypts itself in the OS. You cannot disable/bypass this!
XblackdemonX said:
You cannot fix that. Like DrakenFX said, the partition encrypts itself in the OS. You cannot disable/bypass this!
Click to expand...
Click to collapse
Auto-encrypted can be disabled but that's way, way out of my league, need to rebuild boot. Img with that feature disabled.
There are two different scenarios that will be in play here. Is the bootloader unlocked or not. If the bootloader is unlocked then boot.img can be patched with the zip from idlekernle that disables the dm-verity and fstab. You cannot do this if your BL is locked, because it will modify the signed boot.img that that provides root, and will not boot anymore.
After it's patched, the system will not encrypt after /data wipe and TWRP will access it without problem. The downside is no encryption.
For the BL locked crowed, the /data has to be reformatted after flashing new rooted boot.img. This image also enforces encryption so one way to solve this would be for @tenfar to provide us with signed boot.img that set encryption of as well as. Otherwise the TWRP will need a password to decrypt /data if it can't use the default_password. In this case you should be able to enter the same pin you have setup for lock screen to decrypt the main encryption key.
The system re-encrypts itself on every system start after factory reset or /data format because of the forceencrypt flag in fstab, so the pin will be needed as long as that's the case. While TWRP should be able to try to decrypt with "default_password" in case you have not setup any on lockscreen, this sometimes fails, so having a pin on lockscreen usually helps. The cause is most likely that /cryptkey is altered somehow and TWRP can't use it. Wiping /data and rebooting should generate an fresh /cryptkey. I have been able to just flash modded recovery while still on stock boot and backup the /data with no key.
/system should not be encrypted ever since it would make block level OTA impossible to do. Why TWRP is not mounting it or seeing it 0b is a separate question.
Twerkules said:
As soon as I get into TWRP it asks me for the password. I can continue into TWRP but I can't mount or modify the /system partition (it reads as 0b in TWRP File Browser). No idea how to fix, but I'm glad it's not just me having this issue.
As of right now, it looks like we are going to have to wait for custom ROMs for a fix, unless TWRP gets an update just for this. I saw a thread here asking users for info for final tweaks on a CM13 port to the Axon 7.
Click to expand...
Click to collapse
That would be dreamy. I have no issues waiting, fingers crossed.
---------- Post added at 09:53 PM ---------- Previous post was at 09:49 PM ----------
peramikic said:
There are two different scenarios that will be in play here. Is the bootloader unlocked or not. If the bootloader is unlocked then boot.img can be patched with the zip from idlekernle that disables the dm-verity and fstab. You cannot do this if your BL is locked, because it will modify the signed boot.img that that provides root, and will not boot anymore.
After it's patched, the system will not encrypt after /data wipe and TWRP will access it without problem. The downside is no encryption.
For the BL locked crowed, the /data has to be reformatted after flashing new rooted boot.img. This image also enforces encryption so one way to solve this would be for @tenfar to provide us with signed boot.img that set encryption of as well as. Otherwise the TWRP will need a password to decrypt /data if it can't use the default_password. In this case you should be able to enter the same pin you have setup for lock screen to decrypt the main encryption key.
The system re-encrypts itself on every system start after factory reset or /data format because of the forceencrypt flag in fstab, so the pin will be needed as long as that's the case. While TWRP should be able to try to decrypt with "default_password" in case you have not setup any on lockscreen, this sometimes fails, so having a pin on lockscreen usually helps. The cause is most likely that /cryptkey is altered somehow and TWRP can't use it. Wiping /data and rebooting should generate an fresh /cryptkey. I have been able to just flash modded recovery while still on stock boot and backup the /data with no key.
/system should not be encrypted ever since it would make block level OTA impossible to do. Why TWRP is not mounting it or seeing it 0b is a separate question.
Click to expand...
Click to collapse
Well i have formatted my data maybe 30 times with all sorts of different recoveries and boot images. My original boot image is long gone so hopefully that isn't the key. I also don't use a lock screen, I guess I could if it unlocks the data, but I certainly wouldn't want to keep using a lock screen. Anyways I am done with the phone for now, will revisit it when someone fixes posts they had the decrypt PW issue and fixed it.
HonestOtter said:
That would be dreamy. I have no issues waiting, fingers crossed.
---------- Post added at 09:53 PM ---------- Previous post was at 09:49 PM ----------
Well i have formatted my data maybe 30 times with all sorts of different recoveries and boot images. My original boot image is long gone so hopefully that isn't the key. I also don't use a lock screen, I guess I could if it unlocks the data, but I certainly wouldn't want to keep using a lock screen. Anyways I am done with the phone for now, will revisit it when someone fixes posts they had the decrypt PW issue and fixed it.
Click to expand...
Click to collapse
See if you can set the pin, go into TWRP and us it. If it works, go back to OS and remove lockscreen, set to none and then go back to TWRP and see if it still asks for one. Did you run TWRP in read only mode or did you swipe to mount as RW?
peramikic said:
See if you can set the pin, go into TWRP and us it. If it works, go back to OS and remove lockscreen, set to none and then go back to TWRP and see if it still asks for one. Did you run TWRP in read only mode or did you swipe to mount as RW?
Click to expand...
Click to collapse
I assume you mean the lock screen pin? I set a lock screen pin of 1234, but "password failed, please try again". So that didn't work. Is there a different pin for the encryption?
***update
That sucked. I don't use a lock screen but after I tried the pin it won't let be go back to none for the lock screen. I was just starting to use this phone to, now its back to the old phone because I can't use a phone with a lock screen . So sad. Hopefully someone figures out a solution to all this security crap.
I'm having the same issue on B27. Do a factory Reset, then a Format, and after it boots to the OS, the data is encrypted again. I'd be somewhat ok with it but I'm not clear on how to install things like Xposed if the drive is encrypted? I assumed ADB SIDELOAD... but not through encryption.
If the answer is "I don't know" -- then can someone help me restore to stock B27. I have a locked bootloader.
zigzampow said:
I'm having the same issue on B27. Do a factory Reset, then a Format, and after it boots to the OS, the data is encrypted again. I'd be somewhat ok with it but I'm not clear on how to install things like Xposed if the drive is encrypted? I assumed ADB SIDELOAD... but not through encryption.
If the answer is "I don't know" -- then can someone help me restore to stock B27. I have a locked bootloader.
Click to expand...
Click to collapse
Xposed should install just fine if you're getting the message in TWRP. Id you're getting the encryption message after the phone is booted and can't access the phone, then you need to format data, then install Xposed so you can use the phone.
Some zips like SuperSU zip will not be able to be installed when the partition is encrypted. Xposed zip should install just fine
mmamedov said:
Xposed should install just fine if you're getting the message in TWRP. Id you're getting the encryption message after the phone is booted and can't access the phone, then you need to format data, then install Xposed so you can use the phone.
Some zips like SuperSU zip will not be able to be installed when the partition is encrypted. Xposed zip should install just fine
Click to expand...
Click to collapse
But if TWRP cannot access the encrypted data, how can one select and flash the TWRP flashable zip that accompanies the Xposed APK? Is the only solution to sideload? I see the option in TWRP but I am not familiar with how to do it.

Rooting not successful, even though it says it is

I have a US996 with an unlocked bootloader. I installed TWRP (although I still can't get it to decrypt data). I installed the latest SuperSU - and there were no errors (although without the ability to decrypt, TWRP couldn't wipe Dalvik/cache).
But after rebooting, Root Checker still says I'm not rooted.
What am I doing wrong?
Figured it out. Unless I disable the default encryption to formatting Data, installing SuperSU fails. Once I format Data, the install works properly.
Haphim said:
Figured it out. Unless I disable the default encryption to formatting Data, installing SuperSU fails. Once I format Data, the install works properly.
Click to expand...
Click to collapse
How did you disable default encryption? I flashed twrp but in recovery it always says it had to decrypt in order to mount. I don't know the password twrp is asking for. Thanks
I followed the instructions and flashed TWRP. However it asks for a decrypt password when TWRP loads. How do I get past this? I formatted data twice and I am unable to flash SuperUser since I can't see any mount points. Its read only. Thank you to anyone that can help.
SOLVED:
Here is what I did wrong. After I ran all the dirtycow commands and got permissive root access I rebooted into TWRP. TWRP showed that the sdcard was encrypted. What I kept doing at this step was formatting the sd card which is correct, however I kept rebooting back into system. That was my mistake. I needed to immediately reboot back INTO TWRP RECOVERY instead. Once I rebooted directly back into TWRP recovery after the format I was able to view file system information move su.zip to sd card and install SuperUser.zip from TWRP.
When rooting my H990ds the guide said when TWRP asks for a password just press cancel. It should be the same for you too.
inurb said:
How did you disable default encryption? I flashed twrp but in recovery it always says it had to decrypt in order to mount. I don't know the password twrp is asking for. Thanks
Click to expand...
Click to collapse
Sorry, the text you quoted from me should have read that disabled default encryption *by* formatting Data. Formatting Data is what takes care of it.

Problems with encryption, TWRP and Oxygen OS

Hello.
Today I restarted the phone in TWRP to wipe cache. It did not accepted my password, although I remembered it correctly. I tried to enter the ROM, but it still didn't accept it. After many many tries, I succeeded in entering the rom. Googled about this and someone said
Simply boot into TWRP and enter your PIN (if you've set one) to decrypt the stroage. If you don't have TWRP (for whatever reason) you can do so via ADB too but ONLY if you've connected your phone to your PC beforehand and also accepted it's fingerprint on the phone itself.
Delete (or rename) the following files inside /data/system (note that probably not all of them exist for you, simply delete those you can find):
password.key
pattern.key
locksettings.db-wal
locksettings.db-shm
locksettings.db
Reboot the phone and (if you've set a PIN) enter it to decrypt the storage one more time. After that you can simply unlock your phone with a swipe.
Go into Settings > Security and set your preferred unlock method again, Android will ask you if you want to set a boot-time code too. Select whatever you want here, it's a nice security addition but can be annoying sometimes.
Enjoy your phone again!
Click to expand...
Click to collapse
I did that, but now when I enter the rom, it just shows the wallpaper with nothing on it. If I try to enter TWRP, it asks for a password and my old one does not work. I wanted to flash the rom via TWRP, but everything is encrypted. Tried installing the custom recovery to flash from the sd card, but the files or still encrypted.
What can I try next? I really really dont wan't to format everything, as I have lots of files and photos on the phone. Thanks!!
reneftw said:
Hello.
Today I restarted the phone in TWRP to wipe cache. It did not accepted my password, although I remembered it correctly. I tried to enter the ROM, but it still didn't accept it. After many many tries, I succeeded in entering the rom. Googled about this and someone said
I did that, but now when I enter the rom, it just shows the wallpaper with nothing on it. If I try to enter TWRP, it asks for a password and my old one does not work. I wanted to flash the rom via TWRP, but everything is encrypted. Tried installing the custom recovery to flash from the sd card, but the files or still encrypted.
What can I try next? I really really dont wan't to format everything, as I have lots of files and photos on the phone. Thanks!!
Click to expand...
Click to collapse
If you are able to get into the phone, then go in and remove your security, pin / password etc.
I'm hazarding a guest that you decrypted your device and now you're stuck like this ?
You may have to format data, not a wipe, a format.
Not sure if the OnePlus has a safe mode but that should enable you to get into the OS and make the needed changes in security then go to twrp and you should be good to go.
Are you able to see your data when connected to a computer? IE when your phone boots ? Get your data backed up.
Sent from my ONEPLUS A5000 using XDA-Developers Legacy app

Failure to decrypt in TWRP?

For some reason I cannot decrypt when booting TWRP. On a normal boot, I get the prompt to enter my PIN, I enter my PIN, and it boots. In TWRP it says "failure to decrypt."
I'm using 3.2.1-7 of TWRP, which worked before, but now it's unable to decrypt my internal data.
Halp?
Edit: I guess when I get home I'll install an older version of TWRP and see if that helps, but I am otherwise sunk.
TPMJB said:
For some reason I cannot decrypt when booting TWRP. On a normal boot, I get the prompt to enter my PIN, I enter my PIN, and it boots. In TWRP it says "failure to decrypt."
I'm using 3.2.1-7 of TWRP, which worked before, but now it's unable to decrypt my internal data.
Halp?
Edit: I guess when I get home I'll install an older version of TWRP and see if that helps, but I am otherwise sunk.
Click to expand...
Click to collapse
First thoughts : Backup internal and format data.
Perhaps try https://androidfilehost.com/?fid=818222786056030640 but that's only for lockscreen but you'll never know
edit : or try like another twrp3.2.1.0 (but will result in repair data too) or 3.2.1.6
raystef66 said:
First thoughts : Backup internal and format data.
Perhaps try https://androidfilehost.com/?fid=818222786056030640 but that's only for lockscreen but you'll never know
edit : or try like another twrp3.2.1.0 (but will result in repair data too) or 3.2.1.6
Click to expand...
Click to collapse
I mean, I know I'll be able to backup all my data since I can access it on a normal boot. Just very weird/annoying. I'm going to try flashing an older version of TWRP and seeing if it works.
...Maybe I should backup my data first
Did you ever find a solution to decrypting in TWRP? Currently having same issue with LOS15.1 and TWRP3.2.3.0.
I wasnt able to get mine to work, so I just backed up all my data and reformated, if you lost root you can still sideload magisk, dunno why but you can

Can't find downloads in twrp

After doing the Tmo to international conversion, I downloaded a new rom and appropriate files. They show in ES File Explorer, but I am unable to locate them in TWRP. Anyone have this issue, I have to be missing something. Thanks in advance.
just put them in downloads and go there in twrp
Downloads folder literally doesn't exist in TWRP for me.
The whole file system looks different at / in TWRP than in ES explorer.
You need to mount sdcard/storage in TWRP
I have tried with no success. Under mount it won't even allow me to click the option to mount sd card. When I click sd card in the list I get a slew of folders with random character names (ie- ggDjkk7hFJJgGvV)
I have noticed in my oos system settings my phone shows encrypted. Could this be why? Is there a way to turn off encryption that I'm not seeing, if this is the cause?
Floridaplur said:
I have tried with no success. Under mount it won't even allow me to click the option to mount sd card. When I click sd card in the list I get a slew of folders with random character names (ie- ggDjkk7hFJJgGvV)
Click to expand...
Click to collapse
That means it's still encrypted. What version of TWRP are you using? My guess is you are using the wrong TWRP. You can try booting back into OOS and removing your PIN / Password / fingerprints.
Otherwise you may have to boot back into OOS, backup your data, and format the data partition. Reboot to recovery again, then transfer whatever you need to TWRP, flash, and it will re-encrypt on the next boot. Again though, make sure you have the correct TWRP first before you go through all this trouble.
I am using bluespark TWRP that was in the guide to Tmo intl conversion.
Floridaplur said:
I am using bluespark TWRP that was in the guide to Tmo intl conversion.
Click to expand...
Click to collapse
have u tried the other twrp builds that may be more up to date?
Floridaplur said:
I am using bluespark TWRP that was in the guide to Tmo intl conversion.
Click to expand...
Click to collapse
Yes, that one will give you the issue. The encryption did not seem to be working in it.
You should use the latest version of this recovery to resolve your issue: [RECOVERY][3.3.0-2][fajita]Official/Unofficial TWRP recovery for OnePlus 6T (Stable)
So after updating to twrp 3.2.2, I was successfully able to clean install havok and have everything working. What I have noticed though, is that after booting into the rom, it is encrypted again.
The first go I realized I had the wrong gapps, so I downloaded the correct one, and rebooted to recovery. At this point it was encrypted and I couldn't see downloads again. I decided to do a data and cache wipe and installed everything via adb sideload and it went perfectly. I guess this phone just wants me to only load roms when I have my laptop with me. Either way, I'm up and running. I miss how easy things we're back in the HTC Evo days.

Categories

Resources