Call the adb executable from the SDK, passing the given commands as arguments.
(self, commands)
| 1237 | self._adb(['logcat'] + args.unknown_args) |
| 1238 | |
| 1239 | def _adb(self, commands): |
| 1240 | """Call the adb executable from the SDK, passing the given commands as |
| 1241 | arguments.""" |
| 1242 | ctx = self.ctx |
| 1243 | ctx.prepare_build_environment(user_sdk_dir=self.sdk_dir, |
| 1244 | user_ndk_dir=self.ndk_dir, |
| 1245 | user_android_api=self.android_api, |
| 1246 | user_ndk_api=self.ndk_api) |
| 1247 | if platform in ('win32', 'cygwin'): |
| 1248 | adb = sh.Command(join(ctx.sdk_dir, 'platform-tools', 'adb.exe')) |
| 1249 | else: |
| 1250 | adb = sh.Command(join(ctx.sdk_dir, 'platform-tools', 'adb')) |
| 1251 | info_notify('Starting adb...') |
| 1252 | output = adb(*commands, _iter=True, _out_bufsize=1, _err_to_out=True) |
| 1253 | for line in output: |
| 1254 | sys.stdout.write(line) |
| 1255 | sys.stdout.flush() |
| 1256 | |
| 1257 | def recommendations(self, args): |
| 1258 | print_recommendations() |
no test coverage detected