吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 916|回复: 3
收起左侧

[求助] 各位老大,新人求教,请问如何打包一个这样的Bundle。这个是关于通知传递的数据。。

[复制链接]
qjmfktlf 发表于 2022-6-12 22:19
25吾爱币
本帖最后由 qjmfktlf 于 2022-6-12 22:26 编辑

notificationlistener传递了一个intent,如下:


intent.getExtras().toString()
输出结果>>>>>Bundle[mParcelledData.dataSize=2096]


toString后是这样的
[Java] 纯文本查看 复制代码
Bundle[{
        net.dinglisch.android.tasker.extras.HOST_CAPABILITIES=254, 
        proxy_operation_type=AUTO_REPLY, 
        com.balda.notificationlistener.extra.KEY=0|com.tencent.mm|2144300744|null|10247, 
        com.twofortyfouram.locale.intent.extra.BUNDLE=Bundle[mParcelledData.dataSize=652], 
        com.balda.notificationlistener.extra.INT_VERSION_CODE=118, 
        com.balda.notificationlistener.extra.AUTO_REPLY_TYPE=0, 
        net.dinglisch.android.tasker.EXTRA_TARGET_API=29, 
        com.balda.wakelockid=1, 
        com.twofortyfouram.locale.intent.extra.BLURB=回复: 回复文本:%TIME, 
        com.balda.notificationlistener.extra.OPERATION=4, 
        net.dinglisch.android.tasker.extras.HINTS=Bundle[mParcelledData.dataSize=48], 
        com.balda.notificationlistener.extra.REPLY=回复文本:20.47
}]



整个intent全部显示出来是这样的
[Java] 纯文本查看 复制代码
Bundle[{


        net.dinglisch.android.tasker.extras.HOST_CAPABILITIES=254,
        proxy_operation_type=AUTO_REPLY,
        com.balda.notificationlistener.extra.KEY=0|com.tencent.mm|2144300744|null|10247,
        com.twofortyfouram.locale.intent.extra.BUNDLE=Bundle[{
                com.balda.notificationlistener.extra.KEY=0|com.tencent.mm|2144300744|null|10247,
                com.balda.notificationlistener.extra.INT_VERSION_CODE=118,
                com.balda.notificationlistener.extra.AUTO_REPLY_TYPE=0,
                com.balda.notificationlistener.extra.OPERATION=4,
                com.balda.notificationlistener.extra.REPLY=你好
        }],


        com.balda.notificationlistener.extra.INT_VERSION_CODE=118, 
        com.balda.notificationlistener.extra.AUTO_REPLY_TYPE=0,
        net.dinglisch.android.tasker.EXTRA_TARGET_API=29,
        com.twofortyfouram.locale.intent.extra.BLURB=回复: 你好,
        com.balda.notificationlistener.extra.OPERATION=4,
        net.dinglisch.android.tasker.extras.HINTS=Bundle[{
                .hints.TIMEOUT=0
        }],         
        com.balda.notificationlistener.extra.REPLY=你好
}]









下面是我自己打包的,但是为什么完全不一样啊!
[Java] 纯文本查看 复制代码
    public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {




        if (lpparam.processName.equals(Hook_Package)) {
            XposedBridge.log("通知监听器hook成功");


            Class<?> classDb = XposedHelpers.findClassIfExists(Hook_Class, lpparam.classLoader);
            XposedHelpers.findAndHookMethod(classDb, Hook_Method, Intent.class, new XC_MethodHook() {
                final String NF_Key = "com.balda.notificationlistener.extra.KEY";
                final String NF_Key_V = "0|com.tencent.mm|2144300744|null|10247";


                @Override
                protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                    XposedBridge.log(" \n ==S==>"+ Hook_Method +"<==S==");


                    Bundle bundle = new Bundle();
                    bundle.putInt("net.dinglisch.android.tasker.extras.HOST_CAPABILITIES",254);
                    bundle.putString("proxy_operation_type","AUTO_REPLY");
                    bundle.putString(NF_Key,NF_Key_V);


                    Bundle bundle1 = new Bundle();
                    bundle1.putString(NF_Key,NF_Key_V);
                    bundle1.putInt("com.balda.notificationlistener.extra.INT_VERSION_CODE",118);
                    bundle1.putInt("com.balda.notificationlistener.extra.AUTO_REPLY_TYPE",0);
                    bundle1.putInt("com.balda.notificationlistener.extra.OPERATION",4);
                    bundle1.putString("com.balda.notificationlistener.extra.REPLY","XPosedHook成功");




                    bundle.putParcelable("net.dinglisch.android.tasker.extras.BUNDLE",bundle1);
                    //bundle.putBundle("net.dinglisch.android.tasker.extras.BUNDLE",bundle1);
                    bundle.putInt("com.balda.notificationlistener.extra.INT_VERSION_CODE",118);
                    bundle.putInt("com.balda.notificationlistener.extra.AUTO_REPLY_TYPE",0);
                    bundle.putInt("net.dinglisch.android.tasker.EXTRA_TARGET_API",29);
                    bundle.putString("com.twofortyfouram.locale.intent.extra.BLURB","回复:XPosedHook成功");
                    bundle.putInt("com.balda.notificationlistener.extra.OPERATION",4);


                    Bundle bundle2 = new Bundle();
                    bundle2.putInt(".hints.TIMEOUT",0);


                    bundle.putParcelable("net.dinglisch.android.tasker.extras.HINTS",bundle2);
                    //bundle.putBundle("net.dinglisch.android.tasker.extras.HINTS",bundle2);
                    bundle.putString("com.balda.notificationlistener.extra.REPLY","XPosedHook成功");


                    Bundle b = new Bundle();
                    b.putAll(bundle);
                    String str = b.toString();
                    XposedBridge.log(" \n =====> "+ str +" <=====");
                    XposedBridge.log(" \n ==E==>"+ Hook_Method +"<==E==");


                    Intent intent = new Intent();
                    intent.setComponent(new ComponentName("com.balda.notificationlistener","com.balda.notificationlistener.service.NotificationProxy"));
                    intent.putExtras(bundle);


                    param.args[0] = intent;


                    XposedBridge.log(" \n =====> "+ param.args[0].toString() +" <=====");
                }


            });


        }




    }

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

badboybilly 发表于 2022-6-13 08:21
等大佬出来科普。
 楼主| qjmfktlf 发表于 2022-6-13 14:45
 楼主| qjmfktlf 发表于 2022-6-13 21:56
我用tasker+Notification Listener插件,+女娲石,达到了自动回复微信的效果。
我hook到了这个插件里的方法的参数是一个intent,里面额外的数据是一个bundle,我想要修改这里面的数据,比如把“你好”改为“很好”

我自己重新打包了一个bundle,里面的内容虽然和之前的是一样的。但是toString()后 输出显示的内容却不一样,原Bundle输出为“Bundle[mParcelledData.dataSize=2096]”,
但是我自己打包的这个Bundle,toString()一下,里面的内容全部显示出来了。
如下图:
c9eb499bcc20c3a4066a95a7ee6565a.jpg
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止回复与主题无关非技术内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-10 15:00

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

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