Tool menu option to start the Android remote server.

The option launches a batch file that starts the apk in remoteserver mode,
as well as taking care of port forwarding.

Also have a batch file for manually starting and capturing an APK by its
package name. They are both copied to the TargetDir as a PostBuildEvent.
This commit is contained in:
Michael Rennie
2016-10-06 13:14:42 +02:00
committed by Baldur Karlsson
parent eaa85bf1fa
commit 6931d0b954
5 changed files with 44 additions and 1 deletions
+19 -1
View File
@@ -95,6 +95,7 @@
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.manageRemote = new System.Windows.Forms.ToolStripMenuItem();
this.startAndroidRemoteServerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewDocsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewLogFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -118,6 +119,7 @@
this.statusProgress = new System.Windows.Forms.ToolStripProgressBar();
this.dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel();
this.saveDialog = new System.Windows.Forms.SaveFileDialog();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.menuStrip1.SuspendLayout();
this.toolStripContainer1.BottomToolStripPanel.SuspendLayout();
this.toolStripContainer1.ContentPanel.SuspendLayout();
@@ -516,7 +518,9 @@
this.resolveSymbolsToolStripMenuItem,
this.toolStripSeparator11,
this.optionsToolStripMenuItem,
this.manageRemote});
this.manageRemote,
this.toolStripSeparator13,
this.startAndroidRemoteServerToolStripMenuItem});
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.toolsToolStripMenuItem.Text = "&Tools";
@@ -804,6 +808,18 @@
this.saveDialog.Filter = "Log Files (*.rdc)|*.rdc";
this.saveDialog.Title = "Save Log As";
//
// toolStripSeparator13
//
this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(271, 6);
//
// startAndroidRemoteServerToolStripMenuItem
//
this.startAndroidRemoteServerToolStripMenuItem.Name = "startAndroidRemoteServerToolStripMenuItem";
this.startAndroidRemoteServerToolStripMenuItem.Size = new System.Drawing.Size(274, 26);
this.startAndroidRemoteServerToolStripMenuItem.Text = "Start Android Remote Server";
this.startAndroidRemoteServerToolStripMenuItem.Click += new System.EventHandler(this.startAndroidRemoteServerToolStripMenuItem_Click);
//
// MainWindow
//
this.AllowDrop = true;
@@ -907,11 +923,13 @@
private System.Windows.Forms.ToolStripMenuItem pythonShellToolStripMenuItem;
private System.Windows.Forms.ToolStripStatusLabel statusIcon;
private System.Windows.Forms.ToolStripMenuItem manageRemote;
private System.Windows.Forms.ToolStripMenuItem startAndroidRemoteServerToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem checkForUpdatesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem showTipsToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
private System.Windows.Forms.ToolStripMenuItem statisticsViewerToolStripMenuItem;
private System.Windows.Forms.ToolStripDropDownButton contextChooser;
private System.Windows.Forms.ToolStripMenuItem localContext;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator13;
}
}
+10
View File
@@ -1943,5 +1943,15 @@ namespace renderdocui.Windows
}
#endregion
private void startAndroidRemoteServerToolStripMenuItem_Click(object sender, EventArgs e)
{
// /K to keep the window open after finishing.
// We want to see the output, e.g. to see if adb is on the path.
ProcessStartInfo processInfo = new ProcessStartInfo("cmd.exe", "/K android_remoteserver.bat");
Process process = Process.Start(processInfo);
process.Close();
}
}
}
+4
View File
@@ -627,6 +627,10 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy $(SolutionDir)scripts\android_remoteserver.bat $(TargetDir)
copy $(SolutionDir)scripts\android_capture.bat $(TargetDir)</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
+5
View File
@@ -0,0 +1,5 @@
adb forward tcp:38970 tcp:38920
adb shell setprop debug.vulkan.layers VK_LAYER_RENDERDOC_Capture
adb shell monkey -p %* -c android.intent.category.LAUNCHER 1
timeout 5
adb shell setprop debug.vulkan.layers \"\"
+6
View File
@@ -0,0 +1,6 @@
adb shell am force-stop org.renderdoc.renderdoccmd
adb forward tcp:39970 tcp:39920
adb forward tcp:38970 tcp:38920
adb shell setprop debug.vulkan.layers \"\"
adb shell pm grant org.renderdoc.renderdoccmd android.permission.READ_EXTERNAL_STORAGE
adb shell am start -n org.renderdoc.renderdoccmd/.Loader -e renderdoccmd remoteserver