Celebrate the 15,000th downloads of AndroidShell! - 2010-10-9
What is it?
- Simply speaking, it enables you to play with any Android APIs at your PC but see
their immediate execution results on your phone,
such that you can grasp the APIs more rapidly than simply reading documents
- Technically speaking, it is a port of BeanShell to Android.
for snapshots of AndroidShell in
Who will need it?
Anyone who want to
learn how to develop applications on Android smartphones will find this small tool helpful.
To be noticed, you need to have a basic understanding of how to use Android SDK before starting
to enjoy the benefits of AndroidShell. Completing the official "hello world" tutorial
minimum recommended prerequisites.
Where to download
On your Android phone, search for "AndroidShell" in Android Market. There are a free version and a full version. See here
for the difference.
Supported Android phone models
tested it on HTC hero (Android 1.5), Moto XT800( Android 2.1) and the
emulators in Android SDK. I believe it will work on all Android phones
with Android OS version >=1.5.
If you are an
impatient reader and just want to have a quick try, you can use the local
console on the AndroidShell itself without setup the PC environment.
However, I highly encourage you to use the more easy-to-use PC based
console which requires you to complete some configuration steps as below)
- First, you should have installed Android SDK and the adb USB
driver （included in the Android SDK） on your PC. And
since you have had Android SDK, I assume you should also have installed
JRE as well.
- On your Android phone, search the free "AndroidShell" app in
Android Market and install it. There is also a paid full version, which provides
some extra conveniences for users. See here
- To be noticed, this app will ask for all Android system
defined permissions. Don't panic. This is harmless and just to enable
you to play with arbitrary Android APIs later.
- Enable the remote debug support in your phone's setting.
- Start the installed app on the phone (or emulator)
- Note down the httpd and sessiond port number as showed in the
first two lines of the app window. Let's suppose they are 1035 and 1036
- Connect your Android phone to your PC with USB cable.
- On your PC, open a command window. Suppose your Android SDK is installed at C:android_sdk
- "cd c:android_sdk ools"
- "adb forward tcp:1035 tcp:1035"
- "adb forward tcp:1036 tcp:1036"
- The above two commands maps your local 1035/1036 tcp port to
the 1035/1036 port of the phone. If unfortunately, your local 1035/1036
tcp port is already occupied, you could select any two consecutive
spare tcp ports instead. Refer to the adb help for more detail.
- Let's note down the lower local tcp port you have mapped to as local_port (i.e 1035 in previous example)
- Now click here to access the console page
- Read Tutorial page for some quick examples how you can
play with it
- You can not define your own class in AndroidShell yet
(however, you could use scripted object mechanism to define
implementations of any interface. See the "Manipulation of Android GUI"
example in the tutorial section).
How is it related to the Android
is also a port of BeanShell to Android by the ASE
believe my AndroidShell is somewhat more convenient than it.
- I didn't find a way in the BeanShell of ASE to invoke
arbitrary Android APIs. It did support certain Android APIs by wrapping
them to a proxy class to BeanShell, but you can invoke are just the
ones exposed by that class. But with AnroidShell you could directly use
any Anroid APIs.
- With BeanShell of ASE, you can only type command on the phone,
but AndroidShell allows you to type command from your PC.