Unrecoverable wipe before selling - Android Q&A, Help & Troubleshooting

I've done some search here. Most of the relevant ones are 5 years ago. A similar one was talking about FRP, and another one got no reply. So I think I might start a new one.
This is about wipe my phone and give/sell it, so the later users won't get my data. I wonder:
1. I head it's generally impossible to avoid others to recovery the data (unless maybe a long time format?). The closest one is to wipe -> fill up -> wipe -> ... I wonder if we fill up all the capacity in the first time, shouldn't all the previous data be overwritten, why repeating so many times (and still there's a chance to recover data?)
2. My phone has encrypted data partition, which is said to be safer (the lock screen won't be hacked or something?). If encrypted data is really this safe (and fast), maybe we can just encryp the data partition first and then wipe it. I know there must be something wrong, which I'm missing.
Sorry for my English, and maybe the encrypted data partition is not so related to this topic.
I was thinking just ask some one to make a usb flash from the internal memory. Reselling phone is more like protecting the environment, because most of my phones are old. Maybe the buyers would just break it and sell its components, so just ask for making a usb flash maybe.

Related

JTAG?

There's a guy over at the official Motorola support forum with a sad problem that really could have bitten any of us at some point... he naively saved everything to the internal flash, then his phone got messed up and can no longer boot into Android. Motorola told him he has to do a factory reset, which will reformat everything, including /sdcard and the data in it (hmmm. Will it really? That does seem kind of harsh & extreme, but I can see them doing it.)
I *know* he could almost certainly pull the data off with a little help from a JTAG programmer (if only because he could probably use it to write something like Clockworkmod onto the phone, then boot into it and use THAT to copy /sdcard to an external card's /sdcard-ext), but the Photon seems to be hardcore virgin JTAG territory. I haven't even been able to find so much as a commented teardown pic with an arrow saying, "These are the JTAG testpoints", let alone something like a RIFF box with official support for the Photon. Does anybody have any ideas?
Is this the english language? I don't understand any of that lol. I have a buddy who jtags xbox's but thats it lol. Im limited to cooking roms and compiling from source. No experience to help you but ill be following this thread to learn a thing or 2.
Can you link us to the thread on the official forums?
From what you have told us, I can't figure out much. Is the phone not booting? Or is it hanging at the bootloader? Or is it stuck a the boot animation? Or is it crashing after loading the homescreen?
Basically, how much of the phone is still functional?
If the phone can still get to bootloader, put it in RSD mode. Then run RSD Lite with the same SBF version as the one thats on his phone. This will reflash the system.img, recovery, bootloader, etc, but should allow him to keep his apps and settings.
Oh, and the I believe the lesson learned here is to use Titanium Backup to backup everything on the SD card (the real sd card, not the fake internal one). TB backups everything short of the ROM and recovery/bootloader (you need a NANDroid for that). It will get his contacts, apps, data, wifi points etc.
I have flashed sbf and reset through the privacy menu. It will not clear the internal storage. There is a separate option to clear it. Not sure if they want him to clear it a different way.
Sent from my MB855 using XDA App
Here's the relevant thread, in case anybody can put him in touch with somebody who has the equipment and expertise to do the job: https://supportforums.motorola.com/thread/59942
According to my research, the Photon 4G uses a MDM6600 (according to posts in various forums). You can find the data sheet for that chip by Googling "80-Vr001-1" (I can't post links yet). It has some JTAG info in it.
If I'm not mistaken, I think the early iPhone unlocks were found by locating the JTAG pins on the radio chip, then following the circuit on the phone's PCB to find where to solder in to.
Wow
I have JTAG routers and those are easy, but a phone is much smaller in size.
All I can say is good luck -
did anyone find the correct jtag points for the board?

Encryption and ROM-Upgrades

How am I able to properly upgrade a ROM if the phone is encrypted? Or would I always have to save all data to an external drive, reformat my SD-Card and do a completely fresh install? Recommended HowTo's?
If people with encrypted phones read this, I'd like to know about your experiences: Do you feel safer with an encrypted phone? Ever lost one or had difficulties with the encryption preventing getting back into your phone?
SecUpwN said:
How am I able to properly upgrade a ROM if the phone is encrypted? Or would I always have to save all data to an external drive, reformat my SD-Card and do a completely fresh install? Recommended HowTo's?
If people with encrypted phones read this, I'd like to know about your experiences: Do you feel safer with an encrypted phone? Ever lost one or had difficulties with the encryption preventing getting back into your phone?
Click to expand...
Click to collapse
Ok, so got the phone to start encrypting itself... it's still not done after 10 hours (leads me to believe that it's broken in DT 0.2.0). As best as I could find the phone only encrypts the data partition, which pretty much means that you should be able to update the rom with no probs (just updating the same rom should work fine with the same data; and changing roms requires a datawipe anyway) or at least that's how i understand it.
as far as security goes the only means (that i know of and have tried) past a standard lockscreen is through adb (or the "i forgot my password" method which requires you to log into your google account) so in this respect encryption would be an improvement.
as far as getting into the phone goes, a factory wipe should eliminate that problem (along with your data )
dessolator666 said:
As best as I could find the phone only encrypts the data partition, which pretty much means that you should be able to update the rom with no probs (just updating the same rom should work fine with the same data; and changing roms requires a datawipe anyway) or at least that's how i understand it.
Click to expand...
Click to collapse
Thanks for testing. If the phone is fully encrypted and the SD-Card is taken out, is it still encrypted? I've read of a case where thieves tried to get into the phone and they couldn't because it was fully encrypted - can someone confirm or deny this information, please?

[Q] Questions About: Encryption + Backups

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...

[Q] Full and secure wipe -> no way to get data back ?

Hi everyone,
I am about to sell my old galaxy S3, and I would like to completly wipe it:
I have already read tons of topic, i don't want to:
- manually delete files
- wipe from recovery
- format from the setting menu
etc.. I have already done these steps before and i am not satisfied:crying:, i would like the next owner to not be able to find any file on my phone with softwares such as getDataBack or DiskDigger...
I read on xda that the only way to "erase" a file is to replace it.. so if i fill my phone with many useless files I may not be able to recover any file anymore..?
but that's why i poste here.. i would like to know if there is a software which can do this by itself ? or if there are other methods...
thanks a lot for your help
cheers
anyone ?
Here's a tutorial I found online!
Step one: Encrypting
I recommend encrypting your device before you are getting ready to wipe it. The encryption process will scramble the data on your device and, even if the wipe doesn't fully delete the data, a special key will be required to unscramble it.
To encrypt your device on stock Android, enter settings, click on Security, and select Encrypt phone. The feature may be located under different options on other devices.
Step two: Perform a factory reset
The next thing you will want to do is perform a factory reset. This can be done on stock Android by selecting Factory data reset in the Backup & reset option in the settings menu. You should be aware that this will erase all of the data on your phone and that you should backup anything you don't want to lose.
Step three: Load dummy data
Following step one and two should be enough for most people, but there's an extra step you can take to add another layer of protection when erasing your personal data. Try loading fake photos and contacts on your device. Why you ask? We will address that in the next step.
Step four: Perform another factory reset
You should now perform another factory reset, thus erasing the dummy content you loaded onto the device. This will make it even harder for someone to locate your data because it will be buried below the dummy content.
Still feeling a little paranoid? Repeat steps three and four as many times as you like. As I mentioned above, though, for most people simply following steps one and two should be enough. Without the encryption pin, which is overwritten in the initial factory reset, it will be almost impossible to unscramble your data.
Step five: Try using data recovery software to see if you succeeded in completely wiping your original data!
Then again, you could always take a hammer to your phone or toss it in the toilet. You know, if you aren't interested in selling it.
Hello, thank you very much for those explanations !
I will do all these steps and check if backup softwares find something

Data recovery

A family friend has given me his Xperia Z5C (running 7.1.1.) as he's accidentally deleted some photos and wanted me to take a look at recovery.
We all know that to get the necessary access the device needs to be rooted, but this also requires wiping the device. My question then is how secure is the wipe / erase when rooting, is it a full overwrite (in which case there's little point trying) or is there a chance that some data might be present at the block level after rooting?
I'm not inclined to go through the process of rooting if it's futile, but if there's a chance there may be some files still recoverable, he'd probably want me to try.
Thanks for your help.

Categories

Resources