[Q] What stops us from dual-booting any device? - Android Q&A, Help & Troubleshooting

I was thinking about this earlier. I have three ROMs I shuffle via nandroid backup/restore (why? Because I'm a little crazy and kinda drift between them, and because I can), and I was reading a beginner's primer on Linux, where they said everything is a file. Your system partition is just a file (folder), data is just a file (folder) and so on. Meanwhile, I spent 3-7 minutes backing up or restoring GB or JB ROMs. Back one up, restore another, then delete the one I restored... Why not have a bootloader that lets you choose which ROM, and then rename the directories accordingly? That is, I'd have a System.motoblur folder, a System.CM7 folder, and a System.AOKP folder, and upon boot, it would drop the period and everything after, and then reboot (and ditto for data and cache).
Is there a good reason why something like this wouldn't work? You might say lack of demand, and I would be inclined to agree, but if you limited the idea to just "data", then you'd have a user switcher, and it would work with Gingerbread and prior (well, any device with an unlocked bootloader and internal memory to spare). Right? Or... no?

Dark Reality said:
I was thinking about this earlier. I have three ROMs I shuffle via nandroid backup/restore (why? Because I'm a little crazy and kinda drift between them, and because I can), and I was reading a beginner's primer on Linux, where they said everything is a file. Your system partition is just a file (folder), data is just a file (folder) and so on. Meanwhile, I spent 3-7 minutes backing up or restoring GB or JB ROMs. Back one up, restore another, then delete the one I restored... Why not have a bootloader that lets you choose which ROM, and then rename the directories accordingly? That is, I'd have a System.motoblur folder, a System.CM7 folder, and a System.AOKP folder, and upon boot, it would drop the period and everything after, and then reboot (and ditto for data and cache).
Is there a good reason why something like this wouldn't work? You might say lack of demand, and I would be inclined to agree, but if you limited the idea to just "data", then you'd have a user switcher, and it would work with Gingerbread and prior (well, any device with an unlocked bootloader and internal memory to spare). Right? Or... no?
Click to expand...
Click to collapse
there is Boot Manager/Boot Manager Pro on Play store. Not sure if your device is supported but I used to use it when I had the Desire HD and I was quad booting. however I do think that dual-booting is way overlooked.

Related

Trying to salvage some data from a nandroid that wont restore.

Ive been spending way to much time researching my problem and my wife is really mad at me. Basically at this point i would be happy to just manually extract data for about 10 apps from a nandroid that wont restore. Can someone point me in the right direction please?
Edit:
Ok, now that I am at computer, heres my story. Prior to flashing the gingerbread leak, I backed up using Titanium Backup and made a Nandroid backup. Somehow, all the files backed up in my PREVIOUS 2 backups on titanium backup where all 0kb-10kb, so they were completely borked for some reason. Some old backups of apps that I have since uninstalled still remained and those seem ok.
Prior to reading about the SD card failures with the gingerbread leak, I backed up my SD card to my computer. Only 1 error came up during the backup about a file with a name that was too long. I clicked on ignore and finished the backup. About 1 hour later my SD card fried.
I used a spare sd card, and transfered my clockwork mod folder and a few other folders to it. I then ODIN a DL09 stock image, flashed the newest Clockword mod 3.xx via odin, flashed UKB 2.0, then flashed PBJ -50 recovery/kernel (which was what I had when I made the backup) and tried to restore it. When I try to restore it hangs somewhere in the data restore portion saying CACHE. I saw it flash cache a few times during the restore, so I am not sure why it hangs on that one in particular. I know that the cache image file is only 16.5kb so I dont know if that has something to do with it.
I then installed the newest IMNUTS recovery since I heard there were problems restoring the the PBJ recovery, and it seems to hang in the same spot.
At this point, I have a few of my old programs back, but most force close.
My main goal here is to just extract some gamesave progress and a few other pieces of data (I can redownload basically all the apps I need), run clean until a better gingerbread leak comes along, then use titanium backup to backup what I have (and verify the backups and make backups of the backups )and install a better gingerbread rom.
So anyway, If i can figure out how to go into the datadata.img files, I guess I can extract the data I need and push it through ADB or ROOT EXPLORER? Should that work?
- nevermind...
There are computer applications that can read and explore image files, or .img files, and the file systems within image files. Your best bet would be software like that, that could open, edit, and explore image files. I dont know the names of any software like that, even though I have come across some before, but im sure you could turn up some results with the query "image file editor," or ".img file editor." From there you're just have to feel your way through.. Try similar queries if those don't turn up what you need, etc. If you got an app that could explore image files, then you could get your .apk files from /data/app folder, and any other data you might need from /data/data, if its just user apps you're wanting to restore.
Sent by way of unspeakably black magic.
ssmaster said:
Ive been spending way to much time researching my problem and my wife is really mad at me. Basically at this point i would be happy to just manually extract data for about 10 apps from a nandroid that wont restore. Can someone point me in the right direction please?
Edit:
Ok, now that I am at computer, heres my story. Prior to flashing the gingerbread leak, I backed up using Titanium Backup and made a Nandroid backup. Somehow, all the files backed up in my PREVIOUS 2 backups on titanium backup where all 0kb-10kb, so they were completely borked for some reason. Some old backups of apps that I have since uninstalled still remained and those seem ok.
Prior to reading about the SD card failures with the gingerbread leak, I backed up my SD card to my computer. Only 1 error came up during the backup about a file with a name that was too long. I clicked on ignore and finished the backup. About 1 hour later my SD card fried.
I used a spare sd card, and transfered my clockwork mod folder and a few other folders to it. I then ODIN a DL09 stock image, flashed the newest Clockword mod 3.xx via odin, flashed UKB 2.0, then flashed PBJ -50 recovery/kernel (which was what I had when I made the backup) and tried to restore it. When I try to restore it hangs somewhere in the data restore portion saying CACHE. I saw it flash cache a few times during the restore, so I am not sure why it hangs on that one in particular. I know that the cache image file is only 16.5kb so I dont know if that has something to do with it.
I then installed the newest IMNUTS recovery since I heard there were problems restoring the the PBJ recovery, and it seems to hang in the same spot.
At this point, I have a few of my old programs back, but most force close.
My main goal here is to just extract some gamesave progress and a few other pieces of data (I can redownload basically all the apps I need), run clean until a better gingerbread leak comes along, then use titanium backup to backup what I have (and verify the backups and make backups of the backups )and install a better gingerbread rom.
So anyway, If i can figure out how to go into the datadata.img files, I guess I can extract the data I need and push it through ADB or ROOT EXPLORER? Should that work?
Click to expand...
Click to collapse
unfortunately, you won't likely receive much sympathy posting a question in the development section. Please post your question in the Q & A section and you'll get some help. Just a friendly heads up.
Sent from my SCH-I500 using XDA Premium App
Well I'll go ahead and point you to the right direction, or what I'd imagine should work for your needs. You'll need unyaffs, I'm assuming you're on windows so this here would be the right one for you http://www.box.net/shared/1eighqsh4s. Now take the data.img from your clockwork backup on your sdcard, drag and drop it onto the unyaffs.exe, it should unpack right there into a crapload of files. Navigate to the /data folder and find the ones you want to keep (they should be listed by the package name for the apps, "com.blah.asfkje.etc" rather than the name of the app so keep that in mind when looking for what you want), then adb push (root explorer would be fine too) the folders into your phone where they should be.
Headcase8911 said:
unfortunately, you won't likely receive much sympathy posting a question in the development section. Please post your question in the Q & A section and you'll get some help. Just a friendly heads up.
Sent from my SCH-I500 using XDA Premium App
Click to expand...
Click to collapse
Sorry I posted this in the wrong forum, I was waiting for the train when I posted and wasn't thinking too straight. How can I move it?
ssmaster said:
Sorry I posted this in the wrong forum, I was waiting for the train when I posted and wasn't thinking too straight. How can I move it?
Click to expand...
Click to collapse
The mods will move it once they notice.
Another Fascinating post by my XDA app...
Just curious because of my personal interest...
Did you happen to try the nandroid Advanced Restore option, and select Data only? If not, it might be worth a shot. If it gets far enough, you might try wiping after the restore, and before booting up.
I always wipe my cache/Dalvik before I backup, to try to avoid conflicts with possible future ROMs. Something to think about, anyway.
Sorry about the trouble.
ssmaster said:
Sorry I posted this in the wrong forum, I was waiting for the train when I posted and wasn't thinking too straight. How can I move it?
Click to expand...
Click to collapse
Report your post stating that it should be moved, and the mods will notice right away.
Robtao said:
Just curious because of my personal interest...
Did you happen to try the nandroid Advanced Restore option, and select Data only? If not, it might be worth a shot. If it gets far enough, you might try wiping after the restore, and before booting up.
I always wipe my cache/Dalvik before I backup, to try to avoid conflicts with possible future ROMs. Something to think about, anyway.
Sorry about the trouble.
Click to expand...
Click to collapse
i did try the nandroid advanced data only option and it hung at what seemed to be the exact same point.

[Q] Does flashing stock rom back on replace the games?

I made a hash of rooting my phone after a number of posts said that backing up shouldn't be necessary (silly me). Once I had done the PG image flash I ended up with a version of Android that was missing all my games and the apps that I had previously installed. Data was still on the SD card but no sign of apks for the games. Not sure what other stuff might have been missing from 'out of the box' as it were but definitely Sims, NFS Shift and Spiderman 3D.
Before moving forward to try putting Leedroid on, I am considering trying to put one of the stock EU roms back over the top in the hope that it will give me access to the games, etc again so that I can do a backup and then try the whole rooting process all over again.
Could someone give me any idea of whether my games are gone forever or if I can salvage them somehow?
Your games and apps are gone. Before you flash any roms you really need to do a full wipe anyway so you're starting on a clean slate. A stock rom will have Spiderman in it though
We're comin from a pure power source.
-BA- said:
I made a hash of rooting my phone after a number of posts said that backing up shouldn't be necessary (silly me). Once I had done the PG image flash I ended up with a version of Android that was missing all my games and the apps that I had previously installed. Data was still on the SD card but no sign of apks for the games. Not sure what other stuff might have been missing from 'out of the box' as it were but definitely Sims, NFS Shift and Spiderman 3D.
Before moving forward to try putting Leedroid on, I am considering trying to put one of the stock EU roms back over the top in the hope that it will give me access to the games, etc again so that I can do a backup and then try the whole rooting process all over again.
Could someone give me any idea of whether my games are gone forever or if I can salvage them somehow?
Click to expand...
Click to collapse
Your game data (savegames) is likely gone for good. The game file might still be in your sd card. When I installed warm 2.3 I noticed a folder on my sd that has all those Sprint apps. I think some other roms might make a folder like that too. Just find the folder with a file explorer and install the app you want.
-BA- said:
I made a hash of rooting my phone after a number of posts said that backing up shouldn't be necessary (silly me). Once I had done the PG image flash I ended up with a version of Android that was missing all my games and the apps that I had previously installed. Data was still on the SD card but no sign of apks for the games. Not sure what other stuff might have been missing from 'out of the box' as it were but definitely Sims, NFS Shift and Spiderman 3D.
Before moving forward to try putting Leedroid on, I am considering trying to put one of the stock EU roms back over the top in the hope that it will give me access to the games, etc again so that I can do a backup and then try the whole rooting process all over again.
Could someone give me any idea of whether my games are gone forever or if I can salvage them somehow?
Click to expand...
Click to collapse
Short answer, if the apps were stored on the /data partition and the RUU erased the /data partition, they are probably gone forever.
Longer answer: To give a little technical background, there are specific partitions on most Android devices. The "data" partition is where many 3rd party apps are installed to, along with their settings and the Android OS settings.
A stock RUU will always erase the /data partition because as stock, the device comes with a blank data partition.
Some apps allow themselves to be installed to the sdcard. As such, these won't be erased when an RUU wipes the data partition. Some apps store their settings on the sdcard. These also won't be erased by an RUU.
Hope that helps fill in some of the gaps!
-BA- said:
I made a hash of rooting my phone after a number of posts said that backing up shouldn't be necessary (silly me). Once I had done the PG image flash I ended up with a version of Android that was missing all my games and the apps that I had previously installed. Data was still on the SD card but no sign of apks for the games. Not sure what other stuff might have been missing from 'out of the box' as it were but definitely Sims, NFS Shift and Spiderman 3D.
Click to expand...
Click to collapse
anything you bought from android market is linked to your google account not the phone so you can restore it after a wipe, after changing phone or even install them on multiple phones if they are registered to the same account.
just log on market.android.com, go to your library and force a reinstall for every piece of software you are missing.
things bought on other markets depend on the specific market policy, check with them.
as for those three games they comes with htc stock roms, I got them with an OTA update IIRCW so the only way to get them its if the rom compiler has included them (which I dont know if its legal, but lets not go there) or with a stock rom.
Really appreciate the replies guys. I have got my hands on the apks via a rom that was linked on the forums. I had hardly played them so losing save games isn't worry at all for me. Sadly I am not sure what else it might have wiped, I know I lost texts but I did have a backup .xml of those so only lost a few days worth.
The market is definitely confused because when I log onto android.market.com it shows all the ones I have downloaded but if I go into the market app on the phone it only shows the ones I have downloaded since the b0rked root.
No great loss though I think I am almost ready to shove a stock rom on and then restore the games later. Trying to decide between Leedroid and mikrunny's.

[Q] 'new' refurb did s-off, restoring AR backup fails?

recovery just says something is wrong, look at log?
I tried a few versions (of the backup sets), same error.
What am I doing wrong? How do I fix it? :crying:
Log from recovery run...
Starting recovery on Thu Aug 16 21:58:52 2012
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (720 x 1280)
RA Revamped
Build : RA-VIGOR-v3.15-getitnowmarketing
Command: "/sbin/recovery"
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=1
fuzzynco said:
recovery just says something is wrong, look at log?
Click to expand...
Click to collapse
This happens all the time to people.
You can't simply restore a backup from another device because then your new device will actually appear as your old device on Google and Verizons servers, which will cause all sorts of problems if Verizon were to ever successfully restore your old phone and try and send it off to someone else. To avoid this problem, the recovery won't even let you restore a backup from another phone, even if its the exact same hardware.
Go to play.google.com, go to view your devices in the settings section. You should see two Rezounds. One will have been activated in the past, and one whenever you first turned on your replacement after receiving it and logging in with your account. So the one that was activated in the past is clearly your original Rezound that you've returned. You can give it a name, like "DEAD REZOUND" so that you know by looking at the name which Rezound Google thinks you're using.
There is a workaround that will let you restore the backup anyway if you want to search for it, but I highly recommend you don't. If you do, you can then go to play.google.com again, view your existing devices in the settings section, and you'll see that Google thinks your new phone is the same one you just sent back to Verizon. It should show "DEAD REZOUND" as being registered again today (or whatever day you successfully restored a backup from your old phone)
To sum up: Don't restore a backup from another Rezound. You pretty much have to start over again.
I kind of follow... RA is an image backup
so it would duplicate the serial and device specific data.
I could do a TiBu of the user apps and data (and the
new xml files of the call log and sms's), though.
Use an app to export the calendar data to an
.ics (iCal file) and the phone book to a .vcf
for import on the 'new' phone.
Since Google added some 800+ empty
phone book entries and messed up my phone
book, I don't sync with it. I export the whole
thing to a vcf.
So the missing /dev/tty0 device file
error from the restore is just AR not
letting me shot myself in the foot,
right?
I'll need to install my ROM, then
restore the user apps and data
from TiBu then rebuild my 'desktop'?
Is it worth doing the RUU for ICS
to get there? The new phone was
offered the upgrade OTA, but I think
it was wiped by the unlock prior to
S-Off process. Would I flash
the ICS RUU, then flash the ICS/JB
hboot, to get fastboot commands,
then reflash recovery?
I have seperate micro cards for
the 600mb RUU zip and the
ICS firmware/radio/hboot(JB)
zip.
I'm thinking since I have to rebuild
the desktop anyway, maybe doing
the ICS RUU first is a good idea.
fuzzynco said:
so it would duplicate the serial and device specific data.
I could do a TiBu of the user apps and data (and the
new xml files of the call log and sms's), though.
Use an app to export the calendar data to an
.ics (iCal file) and the phone book to a .vcf
for import on the 'new' phone.
Since Google added some 800+ empty
phone book entries and messed up my phone
book, I don't sync with it. I export the whole
thing to a vcf.
So the missing /dev/tty0 device file
error from the restore is just AR not
letting me shot myself in the foot,
right?
I'll need to install my ROM, then
restore the user apps and data
from TiBu then rebuild my 'desktop'?
Is it worth doing the RUU for ICS
to get there? The new phone was
offered the upgrade OTA, but I think
it was wiped by the unlock prior to
S-Off process. Would I flash
the ICS RUU, then flash the ICS/JB
hboot, to get fastboot commands,
then reflash recovery?
I have seperate micro cards for
the 600mb RUU zip and the
ICS firmware/radio/hboot(JB)
zip.
I'm thinking since I have to rebuild
the desktop anyway, maybe doing
the ICS RUU first is a good idea.
Click to expand...
Click to collapse
In reply to the bolded part: Basically, yes. AR's nandroid places the backups in a folder with your phone's serial as the folder name. Attempting to restore any backup from a folder with any other name will fail to prevent the issues I mentioned above.
I do not and have not ever used Titanium Backup, so in regards to that, I can't be of any help.
If you have a linux machine, you can mount the data.img from any of your backups and then copy all the files from /data/app and data/data to your phone. This will restore most of your apps, and app data/settings. There will still be a few things you'll have to redo from scratch, and this may not work 100% for every app on your phone, but at least this way you don't have to redownload every single app and manually redo all your settings...
I did the RUU zip (it restarted itself, as expected), the firmware/radio/hboot(JB) zip
and then reflashed AR 3.15 from fastboot. Everything seems to be working now.
Do you know if the debloat script (freeze VZW apps) works for ICS OTA ROM?
fuzzynco said:
I did the RUU zip (it restarted itself, as expected), the firmware/radio/hboot(JB) zip
and then reflashed AR 3.15 from fastboot. Everything seems to be working now.
Do you know if the debloat script (freeze VZW apps) works for ICS OTA ROM?
Click to expand...
Click to collapse
not sure...
I couldn't get ViperROM 1.0.3 to not crash (com.android.phone kept crashing).
Trying a couple of others that are prerooted and deboated. So far the ICS &
Sense 3.6 looks fine. Still have the 'social network' stuff to freeze though,
Could I do something like make a zip (from adb shell) of the user apps
/data/app & /data/data directories (to preserve the unix permissions).
and leave that on fat32 sd card? Then merge that into the zip for the
rom to be installed so the installer will reload them?
Would I need to add lines to the installer script to have it load /data (with
the subdirs ../app and ../data)?
hmms maybe better to make a seperate zip to preinstall my saved
/data subdirs? Can I copy the ROMs installer binary and build
a installer script to mount /data, then install the /data directory,
umount /data?
a.mcdear said:
This happens all the time to people.
You can't simply restore a backup from another device because then your new device will actually appear as your old device on Google and Verizons servers, which will cause all sorts of problems if Verizon were to ever successfully restore your old phone and try and send it off to someone else. To avoid this problem, the recovery won't even let you restore a backup from another phone, even if its the exact same hardware.
Go to play.google.com, go to view your devices in the settings section. You should see two Rezounds. One will have been activated in the past, and one whenever you first turned on your replacement after receiving it and logging in with your account. So the one that was activated in the past is clearly your original Rezound that you've returned. You can give it a name, like "DEAD REZOUND" so that you know by looking at the name which Rezound Google thinks you're using.
There is a workaround that will let you restore the backup anyway if you want to search for it, but I highly recommend you don't. If you do, you can then go to play.google.com again, view your existing devices in the settings section, and you'll see that Google thinks your new phone is the same one you just sent back to Verizon. It should show "DEAD REZOUND" as being registered again today (or whatever day you successfully restored a backup from your old phone)
To sum up: Don't restore a backup from another Rezound. You pretty much have to start over again.
Click to expand...
Click to collapse
not really. im on my third rezound and i restored the same viper rom i had before.
this is what i did with AR
1. back up current rom
2. boot into rom
3. use root explorer and find the nandroids
4. noticed 2 folders in the same nanadroid folder ( light bulb)
5. move old back up to the location where the new one was.
6. boot into recovery and did a full wipe
7. restored old back up.
8 boot phone
9. BAM!
This app might work. I use it and it works great but I'm not sure if it restores data.
synisterwolf said:
not really. im on my third rezound and i restored the same viper rom i had before.
this is what i did with AR
1. back up current rom
2. boot into rom
3. use root explorer and find the nandroids
4. noticed 2 folders in the same nanadroid folder ( light bulb)
5. move old back up to the location where the new one was.
6. boot into recovery and did a full wipe
7. restored old back up.
8 boot phone
9. BAM!
Click to expand...
Click to collapse
Yeah this works perfectly fine, but can cause the new phone to register on the network as if it were the old one. It is perfectly possible to restore a backup from another phone, and it works fine... its just a bad idea because if your old phone is ever "recovered" and turned back on, VZW might see two identical devices on the network, which will cause problems in the future.
a.mcdear said:
Yeah this works perfectly fine, but can cause the new phone to register on the network as if it were the old one. It is perfectly possible to restore a backup from another phone, and it works fine... its just a bad idea because if your old phone is ever "recovered" and turned back on, VZW might see two identical devices on the network, which will cause problems in the future.
Click to expand...
Click to collapse
Good to know. Thanks
In my case, the backup is from a device that i bricked totally. couldnt get into download mode so im thinking they will just use it as parts
Sent from my iPhone...

[Q] Can frequent ROM changes lead to a large LOST.DIR folder?

My internal /sdcard seems to always accumulate a large chunk of files. Just went in there and one file in particular was 2GB in size. I went ahead and wiped them all like I have in the past but I'm wondering if I'm creating the problem with frequent ROM changes, etc.
I've read that this directory can potentially indicate issues with the sd card itself and was just looking to get some clarification. Or is it just the frequent wipes/installs/reinstalls, etc. that I do a fair bit of?
I always delete my lost.dir when flashing. As well as any files that accumulate that are unnecessary. Every rom (well nearly every rom) comes with everything needed to make it work built into the rom. Deleting unnecessary files and folders is fine as long as they weren't put there by the rom you're currently flashing.
Phalanx7621 said:
I always delete my lost.dir when flashing. As well as any files that accumulate that are unnecessary. Every rom (well nearly every rom) comes with everything needed to make it work built into the rom. Deleting unnecessary files and folders is fine as long as they weren't put there by the rom you're currently flashing.
Click to expand...
Click to collapse
Yeah I've never gone as far as to clean my sdcard in any fashion between rom changes. I like to keep as much on there that I can from previous roms like photos, ringtones, etc. and with my luck I'd delete something that was necessary that I'm not aware of. This kind of brings up another question, is there a guide out there for a general 'how to' on cleaning up old files and what's safe to delete, etc.? I have to believe I've got a lot of wasted space on stuff that's completely useless now that I'm to another rom (which rocks btw).
[EDIT] I of course always do a full wipe and wipe cache/dalvik but I imagine there's still stuff left over... right? Never really looked into it to be quite honest.

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

Categories

Resources