Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
VuDuCuRSe
Old
#1  
Senior Member - OP
Thanks Meter 74
Posts: 206
Join Date: Dec 2010
Lightbulb IDEA: Hacking internal/external sdcard mount paths

Hello.

I'm using the latest aurora and I'd like to discuss an idea I had.

Since the U8800 has plenty internal memory and it's quite fast comparing to an average sd card, it'd be great if we could use the internal memory for the tasks that need "speed" instead of "space".

Running apps from the sd card is the perfect example!

So the idea would be, while keeping the external sdcard mounted on /mnt/sdcard, having /mnt/sdcard/Android/data, for instance, point to the «internal sdcard path»/Android/data.

What do you think would be the best solution:
- hacking the mount points?
- using links?
- other solution?

Any developer or filesystem savvy user can point the advantages or dangers of using this solution?
- e.g.: the system or some apps may check if the external sd-card is mounted before trying to read/write to /mnt/sdcard/Android/data... that would mean the system/those apss may think that path isn't reachable with the ext-sdcard unmounted, altough they can be read.

Suggestions? Rants? Ideas?

Regards!
 
PaulMilbank
Old
#2  
Senior Member
Thanks Meter 207
Posts: 435
Join Date: May 2011
Location: Auckland
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
 
spirosbond
Old
(Last edited by spirosbond; 12th May 2012 at 02:14 PM.)
#3  
spirosbond's Avatar
Senior Member
Thanks Meter 320
Posts: 602
Join Date: Sep 2011
Location: Thessaloniki

 
DONATE TO ME
Quote:
Originally Posted by VuDuCuRSe View Post
Hello.

I'm using the latest aurora and I'd like to discuss an idea I had.

Since the U8800 has plenty internal memory and it's quite fast comparing to an average sd card, it'd be great if we could use the internal memory for the tasks that need "speed" instead of "space".

Running apps from the sd card is the perfect example!

So the idea would be, while keeping the external sdcard mounted on /mnt/sdcard, having /mnt/sdcard/Android/data, for instance, point to the «internal sdcard path»/Android/data.

What do you think would be the best solution:
- hacking the mount points?
- using links?
- other solution?

Any developer or filesystem savvy user can point the advantages or dangers of using this solution?
- e.g.: the system or some apps may check if the external sd-card is mounted before trying to read/write to /mnt/sdcard/Android/data... that would mean the system/those apss may think that path isn't reachable with the ext-sdcard unmounted, altough they can be read.

Suggestions? Rants? Ideas?

Regards!


Well this is known for a while now . Quoted from my thread here:

Quote:
vold.fstab - CHANGE THE DEFAULT SDCARD: -thanks to julle131


There is this file named vold.fstab at your /system/etc/ folder, which controls which of your sdcards (Internal/External) will be mounted when you connect your phone to the PC. The last 2 lines are the only that matter. These are the two possibilities:

EXTERNAL SDCARD MOUNTED (DEFAULT):

dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.4/mmc_host
dev_mount emmc /mnt/sdcard1 14 /devices/platform/msm_sdcc.2/mmc_host

INTERNAL SDCARD MOUNTED:

dev_mount sdcard /mnt/sdcard 14 /devices/platform/msm_sdcc.2/mmc_host
dev_mount emmc /mnt/sdcard1 auto /devices/platform/msm_sdcc.4/mmc_host

change them as you wish with a root explorer or before flashing.

Make this change and every app will use the internal sdcard. Gallery works ok with images to external sdcard, it just might take a while for the first refresh. But I don't know if you'll notice any difference in terms of speed....

Cheers
grDroid.info Το Android μιλάει Ελληνικά!

Site still under construction... please join and help us !


Dropbox (2GB + 500MB free from this link)
Ubuntu one (5GB+ 500MB free from this link)

or
buy me an Android app!
 
mrasquinho
Old
#4  
mrasquinho's Avatar
Senior Member
Thanks Meter 176
Posts: 845
Join Date: Sep 2011
Location: Portalegre
Quote:
Originally Posted by spirosbond View Post
Well this is known for a while now . Quoted from my thread here:




Make this change and every app will use the internal sdcard. Gallery works ok with images to external sdcard, it just might take a while for the first refresh. But I don't know if you'll notice any difference in terms of speed....

Cheers
That's not what he talked, I think. He said that the apparel would be installed on the external sd card, but the data would be moved to the internal one. And we have speed, but the main card would be the external one.

I think its a great idea if I understood it right!

Sent from my U8800 using xda premium
Samsung Galaxy Nexus
 
spirosbond
Old
#5  
spirosbond's Avatar
Senior Member
Thanks Meter 320
Posts: 602
Join Date: Sep 2011
Location: Thessaloniki

 
DONATE TO ME
Quote:
Originally Posted by mrasquinho View Post
That's not what he talked, I think. He said that the apparel would be installed on the external sd card, but the data would be moved to the internal one. And we have speed, but the main card would be the external one.

I think its a great idea if I understood it right!

Sent from my U8800 using xda premium
Oh I see! Sorry about that. As far as I know apps are not choosing were to put their data. They just say to the OS "I want these things to be at the sdcard" and the OS puts them at the correct place. So you can't "hack" the app to "see" at somewhere else. On the other hand the OS initialises on boot which card is the primary and which is the secondary. So my knowledge stops there and I can't imagine a way to make this separation between app data and the rest...
I hope for someone else's help!
grDroid.info Το Android μιλάει Ελληνικά!

Site still under construction... please join and help us !


Dropbox (2GB + 500MB free from this link)
Ubuntu one (5GB+ 500MB free from this link)

or
buy me an Android app!
 
dancer_69
Old
#6  
Senior Member
Thanks Meter 168
Posts: 1,749
Join Date: Jan 2007
Quote:
Originally Posted by PaulMilbank View Post
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
Maybe this cannot be done, because I think that the mapping of the partitions and mounts comes from the bootloader, but there is already the solution of resizing the data partition using the space of internal storage.
 
VuDuCuRSe
Old
(Last edited by VuDuCuRSe; 14th May 2012 at 11:23 AM.)
#7  
Senior Member - OP
Thanks Meter 74
Posts: 206
Join Date: Dec 2010
Quote:
Originally Posted by PaulMilbank View Post
I have wondered if the /data/app or maybe the whole /data partition could be mounted in the internal storage partition. That would give 2gb space for apps and associated files instead of 3-400 ish and would mean no need to move apps to sd card which would mean faster loads at startup due to internal memory being faster.
That's a great idea!

I almost don't use the so called "internal sd card", therefor I have 2GB of fast empty space being wasted.

Why not simply mounting the internal sd-card partition in the data folder and the data partition on the internal sd card folder?

I only use the internal sd card to hold ringtones and other small stuff that I need to be in accessible 100% of the time, so a few hundred MB are enough!
Me gusta!


Every ROM flashes it's own fstab, right?
So all we'd need to do would be, editing the fstab before flashing it.


-----------------

Regarding the my first idea... I don't think one can simply mount a path on another path. We'd need a "virtual" device pointing to /mnt/sdcard-internal/data/ then mount that virtual device on /mnt/sdcard-external/data/.
My knowledge of unix mount/filesystems is not much more than what's explained here: https://help.ubuntu.com/community/Mount

OK, just found this:
http://askubuntu.com/questions/11079...k-like-a-drive

Quote:
there is a FUSE filesystem named bindfs that probably does exactly what you want. For example the following:

Quote:
bindfs -n /media/USB-HDD-01/ISO/ /home/johnc/ISO-images
would result in ISO-images to show up as a mounted filesystem in the Places sidepanel in Nautilus. The -n is required because otherwise bindfs tries to use the allow_other FUSE option, which by default is not allowed for regular users (if you use bindfs in /etc/fstab this is not a problem).

The first directory you give is the existing one, the second directory you give is an empty directory under which the contents of the existing one will appear.
So, bindfs depends on FUSE... and there's a port of fuse to android: https://github.com/seth-hg/fuse-android but looking at the README I get the feeling that it's not really working. The last step would be having a kernel with FUSE support... and regarding that, I have no idea, how easy it is to get a kernel like that for our U8800 :\
 
Be-Mine
Old
#8  
Be-Mine's Avatar
Junior Member
Thanks Meter 5
Posts: 23
Join Date: May 2012
Finding such a solution to expand the DATA partition indirectly would be great!

I used to apply genokolar's custom partition method as "1.2G DATA + 1.46G INTERNAL SD" before, but i found out that it has some issues with Official 2.3 Roms. One of them -the most important IMHO- is the BOOTLOOP problem occurring in some specific situations!!!

See the details in my post here:
http://forum.xda-developers.com/show...&postcount=134

(Seems that I don't encounter the bootloops on Custom Roms, but i'm not %100 sure and never will be )

So i unfortunately gave up using it, and revert to the stock partition .

I will be grateful to the one who will find a better and reliable solution. Hope to see it soon...
 
VuDuCuRSe
Old
#9  
Senior Member - OP
Thanks Meter 74
Posts: 206
Join Date: Dec 2010
I still have to gather more information on the official update "modus operandi".

My goal is to simply reformat both partitions and then swap their mount points.
If the official update formats the partitions before applying the flashing official ROM files, then partitioning changes shouldn't cause any failure on the official update.
But like I said, I'm still yet to confirm that info.

Gen's idea was great (I learned a lot just by looking at his scripts) but resizing partitions has its dangers.

Since "no one" really uses the internal memory, why not simply exchange its room with /data, right?
 
Tcm9669
Old
#10  
Senior Member
Thanks Meter 49
Posts: 457
Join Date: Apr 2007
This would be awesome! I would love to have 2gb for apps, instead of cluttering my phone.. plus the 2gb of internal storage are just a waste for me.. I never use them.. so this would be great!

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...