Skip to content

Commit

Permalink
adb tests
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker committed Oct 11, 2024
1 parent 0aa0a63 commit 160b03d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pwnlib/adb/adb.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def current_device(any=False):
>>> device = adb.current_device(any=True)
>>> device # doctest: +ELLIPSIS
AdbDevice(serial='emulator-5554', type='device', port='emulator', product='sdk_...phone_...', model='...', device='generic...')
AdbDevice(serial='emulator-5554', type='device', port='emulator', product='sdk_...phone..._...', model='...', device='...')
>>> device.port
'emulator'
"""
Expand Down Expand Up @@ -259,7 +259,7 @@ class AdbDevice(Device):
>>> device.os
'android'
>>> device.product # doctest: +ELLIPSIS
'sdk_...phone_...'
'sdk_...phone..._...'
>>> device.serial
'emulator-5554'
"""
Expand Down Expand Up @@ -880,7 +880,7 @@ def which(name, all = False, *a, **kw):
>>> adb.which('sh')
'/system/bin/sh'
>>> adb.which('sh', all=True)
['/system/bin/sh']
['/system/bin/sh', '/vendor/bin/sh']
>>> adb.which('foobar') is None
True
Expand Down Expand Up @@ -988,7 +988,7 @@ def proc_exe(pid):
:skipif: skip_android
>>> adb.proc_exe(1)
b'/init'
b'/system/bin/init'
"""
with context.quiet:
io = process(['realpath','/proc/%d/exe' % pid])
Expand Down Expand Up @@ -1365,7 +1365,7 @@ def compile(source):
>>> filename = adb.compile(temp)
>>> sent = adb.push(filename, "/data/local/tmp")
>>> adb.process(sent).recvall() # doctest: +ELLIPSIS
b'... /system/lib64/libc.so\n...'
b'... /system/lib64/libc++.so\n...'
"""

ndk_build = misc.which('ndk-build')
Expand Down

0 comments on commit 160b03d

Please sign in to comment.