mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-09 09:38:54 +00:00
fix(wivrn client start button): handle different android package names
This commit is contained in:
parent
a34faa9cd7
commit
6d85983db0
1 changed files with 8 additions and 2 deletions
|
@ -123,11 +123,17 @@ impl AsyncComponent for WivrnWiredStartBox {
|
|||
Some(&[
|
||||
"-c",
|
||||
concat!(
|
||||
"set -e;",
|
||||
// package from store is org.meumeu.wivrn
|
||||
// package from github is org.meumeu.wivrn.github
|
||||
// locally built one is org.meumeu.wivrn.local
|
||||
// select by preference "local", then "github" and last store one
|
||||
"PACKAGE=$(adb shell pm list packages org.meumeu.wivrn | sort | tail -1 | sed 's/package://');",
|
||||
"adb reverse tcp:9757 tcp:9757 && ",
|
||||
"adb shell am force-stop org.meumeu.wivrn && ",
|
||||
"adb shell am force-stop $PACKAGE && ",
|
||||
// wait for force-stop
|
||||
"sleep 1 && ",
|
||||
"adb shell am start -a android.intent.action.VIEW -d \"wivrn+tcp://127.0.0.1\" org.meumeu.wivrn"
|
||||
"adb shell am start -a android.intent.action.VIEW -d \"wivrn+tcp://127.0.0.1\" $PACKAGE"
|
||||
)
|
||||
]),
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue