找回密码
 立即注册→加入我们

QQ登录

只需一步,快速开始

搜索
热搜: 下载 VB C 实现 编写
查看: 4849|回复: 0

在Windows上使用AndBug

[复制链接]

307

主题

228

回帖

7335

积分

用户组: 真·技术宅

UID
2
精华
76
威望
291 点
宅币
5585 个
贡献
253 次
宅之契约
0 份
在线时间
947 小时
注册时间
2014-1-25
发表于 2016-6-5 14:19:36 | 显示全部楼层 |阅读模式

欢迎访问技术宅的结界,请注册或者登录吧。

您需要 登录 才可以下载或查看,没有账号?立即注册→加入我们

×
AndBug是linux下java/android的调试器,可以在linux下编译运行,此次修改我增加了对windows-cygwin的支持
原始工程https://github.com/swdunlop/AndBug
新工程https://github.com/lichao890427/AndBugForWin
改动如下:
wire.c                增加__CYGWIN___宏定义处理
                        修改几处c语言变量作用域导致编译失败问题
proto.py        由于win下不支持localfilesystem监听,因此改成tcp
util.py                解析adb ps时会出现空集合,删除之

使用:
安装vs2008
git clone
make
./andbug shell -p com.android.phone
>> classes
## Loaded Classes
   -- java.lang.Long
   -- android.graphics.LightingColorFilter
   -- android.os.StrictMode$LogStackTrace
   -- android.net.Uri$Part
   -- com.android.internal.telephony.BaseCommands
   -- com.android.internal.app.AlertController$ButtonHandler
   -- com.android.internal.telephony.Call$State
   -- java.security.KeyFactorySpi
   -- android.util.StateSet

   >> help
## AndBug (C) 2011 Scott W. Dunlop <swdunlop@gmail.com>
   The AndBug shell is a simple interactive console shell that reduces typing and overhead involved in setting up a
   debugging session.  Commands entered at the prompt will be evaluated using the current device and process as a
   context.  Where possible, AndBug uses readline; if your Python install lacks readline, this shell will be more
   difficult to use due to the poor console I/O functionality in vanilla Python.  (The "rlwrap"  utility may help.)

   AndBug is NOT intended for a piracy tool, or other illegal purposes, but  as a tool for researchers and developers to
   gain insight into the  implementation of Android applications.  Use of AndBug is at your own risk, like most open
   source tools, and no guarantee of fitness or safety is made or implied.
## Commands:
   -- break | b <class> [<method>] [show/lineNo]
      set breakpoint
   -- break-list
      list active breakpoints/hooks
   -- break-remove <eid/all>
      remove hook/breakpoint
   -- class-trace | ct | ctrace <class-path>
      reports calls to dalvik methods associated with a class
   -- classes [<partial class name>]
      lists loaded classes. if no partial class name supplied, list all classes.
   -- dump <class-path> [<method-query>]
      dumps methods using original sources or apktool sources
   -- exit
      terminates andbug with prejudice
   -- help [<command>]
      information about how to use andbug
   -- inspect <object-id>
      inspect an object
   -- method-trace | mt | mtrace <method>
      reports calls to specific dalvik method
   -- methods <class-path> [<method-query>]
      lists the methods of a class
   -- resume [<name>]
      resumes threads in the process
   -- shell
      starts the andbug shell with the specified process
   -- source <src-dir>
      adds a source directory for finding files
   -- statics <class-path>
      lists the methods of a class
   -- suspend [<name>]
      suspends threads in the process
   -- thread-trace | tt | ttrace <thread-name>
      reports calls to specific thread in the process
   -- threads [<name>] [verbose=<verbose level>]
      lists threads in the process. verbosity: 0 (thread), (1 methods), (2 vars), (3 vars data)
## Examples:
   -- threads
   -- threads verbose=2
   -- threads "Signal Catcher" verbose=3
   -- classes
   -- classes ioactive
   -- methods com.ioactive.decoy.DecoyActivity onInit
   -- method-trace com.ioactive.decoy.DecoyActivity
回复

使用道具 举报

QQ|Archiver|小黑屋|技术宅的结界 ( 滇ICP备16008837号 )|网站地图

GMT+8, 2024-4-19 08:41 , Processed in 0.032667 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表