Thank you. It works also on Jan 2019 update tested with windows 10 latest update x64
1)adb (I used https://forum.xda-developers.com/showthread.php?t=2588979)
2)Install magisk manager on device (https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445)
3)enable developer option: Settings -> About -> Software Information -> More -> Now Tap on the Build Number 7-8 Times until you see a toast message “Developer option enabled”.
Settings -> Developer Option and Enable OEM Unlock and USB Debugging.
P.S. Remember that after bootloader unlock, usb debugging will be turned off so renanable it. I suggest to remove also security pin (settings\security and position\screen lock \none) for a fastest unlock
4)unlocking bootloader by prompt ms dos (REMEMER this reset device):
Enter in fast boot mode -> adb reboot bootloader
Unlock bootloader -> fastboot oem unlock
5)After autoreboot, reset usb debugging on. now we need to upload a temporary recovery to install correctly magisk
so prompt ms dos: fastboot boot twrp.img (this is just an example if your boot img is in the same folder. In my case i renamed twrp,img to boot.img and locate it in c:/ . So the command for dos is fastboot boot c:/boot.img. After OK twrp recovery will be loaded.
6)twrp will ask you to install it but we don't need it. before go on just put magisk files in sdcard: we can use adb push function or manually from device
if you want to use adb just open prompt ms dos: adb push Magisk-v18.0.zip /sdcard (this an example, in my case i renamed magisk-18.0.zip in magisk18.zip and located in c:\, so the command was adb push c:/magisk18.zip /sdcard)
After select in Twrp recovery Install and select the magisk path (SDCARD magisk zip file). After installation , select reboot system from twrp and select do not install twrp. the device will reboot
7)now we have to complete installation of Magisk:
Open magisk app and select install (direct installation, raccomanded) and select reboot device in app
8)enable camera2api and eis for gcam :
open prompt ms dos and digit:
su (wait and look at the device for accept permission)
setprop persist.camera.HAL3.enabled 1
setprop persist.vendor.camera.HAL3.enabled 1
setprop persist.camera.stats.test 5
setprop persist.vendor.camera.stats.test 5
setprop persist.camera.eis.enable 1
9)removing root and relocking bootloader
Open magisk app and select uninstall (complete) . Device will rebooted
Now let's relock bootloader: prompt ms dos and digit
adb reboot bootloader (we renter in fastboot mode)
NOW is important to hold and keep holding volume - (this avoid reset) and digit fastboot oem lock. the recovery will reboot and return in fastboot screen now you can stop to press volume - and send command fastboot reboot
10)Install Gcam apk (choose one of suggested for xiaomi mi a1)
U mentioned 4 commands to enable camera api2 ,unlike other tutorials there were only 2 .Is there any difference???