[APP] Camera HAL Switcher

Search This thread

ashwinpilgaonkar

Senior Member
Aug 30, 2013
132
55
28
Panaji
Hey guys!
I'm learning Android app development and decided to put the skills I learnt to some use, so here it is-
This app is for people like me who prefer the higher exposure time of the Stock HAL in low light (brighter and less noisy photos), but at the same time want to use all the features of Sultan's HAL like 4K video, etc.
It can also be used if you want to compare the two HALs or decide to revert to Stock in the future (no need to dirty flash your ROM now!).

Features:
  • Switch between Stock and Sultan's HAL on the fly (no reboot required!)
  • Backup and restore Stock HAL files (no need of a revert zip now)
  • Launch your default Camera from within the app
  • Should work on all ROMs 5.1.1 and above (EDIT: It doesn't seem to be working on OOS. Will try to fix it in the near future).
  • Will even work when Sultan updates his HAL
WARNING: This app is designed to run only on a rooted OPX running Android 5.1.1 and above. It might break your camera if used on any other phone!

Installation Instructions:
  1. Install the APK file
  2. Dirty flash your current ROM (only if you have already flashed Sultan's HAL)
  3. Press the Backup button in the app (Status should say "Not Installed" at this time)
  4. Flash Sultan's HAL zip from recovery

Usage:
  • If you're performing a clean ROM install in the future, be sure to hit the backup button within the app before flashing Sultan's HAL.
  • If Sultan releases an update to his HAL, be sure to switch to his HAL from within the app before flashing the updated zip.
  • If for whatever reason you encounter any issues, dirty flash your ROM and follow the Installation instructions again. This should fix them.

Credits:
@Sultanxda for his awesome HAL!
Note: Neither Stock HAL files nor Sultan's HAL files are included in this app

Any bug fixes, feature requests and reviews are always welcome (I'll be working on it only when I have free time).
Finally, it goes without saying- I'm not responsible for any damage whatsoever caused to your device by using this app!


XDA:DevDB Information
Camera HAL Switcher, App for the OnePlus X

Contributors
ashwinpilgaonkar
Source Code: https://github.com/ashwinpilgaonkar/CamHALChanger

Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2016-05-25

Created 2016-05-25
Last Updated 2016-05-25

XDA:DevDB Information
Camera HAL Switcher, Device Specific App for the OnePlus X

Contributors
ashwinpilgaonkar

Version Information
Status: Stable

Created 2016-05-25
Last Updated 2016-08-17
 

Attachments

  • Screenshot_20160525-180528.png
    Screenshot_20160525-180528.png
    90.5 KB · Views: 5,057
Last edited:

ashwinpilgaonkar

Senior Member
Aug 30, 2013
132
55
28
Panaji
Changelog:

26th May, 2016 (v1.0)
- Initial Build

28th May, 2016 (v1.01)
- Fixed issue in which camera was broken after switching to Stock HAL.
 
Last edited:

mindphuq

Member
Apr 13, 2016
42
8
Great application and idea, good job, but for some reason when switching to stock HAL my camera apps stop working. I was following your instructions and flashed HAL after installing the app and backuping the old HAL. Any suggestions?
 

ashwinpilgaonkar

Senior Member
Aug 30, 2013
132
55
28
Panaji
Wht if im usimg sultanrom?
No, this wont work if you're using Sultan's ROM as it comes with the custom HAL pre installed. You would have to manually copy the Stock HAL files from CM13 for it to work.


Great application and idea, good job, but for some reason when switching to stock HAL my camera apps stop working. I was following your instructions and flashed HAL after installing the app and backuping the old HAL. Any suggestions?
Does this only happen when switching to Stock HAL? It works fine for me.
Which ROM are you using?
Try dirty flashing it and following the instructions once again.
 

mindphuq

Member
Apr 13, 2016
42
8
No, this wont work if you're using Sultan's ROM as it comes with the custom HAL pre installed. You would have to manually copy the Stock HAL files from CM13 for it to work.



Does this only happen when switching to Stock HAL? It works fine for me.
Which ROM are you using?
Try dirty flashing it and following the instructions once again.
It only works with Sultan HAL and when switching to stock HAL, camera stops working. I am on CM13 Official latest nightly with bluspark kernel, xposed and supersu 2.65. First time I've tried it I had OOS 3.0.1 camera installed from the other thread. Then I dirty flashed without installing that camera and tried your app with the stock google camera from opengapps, still no luck. I really, really want this working on my phone :)
 

ashwinpilgaonkar

Senior Member
Aug 30, 2013
132
55
28
Panaji
It only works with Sultan HAL and when switching to stock HAL, camera stops working. I am on CM13 Official latest nightly with bluspark kernel, xposed and supersu 2.65. First time I've tried it I had OOS 3.0.1 camera installed from the other thread. Then I dirty flashed without installing that camera and tried your app with the stock google camera from opengapps, still no luck. I really, really want this working on my phone :)

I have the same ROM and kernel as you and it's working fine for me. It doesn't look like anyone else is having any issues either.
Send me a screen record of the entire process. I maybe able to figure out whats going wrong.
 

Matthius

Senior Member
Sep 4, 2013
91
12
I have the same ROM and kernel as you and it's working fine for me. It doesn't look like anyone else is having any issues either.
Send me a screen record of the entire process. I maybe able to figure out whats going wrong.
This is great in theory and i've waited for something like this to hopefully be made in which I am very greatful for. However, I'm on rooted OOS 2.2.0 with Blue spark and the same issue occurs for me - It says action performed successfully when applying the Stock HAL, but when launching the camera app it says "Unknwon error".

I have tried clearing cache and data for the stock camera app, but no luck.
 

mindphuq

Member
Apr 13, 2016
42
8
This is great in theory and i've waited for something like this to hopefully be made in which I am very greatful for. However, I'm on rooted OOS 2.2.0 with Blue spark and the same issue occurs for me - It says action performed successfully when applying the Stock HAL, but when launching the camera app it says "Unknwon error".

I have tried clearing cache and data for the stock camera app, but no luck.
Same problem as him - "Unknown Error" in OOS camera and "Can't connect to the camera" in google camera. Tried cleaning cache aswell, even tried with cleaning davlik/cache after installing sultan HAL.

For some reason my screen recorder cuts the videos before I can't record everything, so I can't provide a video. I can extract logs or something if you need them?
 
  • Like
Reactions: Matthius

Matthius

Senior Member
Sep 4, 2013
91
12
Mindphuq said:
Same problem as him - "Unknown Error" in OOS camera and "Can't connect to the camera" in google camera. Tried cleaning cache aswell, even tried with cleaning davlik/cache after installing sultan HAL.

For some reason my screen recorder cuts the videos before I can't record everything, so I can't provide a video. I can extract logs or something if you need them?
Yeah my recorder stops too. Here's error though after applying https://youtu.be/ivviaicSa4I
 
Last edited:

Kéno40

Senior Member
Nov 1, 2010
2,286
568
Maybe a direct option to clear "camera App" data (not onlycache) could help.
I'm trying the MOD right now.

Edit : same problem for me.

I had to wipe camera app data, , launch it from drawer and then it worked.
Without that, camera app couldn't be launched from Hal Switcher.
 
Last edited:

Matthius

Senior Member
Sep 4, 2013
91
12
Maybe a direct option to clear "camera App" data (not onlycache) could help.
I'm trying the MOD right now.

Edit : same problem for me.

I had to wipe camera app data, , launch it from drawer and then it worked.
Without that, camera app couldn't be launched from Hal Switcher.
I just tried this, still doesn't work for me unfortunately.

It doesn't matter what app it is so therefore I presume it's not just the stock camera app it's to do with something technical that can hopefully be fixed with a bit of tweaking.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    Hey guys!
    I'm learning Android app development and decided to put the skills I learnt to some use, so here it is-
    This app is for people like me who prefer the higher exposure time of the Stock HAL in low light (brighter and less noisy photos), but at the same time want to use all the features of Sultan's HAL like 4K video, etc.
    It can also be used if you want to compare the two HALs or decide to revert to Stock in the future (no need to dirty flash your ROM now!).

    Features:
    • Switch between Stock and Sultan's HAL on the fly (no reboot required!)
    • Backup and restore Stock HAL files (no need of a revert zip now)
    • Launch your default Camera from within the app
    • Should work on all ROMs 5.1.1 and above (EDIT: It doesn't seem to be working on OOS. Will try to fix it in the near future).
    • Will even work when Sultan updates his HAL
    WARNING: This app is designed to run only on a rooted OPX running Android 5.1.1 and above. It might break your camera if used on any other phone!

    Installation Instructions:
    1. Install the APK file
    2. Dirty flash your current ROM (only if you have already flashed Sultan's HAL)
    3. Press the Backup button in the app (Status should say "Not Installed" at this time)
    4. Flash Sultan's HAL zip from recovery

    Usage:
    • If you're performing a clean ROM install in the future, be sure to hit the backup button within the app before flashing Sultan's HAL.
    • If Sultan releases an update to his HAL, be sure to switch to his HAL from within the app before flashing the updated zip.
    • If for whatever reason you encounter any issues, dirty flash your ROM and follow the Installation instructions again. This should fix them.

    Credits:
    @Sultanxda for his awesome HAL!
    Note: Neither Stock HAL files nor Sultan's HAL files are included in this app

    Any bug fixes, feature requests and reviews are always welcome (I'll be working on it only when I have free time).
    Finally, it goes without saying- I'm not responsible for any damage whatsoever caused to your device by using this app!


    XDA:DevDB Information
    Camera HAL Switcher, App for the OnePlus X

    Contributors
    ashwinpilgaonkar
    Source Code: https://github.com/ashwinpilgaonkar/CamHALChanger

    Version Information
    Status: Stable
    Current Stable Version: 1.0
    Stable Release Date: 2016-05-25

    Created 2016-05-25
    Last Updated 2016-05-25

    XDA:DevDB Information
    Camera HAL Switcher, Device Specific App for the OnePlus X

    Contributors
    ashwinpilgaonkar

    Version Information
    Status: Stable

    Created 2016-05-25
    Last Updated 2016-08-17
    2
    OMG awesome mate!!
    But where's the link??

    Downloads tab at the top of OP.

    Really great work @ashwinpilgaonkar This will come in handy to a vast majority of people !
    2
    where does it backup stock camera hal to?

    It creates a copy with the extension of .stock in the same directory where it is originally located.
    1
    OMG awesome mate!!
    But where's the link??
    1
    WOW
    nice idea.
    Love it!