public static DataTable GetApps()
        {
            DataTable dt = new DataTable("App List");

            dt.Columns.Add(new DataColumn("Package Names", typeof(String)));
            dt.Columns.Add(new DataColumn("App Names", typeof(String)));
            dt.Columns.Add(new DataColumn("Suggestion", typeof(String)));
            dt.Columns.Add(new DataColumn("Check", typeof(String)));
            var keys = new DataColumn[1];

            keys[0]       = dt.Columns["Package Name"];
            dt.PrimaryKey = keys;
            List <AndroidApp> apps = Adb.GetAllAndroidApps();

            foreach (AndroidApp app in apps)
            {
                DataRow dr = dt.NewRow();
                dr["App Names"]     = app.GetName();
                dr["Package Names"] = app.GetPackageName();
                dr["Suggestion"]    = app.GetSuggestion();
                dt.Rows.Add(dr);
            }

            return(dt);
        }
예제 #2
0
        public static String InstallApp(String apppath)
        {
            String cmd = "adb install -r " + apppath;
            //MessageBox.Show(cmd);
            //String ret = "";
            string ret = Adb.RunCommand(cmd);

            return(DateTime.Now.ToLocalTime().ToString() + " " + apppath + " Install: " + ret + "\n");
        }
        public static String InstallApps(List <String> paths)
        {
            String log = "";

            foreach (String path in paths)
            {
                log += Adb.InstallApp(path);
            }
            return(log);
        }
        public static String UninstallAppList(DataTable apps)
        {
            String            log     = "";
            List <AndroidApp> applist = ToAndroidAppList(apps);

            foreach (AndroidApp a in applist)
            {
                log += Adb.UninstallApp(a);
            }
            return(log + "\n");
        }