M66B / XPrivacy

XPrivacy - The ultimate, yet easy to use, privacy manager
http://forum.xda-developers.com/xposed/modules/xprivacy-ultimate-android-privacy-app-t2320783
GNU General Public License v3.0
2.08k stars 527 forks source link

On demand not working on Huawei EMUI 4.1 #2418

Closed Ten0 closed 7 years ago

Ten0 commented 7 years ago

When I try to use the on demand, it doesn't prompt and the app gets access to whatever it wanted. Disabling access without prompt works fine (when I try with ChompSMS, the app can't access my SMS anymore).

I'm not sure this is related, but when I start XPrivacy, I get the following error log :
https://pastebin.com/LfwQsijx

This is however not the same issue as #2300 (which is pointed out by #2369) because my XPrivacy is actually initialized :

05-29 19:18:47.376   595   595 W XPrivacy: Init path=/data/app/biz.bokhorst.xprivacy-1/base.apk
05-29 19:18:47.376   595   595 W XPrivacy: Options=
05-29 19:18:47.378   595   595 W XPrivacy: Hooking Zygote
05-29 19:18:47.445   595   595 W XPrivacy/XCamera: Native method=public final native void android.hardware.Camera.setPreviewTexture(android.graphics.SurfaceTexture) throws java.io.IOException
05-29 19:18:47.446   595   595 W XPrivacy/XCamera: Native method=public final native void android.hardware.Camera.startPreview()

Corresponding -a bit larger- logcat : https://pastebin.com/z5WB05jE

Also, here is the logcat of when I try to start an app (here, chompsms) which should prompt for access (here, sms) :

05-29 19:21:56.917  2038  2038 I K3V3CpuGovernorPolicy: set scene Hmp policy : 300 , 150
05-29 19:21:56.921  2038  2050 I PgedBinderListener: kstate callback type:16 value1=1515 value2=CALLED
05-29 19:21:56.922  2089  2089 I SendBroadcastPermission: action:com.android.launcher3.action.LAUNCH, mPermissionType:0
05-29 19:21:56.924  2089  2089 I SendBroadcastPermission: action:com.android.launcher3.action.LAUNCH, mPermissionType:0
05-29 19:21:56.932  1527  1832 I HwSystemManager: NotificationGuideService:handle MSG_ACTIVIY_FOREGROUND, uid:10119
05-29 19:21:56.933  6159  6159 I MicroDetector: Keeping mic open: false
05-29 19:21:56.933  6159  6159 I MicrophoneInputStream: mic_close com.google.android.apps.gsa.speech.audio.ah@c0348a6
05-29 19:21:56.934  6159  7465 I DeviceStateChecker: DeviceStateChecker cancelled
05-29 19:21:56.935  6159  6205 E AudioRecord-JNI: Error -4 during AudioRecord native read
05-29 19:21:56.938  2089  2089 I HwSecImmHelper: mSecurityInputMethodService is null
05-29 19:21:56.941   732  1791 I APM::AudioPolicyManager: stopInput() input 21
05-29 19:21:56.946   732  7468 I audio_hw_primary: do_in_standby standby: 0, in_device: 4
05-29 19:21:56.946  1527  1913 I HwResources: load icon id : 7f02001c, pkgName : com.p1.chompsms
05-29 19:21:56.952  1527  1913 I HwResources: icon : com.p1.chompsms found in app
05-29 19:21:56.964   732  7468 I audio_hw_primary: select_devices++ mode[0]
05-29 19:21:56.964   732  7468 I audio_hw_primary: output_device_id is 0, output_route is null;input_source_id is 0, input_route is null.
05-29 19:21:56.964   732  7468 I dsp_common: dsp_common_control_algo:set device = 0
05-29 19:21:56.964   732  7468 I dsp_maxim_ctl: maxim_get_prop: get codec_name succ, codec_name = hi6402
05-29 19:21:56.964   732  7468 I dsp_maxim_ctl: maxim_get_prop: get multi mic function enable succ, multi_mic_enable = 0
05-29 19:21:56.965   732  7468 I audio_pop: force change audio volume for MAIN PGA GAIN
05-29 19:21:56.965   732  7468 I audio_pop: force change audio volume for AUX PGA GAIN
05-29 19:21:56.965  1527  1913 I HwSystemManager: TafficState:default sub id = 0slotIndex = 0 subscriptionId = 0
05-29 19:21:56.965   732  7468 I audio_pop: force change audio volume for MAIN MIC BOOST
05-29 19:21:56.965   732  7468 I audio_pop: force change audio volume for AUX MIC BOOST
05-29 19:21:56.965   732  7468 I audio_pop: force change audio volume for LINEL PGA GAIN
05-29 19:21:56.965   732  7468 I audio_pop: force change audio volume for LINEINL BOOST
05-29 19:21:56.966   732  7468 I audio_pop: pop change S1 OL SWITCH SWITCH dir 0
05-29 19:21:56.966   732  7468 I audio_pop: pop change S1 OR SWITCH SWITCH dir 0
05-29 19:21:56.967   732  7468 I audio_pop: pop change S4 OL SWITCH SWITCH dir 0
05-29 19:21:56.967  1527  1913 E HwSystemManager: LeisureTrafficSetting:result is empty
05-29 19:21:56.970   732  7468 I audio_pop: pop change S4 OR SWITCH SWITCH dir 0
05-29 19:21:56.972   732  7468 I dsp_common: dsp_common_control_algo:set device = 0
05-29 19:21:56.972   732  7468 I dsp_maxim_ctl: maxim_get_prop: get codec_name succ, codec_name = hi6402
05-29 19:21:56.972   732  7468 I dsp_maxim_ctl: maxim_get_prop: get multi mic function enable succ, multi_mic_enable = 0
05-29 19:21:56.972   732  7468 I audio_hw_primary: select_devices--
05-29 19:21:56.972   732  1791 I APM::AudioPolicyManager: resetInputDevice() releaseAudioPatch returned 0, patchHandle 22
05-29 19:21:56.972   732  1078 I SoundTriggerHwService::Module: void android::SoundTriggerHwService::Module::onCallbackEvent(const android::sp<android::SoundTriggerHwService::CallbackEvent>&) mClient == 0
05-29 19:21:56.972   732  1791 W HuaweiAudioFlinger: soundtrigger is now disable or not support, pls enable it first from setting
05-29 19:21:56.972  6159  6159 I HwAudioRecordImpl: sendStateChangedIntent, state=1
05-29 19:21:56.973  6159  6159 I HwAudioRecordImpl: sendStateChangedIntent, state=1
05-29 19:21:56.975  6159  7466 I MicroRecognitionRunner: Detection finished
05-29 19:21:56.975  6159  7415 I MicroRecognitionRunner: Stopping hotword detection.
05-29 19:21:56.975   732  1372 I dsp_common: dsp_common_set_source:source = 0
05-29 19:21:56.975   732  1372 I audio_hw_primary: do_in_standby standby: 1, in_device: 0
05-29 19:21:56.975  6159  6159 I SendBroadcastPermission: action:update-hint, mPermissionType:0
05-29 19:21:56.976  6159  6617 W SearchService: Abort, client detached.
05-29 19:21:56.978  2038  2843 W PGApi_client: recv actoionId = 10013, action = com.huawei.pgmng.PGAction@732d5b actionId =10013 pkg =com.p1.chompsms extend1 =16 extend2 = flag =3 type =1
05-29 19:21:56.997  1051  2051 W XPrivacy/XBinder: Unknown transaction=android.content.pm.IPackageManager:43 class=class com.android.server.pm.HwPackageManagerService uid=10119
05-29 19:21:56.998  1051  1570 W XPrivacy/XBinder: Unknown transaction=android.app.IActivityManager:502 class=class com.android.server.am.HwActivityManagerService uid=10119
05-29 19:21:57.000  1051  1644 W XPrivacy/XBinder: Unknown transaction=android.app.IActivityManager:502 class=class com.android.server.am.HwActivityManagerService uid=10119
05-29 19:21:57.001  1051  1887 W XPrivacy: Invalid secret restriction=10119/queryBroadcastReceivers(null;null) system=!restricted?
05-29 19:21:57.004  1051  1088 W XPrivacy: Invalid secret restriction=10119/Configuration.MCC(null;null) phone=!restricted?
05-29 19:21:57.005  1051  1352 W XPrivacy: Invalid secret restriction=10119/Configuration.MNC(null;null) phone=!restricted?
05-29 19:21:57.016  1051  1570 W XPrivacy/XBinder: Unknown transaction=android.content.pm.IPackageManager:43 class=class com.android.server.pm.HwPackageManagerService uid=10119
05-29 19:21:57.018  1051  1088 W XPrivacy/XBinder: Unknown transaction=android.app.IActivityManager:502 class=class com.android.server.am.HwActivityManagerService uid=10119
05-29 19:21:57.019  1051  1644 W XPrivacy/XBinder: Unknown transaction=android.app.IActivityManager:502 class=class com.android.server.am.HwActivityManagerService uid=10119
05-29 19:21:57.020  1051  1666 W XPrivacy/XBinder: Unknown transaction=android.content.pm.IPackageManager:45 class=class com.android.server.pm.HwPackageManagerService uid=10119
05-29 19:21:57.022  1051  2086 W XPrivacy/XBinder: Unknown transaction=android.content.pm.IPackageManager:41 class=class com.android.server.pm.HwPackageManagerService uid=10119
05-29 19:21:57.026  1051  2081 W XPrivacy/XBinder: Unknown transaction=android.app.IActivityManager:502 class=class com.android.server.am.HwActivityManagerService uid=10119
05-29 19:21:57.028  1051  2084 W XPrivacy/XBinder: Unknown transaction=android.app.IActivityManager:502 class=class com.android.server.am.HwActivityManagerService uid=10119
05-29 19:21:57.029  1051  1088 W XPrivacy/XBinder: Unknown transaction=android.content.pm.IPackageManager:62 class=class com.android.server.pm.HwPackageManagerService uid=10119
05-29 19:21:57.033  1051  2084 W XPrivacy: Invalid secret restriction=10119/getDeviceId(null;null) phone=!restricted?
05-29 19:21:57.035  1051  1088 W XPrivacy/XBinder: Unknown transaction=android.app.IActivityManager:502 class=class com.android.server.am.HwActivityManagerService uid=10119
05-29 19:21:57.036  1051  2133 W XPrivacy/XBinder: Unknown transaction=android.app.IActivityManager:502 class=class com.android.server.am.HwActivityManagerService uid=10119
05-29 19:21:57.046   365  2958 I gralloc : Alloc req: dev=0x7fb2442460, w=1080, h=1812, format=0x1, usage=0xb00
05-29 19:21:57.047   365  2958 I gralloc : Alloc handle(0x7fad0dda00): interfmt=0x200000001, stride=1088, size=8486912, usage=0xb00
05-29 19:21:57.047   365  2958 I gralloc : Alloc req: dev=0x7fb2442460, w=1080, h=1812, format=0x1, usage=0xb00
05-29 19:21:57.052   365  2958 I gralloc : Alloc handle(0x7fad0dd000): interfmt=0x200000001, stride=1088, size=8065024, usage=0xb00
05-29 19:21:57.052   365  2958 I gralloc : Alloc req: dev=0x7fb2442460, w=1080, h=1812, format=0x1, usage=0xb00
05-29 19:21:57.052   365  2958 I gralloc : Alloc handle(0x7fb297f700): interfmt=0x200000001, stride=1088, size=8486912, usage=0xb00
05-29 19:21:57.058  1051  1089 W XPrivacy: Invalid secret restriction=10119/SmsProvider(content://sms;null) messages=!restricted?
05-29 19:21:57.059  1051  2081 W XPrivacy: Invalid secret restriction=10119/MmsProvider(content://mms-sms/conversations?simple=true;null) messages=!restricted?
05-29 19:21:57.076   365  2958 I gralloc : Free handle(0x7fad0ddb00)
05-29 19:21:57.076   365  2958 I gralloc : Free handle(0x7fad0dd900)
05-29 19:21:57.370   365   365 I gralloc : Free handle(0x7fad0dd700)
05-29 19:21:57.391  2038  2050 I PgedBinderListener: kstate callback type:8 value1=6794 value2=KILLED
05-29 19:21:57.487  1051  1644 E HsmCoreServiceImpl: onTransact in code is: 102
05-29 19:21:57.487  1051  1644 I MediaProcessHandler: processOp opType: 1, uid: 10010, pid: 6794
05-29 19:21:57.487  1051  1644 W MediaProcessHandler: remove target not exist, maybe the UI process: uid: 10010, pid: 6794
05-29 19:21:57.681  2038  2038 I K3V3CpuGovernorPolicy: set scene Hmp policy : 665 , 256

There is no mention of "On demand" anywhere in that log, but there are Invalid secret restriction warnings. And the on demand global setting is of course enabled.

How can I get the on demand functionality to work ?

M66B commented 7 years ago

Did you enable XPrivacy debug logging?

Ten0 commented 7 years ago

I did not, and after enabling it and rebooting my phone, on demand fixed itself, the On demand logs now appear, and that despite the fact I already had rebooted it 3 or 4 times, wiped caches, etc, to make sure that wasn't the problem...

Anyway, the No field mSleeping error still pops when I start XPrivacy, but the rest seems to have decided to work magically, so I'm fine. Sorry for the inconvenience... :/