An HTTP API for issuing ADB commands (sort of). Only adb install
where the APK is a URI is supported at the moment.
WARNING Do not install this on a live server connected to the Internet. There are major security flaws. This is intended for local use only. K Thanks.
Modify the $apk_folder and $adb_command variables at the top of settings.php to suit your needs. Then POST or GET the following parameters.
- op: The adb operation you want to perform. Only install currently supported.
- apk_uri: The URIs of the APKs you want to install. You can batch the installation by separating URIs with commas.
To get this working correctly on my Raspberry Pi I had to add www-data ALL=(ALL) NOPASSWD: ALL
to my /etc/sudoers file. This allows PHP to sudo with when issuing the adb command. There's a bunch of better ways this could be solved, suggestions are welcome. Relevant Stack Overflow threads here and here.