1. f_d's Avatar
    So, in the aftermath of Cobalt's hack to enable Google Play, obviously, I've been downloading a lot of Android apps, and have filled up my device file system, and I'm sure many others have done the same..

    It would be nice to be able to move Android apps themselves to SD card (tried this in the past from the hidden Android settings panel, but it broke things badly, so don't bother with this approach for now; maybe this can be Cobalt's next trick??), but to move the app storage (which can be quite a storage load, especially for many games, etc) to external micro SD card is actually pretty straightforward due to the way BlackBerry decided to make the SD card visible in the Android file system.. Basically the process is to move the storage directory off internal storage to the external SD card, and then create a symbolic link to point to where you moved things.. Everything I've tried to date works perfectly with this method and it has freed up a huge amount of internal storage.. I wish BlackBerry10 apps could do this, but unfortunately, most of these store their app data in their app directories which are inaccessible due to the security model..

    To create the symbolic link, you need either a shell app (there are a couple of old PlayBook shell apps still in BlackBerry World that still work- I chose BGShell), or to turn on development mode and upload a token, etc and ssh in from a desktop.. If there is a file manager app that can create symlinks (I'm not aware of any, but I didn't look very hard either), you can use that instead of the command line interface of the shell..

    First of all, make sure the Android app you want to move storage is *NOT* running.. Then, all you have to do is move or copy the app's storage directory from misc/android to a directory on your SD card (I just created another directory called 'android'). You can do this from the shell if you're a Unix geek, or use your favorite file manager app (the BlackBerry10 native file manager works fine for this). If you're doing this for the first time, I'd recommend you do a copy vs. a direct move, just in case.. If you do a copy, then after you copy, you need to rename the original storage directory in internal storage to something else, so that you can create the symlink in its place (and then, on the off-chance that it doesn't work, you can delete the symlink and just rename the directory back to its original name and everything should work again)..

    Once you've moved, (or copied and then renamed the original), open up the shell app, or ssh in from your PD and navigate to the /accounts/1000/shared/misc/android directory, and then use the command 'ln -s external_sd/<where you copied the directory> <original name of directory>' and you're done..

    So here's a practical example: since I upgraded to the latest 10.3.1, the BB10 offline GPS app that I use: Mireo, has stopped working (opens to black screen, then crashes), but luckily, this app is also available as an Android version, so I downloaded it, and it works like a charm, *BUT* unlike the BB10 version, the Android version doesn't support BB10's method of storing the several gigabytes of map data on external SD card, so it insists on saving things to internal storage, which as I mentioned earlier, I'm rather short on..

    OK, Mireo stores its data in the shared files tree. The full path is /accounts/1000/shared/misc/android/Dontpanic. I need to move this directory off to the external SD card, where I have huge amounts of room on a 64Gig card.

    My first task is to prep the external SD card: because the BB10 version of this app also creates a "Dontpanic" directory on the SD card, and the developer will hopefully eventually get around to updating the BB10 app, I chose not to rename it or to allow the Android version to overwrite (although it seems to use exactly the same data files; the Android version leaves some licensing files here that the BlackBerry version stores in its internal directories), so using the BlackBerry file manager, I navigate to the "Media Card", by tapping on the 3 bars at lower left corner of the screen, then I tap on the 3 dots on the lower right corner, and select "Add Folder". Again, in my case, I chose to create a directory called "android"

    Next task is to move the Android app's storage out to the SD card, so I tap on the bottom left again, and go back to "Device", which puts me in the shared folders section, then select the "misc" folder and then the "android" folder inside that.. Now you should see all the various app storage folders that your Android apps have created.. So, in this case, I find the "Dontpanic" folder, long-press on it until the side menu comes up, and select "Move", then I go through the long process of tapping on the bottom left several times to go up the directory structure, until I'm able to select the "Media Card", then I find the "android" folder I created previously, and once I'm inside, I tap the "Move" button at the top of the screen and then I wait for all the files to be moved over.. If you decided to "copy" instead of "move", at this point, you need to go back up to the device storage, back to the misc/android folder, then find the app storage folder again and long press, and this time select "rename" and change the name of the directory to something else (I usually just add ".old"). If you want to do this from the shell, you simply navigate to the misc/android directory, then go "mv Dontpanic external_sd/android"

    Then I open up my shell app, and navigate to the android directory with the Unix shell command:
    "cd /accounts/1000/shared/misc/android"

    Then creating the symlink with: "ln -s external_sd/android/Dontpanic Dontpanic", and I'm done.. I can exit the shell and try starting up the app, and everything should work just as before, except that all its files are now stored on the external microSD card vs. the limited internal device storage.. If you made a copy of the files to external SD vs moving, once you confirm that the app still works, you can simply delete the renamed original folder

    If you download games that save their level files in the shared files, then you can move these off to external storage in the same manner.. Because the symlink affects things at the filesystem level, most apps will be completely unaware that you've made this change and should work just fine.. Now of course, if you remove the microSD card and try to start an app whose storage was on the card, unpredictable things might happen: the symlink still points to the card, but there's nothing there to read or write..

    Anyways, thanks again to Cobalt for his work; I hope this simple little trick is useful to everyone, and happy downloading..
    Last edited by f_d; 12-29-14 at 08:43 PM. Reason: fixed Unix 'mv' command syntax
    Soul_Est, Prem WatsApp and dpgo like this.
    12-27-14 10:48 AM
  2. alaviss's Avatar
    "-r" (recursive) is not a valid option of "mv" . please edit this out

    f_d likes this.
    12-29-14 08:20 AM
  3. filanto's Avatar
    I've been trying to find where Vudu is and I cannot find the directory. I woke like to have my movies on the sd card
    04-05-15 01:37 PM
  4. Prem WatsApp's Avatar
    Could that be a bit of a security hole, ...?

    Sure, the link needs to be created on the phone, while it's unlocked and running... :-)

    (But I guess there could be ways of exploiting this, depending on the app permissions granted, someone could slide in an SDcard with a shonky data extraction app (placed and named to where the link goes!) to get to the phone's contents; this only applies if the physical security of your device is not assured and you're dealing with a rather advanced adversary; please comment if I'm wrong)

      Passposted while waiting for the Z-lider....  
    05-15-15 10:17 PM
  5. dpgo's Avatar
    This post is from 2014, is there something new from that date? Any app to move android apps to SD?

    I tried to move apps using the google android settings and some were theoretically moves but they didn't work after and I had to uninstall them..

    Posted via CB10
    11-04-16 11:36 AM

Similar Threads

  1. Z10 to Z30
    By sfcramsey in forum BlackBerry Z30
    Replies: 24
    Last Post: 01-07-15, 04:56 PM
  2. Replies: 25
    Last Post: 12-28-14, 10:09 AM
  3. Camera app is not available in my menu
    By vishwajit1 in forum Ask a Question
    Replies: 1
    Last Post: 12-27-14, 06:23 PM
  4. Email to Remember?
    By hangnthere in forum BlackBerry 10 Apps
    Replies: 8
    Last Post: 12-27-14, 02:50 PM
  5. Having trouble Sycing Z10 to Outlook, any ideas?
    By CrackBerry Question in forum Ask a Question
    Replies: 1
    Last Post: 12-27-14, 09:50 AM