ElderDrivers / EdXposed

Elder driver Xposed Framework.
https://edxp.meowcat.org/
GNU General Public License v3.0
5.43k stars 625 forks source link

[BUG] java.lang.IllegalArgumentException: Supported SQL #779

Closed whitetrefoil closed 3 years ago

whitetrefoil commented 3 years ago

什么情况/What happened?

Everything looks good in EdXposed Manager, but modules' apps (XPrivacyLua, Greenify) report xposed module not loaded. In log it says:

java.lang.IllegalArgumentException: Supported SQL:
  uri content://some_table/some_property with null where and where args
  uri content://some_table with query name=? and single name as arg
  uri content://some_table with query name=some_name and null args
  but got - uri:content://settings/system, where:null whereArgs:[org.meowcat.edxposed.manager, 10251]

Xposed模块列表/Xposed Module List

Magisk模块列表/Magisk Module List

版本信息/Versions

Android: 10

Magisk: 21.2 (21200)

Riru: 23.1

EdXposed: tried v0.5.1.4 & v0.5.1.3, tried SandHook & YAHFA

相关日志/Related Logs

--------- beginning of head
EdXposed Log
Powered by Log Catcher
QQ support group: 855219808
Telegram support group: @Code_Of_MeowCat
Telegram channel: @EdXposed
--------- beginning of information
Manufacturer: samsung
Brand: samsung
Device: beyond0q
Product: beyond0qltechn
Model: SM-G9700
Fingerprint: samsung/beyond0qltezh/beyond0q:10/QP1A.190711.020/G9700ZHU4DTJ3:user/release-keys
ROM description: beyond0qltezh-user 10 QP1A.190711.020 G9700ZHU4DTJ3 release-keys
Architecture: arm64-v8a
Android build: QP1A.190711.020
Android version: 10
Android sdk: 29
EdXposed version: v0.5.1.4_4655-master (SandHook)
EdXposed api: 93
Riru version: v23.1 (51)
Riru api: 10
Magisk: 21.2 (21200)
--------- beginning of main
--------- beginning of system
12-31 16:21:17.086  2220  2220 I EdXposed-Bridge: Loading modules from /data/app/eu.faircode.xlua-huLojNPMliXdgYq_XZ2CbQ==/base.apk
12-31 16:21:17.107  2220  2220 I EdXposed-Bridge:   Loading class eu.faircode.xlua.XLua
12-31 16:21:17.115  2220  2220 I EdXposed-Bridge: Loading modules from /data/app/com.oasisfeng.greenify-f4INlAlbA5gBQN8tLfA7eA==/base.apk
12-31 16:21:17.138  2220  2220 I EdXposed-Bridge:   Loading class com.oasisfeng.greenify.pro.FrameworkPatch
12-31 16:21:17.143  2220  2220 I EdXposed-Bridge:   Loading class com.oasisfeng.greenify.pro.SettingsPatch
12-31 16:21:17.143  2220  2220 I EdXposed-Bridge: Loading modules from /data/app/org.meowcat.edxposed.manager-Gn_71VE0GmHN_RlnN37cjA==/base.apk
12-31 16:21:17.157  2220  2220 I EdXposed-Bridge:   Loading class org.meowcat.edxposed.manager.xposed.Enhancement
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge: java.lang.IllegalArgumentException: Supported SQL:
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   uri content://some_table/some_property with null where and where args
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   uri content://some_table with query name=? and single name as arg
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   uri content://some_table with query name=some_name and null args
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   but got - uri:content://settings/system, where:null whereArgs:[org.meowcat.edxposed.manager, 10251]
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:170)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.content.ContentProviderProxy.query(ContentProviderNative.java:423)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.content.ContentResolver.query(ContentResolver.java:951)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.content.ContentResolver.query(ContentResolver.java:887)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.content.ContentResolver.query(ContentResolver.java:843)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at eu.faircode.xlua.XLua.hookPackage(SourceFile:5)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at eu.faircode.xlua.XLua.access$000(SourceFile:1)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at eu.faircode.xlua.XLua$4.afterHookedMethod(SourceFile:9)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at de.robv.android.xposed.XC_MethodHook.callAfterHookedMethod(XC_MethodHook.java:68)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at com.swift.sandhook.xposedcompat.hookstub.HookStubManager.hookBridge(HookStubManager.java:394)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at SandHookerNew_c111bdc78ca9d851a3ee656d943e8191c90fd013.hook(Unknown Source:58)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.app.ActivityThread.handleMakeApplication(ActivityThread.java:7152)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7134)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at java.lang.reflect.Method.invoke(Native Method)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at com.swift.sandhook.SandHook.callOriginMethod(SandHook.java:183)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at com.swift.sandhook.xposedcompat.hookstub.HookStubManager.hookBridge(HookStubManager.java:380)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at SandHookerNew_42b8453bf7df105343083f1377c32094be493c49.hook(Unknown Source:51)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.app.ActivityThread.access$1600(ActivityThread.java:274)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2102)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.os.Handler.dispatchMessage(Handler.java:107)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.os.Looper.loop(Looper.java:237)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at android.app.ActivityThread.main(ActivityThread.java:8167)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at java.lang.reflect.Method.invoke(Native Method)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
12-31 16:21:17.325  2220  2220 E EdXposed-Bridge:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
kotori2 commented 3 years ago

Module specific bug.

whitetrefoil commented 3 years ago

@kotori2 Hi~ Is there any workaround? Which module actually?

kotori2 commented 3 years ago

Is there any workaround?

ask the module author pls.

Which module actually?

eu.faircode.xlua.XLua

whitetrefoil commented 3 years ago

eu.faircode.xlua.XLua

But I used the same 3 modules in my another phone (but Android 11), everything works and no single error in log.

whitetrefoil commented 3 years ago

Oops... I tried to remove XLuaProvicy, the error has gone... BUT... Greenify still report xposed module NOT loaded... Guessing this module load issue is not related to the SQL one, will file another issue for that.

kotori2 commented 3 years ago

Greenify still report xposed module NOT loaded...

They just wrote a bad Xposed detection method.

whitetrefoil commented 3 years ago

Greenify still report xposed module NOT loaded...

They just wrote a bad Xposed detection method.

Oops... So another issue seems not necessary... But I still don't know why everything (both Greenify & XPrivacyLua) works on my Android 11 phone. Totally same Magisk, same Riru, same EdXposed, same modules...

yujincheng08 commented 3 years ago

Check verbose log and see if there's a line saying skip android because sepolicy wad not loaded?

whitetrefoil commented 3 years ago

Check verbose log and see if there's a line saying skip android because sepolicy wad not loaded?

Found it:

12-31 17:00:41.447  1513  1513 E EdXposed: skip injecting into android because sepolicy was not loaded properly
kotori2 commented 3 years ago

BRUH

yujincheng08 commented 3 years ago

Check verbose log and see if there's a line saying skip android because sepolicy wad not loaded?

Found it:

12-31 17:00:41.447  1513  1513 E EdXposed: skip injecting into android because sepolicy was not loaded properly

now you know why.

whitetrefoil commented 3 years ago

now you know why.

Actually not totally understand by now, but I guess since you said that, I must missed something very basic. I'll do more research. Thanks a lot~

whitetrefoil commented 3 years ago

Just leave a shortcut for other comers: After deleted /data/adb/modules(_update)/riru_edxposed(_sandhook)/sepolicy.rule & reboot as https://github.com/ElderDrivers/EdXposed/issues/572#issuecomment-673390002 said, both Greenify & XPrivacyLua work perfectly, no SQL issue in log.