Exemplo n.º 1
0
    if args.display == 'text':
        from mcu.screen_text import TextScreen as Screen
    elif args.display == 'headless':
        from mcu.headless import Headless as Screen
    else:
        from mcu.screen import QtScreen as Screen

    s1, s2 = socket.socketpair()

    run_qemu(s1, s2, getattr(args, 'app.elf'), args.library, args.seed,
             args.debug, args.trace, args.deterministic_rng, args.model,
             args.rampage, args.sdk)
    s1.close()

    apdu = apdu_server.ApduServer(host="0.0.0.0", port=args.apdu_port)
    seph = seproxyhal.SeProxyHal(s2)

    button_tcp = None
    if args.button_port:
        button_tcp = FakeButton(args.button_port)

    finger_tcp = None
    if args.finger_port:
        finger_tcp = FakeFinger(args.finger_port)

    vnc = None
    if args.vnc_port:
        vnc = VNC(args.vnc_port, args.model)

    zoom = args.zoom
    if zoom is None:
Exemplo n.º 2
0
            logger.error("automation isn't supported on the Nano X")
            sys.exit(1)
        automation_server = AutomationServer(("0.0.0.0", args.automation_port),
                                             AutomationClient)
        automation_thread = threading.Thread(
            target=automation_server.serve_forever, daemon=True)
        automation_thread.start()

    s1, s2 = socket.socketpair()

    run_qemu(s1, s2, args)
    s1.close()

    apdu = apdu_server.ApduServer(host="0.0.0.0", port=args.apdu_port)
    seph = seproxyhal.SeProxyHal(s2,
                                 automation=automation_path,
                                 automation_server=automation_server)

    button = None
    if args.button_port:
        button = FakeButton(args.button_port)

    finger = None
    if args.finger_port:
        finger = FakeFinger(args.finger_port)

    vnc = None
    if args.vnc_port:
        screen_size = display.MODELS[args.model].screen_size
        vnc = VNC(args.vnc_port, screen_size, args.vnc_password)
Exemplo n.º 3
0
    else:
        from mcu.screen import QtScreen as Screen

    automation_path = None
    if args.automation:
        automation_path = automation.Automation(args.automation)

    s1, s2 = socket.socketpair()

    run_qemu(s1, s2, getattr(args, 'app.elf'), args.library, args.seed,
             args.debug, args.trace, args.deterministic_rng, args.model,
             args.rampage, args.sdk)
    s1.close()

    apdu = apdu_server.ApduServer(host="0.0.0.0", port=args.apdu_port)
    seph = seproxyhal.SeProxyHal(s2, automation=automation_path)

    button_tcp = None
    if args.button_port:
        button_tcp = FakeButton(args.button_port)

    finger_tcp = None
    if args.finger_port:
        finger_tcp = FakeFinger(args.finger_port)

    vnc = None
    if args.vnc_port:
        vnc = VNC(args.vnc_port, args.model, args.vnc_password)

    zoom = args.zoom
    if zoom is None: