Post Last Edited by dlanor at 2014-7-12 17:04 |
As most of you know, one big problem with the current Android image is that it doesn't mount anything to "/mnt/sdcard", for use through link as "/sdcard" which many apps require, causing them to fail when that path is non-mounted.
And another big problem is that when we use a large SD card for this Android image, the vast majority of the card space gets locked away in an extra partition accessible only as a cryptic subfolder of the "/mnt/extsd" path. (For me it was found as "/mnt/extsd/179-1/") And this is very wasteful, as no apps will use that space for their normal data, nor can any apps ever be installed in that space.
Today I invested some time into solving both of these problems through one simple change.
During my initial attempts to do this I made a lot of modifications back and forth to see how this would affect the results, but in the end I settled for a VERY small modification, which only zeroes a single bit in a single file. That's all it takes...
My tool for this kind of work is always "ES File Explorer", which is a fully free tool available for download from the Google Play Store.
After installing this tool it's necessary to configure it for 'root' work by folding out the 'Tools' list in its left-hand menu and there scroll down to the parameter entry "Root Explorer" and change its status from "OFF" to "ON". That will permit all content of the root directory to be visible, and will also permit modifications to most of that content.
NB: Such operations are powerful and can damage the system beyond recovery if done unwisely. So if you don't feel sure of your hacking skills, it may be a good idea to disable the "Root Explorer" parameter again, after doing the necessary modification I will describe below. (Necessary for getting proper /sdcard usage in this Android implementation.)
Navigate the file explorer window to the "/" root directory, and from there go into the "/etc" directory. Scroll down a little to find a file named "vold.fstab" and click that file. You will then get a popup window asking which filetype you want to open the file as, and the proper choice is "Text". After making that choice you will be given a choice between different tools to open the file, and the proper choice is "ES Note Editor", unless you've installed a better text editor. But my guide text assumes you are using the "ES Note Editor".
At first the text is opened in read-only mode, so to change that you need to click on the 3-dots icon at the top right (or in taskbar) and choose the "Edit" command, which switches the app into editing mode. Now move cursor down to the line that starts with "dev_mount sdcard" and then move cursor close to the end of that line (10 characters in from its end). There you will see the numeric digit "2", which needs to be changed to "0" (thus zeroing a single bit in the character code ).
That change will cause the previously 'lost partition' to be mounted as /mnt/sdcard and also accessible as /sdcard after the next reboot. As a minor side effect the access through "/mnt/extsd" will be lost, but that hardly matters as the old use of that path is not standard usage anyway.
Once the text has been modified you should try to back out of the note editor, which will give you a prompt for whether to save or not, and here you should of course confirm the saving (unless you somehow messed up the text, in which case you should cancel out).
Now all you need do is to back out of "ES File Explorer" and reboot the BPi, after which you should have a healthy "/sdcard" path to satisfy all apps that need it. In my case the /sdcard area gained had a size of 12.62 GB (of my 16 GB card), so I will be able to handle quite a lot of apps before needing to expand with USB or HDD drives.
I hope you all find this method useful.
Best regards: dlanor