Apps2sd location?


Last Updated:

  1. SirVilhelm

    SirVilhelm Well-Known Member

    So I have moved several apps from internal memory to my SD card using the 'Move app to sdcard' option in managing programs. My question is where does it actually move the apps? I know by default the apps get installed to /system/app but where is the sdcard location?

    Advertisement
  2. Lock-N-Load

    Lock-N-Load Well-Known Member

    I asked this before and never got an answer.

    I could only assume it makes some "hidden" partition on the card as using a file explorer - like Root Explore - never has showed me where they are at.
  3. SirVilhelm

    SirVilhelm Well-Known Member

    Hmmm tricky. There has to be a way to access it
  4. Lock-N-Load

    Lock-N-Load Well-Known Member

    I would agree. but I have 'show hidden files' turned on and see no place for them. but I wonder if I access it via my USB and mount it to my computer if I turn on hidden files on my desktop maybe I could see it that way.. hmmm

    EDIT.. That did it.. they are in a hidden directory .android_secure

    odd thing is that Root Explorer shows the directory, but nothing in it even though I have 'show hidden files' turned on. But mounting to desktop showed me what was inside.
  5. GirLuvsDroid

    GirLuvsDroid Well-Known Member

    In root explorer, go to /mnt/asec/ and you'll see the data folders, or if you go to /mnt/secure/asec, you'll see the apps, with the extension .asec rather than .apk.
  6. Lock-N-Load

    Lock-N-Load Well-Known Member

    I have no such directory. I have the above directory.
  7. GirLuvsDroid

    GirLuvsDroid Well-Known Member

    Look in the root directory, not /sdcard/.
  8. Lock-N-Load

    Lock-N-Load Well-Known Member

    huh? why would I look in root of the phone? we are talking about apps on the SD card, so why look in the root of the phone.

    as I said above, using an app that allows me to see hidden files, I found them... on the SD card

    if I were to guess, I would say that what you found are not actual "apps" but a reference on the phone to what apps are located in the above SD card directory I reference. hence the different "-1" extension type on them & the fact they have no KB size listed.
  9. GirLuvsDroid

    GirLuvsDroid Well-Known Member

    This is from a tutorial on apps2sd:

    where are the apps stored when i use apps2sd?

    4o66 wrote: Short answer: Each app stored in /mnt/asec/[appname] is actually stored in an individual encrypted virtual device file

    Long answer: (you knew it was coming...)

    From a terminal program (or adb, I normally just hop into ConnectBot), if you run "mount", you will see a few lines like so:

    /dev/block/dm-[number] /mnt/asec/[app name] vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=.....

    The main thing to pay attention to here is the first two blocks of text.
    The first is WHAT is mounted, the second is WHERE it is mounted TO.

    In this case, the device known as /dev/block/dm-[number] is referring to a DM (Device Mapper). In linux, this is normally used for either RAID devices or encrypted volumes.

    So what is happening is this: To stop the average user from copying and app to sd, then giving it to a friend, they place it in a virtual hard drive, which is encrypted and stored as a file, in a linux partition on the sd card.

    Picture like this:

    [SD CARD]
    [FAT32]
    Files you see on the card
    [END FAT32]
    [EXT4 Linux]
    apps2sd files
    virtual hard drive file
    [DM device (encrypted)]
    apk files
    [END DM]
    [END EXT4]
    [END SD CARD]

    Now, if you are rooted, this doesn't really stop you. But most users will never know, or care, about rooting their device. They won't even see the EXT partition on their computer if they were to take the sd card out and plug it right in (Windows can't read EXT partitions without some special software). If the user has linux, they will see the files, but the crypto keys are stored in phone protected memory, accessible only to root.

    This keeps casual copying from occurring.
    Remember this, a lock only keeps and honest man honest.
    If I have physical possession of your device, no matter what security you put on it, I will eventually be able to get what I want out of it.
  10. Lock-N-Load

    Lock-N-Load Well-Known Member

    so.. I think I was kind of right if I read this correct

    "They won't even see the EXT partition on their computer if they were to take the sd card out and plug it right in (Windows can't read EXT partitions without some special software). "

    " they place it in a virtual hard drive, which is encrypted and stored as a file, in a linux partition on the sd card."

    I saw it and can see them as I used a special app on my computer to turn on hidden files and that is when I saw them on my SD card in the .android_secure directory. and the apps are being mapped from the SD card to to the phone and seen in the /mnt/asec/ directory which is why they have the "-1" (notice he shows the "-[number]" indicator) as they can't be on the phone and on the SD card as the memory proves as much. so that /mnt/asec/ is the mapping location of the actual apps location on the SD card so the phone knows what and where apps have been moved.
  11. humpity

    humpity Member

    OK, the thread's over two years old. But I have to correct the above.
    The OP looks to be using FA2SD (Froyo/Google official A2SD) which doesn't use
    an EXT partition on the SD. It's all FAT/FAT32. The encrypted files (mounted to /mnt/asec/..etc) are stored in .android_secure. You can't see them from the phone but you can see them if you plug the phone to a PC.
  12. johnlgalt

    johnlgalt Antidisestablishmentarian VIP Member

    Sorry, but if you check the dates, it was before Froyo made it onto the Motorola DROID, and well before the CM7 (GB) builds were made for it.

    This was a third party apps2sd solution being used b/f we could do it natively in FroYo and GB,
    humpity likes this.

Share This Page