Search This Blog

Jan 21, 2011

How to know your APK install location

1. Use aapt

$ myandroidout/host/linux-x86/bin# ./aapt list -a com.rovio.angrybirds_1.3.5.apk | grep installLocation

  A: android:installLocation(0x010102b7)=(type 0x10)0x2

2. android:installLocation

public static final int installLocation
The default install location defined by an application.
Must be one of the following constant values.
auto0Let the system decide ideal install location
internalOnly1Explicitly request to be installed on internal phone storage only.
preferExternal2Prefer to be installed on SD card. There is no guarantee that the system will honor this request. The application might end up being installed on internal storage if external media is unavailable or too full.
Constant Value: 16843447 (0x010102b7)

3. We know angrybirds installed to SD card from the value "2"---"preferExternal"