0

My MacBook computer battery is broken and somehow it has not enough power to power device by usb-c adapter so I cannot connect anything and only have to use android emulator. But I need to debug on real device while testing some ocr sdk that obviously don't want to recognize anything in android emulator virtual scene. I asked other question about that but still I am puzzled by this inability to use WIFI for usb debugging because sdk runs fine on my phone but to debug using fabric and APK deployment is really horrible dev experience and productivity.

Is there some way I can setup WIFI debugging without cable at all... Maybe I need to root my device but again how to do it without cable, it seems impossible either way. I feel in like in dead and but still asking question here. I have computer and phone but cannot connect them for debugging by wifi.

Renetik
  • 5,887
  • 1
  • 47
  • 66

2 Answers2

1

Afraid I don't have an easy wireless solution. The closest thing I could find is that android wearables may have a debug over bluetooth feature, but it's built to route through another (wired) android device.

There is likely a feasible wired solution though- you can hook the device to a powered hub and the hub to the computer.

You could also use an adapter of sorts. They were built for printers and such before everything came with wifi and could get a proper wireless setup going without either side realizing they aren't directly connected over USB (OS still knows that some funky usb drivers are loaded and a separate application may need to run to connect), but again more hardware. A decent Wireless "USB Device Server" seems to run ~$100 while wired ones are cheaper, but not as cheap as a powered usb hub.

Abel
  • 111
  • 4
1

If you have another machine, you can use it to enable wireless debugging on your Android phone. See https://developer.android.com/studio/command-line/adb#wireless. Once wireless debugging is enabled, you can connect to it from your Mac without using USB. You still need USB for enabling wireless debugging though, but you can do it from a different machine. This should work on all Android phones, root is not required.

Update [2021]: Things have developed since this question was asked. WiFi Debugging is a first class option now on newer devices. See https://developer.android.com/studio/run/device.html#wireless for details.

MarkusM
  • 751
  • 1
  • 5
  • 14
  • This looks good I should accept this probably... Need to enable wireless debugging somewhere on other computer... I didn't know it work like this. Thanks. – Renetik Aug 06 '19 at 23:15
  • Sadly it worked just until I turned of device, I believe because next day it stopped working again andI need to connect to some computer again and run adb tcpip or something... – Renetik Aug 09 '19 at 02:12
  • Yes, the functionality doesn't persist. You'll have to restart it if the device is restarted. Still it's quite handy functionality, as smartphones aren't usually restarted too often. – MarkusM Aug 09 '19 at 08:51
  • Well sure I was turning off my phone every night... But sure I can pair and keep on my device... Thanks – Renetik Aug 09 '19 at 09:32
  • You might want to consider this as the answer to your question. – MarkusM Aug 14 '19 at 12:55
  • I don't believe it's if I don't change the question. Answer is more than: "No it's not possible without cable" or maybe there is some possible hack with rooted device, but i am waiting now for new computer so it will solve my issue for now. – Renetik Aug 14 '19 at 13:22