简体   繁体   English

有没有办法在C ++中以编程方式执行adb命令? 这部分C ++代码是使用android studio中的ndk build构建的。 那里

[英]Is there a way to execute adb commands programatically in C++? This C++ part of code is built using ndk build in android studio. There

I referred to this link - Use CreateProcess to execute ADB command . 我提到了此链接- 使用CreateProcess执行ADB命令 The approach used in the above link requires Windows.h file which is contained in windows SDk. 以上链接中使用的方法需要Windows SDk中包含的Windows.h文件。 Since i am executing Android Studio in Mac i will not be able to get the include file. 由于我在Mac中执行Android Studio,因此无法获取包含文件。 I am not sure whether the above mentioned approach can be performed using Android Studio in Mac. 我不确定上述方法是否可以在Mac中使用Android Studio执行。

您可以使用systempopen方法来启动adb进程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM