Skip to content

Commit

Permalink
add tidevice pair command
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Mar 8, 2021
1 parent 0a26070 commit feb83e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tidevice/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ def cmd_syslog(args: argparse.Namespace):
os.dup2(devnull, sys.stdout.fileno())


def cmd_pair(args: argparse.Namespace):
d = _udid2device(args.udid)
pair_record = d.pair()
print("Paired with device", d.udid, "HostID:", pair_record['HostID'])

def cmd_test(args: argparse.Namespace):

print("Just test")
Expand Down Expand Up @@ -446,6 +451,7 @@ def cmd_test(args: argparse.Namespace):
],
help='keep WDA running and relay WDA service to pc'),
dict(action=cmd_syslog, command='syslog', help="print iphone syslog"),
dict(action=cmd_pair, command='pair', help='pair device'),
dict(action=cmd_test, command="test", help="command for developer"),
]

Expand Down

0 comments on commit feb83e0

Please sign in to comment.