Exemple #1
0
 public static bool ExtractIcons(string apk_location)
 {
     ColorPrint.WriteLine("Extracting icons");
     if (ApkHelper.ExtractDrawableFolder(apk_location))
     {
         ColorPrint.WriteLine("\nSuccessfully extracted icons\n", ConsoleColor.Green);
         return(true);
     }
     else
     {
         ColorPrint.WriteLine("\nFailed extracting icons\n", ConsoleColor.Red);
         return(false);
     }
 }
Exemple #2
0
 public static bool GetFilterList(List <string[]> icon_list)
 {
     try
     {
         string[] icons_file = ApkHelper.GetIconConversionList();
         foreach (string icon in icons_file)
         {
             string[] icon_data = icon.Split('|');
             icon_list.Add(new string[] { icon_data[0], icon_data[1] });
         }
         ColorPrint.WriteLine("\tLoaded {0} filter entries!", icon_list.Count);
         ColorPrint.WriteLine("\nSuccessfully retrieved filter list", ConsoleColor.Green);
         return(true);
     } catch
     {
         ColorPrint.WriteLine("\nFailed retrieving filter list", ConsoleColor.Red);
         return(false);
     }
 }
Exemple #3
0
        public static bool RenameIcons(List <string[]> icon_list)
        {
            ColorPrint.WriteLine("Converting icons");
            for (int i = 0; i < icon_list.Count; i++)
            {
                ApkHelper.ConvertIcon(icon_list, i);
            }

            if (Globals.ConvertedIcons > 0)
            {
                ColorPrint.WriteLine("\nSuccessfully converted icons\n", ConsoleColor.Green);
                return(true);
            }
            else
            {
                ColorPrint.WriteLine("\nFailed converting icons\n", ConsoleColor.Red);
                return(false);
            }
        }
Exemple #4
0
        public static bool CheckPackage(string apk_location, FileInfo apk_info)
        {
            ColorPrint.WriteLine("\nChecking package");
            ColorPrint.WriteLine("\t{0}", apk_info.FullName);
            bool isInvalid = (!apk_info.Extension.Contains("apk") && !apk_info.Extension.Contains("zip")) || !ApkHelper.CheckIsValidPackage(apk_location);

            if (isInvalid)
            {
                ColorPrint.WriteLine("\n{0} is invalid\n", ConsoleColor.Red, apk_info.Name);
                return(false);
            }
            else
            {
                ColorPrint.WriteLine("\n{0} is valid\n", ConsoleColor.Green, apk_info.Name);
                return(true);
            }
        }