Created
February 22, 2025 07:05
-
-
Save rommansabbir/832978ddfa3f2ea2b99e03a1843a5113 to your computer and use it in GitHub Desktop.
ANDROID: Increase Logcat Buffer Size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Task: increaseLogcatBufferSize | |
* | |
* This Gradle task uses the Exec task type to execute an ADB command that increases the | |
* Android logcat buffer size to 16 megabytes (16M). This is useful when significant logging | |
* is enabled, ensuring that the log buffer does not truncate your logs during development | |
* and debugging. | |
* | |
* IMPORTANT: | |
* - Update the adb executable path in the commandLine() call to match your local environment. | |
* For example: | |
* - macOS/Linux: "/Users/yourusername/Library/Android/sdk/platform-tools/adb" | |
* - Windows: "C:/Users/yourusername/AppData/Local/Android/sdk/platform-tools/adb.exe" | |
* | |
* USAGE: | |
* Run this task from the command line: | |
* ./gradlew increaseLogcatBufferSize | |
*/ | |
tasks.register<Exec>("increaseLogcatBufferSize") { | |
commandLine("/Users/romman/Library/Android/sdk/platform-tools/adb", "logcat", "-G", "16M") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment