Skip to main content

Multiple ADB logcat with colored output / csv export

Tested against Windows 10 / Python 3.11 / Anaconda

pip install logcatdevices

start_logcat (ctrl+c to stop)

Starts logging Android device logs using ADB.

This function initiates log capturing for specified Android devices using ADB (Android Debug Bridge).
Logs are saved to a CSV file for further analysis.

Args:
	adb_path (str): Path to the ADB executable.
	csv_output (str): Path to the CSV file where the logs will be saved.
	device_serials (str or list): A single device serial number as a string, or a list of serial numbers
								  for multiple devices. Serial numbers are used to identify connected devices.
	print_stdout (bool, optional): If True, prints log messages to the console. Default is True.
	clear_log (bool, optional): If True, clears the device log before capturing. Default is True.
	ljustserial (int, optional): Left-justifies the device serial number in the printed output. Default is 16.

Returns:
	None

Example:
	from logcatdevices import start_logcat

	androidcsv = "c:\\csvandroisad.csv"
	_ = start_logcat(
		adb_path=r"C:\Android\android-sdk\platform-tools\adb.exe",
		csv_output=androidcsv,
		device_serials=[
			"127.0.0.1:5565",
			"127.0.0.1:7555",
			"127.0.0.1:7556",
			"emulator-5554",
			"emulator-5564",
		],
		print_stdout=True,
		clear_log=True,
		ljustserial=16,
	)

csv2df

Converts a CSV log file to a pandas DataFrame.

This function reads a CSV file containing Android device log data and converts it into a structured
pandas DataFrame, enabling easy data manipulation and analysis.

Args:
	csvfile (str): Path to the CSV log file.

Returns:
	pandas.DataFrame: A DataFrame containing log data with the following columns:
		- aa_source (str): Source of the log message.
		- aa_date (datetime): Date and time of the log message.
		- aa_processID (int): Process ID associated with the log message.
		- aa_threadID (int): Thread ID associated with the log message.
		- aa_logType (str): Type of log message (e.g., 'V', 'D', 'I', 'W', 'E').
		- aa_tag (str): Tag associated with the log message.
		- aa_message (str): Log message content.

Example:
	from logcatdevices import csv2df
	androidcsv = "c:\\csvandroisad.csv"
	df = csv2df(androidcsv)
	print(df.to_string())

Metadata

Release files for logcatdevices 0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logcatdevices 0.11
File Size Uploaded Provenance Actions
logcatdevices-0.11.tar.gz 8.1 kB Without provenance Details for logcatdevices-0.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for logcatdevices 0.11
File Interpreter ABI Platform Actions
logcatdevices-0.11-py3-none-any.whl Python 3 none any Details for logcatdevices-0.11-py3-none-any.whl

Total release size: 17.7 kB

Release files / logcatdevices-0.11.tar.gz

Download URL logcatdevices-0.11.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0762b0edab2dc6f71b8abb3a604ef5c097353cba9b61836ca1d79a1f5e9ef5ee
BLAKE2b-256 checksum
How to use checksums
9d39374ed57441308c3878e6fb0a0385803d9bad70df2be0f1898731b845ae86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / logcatdevices-0.11-py3-none-any.whl

Download URL logcatdevices-0.11-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
904661772319848c9d68607eba31d81673945f1eeafc1d38d3261512748d4221
BLAKE2b-256 checksum
How to use checksums
a11414a83bf9016a844a1f49f877c48acbf357c94975a2870c7a1c69a953f986
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for logcatdevices 0.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.11 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page