Power & Source of Big Ideas

How can I debug app via adb on NanoPi M4?

Moderators: chensy, FATechsupport

I have a NanoPi M4 with eMMC module(Android 8.1), I need to debug my app on the board via adb. I have tried adb over TCP and adb over USB, neither of one worked.

For adb over TCP, I configured the network to make my desktop (Windows 10) and NanoPi M4 under the same private LAN. I followed the step in this answer(*), but it seems NanoPi M4 is not rooted, I could not get the superuser permission to start the adbd.

For adb over USB, I tried the way in this answer(**). I powered the board using Pin4 & Pin6 of the 40-pin GPIO1 header, and tried to start adb server listening on USB Type-C. My desktop could not find the device when I input "adb usb" or "adb devices" command.

I was wondering if I need to install the driver for NanoPi M4 on my desktop, I could not find the driver so far. Can somebody share how to debug an app via adb on NanoPi M4?

*: https://stackoverflow.com/questions/260 ... b-over-tcp
**: https://android.stackexchange.com/quest ... roid-board
If you have Android Studio installed, the necessary USB driver will be installed with it. When you plug in your M4 it should automatically detect it and load the USB driver. Now it should appear under ADB devices when you type this from a command line.

Check also that the USB debugging is enabled in the Android settings for the M4?

If this does not work, do you have an Android phone you could test to see that this shows up with ADB devices?
Actually the problem is the USB hub I used to connect M4 is unplugged from the PC ^^"
Thanks for your reply :)
dmvictor wrote:
I have a NanoPi M4 with eMMC module(Android 8.1), I need to debug my app on the board via adb. I have tried adb over TCP and adb over USB, neither of one worked.

For adb over TCP, I configured the network to make my desktop (Windows 10) and NanoPi M4 under the same private LAN. I followed the step in this answer(*), but it seems NanoPi M4 is not rooted, I could not get the superuser permission to start the adbd.

For adb over USB, I tried the way in this answer(**). I powered the board using Pin4 & Pin6 of the 40-pin GPIO1 header, and tried to start adb server listening on USB Type-C. My desktop could not find the device when I input "adb usb" or "adb devices" command.

I was wondering if I need to install the driver for NanoPi M4 on my desktop, I could not find the driver so far. Can somebody share how to debug an app via adb on NanoPi M4?

*: https://stackoverflow.com/questions/260 ... b-over-tcp
**: https://android.stackexchange.com/quest ... roid-board

You can ADB wifi via hotspot too. That's how I dev on public transport. So not only do you have internet, you have your ADB connection too, where ever you go.

ADB over wifi is not a new concept, before we needed an app to 'activate' it back in the day, now you just use a simple shell command once.

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 2 guests