[ANN] Android Debug Bridge (ADB) Scripting Language For Android(SL4A) convenience library

Discussion in 'Python' started by Stef Mientki, Nov 27, 2011.

  1. Stef Mientki

    Stef Mientki Guest

    hello,

    The information on ADB / SL4A is quiet overwhelming.
    Despite that, especially for people, not familiar with Linux, it's not an easy task to get their
    first program running.
    This library allows you to easy upload and run Python files on a Android device, without pressing
    any button on the Android device.

    After installing SL4A and Py4A on the Android device, and ADB on the hostmachine, it's just a matter
    of connecting the USB cable between Android device and host-PC, and run the program.

    One of the simplest program that will run out of the box (without touching any button on the Android
    device) :

    # *****************************************************
    from adb_sl4a_support import ADB_Connection

    ADB = ADB_Connection ()
    print ADB

    # Create a simple program
    Simple_Program = """
    import android
    droid = android.Android (( '%s', %s ))
    droid.makeToast ( "Wasn't that easy?")
    """ % ( ADB.SL4A_Servers [-1][0], ADB.SL4A_Servers [-1][1] )

    # execute the program (this will run the program from the host PC !!)
    exec ( Simple_Program )
    # *****************************************************

    you can find the library here:
    http://code.google.com/p/pylab-works/downloads/detail?name=adb_sl4a_support.py&can=2&q=

    cheers,
    Stef
     
    Stef Mientki, Nov 27, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ron Stephens
    Replies:
    23
    Views:
    2,941
    Ron Stephens
    Apr 12, 2004
  2. DaveInSidney
    Replies:
    0
    Views:
    439
    DaveInSidney
    May 9, 2005
  3. Stef Mientki
    Replies:
    0
    Views:
    313
    Stef Mientki
    Oct 23, 2008
  4. Stef Mientki
    Replies:
    0
    Views:
    225
    Stef Mientki
    Oct 24, 2008
  5. sterta bole
    Replies:
    0
    Views:
    811
    sterta bole
    Aug 27, 2012
Loading...

Share This Page