Communicate between Windows C++ Application and Android Device, Via USB

Vibhu Gupta 1 Reputation point
2022-07-12T13:16:11.347+00:00

I need to communicate (via USB) between c/c++ application on Windows 10, and, an android device (Device Model:PAX A910, android version: 7.0).

MSDN suggested two approaches on windows side.

UWP app: It needs a manifest file that keeps on showing an unending chain of errors.  
WINUSB functions: The example programs available did not detect my device, as per input asked which was class GUID.  

LibUSB: The open source Libusb detected the device based on input VendorID:ProductID.

  • The device is detected when USB configuration on device is "adb" and is not if it is "MTP". May be that should not be an issue?
  • The device is restricted, so can't enable Developer mode, hence can't enable USB debugging, though We can install new apps on device.
  • From the example programs, I was able to download Device descriptor and list of 5 interfaces. But other than interface 0, example programs are failing to claim all other interfaces. On windows side what else i am missing?
    What kind of development needs to be done on Android side?
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,611 questions
Universal Windows Platform (UWP)
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,526 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,351 Reputation points
    2022-07-13T07:20:52.903+00:00

    Hi there,

    You might have a look at cross-platform mobile development with C++.This article describes how to install the tools and third-party software required to develop cross-platform apps in C++ using Visual Studio.

    https://learn.microsoft.com/en-us/cpp/cross-platform/install-visual-cpp-for-cross-platform-mobile-development?view=msvc-170

    I hope this information helps. If you have any questions please let me know and I will be glad to help you out.

    -----------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer--

    1 person found this answer helpful.