[G965F][STOCK 9.0] Permanently decrypt internal storage not working with TWRP - Samsung Galaxy S9+ Questions & Answers

Hello,
the situation:
* Upgraded from Oreo to Pie with Samsung Stock (June build)
* Flashed TWRP, no-verity, magisk, xposed (Ed) etc.
* then factory resetted (reasons not important)
Everything worked fine. Then I encrypted my internal SD card with the 9.0 Samsung Stock ROM.
Complication:
* I realized TWRP cannot handle encrypted internal storage from Samsung Stock.
* Now I can flash (with Odin) a Stock ROM and TWRP.
* But I cannot unencrypt my internal storage using TWRP
* This MEANS I cannot flash magisk via TWRP etc.
> When I go to TWRP > wipe > wipe data, TWRP formats internal storage (it is then not displayed as "0 MB" anymore)
> However, when I re-flash stock rom - the internal storage gets apparently encrypted again without me chosing the option
Is there a way out? Otherwise I have effectively killed my S9+ for root usage under stock rom (which I need for camera performance - sole reason I bought the s9+).
Thank you in advance.
Akalias
My Devidc: G965F, Exynos

So i realize that twerp is not capable of decrypting internal data storage for the s9+. But is it a bug? I mean there must be a way to just wipe the internal storage without being able to handle Samsung encryption??
//Edit
just FYI: installing the following ROM with the "_rescue" suffix as explained by the dev, solves the problem of the encrypted storage!
https://forum.xda-developers.com/ga...-development/rom-u1arc5-devbase-v5-2-t3764822

Ok so this is getting interesting.
1. Encrypting with Samsung Stock
2. Wiping Data (wipe "yes") with TWRP
3. --> Internal Storage accessible again - but no ROM installed
4.A.1. Reflashing samsung stock
4.A.2 Internal storage automatically encrypted again
4.B.1 Alternatively: Flashing DevBase Samsung Stock
4.B.2 Internal Storage still decrypted and accessible via TWRP
4.B.3 Wiping DevBase ROM
4.B.4 Flashin original Samsung Stock
---> Internal Storage encrypted again and not accessible for TWRP
Question: Does encrypting the internal storage via Samsung Stock once, trigger a flag that causes the phone to be permanently be re-encrypted if flashing stock ROM?
Is there a solution to this?

So i assume no one has encounter this ever before or has enough technical acumen to give a hint?

"_rescue" totally worked.
TheAKAlias said:
So i realize that twerp is not capable of decrypting internal data storage for the s9+. But is it a bug? I mean there must be a way to just wipe the internal storage without being able to handle Samsung encryption??
//Edit
just FYI: installing the following ROM with the "_rescue" suffix as explained by the dev, solves the problem of the encrypted storage!
https://forum.xda-developers.com/ga...-development/rom-u1arc5-devbase-v5-2-t3764822
Click to expand...
Click to collapse
Thanks for the referral.
I was in the exactly the same predicament as yourself.
Flashing the latest XSG (UAE) firmware encrypted /data and I couldn't decrypt it.
_alexndr is a genius!

Related

[Q] Custom ROMs + Encryption

Having trouble finding a firm answer on this. I have read that encryption has NO effect on Recovery mods since it only encrypts apps, data, and a few other pieces of info. (I thought that there was full disk encryption, but I guess not). So I would like to verify the following questions regarding the use of custom ROMs and Android encryption and I would like to do both, back them up, and maybe even change ROMs without issue.
I am fairly certain I can boot into a recovery mod (CWM or Twerp) without any problems while encrypted. Is this true? (I have seen conflicting answers here and on the interwebs).
If I back up a ROM and data (assuming this is done together in one backup), will I be able to recovery the backup properly and use it even when it was encrypted?
Thanks in advance.
Bakura
You can boot into recovery and flash zips but you will not be able to access your /data partition since that's what's encrypted. For flashing ROMs this doesn't matter since those don't touch /data. However if you have to wipe your user data you will have to set up the encryption all over again.
What this also means is you cannot store your zips on the internal memory of your phone because those will not be accessible to the recovery. You will have to store them on either an unencrypted microSD or sideload them with adb (easy enough to do on CWM, not sure about other recoveries).
Backing up should be fine as long as you backup to somewhere other than the internal memory for the reasons I stated above.
Will the wipe and restore options work?
Hexgore said:
You can boot into recovery and flash zips but you will not be able to access your /data partition since that's what's encrypted. For flashing ROMs this doesn't matter since those don't touch /data. However if you have to wipe your user data you will have to set up the encryption all over again.
What this also means is you cannot store your zips on the internal memory of your phone because those will not be accessible to the recovery. You will have to store them on either an unencrypted microSD or sideload them with adb (easy enough to do on CWM, not sure about other recoveries).
Backing up should be fine as long as you backup to somewhere other than the internal memory for the reasons I stated above.
Click to expand...
Click to collapse
I have a full Nandroid Backup of my phone with 4ext Revovery Touch. So if I encrypt Internal Storage only and if it's screwed up, will I be able to restore the Nandroid backup from recovery (I mean, is it possible to modify (rwx) the encrypted partition from recovery?
Far_SighT said:
I have a full Nandroid Backup of my phone with 4ext Revovery Touch. So if I encrypt Internal Storage only and if it's screwed up, will I be able to restore the Nandroid backup from recovery (I mean, is it possible to modify (rwx) the encrypted partition from recovery?
Click to expand...
Click to collapse
If the Nandroid backup is stored on your SD card, I think so, but you might have to wipe the partition first. As far as I know (someone please correct me if I'm wrong) you can still wipe the encrypted partition, you just can't access any of the encrypted data from recovery.
Yeah, the recovery works just fine!
Hexgore said:
If the Nandroid backup is stored on your SD card, I think so, but you might have to wipe the partition first. As far as I know (someone please correct me if I'm wrong) you can still wipe the encrypted partition, you just can't access any of the encrypted data from recovery.
Click to expand...
Click to collapse
^+1. So I went ahead and encrypted the internal storage. The process was fairly fast (took me under 10 mins).
But entering a password was too much of a hassle. So I performed a full system wipe and restored the backup. No problems.
That actually didn't work for me on the Nexus 7.
I tried to wipe the tablet from recovery but it couldn't mount the /data partition.
I tried to wipe the tablet from the OS but it didn't like the custom recovery so it just rebooted without changing anything.
In the end I had to run "fastboot erase userdata" to wipe it. That worked.
I have now installed CM 10.1 and can report that the encryption process seems to be working fine on the N7. It's taking a while but it is the 32GB model.
Encryption on Android is very temperamental. The general pattern seems to be that if the ROM you're using is based on the stock OS for your device (as AOSP is for Nexus devices) encryption will work fine, but due to the way the memory is mounted on modern Nexus devices, recoveries may be unable to mount the /data partition at all.
However if you are using a ROM based on a non-stock OS for your device (e.g. AOSP on an HTC Sensation) encryption may not even be able to turn on, and sadly fixing this problem when it arises is not high on the list of priorities for most developers, especially if your device isn't popular.
We are lucky that CyanogenMod seems to care a lot about privacy and security recently however. That may mean they focus more on encryption compatibility in the future, and most AOSP ROMs are based on CM, so fingers crossed for that.
But basically be aware YMMV when it comes to encryption on custom ROMs.
I tried to encrypt two Moto G's with the new official CM11, but after reboot and enter pin to unlock, the devices crashes with a black screen.
Encryption with stock firmware works fine.

[Q] How to decrypt internal storage after installing a new ROM

Hi, got myself into a problem - hope someone can save me here
I had my internal storage encrypted because of some app that required that, anyway I did a full wipe/factory settings and installed the ROM again (4.2.2 Omega).
Now my internal storage is inaccessible at all, I guess due to the encryption.
Is there a way to decrypt the partition and get the files from there?
And how do I make it accessible again?

[Q] Noob - Utterly Confused

Hi everyone, new to the forum and I hope that my (likely) simple question is easy to answer!
I have a Samsung Galaxy Note 2, that was running the stock ROM at 4.1.2. I rooted the phone using the Odin tool, which worked first time, and I then proceeded to use ClockWorkMod (latest version I think) to flash a custom 4.3 Rom to the device (after taking a backup of the EFS folder to SD Card and my PC).
That has worked perfectly. I am loving 4.3.
The issue I have is internal storage.
When I did the custom rom install, I did:-
Wipe Data/Factory Reset
Wipe Cache Partition
Wipe Dalvik Cache
Format System
I then installed the custom ROM and latest GApps and all is good.
What is curious, and I just cannot seem to explain, is that the internal storage when I was on the stock ROM, reported I have over 6GB free, and now that I have gone over to the custom ROM, I have around 2GB free.
For me, that seems strange that I have lost 4GB of internal storage just for this ROM update.
I had assumed that the Data/Factory Reset and Format System would clear out all the rubbish ready for a clean install of the Custom ROM - but that does not appear to be the case.
How do I go about resetting my device so that I can clear down the internal storage to the extent that I can regain the lost space?
Any help is really appreciated.
Mark.
markwalsham said:
Hi everyone, new to the forum and I hope that my (likely) simple question is easy to answer!
I have a Samsung Galaxy Note 2, that was running the stock ROM at 4.1.2. I rooted the phone using the Odin tool, which worked first time, and I then proceeded to use ClockWorkMod (latest version I think) to flash a custom 4.3 Rom to the device (after taking a backup of the EFS folder to SD Card and my PC).
That has worked perfectly. I am loving 4.3.
The issue I have is internal storage.
When I did the custom rom install, I did:-
Wipe Data/Factory Reset
Wipe Cache Partition
Wipe Dalvik Cache
Format System
I then installed the custom ROM and latest GApps and all is good.
What is curious, and I just cannot seem to explain, is that the internal storage when I was on the stock ROM, reported I have over 6GB free, and now that I have gone over to the custom ROM, I have around 2GB free.
For me, that seems strange that I have lost 4GB of internal storage just for this ROM update.
I had assumed that the Data/Factory Reset and Format System would clear out all the rubbish ready for a clean install of the Custom ROM - but that does not appear to be the case.
How do I go about resetting my device so that I can clear down the internal storage to the extent that I can regain the lost space?
Any help is really appreciated.
Mark.
Click to expand...
Click to collapse
I would say, try to establish if the rom had 4GB of extra data or not initially. How much bigger was the custom rom compared to the stock rom?
If you have busybox or TerminalIDE installed ( hope you have!) , try running "du -a / | sort -n -r | head -n 30" and see if you can find any particularly large files, or directories that seem extremely bloated and compare them to the stock rom.
What are you using to determine how much disk space you have free? Windows via usb? df via terminal?
Prof

[HELP]Oreo based ROMs PIN bug

I know this is might be common issue to people who flashed any Oreo ROM and is happening to my Mi5 as well.There is a bug where the Oreo ROM automatically encrypts the TWRP.The password is your current PIN.However,I want to try another ROM and when I get pass the loading logo(lets say Lineage logo) it asks for my PIN.I entered my PIN correctly,the previous PIN I used on my Oreo ROM,but it didnt work.I tried removing the file where the PIN is contained via ADB and its still locked.I wiped everything on my internal storage and now the dreaded PIN is gone.How do I fix this issue? Should I remove my PIN before I flash another ROM? I mostly use my internal storage as my main storage.
RebornCheiko said:
I know this is might be common issue to people who flashed any Oreo ROM and is happening to my Mi5 as well.There is a bug where the Oreo ROM automatically encrypts the TWRP.The password is your current PIN.However,I want to try another ROM and when I get pass the loading logo(lets say Lineage logo) it asks for my PIN.I entered my PIN correctly,the previous PIN I used on my Oreo ROM,but it didnt work.I tried removing the file where the PIN is contained via ADB and its still locked.I wiped everything on my internal storage and now the dreaded PIN is gone.How do I fix this issue? Should I remove my PIN before I flash another ROM? I mostly use my internal storage as my main storage.
Click to expand...
Click to collapse
Have you formatted your data once before flashing any oreo rom? Happened with me too, but only thing you need to do is just format the data once. And it doesn't matter if you keep or remove the pin on your device, since it it wiped when you wipe the system and data. The only thing you need to remember is to format the data once everytime you switch between android versions. (Ie one format when switching from 7.1.2 to 8.0 or 8.1 and one format when switching from 8.1 or 8.0 to 7.1.2)
MyNameIsRage said:
Have you formatted your data once before flashing any oreo rom? Happened with me too, but only thing you need to do is just format the data once. And it doesn't matter if you keep or remove the pin on your device, since it it wiped when you wipe the system and data. The only thing you need to remember is to format the data once everytime you switch between android versions. (Ie one format when switching from 7.1.2 to 8.0 or 8.1 and one format when switching from 8.1 or 8.0 to 7.1.2)
Click to expand...
Click to collapse
I did the wipe cache and data.But not the internal storage since the ROM was placed on there.
RebornCheiko said:
I did the wipe cache and data.But not the internal storage since the ROM was placed on there.
Click to expand...
Click to collapse
Yes this is one thing which bugs everyone, but formating data is important, you can either get an sd card, or after formating you can transfer the file from pc to device
MyNameIsRage said:
Yes this is one thing which bugs everyone, but formating data is important, you can either get an sd card, or after formating you can transfer the file from pc to device
Click to expand...
Click to collapse
Already fixed the issue.Flashed TWRP 3.2 instead of the older 3.2......it clearly states on twrp website that they added Oreo support on 3.2 and fixed some critical bugs.

Question Orangefox can't wipe data: unable to mount storage

Hi, Orangefox can't wipe data, it gives me this error: unable to mount storage. I think the problem is that the data partition is somehow encrypted, but i haven't encrypted it so now I can't decrypt it because I don't have the password. I've already tried with the unlock password but it fails. I know the easy solution would be to format all data including internal storage but I would like to avoid that possibility. Do you know what can I do?
(The CrDroid rom I was installing before this problem occurred is in bootloop, so I can't access it).
Have you tried other recovery? TWRP, PE, Miui.
TWRP tells me the same thing: Unable to mount storage
I think the only solution is to format data. Is there a way to recover the files? I have no backup.
Data return is possible. Formatting must not be done and you must load the ROM from which the data came. That is, the last working ROM. After running it, then back up the data and only then try a new ROM where the data will be formatted.
StaryMuz said:
Data return is possible. Formatting must not be done and you must load the ROM from which the data came. That is, the last working ROM. After running it, then back up the data and only then try a new ROM where the data will be formatted.
Click to expand...
Click to collapse
How do i load the rom? I can't install it with TWRP, it says:
Devices on super may not mount until rebooting
recovery.
To flash additional zips, please reboot recovery to
switch to the updated slot.
I've tried also with OrangeFox, same error
OK, the problem was relative to the A/B slots: by switching to the other slot I managed to install and access to the rom. Now I can recover the files, so I can format data without problems. Thank you!

Categories

Resources