shakalaca
9/21/2016 - 7:30 AM

System app installation under systemless root

System app installation under systemless root

* Put 01mount_vendor_app under /su/su.d/
* chmod 755 /su/su.d/01mount_vendor_app 
* mkdir /su/app; chmod 755 /su/app
* Put your apk to /su/app/<name>/<name.apk>
* find /su/app/<name> -type d -exec chmod 755 {} \;
* find /su/app/<name> -type f -exec chmod 644 {} \;
* Reboot
#!/system/bin/sh

is_mounted() {
  if [ ! -z "$2" ]; then
    cat /proc/mounts | grep $1 | grep $2, >/dev/null
  else
    cat /proc/mounts | grep $1 >/dev/null
  fi
  return $?
}

if [ -d /system/vendor/app ]; then
  mount -o bind /su/app /system/vendor/app
else
  if ( ! is_mounted /oem ); then
    mount -o rw,remount /
  fi

  if [ ! -d /oem ]; then
    mkdir /oem
    chmod 755 /oem
  fi

  if [ ! -d /oem/app ]; then
    mkdir /oem/app
  fi
  chmod 755 /oem/app
  chcon u:object_r:system_file:s0 /oem/app
  
  mount -o bind /su/app /oem/app
fi