[MAGISK] OnePlus Analytics Disabler

Search This thread

benwalburn

Senior Member
Jan 9, 2012
314
217
It was recently discovered that OnePlus uses some over the top analytics that you can't opt out of. I'm not going to get into details as I'm not a developer, but you can read more at the link at the bottom of this post. I made a quick Magisk module that disables the tracking app by replacing it and it's odex file with an empty one, the standard procedure for disabling apps with Magisk. It should work on any OnePlus phone that uses this tracking app.

Install this through Magisk Manager.

More info:
https://www.chrisdcmoore.co.uk/post/oneplus-analytics/

Edit: I'm seeing a few cases of module not working for some people. I'm not certain what's causing it, but please make sure you're using the official rom and the beta version of Magisk. I'll continue looking into the errors while I'm not working.

UPDATE: Now replaces OPDeviceManager and OPDeviceManagerProvider, thanks to @WhoDunnit for bringing it to my attention. I still haven't been able to replicate any errors or find anything to fix them. Hopefully OnePlus pulls through and disables the tracking so this mod isn't needed.

Update 2: As long as I'm dragging behind, I'll just keep linking to WhoDunnit's modules within this thread. His updated module includes my changes but only disables the EngineeringMode backdoor, rather than the entire app, as well as disabling OPBugReportLite. Any updates I personally make will be based off this module, but hopefully we won't need any more. Here's the post with the updated module: https://forum.xda-developers.com/on...plus-analytics-disabler-t3686636/post74614087

Version 1.2: now disables EngineeringMode and related files.

PrivacyFix 1.0 disables OPDeviceManager.apk, OPDeviceManagerProvider.apk, libdoor.so (Engineering backdoor), OEMLogKit.apk, LogKitSdService.apk, oemlogkit, OPBugReportLite.apk. Remember to remove my old module.
 

Attachments

  • OP5analyticsdisabler1.1.zip
    6.8 KB · Views: 1,583
  • OP5analyticsdisabler1.2.zip
    8.8 KB · Views: 4,927
Last edited:

OcazPrime

Senior Member
Mar 30, 2016
449
108
very smart of you to make this. Im sure this will also benefit battery life as well not logging and shipping all of our information and activities at a whim.
 
  • Like
Reactions: dego_ and Mr.5g

Devhux

Senior Member
Mar 1, 2008
1,699
473
Samsung Galaxy S22 Ultra
What am I doing wrong? I tried going to Modules, then tapping the + icon. When selecting this mod, I get the following screen Screenshot_20171010-174917.jpg

Sent from my ONEPLUS A5000 using Tapatalk
 

benwalburn

Senior Member
Jan 9, 2012
314
217
What am I doing wrong? I tried going to Modules, then tapping the + icon. When selecting this mod, I get the following screen

That's interesting. I can't find any information on that error and it seems to only be you. Try deleting the zip and redownloading it. If that fails, you can try flashing it though recovery, but I haven't tested this method. Still, no reason to think it won't work.

Are you using the latest Magisk beta?

This work with any OOS phone such as OnePlus 2 and 3?

It should work as long as the APK name doesn't change. No reason it should change, as it's a generic name. I don't know if other devices use it though. Worst case scenario you get a fake app taking up 0 bytes of precious storage.

Will this work after a software update, or do we need to run every time?

If Magisk gets removed by a system update then you'll have to reinstall Magisk to get the module working again. You won't have to reinstall the module.
 
  • Like
Reactions: mrmcshagbag

64ashg

Senior Member
May 18, 2014
545
349
Redmi K20 Pro
Just flashed it on my 3t running oos 4.5.0, is there a way to verify its working as I have become very paranoid with this revelation. I am finally and seriously considering to stop using oos, even though I haven't used a custom rom yet on my 3t.
 
  • Like
Reactions: mrmcshagbag

yehyeh

Member
Aug 29, 2008
16
3
My Magisk Manager crashed every time installing this module. Here are the logs:
Process: com.topjohnwu.magisk
Flags: 0x38c8be44
Package: com.topjohnwu.magisk v51 (5.1.1)
Foreground: Yes
Build: OnePlus/OnePlus3/OnePlus3T:7.1.1/NMF26F/09151130:user/release-keys

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference
at com.topjohnwu.magisk.a.i.f(Unknown Source)
at com.topjohnwu.magisk.a.b.a(Unknown Source)
at com.topjohnwu.magisk.a.b.onPostExecute(Unknown Source)
at android.os.AsyncTask.finish(AsyncTask.java:667)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6374)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:103)
Logcat:
10-11 11:29:36.075 11175 11175 E AndroidRuntime: FATAL EXCEPTION: main
10-11 11:29:36.075 11175 11175 E AndroidRuntime: Process: com.topjohnwu.magisk, PID: 11175
10-11 11:29:36.075 11175 11175 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at com.topjohnwu.magisk.a.i.f(Unknown Source)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at com.topjohnwu.magisk.a.b.a(Unknown Source)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at com.topjohnwu.magisk.a.b.onPostExecute(Unknown Source)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at android.os.AsyncTask.finish(AsyncTask.java:667)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at android.os.AsyncTask.-wrap1(AsyncTask.java)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6374)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
10-11 11:29:36.075 11175 11175 E AndroidRuntime: at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:103)
10-11 11:29:36.097 4365 15869 W ActivityManager: Force finishing activity com.topjohnwu.magisk/.FlashActivity
 

bartito

Inactive Recognized Developer
Dec 1, 2005
3,962
1,800
A simple question. I apologize for my ignorance...
Why do you not simply remove the OPDeviceManager from /system/priv-app instead of make a Magisk module for that?


It was recently discovered that OnePlus uses some over the top analytics that you can't opt out of. I'm not going to get into details as I'm not a developer, but you can read more at the link at the bottom of this post. I made a quick Magisk module that disables the tracking app by replacing it and it's odex file with an empty one, the standard procedure for disabling apps with Magisk. It should work on any OnePlus phone that uses this tracking app.

Install this through Magisk Manager.

More info:
https://www.chrisdcmoore.co.uk/post/oneplus-analytics/
 

B.Z.H.29

Senior Member
Aug 4, 2012
142
26
37
Brest
Google Pixel 6
Hello !! I tried to install this with magisk, but i don't know if it's good or not. I'm on the xXx's rom, and never used magisk before.

At the end of the installation, i've installation failed, Can you tell me why please ? Thanks you.
 

Attachments

  • Screenshot_20171011-123351.jpg
    Screenshot_20171011-123351.jpg
    173.9 KB · Views: 835

VelosCohagen

Senior Member
Feb 18, 2012
297
92
Wölfersheim
Hello !! I tried to install this with magisk, but i don't know if it's good or not. I'm on the xXx's rom, and never used magisk before.

At the end of the installation, i've installation failed, Can you tell me why please ? Thanks you.
This is for OOS and nothing else, and is not needed on custom ROMs.

Gesendet von meinem ONEPLUS A5000 mit Tapatalk
 
  • Like
Reactions: derrrl and B.Z.H.29

benwalburn

Senior Member
Jan 9, 2012
314
217
Just flashed it on my 3t running oos 4.5.0, is there a way to verify its working as I have become very paranoid with this revelation. I am finally and seriously considering to stop using oos, even though I haven't used a custom rom yet on my 3t.

Yeah, just open Settings > Apps > overflow button > show System apps > and see if OPDeviceManager is there. Since I replaced it with an invalid app, you shouldn't see it in the apps at all.

My Magisk Manager crashed every time installing this module. Here are the logs:

Logcat:

I wasn't able to replicate the issue on Magisk 14.2. Are you still on the stable release? In spite of the name, the stable is broken. Aside from that, it should work. The way the module is designed it should install on any phone with a properly functioning Magisk, even if the app I'm disabling doesn't exist.

A simple question. I apologize for my ignorance...
Why do you not simply remove the OPDeviceManager from /system/priv-app instead of make a Magisk module for that?

Because Magisk modules are all the rage. But seriously, people don't like messing with /system anymore. Just like any other module, this allows you to modify the system without actually modifying it. It shouldn't trip SafetyNet and the module can be reapplied after an update by simply reinstalling Magisk. The change itself can be disabled with a checkbox, which I think is great for people who don't want to get their hands dirty, or for testing bugs. It's better in the long term for users of otherwise stock ROMs.

I did hear after making this module that you can disable the app with ADB, which is a roughly equal solution. I'd still prefer this just for the ability to manage it through Magisk. Being able to see the changes you've made to your phone just by glancing at an app is pretty useful.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 77
    It was recently discovered that OnePlus uses some over the top analytics that you can't opt out of. I'm not going to get into details as I'm not a developer, but you can read more at the link at the bottom of this post. I made a quick Magisk module that disables the tracking app by replacing it and it's odex file with an empty one, the standard procedure for disabling apps with Magisk. It should work on any OnePlus phone that uses this tracking app.

    Install this through Magisk Manager.

    More info:
    https://www.chrisdcmoore.co.uk/post/oneplus-analytics/

    Edit: I'm seeing a few cases of module not working for some people. I'm not certain what's causing it, but please make sure you're using the official rom and the beta version of Magisk. I'll continue looking into the errors while I'm not working.

    UPDATE: Now replaces OPDeviceManager and OPDeviceManagerProvider, thanks to @WhoDunnit for bringing it to my attention. I still haven't been able to replicate any errors or find anything to fix them. Hopefully OnePlus pulls through and disables the tracking so this mod isn't needed.

    Update 2: As long as I'm dragging behind, I'll just keep linking to WhoDunnit's modules within this thread. His updated module includes my changes but only disables the EngineeringMode backdoor, rather than the entire app, as well as disabling OPBugReportLite. Any updates I personally make will be based off this module, but hopefully we won't need any more. Here's the post with the updated module: https://forum.xda-developers.com/on...plus-analytics-disabler-t3686636/post74614087

    Version 1.2: now disables EngineeringMode and related files.

    PrivacyFix 1.0 disables OPDeviceManager.apk, OPDeviceManagerProvider.apk, libdoor.so (Engineering backdoor), OEMLogKit.apk, LogKitSdService.apk, oemlogkit, OPBugReportLite.apk. Remember to remove my old module.
    32
    It might be a good idea to merge all versions into one?

    Good idea. So here's what I did - I downloaded all the attachments that were present in this thread and combined them into one, additionally cross checking everything with the latest OxygenOS Open Beta release to make sure nothing was missed (in which I found an additional app that could be disabled, so I added that). The all-in-one module has been attached with this post. :)
    23
    thanks @WhoDunnit & @benwalburn
    Is there an "unified" module coming ?

    Yes, here you are. OP5PrivacyFix is attached. This module combines all modules in this thread and disables the following privacy threats find by Elliot Alderson‏ (fs0c131y):

    • OPDeviceManager: priv-app/OPDeviceManager.apk, priv-app/OPDeviceManagerProvider.apk
    • OEMLogKit: app/OEMLogKit.apk, app/LogKitSdService.apk, bin/oemlogkit
    • EngineeringMode: lib/libdoor.so, lib64/libdoor.so
    • OPBugReportLite: app/OPBugReportLite.apk

    Note that I choose to not remove EngineeringMode.apk, as I do find its tests useful. Instead, I disabled only the backdoor by removing libdoor.
    16
    Magisk 20 update

    For those that are interested, I updated my version of the module to Magisk 20 for OP5 Android9.

    Removes folders/apps (replaced with empty folders):
    • /system/priv-app/OPDeviceManager
    • /system/priv-app/OPDeviceManagerProvider
    • /system/app/LogKitSdService
    • /system/app/OEMLogKit
    • /system/app/OPBugReportLite
    • /system/app/OPBugReport_Complete
    • /system/app/OPCommonLogTool

    Removes files (replaced with empty files):
    • /system/lib/libdoor.so
    • /system/lib64/libdoor.so
    • /system/bin/bugreport
    • /system/bin/bugreportz
    • /system/bin/oemlogkit

    Some of these targets will no longer exist on up-to-date versions of OxygenOS, but it never hurts to disable them anyway.
    15
    PrivacyFix for Oreo

    I adapted the OP5PrivacyFix module for Oreo. In Oreo the backdoor is removed from EngineeringMode, so I removed that part from the module.
    This module the following privacy threats find by Elliot Alderson‏ (fs0c131y) for the official Oreo version of OP5:

    • OPDeviceManager: priv-app/OPDeviceManager.apk, priv-app/OPDeviceManagerProvider.apk
    • OEMLogKit: app/OEMLogKit.apk, app/LogKitSdService.apk, bin/oemlogkit
    • OPBugReportLite: app/OPBugReportLite.apk