diff --git a/README.md b/README.md index 340fb39..bf156f0 100644 --- a/README.md +++ b/README.md @@ -33,19 +33,15 @@ If your build was succesful then you can install Python using the `adb` tool, wh ``` $ adb push install/data/python /data/python +$ adb push python /system/bin/python +$ adb shell chmod 766 /system/bin/python ``` -Using -===== - -Once you have copied Python to your device you have to set `LD_LIBRARY_PATH`, `PYTHONHOME` and `PATH` correctly: +Now you should be able to run python with ``` $ adb shell -root@android:/data # export LD_LIBRARY_PATH=/data/python/lib -root@android:/data # export PYTHONHOME=/data/python -root@android:/data # export PATH=$PATH:/data/python/bin -root@android:/data # python +# python Python 2.7.3 (default, Dec 20 2012, 14:25:30) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. diff --git a/python b/python new file mode 100755 index 0000000..949f7bd --- /dev/null +++ b/python @@ -0,0 +1,6 @@ +#!/system/bin/sh + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/python/lib +export LD_PRELOAD=$LD_PRELOAD:/data/python/lib/libpython2.7.so +export PYTHONHOME=/data/python +/data/python/bin/python $@