jade_ota.py: remove download error conditions and be verbose about defaults
What changed, and why it matters
This change relaxes a command-line helper script used for firmware updates. Previously, the script would quit with an error if you gave it arguments like release version or hardware target when not actually downloading firmware. Now it simply ignores those extra arguments and prints an informational message. It also now explicitly tells the user when it is assuming default values (stable release, Jade v1.0 hardware). This is a usability improvement, not a security fix, and does not change how firmware is verified on the device itself.
No security action required; treat as a routine usability/logging improvement.
Security signals we found
No cryptographic or authorization logic changed
No firmware verification logic changed
Change is confined to CLI argument validation and logging
Commit message does not describe a vulnerability
Evidence from the diff
The patch modifies jade_ota.py argument validation. It replaces sys.exit(1) calls for invalid combinations of –release/–hw-target with non-downloading modes with logger.info messages that nullify the unneeded arguments. It also adds explicit log messages when defaulting args.release to ‘stable’ and args.hwtarget to ‘jade’. The actual firmware download, signature verification, and flashing logic is unchanged. The commit message frames this as reducing unnecessary failures and improving transparency about assumed defaults.
Changed components
jade_ota.py CLI argument handlingInspect captured patch +10 / −10
diff --git a/jade_ota.py b/jade_ota.py
index 024bc53..a7588dd 100755
--- a/jade_ota.py
+++ b/jade_ota.py
@@ -437,18 +437,18 @@ if __name__ == '__main__':
sys.exit(1)
if args.release and not downloading:
- logger.error('Can only specify release when downloading fw from server')
- sys.exit(1)
+ logger.info('Ignoring --release release type since we are not downloading fw')
+ args.release = None
+ elif downloading and not args.release:
+ logger.info(f'Assuming a latest stable fw download. Use --release to override')
+ args.release = 'stable' # default to latest/stable
if args.hwtarget and not downloading:
- logger.error('Can only supply hardware target when downloading fw from server')
- sys.exit(1)
-
- if downloading and not args.hwtarget:
- args.hwtarget = 'jade' # default to prod jade
-
- if downloading and not args.release:
- args.release = 'stable' # default to latest/stable
+ logger.info('Ignoring --hw-target hardware target since we are not downloading fw')
+ args.hwtarget = None
+ elif downloading and not args.hwtarget:
+ logger.info(f'Assuming a jade v1.0 hardware target. Use --hw-target to override')
+ args.hwtarget = 'jade' # default to prod jade 1.0
# Create target dir if not present
if args.writecompressed and not os.path.isdir(COMP_FW_DIR):
Why this scored 18/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.