Android Debug Bridge ADB Tämän työkalun avulla voit lähettää laajan valikoiman pääte-komentoja, mutta niihin ei rajoitu Linuxin peruskomentoja ja joitakin erikoiskehitystiehoja puhelimeesi melkein milloin tahansa, kunhan puhelimessa on käytössä virheenkorjaus. Lähettää komentoja puhelimen ollessa päällä ja käynnistyessä tai jopa silloin, kun se on palautustilassa Vaikka ADB: tä käytetään usein puhelimen juurruttamisen tai muokkaamisen yhteydessä, voit käyttää ADB: tä myös lähettämään terminaalin komentoja läpäisemättömille laitteille. Sinun täytyy muokata puhelimen firmware, fastboot on työkalu, jota tarvitset Tämä antaa sinun lähettää komentoja käynnistyslataimeen, mikä tarkoittaa, että voit salata modifioida asioita, kuten mukautettuja takaisinperintöjä. Voit t salata koko ROM-levyjä sen kanssa, mutta se on hyödyllistä monille asioille Että ADB voi tehdä Fastboot ei ole käytössä kaikissa puhelimissa, joten sinun on ehkä tarkistettava tietyt laitteet. Jotkut näistä työkaluista tulevat Android SDK: n kanssa, mutta se on erittäin suuri lataus, joka suoraan sanottuna Käyttäjät, jotka ovat kiinnostuneita ADB: stä ja fastboot don t tarvitsevat Onneksi Google äskettäin teki helpoksi näiden kahden ilman kaikkea roskapostia. Vaihe 1 Lataa Platform Tools Package. Google kertoo kollektiivisesti ADB: stä, fastbootista ja muutamasta muuta apuohjelmasta Platform Tools - paketti Voit ladata Platform Tools-paketin SDK: n verkkosivustolta. Tässä on erilliset paketit Windowsille, Macille ja Linuxille, joten lataa sopiva versio alustallesi. Android-laitteen muokkaaminen edellyttää yleensä, että ADB-työkalut asennetaan ilman sitä, Et halua käyttää kehittäjäkomentoja, jotka sisältyvät useimpiin viimeisimpiin oppaisiimme. Tämä pikaopas näyttää, kuinka asennat ja konfiguroit Google: n ADB-työkalut - ohjelmiston Windows-, Mac - tai Linux-tietokoneellesi muutamassa minuutissa. Mitä ADB: tä käytetään . ADB Android Debug Bridge on tehokas komentorivityökalu, jonka Google on kehittänyt Android-kehittäjille ADB mahdollistaa kehittäjät suorittamaan sovellustensa debugoitavaksi hyödyllisten komentojen avulla. Esimerkiksi jos kehittäjä halusi tietää laitteen tilan ennen kuin sovellus kaatui, he voisivat yksinkertaisesti kirjoittaa adb logcatin komentorivilleen saadakseen pitkän luettelon viesteistä ja vihjeistä laitteestaan. Jotkut ADB-komennot voivat olla hyödyllisiä muille Ihmiset myös adb sideload - komennot antavat ihmisille mahdollisuuden asentaa OTA-päivityksiä ja muita ohjelmia puhelimeensa sen sijaan, että odottaisikaan, että Google päivittää tai päivittää sovelluksen. Kun ADB on määritetty, saat nopeat käynnistyskomennot , Myös Fastboot-komennot, kuten pikalamput, voit asentaa mukautetut palautukset ja ytimet. Lataa Android SDK tai One-Click ADB - asennusohjelma. Lataa Android Developers - sivu lataamaan Android SDK Aseta SDK-tiedosto missä tahansa järjestelmässäsi. Jos käytät Windowsia, voit käyttää tätä kätevää yhden napsautuksen asennusohjelmaa. Jos päätät käyttää yhden napsautuksen asennusohjelmaa, voit lopettaa lukemisen täällä. Aseta PATH-muuttuja. ADB-työkaluja voi nyt käyttääKomentorivin, mutta vain jos olet uudessa SDK-kansioon löytyneessä alustyökalujen hakemistossa Jotta asiat olisivat helpompaa, voit määrittää PATH-muuttujan ADB: lle, jotta voit käyttää työkaluja mistä tahansa komentorivikosta. Macissa Tai Linux, avaa päätesi ja kirjoita nano. Paina paluuta Tämä komento avaa tekstieditorin, jotta voit muokata tiedostoa, joka sisältää järjestelmän s PATH-muuttujat Lisää tämä rivi tiedostoosi tarvittavat tiedot. export PATH PATH Käyttäjät käyttäjätunnuksesi polku foorumi-työkaluja. Valinnut tekemään Kopio alustatyökalujen tiedostosta, joten PATH-muuttuja näyttää tältä. Kun olet tehnyt muutoksen, tallenna muutokset painamalla Option - ja X-näppäimiä samanaikaisesti Testaa ADB-työkalut adb-laitteiden komennolla Jos saat Luettelo laitteista, jotka on liitetty nopeasti, sinulla on ADB-asetukset oikein Jos näet, että ADB-komentoa ei ole löytynyt, palaa takaisin ja varmista, että sinulla on PATH-muuttuja, joka on nimenomaan osa, joka sisältää oikein kirjoitettujen alustyökalujen polun. Nyt sinulla on ADB Voit tehdä asioita, kuten flash-kuvan tai asentaa OTA ilman odottaa päivitystä Google. Android Debug Bridge - sivustosta. Tässä asiakirjassa. Android Debug Bridge - sovellus on monipuolinen komentorivityökalu, jonka avulla Sinä tiedät Käytti laitteessa emulaattoria tai liitettyä Android-laitetta Adb-komento helpottaa erilaisia laitteiden toimintoja, kuten sovellusten asentamista ja virheenkorjausta, ja se tarjoaa pääsyn Unix-kuoriin, jota voit käyttää erilaisten komentojen suorittamiseen laitteessa It On asiakas-palvelinohjelma, joka sisältää kolme komponenttia. Asiakas, joka lähettää komentoja Asiakas toimii kehitystyökalulla Voit kutsua asiakasta komentoriviliittimeltä antamalla adb-komennon. Daemon adbd, joka suorittaa komennot laitteessa Daemon toimii taustoprosessina kullakin laitteella. Palvelin, joka hallitsee asiakkaan ja daemonin välistä viestintää Palvelin toimii kehitystyön taustaprosessina. Adb sisältyy Android SDK Platform-Tools-pakettiin Voit ladata tämän paketin SDK Manager, joka asentaa sen androidsdk-alustatyökaluilla tai jos haluat erillisen Android SDK Platform-Tools-paketin, voit ladata sen täältä. Miten adb toimii. Kun aloitat adb-asiakasohjelman, th E-asiakas ensin tarkistaa, onko ADB-palvelinprosessi jo käynnissä. Jos palvelin ei käynnisty, se käynnistää palveluprosessin Kun palvelin käynnistyy, se sitoutuu paikalliseen TCP-porttiin 5037 ja kuuntelee komennoista, jotka on lähetetty adb-asiakkailta, kaikki adb-asiakkaat käyttävät porttia 5037 Kommunikoida adb-palvelimen kanssa. Palvelin sitten muodostaa yhteydet kaikkiin käynnissä oleviin laitteisiin. Se etsii emulaattoreita skannaamalla parittomat numerot portit 5555-5585, ensimmäisten 16 emulaattorin käyttämää aluetta. Jos palvelin löytää adb daemon adbd: n, se Muodostaa yhteyden kyseiseen porttiin Huomaa, että kukin emulaattori käyttää paria peräkkäisiä portteja parillisen numeron portilla konsoliyhteyksiin ja parittomaan porttiin adb-yhteyksille Esimerkiksi Emulaattori 1, konsoli 5554 Emulaattori 1, adb 5555 Emulaattori 2, Konsoli 5556 Emulaattori 2, adb 5557 ja niin edelleen. Kuten on osoitettu, emulaattori kytketty adb-porttiin 5555 on sama kuin emulaattori, jonka konsoli kuuntelee porttia 5554. Kun palvelin on muodostanut yhteydet kaikkiin laitteisiin, voit käyttää adb co Mmands käyttää näitä laitteita Koska palvelin hallitsee yhteyksiä laitteisiin ja käsittelee useita komentoja useilta adb-asiakkailta, voit hallita mitä tahansa laitetta mistä tahansa asiakkaasta tai käsikirjoituksesta. Ota adb-virheenkorjaus laitteellesi. Jos haluat käyttää adb-laitetta USB - Sinun on otettava käyttöön USB-virheenkorjaus laitteen järjestelmäasetuksissa Kehittäjän asetukset-kohdassa. Android 4 2: n ja sitä korkeamman kehittäjän asetukset - näyttö on piilotettu oletusarvoisesti. Jotta se näkyisi, siirry Asetukset-kohtaan Tietoja puhelimesta ja napauta Rakenna numero seitsemän kertaa Palaa edelliseen Voit etsiä kehittäjäasetuksia alareunassa. Joissakin laitteissa kehittäjän asetukset - näyttö saattaa sijaita tai nimetä eri tavalla. Voit nyt liittää laitteen USB-liitäntään. Voit varmistaa, että laite on liitetty suorittamalla adb-laitteita androidsdk-alustyökaluista Hakemisto Jos yhteys on käytössä, näet laitteen nimen luettelossa. Huomaa Kun muodostat laitetta, jossa on Android 4 2 2 tai uudempi, järjestelmä näyttää valintaikkunan, jossa kysytään, hyväksyykö se RSA-avain, joka mahdollistaa virheenkorjauksen tämän tietokoneen kautta Tämä suojausmekanismi suojaa käyttäjien laitteita, koska se varmistaa, että USB-virheenkorjausta ja muita adb-komentoja ei voida suorittaa, ellet voi avata laitetta ja tunnistaa valintaikkunan. Lisätietoja USB-laitteen , Lue Käytä sovelluksia laitteistosta. Liitä laitteeseen Wi-Fi. adb: n kautta. Yleensä laite kommunikoi USB-liitännän kautta, mutta voit myös käyttää adb-verkkoa Wi-Fi-yhteyden kautta jonkin alkuasetuksen USB-liitännän jälkeen alla kuvatulla tavalla. Kehittää Android Wear - ohjelmaa, sinun on kuitenkin tutustuttava Android Wear - sovelluksen vianmääritysohjeeseen, jossa on erityiset ohjeet Wi-Fi - ja Bluetooth-ominaisuuden käyttämiseen. Liitä Android-laite ja adb-isäntätietokone yleiseen Wi-Fi-verkkoon, jota voi käyttää Molemmat Varmista, että kaikki yhteysosoitteet eivät ole sopivia, joudut ehkä käyttämään tukiasemaa, jonka palomuuri on määritetty oikein tukemaan adb. Jos olet yhteydessä Android Wear - laitteeseen, katkaise Bluetooth käytöstä Laite, joka on pariliitoksen kanssa. Liitä laite isäntätietokoneeseen USB-kaapelilla. Aseta kohdelaite kuuntelemaan TCP-IP-liitäntää portissa 5555. Irrota USB-kaapeli kohdelaitteesta. Etsi IP-osoite Android-laite Esimerkiksi Nexus-laitteella löydät IP-osoitteen Asetukset Tietoja tabletista tai Tietoja puhelimen tila-IP-osoitteesta tai Android Wear - laitteessa IP-osoite löytyy Asetukset-Wi-Fi-asetuksista Lisäasetukset-IP-osoite. Kytke laitteeseen sen IP-osoitteen avulla. Vahvista, että isäntätietokoneesi on kytketty kohdelaitteeseen. Nyt kannattaa mennä. Jos adb-yhteys on kadonnut, varmista, että isäntäsi on edelleen kytkettynä samaan Wi - Fi-verkko on Android-laitteesi. Voit liittyä uudelleen suorittamalla ADB-yhteysvaihe uudelleen. Jos tämä ei toimi, nollaa adb-isäntäsi. Aloita sitten alusta. Laite laitteille. Ennen kuin annat adb-komentoja, kannattaa tietää, mitä Laiteapahtumat on liitetty adb-palvelimeen Voit gen Poistaa luettelon liitetyistä laitteista käyttämällä laitteiden komentoa. Vastauksena adb tulostaa tämän tilatiedot jokaiselle laitteelle. Sarjanumero ADB: n luoma merkkijono tunnistaa laite yksilöllisesti porttinsa mukaisesti Tässä on esimerkki sarjanumeron emulaattori 5554.State Laitteen yhteystila voi olla jokin seuraavista. offline Laite ei ole liitettynä adb: ään tai ei vastaa. device Laite on nyt liitetty adb-palvelimeen Huomaa, että tämä tila ei tarkoita, että Android-järjestelmä on täysin käynnistynyt Ja se toimii, koska laite kytkeytyy adb-järjestelmään järjestelmän käynnistyksen aikana. Käynnistyksen jälkeen tämä on kuitenkin laitteen device. no-laitteen normaalia toimintatilaa. Laitteeseen ei ole kytketty liitettä. Kuvaus Jos lisätään - l-vaihtoehto, laitteet Komento kertoo, mitä laite on Nämä tiedot ovat hyödyllisiä, kun useita laitteita on kytketty, jotta voit kertoa niistä erilleen. Seuraavassa esimerkissä näkyy laitteiden komento ja sen ulostulo. Listan kaksi ensimmäistä riviä ovat emulaattoreita ja kolmas rivi on fyysinen laite, joka on liitetty tietokoneeseen. Emulaattori, jota ei ole luetteloitu. Adb-laitteiden komennolla on kulma-tapaus - komentojono, joka aiheuttaa käynnissä olevan emulaattorin s ei tule näkyviin Kun emulaattori s näkyy työpöydällä Tämä tapahtuu, kun kaikki seuraavat ehdot ovat tosiasioita. Adb-palvelin ei ole käynnissä, ja käytät emulaattorikomentoa - port tai - ports - vaihtoehdon kanssa. Pariton numeroitu portin arvo välillä 5554 ja 5584. Ja odd-numeroitu portti, jota valitsit, ei ole varattu, joten porttiliitäntä voidaan tehdä määritetylle porttinumerolle tai jos se on varattu, emulaattori siirtyy toiseen porttiin, joka täyttää Vaatimukset 2. ja aloitat ADB-palvelimen emulaattorin käynnistämisen jälkeen. Yksi tapa välttää tämä tilanne on antaa emulaattorin valita omat porttinsa ja don t suorittaa yli 16 emulaattoria kerralla. Toinen tapa on aina aloittaa adb Palvelin ennen kuin käytät emulaattorikohtaa Esimerkki 1 Seuraavassa komentorivissä adb-laitteiden komento käynnistää adb-palvelimen, mutta laitteiden luetteloa ei näytetä. Suorita adb-palvelin ja anna seuraavat komennot näytettyyn järjestykseen. Avd-nimi, anna pätevä avd-nimi järjestelmästä Saat luettelon avd-nimistä, kirjoita emulaattori - list-avds Emulaattorikomento on androidsdk-työkalujen hakemistoon. Esimerkki 2 Seuraavassa komentorivissä adb-laitteet näyttävät laitteiden luettelon Koska adb-palvelin käynnistettiin ensin. Voit nähdä emulaattorin ADB-laitteiden tulostuksessa pysäyttämällä adb-palvelimen ja käynnistämällä sen uudelleen sen jälkeen, kun olet käyttänyt emulaattorikomennon ja ennen kuin käytät adb-laitteiden komentoa seuraamalla. Lisätietoja emulaattorikomennosta - line-vaihtoehdoista, katso Komentoriviparametrien käyttäminen. Jos komennot tietylle laitteelle. Jos useat laitteet ovat käynnissä, sinun on määritettävä kohdelaite, kun annat adb-komennon. Määritä kohde, käytä laitteiden komentoa g Et kohteen sarjanumero Kun olet saanut sarjanumeron, käytä - s-vaihtoehtoa adb-komennoilla sarjanumeron määrittämiseksi Jos aiot julkaista paljon ADb-komentoja, voit asettaa ANDROIDSERIAL-ympäristömuuttujan sisältämään Sarjanumeron sijaan Jos käytät sekä - s - että ANDROIDSERIAL - s-ohittaa ANDROIDSERIAL. Yleisessä esimerkissä saatetaan liitteenä olevien laitteiden luettelo ja sitten laitteen jonkin laitteen sarjanumero asennetaan kyseiseen laitteeseen. Huomaa Jos Annat komennon määrittämättä kohdelaitteen, kun useat laitteet ovat käytettävissä, adb synnyttää virheen. Jos sinulla on useita laitteita saatavilla laitteisto tai emuloidaan, mutta vain yksi on emulaattori, käytä - e vaihtoehto lähettää komentoja emulaattoriin Samoin, Jos on olemassa useita laitteita, mutta vain yksi laitteisto on liitetty, käytä - d-vaihtoehtoa lähettämään komentoja laitteistoon. Asenna sovellus. Voit käyttää adb-ohjelmaa APK: n asentamiseen emulaattoriin tai yhdistettyyn laitteeseen asennuskompana Nd. Ottaa portin edelleenlähetys. Voit käyttää eteenpäin - komentoa mielivaltaisen porttitoiminnon asettamiseksi, joka välittää pyynnöt tiettyyn isäntäporttiin laitteen toiseen porttiin Seuraavassa esimerkissä määritetään isäntäportin 6100 edelleenlähetys laitteen porttiin 7100. Seuraavassa esimerkissä määritetään isäntäportin 6100 edelleenlähetys paikalliseen logd. Copy - tiedostoon laitteesta. Käytä vedä ja paina komentoja tiedostojen kopioimiseen laitteeseen ja laitteesta Toisin kuin asennuskomento, joka kopioi vain APK-tiedoston tiettyyn paikkaan , Vedä ja paina komentoja voit kopioida mielivaltaisia hakemistoja ja tiedostoja missä tahansa laitteessa. Voit kopioida tiedoston tai hakemiston ja sen alihakemistot laitteesta seuraavasti: Kopioi tiedosto tai hakemisto ja sen alihakemisto Siirrä laite paikalleen ja kauko-ohjain paikallisten ja etäisten paikallisten tiedostojen hakemistopolkujen paikalliseen ja laitteen kauko-ohjaimelle. Esimerkiksi. Pysäytä adb-palvelin. Joissakin tapauksissa saatat joutua lopettamaan adb-palvelimen käsitellä asiaa Ja käynnistää sen uudelleen ongelman ratkaisemiseksi, esim. Jos adb ei vastaa komentoon. Lopeta adb-palvelin käyttämällä adb kill-server - komentoa. Voit käynnistää palvelimen uudelleen antamalla minkä tahansa muun adb command. adb - komennon viitteen. Anna adb-komentoja kehityskoneesi komentoriviltä tai käsikirjoituksesta Käyttö on. Jos siinä on vain yksi emulaattori tai vain yksi laite on liitetty, adb-komento lähetetään kyseiselle laitteelle oletusarvoisesti Jos useita emulaattoreita on käynnissä ja / tai useita Laitteet on liitetty, sinun on käytettävä - d - e tai - s - vaihtoehtoa määrittääksesi kohdelaitteen, johon komento tulisi ohjata. Alla oleva taulukko sisältää kaikki tuetut adb-komennot ja selittää niiden merkityksen ja käytön. Adb-komentoja ja vaihtoehtoja. Kytke laitteeseen TCP-IP: n kautta Jos et määrittele porttia, käytä oletusporttia 5555. liitä isäntä isäntäportti. Irrota määrätystä TCP IP - laitteesta, joka toimii määritetyssä portissa. Jos et Määritä isäntä tai ap Ort, kaikki laitteet irrotetaan kaikista TCP-IP-portista Jos määrität isännän, mutta ei porttia, oletusporttia käytetään 5555.Kaikki kaikki siirretyt liitännät. lähtö - ei-uudelleenkäynnistää paikallista kauko-ohjainta. Määritetty paikallisportti laitteeseen määritetylle etäportille Voit määrittää sekä paikallis - että etäportit seuraavilla tavoilla. tcp-portti Voit valita minkä tahansa avoimen portin paikallisen arvon tcp 0.localabstract unixdomainsocketname. localreserved unixdomainsocketname. localfilesystem unixdomainsocketname. dev Characterdevicename. forward - remove local. Remove specified forwarded socket connection. List kaikki reverse socket - liitännät laitteesta. versio - no-rebind etäinen local. Reverse socket - yhteys - no-rebind vaihtoehto tarkoittaa kääntö epäonnistuu, jos määritetty Pistorasia on jo sidottu aiemman peruutuskomennon kautta Voit määrittää portin sekä paikallis - että etäotsioille seuraavalla tavalla. tcp-portti Jos haluat valita minkä tahansa avoimen portin, Arvo tcp 0.localabstract unixdomainsocketname. localreserved unixdomainsocketname. localfilesystem unixdomainsocketname. reverse - yhdistää remote. Remove määritetty käänteinen pistorasiayhteys laitteesta. Vuodata kaikki päinvastaiset liitännät laitteesta. File Transfer Commands. push paikallista remote. Copy tiedostot ja hakemistot Paikallinen laitetietokone etälaitteeseen ..pull - a etäinen paikallinen. Kopioi etätiedostot ja - hakemistot laitteeseen. - A-vaihtoehto säilyttää tiedoston aikaleiman ja tilan. Asennuskomennot. Asennusvaihtoehdot. Paketti Laitteelle ja asenna ne Mahdollisia vaihtoehtoja ovat seuraavat.-l Etukansi-sovellus.-r Korvaa olemassa oleva sovellus.-t Salli testipaketit.-s Asenna sovellus SD-kortille.-d Salli versio-koodin alentaminen vain vianmäärityspaketteihin .-G Grant kaikki runtime permissions. install-useita vaihtoehtoja paketteja. Samat asennusvaihtoehdot kuin seuraavalla.-P Osittainen sovellus install. uninstal L - k-paketti. Voit irrottaa tämän sovelluspaketin laitteesta Lisää - vaihtoehto, jos haluat säilyttää tiedot ja välimuistihakemiston. Varmuuskopioi ja palauta komennot. backup - f-tiedosto - apk - noapk - oikeus - yksityiskohtainen - jako-kaikki - järjestelmä - nusystem packagenames. Write-tiedoston tiedosto tiedostolle Jos et määritä tiedoston nimeä, oletustiedosto on Packet-luettelo on valinnainen, kun määrität - all ja - share-asetukset Seuraavassa kuvataan toisen Options.-apk - noapk Varmuuskopioi tai älä varmuuskopioi tiedostoja Oletusarvo on - noapk.-obb - noobb Varmuuskopioi tai älä varmuuskopioi tiedostoja Oletusarvo on - noobb.-shared - noshared Varmuuskopioi tai älä taakse Jaettu varastointi Oletusarvo on - noshared.-all Varmuuskopioi kaikki asennetut sovellukset.-system - nosystem Sisällytä tai älä sisällytä sovellusohjelmia varmuuskopioimaan kaikki asennetut sovellukset-Kaikki Oletusarvo on - systeemi. Vaihda laitteen sisältö tiedostosta . Tulosta vikaraportti määritettyyn polkuun Jos polku on hakemisto, vikailmoitus on tallennus D kyseiseen hakemistoon käyttämällä oletustiedoston nimeä. Laitteet, jotka eivät tue pakattuja vikailmoituksia, tulostuvat stdoutiin. Tulosta luettelo käytettävissä olevista JDWP-prosesseista tietylle laitteelle. Käytä eteenpäin jdwp pid - yhteyttä tiettyyn JDWP-prosessiin. Esimerkiksi adb forward tcp 8000 jdwp 472 jdb - attaka localhost 8000.logcat - help - suodattimen spec. Print-lokitiedot näytölle Lisätietoja logcat-komennosta ja ANDROIDLOGTAGS - ympäristön muuttujasta on kohdassa Suodatuslähtö logcat-sivulla. ADBTRACE-ympäristömuuttujalla on pilkku - erotettu luettelo virheenkorjaustiedoista Log-arvoihin voi olla mikä tahansa seuraavista adb-liitäntäpaketeista rwx usb sync sysdeps transport ja jdwp. Disable dm-verity-tarkistus userdebug-rakenteilla dm-verity-vaihtoehto varmistaa, että kun käyttäjä käynnistää laitteen Että se on samassa tilassa, jolloin se oli viimeisen käyttökerran aikana Lisätietoja on kohdassa Verified Boot. Re-enable dm-verity-tarkistus userdebug - rakenteissa dm-verity-vaihtoehto varmistaa, että kun Käyttäjä käynnistää laitteen, joka on samassa tilassa, kun se oli viimeisen käytössä. Lisätietoja on kohdassa Verified Boot. Luo julkinen ja yksityinen salausavain yksityiselle avaimelle. Yksityinen avain tallennetaan tiedostoon. Julkinen avain tallennetaan tiedostoon ANDROIDVENDORKEYS-ympäristömuuttujalla on kaksoispisteistä erotettu avaintiedosto - tai hakemistoluettelo. Wait-for - transport - state. Voit odottaa, että laite on määritetyssä tilassa. Tilat Arvot voivat olla laitteen palautusta sivusuunnassa tai bootloader. transport Arvot voivat olla usb Paikallinen tai jokin. Ohjelman adb-tilan tulostaminen Adb-tilan voi tulostaa offline-käynnistyslataimen tai laitteen Lisätietoja on kohdassa Emulaattorin laiteasennusten kysely. Tulosta adb-laitteen sarjanumerojono. Lisätietoja on kohdassa Kysely emulaattorin laiteasenteista. Tulosta adb-laitteen polku. Ratkaa järjestelmän toimittaja ja oem-osioita luku-kirjoitustilassa. reboot käynnistyslataimen palautus sivusuunnassa sivutoiminto - automaattinen uudelleenkäynnistys. Voit käynnistää laitteen Tämä komento oletusarvoisesti käynnistää järjestelmän kuvan, b Ut tukee myös käynnistyslatainta ja palautusta. Käynnistyslatausvaihtoehto käynnistyy uudelleen käynnistyslataimeen. Palautusvaihtoehto käynnistyy takaisin talteenottomaksi. Sideload-vaihtoehto käynnistyy uudelleen ja aloittaa sideload-tilan. Sideload-auto-reboot - vaihtoehto on sama kuin sideload, mutta käynnistyy uudelleen sivun latauksen jälkeen. Side lataa asentaa APK-muotoon määritellyn täydellisen OTA-paketin laitteeseen. Jatka rekisteriin pääkäyttäjillä. Jatka rekisteriin ilman root-oikeuksia. Jatka adb-palvelimen kuuntelemista USB-portilla. Jatka adb-palvelimen kuuntelua TCP: llä määritetyssä portissa. Sisäinen virheenkorjaus Komennot. Varmista, onko adb-palvelimen prosessi käynnissä. Varmista adb-palvelimen prosessi. Voit muodostaa yhteyden uudelleen isännästä. Voit muodostaa yhteyden uudelleen laitteesta voidaksesi muodostaa uudelleenyhteyden. Voit käynnistää etäinteraktiivisen kuoren kohdelaitteessa Lisätietoja on kohdassa Issue Shell-komennot. shell - e escapechar - n - T - t - x komento. Valitse komentokomento kohdelaitteessa ja sulje sitten etäkaavio Käytä mitä tahansa seuraavista vaihtoehdoista Ns.-e Määritä välilyönti tai arvo none, jos et halua käyttää välilyöntiä Jos et anna arvoa, käytetään oletusavaimen merkkiä viivaa -.-n Älä lue stdin.- T Poista pseudo-päätelaitteen käyttö PTY-allokointi.-T Force PTY allocation.-x Poista etäpoistumiskoodit ja stdout stderr separation. Run emulaattorikonsolikomento Katso lisätietoja kohdasta Emulaattorin hallinta komentoriviltä. Käytä shell-komentoa antamaan laitekomentoja adb-tiedoston avulla tai syöttämättä sitä ADB: n etäkaapelia laitteeseen Jotta voit antaa yhden komennon syöttämättä kauko-kuorta, käytä tämänkaltaista komentokomentoa. Tai anna kauko-kuori tällaiselle laitteelle. Kun olet valmis poistumaan kauko-kuoresta, paina Control D tai kirjoita exit. Shellin komento-binäärit tallennetaan laitteen tiedostojärjestelmään järjestelmän bin. Note Android Platform-Tools 23 ja uudempi, adb käsittelee samoja argumentteja Tavalla, että ssh 1 - komento tekee This chan Ge on korjannut paljon ongelmia komennon injektoinnissa ja mahdollistaa nyt turvallisesti komentojen, jotka sisältävät shell-metakaraktereja, kuten adb-asennusta. Mutta tämä muutos merkitsee myös sitä, että minkä tahansa komennon, joka sisältää shell-metakaraktereja, on tulkittu esimerkiksi adb Shell setprop foo ab - komento on nyt virhe, koska paikallinen kuori nielaisee yksittäiset lainaukset ja laite näkee adb-shell-asetusp fooab: n. Komennon tekemiseksi lainaus kahdesti, kerran paikallisen kuoren ja kerran kauko-kuoren tapauksessa, Sama kuin sinä ssh: n kanssa 1 Esimerkiksi adb shell setprop foo a b. Call aktiviteettihallinta am. Adb-kuoren avulla voit antaa komentoja aktiviteetinhallintaohjelman työkalulla erilaisten järjestelmätoimien suorittamiseen, kuten käynnistää toiminto, Keskeyttää prosessi, lähettää tarkoituksen, muokata laitteen näytön ominaisuuksia ja paljon muuta Kun kuvaruudussa on syntaksi. Voit myös antaa aktiviteetinhallintakomennon suoraan adb: stä syöttämättä kauko-ohjelmaa e Xample. Table 2 Käytettävissä olevat aktiviteetin hallintakomennot. Käynnistysvaihtoehdot intent. Valitse toiminto, jonka tarkoitus on määritetty. Options are.-D Ota virheenkorjaus käyttöön.-W Odota, että käynnistäminen on valmis .-- start-profiler file Aloita profiili ja lähetä tulokset tiedostoon. - P-tiedosto Kuten - start-profiler, mutta profilointi pysähtyy, kun sovellus menee tyhjäkäynnille.-R count Toista toiminnan käynnistämisen laskenta-ajat Ennen jokaista toistoa, ylhäältä aktiviteetti on valmis.-S Voimaa lopettaa kohdesovellus ennen toiminnan aloittamista .-- opengl-trace Ota OpenGL-toimintojen jäljittäminen .-- user userid current Määritä, mikä käyttäjä voi toimia kuin ei ole määritetty, ja toimi sitten nykyisen user. startservice-vaihtoehdon tarkoituksina. Voit käynnistää palvelun, jonka tarkoitus on. User userid current Määritä, mistä käyttäjistä haluat suorittaa, jos sitä ei ole määritetty ja toimi sitten nykyisenä käyttäjänä. Pysäytä kaikki pakettiin liittyvä sovelluksen paketin nimi. kill - vaihtoehto. Pakkaa kaikki prosessit, jotka liittyvät paketin sovelluksen paketin nimeen. Tämä komento tappaa Vain prosesseja, jotka ovat turvallisia Tappaa ja joka ei vaikuta käyttökokemukseen. Optiot ovat .-- käyttäjän userid kaikki nykyinen Määritä käyttäjä, jonka prosessit tappaa kaikki käyttäjät, ellei ole määritelty. Kill kaikki taustatiedot. nopeusvaihtoehdot intent. Issue broadcast intent. Options are. --user userid kaikki nykyinen Määritä, mistä käyttäjistä haluat lähettää, jos ei ole määritetty, lähetetään sitten kaikille käyttäjille. instrumentointivaihtoehdot component. Start monitoring by Instrumentation instance Tyypillisesti kohdekomponentti on muoto testipaketti runnerclass. Options are.-r Tulosta raakaa tulosta muuten Dekoodata reportkeyannostettu lopputulos Käytä - e perf true tuottaa raakatuotetta suorituskyvyn mittauksiin.-e name value Aseta argumentin nimi arvoon Testijaksojen yhteinen muoto on - e testrunnerflag-arvo, arvo.-p-tiedosto Kirjoita profiilitiedot tiedostoon.-w Odota, että instrumentointi loppuu ennen paluuta Testaajien pakollinen .-- no-window-animaatio Sammuta ikkuna-animaatiot käynnissä .-- user userid current Määritä mikä käyttäjäinstrumentointi suoritetaan nykyisessä käyttäjässä, ellei ole määritetty. profile start process file. Start profiler Prosessin kirjoitus tuloksista file. profile stop process. Stop profiilissa prosessissa. dumpheap vaihtoehtoja prosessitiedosto. Dump kasaan prosessi kirjoittaa tiedosto. Optiot ovat .-- Käyttäjän userid nykyinen Kun Prosessinimen hankkiminen, käyttäjän määrittäminen prosessin käyttämiseksi käyttäjän käyttämälle käyttäjälle, jos sitä ei ole määritetty.-n Kopioi nollakokoa hallittujen heap. set-debug-app - vaihtoehtoiden sijaan. Valitse sovelluspaketti debug. Options are.-w Odota debuggeria Kun sovellus käynnistyy. - pysyvä. Säilytä tämä arvo. Poista paketti aiemmin asetettu virheenkorjausta varten set-debug-app. Start seuranta kaatuu tai ANRs. Options ovat .-- gdb Aloita gdbserv annetun portti kaatuu ANR. display - Kokoinen nollausleveys x korkeus. Valvo laitteen näytön koko Tämä komento on hyödyllinen testata sovellustasi eri näytön koon mukaan, kun jäljittelee pienen näytön tarkkuutta suurella näytöllä varustetulla laitteella ja päinvastoin. Esimerkiksi näytön koko 1280x800.Override-laitteen näyttö Tiheys Tämä komento on hyödyllinen testata sovellustasi eri näytön tiheyksien suhteen suurtiheyksisellä näytön ympäristössä pienitiheyksisen näytön avulla ja päinvastoin. Esimerkki näytön tiheydestä 480. Tulosta annettu intentti-määritys URI: ksi. Tulosta annettu inten T määrittely intentti-URI. spesifikaatio intent arguments. For aktiviteetti johtaja komennot, jotka ottavat aikomus argumentti, voit määrittää aikomuksen seuraavilla vaihtoehdoilla.-toiminto Määritä aikomus toimia, kuten Voit ilmoittaa tämän vain kerran - d Datauri Määritä aiejulkistustietojen URI, kuten sisällön yhteyshenkilöt ihmiset 1 Voit ilmoittaa tämän vain kerran - t-mimetyyppi Määritä tarkoituksenmukainen MIME-tyyppi, kuten kuva-png Voit ilmoittaa tämän vain kerran - c - luokasta Määritä aikomusluokka, kuten - n Komponentti Määritä komponentin nimi paketin nimen etuliitteellä, jolla luodaan eksplisiittinen tarkoitus, kuten - f flags Lisää lippuja aikeeseen, jota setflags --esn extrakey tukee. Lisää null extra Tätä vaihtoehtoa ei tueta URI-intents - e - Es extrakey extrastringvalue Lisää merkkijonoa avainarvoparina --exclusion extrabooleanarvo Lisää boolean dataa avainarvoparina --ei extrakey extraintvalue Lisää kokonaisluku dataksi avainarvoparina - ylimääräinen ylimääräinen ylimääräinen arvo Lisää pitkä dataa key-val Ue-pari --ef extrakey extrafloatvalue Lisää float-data avainarvoparina --eu extrakey extraurivalue Lisää URI-tiedot avainarvoparina --ecn extrakey extracomponentnamevalue Lisää komponentti nimi, joka muunnetaan ja välitetään ComponentName-objektiksi - - eia extrakey extraintvalue, extraintvalue Lisää joukko kokonaislukuja --ela extrakey extralongvalue, extralongvalue Lisää joukko longs --efa extrakey extrafloatvalue, extrafloatvalue Lisää joukko kellukkeita --grant-read-uri-lupa Sisällytä lippu FLAGGRANTREADURIPERMISSION - Myöntävä-kirjoittaa-uri-lupa Sisällytä lippu FLAGGRANTWRITEURIPERMISSION --laskenta-log-päätöslauselman Sisällytä lippu FLAGDEBUGLOGRESOLUTION - pakota-pysäytetty-paketit Sisällytä lippu FLAGEXCLUDESTOPPEDPACKAGES - sisällyttää-pysäytetty-paketit Sisällytä lippu FLAGINCLUDESTOPPEDPACKAGES - To-front Sisällytä lippu FLAGACTIVITYBROUGHTTOFRONT --aktiviteetti-selkeä-top Sisällytä lippu FLAGACTIVITYCLEARTOP --aktiviteetti-selkeä-kun-tehtävä-nollaus Sisällytä lippu FLAGAC TIVITYCLEARWHENTASKRESET --aktiviteetti-ei-katoamiset Sisällytä lippu FLAGACTIVITYEXCLUDEFROMRECENTS --aktiviteetti käynnistetty historiasta Sisällytä lippu FLAGACTIVITYLAUNCHEDFROMHISTORY --aktiviteetti-moninkertainen tehtävä Sisällytä lippu FLAGACTIVITYMULTIPLETASK --aktiviteetti-ei-animaatio Sisällytä lippu FLAGACTIVITYNOANIMATION - - aktiviteetti-ei-historia Sisällytä lippu FLAGACTIVITYNOHISTORY --aktiviteetti-ei-käyttäjätoiminto Sisällytä lippu FLAGACTIVITYNOUSERACTION --aktiviteetti-edellinen-on-top Sisällytä lippu FLAGACTIVITYPREVIOUSISTOP --aktiviteetti-uudelleenjärjestely eteenpäin Sisällytä lippu FLAGACTIVITYREORDERTOFRONT - - aktiviteetti-reset-tehtävä-jos-tarvitaan Sisällytä lippu FLAGACTIVITYRESETTASKIFNEEDED --aktiviteetti-yksi-top Sisällytä lippu FLAGACTIVITYSINGLETOP --aktiviteetti-selkeä tehtävä Sisällytä lippu FLAGACTIVITYCLEARTASK --aktiviteetti-tehtävä-on-home Sisällytä lippu FLAGACTIVITYTASKONHOME - - vastaanottaja-rekisteröity vain Sisällytä lippu FLAGRECEIVERREGISTEREDONLY - vastaanotin-korvaamaan-vireillä Sisällytä lippu FLAGRECEIVERREPLACEPENDING --s Elector Vaatii - d - ja - t-vaihtoehtojen asettamista aikataulutietojen ja - tyyppisten URI-komponenttipaketin asettamiseksi Voit määrittää URI: n, paketin nimen ja osan nimen suoraan, kun joku edellä mainituista vaihtoehdoista ei ole oikeutettu. Kun argumentti on epävarma, Työkalu olettaa, että argumentti on URI, jos se sisältää kaksoispiste, jonka oletetaan olevan argumentti, jos se sisältää eteenpäin-slash-muunnoksen, muuten se olettaa, että argumentti on paketin nimi. Kutista paketinhallinta pm. Adb-kuoren avulla voit antaa Komennot paketinhallintaohjelman pm työkalun kanssa toimien ja kyselyiden suorittamiseksi sovelluksiin, jotka on asennettu laitteeseen Kun kuvaruudussa on syntaksi. Voit myös antaa paketinhallintakomennon suoraan adb: stä syöttämättä kauko-ohjelmaa. Esimerkiksi taulukko 3 Saatavana Paketinhallinta komennot. list-paketit vaihtoehdot filter. Prints kaikki paketit, valinnaisesti vain ne, joiden paketin nimi sisältää tekstin suodattimessa.-f Katso niiden liittyvä tiedosto.-d Suodata näyttää vain poistetut paketit.-e Suodata Näytä vain sallitut paketit.-s Suodatin näyttää vain järjestelmäpaketit.-3 Suodata vain kolmansien osapuolien pakettien näyttämiseen.-i Katso pakettien asennusohjelma.-u Sisältää myös poistetut paketit .-- user userid Kyselyn tila-tila. Prints all known permission groups. list permissions options group. Prints all known permissions, optionally only those in group.-g Organize by group.-f Print all information.-s Short summary.-d Only list dangerous permissions.-u List only the permissions users will see. list instrumentation options. List all test packages.-f List the APK file for the test package. targetpackage List test packages for only this app. Take a screenshot. The screencap command is a shell utility for taking a screenshot of a device display While in a shell, the syntax is. To use the screencap from the command line, type the following. Here s an example screenshot session, using the adb shell to capture the screenshot and the pull command to download the file from the device. Record a video. The scre enrecord command is a shell utility for recording the display of devices running Android 4 4 API level 19 and higher The utility records screen activity to an MPEG-4 file. Note Audio is not recorded with the video file. A developer can use this file to create promotional or training videos While in a shell, the syntax is. To use screenrecord from the command line, type the following. Stop the screen recording by pressing Control C, otherwise the recording stops automatically at three minutes or the time limit set by --time-limit. To begin recording your device screen, run the screenrecord command to record the video Then, run the pull command to download the video from the device to the host computer Here s an example recording session. The screenrecord utility can record at any supported resolution and bit rate you request, while retaining the aspect ratio of the device display The utility records at the native display resolution and orientation by default, with a maximum length of three mi nutes. There are some known limitations of the screenrecord utility that you should be aware of when using it. Some devices might not be able to record at their native display resolution If you encounter problems with screen recording, try using a lower screen resolution. Rotation of the screen during recording is not supported If the screen does rotate during recording, some of the screen is cut off in the recording. Table 4 screenrecord options. Android ADB File Manager. A command line GUI GTK based Android ADB-based file manager. Recent Android releases Honeycomb 3 0 replace the older USB mount protocol with the use of MTP Massive Transfer Protocol Unfortunately this is still very buggy and doesn t work as it should in any machine I have tested and heard of system slowing down to a halt when transferring large number of files, files which are there but cannot be seen by the computer etc. So I decided to go ahead and build a little utility that would if not fix, at least alleviate the pain o f using Honeycomb devices aafm uses ADB one of the command line tools provided with the official Android SDK for communicating with the Android device This is the same method that IDEs implement. Python with PyGTK bindings, GTK, git, and the Android SDK. Getting these should be fairly straightforward if you re running any decent Linux distribution If you re using Windows I believe there are next-next-next installers for everything This leaves us with the third option which is Mac OS Up until recently there wasn t an easy way to get any PyGTK software working in Mac OS, but turns out you can now download a binary build of PyGTK for Mac OS with which aafm works quite well. It can be downloaded from more info Simply run the installer once downloaded, and then follow the instructions below as if you were running a proper Linux system. One note though there are a few hiccups with the Mac version, but they are mostly cosmetic and won t prevent you from enjoying the software Feel free to help cor recting them if you have the know-how. Clone this repository to a place you fancy For example, your Applications folder. Install the Android SDK. If it s not installed yet, download the SDK from its page and follow its instructions. Basically at least in Linux just download a zip file and unpack it to a known location In my case it s. Applications android-sdk-linux86 Once that is done, you need to make sure that the ADB tool is readily accessible from a shell which is what aafm uses internally. So to try that out, open a new terminal and type adb If it works, you should get a long help message that starts with something like Android Debug Bridge version 1 0 26 If it doesn t work, you ll get something akin to adb command not found. In case it doesn t work, you need to add the path to ADB to the environment PATH variable In Linux this is done by editing a file called in your home folder in Mac OS Locate a line that looks like PATH PATH and make it look like this. The line above appends ADB s path to whatever value PATH held before The path might be different, according to wherever you ve installed the Android SDK. Also, I haven t tried it myself, but it seems that it s possible to download and build a reduced subset of the Android SDK only, including ADB and a few more tools This doesn t require Java installed in the syst em This page describes how. Close terminal and open it again. So the changes to the PATH get current In Mac OS you might need to log in and out too. Configure udev rules if in Linux. You need to let the system know that when you connect your USB device i e the tablet it should allow you, as a non-root user, to access it If you don t do that, you ll get a Insufficient permissions for device error. This is done by adding a new file that contains so called udev rules. For example, in Ubuntu 10 10 you would add a file in with the following content. You can find out the idVendor value by running lsusb in a terminal That will output a list of the currently connected USB devices, such as for example this. Since I d like to add support for browsing my Nexus One phone because aafm works with every Android device that adb can connect to , I just need to look at the device with id 18d1 4e12 and add the following line to the udev rules file. Save it, and then change the file permissions. To make sure it wor ked, connect the device and try to run adb devices in a terminal If it s working properly, you should see a list more or less like this. The numbers aren t important, the important bit is that you see device instead of. If it isn t, you might need to either disconnect the device and try again, or reload udev so that the rules are actually loaded Try with this. If everything else fails, try to log in and out again, or maybe even restart the system. More information on udev rules and Android can be found on the official Android development guide. Enable Debug mode in the device. Go to Settings Applications Development and make sure the USB debugging checkbox is ticked You might get a scary warning saying debugging allows you to do nasty things--just ignore it. To execute it, cd to the place where it s been cloned. And simply execute it. If for some odd reason it has lost the executable permission, you can add it. Or simply execute it using Python. Once you re satisfied it s working, you can also ma ke a launcher or add it to your Gnome menu, of course. If everything works and why shouldn t it you should get a window divided in two panels The left side represents your host computer, and initially should show the files of the aafm directory, since you launched it from there The right side represents your Android device s files --so it needs to be connected to the computer, and USB debugging must be enabled in the device You can navigate just as you would do with your favourite file explorer Files can be dragged from one to another panel, directories created, and files renamed hint right click and explore the options the contextual menu offers you You can also drag from Nautilus in GNOME into the device panel, to copy files to the device, or drag to Nautilus, for copying files from the device. Be warned that currently the progress reporting is a bit hackish and with large files it will appear as if the window has got frozen It hasn t--it s just waiting for the ADB transfer to finish I n the future this should be fixed, but I haven t come up with the best solution yet. This software is licensed under a GPL V3 license Please read the accompanying file for more details, but basically, if you modify this software and distribute it, you must make your changes public too, so that everyone can benefit from your work--just as you re doing with mine. You can also make your changes public even if you don t plan on redistributing this application, okay Sharing is good. Several bug fixes and refactoring, plus a nice addition for those using desktop systems in Linux. New file and icon allows users to launch aafm from GNOME KDE etc menus shells launchers Huulivoide Fixes 35.New script for making aafm available system-wide Huulivoide Fixes 35.Fix refactor copying files between host and device sole xisberto Fixes 33 and 37.Gracefully handle unknown uids and gids sole and muflone Fixes 8 and 39.Many interesting bug fixes and new features thanks to the work of Norman Rasmussen and Micha Kowalczuk Thanks. Add BusyBox support by sammael Fixes 11.Handle device drops when there s no row present by normanr Fixes 9.Handle symlinks on the device correctly by normanr Fixes 12.Quote Unquote special characters in drag drop messages by normanr Fixes 10.Slightly improve the README Clarify how to find out the device Id, add link to PyGTK binary for Mac users. Move the TO DO list items that were on this README file over to the issue tracker in the project s page. Fix issue 4 use correct path separator in device when running under Windows. Fix issue 5 support for finding out ownership in Windows. Python 3 compatibility. Start using REVISION file. Fix issue 3 ls - la fails in some devices. First initial release basic functionality is here. I m by no means a GTK Python ADB Android expert I m just learning so this project will surely contain many things that can be improved or that are plain wrong, so feel free to clone the repository and submit pull requests. In order to make your life a bit eas ier I ll roughly show what each file does. - a class that communicates with an Android device, using ADB via shell commands Takes care of copying and reading files, listing and parsing directories, etc. - this is the GTK front-end Takes care of building the window with the host and device panels, and issuing instructions to Aafm when the user requests something to be done. - a utility class that encapsulates a GTKTreeView and some more things in order to show file listings. - an awesome class developed by the guys of Quod Libet, that allows more than one element of a TreeView to be selected and dragged around. As you can see, an GUI counterpart is missing There was one at the beginning but I didn t redo it when I rewrote most of the code from scratch Feel free to you know what, if you re interested in having a CLI version. This was initially developed in an Ubuntu Linux 10 10 system I thought it wouldn t work on other systems, but it seems people are using it in a lot of places though Some environments where it s known to work. I m now using Github s issue tracker to keep track of issues, bugs and wished-for features. If you d like to have a certain feature or think you ve found a bug that is not in the list, please add it to the issue tracker at. What Is ADB And How To Install It With Android SDK. When it comes to Android modding, most novice users are confused or left wondering by reference over reference to a certain adb This is specially true when you are l ooking up something on modding your device, or root it in particular ADB is the wonder toy of Android and everyone seems to love it, so lets have a look at understanding what it is and why you need it, and how you can get it. ADB stands for Android Debug Bridge It comes as a part of the standard Android SDK, which you can grab here Basically, it provides a terminal-based interface for interacting with your phone s file system Since Android platform is based on Linux, command-line is the only way to obtain and manipulate root access often required to perform certain advanced operations on your device using root access. While these things can be done directly on the device itself using some terminal emulator, it will be rather difficult to execute complex commands on such a small screen ADB provides the bridge between your machine and your computer. How To Install ADB. Step 1 Installing the Android SDK. Note At the time of updating this guide, the latest version of the Android SDK available i s r8 and we shall be using it throughout the rest of the guide The tools will work the same way however, even if you get a later version In case of earlier versions though, the location of some of the tools was different and it is recommended that you get the latest available version. The first step is to download the SDK Use the link given at the end of this post and download the latest version of the Android SDK from there There are versions available for Microsoft Windows, Linux and Mac OS X In case of Windows, both an installer and a zip file are available but there isn t any need to use the installer as a formal installation is not required. Once you have downloaded the SDK, simply extract the compressed file to a location on your computer In our case, we have extracted it to the root of our C drive and that makes C android-sdk-windows the installation location of the SDK From here onwards, we shall be referring to this location as the SDK folder. Step 2 Downloading the SDK Platform Tools. Previously, ADB used to be included in the SDK by default in the tools sub-folder but now, it has been relocated to the platform-tools sub-folder which needs to be downloaded as an SDK package Fortunately, this is quite easy. Just browse to the SDK folder and launch SDK Manager When launching it for the first time, it will present you with a window to choose packages to install The first option begins with Android SDK Platform-tools Make sure it is checked, and uncheck all the other packages for now You can check uncheck a package by clicking on its name and then selecting the Accept Reject radio button Your window should look like this. View in gallery. Now simply click Install and wait till the platform tools are installed Once the process is done, you will have a platform-tools folder inside your SDK folder That folder will include ADB and all its dependencies. Step 3 Setting the Path variable. Now you have ADB installed but using it this way will require you to either use the comp lete path of the ADB command C android-sdk-windows platform-tools adb or to first change directory to the platform-tools subfolder of the SDK folder each time, and this can become quite a hassle To make ADB along with other Android SDK tools and platform tools easily accessible from anywhere at the command line, we shall add their paths to the PATH environment variable This method will apply to Windows users only If you are a Linux or Mac user, add the tools and platform-tools sub-folders of the Android SDK to your system s PATH variable using the standard method for your operating system. If you have no experience with editing system environment variables, make a System Restore point now so that you can revert back to it in case something goes wrong. If you are using Windows 7, right-click the Computer icon and click Properties Now click Advanced System Settings from the options in the left pane to bring up the System Properties window Windows XP users will directly get this window when they right-click My Computer and click Properties. In the System Properties window, click the Environment Variables button on the Advanced tab View in gallery. Find Path in the System variables section and double-click it to edit it. Make sure NOT to delete the existing entry in Variable value or it will mess up things on your computer Just add the following string to the end of it, including both the semi-colons. If you have extracted the SDK s contents to another directory, make sure to use that one for your PATH variable. After adding the string, this is what my Path variable looks like. Don t worry if yours does not include some of the other text what is important is the way the new entry should be added to the existign one, and the way the previous entries MUST be left unchanged Notice that the semi-colons are necessary to separate each path variable entry from the next and previous ones Once you have added the path, your machine may require a reboot. In case you messed up while editing the Path variable and ended up deleting the previously existing entries, just restore the System Restore point you made and retry, being more careful this time. Step 4 Installing the USB drivers. Finally, you need to install the USB drivers You may or may not need to perform this step, depending on your device If you are using a device that ships with stock Android operating system such as the Nexus One, this will be necessary In case of other devices that ship with their custom version of Android and some tools to sync the device with the PC, such as devices from HTC that ship with HTC Sync or devices by Samsung that ship with Samsung s own software, the suitable driver for your device will be automatically installed with that software package. The first step will be to download the USB drivers To do this, launch SDK Manager from the SDK folder and click on Available packages in the left pane. Expand Third party Add-ons followed by Google Inc add-ons and check Google Usb Driver package , as shown in this image. View in gallery. Click Install Selected and in the window that pops up, click the Accept all radio button followed by the Install button Wait patiently while the USB drivers are downloaded and installed in the Android SDK. The drivers for both 32 bit and 64 bit systems will now be present in the SDK folder under usbdriver x86 and usbdriver x64 sub-folders respectively. Now that the USB drivers have been downloaded, you can install them to your computer as follows. On the device, go to home screen, press Menu select Applications Development and enable USB Debugging. Now connect your phone to the PC via USB New hardware installation should kick in, and it will start looking for the drivers. Manually point the drivers to the folder suitable for your operating system and let them install. Once drivers have installed, you can verify successful installation by going to Device Manager Your phone should be showing under ADB Interface , like in this example. View in gallery. How to Use ADB. At this point, the setting is done Here on you can simply use adb to manipulate your phone in whatever way you like On Windows, the best way to do so is using command prompt To ensure that adb has been set up properly, run command prompt and type adb devices and hit enter Your connected device should show up with a serial number. View in gallery. This is it for this guide We would like to emphasize that playing with your phone at this level can be dangerous if you don t know what you are doing, and can even render the phone completely useless Please do it at your own risk. For a complete list of adb commands, check out the official adb guide here. Editor s Note ADB is for advanced users only If you need ADB with a Graphical User Interface, check out QtADB. I ve tried it, but. a Doesn t work with Samsung driver you said since I had Samsung drivers already installed, this didn t happen to me b Tried to uninstall all samsung programs drivers and then Windows 7 Ultimate 64b doesn t re cognize the driver in the folder usbdriver inside amd64 there isn t any file it seems that the new driver version is a little different c I ve foreced Windows to use the android driver and, instead of ADB Interface Samsung Android Composite ADB Interface in the Device Manager, I get Android Phone Android Composite ADB Interface d adb devices command said List of devices attached , and nothing else. happened to me too. I ve tried with vmware XP Pro 32bits , but I can t even force to install android drivers. BTW can t make kies nor pcstudio connect to my phone in Win7 or VM WinXP. I was also looking for the platform-tools folder, but there was none So I looked around on the net There is no platform-tools in the latest version You need to download through the android SDK Manager. If you are developing in Eclipse with ADT, note that SDK Tools r8 is designed for use with ADT 8 0 0 and later After installing SDK Tools r8, we highly recommend updating your ADT Plugin to 8 0 0.Also note that SDK To ols r8 requires a new SDK component called Platform-tools The new Platform-tools component lets all SDK platforms Android 2 1, Android 2 2, and so on use the same latest version of build tools such as adb, aapt, aidl, and dx To download the Platform-tools component, use the Android SDK Manager, as described in Adding SDK Components Upgrading from SDK Tools r7.If you are upgrading to SDK Tools r8 from an earlier version, note that the the default installed location for the adb tool has changed from tools adb to platform-tools adb This means that you should add the new location to your PATH and modify any custom build scripts to reference the new location Copying the adb executable from the new location to the old is not recommended, since subsequent updates to the SDK Tools will delete the file. I updated and the platform-tools folder was added with the file that is needed Hope this helps you guys. Thanks, recently updated the guide to reflect the changes in the latest version. I got evert hing installed and done until it says connect device and windows will install driver but mine woulnt install it It keeps saying it was unsuccessful If anybody knows what i can do to fix it plz help. From device manager, choose to update driver Do not select search automatically and instead go for browse my computer for driver software In the next step, do not choose to search for driver software in a location and choose Let me pick from a list of device drivers on my computer Then select Show all devices or something similar, click Have disk and browse to the google-usbdriver folder in the SDK location Select the file and click Open Finally, accept any prompts and or warnings that you might get and continue with the driver installation Works like a charm for me with all the devices that support the Google-provided drivers Doesn t work for Samsung Galaxy S series devices and may not work with some HTC devices you will need drivers by the manufacturers in those cases In case of Samsung, g et Kies In case of HTC, get HTC Sync. When I go into the folder google-usbdriver and click on it says that the folder you specified doesn t contain a compatible software driver for your device If the folder contains a driver, make sure it is designed to work with Windows for 32-bit systems please help. Since Android platform is based on Linux, command-line is the only way to obtain and manipulate root access. Um what decade no, what MILLENNIUM are you in It surprises me to see this type of INCORRECT nonsense about Linux being spread in the 21st century. I don t know when you last used Linux, but it s all I use and the command line most definitely is NOT the only way to obtain manipulate root access Note that it is MY preferred method, but I date back to command line only UNIX in the 1980s, so, yeah, it s quicker for me than any of the GUI tools. Anyone who prefers using GUI-based apps such as file managers can do so and still have root access, while logged in as a normal user. Agreed it shou ldn t be called the only way Editing the guide to correct this Thanks for bringing this to my attention. I was hoping this ADB will let me find a way out of a 3 weeks problem But I am stuck at Step 4 Am on W7 64 bits and connecting to a Wits A81G tablet I have installed Google USB driver package When I connect my tablet, nothing happens Windows does not detect Though, when I go to device manager, I see A81E under other devices , but with missing driver Whether I search automatically or manually, I cant find the driver Now what. I m kinda new at this I ve followed all the steps, and I know from other guides that I have ADB and the SDK installed correctly but I cannot get past the Variable section of this guide In my Enviromental Variables dialog box, I only have a TEMP and TMP to select from there is no PATH as pictured above I m not sure how to move forward Can anyone help, or refer me to another guide that could help I m not even sure what to try and GOOGLE for help on this one. You re l ooking at the User variables section Check the System variables section right below that one it ll have many more variables along with PATH. Here is how I got around the adb command not being recognized. The problem was that the PATH listed above was not the PATH that my computer had platform-tools and tools under The PATH above, c android-sdk-windows toolsc android-sdk-windows platform-tools, was to brief and it was causing my computer Windows 7 64 Bit OS to look in the wrong place. Thus, I clicked on the computer tab, then c drive, then Program Files x86 , then Android, then android-sdk, and then the files platform-tools and tools So, this is what my PATH looks like now, and it works when I type adb devices in command prompt after entering cd twice. C Program Files x86 Android android-sdk toolsC Program Files x86 Android android-sdk platform-tools. The last kite I ll fly is what the example above demonstrates be specific I noticed that my android-sdk folder had no - windows text in its nam e at all, so I axed it and added a one-step-after-the-other PATH Hope this helps any dudes gals that were struggling because it certainly took me over half a day to put the pieces together. THIS IS AN IMPORTANT STEP. Thanks KJR GENIUS. Is there a program for Windows 7 or for the Andriod to share the display of the device Andriod Optimus on to the computers monitor Dell Inspiron mini. Well been spending 3 days trying to get honeycomb 3 on Nook As in this thread no drivers found for nook I look in usb driver in SDK folder and they are not there So when I direct to folder nothing I have Windows 7 64, if that means anything-saw thread to change variables in path Would changing that do it Solution would be appreciated-this puzzle needs to be solved for my psychy Thanks. I have windows 7 64bit Maybe I do not have latest Java update Which Java do I download for my system I did search and too many out there Direction appreciated, thanks PS-could it be the Java download. Hate to be a pain, but invested time and money with this Nook and seem so close, but can not get there I think I installed the correct Java it is the developers Java 6 update 25-When I install the Google drivers and cl ose out of SDK-there is an error box states that Java 64 not found and it says something about path amd user variables add It asks to add this C C Program to path I added it to the same place that you asked to add c android-sdk-windows toolsc android-sdk-windows platform-tools I did that added to the end of the android path and before it and that error still comes up I can not get past the error Could that be the problem why there are no drivers found and that there are no drivers in the folder Is there a work around this PLEASE could someone assist or direct me to a solution Much appreciated, thanks. Been trying to get Google apps on my Nook with Honeycomb I get connected and no drivers found Been reading these comments and not the only one Two solutions might be the problem and newbie here One is there file in the usb drivers file Where is it and how can I get it Two-reading about adb exe I have that in platform tools Do I need to run this for nook If so, I tried command prompt and put adb devices in and nothing do I run that. Just figured out and ran adb devices with nook plugged in and said list of devices and nothing was listed Helppppp. Looked in usb drivers and there is androidwinusb there but there is no at the end-it just says that Should it have the inf there to find driver Is that the problem If so-how can I fix it Seems to be close to answer Thanks. adding more detail I go through device manager and get to have disk-I see the android-winusb and it does not highlight where underneath that it does have there Does this help. Win 7 64 bit I ve followed instructions for installing ADB, but keep getting following message Android SDK Manager Output WARNING Java not found in your path Checking if it s installed in C Program Files Java instead 64-bit Java was found at C Program I have added this to Path entry in User variables , but message still displays Any ideas will be much appreciated. Thanks for such a nice article. i followed all the instruction above but the cmd said adb is not recognize as a external or internal command can you post a reply for help pls. THANK YOU FOR EXPLAINING WHAT ADB STANDS FOR And for showing me where it should show up in the Device Manager Now my Coby Kyros MID7015 is rooted and CWR is working as they should. anyone please help me. i connected the playbook to my PC WIN7 64bit and done all steps when opening the Command and type adb connect 169 254 0 1 5555 it says unable to connect any clue. Nice article, however it would been better if you had informed us that you need have java jdk installed prior to installing android sdk All these huge downloads are killing me. For those of you having issues with getting ADB to work, as someone else said, triple check your paths, mine was slightly different from the example posted and it took me hours to finally see I was typing it in wrong. I have ADB installed correctly, however, my computer is not recognizing the nook when its attached It shows as a removable drive under my computer bu t when I click on it, it says please insert a disk into drive X Also, when I use the command prompt and type adb devices, it correctly says list of devices but then doesnt show any devices The Nook is showing as an Android Phone under my device manager with Android Composite ADB Interface. Any suggestions on why the nook is not being recognized I am running Win Vista SP 2, 32 bit. I also followed everything on my Nook and it is also only showing up under Android Phone and Android Composite ADB Interface Would love any help anyone can give us Thanks. why it should be that complicated in connecting usb, just to apply application in the android why not make things easy. I have been trying to root my phone now for several hours I cant even begin because I can t seem to get the drivers for my Samsung Epic 4G to install on my PC It keeps failing when it gets to the last step Installing ADB Will the above-mentioned allow me to finally successfully install the drivers needed for my PC running Wind ows 7 to access recognize the phone. installed adb interface for my motorola defy all right. the problem is adb devices command is showing two devices one is like this.016B22 device and when runnig the adb forward tcp 4747 tcp 4747 it says error more than one device and emulator. even if i disconnect my motorola defy and run cmd adb devices it shows a device with offline tag as mentioned above how to remove this device. Hi, I m using windows 7 and am trying to use DroidCam, but can t seem to understand anything I eventually found my way here and followed all the steps to getting ADB as it is needed for the usb connection for DroidCam I followed all steps successfully until the very last one I type in adb devices as said but I get the message. adb is not recognized as an internal or external command, operable program or batch file. Yeah I m using Windows XP but I got the same problem. After i root my phone what all am i looking to have will i have to download some sort of txt messenger dialer im new to this rooting business and im not even 100 sure what exactly rooting does to my phone is my phone gonna look the same after im done or does rooting mean that you erase the OS and have to install a new one Im not a complete idiot i just dont have time to research 6 thousand forums to learn about it all and would like a quick explanation if anyone can help, id appreciate it. Rooting is the act of gaining administrator acsess on your phone For the most part nothing will change unless you want it to Rooting gives you super user access allowing you to do things like over clock or edit the root system folders Now you can install custom roms or new is versions from third party developers but that is completely different from rooting. Absolute brilliance Well done. I ve been at this for 16 hours now, and I m still clueless. I ve followed all the steps here, but in the Command Prompt section, I m getting adb server is out of I m not sure if this is a major issue, because after a couple sec onds it then says daemon started successfully My real problem is in the Devices Manager bit I don t see ADB Interface , only Android USB Device My HTC I am assuming that s rather crucial for me to carry on with downgrading the firmware and rooting the phone. were i can find the sdk platform tool window as shown in your 1st screenshot and the android sdk and AVD manager as shown in your 3rd screenshot I downloaded the android sdk but i can t get into your step you help pls. I would like to to talk to you in private by a problem I have with a phone I bought from China. My email is It would be great if you have somewhere your email address to contact with the blogger. what do i have to do if usb debugging was disabled can someone teach me thanks.
Comments
Post a Comment