-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,172 additions
and
650 deletions.
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
const android = await Astro.glob('./*.md*'); | ||
import MDXJS from '@w/MDXJS.astro'; | ||
--- | ||
{ | ||
android.map((note) => ( | ||
<MDXJS transparent={false}> | ||
<div> | ||
<article class=""> | ||
<h2>{note.frontmatter.title}</h2> | ||
<p>{note.frontmatter.description}</p> | ||
|
||
<note.Content /> | ||
</article> | ||
</div> | ||
</MDXJS> | ||
)) | ||
} |
93 changes: 93 additions & 0 deletions
93
src/content/application/android/_android/device-commands.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
--- | ||
title: Android Device Commands | ||
description: | | ||
Android Device Commands | ||
--- | ||
|
||
|
||
### Device Commands | ||
|
||
Android ADB Device commands are commands that you can use to control the Android device over USB from a computer. | ||
You can use them to list all devices, restart server and reboot! | ||
|
||
- `adb devices` - List all connected devices. | ||
|
||
- `adb devices -l` - Query additional information from devices. | ||
- `adb get-state` - Information on the device state. | ||
- `adb get-serialno` - Query the device serial number. | ||
|
||
- `adb root` - Launch module adbd with root permission. | ||
- Error 1: `adbd cannot run as root in production builds` | ||
- Resolution: | ||
- `adb start-server` - Start the adb server. | ||
- `adb kill-server` - Terminate the adb server. | ||
- `adb reboot` - Restart the current device. | ||
- `adb help` - Display additional information. | ||
|
||
### Shell | ||
|
||
> Warning: Shell commands can brick your operating system, so make sure to double check them before running. | ||
ADB shell is a command-line interface that you can use to access the shell and run various commands on your Android device. | ||
You can use ADB shell commands to perform actions such as changing the resolution of your device display, uninstalling bloatware or system apps, enabling and disabling features, modifying the system files, ect.. | ||
|
||
> Remember to keep a backup of the commands that you run via shell, I recommend creating a `log.txt` file and output all the commands to that file. | ||
- `adb shell` - Launch the shell terminal for the device. | ||
- `adb -s $deviceString $deviceCommand` - Send the $deviceCommand to a specific device named $deviceString | ||
- `adb shell pwd` - Command to list current directory. | ||
- `adb shell ls` - Command to list all the directory contents of the device. | ||
- `adb shell ls -s` - Additional size information. | ||
- `adb shell ls -R` - Recursion of the folders. | ||
- `adb shell netstat` - Query the TCP information | ||
- `adb shell dumpsys` - An android tool that dumps information related to system services. | ||
- `adb shell dumpsys iphonesybinfo` - Query the IMEI information. | ||
- `adb shell dumpsys battery` - Query battery information. | ||
- `adb shell dumpsys battery set level $v` - Device battery level from 0 to 100. | ||
- `adb shell dumpsys battery reset` - Reset the device battery. | ||
- `adb shell dumpsys activity $package` - Query activity of package. | ||
- `adb shell pm list features` - Query device features. | ||
- `adb shell service list` - Query device services. | ||
- `adb shell wm` - ◈Null | ||
- `adb shell wm size` - Current device screen resolution. | ||
- `adb shell wm size $WxH` - Change device screen resolution. | ||
- `adb shell wm size reset` - Reset device screen resolution. | ||
- `adb shell wm density` - ◈Null | ||
- `adb shell wm density reset` - Reset device density. | ||
- `adb shell ps` - Query process status on the device. | ||
- `exit` - To exit ADB. | ||
|
||
--- | ||
|
||
### Key Events | ||
|
||
Android Key Events - A quick breakdown for each event and how the operating system handles them. | ||
|
||
Generic Android Keyevents: | ||
|
||
- `adb shell input keyevent` | ||
|
||
- `adb shell input keyevent 0` - Keycode 0 | ||
- `adb shell input keyevent 1` - Soft Left | ||
- `adb shell input keyevent 2` - Soft Right | ||
- `adb shell input keyevent 3` - Home Button Event. | ||
- `adb shell input keyevent 4` - Back Button Event. | ||
- `adb shell input keyevent 5` - Call Event. | ||
- `adb shell input keyevent 6` - End Call / Hangup Event. | ||
- Events 7 to 18 are generic cell phone events. | ||
- `adb shell input keyevent 7` - Keycode 0 | ||
- `adb shell input keyevent 8` - Keycode 1 aka Number 1 | ||
- `adb shell input keyevent 9` - Keycode 2 aka Number 2 | ||
- `adb shell input keyevent 10` - Keycode 3 aka Number 3 | ||
- `adb shell input keyevent 11` - Keycode 4 aka Number 4 | ||
- `adb shell input keyevent 12` - Keycode 5 aka Number 5 | ||
- `adb shell input keyevent 13` - Keycode 6 aka Number 6 | ||
- `adb shell input keyevent 14` - Keycode 7 aka Number 7 | ||
- `adb shell input keyevent 15` - Keycode 8 aka Number 8 | ||
- `adb shell input keyevent 16` - Keycode 9 aka Number 9 | ||
- `adb shell input keyevent 17` - STAR Key | ||
- `adb shell input keyevent 18` - Pound Key | ||
|
||
- Koltin: `open class KeyEvent: InputEvent, Parcelable` | ||
|
||
- Java: `pulibc class KeyEvent extends InputEvent implements Parcelable` |
Oops, something went wrong.