Lecture 9: ADB Topics: Basic ADB Commands.

Slides:



Advertisements
Similar presentations
1.A tool helps us mange the state of an emulator instance or Android-powered device 2.It is client-sever program that include three comopnents: 1). A.
Advertisements

Android Tools & Wireless ADB Αντρέας Λύμπουρας Θεόφιλος Φωκάς Ζαχαρίας Χ’’Λάμπρου.
1 Introduction to UNIX Ke Liu
CADENCE Chintan Trehan 06/27/06. IC Design Flow System-Level Design Circuit-Level Design Physical level Design Layout verification Submit to Foundry Device.
ATS Programming Short Course I INTRODUCTORY CONCEPTS Tuesday, Jan. 27 th, 2009 Essential Unix Commands.
Get android development environment running. Install – Get and install JDK 5 or 6 (see link in the.
Lesson 22 – Introduction to Linux Systems Administration.
Android Debug Bridge (adb) Chien-Chung Shen CIS, UD
Debugging Android Applications
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
Lecture 8 Configuring a Printer-using Magic Filter Introduction to IP Addressing.
A crash course in njit’s Afs
Linux Shell. 2 Linux Command-Line Interface ■ Linux shells: A shell is a command interpreter that allows you to type commands from the keyboard to interact.
CS 141 Labs are mandatory. Attendance will be taken in each lab. Make account on moodle. Projects will be submitted via moodle.
Intro to Android Programming George Nychis Srinivasan Seshan.
V Avon High School Tech Crew Agenda Old Business –Delete Files New Business –Week 10 Topics: Coming up: –Yearbook Picture: Feb 7 12:20PM.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
CS5103 Software Engineering Lecture 08 Android Development II.
Hacking Linux Systems.  Text Editors  vi, ex, pico, jove, GNU emacs  Shells  chs (C Shell), sh (Bourne Shell)  File navigation  cd, ls, cp, mv,
Java Android-8 Imran Shafi. Lecture Contents  Debugging Android Projects  Java/XML Errors  Debugger  Logcat Utility  Android Debug Bridge (adb) 
Linux Services Muhammad Amer. 2 xinetd Programs  In computer networking, xinetd, the eXtended InterNET Daemon, is an open-source super-server daemon.
Android Security Auditing Slides and projects at samsclass.info.
Unix/Linux cs3353. The Shell The shell is a program that acts as the interface between the user and the kernel. –The shell is fully programmable and will.
Android Debug Bridge (adb) Chien-Chung Shen CIS, UD
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
November 5, 2015CIS 118 Intro to UNIX What’s a Unix? Unix is an Operating System Designed for high-traffic usage Many variants –Linux, BSD: free versions.
UNIX History - joint venture between MIT and Bell Labs (originally called Multics) – Ken Thompson (AT&T) created an operating system to run Space.
Slides and projects at samsclass.info. Adding Trojans to Apps Slides and projects at samsclass.info.
Linux Commands C151 Multi-User Operating Systems.
CITA 310 Section 8 Extending the Web Environment (Textbook Chapter 9)
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
Learning basic Unix command It 325 operating system.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
Lecture 8: FTP into CS System Topics: FTP connect, browse, upload, download Date: Mar 8, 2016.
Mobile Device Development
Mobile Hacking - Fundamentals
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Introduction to the Linux Commandline
SOP for CSD Log Capture Tool V0.1_
Commands Basic syntax of shell commands UNIX or shell commands have a basic structure command -options target command comes first (such as cd or ls) any.
Linux 101 Training Module Linux Basics.
CCNA Routing and Switching Routing and Switching Essentials v6.0
Linux Commands Help HANDS ON TRAINING Author: Muhammad Laique
Andy Wang Object Oriented Programming in C++ COP 3330
UNIX Introduction History Main Features UNIX Operating System
FTP Lecture supp.
Some Linux Commands.
C151 Multi-User Operating Systems
Lecture #3 Modern OS characteristics
Part 3 – Remote Connection, File Transfer, Remote Environments
Managing Software.
Chapter 10: Device Discovery, Management, and Maintenance
CCNA Routing and Switching Routing and Switching Essentials v6.0
Introduction to GNU/Linux (Fedora) Command Line Interface
Lab 1 introduction, debrief
Android training in Chandigarh. What is ADB ADB stands for Android Debug Bridge. It is a command line tool that is used to communicate with the emulator.
How to Fix Android File Transfer Not Working on Mac?
Don’t predict but define the age of your Mobile App
Lecture #3 Modern OS characteristics
Chapter 10: Device Discovery, Management, and Maintenance
Internet-of-Things (IoT)
CS5103 Software Engineering
CS 60 Discussion Review.
Introduction to Computer Organization & Systems
Working with Mac OS and Linux
Remote Computing Services Cloud connection Distributed system
1.3 Given a scenario, apply appropriate Microsoft command line tools
Lecture 11: ADB Topics: Basic ADB Commands.
Presentation transcript:

Lecture 9: ADB Topics: Basic ADB Commands

What is ADB? Android Debug Bridge (ADB) is a command line utility to communicate with your Android device. Uses: Listing connected devices. Installing and debugging apps. Copy files to and from the phone. Take screenshots, record screens, etc. <android_sdk_path>/platform-tools/adb.exe Power manage: wake lock, reboot.

ADB Client-Server Architecture Three entities are involved: a client, a server, a daemon (adbd). Client Server Port: 5037 Port: 555X Daemon Invoked From Terminal Background process Background process Power manage: wake lock, reboot.

Why? Connecting over USB Remember the first class of the semester? Settings>About Phone> Build number Settings>Developer options> USB Debugging Why? Power manage: wake lock, reboot.

Testing the ADB Use a shell to invoke your first command: USB adb devices -l List of devices attached 071b799a344bdc6b device product:hammerhead model:Nexus_5 device:hammerhead USB Power manage: wake lock, reboot.

When things go wrong … Use a shell to kill and start the server: USB adb kill-server adb start-server * daemon not running. starting it now at tcp:5037 * * daemon started successfully * USB

ADB over WiFi Set TCP port (over USB) and connect (over WiFi) adb tcpip 5555 (USB must be connected) adb connect [Phone’s IP Addr] (USB must be disconnected) To get your phone’s IP address: adb shell ifconfig

ADB Commands Now, you can communicate with the phone. adb shell screencap /sdcard/s.png adb pull /sdcard/s.png <local> or

Useful ADB Commands Global Options: adb –d <command> adb –e <command> adb –s <serial number> <command> 071b799a344bdc6b 071b799a344bdxyz

Useful ADB Commands General adb Commands: devices -l help version Network/File/Install adb Commands: connect ip[:port] disconnect ip[:port] pull [-a] remote local push local remote install package uninstall package

Useful ADB Commands backup/debug/scripting adb Commands: backup [-f file] [-apk][-obb][-shared][-all][-system] restore file logcat [option] root unroot usb tcpip port_555X start-server kill-server reconnect

Issuing shell Commands Generic format (two ways): adb shell <command> (execute on device shell) adb shell (get a device shell) Activity Manager (am commands) am start [option] intent am startservice [option] intent am broadcast [option] intent am force-stop package am kill [option] package am kill-all

Issuing shell Commands Package Manager (pm commands) list packages [options] filter list permissions [options] filter list features list libraries list users install [options] path uninstall [options] package grant package permission revoke package permission Screen capture screencap filename screenrecord [option] filename

Issuing shell Commands Many more Unix commands! echo text date time reboot ifconfig iftop netstat ping host ls cd directory chmod df mkdir rm file rmdir dir ps top

Shell commands from Android APPs Use ‘Runtime’ and ‘Process’ classes to issue shell commands from an Android app: try { Process p = Runtime.getRuntime().exec("ps"); InputStreamReader isr = new InputStreamReader(p.getInputStream()); BufferedReader br = new BufferedReader(isr); String str =""; while((str = br.readLine()) != null){ Log.v("Tag", str); } } catch (IOException e) { e.printStackTrace(); }

References https://developer.android.com/studio/command-line/adb.html Power manage: wake lock, reboot.