jardelsim / android-python27

Automatically exported from code.google.com/p/android-python27
0 stars 0 forks source link

LookupError: unknown encoding: hex #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile the project on Eclipse & deploy standard hello.py to an Android 2+ 
phone
2. Compile the project on Eclipse & deploy standard hello.py to an Android 4+ 
phone

What is the expected output? What do you see instead?

Both phones should toast a hello world message, but android 4.1+ phones will 
ran the service but not toast.

Please provide any additional information below.

I managed to discover the root cause by the adb shell: 

>>> import binascii
ImportError: Cannot load library: link_image[1891]:  8804 could not load needed 
library 'libz.so' for 'binascii.so' (get_lib_extents[742]:  8804 - libz.so is 
not a valid ELF object)

So, I renamed binascii.so to _binascii.so and copied the contents of 
https://gist.github.com/alanjds/6091309 as binascii.py (file attached) . 
Repacked python_27.zip and deployed. Now it works on both Android 2.3+ and 
Android 4.1+

Original issue reported on code.google.com by alan.jus...@gmail.com on 26 Jul 2013 at 7:04

Attachments:

GoogleCodeExporter commented 8 years ago
The root cause must be something else (device dependent), I just tested on 
Android 4.1.2 and 4.2.2 and the toast is displaying, also "import binascii" 
succeed.

What you can try is to get the logcat of the install, it may tell why it's not 
working on your device. 

Original comment by anthony....@gmail.com on 29 Jul 2013 at 8:32