• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

SD hack for storage expansion

well CVS is just the pharmacy/store app. That is obviously a good reason I couldn't find Handcent to reinstall it. lol The other app isn't a big deal to be honest. I just used it to scan my refills. Which is only once a month.
You can just turn phone off take sdcard out...turn phone on Install the app with out SD then turn phone off insert sd card turn phone back on... That should help... Some app can not installed if its not on root for.
 
Upvote 0
well CVS is just the pharmacy/store app.
I see. Didn't think of the drug store right away when we were talking about apps. CVS means something else to a software developer. :)

So is it this one? https://play.google.com/store/apps/details?id=com.cvs.launchers.cvs
If so, are you running a JB-4.1.2 rom? According to the app's info section, the app requires Android 4.2 and up. Maybe that's the reason the Play Store won't let you install? The other CVS apps, Caremark and /specialty, have lower Android version requirements, so they seem to be fine.

Let me know if you notice other oddities.
 
  • Like
Reactions: Krlypumaa
Upvote 0
Yeah it seems like they have done a recent upgrade to that app which caused it to be no longer compatible. As I did try what the above person suggested about removing the SD Card. I guess it was just strange timing on these two apps and nothing to do with the SD Hack. Other than that I am very happy with the job you did on this issue. As it makes it so much more functional for me now.
 
Upvote 0
I had to upgrade to KK to be able to install an app needed for a peripheral. I had to upgrade the ROM or buy a new phone.

Incompatible apps were invisible on my phone's Play store. I realized that those apps even existed only when I searched for the app on my computer and it showed up as incompatible to all devices.

I spent a long time reading trying to figure out files and method to upgrade to KK. I combined the needed information in a package and wrote an easy to follow step by step method here which should make upgrading much easier:

http://androidforums.com/threads/me...-f6-lots-of-fixes.880135/page-50#post-7009463
 
Last edited:
Upvote 0
I have a question. For some reason , I allocated 10 gb ext4 onto the sdcard and 4 gb to fat32. I am only allowed 8.5gb of that 10 gb of ext4 . I'm assuming my phone internal storage got copied, moved to external, and format the internal storage and the external to be booted up when the phone is turned on. Tho, I would want to know if I have a class 4 16 gb sdcard , Is it possible that I could use linux swap partition to make it speed the process of reading apps in real time or is that mumbo jumbo to people?
 
Upvote 0
I have a question. For some reason , I allocated 10 gb ext4 onto the sdcard and 4 gb to fat32. I am only allowed 8.5gb of that 10 gb of ext4 . I'm assuming my phone internal storage got copied, moved to external, and format the internal storage and the external to be booted up when the phone is turned on. Tho, I would want to know if I have a class 4 16 gb sdcard , Is it possible that I could use linux swap partition to make it speed the process of reading apps in real time or is that mumbo jumbo to people?
Files in internal storage are copied to the external ext4 volume on the SD. The internal volume is not formatted. It is left intact. You can see for yourself by powering down the phone, removing the SD, and powering on the phone without the SD. If you observe the amount of space in Settings->Storage right before and right after the file copying, you should see the amount of used space (apps, etc.) is the same but the amount of free space is increased, just as one would expect. I hope that makes sense.

A class-4 card is probably not fast enough. You're likely to experience lag. I'd suggest getting a genuine Samsung or SanDisk class-10. If you're in the US, you can get a Samsung EVO 16gb for about $10, 32gb for $13, 64gb for $23 at Best Buy, Amazon, Walmart, etc. There are faster cards like Samsung PRO or SanDisk Extreme, but they cost more.

As for using swap space, my understanding is that it won't speed things up for you. In server and some desktop setups, swap is used to give the illusion of having more ram. The virtual memory helps with context switching. In a mobile setup, swap is less relevant, but there's one case where swap is useful. Having swap helps apps that get evicted from memory keep their states and transient data. In some apps like web browsers, that means web pages don't need to be reloaded or refreshed when you switch back.

You can create a separate swap partition or use a swap file. This hack shouldn't interfere with using swap, unless you somehow require the 2nd partition of the SD to be the swap partition. There is probably a lot of info you can find online if you want to do it.
 
  • Like
Reactions: The-Truth
Upvote 0
Also, just FYI a card can be class 10 and still not be good enough for the hack. Before this hack existed there was a different one which was much more difficult to set up and I was using a lexar class 10 SD card that I got at big lots for $20 and my phone was so slow it was unusable. I had done everything perfectly and it still lagged tremendously. I talked to some other people who had used it and didn't experience any noticeable lag and the difference was SD quality. Mine was labeled as class 10 but it was cheap. The people who were using a sandisk ultra or Samsung evo or better were having much better results.
 
  • Like
Reactions: The-Truth
Upvote 0
Files in internal storage are copied to the external ext4 volume on the SD. The internal volume is not formatted. It is left intact. You can see for yourself by powering down the phone, removing the SD, and powering on the phone without the SD. If you observe the amount of space in Settings->Storage right before and right after the file copying, you should see the amount of used space (apps, etc.) is the same but the amount of free space is increased, just as one would expect. I hope that makes sense.

A class-4 card is probably not fast enough. You're likely to experience lag. I'd suggest getting a genuine Samsung or SanDisk class-10. If you're in the US, you can get a Samsung EVO 16gb for about $10, 32gb for $13, 64gb for $23 at Best Buy, Amazon, Walmart, etc. There are faster cards like Samsung PRO or SanDisk Extreme, but they cost more.

As for using swap space, my understanding is that it won't speed things up for you. In server and some desktop setups, swap is used to give the illusion of having more ram. The virtual memory helps with context switching. In a mobile setup, swap is less relevant, but there's one case where swap is useful. Having swap helps apps that get evicted from memory keep their states and transient data. In some apps like web browsers, that means web pages don't need to be reloaded or refreshed when you switch back.

You can create a separate swap partition or use a swap file. This hack shouldn't interfere with using swap, unless you somehow require the 2nd partition of the SD to be the swap partition. There is probably a lot of info you can find online if you want to do it.
Huh, I thought allocating pages to swap while sd card was doing other tasks would do a loopty loop and make everything wonderful and logical. I guess it's just a pipe that get clogged.
 
Upvote 0
Can you elaborate just a bit more on this?

Once there is a swap partition do you need to do anything to "turn it on"? Or, once it's there, the OS just 'sees' it and uses it?
Okay let's just crack this open. Swap stores and Deletes these so called "pages". Pages are like little tiny notes, notes that get processed quickly allllllll around , just to keep your actual physical ram clean from potatoes. Now, since Android is a Unix, Linux based OS , the system reads it and uses it , but no able to be seen by user unless you have so many flipping applications opened that basically the pressure is built up that swap has to be used and per say that you just want to open an application and it takes forever to access it because of your ram .
 
Upvote 0
If only there was a way to connect my phone to a SSD then find a display screen and make a case so it would look like a regular fat phone with internal data of 132 gb and super fast data transfer. Over Kill it .
Samsung has recently released EVO+ 128GB.
Even if we have fast external storage, data still need to be transfered over the SD/MMC interface. Even the internal storage on this phone is just eMMC.

Huh, I thought allocating pages to swap while sd card was doing other tasks would do a loopty loop and make everything wonderful and logical. I guess it's just a pipe that get clogged.
People use paging and swapping to a much slower memory device to get more virtual memory (RAM). There are use cases where doing that makes sense. For a mobile device, Android's designers choose not to use swap space by default. Perhaps they don't want frequent paging to significantly shorten the lifespan of internal flash memory cells. Some users don't care about the lifespan of a replaceable SD card and would rather have the benefits of keeping states and transient data of inactive/background apps. So using swap is more of a choice than a general optimization tweak.
 
Last edited:
  • Like
Reactions: Masterchief87
Upvote 0
Can you elaborate just a bit more on this?

Once there is a swap partition do you need to do anything to "turn it on"? Or, once it's there, the OS just 'sees' it and uses it?
Well, what do you want to know? The command (with BusyBox) to set up a swap area is "mkswap". There are a lot of web pages and forum posts on this topic that can explain it better than I can.

To "turn it on," the kernel needs to be told that swap space is available. It can be done by the user with an app (using an executable binary) or with a BusyBox command ("swapon"/"swapoff", which can be used in a script). If a rom developer chooses to do it, it can be done at boot (fstab, init.rc, etc.).
 
Last edited:
Upvote 0
Files in internal storage are copied to the external ext4 volume on the SD. The internal volume is not formatted. It is left intact. You can see for yourself by powering down the phone, removing the SD, and powering on the phone without the SD. If you observe the amount of space in Settings->Storage right before and right after the file copying, you should see the amount of used space (apps, etc.) is the same but the amount of free space is increased, just as one would expect. I hope that makes sense.

A class-4 card is probably not fast enough. You're likely to experience lag. I'd suggest getting a genuine Samsung or SanDisk class-10. If you're in the US, you can get a Samsung EVO 16gb for about $10, 32gb for $13, 64gb for $23 at Best Buy, Amazon, Walmart, etc. There are faster cards like Samsung PRO or SanDisk Extreme, but they cost more.

As for using swap space, my understanding is that it won't speed things up for you. In server and some desktop setups, swap is used to give the illusion of having more ram. The virtual memory helps with context switching. In a mobile setup, swap is less relevant, but there's one case where swap is useful. Having swap helps apps that get evicted from memory keep their states and transient data. In some apps like web browsers, that means web pages don't need to be reloaded or refreshed when you switch back.

You can create a separate swap partition or use a swap file. This hack shouldn't interfere with using swap, unless you somehow require the 2nd partition of the SD to be the swap partition. There is probably a lot of info you can find online if you want to do it.
My class four sd card will kick your butt. Not really tho, it's a slow potato.
 
  • Like
Reactions: Krlypumaa
Upvote 0
Is it just me or does the phone take 10 minutes to boot now? I've had this hack installed since Sunday and the fastest boot time I had was 7 minutes. I'm on the xperion rom and everything works great after 10 minute boot. I'm also using a class 10 Samsung evo as my sd card.
@MaxGrit reported the same issue in posts #117 & #119. No one else has reported it before that, as far as I remember. So which rom are you using? Are you using the binary version of the hack or the init.d version? What happens during that 7 to 10 minutes of booting? Is the screen black, on the boot-up animation, on the lock screen but you can't do anything, or showing something else?

Does it help if you wipe Dalvik? Flash -wipe-dalvik.zip if you want to skip the "internal" dalvik, or wipe with TWRP/CWM then apply -wipe-dalvik.zip if you want to wipe all dalvik locations. First time booting up after wiping dalvik, Android will take some time to rebuild cache. So if the next reboot is quick, then the issue is gone.

Like I've said previously, if I can gather enough info to reproduce the problem at my end, I'll try to look for the cause and a solution. If the problem is more complicated (more fluky), there's a complicated-to-install-but-more-transparent-to-Android method to do SD storage expansion on the F6.
 
  • Like
Reactions: Krlypumaa
Upvote 0
Changes:
Apr 2 - updated installer to reduce size and to provide better installation messages; no functional changes.
Initial - Zips from #319 of original thread

-copy.zip
Copies data files from internal storage to external partition. It does not modify system files nor internal data files.

-install.zip
Installs binary to the /system folder. It does not modify internal data files nor external SD partition.

-uninstall.zip
Uninstalls changes made by the installer. It removes both the hack's main binary and workaround script. It does not modify the external SD partition.

I may sound really stupid for asking but once i download these files how do I install this
 
Upvote 0
Thank you all for the hard work! I was able to follow the instructions and get the phone boot up with more than 20G free space in /data shown in the Power File Manager. However, it still fail to install apps due to insufficient storage. Here are some screenshots I took:

F6_Error.png F6_Storage.png F6_Error.png F6_Storage.png
 

Attachments

  • F6_Data.png
    F6_Data.png
    94.6 KB · Views: 286
  • F6_RomVersion.png
    F6_RomVersion.png
    281.6 KB · Views: 296
  • Like
Reactions: Krlypumaa
Upvote 0
However, it still fail to install apps due to insufficient storage.
Well, I think you're the first person to report the infamous insufficient storage error with this hack. With enough space, this error should not occur with this hack in theory. The hack mounts the external partition before the core of Android is loaded. So the only space for /data as far as Android knows is the external ext4 volume. Maybe you've used other Android-based SD hacks before and there's a conflict? If you have and you choose to continue to use this hack instead, it's best to revert changes made by those hacks so that nothing interferes with Android itself.

In your case, I see you're trying to install HERE Maps. I've done that. When I did it, my external volume was only 4GB at the time and it installed without any problem. Have you previously tried to install it before using this hack? Maybe some files were left behind? If you've tried before, check the folder /data/app for "com.here.app.maps-*.*". And if the app is not currently installed, delete any "com.here.app.maps-*.*" file (-1.* or -2.* or both). If the app is already installed but it won't update, uninstall it, delete any "/data/app/com.here.app.maps-*.*", and reinstall. I hope that makes sense.
 
Upvote 0
Maybe you've used other Android-based SD hacks before and there's a conflict? If you have and you choose to continue to use this hack instead, it's best to revert changes made by those hacks so that nothing interferes with Android itself.

You are right, WarrantyVoider. This is exactly the issue. I recalled today that I did "pm set-install-location 2" to set the default installation location to be external. This might have caused confusion to the SD hacked system when it tried to install apps. Once I change the install location back to internal, everything works fine.

Thanks a lot for the help!
 
Upvote 0
Xperion ROM by itself booted up fast. I was using that for a while until I needed to install the SD hack. After I installed the SD hack, phone took ~8 minutes to boot, but afterwards phone works as normal.
Is it just me or does the phone take 10 minutes to boot now? I've had this hack installed since Sunday and the fastest boot time I had was 7 minutes. I'm on the xperion rom and everything works great after 10 minute boot. I'm also using a class 10 Samsung evo as my sd card.
I might have an answer for this. I needed to run Xperion to troubleshoot something else for another user. I knew my test partition wasn't blank, but since there was a possibility the files in there had belonged to Xperion, I just deleted a tag file and let my installer (using the init.d version in this instance) erase the files before copying from internal storage. When the system rebooted, the rom took longer than usual to load. I noticed the lock screen was not the default and some extra apps appeared in the app drawer when the rom was supposed to be clean Xperion. I realized my test partition had previously contained files belonging to the stock rom instead of Xperion.

Clearly, the nonempty partition needed to be wiped first. I've said so and given instructions in the first post. I don't think I've ever updated my init.d version to deal with the Selinux enforcing mode in hroark13's TWRP, so it's likely not all files were properly deleted by the script. To fix the issue, I cleaned the external ext4 partition using the method stated in the first post (with the "rm -rf" option) and then reapplied the hack. This time the rom booted up quickly as expected and everything seemed right.

To summarize, if you're installing the init.d version with TWRP and your external ext4 partition is not empty, you should delete everything in the partition first. The instructions to do this using TWRP's GUI are given in the first post.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones