Answer: C break point breaks the execution. To see value either you can put cursor on it or right click on variables and add to watch
Description: Debugging : means removing the bug (issue).
There can be two types of bugs.
1. Program crash : When program crashes due to some exception, then we have to debug the program through logcat and find the problem. These kind of debugging will be done through logcat messages.
2. Function is not working properly : If some logic is not working properly, then we have to analyze that function to see what logic is going wrong. This can be done in many ways.
a. Put toast messages in the function to see line by line analysis
b. Put log messages by using Log.d OR other log functions, and see for
those messages in logcat.
c. Put break point by double clicking a particular line in eclipse.
Break point is a point where control will stop at that line while
executing. Once it hits that point, it will break/ halt the execution.
There you can explore all the variable values by adding variables to
watch windows.
Answer: A dalvik debug monitor server
Description:
Answer: B debug log
Description: Log messages are used to debug the program.
Log.d() is debug log.
other functions are Log.i() - informative
Log.e() - error log
Log.w() - warning log
Log.v() - verbose log
Answer: B Option1 is true & This tool is located in android-sdk/platform-tools folder
Description: ADB is a client-server modeled tool available in android-sdk/platform-tools, that is used as bridge (communication channel) between client in host machine & adb daemon in emulator or device. ADB has 3 components in it client, server, and adb daemon.
In simple terms, it is a communication channel between eclipse and emulator/ device
Answer: A 2
Description: For every emulator or device connected to server, it will be allocated with 2 ports (starting from 5554 & 5555) based on the port availability.
Answer: D i, ii, iii, & iv
Description: Using DDMS tool we can
i.Simulate calls & SMSs.
ii. We can see thread allocation & memory allocation of any process running in phone or emulator.
iii. We can see logs in logcat tool which is part of DDMS. Used for debugging the program.
iv. We can simulate GPS locations also using DDMS tool.
Answer: D ii & iv
Description: adb devices --> this command will display all the offline and online devices attached to the adb server.
Answer: A Android Debug Bridge - can be used to access android tools from command line interface.
Description: Android debug bridge (ADB)
- tool used to communicate to emulator/ devices from eclipse or command prompt.
- its a client-server program
there are 3 components in it:
1. a client running on development machine. -> you can invoke this by issueing adb shell command.
(adt/ ddms also starts adb client)
2. a server [runs as a b.g process] on development machine.
this establishes comm'on channel between client - adb daemon running on emulator/ device.
3. adb-daemon that runs on emulator/ device.
adb -> is located in sdk/ platform-tools
Answer: A adb -s emulator-5556 install helloWorld.apk
Description:
Answer: A 5554&5555 is minimum. 5584&5585 is maximum.
Description:
Answer: C its a client server program to communicate between development machine, and device or emulator.
Description: Android debug bridge (ADB)
- tool used to communicate to emulator/ devices from eclipse or command prompt.
- its a client-server program
there are 3 components in it:
1. a client running on development machine. -> you can invoke this by issueing adb shell command.
(adt/ ddms also starts adb client)
2. a server [runs as a b.g process] on development machine.
this establishes comm'on channel between client - adb daemon running on emulator/ device.
3. adb-daemon that runs on emulator/ device.
adb -> is located in sdk/ platform-tools
How is this connection established?
1. once you issue adb command, it starts adb client,
then searches if server process if exists or not.
2. once server started, it will start listening --> on port 5037 --> for commands from [adb client]
It will start connections from client - to - adb daemons.
how server detects adb-daemons?
a. server will check ports 5555 -to- 5585
if it finds any port then it will set up connection.
Note: consoles will take up even ports, adb daemons will take up odd ports.
eg: Emulator 1, console: 5554
Emulator 1, adb: 5555
Emulator 2, console: 5556
Emulator 2, adb: 5557 ...
it is multi connection (Means any client can talk to any daemon)
Commands:
adb [-d
adb devices
adb -s emulator-5556 install helloWorld.apk
adb install
command to install an apk into emulator is:
adb install
command to install an apk to particular emulator 5556 is:
adb -s emulator-5556 install helloWorld.apk
Answer: D all of the above
Description: Based on the requirement one can use any of the above techniques. use logcat to see the control flow or to analyze the crash. use break point if you want to clearly watch the stack trace and variable values at run time. use memory profiling and thread profiling if you want to see how much memory and how many thread are created at run time.
Answer: B after crash logcat will contain exception name along with line number where it has crashed.
Description: after crash logcat will contain exception name along with line number where it has crashed.
Answer: D 5037
Description: 5037. Every ADB client can communicate to server on port number 5037.