@@ -32,18 +32,19 @@ import (
3232)
3333
3434var (
35- adbArgs = flags .NewStringList ("adb_arg" , "Options for the adb binary." )
36- adbPath = flag .String ("adb" , "" , "Path to the adb binary to use with mobile-install." )
37- device = flag .String ("device" , "" , "The adb device serial number." )
38- javaHome = flag .String ("java_home" , "" , "Path to JDK." )
39- launchActivity = flag .String ("launch_activity" , "" , "Activity to launch via am start -n package/.activity_to_launch." )
40- appPackagePath = flag .String ("manifest_package_name_path" , "" , "Path to file containing the manifest package name." )
41- splits = flags .NewStringList ("splits" , "The list of split apk paths." )
42- start = flag .String ("start" , "" , "start_type from mobile-install." )
43- startType = flag .String ("start_type" , "" , "start_type (deprecated, use --start)." )
44- toolTag = flag .String ("tool_tag" , "" , "tool_tag from blaze." )
45- useADBRoot = flag .Bool ("use_adb_root" , true , "whether (true) or not (false) to use root permissions." )
46- userID = flag .Int ("user" , 0 , "User id to install the app for." )
35+ adbArgs = flags .NewStringList ("adb_arg" , "Options for the adb binary." )
36+ adbPath = flag .String ("adb" , "" , "Path to the adb binary to use with mobile-install." )
37+ toolchainADBPath = flag .String ("toolchain_adb" , "" , "Path to the adb binary from the Android toolchain." )
38+ device = flag .String ("device" , "" , "The adb device serial number." )
39+ javaHome = flag .String ("java_home" , "" , "Path to JDK." )
40+ launchActivity = flag .String ("launch_activity" , "" , "Activity to launch via am start -n package/.activity_to_launch." )
41+ appPackagePath = flag .String ("manifest_package_name_path" , "" , "Path to file containing the manifest package name." )
42+ splits = flags .NewStringList ("splits" , "The list of split apk paths." )
43+ start = flag .String ("start" , "" , "start_type from mobile-install." )
44+ startType = flag .String ("start_type" , "" , "start_type (deprecated, use --start)." )
45+ toolTag = flag .String ("tool_tag" , "" , "tool_tag from blaze." )
46+ useADBRoot = flag .Bool ("use_adb_root" , true , "whether (true) or not (false) to use root permissions." )
47+ userID = flag .Int ("user" , 0 , "User id to install the app for." )
4748
4849 // Studio deployer args
4950 studioDeployerPath = flag .String ("studio_deployer" , "" , "Path to the Android Studio deployer." )
@@ -165,7 +166,7 @@ func main() {
165166 }
166167
167168 pprint .Info ("Connecting to device %s" , deviceSerial )
168- d , err := devlib .New (ctx , deviceSerial , port , devTmp , * adbPath , * useADBRoot )
169+ d , err := devlib .New (ctx , deviceSerial , port , devTmp , * adbPath , * toolchainADBPath , * useADBRoot )
169170 if err != nil {
170171 glog .Exitln (err )
171172 }
@@ -178,7 +179,7 @@ func main() {
178179 startTime := time .Now ()
179180
180181 pprint .Info ("Installing application using the Android Studio deployer ..." )
181- if err := deployment .AndroidStudioSync (ctx , deviceSerial , port , appPackage , * splits , * studioDeployerPath , * adbPath , * javaHome , * optimisticInstall , * studioVerboseLog , * userID , * useADBRoot ); err != nil {
182+ if err := deployment .AndroidStudioSync (ctx , deviceSerial , port , appPackage , * splits , * studioDeployerPath , d . ADBPath , * javaHome , * optimisticInstall , * studioVerboseLog , * userID , * useADBRoot ); err != nil {
182183 flushAndExitf (ctx , "" , "" , "" , "" , "Got error installing using the Android Studio deployer: %v" , err )
183184 }
184185
0 commit comments