Pdf/Acyclic.1.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
tldr pages Simplified and community-driven man pages Generated on Sun Sep 26 15:57:34 2021 Android am Android activity manager. More information: https://developer.android.com/studio/command-line/adb#am. • Start a specific activity: am start -n {{com.android.settings/.Settings}} • Start an activity and pass data to it: am start -a {{android.intent.action.VIEW}} -d {{tel:123}} • Start an activity matching a specific action and category: 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}} bugreport Show an Android bug report. This command can only be used through adb shell. More information: https://android.googlesource.com/platform/frameworks/native/+/ master/cmds/bugreport/. • Show a complete bug report of an Android device: bugreport bugreportz Generate a zipped Android bug report. This command can only be used through adb shell. More information: https://android.googlesource.com/platform/frameworks/native/+/ master/cmds/bugreportz/. • Generate a complete zipped bug report of an Android device: bugreportz • Show the progress of a running bugreportz operation: bugreportz -p • Show the version of bugreportz: bugreportz -v • Display help: bugreportz -h cmd Android service manager. More information: https://cs.android.com/android/platform/superproject/+/ master:frameworks/native/cmds/cmd/. • List every running service: cmd -l • Call a specific service: cmd {{alarm}} • Call a service with arguments: cmd {{vibrator}} {{vibrate 300}} dalvikvm Android Java virtual machine. More information: https://source.android.com/devices/tech/dalvik. • Start a Java program: dalvikvm -classpath {{path/to/file.jar}} {{classname}} dumpsys Provide information about Android system services. This command can only be used through adb shell. More information: https://developer.android.com/studio/command-line/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 timeout period in seconds (defaults to 10s): dumpsys -t {{seconds}} 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 {{prop}} • 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}} 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_pos}} {{y_pos}} • 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_pos}} {{y_pos}} {{x_pos}} {{y_pos}} {{duration_in_ms}} logcat Dump a log of system messages. More information: https://developer.android.com/studio/command-line/logcat. • Display system logs: logcat • Write system logs to a file: logcat -f {{path/to/file}} • Display lines that match a regular expression: logcat --regex {{regular_expression}} pm Show information about apps on an Android device. More information: https://developer.android.com/studio/command-line/adb#pm. • Print a list of all installed apps: pm list packages • Print a list of all installed system apps: pm list packages -s • Print a list of all installed 3rd-Party apps: pm list packages -3 • Print a list of apps matching specific keywords: pm list packages {{keywords}} • Print the path of the APK of a specific app: pm path {{app}} settings Get information about the Android OS. More information: https://adbinstaller.com/commands/adb-shell- settings-5b670d5ee7958178a2955536. • Display a list of settings in the global namespace: settings list {{global}} • Get the value of a specific setting: settings get {{global}} {{airplane_mode_on}} • Set the value of a setting: settings put {{system}} {{screen_brightness}} {{42}} • Delete a specific setting: settings delete {{secure}} {{screensaver_enabled}} 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}} Common 2to3 Automated Python 2 to 3 code conversion. More information: https://docs.python.org/3/library/2to3.html. • Display the changes that would be performed without performing them (dry-run): 2to3 {{path/to/file.py}} • Convert a Python 2 file to Python 3: 2to3 --write {{path/to/file.py}} • Convert specific Python 2 language features to Python 3: 2to3 --write {{path/to/file.py}} --fix={{raw_input}} -- fix={{print}} • Convert all Python 2 language features except the specified ones to Python 3: 2to3 --write {{path/to/file.py}} --nofix={{has_key}} -- nofix={{isinstance}} • Display a list of all available language features that can be converted from Python 2 to Python 3: 2to3 --list-fixes • Convert all Python 2 files in a directory to Python 3: 2to3 --output-dir={{path/to/python3_directory}} --write- unchanged-files --nobackups {{path/to/python2_directory}} • Run 2to3 with multiple threads: 2to3 --processes={{4}} --output-dir={{path/to/ python3_directory}} --write --nobackups --no-diff {{path/to/ python2_directory}} 7z File archiver with a high compression ratio. More information: https://www.7-zip.org. • [a]rchive a file or directory: 7z a {{path/to/archive.7z}} {{path/to/file_or_directory}} • Encrypt an existing archive (including filenames): 7z a {{path/to/encrypted.7z}} -p{{password}} -mhe=on {{path/ to/archive.7z}} • E[x]tract an archive preserving the original directory structure: 7z x {{path/to/archive.7z}} • E[x]tract an archive to a specific directory: 7z x {{path/to/archive.7z}} -o{{path/to/output}} • E[x]tract an archive to stdout: 7z x {{path/to/archive.7z}} -so • [a]rchive using a specific archive type: 7z a -t{{7z|zip|gzip|bzip2|lzip}} {{path/to/archive.7z}} {{path/to/file_or_directory}} • [l]ist the contents of an archive: 7z l {{path/to/archive.7z}} • List available archive types: 7z i 7za File archiver with a high compression ratio. Similar to 7z except that it supports fewer file types but is cross-platform. More information: https://www.7-zip.org. • [a]rchive a file or directory: 7za a {{path/to/archive.7z}} {{path/to/file_or_directory}} • Encrypt an existing archive (including file names): 7za a {{path/to/encrypted.7z}} -p{{password}} -mhe=on {{path/ to/archive.7z}} • E[x]tract an archive preserving the original directory structure: 7za x {{path/to/archive.7z}} • E[x]tract an archive to a specific directory: 7za x {{path/to/archive.7z}} -o{{path/to/output}} • E[x]tract an archive to stdout: 7za x {{path/to/archive.7z}} -so • [a]rchive using a specific archive type: 7z a -t{{7z|zip|gzip|bzip2|lzip}} {{path/to/archive.7z}} {{path/to/file_or_directory}} • [l]ist the contents of an archive: 7za l {{path/to/archive.7z}} • List available archive types: 7za i 7zr File archiver with a high compression ratio. Similar to 7z except that it only supports .7z files. More information: https://www.7-zip.org. • [a]rchive a file or directory: 7zr a {{path/to/archive.7z}} {{path/to/file_or_directory}} • Encrypt an existing archive (including file names): 7zr a {{path/to/encrypted.7z}} -p{{password}} -mhe=on {{path/ to/archive.7z}} • E[x]tract an archive preserving the original directory structure: 7zr x {{path/to/archive.7z}} • E[x]tract an archive to a specific directory: 7zr x {{path/to/archive.7z}} -o{{path/to/output}} • E[x]tract an archive to stdout: 7zr x {{path/to/archive.7z}} -so • [l]ist the contents of an archive: 7zr l {{path/to/archive.7z}} • List available archive types: 7zr i [ Evaluate condition. Returns 0 if the condition evaluates to true, 1 if it evaluates to false. More information: https://www.gnu.org/software/coreutils/test. • Test if a given variable is equal to a given string: [ "{{$VARIABLE}}" == "{{/bin/zsh}}" ] • Test if a given variable is empty: [ -z "{{$GIT_BRANCH}}" ] • Test if a file exists: [ -f "{{path/to/file}}" ] • Test if a directory does not exist: [ ! -d "{{path/to/directory}}" ] • If-else statement: [ {{condition}} ] && {{echo "true"}} || {{echo "false"}} aapt Android Asset Packaging Tool. Compile and package an Android app's resources. More information: https://elinux.org/Android_aapt. • List files contained in an APK archive: aapt list {{path/to/app.apk}} • Display an app's metadata (version, permissions, etc.): aapt dump badging {{path/to/app.apk}} • Create a new APK archive with files from the specified directory: aapt package -F {{path/to/app.apk}} {{path/to/directory}} ab Apache HTTP server benchmarking tool. More information: https://httpd.apache.org/docs/current/programs/ab.html. • Execute 100 HTTP GET requests to a given URL: ab -n {{100}} {{url}} • Execute 100 HTTP GET requests, in concurrent batches of 10, to a URL: ab -n {{100}} -c {{10}} {{url}} • Execute 100 HTTP POST requests to a URL, using a JSON payload from a file: ab -n {{100}} -T {{application/json}} -p {{path/to/ file.json}} {{url}} • Use HTTP [K]eep Alive, i.e. perform multiple requests within one HTTP session: ab -k {{url}} • Set the maximum number of seconds to spend for benchmarking: ab -t {{60}} {{url}} abduco Terminal session manager.