kooritea / fcmfix

[xposed]让fcm唤醒已完全停止的应用
906 stars 39 forks source link

HyperOS 上有时会失效的原因是 AutoStartManagerServiceStubImpl.isAllowStartService 这个方法有时不会被调用 #160

Open wx2020 opened 4 weeks ago

wx2020 commented 4 weeks ago

相关代码:

Class<?> AutoStartManagerServiceStubImpl = XposedHelpers.findClass("com.android.server.am.AutoStartManagerServiceStubImpl", loadPackageParam.classLoader);
XC_MethodHook methodHook = new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam methodHookParam) {
        Intent intent = (Intent) methodHookParam.args[1];
        String target = intent.getComponent().getPackageName();
        if(targetIsAllow(target)) {
            printLog("AutoStartManagerServiceStubImpl.isAllowStartService package_name: " + target, true);
            methodHookParam.setResult(true);
        }
    }
};

以下截图中可以看出,因为 isAllowStartService 未调用,TG无法接收到广播,最终超时失败,推送无法收到。 image

请问楼主是怎么获取 HyperOS Framework 的 Source Code 的? 我获取到的 Source Code 搜不到 AutoStartManagerServiceStubImpl 这个实现类,只能搜到实现的接口:

image

kooritea commented 4 weeks ago

hyperos部分的几乎都不是我写的, 这个服务应该是哪个系统app实现的,只是绑定到这里调用

Nep-Timeline commented 3 weeks ago

AutoStartManagerServiceStubImpl这个类在 system_ext/framework/miui-services.jar

Lovefish commented 1 week ago

AutoStartManagerServiceStubImpl这个类在 system_ext/framework/miui-services.jar

还有澎湃系统上面通过fcmfix推送的APP弹出消息都没有声音,但是如果非root设备通过安装国际版的电脑管家来推送fcm,好像是会有声音的。

Nep-Timeline commented 6 days ago

AutoStartManagerServiceStubImpl这个类在 system_ext/framework/miui-services.jar

还有澎湃系统上面通过fcmfix推送的APP弹出消息都没有声音,但是如果非root设备通过安装国际版的电脑管家来推送fcm,好像是会有声音的。

HyperOS CN, 使用FCMFIX测试Telegram FCM推送实测推送有通知声

Lovefish commented 6 days ago

AutoStartManagerServiceStubImpl这个类在 system_ext/framework/miui-services.jar

还有澎湃系统上面通过fcmfix推送的APP弹出消息都没有声音,但是如果非root设备通过安装国际版的电脑管家来推送fcm,好像是会有声音的。

HyperOS CN, 使用FCMFIX测试Telegram FCM推送实测推送有通知声

为什么我fcm所以推送都没有声音呢?还要hook什么吗?

Nep-Timeline commented 6 days ago

AutoStartManagerServiceStubImpl这个类在 system_ext/framework/miui-services.jar

还有澎湃系统上面通过fcmfix推送的APP弹出消息都没有声音,但是如果非root设备通过安装国际版的电脑管家来推送fcm,好像是会有声音的。

HyperOS CN, 使用FCMFIX测试Telegram FCM推送实测推送有通知声

为什么我fcm所以推送都没有声音呢?还要hook什么吗?

不知道 也许你应该看看通知频道的发声权限

Lovefish commented 2 days ago

AutoStartManagerServiceStubImpl这个类在 system_ext/framework/miui-services.jar

还有澎湃系统上面通过fcmfix推送的APP弹出消息都没有声音,但是如果非root设备通过安装国际版的电脑管家来推送fcm,好像是会有声音的。

HyperOS CN, 使用FCMFIX测试Telegram FCM推送实测推送有通知声

为什么我fcm所以推送都没有声音呢?还要hook什么吗?

不知道 也许你应该看看通知频道的发声权限

这个没关系,只要fcm推送的都没有声音

TigerBeanst commented 2 days ago

昨天难得把手机声音打开,听到多邻国通过fcm推送的声音了,我这边应该也是正常的