@@ -313,25 +313,32 @@ def build(self):
313313 Column (
314314 [
315315 Text (
316- "You can bring your own image and recovery or you download the officially supported image and recovery file for your device here:"
316+ "You can bring your own image and recovery or you download the officially supported image file for your device here:"
317317 ),
318318 Row (
319319 [
320320 ElevatedButton (
321- "Download" ,
321+ "Download LineageOS image " ,
322322 icon = icons .DOWNLOAD_OUTLINED ,
323323 on_click = lambda _ : webbrowser .open (
324324 self .download_link
325325 ),
326326 expand = True ,
327327 ),
328+ ElevatedButton (
329+ "Download TWRP recovery" ,
330+ icon = icons .DOWNLOAD_OUTLINED ,
331+ on_click = lambda _ : webbrowser .open (
332+ f"https://dl.twrp.me/{ self .state .config .metadata .get ('devicecode' )} "
333+ ),
334+ expand = True ,
335+ ),
328336 ]
329337 ),
330338 Markdown (
331339 f"""
332340The image file should look something like `lineage-19.1-20221101-nightly-{ self .state .config .metadata .get ('devicecode' )} -signed.zip`
333- and the recovery like `lineage-19.1-20221101-recovery-{ self .state .config .metadata .get ('devicecode' )} .img`
334- or `twrp-3.6.2_9-0-{ self .state .config .metadata .get ('devicecode' )} .img`.
341+ and the recovery like `twrp-3.6.2_9-0-{ self .state .config .metadata .get ('devicecode' )} .img`. Note that this tool only supports TWRP recoveries for now.
335342"""
336343 ),
337344 Divider (),
@@ -341,7 +348,7 @@ def build(self):
341348 # attach the controls for uploading image and recovery
342349 self .right_view .controls .extend (
343350 [
344- Text ("Now select the operating system image and recovery:" ),
351+ Text ("Now select the operating system image and recovery (note, that only TWRP recoveries are supported) :" ),
345352 Row (
346353 [
347354 ElevatedButton (
@@ -530,7 +537,7 @@ def call_to_phone(self, e, command: str):
530537 # display a progress bar to show something is happening
531538 self .right_view .controls .append (
532539 Row (
533- [ProgressBar (color = "#00d886" )],
540+ [ProgressBar (width = 600 , color = "#00d886" , bgcolor = "#eeeeee" , bar_height = 16 )],
534541 alignment = "center" ,
535542 ),
536543 )
@@ -549,37 +556,37 @@ def call_to_phone(self, e, command: str):
549556 if command in cmd_mapping .keys ():
550557 for line in cmd_mapping .get (command )(bin_path = self .state .bin_path ):
551558 if self .state .advanced and (type (line ) == str ) and line .strip ():
552- self .terminal_box .content .controls .append (Text (f">{ line } " ))
559+ self .terminal_box .content .controls .append (Text (f">{ line . strip () } " ))
553560 self .terminal_box .update ()
554561 success = line
555562 elif command == "adb_sideload" :
556563 for line in adb_sideload (bin_path = self .state .bin_path , target = self .state .image_path ):
557564 if self .state .advanced and (type (line ) == str ) and line .strip ():
558- self .terminal_box .content .controls .append (Text (f">{ line } " ))
565+ self .terminal_box .content .controls .append (Text (f">{ line . strip () } " ))
559566 self .terminal_box .update ()
560567 success = line
561568 elif command == "adb_twrp_wipe_and_install" :
562569 for line in adb_twrp_wipe_and_install (bin_path = self .state .bin_path , target = self .state .image_path ):
563570 if self .state .advanced and (type (line ) == str ) and line .strip ():
564- self .terminal_box .content .controls .append (Text (f">{ line } " ))
571+ self .terminal_box .content .controls .append (Text (f">{ line . strip () } " ))
565572 self .terminal_box .update ()
566573 success = line
567574 elif command == "fastboot_flash_recovery" :
568575 for line in fastboot_flash_recovery (bin_path = self .state .bin_path , recovery = self .state .recovery_path ):
569576 if self .state .advanced and (type (line ) == str ) and line .strip ():
570- self .terminal_box .content .controls .append (Text (f">{ line } " ))
577+ self .terminal_box .content .controls .append (Text (f">{ line . strip () } " ))
571578 self .terminal_box .update ()
572579 success = line
573580 elif command == "fastboot_unlock_with_code" :
574581 for line in fastboot_unlock_with_code (bin_path = self .state .bin_path , unlock_code = self .inputtext .value ):
575582 if self .state .advanced and (type (line ) == str ) and line .strip ():
576- self .terminal_box .content .controls .append (Text (f">{ line } " ))
583+ self .terminal_box .content .controls .append (Text (f">{ line . strip () } " ))
577584 self .terminal_box .update ()
578585 success = line
579586 elif command == "heimdall_flash_recovery" :
580587 for line in heimdall_flash_recovery (bin_path = self .state .bin_path , recovery = self .state .recovery_path ):
581588 if self .state .advanced and (type (line ) == str ) and line .strip ():
582- self .terminal_box .content .controls .append (Text (f">{ line } " ))
589+ self .terminal_box .content .controls .append (Text (f">{ line . strip () } " ))
583590 self .terminal_box .update ()
584591 success = line
585592 else :
0 commit comments