Skip to content

Commit

Permalink
Removed Ledger Blue version check
Browse files Browse the repository at this point in the history
  • Loading branch information
muXxer committed Dec 20, 2018
1 parent e1be156 commit 16a3101
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions download_app_blue.py
Expand Up @@ -2,23 +2,16 @@

python_cmd = "python3"
target_id = 0x31010004
min_version_os = 0x02010100 # e.g. 1.4.2 => 1.4.2.0 => 0x01040200
min_version_mcu = 0x03040000 # e.g. 1.5 => 1.5.0.0 => 0x01050000
file_name = "/root/iota-ledger/download/app.hex"
data_size = 0x00000000 # `cat debug/app.map |grep _nvram_data_size | tr -s ' ' | cut -f2 -d' '`
icon_hex = "0456572200585e34005e623f00636748006a6e510074775e007f806c008a8c79009a9a8b00a9a89e00b4b3aa00c1c0b800d0d1ce00e2e4e200edf0ee00f9f9f900ffffffffffdf8b0400000000000000000070cafdffffffffffffffffffad050000000000000000000000000060eaffffffffffffff8d0000000000000000000000000000000000e9ffffffffffbf00000000000000000000000000000000000000fcffffffff0a00000000000000000000000000000000000000b0ffffffcf000000000000000000000000000000000000000000fcffff0d000000000000000000000000000000000000000000e0ffff090000000000000000000000000000c91a0000000000a0ffdf000000000000000000000000000090ffbf000000000000feaf0000000000000000000000000000c0ffdf000000000000fc5f000000000000000011000000000090ffbf000000000000f70d000000000030ab51ee668c00000000c91a000000000000e00b0000000000b0ff89ffb9cfc60700000000000000000000c0080000000000b0ff19bb527cfa8a0500a26b001100000000b005000000000040ab0120010081e50c00fbdf71dd080000008000000000000000b608e80cb80480c804fcffc2ff1e0000000000000000000010fd5efb2efd891bc503e7bfc0ff1d000000000000000070dd18fe5fc509c8c56f1700200450cc070000000000000000d0ff0db70800000050978f00a5070000000000000000000000c0ff0d000000a50632302910fd5ea09d00000000000000000060cc0710ec0bfc2ded360410fe5fe5ff63490000000000000000208861ff3efb2cedd71e00c709d2dfe5df0100000000000000c0ff2afd1c610254c11c6018005059f7ef0200000000000000e0ff0d51000000000000e59f10bb02b18d0000000000007028c0ff0a0000a107000000e59f80ff095600000000000000fbdf1378000014f70c000040661840dd86ef06000000000020feff09009057ae91060000d08f00982290ff07000000000020feff0800c01a6b808d0000c17e40fe07328900000000000000e8cf0100a5338cc0cf00c02d0256cb42ee040000000000000020020000f978cf505a00c11d20de0050ee05000000000000000000000071015700c25d10328cab30bc55000000000000000000000000f909ea08f7af00309d1068ce00000000000000000000000000d808fc0bc25d0000208baf2500000000000000000000000000601883120080cd03506d380000000000000000000000000000d09f40dd06c0ff090001000000000000000008000000000000c07e80ff09b0ef16570000000000000000600a000000000000008118bb220157c0ff0800000000000000800c00000000000000f96f00fa4d00f5ff0c60170000000000b00e00000000000000f85e00fd8f00d1ff09fbcf0100000000d07f0000000000000070567aea4d94478950ffff0700000000f5bf0000000000000000d1ef3421fd8f0040feff0700000000faef0000000000000000e2ff0560ffbf0000eabf0000000000fdff0900000000000000809c0010fd8f000030040000000090ffff0e000000000000000000000082060000000000000000e0ffffcf000000000000000000000000000000000000000000fcffffff0b00000000000000000000000000000000000000b0ffffffffcf00000000000000000000000000000000000000fcffffffffff8e0000000000000000000000000000000000d8ffffffffffffffad040000000000000000000000000040daffffffffffffffffffdf8b0400000000000000000050b8fdffffffffff" # python $(BOLOS_SDK)/icon.py $(ICONNAME) hexbitmaponly
cmd_check_version = "-m get_ledger_version --targetId 0x%08X --minVersionOS 0x%08X --minVersionMCU 0x%08X" % (target_id, min_version_os, min_version_mcu)
cmd_load_app = "-m ledgerblue.loadApp --path \"44'/4218'\" --path \"44'/01'\" --appFlags 0x40 --tlv --targetId 0x%08X --delete --fileName %s --appName \"IOTA\" --appVersion 0.5.0 --dataSize 0x%08X --icon %s" % (target_id, file_name, data_size, icon_hex)

exit_code = 1
try:
exit_code = os.system("%s %s" % (python_cmd, cmd_check_version))
if exit_code != 0: # muXxer: Otherwise it returned 256, which was recognized as 0 in the shell
exit_code = 2
else:
exit_code = os.system("%s %s" % (python_cmd, cmd_load_app))
if exit_code != 0: # muXxer: Otherwise it returned 256, which was recognized as 0 in the shell
exit_code = 3
exit_code = os.system("%s %s" % (python_cmd, cmd_load_app))
if exit_code != 0: # muXxer: Otherwise it returned 256, which was recognized as 0 in the shell
exit_code = 3
except:
pass
sys.exit(exit_code)

0 comments on commit 16a3101

Please sign in to comment.