Last active
September 16, 2019 10:29
-
-
Save PattoMotto/6f488144cfd313da61e4689c188739fa to your computer and use it in GitHub Desktop.
Enable Camera 2 API for android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM before use this script please disable pin/password unlock screen (set to none) | |
REM enable developer mode and USB debugging | |
REM download ADB and FASTBOOT from https://forum.xda-developers.com/showthread.php?t=2588979 | |
REM download recovery file for your device from https://twrp.me and rename to recovery.img | |
REM Tested with MI A1 | |
REM Thanks, script from https://forum.xda-developers.com/showpost.php?p=75541654&postcount=98 | |
echo. & echo Rebooting & echo. | |
adb reboot bootloader | |
fastboot oem unlock | |
fastboot reboot bootloader | |
fastboot oem unlock | |
echo. & echo Unlocked & echo. | |
fastboot boot recovery.img | |
echo. & echo Waiting for TWRP & echo. | |
:waitForBootTWRP | |
PING localhost -n 2 > NUL | |
adb shell "exit" > NUL 2> NUL || goto :waitForBootTWRP | |
adb shell "setprop persist.camera.HAL3.enabled 1" | |
adb shell "setprop persist.camera.eis.enable 1" | |
adb reboot bootloader | |
fastboot oem lock | |
echo. & echo Locked & echo. | |
fastboot reboot | |
echo. & echo Success & echo. | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment