Package: adb-enhanced
LogoADB-Enhanced is a Swiss-army knife for Android testing and development.A command-line interface to trigger various scenarios like screen
rotation, battery saver mode, data saver mode, doze mode, permission
grant/revocation. Its a wrapper aroundadband not a replacement.Release announcementSeeRelease
announcementInstallationRecommendedsudo pip3 installadb-enhancedAlternative on Mac OS via Homebrewbrew installadb-enhancedNotesudo pip installadb-enhancedfor Python2 based install works as
well but, I would recommend moving to python3 since I will deprecate
Python2 support anytime after Dec 31, 2018.If you don’t have sudo access or you are installing without sudo thenadbemight not be configured correctly in the path.To setup bash/z-sh auto-completion, executesudo pip3 installinfi.docopt-completion&&docopt-completion$(which adbe)after installing adb-enhanced.ExamplesDevice configurationTurn doze mode onadbe doze onTurn mobile-data offadbemobile-dataoffTurn on battery saveradbe battery saver onDon’t keep activities in the backgroundadbedont-keep-activitiesonTake a screenshotadbe screenshot ~/Downloads/screenshot1.pngTake a videoadbe screenrecord video.mp4 # Press ^C when finishedTurn Wireless Debug mode onadbe enable wireless debuggingPermissionsGrant storage-related runtime permissionsadbe permissions grant com.example storageRevoke storage-related runtime permissionsadbe permissions revoke com.example storageInteracting with appStart an appadbe start com.exampleKill an appadbeforce-stopcom.exampleClear app data - equivalent of uninstall and reinstalladbeclear-datacom.examplels/cat/rm any file without worrying about adding “run-as” or “su
root”adbe ls /data/data/com.example/databases# Works as long as
com.example is a debuggable package or shell has the root permission
or directory has been made publicly accessibleDevice infoDetailed device info including model name, Android API version etc,
device serial$adbedevicesUnlockDevice"dcc54112"andgiveUSBdebuggingaccesstothisPC/Laptopbyunlockingandreconnectingthedevice.Moreinfoaboutthisdevice:"unauthorized usb:339869696X transport_id:17"SerialID:dcc54111Manufacturer:OnePlusModel:ONEPLUSA5000(OnePlus5T)Release:8.1.0SDKversion:27CPU:arm64-v8aSerialID:emulator-5554Manufacturer:unknownModel:AndroidSDKbuiltforx86Release:4.4.2SDKversion:19CPU:x86App infoDetailed information about app version, target SDK version,
permissions (requested, granted, denied), installer package name,
etc.$adbeappinfocom.google.android.youtubeAppname:com.google.android.youtubeVersion:12.17.41VersionCode:121741370Isdebuggable:FalseMinSDKversion:21TargetSDKversion:26Permissions:Installtimegrantedpermissions:com.google.android.c2dm.permission.RECEIVEandroid.permission.USE_CREDENTIALScom.google.android.providers.gsf.permission.READ_GSERVICEScom.google.android.youtube.permission.C2D_MESSAGEandroid.permission.MANAGE_ACCOUNTSandroid.permission.SYSTEM_ALERT_WINDOWandroid.permission.NFCandroid.permission.CHANGE_NETWORK_STATEandroid.permission.RECEIVE_BOOT_COMPLETEDcom.google.android.gms.permission.AD_ID_NOTIFICATIONandroid.permission.INTERNETandroid.permission.GET_PACKAGE_SIZEandroid.permission.ACCESS_NETWORK_STATEandroid.permission.VIBRATEandroid.permission.ACCESS_WIFI_STATEandroid.permission.WAKE_LOCKRuntimePermissionsnotgrantedandnotyetrequested:android.permission.WRITE_EXTERNAL_STORAGEandroid.permission.MANAGE_DOCUMENTSandroid.permission.GET_ACCOUNTSandroid.permission.CAMERAandroid.permission.RECORD_AUDIOandroid.permission.READ_CONTACTSandroid.permission.ACCESS_FINE_LOCATIONandroid.permission.ACCESS_COARSE_LOCATIONandroid.permission.READ_PHONE_STATEandroid.permission.SEND_SMSandroid.permission.RECEIVE_SMScom.sec.android.provider.badge.permission.READcom.sec.android.provider.badge.permission.WRITEcom.htc.launcher.permission.READ_SETTINGScom.htc.launcher.permission.UPDATE_SHORTCUTcom.sonyericsson.home.permission.BROADCAST_BADGEcom.sonymobile.home.permission.PROVIDER_INSERT_BADGEandroid.permission.READ_EXTERNAL_STORAGEInstallerpackagename:NoneApp backup to a tar file unlike the Android-specific .ab format$adbeappbackupcom.google.android.youtubebackup.taryoumighthavetoconfirmthebackupmanuallyonyourdevice'sscreen,enter"00"aspassword...Successfullybackedupdataofappcom.google.android.youtubetobackup.tarUsageadbe[options]airplane(on|off)adbe[options]alarm(all|top|pending|history)adbe[options]animations(on|off)adbe[options]appbackup<app_name>[<backup_tar_file_path>]adbe[options]appinfo<app_name>adbe[options]apppath<app_name>adbe[options]appsignature<app_name>adbe[options]appslist(all|system|third-party|debug|backup-enabled)adbe[options]batterylevel<percentage>adbe[options]batteryresetadbe[options]batterysaver(on|off)adbe[options]cat<file_path>adbe[options]clear-data<app_name>adbe[options]darkmode(on|off)adbe[options]devicesadbe[options](enable|disable)wirelessdebuggingadbe[options]dont-keep-activities(on|off)adbe[options]doze(on|off)adbe[options]dump-ui<xml_file>adbe[options]force-stop<app_name>adbe[options]gfx(on|off|lines)adbe[options]input-text<text>adbe[options]install<file_path>adbe[options]jank<app_name>adbe[options]layout(on|off)adbe[options]location(on|off)adbe[options]ls[-a][-l][-R|-r]<file_path>adbe[options]mobile-data(on|off)adbe[options]mobile-datasaver(on|off)adbe[options]mv[-f]<src_path><dest_path>adbe[options]notificationslistadbe[options]open-url<url>adbe[options]overdraw(on|off|deut)adbe[options]permission-groupslistalladbe[options]permissions(grant|revoke)<app_name>(calendar|camera|contacts|location|microphone|notifications|phone|sensors|sms|storage)adbe[options]permissionslist(all|dangerous)adbe[options]pressbackadbe[options]pull[-a]<file_path_on_android>adbe[options]pull[-a]<file_path_on_android><file_path_on_machine>adbe[options]push<file_path_on_machine><file_path_on_android>adbe[options]restart<app_name>adbe[options]restrict-background(true|false)<app_name>adbe[options]rm[-f][-R|-r]<file_path>adbe[options]rotate(landscape|portrait|left|right)adbe[options]rtl(on|off)adbe[options]screen(on|off|toggle)adbe[options]screenrecord<filename.mp4>adbe[options]screenshot<filename.png>adbe[options]show-taps(on|off)adbe[options]standby-bucketget<app_name>adbe[options]standby-bucketset<app_name>(active|working_set|frequent|rare)adbe[options]start<app_name>adbe[options]stay-awake-while-charging(on|off)adbe[options]stop<app_name>adbe[options]top-activityadbe[options]uninstall[--first-user]<app_name>adbe[options]wifi(on|off)Options-e,--emulatordirectsthecommandtotheonlyrunningemulator-d,--devicedirectsthecommandtotheonlyconnected"USB"device-s,--serialSERIALdirectsthecommandtothedeviceoremulatorwiththegivenserialnumberorqualifier.OverridesANDROID_SERIALenvironmentvariable.-lForlonglistformat,onlyvalidfor"ls"command-RForrecursivedirectorylisting,onlyvalidfor"ls"and"rm"command-rFordeletefile,onlyvalidfor"ls"and"rm"command-fForforceddeletionofafile,onlyvalidfor"rm"command-v,--verboseVerbosemodePython3 migration timelineNov 27, 2017 - Code is Python3 compatibleJan 18, 2018 - pip (python package manager) has the updated version
which is Python3 compatibleNov 15, 2018 - Python2 based installation discouraged. Python3 is
recommended.Dec 31, 2018 - Python2 will not be officially supported after Dec 31,
2018.May 7, 2020 - Python2 no longer works with the current master branchTestingmakelintmaketestRelease a new buildA new build can be released using`release/release.py<https://github.com/ashishb/adb-enhanced/blob/master/release/release.py>`__
script. Build a test release viamake release_debug. Build a
production release viamake release_productionUpdating docs for ReadTheDocsmakedocumentationNote that this happens automatically duringmake release_production.You will have to dobrew install pandocif you are missing pandoc.Note: The inspiration of this project came fromandroid-scripts.ContributorsGitHub contributors