- Status Closed
- Percent Complete
- Task Type Patches
- Category Settings
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Opened by bluebrother - 2011-04-14
Last edited by bluebrother - 2011-09-04
FS#12063 - Android: put resources on SD card
Rockbox on Android brings various resources (themes, languages) packaged into a file libmisc.so that is extracted on first start. These resources have quite some size and occupy internal memory. This patch is a (trivial) proof of concept to store parts (everything but codecs and rocks) on the SD card instead of using the internal memory.
There is a lot missing and there is no error handling. If Rockbox is about to store parts of its resource files on SD card it should check for the SD card before extracting or starting. Also, I have no idea if this breaks things as it is right now – loading themes, languages and fonts works.
For me this change frees around 5MiB data memory. Manually removing libmisc.so after extraction gains around 3 MiB which in total brings Rockbox memory consumption down to 7.5MiB from 15MiB (480x800px device). Since you need to store your music somewhere I think it’s feasible to require an SD card to be present for running Rockbox.
2011-09-04 19:13
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
An extended / reworked version has been
committed as r30430. Create a file
/rockbox/rockbox-info.txt on the SD card
to make Rockbox extract its resources to
the card. Since that file is part of
Rockbox this will keep the extraction
location even between reinstalls.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Fix Rockbox extracting libmisc.so every time it starts.
Some phones have non-trivial amounts of internal storage, so I wouldn't like to see having an SD card inserted as a requirement. However, on my spartan budget smartphone internal storage is nearly exhausted so I would love to have this as an option.
How does this work on phones that dont have an sdcard? is /sdcard symlinked to some other directory?
My personal preference is still adding a rbutil activity to the binary which downloads libmisc.so on request/first run so the apk is half the size (the apk is stpred twice IIRC so a 7MB apk turns out to 15MB used space in / )
Personally I'd really like to avoid extracting libmisc.so at all and instead being able to use it directly but I guess this is simply not possible. Another idea I've tried it to remove libmisc.so after extracting but haven't succeeded (haven't investigated that too much, maybe a permission problem?)
As for /sdcard: I've ased on IRC about this and from my understanding I can expect any Android device to have a /sdcard path. We shouldn't take this for granted though, and as I said I consider the patch more of a proof of concept. It might also be a good idea to change theme graphics from bmp to a different format (png?) for Android since the bmp files require a lot of space.
Personally I don't feel this is a problem we should be trying to solve.
Android offers the ability to move applications to the sdcard natively, and there are non-native solutions which allow you to re-map the internal storage to the sdcard anyway.
Any other opinions?
Updated patch.
- Uses credits.rock to determine if libmisc.so needs to get extracted again. This means that you can force extracting libmisc.so by simply deleting the application settings from the Android applications menu.
- Set the timestamp of the checked file to the same as libmisc.so. This avoids problems caused by different time zones configured on build PC and Android device.
Bryan: A2SD doesn't solve this issue because:
- the lib data won't get moved so libmisc.so stays on the internal memory
- it doesn't move the user settings to the SD card.
Basically, the two memory hogs libmisc.so and the data extracted from it will still be on the internal memory. The file that gets moved to the SD card is the apk file (/data/app/org.rockbox-1.apk)