Skip to content

Instantly share code, notes, and snippets.

@nikclayton
Last active November 14, 2025 10:13
Show Gist options
  • Select an option

  • Save nikclayton/a9b18088f25b7fbf7f511321c25d2e07 to your computer and use it in GitHub Desktop.

Select an option

Save nikclayton/a9b18088f25b7fbf7f511321c25d2e07 to your computer and use it in GitHub Desktop.
Getting a Pachli Current log with `adb`

Getting a Pachli Current log with adb

Synopsis

If Pachli Current crashes it normally allows you to e-mail a crash report to [email protected] which can help troubleshoot the problem. Sometimes that might not work. In this case you can retrieve and e-mail the log yourself. This document explains how.

Before reading this document you should:

  • Be comfortable installing and running command line tools.
  • Have a computer running Linux, Windows, or OS X.
  • (optional) Have a USB cable to connect your Android device to your computer. Some devices can connect wirelessly.

After reading this document you will know how to:

  • Download the official adb tool, which can read the logs from your device.
  • Allow adb to connect to your device.
  • Run adb and collect logs from Pachli Current.

This is a summary of more detailed information at Android Debug Bridge (adb)  |  Android Studio  |  Android Developers

Downloading adb

adb (Android Debug Bridge) is a command line tool that can connect to your Android device and perform various operations. It is typically used by application developers.

To install adb:

  1. Go to SDK Platform Tools release notes
  2. Download the appropriate "SDK Platform-Tools" for your computer.
  3. Extract the files from the archive.

Step 3 creates platform-tools/adb wherever you extracted the archive. There is no "install" step, the command can be run from the directory it was extracted to.

Allow adb to connect to your device

Enable "Developer mode"

You must enable "Developer mode" on your device before adb will connect. In general this involves finding your device's Developer options screen and enabling "Developer mode".

How to do this varies from device to device.

Enable developer options explains how to do this for a range of devices.

Enable "USB Debugging"

After enabling "Developer mode" you must also enable "USB Debugging" on your device.

How to do this varies from device to device.

Enable debugging on your device explains how to do this for a range of devices.

Connect your device to your computer using a USB cable

Plug your device into your computer using a USB cable.

Your device will probably display a dialog asking if you trust the device you have connected to. Confirm this.

Confirm adb can see your device

  1. Change to the directory that contains adb, extracted at the "Downloading adb" step. This is probably called platform-tools.
  2. Run adb devices (possibly ./adb devices if the current directory is not in your PATH)

You should see output similar to this:

List of devices attached
4C181JEKB16142  device

This confirms that adb can connect to your device.

Confirm adb can see your device logs

Run adb logcat.

You should see tens or hundreds of lines scroll up the screen.

Press Ctrl-C to stop viewing the log.

Stop Pachli Current

If Pachli Current is running on your device, stop it.

  1. Open "Recent applications". Depending on your device you might press the "square" button on the bottom bar, or swipe up from the bottom of the screen.
  2. Find Pachli Current in the list of recent applications.
  3. Close Pachli Current. Depending on your device you might have to swipe it away, or press an X button.

Verify log capture works

Run the following command

adb shell 'am start -W -n app.pachli.current/app.pachli.feature.intentrouter.IntentRouterActivity; logcat --pid=$(pidof app.pachli.current)'

Note: That is a single line. The single quotes (') before am start and at the end are important. Do not use double quotes (").

Pachli Current should start, and you should see log entries appearing on screen.

Note: The command:

  1. Connects to your device (am shell)
  2. Starts Pachli Current, and waits for it to start (am start -W -n app.pachli.current/app.pachli.feature.intentrouter.IntentRouterActivity)
  3. Displays just the logs from the Pachli Current process (logcat --pid=$(pidof app.pachli.current))

Press Ctrl-C to cancel capturing the logs.

Note: In my testing this sometimes leaves the terminal in an inconsistent state. If that happens to you run stty sane to fix it.

Stop Pachli Current

Exactly as before.

Save the logs to a file

Run the following command:

adb shell 'am start -W -n app.pachli.current/app.pachli.feature.intentrouter.IntentRouterActivity; logcat --pid=$(pidof app.pachli.current)' > pachli-current.log

Wait for Pachli Current to crash, then press Ctrl-C to cancel capturing the logs.

Compress and send the logs

Compress the pachli-current.log file you just created (e.g., as a zip file), and e-mail the file to [email protected]

Disable "USB Debugging"

Open your device's settings, find the "USB Debugging" option you enabled earlier, and disable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment