From 0049fcc42bf5f05274846b8ab9cf8eb2d9c66f8f Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Tue, 6 Mar 2018 18:09:06 +0900 Subject: [PATCH 1/4] HTTPS polyfill links --- _includes/polyfills.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_includes/polyfills.html b/_includes/polyfills.html index ed6b6847f..7a3672090 100644 --- a/_includes/polyfills.html +++ b/_includes/polyfills.html @@ -1,9 +1,9 @@ From f07c0f00154293b14dbf23d4359f636e766a6b8f Mon Sep 17 00:00:00 2001 From: Zack Neyland Date: Tue, 6 Mar 2018 19:46:17 -0800 Subject: [PATCH 2/4] Adds cheatsheet for adb. * Android Debug Bridge, a CLI for interacting with a connected droid device or emulator. --- adb.md | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 adb.md diff --git a/adb.md b/adb.md new file mode 100644 index 000000000..c05c7543e --- /dev/null +++ b/adb.md @@ -0,0 +1,77 @@ +--- +title: adb +category: CLI +layout: 2017/sheet +weight: -1 +updated: 2018-2-6 +--- + +### Device Basics + +| Command | Description | +| --- | --- | +| `adb devices` | Lists connected devices | +| `adb devices -l` | Lists connected devices and kind | +| --- | --- | +| `adb root` | Restarts adbd with root permissions | +| `adb start-server` | Starts the adb server | +| `adb kill-server` | Kills the adb server | +| `adb remount` | Remounts file system with read/write access | +| `adb reboot` | Reboots the device | +| `adb reboot bootloader` | Reboots the device into fastboot | +| `adb disable-verity` | Reboots the device into fastboot | + +`wait-for-device` can be specified after `adb` to ensure that the command will run once the device is connected. + +`-s` can be used to send the commands to a specific device when multiple are connected. + +#### Examples +``` +$ adb wait-for-device devices + List of devices attached + somedevice-1234 device + someotherdevice-1234 device +$ adb -s somedevice-1234 root +``` + +### Logcat + +| Command | Description | +| --- | --- | +| `adb logcat` | Starts printing log messages to stdout | +| `adb logcat -g` | Displays current log buffer sizes | +| `adb logcat -G ` | Sets the buffer size (K or M) | +| `adb logcat -c` | Clears the log buffers | +| `adb logcat *:V` | Enables ALL log messages (verbose) | +| `adb logcat -f ` | Dumps to specified file | + +#### Examples +``` +$ adb logcat -G 16M +$ adb logcat *:V > output.log +``` + +### File Management + +| Command | Description | +| --- | --- | +| `adb push ` | Copies the local to the device at remote | +| `adb pull ` | Copies the remote from the device to local | + +#### Examples +``` +$ echo "This is a test" > test.txt +$ adb push test.txt /sdcard/test.txt +$ adb pull /sdcard/test.txt pulledTest.txt +``` + +### Remote Shell + +| Command | Description | +| --- | --- | +| `adb shell ` | Runs the specified command on device (most unix commands work here) | +| `adb shell wm size` | Displays the current screen resolution | +| `adb shell wm size WxH` | Sets the resolution to WxH | +| `adb shell pm list packages` | Lists all installed packages | +| `adb shell pm list packages -3` | Lists all installed 3rd-party packages | +| `adb shell monkey -p app.package.name` | Starts the specified package | \ No newline at end of file From eedf02165e7033a1fe74d13eb9ac76fb0208a3ef Mon Sep 17 00:00:00 2001 From: Zack Neyland Date: Tue, 6 Mar 2018 19:49:13 -0800 Subject: [PATCH 3/4] Fixes date --- adb.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adb.md b/adb.md index c05c7543e..e71f80f2a 100644 --- a/adb.md +++ b/adb.md @@ -3,7 +3,7 @@ title: adb category: CLI layout: 2017/sheet weight: -1 -updated: 2018-2-6 +updated: 2018-3-6 --- ### Device Basics @@ -74,4 +74,4 @@ $ adb pull /sdcard/test.txt pulledTest.txt | `adb shell wm size WxH` | Sets the resolution to WxH | | `adb shell pm list packages` | Lists all installed packages | | `adb shell pm list packages -3` | Lists all installed 3rd-party packages | -| `adb shell monkey -p app.package.name` | Starts the specified package | \ No newline at end of file +| `adb shell monkey -p app.package.name` | Starts the specified package | From 8fe7d1455c306bbd3ecefca69a04ac1e3d285c66 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Wed, 7 Mar 2018 16:15:41 +0800 Subject: [PATCH 4/4] adb: attribute and update formatting --- adb.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/adb.md b/adb.md index e71f80f2a..91444dbb9 100644 --- a/adb.md +++ b/adb.md @@ -1,9 +1,11 @@ --- -title: adb +title: adb (Android Debug Bridge) category: CLI layout: 2017/sheet weight: -1 -updated: 2018-3-6 +authors: + - github: ZackNeyland +updated: 2018-03-06 --- ### Device Basics @@ -26,11 +28,15 @@ updated: 2018-3-6 `-s` can be used to send the commands to a specific device when multiple are connected. #### Examples + ``` $ adb wait-for-device devices List of devices attached somedevice-1234 device someotherdevice-1234 device +``` + +``` $ adb -s somedevice-1234 root ``` @@ -59,6 +65,7 @@ $ adb logcat *:V > output.log | `adb pull ` | Copies the remote from the device to local | #### Examples + ``` $ echo "This is a test" > test.txt $ adb push test.txt /sdcard/test.txt