[Q] How to Format SD Card as Internal Storage? - OnePlus X Q&A, Help & Troubleshooting

I'm running low on internal storage, and also want to enable full-device encryption. The obvious solution is to format the SD Card as "Internal Storage" which in theory lets you move some apps and their data to a partition on the SD Card, while also allowing that partition to be encrypted.
That all sounds great, so I read a half-dozen blogs on how to do this. They all start with "insert the SD Card and choose Set Up." But even if I reformat the card or wipe the partition table completely, the only option I get is "format as portable storage" and never see any set up screen or option to pick internal storage. Am I missing something? Do I need to format the sd card on my desktop as a specific partition type? Do I need to run some adb incantation to enable the option? Is it just not an option in OOS 3.1.4 and I need to install a different ROM?

Eventually answered my own question. Basically, OnePlus disabled the feature, probably because the system is extremely fragile and confusing to users. However, it is possible to enable the feature via adb, using
Code:
adb shell sm set-force-adoptable true
Even then, while the option appeared, phone phone itself had all sorts of problems trying to format the SD Card:
- I could wipe the SD Card, insert it into the phone, format it (as external storage), and then be unable to format it a second time. Buh? Apparently android's external sdcard formatter is capable of screwing up the GPT/MBR distinction in such a way that it can't cope with formatting a card that it formatted itself?
- If I wiped the SD Card, inserted it into the phone and selected to format it as internal storage, it would format to 20%, stop, wait 180 seconds, and then time out, leaving me with a corrupted SD Card that required re-wiping. This is probably related to the first problem - the timeout is because the 'format internal' happens in a second thread, which ran into a similar error about GPT/MBR problems and then the parent thread didn't capture the error or do anything useful with it.
Finally, I tried doing the whole thing in adb, following instructions here: http://blog.sam.liddicott.com/2016/02/android-6-semi-adopted-storage.html
But even then, I ran into the timeout problem when trying to format mixed (50%), until I popped the card out, nuked all existing partitions, inserted the card and immediately started the adb process. Basically, if android's formatted ever touches the SD Card, it is screwed up until it is wiped again.
In the end, this process worked:
- Pop the card out of the phone, put it into a card reader, use MiniTool Partition Wizard Free to delete all partitions, wipe the partition table and set the card to GPT. Don't convert from MBR to GPT, wipe it until you get an option to put a completely fresh GPT table on.
- Pop the card into the phone. Do not touch any of the phone's menus - they are there to temp you into screwing the card up again.
- Connect the phone to computer via usb.
- Run:
Code:
adb shell sm list-disks adoptable
to get the sd card name. It'll be something like disk:179:128 but it will change every time you wipe it.
- Once you have the disk name, run
Code:
adb shell sm partition $DISKNAME mixed 50
but substitute your own disk name and what percentage of the sd card you want to use for external. If you don't want to use any, I think you do something like
Code:
adb shell sm partition $DISKNAME private
but I'm not sure.
So yeah, this is a complete mess and I understand why OnePlus didn't want to subject their users to it.

I recommend don't use adoptable storage, it's not worthed. Better use foldermount apps to move apps data from internal to ext. storage.

I want to do full-device encryption, including (most) of the apps data. Is there a better way to accomplish this without accepting the 16GB internal storage limit?

I wouldn't recommend ever using adoptable storage on the OPX. OnePlus used an incredibly slow microSD reader and it shows.

Related

[Q] Formatted SD Card: lost internal card!!

Help!
I moved to GS2 and wanted to use my SD card I used on another phone; it had an ext4 partition and a FAT32 partition.
All went well.
Then I decided to remove the ext4 partition and have the SD fully formatted with FAT32. I tried both Primary and Logical, tried NTFS too and even recreated and ext partition with ClockwordMod, but I end up always the same way, that is if I put the card in the phone and then boot, it freezes, terminate processes and does not see ANY internal or external SD card!!
Please help! How can I get back to a working full FAT32/NTFS card?
Thank you!!!
Dude looks like you have really messed up not only your phone, but also the way you put your problem. How is it possible that you boot up your phone and still you cant see at least your internal SD... Anyhow my suggestions are:-
1. Remove SD card and boot normally without SD card. See if your internal shows up. If YES, format the SD card in PC and put back in cell.
2. If the phone still crashes, you need to clear all caches in Recovery. Do and see what happens. Also tell us if you are rooted? what ROM are you using..
3. Apart from the SD, does your phone work normal?
Bro, your query is kinda too complex and one of the noobiest one i have come upon in a long time.
Sorry for not having said before: without the SD the phone boots normally. AND however I format the SD card, is it always readable in Windows 7.
About your question "How is it possible that you boot up your phone and still you cant see at least your internal SD", it is what I'm wandering too... It looks like the "badly" formatted SD messes the partition logic in Android.
Now I'm trying this: deleted all partitions, created a new unformatted one trying to format within phone.
Thanks for help and patience!
Yes! It worked!! The phone saw the unformatted card and prompted for action; I made it format and now it's back

[Q] How to Recover Data from Formatted SD Card, CF Card, Micro SD Card or MMC Card?

Format your camera/phone memory card (including SD card, CF card, Micro SD card or MMC card and more) without data backups? Format camera/phone memory card before uploading stored data to computer or drive? Format your camera/phone memory card for unexpected errors? Don’t worry! Your memory card data is not completely lost as you think.
As long as this formatted memory card is not overwritten by anything else, your stored photos, music, videos, messages and more information can still be easily restored back with a memory card data recovery tool named 4Card Recovery, which is developed to help user rescue data back from all sorts of popular memory cards and USB drives. With its advanced four data recovery types and user-friendly interface, you often can rescue all your assigned data back with ease:
Step1. Free download and run 4Card Recovery on your computer. Just follow its Wizard directions carefully.
Step2. Insert your formatted memory card to your computer. Without a card Reader, you can load it back to your phone/camera and plunge the device to your PC.
Step3. Pick out a proper data recovery type from four. Every data recovery type always can offers different features for you.
Step4. Scan this connected memory card after clicking it in the device list.
Step5. Preview all scanned files and recover wanted ones only. The restored files are supposed to save on another memory card or drive in case of unnecessary loss.
Note: No matter what happens in the future, you should carefully update your data backups timely in case of similar data loss problems.
Are you curious? You can check this data recovery tool here: Mod edit: Links removed

Adoptable Storage went wrong, issues trying to revert

Greetings and Salutations,
I have a Samsung Galaxy J7 running the stock ROM and bootloader, Android 6.0.1, Kernel 3.10.49-9058927, with 16GB internal storage, and a 128GB U3 microSD card (not 100% sure of SD card speed, its above class 10), the phone is the 2016 version (subtle changes from the 2015 apparently) and has not yet been rooted.
I tried to enable adoptable storage to get a couple of apps to run better, but I want to revert back and seek a different solution, namely rooting and using Link2SD.
I tried the standard method of adoptable storage, and the option was not present in the storage screen on my phone. I tried using adb, and got timeout messages on the sm partition disk:179,64 private command. (Enabled USB debugging, accepted connections, installed samsung drivers, adb server daemon and shell all started successfully). Eventually it showed the sd card as corrupt. I popped it out of the phone, and deleted the partition on my computer, leaving raw, unformatted space on the card. I reinstalled the sd card in the phone, and the format as internal option was now present. I hit that, let it run and tried to migrate data afterward. Migrating always failed between 30 and 45%, and it showed me at 15.92GB or more out of 16GB used. I decided to revert back. I reformatted the sd card as portable in the phone, and it corrupted again. I did the same process, but elected to format as fat32 on my computer. Reinserting the sd card, it asked to format, so I did, as portable. The sd card appears to be back to normal, but I'm still at almost 16GB used on the phone. I tried to delete some music files that I have on the SD card as well, and they won't delete from the internal memory. It always says "could not delete" or "Delete operation failed". I have used the built in file manager, ES file explorer, and I believe I tried on my computer last night (it was getting late, but I remember at least trying). All fail to delete the files. I'm down to very few apps, none can be moved to the SD card, and I can't move much data otherwise. I harbor a suspicion that some hidden files are present on the internal memory, but I could be paranoid. I'm hoping to avoid a factory reset, but I fear that's the only option. I have a backup of the sd card, but not the phone's internals beyond what google saves in the cloud. I'm open to suggestions, and thanks in advance.
~Nick

How to install app onto sd card with root (Samsung)

SM-A520F | Android 7
What I've tried:
I partitioned the sd card using minitool partition wizard. I partitioned it into 100gb fat32/exfat and 20gb ext4 partition. I was able to install apps onto the ext4 partition and read things from the fat partition. However, there was a couple problems. I could never see the ext4 partition, all I saw was the internal storage (32gb) and the sd card fat partition (100gb) so I didn't know anything about the sd card ext4 partition.
Secondly, on reboot the fat partition would not mount. I would have to take out the sd card out and put it back in to get it to work.
Thirdly, even when the fat partition would mount it would not show up in windows mtp. When I plugged the phone into the computer all that I could see was the internal storage, so if I wanted to put anything onto the sd card I would have to take it out and put it into the computer.
I've used this adoptable storage module to enable installing apps on sd card. It "worked" but I face two problems with this: solid explorer only reads the sd card so it says I'm only getting 120gb (not 120gb + 32gb) and secondly it doesn't load magisk modules properly, so vanced youtube or viper4android don't work. Also now I can't get reverse this.
I've been trying for a while now, I would really love some help.
Bump!
I've even tried contacting Samsung and they've done nothing. I have kernal auditor and it looks like I can make a init.d file, is there something I can do with that?
I would completely format the sd card (With android settings) and then have you tried simply going to settings/apps/*the app* (maybe have to click storage or something) and then move to sd...
Check out the second from bottom in the pic if it doesnt work and try again
Craz Basics said:
I would completely format the sd card (With android settings) and then have you tried simply going to settings/apps/*the app* (maybe have to click storage or something) and then move to sd...
Check out the second from bottom in the pic if it doesnt work and try again
Click to expand...
Click to collapse
I think that the setting in developer options worked! Easier than partitioning.
y2klol said:
I think that the setting in developer options worked! Easier than partitioning.
Click to expand...
Click to collapse
Cool, I'm glad

How can i recover data from adoptable sd card?

I was using my 8gb sd card as adoptable sd card(formated as internal) but I replaced with 32gb card and formated new one as internal. Now when I tried to insert sd card in pc it doesn't shows any drive and 2 drive one approx 150mb other approx 7.5 gb is shown in disk management. Both are shown as 100% free. But I didn't formated the 8gb card on device nor on pc. Is there any way to recover the data from that card? I don't have the device right now. I sold it to someone else
@prashantvrm
The feature called Adoptable Storage allows the Android user to format an external storage media as permanent internal storage to be used with this specific Android device: Hereby Android formats and changes it’s FAT32 or exFAT format to ext4 or f2fs, it gets tied to this specific Android device. The key used to encrypt the data on the SD card is stored on the Android device’s internal memory.
So, it is not possible to mount the adopted storage to another device because of its encrypted nature.
jwoegerbauer said:
@prashantvrm
The feature called Adoptable Storage allows the Android user to format an external storage media as permanent internal storage to be used with this specific Android device: Hereby Android formats and changes it’s FAT32 or exFAT format to ext4 or f2fs, it gets tied to this specific Android device. The key used to encrypt the data on the SD card is stored on the Android device’s internal memory.
So, it is not possible to mount the adopted storage to another device because of its encrypted nature.
Click to expand...
Click to collapse
Consider this scenario:
SDcard1 was used in mobile as adoptable
Then it was removed from the device and card was not formated and no device reset.
Then card with high storage capacity was inserted and this new card got formatted as adaptable and but still no device reset.
Now I want to use the old card in this device. Will the device recognize it as it was used there before?
Adoptable storage is a nightmare as cards fail regularly, as you have found out. With an unencrypted SD card, you could run chkdsk in Windows to repair the card. The only thing I am unsure of is if there is an equivalent in Linux. If there is, the card which has an ext4 file system could possibly be repaired.
Try iBoysoft Data Recovery. If a file is a recognizable format, iBoysoft will find it and recover it. (And take days for a decent-sized card.) Instructions are at the software Step By Step. (If each file is encrypted, it may not find anything, but if the file structure is encrypted, iBoysoft never looks at the file structure except to see how large the clusters are - and it can work without that information.

Categories

Resources