mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-30 22:05:12 +00:00
Add option to start an app by its name
By adding the '?' prefix, the app is searched by its name instead of its package name (retrieving app names on the device may take some time): scrcpy --start-app=?firefox An app matches if its label starts with the given name, case-insensitive. If '+' is also passed to force-stop the app before starting, then the prefixes must be in that order: scrcpy --start-app=+?firefox PR #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
This commit is contained in:
@@ -812,8 +812,14 @@ static const struct sc_option options[] = {
|
||||
.longopt = "start-app",
|
||||
.argdesc = "name",
|
||||
.text = "Start an Android app, by its exact package name.\n"
|
||||
"Add a '?' prefix to select an app whose name starts with the "
|
||||
"given name, case-insensitive (retrieving app names on the "
|
||||
"device may take some time):\n"
|
||||
" scrcpy --start-app=?firefox\n"
|
||||
"Add a '+' prefix to force-stop before starting the app:\n"
|
||||
" scrcpy --new-display --start-app=+org.mozilla.firefox",
|
||||
" scrcpy --new-display --start-app=+org.mozilla.firefox\n"
|
||||
"Both prefixes can be used, in that order:\n"
|
||||
" scrcpy --start-app=+?firefox",
|
||||
},
|
||||
{
|
||||
.shortopt = 't',
|
||||
|
Reference in New Issue
Block a user