Close Menu
DroidfeatsDroidfeats

    Subscribe to Updates

    Join our most passionate readers to get instant access to tech tips as they arrive!

    What's Hot
    Comparing the Best Cricket Betting Apps Available in India

    Comparing the Best Cricket Betting Apps Available in India

    May 19, 2025
    Zoom vs. Teams vs. Google Meet: Which Platform is the Best?

    Zoom vs. Teams vs. Google Meet: Which Platform is the Best?

    May 14, 2025
    How to Recognize a Good Non GamStop Casino Bonus?

    How to Recognize a Good Non GamStop Casino Bonus?

    May 14, 2025
    Facebook X (Twitter) Instagram
    • About
    • Privacy Policy
    • DMCA
    • Team
    • Get In Touch
    Facebook X (Twitter) Instagram Pinterest RSS
    DroidfeatsDroidfeats
    • Home
    • News
    • Apps
    • Tips
    • VPN
    • #TheBest
      • Get GCam Ports
      • USB Drivers
      • Get Magisk
      • Get Play Store
      • Get ADB binaries
    • Commands
    Best Deals
    DroidfeatsDroidfeats
    Home»Tips»Table of all ADB & Fastboot Commands for Android (Windows / Mac / Linux)
    Tips

    Table of all ADB & Fastboot Commands for Android (Windows / Mac / Linux)

    Saeed Ashif AhmedBy Saeed Ashif AhmedOctober 28, 20227 Comments12 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Reddit Email

    In this article, you will find the list of all ADB and Fastboot Commands for Android devices. You can execute these commands on any computer regardless of its operating system (Windows, Mac, or Linux). The commands are universal, which means the same commands will work on any Android device, regardless of its manufacturer or device variant.

    Android enthusiasts, familiar with unlocking bootloader, rooting, or installing a custom recovery on their device, must be well aware of ADB and fastboot. These are system utilities that provide backend of Android when it is connected to a computer.

    ADB & Fastboot Commands

    ADB or Android Debug Bridge can be used when an Android phone is connected to PC on fastboot or bootloader mode. There are some specific codes that can be executed using a computer to perform a function on Android devices. Mostly, people use fastboot to unlock the bootloader of a phone. Sometime, you may need to unbrick the device (in case of a hard brick) using fastboot.

    Most of the fastboot and ADB commands produce the same results on any device regardless of the manufacturer or variant. If you are stuck somewhere, where you need fastboot / ADB command to assist, this post is for you. I have listed all the important fastboot, and ADB commands in the table given below. Codes, along with its property and functions, are also appropriately mentioned. Use Ctrl + F to find your requirement.

    Pre-requisite

    Before going to the fastboot & ADB commands, you need certain tools and settings to be enabled on your device as well as the computer. Otherwise, you can not make use of the fastboot or ADB commands. The tools are needed to be installed on the computer. On the other hand, the necessary settings are to be made on the phone.

    Methods are the same for all Android smartphones. So, don’t worry about the OEM or variant. Consider the following checkpoints:

    1. You need to enable USB Debugging mode to connect your Android phone to computer. (Settings > About Phone > Build number > Tap it 7 times to become developer; Settings > Developer Options > USB Debugging).
    2. Download Android SDK Platform Tools (ADB & Fastboot)
    3. Mac users: Setup ADB on Mac (using Homebrew)
    4. USB Cable: Preferably, the one provided by the manufacturer.
    5. Optional: Download & Install Android USB Driver on your computer.

    ADB Commands list

    Here is the complete list of all the ADB commands that you can execute using the command prompt or terminal while connecting the Android device to the PC with all required settings. Perform the following if you had fulfilled the prerequisites mentioned above:

    adb helpDisplays the help documentation on ADB commands
    adb devicesList of all Android devices that are correctly connected to the PC via ADB
    ADB devices
    adb usbIt will show you all the connected Android device or Emulators connected to your PC using USB
    adb rebootRestart your Android to system
    adb reboot bootloaderReboot your device into fastboot or bootloader mode
    adb recoveryGet your Android into recovery mode
    adb sideload ota-update.zipUsed to manually install OTA updates using recovery mode (when the ZIP file is on the computer, not in mobile). Read more about it here!
    adb installInstall APK files manually on your Android using ADB
    adb install filename.apkInstall APK (replacing the file name with the particular APK file name)
    adb install -r filename.apkRe-install or update an APK to a newer version on Android using ADB
    adb install -s filename.apkInstall APK in the external SD Card (if supported by the application)
    adb uninstallUninstall any app using ADB command (see next)
    adb uninstall com.tencent.igUninstall PUBG app package (replace package name with your desired one)
    adb uninstall -k com.tencent.igUninstall the app keeping the data and cache untouched
    adb jdwpFull list of JDWP (Java Debug Wire Protocol) processes on the Android
    adb bugreportCheck then the dumpsys, dumpstate and logcat data
    adb logcatDisplay full log data on the screen
    adb get-serialnoIt displays the ADB instance serial number string associated with the device
    adb wait-for-deviceIt is used to program the device to wait for some time until another process is done
    adb get-stateShows the device status in the command prompt or terminal
    adb start-serverStarts the ADB server process
    adb kill-serverTerminate the ADB server process
    adb backup //Using this command, you can create a full backup of your Android device and save it to the computer
    adb restore //Use this command to restore the backup
    adb connect ip_address_of_deviceUsing this command, you can connect the IP address of your Android device to the computer. Remember to change the IP address in the code.

    Push and Pull files using ADB

    Push and pulls are used to transfer any files from the device to the computer or vice versa. To pull a file from the Android device to the computer, you need to provide the full path of the file. You can use the following ADB command:

    adb pull </path/filename>

    You need to change the file name with an extension. For example, we are pulling a file called “CartoonHD.apk“. You need to execute the command in the following way:

    adb pull /system/app/CartoonHD.apk

    On the other hand, while pushing files from computer to Android using ADB, you can execute the following command:

    adb push <source-path> <target-path>

    Same as before, you need to provide the full path with extension and the destination path as well. Check out the example below:

    adb push /local/path/CartoonHD.apk /sdcard/apps/

    ADB Shell Commands list

    Here is the complete list of all the ADB Shell commands that you can execute using the command prompt or terminal while connecting the Android device to the PC with all required settings.

    ADB Shell CommandsFunctions
    adb shellStarts the remote shell command console in the device and lets you control the Android through it
    adb shell wm densityUse it to change the pixel density of your Android device (details given below)
    adb shell pm list packagesShows all the installed apps package name on your Android
    adb shell pm list packages -sShows the list of all the system apps installed on your Android with the package name
    adb shell pm list packages -3List of all the 3rd party apps installed on your Android
    adb shell pm list packages -dDisabled apps list on your Android
    adb shell pm list packages -eEnabled (active) apps list on your Android with package names
    adb shell pm list packages -uList of all the apps that you uninstalled from your Android with installed pages
    adb shell
    Hit enter and execute the following:
    cd /system
    These commands change the directory to /system
    adb shell
    Hit enter and execute the following:
    rm -f /sdcard/whatsapp.apk
    Delete a file: replace whatsapp.apk to your desired file name with extension
    adb shell
    Hit enter and execute the following:
    rm -d /sdcard/DCIM
    Delate a folder: replace DCIM to your desired folder name
    adb shell
    Hit enter and execute the following:
    mkdir /sdcard/Folder1
    Create a new folder “Folder1” under /sdcard
    adb shell
    Hit enter and execute the following:
    netstat
    Check the network statics on your Android device using ADB
    adb shell
    Hit enter and execute the following:
    ip -f inet addr show wlan0
    Shows the device’s Wi-Fi IP address
    adb shell
    Hit enter and execute the following:
    top
    Use this Coe to monitor the running CPU process on your Android device
    adb shell
    Hit enter and execute the following:
    getprop ro.build.version.sdk
    Get the property of Android’s build.prop configuration
    adb shell
    Hit enter and execute the following:
    setprop net.dns1 1.2.3.4
    Use to set the values of built.prop configuration and change the properties

    Uninstall a system app using ADB

    If you want to uninstall a system app via ADB Shell command, you can execute the following code:

    adb shell pm uninstall -k –user 0 package.name.com

    Replace package.name.com with the actual package name that you want to uninstall from your Android system. This method is the easiest way to uninstall bloatware which comes inbuilt with the system that can not be uninstalled generally from the app menu. For example, if Facebook comes as a system app, and you want to remove it, execute the code in the following way:

    pm uninstall -k --user 0 com.facebook.katana

    ADB Shell dumpsys command

    adb shell dumpsys

    Using the dumpsys command, you can gather all the system data about your device’s hardware and software configuration. You can also use it to get information about your Android device’s specific elements, such as the battery, display, and battery stats.

    adb shell dumpsys display
    adb shell dumpsys battery
    adb shell dumpsys batterystats

    Changing the Pixel density using ADB Shell

    You can easily change the Pixel density of your Android device’s screen using adb shell wm density commands. In order to do that, you need to know the actual Pixel density of your device. Let’s take an example with the Galaxy S9 Plus. At first, you need to know the original resolution executing the adb shell dumpsys command.

    Following are the info about phone’s display, resolution, and density for Galaxy S9 Plus (after executing adb shell wm density):

    mDisplayInfos=
    PhysicalDisplayInfo{1440 x 2960, 60.000004 fps, density 3.5, 530.086 x 529.464 dpi

    If you want to set a lower resolution, you can check out the following examples (remember, the values may vary from device to device):

    for 1080p (FHD)

    adb shell wm size 1080x2220
    adb shell wm density 480

    for 720p (HD)

    adb shell wm size 720x1560
    adb shell wm density 350

    Depending on your device, you can set the values, whichever looks excellent for you.

    ADB Shell command to Send SMS screen

    With this ADB command, you can send a text message from your Android phone while connected to the computer:

    adb shell am start -a android.intent.action.SENDTO -d sms:CCXXXXXXXXXX --es sms_body "SMS BODY GOES HERE" --ez exit_on_sent true
    adb shell input keyevent 22
    adb shell input keyevent 66

    ADB Shell for screenshots

    Using this code, you can capture a screenshot on your Android phone and pull the snapped screen to your computer instantly:

    adb shell screencap /sdcard/screenshot.png

    Hit enter, and then:

    adb pull /sdcard/screenshot.png

    Screen recording on Android using ADB Shell command

    Android 4.4 Kitkat and above have a shell utility to record the screen and pull the video to the computer. Execute the following commands:

    adb shell screenrecord /sdcard/movie.mp4

    (Press Ctrl+C or Command+C to stop the recording)

    adb pull /sdcard/movie.mp4

    By default, the screen recording is limited to 3 minutes only. If you want to set a condition like clip duration, resolution in pixels, and video bitrate, you can use the following commands:

    adb shell screenrecord --size 1920x1080 /sdcard/movie.mp4

    I used a 1920x1080p resolution here for an example. You can change the value according to your needs.

    Next, use the following command to set the video duration:

    adb shell screenrecord --time-limit 120 /sdcard/movie.mp4

    Similarly, you can also set the bitrate of the video output. For example, I am setting the bitrate to 4MBPS. The code would be as follows:

    adb shell screenrecord --bit-rate 4000000 /sdcard/movie.mp4

    ADB Shell commands for copy, move & paste

    Execute the following command to copy and paste files/folders:

    adb shell

    and then enter the following:

    cp /sdcard/The_Shawshank_Redemption.mp4 /sdcard/Movies

    (Replace the source file and destination value as per your requirements.)

    Next, to move a file or a folder from one location to another, you can execute the following:

    mv /sdcard/The_Shawshank_Redemption.mp4 /sdcard/Movies

    (Replace the source file and destination value as per your requirements.)

    To move a file from one location to another with a new name, use the following:

    mv /sdcard/facebook.apk /sdcard/facebook-mod.apk

    ADB Shell KeyEvent commands (for advance users)

    Using the Shell KeyEvent commands, you can trigger certain functions perform by hardware buttons and UI options on your Android device. Execute these codes only if you know about tweaking VM heap to improve performance.

    adb shell input keyevent 3 // Home btn
    adb shell input keyevent 4 // Back btn
    adb shell input keyevent 5 // Call
    adb shell input keyevent 6 // End call
    adb shell input keyevent 26 // Turn Android device ON and OFF. It will toggle device to on/off status.
    adb shell input keyevent 27 // Camera
    adb shell input keyevent 64 // Open browser
    adb shell input keyevent 66 // Enter
    adb shell input keyevent 67 // Delete (backspace)
    adb shell input keyevent 207 // Contacts
    adb shell input keyevent 220 / 221 // Brightness down/up
    adb shell input keyevent 277 / 278 /279 // Cut/Copy/Paste

    Fastboot Commands list

    Here is the complete list of all the fastboot commands that you can execute using the command prompt or terminal while connecting the Android device to the PC with all required settings. Perform the following if you had fulfilled the prerequisites mentioned above:

    Fastboot commandsFunctions
    fastboot devicesExecuting this command will show you the list of Android devices connected to the PC on Fastboot Mode.
    Fastboot device
    fastboot oem unlockWith this code, you can unlock the Bootloader of your Android device (if OEM permits). There is a detailed guide for MediaTek users on our site: check out here! Or Browse bootloader unlocking guide for your device here!
    fastboot oem lockRelock the bootloader if you want to go back to stock position on your Android device
    fastboot reboot bootloaderReboot the device into Fastboot Mode again from the Fastboot Mode itself. (necessary sometimes while flashing some image files)
    Mi Fastboot
    fastboot flashThis is the most important command for Android enthusiasts. Using this command, you can flash anything to your Android, like an OTA ZIP or a TWRP Image.
    fastboot flash boot boot.imgUse to flash boot image on your Android. For example: flashing a Magisk Patched Boot image to root your phone.
    Fastboot reboot
    fastboot flash recovery recovery.imgUse to flash recovery images like TWRP on Android devices. Read more about flashing TWRP recovery here!
    fastboot boot filename.imgThis command is used to boot your device using a particular image file without flashing it. This can be useful for testing purposes before a permanent flash. Read mode!

    Anything left?

    So, that’s pretty much on our blog for fastboot, and ADB commands. If I missed anything, please do let me know in the comment section below. I hope this post is helpful for you to perform a plethora of commands using cmd or terminal. If you have any questions about ADB or fastboot controls, do let me know by dropping a comment below. I will reply you back as soon as possible.

    Like this post? Please do share the post link on social media to thank me 🙂

    Was this article helpful?
    YesNo
    Follow on Google News Follow on Facebook
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous Article5 Tips To Consider When Buying Components for Electronics on a Budget
    Next Article How to Unlock Bootloader on Xiaomi Poco F1 (POCOPHONE)
    Saeed Ashif Ahmed
    • Website
    • Facebook
    • X (Twitter)
    • LinkedIn

    Saeed Ashif Ahmed is passionate about emerging technologies and their potential to create a fairer world. A car enthusiast and civil engineer, he loves cricket and cherishes his alma mater, Navodaya Vidyalaya (JNV).

    Related Posts

    Top Educational Tablets – Why TalPad T100 is a Parent’s Choice
    Tips

    Top Educational Tablets – Why TalPad T100 is a Parent’s Choice

    April 16, 2025
    Making Jira Work Just For You: How Evelon Customizes Atlassian Tools
    Tips

    Making Jira Work Just For You: How Evelon Customizes Atlassian Tools

    April 10, 2025
    Proactive Coaching: Using Monitoring Data to Train Agents Preemptively
    News

    Proactive Coaching: Using Monitoring Data to Train Agents Preemptively

    March 14, 2025
    View 7 Comments

    7 Comments

    1. thebenthermit on November 24, 2020 4:00 am

      Good write up! I’m trying to remove knox restrictions. I’ve tried commands from other sites but command prompt wasn’t happy with the ones I’ve tried. Any help would be appreciated. This is on a Samsung SM-T350.

      Reply
    2. Scott Downey on January 24, 2021 3:49 pm

      ‘df -h’ commands you did not show.

      Reply
      • Saeed Ashif Ahmed on October 28, 2022 6:24 am

        Thanks for the suggestion. We will update it soon.

        Reply
    3. Chandrakant Kushwaha on July 26, 2021 3:01 pm

      I want to set the refresh rate on iqoo 7 legened alway on 90hz using adb shell

      Reply
    4. Doveman on March 22, 2023 5:47 am

      ADB and Fastboot are utilities that unlock access to the Android system while your phone is connected to a desktop computer via a USB cable. The computer and cable are integral to this—there’s no app version, and while you can use ADB wirelessly, it’s much more complicated to set up

      Reply
      • Saeed Ashif Ahmed on March 22, 2023 11:51 am

        You are absolutely right that these utilities are essential for unlocking access to the Android system, and that connecting your phone to a desktop computer via a USB cable is necessary for their use. While it is possible to use ADB wirelessly, the setup can be complex and may not be worth the effort for some users. I appreciate your insights on this topic and hope that my post has helped to clarify any questions you may have had about ADB and Fastboot.

        Reply
    5. RAJA on March 17, 2025 2:49 am

      This is such a useful resource! It’s great to have all the ADB and Fastboot commands compiled in one place. It really simplifies the process for those of us who aren’t as tech-savvy. Thanks for putting this together!

      Reply
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Top Posts
    MX Player Custom Codec [AC3, DTS, MLP, TrueHD, and more]

    MX Player Custom Codec [AC3, DTS, MLP, TrueHD, and more]

    January 4, 202593,780
    Do a Barrel Roll 20 Times on Google & other search games (2025)

    Do a Barrel Roll 20 Times on Google & other search games (2025)

    April 12, 202558,355
    47 best root apps for Android devices in 2025 (NEW LIST – Updated)

    47 best root apps for Android devices in 2025 (NEW LIST – Updated)

    April 16, 202526,396
    Stay In Touch
    • Facebook
    • Twitter
    • Instagram
    • Pinterest
    • Reddit
    • Telegram
    Latest Reviews
    Your dream Tablet just got cheaper: Galaxy Tab S9 Ultra sale
    9.5
    Deals

    Your dream Tablet just got cheaper: Galaxy Tab S9 Ultra sale

    Leisangthem RajshreeMarch 3, 2024
    Tixee Review – Honest opinion from a trader [Updated] Tips

    Tixee Review – Honest opinion from a trader [Updated]

    Saeed Ashif AhmedNovember 3, 2022

    Subscribe to Updates

    Join our most passionate readers to get instant access to tech tips as they arrive!

    Most Popular
    MX Player Custom Codec [AC3, DTS, MLP, TrueHD, and more]

    MX Player Custom Codec [AC3, DTS, MLP, TrueHD, and more]

    January 4, 202593,780
    Do a Barrel Roll 20 Times on Google & other search games (2025)

    Do a Barrel Roll 20 Times on Google & other search games (2025)

    April 12, 202558,355
    47 best root apps for Android devices in 2025 (NEW LIST – Updated)

    47 best root apps for Android devices in 2025 (NEW LIST – Updated)

    April 16, 202526,396
    Our Picks
    Best Dynamic Island Wallpapers for iPhone 16, 16 Pro and Pro Max

    Best Dynamic Island Wallpapers for iPhone 16, 16 Pro and Pro Max

    April 25, 2025
    47 best root apps for Android devices in 2025 (NEW LIST – Updated)

    47 best root apps for Android devices in 2025 (NEW LIST – Updated)

    April 16, 2025
    Do a Barrel Roll 20 Times on Google & other search games (2025)

    Do a Barrel Roll 20 Times on Google & other search games (2025)

    April 12, 2025

    Subscribe to Updates

    Join our most passionate readers to get instant access to tech tips as they arrive!

    Facebook X (Twitter) Instagram Pinterest
    • About Us
    • Privacy Policy
    • Terms
    • Jobs
    • Contact
    © 2025 Droidfeats. All rights reserved.

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.