Difference between revisions of "IoTGateway/BSP/Android/Gettingstarted/Auto install APK"

From ESS-WIKI
Jump to: navigation, search
(Created page with "<span style="font-size:small;">The current platform can install Android application, apk file, automatically through the mass storage device.</span> <span style="font-si...")
 
 
Line 18: Line 18:
 
<span style="font-size:small;">If the apk named stability_test.apk that put into the root directory of mass storage device wanted to be installed.</span>
 
<span style="font-size:small;">If the apk named stability_test.apk that put into the root directory of mass storage device wanted to be installed.</span>
  
<span style="font-size:small;">The content of the start_up.sh should be edit as follow</span>
+
<span style="font-size:small;">The content of the start_up.sh should be edited as follow</span>
 
<pre>#!/system/bin/sh
 
<pre>#!/system/bin/sh
  
 
UUID=`getprop sys.update.storage`
 
UUID=`getprop sys.update.storage`
 
pm install /mnt/media_rw/$UUID/stability_test.apk</pre>
 
pm install /mnt/media_rw/$UUID/stability_test.apk</pre>

Latest revision as of 08:25, 6 February 2017

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