Browse Source

android readme: update "access datadir on Android from desktop"

Added a section re pushing wallet to device.
It is surprisingly tricky, but using specifically the "/data/local/tmp"
folder as an intermediary, it works.
master
SomberNight 3 years ago
parent
commit
40cfa62c2d
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 13
      contrib/android/Readme.md

13
contrib/android/Readme.md

@ -126,12 +126,21 @@ and [android dev docs](https://developer.android.com/studio/build/building-cmdli
Note that this only works for debug builds! Otherwise the security model Note that this only works for debug builds! Otherwise the security model
of Android does not let you access the internal storage of an app without root. of Android does not let you access the internal storage of an app without root.
(See [this](https://stackoverflow.com/q/9017073)) (See [this](https://stackoverflow.com/q/9017073))
To pull a file:
``` ```
$ adb shell $ adb shell
$ run-as org.electrum.electrum ls /data/data/org.electrum.electrum/files/data adb$ run-as org.electrum.electrum ls /data/data/org.electrum.electrum/files/data
$ exit # to exit adb adb$ exit
$ adb exec-out run-as org.electrum.electrum cat /data/data/org.electrum.electrum/files/data/wallets/my_wallet > my_wallet $ adb exec-out run-as org.electrum.electrum cat /data/data/org.electrum.electrum/files/data/wallets/my_wallet > my_wallet
``` ```
To push a file:
```
$ adb push ~/wspace/tmp/my_wallet /data/local/tmp
$ adb shell
adb$ ls -la /data/local/tmp
adb$ run-as org.electrum.testnet.electrum cp /data/local/tmp/my_wallet /data/data/org.electrum.testnet.electrum/files/data/testnet/wallets/
adb$ rm /data/local/tmp/my_wallet
```
Or use Android Studio: "Device File Explorer", which can download/upload data directly from device (via adb). Or use Android Studio: "Device File Explorer", which can download/upload data directly from device (via adb).

Loading…
Cancel
Save