Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,768,042 Members 42,419 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE][MOD][GB] Swap internal memory with external sd

Tip us?
 
gearbox87x
Old
#51  
gearbox87x's Avatar
Member
Thanks Meter 13
Posts: 52
Join Date: Sep 2011
Location: Kollam
Thumbs up Thanks

Thanks For Sharing.....!
 
b99721
Old
(Last edited by b99721; 20th April 2012 at 03:59 PM.)
#52  
Senior Member
Thanks Meter 25
Posts: 159
Join Date: Apr 2012
Location: Delhi
Quote:
Originally Posted by kayospark View Post
I know that. This is how exactly shows to me, but can't move installed games or apps from phone storage to external_sd (now usb storage) it says "SD card full" but it's half empty.
I faced the same issue, and therefore made some modifications to the vold file provided by PUDUP. (great work btw)
After several hit and trial attempts, I have my external SD swapped with the internal SD, without "SD card full" error on attempting to move apps to SD card. I have uploaded my modified vold for your reference. Hope this helps.

My tweak was simple - don't know why it worked though on the Internal SDcard syntax, I enabled ASEC,as mentioned below:


## Vold 2.0 fstab for n1
## - San Mehat (san@android.com)
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# internal sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
asec = enable
discard = enable
format_option = -r 1980
}
dev_mount sdcard /mnt/sdcard/external_sd 4 /devices/platform/sdhci-tegra.3/mmc_host/mmc0/mmc0
# external sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun1/file
asec = enable
}
dev_mount sdcard1 /mnt/sdcard auto /devices/platform/sdhci-tegra.2/mmc_host/mmc1/mmc1
# otg sdcard
{
ums_path = /dev/zero
asec = disable
}
usb_mount sdcard2 /mnt/sdcard/usbStorage auto /devices/platform/tegra-ehci.0/usb
#end line ## keep this line


PS: A newbie to android, after using XDA to learn plenty of tips and tricks, I joined the forum to help others as it helped me!
Attached Files
File Type: zip My modified version of vold.zip - [Click for QR Code] (638 Bytes, 937 views)
The Following 3 Users Say Thank You to b99721 For This Useful Post: [ Click to Expand ]
 
krobar77
Old
#53  
krobar77's Avatar
Senior Member
Thanks Meter 11
Posts: 154
Join Date: Dec 2010
can u plz elaborate more what is the different your version and pudup version?
 
b99721
Old
#54  
Senior Member
Thanks Meter 25
Posts: 159
Join Date: Apr 2012
Location: Delhi
Quote:
Originally Posted by krobar77 View Post
can u plz elaborate more what is the different your version and pudup version?
I have simply enabled ASEC (Android Secure External Cache) on Internal SD card, and completed some incomplete code (though the swap takes place correctly even with the missing code).

In pudup's version:
internal sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
asec = disable
discard = enable
format_option = -r 1980
}

In my edited version (see difference in bold):
internal sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun0/file
asec = enable

In addition, in pudup's version I observed a few incomplete lines of the original code:
dev_mount sdcard /mnt/sdcard/external_sd 4 /devices/platform/sdhci-tegra.3/mmc_hos#

So I completed that piece of code from the original vold file taken from the stock rom (see difference in bold):
dev_mount sdcard /mnt/sdcard/external_sd 4 /devices/platform/sdhci-tegra.3/mmc_host/mmc0/mmc0#

Hope this explains.
 
krobar77
Old
#55  
krobar77's Avatar
Senior Member
Thanks Meter 11
Posts: 154
Join Date: Dec 2010
thanks for the explanation

but what is asec? and performance impact after enabled it?
 
b99721
Old
(Last edited by b99721; 21st April 2012 at 06:49 PM.) Reason: Missed answering about performance impact in the previous post
#56  
Senior Member
Thanks Meter 25
Posts: 159
Join Date: Apr 2012
Location: Delhi
Though I am not entirely sure, I am taking a stab at explaining what ASEC is: (please don't bash me if this is wrong ):
When we move android apps to locations outside of phone memory, they are stored in the .android_secure folder, with the asec extension. Android most probably encrypts the application file when moving it to external storage to prevent you from copying it from one device to another, in a bid to stop piracy. However, maybe its not completely secure, and hence some paid apps like Asphalt 6 are forced to stay in the internal phone memory with no option to move them to the SD card.

Also, a quick search on the Internet revealed this:
"(.ASEC) File used by Froyo, the version 2.2 release of the Android mobile operating system; stores mobile application data using proprietary encryption; saved to the .android_secure folder of a device's SD card; can be run with the Android SDK emulator.

The secure ASEC format allows applications to exist on mobile devices without being modified or corrupted by other programs"

(Source: Taken from fileinfo.com; however I can't post the link here since a restriction applies to my profile till I have eight helpful posts )

I have not observed any negative impact on phone's performance with ASEC enabled. The swap has made file transfers faster and substantial speed increase for an app called 'Vaulty' which hides images and videos on phones by moving them to a vault folder, though I doubt ASEC has anything to do with it. I believe only advantage with ASEC enabled is that I have the freedom to choose whether I want to move apps to SD card or not (and freedom is what android is about ).

One odd issue I faced was when I upgraded from stock 2.3.5 to stock 2.3.6 rom. I applied the vold to swap the SD cards after the upgrade, and prior to that to avoid any app conflicts, I moved all my apps to phone memory. Everything was working smoothly till several weeks later I decided to install more apps. To my horror, I found that I could not install any app to my phone, though I could update any app that was installed on the phone before the rom upgrade. To resolve the situation, I reapplied my modified version of vold, and everything is now working flawlessly on the new rom!
 
pudup
Old
#57  
pudup's Avatar
Senior Member - OP
Thanks Meter 48
Posts: 363
Join Date: Feb 2012
Location: Bombay
Quote:
Originally Posted by b99721 View Post
Though I am not entirely sure, I am taking a stab at explaining what ASEC is: (please don't bash me if this is wrong ):
When we move android apps to locations outside of phone memory, they are stored in the .android_secure folder, with the asec extension. Android most probably encrypts the application file when moving it to external storage to prevent you from copying it from one device to another, in a bid to stop piracy. However, maybe its not completely secure, and hence some paid apps like Asphalt 6 are forced to stay in the internal phone memory with no option to move them to the SD card.

Also, a quick search on the Internet revealed this:
"(.ASEC) File used by Froyo, the version 2.2 release of the Android mobile operating system; stores mobile application data using proprietary encryption; saved to the .android_secure folder of a device's SD card; can be run with the Android SDK emulator.

The secure ASEC format allows applications to exist on mobile devices without being modified or corrupted by other programs"

(Source: Taken from fileinfo.com; however I can't post the link here since a restriction applies to my profile till I have eight helpful posts )

I have not observed any negative impact on phone's performance with ASEC enabled. The swap has made file transfers faster and substantial speed increase for an app called 'Vaulty' which hides images and videos on phones by moving them to a vault folder, though I doubt ASEC has anything to do with it. I believe only advantage with ASEC enabled is that I have the freedom to choose whether I want to move apps to SD card or not (and freedom is what android is about ).

One odd issue I faced was when I upgraded from stock 2.3.5 to stock 2.3.6 rom. I applied the vold to swap the SD cards after the upgrade, and prior to that to avoid any app conflicts, I moved all my apps to phone memory. Everything was working smoothly till several weeks later I decided to install more apps. To my horror, I found that I could not install any app to my phone, though I could update any app that was installed on the phone before the rom upgrade. To resolve the situation, I reapplied my modified version of vold, and everything is now working flawlessly on the new rom!
I actually just noticed this issue of the memory card saying it's full when it really had over 10gb free. I didn't get down to solving it myself so thanks a lot for saving me the trouble. I'll add your vold to the first post.

You are somewhat right about the asec thing as far as I can tell.

I haven't actually tried it myself but I'll let you know when I do. Thanks.

Sent from my GT-I9103 using XDA
 
pudup
Old
#58  
pudup's Avatar
Senior Member - OP
Thanks Meter 48
Posts: 363
Join Date: Feb 2012
Location: Bombay
Alright. It works beautifully. So far so good with everything loading fast(maybe faster than with my vold, maye slower, can't tell). Apps move back and forth fine.
Good job.

There is one issue I've found so far. If you had an application installed on your sd card before you apply this vold, you'll have to reinstall it or move it to phone before you change the vold.

Sent from my GT-I9103 using XDA
 
b99721
Old
(Last edited by b99721; 23rd April 2012 at 09:20 PM.)
#59  
Senior Member
Thanks Meter 25
Posts: 159
Join Date: Apr 2012
Location: Delhi
pudup, glad to know my work is appreciated, though I have build upon your vold Thanks for adding my edited version of vold to the first post.

Thanks for pointing out the issue with apps residing on SD card prior to the swap. I didn't face this problem since just to be safe I had moved all apps to phone memory prior to applying the swap
 
b99721
Old
#60  
Senior Member
Thanks Meter 25
Posts: 159
Join Date: Apr 2012
Location: Delhi
I figured out why I was unable to install apps after upgrading to the new rom, and had to reapply my vold.

If you do a dalvik cache wipe after applying the vold, you will have to reapply it to make everything to work flawlessly.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes