adbcommand.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef ADBCOMMAND_H
  2. #define ADBCOMMAND_H
  3. #include "types.h"
  4. //#include <QString>
  5. //#include <QStringList>
  6. class AdbCommand
  7. {
  8. public:
  9. // AdbCommand();
  10. // static bool initialize();
  11. static long getFileSize(const char *filePath);
  12. static bool isFileExists(const char *dir, const char *name);
  13. static bool pushFile(const char *src, const char *dest, int timeout = 1000);
  14. static bool mkdir(const char *dir);
  15. static bool waitForDevices(); //等待设备连接
  16. static int isDeviceConnected(); //获取设备序列号
  17. static bool IsConnected();
  18. static bool forward(int sport, int dport);
  19. static bool getAndroidVer(char *ver); //获取安卓设备系统版本
  20. static bool isVerLess5(const char *ver); //安卓设备版本是否小于5.0
  21. static bool isBdimExists(); //bdmi是否存在
  22. static bool isBdimJarExists(); //bdmi.jar是否存在
  23. static bool isBdscExists(); //bdsc是否存在
  24. static bool isCarLifeExists(); //CarLife.apk是否在
  25. static bool pushBdim(); //将bdmi推送的手机端
  26. static bool pushBdimJar(); //将bdmi.jar推送的手机端
  27. static bool pushBdsc(const char *ver); //将bdsc推送到手机端
  28. static bool pushCarLife(); //将CarLife安装包推送到手机端
  29. static bool installCarLife(); //安装CarLife.apk
  30. static bool isAppLaunch(const char *app); //app是否已经运行
  31. static bool launchBdimShell(int retry = -1); //执行bdim脚本
  32. static bool launchBdim(int retry = -1); //启动bdim
  33. // static bool launchBdimJar(int retry = -1); //启动bdim.jar
  34. static bool launchBdsc(int retry = -1); //启动bdsc
  35. static bool isCarlifeAppInstalled(); //手机端是否已安装carlife
  36. static bool activateCarlifeApp(); //激活(启动)carlife app
  37. //private:
  38. // static char version[32];
  39. };
  40. #endif // ADBCOMMAND_H