adbkit icon indicating copy to clipboard operation
adbkit copied to clipboard

remote debug app

Open likezjuisee opened this issue 8 years ago • 12 comments

I came with the problem as the picture below when I used android studio 2.2.3 to debug an app. But the eclipse is ok with the same app. I am confused. Could you give me some advice. Thanks. cc80d250-f2d2-11e6-99c8-6f1bb16f115d

likezjuisee avatar Feb 15 '17 06:02 likezjuisee

Check if it works if you use your phone with the regular adb tcpip over wifi.

sorccu avatar Feb 15 '17 06:02 sorccu

My phone is not rooted, so adb tcpip will be a little complicated to me. Could you try to debug like mine?

likezjuisee avatar Feb 15 '17 07:02 likezjuisee

I don't have the luxury of spending time debugging random issues for free. You need to provide enough information so that I don't waste my time. Once we have a clear idea whether it's Studio's or adbkit's fault, I can maybe take a look.

adb tcpip does not require root, it works on any device (not that it's extremely slow, though). Try it out and report back with results.

On Wed, Feb 15, 2017 at 4:17 PM, like [email protected] wrote:

My phone is not rooted, so adb tcpip will be a little complicated to me. Could you try to debug like mine?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openstf/adbkit/issues/62#issuecomment-279935029, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB-_W0Snz2QnSOZNqj_UUJi2dj1rrzGks5rcqZ-gaJpZM4MBXEu .

sorccu avatar Feb 15 '17 07:02 sorccu

I have tried 5 times, the adb tcpip is ok.

likezjuisee avatar Feb 15 '17 07:02 likezjuisee

When you connect the device via adbkit, is the device also connected locally to the same machine with a usb cable?

sorccu avatar Feb 15 '17 07:02 sorccu

The adbkit runs on the computer which is connected by the phone via usb. And the android studio is another computer, connected the phone by the command adb connect 10.18.131.59:6174

likezjuisee avatar Feb 15 '17 07:02 likezjuisee

And the as debug logs as below:

02/15 16:00:24: Launching app $ adb push I:\project\android-platform_sdk-master\MyApplication2\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.administrator.myapplication $ adb shell pm install -r "/data/local/tmp/com.example.administrator.myapplication" pkg: /data/local/tmp/com.example.administrator.myapplication Success

$ adb shell am start -n "com.example.administrator.myapplication/com.example.administrator.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online: com.example.administrator.myapplication.test | com.example.administrator.myapplication Waiting for application to come online: com.example.administrator.myapplication.test | com.example.administrator.myapplication Waiting for application to come online: com.example.administrator.myapplication.test | com.example.administrator.myapplication Waiting for application to come online: com.example.administrator.myapplication.test | com.example.administrator.myapplication Waiting for application to come online: com.example.administrator.myapplication.test | com.example.administrator.myapplication Waiting for application to come online: com.example.administrator.myapplication.test | com.example.administrator.myapplication Waiting for application to come online: com.example.administrator.myapplication.test | com.example.administrator.myapplication Waiting for application to come online: com.example.administrator.myapplication.test | com.example.administrator.myapplication

likezjuisee avatar Feb 15 '17 08:02 likezjuisee

Ok looks like I'll have to run some packet captures later 😞

sorccu avatar Feb 15 '17 08:02 sorccu

Thanks a lot! Waiting for you response.

likezjuisee avatar Feb 15 '17 08:02 likezjuisee

We met the same problem, and it seems that we cannot solve it. The reason is android studio sends a disconnection message to adb server to and then reconnect again. If the mobile is connected by usb, there is no problem. But for remote connection, it is a big problem

2017-02-15 14:48 GMT+08:00 like [email protected]:

I came with the problem as the picture below when I used android studio 2.2.3 to debug an app. But the eclipse is ok with the same app. I am confused. Could you give me some advice. Thanks. [image: cc80d250-f2d2-11e6-99c8-6f1bb16f115d] https://cloud.githubusercontent.com/assets/12730220/22963367/bb026096-f38d-11e6-9ff6-d54f2b04d5a0.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openstf/adbkit/issues/62, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqrXnTm0BvYUM2HgwF2TH9a7gzA6npPks5rcp-ggaJpZM4MBXEu .

englefly avatar Feb 17 '17 09:02 englefly

I just tried it with a simple hello world app and it was fine. After pressing the "debug app" icon in Android Studio, the "waiting for debugger" appeared on the device for a moment but quickly went away, and the app appeared. I did not experience any disconnections with Android Studio, either.

My computer:

  • OS X 10.12.3
  • Android Studio 2.2.3 with latest SDK
  • adb version: Android Debug Bridge version 1.0.36 Revision 0e9850346394-android

STF host:

  • Arch Linux

Device:

  • Nexus 5X

Seems to work fine. I need more details from you if you want me to look into this. Full details of your computer, the STF host computer, and the device are needed. You may even need to send me the APK file.

sorccu avatar Feb 17 '17 16:02 sorccu

Thanks a lot! I will try to find the detail of the problem.

likezjuisee avatar Feb 20 '17 09:02 likezjuisee