Yuav ua li cas rau nruab Android Debug Choj (ADB)

Cov txheej txheem:

Yuav ua li cas rau nruab Android Debug Choj (ADB)
Yuav ua li cas rau nruab Android Debug Choj (ADB)
Anonim

Yuav Paub

  • Download ADB thiab Fastboot. Qhib cov Platform Tools ZIP file. Copy the folder path to platform-tools.
  • Kho kom raug PATH system hloov pauv. Kuaj kom paub tseeb tias koj tuaj yeem ncav cuag ADB.
  • ADB cov lus txib tuaj yeem siv los hloov kho koj lub Android yam tsis tas yuav kov lub cuab yeej tiag tiag.

Kab lus no piav qhia yuav ua li cas rau nruab Android Debug Choj (ADB), nrog rau cov piv txwv ntawm qee cov lus txib. Cov ntaub ntawv muaj nyob ntawm no yuav tsum siv txawm tias leej twg tsim koj lub xov tooj Android: Samsung, Google, Huawei, Xiaomi, thiab lwm yam.

Download ADB thiab Fastboot

Image
Image

Google tso ob lub cuab yeej hu ua ADB thiab fastboot, ob qho tib si muaj nyob rau hauv ib pob hu ua Platform Tools. Lawv yog cov cuab yeej hais kom ua uas tso cai rau koj hloov kho thiab tswj koj lub xov tooj Android los ntawm kev xa cov lus txib rau nws los ntawm koj lub computer.

Ob qho ntawm cov khoom siv no muaj nyob hauv Android.com. Mus saib SDK Platform Tools download nplooj ntawv kom pom qhov tseeb version ntawm ADB thiab fastboot.

Lawv kuj suav nrog tag nrho Android SDK tab sis nws tsis tas yuav rub tawm tag nrho cov ntawd tsuas yog rau ob lub cuab yeej uas koj tuaj yeem tau txais los ntawm Cov Cuab Yeej Platform.

  1. Xaiv qhov txuas rub tawm uas cuam tshuam nrog koj lub operating system.

    Yog tias koj muaj Windows, xaiv Download SDK Platform-Tools rau Windows, lossis xaiv Mac ib qho rau macOS, thiab lwm yam.

  2. Tom qab nyeem dhau cov nqe lus thiab cov xwm txheej, xaiv lub thawv ntawv cog lus nyob ib sab ntawm Kuv tau nyeem thiab pom zoo nrog cov nqe lus thiab cov cai saum toj no.
  3. Xaiv Download Android SDK Platform-Tools for [operating system].
  4. Txuag cov ntaub ntawv qhov chaw nco vim tias koj yuav rov siv nws sai sai. Lub nplaub tshev uas koj ib txwm khaws cov ntaub ntawv zoo yog tias koj paub yuav ua li cas rov qab los.

Qhib Platform Tools ZIP File

Image
Image

Mus rau qhov twg nws yog qhov koj tau khaws cov download rau, thiab rho tawm cov ntsiab lus ntawm ZIP cov ntaub ntawv.

Koj qhov kev khiav haujlwm muaj cov cuab yeej ua haujlwm uas tuaj yeem ua qhov no rau koj, tab sis lwm qhov kev xaiv yog qhib nws nrog cov ntaub ntawv rho tawm cov nqi hluav taws xob.

Windows

  1. Right-click the ZIP file thiab xaiv qhov kev xaiv rho tawm, hu ua Extract All hauv qee qhov versions ntawm Windows.
  2. Thaum nug seb yuav khaws cov ntaub ntawv nyob qhov twg, zoo li koj pom hauv daim duab saum toj no, xaiv lub nplaub tshev uas tsim nyog rau ADB nyob, tsis yog qhov chaw ib ntus xws li cov ntawv rub tawm lossis qhov chaw uas yooj yim cluttered zoo li lub desktop. Peb tau xaiv lub hauv paus ntawm C: tsav, hauv daim nplaub tshev hu ua ADB.
  3. Muab daim tshev rau hauv lub thawv ib sab Qhia cov ntaub ntawv rho tawm thaum ua tiav.
  4. Xaiv Extract txhawm rau khaws cov ntaub ntawv ntawd.
  5. Cov nplaub tshev uas koj xaiv hauv Kauj Ruam 1 yuav tsum qhib thiab qhia platform-tools nplaub tshev uas tau muab rho tawm los ntawm ZIP cov ntaub ntawv koj rub tawm ua ntej.

macOS

  1. Qhib ZIP cov ntaub ntawv tam sim ntawd kom muaj cov ntsiab lus rho tawm mus rau tib lub nplaub tshev uas koj nyob hauv.
  2. Ib daim nplaub tshev tshiab yuav tsum tshwm hu ua platform-tools.
  3. Zoo siab tos txais nej txhuam leej los rau koosloo_Ulias Channel nkag mus nias Subscribe.

Linux

Linux cov neeg siv tuaj yeem siv Terminal cov lus txib hauv qab no, hloov destination_folder nrog cov ntawv tais ceev twg koj xav tau platform-tool nplaub tshev kom xaus rau hauv.


unzip platform-tools-latest-linux.zip -d destination_folder

Txoj hauv kev zoo tshaj los ua qhov no yog qhib Terminal ntawm lub nplaub tshev uas ZIP cov ntaub ntawv nyob. Yog tias tsis yog li ntawd, koj yuav tsum hloov kho lub platform-tools-latest-linux.zip txoj hauv kev kom suav tag nrho txoj hauv kev rau ZIP cov ntaub ntawv.

Yog tias lub unzip siv tsis tau nruab, khiav cov lus txib no:


sudo apt-tau nruab unzip

Koj tuaj yeem siv 7-Zip lossis PeaZip hloov yog tias koj xav tsis siv cov lus txib Terminal lossis lawv tsis ua haujlwm rau koj.

Copy the Folder Path to platform-tools

Image
Image

Ua ntej koj pib siv ADB, koj xav kom paub tseeb tias nws yooj yim nkag tau los ntawm kab hais kom ua. Qhov no yuav tsum tau txoj hauv kev mus rau lub nplaub tshev los ntawm cov kauj ruam dhau los los teeb tsa ua ib puag ncig hloov pauv.

Txoj kev yooj yim tshaj plaws los ua qhov no yog thawj zaug luam txoj hauv kev mus rau daim nplaub tshev:

Windows

  1. Qhib lub nplaub tshev uas koj rho tawm platform-tools folder.
  2. Qhib lub nplaub tshev kom koj pom cov ntsiab lus hauv nws.
  3. Nyob rau sab saum toj ntawm lub qhov rais, xaiv qhov chaw khoob nyob ib sab ntawm txoj kev. Koj tuaj yeem hloov pauv siv Alt + Dkeyboard shortcut o sai sai txav qhov kev tsom xam tam sim no mus rau qhov kev taw qhia bar thiab tau txais qhov tseem ceeb ntawm txoj hauv kev.
  4. Thaum txoj kev mus rau qhov qhib nplaub tshev yog qhov tseem ceeb, right-click thiab luam nws, lossis siv Ctrl+C.

macOS

  1. Xaiv cov ntawv koj rho tawm.
  2. Siv Command+i los qhib lub qhov rai tau txais cov ntaub ntawv rau lub nplaub tshev ntawd.
  3. Nyem thiab luag xaiv txoj kev nyob ib sab Qhov twgkom nws tseem ceeb.
  4. Siv Command+C los theej txoj kev.

Linux

  1. Qhib platform-tools nplaub tshev kom koj pom lwm cov folders thiab cov ntaub ntawv hauv nws.
  2. Siv Ctrl+L txhawm rau txav qhov ua kom pom tseeb rau qhov bar navigation. Txoj kev yuav tsum tau ua kom pom tseeb.
  3. Copy the path with Ctrl+C.

Koj cov qauv ntawm cov kev khiav haujlwm no yuav txawv txaus tias cov kauj ruam tsis yog raws nraim li koj pom ntawm no, tab sis lawv yuav tsum ua haujlwm nrog feem ntau ntawm txhua OS.

Kho qhov PATH System Variable

Image
Image

Ntawm no yog yuav ua li cas qhib Kho Kho Qhov System Variable screen hauv Windows kom txoj hauv kev koj tau theej tuaj yeem teeb tsa raws li PATH system sib txawv:

  1. Qhib Tswj Vaj Huam Sib Luag.
  2. Nrhiav thiab qhib qhov System applet.
  3. Xaiv Advanced system settings.
  4. In the System Properties window, xaiv Environment Variables nyob rau hauv qab ntawm Advanced tab.
  5. Nrhiav thaj chaw hauv qab sau npe System variables, thiab nrhiav qhov sib txawv npe Path.
  6. Xaiv Edit.
  7. Xaiv New (Windows 11) thiab muab tso rau txoj hauv kev uas koj tau theej dhau los. Rau cov laus versions ntawm Windows, right-click nyob rau hauv Variable value text box and paste the path. Yog tias muaj lwm txoj hauv kev twb tau nyob hauv lub thawv, mus rau sab xis sab xis thiab muab ib lub cim rau ntawm qhov kawg. Tsis muaj qhov chaw, nyem nyem thiab muab tshuaj txhuam koj txoj hauv kev nyob ntawd.
  8. Xaiv OK ob peb zaug kom txog thaum koj tawm ntawm System Properties.

Ua raws cov kauj ruam no los kho cov ntaub ntawv PATH hauv macOS lossis Linux:

  1. Qhib Terminal los ntawm Kev Pom Zoo lossis Daim Ntawv Thov / Kev Siv Hluav Taws Xob, thiab nkag mus rau cov lus txib no kom qhib koj li Bash profile hauv koj cov ntawv sau ua ntej: kov ~/.bash_profile; qhib ~/.bash_profile.
  2. Txav tus cursor mus rau qhov kawg ntawm cov ntaub ntawv thiab nkag mus rau hauv qab no, hloov lub folder nrog txoj kev koj theej: export PATH="$HOME /folder/bin:$PATH".
  3. Txuag cov ntaub ntawv thiab tawm ntawm cov ntawv nyeem.
  4. Nkag mus rau Terminal cov lus txib hauv qab no kom khiav koj qhov profile Bash: source ~/.bash_profile.

Test kom paub tseeb tias koj tuaj yeem ncav cuag ADB

Image
Image

Tam sim no tias qhov kev sib txawv ntawm qhov system tau teeb tsa kom raug, koj yuav tsum xyuas tias koj tuaj yeem khiav cov lus txib tawm tsam qhov program.

Qhib Command Prompt lossis Terminal, thiab ua rau adb hais kom ua.

Yog tias qhov tshwm sim ntawm cov lus txib yog cov ntawv zoo ib yam li qhov no:


Android Debug Choj version 1.0.41

Version 31.0.3-7562133

Installed as C:\ADB\ platform-tools\adb.exe

…ces koj npaj tau pib siv Android Debug Choj los ntawm kab hais kom ua!

Raws li ntev raws li kev debugging hom qhib rau hauv koj lub xov tooj, koj tuaj yeem xa ADB cov lus txib thaum lub xov tooj ua haujlwm tsis tu ncua lossis txawm tias thaum nws nyob hauv hom rov qab.

Examples of ADB Commands

ADB cov lus txib tuaj yeem siv los hloov kho koj lub Android yam tsis tas yuav kov lub cuab yeej tiag tiag, tab sis muaj ntau yam ntxiv uas ua tau. Koj tuaj yeem ua tej yam yooj yim xws li nruab qhov kev hloov kho tshiab lossis txawm cuam tshuam nrog tej yam uas ib txwm txwv, xws li tweaking nqis koj tsis tau paub tias muaj, lossis nkag mus rau cov ntaub ntawv kaw lus uas ib txwm kaw.

  • adb li qhia tias ADB txhawb pab kiag li lawm txuas nrog koj lub computer
  • adb reboot rov pib koj lub xov tooj
  • adb thaub qab tsim tag nrho thaub qab ntawm koj lub xov tooj thiab txuag nws rau koj lub computer
  • adb sideload thauj ROMs thiab lwm yam ZIP cov ntaub ntawv los ntawm koj lub computer mus rau koj lub Android
  • adb rub luam cov ntaub ntawv ntawm lub xov tooj rau koj lub computer
  • adb plhaub tso cai rau cov lus txib kom khiav hauv lub davhlau ya nyob twg ntawm Android ntaus ntawv
  • adb reboot -bootloader pib koj lub xov tooj hauv bootloader hom kom koj tuaj yeem khiav cov lus txib fastboot.

Pom zoo: