Scripting Layer for Android (SL4A) brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device. These scripts have access to many of the APIs available to full-fledged Android applications, but with a greatly simplified interface that makes it easy to get things done.
1.安装SL4A
在浏览器中打开http://code.google.com/p/android-scripting/,点击二维码开始下载


安装



2.安装python解释器










到现在SL4A和python解释器就装好了。
3.hello world
再次启动SL4A,可以看到SL4A自带的一些脚本。脚本目录为/mnt/sdcard/sl4a/scripts




4.连接远端设备
a.启动SL4A
b.选择 "MENU"-->"Preferences"-->"Server Port",设定端口

c.选择 "MENU"-->"View"-->"Interpreters"
d.选择 "MENU"-->"Start Server"-->"Private"


e.设置AP_PORT环境变量

f.提取android.py,设置转发规则

749




被折叠的 条评论
为什么被折叠?



