AndroidDebugBridgeve
rsion1.0.31-a-directsadbtolis
tenonallinte
rfacesforaconnec
tion-d-directscommandtotheonlyconnectedUSBdev
icereturnsanerrorifmorethanoneUSBdeviceispresent.-e-directscommandtotheonlyrunningemulator.returnsanerrorifmorethanoneemulatorisrunning.-s-directscommandtothedeviceoremulatorwiththegivenserialnumberorqualifier.OverridesANDROID_SERIALenvironmentvariable.-p-
simpleproductnamelike'sooner',orarelative/absolutepathtoaproductoutdirectorylike'out/target/product/sooner'.If-
pisnotspecified,theANDROID_PRODUCT_OUTenvironmentvariableisused,whichmustbeanabsolutepath.-H-Nameofadbserverhost(default:localhost)-P-Portofadbserver(default:5037)devices[-l]-listallconnecteddevices('-l'willalsolistdevicequalifiers)connect[:]-connecttoadeviceviaTCP/IPPort5555isusedbydefaultifnoportnumberisspecified.disconnect[[:]]-disconnec
tfromaTCP/IPdevice.Port5555isusedbydefaultifnoportnumberisspecified.UsingthiscommandwithnoadditionalargumentswilldisconnectfromallconnectedTCP/IPdevices.devicecommands:adbpush[-p]-copyfile/dirtodevice('-p'todisplaythetransferprogress)adbpull[-p][-a][]-copyfile/dirfromdevice('-p'todisplaythetransferprogress)('-a'meanscopytimestampandmode)adbsync[]-copyhost->deviceonlyifchanged(-lmeanslistbutdon't copy)(see'adb help all')adbshell-runremoteshellinteractivelyadbshell-runremoteshellcommandadbemu-runemulatorconsolecommandadblogcat[]-Viewdevicelogadbforward--list-listallforwardsocketconnections.theformatisalistoflineswiththefollowingformat:" "" ""\n"adbforward-forwardsocketconnectionsforwardspecsareoneof:tcp:localabstract:localreserved:localfilesystem:dev:jdwp:(remoteonly)adbforward--no-rebind-sameas'adb forward 'butf
ailsifisalreadyforward
edadbforward--remove-removeaspecificforwardsocketconnectionadbforward--remove-all-removeallforwardsocketconnectionsadbjdwp-listPIDsofprocesseshostingaJDWPtransportadbinstall[-l][-r][-d][-s][--algo--key--iv]-pushthispackagefiletothedeviceandinstallit('-l'meansforward-locktheapp)('-r'meansreinstalltheapp,keepingitsdata)('-d'meansallowversioncodedowngrade)('-s'meansinstallon
SDcardinsteadofinternalstorage)('--algo','--key',and'--iv'meanthefileisencryptedalready)adbuninstall[-k]-removethisapppackagefromthedevice('-k'meanskeepthedataandcachedirectories)adbbugreport-returnallinformationfromthedevicethatshouldbeincludedinabugreport.adbbackup[-f][-apk|-noapk][-obb|-noobb][-shared|-noshared][-all][-system|-nosystem][]-writeanarchiveofthedevice's data to .Ifno-foptionissuppliedthenthedataiswrittento"backup.ab"inthecurrentdirectory.(-apk|-noapkenable/disablebackupofthe.apksthemselvesinthearchive;thedefaultisnoapk.)(-obb|-noobbenable/disablebackupofanyinstalledapkexpansion(aka.obb)file
sassociatedwitheachapplication;thedefaultisnoobb.)(-shared|-nosharedenable/disablebackupofthedevice'ssharedstorage/SDcardcontents;thedefaultisnoshared.)(-allmeanstobackupallinstalledapplications)(-system|-nosystemtoggleswhether-allautomaticallyincludessystemapplications;thedefaultistoincludesystemapps)(isthelistofapplicationstobebackedup.Ifthe-allor-sharedflagsarepassed,thenthepackagelistisoptional.Applicationsexplicitlygivenonthecommandlinewillbeincludedevenif-nosystemwou
ldordinarilycausethemtobeomitted.)adbrestore-restoredevicecontentsfromthebackuparchiveadbhelp-showthishelpmessageadbversion-showversionnumscripting:adbwait-for-device-blockuntildeviceisonlineadbstart-server-ensurethatthereisaserverrunningadbkill-server-killtheserverifitisrunningadbget-state-prints:offline|bootloader|deviceadbget-serialno-prints:adbget-devpath-prints:adbstatus-window-continuouslyprintdevicestatusforaspecifieddeviceadbremount-remountsthe/systempartitiononthedeviceread-writeadbreboot[bootloader|recovery]-rebootsthedevice,optionallyintothebootloaderorrecoveryprog
ramadbreboot-bootloader-rebootsthedeviceintothebootloaderadbroot-restartstheadbddaemonwithrootpermissionsadbusb-restartstheadbddaemonlisteningonUSBadbtcpip-restartstheadbddaemonlisteningonTCPonthespecifiedportnetworking:adbppp[parameters]-RunPPPoverUSB.Note:youshouldnotautomaticallystartaPPPconnection.referstothettyforPPPstream.Eg.dev:/dev/omap_csmi_tty1[parameters]-Eg.defaultroutedebugdumplocalnottyusepeerdnsadbsyncnotes:adbsync[]
canbeinterpretedinseveralways:-Ifisnotspecified,both/systemand/datapartitionswillbeupdated.-Ifitis"system"or"data",onlythecorrespondingpartitionisupdated.environmentalvariables:ADB_TRACE-Printdebuginformation.Acommaseparatedlistofthefollowingvalues1orall,adb,sockets,packets,rwx,usb,sync,sysdeps,transport,jdwpANDROID_SERIAL-Theserialnumbertoconnectto.-stakespriorityoverthisifgiven.ANDROID_LOG_TAGS-Whenusedwiththelogcatoption,onlythesedebugtagsareprinted.
評論