How to Build BTCapsule





Note: BTCapsule is currently only available for Testnet

BTCapsule is a Python program that was built to run on Android devices. The directions to build are very easy:

First you need to install four apps from the Play Store:

Pydroid 3

Pydroid repository plugin

Pydroid permissions plugin

Copy the code below and paste it into Pydroid:


import os
import requests
import subprocess

required_packages = ['bitcoin-utils', 'pypng', 'pyqrcode', 'Pillow==9.1.0']

missing_packages = [package for package in required_packages if not any(package in line.decode() for line in subprocess.Popen(["pip", "list"], stdout=subprocess.PIPE).stdout.readlines())]

if missing_packages:
 
    try:
        subprocess.check_call(["pip", "install"] + missing_packages, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
        print("Installed missing packages:", ", ".join(missing_packages))
    except subprocess.CalledProcessError as e:
        print("Error installing packages:", e)

raw_url = "https://raw.githubusercontent.com/BTCapsule/BTCapsule_Android/main/BTCapsule_testnet.py"

response = requests.get(raw_url)

if response.status_code == 200:

    raw_code = response.content
    
    directory_name = "BTCapsule"
    if not os.path.exists(directory_name):
        os.makedirs(directory_name)
    
    local_file_path = os.path.join(directory_name, "BTCapsule_testnet.py")
    
    with open(local_file_path, "wb") as file:
        file.write(raw_code)
    
    print("File saved successfully.")
		
	


Press the Play button and wait for BTCapsule to build. Tap the back button at the top.

TURN OFF THE INTERNET!!!

Tap the folder icon and open BTCapsule.py inside the BTCapsule folder from Internal Storage.

That is it! Now you can hit the Play button, and BTCapsule will run in your Android. Make sure to save the program and name it BTCapsule.py (or BTCapsule_testnet.py for the testnet version).

BTCapsule is free and open source. Please consider donating some sats if you enjoy it. Thank you!




Bitcoin




Lightning