How I set my Flir One for android to work with Huawei P9 Lite (VNS-L21):
1. Android 7 Nougat did not worked, tried many things without success. So, downgrade to Android 6 (Marshmallow) and EMUI 4.1 as described here:
2. Root the phone as described here:
2.1 Unlock bootloader as described here:
2.1 Install TWRP image usng fastboot.
If TWRP is in chinese change it to Englosh as described here:
2.2. Root the phone. (If you want Snapchat to work install it and log in before root!).
Root using TWRP image from above. No additional software is needed!
Select Advanced -> Root from TWRP menu.
3. Enable OTG support
3.1. Enter adb shell and then became root with su
3.2. Remount /system read-write:
# mount -o rw,remount /system
3.3. Create file android.hardware.usb.host.xml in /system/etc/permissions with content:
<permissions> <feature name="android.hardware.usb.host"/> </permissions>
3.4 Install ScriptRunner from Google play and follow steos as described here:
If script files are not visible, set permissions of /system/OTG:
# chown a+rx /system/OTG
# chown a+rx /system/OTG/*
5. Install Flir One SDK.
6. Execute script “otg on” as root.
7. Plug in the camera and enable access to it in popup dialog.
8. After using the camera execute script “otg off” as root to enable normal USB charge and other functions.