Bitcoin Forum
April 19, 2024, 11:47:54 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to install last Electrum version on Android?  (Read 1747 times)
rPman (OP)
Legendary
*
Offline Offline

Activity: 1120
Merit: 1069


View Profile WWW
July 19, 2014, 01:32:41 PM
Last edit: July 19, 2014, 02:13:03 PM by rPman
 #1

Today, electrum instalation script here https://electrum.org/android.html does not work, it can't download file e4a-181zip.
Also, this version too old, as i known, public electrum servers does not work with this yet.

I was tried to make own compilation from git source using make_packages script, it successfully make file 'e4a-198zip' and placed to 'dists'.
Also, i have installed sl4a_r6.apk, PythonForAndroid_r5.apk and pressed Install button for any plugins and extras inside android python installation (phone android version 4.2.2).

After that, i was placed zip file to android sdcard and make my own install script and qr-code:
Code:
e4a_install.py
import zipfile, os
zipfile.ZipFile('/sdcard/Temp/e4a-198.zip').extractall()
os.rename('e4a-1.9.8','scripts/e4a-1.9.8')

Installation was successful but e4a.py show error in terminal
Code:
Error: python-ecdsa does not seem to be installed. Try 'sudo pip install ecdsa'
Where i can get ecdsa module for android python?

Здecь нe мoжeт нaxoдитьcя вaшa peклaмa Smiley
Protect a future of bitcoin, use p2pool
Donation in BTC: 19fv5yYtfWZ9jQNjx2ncmu1TTrvg5CczZe
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713570474
Hero Member
*
Offline Offline

Posts: 1713570474

View Profile Personal Message (Offline)

Ignore
1713570474
Reply with quote  #2

1713570474
Report to moderator
dabura667
Sr. Member
****
Offline Offline

Activity: 475
Merit: 252


View Profile
July 19, 2014, 03:28:38 PM
 #2

https://pypi.python.org/pypi/ecdsa

My Tip Address:
1DXcHTJS2DJ3xDoxw22wCt11FeAsgfzdBU
rPman (OP)
Legendary
*
Offline Offline

Activity: 1120
Merit: 1069


View Profile WWW
July 19, 2014, 07:55:56 PM
 #3

Certainly not, this package does not work on this android python installation.

Also, if I can compile python and all needed modules myself using arm gcc and root (but i can't), it does not give me a chance run any GUI applications. This is too complex problem to use this way.

6 months earlier, when I installed an older version (and another mobile version 2.x), everything worked well, I think that something has changed in the source electrum or I do not build it correctly under android

Здecь нe мoжeт нaxoдитьcя вaшa peклaмa Smiley
Protect a future of bitcoin, use p2pool
Donation in BTC: 19fv5yYtfWZ9jQNjx2ncmu1TTrvg5CczZe
dabura667
Sr. Member
****
Offline Offline

Activity: 475
Merit: 252


View Profile
July 20, 2014, 09:50:21 AM
 #4

Certainly not, this package does not work on this android python installation.

Also, if I can compile python and all needed modules myself using arm gcc and root (but i can't), it does not give me a chance run any GUI applications. This is too complex problem to use this way.

6 months earlier, when I installed an older version (and another mobile version 2.x), everything worked well, I think that something has changed in the source electrum or I do not build it correctly under android

I just diffed my ecdsa folder on my android with the link I gave you, and there were maybe two methods added. Other than that, it is exactly the same as the ecdsa I am using on my Android for Electrum.

My Tip Address:
1DXcHTJS2DJ3xDoxw22wCt11FeAsgfzdBU
rPman (OP)
Legendary
*
Offline Offline

Activity: 1120
Merit: 1069


View Profile WWW
July 20, 2014, 04:37:15 PM
 #5

Oops, my mistake, https://pypi.python.org/pypi/ecdsa is a '(pure python) library', compilation not needed.
How i can install easy_install or pip to android?

At now, i do it by hand:
* https://pypi.python.org/packages/source/e/ecdsa/ecdsa-0.11.tar.gz - simple copy ecdsa folder from zip file to /sdcard/com.googlecode.pythonforandroid/extras/python/ but i think it's not properly method
* https://pypi.python.org/pypi/pyasn1 - copy egg file to /sdcard/Download and install it ('Import Modules' button in 'Python for Android' application)
* https://pypi.python.org/pypi/pyasn1-modules - also install from egg
* https://pypi.python.org/packages/source/t/tlslite/tlslite-0.4.6.tar.gz - also manual copy tlslite folder from zip to extras

After it, e4a.py started well, but after wallet creation dialog (both method tested - 'create' and 'restore' from seed, via qr-code) i have got a error:
Code:
AttributeError: 'OldWallet' object has no attribute 'init_seed'
full log:
Code:
dlopen libpython2.6.soelectrum directory /sdcard/electrum/
wallet path /sdcard/electrum/wallets/default_wallet
blocks: -1
saving certificate for electrum.novit.ro
connected to electrum.novit.ro 50002
saving certificate for erbium.sytes.net
connected to erbium.sytes.net 50002
switching to electrum.novit.ro:50002:s
gui callback True
saving certificate for electrum.stepkrav.pw
saving certificate for bitcoin.epicinet.net
connected to electrum.stepkrav.pw 50002
connected to bitcoin.epicinet.net 50002
saving certificate for electrum.thwg.org
connected to electrum.thwg.org 50002
gui callback True
Requesting chunk: 0
saving certificate for h.1209k.com
connected to h.1209k.com 50002
saving certificate for cube.l0g.in
connected to cube.l0g.in 50002
Traceback (most recent call last):
  File "/storage/sdcard0/sl4a/scripts/e4a-1.9.8/e4a.py", line 201, in <module>
    gui = gui.ElectrumGui(config, network)
  File "/storage/sdcard0/sl4a/scripts/e4a-1.9.8/gui/android.py", line 904, in _
init__
    wallet.init_seed(None)
AttributeError: 'OldWallet' object has no attribute 'init_seed'

As i understand, this is a dev error, some refactoring is not completed, android.py has not been updated. (i compare some code with gtk.py, too much diffs)

p.s. https://github.com/spesmilo/electrum/issues/763

Здecь нe мoжeт нaxoдитьcя вaшa peклaмa Smiley
Protect a future of bitcoin, use p2pool
Donation in BTC: 19fv5yYtfWZ9jQNjx2ncmu1TTrvg5CczZe
dabura667
Sr. Member
****
Offline Offline

Activity: 475
Merit: 252


View Profile
July 20, 2014, 05:11:43 PM
Last edit: July 20, 2014, 05:36:10 PM by dabura667
 #6

Oops, my mistake, https://pypi.python.org/pypi/ecdsa is a '(pure python) library', compilation not needed.
How i can install easy_install or pip to android?

At now, i do it by hand:
* https://pypi.python.org/packages/source/e/ecdsa/ecdsa-0.11.tar.gz - simple copy ecdsa folder from zip file to /sdcard/com.googlecode.pythonforandroid/extras/python/ but i think it's not properly method
* https://pypi.python.org/pypi/pyasn1 - copy egg file to /sdcard/Download and install it ('Import Modules' button in 'Python for Android' application)
* https://pypi.python.org/pypi/pyasn1-modules - also install from egg
* https://pypi.python.org/packages/source/t/tlslite/tlslite-0.4.6.tar.gz - also manual copy tlslite folder from zip to extras

After it, e4a.py started well, but after wallet creation dialog (both method tested - 'create' and 'restore' from seed, via qr-code) i have got a error:
Code:
AttributeError: 'OldWallet' object has no attribute 'init_seed'
full log:
Code:
dlopen libpython2.6.soelectrum directory /sdcard/electrum/
wallet path /sdcard/electrum/wallets/default_wallet
blocks: -1
saving certificate for electrum.novit.ro
connected to electrum.novit.ro 50002
saving certificate for erbium.sytes.net
connected to erbium.sytes.net 50002
switching to electrum.novit.ro:50002:s
gui callback True
saving certificate for electrum.stepkrav.pw
saving certificate for bitcoin.epicinet.net
connected to electrum.stepkrav.pw 50002
connected to bitcoin.epicinet.net 50002
saving certificate for electrum.thwg.org
connected to electrum.thwg.org 50002
gui callback True
Requesting chunk: 0
saving certificate for h.1209k.com
connected to h.1209k.com 50002
saving certificate for cube.l0g.in
connected to cube.l0g.in 50002
Traceback (most recent call last):
  File "/storage/sdcard0/sl4a/scripts/e4a-1.9.8/e4a.py", line 201, in <module>
    gui = gui.ElectrumGui(config, network)
  File "/storage/sdcard0/sl4a/scripts/e4a-1.9.8/gui/android.py", line 904, in _
init__
    wallet.init_seed(None)
AttributeError: 'OldWallet' object has no attribute 'init_seed'

As i understand, this is a dev error, some refactoring is not completed, android.py has not been updated. (i compare some code with gtk.py, too much diffs)

p.s. https://github.com/spesmilo/electrum/issues/763

I replied in the issue. You must use 1.9.8 and NOT master head. Currently in the process of developing a Kivy based Android client, so the Android version is now abandoned until 2.0 comes out (and along with it, an official Play Store version for Android, using Kivy) Please use 1.9.8... which by the way, is actually on the download server, just the download page hasn't been updated.


Code:
e4a_install.py
import urllib, zipfile, os
p="http://download.electrum.org/download/e4a-198zip"
n="e4a-1.9.8"
nz=n+".zip"
urllib.urlretrieve(p,nz)
zipfile.ZipFile(nz).extractall()
os.rename(n,'scripts/'+n)

Use this script with the S4LA app instead of the QR on the download page.

My Tip Address:
1DXcHTJS2DJ3xDoxw22wCt11FeAsgfzdBU
rPman (OP)
Legendary
*
Offline Offline

Activity: 1120
Merit: 1069


View Profile WWW
July 20, 2014, 05:36:50 PM
 #7

i understand you, thanks

Здecь нe мoжeт нaxoдитьcя вaшa peклaмa Smiley
Protect a future of bitcoin, use p2pool
Donation in BTC: 19fv5yYtfWZ9jQNjx2ncmu1TTrvg5CczZe
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!