Use free space in system partition - G2 Q&A, Help & Troubleshooting

Hello,
I really like my G2 but i have one annoying issue:
When using one of those great custom roms i end up with pretty much free space on internal storage (system partition).
Since i'm having the 16GB-version i have ~10GB of usable space and currently ~7GB wasted space.
When using OSM-Maps 10GB is not much so i hope there is a way to utilize the free space on internal storage.
I have several ideas but i'm no dev and i hardly know about linux and even less about android.
So thats what i thought of:
Idea 1: Change partition size.
Well i think not a good idea but on my old HTC HD2 i could choose how the storage is partitioned. Don't know if this is possible on G2 and if changes there are not to risky.
Idea 2: Create a virtual SD-Card.
I know that this is possible somehow because i can do that with androidx86 on my tablet. So why dont write an app or zip-File-Patch that creates a custom-size virtual sd-card on internal storage/system partition. Problem is that i can't do that. Help of a dev would be needed.
Idea 3: Redirect folders.
On Linux and Windows it's possible to create "virtual folders" that are just links to the real folder that is stored somewhere else. Pretty handy on windows to move music-library to sd-card with full functions for example.
I think i've seen such things on android too when browsing my device. So why don't move for example the DCIM-Folder and others to internal storage this way?
But again a dev would be needed.
Idea 4: Copy some stuff with root and file explorer.
Thats maybe the simpliest way but i don't know how and where i can copy things. For example i've around 4GB of music on my device and if i can still access it i would have no problem to move it to internal storage somewhere. Maybe to ringtones folder or something like this.
But i'm not sure where i should put it to be on internal storage and access being still possible.
It would be great to further discuss this ideas with you and find some kind of solution.

Well i was able to evaluate on Android 4.2.2 that you can put your music folder into the system/media folder but it was only possible with aroma file manger in recovery.
Then the free space on internal storage gets decreased and the available storage gets increased. This means my files are now inside the system partition.
But there are problems:
Even with root total commander was not able to write things to this directory and even after setting permissions in aroma-fm after reboot i cant write there. So handling is painful.
The music app doesnt find the music now
Found that tool then to create a "link" on sdcard that links to the folder in system/media but that fails because it cannot link to this path.
Tool: http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262

Overwhelming interest ...
Wrong section??

Well I've found your thread! Did you get anywhere with this?

Related

[Q] How can I add a small Ext partition to my SD card and fill it with symlinks?

So I am an organization freak, and the root of my SD card had gotten a bit out of control. Not unusual, I know, but having just installed Titanium Media Sync and inKa File Manager, I've been doing a lot more file management and the constant scrolling through crap folders that I'll never need to access is getting old. So I've been trying a bunch of stuff to create what basically amounts to a folder full of shortcuts or symlinks that reference the various folders I need to use.
Now I could just create some sort of MyHome directory on my SD card and store my **** in there, but that doesn't solve the problem of having easy access to some of the folders that need to be in /sdcard, like the Download folder.
So the solution I came up with was to create a folder called 'Home' in the root of my phone. I added a bunch of symbolic links to Music, Photos, Downloads, Documents, etc, and the beauty is I can have stuff scattered all around my SD card and still access them neatly from this one folder. And filter out the crap I don't ever need. Doing this produced the exact effect I was hoping for, and I set it as my Home in InKa File Manager. However it comes with two problems:
First, this folder disappears every time I restart my phone! And second, even if this didn't happen I would still be faced with the folder disappearing every time I installed a new ROM. Oh, and in case it isn't obvious, FAT filesystems don't support symbolic links so this Home folder has to exist somewhere outside of the main SD card.
So, in conclusion: I would like to create a very small partition on my SD card that I have read/write access to, so that I can fill it with symbolic links that will stay put and always re-mount. My problem now is that I'm not familiar enough with the Unix file system or with mounting disks to determine how to make sure this partition gets mounted every time I start my phone. Or, if this happens automatically, where to look for the partition.
Thanks in advance to anyone who can point me in the right direction!! I'm pretty sure I have already created an ext2 partition on my card, by using iPartition on my Mac to place it after the FAT partition. But it won't let me name it so I don't even know where to begin looking for the partition itself.
Why can't you just make a folder called "Home" in /data somewhere? Shouldn't matter where the folder is since you can default your file manager to whatever folder upon opening.
Edit: Just tested it by making a folder /data/Home/
It survived a reboot fine.
Shouldn't be wiped when installing new roms either, as long as they don't wipe data like I know the ACS roms don't. Also if the rom you are flashing backs up and restores your data before flashing like some do, it MIGHT, idk for sure, but might backup this folder as well.
That... totally works. Stays after a reboot too. Thanks! This at least solves one problem and makes the idea totally doable again
Im still curious about a solution to the partition thing though. It would be nice to have a Home folder that was literally always around and that I wouldn't have to worry about even after installing new roms. I know some of them don't wipe data but I would generally Odin when installing a new ROM anyway. Installing Cyanogen for the first time definitely requires that and I feel like I may go back to a stock rom once or twice before CM goes final.
The reason nothing "sticks" when you put it in the root FS if because it is a RAM filesystem, loaded from a file image (zImage) at boot -- it's not a more typical file system in secondary storage like all the other filesystems. This is simply an artifact of how embedded linux systems work.
Sent from my mind using telepathitalk

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!
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.
VuDuCuRSe said:
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!
Click to expand...
Click to collapse
Well this is known for a while now . Quoted from my thread here:
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.
Click to expand...
Click to collapse
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
spirosbond said:
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
Click to expand...
Click to collapse
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
mrasquinho said:
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
Click to expand...
Click to collapse
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!
PaulMilbank said:
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.
Click to expand...
Click to collapse
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.
PaulMilbank said:
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.
Click to expand...
Click to collapse
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/mount-a-directory-to-look-like-a-drive
there is a FUSE filesystem named bindfs that probably does exactly what you want. For example the following:
bindfs -n /media/USB-HDD-01/ISO/ /home/johnc/ISO-images
Click to expand...
Click to collapse
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.
Click to expand...
Click to collapse
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 :\
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/showpost.php?p=25853141&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...
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?
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!

Multiple paths to sdcard and internal

When in. File managers there are multiple paths for my external sdcard and my internal storage.
For example just for my external sdcard there is /external_sd, /ExtSdCard, /storage/sdcard1.
For my internal storage there is /sdcard, and /storage/sdcard0.
Is there a reason for this ?is it taking up more memory ? Can I consolidate these somehow?
BTW I'm rooted and flash a lot of ROMs both touchwiz and aosp
I believe it is to ensure compatibility with older apps that were written for specific paths. As Android evolves the External SD card seems to get a different path name with each flavor.
No extra space is used as they are just symbolic links to the true path.
Yeah, like gharlane00 said, there's only one real path, the rest are links. You'll notice that they'll show something like "->somePath." That arrow indicates a link, sort of like a shortcut in Windows. It's aggravating when browsing, that's for sure. I've been trying to figure out how to get Root Explorer to get the proper path to my SD Card when I click on Storage.

[Q] Question about storage size

I have a new to me S4 and it should be the 16GB version. However when I check the storage size when connected to the computer it says that I have 5.47GB free of 9.71GB total. Is this normal? Where is the other 6GB?
And a follow up question, using file explorer it says that there three storage locations: /Device, SDcard, extSDCard. So it looks like the internal memory is split into two parts, one for the OS (/Device) and another "SDCARD" for data? Is that correct? If I don't mind losing data, can I delete files from the internal "SDCard" or are those files also necessary for the OS?
First and foremost, the "16GB" of space is actually 15GB, since advertising defines 1GB as 1 billion bytes instead of 2^30 bytes as it is actually defined by the OS.
Next, from that 15GB of space, you've got roughly 5GB or so that's reserved for the system, drivers, firmwares, etc. The remaining 9.71GB of space is where your apps and anything else saved to your internal storage go. You *can* use the "move to SD" option to move apps if you're running low on space, but I wouldn't advise it unless absolutely necessary. Unless something's changed since Gingerbread, only certain apps can be moved, and even then any widgets those apps have will NOT function if you've moved the app. (yes, I know I'm off by .3GB, but I think that's just from rounding)
Apps and most of their data are saved to the location /data, but you can't access that unless you're rooted. Some of them make use of either the internal or external storage (/sdcard and /extSDCard) as well, but it all depends. Safest bet is to keep away from the folders "Android" and "data" on /sdcard, since that's where apps will sometimes dump files they need to run. Also, if a folder name is similar to an app name, use caution since it might be part of the app.
I'm not sure on /Device to be honest, since I'm running a custom ROM and haven't really paid attention to that one. I don't think it's the OS though, since you normally aren't supposed to be able to use a file explorer to browse around the OS files.

Can we mount ext partitions?

Hello all,
Now that we have root on our aesthetically unique device, I believe our next problem is storage space. I don't know about you all, but my aquos crystal has about 4 gb to work with when it comes to apps. Folder mount works well for me, as far as linking the obb files of large apps to the external sd card, but I still have to store a portion of any particular app on the phone's internal storage, which for me is no bueno. There has to be a better way. (For the sarcastic among you, buying another phone is not an option for me.)
Back in the day of Gingerbread, I remember having a whopping 300 mb of app storage to work with. I was able to partition a portion of my external sd to be used as internal storage for the device, solving all my storage woes. It worked so well, that I was sure that I would be able to find a similar method for the aquos crystal.
Now, I see that Link2sd is able to work with ext2, ext3, ext4, and fat32 partitions, so I figured I would attempt to create a ext2 partition on the micro sd to link to my internal storage directory. I used the Partition Wizard mini tool to create a ext2 partition in windows. Unfortunately after starting up Link2sd and selecting the format of my ext partition (ext2), Link2ds gives me an error telling me that the mount script was unable to be created. I've read that if we get this error, we can select ext4, even if we are using a different partition format. This got rid of the error. Mount script was successfully created. Autolink is selected, which should install new apps directly to the new partition. It doesn't, not for me at least.
I've read several guides around the internet dealing with this issue, as well as completely different methods besides Link2sd, and nothing seems to work for me. My goal in this is to supplement the capacity for apps. I would love to find a way to store all the library, devlik, and app files for each app on the external card, rather than having to keep some of each app on internal, and its larger counterparts on external. As you know, apps are constantly updated, and what seems to happen is if you install an app, then link it to the sd card, and the app gets updated in the future, the updated portion will get installed on the internal card, making your 'linked' app kind of pointless. What I'd really like to do is disregard the phone's internal storage altogether and use something like a 64 gb card as the phones internal storage. This may or may not be possible.
I'm not a programmer. I have a very basic understanding of how these things work. When it comes to things like this, I am literally standing on the shoulders of giants, and benefiting from their tenacity and willingness to share the fruits of their labors. Their exploits, and the internet that tells their story, have allowed me to root and modify practically every console and android device I've ever owned. With that being said, thank you to all that have been involved in unraveling the real potential of this device.
So, do any of you fine saints and scholars know of a way to get around the feeble storage capacity of our aquos crystal?

Categories

Resources