apsun / NekoSMS

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

NekoSMS doesn't work on LineageOS 18.1 #78

Closed LuigiVampa92 closed 3 years ago

LuigiVampa92 commented 3 years ago

Hi, thank you for the great project! I used to enjoy using it on my device running LineageOS 17.1 (android 10) and EdXposed. Recenlty I have installed LineageOS 18.1, magisk, LSPosed and found out that NekoSMS doesn't work (other xposed modules do work).

My device:


Xposed logs:

LSPosed Log
--------- beginning of information
Manufacturer: OnePlus
Brand: OnePlus
Device: OnePlus5T
Product: dumpling
Model: ONEPLUS A5010
Fingerprint: OnePlus/OnePlus5T/OnePlus5T:10/QKQ1.191014.012/2010292059:user/release-keys
ROM description: OnePlus5T-user 10 QKQ1.191014.012 2010292059 release-keys
Architecture: arm64-v8a
Android build: RQ3A.210805.001.A1
Android version: 11
Android sdk: 30
LSPosed version: v1.5.1 (5898)
Riru version: v26.1.1.r500.45d2706e83 (500)
Riru api: 26
Magisk: 23.0 (23000)
2021-08-26 07:05:58.058 I/android(1538-1538): XLua.Xposed Loaded android:1000
2021-08-26 07:06:00.000 I/android(1538-1538): XLua.Xposed Loaded com.android.providers.settings:1000
2021-08-26 07:06:00.000 I/android(1538-1538): XLua.Xposed Loaded org.lineageos.lineagesettings:1000
2021-08-26 07:06:01.001 I/android(1538-1538): XLua.Xposed Preparing system
2021-08-26 07:06:02.002 I/android(1538-1538): XLua.Xposed System ready
2021-08-26 07:06:02.002 I/android(1538-1538): XLua.Xposed Loaded com.android.server.telecom:1000
2021-08-26 07:06:02.002 I/android(1538-1538): XLua.Xposed Loaded com.android.location.fused:1000
2021-08-26 07:05:59.059 I/ru.yandex.callerid(4114-4114): XLua.Xposed Loaded ru.yandex.callerid:10196
2021-08-26 07:05:59.059 I/ru.yandex.callerid:Metrica(4164-4164): XLua.Xposed Loaded ru.yandex.callerid:10196
2021-08-26 07:06:01.001 I/android(1538-1538): XLua.Xposed Loaded com.dsi.ant.server:1000
2021-08-26 07:06:02.002 I/com.topjohnwu.magisk(4783-4783): XLua.Xposed Loaded com.topjohnwu.magisk:10169
2021-08-26 07:06:03.003 I/com.whatsapp(4824-4824): XLua.Xposed Loaded com.whatsapp:10171
2021-08-26 07:06:07.007 I/com.topjohnwu.magisk(4783-5083): XLua.Xposed Loaded com.google.android.gms:10169

Before attaching the logs above I have send an SMS to this device, and I had previously set blacklist rules that should catch a mesage with this text but It seems that there is no mentions in xposed logs at all. Perhaps it could be some problem with method signature or something, like method is not hooked at all or SMS package has some unexpected name. If I have some free time to see it closely, I will try to check it out as well and post here my results, but if you will manage to fix that would be really grateful.

Thank you again!

apsun commented 3 years ago

NekoSMS only really needs to hook com.android.phone for SMS interception (we also hook our own package as a way to check that the module is loaded, but that is optional), and others have reported it working fine on Android 11 so I don't think it's a problem with method signature/package name, especially since you're on LineageOS which is pretty close to stock Android).

Normally NekoSMS should dump some initialization info into the logs when the module is loaded, which I don't see here. Did you enable NekoSMS for the com.android.phone package? I know LSposed has some stuff to limit which packages a module is loaded into.

LuigiVampa92 commented 3 years ago

So I have managed to find out what was wrong. The problem truly was in the LSPosed mechanism that applies hooks only to selected apps. I had to mark "system framework", and also "com.android.messaging" and "com.android.mms.service". Now everything works. What's strange though that app drops absolutely no logs to xposed logs, but that's ok.

Thank you again! My problem is solved

apsun commented 3 years ago

Just FYI only com.android.phone and com.crossbowffs.nekosms are the only required ones; any other packages you hook don't do anything. See #74.

yoooogaQAQ commented 10 months ago

Can confirm NekoSMS does not work with only com.android.phone selected, but it does work with both com.android.phone and System Framework selected.

Some information: