mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
Added KB about adb and fastboot
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -8,6 +8,7 @@
|
||||
"boinccmd",
|
||||
"bootable",
|
||||
"bootcmd",
|
||||
"bootloader",
|
||||
"btrfs",
|
||||
"cereda",
|
||||
"chezmoi",
|
||||
@@ -18,6 +19,7 @@
|
||||
"dpkg",
|
||||
"duperemove",
|
||||
"epel",
|
||||
"fastboot",
|
||||
"fdupes",
|
||||
"firewalld",
|
||||
"flatpak",
|
||||
@@ -61,6 +63,7 @@
|
||||
"tfvars",
|
||||
"tmpfs",
|
||||
"tput",
|
||||
"twrp",
|
||||
"usermod",
|
||||
"userspace",
|
||||
"zstd"
|
||||
|
||||
70
knowledge base/android.md
Normal file
70
knowledge base/android.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Android
|
||||
|
||||
1. [TL;DR](#tldr)
|
||||
1. [Further readings](#further-readings)
|
||||
|
||||
## TL;DR
|
||||
|
||||
```sh
|
||||
# List attached devices.
|
||||
adb devices
|
||||
adb devices -l
|
||||
|
||||
# Download files from an attached device.
|
||||
adb pull '/path/to/device/file.img'
|
||||
adb -s 'device_serial' pull '/path/to/device/file.img' '/path/to/local/file.img'
|
||||
|
||||
# Upload files to an attached device.
|
||||
adb push 'path/to/local/file.img' 'path/to/device/dir'
|
||||
|
||||
# Install an application.
|
||||
adb install 'path/to/file.apk'
|
||||
adb -s 'device_serial' install 'path/to/file.apk'
|
||||
|
||||
# Issue shell commands.
|
||||
adb shell 'command'
|
||||
|
||||
# Reboot devices to their 'fastboot' mode.
|
||||
adb reboot bootloader
|
||||
|
||||
# Reset `adb` on the local host.
|
||||
adb kill-server
|
||||
```
|
||||
|
||||
With the device in fastboot mode:
|
||||
|
||||
```sh
|
||||
# List attached devices.
|
||||
fastboot devices
|
||||
|
||||
# Unlock the bootloader.
|
||||
fastboot flashing unlock
|
||||
fastboot oem unlock
|
||||
|
||||
# Lock the bootloader.
|
||||
fastboot flashing lock
|
||||
fastboot oem lock
|
||||
|
||||
# Flash a recovery image.
|
||||
fastboot flash recovery 'path/to/recovery.img'
|
||||
|
||||
# Flash a boot image.
|
||||
fastboot flash boot 'path/to/boot.img'
|
||||
|
||||
# Reboot to 'system' mode.
|
||||
fastboot reboot
|
||||
```
|
||||
|
||||
## Further readings
|
||||
|
||||
- [ADB]
|
||||
- [How to Use ADB and Fastboot on Android]
|
||||
- [Using ADB and fastboot]
|
||||
|
||||
<!-- project's references -->
|
||||
[adb]: https://developer.android.com/studio/command-line/adb
|
||||
|
||||
<!-- internal references -->
|
||||
<!-- external references -->
|
||||
[how to use adb and fastboot on android]: https://www.makeuseof.com/tag/use-adb-fastboot-android/
|
||||
[using adb and fastboot]: https://wiki.lineageos.org/adb_fastboot_guide
|
||||
Reference in New Issue
Block a user