5252from widgets import call_button , confirm_button , get_title
5353
5454# Toggle to True for development purposes
55- DEVELOPMENT = False
55+ DEVELOPMENT = False
5656DEVELOPMENT_CONFIG = "Samsung Galaxy A3 2017" # "Pixel 3a"
5757
5858
@@ -184,7 +184,7 @@ def search_devices(self, e):
184184 if PLATFORM in ("linux" , "MacOS" ):
185185 output = check_output (
186186 [
187- BIN_PATH .joinpath (Path ("adb" )). name ,
187+ str ( BIN_PATH .joinpath (Path ("adb" ))) ,
188188 "shell" ,
189189 "dumpsys" ,
190190 "bluetooth_manager" ,
@@ -200,7 +200,7 @@ def search_devices(self, e):
200200 elif PLATFORM == "windows" :
201201 output = check_output (
202202 [
203- BIN_PATH .joinpath (Path ("adb" )). name ,
203+ str ( BIN_PATH .joinpath (Path ("adb" ))) ,
204204 "shell" ,
205205 "dumpsys" ,
206206 "bluetooth_manager" ,
@@ -218,7 +218,6 @@ def search_devices(self, e):
218218
219219 self .device_name .value = output .strip ()
220220 # load config from file
221- # path = f"{CONFIG_PATH}/{output.strip()}.yaml"
222221 path = CONFIG_PATH .joinpath (Path (f"{ output .strip ()} .yaml" ))
223222 load_config_success = self .load_config (path )
224223 if load_config_success :
@@ -231,7 +230,6 @@ def search_devices(self, e):
231230 except CalledProcessError :
232231 if DEVELOPMENT :
233232 path = CONFIG_PATH .joinpath (Path (f"{ DEVELOPMENT_CONFIG } .yaml" ))
234- # path = f"{CONFIG_PATH}/{DEVELOPMENT_CONFIG}.yaml"
235233 load_config_success = self .load_config (path )
236234 if load_config_success :
237235 self .config_found_box .value = True
@@ -503,9 +501,9 @@ def build(self):
503501
504502 def call_to_phone (self , e , command : str ):
505503 # TODO: use proper windows paths
506- command = command .replace ("adb" , BIN_PATH .joinpath (Path ("adb" )). name )
507- command = command .replace ("fastboot" , BIN_PATH .joinpath (Path ("fastboot" )). name )
508- command = command .replace ("heimdall" , BIN_PATH .joinpath (Path ("heimdall" )). name )
504+ command = command .replace ("adb" , str ( BIN_PATH .joinpath (Path ("adb" ))) )
505+ command = command .replace ("fastboot" , str ( BIN_PATH .joinpath (Path ("fastboot" ))) )
506+ command = command .replace ("heimdall" , str ( BIN_PATH .joinpath (Path ("heimdall" ))) )
509507
510508 command = command .replace ("<recovery>" , self .recovery_path )
511509 command = command .replace ("<image>" , self .image_path )
0 commit comments