CYBER SECURITY   INFORMATION TECHNOLOGY                                                               AppSec              ...
Class IntroductionCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWO...
Python HistoryCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK C...
CYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK CYBER SECURITY ...
Android PythonCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK C...
Set up the Android SDKCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER N...
Android Virtual Device (AVD)CYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-...
Android PythonCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK C...
Android PythonCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK C...
AVD CreatedCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK CYBE...
AVD StartCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK CYBER ...
Use the Browser in the AVDCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-US...
Download SL4ACYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK CY...
Install SL4ACYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK CYB...
SL4A InstalledCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK C...
Now Python has to be installedCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULT...
InstallCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK CYBER SE...
Run a scriptCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK CYB...
Run HelloWorld.pyCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWOR...
Says “Hello, Android!”CYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER N...
See the scriptsCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK ...
Write a small scriptCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NET...
Set the scriptsCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK ...
Execute the scriptCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWO...
GreetingCYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK CYBER S...
CYBER SECURITY   INFORMATION TECHNOLOGY   CRITICAL INFRASTRUCTURE   HOMELAND SECURITY   MULTI-USER NETWORK CYBER SECURITY ...
Upcoming SlideShare
Loading in...5
×

Python For Droid

616

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
616
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Python For Droid"

  1. 1. CYBER SECURITY INFORMATION TECHNOLOGY AppSec CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE (By Rich Helton) Python for Droid (September 21, 2011) State of Colorado Office of Cyber Security State of Colorado Office of Cyber Security
  2. 2. Class IntroductionCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   A good reference for an online Python class is http://code.google.com/edu/languages/google-python-class/ introduction.html , PyQuick Python Class from Google University.   Another place for reference Python Documentation, http://www.python.org/doc/ State of Colorado Office of Cyber Security
  3. 3. Python HistoryCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   From http://en.wikipedia.org/wiki/Python_(programming_language) ,   Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.   The reference implementation of Python (CPython) is free and open source software and has a community-based development model, as do nearly all of its alternative implementations.   Python interpreters are available for many operating systems, and Python programs can be packaged into stand-alone executable code for many systems using various tools.   Python’s implementation was started in December 1989 by Guido van Rossum in the Netherlands as a successor to the ABD programming language. State of Colorado Office of Cyber Security
  4. 4. CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE Android Python State of Colorado Office of Cyber Security
  5. 5. Android PythonCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Android is basically a Micro Edition of Linux, and because Linux normally runs Python, Android can add a package to run Python.   See http://hameedullah.com/develop-your-first-android-application-in- python.html State of Colorado Office of Cyber Security
  6. 6. Set up the Android SDKCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   First the Android environment, Software Development Kit (SDK), needs to be set up on the local Desktop, http://developer.android.com/sdk/installing.html : State of Colorado Office of Cyber Security
  7. 7. Android Virtual Device (AVD)CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE  An AVD will have to be created for debugging and testing, this is your target device, State of Colorado Office of Cyber Security
  8. 8. Android PythonCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Create an AVD from your now installed Android SDK, by creating a new Virtual Device, http://developer.android.com/guide/developing/devices/index.html State of Colorado Office of Cyber Security
  9. 9. Android PythonCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   The “New” Virtual Device for Android, State of Colorado Office of Cyber Security
  10. 10. AVD CreatedCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   The new AVD called “PythonDev”, State of Colorado Office of Cyber Security
  11. 11. AVD StartCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Start “PythonDev”, State of Colorado Office of Cyber Security
  12. 12. Use the Browser in the AVDCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Open the Browser in “PythonDev”, and go to http://code.google.com/p/android-scripting so install Android Scripting State of Colorado Office of Cyber Security
  13. 13. Download SL4ACYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   After tapping on the QR code icon (center box) to download, State of Colorado Office of Cyber Security
  14. 14. Install SL4ACYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Double click the download to install, State of Colorado Office of Cyber Security
  15. 15. SL4A InstalledCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Installed, State of Colorado Office of Cyber Security
  16. 16. Now Python has to be installedCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Go back in the browser and to the SL4A website, hit the download URL for Python for Android and you will get, State of Colorado Office of Cyber Security
  17. 17. InstallCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   After downloading, you need to install Python, State of Colorado Office of Cyber Security
  18. 18. Run a scriptCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Go to applications and select SL4A, State of Colorado Office of Cyber Security
  19. 19. Run HelloWorld.pyCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Select the Run icon on script, State of Colorado Office of Cyber Security
  20. 20. Says “Hello, Android!”CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   You get the “Hello, Android!” State of Colorado Office of Cyber Security
  21. 21. See the scriptsCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Android uses a bridge, called “adb” to talk from the desktop to the emulator. Under the android SDK/platform-tools, run “adb shell ls / sdcard/sl4a/scripts”, State of Colorado Office of Cyber Security
  22. 22. Write a small scriptCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   We are going to write a small script that prints the inputted name with a greeting, Notepad will work, State of Colorado Office of Cyber Security
  23. 23. Set the scriptsCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Run “adb push myGreet.py /sdcard/sl4a/scripts”, to copy this python file to the emulator, State of Colorado Office of Cyber Security
  24. 24. Execute the scriptCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   Execute the “myGreet.py” script, State of Colorado Office of Cyber Security
  25. 25. GreetingCYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE   After typing in your name, you get a greeting, State of Colorado Office of Cyber Security
  26. 26. CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE HOMELAND SECURITY MULTI-USER NETWORK CYBER SECURITY INFORMATION TECHNOLOGY CRITICAL INFRASTRUCTURE Questions? Have a Good Day State of Colorado Office of Cyber Security
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×