[How to] Enabling cam2 (GCAM) for every android version with temp root + keeping OTA

Search This thread

minnuss

Senior Member
Dec 25, 2010
365
265
Belgrade
This guide worked for every OREO version, and also is working for PIE ! :good:

You will enable camera2 on your phone, and keep it stock afterwards so it can receive future OTA updates. :victory:

1 - Unlocking bootloader
Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.
First of all, enable the Developer Option.
To do this go to your Settings -> About -> Software Information -> More -> Now Tap on the Build Number 7-8 Times until you see a toast message “Developer option enabled”.

Now go back to settings -> Enable the OEM Unlock by going to Settings -> Developer Option and Enable OEM Unlock and USB Debugging.

Now connect the phone with your USB cable, use USB port 2.0 on your computer.
It should appear on your phone screen an asking for access privileges of your PC (device, maybe Linux), allow it.

Download ADB if you don't have it.
https://drive.google.com/file/d/1yCdMyAAOD46T4B8haFuZVF57E4-WK8l2/view?usp=sharing

In ADB folder, double click "Open CMD here.bat".
AND FROM THIS TIME, YOU DON'T CLOSE THIS CMD AT ALL, UNTILL YOU FINISH THE WHOLE GUIDE

Code:
adb devices

Your device should appear with some random numbers like this
https://www.howtogeek.com/wp-content/uploads/2012/10/image34.png

If it does, go to next stage, if it's not, you are not installed usb drivers corectly or did not enabled usb debugging.
Link for USB Drivers for Mi A2.
http://dl.adbdriver.com/upload/adbdriver.zip

Code:
adb reboot bootloader

Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.

Code:
fastboot oem unlock

Phone will reboot, go to check developer options > usb debugging ON once again.

Code:
adb reboot bootloader

Again in fastboot we are unlocking critical partitions, and once again it will erase verything from the phone, so be sure to do the backup as needed.

Code:
fastboot flashing unlock_critical

Again when the phone reboot, check developer options > usb debugging ON.

2. Rooting the phone (temporarily)
Download stock boot and patched boot of android version you have, if you need versions for OREO, find somewhere in forum, here it is link for PIE.
10.0.9.0 https://drive.google.com/drive/folders/1ZP5jelFGT5z9EJvHRokzLJwAikKtWI8p?usp=sharing
10.0.8.0 https://drive.google.com/drive/folders/1XNE_veO_FvOLQ46oorUBa2g7TKA1PHRv?usp=sharing
10.0.7.0 https://drive.google.com/drive/folders/1kHLYXhaWFpjh58F79xnOkN3kjkuyEdHV?usp=sharing
10.0.5.0 https://drive.google.com/drive/folders/1qCIsk1MVVq_X-mR8BBWa2NeVLB_-4q5y?usp=sharing
10.0.4.0 https://drive.google.com/drive/folders/1piLD_9mQv0XgahyIZdxRqfdwaDbfx2_0?usp=sharing
10.0.3.0 https://drive.google.com/open?id=1uO3yfxHdTr4gv4DmCaLu-naIIt8mprBT
"It seems like 10.0.3.0 OTA is withdrawn by Xiaomi due to numerous bootloops in stock phones."
My recommendation is to skip flashing this version, until next stable comes up !

10.0.2.0 https://drive.google.com/drive/folders/1_cIM0ltKD_PU1mIiWwUE-nMba964NyvN?usp=sharing
10.0.1.0 https://drive.google.com/drive/folders/18tcBVaKwH9cy_RVczf-GSc_tAkFYvn15?usp=sharing
9.6.17.0 https://drive.google.com/drive/folders/1D9RlDZRupdriCyJM4p0ixvntPE2QPP9w?usp=sharing

Put the files in adb folder, both the stock boot.img and patched_boot.img.

NOW !
There are two methods, so you can choose between those two:
1. Faster and easier one with only booting patched boot
2. Slower with flashing, but this one will teach you how to flash and root your phone

1. ENABLING WITH BOOTING PATCHED_BOOT.IMG

In CMD type
Code:
adb reboot bootloader
Code:
fastboot boot patched_boot.img
When the phone starts, wait for magisk to appear in apps, or if it's not there, find it in apkmirror site, magisk manager, download, install from phone it is easier.
https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=magisk+manager
Then when you start magisk, it will ask you to download full zip, just skip it, your phone will now be rooted.

3. Enabling Camera2 api (lvl3)
In CMD type
Code:
adb shell
Code:
su
(this time look at the phone screen, allow root access ONCE)
Code:
setprop persist.camera.HAL3.enabled 1
For PIE and for using v6 Gcam ports three more commands, for OREO it is not needed.
Code:
setprop persist.vendor.camera.HAL3.enabled 1
Code:
setprop persist.camera.stats.test 5
Code:
setprop persist.vendor.camera.stats.test 5

Press ctrl+c to exit adb shell (windows) or just type "exit" and again "exit"

4. Unrooting the phone
Start magisk again, go to UNINSTALL, choose full uninstall, magisk will reboot the phone in process of uninstalling, and the phone should start normaly without Magisk installed, and with camera2 enabled, because nothing was flashed, you are DONE !


2. ENABLING WITH FLASHING PATCHED_BOOT.IMG

In CMD type
Code:
adb reboot bootloader
Code:
fastboot getvar current-slot
Then when you see your active partition, flash the patched image.
Code:
fastboot flash boot_a patched_boot.img
OR if it was b partition active
Code:
fastboot flash boot_b patched_boot.img
Code:
fastboot reboot

When the phone starts, wait for magisk to appear in apps, or if it's not there, find it in apkmirror site, magisk manager, download, install from phone it is easier.
https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=magisk+manager
Then when you start magisk, it will ask you to download full zip, just skip it, your phone will now be rooted.

3. Enabling Camera2 api (lvl3)
In CMD type
Code:
adb shell
Code:
su
(this time look at the phone screen, allow root access ONCE)
Code:
setprop persist.camera.HAL3.enabled 1
For PIE and for using v6 Gcam ports three more commands, for OREO it is not needed.
Code:
setprop persist.vendor.camera.HAL3.enabled 1
Code:
setprop persist.camera.stats.test 5
Code:
setprop persist.vendor.camera.stats.test 5

Press ctrl+c to exit adb shell (windows) or just type "exit" and again "exit"

4. Unrooting the phone
Start magisk again, go to UNINSTALL, choose full uninstall, magisk will reboot the phone in process of uninstalling, prepare and hold down the volume button when phone restarts, your phone will go into fastboot.

Type the command for active partition
Code:
fastboot getvar current-slot
Code:
fastboot flash boot_a boot.img
Or
Code:
fastboot flash boot_b boot.img
Code:
fastboot reboot


This is it guys, you have enabled lvl3 (camera2), and unrooted phone, ready for next OTA updates.
Install camera2 probe from gplay to confirm.
https://play.google.com/store/apps/details?id=de.weis.camera2probe&hl=en

Phone needs to stay with unlocked bootloader, because if you lock the phone, you will lose camera2, but do not worry, the future OTA updates will work.

If this guide helped you, please click the thanks button, that's all, cheers. :highfive:
 
Last edited:

destruktah

Member
Sep 14, 2018
48
0
This guide worked for every OREO version, and also is working for PIE ! :good:

You will enable camera2 on your phone, and keep it stock afterwards so it can receive future OTA updates. :victory:

1 - Unlocking bootloader
Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.
First of all, enable the Developer Option.
To do this go to your Settings -> About -> Software Information -> More -> Now Tap on the Build Number 7-8 Times until you see a toast message “Developer option enabled”.

Now go back to settings -> Enable the OEM Unlock by going to Settings -> Developer Option and Enable OEM Unlock and USB Debugging.

Now connect the phone with your USB cable, use USB port 2.0 on your computer.
It should appear on your phone screen an asking for access privileges of your PC (device, maybe Linux), allow it.

Download ADB if you don't have it.
https://drive.google.com/file/d/1yCdMyAAOD46T4B8haFuZVF57E4-WK8l2/view?usp=sharing

In ADB folder, double click "Open CMD here.bat".
AND FROM THIS TIME, YOU DON'T CLOSE THIS CMD AT ALL, UNTILL YOU FINISH THE WHOLE GUIDE

Code:
adb devices

Your device should appear with some random numbers like this
https://www.howtogeek.com/wp-content/uploads/2012/10/image34.png

If it does, go to next stage, if it's not, you are not installed usb drivers corectly or did not enabled usb debugging.

Code:
adb reboot bootloader

Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.

Code:
fastboot oem unlock

Phone will reboot, go to check developer options > usb debugging ON once again.

Code:
adb reboot bootloader

Again in fastboot we are unlocking critical partitions, and once again it will erase verything from the phone, so be sure to do the backup as needed.

Code:
fastboot flashing unlock_critical

Again when the phone reboot, check developer options > usb debugging ON.

2. Rooting the phone (temporarily)
Download stock boot and patched boot of android version you have, if you need versions for OREO, find somewhere in forum, here it is link for PIE.
https://drive.google.com/drive/folders/18tcBVaKwH9cy_RVczf-GSc_tAkFYvn15?usp=sharing

Put the files in adb folder, both the stock boot.img and patched_boot.img.
Code:
adb reboot bootloader
Code:
fastboot getvar current-slot
Then when you see your active partition, flash the patched image.
Code:
fastboot flash boot_a patched_boot.img
OR if it was b partition active
Code:
fastboot flash boot_b patched_boot.img
Code:
fastboot reboot

When the phone starts, wait for magisk to appear in apps, or if it's not there, find it in apkmirror site, magisk manager, download, install from phone it is easier.
https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=magisk+manager
Then when you start magisk, it will ask you to download full zip, let him do it, install full zip, your phone will now be rooted.

3. Enabling Camera2 api (lvl3)
In CMD type
Code:
adb shell
Code:
su
(this time look at the phone screen, allow root access ONCE)
Code:
setprop.persist.camera.HAL3.enabled 1
For PIE one more command, for OREO it is not needed.
Code:
setprop persist.vendor.camera.HAL3 enabled 1

Press ctrl+c to exit adb shell.

4. Unrooting the phone
Start magisk again, go to UNINSTALL, choose full uninstall, magisk will reboot the phone in process of uninstalling, prepare and hold down the volume button when phone restarts, your phone will go into fastboot.

Type the command for active partition
Code:
fastboot getvar current-slot
Code:
fastboot flash boot_a boot.img
Or
Code:
fastboot flash boot_b boot.img
Code:
fastboot reboot

This is it guys, you have enabled lvl3 (camera2), and unrooted phone, ready for next OTA updates.
Install camera2 probe from gplay to confirm.
https://play.google.com/store/apps/details?id=de.weis.camera2probe&hl=en

Phone needs to stay with unlocked bootloader, because if you lock the phone, you will lose camera2, but do not worry, the future OTA updates will work.

If this guide helped you, please click the thanks button, that's all, cheers. :highfive:

For me it worked, but in stock camera cant see any diferences, can someone link me a gcam apk to install?
 

Jamesismo

Member
Feb 4, 2016
17
12
This guide worked for every OREO version, and also is working for PIE ! :good:

You will enable camera2 on your phone, and keep it stock afterwards so it can receive future OTA updates. :victory:

1 - Unlocking bootloader
Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.
First of all, enable the Developer Option.
To do this go to your Settings -> About -> Software Information -> More -> Now Tap on the Build Number 7-8 Times until you see a toast message “Developer option enabled”.

Now go back to settings -> Enable the OEM Unlock by going to Settings -> Developer Option and Enable OEM Unlock and USB Debugging.

Now connect the phone with your USB cable, use USB port 2.0 on your computer.
It should appear on your phone screen an asking for access privileges of your PC (device, maybe Linux), allow it.

Download ADB if you don't have it.
https://drive.google.com/file/d/1yCdMyAAOD46T4B8haFuZVF57E4-WK8l2/view?usp=sharing

In ADB folder, double click "Open CMD here.bat".
AND FROM THIS TIME, YOU DON'T CLOSE THIS CMD AT ALL, UNTILL YOU FINISH THE WHOLE GUIDE

Code:
adb devices

Your device should appear with some random numbers like this
https://www.howtogeek.com/wp-content/uploads/2012/10/image34.png

If it does, go to next stage, if it's not, you are not installed usb drivers corectly or did not enabled usb debugging.

Code:
adb reboot bootloader

Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.

Code:
fastboot oem unlock

Phone will reboot, go to check developer options > usb debugging ON once again.

Code:
adb reboot bootloader

Again in fastboot we are unlocking critical partitions, and once again it will erase verything from the phone, so be sure to do the backup as needed.

Code:
fastboot flashing unlock_critical

Again when the phone reboot, check developer options > usb debugging ON.

2. Rooting the phone (temporarily)
Download stock boot and patched boot of android version you have, if you need versions for OREO, find somewhere in forum, here it is link for PIE.
https://drive.google.com/drive/folders/18tcBVaKwH9cy_RVczf-GSc_tAkFYvn15?usp=sharing

Put the files in adb folder, both the stock boot.img and patched_boot.img.
Code:
adb reboot bootloader
Code:
fastboot getvar current-slot
Then when you see your active partition, flash the patched image.
Code:
fastboot flash boot_a patched_boot.img
OR if it was b partition active
Code:
fastboot flash boot_b patched_boot.img
Code:
fastboot reboot

When the phone starts, wait for magisk to appear in apps, or if it's not there, find it in apkmirror site, magisk manager, download, install from phone it is easier.
https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=magisk+manager
Then when you start magisk, it will ask you to download full zip, let him do it, install full zip, your phone will now be rooted.

3. Enabling Camera2 api (lvl3)
In CMD type
Code:
adb shell
Code:
su
(this time look at the phone screen, allow root access ONCE)
Code:
setprop.persist.camera.HAL3.enabled 1
For PIE one more command, for OREO it is not needed.
Code:
setprop persist.vendor.camera.HAL3 enabled 1

Press ctrl+c to exit adb shell.

4. Unrooting the phone
Start magisk again, go to UNINSTALL, choose full uninstall, magisk will reboot the phone in process of uninstalling, prepare and hold down the volume button when phone restarts, your phone will go into fastboot.

Type the command for active partition
Code:
fastboot getvar current-slot
Code:
fastboot flash boot_a boot.img
Or
Code:
fastboot flash boot_b boot.img
Code:
fastboot reboot

This is it guys, you have enabled lvl3 (camera2), and unrooted phone, ready for next OTA updates.
Install camera2 probe from gplay to confirm.
https://play.google.com/store/apps/details?id=de.weis.camera2probe&hl=en

Phone needs to stay with unlocked bootloader, because if you lock the phone, you will lose camera2, but do not worry, the future OTA updates will work.

If this guide helped you, please click the thanks button, that's all, cheers. :highfive:

The post has some errors but I'm here to report you guys how I made it work.

adb devices
adb reboot bootloader
(I had the bootloader unlocked already so I didn't do those steps)
fastboot boot patched_boot.img
(Notice I didn't flash the patched image, you don't need to do that, my current partition was b, but that doesn't matter since I'm not flashing anything, I am just booting into the patched/rooted image)
(Installed magisk manager and rootchecker)
(magisk said it was rooted, so did root checker)
adb shell
su
(I gave the permission on my phone)
setprop persist.camera.HAL3.enabled 1
(If you check the post carefully, this line above is not the same one the OP has, that one is wrong, mine is right)
setprop persist.vendor.camera.HAL3.enabled 1
ctrl+c
adb reboot
(Notice I don't flash anything here as well, since I didn't flash the patched image, so if I reboot, it will boot into my stock boot image)
aaaaaaand it's done.
Thanks to the OP for his work, and please correct the line that is wrong. Cheers. :angel:
Google Camera working fine.
 
Last edited:

minnuss

Senior Member
Dec 25, 2010
365
265
Belgrade
@Jamesismo, thanx, I fixed the typo mistake, did not have the DOT in command line, it was not an error, just a typo, but thanx.

And yes, please guys, do not quote the first post.

In a guide, a neewbie can learn how to unlock bootloader, root the phone, enable cam2, and unroot the phone.
So he can choose, whether he wants to stay with rooted phone or not, or to unroot later if he wants...

I think that with this method, OTA will work even if he has Magisk installed, because nothing is changed in system, but that needs to be confirmed.
 
Last edited:
  • Like
Reactions: [email protected]

afajri

Member
Jun 10, 2015
8
2
This is it guys, you have enabled lvl3 (camera2), and unrooted phone, ready for next OTA updates.
Install camera2 probe from gplay to confirm.
https://play.google.com/store/apps/details?id=de.weis.camera2probe&hl=en

Phone needs to stay with unlocked bootloader, because if you lock the phone, you will lose camera2, but do not worry, the future OTA updates will work.

If this guide helped you, please click the thanks button, that's all, cheers. :highfive:[/QUOTE]

If may i ask what version of Gcam you recommend? I've tried
Arnova's v8.3b1 and the front facing camera doesn't work on photo mode, but work on video.

Thanks
 
  • Like
Reactions: celo07

Jamesismo

Member
Feb 4, 2016
17
12
@minnuss Hey bro, the post does still have a typo, after "setprop" there must be a space, not a dot. (First line)

---------- Post added at 06:09 PM ---------- Previous post was at 05:57 PM ----------

This is it guys, you have enabled lvl3 (camera2), and unrooted phone, ready for next OTA updates.
Install camera2 probe from gplay to confirm.
https://play.google.com/store/apps/details?id=de.weis.camera2probe&hl=en

Phone needs to stay with unlocked bootloader, because if you lock the phone, you will lose camera2, but do not worry, the future OTA updates will work.

If this guide helped you, please click the thanks button, that's all, cheers. :highfive:

If may i ask what version of Gcam you recommend? I've tried
Arnova's v8.3b1 and the front facing camera doesn't work on photo mode, but work on video.

Thanks[/QUOTE]

It does work in protrait mode 5mpx, and if you change it from 5mpx to 3mpx, normal selfie works as well.
 
  • Like
Reactions: minnuss

hugopg

Senior Member
Jan 8, 2011
65
18
The google camera APK that I've used in oreo does not work in Pie. Any new suggestions? With night sight preferably! Thanks
 

mma_1494

Senior Member
Mar 7, 2016
100
31
setprop persist.camera.stats.test 5

According to a newly added thread this command makes the gcam 6 version work on pie.What specifically does this command do? The OP of the said thread didnt know.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 73
    This guide worked for every OREO version, and also is working for PIE ! :good:

    You will enable camera2 on your phone, and keep it stock afterwards so it can receive future OTA updates. :victory:

    1 - Unlocking bootloader
    Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.
    First of all, enable the Developer Option.
    To do this go to your Settings -> About -> Software Information -> More -> Now Tap on the Build Number 7-8 Times until you see a toast message “Developer option enabled”.

    Now go back to settings -> Enable the OEM Unlock by going to Settings -> Developer Option and Enable OEM Unlock and USB Debugging.

    Now connect the phone with your USB cable, use USB port 2.0 on your computer.
    It should appear on your phone screen an asking for access privileges of your PC (device, maybe Linux), allow it.

    Download ADB if you don't have it.
    https://drive.google.com/file/d/1yCdMyAAOD46T4B8haFuZVF57E4-WK8l2/view?usp=sharing

    In ADB folder, double click "Open CMD here.bat".
    AND FROM THIS TIME, YOU DON'T CLOSE THIS CMD AT ALL, UNTILL YOU FINISH THE WHOLE GUIDE

    Code:
    adb devices

    Your device should appear with some random numbers like this
    https://www.howtogeek.com/wp-content/uploads/2012/10/image34.png

    If it does, go to next stage, if it's not, you are not installed usb drivers corectly or did not enabled usb debugging.
    Link for USB Drivers for Mi A2.
    http://dl.adbdriver.com/upload/adbdriver.zip

    Code:
    adb reboot bootloader

    Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.

    Code:
    fastboot oem unlock

    Phone will reboot, go to check developer options > usb debugging ON once again.

    Code:
    adb reboot bootloader

    Again in fastboot we are unlocking critical partitions, and once again it will erase verything from the phone, so be sure to do the backup as needed.

    Code:
    fastboot flashing unlock_critical

    Again when the phone reboot, check developer options > usb debugging ON.

    2. Rooting the phone (temporarily)
    Download stock boot and patched boot of android version you have, if you need versions for OREO, find somewhere in forum, here it is link for PIE.
    10.0.9.0 https://drive.google.com/drive/folders/1ZP5jelFGT5z9EJvHRokzLJwAikKtWI8p?usp=sharing
    10.0.8.0 https://drive.google.com/drive/folders/1XNE_veO_FvOLQ46oorUBa2g7TKA1PHRv?usp=sharing
    10.0.7.0 https://drive.google.com/drive/folders/1kHLYXhaWFpjh58F79xnOkN3kjkuyEdHV?usp=sharing
    10.0.5.0 https://drive.google.com/drive/folders/1qCIsk1MVVq_X-mR8BBWa2NeVLB_-4q5y?usp=sharing
    10.0.4.0 https://drive.google.com/drive/folders/1piLD_9mQv0XgahyIZdxRqfdwaDbfx2_0?usp=sharing
    10.0.3.0 https://drive.google.com/open?id=1uO3yfxHdTr4gv4DmCaLu-naIIt8mprBT
    "It seems like 10.0.3.0 OTA is withdrawn by Xiaomi due to numerous bootloops in stock phones."
    My recommendation is to skip flashing this version, until next stable comes up !

    10.0.2.0 https://drive.google.com/drive/folders/1_cIM0ltKD_PU1mIiWwUE-nMba964NyvN?usp=sharing
    10.0.1.0 https://drive.google.com/drive/folders/18tcBVaKwH9cy_RVczf-GSc_tAkFYvn15?usp=sharing
    9.6.17.0 https://drive.google.com/drive/folders/1D9RlDZRupdriCyJM4p0ixvntPE2QPP9w?usp=sharing

    Put the files in adb folder, both the stock boot.img and patched_boot.img.

    NOW !
    There are two methods, so you can choose between those two:
    1. Faster and easier one with only booting patched boot
    2. Slower with flashing, but this one will teach you how to flash and root your phone

    1. ENABLING WITH BOOTING PATCHED_BOOT.IMG

    In CMD type
    Code:
    adb reboot bootloader
    Code:
    fastboot boot patched_boot.img
    When the phone starts, wait for magisk to appear in apps, or if it's not there, find it in apkmirror site, magisk manager, download, install from phone it is easier.
    https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=magisk+manager
    Then when you start magisk, it will ask you to download full zip, just skip it, your phone will now be rooted.

    3. Enabling Camera2 api (lvl3)
    In CMD type
    Code:
    adb shell
    Code:
    su
    (this time look at the phone screen, allow root access ONCE)
    Code:
    setprop persist.camera.HAL3.enabled 1
    For PIE and for using v6 Gcam ports three more commands, for OREO it is not needed.
    Code:
    setprop persist.vendor.camera.HAL3.enabled 1
    Code:
    setprop persist.camera.stats.test 5
    Code:
    setprop persist.vendor.camera.stats.test 5

    Press ctrl+c to exit adb shell (windows) or just type "exit" and again "exit"

    4. Unrooting the phone
    Start magisk again, go to UNINSTALL, choose full uninstall, magisk will reboot the phone in process of uninstalling, and the phone should start normaly without Magisk installed, and with camera2 enabled, because nothing was flashed, you are DONE !


    2. ENABLING WITH FLASHING PATCHED_BOOT.IMG

    In CMD type
    Code:
    adb reboot bootloader
    Code:
    fastboot getvar current-slot
    Then when you see your active partition, flash the patched image.
    Code:
    fastboot flash boot_a patched_boot.img
    OR if it was b partition active
    Code:
    fastboot flash boot_b patched_boot.img
    Code:
    fastboot reboot

    When the phone starts, wait for magisk to appear in apps, or if it's not there, find it in apkmirror site, magisk manager, download, install from phone it is easier.
    https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=magisk+manager
    Then when you start magisk, it will ask you to download full zip, just skip it, your phone will now be rooted.

    3. Enabling Camera2 api (lvl3)
    In CMD type
    Code:
    adb shell
    Code:
    su
    (this time look at the phone screen, allow root access ONCE)
    Code:
    setprop persist.camera.HAL3.enabled 1
    For PIE and for using v6 Gcam ports three more commands, for OREO it is not needed.
    Code:
    setprop persist.vendor.camera.HAL3.enabled 1
    Code:
    setprop persist.camera.stats.test 5
    Code:
    setprop persist.vendor.camera.stats.test 5

    Press ctrl+c to exit adb shell (windows) or just type "exit" and again "exit"

    4. Unrooting the phone
    Start magisk again, go to UNINSTALL, choose full uninstall, magisk will reboot the phone in process of uninstalling, prepare and hold down the volume button when phone restarts, your phone will go into fastboot.

    Type the command for active partition
    Code:
    fastboot getvar current-slot
    Code:
    fastboot flash boot_a boot.img
    Or
    Code:
    fastboot flash boot_b boot.img
    Code:
    fastboot reboot


    This is it guys, you have enabled lvl3 (camera2), and unrooted phone, ready for next OTA updates.
    Install camera2 probe from gplay to confirm.
    https://play.google.com/store/apps/details?id=de.weis.camera2probe&hl=en

    Phone needs to stay with unlocked bootloader, because if you lock the phone, you will lose camera2, but do not worry, the future OTA updates will work.

    If this guide helped you, please click the thanks button, that's all, cheers. :highfive:
    10
    @[email protected]
    @AsItLies
    @kishd
    @Jamesismo
    @afajri

    Fix for front cam on Arnova 8.3b1 > go to settings > developer settings > camera.enable_micro UNCHECK (all the way down in developer settings)
    Back, back, exit, remove cam from memory, restart the cam...done ! :fingers-crossed::good::laugh:
    10
    This guide worked for every OREO version, and also is working for PIE ! :good:

    You will enable camera2 on your phone, and keep it stock afterwards so it can receive future OTA updates. :victory:

    1 - Unlocking bootloader
    Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.
    First of all, enable the Developer Option.
    To do this go to your Settings -> About -> Software Information -> More -> Now Tap on the Build Number 7-8 Times until you see a toast message “Developer option enabled”.

    Now go back to settings -> Enable the OEM Unlock by going to Settings -> Developer Option and Enable OEM Unlock and USB Debugging.

    Now connect the phone with your USB cable, use USB port 2.0 on your computer.
    It should appear on your phone screen an asking for access privileges of your PC (device, maybe Linux), allow it.

    Download ADB if you don't have it.
    https://drive.google.com/file/d/1yCdMyAAOD46T4B8haFuZVF57E4-WK8l2/view?usp=sharing

    In ADB folder, double click "Open CMD here.bat".
    AND FROM THIS TIME, YOU DON'T CLOSE THIS CMD AT ALL, UNTILL YOU FINISH THE WHOLE GUIDE

    Code:
    adb devices

    Your device should appear with some random numbers like this
    https://www.howtogeek.com/wp-content/uploads/2012/10/image34.png

    If it does, go to next stage, if it's not, you are not installed usb drivers corectly or did not enabled usb debugging.

    Code:
    adb reboot bootloader

    Unlocking bootloader, this command will delete/reset your phone, so do backup of files as needed.

    Code:
    fastboot oem unlock

    Phone will reboot, go to check developer options > usb debugging ON once again.

    Code:
    adb reboot bootloader

    Again in fastboot we are unlocking critical partitions, and once again it will erase verything from the phone, so be sure to do the backup as needed.

    Code:
    fastboot flashing unlock_critical

    Again when the phone reboot, check developer options > usb debugging ON.

    2. Rooting the phone (temporarily)
    Download stock boot and patched boot of android version you have, if you need versions for OREO, find somewhere in forum, here it is link for PIE.
    https://drive.google.com/drive/folders/18tcBVaKwH9cy_RVczf-GSc_tAkFYvn15?usp=sharing

    Put the files in adb folder, both the stock boot.img and patched_boot.img.
    Code:
    adb reboot bootloader
    Code:
    fastboot getvar current-slot
    Then when you see your active partition, flash the patched image.
    Code:
    fastboot flash boot_a patched_boot.img
    OR if it was b partition active
    Code:
    fastboot flash boot_b patched_boot.img
    Code:
    fastboot reboot

    When the phone starts, wait for magisk to appear in apps, or if it's not there, find it in apkmirror site, magisk manager, download, install from phone it is easier.
    https://www.apkmirror.com/?post_type=app_release&searchtype=apk&s=magisk+manager
    Then when you start magisk, it will ask you to download full zip, let him do it, install full zip, your phone will now be rooted.

    3. Enabling Camera2 api (lvl3)
    In CMD type
    Code:
    adb shell
    Code:
    su
    (this time look at the phone screen, allow root access ONCE)
    Code:
    setprop.persist.camera.HAL3.enabled 1
    For PIE one more command, for OREO it is not needed.
    Code:
    setprop persist.vendor.camera.HAL3 enabled 1

    Press ctrl+c to exit adb shell.

    4. Unrooting the phone
    Start magisk again, go to UNINSTALL, choose full uninstall, magisk will reboot the phone in process of uninstalling, prepare and hold down the volume button when phone restarts, your phone will go into fastboot.

    Type the command for active partition
    Code:
    fastboot getvar current-slot
    Code:
    fastboot flash boot_a boot.img
    Or
    Code:
    fastboot flash boot_b boot.img
    Code:
    fastboot reboot

    This is it guys, you have enabled lvl3 (camera2), and unrooted phone, ready for next OTA updates.
    Install camera2 probe from gplay to confirm.
    https://play.google.com/store/apps/details?id=de.weis.camera2probe&hl=en

    Phone needs to stay with unlocked bootloader, because if you lock the phone, you will lose camera2, but do not worry, the future OTA updates will work.

    If this guide helped you, please click the thanks button, that's all, cheers. :highfive:

    The post has some errors but I'm here to report you guys how I made it work.

    adb devices
    adb reboot bootloader
    (I had the bootloader unlocked already so I didn't do those steps)
    fastboot boot patched_boot.img
    (Notice I didn't flash the patched image, you don't need to do that, my current partition was b, but that doesn't matter since I'm not flashing anything, I am just booting into the patched/rooted image)
    (Installed magisk manager and rootchecker)
    (magisk said it was rooted, so did root checker)
    adb shell
    su
    (I gave the permission on my phone)
    setprop persist.camera.HAL3.enabled 1
    (If you check the post carefully, this line above is not the same one the OP has, that one is wrong, mine is right)
    setprop persist.vendor.camera.HAL3.enabled 1
    ctrl+c
    adb reboot
    (Notice I don't flash anything here as well, since I didn't flash the patched image, so if I reboot, it will boot into my stock boot image)
    aaaaaaand it's done.
    Thanks to the OP for his work, and please correct the line that is wrong. Cheers. :angel:
    Google Camera working fine.
    4
    If you're using temp recovery, just fastboot boot patched_boot.img, no need to flash, and once done just reboot
    3
    Hey @minnuss good job! glad to see this.

    I would change one thing i noticed: "Press ctrl+c to exit adb shell."

    That's a Windows thing, doesn't work with Linux or Mac. Most people 'should' know how to exit a command prompt, but if not, safer to just say type 'exit' and hit enter. That works on all of the systems.

    Cheers