Android Developer Bridge - adb: Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
 
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 15: Zeile 15:
  
 
== Die wichtigsten Befehle für adb und fastboot ==
 
== Die wichtigsten Befehle für adb und fastboot ==
 +
adb devices
 +
Verbundene Geräte anzeigen (immer als Test verwenden)
 +
=== APK installieren ===
 +
adb install <app name.apk>
 +
Vom PC installieren
 +
 +
adb install -r <app name.apk> [The -r option allows you to re-install or update an existing app on your device]
 +
adb install -s <app name.apk> [The -s option lets you install app to SD card if the app supports move to SD card feature]
 +
 +
adb uninstall <app name.apk>
 +
 +
=== Boot und Unlock ===
 
  adb reboot
 
  adb reboot
This command reboots your device in normal mode. You can use it when you’ve flashed something on your device and wish to reboot
+
This command '''reboots your device in normal mode'''. You can use it when you’ve flashed something on your device and wish to reboot
  
 
  adb reboot recovery
 
  adb reboot recovery
If a recovery is already installed on your device, this command will restart device in recovery mode.
+
'''restart device in recovery mode''' (wenn recovery installiert ist).
  
 
  adb reboot bootloader
 
  adb reboot bootloader
Bootloader is crucial when unlocking & other tasks. This command restarts your device in bootloader mode.
+
Bootloader is crucial when unlocking & other tasks. This command restarts your device in '''bootloader mode'''.
  
 
  adb reboot fastboot
 
  adb reboot fastboot
Instead of going to bootloader mode and then choosing fastboot, this command takes you directly to fastboot mode that helps you flash custom recoveries & ROMs on your device.
+
Instead of going to bootloader mode and then choosing fastboot, this command takes you '''directly to fastboot mode''' that helps you flash custom recoveries & ROMs on your device.
  
 
  fastboot oem unlock
 
  fastboot oem unlock
When in fastboot , this command unlocks your device (unlocking bootloader is necessary for custom recoveries & ROMs on a stock device)
+
When in fastboot , this command '''unlocks your device''' (unlocking bootloader is necessary for custom recoveries & ROMs on a stock device)
  
 
  fastboot reboot bootloader
 
  fastboot reboot bootloader
Rebooting your device from fastboot mode to fastboot mode again in a fresh session (recommended as a fresh when flashing multiple items)
+
'''Rebooting your device from fastboot mode to fastboot mode again''' in a fresh session (recommended as a fresh when flashing multiple items)
  
 
  fastboot flash recovery recovery.img
 
  fastboot flash recovery recovery.img
Command to flash a custom recovery on your device (make sure the img file of the recovery is renamed ‘recovery.img’ and is present in platform tools folder)
+
Command to '''flash a custom recovery on your device''' (make sure the img file of the recovery is renamed ‘recovery.img’ and is present in platform tools folder)
 +
 
 +
=== OEM Software ===
 +
VORSICHT !
 +
 
 +
'''Anzeigen'''
 +
adb shell
 +
cmd pm list packages | grep '<OEM/Carrier/App Name>'
 +
'''Entfernen'''
 +
pm uninstall -k --user 0 <name of package>

Aktuelle Version vom 11. November 2017, 08:54 Uhr

Das Schweizer Taschenmesser des Android Entwicklers

Ist in Android Studio enthalten, aber für viele Dinge reichen die kleinen Tools alleine aus.

Die wichtigsten Werkzeuge für den Einstieg sind in den Google Platform Tools enthalten: Platform-Tools is a component of the Android SDK and it includes different tools, such as ADB, fastboot, and systrace.

Basics

Links[Bearbeiten]

https://developer.android.com/studio/releases/platform-tools.html

Download[Bearbeiten]

Windows https://dl.google.com/android/repository/platform-tools-latest-windows.zip Mac https://dl.google.com/android/repository/platform-tools-latest-darwin.zip Linux https://dl.google.com/android/repository/platform-tools-latest-linux.zip

Die wichtigsten Befehle für adb und fastboot[Bearbeiten]

adb devices

Verbundene Geräte anzeigen (immer als Test verwenden)

APK installieren[Bearbeiten]

adb install <app name.apk>

Vom PC installieren

adb install -r <app name.apk> [The -r option allows you to re-install or update an existing app on your device]
adb install -s <app name.apk> [The -s option lets you install app to SD card if the app supports move to SD card feature]

adb uninstall <app name.apk>

Boot und Unlock[Bearbeiten]

adb reboot

This command reboots your device in normal mode. You can use it when you’ve flashed something on your device and wish to reboot

adb reboot recovery

restart device in recovery mode (wenn recovery installiert ist).

adb reboot bootloader

Bootloader is crucial when unlocking & other tasks. This command restarts your device in bootloader mode.

adb reboot fastboot

Instead of going to bootloader mode and then choosing fastboot, this command takes you directly to fastboot mode that helps you flash custom recoveries & ROMs on your device.

fastboot oem unlock

When in fastboot , this command unlocks your device (unlocking bootloader is necessary for custom recoveries & ROMs on a stock device)

fastboot reboot bootloader

Rebooting your device from fastboot mode to fastboot mode again in a fresh session (recommended as a fresh when flashing multiple items)

fastboot flash recovery recovery.img

Command to flash a custom recovery on your device (make sure the img file of the recovery is renamed ‘recovery.img’ and is present in platform tools folder)

OEM Software[Bearbeiten]

VORSICHT !

Anzeigen

adb shell 
cmd pm list packages | grep '<OEM/Carrier/App Name>' 

Entfernen

pm uninstall -k --user 0 <name of package>