android - Python Debug Execution Mode -
I have compiled Python 2.7.2 (4.4.4) for Android using Android NDK 9D.
After loading the compiled objects to the target, I'm running on an issue where the executable works, but returns error code 1 for all the tasks except the version or the help menu.
I have copied the entire contents
/system/usr/bin/python2.7 /system/usr/lib/libpython2.7.so/ system / usr / Lib / python2.7 / * PYTHONHOME = / system / usr / PATH = / system / usr / bin: / sbin: / vendor / bin: / system / sbin: / system / bin: / system / xbin PYTHONPATH = / system / Usr / lib / python2.7 / lib-Dynload: /system/usr/lib/python2.7 LD_LIBRARY_PATH = / vendor / lib: / system / lib: / system / usr / lib: / system / usr / lib: / system /usr/lib/python2.7: / Python2.7 / lib-dynload Does a dragon respond to error messages and refuses to work (such as interactive mode) then I Can I know that this kind of cone Greshn to understand the code itself is the problem or what I would add that what is happening?
shell @ devicex: / # python2.7 --version Python 2.7.2 shell @ devicex: / # python2.7 --help Usage: python2.7 [options] ... [ -c cmd | -M modern | File | -] [AG] ... options and logic (and related environment variables): -b: do not write .pi [co] files on import; Also PYTHONDONTWRITEBYTECODE = X-CMDD: Passed as String Program (end of options list) -d: Debug output from parser; PYTHONDEBUG = x -E: PYTHON * Ignore environment variables (like PYTHONPATH) -h: Print this help message and exit (also --help) -i: Inspect interactive methods after running the script; If a stdin terminal does not appear, then also forces a signal; Also PYTHONINSPECT = x -m mod: run as a script library module (ending options list) -O: Generate customizable little bytecode; In addition to PYTHONOPTIMIZE = x -OO: -O optimization, remove the dock-string - Q arg: division option: -Could (default), -corn, -quarnol, -quaver -s: user add site directory no sys.path; PYTHONNOUSERSITE -S: does not mean 'import site' on initialization -t: Alerts about incompatible tab usage (-TT: problem errors) -U: unforcerated binary stdout and stderr; Also see the man page for details of internal buffering related to PYTHONUNBUFFERED = x '-u' -v: verbose (trace import statement); PYTHONVERBOX = x can be supplied multiple times to increase verbness - V: Print and exit the Python version number (also - version) - W arg: Warning control; ARG Action is: Message: Category: Module: linono also pithonwareing = RGR-X: leave the first line of the source, allow the use of #Unit-5 non-UNIX forms: about Python 3.x incompatibilities Warning that can not fix 2to3 files: The program is read from the script file: - The program is read from stdin (Default; Interface mode if a TTI) Arg ...: Programs Micro sys.argv have been in [1:] other environment variables: Piaithonstrtap interactive startup execute file (no default) PYTHONPATH: ':' - the default module separated list of predefined directories to the search path. The result is sys.path: PithonHome: Alternate & lt; Prefix & gt; The directory (or & lt; prefix & gt ;: & lt; exec_prefix & gt;) default module search path & lt; Prefix & gt; / PythonX.X uses PythonKosoc: ignore the 'import' statement (windows). Pythonenocoding: Encoding [: Errors] used for stdin / stdout / stderr, Shell @ devicex: / # shell @ devicex: / # python2.7; $ Echo? 1 shell @ device x: / # thanks
hacking After a bit of code, I realized that the python needs the /system/usr/include/python2.7 folder content to be present on the device. After copying that copy, it now works without any problems.
For the basic issue of not seeing any debug output, after seeing more in the code, I also found out that stdout and stderr have a sdcard log file so that's why I produce the error After fixing everything was okay on the output front.
Comments
Post a Comment