/// <summary> /// 启动应用 /// </summary> /// <param name="index">模拟器序号</param> /// <param name="value">包名/Activity类名</param> /// <returns></returns> public static string StartApp(int index, string value) { MyLdcmd md = MyLdcmd.GetObject(); string a = md.ImplementCmd(string.Format("{0}ld -s {1} am start -n {2}", md.SimulatorPath, index, value)); WriteLog.WriteLogFile(index + "", string.Format("{0}ld -s {1} am start -n {2}", md.SimulatorPath, index, value)); return(a); }
/// <summary> /// 修改模拟器默认属性设置 /// </summary> public static void modifySimulator(int index) { MyLdcmd myldcmd = MyLdcmd.GetObject(); lock (obj) { myldcmd.ImplementCmd(string.Format("{0}dnconsole modify --index {1} --resolution 540,960,240 --cpu 1 --memory 1024 --imei auto", myldcmd.SimulatorPath, index)); WriteLog.WriteLogFile(index + "", string.Format("{0}dnconsole modify --index {1} --resolution 540,960,240 --cpu 1 --memory 1024 --imei auto", myldcmd.SimulatorPath, index)); } }