• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE][ROOT][MAGISK] Photochrom Filter Enabler

Search This thread

Chr0m3Chaos

Member
Jun 20, 2017
17
2
As far as I'm concerned that's just as bad as outright disabling it. Nobody asked for an overlay of the ultrawide. I'm spending some time looking through all the changes but it looks like there is a substantial amount.

Yeah, I agree completely. There was hardly any point to the filter camera and now that it's been put on the ultrawide as an overlay, honestly, I almost feel cheated.

Also, I can confirm that even after flashing this module on the IN2025 (Oxygen 10.5.10.IN11A), the Photochrom filter is still only using the ultrawide.
 
  • Like
Reactions: ahmedra2ol

ahmedra2ol

Member
May 13, 2011
6
0
Cairo
Why don't we just downgrade to 10.5.6 ? And everything will be fine, until a good mod is done right for any software version and then upgrade, Simple as that.
 

feeelx

Member
Jul 13, 2016
30
4
10.5.10 here
after flashing this module, it's using the infra-red camera but it's not seeing through plastics?
 
Last edited:

ster88

Member
Aug 21, 2011
8
4
As far as I'm concerned that's just as bad as outright disabling it. Nobody asked for an overlay of the ultrawide. I'm spending some time looking through all the changes but it looks like there is a substantial amount.

How about trying to connect only Photochrom camera with an test/debug app?
 

xian1243

Member
Mar 1, 2010
43
54
So, after piecing this together by pushing files one by one from the previous version's /vendor, I have still not been able to roll this back. I suspect what is happening is that there are some framework changes as well in /product and /system, for which at this point would require replacing almost everything. Shame.
 

dladz

Senior Member
Aug 24, 2010
13,191
4,224
Liverpool
Huawei Watch 2
OnePlus 8
Finally rooted. Just checking to see what can be done about this photochrom filter? Totally useless feature but it's cool and OnePlus doesn't want us using it which makes me want to use it even more :D

How it going @ OP?

Any luck / progress? Or proving harder than expected.

I'm on 12 at the moment, not looking good according to the comments.
 

matchi

Member
May 13, 2016
17
4
OnePlus 8 Pro
OnePlus 9 Pro
Finally rooted. Just checking to see what can be done about this photochrom filter? Totally useless feature but it's cool and OnePlus doesn't want us using it which makes me want to use it even more :D

How it going @ OP?

Any luck / progress? Or proving harder than expected.

I'm on 12 at the moment, not looking good according to the comments.
Just type these commands in termux
"su" hit enter
and then
"am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest"
Then simply use the camera switch button to switch to 4th camera, you can even take videos with it
 
  • Like
Reactions: dladz

dladz

Senior Member
Aug 24, 2010
13,191
4,224
Liverpool
Huawei Watch 2
OnePlus 8
Just type these commands in termux
"su" hit enter
and then
"am start -n com.oneplus.factorymode/.camera.manualtest.CameraManualTest"
Then simply use the camera switch button to switch to 4th camera, you can even take videos with it

I shall give that a try, cheers pal. :good:

Edit, opened the test settings but didn't give any options for photochrom.

Nevermind, not the end of the world
 
Last edited:

Rgar

Member
May 20, 2019
15
1
I shall give that a try, cheers pal. :good:

Edit, opened the test settings but didn't give any options for photochrom.

Nevermind, not the end of the world


This app worked for me dladz!!

rgmvision.com/infrared-cameras/

It opens the factory mode camera (including the photochrom ;)).

You could try it if your OnePlus 8 Pro is rooted. Let me know your results :)
 
  • Like
Reactions: dladz

matchi

Member
May 13, 2016
17
4
OnePlus 8 Pro
OnePlus 9 Pro

Attachments

  • Screenshot_20200822-185619__01.jpg
    Screenshot_20200822-185619__01.jpg
    190 KB · Views: 329
  • Like
Reactions: dladz

kevkid

Senior Member
Sep 22, 2010
307
50
Does this work on latest firmware? I keep getting this error
 

Attachments

  • Screenshot_20200822-141956.jpg
    Screenshot_20200822-141956.jpg
    255.7 KB · Views: 223

dladz

Senior Member
Aug 24, 2010
13,191
4,224
Liverpool
Huawei Watch 2
OnePlus 8
Oh really lol, I thought that was for the front gaming camera? Hahaha oh I am getting old. Don't judge me

---------- Post added at 08:20 PM ---------- Previous post was at 08:14 PM ----------


Nah didn't work mate, I clicked that button and it did indeed show the front facing camera. Then on pressing again if shows bokeh then the whole thing freezes..
Have tried all buttons, not working for me.

I am on 10.5.12 may be why
 

dladz

Senior Member
Aug 24, 2010
13,191
4,224
Liverpool
Huawei Watch 2
OnePlus 8
This app worked for me dladz!!

rgmvision.com/infrared-cameras/

It opens the factory mode camera (including the photochrom ;)).

You could try it if your OnePlus 8 Pro is rooted. Let me know your results :)

So that's exactly the same thing. The app simply opens up a termux (in the background) and runs that script, not quite sure why it needs root access.

Freezes on the same part as the script.

Cheers though, definitely easier than writing that script or rerunning it.

Damn OnePlus for this, it's annoyed me, think we should get a bit of money back for the loss of a camera.

It's also possible that because I'm running xXx factory mode may be compromised.

It's either that or v12
 

Attachments

  • Screenshot_20200822-202317.jpg
    Screenshot_20200822-202317.jpg
    114.8 KB · Views: 234

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    Unfortunately this is proving to be harder than I thought. There are dozens of changes to the camera libraries and new changes I am not familiar with. No ETA yet but still working on this.
    7
    Disclaimer: you accept responsibility by flashing this magisk module to your device at your own risk. If you experience any issues with Magisk, please refer to https://github.com/topjohnwu/Magisk/issues

    This magisk module was created by isolating the diff between the full payload.bin of OOS 10.5.8 and the delta payload.bin of OOS 10.5.9 which had entirely disabled the Photochrom camera.

    - Tested on OOS 10.5.10 IN2025.
    - Currently not working on OOS 10.5.11 IN2025 due to additional changes that were made, I am working on fixing this. Please do not ask me for an ETA or complain about my internet uploads speeds.

    Please advise: this has not tested on Indian or European models, and I cannot guarantee compatibility.

    Download link (compatible with OOS 10.5.10) for IN2025: https://www.androidfilehost.com/?fid=8889791610682885705

    I identified the following changes:

    /system/priv-app/OnePlusCamera.apk: removal of the photochrom filter selection, confirmed via changes in smali bytcode
    /vendor/lib/camera/: various camera firmware binaries were recompiled, including changes to what I presume to be the 5MP camera with the built-in infrared lens filter (gc5035)
    /vendor/lib/camera/components/: various camera component feature stubs/wrappers for the camera apk
    /vendor/lib/hw/: changes to camera.qcom.so, which is compiled against the previously mentioned binaries, statically linked
    /vendor/lib64/camera/: same as above
    /vendor/lib64/camera/components/: same as above
    /vendor/lib64/hw/: same as above

    This magisk module will restore these changed files, including the stock camera application, camera firmware binaries/drivers and dependencies systemlessly. If you would like to revert the changes, simply disable or remove the magisk module via magisk manager.

    Enjoy!
    2
    OnePlusCamera.apk simulated InfraredCamera flags

    While examining OnePlusCamera.apk with a friend (see also: OnePlusCameraService.apk, CameraPicProcService.apk), we found flags for simulating the 'photochrom' (infrared) camera in the apk version from the official 10.5.13 images for the OnePlus 8 Pro (OnePlus8ProOxygen_15.O.22_OTA_022_all_2008080055(_29200cde68411c2)):

    Code:
    package com.oneplus.camera.hardware.camera2.wrappers;
    ...
    /* compiled from: InfraredCameraBuilder.kt */
    public final class InfraredCameraBuilder implements CameraInterfaceBuilder<Camera> {
        public static final Companion Companion = new Companion(null);
        private static final Feature FEATURE_ENABLE_IR_CAMERA = Feature.Companion.create("InfraredCameraBuilder.EnableInfraredCamera");
        /* access modifiers changed from: private */
        public static final Feature FEATURE_MODELS_TO_DISABLE_IR_CAMERA = Feature.Companion.create("InfraredCameraBuilder.ModelsToDisableInfraredCamera");
        private static final Feature FEATURE_SIMULATE_BY_UW_CAMERA = Feature.Companion.create("Simulation.OPInfraredCamera.UseUWCamera");
        private Boolean isRtbInfraredCameraSupported;
        private final Lazy modelsToDisable$delegate = LazyKt.lazy(InfraredCameraBuilder$modelsToDisable$2.INSTANCE);
    ...

    Code:
    package com.oneplus.camera.hardware.camera2.wrappers;
    ...
    /* compiled from: OPInfraredCameraImpl.kt */
    public final class OPInfraredCameraImpl extends OPSimpleFeatureCamera implements InfraredCamera {
        public static final Companion Companion = new Companion(null);
        /* access modifiers changed from: private */
        public static final Feature FEATURE_SIMULATE_BY_UW_CAMERA = Feature.Companion.create("Simulation.OPInfraredCamera.UseUWCamera");

    Code:
    package com.oneplus.camera.features;
    ....
            featureInitializer.set("Simulation.OPInfraredCamera.UseUWCamera", false);

    This made us wonder whether 'Simulation.OPInfraredCamera.UseUWCamera' (fake infrared camera) might be somewhere in shared_prefs for the camera app, e.g. '/data/data/com.oneplus.camera/shared_prefs/' or similar.

    I do not currently have the hardware myself. I just want to understand whether it is possible to somehow force enabling the real IR camera without paying USD 900+ for it beforehand. I tried to check using the Android emulator, but getting OnePlusCamera.apk to run was too difficult for me (custom ARM AVD using the official images would be needed as the apk contains native ARM code and checks system environment details, and I couldn't make it boot). Hence:

    If someone with a root file manager would be interested in checking around in /data/data/com.oneplus.camera/shared_prefs or thereabouts for a value called 'Simulation.OPInfraredCamera.UseUWCamera', we might be able to find a way to turn it back on.

    Do you see this value there somewhere?

    EDIT:

    Note that 'Simulation.OPInfraredCamera' and 'UseUWCamera' and similar do not occur anywhere in CameraPicProcService.apk, though simulation options for other cameras do. Also, OnePlusCameraService.apk is very simple internally and does not do any of this stuff in general. Internally, the 'photochrome' mode is referred to simply as 'InfraredCamera' and *'chrom'* does not appear in any relevant contexts except in some tutorial and menu-related text in other locations.

    It kind of looks like the disabling changes may have been made entirely in OnePlusCamera.apk. However, OnePlusCamera.apk contains native code interfacing with the libraries for the camera drivers themselves, which have been updated in successive releases, so downgrading the apk without downgrading the entire release ROM breaks the camera app (as other users here have confirmed). Point being: even if shared_prefs does not contain the strings discussed above, it may still be possible to patch the apk with dexpatcher-tool or similar to hard-code a value to avoid the fake IR camera.
    2
    Update disables the unfiltered camera and uses the ultrawide instead.

    As far as I'm concerned that's just as bad as outright disabling it. Nobody asked for an overlay of the ultrawide. I'm spending some time looking through all the changes but it looks like there is a substantial amount.
    1
    ...

    Download link: (pending)

    ...
    Taking a bit longer than expected to upload, but it is coming. :)

    @xian1243 THREAD CLOSED! Placeholder are not accepted.

    Please advise the moderators' team (best via the report function) when ready to provide a download link.