i.MX 8M Mini EVK - ADB over network debug - Android studio Install issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX 8M Mini EVK - ADB over network debug - Android studio Install issue

3,772 Views
ofir
Contributor II

I have imx8mm evk, installed with "android-10.0.0_2.5.0_image_8mmevk" demo android version.

The evk has 3 USB connection ports: 1- J302 for power supply 2- J301 for downloading the image and afterward for USB ADB connection. 3- micro USB for serial debug.

For port 2 I have another purpose, I want to connect a mouse for an input controller purpose.

To my understanding, I can't use both mouse and USB cable for ADB connection (for debug) through a hub due to the reason one communicates as a host and the other as a device.

So I tried to connect ADB through WI-FI or Ethernet from both windows and Linux computers, Successfully able to connect through ADB, but couldn't install (got stuck on the begging of the Install progress bar) android studio new project application through debugging (Which worked fine by USB connection) (WI-FI only worked on image 1.0.0 not 2.5.0).

How can I connect ADB through a network or is there another way to overcome this issue?

 

Thanks 

0 Kudos
19 Replies

3,762 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

1. When you first boot evk, you need connect usb to open tcpip:adb tcpip 5555.

2. Then  adb shell ifconfig to see ip.

3. adb connect  xxx.xxx.xxx.xxx

4.unplug usb,then you can use adb wifi and plug usb mouse.

I have tested that app can be installed! 

BR

Zhiming

Tags (1)
0 Kudos

3,756 Views
ofir
Contributor II

Hi,

I followed the steps you mentioned.

Running with administrator privileges on Windows, on step 2 adb shell ifconfig I encountered this response:

ifconfig: ioctl 8927: Permission denied

Other steps worked fine.

On version 1.0.0 with Wi-Fi and on 2.5.0 with an ethernet connection, because in version 2.5.0 the Wi-Fi connection doesn't work properly (verified in your forums).

In both cases, the installation phase in the android studio got stuck in the beginning.

Thanks

0 Kudos

3,754 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

For Permission denied,it maybe selinux

U-Boot > setenv append_bootargs androidboot.selinux=permissive
U-Boot > saveenv

Sorry for my miss,which wifi module you are using, we have different wifi module in i.mx8mmevk and some old module is disabled by default.You can see wifi info in wifi chip.

 

BR

Zhiming

0 Kudos

3,744 Views
ofir
Contributor II

I tested again with an ethernet cable connection.

Your suggestion was good and I now receive a response for this adb shell ifconfig command.

Although it didn't solve my problem, it still got stuck on Install phase.

Regarding the Wi-Fi issue, our wifi module (U6) is LBEE5ZZ1PJ.

If you need more relevant information to help me solve this issue, please let me know.

 

Thank you.

0 Kudos

3,736 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

The wifi module is qca9377 and it is disabled in kernel driver.You can add below into defconfig:

CONFIG_ATH9K_HW=y
CONFIG_ATH9K_COMMON=y
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=y
CONFIG_ATH9K_PCI=y
# CONFIG_ATH9K_AHB is not set
# CONFIG_ATH9K_DYNACK is not set
# CONFIG_ATH9K_WOW is not set
CONFIG_ATH9K_RFKILL=y
# CONFIG_ATH9K_CHANNEL_CONTEXT is not set
CONFIG_ATH9K_PCOEM=y
# CONFIG_ATH9K_PCI_NO_EEPROM is not set
# CONFIG_ATH9K_HTC is not set
# CONFIG_CARL9170 is not set
# CONFIG_ATH6KL is not set
# CONFIG_AR5523 is not set
# CONFIG_WIL6210 is not set
CONFIG_ATH10K=y
CONFIG_ATH10K_CE=y
CONFIG_ATH10K_PCI=y
CONFIG_ATH10K_AHB=y
CONFIG_ATH10K_SDIO=y

 

Because we have new wifi module made by ourself ,so the old wifi module only disalbed in kernel driver.

 

BR

Zhiming

0 Kudos

3,725 Views
ofir
Contributor II

Thank you, I'll try that regarding the WiFi issue, But this is not the main issue. The main issue is the Install stuck problem that we tested over Ethernet (and also over WiFi on another OS image).

 

Is it possible to debug over ethernet? if so, why it doesn't work for us?

How can we solve our issue and debug over a network (due to lack of available USB ports)?

0 Kudos

3,699 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

I have confirm this issue. The first thing is make sure they are in same network.

 Before using adb wifi, adb shell enter evk shell and opening adb wifi function using setprop service.adb.tcp.port 5555,then exit.

 

Then you just follow :

1. When you first boot evk, you need connect usb to open tcpip:adb tcpip 5555.

2. Then  adb shell ifconfig to see ip.

3. adb connect  xxx.xxx.xxx.xxx

4.unplug usb,then you can use adb wifi and plug usb mouse.

 

BR

 

0 Kudos

3,722 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

Last my test is over ethernet and it was successful.I will test it again in work time.

 

BR

0 Kudos

3,682 Views
ofir
Contributor II

I followed these steps:

1. When you first boot evk, you need connect usb to open tcpip:adb tcpip 5555.

2. Then  adb shell ifconfig to see ip.

3. adb connect  xxx.xxx.xxx.xxx

4.unplug usb,then you can use adb wifi and plug usb mouse.

At step 4, when I unplug the USB cable, for test, I write adb shell ifconfig again, or just adb shell

and it lose connection, there is no response.

I closed the firewall, run on administrator cmd, ping to check communication and all steps until step 4 respond as expected.

0 Kudos

3,678 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

(Bold text is command)

Before using adb wifi, adb shell to enter evk shell and opening adb wifi function using setprop service.adb.tcp.port 5555,then exit.

 

You must open adb wifi function in android layer before the 4 step

 

BR

0 Kudos

3,674 Views
ofir
Contributor II

Hi,

Please see my questions below:

Is It possible to use LAN ethernet cable for adb instead of using WiFi?

If ethernet can be used, why you did you mention "Before using adb wifi" in your last replay? 

"Before using adb wifi, adb shell to enter evk shell and opening adb wifi function using setprop service.adb.tcp.port 5555,then exit."?

Thanks,

Ofir

 

0 Kudos

3,667 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi 

 

The command  needs input after correction:

1.adb shell

2.setprop service.adb.tcp.port 5555

3.exit

4. When you first boot evk, you need connect usb to open tcpip:adb tcpip 5555.

5. Then  adb shell ifconfig to see ip.

6. adb connect  xxx.xxx.xxx.xxx

6.unplug usb,then you can use adb wifi and plug usb mouse.

 

Bold is command you need input.

0 Kudos

3,662 Views
ofir
Contributor II

Hi,

We tried the following steps:

The command  needs input after correction:

1.adb shell

2.setprop service.adb.tcp.port 5555

3.exit

4. When you first boot evk, you need connect usb to open tcpip:adb tcpip 5555.

5. Then  adb shell ifconfig to see ip.

7. adb connect  xxx.xxx.xxx.xxx

8.unplug usb,then you can use adb wifi and plug usb mouse.

Unfortunately after step #8 when we tried to use adb shell, we weren't able to see the shell target.

Let me mention that on another platform that uses Android, this issue did not raise. It was a matter of  Plug and Play.

Please advise, 

Ofir.

0 Kudos

3,659 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

 

Hi

I will write a detailed doc including screenshot for you. Can you try #8  install app in android studio?

 

0 Kudos

3,654 Views
ofir
Contributor II

It sounds like it shouldn't work if adb shell doesn't respond, but I tried and it didn't work.

I'm not sure if it is related but on the android screen, the WiFi setting cannot be enabled and turn off after trying to switch it on. (also after this command - setprop service.adb.tcp.port 5555)

Waiting for your reply regarding the doc.

Thank you.

 

 

0 Kudos

3,646 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

Please check pdf.

0 Kudos

3,632 Views
ofir
Contributor II

These detailed instructions helped to solve our problem.

It may also be the adb root you added other than the adb conflict.

If I'll encounter any similar issues I'll reply here, but for now, it seems ok and we can debug over ethernet.

 

Thank you for your effort.

BR,

Ofir

0 Kudos

3,670 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

In short, it is possible to use Ethernet instead of wifi for adb. My tests are all based on Ethernet. Let me describe what happened since my first reply. When I first used Ethernet for adb test, I didn't use the command: setprop service.adb.tcp.port 5555. But somehow it is possible to install the app.

After you followed the 4 steps I provided, I tested it again and found the same phenomenon as you, so I searched for 2 hours and found that the adb attribute is not set at the bottom of the android. So after using setprop service.adb.tcp.port 5555, the app can be installed normally.

I apologize for my wrong description about adb wifi.It is a plugin in android studio and it can also work in Ethernet .

 

BR

Zhiming

0 Kudos

3,673 Views
ofir
Contributor II

Hi,

In addition, when we tried to connect to the target via TCIP on port 5555 we got a message that the target refused to connect on port 5555.

Please advise.

Ofir

Tags (1)
0 Kudos