tools: remove obsolete jade v1 flashing code
What changed, and why it matters
This commit simply deletes old helper scripts and instructions used to flash early 'Jade v1' hardware devices. No code that runs on the Jade wallet itself is changed, and nothing in the commit fixes or introduces a security vulnerability. It is a cleanup of obsolete tooling.
No security action required. Reviewers may confirm that current Jade flashing documentation and CI pipelines no longer reference the removed files.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change removes the entire flashing/ directory: two udev rules that auto-ran a flash script when a USB serial device appeared, two bash scripts that invoked esptool.py to write signed bootloader/app binaries to an ESP32, a README with setup instructions, and a pinned requirements.txt for the Python flashing environment. The commit is purely a deletion of unused/obsolete first-generation Jade flashing infrastructure. There is no modification to firmware, cryptographic, or runtime logic.
Changed components
flashing/98-jade-flasher.rulesflashing/99-jade-flasher.rulesflashing/README.mdflashing/flash.shflashing/flash_jade.shflashing/requirements.txtInspect captured patch +0 / −126
diff --git a/flashing/98-jade-flasher.rules b/flashing/98-jade-flasher.rules
deleted file mode 100644
index 5ddb39f..0000000
--- a/flashing/98-jade-flasher.rules
+++ /dev/null
@@ -1 +0,0 @@
-KERNEL=="ttyACM*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d4", ACTION=="add", ENV{DEVNAME}=="*ttyACM*", RUN+="/tmp/jade/flashing/flash.sh"
diff --git a/flashing/99-jade-flasher.rules b/flashing/99-jade-flasher.rules
deleted file mode 100644
index 03eb10c..0000000
--- a/flashing/99-jade-flasher.rules
+++ /dev/null
@@ -1 +0,0 @@
-KERNEL=="ttyUSB*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ACTION=="add", ENV{DEVNAME}=="*ttyUSB*", RUN+="/tmp/jade/flashing/flash.sh"
diff --git a/flashing/README.md b/flashing/README.md
deleted file mode 100644
index eb0bce6..0000000
--- a/flashing/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-These scripts assume ubuntu. The following instructions are just high level,
-for actual deployment/flashing use offline equipment and verification
-of installed packages with signatures/hashes as needed.
-
-Enable universe if not already enabled with `sudo add-apt-repository universe`
-
-Install virtualenv with `sudo apt install virtualenv`
-
-Now create our working directory `/tmp/jade`
-
-
-`mkdir /tmp/jade`
-
-
-Now create a virtualenv with `virtualenv -p python3 /tmp/jade/venv`
-and install the required packages
-
-```
-source /tmp/jade/venv/bin/activate
-pip install -r /tmp/jade/flashing/requirements.txt
-deactivate
-```
-
-The directory `flashing` in the root and `build` from the CI pipeline has to be put in the `/tmp/jade` directory.
-
-The file `99-jade-flasher.rules` from `/tmp/jade/flashing` has to be put in the `/etc/udev/rules.d` directory
-
-```
-sudo cp /tmp/jade/flashing/98-jade-flasher.rules /etc/udev/rules.d/98-jade-flasher.rules
-sudo cp /tmp/jade/flashing/99-jade-flasher.rules /etc/udev/rules.d/99-jade-flasher.rules
-chmod +x /tmp/jade/flashing/*.sh
-```
-
-Then you need to reload udev rules with
-
-```
-sudo udevadm control --reload-rules
-sudo udevadm trigger
-```
-
-from now on when a Jade is connected the script `/tmp/jade/flashing/flash.sh` will run and the env var `${DEVNAME}`
-will be set to the ttyUSB* device, for example `/dev/ttyUSB0`
-
-You can set `FLASHROOT=${HOME}/YOUR/DIRECTORY` to test the script manually from a different directory than `/tmp/jade`
-and `DEVNAME=/dev/ttyUSB0` for example.
-
-During flashing you can `tail /tmp/jade/jadeflash.log` to see the result of detection and bootloader and app flashing.
-When a device is fully flashed you will see the message "Flashing complete for " followed by a ttyUSB* device name.
-
-Note: You may have to uninstall or disable modemmanager to avoid concurrent access to the device and flashing failures, for example
-```
-sudo apt remove modemmanager
-```
-
-Note: As an alternative to the udev rules you can also instead run a simple inotify based bash script
-Warning: if you run this at the same time as the udev rules concurrent access to the devices may occur and flashing failure as a consequence
-
-First, install the inotify-tools if not already installed
-```
-sudo apt install inotify-tools
-```
-
-The script would look like (replace in the script below ACM with USB as needed)
-```
-#!/usr/bin/env bash
-set -eo pipefail
-export FLASHROOT=/tmp/jade
-while read i; do if [[ "$i" == ttyACM* ]]; then DEVNAME=/dev/${i} ${FLASHROOT}/flashing/flash_jade.sh; fi; done < <(inotifywait -e create --format '%f' --quiet /dev --monitor)
-```
diff --git a/flashing/flash.sh b/flashing/flash.sh
deleted file mode 100755
index 109e38d..0000000
--- a/flashing/flash.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-set -eo pipefail
-
-export FLASHROOT="${FLASHROOT:-/tmp/jade}"
-
-if [ ! -d "${FLASHROOT}" ]; then
- echo "Script run with invalid FLASHROOT, ${FLASHROOT}"
- exit 1
-fi
-
-${FLASHROOT}/flashing/flash_jade.sh
diff --git a/flashing/flash_jade.sh b/flashing/flash_jade.sh
deleted file mode 100755
index ddadde6..0000000
--- a/flashing/flash_jade.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env bash
-set -eo pipefail
-
-if [ ! -d "${FLASHROOT}" ];then
- echo "Script run with invalid FLASHROOT, unset or set to ${FLASHROOT}"
- exit 1
-fi
-
-export OUTPUTLOG=${FLASHROOT}/jadeflash.log
-
-echo $(date) "\n" "$@" "\n" $(env) | tee -a ${OUTPUTLOG}
-
-if [ ! -e "${DEVNAME}" ];then
- echo "Script run with invalid DEVNAME. uset or set to ${DEVNAME}" | tee -a ${OUTPUTLOG}
- exit 1
-fi
-
-echo "Device ${DEVNAME} can now be flashed" | tee -a ${OUTPUTLOG}
-
-source ${FLASHROOT}/venv/bin/activate
-
-COMMON_ESPTOOL_OPTIONS="--chip esp32 --port ${DEVNAME} --baud 460800 --before default_reset --after hard_reset --no-stub write_flash --flash_mode dio --flash_freq 40m"
-
-# add some info to the logs
-esptool.py --port ${DEVNAME} read_mac | tee -a ${OUTPUTLOG}
-esptool.py --port ${DEVNAME} flash_id | tee -a ${OUTPUTLOG}
-
-# flash bootloader and everything else
-esptool.py ${COMMON_ESPTOOL_OPTIONS} --flash_size 4MB \
--u 0x1000 ${FLASHROOT}/build/bootloader/bootloader_signed.bin \
-0x9000 ${FLASHROOT}/build/partition_table/partition-table.bin 0xE000 \
-${FLASHROOT}/build/ota_data_initial.bin 0x10000 ${FLASHROOT}/build/jade_signed.bin | tee -a ${OUTPUTLOG}
-
-echo "Flashing complete for ${DEVNAME}" | tee -a ${OUTPUTLOG}
diff --git a/flashing/requirements.txt b/flashing/requirements.txt
deleted file mode 100644
index 60dc511..0000000
--- a/flashing/requirements.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-esptool==3.0 --hash=sha256:87953d235fed2c9adb1292b3769df0149686c9afdb1896dd963f730453cbc934
-bitstring==3.1.7 --hash=sha256:fdf3eb72b229d2864fb507f8f42b1b2c57af7ce5fec035972f9566de440a864a
-cryptography==3.2.1 --hash=sha256:32434673d8505b42c0de4de86da8c1620651abd24afe91ae0335597683ed1b77
-ecdsa==0.16.1 --hash=sha256:881fa5e12bb992972d3d1b3d4dfbe149ab76a89f13da02daa5ea1ec7dea6e747
-reedsolo==1.5.4 --hash=sha256:b8b25cdc83478ccb06361a0e8fadc27b376a3dfabbb1dc6bb583a998a22c0127
-cffi==1.14.4 --hash=sha256:0638c3ae1a0edfb77c6765d487fee624d2b1ee1bdfeffc1f0b58c64d149e7eec --hash=sha256:8d6603078baf4e11edc4168a514c5ce5b3ba6e3e9c374298cb88437957960a53
-pyaes==1.6.1 --hash=sha256:02c1b1405c38d3c370b085fb952dd8bea3fadcee6411ad99f312cc129c536d8f
-pycparser==2.20 --hash=sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705
-pyserial==3.4 --hash=sha256:e0770fadba80c31013896c7e6ef703f72e7834965954a78e71a3049488d4d7d8
-six==1.14.0 --hash=sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.