Skip to content

Instantly share code, notes, and snippets.

@qianjigui
Created April 20, 2014 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qianjigui/11104757 to your computer and use it in GitHub Desktop.
Save qianjigui/11104757 to your computer and use it in GitHub Desktop.
Android System, Many devices will contain preinstall apps
#!/system/xbin/busybox sh
PREINSTALL_RECORD_FILE=/data/system.notfirstrun
if [ ! -e $PREINSTALL_RECORD_FILE ]; then
echo "do preinstall job"
for i in `/system/xbin/busybox find /system/etc/property/app/ -type f -name '*.apk'`;
do
/system/bin/sh /system/bin/pm install $i
done
/system/xbin/busybox touch $PREINSTALL_RECORD_FILE
echo "preinstall ok"
else
echo "do nothing"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment