Les étapes pour l’installation de ADB afin d’avoir un shell sous Android via le Mac. C’est pour faire suite à mon article https://www.cyber-neurones.org/2018/01/asus-zenfone-applications-de-mauvaises-qualites/ , et mieux savoir où sont les 25 Go de mémoire interne. Il y a baleine sous gravillon….
Etape n°1 : Installation de Homebrew ( à noter que j’ai ruby sur mon Mac OS )
-
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Etape n°2 : Mise à jour de Xcode :
- Downloading Command Line Tools (macOS High Sierra version 10.13) for Xcode.
Etape n°3 : Installation de adb :
brew cask install android-platform-tools
…
==> Tapping caskroom/cask
Cloning into '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask'...
remote: Counting objects: 3979, done.
remote: Compressing objects: 100% (3945/3945), done.
remote: Total 3979 (delta 36), reused 683 (delta 30), pack-reused 0
Receiving objects: 100% (3979/3979), 1.36 MiB | 1.21 MiB/s, done.
Resolving deltas: 100% (36/36), done.
Checking out files: 100% (3964/3964), done.
Tapped 0 formulae (3,988 files, 4.3MB)
==> Creating Caskroom at /usr/local/Caskroom
==> We'll set permissions properly so we won't need sudo in the future
Password:
==> Satisfying dependencies
==> Downloading https://dl.google.com/android/repository/platform-tools_r27.0.1-darwin.zip
######################################################################## 100.0%
==> Verifying checksum for Cask android-platform-tools
==> Installing Cask android-platform-tools
==> Linking Binary 'adb' to '/usr/local/bin/adb'.
==> Linking Binary 'dmtracedump' to '/usr/local/bin/dmtracedump'.
==> Linking Binary 'etc1tool' to '/usr/local/bin/etc1tool'.
==> Linking Binary 'fastboot' to '/usr/local/bin/fastboot'.
==> Linking Binary 'hprof-conv' to '/usr/local/bin/hprof-conv'.
==> Linking Binary 'sqlite3' to '/usr/local/bin/sqlite3'.
? android-platform-tools was successfully installed!
Etape n°4 : Utilisation :
-
adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
Etape n°5 : Installation sur le smartphone :
Installation de ADB Shell :
- http://adbshell.com
- https://play.google.com/store/apps/details?id=com.cgutman.androidremotedebugger&hl=fr .
Etape n°6 : Configuration du port (5037 et non 5555) et de l’IP du Mac avec le smartphone (par exemple avec la commande ifconfig | grep “inet " | grep -v 127.0.0.1 on peut savoir quel est l’IP)
Etape n°7 :
adb shell
A suivre … pour le lancement de la commande : du -d 1 -H / 2> /dev/null | sort -r -n .
Pour la résolution de problème de l’Etape n°6, la première étape c’est de mettre le telnet pour voir si le port est bien en écoute sur votre Mac:
brew install telnet
A noter que vous pouvez aussi utiliser la commande :
lsof -n | grep LISTEN | grep ^adb
La deuxième étape cela peut être de faire un tcpdump :
tcpdump -i en0 port 5037 -s0
