Mobile Devices

This page is starting out as a (simple) stub for related information.

Android scripting


Python for iPod and other tools:
  • Python 2.4.1 full sources for iPod [ 13 MB ]
  • diffs between standard distribution and python4ipod
  • how to cross-compile the Python interpreter

iPhone applications in Python:


A czech programmer wrote a "rather clean and easily extensible Python class that is capable of parsing the iTunesDB and similar formats into a proper object structure" as well as 4 helper programs in C:

A simple server for your iPhone/iPod
  • requires jailbreaking the iPod (has been a known security vulnerability) and installation of MobileTerminal and Python from Cydia
  • open MobileTerminal and type in python -m SimpleHTTPServer
    • By doing this, you will start an http server which will display your current directory. You can access it by going to your browser and typing "http://HOSTNAME:8000/. To learn what your hostname is, go to MobileTerminal and type in "hostname". For example, if your hostname is "iPod" and you run the server from within the /var/mobile directory, all you got to do is type in http://iPod:8000/ in your address field and Voila! You can see the /var/mobile directory.
  • if there is a problem with port 8000 or you simply want to use another port, for example 8080, type python -m SimpleHTTPServer 8080

  • in making an app for an iPod, go to /usr/bin and find the "python" command file (this is the interpreter) just copy that into any app you make. Then write it into the program to navigate to the app folder and launch the python interperator before doing anything else. This also means anyone can run the app on their touch, even if the never install python runtime! Why? Because just like jiggy, a copy of the interperator is include in each app you make! This will also work with perl and ruby, as long as you include the interpreter of that language in every app. (I don't know if you need to include modules)
  • you have to go into cydia, search python, then install the first one you see (before you do that, make sure that you have yourself known as a developer in the cydia settings. click settings in the manage tab, then choose the no filters one. i dont remember what it says, but choose developer). that will install all the stuff you need for python debugging.
  • use and you can write all the scripts and save them as .py files
    • make sure you save the .py file in /bin and make it 755 permissions. Then it will run your program and you can begin debugging
    • ?? you need to store your script in /var/private/mobile/
  • open terminal
    • type "su root" then it will ask you for a password. what ever password you use to log into your ipod through winscp is the one you type in
    • then type python
Topic revision: 25 Dec 2009, JamesBusser
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
Powered by Olark