Skip to content

Instantly share code, notes, and snippets.

@syui
Created February 18, 2014 01:23
Show Gist options
  • Save syui/9062782 to your computer and use it in GitHub Desktop.
Save syui/9062782 to your computer and use it in GitHub Desktop.
#!/system/bin/bash
# https://code.google.com/p/android-python27/wiki/TutorialHowToRunPythonfromShell
export PYTHONHOME=/data/data/com.android.python27/files/python
export PYTHONPATH=/sdcard/com.android.python27/extras/python:/data/data/com.android.python27/files/python/lib/python2.7/lib-dynload:/data/data/com.android.python27/files/python/lib/python2.7
export PATH=$PYTHONHOME/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/data/com.android.python27/files/python/lib:/data/data/com.android.python27/files/python/lib/python2.7/lib-dynload
export AP_HOST=localhost
export AP_PORT=45777
am start -a com.android.python27.LAUNCH_RPC_SERVER -n com.android.python27/.RpcServerLauncher --ei com.android.python27.RPC_SERVER_PORT 45777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment