6. Start Andbug
./andbug Shell-p Com.android.browser
7. Enumerate the class information in APK
Command: Classes
Role: Lists all the class information used in the specified APK, including the class you have implemented in the APK and the system class information you have called
In addition, the classes command can be followed by the class name information, by adding the name information, you can list the eligible class information.
Such as: Classes app
8. Enumerate the method information of the specified class
Command: Methods Android.app.NotificationManager
Function: Enumerate all the method information in the Android.app.NotificationManager class
Name: Picture 10_ copy. png views: 2 File Size: 206.6 KB
9. Breakpoint operation
9.1 Set breakpoints on class, all operations that design the class will be terminated
Break Java.io.File
Breakpoint settings can be viewed through the break-list command
9.2 Setting breakpoints on a method
The function is interrupted by the following command
>> Break Java.io.File Delete
9.3 What happens when a breakpoint is triggered
After setting a breakpoint, operate the APK program, and once the program sets a breakpoint, the entire program hangs and displays relevant information. Through the output of the information can be known, apk due to call the java.io.File.exists () z:0 function was interrupted. Additional information includes stack information for the entire call to the java.io.File.exists () z:0 function.
9.4 Remove a breakpoint that has been set
by Break-remove 536870916
Remove previously set interrupts
Also: Break-remove all means that all breakpoints currently set are deleted.
10. Resume Operation
Command: Resume
function: Triggers a breakpoint after the entire process has been paused, continue running the APK by calling the resume command
Note: Because of the bug in your code, you need to call the resume command twice in order to recover the APK run
11. Process Pause Command
Command: Suspend
Function: Pause the current APK process
Because there are no commands to use with the command, the actual use does not have much effect
12. Help command
13. Class-trace Class Tracking command
Command: Class-trace java.io.File
Function: Trace the invocation of the Java.io.File class
You can see "Thread <15> backgroundhandler" threads, called "Java.io.File.renameTo", and the parameters called are:
--This=ljava/io/file; <830018592096>
--Newpath=ljava/io/file; <830016257352>
And you can see the whole stack call scenario.
Canceling the trace can also be accomplished using the Break-remove command.
14. Method-trace Method Tracking Command
Command: Method-trace java.io.File Renameto
Function: The Java.io.File renameto function is tracked, the difference between tracking and setting breakpoints is that the use of tracking does not interrupt the execution of the target process, only the corresponding function of the call information output.
Get trace information for a function call
15. Enumerating Current Thread information
Command: Threads
16. Tracing the thread
Command: Thread-trace
Set the main thread to track the county, all the main county-related calls will be tracked down:
It lists the condition of the function call, the parameters, and the stack condition.
17. Displaying information about static variables in a specified class
Command: Statics Com.android.internal.view.menu.MenuBuilder
18. Viewing object information
The Class-trace command allows you to track the ID information of an object in the target function.
The details of the formation can be investigated by using the inspect command with the ID of the object.
Because the break command sets a breakpoint, the information that is fed back when the breakpoint is triggered does not contain information about the object ID, which makes the inspect command not very convenient to use.
19. Source Code Associated command
Command: Source is associated with the code, which can be the Smali code.
Command: Dump shows the code for the specified method.
20. Web Output command
Command: Navi
Note: In order to support the Navi command, an **ottle library is required.
Need to bottle library. should be a Web presentation page
An **ottle library is required to implement.
21. Exit command
Command: Exit
System operation and Maintenance
• Cloud Computing
• Research and development Management
• Integrated
0 0 0 Share imgimg
©1999-2012, csdn.net, All rights Reserved
Android andbug Command