This repository contains several patches that allow you to connect to your setup externally (e.g. VPN or VLAN) without using the unifi cloud. In releases you can find apk versions with "IP Validation fix" and "Wifi fix" patches.
- java (tested on 1.8.0_24)
- wget/patch (should come with linux/macos)
- zipalign (via package manager
apt-get install zipalign
for Debian/Ubuntu or use Android BuildTools)
- 1.4.7
- 1.10.1
- Download UniFi Protect apk (any supported version)
- Unpack apk:
./unpack_apk.sh <apk name>
- Apply patches (see below)
- Build apk:
./build_apk.sh
- Install protect-patched.apk on device or via adb:
adb install protect-patched.apk
Patches for different versions are stored in patches folder.
Forces protect to use ip from discovery packet, required to work with Unifi Proxy. By default, protect uses source ip of discovery packet. The iOS version does require this fix.
patch out/smali_classes*/com/ubnt/common/service/discovery/DiscoveryService.smali ip_validation.patch
Disables wifi connectivity check and allows you to connect via VPN over cellular connection. Don't use it without VPN, because app uses unencrypted connection by default.
patch out/smali_classes*/com/ubnt/util/NetworkUtils.smali wifi.patch
Adds you protect local ip to discovered devices list. For now, i don't know which params (except IP) are requried. In folder packet you can find sources which were used to create smali code.
Edit direct_connection.patch:
- Change 192.168.1.2 to IP
- Change 001122334455 to your protect MAC
- Change UCK-G2-PLUS to your console model (see list below)
patch out/smali_classes*/com/ubnt/common/service/discovery/DeviceDiscoveryService.smali direct_connection.patch
Models list:
- Boston
- MAC-OS
- UAS-XG
- UCK-G2-PLUS
- UDM-PRO
- UDM-PRO-SE
- UDR
- UDW
- UDWPRO
- UFP
- UNKNOWN
- UNVR4
- UNVR-PRO
- UVC-NVR
- Decompile/compile multidex apk (Russian version)
- Apktool
- baksmali
- Apk Sign