Bringing SD-Card encryption to the Galaxy Nexus - Samsung Galaxy Nexus

I am wondering if there is anyone interested in bringing transparent "SD-card" encryption to the Galaxy Nexus. On Android 4 there's already encryption for the data partition, also the Galaxy Nexus is using MTP for mounting the "SD-Card" on Windows. So using an encrypted "SD-card" on Windows or somewhere else shouldn't be a problem, as transparent encryption shouldn't affect MTP? So this would lead to the following ideas / requirements:
1) We need an option to disable mounting of the internal "SD-card" when an USB connection is established or else everyone can simply read the content, as the encryption is transparent.
2) Encrypt the "SD-Card" in a transparent way, mount it on boot.There are already implementations of transparent encryption, e.g. LUKS Manager. Use the data partition (encrypted by Android's built in encryption) to store a mount script that contains the password to mount the encrypted "SD-card"
3) Optional: Split the "SD-card" in two partitions, leave one unencrypted so we still have a partition we can use to store backups done during recovery etc.
Anyone interested in doing this?

This ain't development. :'(
Sent from my Galaxy Nexus using Tapatalk 2

if u use a secure lockscreen, sequence, pin or password..and ur device is locked, the content of the sdcard doesn not appear when u attach it to the computer, unless u unlock ur device

andQlimax said:
if u use a secure lockscreen, sequence, pin or password..and ur device is locked, the content of the sdcard doesn not appear when u attach it to the computer, unless u unlock ur device
Click to expand...
Click to collapse
Thanks, good information Still would be nice to be able to explicitely prevent the mounting in general like it was possible on Android 2.x. Anyway, one problem solved

Related

[Q] Device encryption - any issue with root and Odin?

I want to use Android Device Encryption (Settings --> General --> Security). My questions are:
1). Is there any issue if my device is rooted and KNOX is disabled (it's still 0x0)
2). If anything to my device and I need to Odin, I assume encryption will NOT prevent me doing so?
3). Bonus question: is there anyway to use PIN when the device is encrypted? I only see "Password" and the rest is greyed out. I don't want to use 6 characters alphanumeric password everytime I want to use my device.
1) Yes, if you're rooted with a 100% stock ROM and recovery, you CAN encrypt.
2) Sort of. It might mess up the encryption. Mine got confused thinking it was still encrypted, but couldn't mount the partition after Odin ran. To fix it, boot to STOCK recovery using the hardware keys (vol+/home/power), and do a factory reset from in there. Note that CWM/TWRP etc will NOT work to fix this issue. It's something to do with the changes Samsung made to the encryption code.
3) Nope. Password only. In theory, it might be possible to do an Xposed module, but I didn't find a good place to hook in to the process. If they would separate the encryption password from the device lock code, this would be easy. I ended up using the No Lock Home Xposed module, which lets you switch to swipe screen lock when you are connected to particular wifi/cell/BT devices.
I'm actually running without encryption now. It makes custom ROMs difficult. I believe if I were running an AOSP derived ROM it would be fine, but using modded stock stuff causes issues. Make sure you do backups to SD or a computer. If something goes wrong with the encryption there is no way to recover without a full wipe, which kills everything on the internal storage, including /sdcard. The external SD card is not affected, unless you encrypted that as well. I like the extra security, but the implementation sucks and is buggy.

Read/modify system files through USB?

Hi, I have a stupid question: Is there any way to read and modify system files on my HTC One M8 through USB to a computer that can access them and doesn't care about file permissions? I have an annoying WiFi notifications issue that I can't disable anywhere implemented by Verizon and they lock the bootloader on 5.0.1 and I've found no safe workaround. I just want to edit the file that has this setting.
Maybe I don't know enough about the technology, but is there no program I can use on Windows or Linux that can read the memory through USB and let me change the data without it caring about permissions? If the files are not encrypted but accessible, something should be able to read them and let me edit them, as I can get Linux to read and edit any information on a Windows drive that isn't encrypted even if the user has a lockscreen password as it bypasses boot-up.
(I realize I may be sounding like an idiot as someone might have already done this if possible but maybe I haven't searched hard enough)
This would never work, since the system partition is write protected. Even if you can somehow change the system files by USB (which I think is unlikely), the changes would just revert when you rebooted. You need a kernel mod to disable the system write protection; and for that you need root.

TWRP Asking Password...

Earlier in OnePlus 3 days...
I have set up fingerprints to unlock my device with pattern lock.
Then ...
I had deleted ... The below mentioned files from data/system...
1. locksettings.db
2. locksettings.db-shm
3. locksettings.db-wal
4. gatekeeper.password.key
5. gatekeeper.pattern.key
Because i dont want any security on my phone but i want my fingerprints to unlock my device very quickly and after removed the above mentioned files, i did that no more secure lockscreen and fingerprints working fine.
Now... In 'OnePlus 5T'...
I have set-ups my fingerprints to unlock my device with pattern lock.
Then ...
I had deleted ... The below mentioned files from data/system...
1. locksettings.db
2. locksettings.db-shm
3. locksettings.db-wal
4. gatekeeper.password.key
5. gatekeeper.pattern.key
As i don't want any security in my phone because my family need my Phone sometimes so i want swipe up to unlock my phone and fingerprints to unlock my device very quickly but as in OnePlus 3 it was working very fine but in 'OnePlus 5T' it is not working... When i reboot my phone it is showing blank screen, no home screen only wallpaper is showing.
When i get back into TWRP recovery (Blu_Spark) it is asking me a password to unlock modification and i have deleted the lockscreen security files already though.
Any solution?
I know many of you will saying decrypt your phone.
So, i have already format data and wipe internal storage.
Still when i followed the above steps, it still ask me a password in TWRP recovery.
How to solve that issue?
Note: Please Do Not Suggest to me to entered family's member fingerprints or tell them the password or pattern as i simply mentioned above what i want.
The default password in TWRP is "default_password" (without quotation marks). You could try that...
Didgeridoohan said:
The default password in TWRP is "default_password" (without quotation marks). You could try that...
Click to expand...
Click to collapse
Thank you for the reply.
I have not tried that password but i will soon... any idea about the above first issue? Home screen is not showing anything, only showing Wallpaper of the phone?
Can someone let me know how to find the password ?
The default one (default_password) seems to not be working
Using bluespark TWRP by the way and stock Oxygen OS with fingerprint password
Not sure if the data partition is encrypted, but it sure does look like it as in TWRP file manager I can not browse in folders in sdcard properly since they folder names are hashed
Edit:
Nevermind
Removed the fingerprint and data is no longer encrypted
This is a weird one and I would still like to know how to bypass it by not always removing the fingerprint if possible
So if someone knows, feel free to reply back
Normas Interruptor said:
Thank you for the reply.
I have not tried that password but i will soon... any idea about the above first issue? Home screen is not showing anything, only showing Wallpaper of the phone?
Click to expand...
Click to collapse
I have the exact same issue!! I deleted the 5 keys and I can only see the wallpaper and it doesn't allow me to set a new pin. TWRP is asking me for a password that I never set. Did you ever figure out how to solve the problem? I would like to figure out how to decrypt my data before having to do a reformat... :crying:
CoCoGirl886 said:
I have the exact same issue!! I deleted the 5 keys and I can only see the wallpaper and it doesn't allow me to set a new pin. TWRP is asking me for a password that I never set. Did you ever figure out how to solve the problem? I would like to figure out how to decrypt my data before having to do a reformat... :crying:
Click to expand...
Click to collapse
Well, this issue only appear when you have encrypted device...
So, to get ride of this situation again... Just format data with yes command and always flash no-vrrity zip to stay decrypt now you can delete these 5 files and stay decrypted and you can use your phone without any issues.
Normas Interruptor said:
Well, this issue only appear when you have encrypted device...
So, to get ride of this situation again... Just format data with yes command and always flash no-vrrity zip to stay decrypt now you can delete these 5 files and stay decrypted and you can use your phone without any issues.
Click to expand...
Click to collapse
That will wipe my entire internal drive as well right? I don't mind using my phone encrypted, but I'd just want to get past the encryption now so that I can access and backup my files before flashing or formatting.
CoCoGirl886 said:
That will wipe my entire internal drive as well right? I don't mind using my phone encrypted, but I'd just want to get past the encryption now so that I can access and backup my files before flashing or formatting.
Click to expand...
Click to collapse
Yes! you are right, formatting data can format your entire storage including internal storage but that will be happens only once..... Install TWRP recovery by codeworkx universal and format data, that will be erase the entire storage for sure but once you done with that... copy and paste Oxygen OS ROM file along with No-verity.zip file...
first flash ROM then flash No-verity.zip so you can stay decrypted ever.
Flashing no-verity.zip all the time in every rom at last is the best practice to stay decrypted.
Normas Interruptor said:
Yes! you are right, formatting data can format your entire storage including internal storage but that will be happens only once..... Install TWRP recovery by codeworkx universal and format data, that will be erase the entire storage for sure but once you done with that... copy and paste Oxygen OS ROM file along with No-verity.zip file...
first flash ROM then flash No-verity.zip so you can stay decrypted ever.
Flashing no-verity.zip all the time in every rom at last is the best practice to stay decrypted.
Click to expand...
Click to collapse
Ah I see... the problem is that I don't have any backup of my files right now. So even if I format only once, my entire storage will be forever gone.
Did you figure out how to solve the problem of "when i reboot my phone it is showing blank screen, no home screen only wallpaper is showing" without reformatting?
CoCoGirl886 said:
Ah I see... the problem is that I don't have any backup of my files right now. So even if I format only once, my entire storage will be forever gone.
Did you figure out how to solve the problem of "when i reboot my phone it is showing blank screen, no home screen only wallpaper is showing" without reformatting?
Click to expand...
Click to collapse
You have to erase the entire storage that is the only solution... trust me i have faces this issue several times when my phone as not decrypted and i lost my entire storage almost 10 times
If you have a fingerprint set, OR a pin or password, your TWRP pass is ALWAYS the same as your phone pin or pass Just tried it on mine.
Normas Interruptor said:
You have to erase the entire storage that is the only solution... trust me i have faces this issue several times when my phone as not decrypted and i lost my entire storage almost 10 times
Click to expand...
Click to collapse
jesus christ!
McDumbdumb said:
If you have a fingerprint set, OR a pin or password, your TWRP pass is ALWAYS the same as your phone pin or pass Just tried it on mine.
Click to expand...
Click to collapse
Yup, that's the solution
LucasBass said:
Yup, that's the solution
Click to expand...
Click to collapse
Glad to get some confirmation, I was fairly certain this had worked across multiple TWRP versions, but glad to hear it works from other users
CoCoGirl886 said:
I have the exact same issue!! I deleted the 5 keys and I can only see the wallpaper and it doesn't allow me to set a new pin. TWRP is asking me for a password that I never set. Did you ever figure out how to solve the problem? I would like to figure out how to decrypt my data before having to do a reformat... :crying:
Click to expand...
Click to collapse
Same exact issue here as well. Did you ever find a solution without losing your data?
p3ric0 said:
Same exact issue here as well. Did you ever find a solution without losing your data?
Click to expand...
Click to collapse
Unfortunately no. I had to format in the end and lose 9 months of photos, data, etc :crying:.
Now I know not to mess with the lockscreen keys because the newer android versions (i think 6.0 and over) has a security patch to prevent access to phone even if you delete the keys. From now on, if your touchscreen doesn't work then your best bet is to boot into TWRP, plug in a mouse via OTG cable and try to flash a new rom, which should preserve your internal drive data.
CoCoGirl886 said:
Unfortunately no. I had to format in the end and lose 9 months of photos, data, etc :crying:.
Now I know not to mess with the lockscreen keys because the newer android versions (i think 6.0 and over) has a security patch to prevent access to phone even if you delete the keys. From now on, if your touchscreen doesn't work then your best bet is to boot into TWRP, plug in a mouse via OTG cable and try to flash a new rom, which should preserve your internal drive data.
Click to expand...
Click to collapse
Dammit I was afraid of that
I tried doing a factory reset (leaving internal storage) but now the phone gets stuck on the Welcome screen "One sec.."
My internal storage is encrypted so all the folders are hashed and I can't even recover any backups I had in the phone. ADB doesn't want to detect the device while it's in TWRP so I can't sideload adb. My only hope is to buy an OTG adapter today, put my latest twrp backup on a flashdrive, and hope I can recover that way.
Nope. The OTG adapter works but TWRP can recovery everything except data.. gives an error "extractTarFork() process ended with ERROR: 255" when I try. Sighhh
p3ric0 said:
Dammit I was afraid of that
I tried doing a factory reset (leaving internal storage) but now the phone gets stuck on the Welcome screen "One sec.."
My internal storage is encrypted so all the folders are hashed and I can't even recover any backups I had in the phone. ADB doesn't want to detect the device while it's in TWRP so I can't sideload adb. My only hope is to buy an OTG adapter today, put my latest twrp backup on a flashdrive, and hope I can recover that way.
Click to expand...
Click to collapse
You deleted the lockscreen keys from the OP right? If so, I don't think an OTG adapter would help. Because once you deleted the password then it will default to TWRP's password but it doesn't exist? However, if you never deleted the keys and can access TWRP's screen to enter your password then you should be able to decrypt and extract your backup. I had a pattern password and you can use the mouse connected to OTG cable to draw your pattern to unlock.
I'm actually having the same touchscreen issue on my device again... but the screen would randomly work. So I am waiting for it to start working before I reflash.
p3ric0 said:
Same exact issue here as well. Did you ever find a solution without losing your data?
Click to expand...
Click to collapse
CoCoGirl886 said:
You deleted the lockscreen keys from the OP right? If so, I don't think an OTG adapter would help. Because once you deleted the password then it will default to TWRP's password but it doesn't exist? However, if you never deleted the keys and can access TWRP's screen to enter your password then you should be able to decrypt and extract your backup. I had a pattern password and you can use the mouse connected to OTG cable to draw your pattern to unlock.
I'm actually having the same touchscreen issue on my device again... but the screen would randomly work. So I am waiting for it to start working before I reflash.
Click to expand...
Click to collapse
So, TWRP asking password because our Device is encrypted but when i erase the internal storage and decrypt the device then problem got solved because encryption is a culprit here.

can you fully encrypt a Samsung galaxy A5 2017 like you can encrypt a computer?

I am extremely paranoid (just my personality) and am wondering can I do a full device encryption like you can on pc? If so to what extent and how hard would it be to break? I looked into the built in encryption but its bypassable on to many devices. Also is it possible to have it that a password needs to be entered on the device when it's plugged into computer to allow MTP transfer (another password besides lock screen)
elderwolf123 said:
I am extremely paranoid (just my personality) and am wondering can I do a full device encryption like you can on pc? If so to what extent and how hard would it be to break? I looked into the built in encryption but its bypassable on to many devices. Also is it possible to have it that a password needs to be entered on the device when it's plugged into computer to allow MTP transfer (another password besides lock screen)
Click to expand...
Click to collapse
You could encrypt the sd card if you had one.
Sent from my SM-A520W using XDA Labs
iloveoreos said:
You could encrypt the sd card if you had one.
Click to expand...
Click to collapse
I know that but that isn't much and not really what I'm going for, yes SD encryption is something I want along with full encryption so at boot time a password is needed like you can do on windows
elderwolf123 said:
I know that but that isn't much and not really what I'm going for, yes SD encryption is something I want along with full encryption so at boot time a password is needed like you can do on windows
Click to expand...
Click to collapse
There's a setting called secure startup which requires a password at boot. I suppose that would do the same?
Sent from my SM-A520W using XDA Labs

Question Broken encryption after deleting lockscreen from TWRP

Hello, I have a little f3 running miui 14 based on Android 13 I forgot my lock pattern I tried to solve it by deleting the lockscreen file from twrp it already removed the screen lock but when I enter the device it leaves me locked, that is, when I try to open an application I get locked indicates a sign that says wait until the device is completely rebooted before opening applications failure caused by this action that I did from twrp . when accessing the security section Where it is encrypted and credentials it appears to me as encrypted and when I touch it it does nothing .I know that the solution is to make a full flash but the photos that I have inside the phone are extremely important and I don't have backup copies of them almost 30 gigabytes of family photos so I ask for any help or explanation that can help me I have advanced knowledge in this field but had never experimented with the security of Andorid 13 from Miui. logically I tried to connect it to the PC in mtp mode but it does not show me any device driver problem it is not only that the Data partition is encrypted from twrp it asks me for a password
Skyfall191299 said:
I tried to solve it by deleting the lockscreen file from twrp it already removed the screen lock
Click to expand...
Click to collapse
You have access on /data through TWRP. Problem solved.
@Skyfall191299 please don't ask off-topic. you have deleted locksettings.db which contains the necessary link to synthetic password. Either restore the backup of locksettings.db and remember your pattern, or factory reset device. there is no way to decrypt userdata without pattern, not even in TWRP*
WoKoschekk said:
You have access on /data through TWRP. Problem solved.
Click to expand...
Click to collapse
* only for some recent insecure MIUI ROMs with FBE or older ROMs with no FBE encryption at all.
alecxs said:
only for some recent insecure MIUI ROMs with FBE or older ROMs with no FBE encryption at all.
Click to expand...
Click to collapse
He deleted /data/system/locksettings.db! With an encrypted device it's impossible to find and delete that single file on /data.
but how he deleted without knowing the pattern?
alecxs said:
but how he deleted without knowing the pattern?
Click to expand...
Click to collapse
don't ask me... ask @Skyfall191299
WoKoschekk said:
You have access on /data through TWRP. Problem solved.
Click to expand...
Click to collapse
I mean the personal data of the mobile, not the /data path, when I enter /storage (where the user's folders are stored) nothing appears
Skyfall191299 said:
not the /data path, when I enter /storage (where the user's folders are stored) nothing appears
Click to expand...
Click to collapse
Everything you stored or installed since last factory reset is stored on /data. Everything. Your /storage/emulated/0 path isn't mounted in TWRP but you have /sdcard instead. But both of those paths are only tmpfs that lead to /data/media. That's exactly that path that TWRP does not backup. It's your internal storage.
Skyfall191299 said:
Hello, I have a little f3 running miui 14 based on Android 13 I forgot my lock pattern I tried to solve it by deleting the lockscreen file from twrp it already removed the screen lock but when I enter the device it leaves me locked, that is, when I try to open an application I get locked indicates a sign that says wait until the device is completely rebooted before opening applications failure caused by this action that I did from twrp . when accessing the security section Where it is encrypted and credentials it appears to me as encrypted and when I touch it it does nothing .I know that the solution is to make a full flash but the photos that I have inside the phone are extremely important and I don't have backup copies of them almost 30 gigabytes of family photos so I ask for any help or explanation that can help me I have advanced knowledge in this field but had never experimented with the security of Andorid 13 from Miui. logically I tried to connect it to the PC in mtp mode but it does not show me any device driver problem it is not only that the Data partition is encrypted from twrp it asks me for a password
Click to expand...
Click to collapse
CC: @WoKoschekk
@Skyfall191299 In order to declutter the following thread on advice of my esteemed team mate @alecxs
[Deprecated] Universal DM-Verity, ForceEncrypt, Disk Quota Disabler [11/2/2020]
Hi all! For the past couple of months, I've been looking into making a more universal solution to disable dm-verity and forceencrypt. Needing to take different zips, modify them for different devices, and then cross your fingers when you switch...
forum.xda-developers.com
I've moved your above quoted post and other related posts out of that thread and create a new one for you in order to be able to discuss issue with broken encryption after deleting lockscreen from TWRP.
Regards
Oswald Boelcke
Senior Moderator

Categories

Resources