patcon / TextNowPlus-android

https://gist.github.com/patcon/ee96b9bb0f3141b37146
1 stars 3 forks source link

Allow neutered install as user space app #3

Open patcon opened 9 years ago

patcon commented 9 years ago

Currently, trying to install VoicePlus via adb install results in:

/tmp  ᐅ adb install VoicePlus.apk 
2502 KB/s (236365 bytes in 0.092s)
    pkg: /data/local/tmp/VoicePlus.apk
Failure [INSTALL_FAILED_INVALID_INSTALL_LOCATION]
/tmp  ᐅ 

If we were able to fence off the offending code paths, and only open them if we detect we're in a system app location, then we could use traditional distribution channels and install methods (F-Droid, Play Store, etc).

That way, we can simply instruct users to use the SystemAppMover to promote it to system. This would still require root, but wouldn't require intimidating adb usage.

It should also be noted that VoicePlus is normally present in /system/app in stock CM, which is a less privileged location, unlike true system apps in /system/priv-app. SystemAppMover currently only moved things in and out of the former. It shouldn't hurt, but it is a more privileged location, and so it increases the attack surface of the device. (Details here)

This might be something to get into the official CM package.