I've recently been getting into more security cautious habits with encryption and what not, due to this whole NSA/Big-brother is watching business... But I have a question (more may pop up as this discussion goes on). Sorry if I seem noob-y, I am still getting a hang of all this encryption business. But here's my first round (regarding just the files being backed up):
If I go ahead and do a full phone encryption with my GN2 where will I stand as far as backups to Dropbox/Copy/Google Drive/etc.?
I currently have photos and such backing up to copy, and I often move backups made through recovery to Dropbox and such. If I were to have photos automatically sync to copy or move system backups to dropbox wouldn't that render them basically useless as I am assuming they move out of the phone encrypted (not being decrypted as they exit).
The photos would be unusable anywhere besides my phone right? So moving them off my phone to share vacation photos for instance would be impossible, and if my phone were to crash they'd be irretrievable? Making the backup process pointless.
Wouldn't the back up be rendered useless as well, exactly when I might need said backup? If my phone were to ever crash or die for some reason, I would lose the encryption key, would even be able to do a full system restore through the recovery? It would seem that the encryption key wouldn't be kept with those back up files, so while it might place everything back in its correct place, it would still be unreadable. Or does it maybe keep the key in system files somewhere so that a full backup would restore the key as well?
And my second round of questions (regarding recoveries and what not):
I am also under the impression that I would not be able to flash through custom recovery either as the internal SD would be inaccessible from the recovery being it doesn't have the encryption key. I am currently running OmniROM and it is in a nightly stage still for my phone. I wouldn't be able to update nightly would I? I am assuming since it basically flashes/overwrites system each time, that I would be losing my encryption key and making everything besides system unusable then right?
And what about downloading ROMs to flash/update directly to my phone? As I download them from in browser or another app and they go to the default /downloads folder they would be encrypted. They wouldn't be accessible from there in recovery, but if I were to try and move them out of internal SD to the external SD they would retain encryption and still be inaccessible? So the only way to download ROMs and updates would be from PC and only move them to the external SD?
Overall, this seems to be crippling a lot of the way I use my phone...
Bump?
Sorry, this is already getting buried and I kinda want to know what's going on before I go ahead and do this...
Zombtastic said:
I've recently been getting into more security cautious habits with encryption and what not, due to this whole NSA/Big-brother is watching business... But I have a question (more may pop up as this discussion goes on). Sorry if I seem noob-y, I am still getting a hang of all this encryption business. But here's my first round (regarding just the files being backed up):
If I go ahead and do a full phone encryption with my GN2 where will I stand as far as backups to Dropbox/Copy/Google Drive/etc.?
Click to expand...
Click to collapse
I'm not (yet) an expert on this, but when you've encrypted your device, it encrypts the file system on your internal memory and SD card. You have to enter a PIN/password when you turn on your device (and when it times out) to gain access. When the correct PIN is entered at boot time, the file system is available as normal - the underlying data is still encrypted, but the file system can unencrypt it in "real time" for use by apps and the system.
So that means that Dropbox et al all see your files as normal, and any copying you do from your device to something on the net (Drive, Dropbox, a server, etc.) works as normal - the data appears normal to the apps and is copied as normal. So photos would copy across as photos, music as music, etc.
Think of it like this: You can't speak Urdu, only English. There is a book you own that is written in Urdu that you want to tell someone about. You find a translator to read the book and tell you what it says. He reads the first page in Urdu, translates it in his head to English, and tells you what it says. You then tell your friend what it says (in English, of course). Your friend writes down what you told him, in English, then tells you something in reply. You tell your Urdu translator what your friend said (again, in English). Your Urdu translator then translates (in his head) what you said from English to Urdu, and writes it down in the book in Urdu.
At no time do you understand Urdu, nor does your friend. Your friend doesn't even know the book is written in Urdu and doesn't care. He never sees it or accesses it directly. If anyone ever steals your book, they can't read it unless they can read Urdu. The book is only useful to you and your friends if you have an Urdu translator sitting there in the loop. (the analogy is imperfect and incomplete but you get the idea).
So, getting back to your phone, if you have it encrypted, the underlying file system deals with translating things on the fly if you've given it the correct password at boot and login time. No apps ever know about the encryption - they just see data as normal (unencrypted). So any app that wants to copy a photo to Dropbox just sees a normal photo - it never sees the underlying encrypted data. But if you don't enter the correct password at boot time, the phone can't boot, and anyone trying to access the data on the phone won't be able to read it unless they know the password.
Does that help or confuse?
Zombtastic said:
I currently have photos and such backing up to copy, and I often move backups made through recovery to Dropbox and such. If I were to have photos automatically sync to copy or move system backups to Dropbox wouldn't that render them basically useless as I am assuming they move out of the phone encrypted (not being decrypted as they exit).
Click to expand...
Click to collapse
Hmm, this does my head in a bit but lets untangle it:
- you boot into Recovery. The Recovery you're using (obviously) understands encrypted file systems (some versions of CWM do, some versions of TWRM don't for instance - see near the end of this post for a bit more on this). So when you boot into Recovery and enter your PIN/password, it can then read your file system. You can then do a Recovery-based backup of your file system (or individual files, though I'm not aware that you can do this). The backup it creates is written to the encrypted file system and thus encrypted with the same encryption keys used for everything else.
- You boot the phone back up as normal and enter your PIN/password, and start up Android. You then use Dropbox to copy the Recovery backup files to the cloud. So the question is, "Are these files encrypted?" and I think the answer is, "No". Why? Read the rest of this post and hopefully you'll work out the same conclusion. But I'm pretty sure that the data that ends up on the Cloud is not encrypted.
One general comment worth pointing out as an aside (sorry, this paragraph isn't really related to the above but I wanted to point this out somewhere and its still useful) is that each time you encrypt your phone, it creates a unique encryption key - even if you give it the same PIN/password to use. So if you're forced to rebuild/reflash/wipe your phone in the future, it won't be able to access any data that is still on there (in internal or SD memory) since it won't know the previous encryption key. So you'll have to wipe all data and start again. And at that point, if you choose to encrypt your fresh, newly initialized phone, it will have a new, unique encryption key that won't work on any encrypted data from previous. So if for instance, you plug in an SD card that was encrypted on your phone in an earlier ROM, it won't be readable even if you know the correct PIN/password, since your phone will be using a different underlying unique key.
Zombtastic said:
The photos would be unusable anywhere besides my phone right? So moving them off my phone to share vacation photos for instance would be impossible, and if my phone were to crash they'd be irretrievable? Making the backup process pointless.
Click to expand...
Click to collapse
So, if you're following this, you'll now understand that moving your photos off your phone could be done two ways:
- while you're using the phone as normal (ie. you've booted it, entered your PIN/password, and copying your photos to Dropbox via an app while you're logged on. If you do it this way, you're simply copying photos as normal that can be viewed as normal in Dropbox.
- by copying backups generated while in Recovery. But Recovery will be firstly mounting the encrypted file system successfully (if you gave it the right PIN/password and your version of Recovery supports encryption), which means it can read your photos as normal files, then backs them up into its own normal Recovery file/folder structure and writes them to your encrypted file system, so the underlying data is encrypted unbeknownst to Recovery. Then when you boot up your phone and log in successfully to Android, you can access that data as normal (and unencrypted). So when you then copy it to Dropbox, all you're copying is normal Recovery-created backup files. The copied data won't be encrypted (unless Recovery encrypts them itself, independently, which I don't think it does). So you could copy this data to anybody's phone, so long as they were using a compatible Recovery version and probably compatible ROM.
Zombtastic said:
Wouldn't the back up be rendered useless as well, exactly when I might need said backup? If my phone were to ever crash or die for some reason, I would lose the encryption key, would even be able to do a full system restore through the recovery? It would seem that the encryption key wouldn't be kept with those back up files, so while it might place everything back in its correct place, it would still be unreadable. Or does it maybe keep the key in system files somewhere so that a full backup would restore the key as well?
Click to expand...
Click to collapse
I'm not 100% sure on this, but I think your logic is correct. The backup would be useless if the phone loses the encryption key, which it would do if you re-initialized your phone and/or did a new encryption. So you can only recover your backed up data if you haven't done either of those things. A solution to this is to use backup software that runs on your phone (Titanium Backup) that gives you the option to encrypt your data. Some caveats to this approach should be obvious:
- you firstly need to decide if you trust your backup software's encryption
- you need to use a strong password and be able to recall it months/years from now when you go to restore your data
- you need to copy your backups off your phone (such as onto your SD card, cloud, dropbox, etc.) in case you lose your phone.
Zombtastic said:
And my second round of questions (regarding recoveries and what not):
I am also under the impression that I would not be able to flash through custom recovery either as the internal SD would be inaccessible from the recovery being it doesn't have the encryption key. I am currently running OmniROM and it is in a nightly stage still for my phone. I wouldn't be able to update nightly would I? I am assuming since it basically flashes/overwrites system each time, that I would be losing my encryption key and making everything besides system unusable then right?
Click to expand...
Click to collapse
Tricky - if you flash/update your phone with a new ROM, you will probably be OK so long as you haven't wiped the part of your phone's storage that holds the encryption information. I don't know where this is. But the nightly updates I do to my phone don't normally touch my data - all my apps are still there and it boots identically to the way it did before I updated it. HOWEVER, its possible that an update may force me to wipe my phone for some reason - the update may fail, it may contain significant changes, or I might screw something up. I probably end up completely wiping my phone at least once every 2 months just because I like to play with the latest and greatest ROMs, or I screw something up. So if that happens, I'm going to lose the encryption information and thus would lose everything on the phone.
Of course, I can always restore my apps and data via Titanium Backup, since I back up my stuff quite often and then copy it to Dropbox.
Zombtastic said:
And what about downloading ROMs to flash/update directly to my phone? As I download them from in browser or another app and they go to the default /downloads folder they would be encrypted. They wouldn't be accessible from there in recovery, but if I were to try and move them out of internal SD to the external SD they would retain encryption and still be inaccessible? So the only way to download ROMs and updates would be from PC and only move them to the external SD?
Click to expand...
Click to collapse
Hmmm - good question. A simpler question is, "Is my encrypted file system accessible while in Recovery?" I believe the answer is, "Yes, if you use CWM, No if you use TWRM". But I say that because from what I've been reading, some versions of CWM/TWRM can/can't handle encrypted devices. But you'll already have sorted this out at the time you're trying to encrypt your device anyway since the encryption process involves rebooting your phone into recovery I believe - and if you're not using the correct supported Recovery, this step will fail. But if you are using a supported recovery, this step will work, and therefore logically I'd assume that you can access your encrypted file system while in Recovery in the future. I'd imagine Recovery would prompt you for your PIN/password in order to mount the encrypted file system.
So assuming the above is correct, you would be able to access the newly-downloaded ROMs while in Recovery and thus can flash them. But of course, Caveat Emptor with flashing the new ROM - if it forces you to wipe anything, you may end up unable to access any of the data.
Zombtastic said:
Overall, this seems to be crippling a lot of the way I use my phone...
Click to expand...
Click to collapse
From what I've been researching, you won't have a problem anyway, because I haven't come across anyone that has successfully encrypted their phone using a custom ROM. Strangely, this ability seems to be unwanted by XDA people. My tinfoil hat tells me that there are people ensuring that this ability continues to not work on custom ROMs until/unless a backdoor capability is found. Hopefully I'm wrong on many counts.
douginoz said:
From what I've been researching, you won't have a problem anyway, because I haven't come across anyone that has successfully encrypted their phone using a custom ROM. Strangely, this ability seems to be unwanted by XDA people. My tinfoil hat tells me that there are people ensuring that this ability continues to not work on custom ROMs until/unless a backdoor capability is found. Hopefully I'm wrong on many counts.
Click to expand...
Click to collapse
Amazing post by the way! It does seem very helpful.
BUT it's very funny you mention it not working. Because that's exactly what happened. After not getting a response here or in the ROM's forum for a few days, I decided to just take the plunge and do it. I was just planning on testing everything out my self and figuring it out as I went. The first time it seemed fine, the encryption went through it seemed.
Being as I didn't know any of the info you just enlightened me with, I did fear that nothing was truly encrypted though. Everything was transferring to my computer with a drag and drop and working fine, so I was afraid (without evidence) that nothing was truly encrypted. I asked on the ROM's forum again (still waiting for an answer).
That night, my phone was left plugged in charging, yet some how had turned off in the night. I awake to my phone asking for an encryption key. I enter my key in to no avail. Nothing works and my phone is left unable to boot. It was utterly denying my password. I had to reflash. I asked about that in the forums as well, whether that was normal or if encryption was maybe not implemented yet, etc. The dev running the nightlies for my device has responded to the forum multiple times but not to me. Another user mentioned it might be that it is now merged together as a Galaxy Note 2 ROM and not specifically a T-mobile Galaxy Note 2 ROM (might be possible. Idk.).
Now, I have tried to re-encrypt. Multiple times. But I cannot for the life of me get it to even start now. Every time I go to start the encryption process it shows me the fullscreen image of the android unzipped horizontally (at which point it is supposed to reboot and start encrypting) and it hangs/sits there forever. Not rebooting, not anything. If I hit the back button, the image disappears and it goes back to my phone. Working perfectly fine, like it never even started doing anything. I am not doing anything differently. I don't know what could be happening to stop it from even getting as far as it did last time. Unless the devs maybe started working on it and have disabled it for the time being/screwed it up worse, I dunno.
Not you got me crafting a tin-foil hat...
Hi there,
I've got a tiny problem with my One Max. It's updated to latest OTA and not rooted/unlocked.
I usually use my fingerprint to unlock it and I forgot the pattern to unlock it manually. As you can imagine, I wrongly tried to unlock it with my fingerprint 4 times, so it's asking for pattern unlock. I've tried two patterns I usually use and it didn't work, now I'm panicking and have tried countless other combinations I might've used.
What can I do, other than trying to find a right pattern?
I have no way to access my SMS storage and no backup to speak of, so formatting the phone is not an option.
EDIT:
I have seen this topic:
http://forum.xda-developers.com/htc-one-max/help/help-please-t2879590
And it does not include any viable options. What I need is _at least_ to install some kind of app from google play that will backup all my data to google drive so I can safely factory reset the phone.
I have active data connection, sync and wifi, so now I'm struggling to find an option to import/export SMS in pushbullet.
EDIT:
I seen this article:
http://trendblog.net/how-to-bypass-android-phone-lock-screen-pattern-pin-password/
most of the options are not available in lollipop, but there was one that mentioned flashing custom zip (and had direct link to file from XDA forums atachment) - so two more questions: one - can I root the phone without unlocking it and two - can such zip be applied to lollipop one max?
EDIT:
After careful investigation in the net I came to conclusion that I will have to factory reset the phone. The only thing stopping me is my sms archive and whatsapp history.
Can anybody tell me what does HTC Backup actualy backup and if there's any application I can push from the market that will allow me to backup (and possibly restore later) that data without touching the phone?
@skybleu
If you were rooted you could always try deleting the HTCLockScreen.apk or renaming it to .apk.bak
But in this case seems like you will have to factory reset.. HTC Backup will backup your messages and keeps a list of apps installed on your phone so if you were to restore it would download the list of apps that it had installed at the time of the backup.
Flyhalf205 said:
If you were rooted you could always try deleting the HTCLockScreen.apk or renaming it to .apk.bak
But in this case seems like you will have to factory reset..
Click to expand...
Click to collapse
It's not that bad, I have access to internal storage via airdroid, so at least whatsapp archive and my photos will survive.
I'm worried about SMS though.
Say, about the idea - one, should it be possible even? I'd assume this would lead to crash, instead of unlocking.
Also, is there any option to root the phone without unlocking it? gold sd card, push exploit, sth?
Hello everyone,
I need your help. Sorry for the long post.
I have a OnePlus One. It was running on CM 13.0 (Android 6.0.1). I had TWRP and MultiROM installed.
I have had an issue where whenever I flash a zip file in TWRP, the phone will show an error after installing the zip: "Unable to mount storage". This appeared in red color on the screen right after showing the progress of the zip installation. The phone worked fine and all the flashed zips worked great as well. However, the error that appeared every single time when I flash a zip file bothered me. So I tried to fix it. (I know, if it's not broken don't fix it, but sadly I tired).
I followed this video to get rid of the error => (https://www.youtube.com/watch?v=X7yDPszoQ5s). However, instead of getting rid of the error, I ended up with a huge problem. My phone couldn't recognize the data in the internal storage. It showed that the internal storage was empty. When I tired to reboot in TWRP, It said: "No OS installed are you sure you wish to reboot". I realized that the video I followed was for a different problem and that I ended up with the same issue the video was trying to fix! I tried every single option the video suggested to fix the problem and nothing helped.
I connected my phone to my laptop and downloaded the latest CyanogenMod zip for my phone and I flashed it. when I rebooted my phone I got a screen that asked for my password. I typed a random password (I discovered later that the phone will accept any password and say it's correct). I got the following error: "Decryption Unsuccessful... The password you entered is correct, but unfortunately your data is corrupt... To resume using your phone, you need to perform a factory reset. When you set up your phone after the reset, you'll have an opportunity to restore any data that was backed up to your google account...Then the only thing I can select is "reset phone." ". I pressed the reset button on the screen, the phone rebooted and showed the same error. Then I tired flashing PAC ROM and I got the same error again. Then I flashed OmniROM and the phone worked! It didn't show the error.
I have a Titanium backup for all my apps and I also have a nandroid backup for my previous ROM (in my memory stick using an OTG cable). However, I don't have any backups for my internal storage (photos, videos, documents... etc). I am guessing that these files are still in my internal storage. I didn't copy any new files to my phone because I think if I do, then the phone will keep replacing my old files (that I can't see) with the new ones.
My question is: Is there a way to get back these old photos and videos from the internal storage? Note that I didn't delete these files, but the phone can't read them. Also, I checked the nandroid backup that I have and the file system type of the previous ROM was EXT4. My current file system type is the same, EXT4.
Thank you for the help!
I have a oneplus 5 with android 7.1.1
i deleted the files ''gatekeeper.password.db'' and ''lock.settings.db'' if i remember well. funny thing is that i didn't want to delete those files, it was an accident. but anyways... The problem is that not i only deleted these files that were located in the system folder, i also deleted ''gatekeeper.password.db'' files from my user folder, named ''0''.
and i f**ked it up doing this. now whenever i unlock my phone, (which btw does not have any pin or pass after deleting those files), it goes completely black. i can't setup a new password, i can't see any apps. nothing. i tried to, at least, recover the data, but even allowing android on windows and using fonedog, it does not work at all.
last thing i tried is making a cache wipe through TWRP. this only worsened the situation as now when i unlock, not only goes black, it also makes the upper tab dissapear, leaving me without more options than rebooting or shutting off.
i really, really need to extract all my data from the internal storage. i don't mind doing a factory reset after it.
Hey Every One
I have a Galaxy A 21s on wich I broke the Screen.
Now a few Yeas later I replaced the LCD but forgot my Password.
-Usb Debuging is Disabled.
-No Custom ROM installed, so i cant delete the Password File.
-oem Unlock is alsoe disabled.
-Find my Phone is deactivated and Google recovery also.
I have now tried a lot of ways to get to my Data but nothing worked so far.
My last resorts are trying to get a full Backup of the Phone and use it in an Android Emulator to Brutforce my Passcode.
or install Custom Recovery, restor my Backup and delete the Password File or get in with adb.
Hence my question woud it be possible to Make a Complet Backup, wit example Odin and use it in an Emulator or restore it on a Rooted Phone?
If any one knows further ways of getting back my Data im open to try things out.
Thanks for the Help.
Edit: I found that i could use adb Sideload to install Apps from stock Recovery. The only Problem i woud need to spoof the signature of the .zip im trying to instal, maybe any one knows a way wit that method?
If you can't access it you can't copy anything.
A data recovery specialist that works with Samsung's might be able to.
I never set a lock on mobile phones or PC bios because you are the one most likely to get locked out! Security is physical, one will pay with blood for trying to steal my phone.
I redundantly back up all critical data often and keep backups in separate locations. Never encrypt backup drives. Hdds are best, flash for quick "dirty" backups. I use my 1tb SD card as a data drive then back that up. Also use two .5th OTG flashsticks.
Phone is always cased. Don't put yourself in the predicament again. Think it through and tie up the loose ends before they trip you. I've lost entire, irreplaceable databases before, not fun.
There's no such thing as overkill when it comes to backing up critical data. Digital data is otherwise very fragile.
Hi, I am in the same situation as you. I forgot the pattern but I really need to recover some data before restoring the phone. With the stock recovery were you able to remove any protection via adb sideload? Thanks