ADB Shell Commands list
NoResult
ViewAllResult
Login
APPS
WALLPAPERS
[2160×2400]GooglePixel6seriesnewwallpapers–DownloadinHighresolution
OnePlus9Wallpapers[DownloadZIP]
iPhone12ProMaxWallpapers/Live(HQresolution)inZIP
DownloadGooglePixel5WallpapersandLiveWallpapersinZIP(1080×2280)
SamsungGalaxyS20FEWallpapersStockCollection[2400x2400pixels]
DownloadAsusROGPhone3Wallpapers–Gaming(2340×2340resolutions)
DownloadWWDC’20(iOS14+macOSBigSur)wallpapersin5Kresolution
[ZIP]DownloadGooglePixel4a(HQ)Wallpapers(Officialdesigns)
DownloadXiaomiBlackShark2ProStockWallpapers(1440×3120pixels)
TrendingTags
Wallpapers
#TheBest
GetGoogleCamera
USBDrivers
GetXposedFramework
GetMagisk
GetSuperSU
GetPlayStore
GetADBbinaries
GetYouTubeVanced
Themeengine
Commands
BloatwareHOT
USBDRIVERS
MAGISKROOT
APPS
WALLPAPERS
[2160×2400]GooglePixel6seriesnewwallpapers–DownloadinHighresolution
OnePlus9Wallpapers[DownloadZIP]
iPhone12ProMaxWallpapers/Live(HQresolution)inZIP
DownloadGooglePixel5WallpapersandLiveWallpapersinZIP(1080×2280)
SamsungGalaxyS20FEWallpapersStockCollection[2400x2400pixels]
DownloadAsusROGPhone3Wallpapers–Gaming(2340×2340resolutions)
DownloadWWDC’20(iOS14+macOSBigSur)wallpapersin5Kresolution
[ZIP]DownloadGooglePixel4a(HQ)Wallpapers(Officialdesigns)
DownloadXiaomiBlackShark2ProStockWallpapers(1440×3120pixels)
TrendingTags
Wallpapers
#TheBest
GetGoogleCamera
USBDrivers
GetXposedFramework
GetMagisk
GetSuperSU
GetPlayStore
GetADBbinaries
GetYouTubeVanced
Themeengine
Commands
BloatwareHOT
NoResult
ViewAllResult
NoResult
ViewAllResult
TableofallADB&FastbootCommandsforAndroid(Windows/Mac/Linux)
by
SaeedAshifAhmed
3
Inthisarticle,youwillfindthelistofallADBandFastbootCommandsforAndroiddevices.Youcanexecutethesecommandsonanycomputerregardlessofitsoperatingsystem (Windows,Mac,orLinux).Thecommandsareuniversal,whichmeansthesamecommandswillworkonanyAndroiddevice,regardlessofitsmanufacturerordevicevariant.
Androidenthusiasts,familiarwithunlockingbootloader,rooting,orinstallingacustomrecoveryontheirdevice,mustbewellawareofADBandfastboot.ThesearesystemutilitiesthatprovidebackendofAndroidwhenitisconnectedtoacomputer.
ADBorAndroidDebugBridgecanbeusedwhenanAndroidphoneisconnectedtoPCon fastbootorbootloadermode.TherearesomespecificcodesthatcanbeexecutedusingacomputertoperformafunctiononAndroiddevices.Mostly,peopleusefastboottounlockthebootloaderofaphone.Sometime,youmayneedtounbrickthedevice(incaseofahardbrick)usingfastboot.
MostofthefastbootandADBcommandsproducethesameresultsonanydeviceregardlessofthemanufacturerorvariant.Ifyouarestucksomewhere,whereyouneedfastboot/ADBcommandtoassist,thispostisforyou.Ihavelistedalltheimportantfastboot,andADBcommandsinthetablegivenbelow.Codes,alongwithitspropertyandfunctions,arealsoappropriatelymentioned.Use Ctrl+F tofindyourrequirement.
Contents
hide
1
Pre-requisite
2
ADBCommandslist
2.1
PushandPullfilesusingADB
3
ADBShellCommandslist
3.1
UninstallasystemappusingADB
3.2
ADBShelldumpsyscommand
3.3
ChangingthePixeldensityusingADBShell
3.4
ADBShellcommandtoSendSMSscreen
3.5
ADBShellforscreenshots
3.6
ScreenrecordingonAndroidusingADBShellcommand
3.7
ADBShellcommandsforcopy,move&paste
3.8
ADBShellKeyEventcommands(foradvanceusers)
4
FastbootCommandslist
5
Anythingleft?
Pre-requisite
Beforegoingtothefastboot&ADBcommands,youneedcertaintoolsandsettingstobeenabledonyourdeviceaswellasthecomputer.Otherwise,youcannotmakeuseofthefastbootorADBcommands.Thetoolsareneededtobeinstalledonthecomputer.Ontheotherhand,thenecessarysettingsaretobemadeonthephone.
MethodsarethesameforallAndroidsmartphones.So,don’tworryabouttheOEMorvariant.Considerthefollowingcheckpoints:
Youneedto enableUSBDebuggingmode toconnectyourAndroidphonetocomputer. (Settings>AboutPhone>Buildnumber>Tapit7timestobecomedeveloper;Settings>DeveloperOptions>USBDebugging).DownloadAndroidSDKPlatformTools(ADB&Fastboot)Macusers:SetupADBonMac(usingHomebrew)USBCable:Preferably,theoneprovidedbythemanufacturer.Optional:Download&InstallAndroidUSBDriveronyourcomputer.
ADBCommandslist
HereisthecompletelistofalltheADBcommandsthatyoucanexecuteusingthecommandpromptorterminalwhileconnectingtheAndroiddevicetothePCwithallrequiredsettings.Performthefollowingifyouhadfulfilledtheprerequisitesmentionedabove:
adbhelpDisplaysthehelpdocumentationonADBcommandsadbdevicesListofallAndroiddevicesthatarecorrectlyconnectedtothePCviaADBadbusbItwillshowyoualltheconnectedAndroiddeviceorEmulatorsconnectedtoyourPCusingUSBadbrebootRestartyourAndroidtosystemadbrebootbootloaderRebootyourdeviceintofastbootorbootloadermodeadbrecoveryGetyourAndroidintorecoverymodeadbsideloadota-update.zipUsedtomanuallyinstallOTAupdatesusingrecoverymode(whentheZIPfileisonthecomputer,notinmobile).Readmoreaboutithere!adbinstallInstallAPKfilesmanuallyonyourAndroidusingADBadbinstallfilename.apkInstallAPK(replacingthefilenamewiththeparticularAPKfilename)adbinstall-rfilename.apkRe-installorupdateanAPKtoanewerversiononAndroidusingADBadbinstall-sfilename.apkInstallAPKintheexternalSDCard(ifsupportedbytheapplication)adbuninstallUninstallanyappusingADBcommand(seenext)adbuninstallcom.tencent.igUninstallPUBGapppackage(replacepackagenamewithyourdesiredone)adbuninstall-kcom.tencent.igUninstalltheappkeepingthedataandcacheuntouchedadbjdwpFulllistofJDWP(JavaDebugWireProtocol)processesontheAndroidadbbugreportCheckthenthedumpsys,dumpstateandlogcatdataadblogcatDisplayfulllogdataonthescreenadbget-serialnoItdisplaystheADBinstanceserialnumberstringassociatedwiththedeviceadbwait-for-deviceItisusedtoprogramthedevicetowaitforsometimeuntilanotherprocessisdoneadbget-stateShowsthedevicestatusinthecommandpromptorterminaladbstart-serverStartstheADBserverprocessadbkill-serverTerminatetheADBserverprocessadbbackup//Usingthiscommand,youcancreateafullbackupofyourAndroiddeviceandsaveittothecomputeradbrestore//Usethiscommandtorestorethebackupadbconnectip_address_of_deviceUsingthiscommand,youcanconnecttheIPaddressofyourAndroiddevicetothecomputer.RemembertochangetheIPaddressinthecode.
PushandPullfilesusingADB
Pushandpullsareusedtotransferanyfilesfromthedevicetothecomputerorviceversa.TopullafilefromtheAndroiddevicetothecomputer,youneedtoprovidethefullpathofthefile.YoucanusethefollowingADBcommand:
adbpull
Youneedtochangethefilenamewithanextension.Forexample,wearepullingafilecalled“CartoonHD.apk“.Youneedtoexecutethecommandinthefollowingway:
adbpull/system/app/CartoonHD.apk
Ontheotherhand,whilepushingfilesfromcomputertoAndroidusingADB,youcanexecutethefollowingcommand:
adbpush
Sameasbefore,youneedtoprovidethefullpathwithextensionandthedestinationpathaswell.Checkouttheexamplebelow:
adbpush/local/path/CartoonHD.apk/sdcard/apps/
ADBShellCommandslist
HereisthecompletelistofalltheADBShellcommandsthatyoucanexecuteusingthecommandpromptorterminalwhileconnectingtheAndroiddevicetothePCwithallrequiredsettings.
ADBShellCommandsFunctionsadbshellStartstheremoteshellcommandconsoleinthedeviceandletsyoucontroltheAndroidthroughitadbshellwmdensityUseittochangethepixeldensityofyourAndroiddevice(detailsgivenbelow)adbshellpmlistpackagesShowsalltheinstalledappspackagenameonyourAndroidadbshellpmlistpackages-sShowsthelistofallthesystemappsinstalledonyourAndroidwiththepackagenameadbshellpmlistpackages-3Listofallthe3rdpartyappsinstalledonyourAndroidadbshellpmlistpackages-dDisabledappslistonyourAndroidadbshellpmlistpackages-eEnabled(active)appslistonyourAndroidwithpackagenamesadbshellpmlistpackages-uListofalltheappsthatyouuninstalledfromyourAndroidwithinstalledpagesadbshellHitenterandexecutethefollowing:cd/systemThesecommandschangethedirectoryto/systemadbshellHitenterandexecutethefollowing:rm-f/sdcard/whatsapp.apkDeleteafile:replacewhatsapp.apktoyourdesiredfilenamewithextensionadbshellHitenterandexecutethefollowing:rm-d/sdcard/DCIMDelateafolder:replaceDCIMtoyourdesiredfoldernameadbshellHitenterandexecutethefollowing:mkdir/sdcard/Folder1Createanewfolder“Folder1”under/sdcardadbshellHitenterandexecutethefollowing:netstatCheckthenetworkstaticsonyourAndroiddeviceusingADBadbshellHitenterandexecutethefollowing:ip-finetaddrshowwlan0Showsthedevice’sWi-FiIPaddressadbshellHitenterandexecutethefollowing:topUsethisCoetomonitortherunningCPUprocessonyourAndroiddeviceadbshellHitenterandexecutethefollowing:getpropro.build.version.sdkGetthepropertyofAndroid’sbuild.propconfigurationadbshellHitenterandexecutethefollowing:setpropnet.dns11.2.3.4Usetosetthevaluesofbuilt.propconfigurationandchangetheproperties
UninstallasystemappusingADB
IfyouwanttouninstallasystemappviaADBShellcommand,youcanexecutethefollowingcode:
adbshellpmuninstall-k–user0package.name.com
Replacepackage.name.comwiththeactualpackagenamethatyouwanttouninstallfromyourAndroidsystem.Thismethodistheeasiestwaytouninstallbloatwarewhichcomesinbuiltwiththesystemthatcannotbeuninstalledgenerallyfromtheappmenu.Forexample,ifFacebookcomesasasystemapp,andyouwanttoremoveit,executethecodeinthefollowingway:
pmuninstall-k--user0com.facebook.katana
ADBShelldumpsyscommand
adbshelldumpsys
Usingthedumpsyscommand,youcangatherallthesystemdataaboutyourdevice’shardwareandsoftwareconfiguration.YoucanalsouseittogetinformationaboutyourAndroiddevice’sspecificelements,suchasthebattery,display,andbatterystats.
adbshelldumpsysdisplay
adbshelldumpsysbattery
adbshelldumpsysbatterystats
ChangingthePixeldensityusingADBShell
YoucaneasilychangethePixeldensityofyourAndroiddevice’sscreenusingadbshellwmdensitycommands.Inordertodothat,youneedtoknowtheactualPixeldensityofyourdevice.Let’stakeanexamplewiththeGalaxyS9Plus.Atfirst,youneedtoknowtheoriginalresolutionexecutingtheadbshelldumpsyscommand.
Followingaretheinfoaboutphone’sdisplay,resolution,anddensityforGalaxyS9Plus(afterexecutingadbshellwmdensity):
mDisplayInfos=
PhysicalDisplayInfo{1440x2960,60.000004fps,density3.5,530.086x529.464dpi
Ifyouwanttosetalowerresolution,youcancheckoutthefollowingexamples(remember,thevaluesmayvaryfromdevicetodevice):
for1080p(FHD)
adbshellwmsize1080x2220
adbshellwmdensity480
for720p(HD)
adbshellwmsize720x1560
adbshellwmdensity350
Dependingonyourdevice,youcansetthevalues,whicheverlooksexcellentforyou.
ADBShellcommandtoSendSMSscreen
WiththisADBcommand,youcansendatextmessagefromyourAndroidphonewhileconnectedtothecomputer:
adbshellamstart-aandroid.intent.action.SENDTO-dsms:CCXXXXXXXXXX--essms_body"SMSBODYGOESHERE"--ezexit_on_senttrue
adbshellinputkeyevent22
adbshellinputkeyevent66
ADBShellforscreenshots
Usingthiscode,youcancaptureascreenshotonyourAndroidphoneandpullthesnappedscreentoyourcomputerinstantly:
adbshellscreencap/sdcard/screenshot.png
Hitenter,andthen:
adbpull/sdcard/screenshot.png
ScreenrecordingonAndroidusingADBShellcommand
Android4.4Kitkatandabovehaveashellutilitytorecordthescreenandpullthevideotothecomputer.Executethefollowingcommands:
adbshellscreenrecord/sdcard/movie.mp4
(PressCtrl+CorCommand+Ctostoptherecording)
adbpull/sdcard/movie.mp4
Bydefault,thescreenrecordingislimitedto3minutesonly.Ifyouwanttosetaconditionlikeclipduration,resolutioninpixels,andvideobitrate,youcanusethefollowingcommands:
adbshellscreenrecord--size1920x1080/sdcard/movie.mp4
Iuseda1920x1080presolutionhereforanexample.Youcanchangethevalueaccordingtoyourneeds.
Next,usethefollowingcommandtosetthevideoduration:
adbshellscreenrecord--time-limit120/sdcard/movie.mp4
Similarly,youcanalsosetthebitrateofthevideooutput.Forexample,Iamsettingthebitrateto4MBPS.Thecodewouldbeasfollows:
adbshellscreenrecord--bit-rate4000000/sdcard/movie.mp4
ADBShellcommandsforcopy,move&paste
Executethefollowingcommandtocopyandpastefiles/folders:
adbshell
andthenenterthefollowing:
cp/sdcard/The_Shawshank_Redemption.mp4/sdcard/Movies
(Replacethesourcefileanddestinationvalueasperyourrequirements.)
Next,tomoveafileorafolderfromonelocationtoanother,youcanexecutethefollowing:
mv/sdcard/The_Shawshank_Redemption.mp4/sdcard/Movies
(Replacethesourcefileanddestinationvalueasperyourrequirements.)
Tomoveafilefromonelocationtoanotherwithanewname,usethefollowing:
mv/sdcard/facebook.apk/sdcard/facebook-mod.apk
ADBShellKeyEventcommands(foradvanceusers)
UsingtheShellKeyEventcommands,youcantriggercertainfunctionsperformbyhardwarebuttonsandUIoptionsonyourAndroiddevice.ExecutethesecodesonlyifyouknowabouttweakingVMheaptoimproveperformance.
adbshellinputkeyevent3//Homebtn
adbshellinputkeyevent4//Backbtn
adbshellinputkeyevent5//Call
adbshellinputkeyevent6//Endcall
adbshellinputkeyevent26//TurnAndroiddeviceONandOFF.Itwilltoggledevicetoon/offstatus.
adbshellinputkeyevent27//Camera
adbshellinputkeyevent64//Openbrowser
adbshellinputkeyevent66//Enter
adbshellinputkeyevent67//Delete(backspace)
adbshellinputkeyevent207//Contacts
adbshellinputkeyevent220/221//Brightnessdown/up
adbshellinputkeyevent277/278/279//Cut/Copy/Paste
FastbootCommandslist
HereisthecompletelistofallthefastbootcommandsthatyoucanexecuteusingthecommandpromptorterminalwhileconnectingtheAndroiddevicetothePCwithallrequiredsettings.Performthefollowingifyouhadfulfilledtheprerequisitesmentionedabove:
FastbootcommandsFunctionsfastbootdevicesExecutingthiscommandwillshowyouthelistofAndroiddevicesconnectedtothePConFastbootMode.fastbootoemunlockWiththiscode,youcanunlocktheBootloaderofyourAndroiddevice(ifOEMpermits).ThereisadetailedguideforMediaTekusersonoursite:checkouthere!OrBrowsebootloaderunlockingguideforyourdevicehere!fastbootoemlockRelockthebootloaderifyouwanttogobacktostockpositiononyourAndroiddevicefastbootrebootbootloaderRebootthedeviceintoFastbootModeagainfromtheFastbootModeitself.(necessarysometimeswhileflashingsomeimagefiles)fastbootflashThisisthemostimportantcommandforAndroidenthusiasts.Usingthiscommand,youcanflashanythingtoyourAndroid,likeanOTAZIPoraTWRPImage.fastbootflashbootboot.imgUsetoflashbootimageonyourAndroid.Forexample:flashingaMagiskPatchedBootimagetorootyourphone.fastbootflashrecoveryrecovery.imgUsetoflashrecoveryimageslikeTWRPonAndroiddevices.ReadmoreaboutflashingTWRPrecoveryhere!fastbootbootfilename.imgThiscommandisusedtobootyourdeviceusingaparticularimagefilewithoutflashingit.Thiscanbeusefulfortestingpurposesbeforeapermanentflash.Readmode!
Anythingleft?
So,that’sprettymuchonourblogforfastboot,andADBcommands.IfImissedanything,pleasedoletmeknowinthecommentsectionbelow.Ihopethispostishelpfulforyoutoperformaplethoraofcommandsusingcmdorterminal.IfyouhaveanyquestionsaboutADBorfastbootcontrols,doletmeknowbydroppingacommentbelow.Iwillreplyyoubackassoonaspossible.
Likethispost?Pleasedosharethepostlinkonsocialmediatothankme🙂
ShareTweetPin2Share
PreviousPost
RoyalPandacasino:theappandthegames[download]
NextPost
VeePN:Quickreview;shouldyoubuythisnewVPNservicein2020?
SaeedAshifAhmed
SaeedAshifAhmedisaBloggerwhohasakeeninterestinhowemergingtechnologycanhelptheworldbecomeamorejust,equitable,andkindplace.HeenjoysinterviewingCEOsoftechstartupsaskingthemwhattheyaredoingtobringgreateropportunityandequitytooursociety.
RelatedPosts
Tips
HowToConvertWorkLaptopToPersonal
April18,2022
Tips
Abuyer’sguideforthebestphoneskinsathand
April8,2022
Tips
[FIXED]Message+KeepsStopping(VerizonMessages)issue,Howtofixitquickly?
April8,2022
Tips
HowdoIsetupaVPNonmyAndroid/iOS?
April5,2022
Tips
EasymethodstorecoverlostdatafromSDcard(5besttoolsin2022)
March31,2022
Tips
BestUSBHubforGaming:WhattoLookForandHowtoChoose
March30,2022
NextPost
VeePN:Quickreview;shouldyoubuythisnewVPNservicein2020?
The6bestfeaturesofwatchOS7(WWDC2020)
FacebookAvatar:howtocreatecustomstickersbasedonyourappearanceandsetthemasaprofilepicture
UserManual:realmesupport(allsolutionsarehere)
Comments3
thebenthermitsays:
1yearago
Goodwriteup!I’mtryingtoremoveknoxrestrictions.I’vetriedcommandsfromothersitesbutcommandpromptwasn’thappywiththeonesI’vetried.Anyhelpwouldbeappreciated.ThisisonaSamsungSM-T350.
Reply
ScottDowneysays:
1yearago
‘df-h’commandsyoudidnotshow.
Reply
ChandrakantKushwahasays:
9monthsago
Iwanttosettherefreshrateoniqoo7legenedalwayon90hzusingadbshell
Reply
LeaveaReplyCancelreplyYouremailaddresswillnotbepublished.Requiredfieldsaremarked*Comment*Name*
Email*
Website
Savemyname,email,andwebsiteinthisbrowserforthenexttimeIcomment.
PrivacyPolicyAgreement*
IagreetotheTerms&ConditionsandPrivacyPolicy.
Δ
ThissiteusesAkismettoreducespam.Learnhowyourcommentdataisprocessed.
NoResult
ViewAllResult
RecommendedStories
HowToConvertWorkLaptopToPersonal
April18,2022
Abuyer’sguideforthebestphoneskinsathand
April8,2022
[FIXED]Message+KeepsStopping(VerizonMessages)issue,Howtofixitquickly?
April8,2022
DroidfeatsbringsyouthebesttutorialsandtipsforAndroidfirmware,tools,mods,themes,roots,andotherhacks. Disclaimer:DroidFeats.comisn’taffiliatedwitheitherAndroidorGoogleinanyway! LEARNMORE»
Tips
HowToConvertWorkLaptopToPersonal
Abuyer’sguideforthebestphoneskinsathand
[FIXED]Message+KeepsStopping(VerizonMessages)issue,Howtofixitquickly?
HowdoIsetupaVPNonmyAndroid/iOS?
PopularApps
DownloadYouTubeVancedAPKV15.05.54(withGuide)
SolitaireGold:Thebestsolitairegameinthemarket
HowtodeviseawinningfantasycricketstrategyonHowzat
HowtheJokercansaveyourgameinRummy
NoResult
ViewAllResult
WallpaperGallery
Advertise
Aboutus!
PrivacyPolicy
Terms&Conditions
Contact
©2017–2022|AllRightsReserved
NoResult
ViewAllResult
Aboutus!
Advertise
Contact
Home
Job
PrivacyPolicy
Terms&Conditions
©2017–2022|AllRightsReserved
WelcomeBack!Logintoyouraccountbelow
RememberMe
ForgottenPassword?
Retrieveyourpassword
Pleaseenteryourusernameoremailaddresstoresetyourpassword.
LogIn
Thiswebsiteusescookies.Bycontinuingtousethiswebsiteyouaregivingconsenttocookiesbeingused.VisitourPrivacyandCookiePolicy.IAgree