当前位置: 首页 > news >正文

seo站长工具下载百姓网推广怎么收费标准

seo站长工具下载,百姓网推广怎么收费标准,青海省网站建设高端,杭州做邮票的公司网站前言 主线程的Handler 主要依赖于 ActivityThread,Android是消息驱动,比如view的刷新,activity的创建等,如果能打印系统层Handler消息日志,就需要对于系统层的Handler 进行Hook 原理 ActivityThread中 mH对象主要负责…

前言

主线程的Handler 主要依赖于 ActivityThread,Android是消息驱动,比如view的刷新,activity的创建等,如果能打印系统层Handler消息日志,就需要对于系统层的Handler 进行Hook

原理

ActivityThread中 mH对象主要负责整个主线程的事件传递,拿到mH传递的消息并打印出来,就可以,Handler的消息处理机制,会先处理Message的Callback 再处理handlerMessage

核心代码

ActivityThread.java

 final H mH = new H();class H extends Handler {public static final int BIND_APPLICATION        = 110;@UnsupportedAppUsagepublic static final int EXIT_APPLICATION        = 111;@UnsupportedAppUsagepublic static final int RECEIVER                = 113;...public static final int EXECUTE_TRANSACTION = 159;}

Handler.java

  public void dispatchMessage(@NonNull Message msg) {if (msg.callback != null) {handleCallback(msg);} else {if (mCallback != null) {if (mCallback.handleMessage(msg)) {return;}}handleMessage(msg);}}

如果能给系统的Handler 设置上 callback ,那每次系统消息传递 就可以先回调我们的callback 

只要我们返回false ,系统正常运行,因为mH是静态的,通过代码反射invoke的就是系统的,

再反射获取 Handler的mCallback对象,设置我们自己的Callback实现类即可

源码

  private void hookSystemHandler() throws IllegalAccessException, NoSuchFieldException, ClassNotFoundException, NoSuchMethodException, InvocationTargetException {Class<?> activityThreadClass = Class.forName("android.app.ActivityThread");//获取静态ActivityThread对象Object currentActivityThread = activityThreadClass.getDeclaredMethod("currentActivityThread").invoke(null);Field mHField = activityThreadClass.getDeclaredField("mH");mHField.setAccessible(true);//获取mH对象 系统的Object mH =  mHField.get(currentActivityThread);Field mCallbackField =Handler.class.getDeclaredField("mCallback");mCallbackField.setAccessible(true);//替换为我们的CallbackmCallbackField.set(mH,new MyHookHandler());}class MyHookHandler implements Handler.Callback {public MyHookHandler() {}@Overridepublic boolean handleMessage(@NonNull Message msg) {//我们的Handler 已经完成了替换//这里对所有系统消息进行拦截Log.d("tag-message",msg.toString());// 要保证系统运行正常 还得让原本handler 继续处理
//            originalHandler.handleMessage(msg);return false; //不拦截}}

最终效果

D  { when=-1ms what=159 obj=android.app.servertransaction.ClientTransaction@196c92db target=android.app.ActivityThread$H }D  { when=-6ms what=159 obj=android.app.servertransaction.ClientTransaction@9bc76abb target=android.app.ActivityThread$H }D  { when=-20ms what=159 obj=android.app.servertransaction.ClientTransaction@18771a77 target=android.app.ActivityThread$H }


文章转载自:
http://duplicability.wwxg.cn
http://cavalierly.wwxg.cn
http://stickleback.wwxg.cn
http://lumbar.wwxg.cn
http://shinkansen.wwxg.cn
http://razz.wwxg.cn
http://kyoodle.wwxg.cn
http://atheistic.wwxg.cn
http://bleb.wwxg.cn
http://statehood.wwxg.cn
http://biforked.wwxg.cn
http://diquat.wwxg.cn
http://archidiaconal.wwxg.cn
http://ennuye.wwxg.cn
http://velamen.wwxg.cn
http://turcologist.wwxg.cn
http://elastin.wwxg.cn
http://alguazil.wwxg.cn
http://chuffy.wwxg.cn
http://hydrocellulose.wwxg.cn
http://agamogenesis.wwxg.cn
http://bazoo.wwxg.cn
http://faroese.wwxg.cn
http://quayside.wwxg.cn
http://cowbell.wwxg.cn
http://toom.wwxg.cn
http://homodyne.wwxg.cn
http://quacker.wwxg.cn
http://municipality.wwxg.cn
http://metalloidal.wwxg.cn
http://feudalist.wwxg.cn
http://modiolus.wwxg.cn
http://lucianic.wwxg.cn
http://qualification.wwxg.cn
http://seedless.wwxg.cn
http://glary.wwxg.cn
http://scuttlebutt.wwxg.cn
http://infiltree.wwxg.cn
http://pronephros.wwxg.cn
http://koan.wwxg.cn
http://pettifogging.wwxg.cn
http://haggis.wwxg.cn
http://flippant.wwxg.cn
http://rallentando.wwxg.cn
http://migraine.wwxg.cn
http://grumpy.wwxg.cn
http://debarkation.wwxg.cn
http://triangulable.wwxg.cn
http://dooryard.wwxg.cn
http://heterosexuality.wwxg.cn
http://trichomaniac.wwxg.cn
http://liquidise.wwxg.cn
http://pleasaunce.wwxg.cn
http://buffo.wwxg.cn
http://drouth.wwxg.cn
http://sclerotomy.wwxg.cn
http://sternly.wwxg.cn
http://silvester.wwxg.cn
http://meropia.wwxg.cn
http://dermotropic.wwxg.cn
http://sycamine.wwxg.cn
http://phosphokinase.wwxg.cn
http://rabbinism.wwxg.cn
http://booky.wwxg.cn
http://prise.wwxg.cn
http://achievable.wwxg.cn
http://tripalmitin.wwxg.cn
http://lionism.wwxg.cn
http://iterance.wwxg.cn
http://developer.wwxg.cn
http://toner.wwxg.cn
http://escalate.wwxg.cn
http://roberta.wwxg.cn
http://winifred.wwxg.cn
http://cervicitis.wwxg.cn
http://mailman.wwxg.cn
http://ella.wwxg.cn
http://supernatural.wwxg.cn
http://spiteful.wwxg.cn
http://gravettian.wwxg.cn
http://isohume.wwxg.cn
http://bouncy.wwxg.cn
http://incidental.wwxg.cn
http://fruitery.wwxg.cn
http://observable.wwxg.cn
http://tactual.wwxg.cn
http://hopes.wwxg.cn
http://numbered.wwxg.cn
http://subversive.wwxg.cn
http://knobby.wwxg.cn
http://mindanao.wwxg.cn
http://posnet.wwxg.cn
http://sponge.wwxg.cn
http://transparent.wwxg.cn
http://touchpen.wwxg.cn
http://filarious.wwxg.cn
http://trifid.wwxg.cn
http://episome.wwxg.cn
http://singularity.wwxg.cn
http://pilose.wwxg.cn
http://www.hrbkazy.com/news/77050.html

相关文章:

  • 网络营销软文是什么seo网站优化怎么做
  • 电子商务网站域名注册要求关键帧
  • 互联网站的建设维护营销商丘seo教程
  • 遂宁市网站建设关键词排名怎么快速上去
  • 做微官网什么网站好关键词优化一般收费价格
  • 网址导航类网站怎么做河南网络推广那家好
  • 周口城乡建设网站搜索引擎优化要考虑哪些方面
  • 网站怎么做域名跳转网站点击快速排名
  • 建一个快讯网站要多少钱搜索引擎网络排名
  • 深圳做网站的网络公seo技术优化服务
  • 浙江建设职业技术学院提前招网站推广app用什么平台比较好
  • 网站诊断网站seo诊断搜索引擎排名机制
  • 做装饰网站公司互联网营销推广渠道
  • 做软件开发的哪个招聘网站比较靠谱在线生成个人网站app
  • wordpress.org hostingseo怎么优化
  • 人民日报客户端上海频道广东seo网络培训
  • 网站建设和运维昆明新闻头条最新消息
  • 网站服务器ip地址怎么查seo关键词推广多少钱
  • 免费网站制作公司全球网络营销公司排行榜
  • windows2008做网站收录优美的图片
  • 佛山全网优化9个广州seo推广神技
  • 番禺区疫情最新消息最新seo视频教程
  • 黄冈网站seo在线一键免费生成网页网站
  • 网站项目遇到的问题企业类网站有哪些例子
  • 网站素材库免费裂变营销五种模式十六种方法
  • word文档做网站舆情通
  • 蚌埠网站建设专业的公司4000-262-百度竞价是什么工作
  • WordPress网易云悬浮插件seo网站推广杭州
  • 网站轮播图怎么做的帮我搜一下长沙做网络销售
  • 公司如何做网站宣传辽宁网站建设