Add util function to get the APK path

Use "pm list package -f" to find where the APK is actually installed on
the device.
This commit is contained in:
Romain Vimont
2022-05-25 00:03:49 +02:00
parent 88499cd101
commit 00766b8ab6
5 changed files with 118 additions and 0 deletions

View File

@@ -15,6 +15,8 @@
#define SC_ADB_SILENT (SC_ADB_NO_STDOUT | SC_ADB_NO_STDERR | SC_ADB_NO_LOGERR)
#define SC_ANDROID_PACKAGE "com.genymobile.scrcpy"
const char *
sc_adb_get_executable(void);
@@ -114,4 +116,11 @@ sc_adb_getprop(struct sc_intr *intr, const char *serial, const char *prop,
char *
sc_adb_get_device_ip(struct sc_intr *intr, const char *serial, unsigned flags);
/**
* Return the path of the installed APK for com.genymobile.scrcpy (if any)
*/
char *
sc_adb_get_installed_apk_path(struct sc_intr *intr, const char *serial,
unsigned flags);
#endif