Execute a process on the device. See :class:`pwnlib.tubes.process.process` documentation for more info. Returns: A :class:`pwnlib.tubes.process.process` tube. Examples: .. doctest:: :skipif: skip_android >>> adb.root() >>> print(adb.process(['cat',
(argv, *a, **kw)
| 822 | |
| 823 | @with_device |
| 824 | def process(argv, *a, **kw): |
| 825 | """Execute a process on the device. |
| 826 | |
| 827 | See :class:`pwnlib.tubes.process.process` documentation for more info. |
| 828 | |
| 829 | Returns: |
| 830 | A :class:`pwnlib.tubes.process.process` tube. |
| 831 | |
| 832 | Examples: |
| 833 | |
| 834 | .. doctest:: |
| 835 | :skipif: skip_android |
| 836 | |
| 837 | >>> adb.root() |
| 838 | >>> print(adb.process(['cat','/proc/version']).recvall().decode('utf-8')) # doctest: +ELLIPSIS |
| 839 | Linux version ... |
| 840 | """ |
| 841 | if isinstance(argv, (bytes, six.text_type)): |
| 842 | argv = [argv] |
| 843 | |
| 844 | message = "Starting %s process %r" % ('Android', argv[0]) |
| 845 | |
| 846 | if log.isEnabledFor(logging.DEBUG): |
| 847 | if argv != [argv[0]]: message += ' argv=%r ' % argv |
| 848 | |
| 849 | with log.progress(message) as p: |
| 850 | return AdbClient().execute(argv) |
| 851 | |
| 852 | @with_device |
| 853 | def interactive(**kw): |