IoTGateway/BSP/Android/Gettingstarted/Auto install APK

From ESS-WIKI
Jump to: navigation, search

The current platform can install Android application, apk file, automatically through the mass storage device.

1. System requirement

  1. A USB mass storage device with FAT32 filesystem
  2. The apk files that whated to be installed​

2. How to trigger the apk auto installation

  1. put the apk files into the mass storage device
  2. create folder named startup containing a shell script file, start_up.sh.
  3. edit the shell script file, start_up.sh, with the apk installation commands
  4. instert the mass storage device
  5. wait few minutes and check the applcation list to confirm if the applications are completley installed 

3. Example

If the apk named stability_test.apk that put into the root directory of mass storage device wanted to be installed.

The content of the start_up.sh should be edited as follow

#!/system/bin/sh

UUID=`getprop sys.update.storage`
pm install /mnt/media_rw/$UUID/stability_test.apk