How to Install and Use ADB, the Android Debug Bridge Utility

文章推薦指數: 80 %
投票人數:10人

ADB, Android Debug Bridge, is a command-line utility included with Google's Android SDK. ADB can control your device over USB from a ... Skiptocontent Windows» iPhone» Android» Mac» SmartHome» Office» Security» Linux» AboutUs ContactUs GeekTalk TakeScreenshotonWindowsMountanISOimageinWindowsWhatIssvchost.exe?BootIntoSafeModeWheretoDownloadWindowsLegallyFindYourLostProductKeysCleanInstallWindows10theEasyWayEnableWindowsAdministratorAccountFindYourWi-FiPasswordUseWindows10WithoutProductKeyBestAntivirusforWindows10ElectronicallySignPDFsUsetheLinuxBashShellonWindowsEditYourHostsFileSeeWho'sConnectedtoYourWi-FiOpenHEICFilesonWindowsWhat'stheDifferenceBetweenGPTandMBRStopWindowsFromDownloadingUpdatesUseSystemRestoreonWindowsFindtheBestWi-FiChannelAddCheckBoxestoWordDocumentsBrowseAllWindowsArticles|BrowseBuyingGuidesFindDownloadedFilesonaniPhoneDetectHiddenSurveillanceCamerasMoveGoogleAuthenticatortoaNewPhoneUseYouriPhoneasaWebcamHidePrivatePhotosoniPhoneUseFaceTimeonAndroidRemoveActivationLockonaniPhoneConvertHEICPhotostoJPGoniPhoneSetaGIFasWallpaperoniPhoneEnableDarkModeonyouriPhoneiPhoneoriPadScreenWon'tRotateFixCrashingAppsoniPhoneTakeScreenshotbyTappingBackofiPhonePairTwoSetsofAirPodsWiththeSameiPhoneDownloadFilesUsingSafarionYouriPhoneLatestVersionofiOSandiPadOSForceYourAppleWatchtoSyncPairAirPodswithAnyDeviceHideanApponYouriPhoneChangeYourAppleIDEmailAddressWhatIsSignal?BrowseAlliPhoneArticles|BrowseBuyingGuidesFindYourWi-FiPasswordFreeUpDiskSpaceonYourMacFindtheBestWi-FiChannelCreateBootableUSBDrivesRemoveaPDFPasswordWhattoDoWhenYourMacWon'tTurnOnRunWindowsSoftwareonMacStreamFromVLCtoChromecastWritetoNTFSDrivesonaMacTurnYourComputerIntoaDLNAMediaServer3WaystoRemotelyConnecttoMacTurnYourMacIntoaWi-FiHotspotUseYouriPhoneasaWebcamChangeYourAppleIDEmailAddressPContheFloorFreelyMovePicturesinWordCutandPasteFilesonMacDownloadandInstallOlderVersionsofmacOSWhatAreAAEFilesfromaniPhone?CanYouPlayGamesonanAppleSiliconM1Mac?CanIUseiCloudDriveforTimeMachineBackups?BrowseAllMacArticles|BrowseBuyingGuidesFindYourWi-FiPasswordElectronicallySignPDFsUsetheLinuxBashShellonWindowsOpenHEICFilesonWindowsFindtheBestWi-FiChannelBackUpTextMessagestoGmailStreamFromVLCtoChromecastHideFacebookMessengerStatusManageAppPermissionsonAndroidDetectHiddenSurveillanceCamerasMoveGoogleAuthenticatortoaNewPhoneScantoPDFonAndroidFindYourLostAndroidPhoneUseFaceTimeonAndroidSetDefaultAppsonAndroidDisableAndroidAppUpdatesSideloadAppsonFireTabletTweakAndroid'sQuickSettingsHowtoCloseAppsonanAndroidDeviceWhatIsSignal?SideloadAppsonAndroidBrowseAllAndroidArticles|BrowseBuyingGuidesSeeWho'sConnectedtoYourWi-FiFindtheBestWi-FiChannelMonitorYourInternetBandwidthUsageWhyisMyEchoBlinkingSetUpaNASDriveDifferenceBetweentheEchoandEchoDotControlAllYourSmartHomeDevicesinOneAppBestLEDStripLightsBestSmartLightBulbsUseHandGestureswithGoogleNestHubScheduleaSmartPlugwithAlexaConnectAlexatoWi-FiBestRobotVacuumsPlayGamesonaGoogleNestHubGoogleAssistantGoodMorningRoutineEveMotionBlindsBestSmartHomeGifts7AlexaSkillstoMakeYourLifeEasierCanPowerCompaniesRemotelyAdjustYourSmartThermostat?GoogleHomeLawsuitGoogleScheduledActionsGivingPeopleNightmaresBrowseAllSmartHomeArticles|BrowseBuyingGuidesFindYourLostProductKeysAddCheckBoxestoWordDocumentsInsertHorizontalLinesInWordWindows10DarkModeAwesomeGeekyComputerPranksCustomizetheTaskbarinWindows10WhatIsctfmon.exe?ConvertaRowtoaColumnHighlightaRowUsingConditionalFormattingUseMultipleHeadersandFootersComputerSecurityTipsMakeWindowsShowFileExtensionsAddaDrop-DownListtoaWordDocumentNumberorLabelEquationsinWordHowtoAddaWordorPhrasetoAndroid'sAutoOfficeSecurityUpdatesStartExcelfromtheCommandPromptCountColoredCellsinExcelDeleteAllNotesatOnceinPowerPointLockCellsinExceltoPreventEditingRemoveSectionandPageBreaksinWordBrowseAllMicrosoftOfficeArticles|BrowseBuyingGuidesWhatIssvchost.exe?CleanInstallWindows10theEasyWayFindYourWi-FiPasswordUseWindows10WithoutProductKeyBestAntivirusforWindows10SeeWho'sConnectedtoYourWi-FiHideorPasswordProtectaFolderinWindowsRemoveaPDFPasswordSetUpYourOwnHomeVPNServerDisableCortanainWindows10AccessYourRouterIfYouForgetthePasswordFixaStuckWindowsUpdateWritetoNTFSDrivesonaMacMirroriPhoneoriPadtoWindowsManageAppPermissionsonAndroidDetectHiddenSurveillanceCamerasHideSteamGamesYou'rePlayingRestoreChromeTabsRemoveActivationLockonaniPhoneKickPeopleOffYourWi-FiManageSavedPasswordsinChromeBrowseAllPrivacyandSecurityArticles|BrowseBuyingGuidesElectronicallySignPDFsUsetheLinuxBashShellonWindowsEditYourHostsFileWhat'stheDifferenceBetweenGPTandMBRFindtheBestWi-FiChannelCreateBootableUSBDrivesRemoveaPDFPasswordAccessYourLinuxPartitionsFromWindowsRunWindowsSoftwareonMacSetUpYourOwnHomeVPNServerWindowsWon'tBootBestAlternativestouTorrentStreamFromVLCtoChromecastDeleteFilesOlderThanxDaysFixanOverheatingLaptopTurnYourComputerIntoaDLNAMediaServerImportantLinuxCommandsInstallMinecraftonUbuntuLinuxTestYourAntivirus,Firewall,andMoreBestLightweightLinuxDistrosLatestLTSVersionofUbuntuBrowseAllLinuxArticles|BrowseBuyingGuides     CompleteGuidesbyHow-ToGeekBrowseAllBuyingGuides OurLatestProductRoundups BestSmartHomeDevicesBestCarChargersBestSmartLightSwitchesBestMacMonitorsBestPS5HeadsetsBestHardwareSecurityKeysBestAirPurifiersBestGalaxyTabS8AccessoriesBestOLEDTVsBestiPhoneSECasesBestPasswordManagersBestNintendoSwitchHeadsets ReaderFavoritesBestLinuxLaptopsBestWi-FiRoutersAwesomePCAccessoriesBestWirelessEarbudsBestOculusQuest2AccessoriesBestSmartwatchesBestHomeTheaterSystems MorefromHow-ToGeekBrowseAllBuyingGuidesBrowseAllNewsArticles LatestGeekNews XboxCarbonNegativeiPhoneSEBenchmarksWindowsonSteamDeckGoogleMessagesiPhoneReactionsAppleStudioDisplayWindowsFileExplorerTabsWindows11PreinstalledApexLegendsLinuxApple15.4SoftwareUpdatesAppleMacStudioiPadAir2022iPhoneSE2022 ReaderFavoritesDetectHiddenSurveillanceCamerasUseYouriPhoneasaWebcamHideSteamGamesYou'rePlayingHidePrivatePhotosoniPhoneDeleteOldOnlineAccountsAllMicrosoft'sPowerToysforWindowsTakeScreenshotbyTappingBackofiPhone MorefromHow-ToGeekBrowseAllReviewsBrowseAllBuyingGuides LatestReviews LenovoThinkPadE14Gen2ReviewRoborockS7MaxVUltraReviewSatechiSlimX3KeyboardReviewBeyerdynamicPortableSpeakerphoneReviewiPhoneSE(2022)Review X X TheBestTechNewsletterAnywhere Join425,000subscribersandgetadailydigestofnews,geektrivia,andourfeaturearticles. Bysubmittingyouremail,youagreetotheTermsofUseandPrivacyPolicy. ADB,AndroidDebugBridge,isacommand-lineutilityincludedwithGoogle’sAndroidSDK.ADBcancontrolyourdeviceoverUSBfromacomputer,copyfilesbackandforth,installanduninstallapps,runshellcommands,andmore. We’vecoveredsomeothertricksthatrequireADBinthepast,includingbackingupandrestoringyoursmartphoneortabletandinstallingAndroidappstoyourSDcardbydefault.ADBisusedforavarietyofgeekyAndroidtricks. StepOne:DownloadPlatformTools HeadtotheAndroidSDKPlatformToolsdownloadpage. Selectthelinkforyouroperatingsystemfromthe“Downloads”section.ThiswilldownloadaZIPfile,whichyoucan unzipwhereveryouwanttostoretheADBfiles–they’reportable,soyoucanputthemanywhereyouwant. That’sallwehavetodofornow.Justmakesuretorememberwhereyouunzippedthefiles,wewillneedtoaccessthatlater. StepTwo:Enable USBDebuggingonYourPhone TouseADBwithyourAndroiddevice,youmustenableafeaturecalled“USBDebugging.”Openyourphone’sappdrawer,taptheSettingsicon,andselect “AboutPhone”.Scrollallthewaydownandtapthe“BuildNumber”itemseventimes.Youshouldgetamessagesayingyouarenowadeveloper. Advertisement HeadbacktothemainSettingspage,andyoushouldseeanewoptioninthe“System”sectioncalled“DeveloperOptions.”Openthat,andenable“USBDebugging.” Lateron,whenyouconnectyourphonetoyourcomputer,you’llseeapopupentitled“AllowUSBDebugging?”onyourphone.Checkthe“Alwaysallowfromthiscomputer”boxandtapOK. StepThree:TestADBandInstallYourPhone’s Drivers (ifNeeded) OpentheCommandPromptandchangethedirectorytowhereyouunzippedthefileearlier.Youcandothisbyenteringthecommandbelow.Replacethefiledestinationwithyourown: CDC:ProgramFilesplatform-tools TotestwhetherADBisworkingproperly,connectyourAndroiddevicetoyourcomputerusingaUSBcableandrunthefollowingcommand: adbdevices Youshouldseeadeviceinthelist.Ifyourdeviceisconnectedbutnothingappearsinthelist,you’llneedtoinstalltheappropriatedrivers. Inthevastmajorityofcases,yourPCwillautomaticallydetectyourphoneandsetitupwiththeappropriatedrivers.Ifthatdoesn’thappen,youcanusuallyfindthedriversforyourdevicefromthe XDADevelopers forums. Advertisement Ifyoudownloadthedriversmanually,you mayhavetoforceWindowstofindthemonyourdevice.OpentheDeviceManager(clickStart,type“DeviceManager”,andpressEnter),locateyourdevice,right-clickit,andselectProperties.Youmayseeayellowexclamationmarknexttothedeviceifitsdriverisn’tinstalledproperly. OntheDrivertab,click“UpdateDriver.” UsetheBrowsemycomputerfordriversoftwareoption. Findthedriversyoudownloadedforyourdevice. Onceyou’veinstalledyourdevice’sdrivers, pluginyourphoneandtrytheadbdevicescommandagain: adbdevices Ifallwentwell,youshouldseeyourdeviceinthelist,andyouarereadytostartusingADB! StepFour(Optional):AddADBtoYourSystemPATH Asitstands,youhavetonavigatetoADB’sfolderandopenaCommandPrompttherewheneveryouwanttouseit.However,ifyouaddittoyourWindowsSystemPATH,thatwon’tbenecessary–youcanjusttypeadbfromtheCommandPrompttoruncommandswheneveryouwant,nomatterwhatfolderyou’rein. TheprocessisabitdifferentonWindows11,10,and7,socheckoutourfullguidetoeditingyourSystemPATHforthestepsrequiredtodothis. RELATED:HowtoEditYourSystemPATHforEasyCommandLineAccessinWindows UsefulADBCommands InadditiontothevarietyoftricksthatrequireADB,ADBofferssomeusefulcommands: adbinstallC:package.apk —InstallsthepackagelocatedatC:package.apkonyourcomputeronyourdevice. adbuninstallpackage.name —Uninstallsthepackagewithpackage.namefromyourdevice.Forexample,you’dusethenamecom.rovio.angrybirdstouninstalltheAngryBirdsapp. adbpush C:file/sdcard/file —Pushesafilefromyourcomputertoyourdevice.Forexample,thecommandherepushesthefilelocatedatC:fileonyourcomputerto/sdcard/fileonyourdevice adbpull/sdcard/fileC:file—Pullsafilefromyourdevicetoyourcomputer—workslikeadbpush,butinreverse. adblogcat—ViewyourAndroiddevice’slog.Canbeusefulfordebuggingapps. adbshell—GivesyouaninteractiveLinuxcommand-lineshellonyourdevice. adbshellcommand—Runsthespecifiedshellcommandonyourdevice. ForafullguidetoADB,consulttheAndroidDebugBridgepageonGoogle’sAndroidDeveloperssite. READNEXT ›HowtoAccessDeveloperOptionsandEnableUSBDebuggingonAndroid›HowtoDowngradeYourAndroidPhonetoaPreviousVersion›HowtoSideloadAndroidAppsontoYourAmazonFireTVandFireTVStick›HowtoForceAnyAndroidAppIntoFullscreenImmersiveMode(WithoutRooting)›HowtoManuallyUpdateYourGooglePixelbySideloadingOTA›HowtoEditYourSystemPATHforEasyCommandLineAccessinWindows›HowtoInstallAndroidUpdatesForYourNexusDevicesWithoutWaiting›13EssentialExcelFunctionsforDataEntry Theabovearticlemaycontainaffiliatelinks,whichhelpsupportHow-ToGeek. How-ToGeekiswhereyouturnwhenyouwantexpertstoexplaintechnology.Sincewelaunchedin2006,ourarticleshavebeenreadmorethan1billiontimes.Wanttoknowmore?



請為這篇文章評分?