Hey there folks,
I've been using adoptable storage on my Moto X pure with great success.
I'm hoping that someone has more experience with adoptable storage than me that can help.
I am currently using a 32 gigabyte SD card and want to swap it with a new 64 gigabyte SD card. Can I just copy the contents from my old 32 gigabyte card to my new 64 gigabyte card and put the new 64 gigabyte card in the phone and expect it to work as before?
Thanks for any insight.
bumpbump
I have the same problem with a S5 (cm13). Used a 32gb card initially. Now bought a 128gb card and I want to upgrade it moving everything from the old card to the new one.
I found no documentation on internet so if no one has a better suggestion I think I'll go for the "raw" way.
I'll turn off phone, take out old card, attach it to a linux box along with the new one and "sudo dd if=/dev/oldcard of=/dev/newcard"
Once data is copied I'll try to insert the "new" card in the phone and see what happens. If the device works normally I'll power it off again, connect to the linux box again and create a new entry in the partition table to use the "remaining" empty space as an external "portable" SD.
I hope this will lead to the same "resulting" configuration when you use the command "sm partition disk:XXX mixed yy"
I wish the best, I ended up needing to update my rom so I just wiped everything and started fresh with the new Microsd. However I'm still curious if your method will work for future reference.
Thanks. If I succeed I'll post a tutorial on how to do that. Maybe someone finds it useful.
It works.
So...How to do that?
turn off phone (wait for it to be really off).
extract microsd.
insert into microsd reader (it's faster if you have TWO microsd readers, usb3. I had just one and times were longer)
boot ubuntu (or any other linux)
copy the image of the old sd card on the disk.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
once done take out the microsd reader from usb port, swap card with the new one and plug it again in usb port.
(optional) verify that your microsd reader works good with the new card.
Good! device contains only one partition (a big exfat one).
ensure that the system DOESN'T mount automatically the card. if it does "eject" (unmount) it.
copy back the data onto the new sdcard.
once done we got to tell the kernel to refresh the partition table.
the error just means the disk is bigger than what the partition table knows. We got to fix that and another problem. GPT has a backup partition table at the end of the disk (which on the new disk isn't "at the end" any more 'cause it's located at the end of the "source" disk)
check the partprobe result on dmesg. we should see that the kernel saw the new partitions and complains about the backup. let's fix it.
(optional) take out the reader from the usb port, put card in the phone, boot up, let it settle, check everything works fine (it should work exactly as before, no extra space yet).
turn off phone again (let it turn off completely), extract sd, put sd in reader, put reader in USB port (i plugged it in another usb port and the device became sdb...but it's just the same card)
let's create the "portable" space with the unused space. I used parted, you can use whatever you like.
and create the filesystem... (I did also a check on the new FS to see it is everything ok)
do not forget to set the partition type you just created as type 0700 (windows).
when you first create the "unformatted" partition entry in the partition table, by default, it gets "Linux filesystem" type. before putting the card back into the phone you gotta change the type to windows or android won't see it.
put card back in the phone...et voilà, the system says "hey, you inserted a new card, what do you want to do?" choose portable to leave the partition AS IS (I don't want to convert the new one to adopted storage too).
when you connect the phone through MTP you will see both the storage spaces
it's worth to note that this "raw copy" method creates problems if you try to read the card on windows 7 or earlier. why?
windows sucks (we all know it) and requires that the "portable" partition is the first in the gpt disk. (it is not, we added it at the end of the disk)
on windows 10 microsoft realized the world isn't all about windows and corrected this bug so you can just plug the sdcard on the port to read/write data.
Clarify please
LinoX said:
So...How to do that?
turn off phone (wait for it to be really off).
extract microsd.
insert into microsd reader (it's faster if you have TWO microsd readers, usb3. I had just one and times were longer)
boot ubuntu (or any other linux)
copy the image of the old sd card on the disk.
once done take out the microsd reader from usb port, swap card with the new one and plug it again in usb port.
(optional) verify that your microsd reader works good with the new card.
Good! device contains only one partition (a big exfat one).
ensure that the system DOESN'T mount automatically the card. if it does "eject" (unmount) it.
copy back the data onto the new sdcard.
once done we got to tell the kernel to refresh the partition table.
the error just means the disk is bigger than what the partition table knows. We got to fix that and another problem. GPT has a backup partition table at the end of the disk (which on the new disk isn't "at the end" any more 'cause it's located at the end of the "source" disk)
check the partprobe result on dmesg. we should see that the kernel saw the new partitions and complains about the backup. let's fix it.
(optional) take out the reader from the usb port, put card in the phone, boot up, let it settle, check everything works fine (it should work exactly as before, no extra space yet).
turn off phone again (let it turn off completely), extract sd, put sd in reader, put reader in USB port (i plugged it in another usb port and the device became sdb...but it's just the same card)
let's create the "portable" space with the unused space. I used parted, you can use whatever you like.
and create the filesystem... (I did also a check on the new FS to see it is everything ok)
do not forget to set the partition type you just created as type 0700 (windows).
when you first create the "unformatted" partition entry in the partition table, by default, it gets "Linux filesystem" type. before putting the card back into the phone you gotta change the type to windows or android won't see it.
put card back in the phone...et voilà, the system says "hey, you inserted a new card, what do you want to do?" choose portable to leave the partition AS IS (I don't want to convert the new one to adopted storage too).
when you connect the phone through MTP you will see both the storage spaces
it's worth to note that this "raw copy" method creates problems if you try to read the card on windows 7 or earlier. why?
windows sucks (we all know it) and requires that the "portable" partition is the first in the gpt disk. (it is not, we added it at the end of the disk)
on windows 10 microsoft realized the world isn't all about windows and corrected this bug so you can just plug the sdcard on the port to read/write data.
Click to expand...
Click to collapse
SO for clarity if we are using the exact same size and brand of storage, just faster, and want everything exactly the same we stop at step 10? Correct? I will use a usb c reader if I want removable storage. The primary thing for me is identical to original.
EDIT I meant step 9.
nooneelsesdroid said:
SO for clarity if we are using the exact same size and brand of storage, just faster, and want everything exactly the same we stop at step 10? Correct? I will use a usb c reader if I want removable storage. The primary thing for me is identical to original.
EDIT I meant step 9.
Click to expand...
Click to collapse
if you don't need the extra space yes, you just "dd" the "disks" (it's like a 1-1 copy of the card)...but nowadays it's kinda pointless and good quality, huge cards are very cheap...
Well shoot I tried it and it yelled at me to put back in the other card. My bad was they are in fact different brands, I think you need to stick with the same brand. I was coming from a Samsung Evo Plus Grade 3, Class 10, A1 and went to a SanDisk Extreme Grade 3, Class 10, A2, v30. I even dd'd the whole thing /dev/sdb. It knew new the brand... bummer.
Related
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hi Everyone!
All users of QMobile Noir A2 know about the very limited Internal Memory of this phone.
Well you can get rid of that problem by Rooting your phone and using Link2SD application.
Here I have posted how to use Link2SD specifically on QMobile Noir A2. This is a edited version of the tutorial from this site:
wasconet.com/how-to-increase-the-internal-memory-of-your-android-devices/
I am not stealing any work, just modifing and reposting with reference.
Before starting do Note:
You will need to have a Rooted QMobile Noir A2. Search if you need help with Rooting.
Also note that there is absolutely no way you can actually increase the size of your phone's internal storage but you can allocate some part of your memory card for your phone to install applications to.
What you will need:
Your QMobile Noir A2 Phone (must be rooted)
Memory card (2GB and above only)
A memory card reader
A computer
Download and instal MiniTool to your computer. Download from this website: partitionwizard.com/free-partition-manager.html
Link2SD application (should be downloaded on Google play store)
Backup your memory card (copy all the data on it to a folder on your computer)
Remember that you will have to fully format your SD-Card so remember to copy and save all your data as you will lose it completely in the format.
YOU WILL LOSE ALL DATA ON THE SD-CARD, SO COPY AND SAVE IT ON YOUR PC.
Do not complain to me if you lose your data and did not make a backup of it. In that case I am afraid to say that nothing can be done now to get your data back.
Steps to increasing your A2's Internal Memory
Step 1: Backing up your memory card:
Before attempting this, make sure you have backed up all the files and folders on your memory card to your computer by easily coping the whole memory card and pasting into a folder on your computer.
Step 2: Partitioning your memory card (Be careful here you can destroy your memory card):
Connect your memory card to your computer using a memory card reader (dont use a phone and USB cable) and take note of the letter assigned to it by your computer on my computer page example (F: ), (D: ) etc .
Open the installed MiniTool on your computer.
Right click on your memory card letter (example D:, F: ) and click delete.
Now you will see the memory card showing unallocated space, right click on it again and select "Create as -> Primary"
If your memory card size is less than 2GB, select file system "FAT" . If it is more than 2GB, select "FAT32".
Now go down and reduce the size of your memory card on partition size so that there will be space on unallocated space (that will be your added memory, so you can choose any size you want).
I recommend that you leave at least 0.5GB or 500MB and if your memory card is 4GB or larger then leave 1GB.
No need to leave more than 1GB unallocated.
Now, choose the unallocated space again and select "Create as -> Primary"
Now, choose "FAT" file system. You can let the whole space take over in this step.
Now click ok and click apply on the top menu.
Wait for it to finish and you have successfully partitioned your memory card.
Copy your data backed up on your computer back to the memory card and insert it into your phone and turn it on.
Step 3: Configuring Link2SD:
Now open Link2SD which you have downloaded from Google play store on your phone
-Now open Link2SD which you have downloaded from Google play store on your phone
On first run you will see a diagloge from Super User similar to the image below. This is a safe application provided you downloaded it from Google Play with the correct name so go ahead and click on "Grant".
Next Link2SD will ask you to select the file system of your second permission, choose "FAT / FAT32". See image below.
Now click OK, the phone will ask to get restarted, click on "Reboot Device" so it will restart itself.
A dialogue box will come up after the restart click okay
Open Link2SD
There is a funnel-like icon on the top part click it you will see different options, choose on internal. Image below.
Now tap the Menu Key of your phone, and select multi-select, then press the select all button.
All of these apps will be selected. Now choose action then click create link
Select the three options (link application file, link dalvic-cache file,link library files) then click ok
Link2SD will then move all those apps and games then create a link with them from the second partition of your SD card. Touch OK when done
Now you are done but to make sure this happens automatically every single time you install an app you should goto settings from the menu and click on auto link and then select Auto Link Settings and then select the three options again and ok.
Also to prevent your phone from automatically moving apps to SD-Card by the default method which is not much effective and will cause problems goto settings from the menu, click on Install Location and select Internal
You are now free of the low memory issue with your phone.
This is how I got Link2SD to work on my QMobile Noir A2, and I love it. I have been able to install 45 applications on my mobile, including all big popular games.
Here is screenshot of my mobile after I used Link2SD and installed many games as you can see for yourself here that how much Internal Memory is even after installing these many applications:
Regards,
RaHBeR
facebook.com/RahberLeader/
Edit Info:
- 9th July 2013
Tutorial created
- 13th July 2013
Added working screenshots of Link2SD
good guide (Y)
finally someone did i was an developer of noir a2 but i moved to another phone kudoz to you man makin link2sd work perfectly
This is the error I am receiving:
/data/sdext2 mount not found.
Ghulam Muhammad Mustafa said:
This is the error I am receiving:
/data/sdext2 mount not found.
Click to expand...
Click to collapse
Where do you get this error, in which application?
Regards,
RaHBeR
How To Change Boot file Qmobile A50 ..
Dear All
Please give me solution .....
Can we use data2sd method with noir a2 to increase the internal memory ?
Can We Do Same With Our Mobile Internal Memory?
Thank you for this great article and I'm going to try this trick right now. I have a question also, Can we not use our mobile Internal memory instead of memory card memory? Actually I have 4 GB free internal memory and the other benefit is apps developers prefer that the apps should be stored in internal memory.
please tell me any one how about sdcard memory & sdcard memory use in internal memory or not ?
---------- Post added at 06:50 PM ---------- Previous post was at 06:49 PM ----------
please tell me any one how can i update my qmobile m90 on new android lollipop 5.1 info
My phone q i9 increace the internal memory plz help sir
Hello everyone !
Many of you - Xperia M4 Aqua Users heard about Adoptive Storage on Marshmallow, but it was fake info. There isn't any adoptive storage on M4 Aqua.
If you have 16GB version - lucky you, If you have 8GB - I will show you how to create "Adoptive" Storage on this phone (This will also work on Lolipop and on any device, by the way).
What you need:
-ROOTED Device
-App2SD: All in One Tool App (You can find it on Google Play)
-SD Card (I think at least 8GB but 16GB is recomended)
-OPTIONALLY (if you already have SD Card and data on it) - a computer to backup your data on SD Card
Creating "Adoptive Storage" on Xperia:
1. Download App2SD App from Google Play
2.Run App and grant root access
3.Swipe down and search for "Partition Tool"
4.Look at the top - There is a Slider you can change the space of your 1st partiton on SD Card with it. 1st Partition is for all data, videos, music, documents you have on your SD CARD. The 2nd partition is for apps you move to SD Card. The Last - 3rd is a swap partition. If you have 8GB SD Card I recommend you to set 1st partition size to 3000mb between 5000mb and Swap Partition - around 100mb. The 2nd partition will set automatically. Don't Forget that this settings are individual - how much space you need for you files on SD Card and how many apps you want to move to SD.
There is my preset (for 8GB):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
For 16GB, situation is the same. I don't know if someone want 8GB space on 2nd partition for your apps. 4GB 2nd partition size is optimal.
5. WARNING! This action will erase your data on your SD Card - Make Sure you have a backup!
I don't take any responsibility for accidentally erased SD Cards
6.If you have a backup and your partitions sizes are ok, you can tap "Yes" Button.
7.After creating partitions, the phone will reboot.
8.After reboot, start App2SD again. Probably the app will inform you that 2nd partition is not mount - don't soft reboot. Click "No" and go to "Link apps to SD Card". Then in window "Select SD Card 2nd partition and file system" check option "Advanced method" (Mount script). I have tested all methods on Xperia M4 Aqua - for me only Advanced method helped. Click OK and if you got window about systemless root, click "Yes". The App will create mount script. After that you can click the menu icon on the top left of screen and select "Remount 2nd partition" (you can also recreate mount script if something went wrong) If your 2nd partition has been remounted successfully you are ready to move apps to your 2nd partition on your SD Card.
9.Moving apps to SD is very easy and simple. Go to "Link apps to SD Card" and here you have all installed apps on SD.
Click this button to filter your apps - we want to see only User apps not system apps - its not the best idea to move system apps lol
Check "User" option and go to next step
10. Find the app you want to move and click on it. Swipe down and click "Link/Unlink". Swipe down again and check option "Select All" - you will select all application - odex, library etc and click OK. App2SD will move your application to 2nd partition on your SD Card.
11. Congratulations ! You correctly moved your app to SD !
[Extra]12. You can move other apps to SD and release space on you internal storage, Google apps (like: Google Services, Gmail) may not work after moving!
as I said before moving system apps is not the best idea.
Troubleshooting:
-After Reboot i don't see moved apps ! Help!
1.If you don't see your apps after moving, try to use another method of mounting script and recreate it 2. In SuperSU app go to settings and find "turn on su during the boot" and turn it onIf you have any other questions, ask down below
*********************Donations********************
If you like my work, here is a paypal donate link:
www.paypal.me/thestrongskye
Every donations are welcome, Thank you.
****************************************************
Could maybe try it!
Great work
I tested to link gmaps, google, strava, spotify just to test on a spare 8Gb card and it worked perfectly! Your tutorial was easy to follow, awesome man.
I have a 32Gb card on another phone, so do I need to unlink the 4 apps and then swap SD card and then redo your tutorial?
Great work!
EDIT:So I unlinked the 4 apps, then went back to partition tool and pressed erase SD card, and phone restarted.
is it ok now to swap cards and redo this tutorial?
I tried this with 32gb card and it works with no problem for a week now.
Thanks!
MrPilot said:
I tested to link gmaps, google, strava, spotify just to test on a spare 8Gb card and it worked perfectly! Your tutorial was easy to follow, awesome man.
I have a 32Gb card on another phone, so do I need to unlink the 4 apps and then swap SD card and then redo your tutorial?
Great work!
EDIT:So I unlinked the 4 apps, then went back to partition tool and pressed erase SD card, and phone restarted.
is it ok now to swap cards and redo this tutorial?
Click to expand...
Click to collapse
First, Relink your 4 apps to your internal storage, then put your 32gb SD card in phone and go to the tutorial again (you need to create partitions, backups again and stuff like that, good luck :])
I have a Tab S4, so I'm posting this question here, but it really is a general android question, so if anyone knows a better forum to post at please let me know....
So I use otg dual drives to copy files back and forth between my phone, tablet and PC. I've had errors galore including scrambled data and a fried thumb drive issues started on my Tab S2 and seem worse on my Tab S4. Both my primary drives were SanDisk. For the S2 it was an Ultra Dual USB / micro drive for the S4 it was the Dual ultra with adaptor to USB C as well as a USB C to USB 3.1 dual drive. They are both formatted exFat32.
I always eject from windows. On the tablet, I usually use ES File Explorer, and use the eject button therein.
On the PC, it almost always pops up with the warning "your drive has problems, click to scan for errors" and scanning lead to scrambled files.
On ES File Explorer, it usually is detected initially as both an sd card and a USB drive; the card designation disappears after you select the drive. Usually you hit eject and the drive drops off the list, but sometimes it reappears as an SD card. Then I can't eject it, even through Android settings, and files always are scrambled when I disconnect. In the worst case, the USB Ultra drive was locked read-only and had to be exchanged by RMA.
So what is causing all the problems? Is there a safe way to transfer files with a flash drive? Or do I need to figure every third or fourth time I'm going to lose all the files on the drive?
Thanks
Joe
I know I'm bumping an old thread, but I would like to point out, ES File Explorer is to be avoided! The app was great many years ago, but then they introduced so much bloatware.
I use FX File Explorer. Developers are US based. They provide error handling on file transfer corruption. If I am doing a large file transfer I will use copy/paste, which is safer.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Yes, since I originally posted this thread, ES File Explorer has been pulled from the Play Store. I've since switch primarily to Solid Explorer. Granted they are Eastern European., still not American. There are features I miss from ES File Explorer, but I haven't had any problems with my USB storage devices since I made the switch. I think the eject function in ES File Explorer was the culprit. In Solid Explorer, "eject" takes you to the Android storage settings where you dismount the memory stick. It isn't as convenient as an eject button within the explorer app, but it seems to be much more reliable. Not only have the file scrambles gone away, but I no longer get the message that the stick needs to be error checked.
Thanks
Joe
drjoe1 said:
Yes, since I originally posted this thread, ES File Explorer has been pulled from the Play Store. I've since switch primarily to Solid Explorer. Granted they are Eastern European., still not American. There are features I miss from ES File Explorer, but I haven't had any problems with my USB storage devices since I made the switch. I think the eject function in ES File Explorer was the culprit. In Solid Explorer, "eject" takes you to the Android storage settings where you dismount the memory stick. It isn't as convenient as an eject button within the explorer app, but it seems to be much more reliable. Not only have the file scrambles gone away, but I no longer get the message that the stick needs to be error checked.
Thanks
Joe
Click to expand...
Click to collapse
do you why it was pulled?
Sent from my SM-G975U using Tapatalk
The Chinese publisher had all their software pulled for violating Google Play Store policies including not identifying the real publisher names, and fraudulent ad-click behavior.
See
https://www.androidpolice.com/2019/...lay-store-possibly-part-of-do-global-scandal/
Or do a Google search.
Joe
ilabstudios said:
I know I'm bumping an old thread, but I would like to point out, ES File Explorer is to be avoided! The app was great many years ago, but then they introduced so much bloatware.
I use FX File Explorer. Developers are US based. They provide error handling on file transfer corruption. If I am doing a large file transfer I will use copy/paste, which is safer.
Click to expand...
Click to collapse
The free version is garbage The Old Pro version is amazing. I still use it today I keep the old version of the file on an SD card in anytime I get a new device I just load that up
My Tab S4 cant copy files back to OTG Flash drive !!!!!!!
Ok I have a Sandisk dual drive and m using it on my Tab S4. it copies data from the Pen Drive to the internal and Micro SD card but when I try to copy anything from the Tab onto the Flash drive it shows "Operation not Possible"............ Weird Issue. Any Solutions guys???
So a number of the stupid questions that always need to be asked :
Is the drive formatted for exFat 32? If not reformat it.
Do you always properly eject the drive from Windows and unmount it from Android? If not, it may need to be reformatted.
What file manager are you using?
Does it work using a USB 3.0 hub or a USB 3.0 to USB C adaptor?
I find I get the best results by installing and removing the drive systematically:
1) Insert the drive
2) Wait for the tablet to recognize the drive. In the upper left status bar you'll see the USB icon and if you swipe down it will say "SanDisk USB Drive, Tap here to transfer media files" Don't bother tapping to transfer, just move on to #3.
3) Open your file manager and copy to / from the drive. I like Solid Explorer because it opens two locations side by side. Choose internal memory or SD Card for one side and the USB drive for the other.
4) Close the file manager
5) Swipe down and press the down arrow next to "SanDisk USB Drive" "settings" and unmount the drive
6) Wait until the pop-up says unmounted before you unplug the drive
I sometimes get read errors if I skip step #2 above. You can scramble the drive if you fail to dismount it (or manually eject it from Windows)
Good luck,
Joe
This is old, but I'll update it. I've had the USB notification on the status bar disappear from my Tab S4 and S10 Edge. It reappeared on my Tab S4 after the Android 10 update. Ot sure why it went away or why it came back. While it is gone you have to go to Android settings, device care, storage, advanced, and unmount the USB drive. Your file manager may have a shortcut - Solid Explorer does; press the three dots next to the drive name in the drive list and press unmount and it takes you directly to the Android settings screen.
Joe
OUTDATED METHOD, CAN RESIZE PARTITIONS DIRECTLY IN "HEKATE".
This seems to be a popular question on the release thread, so I thought I would share the method I used to resize the partitions included in the stock switchroot android image.
You can do this a number of ways, I'm lazy tho.. so I went the fastest route I could think of.
All of the following steps were done on a linux virtual machine running the gparted live ISO.. this is not a tutorial how to setup a virtual machine or linux, I'm going to assume you're competent enough to do that as all the steps will require one or the other!
What tools are we going to be using?
gparted (GUI interface)
gdisk (terminal)
The only steps taken prior to what I'm going to share here is that I flashed the 16gb image to my microsd.
So what is the end goal?
Expand the general storage (fat32) partition.
Expand the android user data partition.
Allocate a partition for emummc (optional).
Repair the MBR which we destroy by resizing the partitions.
First thing I did was capture some data of the default partition layout for reference:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Great now that we have that, lets get stuck into it.
GPARTED
Fire up gparted and you'll be presented with the following popup:
We want to hit the "Fix" button.. this will allow us to utilise all the remaining space on the microsd card.
As soon as we do this tho, there is no turning back.. you'll need to complete the tutorial.
What we're looking at here is the default layout, note the unallocated space highlighted below:
The first thing we're going to do is expand the android user data partition (sdd7 in the screenshot above).. Right click "userdata" -> "Resize/move".
I decided to go with 32GB which should be plenty, how large you want to make this partition is entirely up to you.
The next thing we're going to do is move the partition down the stack, we do this by entering "0" into the "free space following" field.
You'll notice the white box surrounded by the dark purple border has moved position to the far right to reflect your changes.. hit the "resize/move" button and confirm the warning window.
You can now see the "userdata" partition has moved down the stack, will be resized to 32GB and our unallocated space has moved up.
We're now going to repeat this process for the remaining android partitions (without resizing tho).. starting from the "dtb" partition and working our way up to "vendor".
Right click partition -> "Resize/move".
Modify "free space following" to "0".
Hit the "Resize/move" button.
Confirm the warning.
You get the idea.. repeat this process until you reach the "hos_data" partition.
Eventually you'll be left with something like this, note the unallocated space is now directly under our "hos_data" partition.
It's time to expand our fat32 partition, you can drag the black arrow on the right hand side all the way to the end to set the maximum size.
[EMUMMC USERS ONLY] If you intend on using emummc we can allocate some space for the partition by entering "29856" in the "free space following field", this will automatically reduce the partition size to accommodate the required free space.. this step is completely optional.
[EMUMMC USERS ONLY] We need to create a new partition (right click "unallocated" -> "new").. the only option we're going to change here is the "file system" field to "unformatted".
Now is the time to verify all our settings are correct before finally hitting the apply button.. confirm the warning and let it do its thing.
Before closing gparted, we want to take note of the drive identifier located on the top right of the screen.. mine is "/dev/sdd", we're going to be using the next steps.
GDISK
All the remaining steps will be executed using gdisk in a terminal window.. first of which will be the following command:
Code:
sudo gdisk /dev/sdd
Replace "/dev/sdd" with your drive identifier.
Input "r" as a command, this will enter us into the "recovery/transformation" submenu.
You can output the MBR & partition table by inputting "o" & "p" as commands, since we used gparted the MBR has been modified.. we need to revert this back to ensure everything plays nice.
Input "h" as a command, this will create a new hybrid MBR to replace the one we destroyed with gparted. If you intend on using emummc we need to add both the hos_data partition (#1) & the emummc partition (#8)..
You would do this by entering:
Code:
1 8
Otherwise if you're not planning to use emummc, we just add the hos_data partition (#1):
Code:
1
Place EFI GPT parition first in MBR?
Code:
N
Creating entry for GPT partition #1 (MBR partition #1)
Enter an MBR hex code:
Code:
EE
Set bootable flag?
Code:
N
[EMUMMC USERS ONLY] Creating entry for GPT partition #8 (MBR partition #2)
Enter an MBR hex code:
Code:
0b
[EMUMMC USERS ONLY] Set bootable flag?
Code:
N
Unused partition space found. Use one to protect more partitions?
Code:
N
Great, now lets output the MBR & partition table by inputting the "o" & "p" commands once again to confirm our changes.
Looking good! :good:
The last thing to do is write our changes, we do this by entering the "w" command.
Do you want to proceed?
Code:
Y
That's it folks, we're done! I know this was a little lengthy... hopefully this helps some of you out!
If you're interested in knowing more in-depth info about hybrid MBR's I came across the following website that contains invaluable information: HERE.
Awesome. Thanks for the guide! It seems as though my suspicions weren’t unfounded. Seems like we do have to write the android image to SD first before an easy change can be made. I’ve been trying to do this manually for the past week or two, but I’ve always failed because I never got the partition map setup correctly(have only tried a few times as well).
Are you familiar with how the partition map needs to be set? I’d love to practice getting this setup manually.
This is interesting. I'll give this a try. Thanks for putting this up.
Are steps 9 & 10 needed if I'm planning to create a fresh emummc via SX OS?
My current setup is one emummc/emunand and I'm using it for both Atmos and SX.
Thank you very much, especially for the gdisk part!
Move/Resize "Unknown filesystem" partitions?
Having trouble moving these. Gparted doesn't seem to want to let me do it. Any known variables that may influence this?
~~Tito~~ said:
Awesome. Thanks for the guide! It seems as though my suspicions weren’t unfounded. Seems like we do have to write the android image to SD first before an easy change can be made. I’ve been trying to do this manually for the past week or two, but I’ve always failed because I never got the partition map setup correctly(have only tried a few times as well).
Are you familiar with how the partition map needs to be set? I’d love to practice getting this setup manually.
Click to expand...
Click to collapse
You're very welcome!
What other info did you need beside what is shown above? Nothing is stopping you from creating the partitions manually, but why would you.. seems like a waste of time to me!
geckoquiver said:
This is interesting. I'll give this a try. Thanks for putting this up.
Are steps 9 & 10 needed if I'm planning to create a fresh emummc via SX OS?
My current setup is one emummc/emunand and I'm using it for both Atmos and SX.
Click to expand...
Click to collapse
Zero experience with SX OS, can't say for sure.
If it were me, I would backup my current emummc, create a new partition & restore it (this is actually exactly what I did, I was migrating sdcards tho).
tabzer said:
Having trouble moving these. Gparted doesn't seem to want to let me do it. Any known variables that may influence this?
Click to expand...
Click to collapse
I'm assuming you're not using the gparted live CD? You need to make sure the partitions are not mounted.
If you continue to struggle just do yourself a favour and use the gparted live CD/USB, don't waste your time chasing your tail trying to troubleshoot.
fOmey said:
I'm assuming you're not using the gparted live CD? You need to make sure the partitions are not mounted.
If you continue to struggle just do yourself a favour and use the gparted live CD/USB, don't waste your time chasing your tail trying to troubleshoot.
Click to expand...
Click to collapse
Thanks. I was using Ubuntu, and even with the partititons unmounted, I was only allowed to resize/move the partitions that were not "unknown". It seems the gdisk live is even more powerful. I don't really understand what the difference is. But it works.
If I resize after mounting the 128gb image to 64gb, will I'll be able to use the remaining 64gb like a normal sd card?
So after doing this, I can't run any of the games that are installed to my SD card (I copied my old fat32 partition off and back after following this guide). Any idea why this happened?
Also, any way to access the fat32 partition from within Android itself?
Did you restore an image to the partition, or did you copy your files manually?
~~Tito~~ said:
Did you restore an image to the partition, or did you copy your files manually?
Click to expand...
Click to collapse
Copied my files manually. I've done that before when upgraded SD card to a larger card and no issues.
First, Nice guide..... As the person that wrote the original guide, I would recommend creating the partition scheme from scratch, so you dont have to move the data a bunch. Then copy the partition info from the individual partitions manually, like my original guide said.
BTW @op congrats on posting a decent guide before me. I was getting there, but got caught up in life.
bfenty said:
So after doing this, I can't run any of the games that are installed to my SD card (I copied my old fat32 partition off and back after following this guide). Any idea why this happened?
Also, any way to access the fat32 partition from within Android itself?
Click to expand...
Click to collapse
Verify the hybrid MBR is setup correctly.
gavin_darkglider1 said:
First, Nice guide..... As the person that wrote the original guide, I would recommend creating the partition scheme from scratch, so you dont have to move the data a bunch. Then copy the partition info from the individual partitions manually, like my original guide said.
BTW @op congrats on posting a decent guide before me. I was getting there, but got caught up in life.
Click to expand...
Click to collapse
Original guide?
Creating partitions manually is a waste of time in my opinion.. much easier and faster to simply move them.
EDIT: I will add there's no wrong way to do this, if you prefer to create the partitions manually go for it.. whatever works!
fOmey said:
I'm assuming you're not using the gparted live CD? You need to make sure the partitions are not mounted.
If you continue to struggle just do yourself a favour and use the gparted live CD/USB, don't waste your time chasing your tail trying to troubleshoot.
Click to expand...
Click to collapse
I also cannot move the partitions with unknown filesystems in gparted. No partition is mounted and isn't possible via ubuntu gparted and also not via gparted live usb...
Any ideas?
Edit: Tried to write the 3 partitions with unknown filesystem to .img files, format the partitions, move them, write the .img files back and do the gdisk stuff.
This also didn't work, hekate says no fat32 partition recognized though I can mount it just fine in ubuntu...
...No idea how you moved the partitions with unknown filesystems, I read gparted doesn't allow this by default.
hey, I've been trying to get this done for some time now but I haven't has thought your guide would help me but I keep running into the same problem.
keeps telling me that it's unable to mount SD card
The flag for the main FAT partition needs to be 0C. Gdisk will be your friend.
trohn_javolta said:
I also cannot move the partitions with unknown filesystems in gparted. No partition is mounted and isn't possible via ubuntu gparted and also not via gparted live usb...
Any ideas?
Edit: Tried to write the 3 partitions with unknown filesystem to .img files, format the partitions, move them, write the .img files back and do the gdisk stuff.
This also didn't work, hekate says no fat32 partition recognized though I can mount it just fine in ubuntu...
...No idea how you moved the partitions with unknown filesystems, I read gparted doesn't allow this by default.
Click to expand...
Click to collapse
I didn't do anything special..
Post the output of gdisk o & p command from the recovery menu.
JaRocker said:
hey, I've been trying to get this done for some time now but I haven't has thought your guide would help me but I keep running into the same problem.
keeps telling me that it's unable to mount SD card
Click to expand...
Click to collapse
Post the output of gdisk o & p command from the recovery menu.
Any changes you make in gparted will require you to go back to gdisk and restore the hybrid MBR.
hey so i followed the guide before with 16gb and it worked great.
i'm redoing it with 64 gb and i can't get around the very first step of moving userdata to the end.
anytime i try to do anything to it i get a warning saying "moving a partition might cause your OS to fail to boot" which i didn't get the first time around.
then when i apply the changes, it immediately gets an error.
any suggestions for this problem? Thank you!
So i followed the guide and it works. Now i have some questions to further improve my current setup below:
256gb microsd with SX OS, Atmos, Android (No more swapping of cards).
My problem now is I cannot use SX OS to create hidden partition emunand as this will format the sd card and i will lose the android partitions and configs.
One option is file based partition but my preference is hidden partition so i can again use same emunand if i want to toggle between SX OS/Android/Atmos.
This is because atmosphere file based emunand is not stable as per devs and i also cannot get it to work using my SX OS file based partition.
I used atmos emummc but SX OS is not detecting it obviously.
The questions are:
1. For emummc, can i put that in front so it will be at sector 0X2 which i believe what SX OS config is looking for?
2. If i just use gpart to move the emummc partition in front do i need to repeat all the gdisk commands again?
3. If my aspiration is not possible at all then i will just stick with SX OS file based partition. Can i delete the atmos emummc and just extend the fat32 partition so i can reclaim space? Do i need to run the gdisk commands again?
~~Tito~~ said:
The flag for the main FAT partition needs to be 0C. Gdisk will be your friend.
Click to expand...
Click to collapse
Oh so flag is the mbr hex code, right? And you say it should be 0C? I will try that.
In the guide it says enter EE for mbr hex code.
------
TLDR
---
As most people know, 8GB is not enough for modern smartphones. With this mod, I provide a modified 'fstab' file and instructions on how to expand '/data' to install apps without root and in a universal way. All apps will install as if in internal storage.
Furthermore, given the old age of these phones, internal eMMC will progressively degrade until the phone dies completely. I have experienced going from 10MB/s writes, to 5, to 2 and then a completely dead phone. This extends the life of eMMC by only writing Android updates to eMMC and will improve responsiveness in phones with very worn eMMC flash.
This is work in progress (some slowdowns occur depending on the card), but I have been daily driving this mode for two months now. I have made adjustments so that the microSD stalls less than stock 'fstab' and EXT4 filesystem.
Example of 64GB card, w/ backup partition (p2) created, still 26GiB free for apps:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
---
THIS MAY DELETE YOUR DATA OR SOFT-BRICK YOUR PHONE. Be careful beforehand and backup your data to another microSD card.
IF YOUR PC HAS eMMC DRIVE, /dev/mmcblk1 MAY BE YOUR OS. Check before doing anything and after each reboot, as sometimes Linux reassigns them on machines with eMMC + card reader.
---
TODO/BUGS
---
- Used space will be messed up if you use more than one partition (can't be mounted as removable storage) but free space will be correct.
- Sometimes I have experienced reboots, with no data loss that I can find. I don't think it is related to this ROM mod.
- F2FS is still experimental and has no way to recover from a corrupted drive/card. If something goes wrong, your only option is to dump the files with PhotoRec software and try to recover what you can.
The data will be there but F2FS can't seem to recover from a damaged superblock.
I have used on one phone without issues for 3+ years but when there is SB corruption it can't recover.
- Push this to a 16.0 ROM, which is lighter on the RAM and has ambient display. (just personal preference) This requires a custom ROM.
---
HARDWARE
---
First you need a capable microSDXC card, I have only tested SanDisk Ultra A1 which are not perfect. SanDisk Extreme 64GB A2 class are probably good but please report performance if you try it. I only recommend this class of cards.
The problem with Sandisk Ultra is that sometimes they stall doing GC and the phone also stalls. This is quite random and will be worse if you use the phone for extended periods without time for background GC to run.
The advantages is they do some kind of wear-levelling and I am yet to see one of these cards die to wear out, despite being used on RPi machines 24/7.
SanDisk Ultra cards (A1 class) and most SanDisk USB drives have issues where they perform great when new but don't do proper garbage collection and will get very slow after a couple of days. So benchmarks look fine but real world it becomes really bad. I had a USB drive that only recovered to 5MB/s writes, that was the baseline, after three or four sequential wipes to most of the drive. These types of cards will also be very slow if you try them as adoptable storage.
Any microSD will work but choose a fast one and please help test different brands.
You also need a PC, preferably with Linux, and a card reader of any kind. This can be done in Windows through TWRP and ADB access but I don't recommend it.
---
BASICS
---
We will format the microSD card with one or two partitions. If you split it, you can do manual backups for the second partition but you can't mount it. Remember that by using /data on the SD card, you cannot use TWRP to backup to it. The modded '/data' partition will mount as a removable SD card in stock TWRP.
Download files:
Arco68's LineageOS 17.1 ROM
The new 'fstab' file from Pastebin: fstab.qcom.
Process flow:
Install 'adb' and enter TWRP mode to access shell,
Use fdisk to create a DOS partition table
Add a new partition with half or full size, starting at block 32768. Leave 1 or 2GiB space free and don't touch it with data. Some types of cards will be able to use these for better performance.
(OPTIONAL) Create 2nd partition right after the first one.
Change the partition(s) type to 'Linux' and spare space as 'Hidden HPFS/NTFS'.
Format partition(s) as F2FS (can also do ext4 but should be unusable),
After this, we will install arco68's 17.1 ROM and push a new 'fstab.qcom' file that will mount the microSD partiton as '/data' and the phone can use it to install apps and user data.
Encryption has not been tested and is not expected to work.
---
PREPARE microSDXC CARD
---
You should also format the card on a Linux PC if you can, as recovery has outdated f2fs-progs or not at all. The ROM has modules and will boot F2FS when instructed to do so.
Check that /dev/mmcblk1 is your microSD card reader BEFORE PROCEEDING! Otherwise, you may nuke your OS!
Do the procedure as listed before, first thing is to 'p' to check you are on the right microSD drive.
Then create the new DOS table and the partitions. This is for expert users only, at this time I will not post detailed fdisk commands.
The output from 'p' print command looks something like this:
Disk /dev/mmcblk1: 31.00 GiB, xxx bytes, 16252928 sectors
Disk model: Sandisk Ultra
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xZZZYYYXXX
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 * 32768 62947327 62914560 30G 83 Linux
/dev/mmcblk1p2 62947328 yyyyyyyy xxxxxx 900M 17 Hidden HPFS/NTFS
Click to expand...
Click to collapse
You have to manually type '62947328' for the start of the hidden partition. This is only required if you had put data on the card, upon which you should TRIM the unused blocks:
blkdiscard -v /dev/mmcblk1p2
Click to expand...
Click to collapse
If you have a partition to do backups, this moves to p3. Next we format p1 to use as '/data':
mkfs.f2fs -s 2 -z 1 -g android /dev/mmcblk1p1
Click to expand...
Click to collapse
Now we move the card into the phone.
---
ADB COMMANDS
---
This tutorial assumes you have arco68's LineageOS 17.1 from this ROM already installed.
You need to boot the phone in recovery mode by rebooting with VOLUME UP + HOME pressed, until you see 'recovery booting' on the top of the screen.
Next, mount the /system partition and push the new 'fstab' file from your PC:
adb push fstab.qcom /system/vendor/etc/fstab.qcom
Click to expand...
Click to collapse
After this is completed wait a few seconds, unmount system and reboot the phone. It should take a while for the first boot but you should see the setup screen and everything should be running.
If it is not booting, go to recovery or remove the microSD card and check if files are being created on the drive. If yes, everything seems ok. S4 Mini has a very long first boot, for some reason.
Enjoy your new S4 Mini storage of 32/64/128 GB!
RESERVED FOR microSDXC user reports.
I already have LOS 17.1 on my gt-i9192, is there any video tutorial to help out in the SDCARD mod process?
Not really. Are you familiar with Linux and formatting hard drives? If you are, it's mostly install the software and run the commands. You need to know how to find the sdcard device node in /dev (if it's sdX or mmcblk0/1, depending on the PC).
I can help you out or post a preformatted MBR file so you can just write it to the SDCard.
As my 18.1 phone has eaten it's eMMC, I think I'll do this on my next one. Have you used this with Magisk?
ivorget said:
As my 18.1 phone has eaten it's eMMC, I think I'll do this on my next one. Have you used this with Magisk?
Click to expand...
Click to collapse
I definitely recommend doing this then, as I had my eMMC also down to something like 2MiB/s sequential writes before it died - after a few months - and killed the phone completely.
I have never used Magisk nor really understand it's purpose. What would you want to accomplish?
so it's possible format microSD as EXT4?
Yes, it is but you would need to change the above FSTAB file entry for 'mmcblk1p1' from F2FS to:
/dev/block/platform/msm_sdcc.3/mmcblk1p1 /data noatime,nosuid,nodev,auto_da_alloc
I would advise you to not use EXT4 as that is usually more suited to flash with advanced FTL and even TRIM support.
tM&M said:
I definitely recommend doing this then, as I had my eMMC also down to something like 2MiB/s sequential writes before it died - after a few months - and killed the phone completely.
I have never used Magisk nor really understand it's purpose. What would you want to accomplish?
Click to expand...
Click to collapse
Sorry, just saw this now. Yeah I went and ahead and did on 18.1 and it's working great so thanks for making this guide. I guess it's not really necessary as it hasn't caused you issues but I also fixed the relevant userdata partition line in /vendor/etc/selinux/vendor_file_contexts.
A GPT partition table also works fine now, maybe was just lucky as I saw afterwards that was a recent fix lifted into our kernel. Using gparted and mkfs.f2fs from a recent linux system doesn't seem to have caused any issues either.
I'm using a V10 speed card which I think is about the speed of the original eMMC so should probably be the suggested minimum.
Magisk I use for root, mainly for a Tasker setup to tweak charging to extend battery life. I'll tidy it up enough to share at some stage.
Anyway I took a chance and Magisk does work on this setup too.
ivorget said:
Sorry, just saw this now. Yeah I went and ahead and did on 18.1 and it's working great so thanks for making this guide. I guess it's not really necessary as it hasn't caused you issues but I also fixed the relevant userdata partition line in /vendor/etc/selinux/vendor_file_contexts.
A GPT partition table also works fine now, maybe was just lucky as I saw afterwards that was a recent fix lifted into our kernel. Using gparted and mkfs.f2fs from a recent linux system doesn't seem to have caused any issues either.
I'm using a V10 speed card which I think is about the speed of the original eMMC so should probably be the suggested minimum.
Magisk I use for root, mainly for a Tasker setup to tweak charging to extend battery life. I'll tidy it up enough to share at some stage.
Anyway I took a chance and Magisk does work on this setup too.
Click to expand...
Click to collapse
If you can share the context file that would be great. I was having some issues with contexts but this was not MOD related - happened wit the stock ROM - and had to manually fix contexts on TWRP. So maybe that was the issue.
Do please post what card you are using and if you experience performance degradation after a couple of weeks. SanDisk cards are notorious for only running well the first couple of days as they don't have background GC and maybe are not suited to F2FS/EXT4 at all.
tM&M said:
If you can share the context file that would be great. I was having some issues with contexts but this was not MOD related - happened wit the stock ROM - and had to manually fix contexts on TWRP. So maybe that was the issue.
Do please post what card you are using and if you experience performance degradation after a couple of weeks. SanDisk cards are notorious for only running well the first couple of days as they don't have background GC and maybe are not suited to F2FS/EXT4 at all.
Click to expand...
Click to collapse
OK I've attached the file - remove the .txt extension. Search for mmcblk1p1 to see the changes - one line referencing mmcblk1p1 commented out and another line where the data partition is changed to that.
(Full disclosure: I'm using partition 4 so I didn't need to comment out the mmcblk1p1 partition line in my setup.)
Reminder that the file is for 18.1 (unless you find that it's the same for 17.1). And to be clear for anyone else reading the full path it goes under is:
/system/vendor/etc/selinux/
My SD card is a Kingston Canvas Select Plus. The package indicates Class 10 U1 so maybe better to say that as the V10 only appears on the card label.
I am a little concerned that the default android 3-day trim seems to be taking longer but I'll keep an eye on it:
$ logcat | grep -E 'trim |Trimmed'
02-04 06:50:34.969 191 9173 D vold : Starting trim of /data
02-04 06:51:09.778 191 9173 I vold : Trimmed 397697024 bytes on /data in 34799ms