Split Format External SD to Internal and External - G 2014 General

Code:
#include
/*
* Your warranty is now VOID !
*
* I am not responsible for bricked devices, dead SD cards,
* accidental data wipe or a thermonuclear war.
* If you have any concerns about steps included in this
* guide please do some research before trying it!
* YOU are choosing to make these modifications & if you
* point the finger at me for messing up , I will laugh at you.
*
* GOOD LUCK !
*/
Its my favorite solution for using native app2sd and still have an fat32 partition
Backup your sd data and then eject the card in Settings/Storage and USB menu.
Connect your phone with adb and use
$ adb shell sm list-disks adoptable
disk:179_64
$ adb shell sm partition disk:179_64 mixed 80
80% will be external storage and 20% are internal.
Its a nice solution while link2sd and apps2sd didnt work.

Related

SecureMMC card.

I would like to know if the SecureMMC can be used with the Himalaya. I realy need to use the secure features of this card.
Thank you.
Cesar Bremer Pinheiro.
I havent heard of that particular type of mmc, I think the "secure" part of "secure digital" refers to the little slider switch which when moved to the on position renders the memory card read only and so is secure from being overwritten.
Please see:
http://www.sdcard.org/sd_memorycard/index.html
This card isn't only a MMC card, it have secure encryption inside, suitable to protect data, the keys and encryption/decryption are inside the card. The device is a tampered resistant device, the keys will be erased if you try to open the card.
Cesar.
That site talks about SD (Secure Digitial) cards, which although are the same format as MMC cards, are not the same thing.
Both MMC cards and SD cards do work in the XDA and XDA2 though!
it's not called secure mmc it's called SD as in secure digital
it have the same packet as mmc and it's backward compatible with mmc
but there is where the similarities end they are very different internally
here is some reading
http://www.google.dk/search?q=mmc+vs.+sd&ie=UTF-8&hl=da&btnG=Google-søgning
and yes they work the xda both 1 and 2 dont have mmc slots they have SD slots which are backward compatible with mmc
how to take advantage of the encryption i dont know try googleing around for it

[Q] NookManager install issues

Hi folks, imagine I'm doing something stupid here as I'm pretty new to Linux & Android but been searching for the answer and haven't found it... I've just bought a Nook Simple Touch and want to install NookManager. I've followed the instructions here and followed a guide to writing an SD card image in Linux here using the integrated SD card reader in my laptop with a micro SD -> SD adapter, but when I reboot the Nook with the card inserted it fails to boot into NookManager and launches the standard Nook software as usual, with an error message saying that the card needs to be formatted (fails to format when I tred to do so from the Nook).
Can someone point out what I'm doing wrong please? It's a PNY class 10 card btw - I've seen some comments about issues with class 10s and the Nook but assuming it's something fundamental I'm doing wrong based on the errors
[neil] said:
Hi folks, imagine I'm doing something stupid here as I'm pretty new to Linux & Android but been searching for the answer and haven't found it... I've just bought a Nook Simple Touch and want to install NookManager. I've followed the instructions here and followed a guide to writing an SD card image in Linux here using the integrated SD card reader in my laptop with a micro SD -> SD adapter, but when I reboot the Nook with the card inserted it fails to boot into NookManager and launches the standard Nook software as usual, with an error message saying that the card needs to be formatted (fails to format when I tred to do so from the Nook).
Can someone point out what I'm doing wrong please? It's a PNY class 10 card btw - I've seen some comments about issues with class 10s and the Nook but assuming it's something fundamental I'm doing wrong based on the errors
Click to expand...
Click to collapse
I wrote my NookManager SD card from Linux, and it worked. I used an old Class 4 2GB card I had lying around.
Checklist:
* Insert card in card reader
* Unmount any auto-mounted partitions on the card
* Determine whole disc device node for the card (e.g. /dev/sde)
* Run 'dd if=NookManager.img of=/dev/sde' (or whatever device node your card shows up on)
* Run 'sync' and wait for writing to complete (sync normally doesn't return until this is the case, but if your card reader has an access indicator light, pay attention to that)
* Verify the written image by running 'cmp NookManager.img /dev/sde'. It should return 'cmp: EOF on NookManager.img' (i.e. /dev/sde is of greater capacity than the size of NookManager.img, but that every byte of NookManager.img is correctly written).
* Switch off Nook by pushing and holding power button on back
* Remove card from card reader and insert carefully into Nook
* Turn Nook on by pushing and holding power button again for about 30s.
NookManager should then boot. If it doesn't, I'd suspect either a faulty card, counterfeit card, or the aforementioned Class 10 bug.

Use both adoptable and external storage at the same time

Everybody who's tried to enable adoptable storage has probably experienced the same pain: You can't move all apps, and apps which can't be moved can't use the SD storage anymore (netflix, google play music, plex, ...), they become pretty unusable.
But we do want the adoptable storage since 8gb of flash is easily filled with apps...
Good news, I've found a blog which describes how to partition your SD card into 2 parts. 1 part for adoptable storage, and 1 part for "regular" SD storage. I've tried it on my moto G 3rd gen, and it works! No root needed, just adb commands.
Blog post here: http://blog.sam.liddicott.com/2016/02/android-6-semi-adopted-storage.html
The main commands are:
Code:
# list which cards are available
$ adb shell sm list-disks adoptable
# format in mixed mode using 75% as regular SD
$ adb shell sm partition disk:179_64 mixed 75

Make your SD card Semi-adopted. Works great!

EDIT: MARSHMALLOW ONLY
I hate the small amount of internal memory, but I don't want to make my ENTIRE SD of 128GB Adopted and unremovable. So I found this post describing how to make your SD only partially Adopted by splitting the partition in ADB. Thought I'd share!
http://blog.sam.liddicott.com/2016/02/android-6-semi-adopted-storage.html
"How to split your card
WARNING: Before you do this, be sure to eject the card from the Settings/Storage & USB menu.
I found how to partition my SD card to give 8G as internal storage to which all apps that can be moved will be moved and leave ~20GB as portable storage to hold music, etc.
First, you need adb working, and your SD card inserted and formatted as portable.
$ adb shell sm list-disks adoptable
disk:179,64
disk:179,64 is my SD card that can be made adoptable, I want 90% as external SD:
$ adb shell sm partition disk:179,64 mixed 90
Note: Your card may be listed with an underscore _ instead of an underscore, e.g. disk:179_64 in which case, that is what you type.
This erases the entire SD card, and then gives me 90% as portable storage and the rest as adopted internal storage.
The partition table looks like this:
Number Start End Size File system Name Flags
1 1049kB 57.5GB 57.5GB fat32 shared msftdata
2 57.5GB 57.5GB 16.8MB android_meta
3 57.5GB 63.9GB 6369MB android_expand
The fat32 partition is not encrypted and can be mounted on a computer (provided it can handle the new GUID partition table format).
I advise a reboot after setting the new music storage location this as Google Music may get the wrong idea about much space is available.
Rename the adopted storage. If it had the same name as the portable storage partition then it may prevent one of the partitions from being available over USB MTP."
Make sure you edit and let people know this if for Android 6 only in the title. Just in case people miss it when reading the article.
Appreciate the post...gonna split my 128gb right down the middle...never have to worry about "internal storage" or "app space" again. Plenty of space on other side for music, photo's etc.
Electriccars said:
EDIT: MARSHMALLOW ONLY
I hate the small amount of internal memory, but I don't want to make my ENTIRE SD of 128GB Adopted and unremovable. So I found this post describing how to make your SD only partially Adopted by splitting the partition in ADB. Thought I'd share!
"How to split your card
WARNING: Before you do this, be sure to eject the card from the Settings/Storage & USB menu.
I found how to partition my SD card to give 8G as internal storage to which all apps that can be moved will be moved and leave ~20GB as portable storage to hold music, etc.
First, you need adb working, and your SD card inserted and formatted as portable.
$ adb shell sm list-disks adoptable
is my SD card that can be made adoptable, I want 90% as external SD:
$ adb shell sm partition mixed 90
Note: Your card may be listed with an underscore _ instead of an underscore, e.g. in which case, that is what you type.
This erases the entire SD card, and then gives me 90% as portable storage and the rest as adopted internal storage.
The partition table looks like this:
Number Start End Size File system Name Flags
1 1049kB 57.5GB 57.5GB fat32 shared msftdata
2 57.5GB 57.5GB 16.8MB android_meta
3 57.5GB 63.9GB 6369MB android_expand
The fat32 partition is not encrypted and can be mounted on a computer (provided it can handle the new GUID partition table format).
I advise a reboot after setting the new music storage location this as Google Music may get the wrong idea about much space is available.
Rename the adopted storage. If it had the same name as the portable storage partition then it may prevent one of the partitions from being available over USB MTP."
Click to expand...
Click to collapse
Whats the command to rename the adopted storage?
famewolf said:
Whats the command to rename the adopted storage?
Click to expand...
Click to collapse
You don't need command just go to Settings. Then Storage and usb press on Sd card and press to 3 dots and Rename?
So what do I have to do to stop the phone from saying "New Sansung SD Card Detected" every single time I boot up the phone since I split it?
*update* the reported solution is to format the portable 1/2 within the phone from settings, storage.
Electriccars said:
EDIT: MARSHMALLOW ONLY
I hate the small amount of internal memory, but I don't want to make my ENTIRE SD of 128GB Adopted and unremovable. So I found this post describing how to make your SD only partially Adopted by splitting the partition in ADB. Thought I'd share!
"How to split your card
WARNING: Before you do this, be sure to eject the card from the Settings/Storage & USB menu.
I found how to partition my SD card to give 8G as internal storage to which all apps that can be moved will be moved and leave ~20GB as portable storage to hold music, etc.
First, you need adb working, and your SD card inserted and formatted as portable.
$ adb shell sm list-disks adoptable
is my SD card that can be made adoptable, I want 90% as external SD:
$ adb shell sm partition mixed 90
Note: Your card may be listed with an underscore _ instead of an underscore, e.g. in which case, that is what you type.
This erases the entire SD card, and then gives me 90% as portable storage and the rest as adopted internal storage.
The partition table looks like this:
Number Start End Size File system Name Flags
1 1049kB 57.5GB 57.5GB fat32 shared msftdata
2 57.5GB 57.5GB 16.8MB android_meta
3 57.5GB 63.9GB 6369MB android_expand
The fat32 partition is not encrypted and can be mounted on a computer (provided it can handle the new GUID partition table format).
I advise a reboot after setting the new music storage location this as Google Music may get the wrong idea about much space is available.
Rename the adopted storage. If it had the same name as the portable storage partition then it may prevent one of the partitions from being available over USB MTP."
Click to expand...
Click to collapse
Flashing a new rom causes the internal storage to be "lost". How can you redefine that section as internal storage without wiping out the portion defined as portable storage? If you run the command again you are going to have to back up the whole portable section and then copy it back.
Electriccars said:
EDIT: MARSHMALLOW ONLY
I hate the small amount of internal memory, but I don't want to make my ENTIRE SD of 128GB Adopted and unremovable. So I found this post describing how to make your SD only partially Adopted by splitting the partition in ADB. Thought I'd share!
http://blog.sam.liddicott.com/2016/02/android-6-semi-adopted-storage.html
"How to split your card
WARNING: Before you do this, be sure to eject the card from the Settings/Storage & USB menu.
I found how to partition my SD card to give 8G as internal storage to which all apps that can be moved will be moved and leave ~20GB as portable storage to hold music, etc.
First, you need adb working, and your SD card inserted and formatted as portable.
$ adb shell sm list-disks adoptable
disk:179,64
disk:179,64 is my SD card that can be made adoptable, I want 90% as external SD:
$ adb shell sm partition disk:179,64 mixed 90
Note: Your card may be listed with an underscore _ instead of an underscore, e.g. disk:179_64 in which case, that is what you type.
This erases the entire SD card, and then gives me 90% as portable storage and the rest as adopted internal storage.
The partition table looks like this:
Number Start End Size File system Name Flags
1 1049kB 57.5GB 57.5GB fat32 shared msftdata
2 57.5GB 57.5GB 16.8MB android_meta
3 57.5GB 63.9GB 6369MB android_expand
The fat32 partition is not encrypted and can be mounted on a computer (provided it can handle the new GUID partition table format).
I advise a reboot after setting the new music storage location this as Google Music may get the wrong idea about much space is available.
Rename the adopted storage. If it had the same name as the portable storage partition then it may prevent one of the partitions from being available over USB MTP."
Click to expand...
Click to collapse
Thanks!
Electriccars said:
EDIT: MARSHMALLOW ONLY
I hate the small amount of internal memory, but I don't want to make my ENTIRE SD of 128GB Adopted and unremovable. So I found this post describing how to make your SD only partially Adopted by splitting the partition in ADB. Thought I'd share!
http://blog.sam.liddicott.com/2016/02/android-6-semi-adopted-storage.html
"How to split your card
WARNING: Before you do this, be sure to eject the card from the Settings/Storage & USB menu.
I found how to partition my SD card to give 8G as internal storage to which all apps that can be moved will be moved and leave ~20GB as portable storage to hold music, etc.
First, you need adb working, and your SD card inserted and formatted as portable.
$ adb shell sm list-disks adoptable
disk:179,64
disk:179,64 is my SD card that can be made adoptable, I want 90% as external SD:
$ adb shell sm partition disk:179,64 mixed 90
Note: Your card may be listed with an underscore _ instead of an underscore, e.g. disk:179_64 in which case, that is what you type.
This erases the entire SD card, and then gives me 90% as portable storage and the rest as adopted internal storage.
The partition table looks like this:
Number Start End Size File system Name Flags
1 1049kB 57.5GB 57.5GB fat32 shared msftdata
2 57.5GB 57.5GB 16.8MB android_meta
3 57.5GB 63.9GB 6369MB android_expand
The fat32 partition is not encrypted and can be mounted on a computer (provided it can handle the new GUID partition table format).
I advise a reboot after setting the new music storage location this as Google Music may get the wrong idea about much space is available.
Rename the adopted storage. If it had the same name as the portable storage partition then it may prevent one of the partitions from being available over USB MTP."
Click to expand...
Click to collapse
i did the same but it saying that the new internal partition was corrupted !.
i'm using cm13 sony xm (2005) .. any ideas please !!
Is it working in cusrom ?
I know it has been a while, but for those stumbling across this now:
Be aware that the partition command prefers "round numbers" and may error on things like "97"
Format the card using sm (if coming from existing adopted storage):
Code:
sm list-volumes
will find the external storage volume, then use it with
Code:
sm format VOLUME
Has anyone tried this on 7.x ?
famewolf said:
Appreciate the post...gonna split my 128gb right down the middle...never have to worry about "internal storage" or "app space" again. Plenty of space on other side for music, photo's etc.
Click to expand...
Click to collapse
Out of Curiosity how well does twrp do with your 128 gb? Twrp dont even see my sammy 128 evo unless its made as adoptable which I dont want the whole thing lol.
Since the "external partition" is smaller, Is twrp seeing it better.
Lol guess only way to see is try.
TheMadScientist said:
Out of Curiosity how well does twrp do with your 128 gb? Twrp dont even see my sammy 128 evo unless its made as adoptable which I dont want the whole thing lol.
Since the "external partition" is smaller, Is twrp seeing it better.
Lol guess only way to see is try.
Click to expand...
Click to collapse
Only time I've ever had a sd card that was "hard to see" it was because it was still formatted as exfat instead of fat32.
famewolf said:
Only time I've ever had a sd card that was "hard to see" it was because it was still formatted as exfat instead of fat32.
Click to expand...
Click to collapse
Been through all that.
Just weird it sees it as internal 128 gb when adopted
Only thing i can think of now is that my twrp version is having issues. I had a sam s5 that was similar issue, my twrp version was only compatible to 64gb sds.
I cant get the 3.1.1-0 to load It goes rite away to 9008 fastboot mode.
I have to reload backup recov with flashify or flashfire to get twrp back.
Thanks!
I really hate the way Android 6.0 and above has treated the SD card!
And as always, whenever there is some new "upgrade" that limits how a user has control over things in their device(s) it's almost always due to some BS government and or copyright intervention.
In this case it was BOTH!
DRM (Digital Rights Media) is concerned that users will be able to "rip" media saved on their devices and share with others.
Complete BS if you ask me.
In Lollipop I was able to save both media AND apps to my SD card to save space as well as format a seperate 15 Gig EXT2 partition that allowed me to run a full blown version of Kali Linux over SSH using Linux Deploy.
Here is a link describing why Google did what they did: http://pocketnow.com/2013/08/23/google-hates-sdcards
multiwirth said:
Has anyone tried this on 7.x ?
Click to expand...
Click to collapse
Yes, I have configured my S7 edge (Exynos) using the process but before that, we must have to enable adoptable storage. Root Essentials is the tool you can download from play store and that will give you options and guide you through the process.
However, for your records, I am on Custom ROM (SuperMan 2.8 N) and a Custom Kernel as well.
Happy Partitioning!
thanx a lot. worked well on my sony xperia z3 tablet compact (spg611) and android 6.0.1.
i have no issues with camera or any other app and the figures of free memory are correct displayed as well.
i made 16gb of my 64gb sdcard ready for adoptable storage.
before i had about 500mb free internal memory no i got additional 16 gb for that, so nice
iam still not able to move existing apps to that 16gb (still the "not enough storage" error message)
but if i install an app new, then ist goes directly to the new storage.
Thanks.
This method does work for Android 7.1.1 on a non-rooted Lenovo Tab 4 8 inch; root not needed because obviously unlike Samsung and some others, the default ROM is near pure ASOP and adoptable storage is already enabled.
Things working fine and reading fine, but I am getting "New SD card detected" every reboot. It's pretty annoying but haven't found a fix as yet (please report if you do). Tried formatting the portable half as another user did, but that only seemed to then mess with the internal partition and make it tell me to reinsert.... which then lead to a mess and having to run adb and partition clean again.
So for now I'm just dealing with the message on boot and dismiss it.
Edit: can also confirm that it doesn't like certain percentage numbers as another user said. I tried 94 and got an error. What are permissable not sure, but 90 worked fine for me, so if you get an error message, try rounding down (or up) to the nearest 10.
Electriccars said:
Rename the adopted storage. If it had the same name as the portable storage partition then it may prevent one of the partitions from being available over USB MTP.
Click to expand...
Click to collapse
How can I rename the partition?

SD card only accessible by some apps (after removal & reinsertion)

I switched to a larger SD card (32 GB > 128 GB) and cannot access the new card or even the formerly used one in most applications. No changes in storage config or any system updates were done.
SD card mounted and recognised in system settings and file manager.
On one hand the SD card is not accessible in e.g. osmand or spotify or komoot or pretty much any other application (e.g. AndExplorer, DiskUsage, ...)
On the other hand photo / gallery apps (stock Sony, Google, and third party open source) see it, e.g. smt gallery 6.8.2.
It seems to me some apps interpret /storage/emulated/0 as a link back to the built-in 32G memory instead of the external 128G SD card.
I tried so far without any changes in symptoms or results:
* formatting the card in the phone, using the built-in wizard when inserting a new blank card
* rebooting the device (in the last few days more than in the last few years...)
* changing the file system on the new and old card from exFAT to FAT32 and vice versa
* checking/toggling app-storage permissions
* manually pointing some of the apps (where possible) to /storage/emulated/0 or the older/deprecated /storage/nnnn-nnnn/ paths
All cards are working, tested in card reader on Linux and Windows, also the SD card is visible (r/w) if I connect the phone via USB to a PC.
Specs:
* Sony Xperia Compact (F5321), Android 8.0.0, not rooted
* MicroSDXC 128GB, Transcend 300S
* several different Kingston SDXC 32GB cards
How can I get my phone back to using a SD card like before?
PS: Sorry I couldn't attach screenshots since this is my first posting...
zoidland said:
I switched to a larger SD card (32 GB > 128 GB) and cannot access the new card or even the formerly used one in most applications. No changes in storage config or any system updates were done.
SD card mounted and recognised in system settings and file manager.
On one hand the SD card is not accessible in e.g. osmand or spotify or komoot or pretty much any other application (e.g. AndExplorer, DiskUsage, ...)
On the other hand photo / gallery apps (stock Sony, Google, and third party open source) see it, e.g. smt gallery 6.8.2.
It seems to me some apps interpret /storage/emulated/0 as a link back to the built-in 32G memory instead of the external 128G SD card.
I tried so far without any changes in symptoms or results:
* formatting the card in the phone, using the built-in wizard when inserting a new blank card
* rebooting the device (in the last few days more than in the last few years...)
* changing the file system on the new and old card from exFAT to FAT32 and vice versa
* manually pointing some of the apps (where possible) to /storage/emulated/0 or the older/deprecated /storage/nnnn-nnnn/ paths
All cards are working, tested in card reader on Linux and Windows, also the SD card is visible (r/w) if I connect the phone via USB to a PC.
Specs:
* Sony Xperia Compact (F5321), Android 8.0.0, not rooted
* MicroSDXC 128GB, Transcend 300S
* several different Kingston SDXC 32GB cards
How can I get my phone back to using a SD card like before?
PS: Sorry I couldn't attach screenshots since this is my first posting...
Click to expand...
Click to collapse
Did you try appops? (Settings > Apps > [whatever app you want to give access] > Permissions, and toggle switch for "storage")...
levone1 said:
Did you try appops? (Settings > Apps > [whatever app you want to give access] > Permissions, and toggle switch for "storage")...
Click to expand...
Click to collapse
Yes, I forgot to mention. Permissions are given were toggled off and on during my attempts.

Categories

Resources