Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

25
android/am Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# am
> Android activity manager.
> More information: <https://developer.android.com/tools/adb#am>.
- Start the activity with a specific component and package [n]ame:
`am start -n {{com.android.settings/.Settings}}`
- Start an intent [a]ction and pass [d]ata to it:
`am start -a {{android.intent.action.VIEW}} -d {{tel:123}}`
- Start an activity matching a specific action and [c]ategory:
`am start -a {{android.intent.action.MAIN}} -c {{android.intent.category.HOME}}`
- Convert an intent to a URI:
`am to-uri -a {{android.intent.action.VIEW}} -d {{tel:123}}`

14
android/bugreport Normal file
View File

@@ -0,0 +1,14 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# bugreport
> Show an Android bug report.
> This command can only be used through `adb shell`.
> More information: <https://cs.android.com/android/platform/superproject/+/main:frameworks/native/cmds/bugreport>.
- Display a complete bug report of an Android device:
`bugreport`

26
android/bugreportz Normal file
View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# bugreportz
> Generate a zipped Android bug report.
> This command can only be used through `adb shell`.
> More information: <https://cs.android.com/android/platform/superproject/+/main:frameworks/native/cmds/bugreportz>.
- Generate a complete zipped bug report of an Android device:
`bugreportz`
- Show the progress of a running `bugreportz` operation:
`bugreportz -p`
- Display help:
`bugreportz -h`
- Display version:
`bugreportz -v`

21
android/cmd Normal file
View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# cmd
> Android service manager.
> More information: <https://cs.android.com/android/platform/superproject/+/main:frameworks/native/cmds/cmd/>.
- [l]ist all running services:
`cmd -l`
- Call a specific service:
`cmd {{service}}`
- Call a service with specific arguments:
`cmd {{service}} {{argument1 argument2 ...}}`

13
android/dalvikvm Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# dalvikvm
> Android Java virtual machine.
> More information: <https://developer.android.com/tools/#art_and_dalvik>.
- Start a specific Java program:
`dalvikvm -classpath {{path/to/file.jar}} {{classname}}`

34
android/dumpsys Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# dumpsys
> Provide information about Android system services.
> This command can only be used through `adb shell`.
> More information: <https://developer.android.com/tools/dumpsys>.
- Get diagnostic output for all system services:
`dumpsys`
- Get diagnostic output for a specific system service:
`dumpsys {{service}}`
- List all services `dumpsys` can give information about:
`dumpsys -l`
- List service-specific arguments for a service:
`dumpsys {{service}} -h`
- Exclude a specific service from the diagnostic output:
`dumpsys --skip {{service}}`
- Specify a [t]imeout period in seconds (defaults to 10s):
`dumpsys -t {{8}}`

37
android/getprop Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# getprop
> Show information about Android system properties.
> More information: <https://manned.org/getprop>.
- Display information about Android system properties:
`getprop`
- Display information about a specific property:
`getprop {{property}}`
- Display the SDK API level:
`getprop {{ro.build.version.sdk}}`
- Display the Android version:
`getprop {{ro.build.version.release}}`
- Display the Android device model:
`getprop {{ro.vendor.product.model}}`
- Display the OEM unlock status:
`getprop {{ro.oem_unlock_supported}}`
- Display the MAC address of the Android's Wi-Fi card:
`getprop {{ro.boot.wifimacaddr}}`

30
android/input Normal file
View File

@@ -0,0 +1,30 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# input
> Send event codes or touchscreen gestures to an Android device.
> This command can only be used through `adb shell`.
> More information: <https://developer.android.com/reference/android/view/KeyEvent.html#constants_1>.
- Send an event code for a single character to an Android device:
`input keyevent {{event_code}}`
- Send a text to an Android device (`%s` represents spaces):
`input text "{{text}}"`
- Send a single tap to an Android device:
`input tap {{x_position}} {{y_position}}`
- Send a swipe gesture to an Android device:
`input swipe {{x_start}} {{y_start}} {{x_end}} {{y_end}} {{duration_in_ms}}`
- Send a long press to an Android device using a swipe gesture:
`input swipe {{x_position}} {{y_position}} {{x_position}} {{y_position}} {{duration_in_ms}}`

29
android/logcat Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# logcat
> Dump a log of system messages, including stack traces when an error occurred, and information messages logged by applications.
> More information: <https://developer.android.com/tools/logcat>.
- Display system logs:
`logcat`
- Write system logs to a [f]ile:
`logcat -f {{path/to/file}}`
- Display lines that match a regular expression:
`logcat --regex {{regular_expression}}`
- Display logs for a specific PID:
`logcat --pid={{pid}}`
- Display logs for the process of a specific package:
`logcat --pid=$(pidof -s {{package}})`

29
android/pkg Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# pkg
> Package management utility for Termux.
> More information: <https://wiki.termux.com/wiki/Package_Management>.
- Upgrade all installed packages:
`pkg upgrade`
- Install a package:
`pkg install {{package}}`
- Uninstall a package:
`pkg uninstall {{package}}`
- Reinstall a package:
`pkg reinstall {{package}}`
- Search for a package:
`pkg search {{package}}`

29
android/pm Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# pm
> Display information about apps on an Android device.
> More information: <https://developer.android.com/tools/adb#pm>.
- List all installed apps:
`pm list packages`
- List all installed [s]ystem apps:
`pm list packages -s`
- List all installed [3]rd-party apps:
`pm list packages -3`
- List apps matching specific keywords:
`pm list packages {{keyword1 keyword2 ...}}`
- Display a path of the APK of a specific app:
`pm path {{app}}`

14
android/screencap Normal file
View File

@@ -0,0 +1,14 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# screencap
> Take a screenshot of a mobile display.
> This command can only be used through `adb shell`.
> More information: <https://developer.android.com/tools/adb#screencap>.
- Take a screenshot:
`screencap {{path/to/file}}`

25
android/settings Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# settings
> Get information about the Android OS.
> More information: <https://adbinstaller.com/commands/adb-shell-settings-5b670d5ee7958178a2955536>.
- List the settings in the `global` namespace:
`settings list {{global}}`
- Get a value of a specific setting:
`settings get {{global}} {{airplane_mode_on}}`
- Set a specific value of a setting:
`settings put {{system}} {{screen_brightness}} {{42}}`
- Delete a specific setting:
`settings delete {{secure}} {{screensaver_enabled}}`

18
android/wm Normal file
View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, android]
source: https://github.com/tldr-pages/tldr.git
---
# wm
> Show information about the screen of an Android device.
> This command can only be used through `adb shell`.
> More information: <https://adbinstaller.com/commands/adb-shell-wm-5b672b17e7958178a2955538>.
- Display the physical size of an Android device's screen:
`wm {{size}}`
- Display the physical density of an Android device's screen:
`wm {{density}}`