apsun / NekoSMS

A pattern-based text message blocker for Android.
GNU General Public License v3.0
426 stars 44 forks source link

NekoSMS 使用 Magisk里的 87.3 版 Xposed,已激活且拦截有效,但是每次打开 NekoSMS 还是提示 启用Xposed模块 #37

Closed nkypy closed 7 years ago

nkypy commented 7 years ago

Write your issue description here.


If you are submitting a bug report and do not include the following info, your issue will be ignored!

Please paste your Xposed logs (Xposed Installer -> Logs -> Menu -> Save to SD card) below:

09-13 16:04:20.265 I/Xposed  ( 1237): NekoSMS: Received a new SMS message
09-13 16:04:20.276 I/Xposed  ( 1237): NekoSMS: Blocked message (matched blacklist)
09-13 16:04:20.311 I/Xposed  ( 1237): NekoSMS: Removing raw SMS data from database for Android v24+
09-13 16:04:20.340 I/Xposed  ( 1237): NekoSMS: Notifying completion of SMS broadcast
09-13 17:51:06.630 I/Xposed  ( 1237): NekoSMS: Received a new SMS message
09-13 17:51:06.641 I/Xposed  ( 1237): NekoSMS: Allowed message (matched whitelist or no matching rules)
09-13 19:12:08.242 I/Xposed  ( 1237): NekoSMS: Received a new SMS message
09-13 19:12:08.249 I/Xposed  ( 1237): NekoSMS: Blocked message (matched blacklist)
09-13 19:12:08.288 I/Xposed  ( 1237): NekoSMS: Removing raw SMS data from database for Android v24+
09-13 19:12:08.326 I/Xposed  ( 1237): NekoSMS: Notifying completion of SMS broadcast
09-13 19:12:27.191 I/Xposed  ( 1237): NekoSMS: Received a new SMS message
09-13 19:12:27.197 I/Xposed  ( 1237): NekoSMS: Blocked message (matched blacklist)
09-13 19:12:27.222 I/Xposed  ( 1237): NekoSMS: Removing raw SMS data from database for Android v24+
09-13 19:12:27.245 I/Xposed  ( 1237): NekoSMS: Notifying completion of SMS broadcast
09-13 19:53:50.584 I/Xposed  ( 8301): NekoSMS: Hooking Xposed module status checker

Thank you for helping us help you help us all.

apsun commented 7 years ago

Please restart your phone and collect the logs immediately after opening the app. Thanks!

nkypy commented 7 years ago

打开 NekoSMS app 就多了最后一行 status checker

09-14 06:40:41.735 I/Xposed  (  240): -----------------
09-14 06:40:41.735 I/Xposed  (  240): Starting Xposed version 87.3 (Systemless by topjohnwu), compiled for SDK 25
09-14 06:40:41.735 I/Xposed  (  240): Device: Nexus 5 (LGE), Android version 7.1.2 (SDK 25)
09-14 06:40:41.735 I/Xposed  (  240): ROM: lineage_hammerhead-userdebug 7.1.2 NJH47F 3ad4536061
09-14 06:40:41.735 I/Xposed  (  240): Build fingerprint: google/hammerhead/hammerhead:6.0.1/M4B30Z/3437181:user/release-keys
09-14 06:40:41.735 I/Xposed  (  240): Platform: armeabi-v7a, 32-bit binary, system server: yes
09-14 06:40:41.735 I/Xposed  (  240): SELinux enabled: yes, enforcing: yes
09-14 06:40:41.758 I/Xposed  (  240): -----------------
09-14 06:40:41.758 I/Xposed  (  240): Added Xposed (/system/framework/XposedBridge.jar) to CLASSPATH
09-14 06:40:42.585 I/Xposed  (  240): Detected ART runtime
09-14 06:40:42.625 I/Xposed  (  240): Found Xposed class 'de/robv/android/xposed/XposedBridge', now initializing
09-14 06:40:43.415 I/Xposed  (  240): Loading modules from /data/app/com.crossbowffs.nekosms-2/base.apk
09-14 06:40:43.491 I/Xposed  (  240):   Loading class com.crossbowffs.nekosms.xposed.SmsHandlerHook
09-14 06:40:43.499 I/Xposed  (  240):   Loading class com.crossbowffs.nekosms.xposed.XposedUtilsHook
09-14 06:41:01.307 E/Xposed  (  822): Zygote service is not accessible from PID 822, UID 1000
09-14 06:41:01.315 E/Xposed  (  822): Zygote service is not accessible from PID 822, UID 1000
09-14 06:41:01.328 E/Xposed  (  822): Zygote service is not accessible from PID 822, UID 1000
09-14 06:41:01.330 E/Xposed  (  822): Zygote service is not accessible from PID 822, UID 1000
09-14 06:41:04.900 I/Xposed  ( 1160): NekoSMS: NekoSMS initializing...
09-14 06:41:04.900 I/Xposed  ( 1160): NekoSMS: Phone manufacturer: LGE
09-14 06:41:04.900 I/Xposed  ( 1160): NekoSMS: Phone model: Nexus 5
09-14 06:41:04.900 I/Xposed  ( 1160): NekoSMS: Android version: 7.1.2
09-14 06:41:04.900 I/Xposed  ( 1160): NekoSMS: Xposed bridge version: 87
09-14 06:41:04.901 I/Xposed  ( 1160): NekoSMS: NekoSMS version: 0.15.0 (31)
09-14 06:41:04.901 I/Xposed  ( 1160): NekoSMS: Hooking InboundSmsHandler constructor for Android v24+
09-14 06:41:04.932 I/Xposed  ( 1160): NekoSMS: Hooking dispatchIntent() for Android v23+
09-14 06:41:04.933 I/Xposed  ( 1160): NekoSMS: NekoSMS initialization complete!
09-14 06:41:05.414 I/Xposed  ( 1160): NekoSMS: Registering SMS filter content observer
09-14 06:41:05.416 I/Xposed  ( 1160): NekoSMS: Registering app package state receiver
09-14 06:41:05.418 I/Xposed  ( 1160): NekoSMS: Checking if we have OP_WRITE_SMS permission
09-14 06:41:05.419 I/Xposed  ( 1160): NekoSMS: Already have OP_WRITE_SMS permission
09-14 06:41:28.582 I/XposedInstaller( 2349): XposedInstaller - 1504966500001 - 3.0.1 by dvdandroid - 09/09/17
09-14 06:41:53.168 I/Xposed  ( 3256): NekoSMS: Hooking Xposed module status checker
apsun commented 7 years ago

Hmm.. here is the code I use to check if the module is enabled:

public static boolean isModuleEnabled() {
    return getModuleVersion() >= 0;
}

private static int getModuleVersion() {
    return -1; // Xposed module patches this to return a positive number
}

getModuleVersion() is clearly being hooked, so my guess is that it is being inlined into isModuleEnabled(). That means your Xposed build is broken. Looks like other people are having similar problems: https://forum.xda-developers.com/showpost.php?p=73779850&postcount=4538