@@ -33,8 +33,6 @@ public List<ROM> getROMs() {
3333 int b ;
3434 switch (r .scriptname ) {
3535 case "add_ubuntutouch_systemimage_haliumboot.sh" :
36- //noinspection SpellCheckingInspection
37- case "add_ubuntutouch_sytemimage_haliumboot.sh" : // this is considered deprecated
3836 r .viewname = c .getString (R .string .rom_type_add_ut_sysimg_halium );
3937 r .requiredFiles = new HashMap <>();
4038 r .requiredFiles .put ("halium-boot.img" , c .getString (R .string .select_halium_boot ));
@@ -43,14 +41,30 @@ public List<ROM> getROMs() {
4341 r .parts .add (c .getString (R .string .select_part , c .getString (R .string .system_part )));
4442 r .parts .add (c .getString (R .string .select_part , c .getString (R .string .data_part )));
4543 r .strings = new HashMap <>();
46- r .strings .put (c .getString (R .string .enter_rom_name ), "" );
44+ r .strings .put (c .getString (R .string .enter_rom_name ), "Ubuntu Touch " );
4745 a = new ArrayList <>(Arrays .asList (Objects .requireNonNull (SuFile .open ("/data/abm/bootset/db/entries/" ).list ())));
4846 a .removeIf ((c ) -> !c .contains ("rom" ));
4947 a .sort ((c , d ) -> Integer .compare (Integer .parseInt (c .replace ("rom" ,"" ).replace (".conf" ,"" )), Integer .parseInt (d .replace ("rom" ,"" ).replace (".conf" ,"" ))));
5048 b = a .size () > 0 ? Integer .parseInt (a .get (a .size ()-1 ).replace ("rom" ,"" ).replace (".conf" ,"" ))+1 : 0 ;
5149 r .strings .put (c .getString (R .string .enter_rom_folder ), "rom" + b );
5250 r .gen = (imodel , menuName , folderName ) -> imodel .setCmdline (Objects .requireNonNull (imodel .getROM ().getValue ()).fullPath + " '" + folderName + "' '" + menuName + "' " + Objects .requireNonNull (imodel .getParts ().getValue ()).get (0 ) + " " + imodel .getParts ().getValue ().get (1 ) + " /data/data/org.androidbootmanager.app/cache/system.img /data/data/org.androidbootmanager.app/cache/halium-boot.img" );
5351 break ;
52+ case "add_sailfish.sh" :
53+ r .viewname = c .getString (R .string .rom_type_add_sailfish );
54+ r .requiredFiles = new HashMap <>();
55+ r .requiredFiles .put ("hybris-boot.img" , c .getString (R .string .select_hybris_boot ));
56+ r .requiredFiles .put ("sailfish.img001" , c .getString (R .string .select_system_image ));
57+ r .parts = new ArrayList <>();
58+ r .parts .add (c .getString (R .string .select_part , c .getString (R .string .data_part )));
59+ r .strings = new HashMap <>();
60+ r .strings .put (c .getString (R .string .enter_rom_name ), "SailfishOS" );
61+ a = new ArrayList <>(Arrays .asList (Objects .requireNonNull (SuFile .open ("/data/abm/bootset/db/entries/" ).list ())));
62+ a .removeIf ((c ) -> !c .contains ("rom" ));
63+ a .sort ((c , d ) -> Integer .compare (Integer .parseInt (c .replace ("rom" ,"" ).replace (".conf" ,"" )), Integer .parseInt (d .replace ("rom" ,"" ).replace (".conf" ,"" ))));
64+ b = a .size () > 0 ? Integer .parseInt (a .get (a .size ()-1 ).replace ("rom" ,"" ).replace (".conf" ,"" ))+1 : 0 ;
65+ r .strings .put (c .getString (R .string .enter_rom_folder ), "rom" + b );
66+ r .gen = (imodel , menuName , folderName ) -> imodel .setCmdline (Objects .requireNonNull (imodel .getROM ().getValue ()).fullPath + " '" + folderName + "' '" + menuName + "' " + Objects .requireNonNull (imodel .getParts ().getValue ()).get (0 ) + " /data/data/org.androidbootmanager.app/cache/sailfish.img001 /data/data/org.androidbootmanager.app/cache/hybris-boot.img" );
67+ break ;
5468 case "other_os.sh" :
5569 r .viewname = c .getString (R .string .other_os );
5670 r .requiredFiles = new HashMap <>();
0 commit comments