s922x works
This commit is contained in:
@@ -5,7 +5,7 @@ import argparse
|
||||
ENTRY_POINT = 0xffff0000
|
||||
STACK_ADDRESS = 0xfffe3800
|
||||
|
||||
FASTBOOT_CMD_HANDLER = 0xffff9758
|
||||
# FASTBOOT_CMD_HANDLER = 0xffff9758
|
||||
TEST_OFFSET = 0xfffa0000 + 0x8000
|
||||
TEST_REQ_BUFFER = TEST_OFFSET + 0x800
|
||||
TEST_CONTEXT_BUFFER = TEST_OFFSET + 0x9000
|
||||
@@ -17,7 +17,7 @@ debug_functions = [
|
||||
]
|
||||
|
||||
def test_fb_cmd(cmd=b'getvar:version', device="S905X3"):
|
||||
emulator = Amlogic_Emulator(device=device)
|
||||
emulator = Amlogic_Emulator(device=device, debug=True)
|
||||
emulator.debug = True
|
||||
emulator.place_fastboot_command(cmd)
|
||||
res = emulator.run_fastboot_cmd()
|
||||
@@ -45,13 +45,19 @@ def afl_fuzzer():
|
||||
|
||||
if __name__ == "__main__":
|
||||
args = argparse.ArgumentParser("Amlogic BootROM Fuzzer")
|
||||
# test_fb_cmd(device="S905X3")
|
||||
test_fb_cmd(device="S922")
|
||||
# afl_fuzzer()
|
||||
# exit(0)
|
||||
args.add_argument("--device", "-d", help="Device to test", default="S905X3")
|
||||
args.add_argument("--test", "-t", help="Test fastboot command", default=False, action="store_true")
|
||||
args.add_argument("--input", "-i", help="Input file for crash", default=None)
|
||||
arg = args.parse_args()
|
||||
if arg.input:
|
||||
test_fb_cmd(open(arg.input, 'rb').read())
|
||||
|
||||
args = args.parse_args()
|
||||
|
||||
if args.test:
|
||||
test_fb_cmd(device=args.device)
|
||||
exit(0)
|
||||
|
||||
if args.input:
|
||||
# Run a single comand
|
||||
test_fb_cmd(open(args.input, 'rb').read())
|
||||
else:
|
||||
# Run AFL
|
||||
afl_fuzzer()
|
||||
Reference in New Issue
Block a user