1 | #!/usr/bin/expect
|
2 |
|
3 | set cdbPath [lindex $argv 0]
|
4 | set cdbDevice [lindex $argv 1]
|
5 | set sopid [lindex $argv 2]
|
6 | set appid [lindex $argv 3]
|
7 |
|
8 | set timeout 1000
|
9 |
|
10 | spawn $cdbPath -s $cdbDevice shell
|
11 | expect {
|
12 | "developer@" {
|
13 | send "exit\r"
|
14 | spawn $cdbPath -s $cdbDevice shell "sdk-invoker 0 $sopid:$appid:uiapp"
|
15 | }
|
16 | "root@" {
|
17 | send "su install\r"
|
18 | expect "install@" {send "sdk-invoker 0 $sopid:$appid:uiapp\r"}
|
19 | }
|
20 |
|
21 | }
|
22 | expect eof
|