mstar-bin-tool-master

所属分类:其他
开发工具:WINDOWS
文件大小:739KB
下载次数:7
上传日期:2020-05-18 01:03:43
上 传 者bruhmoment69
说明:  just need to upload 5 files

文件列表:
__pycache__ (0, 2019-03-28)
__pycache__\utils.cpython-37.pyc (10073, 2019-03-28)
bin (0, 2019-03-28)
bin\win32 (0, 2019-03-28)
bin\win32\SubSecureInfoGen.exe (71915, 2019-03-28)
bin\win32\aescrypt2.exe (71622, 2019-03-28)
bin\win32\alignment.exe (61709, 2019-03-28)
bin\win32\lzop.exe (131072, 2019-03-28)
bin\win32\rsa_sign.exe (137974, 2019-03-28)
configs (0, 2019-03-28)
configs\LETV_USB_SCRIPT_938.ini (522, 2019-03-28)
configs\dexp-madison-system.ini (650, 2019-03-28)
configs\empty-skip-example.ini (613, 2019-03-28)
configs\letv-emmc2usb.ini (1116, 2019-03-28)
configs\letv-enable-uart.ini (339, 2019-03-28)
configs\letv-force-bin-update.ini (339, 2019-03-28)
configs\letv-x340-43-recovery-no-secure.ini (910, 2019-03-28)
configs\letv-x355pro-full.ini (5426, 2019-03-28)
configs\letv-x355pro-recovery-no-secure.ini (932, 2019-03-28)
configs\letv-x355pro-recovery.ini (1188, 2019-03-28)
configs\letv-x355pro-system.ini (632, 2019-03-28)
configs\letv-x4-recovery-no-secure.ini (1072, 2019-03-28)
configs\letv-x4-systemless-live.ini (997, 2019-03-28)
configs\letv-x450pro-system.ini (652, 2019-03-28)
configs\tcl-s68at02-system.ini (703, 2019-03-28)
configs\xgimi.ini (484, 2019-03-28)
default_keys (0, 2019-03-28)
default_keys\AESboot.bin (16, 2019-03-28)
default_keys\AESupgrade.bin (16, 2019-03-28)
default_keys\RSAboot_priv.txt (2353, 2019-03-28)
default_keys\RSAboot_pub.bin (260, 2019-03-28)
default_keys\RSAboot_pub.txt (528, 2019-03-28)
default_keys\RSAimage_priv.txt (2353, 2019-03-28)
default_keys\RSAimage_pub.bin (260, 2019-03-28)
default_keys\RSAimage_pub.txt (528, 2019-03-28)
default_keys\RSAupgrade_priv.txt (2353, 2019-03-28)
default_keys\RSAupgrade_pub.bin (260, 2019-03-28)
... ...

# mstar-bin-tool Command line tools to pack/unpack MStar bin firmware Currently available tools: - **unpack.py** - unpack MStar bin firmware - **pack.py** - pack MStar bin firmware - **extract_keys.py** - extract AES and RSA-public keys from MBOOT binary - **secure_partition.py** - encrypt image and generate signature file ## Unpack MStar bin firmware files ``` Usage: unpack.py - MStar bin firmware to unpack - directory to store unpacked stuff. Default value: ./unpacked/ ``` ## Pack MStar bin firmware ``` Usage: pack.py Example: pack.py configs/letv-x355pro-full.ini - Configuration file. The config file structure will be described later. For now you can take a look at configs/letv-x355pro-full.ini and use it as an example ``` ## Extract keys from MBOOT That tool is used to get AES and public RSA keys from the MBOOT. AES keys are needed to encrypt/decrypt boot.img and recovery.img images. aescrypt2 tool is used. ``` Usage: extract_keys.py [] [] [] Defaults: keys 0x168e00 0x450 Example: extract_keys.py ./unpacked/MBOOT.img Example: extract_keys.py ./unpacked/MBOOT.img ./keys 0x169e00 0x450 ``` ## Encrypt/Decrypt partition You can encrypt/decrypt partition with using *aescrypt2.exe* tool, which is located in bin/win32 folder Default mstar key is *hex:0007FF4154534D92FC55AA0FFF0110E0* All mstar default keys are in default_keys folder. (These keys are in public access in github) Last parameter can be hex value or path to AES key. If your vendor is using custom aes keys you can use extract_keys.py to extract them. To encrypt image use: ``` aescrypt2 0 boot.img boot.img.aes hex:0007FF4154534D92FC55AA0FFF0110E0 or aescrypt2 0 boot.img boot.img.aes keys/AESBootKey ``` So to decrypt image use: ``` aescrypt2 1 boot.img.aes boot.img hex:0007FF4154534D92FC55AA0FFF0110E0 or aescrypt2 1 boot.img boot.img.aes keys/AESBootKey ``` ## Encrypt partition and generate signature All new MStar builds have SECURE_BOOT option enabled. In that case boot.img and recovery.img is encrypted (AES) and signed with RSA priv keys. That script is used to encrypt image and generate sign file. To manually encrypt|decrypt image use aescrypt2 tool from bin folder. AES key can be extracted from MBOOT with extract_keys.py script. ``` Usage: secure_partition.py Example: secure_partition.py ./pack/boot.img ./keys/AESbootKey ./keys/RSAboot_priv.txt ./keys/RSAboot_pub.txt ./pack/boot.img.aes ./pack/bootSign ```

近期下载者

相关文件


收藏者