Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kuri65536/sl4a

Scripting environment for Android platform
https://github.com/kuri65536/sl4a

Last synced: about 1 month ago
JSON representation

Scripting environment for Android platform

Awesome Lists containing this project

README

        

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.

Scripts can be run interactively in a terminal, in the background. Python,
Perl, JRuby, Lua, BeanShell, JavaScript, Tcl, and shell are currently supported,
and we're planning to add more. See the [SL4A Video Help](http://www.youtube.com/playlist?list=PL07A81E6CE96F158B)
playlist on
YouTube for various demonstrations of SL4A's features.

SL4A is designed for developers and is _alpha_ quality software.
Please report bugs and feature requests on the [issues list](../../issues).

You can download the current APK by scanning or clicking the following barcode:

##Disclaimer

* Even though a lot of contributors are working for Google, this is not an
official Google product.
* SL4A is no longer under active development. However, some forks of this
project may be.

##Documentation

The original Google Code wiki has been converted to Markdown and
is available in the [docs folder](docs/).
A few of the most important pages are:

* [FAQ](docs/FAQ.md)
* [User Guide](docs/UserGuide.md)
* [API Reference](docs/ApiReference.md)
* [Tutorials](docs/Tutorials.md) ... it is a little old but useful for start.
* [damonkholer documents archive from googlecode](https://github.com/damonkohler/sl4a/tree/wiki)
... please report if you find the document that is not here.

Issues
===
I ignored the issues in google-code, because it's not controllable.
New issues will be accepted from [issue page](../../issues).

* [Create issue(github)](../../issues/new?title=&body=%2a%20What%20device(s)%20are%20you%20experiencing%20the%20problem%20on%3F%0A%20%20%2a%20ex:%20Nexus%20%3F%3F%3F%0A%2a%20What%20OS%20version%20are%20you%20running%20on%20the%20device%3F%0A%20%20%2a%20ex:%20Andriod%20%3F%3F%3F%0A%2a%20What%20version%20of%20the%20product%20are%20you%20using%3F%0A%20%20%2a%20SL4A%20r%3F%3F%3F%3F%0A%20%20%2a%20PythonForAndroid%20r%3F%3F%0A%2a%20What%20steps%20will%20reproduce%20the%20problem%3F%0A%20%201.%20%0A%20%202.%20%0A%20%203.%20%0A%2a%20What%20is%20the%20expected%20output%3F%20What%20do%20you%20see%20instead%3F%0A%20%20%2a%20expected:%20launch%20%3F%3F%3F%0A%20%20%2a%20see:%20stop%20running%0A%2a%20Please%20provide%20any%20additional%20information%20below.%0A)

##Install

[![QR code for binary(apk)][qrcode]](../../releases/download/6.1.1/sl4a-r6.1.1-arm-debug.apk)

[qrcode]: http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=http://github.com/kuri65536/sl4a/releases/download/6.1.1/sl4a-r6.1.1-arm-debug.apk&nonsense=something_that_ends_with.png

To install SL4A, you will need to enable the "Unknown sources" option in
your device's "Application" settings.

##Support

Still have questions? Check out the [FAQ](docs/FAQ.md).

Support for SL4A is provided by the community on the [project mailing
list](https://groups.google.com/forum/#!forum/android-scripting).

## Want to learn more? ##

Start by reading ["Introducing SL4A: The Scripting Layer for Android"][book1]
by Pieter Greyling and ["Packaging and Distributing"][book2]
by Paul Ferrill.

[book1]: http://github.com/kuri65536/sl4a/wiki/books/Practical_Android_Projects_Ch05_Introducing_SL4A.pdf
[book2]: http://github.com/kuri65536/sl4a/wiki/books/Pro_Android_Python_with_SL4A_Ch10_Packaging_and_Distributing.pdf

These are the intellectual property of Apress and are excerpt from the books
"Practical Android Projects" and "Pro Android Python with SL4A."

You can buy "Practical Android Projects" on
[Amazon](http://www.amazon.com/exec/obidos/ASIN/1430232439/ref=nosim/apre-20)
or directly from [Apress](http://apress.com/book/view/9781430232438).

Apress is happy to provide 25% off the price of the
"Practical Android Projects" eBook.
Simply enter the special code "SL4APROJECTROCKSHLDD" upon checkout when
purchasing the eBook [here](http://www.apress.com/book/view/1430232439).
Offer expires 12/30/11.

You can buy "Pro Android Python with SL4A" directly from
[Apress](http://www.apress.com/9781430235699).

Apress is also happy to provide 25% off the price of the "Pro Android Python
with SL4A" eBook.
Simply enter the special code "THESL4APROJECTROCKS" upon checkout when
purchasing the eBook [here](http://www.apress.com/9781430235699).
Offer expires 12/30/11.

## What's Powered by SL4A? ##

Want to see SL4A in action? Check out some of these cool SL4A powered projects:

### Rockets ###

SL4A was used by the Nexus One payload for sensor logging.
See the [article in Make](http://blog.makezine.com/archive/2010/07/nexus_onearduino_smallsat_satellite.html)
for more information about the project.

[![movie rockets 1][rockets1]](http://www.youtube.com/watch?feature=player_embedded&v=hQ7pUroGvFc)
[![movie rockets 2][rockets2]](http://www.youtube.com/watch?feature=player_embedded&v=nSyWDqgNRmo)
[rockets1]:http://img.youtube.com/vi/hQ7pUroGvFc/0.jpg
[rockets2]:http://img.youtube.com/vi/nSyWDqgNRmo/0.jpg

### Cellbots ###

We are a collection of hobbyists who want to free your cell phone
from your pocket and let it connect and move with the real world. How?
As a robot of course!

Cellbots aren't just about using your phone to control a
robot (which is cool too), but we aim on making your phone be the robot.

It already has touch, hearing, speech, vibration, and many more senses,
but needs legs (or wheels) to finally be the free roaming robot it was
born to be.

See the [Cellbots blog](http://www.cellbots.com/) or
[YouTube channel](http://www.youtube.com/user/cellbots) for more.

### Oplop ###

Using a single master password and various account names,
one can create an infinite number of unique account passwords.

These unique account passwords are commonly called password hashes,
domain-specific passwords, or per-site passwords.

See the [Oplop](http://code.google.com/p/oplop/) project page
for more information.

### Broadcast ###

Broadcast is an embedded web application for remote Android device management.
Broadcast has four goals:

* Remote monitoring: Make Android state and device data available over a network.
* Remote control: Allow remote control of an Android device over a network.
* Proof-of-concept: Demonstrate that complex ruby applications can run in
an Android environment, even with constrained resources.
* Framework: Set the groundwork for a number of advanced applications.

See [the project homepage](http://github.com/mleone/broadcast/), this
[presentation](http://www.slideshare.net/panopticdev/broadcast-presentation),
and this [screenshot](http://i52.tinypic.com/w9zfh4.jpg) for more information.

### SMS Merger ###

SMS Merger is an excellent example of what can be done with Python and
the WebView API.
SMS Merger is designed to send a series of personalized SMS. For example,
to let Antony, Bob and Claire know which seat number they have been
allocated for their exams, SMS Merger can turn a CSV file into
the following SMS messages:

```
Dear Antony, your seat is A1
Dear Bob, your seat is M4
Dear Claire, your seat is M2
```

See [these](http://3.bp.blogspot.com/_No4Im6k15Dw/TPDSlM_2ihI/AAAAAAAAAQA/pDxcy9w08vM/s1600/file-tab-with-preview.png)
[screenshots](http://2.bp.blogspot.com/_No4Im6k15Dw/TPDRiWnxk1I/AAAAAAAAAPo/o3ZhUsGgA_A/s1600/merge-tab.png)
and [Frank's blog](http://android-scripting.blogspot.com/) for more information.

---

Have a project you'd like to see listed here? Tell us about it on the
[mailing list](http://groups.google.com/group/android-scripting).

Please tell me issues
===
* [Create issue(github)](../../issues/new?title=&body=%2a%20What%20device(s)%20are%20you%20experiencing%20the%20problem%20on%3F%0A%20%20%2a%20ex:%20Nexus%20%3F%3F%3F%0A%2a%20What%20OS%20version%20are%20you%20running%20on%20the%20device%3F%0A%20%20%2a%20ex:%20Andriod%20%3F%3F%3F%0A%2a%20What%20version%20of%20the%20product%20are%20you%20using%3F%0A%20%20%2a%20SL4A%20r%3F%3F%3F%3F%0A%20%20%2a%20PythonForAndroid%20r%3F%3F%0A%2a%20What%20steps%20will%20reproduce%20the%20problem%3F%0A%20%201.%20%0A%20%202.%20%0A%20%203.%20%0A%2a%20What%20is%20the%20expected%20output%3F%20What%20do%20you%20see%20instead%3F%0A%20%20%2a%20expected:%20launch%20%3F%3F%3F%0A%20%20%2a%20see:%20stop%20running%0A%2a%20Please%20provide%20any%20additional%20information%20below.%0A)

Build Instructions
===

Gradle
---
* Clone this project, and type below in your terminal:

```shell
$ cd android/ScriptingLayerForAndroid
$ echo sdk.dir=/path/to/android-sdk > local.properties
$ sh /path/to/android-stdudio/gradle/gradle-2.2.1/bin/gradle assembleDebug
Building ??% ...
$ ls build/outputs/apk/
ScriptingLayerForAndroid-arm-debug.apk
```

Please replace /path/to strings to your environment or installed place.

* Connect you phone or launch a virtual machine, then send the apk to them:

```shell
$ /path/to/android-sdk/platform-tools/adb install build/outputs/apk/ScriptingLayerForAndroid-arm-debug.apk
```

* Install the interpreters apk in Android. (each interpreters is not build yet.)
* Enjoy scripting!

Android Studio
---
* Clone this project, and import it into Android stdudio.
* Select "Import project"
* Select the folder: cloned/project/android/Scriptinglayerforandroid
* Configure the gradle path: /path/to/android-stdudio/gradle/gradle-2.2.1
* Configure the android sdk path.

After Android Studio launch,

* Select the menu: "Build" >> "Build Module"
* Select the menu: "Run" >> "Run"
* Connect your phone or launch a virtual machine, compiled apk will be installed.

Eclipse
---
* Clone this project, and import it into Eclipse. Make sure that the Java compliance
level is at 1.6 (right-click any project, go to Properties > Java Compiler > Configure Workspace Settings
and select 1.6.

* Make sure that you have all the appropriate Android SDKs installed through Eclipse. You can determine
this by looking at what errors prop up.

* Make sure the environment variable ANDROID\_SDK is set, by going to Window > Preferences > Java >
Build Path > Classpath Variables and creating a new variable ANDROID\_SDK that points to the android-sdks
folder.

* Make sure you clean all projects by going to Project > Clean.

* If there are still issues, look at this to find tidbits you could possibly do:
http://jokar-johnk.blogspot.co.nz/2011/02/how-to-make-android-app-with-sl4a.html

Languages
===
Languages are shipped with Android application. (but not maintainanced well except of python.)

* [Perl](../../tree/lang-perl)
* [Python](https://github.com/kuri65536/python-for-android)
* [Rhino - Javascript](../../tree/lang-rhino)
* [Ruby - JRuby](../../tree/lang-jruby)
* [Tcl](../../tree/lang-tcl)

Facade
===
* [USBHostSerialFacade](/USBHostSerialFacade.md): for USB Serial devices