openatx / adbutils

pure python adb library for google adb service.
MIT License
761 stars 175 forks source link

feat: support logcat #8

Closed williamfzc closed 3 years ago

codeskyblue commented 5 years ago

logcat不是可以直接保存在pc上吗?另外logcat还有很多参数

williamfzc commented 5 years ago

分段设计主要是为了支持有些情况下我只需要在手机上保存日志的需求,这样可以同时满足不同业务需要吧。

logcat参数的我加上了,大概是这样:

device.logcat.start('/sdcard/something.txt', arg_str='-v long ActivityManager:I *:S')

主要的想法是不想做过多定制了,把这些都留给用户自己决定。

codeskyblue commented 4 years ago

Now I use another way to catch logcat

f = open("logcat.txt", "w")
p = subprocess.Popen(["python3", "-m", "adbutils.pidcat", "com.example.demo"], stdout=f)

# do some other operations
p.terminate()
f.close()
williamfzc commented 4 years ago

LGTM I prefer to close this PR (I have forgotten my original purpose

codeskyblue commented 3 years ago

close this pr for long time no care about it.