Is there a way to see the Android side of a PC to Android connection?

70 views Asked by At

Background: I have an Android application that creates a database file based on user input. I have a Delphi7 Windows application that connects to an Android device via TCP/ADB, retrieves the database file performs some actions then either creates a spreadsheet or puts the data into a Firebird, SQL, or Oracle database for use in a different Desktop application. These applications were originally designed for use with Android 4 but have since been updated and work with Android versions up to 8.0. I have tested the updates and have it working on an Android 9 tablet and my Samsung Note 10. I received reports from clients that the retrieval of the database file does not work on a Lenovo tablet running Android 8.1, They sent me their equipment and I can recreate the issue. When stepping through the code all I get is "The connection has been closed Gracefully".

Question: How do I debug the PC application but see the Android side of the communication pipe?

I have tried debugging the Android application with Eclipse and Android studio but the application works fine and really has no bearing on the issue because all it does is create the file and put it in external storage for retrieval. I have tried running an Android Emulator running 8.1 so I could watch logcat but cant connect to the emulator with the PC application. Debugging the PC code everything works fine with every setup I have tried except Android 8.1 where the connection gets actively refused so is never established so I get no meaningful response to point me in the right direction.

I have tried searching the web but any query I make with Android in the title returns about troubleshooting Android connecting to the PC, If I omit Android or emulator everything I get is troubleshooting or guides for ADB.

0

There are 0 answers