ADB, Android Debug Bridge, is a command-line utility included with Google's Android SDK. ADB can control your device over ... adb help (list all commands)
MostCompleteADBCheatSheetMobileAutomationThenextarticlefromthemobiletestautomationserieswillbededicatedtotheADB.Allyouneedtotoknow-themostbasicoperationstothemostadvancedconfigurations.ADB,AndroidDebugBridge,isacommand-lineutilityincludedwithGoogle'sAndroidSDK.ADBcancontrolyourdeviceoverUSBfromacomputer,copyfilesbackandforth,installanduninstallapps,runshellcommands,andmore.Whileagowhenwewereworkingonthefirstversionofthe BELLATRIXtestautomationframework,IdidthisresearchwhileIwasworkingona similarfeaturesforoursolution.QuickNavigationADBBasicsPackageInstallationPathsFileOperationsPhoneInfoPackageInfoConfigureSettingsCommandsDeviceRelatedCommandsLogsPermissionsDownloadADBCheatSheetADBBasicsadbdevices(listsconnecteddevices)adbroot(restartsadbdwithrootpermissions)adbstart-server(startstheadbserver)adbkill-server(killstheadbserver)adbreboot(rebootsthedevice)adbdevices-l(listofdevicesbyproduct/model)adbshell(startsthebackroundterminal)exit(exitsthebackgroundterminal)adbhelp(listallcommands)adb-s(redirectcommandtospecificdevice)adb–d(directscommandtoonlyattachedUSBdevice)adb–e(directscommandtoonlyattachedemulator)PackageInstallationadbshellinstall(installapp)adbshellinstall(installappfromphonepath)adbshellinstall-r(installappfromphonepath)adbshelluninstall(removetheapp)Paths/data/data//databases(appdatabases)/data/data//shared_prefs/(sharedpreferences)/data/app(apkinstalledbyuser)/system/app(pre-installedAPKfiles)/mmt/asec(encryptedapps)(App2SD)/mmt/emmc(internalSDCard)/mmt/adcard(external/InternalSDCard)/mmt/adcard/external_sd(externalSDCard)adbshellls(listdirectorycontents)adbshellls-s(printsizeofeachfile)adbshellls-R(listsubdirectoriesrecursively)FileOperationsadbpush(copyfile/dirtodevice)adbpull(copyfile/dirfromdevice)run-ascat(accesstheprivatepackagefiles)PhoneInfoadbget-statе(printdevicestate)adbget-serialno(gettheserialnumber)adbshelldumpsysiphonesybinfo(gettheIMEI)adbshellnetstat(listTCPconnectivity)adbshellpwd(printcurrentworkingdirectory)adbshelldumpsysbattery(batterystatus)adbshellpmlistfeatures(listphonefeatures)adbshellservicelist(listallservices)adbshelldumpsysactivity/(activityinfo)adbshellps(printprocessstatus)adbshellwmsize(displaysthecurrentscreenresolution)dumpsyswindowwindows|grep-E'mCurrentFocus|mFocusedApp'(printcurrentapp'sopenedactivity)PackageInfoadbshelllistpackages(listpackagenames)adbshelllistpackages-r(listpackagename+pathtoapks)adbshelllistpackages-3(listthirdpartypackagenames)adbshelllistpackages-s(listonlysystempackages)adbshelllistpackages-u(listpackagenames+uninstalled)adbshelldumpsyspackagepackages(listinfoonallapps)adbshelldump(listinfoononepackage)adbshellpath(pathtotheapkfile)ConfigureSettingsCommandsadbshelldumpsysbatterysetlevel(changethelevelfrom0to100)adbshelldumpsysbatterysetstatus(changetheleveltounknown,charging,discharging,notchargingorfull)adbshelldumpsysbatteryreset(resetthebattery)adbshelldumpsysbatterysetusb(changethestatusofUSBconnection.ONorOFF)adbshellwmsizeWxH(setstheresolutiontoWxH)DeviceRelatedCommandsadbreboot-recovery(rebootdeviceintorecoverymode)adbrebootfastboot(rebootdeviceintorecoverymode)adbshellscreencap-p"/path/to/screenshot.png"(capturescreenshot)adbshellscreenrecord"/path/to/record.mp4"(recorddevicescreen)adbbackup-apk-all-fbackup.ab(backupsettingsandapps)adbbackup-apk-shared-all-fbackup.ab(backupsettings,appsandsharedstorage)adbbackup-apk-nosystem-all-fbackup.ab(backuponlynon-systemapps)adbrestorebackup.ab(restoreapreviousbackup)adbshellamstart|startservice|broadcast[]-ae.g.android.intent.action.VIEW-ce.g.android.intent.category.LAUNCHER(startactivityintent)adbshellamstart-aandroid.intent.action.VIEW-dURL (openURL)adbshellamstart-timage/*-aandroid.intent.action.VIEW(opensgallery)Logsadblogcat[options][filter][filter](viewdevicelog)adbbugreport(printbugreports)Permissionsadbshellpermissionsgroups(listpermissiongroupsdefinitions)adbshelllistpermissions-g-r(listpermissionsdetails)DownloadADBCheatSheetMobileSeriesMobileAutomationGettingStartedwithAppiumforAndroidC#onWindowsin10Minutes08/10/2018/ByAntonAngelovMobileAutomationGettingStartedwithAppiumforiOSC#in10Minutes20/11/2018/ByAntonAngelovMobileAutomationGettingStartedwithAppiumforAndroidC#onMacin10Minutes27/11/2018/ByAntonAngelovMobileAutomationDevelopADBShellCommandsLibraryAppiumC#27/08/2019/ByAntonAngelovFreeToolsExecuteAndroidAppiumTestsinDockerContainersUsingSelenoid15/07/2020/ByAntonAngelovCommercialToolsExecuteAppiumTestsintheCloud–pCloudy27/08/2020/ByAntonAngelovAbouttheauthorAntonAngelovCTOandCo-founderofAutomateThePlanetLtd,inventorofBELLATRIXTestAutomationFramework,authorof"DesignPatternsforHigh-QualityAutomatedTests:CleanCodeforBulletproofTests"inC#andJava.Nowadays,heleadsateamofpassionateengineershelpingcompaniessucceedwiththeirtestautomation.Additionally,heconsultscompaniesandleadsautomatedtestingtrainings,writesbooks,andgivesconferencetalks.
YoucanfindhimonLinkedIneveryday.CommentsareclosedResourcesMostCompleteNUnitUnitTestingFrameworkCheatSheetVB.NETMostcompleteNUnitUnitTestingFrameworkcheatsheet.Allyouneedtotoknow-themostbasicoperationstothemostadvancedconfigurations.DevelopmentResourcesVBNET.NETTopicsWebAutomationMobileAutomationDesktopAutomationAPIAutomationDesignAndArchitectureAutomationToolsEnterpriseTestFrameworkTestingPracticesSpecialEditionsFUNTestingStoriesJavaTopicsWebAutomationMobileAutomationDesktopAutomationDesignAndArchitectureTestingPracticesSpecialEditionsFUNTestingStoriesReviewsFreeToolsCommercialToolsLatestupdatesinyourInboxSubscribeJoinCommunityGroupBycontinuingtobrowse,youconsenttoouruseofcookies.Toknowmore,pleaserefertoourPrivacyPolicy.[Y]es,IagreePrivacyPolicyPrivacy&CookiesPolicyClosePrivacyOverviewThiswebsiteusescookiestoimproveyourexperiencewhileyounavigatethroughthewebsite.Outofthese,thecookiesthatarecategorizedasnecessaryarestoredonyourbrowserastheyareessentialfortheworkingofbasicfunctionalitiesofthewebsite.Wealsousethird-partycookiesthathelpusanalyzeandunderstandhowyouusethiswebsite.Thesecookieswillbestoredinyourbrowseronlywithyourconsent.Youalsohavetheoptiontoopt-outofthesecookies.Butoptingoutofsomeofthesecookiesmayaffectyourbrowsingexperience.NecessaryNecessaryAlwaysEnabledNecessarycookiesareabsolutelyessentialforthewebsitetofunctionproperly.Thiscategoryonlyincludescookiesthatensuresbasicfunctionalitiesandsecurityfeaturesofthewebsite.Thesecookiesdonotstoreanypersonalinformation.Non-necessaryNon-necessaryAnycookiesthatmaynotbeparticularlynecessaryforthewebsitetofunctionandisusedspecificallytocollectuserpersonaldataviaanalytics,ads,otherembeddedcontentsaretermedasnon-necessarycookies.Itismandatorytoprocureuserconsentpriortorunningthesecookiesonyourwebsite.SAVE&ACCEPTSubscribe*indicatesrequiredEmailAddress*NameSubscribeforJavaC#IagreetothePrivacyPolicyandtoreceivenewslettersandproductsnew.Youcanunsubscribeatanytimebyclickingthelinkinthefooterofouremails.Forinformationaboutourprivacypractices,pleasevisitourwebsite.YourPrivacyisprotected.x