| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Push Perl scripts to the live device

Page history last edited by Will 13 years, 4 months ago

This tutorial assumes that you:

 

Get and Install

 

1. Start by Downloading these files:

Save them into your ~/Eclipse/plugins/android-sdk-linux_86/tools folder.

http://android-scripting.googlecode.com/files/sl4a_r3.apk

http://android-scripting.googlecode.com/files/perl_for_android_r1.apk

 

2. Then enter in these commands to install them onto your device:

$ ./adb install sl4a_r3.apk

$ ./adb install perl_for_android_r1.apk

 

3. You will need to have WiFi running for this step:

On your device slide open the menu and open "Perl for Android" and then press Install.

 

Write and Push

 

1. Write the script:

Inside ~/Eclipse/plugins/android-sdk-linux_86/tools enter in these commands:

$ touch hello.pl

$ gedit hello.pl

 

Once in gedit paste in this script:

use Android;
my $a = Android->new();
$a->makeToast("Hello, Android!");

and save.

 

2. Push the script:

To send the script to the device enter in this command:

 ./adb push hello.pl /sdcard/sl4a/scripts

 

3. Run the script:

Open up sl4a on your device and touch "hello.pl"

 

 

 

 

Comments (0)

You don't have permission to comment on this page.