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

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Push Perl scripts to the live device

Page history last edited by Will 9 years, 10 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.