Help accessing my encrypted USB with my backup after flashing. - Shield Android TV Q&A, Help & Troubleshooting

Well I did not think this through lol
I had Adopted Storage set up on my 2017 16 Gb Shield and I had to re-flash some partitions, so I used Flashfire to create a backup, and silly me saved it on the external USB drive. Now that I'm done with all the flashing, the shield is back to being set up to use the actual internal storage again, but it can't read the encrypted USB.
Trying to set it up as either portable or internal storage warns that it will be reformatted, so haven't done either, the USB is just as it was before any flashing.
Is there any way for me to get my /data partition back with all the apps/settings i had? I guess either:
1) somehow access the Flashfire backup, then "adb push" it to my laptop, set up adopted storage again and wipe the USB and recover the data partition from the backup?
2) maybe somehow reactivate internal storage to use the /data partition from the usb drive?
Any help would be appreciated, thanks!
(if it makes any difference, I was on full android nougat, flashed nvidia 5.0.1 recovery with flash-all.bat, did the OTA to 5.1, then flashed system/vendor of an updated full android nougat, and rooted it. now im back at full android but blank, hoping i can restore. if not, i guess i'll just have a few hours of reinstalling haha)

The only way to read an encrypted card is with the key. Keys are stored in /data/misc/vold. If you don't have a copy of your key then you're out of luck, sorry.

Yea you're screwed

Dang it. /data/misc/void is empty, the wipe took care of that.
Thanks anyways.

Related

Sigh... Formatted My SD Card With Backups

I was having problems with Taboonay 2.2, so I decided to wipe everything and try LightSpeed. First, I backed up all my apps with Titanium and moved the backups onto my external sd. Then, I did a full backup in CWM, just to be safe. Then I did a system wipe and formatted /system, /data and... /sdcard.
Yes, I got a little trigger happy there. Momentarily forgot that /sdcard is not the same in CWM as on the Acer roms (i.e. it's the external memory in CWM vs the internal in the rom).
After cursing myself loudly, I realized that a format that takes 2 seconds to do must not be a full format. I.e. The FAT table is gone along with file and directory information, but the files themselves should still be there.
As I'm a linux user, I installed TestDisk and was able to fully recover all my files. Moral of the story: Don't be dumb and format your backups, but if you do, don't panic. Just don't write anything else to the disk/card and you'll be able to recover your data.
fasteddy86 said:
I was having problems with Taboonay 2.2, so I decided to wipe everything and try LightSpeed. First, I backed up all my apps with Titanium and moved the backups onto my external sd. Then, I did a full backup in CWM, just to be safe. Then I did a system wipe and formatted /system, /data and... /sdcard.
Yes, I got a little trigger happy there. Momentarily forgot that /sdcard is not the same in CWM as on the Acer roms (i.e. it's the external memory in CWM vs the internal in the rom).
After cursing myself loudly, I realized that a format that takes 2 seconds to do must not be a full format. I.e. The FAT table is gone along with file and directory information, but the files themselves should still be there.
As I'm a linux user, I installed TestDisk and was able to fully recover all my files. Moral of the story: Don't be dumb and format your backups, but if you do, don't panic. Just don't write anything else to the disk/card and you'll be able to recover your data.
Click to expand...
Click to collapse
Once I was installing rom on my phone (in the early days) so I put the zip file on the sd card, wiped everything, and to make sure I was getting a completely clean install, formatted the sd card. Of course, this meant that I had also removed all of my CWM backups and the ROM I was going to flash! Duh...
This is why you transfer your CWM & Ti backups to your PC for safe keeping, you will never have this problem again.
fasteddy86 said:
I was having problems with Taboonay 2.2, so I decided to wipe everything and try LightSpeed. First, I backed up all my apps with Titanium and moved the backups onto my external sd. Then, I did a full backup in CWM, just to be safe. Then I did a system wipe and formatted /system, /data and... /sdcard.
Yes, I got a little trigger happy there. Momentarily forgot that /sdcard is not the same in CWM as on the Acer roms (i.e. it's the external memory in CWM vs the internal in the rom).
After cursing myself loudly, I realized that a format that takes 2 seconds to do must not be a full format. I.e. The FAT table is gone along with file and directory information, but the files themselves should still be there.
As I'm a linux user, I installed TestDisk and was able to fully recover all my files. Moral of the story: Don't be dumb and format your backups, but if you do, don't panic. Just don't write anything else to the disk/card and you'll be able to recover your data.
Click to expand...
Click to collapse
STOP! You haven't overwritten your sdcard yet, have you? Put it in a usb card reader, connect it to your PC and download Recuva. It will scan and restore deleted files (even after a format). It works very will with sdcards.
Euclid's Brother said:
STOP! You haven't overwritten your sdcard yet, have you? Put it in a usb card reader, connect it to your PC and download Recuva. It will scan and restore deleted files (even after a format). It works very will with sdcards.
Click to expand...
Click to collapse
That is what he did, just read the post.
Lol.. guess i got a little trigger happy too and didn't read the whole thing. Glad he was able to recover
Recuva can't even see my sd card now. It is just grayed out now. Guess it is time for a new one now. Glad you got your fixed.

TWRP write protect issue

I flashed my i9500 with TWRP 2.8.1.0 using Odin and it wrote an undeletable backup onto my internal memory. To get rid of that, I backed up the "BACKUPS" folder and formatted the internal storage only for it now to cause the entire internal storage to be write protected to my android apps. I can copy and delete stuff to it through PC but my apps wont work, those that require to download pics and videos or make backups to the internal storage, web browsers can't download anything to the internal storage yet I now have over 7GB free space.
It's clear TWRP is write protecting the internal storage selectively (first it wrote protected the storage to both the phone and pc, now to the phone only). How should I sort this problem out?
I have also just tried using root explorer to change permissions to the internal storage but it doesn't work. It's failing. Titanium backup shows its own backup folder is unwrittable. It cannot be changed by Root explorer
I just tried fixing permissions in twrp but to no avail. I uninstalled Clean master only to try and re-install it and it won't install now, it gives a failed install error. Kingsoft office continually shows "stopped working" and fails to work completely. All this started with flashing Twrp. I can't view pics in whats app or send them, neither can I edit documents. Any help to rid of this issue will be gladly appreciated.
People please please avoid twrp at all costs!, i have now lost all my data and apps are all failing. I deerly deerly regret why i ever flashed twrp recover in the first place!
I seem to have solved the issue after a very grueling experience.
TWRP has its flaws and it is quite notable here. Here is how I have gotten around the issue:-
Immediately after I installed TWRP I made a system backup of the entire phone as of its state at the time.
I copied it to my pc and tried to delete the backup that TWRP had made. It was completely write protected, nothing could delete it.
I then decided to use TWRP to format my internal storage after backing it up. Then restore the data back which I did successfully.
Little did I know what had happened. TWRP had assigned the internal storage attributes that even Root explorer (paid) could not undo.
The internal storage had become unusable to the system and user apps.
Slowly my apps began to collapse one after the other failing. From frustration I tried to salvage the data the apps held at the time so that I can factory reset and restore but Titanium backup could not access its own folder. That's where all the frustration begun.
I later flashed CWM and accidentally formatted all my data instead of the data partition.. this was now hell.
One last try which was about 5 hours later I returned TWRP recovery, wiped the data partition and got hold of my prior backup with TWRP, restored it and am 9 hrs back from total loss of data. So the internal storage now has its initial attributes prior to the predicament.
Am actually back exactly to where all this mayhem began when I decided to delete the "BACKUPS" folder and there was absolutely nothing else that was wrong, which now I will attempt to delete hoping that I won't experience deja vu.
This is a problem worth reporting to TWRP developers and I don't know how
TWRP recovery Fix Permissions
I couldn't delete back ups from the internal storage at all. I couldn't even copy saved back ups from my pc to my Note 3. I went into TWRP recovery, under Advanced select Fix Permissions
Now I can delete folders in the TWRP main folder with a ES file explorer or on my PC via usb cable.
Never had any problems like this with TWRP on my S4+. For me the backups taken and its folders can be handled just fine, copied, deleted, moved etc. Must be som compatibility issue with your setup.

[Q] Can't mount internal storage TWRP

So, things have massively escalated today and my phone appears to be soft bricked. Joy. I'll run through what happened.
1. I encrypted my phone using the built in tool in Cyanogen Mod. After it rebooted, it was glitchy and I lost a load of apps, the phone really wasn't working well. Rebooted again, but no improvement.
2. I went into TWRP (2.8.x) to restore my old backup, which was on the SD card. After the initial wipe of the internal storage, the log showed
E: Can't mount storage
Click to expand...
Click to collapse
and the restore failed.
3. I reboot and phone goes straight into recovery mode as there is no OS installed (the recovery wipes the internal storage first). Internal Storage is now showing as '0 MB'. I cannot find a way of mounting this storage anymore. Have tried factory reset (doesn't work because file system isn't mounted), and rebooting a few times but no avail.
* There seem to be some options about flashing a .pit file using odin, but I do not have this file. My phone is the Note 4 SM-N910F Model. If I can do this through Odin then maybe this will resurrect the file structure and make this storage mountable?
* There may also be another option using ADB but I still don't know what commands to use.
Any help would really be appreciated as it seems there is some possibility of a fix. That being said my hopes are not that high...
I believe I may have fixed this. I would like to keep this up here in case in helps anyone in the future, I would imagine this is only useful for people who have encrypted their device. I'm not an Android expert so can't be responsible for any damage to devices or data loss etc.
It seems that the encryption must have gone wrong somewhat and this is likely to have impacted on the file system.
Although I couldn't wipe on the device, I was able in recovery to FORMAT data (not just wipe). Go to the wipe menu, then format. After this, reboot into recovery again and you should be able to mount again. It rebuilt the filesystem too.
This should be a quick fix that may help a few people with the issues with not being able to mount the file system. I hope this can help at least one person!
I managed to restore from my backup after and phone is now working. Thanks anyway!
Is there any way to set the default storage of play store apps to the sd card?

How to decrypt android marshmellow formated sdcard

i was on twrp 2.8.7.0 and installed http://forum.xda-developers.com/galaxy-s4/i9505-orig-develop/rom-kushan-cm-marshmallow-rom-t3258489. then formatted my sd card as internal storage. today i wanted to update to the latest build of kushan rom, but in twrp my sd card was listed as 0 mb and i couldnt enter it. so i decided to flash latest cwm trough rom manager. after flashing cwm my internal sdcard was wiped(not by me-automaticly) and now marshmellow tells me that te sd card is not supportet...please format.....
i think that as the cwm wiped my sd card "the unique? encrpytion key?" got lost and therefor i cant axcess the sd card. im i right?
if yes i hope the encryption key is not unique and i can recover the files on the sd card
k2828 said:
i was on twrp 2.8.7.0 and installed http://forum.xda-developers.com/galaxy-s4/i9505-orig-develop/rom-kushan-cm-marshmallow-rom-t3258489. then formatted my sd card as internal storage. today i wanted to update to the latest build of kushan rom, but in twrp my sd card was listed as 0 mb and i couldnt enter it. so i decided to flash latest cwm trough rom manager. after flashing cwm my internal sdcard was wiped(not by me-automaticly) and now marshmellow tells me that te sd card is not supportet...please format.....
i think that as the cwm wiped my sd card "the unique? encrpytion key?" got lost and therefor i cant axcess the sd card. im i right?
if yes i hope the encryption key is not unique and i can recover the files on the sd card
Click to expand...
Click to collapse
As stated many many times. The only recovery you can use is TWRP. Your sdcard shows 0 mb because it became part of your internal storage. So reflash TWRP and try again.
after flashing cwm i did nothing but booting once the rom and notice that everything was wipped and then flash twrp.
the result is i cant axcess my sdcard as the rom sais that the sdcard needs to prepared.
so my question is, can i recover the data on the sd card?
Not if you're at the point where the card needs to be prepared. What you should have done if you wanted to decrypt the MicroSD, is pulled the data off both card and internal storage, then gone into Settings > Storage & USB and converted the card to portable storage.
One thing. With CWM running, did you have any nandroid backups? If you did, you likely will have to reinstall CWM to free up the internal storage reserved for the nandroid backups. CWM by default allocates space for its nandroid backups that cannot be touched by the system or TWRP. Once you do that, you can then reinstall TWRP.
OK THX. I just created a image of the SD card.maybe in the future there will be a toop to decrypt such SD cards. For the future:
Is the SD card lost everytime i update the Rom build?
Is the SD card lost Ehen i change the Rom to another Android 6 Rom?
What do i have to do when updating to a Newer build oft the same rom,vor change to another Android 6 rom? Pull everything from bouth cards? Really? Thats a pain in the ass even with a uhs 1 SD card.
Whats the best way for backing up the data, so i can cop them back without trouble? Maybe ADB?
Whats about changin the recovery? Thats a nogo i think and whats about updating twrp?
What is a absolut nogo? What i ahouldnt do to f*** up the card again?
So many questions, but I'm going to answer just the last two, as their answer covers every other question in your post.
What is an absolute no go? What shouldn't I do to f*** up the card again?
Click to expand...
Click to collapse
The answer to this is so easy it's astounding. The answer is to not combine the card with the internal storage. Here's why. If you switch ROMs regularly in order to try them out, every single time you combine the storage the card has to be prepared for use, which means all data on it gets wiped. If you do a clean install of your current ROM and combine the storage, all data on the card is wiped. The reason the card gets wiped is because Android 6.x creates a virtual volume which spans both internal storage and the MicroSD. In order to ensure the data is secure Android encrypts the volume. This encryption is part of the reason Google throws up a warning to restore the card if you pull it out of the device.
By not combining the storage, you avoid the encryption problems, but you do have to deal with the issue of apps not seeing the MicroSD card. Unless an app with this issue is no longer being updated, this problem will resolve itself. Developers have to adapt to the new setup.
The encryption also impacts performance, though on my tests with it I didn't notice anything. The one thing it will do is impact the ability to perform backups. In my tests, the encryption prevented TWRP from doing anything useful, meaning no ability to install flashable zips or updated TWRP recovery images from the storage and no ability to do nandroid backups. TWRP could see the directory structure of the combined storage but could not see any files within the folders to install. Nandroid backups instantly failed with an "out of storage" error, even though I had some 15GB of space available on the MicroSD. TWRP's developers will need to adapt to this and custom ROM developers will have to recommend that users not combine storage.
Strephon Alkhalikoi said:
So many questions, but I'm going to answer just the last two, as their answer covers every other question in your post.
The answer to this is so easy it's astounding. The answer is to not combine the card with the internal storage. Here's why. If you switch ROMs regularly in order to try them out, every single time you combine the storage the card has to be prepared for use, which means all data on it gets wiped. If you do a clean install of your current ROM and combine the storage, all data on the card is wiped. The reason the card gets wiped is because Android 6.x creates a virtual volume which spans both internal storage and the MicroSD. In order to ensure the data is secure Android encrypts the volume. This encryption is part of the reason Google throws up a warning to restore the card if you pull it out of the device.
By not combining the storage, you avoid the encryption problems, but you do have to deal with the issue of apps not seeing the MicroSD card. Unless an app with this issue is no longer being updated, this problem will resolve itself. Developers have to adapt to the new setup.
The encryption also impacts performance, though on my tests with it I didn't notice anything. The one thing it will do is impact the ability to perform backups. In my tests, the encryption prevented TWRP from doing anything useful, meaning no ability to install flashable zips or updated TWRP recovery images from the storage and no ability to do nandroid backups. TWRP could see the directory structure of the combined storage but could not see any files within the folders to install. Nandroid backups instantly failed with an "out of storage" error, even though I had some 15GB of space available on the MicroSD. TWRP's developers will need to adapt to this and custom ROM developers will have to recommend that users not combine storage.
Click to expand...
Click to collapse
thx for your very detailed answere. but whats about when i am using i.e. kushan rom build 07.12.2015 and i update to kushan rom build 11.12.2015. will the sd card have to be prepared to use also? and what about when i update twrp to a marshmellow support twrp. di i need prepare the sd card then again?
TWRP could see the directory structure of the combined storage but could not see any files within the folders to install. Nandroid backups instantly failed with an "out of storage" error, even though I had some 15GB of space available on the MicroSD.
Click to expand...
Click to collapse
This is the point where my trouble began. as so as the sd card is prepared as internal you cant even see files of the real internal storage. flashing zips you can still do with adb sideload. another question could we backup the internal flash inlcuding prepared sd card with this:
http://forum.xda-developers.com/showthread.php?t=1818321
?
If yes, is there also a way to restore the backup made?
To make things crystal clear, once the card is set for portable storage you will not have to reconfigure the card again unless you choose to combine the storage. Upgrading a ROM to a newer version will generate a message in the notification bar that you have to prepare the card, but you simply select the portable storage option and the notification goes away. Upgrading TWRP doesn't require doing anything to storage.
Should you choose to combine storage, upgrading a ROM may cost you whatever is on both the internal storage and microSD. Upgrading TWRP with combined storage would require you to flash it using Odin, because you wouldn't be able to copy the TWRP image to the device storage.
Backing up the internal storage doesn't require anything more than a copy operation from the S4 to the PC, so no special tools should be required. That applies regardless of whether the storage is combined or separate. However, for best results with TWRP, the storage should not be combined.
Sorry for reviving this old thread, but I've the same issue.
I flashed a new rom without getting the decryption code or backing anything up(No NANDs, no sd backup). Is there still currently no way to retrieve the files that are encrypted on this SD?
I've done exactly the same, I'm hoping theres a way to decrypt it.
k2828 said:
i was on twrp 2.8.7.0 and installed http://forum.xda-developers.com/galaxy-s4/i9505-orig-develop/rom-kushan-cm-marshmallow-rom-t3258489. then formatted my sd card as internal storage. today i wanted to update to the latest build of kushan rom, but in twrp my sd card was listed as 0 mb and i couldnt enter it. so i decided to flash latest cwm trough rom manager. after flashing cwm my internal sdcard was wiped(not by me-automaticly) and now marshmellow tells me that te sd card is not supportet...please format.....
i think that as the cwm wiped my sd card "the unique? encrpytion key?" got lost and therefor i cant axcess the sd card. im i right?
if yes i hope the encryption key is not unique and i can recover the files on the sd card
Click to expand...
Click to collapse
Have you found solution to decrypt the Sdcard.
I was facing this problem for almost 1 year I need only sdcard not data in it but I am unable to format it due to encryption but any device able to read the data and copy from that.
Even I can play Music out that SD card
Unless you're immortal, you're not decrypting the MicroSD card via brute force. Currently, the amount of time required to find the decryption key is longer than the current age of the universe.
If looking to simply format an existing card, use SDFormatter from http://www.sdcard.org.

Need help decrypting files from SD Card set as Internal Storage

So I did something dumb and hoping someone here can assist. I am running a 16GB Moto X Pure, unlocked bootloader, TWRP custom recovery, Rooted, latest DU ROM, and had a 128GB SD Card formatted as internal storage. I was looking around in the Options and under security I found an option to "Encrypt Phone". I was dumb and chose to encrypt phone. The process went smoothly without errors, or at least appeared to do so. But after the final reboot it appears the internal storage (16GB) were encrypted, but the 128GB SD Card which was formatted as "Internal Storage" is no longer readable. The phone lists it as "Unsupported SD Card" and only gives me the option to format. Also loading it on my laptop, Windows is not able to recognize it. I also tried looking in /data/misc/vold to hopefully get the encryption key but that directory is blank.
Anyone have a clue or suggestions on what I can try to recover the encrypted data in the SD or force my phone to read it?
You can't as you cannot generate a key without the original os that encrypted it. If you could the point of encryption would be 0
---------- Post added at 05:45 PM ---------- Previous post was at 05:44 PM ----------
It either was encrypted before or encryption damaged the file structure in the card
So I lucked out BIG time. I tend to do backups before major changes to my phone, hence why I was so upset at myself for not doing a backup before attempting to encrypt my phone. As such I found an older TWRP nandroid backup from early September in my laptop hard drive. I performed the backup before moving over to DU Room and also backed it up to my hard drive. I was able to copy the TWRP backup to a USB drive, reboot into recovery, mount OTG USB and restore the backup successfully. That had the encryption key i needed so I got access back to my SD card.
Like is said, lucked out BIG time! Moral of the story, always backup all your stuff more than once
lbtc777 said:
So I lucked out BIG time. I tend to do backups before major changes to my phone, hence why I was so upset at myself for not doing a backup before attempting to encrypt my phone. As such I found an older TWRP nandroid backup from early September in my laptop hard drive. I performed the backup before moving over to DU Room and also backed it up to my hard drive. I was able to copy the TWRP backup to a USB drive, reboot into recovery, mount OTG USB and restore the backup successfully. That had the encryption key i needed so I got access back to my SD card.
Like is said, lucked out BIG time! Moral of the story, always backup all your stuff more than once
Click to expand...
Click to collapse
And store in more than one place too!
ronaldporter77 said:
Take out that SD card and insert it in a PC. See whether it can be accessed in a computer. If the SD card is readable in your computer then try to run a recovery software to restore back all of its content in a separate file or folder. Let me know.
Click to expand...
Click to collapse
https://forum.xda-developers.com/showpost.php?p=74284688&postcount=3

Categories

Resources