| ============================= |
| Project Info |
| ============================= |
| Scripting Layer For Android |
| |
| Originally authored by Damon Kohler, Scripting Layer for Android, SL4A, is an automation toolset |
| for calling Android APIs in a platform-independent manner. It supports both remote automation via |
| ADB as well as execution of scripts from on-device via a series of lightweight translation layers. |
| |
| ============================= |
| Build Instructions |
| ============================= |
| |
| Due to its inclusion in AOSP as a privileged app, building SL4A requires a system build. |
| |
| For the initial build of Android: |
| |
| 1) cd <ANDROID_SOURCE_ROOT> |
| 2) source build/envsetup.sh |
| 3) lunch <TARGET> |
| 4) make [-j15] |
| |
| Then Build SL4A: |
| |
| 1) cd <ANDROID_SOURCE_ROOT>/packages/apps/Test/connectivity/sl4a |
| 2) mm [-j15] |
| |
| =========================== |
| Install Instructions |
| =========================== |
| |
| 1) adb install -r <ANDROID_SOURCE_ROOT>/out/target/product/<TARGET>/data/app/sl4a/sl4a.apk |
| |
| =========================== |
| Run Instructions |
| =========================== |
| |
| 1) SL4A may be launched from Android as a normal App. |
| |
| or; |
| |
| 2) To enable RPC access from the command prompt: |
| |
| 1) adb forward tcp:<HOST_PORT_NUM> tcp:<DEVICE_PORT_NUM> |
| 2) adb shell "am start -a com.googlecode.android_scripting.action.LAUNCH_SERVER \ |
| --ei com.googlecode.android_scripting.extra.USE_SERVICE_PORT <DEVICE_PORT_NUM> \ |
| com.googlecode.android_scripting/.activity.ScriptingLayerServiceLauncher" |
| |
| where <HOST_PORT_NUM> and <DEVICE_PORT_NUM> are the tcp ports on the host computer and device. |
| |