Ionic cordova run android keeps targeting emulator

Untili now I was using an Android emulator to test the native parts of my Ionic app. Suddenly, a days ago, the commad ionic cordova emulate android started to fail trying to upload the apk to the emulator, saying the device was offline (when it as not).

Now I have a real device, but the problem continues. I ran adb devices and I see the new real device and the emulator (offline) that cordova keeps trying to connect to. I’ve trying several solutions with success so far:

  • adb kill-server
  • adb start-server
  • Wipe data in the emulator
  • Looking for adb processes
  • ionic cordoba run android --target=deviceid
  • ionic cordoba run android --device=deviceid
  • ionic cordova run android -l -c --native-device

Finally last night I was able to deploy my app using adb install, but I will like to be able to use the cordova installer again. Any ideas of how to get rid of the ghostly emulator, or to force cordova to target my real device?

TIA