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.
This commit is contained in:
@@ -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
|
||||
of Android does not let you access the internal storage of an app without root.
|
||||
(See [this](https://stackoverflow.com/q/9017073))
|
||||
To pull a file:
|
||||
```
|
||||
$ adb shell
|
||||
$ run-as org.electrum.electrum ls /data/data/org.electrum.electrum/files/data
|
||||
$ exit # to exit adb
|
||||
adb$ run-as org.electrum.electrum ls /data/data/org.electrum.electrum/files/data
|
||||
adb$ exit
|
||||
$ 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).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user