Skip to main content

ADB logcat to Pandas DataFrame for better debugging

Project description

ADB logcat to Pandas DataFrame

pip install a-pandas-ex-logcat2df



from a_pandas_ex_logcat2df import pd_add_adb_logcat_to_df

import pandas as pd

pd_add_adb_logcat_to_df()



adb_path = "C:\\Users\\USERNAME\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe"

deviceserial = "localhost:5745"

df = pd.Q_logcat2df(adb_path=adb_path, deviceserial=deviceserial,exit_keys='ctrl+x', timeout=None)





....

b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1053)\r\n'

b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.ActivityThread.handleBindApplication(ActivityThread.java:5418)\r\n'

b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.ActivityThread.-wrap2(ActivityThread.java)\r\n'

b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1548)\r\n'

b'12-01 10:05:39.212 24637 24637 E System  : \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n'

b'12-01 10:05:39.212 24637 24637 E System  : \tat android.os.Looper.loop(Looper.java:154)\r\n'

b'12-01 10:05:39.212 24637 24637 E System  : \tat android.app.ActivityThread.main(ActivityThread.ja

....





# ctrl+x



Killing the process

df

Out[3]: 

                        aa_log_1  ...                                       aa_whole_log

0               audio_hw_primary  ...            audio_hw_primary: choose pcmC0D0p for 0

1      InputMethodManagerService  ...  InputMethodManagerService: packageName=com.goo...

2      InputMethodManagerService  ...  InputMethodManagerService: ime_enabled = false...

3      InputMethodManagerService  ...  InputMethodManagerService: packageName=com.goo...

4      InputMethodManagerService  ...  InputMethodManagerService: ime_enabled = false...

..                           ...  ...                                                ...

345               BitmapDrawable  ...       BitmapDrawable: BitmapDrawable cannot decode

346    android.widget.GridLayout  ...  android.widget.GridLayout: horizontal constrai...

347                         View  ...  View    : requestLayout() improperly called by...

348  WatchWhileTimeBarController  ...  WatchWhileTimeBarController: isScrubbing: no a...

349  WatchWhileTimeBarController  ...  WatchWhileTimeBarController: getDisplayCurrent...

[350 rows x 9 columns]

Project details


Release history Release notifications | RSS feed

This version

0.10

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

a_pandas_ex_logcat2df-0.10.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

a_pandas_ex_logcat2df-0.10-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page