Since original installer is not working on any platform by default for Nexus 4, here is workaround using MacOS and VirtualBox with Ubuntu 16.04
-
Install VirtualBox : https://download.virtualbox.org/virtualbox/6.0.0/VirtualBox-6.0.0-127566-OSX.dmg
-
Please be aware that you will need to install VirtualBox Extension Pack in order to use USB 2.0 (EHCI) controller which is needed. Download extension pack here: https://download.virtualbox.org/virtualbox/6.0.0/Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack
-
Set up Ubuntu OS
-
in VirtualBox window select OS and go to Settings -> Ports -> USB (tab): *check Enable USB Contntroller *select USB 2.0 (EHCI) Controller (if you get message that its not supported on the bottom of the window, you did not install extension pack) *On the right from USB Filters section you will have incos with (+) sign, add your device while in fastboot mode. Also boot into phone OS, enable USB debuggind (This is mus, otherwise you will get unauthorised device in adb devices list), try to see if its visible by using "adb devices" command and then add it on USB Device Filters list (it will have different name, fastboot will have Android[0100] and abd will have LGE Nexus 4 or whatever device you are using.
-
Run ubuntu from VirtualBox and install adb tools for adb and fastboot (sudo apt-get install android-tools-adb, sudo apt-* get install android-tools-fastboot)
-
Download source git clone https://github.com/ubports/ubports-installer.git
-
In terminal go to clonned directory and enter ./setup-dev.sh
-
In file src/adb.js change value const PORT = 5038 to const PORT = 5037 (default port for adb is 5037, if you are using something different, change to it)
-
using sudo run npm start and folow instructions
If you folowed instructions you should be able to go trough all process without any issues