Skip to content

Electrum  #11

@Stonefox36

Description

@Stonefox36

rmux!

Docs: https://termux.dev/docs
Donate: https://termux.dev/donate
Community: https://termux.dev/community

Working with packages:

  • Search: pkg search
  • Install: pkg install
  • Upgrade: pkg upgrade

Subscribing to additional repositories:

  • Root: pkg install root-repo
  • X11: pkg install x11-repo

For fixing any repository issues,
try 'termux-change-repo' command.

Report issues at https://termux.dev/issues
~ $ import subprocess
content):
try:
subprocess.Popen(["electrum-share", content])
except Exception as e:
print_error(f"Wrapper failed: {e}")The program import is not installed. Install it by executing:
pkg install imagemagick
~ $
~ $ def doShare(self, content):
bash: syntax error near unexpected token (' ~ $ try: No command try: found, did you mean: Command tr in package coreutils Command tred in package graphviz Command tri in package mesa-demos Command tree in package tree Command trz in package trzsz-go Command ttyc in package ttyc Command ttyd in package ttyd ~ $ subprocess.Popen(["electrum-share", content]) bash: syntax error near unexpected token ["electrum-share",'
~ $ except Exception as e:
No command except found, did you mean:
Command expect in package expect
~ $ print_error(f"Wrapper failed: {e}")electrum-share "Hello from Electrum"chmod +x /bin/electrum-share#!/data/data/com.termux/files/usr/bin/bash
bash: !/data/data/com.termux/files/usr/bin/bash: event not found
~ $
~ $ # Termux wrapper for Electrum's broken doShare()
~ $ # Usage: electrum-share "text to share"
~ $
~ $ CONTENT="$1"
~ $ OUT="/sdcard/electrum_shared.txt"
~ $
~ $ # Write content to file
~ $ echo "$CONTENT" > "$OUT"
UT"
$
~ $ # Optional: also copy to clipboard
~ $ termux-clipboard-set "$CONTENT"
The program termux-clipboard-set is not installed. Install it by executing:
pkg install termux-api
~ $
~ $ # Optional: trigger Android share sheet
~ $ termux-share "$OUT"nano ~/bin/electrum-sharetermux-share /sdcard/electrum_shared.txtdef doShare(self, content):
bash: syntax error near unexpected token `('
~ $ from electrum.util import print_error
QEClipboard.get_instance().setText(content)
print_error("Fallback share: content copied to clipboard.")

    # 2. Export to a readable file
    out_path = "/sdcard/electrum_shared.txt"
    with open(out_path, "w") as f:
        f.write(content)
    print_error(f"Fallback share: exported to {out_path}")

except Exception as e:
    print_error(f"Fallback share failed: {e}")The program from is not installed. Install it by executing:

pkg install mailutils
~ $ from electrum.gui.qml.qeclipboard import QEClipboard
The program from is not installed. Install it by executing:
pkg install mailutils
~ $
~ $ try:
No command try: found, did you mean:
Command tr in package coreutils
Command tred in package graphviz
Command tri in package mesa-demos
Command tree in package tree
Command trz in package trzsz-go
Command ttyc in package ttyc
Command ttyd in package ttyd
~ $ # 1. Copy to clipboard (works on all Android versions)
~ $ QEClipboard.get_instance().setText(content)
bash: syntax error near unexpected token .setText' ~ $ print_error("Fallback share: content copied to clipboard.") bash: syntax error near unexpected token "Fallback share: content copied to clipboard."'
~ $
~ $ # 2. Export to a readable file
~ $ out_path = "/sdcard/electrum_shared.txt"
out_path: command not found
~ $ with open(out_path, "w") as f:
bash: syntax error near unexpected token (' ~ $ f.write(content) bash: syntax error near unexpected token content'
~ $ print_error(f"Fallback share: exported to {out_path}")
bash: syntax error near unexpected token f"Fallback share: exported to {out_path}"' ~ $ ~ $ except Exception as e: No command except found, did you mean: Command expect in package expect ~ $ print_error(f"Fallback share failed: {e}")def doShare(self, data):electrum/gui/qml/qeapp.pyfrom electrum.util import print_error rd.get_ibash: syntax error near unexpected token f"Fallback share failed: {e}"'
nstance().~ $ from electrum.gui.qml.qeapp import QEApp
pied to clipboard as fallback.")
# Optional: save to file
with open("/sdcard/electrum_share.txt", "w") as f:
f.write(content)
print_error("Content exported to /sdcard/electrum_share.txt")
except Exception as e:
print_error(f"Fallback failed: {e}")The program from is not installed. Install it by executing:
pkg install mailutils
~ $ from electrum.gui.qml.qeclipboard import QEClipboard
The program from is not installed. Install it by executing:
pkg install mailutils
~ $
~ $ def doShare(self, content):
bash: syntax error near unexpected token (' ~ $ try: No command try: found, did you mean: Command tr in package coreutils Command tred in package graphviz Command tri in package mesa-demos Command tree in package tree Command trz in package trzsz-go Command ttyc in package ttyc Command ttyd in package ttyd ~ $ # Fallback: copy to clipboard ~ $ QEClipboard.get_instance().setText(content) bash: syntax error near unexpected token .setText'
~ $ print_error("Content copied to clipboard as fallback.")
bash: syntax error near unexpected token "Content copied to clipboard as fallback."' ~ $ # Optional: save to file ~ $ with open("/sdcard/electrum_share.txt", "w") as f: bash: syntax error near unexpected token ('
~ $ f.write(content)
bash: syntax error near unexpected token content' ~ $ print_error("Content exported to /sdcard/electrum_share.txt") bash: syntax error near unexpected token "Content exported to /sdcard/electrum_share.txt"'
~ $ except Exception as e:
No command except found, did you mean:
Command expect in package expect
~ $ print_error(f"Fallback failed: {e}")termux-share /sdcard/electrum_share.txt#!/data/data/com.termux/files/usr/bin/bash
bash: !/data/data/com.termux/files/usr/bin/bash: event not found
re()

Usage: electrum-share "text to share~ $

~ $ # Termux wrapper for Electrum's broken doShare()
~ $ # Usage: electrum-share "text to share"
~ $
~ $ CONTENT="$1"
~ $ OUT="/sdcard/electrum_shared.txt"
~ $
~ $ # Write content to file
~ $ echo "$CONTENT" > "$OUT"
"$CONTENT"

Optional: trigger Android share sheet

termux-share "$OUT"~ $
~ $ # Optional: also copy to clipboard
~ $ termux-clipboard-set "$CONTENT"
The program termux-clipboard-set is not installed. Install it by executing:
pkg install termux-api
~ $
~ $ # Optional: trigger Android share sheet
~ $ termux-share "$OUT"electrum-share "Hello from Electrum"import subprocess
t])
except Exception as e:
print_error(f"Wrapper failed: {e}")The program termux-share is not installed. Install it by executing:
pkg install termux-api
~ $
~ $ def doShare(self, content):
bash: syntax error near unexpected token (' ~ $ try: No command try: found, did you mean: Command tr in package coreutils Command tred in package graphviz Command tri in package mesa-demos Command tree in package tree Command trz in package trzsz-go Command ttyc in package ttyc Command ttyd in package ttyd ~ $ subprocess.Popen(["electrum-share", content]) bash: syntax error near unexpected token ["electrum-share",'
~ $ except Exception as e:
No command except found, did you mean:
Command expect in package expect
~ $ print_error(f"Wrapper failed: {e}")chmod +x ~/bin/electrum-share#!/data/data/com.termux/files/usr/bin/bash
electrum-share "text to share"

CONTENT="$1"
OUT=bash: !/data/data/com.termux/files/usr/bin/bash: event not found
~ $
~ $ # Termux wrapper for Electrum's broken doShare()
~ $ # Usage: electrum-share "text to share"
~ $
~ $ CONTENT="$1"
~ $ OUT="/sdcard/electrum_shared.txt"
~ $
~ $ # Write content to file
~ $ echo "$CONTENT" > "$OUT"
~ $
~ $ # Optional: also copy to clipboard
~ $ termux-clipboard-set "$CONTENT"
The program termux-clipboard-set is not installed. Install it by executing:
pkg install termux-api
~ $
~ $ # Optional: trigger Android share sheet
~ $ termux-share "$OUT"nano ~/bin/electrum-sharetermux-share /sdcard/electrum_shared.txtdef doShare(self, content):
bash: syntax error near unexpected token `('
~ $ from electrum.util import print_error
QEClipboard.get_instance().setText(content)
print_error("Fallback share: content copied to clipboard.")

    # 2. Export to a readable file
    out_path = "/sdcard/electrum_shared.txt"
    with open(out_path, "w") as f:
        f.write(content)
    print_error(f"Fallback share: exported to {out_path}")

except Exception as e:
    print_error(f"Fallback share failed: {e}")The program from is not installed. Install it by executing:

pkg install mailutils
~ $ from electrum.gui.qml.qeclipboard import QEClipboard
The program from is not installed. Install it by executing:
pkg install mailutils
~ $
~ $ try:
No command try: found, did you mean:
Command tr in package coreutils
Command tred in package graphviz
Command tri in package mesa-demos
Command tree in package tree
Command trz in package trzsz-go
Command ttyc in package ttyc
Command ttyd in package ttyd
~ $ # 1. Copy to clipboard (works on all Android versions)
~ $ QEClipboard.get_instance().setText(content)
bash: syntax error near unexpected token .setText' ~ $ print_error("Fallback share: content copied to clipboard.") bash: syntax error near unexpected token "Fallback share: content copied to clipboard."'
~ $
~ $ # 2. Export to a readable file
~ $ out_path = "/sdcard/electrum_shared.txt"
out_path: command not found
~ $ with open(out_path, "w") as f:
bash: syntax error near unexpected token (' ~ $ f.write(content) bash: syntax error near unexpected token content'
~ $ print_error(f"Fallback share: exported to {out_path}")
bash: syntax error near unexpected token f"Fallback share: exported to {out_path}"' ~ $ ~ $ except Exception as e: No command except found, did you mean: Command expect in package expect ~ $ print_error(f"Fallback share failed: {e}")def doShare(self, data):electrum/gui/qml/qeapp.pytermux-share /sdcard/electrum_share.txtfrom electrum.util import print_error bash: syntax error near unexpected token f"Fallback share failed: {e}"'
~ $ from electrum.gui.qml.qeapp import QEApp
The program from is not installed. Install it by executing:
pkg install mailutils
~ $ from electrum.gui.qml.qeclipboard import QEClipboard
The program from is not installed. Install it by executing:
pkg install mailutils
~ $
~ $ def doShare(self, content):
bash: syntax error near unexpected token (' ~ $ try: No command try: found, did you mean: Command tr in package coreutils Command tred in package graphviz Command tri in package mesa-demos Command tree in package tree Command trz in package trzsz-go Command ttyc in package ttyc Command ttyd in package ttyd ~ $ # Fallback: copy to clipboard ~ $ QEClipboard.get_instance().setText(content) bash: syntax error near unexpected token .setText'
~ $ print_error("Content copied to clipboard as fallback.")
bash: syntax error near unexpected token "Content copied to clipboard as fallback."' ~ $ # Optional: save to file ~ $ with open("/sdcard/electrum_share.txt", "w") as f: bash: syntax error near unexpected token ('
~ $ f.write(content)
bash: syntax error near unexpected token content' ~ $ print_error("Content exported to /sdcard/electrum_share.txt") bash: syntax error near unexpected token "Content exported to /sdcard/electrum_share.txt"'
~ $ except Exception as e:
No command except found, did you mean:
Command expect in package expect
~ $ print_error(f"Fallback failed: {e}")1JoGftW55dE2MkD2cg38fJaWs4TXJzNnV8from electrum.util import print_error
bash: syntax error near unexpected token `f"Fallback failed: {e}"'
~ $ from electrum.gui.qml.qeapp import QEApp
rt QEClipboard

def doShare(self, content):
try:
# Fallback: copy to clipboard
QEClipboard.get_instance().setText(content)
print_error("Content copied to clipboard as fallback.")
# Optional: save to file
with open("/sdcard/electrum_share.txt", "w") as f:
f.write(content)
print_error("Content exported to /sdcard/electrum_share.txt")
except Exception as e:
print_error(f"Fallback failed: {e}")The program from is not installed. Install it by executing:
pkg install mailutils
~ $ from electrum.gui.qml.qeclipboard import QEClipboard
The program from is not installed. Install it by executing:
pkg install mailutils
~ $
~ $ def doShare(self, content):
bash: syntax error near unexpected token (' ~ $ try: No command try: found, did you mean: Command tr in package coreutils Command tred in package graphviz Command tri in package mesa-demos Command tree in package tree Command trz in package trzsz-go Command ttyc in package ttyc Command ttyd in package ttyd ~ $ # Fallback: copy to clipboard ~ $ QEClipboard.get_instance().setText(content) bash: syntax error near unexpected token .setText'
~ $ print_error("Content copied to clipboard as fallback.")
bash: syntax error near unexpected token "Content copied to clipboard as fallback."' ~ $ # Optional: save to file ~ $ with open("/sdcard/electrum_share.txt", "w") as f: bash: syntax error near unexpected token ('
~ $ f.write(content)
bash: syntax error near unexpected token content' ~ $ print_error("Content exported to /sdcard/electrum_share.txt") bash: syntax error near unexpected token "Content exported to /sdcard/electrum_share.txt"'
~ $ except Exception as e:
No command except found, did you mean:
Command expect in package expect
~ $ def doShare(self, content):import subprocess
bash: syntax error near unexpected token (' ~ $ ~ $ def doShare(self, content): bash: syntax error near unexpected token ('
~ $ try:
No command try: found, did you mean:
Command tr in package coreutils
Command tred in package graphviz
Command tri in package mesa-demos
Command tree in package tree
Command trz in package trzsz-go
Command ttyc in package ttyc
Command ttyd in package ttyd
~ $ subprocess.Popen(["electrum-share", content])
bash: syntax error near unexpected token `["electrum-share",'
~ $ except Exception as e:
No command except found, did you mean:
Command expect in package expect
~ $ print_error(f"Wrapper failed: {e}")electrum-share "Hello from Electrum"chmod +x ~/bin/electrum-share#!/data/data/com.termux/files/usr/bin/bash
bash: !/data/data/com.termux/files/usr/bin/bash: event not found
~ $
~ $ # Termux wrapper for Electrum's broken doShare()
~ $ # Usage: electrum-share "text to share"
~ $
~ $ CONTENT="$1"
~ $ OUT="/sdcard/electrum_shared.txt"
~ $
~ $ # Write content to file
~ $ echo "$CONTENT" > "$OUT"
ermux-clipboard-set "$CONTENT"

Optional: trigger Android share sheet

termux-share "$OUT"~ $
~ $ # Optional: also copy to clipboard
~ $ termux-clipboard-set "$CONTENT"
The program termux-clipboard-set is not installed. Install it by executing:
pkg install termux-api
~ $
~ $ # Optional: trigger Android share sheet
~ $ termux-share "$OUT"nano ~/bin/electrum-sharetermux-share /sdcard/electrum_shared.txtdef doShare(self, content):
bash: syntax error near unexpected token `('
~ $ from electrum.util import print_error
lipboard (works on all Android versions)
QEClipboard.get_instance().setText(content)
print_error("Fallback share: content copied to clipboard.")

    # 2. Export to a readable file
    out_path = "/sdcard/electrum_shared.txt"
    with open(out_path, "w") as f:
        f.write(content)
    print_error(f"Fallback share: exported to {out_path}")

except Exception as e:
    print_error(f"Fallback share failed: {e}")The program from is not installed. Install it by executing:

pkg install mailutils
~ $ from electrum.gui.qml.qeclipboard import QEClipboard
The program from is not installed. Install it by executing:
pkg install mailutils
~ $
~ $ try:
No command try: found, did you mean:
Command tr in package coreutils
Command tred in package graphviz
Command tri in package mesa-demos
Command tree in package tree
Command trz in package trzsz-go
Command ttyc in package ttyc
Command ttyd in package ttyd
~ $ # 1. Copy to clipboard (works on all Android versions)
~ $ QEClipboard.get_instance().setText(content)
bash: syntax error near unexpected token .setText' ~ $ print_error("Fallback share: content copied to clipboard.") bash: syntax error near unexpected token "Fallback share: content copied to clipboard."'
~ $
~ $ # 2. Export to a readable file
~ $ out_path = "/sdcard/electrum_shared.txt"
out_path: command not found
~ $ with open(out_path, "w") as f:
bash: syntax error near unexpected token (' ~ $ f.write(content) bash: syntax error near unexpected token content'
~ $ print_error(f"Fallback share: exported to {out_path}")
bash: syntax error near unexpected token f"Fallback share: exported to {out_path}"' ~ $ ~ $ except Exception as e: No command except found, did you mean: Command expect in package expect ~ $ print_error(f"Fallback share failed: {e}")def doShare(self, data):electrum/gui/qml/qeapp.pytermux-share /sdcard/electrum_share.txtfrom electrum.util import print_error rint_error("Content copied to clipbobash: syntax error near unexpected token f"Fallback share failed: {e}"'
~ $ from electrum.gui.qml.qeapp import QEApp
# Optional: save to file
with open("/sdcard/electrum_share.txt", "w") as f:
f.write(content)
print_error("Content exported to /sdcard/electrum_share.txt")
except Exception as e:
print_error(f"Fallback failed: {e}")The program from is not installed. Install it by executing:
pkg install mailutils
~ $ from electrum.gui.qml.qeclipboard import QEClipboard
The program from is not installed. Install it by executing:
pkg install mailutils
~ $
~ $ def doShare(self, content):
bash: syntax error near unexpected token (' ~ $ try: No command try: found, did you mean: Command tr in package coreutils Command tred in package graphviz Command tri in package mesa-demos Command tree in package tree Command trz in package trzsz-go Command ttyc in package ttyc Command ttyd in package ttyd ~ $ # Fallback: copy to clipboard ~ $ QEClipboard.get_instance().setText(content) bash: syntax error near unexpected token .setText'
~ $ print_error("Content copied to clipboard as fallback.")
bash: syntax error near unexpected token "Content copied to clipboard as fallback."' ~ $ # Optional: save to file ~ $ with open("/sdcard/electrum_share.txt", "w") as f: bash: syntax error near unexpected token ('
~ $ f.write(content)
bash: syntax error near unexpected token content' ~ $ print_error("Content exported to /sdcard/electrum_share.txt") bash: syntax error near unexpected token "Content exported to /sdcard/electrum_share.txt"'
~ $ except Exception as e:
No command except found, did you mean:
Command expect in package expect
~ $ print_error(f"Fallback failed: {e}")https://privatekeys.pw/keys/bitcoin/1#0000000000000000000000000000000000000000000000000000000000000002https://invite.kirin-world.org/share2.html?qr=NzWBNzc1gTk3NzY4OAhttps://www.axtkprox.com?fid=54657011https://privatekeys.pw/keys/bitcoin/1#000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000041cMh228HTCiwS8ZsaakH8A8wze1JR5ZsP1LagHJk2FyCV2VzrNHVqg3gYG4TSYwDV4m000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000051UCZSVufT1PNimutbPdJUiEyCYSiZAD6n00000000000000000000000000000000000000000000000000000000000000071Cf2hs39Woi61YNkYGUAcohL2K2q4pawBq400000000000000000:7fffffffffffffffff1PWo3JeB9jrGwfHDNpdGK54CRas7fsVzXU15qF6X51huDjqTmF9BJgxXdt1xcj46JmhbmvAcFYBZyK2Pki3MYyL78mpXiGsD6Hfjydtb1q5zcdvrjej9tca5muhk3tzlvt9n3r4v5486mujne67a0550848b7932d7796aeea16ab0e48a5cfe81c4e8cca2c5b03e04168501141JoGftW55dE2MkD2cg38fJaWs4TXJzNnV8from electrum.util import print_error
bash: syntax error near unexpected token f"Fallback failed: {e}"' mport QEApp from electrum.gui.qml.qeclipboard import QEClipboa~ $ from electrum.gui.qml.qeapp import QEApp lf, content): try: # Fallback: copy to clipboard QEClipboard.get_instance().setText(content) print_error("Content copied to clipboard as fallback.") # Optional: save to file with open("/sdcard/electrum_share.txt", "w") as f: f.write(content) print_error("Content exported to /sdcard/electrum_share.txt") except Exception as e: print_error(f"Fallback failed: {e}")The program from is not installed. Install it by executing: pkg install mailutils ~ $ from electrum.gui.qml.qeclipboard import QEClipboard The program from is not installed. Install it by executing: pkg install mailutils ~ $ ~ $ def doShare(self, content): bash: syntax error near unexpected token ('
~ $ try:
No command try: found, did you mean:
Command tr in package coreutils
Command tred in package graphviz
Command tri in package mesa-demos
Command tree in package tree
Command trz in package trzsz-go
Command ttyc in package ttyc
Command ttyd in package ttyd
~ $ # Fallback: copy to clipboard
~ $ QEClipboard.get_instance().setText(content)
bash: syntax error near unexpected token .setText' ~ $ print_error("Content copied to clipboard as fallback.") bash: syntax error near unexpected token "Content copied to clipboard as fallback."'
~ $ # Optional: save to file
~ $ with open("/sdcard/electrum_share.txt", "w") as f:
bash: syntax error near unexpected token (' ~ $ f.write(content) bash: syntax error near unexpected token content'
~ $ print_error("Content exported to /sdcard/electrum_share.txt")
bash: syntax error near unexpected token "Content exported to /sdcard/electrum_share.txt"' ~ $ except Exception as e: No command except found, did you mean: Command expect in package expect ~ $ print_error(f"Fallback failed: {e}")termux-share /sdcard/electrum_share.txt1JoGftW55dE2MkD2cg38fJaWs4TXJzNnV8import subprocessbash: syntax error near unexpected token f"Fallback failed: {e}"'
try:
subprocess.Popen(["e~ $
~ $ def doShare(self, content):
_error(bash: syntax error near unexpected token (' ~ $ try: No command try: found, did you mean: Command tr in package coreutils Command tred in package graphviz Command tri in package mesa-demos Command tree in package tree Command trz in package trzsz-go Command ttyc in package ttyc Command ttyd in package ttyd ~ $ subprocess.Popen(["electrum-share", content]) bash: syntax error near unexpected token ["electrum-share",'
~ $ except Exception as e:
No command except found, did you mean:
Command expect in package expect
~ $ print_error(f"Wrapper failed: {e}")electrum-share "Hello from Electrum"1JoGftW55dE2MkD2cg38fJaWs4TXJzNnV8qzstp4swtxg40rkn0j769vta3vkwyw4jj5fmdl2vtme67a0550848b7932d7796aeea16ab0e48a5cfe81c4e8cca2c5b03e04168501141FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uFfrom electrum.util import print_error
bash: syntax error near unexpected token f"Wrapper failed: {e}"' ~ $ from electrum.gui.qml.qeapp import QEApp allback: copy to clipboard QEClipboard.get_instance().setText(content) print_error("Content copied to clipboard as fallback.") # Optional: save to file with open("/sdcard/electrum_share.txt", "w") as f: f.write(content) print_error("Content exported to /sdcard/electrum_share.txt") except Exception as e: print_error(f"Fallback failed: {e}")The program from is not installed. Install it by executing: pkg install mailutils ~ $ from electrum.gui.qml.qeclipboard import QEClipboard The program from is not installed. Install it by executing: pkg install mailutils ~ $ ~ $ def doShare(self, content): bash: syntax error near unexpected token ('
~ $ try:
No command try: found, did you mean:
Command tr in package coreutils
Command tred in package graphviz
Command tri in package mesa-demos
Command tree in package tree
Command trz in package trzsz-go
Command ttyc in package ttyc
Command ttyd in package ttyd
~ $ # Fallback: copy to clipboard
~ $ QEClipboard.get_instance().setText(content)
bash: syntax error near unexpected token .setText' ~ $ print_error("Content copied to clipboard as fallback.") bash: syntax error near unexpected token "Content copied to clipboard as fallback."'
~ $ # Optional: save to file
~ $ with open("/sdcard/electrum_share.txt", "w") as f:
bash: syntax error near unexpected token (' ~ $ f.write(content) bash: syntax error near unexpected token content'
~ $ print_error("Content exported to /sdcard/electrum_share.txt")
bash: syntax error near unexpected token "Content exported to /sdcard/electrum_share.txt"' ~ $ except Exception as e: No command except found, did you mean: Command expect in package expect ~ $ print_error(f"Fallback failed: {e}")import subprocess Share(self, content)bash: syntax error near unexpected token f"Fallback failed: {e}"'
:
tr~ $
su~ $ def doShare(self, content):
bash: syntax error near unexpected token (' open(["el~ $ try: re", content]) except Exception as e: print_error(f"Wrapper failed: {e}")No command try: found, did you mean: Command tr in package coreutils Command tred in package graphviz Command tri in package mesa-demos Command tree in package tree Command trz in package trzsz-go Command ttyc in package ttyc Command ttyd in package ttyd ~ $ subprocess.Popen(["electrum-share", content]) bash: syntax error near unexpected token ["electrum-share",'
~ $ except Exception as e:
No command except found, did you mean:
Command expect in package expect
~ $ print_error(f"Wrapper failed: {e}")electrum-share "Hello from Electrum"chmod +x ~/bin/electrum-share#!/data/data/com.termux/files/usr/bin/bash
bash: !/data/data/com.termux/files/usr/bin/bash: event not found
~ $
~ $ # Termux wrapper for Electrum's broken doShare()
~ $ # Usage: electrum-share "text to share"
~ $
~ $ CONTENT="$1"
~ $ OUT="/sdcard/electrum_shared.txt"
~ $
~ $ # Write content to file
~ $ echo "$CONTENT" > "$OUT"
~ $
~ $ # Optional: also copy to clipboard
~ $ termux-clipboard-set "$CONTENT"
The program termux-clipboard-set is not installed. Install it by executing:
pkg install termux-api
~ $
~ $ # Optional: trigger Android share sheet
~ $ termux-share "$OUT"Absolutely — let’s build you a clean, reliable Termux wrapper that Electrum can call instead of the broken Android JNI share function. This will completely bypass the crash you’re seeing on Android 14.
re” content without touching Java

And you can expand it later if you want.


🔧 1. Create the Termux wrapper script

Open Termux and create a script:

nano ~/bin/electrum-share

Paste this inside:

`bash

!/data/data/com.termux/files/usr/bin/bash

Termux wrapper for Electrum's broken doShare()

Usage: electrum-share "text to share"

CONTENT="$1"
OUT="/sdcard/electrum_shared.txt"

Write content to file
echo "$CONTENT" > "$OUT"

Optional: also copy to clipboard
termux-clipboard-set "$CONTENT"

Optional: trigger Android share sheet
termux-share "$OUT"
`

Save and exit.


🔧 2. Make it executable

chmod +x ~/bin/electrum-share

Termux automatically adds ~/bin to your PATH, so the command becomes globally available.


🔧 3. Test it manually

Try:

electrum-share "Hello from Electrum"

You should see:

  • File created at /sdcard/electrum_shared.txt
  • Clipboard updated
  • Android share sheet opens

No crashes.


🔧 4. Connect Electrum to the wrapper

Inside your patched doShare() in Electrum, replace the JNI call with:

`python
import subprocess

def doShare(self, content):
try:
subprocess.Popen(["electrum-share", content])
except Exception as e:
print_error(f"Wrapper failed: {e}")
`

This hands the content off to your Termux wrapper instead of the broken Java method.


🔧 5. You now have a stable, Android‑14‑proof share system

Electrum → Python → Termux wrapper → Android share sheet
No JNI. No Java exceptions. No crashes.


⚡ Want upgrades?

I can help you add:

  • Auto‑detect Android version
  • Auto‑detect if Termux is installed
  • Encrypt exported files
  • Timestamped exports
  • Logging to /sdcard/electrum_share.log
  • A multi‑file share mode
  • A QR‑code generator mode

Just tell me what direction you want to take and I’ll build it with you.The program termux-share is not installed. Install it by executing:
pkg install termux-api
~ $
~ $ I’ll give you a wrapper that is:
I’ll: command not found
~ $
~ $ - Simple
No command - found, did you mean:
Command c in package c-script
Command [ in package coreutils
Command k in package kona
Command o in package o-editor
Command q in package q-dns-client
Command X in package xorg-server
~ $ - Safe
No command - found, did you mean:
Command c in package c-script
Command [ in package coreutils
Command k in package kona
Command o in package o-editor
Command q in package q-dns-client
Command X in package xorg-server
~ $ - Works on any Android version
No command - found, did you mean:
Command c in package c-script
Command [ in package coreutils
Command k in package kona
Command o in package o-editor
Command q in package q-dns-client
Command X in package xorg-server
~ $ - Lets Electrum “share” content without touching Java
No command - found, did you mean:
Command c in package c-script
Command [ in package coreutils
Command k in package kona
Command o in package o-editor
Command q in package q-dns-client
Command X in package xorg-server
~ $
~ $ And you can expand it later if you want.
No command And found, did you mean:
Command lnd in package lnd
~ $
~ $ ---
No command --- found, did you mean:
Command 7zz in package 7zip
Command ack in package ack-grep
Command acr in package acr
Command age in package age
Command agg in package agg
Command aha in package aha
Command adb in package android-tools
Command ant in package ant
Command ab in package apache2
Command apt in package apt
Command arj in package arj
Command a2x in package asciidoc
Command asy in package asymptote
Command at in package at
Command als in package atool
Command bat in package bat
Command bc in package bc
Command bsh in package beanshell
Command bed in package bed
Command ar in package binutils
Command as in package binutils-bin
Command ar in package binutils-is-llvm
Command bk in package bk
Command atc in package bsd-games
Command buf in package buf
Command bvi in package bvi
Command c in package c-script
Command ceu in package ceu-lang
Command cfm in package cfm
Command c++ in package clang
Command ccr in package codecrypt
Command cbc in package coinor-cbc
Command clp in package coinor-clp
Command ctr in package containerd from the root-repo repository
Command [ in package coreutils
Command ocs in package cscope
Command csh in package csh
Command lp in package cups
Command cvs in package cvs
Command d8 in package d8
Command dar in package dar
Command sh in package dash
Command dlv in package delve
Command cmp in package diffutils
Command bzz in package djvulibre
Command dig in package dnsutils
Command dog in package dog
Command scp in package dropbear
Command dtc in package dtc
Command dte in package dte
Command dua in package dua
Command duc in package duc
Command duf in package duf
Command duk in package duktape
Command dwm in package dwm
Command dx in package dx
Command e16 in package e16
Command ecj in package ecj
Command ecl in package ecl
Command ed in package ed
Command eja in package eja
Command ef in package electric-fence
Command iex in package elixir
Command eog in package eog
Command erl in package erlang
Command et in package et
Command tsh in package etsh
Command eww in package eww
Command eza in package eza
Command fcp in package fcp
Command fd in package fd
Command fdm in package fdm
Command feh in package feh
Command fff in package fff
Command fio in package fio from the root-repo repository
Command bbc in package flang
Command fm in package fm
Command fx in package fx
Command fzf in package fzf
Command fzy in package fzy
Command gac in package gap
Command dl in package gatling
Command awk in package gawk
Command gbt in package gbt
Command gdb in package gdb
Command gdl in package gdrive-downloader
Command gdu in package gdu
Command era in package geth-utils
Command gh in package gh
Command ghc in package ghc
Command hpc in package ghc-libs
Command gs in package ghostscript
Command git in package git
Command ein in package gitoxide
Command gio in package glib-bin
Command gn in package gn
Command gpg in package gnupg
Command go in package golang
Command gm in package graphicsmagick
Command dot in package graphviz
Command eqn in package groff
Command gsf in package gsf-tools
Command gum in package gum
Command gw in package gw
Command ghb in package handbrake
Command has in package has
Command hx in package helix
Command hcd in package hfsutils
Command hr in package hr
Command hh in package hstr
Command hub in package hub
Command hut in package hut
Command hz in package hz
Command i3 in package i3
Command i3 in package i3-gaps
Command ftp in package inetutils
Command ip in package iproute2
Command na6 in package ipv6toolkit
Command vvp in package iverilog
Command iw in package iw from the root-repo repository
Command jo in package jo
Command joe in package joe
Command jq in package jq
Command jql in package jql
Command joe in package jupp
Command jwm in package jwm
Command k9s in package k9s
Command kak in package kakoune
Command k in package kona
Command ksu in package krb5
Command dub in package ldc
Command ldd in package ldd
Command lf in package lf
Command lha in package lhasa
Command pl in package libgnustep-base
Command psl in package libpsl
Command h3 in package libuber-h3
Command cvt in package libxcvt
Command lit in package lit
Command lld in package lld
Command llc in package llvm
Command not in package llvm-tools
Command lnd in package lnd
Command ksh in package loksh
Command lr in package lr
Command lrb in package lrzsz
Command lsd in package lsd
Command lux in package lux
Command lvm in package lvm2 from the root-repo repository
Command lyx in package lyx
Command lz4 in package lz4
Command m4 in package m4
Command ali in package mailutils
Command man in package man
Command mvn in package maven
Command mc in package mc
Command mdp in package mdp
Command mdb in package mercury
Command ray in package mesa-demos
Command mg in package mg
Command mlr in package miller
Command al in package mono
Command pee in package moreutils
Command mwm in package motif
Command mpc in package mpc
Command mpd in package mpd
Command mpv in package mpv
Command mpv in package mpv-x
Command lz in package mtools
Command mtr in package mtr from the root-repo repository
Command mu in package mu
Command mr in package myrepos
Command psc in package n-t-roff-sc
Command tic in package ncurses-utils
Command ne in package ne
Command arp in package net-tools
Command nc in package netcat-openbsd
Command nim in package nim
Command ali in package nmh
Command nnn in package nnn
Command nms in package no-more-secrets
Command npm in package nodejs
Command npm in package nodejs-lts
Command pp in package nss-utils
Command nu in package nushell
Command nx in package nxengine
Command o in package o-editor
Command ol in package ol
Command scp in package openssh
Command 7z in package p7zip
Command sem in package parallel
Command gp in package pari
Command fpp in package pathpicker
Command pb in package pb
Command pet in package pet
Command php in package php
Command pil in package picolisp
Command ode in package plotutils
Command ps in package procps
Command cct in package proj
Command pd in package proot-distro
Command pup in package pup
Command pv in package pv
Command pip in package python-pip
Command q in package q-dns-client
Command moc in package qt5-qtbase
Command qml in package qt5-qtdeclarative
Command qev in package qt5-qttools
Command qjs in package quickjs
Command r2 in package radare2
Command rbw in package rbw
Command rc in package rc
Command ci in package rcs
Command rc in package rcshell
Command rem in package remind
Command icp in package renameutils
Command rig in package rig
Command rip in package rip
Command rip in package rip2
Command rg in package ripgrep
Command rga in package ripgrep-all
Command rnr in package rnr
Command rpm in package rpm
Command rq in package rq
Command erb in package ruby
Command ri in package ruby-ri
Command sv in package runit
Command rw in package rw
Command net in package samba
Command scc in package scc
Command sd in package sd
Command srm in package secure-delete
Command sed in package sed
Command shc in package shc
Command ag in package silversearcher-ag
Command sl in package sl
Command fls in package sleuthkit
Command gst in package smalltalk
Command rec in package sox
Command st in package st
Command svn in package subversion
Command sun in package sun
Command sr in package surfraw
Command tar in package tar
Command ts in package task-spooler
Command tcc in package tcc
Command nns in package tcllib
Command tdl in package tdl
Command tea in package tea
Command tsh in package teleport-tsh
Command am in package termux-am
Command cmd in package termux-tools
Command ebb in package texlive-bin
Command tig in package tig
Command sn in package tin-summer
Command tf in package tinyfugue
Command tor in package tor
Command trz in package trzsz-go
Command tsp in package tsduck-tools
Command tsu in package tsu
Command tut in package tut
Command tjs in package txikijs
Command ug in package ugrep
Command up in package up
Command upx in package upx
Command cal in package util-linux
Command cu in package uucp
Command uv in package uv
Command vim in package vim
Command ex in package vim-gtk
Command vt in package virustotal-cli
Command vis in package vis
Command viu in package viu
Command vlc in package vlc
Command vlc in package vlc-qt
Command vtm in package vtm
Command w3m in package w3m
Command wg in package wireguard-tools
Command wiz in package wiz
Command wol in package wol
Command wrk in package wrk
Command x2x in package x2x
Command xh in package xh
Command xml in package xmlstarlet
Command X in package xorg-server
Command twm in package xorg-twm
Command xev in package xorg-xev
Command xxd in package xxd
Command xz in package xz-utils
Command ya in package yazi
Command yq in package yq
Command z3 in package z3
Command zig in package zig
Command zip in package zip
Command zk in package zk
Command zls in package zls
Command znc in package znc
Command zsh in package zsh
~ $
~ $ 🔧 1. Create the Termux wrapper script
🔧: command not found
~ $
~ $ Open Termux and create a script:
No command Open found, did you mean:
Command sgen in package mono
Command pee in package moreutils
Command mren in package mtools
Command cpan in package perl
Command pet in package pet
Command spek in package spek
Command vpe in package texlive-bin
Command wren in package wren
~ $
~ $ `

nano ~/bin/electrum-share
`
pkg update
pkg install termux-api
pkg install nano
pkg install openssl
pkg install qrencodenano ~/bin/electrum-share#!/data/data/com.termux/files/usr/bin/bash

CONTENT="$1"
OUT="/sdcard/electrum_shared.txt"

echo "$CONTENT" > "$OUT"

termux-clipboard-set "$CONTENT"
termux-share "$OUT"chmod +x ~/bin/electrum-shareelectrum-share "Hello from Electrum"/system/bin/am broadcast ${BROADCAST_RECEIVER

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions