- deleting the Android app deletes the wallet files
- rooting your phone might format userspace, hence delete the wallet files
Below procedure has been tested on
- an unrooted phone running Android 8.0; Electrum version 3.0.2.0 from Google Play
- an unrooted phone running Android 8.1; Electrum version 3.1.3.0 from Google Play
- you need a working
adb
(Android Debug Bridge) - you need a Java JDK (note: or maybe JRE is enough?)
On your computer, run
adb backup "org.electrum.electrum" -f back.ab
On your phone, follow the on-screen instructions. You are likely to need to choose a password (backup_password
), which will be used to encrypt the backup you are creating now.
The backup back.ab
will be automatically copied over to your computer over adb.
Find back.ab
on your computer. It should be in the current directory where you ran the command from.
Download the android-backup-extractor from https://github.com/nelenkov/android-backup-extractor/releases -- you will need abe-all.jar
.
Now decrypt back.ab
using abe-all.jar
. Run:
java -jar abe-all.jar unpack back.ab back.tar <backup_password>
There's a chance you run into the following exception:
WARNING: Maximum allowed key-length seems smaller than needed. Please check that unlimited strength cryptography is available, see README.md for details
Exception in thread "main" java.lang.RuntimeException: java.security.InvalidKeyException: Illegal key size
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:233)
at org.nick.abe.Main.main(Main.java:40)
Caused by: java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
at javax.crypto.Cipher.implInit(Cipher.java:805)
at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
at javax.crypto.Cipher.init(Cipher.java:1396)
at javax.crypto.Cipher.init(Cipher.java:1327)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:128)
... 1 more
In this case, you will need the "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files".
Download from http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
After you unzip it, there are two important files inside: local_policy.jar
and US_export_policy.jar
.
You will need to overwrite the respective files in your JAVA HOME folder with these two.
Specifically, the files should be in <java-home>/lib/security/
Example JAVA HOME on Linux: /usr/lib/jvm/<jdk_version_installed>/jre/
Example JAVA HOME on Windows: C:\Program Files\Java\<jdk_version_installed>\jre\
Example JAVA HOME on MacOS: /Library/Java/JavaVirtualMachines/<jdk_version_installed>/Contents/Home/jre/
After overwriting the two files, start step 3 again.
You should have a file called back.tar
. Untar it, or open it in some way.
Your wallets should be located in
back.tar/apps/org.electrum.electrum/f/data/wallets
Open the wallets using a desktop version of Electrum.