AOSP Command Reference
Your comprehensive, interactive reference for Android Open Source Project commands. Search, filter, and explore essential AOSP development commands with examples and safety information.
Why Use Our Command Reference?
Smart Search
Quickly find commands with intelligent search and filtering across categories
One-Click Copy
Copy commands to clipboard with a single click for immediate use
Category Filtering
Browse commands by category: Build System, ADB, Git, Debugging, and more
Downloadable Cheat Sheets
Export command references as PDF cheat sheets for offline use
Safety Indicators
Visual warnings for destructive commands to prevent accidental data loss
Detailed Examples
Each command includes usage examples and parameter explanations
Key Features
Real-time Search
Find commands instantly as you type with fuzzy search
Safety Warnings
Clear indicators for potentially destructive commands
Usage Examples
Practical examples with parameter explanations
Category Organization
Commands organized by Build System, ADB, Git, and more
Export Options
Download filtered results as PDF cheat sheets
Mobile Friendly
Responsive design works perfectly on all devices
Interactive Command Reference
Start typing to search commands, use filters to narrow results, and click any command to copy it to your clipboard.
Command Reference
Comprehensive database of AOSP development commands with examples and safety information
Found 131 commands
adb devices
List all connected Android devices
adb kill-server
Stop the ADB server process
adb start-server
Start the ADB server process
adb reboot
Reboot the device
adb shell df
Display disk usage on the device
adb push
Copy files from computer to device
adb pull
Copy files from device to computer
adb shell getprop
Get Android system properties
adb shell cat /proc/cpuinfo
Display CPU information of the device
adb install
Install APK package on device
adb uninstall
Uninstall an app from the device
adb shell pm list packages
List installed packages on the device
adb shell pm path
Show the path of an app's APK
adb shell pm dump
Dump detailed information about a package
adb logcat
View device system logs
adb shell "logcat >/sdcard/log000.log"
Save device logs to a file on the device
adb shell wm help
Display help for window manager commands
adb shell wm size
Get or set the device screen size
adb shell wm density
Get or set the device screen density
adb shell ps
List running processes on the device
adb root
Restart ADB with root privileges
adb disable-verity
Disable Android Verified Boot
adb remount
Remount system partitions as writable
adb shell screencap
Capture a screenshot of the device screen
adb shell screenrecord
Record the device screen
adb shell dumpsys activity
Dump activity manager state
adb shell setprop
Set Android system properties
adb shell dumpsys package queries
Dump package query information
adb shell dumpsys procstats
Dump process statistics
adb shell dumpsys gfxinfo
Dump graphics performance information
adb shell am start
Start an activity on the device
adb shell am force-stop
Force stop an app
adb shell pm clear
Clear app data
adb shell am startservice
Start a service on the device
adb shell am start-foreground-service
Start a foreground service on the device
adb shell am broadcast
Send a broadcast intent
adb shell ping
Test network connectivity from the device
adb shell netstat
Display network connections and statistics
adb shell tcpdump
Capture network packets on the device
adb shell getevent
Capture device input events
adb shell input
Simulate input events on the device
adb shell settings
Manage device settings
adb shell
Open interactive shell on device
fastboot devices
List devices in fastboot mode
fastboot flash
Flash partition with image file
fastboot erase
Erase partition
fastboot reboot
Reboot the device from fastboot mode
fastboot oem unlock
Unlock the device bootloader
fastboot oem lock
Lock the device bootloader
fastboot flashing unlock
Unlock bootloader for flashing (newer devices)
fastboot flashing lock
Lock bootloader to prevent flashing (newer devices)
fastboot getvar
Retrieve device information variables
fastboot boot
Boot an image without flashing
fastboot update
Flash all partitions from an update ZIP file
fastboot flashall
Flash all partitions from AOSP build output
fastboot format
Format a partition with a specified filesystem
fastboot oem device-info
Display bootloader and device lock status
fastboot continue
Continue the boot process after fastboot operations
fastboot set_active
Set the active slot for A/B devices
repo init
Initialize repo client
repo sync
Download or update source code
repo status
Show the status of repositories
repo diff
Show detailed changes across repositories
repo manifest
Generate or manage manifest files
repo prune
Remove obsolete branches from repositories
repo branches
List branches across all repositories
repo start
Start a new branch across repositories
repo checkout
Switch to an existing branch across repositories
repo upload
Upload changes for review
repo abandon
Delete a branch across repositories
repo diffmanifests
Compare two manifest files
repo forall
Execute a command in all repositories
source build/envsetup.sh
Initialize build environment
lunch
Select build target
m
Build from top of source tree
mm
Build modules in the current directory
mmm
Build specified modules
make
Run the full build using make
ma
Build all modules in the current directory and dependencies
tap
Set up a target and prepare environment
make clean
Remove all build artifacts
m droid
Build the entire Android system
make installclean
Clean installed files while preserving object files
m checkbuild
Verify build configuration without building
m modules
List all available build modules
git log --oneline
Show commit history in one line format
git log
Show detailed commit history
git show
Show details of a specific commit
git diff
Show changes between commits, branches, or working directory
git status
Show the status of the working directory and staging area
git add
Stage changes for the next commit
git commit
Record staged changes to the repository
git push
Push local commits to a remote repository
git fetch
Download objects and refs from a remote repository
git pull
Fetch and merge changes from a remote repository
git branch
List, create, or delete branches
git checkout
Switch branches or restore working directory files
git merge
Merge changes from one branch into another
git rebase
Reapply commits on top of another base
git reset
Reset current HEAD to a specified state
git revert
Create a new commit that undoes a previous commit
git cherry-pick
Apply a specific commit to the current branch
git clone
Clone a repository into a new directory
getprop
Get Android system properties
setprop
Set Android system properties
dumpsys
Dump system service information
ps
List running processes on the device
top
Display real-time process resource usage
cat /proc/*
View system information from /proc filesystem
ls
List files and directories on the device
df
Display disk usage on the device
su
Switch to superuser (root) mode
mount
Mount or list filesystem mounts
umount
Unmount a filesystem
reboot
Reboot the device from the shell
kill
Terminate a process by PID
pidof
Find the PID of a running process
uptime
Display system uptime and load averages
whoami
Display the current user identity
getenforce
Get current SELinux enforcement status
setenforce
Set SELinux enforcement mode
sestatus
Display detailed SELinux status and configuration
ls -Z
List files with SELinux security contexts
chcon
Change SELinux security context of a file or directory
restorecon
Restore default SELinux security contexts
getfattr
Display SELinux extended attributes of a file
setfattr
Set SELinux extended attributes of a file
selinuxenabled
Check if SELinux is enabled on the device
checkpolicy
Compile and check SELinux policy files
load_policy
Load a new SELinux policy file
ps -Z
List processes with SELinux security contexts
Pro Tips
Search Tips
- • Use partial words: "repo" finds all repo commands
- • Search by function: "flash" shows flashing commands
- • Filter by category for focused results
Safety First
- • Red badges indicate destructive commands
- • Always backup before using destructive commands
- • Test commands on non-production devices first