electrum icon indicating copy to clipboard operation
electrum copied to clipboard

compiling android apk successfully but Anroid app crashed upon start

Open charleshsu168 opened this issue 9 years ago • 13 comments

I compiled the source code to electrum-2.9.3-debug.apk successfully. but when i installed the apk onto my android device and started it, it crashed right away.

charleshsu168 avatar Aug 21 '17 03:08 charleshsu168

this is useless; you should use adb logcat to see why it crashes

ecdsa avatar Aug 21 '17 11:08 ecdsa

Below is the logcat output when it crashed...immediately upon starting. It seemed like the problem was ImportError: No module named urllib3. So I reinstalled the urllib3 from master and recompiled the apk and rerun again. Still the same problem.

08-21 09:25:33.172 195 631 D audio_hw_primary: disable_snd_device: snd_device(2: speaker) 08-21 09:25:33.869 11063 11103 W linker : /data/data/org.electrum.electrum/files/lib/python2.7/site-packages/Crypto/Util/strxor.so: is missing DT_SONAME will use basename as a replacement: "strxor.so" 08-21 09:25:34.017 11063 11103 I python : Traceback (most recent call last): 08-21 09:25:34.018 11063 11103 I python : File "main.py", line 95, in 08-21 09:25:34.018 11063 11103 I python : imp.load_module('electrum', *imp.find_module('lib')) 08-21 09:25:34.018 11063 11103 I python : File "/data/user/0/org.electrum.electrum/files/lib/init.py", line 3, in 08-21 09:25:34.018 11063 11103 I python : from wallet import Synchronizer, Wallet, Imported_Wallet 08-21 09:25:34.018 11063 11103 I python : File "/data/user/0/org.electrum.electrum/files/lib/wallet.py", line 65, in 08-21 09:25:34.018 11063 11103 I python : import paymentrequest 08-21 09:25:34.018 11063 11103 I python : File "/data/user/0/org.electrum.electrum/files/lib/paymentrequest.py", line 36, in 08-21 09:25:34.018 11063 11103 I python : import requests 08-21 09:25:34.018 11063 11103 I python : File "/data/data/org.electrum.electrum/files/packages/requests/init.py", line 43, in 08-21 09:25:34.018 11063 11103 I python : import urllib3 08-21 09:25:34.019 11063 11103 I python : ImportError: No module named urllib3 08-21 09:25:34.041 11063 11103 I python : Python for android ended. 08-21 09:25:34.045 11063 11063 V SDL : onWindowFocusChanged(): false 08-21 09:25:34.063 11063 11063 V SDL : onPause() 08-21 09:25:34.063 11063 11063 V SDL : nativePause() 08-21 09:25:34.112 601 638 E qcom_sensors_hal: hal_process_report_ind: Bad item quality: 11 08-21 09:25:34.118 1894 1894 W Binder_B: type=1400 audit(0.0:812): avc: denied { ioctl } for path="socket:[14883]" dev="sockfs" ino=14883 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0 08-21 09:25:34.118 1894 1894 W Binder_B: type=1400 audit(0.0:813): avc: denied { ioctl } for path="socket:[14883]" dev="sockfs" ino=14883 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0 08-21 09:25:34.139 1008 1008 I Keyboard.Facilitator: onFinishInput() 08-21 09:25:34.179 601 638 E qcom_sensors_hal: hal_process_report_ind: Bad item quality: 11 08-21 09:25:34.180 11063 11063 V SDL : surfaceDestroyed() 08-21 09:25:34.412 11063 11063 V SDL : onDestroy() 08-21 09:25:35.359 2188 2250 I Finsky : [203] com.google.android.finsky.h.c.a(22): Completed 0 account content syncs with 0 successful. 08-21 09:25:35.360 2188 2188 I Finsky : [1] com.google.android.finsky.services.e.a(5): Installation state replication succeeded.

charleshsu168 avatar Aug 21 '17 16:08 charleshsu168

Experiencing a similar issue on Replicant 6 using the pre-built apk avaliable on the official webpage.

Application displays the splash and then exists. This is the segment of the log that contained mention to Electrum. Please let me know if this can be refined into a more useful log.

Thank you for your time.

https://gist.github.com/GrimKriegor/7ad7bcc515aa6f7646947f3de24571bc

GrimKriegor avatar Aug 22 '17 02:08 GrimKriegor

@GrimKriegor your issue is different; reopening

ecdsa avatar Aug 22 '17 03:08 ecdsa

Most excellent, please let me know if I can be of use providing more information.

GrimKriegor avatar Aug 23 '17 19:08 GrimKriegor

@GrimKriegor it might be caused by your system (replicant != android) does it work with the official apk?

ecdsa avatar Aug 24 '17 04:08 ecdsa

There's indeed the possibility the system itself is at fault.

But Replicant 6 = LineageOS/CyanogenMod 13.

By official APK you mean the one in the Google PlayStore? I am unable to use that software source.

GrimKriegor avatar Aug 24 '17 06:08 GrimKriegor

note: the apk on the website is the same as on the playstore

ecdsa avatar Aug 29 '17 06:08 ecdsa

@GrimKriegor do we have the full log, or did you filter it with a grep command?

ecdsa avatar Aug 29 '17 06:08 ecdsa

Thank you for taking your time with such an atypical setup.

I should have mentioned I had successfully ran Electrum on Replicant 4.2 (CyanogenMod 10.1, Android 4.2) for a year before moving to this Replicant 6 device.

Booted the old device, which still had my Electrum 2.7.10 install and upgraded to the latest package available on the downloads page. It worked perfectly.

It would appear the issue is isolated to Replicant 6. Allow me some time to test it out on a CyanogenMod 13 installation to further isolate the problem.

The log was filtered by grep. Should I provide a full log? Maybe including Electrum installation as well?

GrimKriegor avatar Aug 30 '17 13:08 GrimKriegor

please provide the full log around the crash

ecdsa avatar Aug 30 '17 15:08 ecdsa

Sure thing. Here's the full log, from boot, going thru the Electrum install and an attempt to run it which resulted in a crash.

This was done on a separate device with a fresh install of Replicant 6.

Thanks for spending your time on this!

replicant6-electrum-install-crash.txt

GrimKriegor avatar Sep 08 '17 20:09 GrimKriegor

closing, inactive issue. APKs have changed a lot since, I doubt this is still relevant.

ecdsa avatar Dec 31 '20 08:12 ecdsa