Useful shortcuts for vi editor

Showing posts with label adb. Show all posts
Showing posts with label adb. Show all posts

Saturday 2 April 2016

How to capture packages with adb shell?

e.g. 
CMD> adb shell 
# tcpdump -vv -i any -s 0 -w /data/01.pcap
(-v; verbose, -i; interface, -s 0;capture all bytes of data within the packet)

to take the pcap file from the phone;
CMD> adb pull /data/01.pcap

Wednesday 23 March 2016

How to install adb shell?

Please follow the steps:
  1. Download adb kits from here
  2. Unzip zip file under C:\ directory as "adb"
  3. Add these variables into system variables
    Path -> C:\adb
    ANDROID_ADB_SERVER_PORT -> 7030
  4. Now, open new cmd screen and see that you are able to use adb :)
If you do not know how to use adb, please go there


Monday 8 June 2015

How to use adb (android debug bridge) cmd tool?

First, you need to connect your devices to PC with adb.

e.g.
CMD> adb devices
result; abcdabcdxxx device

- start adb from different port
e.g.
CMD> adb -P 1111 start-server

- Install .apk package
e.g.
CMD> adb install mytool.apk

- Get logs from android device e.g.
CMD> adb logcat -d > mydevicelogs.txt

- Start-Stop adb server
CMD> adb start-server
CMD> adb kill-server

- Remount devices
CMD> adb remount

- Reboot devices
CMD> adb reboot

Enter to shell (linux)
CMD> adb shell

Gain read-write access for /system path to get rid of "Read-only file system" error
CMD> adb shell
# mount -o rw,remount /system

- Revert to read-only access for /system path
CMD> adb shell
# mount -o ro,remount /system

- Define a new folder
CMD> adb shell mkdir /tmp/example

- Send a file into phone
CMD> adb push config.txt /tmp/example

- Get a file from phone
CMD> adb pull /tmp/example/config.txt