Compare commits

...

33 Commits
0.1 ... v0.9

Author SHA1 Message Date
nerdunit
d800f29459 Updated to 0.9 2020-06-21 18:02:25 +03:00
nerdunit
597f3c43cd Update README.md 2020-06-19 12:10:28 +03:00
nerdunit
05d9112637 Update version 2020-06-19 12:08:56 +03:00
nerdunit
646e38a737 Added auto update + bugfix 2020-06-19 12:05:50 +03:00
nerdunit
d86bb17b4d Add files via upload 2020-06-19 11:04:04 +03:00
nerdunit
d65f471ccd Update version 2020-06-19 11:03:04 +03:00
nerdunit
72a71f3b48 Update README.md 2020-06-19 11:02:18 +03:00
nerdunit
842a9d2e63 Add files via upload 2020-06-19 10:59:49 +03:00
nerdunit
b06bd80f20 Update README.md 2020-06-17 23:39:09 +03:00
nerdunit
f6f0c5064c Update version 2020-06-17 23:37:58 +03:00
nerdunit
978dc671ef Add files via upload 2020-06-17 23:35:35 +03:00
nerdunit
bcd61f1596 Add files via upload 2020-06-17 23:34:33 +03:00
nerdunit
82f858b678 Update version 2020-06-16 11:08:06 +03:00
nerdunit
fa3b795695 Update README.md 2020-06-16 11:07:56 +03:00
nerdunit
6a34deeede Add files via upload 2020-06-16 11:05:49 +03:00
nerdunit
266c242199 Bugfix 2020-06-14 13:47:35 +03:00
nerdunit
366627085f Update version 2020-06-14 13:38:51 +03:00
nerdunit
bfe2ad2aad Update README.md 2020-06-14 13:37:15 +03:00
nerdunit
cebd440de2 Add files via upload 2020-06-14 13:36:58 +03:00
nerdunit
86bbb2d929 Update README.md 2020-06-06 20:10:10 +03:00
nerdunit
684408e8f2 Quick BugFix 2020-06-06 20:07:31 +03:00
nerdunit
d6bb14e8a4 Update version 2020-06-06 20:00:11 +03:00
nerdunit
616deec235 Add files via upload 2020-06-06 20:00:03 +03:00
nerdunit
7f9efc49f8 Add files via upload 2020-06-06 19:53:41 +03:00
nerdunit
684a65f432 bugfix 2020-06-06 09:02:26 +03:00
nerdunit
13d12affc6 Update version 2020-05-29 14:07:47 +03:00
nerdunit
215f992a82 Update README.md 2020-05-29 14:06:17 +03:00
nerdunit
1d140c514d Update README.md 2020-05-29 14:05:29 +03:00
nerdunit
79eab9d1e4 Create README.md 2020-05-29 14:04:57 +03:00
nerdunit
36a0060396 Updated to v0,3 2020-05-29 14:04:43 +03:00
nerdunit
bd9c51c037 Add files via upload 2020-05-29 00:20:33 +03:00
nerdunit
5cb06ad9b5 Update version 2020-05-29 00:15:38 +03:00
nerdunit
828ca9a46a Updated to 0.2
added prototype firmwareflash added few tooltips renamed buttons
2020-05-29 00:15:24 +03:00
50 changed files with 3767 additions and 176 deletions

BIN
7z.dll Normal file

Binary file not shown.

BIN
7z.exe Normal file

Binary file not shown.

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,6 +13,8 @@
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -32,7 +35,17 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="SergeUtils">
<HintPath>.\SergeUtils.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
@@ -44,16 +57,33 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="customAdbCommandForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="customAdbCommandForm.Designer.cs">
<DependentUpon>customAdbCommandForm.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="usernameForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="usernameForm.Designer.cs">
<DependentUpon>usernameForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SelectFolder.cs" />
<EmbeddedResource Include="customAdbCommandForm.resx">
<DependentUpon>customAdbCommandForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
@@ -66,6 +96,10 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<EmbeddedResource Include="usernameForm.resx">
<DependentUpon>usernameForm.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -79,5 +113,16 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\Fody.6.0.0\build\Fody.targets" Condition="Exists('packages\Fody.6.0.0\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Fody.6.0.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.6.0.0\build\Fody.targets'))" />
<Error Condition="!Exists('packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
</Target>
</Project>

3
FodyWeavers.xml Normal file
View File

@@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura />
</Weavers>

111
FodyWeavers.xsd Normal file
View File

@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

339
Form1.Designer.cs generated
View File

@@ -28,103 +28,262 @@
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.m_combo = new SergeUtils.EasyCompletionComboBox();
this.startsideloadbutton = new System.Windows.Forms.Button();
this.devicesbutton = new System.Windows.Forms.Button();
this.instructionsbutton = new System.Windows.Forms.Button();
this.obbcopybutton = new System.Windows.Forms.Button();
this.backupbutton = new System.Windows.Forms.Button();
this.restorebutton = new System.Windows.Forms.Button();
this.customadbcmdbutton = new System.Windows.Forms.Button();
this.ListApps = new System.Windows.Forms.Button();
this.getApkButton = new System.Windows.Forms.Button();
this.listApkPermsButton = new System.Windows.Forms.Button();
this.changePermsBtn = new System.Windows.Forms.Button();
this.launchPackageTextBox = new System.Windows.Forms.TextBox();
this.launchApkButton = new System.Windows.Forms.Button();
this.uninstallAppButton = new System.Windows.Forms.Button();
this.sideloadFolderButton = new System.Windows.Forms.Button();
this.aboutBtn = new System.Windows.Forms.Button();
this.label = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.progressBar = new System.Windows.Forms.ProgressBar();
this.userjsonButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
// m_combo
//
this.button1.Location = new System.Drawing.Point(12, 38);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(82, 34);
this.button1.TabIndex = 0;
this.button1.Text = "Select Apk";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
this.m_combo.Location = new System.Drawing.Point(12, 134);
this.m_combo.Name = "m_combo";
this.m_combo.Size = new System.Drawing.Size(427, 21);
this.m_combo.TabIndex = 16;
//
// textBox1
// startsideloadbutton
//
this.textBox1.Location = new System.Drawing.Point(12, 12);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(373, 20);
this.textBox1.TabIndex = 1;
this.startsideloadbutton.Location = new System.Drawing.Point(100, 12);
this.startsideloadbutton.Name = "startsideloadbutton";
this.startsideloadbutton.Size = new System.Drawing.Size(87, 33);
this.startsideloadbutton.TabIndex = 2;
this.startsideloadbutton.Text = "Sideload APK";
this.startsideloadbutton.UseVisualStyleBackColor = true;
this.startsideloadbutton.Click += new System.EventHandler(this.startsideloadbutton_Click);
//
// button2
// devicesbutton
//
this.button2.Location = new System.Drawing.Point(298, 39);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(87, 33);
this.button2.TabIndex = 2;
this.button2.Text = "Start Sideload";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
this.devicesbutton.Location = new System.Drawing.Point(12, 12);
this.devicesbutton.Name = "devicesbutton";
this.devicesbutton.Size = new System.Drawing.Size(82, 34);
this.devicesbutton.TabIndex = 1;
this.devicesbutton.Text = "Adb devices";
this.devicesbutton.UseVisualStyleBackColor = true;
this.devicesbutton.Click += new System.EventHandler(this.devicesbutton_Click);
//
// button3
// instructionsbutton
//
this.button3.Location = new System.Drawing.Point(12, 78);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(82, 34);
this.button3.TabIndex = 3;
this.button3.Text = "Adb devices";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
this.instructionsbutton.Location = new System.Drawing.Point(282, 12);
this.instructionsbutton.Name = "instructionsbutton";
this.instructionsbutton.Size = new System.Drawing.Size(87, 34);
this.instructionsbutton.TabIndex = 4;
this.instructionsbutton.Text = "Instructions";
this.instructionsbutton.UseVisualStyleBackColor = true;
this.instructionsbutton.Click += new System.EventHandler(this.instructionsbutton_Click);
//
// button4
// obbcopybutton
//
this.button4.Location = new System.Drawing.Point(298, 79);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(88, 30);
this.button4.TabIndex = 4;
this.button4.Text = "Instructions";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
this.obbcopybutton.Location = new System.Drawing.Point(193, 12);
this.obbcopybutton.Name = "obbcopybutton";
this.obbcopybutton.Size = new System.Drawing.Size(87, 34);
this.obbcopybutton.TabIndex = 3;
this.obbcopybutton.Text = "Copy Obb";
this.obbcopybutton.UseVisualStyleBackColor = true;
this.obbcopybutton.Click += new System.EventHandler(this.obbcopybutton_Click);
//
// button5
// backupbutton
//
this.button5.Location = new System.Drawing.Point(145, 75);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(82, 34);
this.button5.TabIndex = 5;
this.button5.Text = "Copy Obb";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
this.backupbutton.Location = new System.Drawing.Point(12, 52);
this.backupbutton.Name = "backupbutton";
this.backupbutton.Size = new System.Drawing.Size(82, 34);
this.backupbutton.TabIndex = 5;
this.backupbutton.Text = "Backup Gamedata";
this.backupbutton.UseVisualStyleBackColor = true;
this.backupbutton.Click += new System.EventHandler(this.backupbutton_Click);
//
// button6
// restorebutton
//
this.button6.Location = new System.Drawing.Point(145, 39);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(82, 34);
this.button6.TabIndex = 6;
this.button6.Text = "Select Obb";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click);
this.restorebutton.Location = new System.Drawing.Point(100, 52);
this.restorebutton.Name = "restorebutton";
this.restorebutton.Size = new System.Drawing.Size(87, 34);
this.restorebutton.TabIndex = 6;
this.restorebutton.Text = "Restore Gamedata";
this.restorebutton.UseVisualStyleBackColor = true;
this.restorebutton.Click += new System.EventHandler(this.restorebutton_Click);
//
// progressBar1
// customadbcmdbutton
//
this.progressBar1.Location = new System.Drawing.Point(13, 119);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(373, 20);
this.progressBar1.TabIndex = 7;
this.customadbcmdbutton.Location = new System.Drawing.Point(193, 52);
this.customadbcmdbutton.Name = "customadbcmdbutton";
this.customadbcmdbutton.Size = new System.Drawing.Size(87, 34);
this.customadbcmdbutton.TabIndex = 7;
this.customadbcmdbutton.Text = "Run Adb Command";
this.customadbcmdbutton.UseVisualStyleBackColor = true;
this.customadbcmdbutton.Click += new System.EventHandler(this.customadbcmdbutton_Click);
//
// ListApps
//
this.ListApps.Location = new System.Drawing.Point(12, 92);
this.ListApps.Name = "ListApps";
this.ListApps.Size = new System.Drawing.Size(82, 34);
this.ListApps.TabIndex = 8;
this.ListApps.Text = "Refresh Apps";
this.ListApps.UseVisualStyleBackColor = true;
this.ListApps.Click += new System.EventHandler(this.ListApps_Click);
//
// getApkButton
//
this.getApkButton.Location = new System.Drawing.Point(100, 92);
this.getApkButton.Name = "getApkButton";
this.getApkButton.Size = new System.Drawing.Size(87, 34);
this.getApkButton.TabIndex = 9;
this.getApkButton.Text = "Get Apk";
this.getApkButton.UseVisualStyleBackColor = true;
this.getApkButton.Click += new System.EventHandler(this.getApkButton_Click);
//
// listApkPermsButton
//
this.listApkPermsButton.Location = new System.Drawing.Point(193, 92);
this.listApkPermsButton.Name = "listApkPermsButton";
this.listApkPermsButton.Size = new System.Drawing.Size(87, 34);
this.listApkPermsButton.TabIndex = 10;
this.listApkPermsButton.Text = "List Apk Perms";
this.listApkPermsButton.UseVisualStyleBackColor = true;
this.listApkPermsButton.Click += new System.EventHandler(this.listApkPermsButton_Click);
//
// changePermsBtn
//
this.changePermsBtn.Location = new System.Drawing.Point(282, 92);
this.changePermsBtn.Name = "changePermsBtn";
this.changePermsBtn.Size = new System.Drawing.Size(87, 34);
this.changePermsBtn.TabIndex = 11;
this.changePermsBtn.Text = "Change Permissions";
this.changePermsBtn.UseVisualStyleBackColor = true;
this.changePermsBtn.Click += new System.EventHandler(this.changePermsBtn_Click);
//
// launchPackageTextBox
//
this.launchPackageTextBox.Location = new System.Drawing.Point(446, 134);
this.launchPackageTextBox.Name = "launchPackageTextBox";
this.launchPackageTextBox.Size = new System.Drawing.Size(192, 20);
this.launchPackageTextBox.TabIndex = 15;
this.launchPackageTextBox.Text = "de.eye_interactive.atvl.settings";
//
// launchApkButton
//
this.launchApkButton.Location = new System.Drawing.Point(446, 161);
this.launchApkButton.Name = "launchApkButton";
this.launchApkButton.Size = new System.Drawing.Size(192, 20);
this.launchApkButton.TabIndex = 13;
this.launchApkButton.Text = "Launch Apk By Package Name";
this.launchApkButton.UseVisualStyleBackColor = true;
this.launchApkButton.Click += new System.EventHandler(this.launchApkButton_Click);
//
// uninstallAppButton
//
this.uninstallAppButton.Location = new System.Drawing.Point(375, 92);
this.uninstallAppButton.Name = "uninstallAppButton";
this.uninstallAppButton.Size = new System.Drawing.Size(64, 34);
this.uninstallAppButton.TabIndex = 12;
this.uninstallAppButton.Text = "Uninstall app";
this.uninstallAppButton.UseVisualStyleBackColor = true;
this.uninstallAppButton.Click += new System.EventHandler(this.uninstallAppButton_Click);
//
// sideloadFolderButton
//
this.sideloadFolderButton.Location = new System.Drawing.Point(375, 12);
this.sideloadFolderButton.Name = "sideloadFolderButton";
this.sideloadFolderButton.Size = new System.Drawing.Size(92, 33);
this.sideloadFolderButton.TabIndex = 17;
this.sideloadFolderButton.Text = "Sideload Folder";
this.sideloadFolderButton.UseVisualStyleBackColor = true;
this.sideloadFolderButton.Click += new System.EventHandler(this.sideloadFolderButton_Click);
//
// aboutBtn
//
this.aboutBtn.Location = new System.Drawing.Point(574, 94);
this.aboutBtn.Name = "aboutBtn";
this.aboutBtn.Size = new System.Drawing.Size(64, 34);
this.aboutBtn.TabIndex = 18;
this.aboutBtn.Text = "About";
this.aboutBtn.UseVisualStyleBackColor = true;
this.aboutBtn.Click += new System.EventHandler(this.aboutBtn_Click);
//
// label
//
this.label.AutoSize = true;
this.label.Location = new System.Drawing.Point(27, 363);
this.label.Name = "label";
this.label.Size = new System.Drawing.Size(35, 13);
this.label.TabIndex = 19;
this.label.Text = "label1";
this.label.Visible = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(27, 389);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 20;
this.label1.Text = "label1";
this.label1.Visible = false;
//
// progressBar
//
this.progressBar.Location = new System.Drawing.Point(12, 157);
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(427, 23);
this.progressBar.TabIndex = 21;
//
// userjsonButton
//
this.userjsonButton.Location = new System.Drawing.Point(473, 13);
this.userjsonButton.Name = "userjsonButton";
this.userjsonButton.Size = new System.Drawing.Size(92, 33);
this.userjsonButton.TabIndex = 22;
this.userjsonButton.Text = "Create user.json";
this.userjsonButton.UseVisualStyleBackColor = true;
this.userjsonButton.Click += new System.EventHandler(this.userjsonButton_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(398, 154);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button1);
this.ClientSize = new System.Drawing.Size(650, 411);
this.Controls.Add(this.userjsonButton);
this.Controls.Add(this.progressBar);
this.Controls.Add(this.label1);
this.Controls.Add(this.label);
this.Controls.Add(this.aboutBtn);
this.Controls.Add(this.sideloadFolderButton);
this.Controls.Add(this.uninstallAppButton);
this.Controls.Add(this.launchApkButton);
this.Controls.Add(this.launchPackageTextBox);
this.Controls.Add(this.changePermsBtn);
this.Controls.Add(this.listApkPermsButton);
this.Controls.Add(this.getApkButton);
this.Controls.Add(this.ListApps);
this.Controls.Add(this.customadbcmdbutton);
this.Controls.Add(this.restorebutton);
this.Controls.Add(this.m_combo);
this.Controls.Add(this.backupbutton);
this.Controls.Add(this.obbcopybutton);
this.Controls.Add(this.instructionsbutton);
this.Controls.Add(this.devicesbutton);
this.Controls.Add(this.startsideloadbutton);
this.HelpButton = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximumSize = new System.Drawing.Size(666, 1000);
this.MinimumSize = new System.Drawing.Size(466, 450);
this.Name = "Form1";
this.Text = "Rookie SideLoader";
this.Load += new System.EventHandler(this.Form1_Load);
@@ -134,15 +293,27 @@
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Button startsideloadbutton;
private System.Windows.Forms.Button devicesbutton;
private System.Windows.Forms.Button instructionsbutton;
private System.Windows.Forms.Button obbcopybutton;
private System.Windows.Forms.Button backupbutton;
private System.Windows.Forms.Button restorebutton;
private System.Windows.Forms.Button customadbcmdbutton;
private System.Windows.Forms.Button ListApps;
private System.Windows.Forms.Button getApkButton;
private System.Windows.Forms.Button listApkPermsButton;
private System.Windows.Forms.Button changePermsBtn;
private SergeUtils.EasyCompletionComboBox m_combo;
private System.Windows.Forms.TextBox launchPackageTextBox;
private System.Windows.Forms.Button launchApkButton;
private System.Windows.Forms.Button uninstallAppButton;
private System.Windows.Forms.Button sideloadFolderButton;
private System.Windows.Forms.Button aboutBtn;
private System.Windows.Forms.Label label;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ProgressBar progressBar;
private System.Windows.Forms.Button userjsonButton;
}
}

715
Form1.cs
View File

@@ -4,33 +4,68 @@ using System.Windows.Forms;
using System.IO;
using System.Threading;
using System.Windows;
using System.Threading.Tasks;
using System.Net.Http;
using System.Timers;
using System.Reflection;
using System.Windows.Threading;
using System.Net;
using SergeUtils;
/* <a target="_blank" href="https://icons8.com/icons/set/van">Van icon</a> icon by <a target="_blank" href="https://icons8.com">Icons8</a>
* The icon of the app contains an icon made by icon8.com
*/
namespace AndroidSideloader
{
public partial class Form1 : Form
{
#if DEBUG
bool debugMode = true;
#else
bool debugMode = false;
#endif
string path;
string obbPath = "";
string obbFile;
int size;
string allText;
bool exit = false;
string debugPath = "debug.log";
string adbPath = Environment.CurrentDirectory + "\\adb\\";
public static string debugPath = "debug.log";
public static string adbPath = Environment.CurrentDirectory + "\\adb\\";
string[] line;
public Form1()
{
InitializeComponent();
Timer99.Tick += Timer99_Tick; // don't freeze the ui
Timer99.Interval = new TimeSpan(0, 0, 0, 0, 1024);
Timer99.IsEnabled = true;
Timer99.Stop();
}
void runAdbCommand(string command)
public void changeTitle(string txt)
{
progressBar1.Value = 0;
if (this.InvokeRequired)
this.Invoke(new Action(() => this.Text = txt));
else
this.Text = txt;
}
public void runAdbCommand(string command)
{
string oldTitle = this.Text;
changeTitle("Rookie's Sideloader | Running command " + command);
exit = false;
MessageBox.Show("Action Started, may take some time...");
Process cmd = new Process();
cmd.StartInfo.FileName = "cmd.exe";
cmd.StartInfo.FileName = Environment.CurrentDirectory + "\\adb\\adb.exe";
cmd.StartInfo.Arguments = command;
cmd.StartInfo.RedirectStandardInput = true;
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.CreateNoWindow = true;
@@ -40,18 +75,36 @@ namespace AndroidSideloader
cmd.StandardInput.WriteLine(command);
cmd.StandardInput.Flush();
cmd.StandardInput.Close();
allText = cmd.StandardOutput.ReadToEnd();
cmd.WaitForExit();
var text = cmd.StandardOutput.ReadToEnd();
StreamWriter sw = File.AppendText(debugPath);
sw.Write(text);
sw.Write("\n--------------------------------------------------------------------");
sw.Write("Action name = " + command + '\n');
sw.Write(allText);
sw.Write("\n--------------------------------------------------------------------\n");
sw.Flush();
sw.Close();
line = text.Split('\n');
line = allText.Split('\n');
exit = true;
changeTitle(oldTitle);
}
private void button1_Click(object sender, EventArgs e)
private void sideload(string path)
{
Thread t1 = new Thread(() =>
{
runAdbCommand("install -r " + '"' + path + '"');
});
t1.IsBackground = true;
t1.Start();
t1.Join();
}
private async void startsideloadbutton_Click(object sender, EventArgs e)
{
using (OpenFileDialog openFileDialog = new OpenFileDialog())
{
@@ -60,66 +113,49 @@ namespace AndroidSideloader
openFileDialog.RestoreDirectory = true;
if (openFileDialog.ShowDialog() == DialogResult.OK)
textBox1.Text = openFileDialog.FileName;
}
}
void runLoadingBar(string filePath)
{
FileInfo fi = new FileInfo(filePath);
//fi.Length file size in bytes
PerformanceCounter disk = new PerformanceCounter("PhysicalDisk", "Disk Write Bytes/sec", "_total");
var bytes = 0f;
progressBar1.Maximum = (int)(fi.Length/128);
while (exit==false)
{
bytes += disk.NextValue();
try { progressBar1.Value = (int)(bytes); } catch { progressBar1.Maximum *= 2; }
Thread.Sleep(1000);
}
progressBar1.Value = progressBar1.Maximum;
}
private void button2_Click(object sender, EventArgs e)
{
path = textBox1.Text;
if (path=="" || path.EndsWith(".apk")==false)
MessageBox.Show("You must select an apk");
else
{
Thread t1 = new Thread(() =>
{
runAdbCommand("adb.exe install -r " + '"' + path + '"');
});
t1.IsBackground = true;
t1.Start();
runLoadingBar(path);
if (line[line.Length - 3].Contains("Success")==false)
{
MessageBox.Show("An error has occured, send the debug.log to rookie.lol");
}
path = openFileDialog.FileName;
else
MessageBox.Show(line[line.Length - 3]);
return;
}
progressBar.Value = 0;
FileInfo fi = new FileInfo(path);
size = (int)fi.Length / 1024;
progressBar.Maximum = size;
Task.Delay(100).ContinueWith(t => Timer99.Start()); //Delete notification after 5 seconds
await Task.Run(() => sideload(path));
Timer99.Stop();
progressBar.Value = size;
notify(allText);
}
private void button3_Click(object sender, EventArgs e)
private void devicesbutton_Click(object sender, EventArgs e)
{
runAdbCommand("adb.exe devices");
if (line[line.Length - 4].Contains("List of devices attached") == false)
MessageBox.Show(line[line.Length - 4]);
else
MessageBox.Show("No android device attached");
runAdbCommand("devices");
changeTitlebarToDevice();
notify(allText);
}
private void button4_Click(object sender, EventArgs e)
public static void notify(string message)
{
var notifyIcon = new System.Windows.Forms.NotifyIcon();
//notifyIcon.Icon = System.Drawing.SystemIcons.Application;
notifyIcon.Icon = System.Drawing.SystemIcons.Asterisk;
notifyIcon.BalloonTipTitle = "AndroidSideloader";
notifyIcon.BalloonTipText = message;
notifyIcon.Visible = true;
notifyIcon.BalloonTipClicked += (sender, e) => {
Clipboard.SetText(message);
};
notifyIcon.ShowBalloonTip(3000);
Task.Delay(5000).ContinueWith(t => notifyIcon.Dispose()); //Delete notification after 5 seconds
}
private void instructionsbutton_Click(object sender, EventArgs e)
{
string instructions = @"1. Plug in your Oculus Quest
2. Press adb devices and allow adb to connect from quest headset (one time only)
@@ -130,30 +166,220 @@ namespace AndroidSideloader
MessageBox.Show(instructions);
}
private void button5_Click(object sender, EventArgs e)
public void ExtractFile(string sourceArchive, string destination)
{
if (obbPath.Length>0)
string zPath = "7z.exe"; //add to proj and set CopyToOuputDir
ProcessStartInfo pro = new ProcessStartInfo();
pro.WindowStyle = ProcessWindowStyle.Hidden;
pro.FileName = zPath;
pro.Arguments = string.Format("x \"{0}\" -y -o\"{1}\"", sourceArchive, destination);
Process x = Process.Start(pro);
x.WaitForExit();
}
private void obbcopy(string obbPath)
{
Thread t1 = new Thread(() =>
{
runAdbCommand("push " + '"' + obbPath + '"' + " /sdcard/Android/obb");
});
t1.IsBackground = true;
t1.Start();
t1.Join();
}
Thread t1 = new Thread(() =>
{
runAdbCommand("adb push " + '"' + obbPath + '"' + " /sdcard/Android/obb");
});
t1.IsBackground = true;
t1.Start();
runLoadingBar(obbFile);
MessageBox.Show(line[line.Length - 3]);
private async void obbcopybutton_Click(object sender, EventArgs e)
{
var dialog = new FolderSelectDialog
{
Title = "Select your obb folder"
};
if (dialog.Show(Handle))
{
string[] files = Directory.GetFiles(dialog.FileName);
obbFile = files[0];
obbPath = dialog.FileName;
}
else return;
progressBar.Value = 0;
FileInfo fi = new FileInfo(obbFile);
size = (int)fi.Length / 1024;
progressBar.Maximum = size;
Task.Delay(100).ContinueWith(t => Timer99.Start()); //Delete notification after 5 seconds
await Task.Run(() => obbcopy(obbPath));
Timer99.Stop();
progressBar.Value = size;
notify(allText);
}
private void changeTitlebarToDevice()
{
if (line[1].Length > 1)
this.Text = "Rookie Sideloader | Device Connected with ID | " + line[1].Replace("device", "");
else
this.Text = "Rookie Sideloader | No Device Connected";
}
private void Form1_Load(object sender, EventArgs e)
{
if (debugMode==true)
{
MessageBox.Show("You forgot to select the obb folder");
label.Visible = true;
label1.Visible = true;
}
if (File.Exists(debugPath))
File.Delete(debugPath);
if (Directory.Exists(adbPath)==false)
{
MessageBox.Show("Please wait for the software to download and install the adb");
try
{
using (var client = new WebClient())
{
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
client.DownloadFile("https://github.com/nerdunit/androidsideloader/raw/master/7z.exe", "7z.exe");
client.DownloadFile("https://github.com/nerdunit/androidsideloader/raw/master/7z.dll", "7z.dll");
client.DownloadFile("https://github.com/nerdunit/androidsideloader/raw/master/adb.7z", "adb.7z");
}
ExtractFile(Environment.CurrentDirectory + "\\adb.7z", Environment.CurrentDirectory);
File.Delete("adb.7z");
File.Delete("7z.dll");
File.Delete("7z.exe");
}
catch (Exception ex)
{
MessageBox.Show("Cannot download adb because you are not connected to the internet!");
StreamWriter sw = File.AppendText(debugPath);
sw.Write("\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
sw.Write(ex.ToString() + "\n");
sw.Flush();
sw.Close();
Environment.Exit(600);
}
}
runAdbCommand("devices");
changeTitlebarToDevice();
if (debugMode==false)
checkForUpdate();
intToolTips();
listappsBtn();
}
void intToolTips()
{
ToolTip ListAppsToolTip = new ToolTip();
ListAppsToolTip.SetToolTip(this.ListApps, "Shows what apps are installed in the list below (in the combo box)");
ToolTip ListDevicesToolTip = new ToolTip();
ListDevicesToolTip.SetToolTip(this.devicesbutton, "Lists the devices in a message box, also updates title bar");
ToolTip SideloadAPKToolTip = new ToolTip();
SideloadAPKToolTip.SetToolTip(this.startsideloadbutton, "Sideloads/Installs one apk on the android device");
ToolTip OBBToolTip = new ToolTip();
OBBToolTip.SetToolTip(this.obbcopybutton, "Copies an obb folder to the Android/Obb folder from the device, some games/apps need this");
ToolTip BackupGameDataToolTip = new ToolTip();
BackupGameDataToolTip.SetToolTip(this.backupbutton, "Saves the game and apps data to the sideloader folder, does not save apk's and obb's");
ToolTip RestoreGameDataToolTip = new ToolTip();
RestoreGameDataToolTip.SetToolTip(this.restorebutton, "Restores the game and apps data to the device, first use Backup Game Data button");
ToolTip GetAPKToolTip = new ToolTip();
GetAPKToolTip.SetToolTip(this.getApkButton, "Saves the selected apk to the folder where the sideloader is");
ToolTip ListAppPermsToolTip = new ToolTip();
ListAppPermsToolTip.SetToolTip(this.listApkPermsButton, "Lists the permissions for the selected apk");
ToolTip ChangeAppPermsToolTip = new ToolTip();
ChangeAppPermsToolTip.SetToolTip(this.changePermsBtn, "Applies the permissions for the apk, first press list app perms");
}
void checkForUpdate()
{
string localVersion = "0.9";
HttpClient client = new HttpClient();
string currentVersion = client.GetStringAsync("https://raw.githubusercontent.com/nerdunit/androidsideloader/master/version").Result;
currentVersion = currentVersion.Remove(currentVersion.Length - 1);
if (localVersion != currentVersion)
{
DialogResult dialogResult = MessageBox.Show("There is a new update, do you want to update?", "New version " + currentVersion + " available", MessageBoxButtons.YesNo);
if (dialogResult != DialogResult.Yes)
return;
using (var fileClient = new WebClient())
{
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
fileClient.DownloadFile("https://github.com/nerdunit/androidsideloader/releases/download/v" + currentVersion + "/AndroidSideloader.exe", "Android Sideloader v" + currentVersion + ".exe");
}
Process.Start(new ProcessStartInfo()
{
Arguments = "/C choice /C Y /N /D Y /T 5 & Del \"" + Application.ExecutablePath + "\"",
WindowStyle = ProcessWindowStyle.Hidden,
CreateNoWindow = true,
FileName = "cmd.exe"
});
Process.Start(Environment.CurrentDirectory + "\\Android Sideloader v" + currentVersion + ".exe");
Environment.Exit(0);
//MessageBox.Show("Your version is outdated, the latest version is " + currentVersion + " you can download it from https://github.com/nerdunit/", "OUTDATED");
}
}
private void button6_Click(object sender, EventArgs e)
private void backup()
{
MessageBox.Show("Action Started, may take some time...");
Thread t1 = new Thread(() =>
{
runAdbCommand("pull " + '"' + "/sdcard/Android/data" + '"');
});
t1.IsBackground = true;
t1.Start();
t1.Join();
}
private async void backupbutton_Click(object sender, EventArgs e)
{
if (exit==false)
{
MessageBox.Show("Finish Previous action first!");
return;
}
await Task.Run(() => backup()); //we use async and await to not freeze the ui
try
{
Directory.Move(adbPath + "data", Environment.CurrentDirectory + "\\data");
}
catch (Exception ex)
{
File.AppendAllText(debugPath, ex.ToString());
}
notify(allText);
}
private void restore()
{
Thread t1 = new Thread(() =>
{
runAdbCommand("push " + '"' + obbPath + '"' + " /sdcard/Android/");
});
t1.IsBackground = true;
t1.Start();
t1.Join();
}
private async void restorebutton_Click(object sender, EventArgs e)
{
if (exit == false)
{
MessageBox.Show("Finish Previous action first!");
return;
}
using (var fbd = new FolderBrowserDialog())
{
DialogResult result = fbd.ShowDialog();
@@ -161,32 +387,339 @@ namespace AndroidSideloader
if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(fbd.SelectedPath))
{
string[] files = Directory.GetFiles(fbd.SelectedPath);
obbFile = files[0];
obbPath = fbd.SelectedPath;
}
else return;
}
await Task.Run(() => restore());
notify(allText);
}
private void customadbcmdbutton_Click(object sender, EventArgs e)
{
customAdbCommandForm adbCommandForm = new customAdbCommandForm();
adbCommandForm.Show();
}
private void listapps()
{
Thread t1 = new Thread(() =>
{
runAdbCommand("shell pm list packages");
});
t1.IsBackground = true;
t1.Start();
t1.Join();
}
private void ListApps_Click(object sender, EventArgs e)
{
listappsBtn();
}
private async void listappsBtn()
{
allText = "";
m_combo.Items.Clear();
await Task.Run(() => listapps());
foreach (string obj in line)
{
if (obj.Length>9)
m_combo.Items.Add(obj.Remove(0, 8));
}
m_combo.MatchingMethod = StringMatchingMethod.NoWildcards;
//if (allText.Length > 0)
// MessageBox.Show("Fetched apks with success");
}
private void getapk(string package)
{
Thread t1 = new Thread(() =>
{
runAdbCommand("shell pm path " + package);
});
t1.IsBackground = true;
t1.Start();
t1.Join();
}
private void pullapk(string apkPath)
{
Thread t2 = new Thread(() =>
{
runAdbCommand("pull " + apkPath);
});
t2.IsBackground = true;
t2.Start();
t2.Join();
}
private async void getApkButton_Click(object sender, EventArgs e)
{
if (m_combo.Items.Count == 0)
{
MessageBox.Show("Please select an app first");
return;
}
string package = m_combo.SelectedItem.ToString().Remove(m_combo.SelectedItem.ToString().Length - 1);
await Task.Run(() => getapk(package));
allText = allText.Remove(allText.Length - 1);
//MessageBox.Show(allText);
string apkPath = allText.Remove(0, 8); //remove package:
apkPath = apkPath.Remove(apkPath.Length - 1);
await Task.Run(() => pullapk(apkPath));
string currApkPath = apkPath;
while (currApkPath.Contains("/"))
currApkPath = currApkPath.Substring(currApkPath.IndexOf("/") + 1);
if (File.Exists(Environment.CurrentDirectory + "\\" + package + ".apk"))
File.Delete(Environment.CurrentDirectory + "\\" + package + ".apk");
File.Move(Environment.CurrentDirectory + "\\adb\\" + currApkPath, Environment.CurrentDirectory + "\\" + package + ".apk");
notify(allText);
}
private void listappperms(string package)
{
Thread t1 = new Thread(() =>
{
runAdbCommand("shell dumpsys package " + package);
});
t1.IsBackground = true;
t1.Start();
t1.Join();
}
private async void listApkPermsButton_Click(object sender, EventArgs e)
{
if(m_combo.Items.Count == 0)
{
MessageBox.Show("Please select an app first");
return;
}
string package = m_combo.SelectedItem.ToString().Remove(m_combo.SelectedItem.ToString().Length - 1);
await Task.Run(() => listappperms(package));
var grantedPerms = allText.Substring(allText.LastIndexOf("install permissions:") + 22);
grantedPerms.Substring(0, grantedPerms.IndexOf("User 0:"));
line = grantedPerms.Split('\n');
int pos1 = 12;
int pos2 = 187;
for (int i=0; i< line.Length; i++)
{
if (line[i].Contains("android.permission."))
{
CheckBox chk = new CheckBox();
if (line[i].Contains("true"))
chk.Checked = true;
else
chk.Checked = false;
line[i] = line[i].Substring(0, line[i].IndexOf(": granted"));
line[i] = line[i].Substring(line[i].LastIndexOf(" "));
chk.Location = new System.Drawing.Point(pos1, pos2);
chk.Width = 420;
chk.Height = 17;
chk.Text = line[i];
chk.CheckedChanged += new EventHandler(CheckBox_Checked);
Controls.Add(chk);
pos2 += 20;
}
}
}
private void Form1_Load(object sender, EventArgs e)
private void CheckBox_Checked(object sender, EventArgs e)
{
if (Directory.Exists(adbPath)==false)
}
private async void changePermsBtn_Click(object sender, EventArgs e)
{
if (m_combo.Items.Count == 0)
{
MessageBox.Show("You need to have the adb folder in the same folder as this software");
Environment.Exit(600);
MessageBox.Show("Please select an app first");
return;
}
checkForUpdate();
string package = m_combo.SelectedItem.ToString().Remove(m_combo.SelectedItem.ToString().Length - 1);
foreach (Control c in Controls)
{
if ((c is CheckBox))
{
exit = false;
if (((CheckBox)c).Checked==true)
{
await Task.Run(() => changePerms(c, package, "grant"));
}
else
{
await Task.Run(() => changePerms(c, package, "revoke"));
}
}
}
notify("Changed Permissions");
}
void checkForUpdate()
private void changePerms(Control c, string package, string grant)
{
string localVersion = "0.1";
HttpClient client = new HttpClient();
string currentVersion = client.GetStringAsync("https://raw.githubusercontent.com/nerdunit/androidsideloader/master/version").Result;
currentVersion = currentVersion.Remove(currentVersion.Length - 1);
if (localVersion != currentVersion)
MessageBox.Show("Your version is outdated, the latest version is " + currentVersion + " you can download it from https://github.com/nerdunit/", "OUTDATED");
Thread t1 = new Thread(() =>
{
runAdbCommand("shell pm " + grant + " " + package + " " + c.Text);
});
t1.IsBackground = true;
t1.Start();
t1.Join();
}
private void launchApkButton_Click(object sender, EventArgs e)
{
exit = false;
Thread t1 = new Thread(() =>
{
runAdbCommand("shell am start -n " + launchPackageTextBox.Text);
});
t1.IsBackground = true;
t1.Start();
}
private bool checkForDevice()
{
return true;
}
private async void uninstallAppButton_Click(object sender, EventArgs e)
{
if (m_combo.Items.Count == 0)
{
MessageBox.Show("Please select an app first");
return;
}
allText = "";
string package = m_combo.SelectedItem.ToString().Remove(m_combo.SelectedItem.ToString().Length - 1);
DialogResult dialogResult = MessageBox.Show("Are you sure you want to uninstall " + package + " this CANNOT be undone!", "WARNING!", MessageBoxButtons.YesNo);
if (dialogResult != DialogResult.Yes)
return;
await Task.Run(() => uninstallPackage(package));
notify(allText);
}
private void uninstallPackage(string package)
{
Thread t1 = new Thread(() =>
{
runAdbCommand("shell pm uninstall -k --user 0 " + package);
});
t1.IsBackground = true;
t1.Start();
t1.Join();
}
private void comboBox1_SelectionChangeCommitted(object sender, EventArgs e)
{
MethodItem mi = (MethodItem)m_combo.SelectedItem;
m_combo.MatchingMethod = mi.Value;
}
private async void sideloadFolderButton_Click(object sender, EventArgs e)
{
var dialog = new FolderSelectDialog
{
Title = "Select your folder with APKs"
};
if (dialog.Show(Handle))
{
string[] files = Directory.GetFiles(dialog.FileName);
foreach (string file in files)
{
await Task.Run(() => sideload(file));
}
}
else return;
notify("Done Mass Sideloading");
}
private void aboutBtn_Click(object sender, EventArgs e)
{
string about = @" - The icon of the app contains an icon made by icon8.com
- Software orignally coded by rookie.lol#7897
- Thanks to https://stackoverflow.com/users/57611/erike for the folder browser dialog code
- Thanks to Serge Weinstock for developing SergeUtils, it is used to search the combo box";
MessageBox.Show(about);
}
/*Progress bar stuff
*
*/
DispatcherTimer Timer99 = new DispatcherTimer();
public PerformanceCounter myCounter =
new PerformanceCounter("PhysicalDisk", "Disk Read Bytes/sec", "_Total");
public PerformanceCounter myCounter2 =
new PerformanceCounter("PhysicalDisk", "Disk Write Bytes/sec", "_Total");
public Int32 j = 0;
public Int32 k = 0;
public void Timer99_Tick(System.Object sender, System.EventArgs e)
{
//Console.Clear();
j = Convert.ToInt32(myCounter.NextValue());
j = j / 1024;
k = Convert.ToInt32(myCounter2.NextValue());
k = k / 1024;
try { progressBar.Value += k*10; } catch { progressBar.Maximum = 100; progressBar.Value = 90; Timer99.Stop(); } //fake progress bar, for some reason performance counters are retarded or i am
//Console.WriteLine(j);
label.Text = "Read " + j.ToString();
label1.Text = "Write " + k.ToString();
}
private void userjsonButton_Click(object sender, EventArgs e)
{
usernameForm usernameForm1 = new usernameForm();
usernameForm1.Show();
}
}
public class MethodItem
{
public string Name { get; set; }
public StringMatchingMethod Value { get; set; }
}
}

1788
Form1.resx

File diff suppressed because it is too large Load Diff

View File

@@ -16,6 +16,7 @@ namespace AndroidSideloader
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}

55
README.md Normal file
View File

@@ -0,0 +1,55 @@
# androidsideloader
Changelog
0.8.5
- Added auto update download
- Fixed a bug where if you didn't have the adb folder it would crash
0.8
- Every command now shows progress on title bar
- Automatically run Adb Devices and List Apps on form startup
- You can now search the App List Combo Box
- Cleaned some code
0.7
- Fixed UI Freezes
- Added Uninstall APK Button
- Added Launch package Button
- Removed loading bar
0.6
- Added List Apk Perms button
- Added Change Permissions button
- Added dinamically added checkbox for permisssions
- The software now downloads adb from master instead of v0.3 release
0.5
- Removed Flash Firmware
- Redesigned UI
- Reworked RunAdbCommand function (now it will be possible to do stuff I wasnt able to do before)
- Replaced Ui Buttons, still needs work
- Added List apk button
- Added List apk combo box
- Added get apk function
- Cleaned a bit of code
0.4
- Added auto download of adb archive
- Added auto extraction of adb archive
0.3
- Added new form, you can run custom adb commands now
- Added recover and backup app data
- Removed Select APK and Select OBB Buttons
- Removed tooltips from removed buttons
- Sideload APK and Copy Obb buttons now also make you select the file/folder
- Improved firmware button
0.2
- Added Flash Firmware button
- Added few tooltips
- Renamed buttons
0.1
- Initial Release

131
SelectFolder.cs Normal file
View File

@@ -0,0 +1,131 @@
using System;
using System.Reflection;
using System.Windows.Forms;
namespace AndroidSideloader
{
/// <summary>
/// Present the Windows Vista-style open file dialog to select a folder. Fall back for older Windows Versions
/// </summary>
public class FolderSelectDialog
{
private string _initialDirectory;
private string _title;
private string _fileName = "";
public string InitialDirectory
{
get { return string.IsNullOrEmpty(_initialDirectory) ? Environment.CurrentDirectory : _initialDirectory; }
set { _initialDirectory = value; }
}
public string Title
{
get { return _title ?? "Select a folder"; }
set { _title = value; }
}
public string FileName { get { return _fileName; } }
public bool Show() { return Show(IntPtr.Zero); }
/// <param name="hWndOwner">Handle of the control or window to be the parent of the file dialog</param>
/// <returns>true if the user clicks OK</returns>
public bool Show(IntPtr hWndOwner)
{
var result = Environment.OSVersion.Version.Major >= 6
? VistaDialog.Show(hWndOwner, InitialDirectory, Title)
: ShowXpDialog(hWndOwner, InitialDirectory, Title);
_fileName = result.FileName;
return result.Result;
}
private struct ShowDialogResult
{
public bool Result { get; set; }
public string FileName { get; set; }
}
private static ShowDialogResult ShowXpDialog(IntPtr ownerHandle, string initialDirectory, string title)
{
var folderBrowserDialog = new FolderBrowserDialog
{
Description = title,
SelectedPath = initialDirectory,
ShowNewFolderButton = false
};
var dialogResult = new ShowDialogResult();
if (folderBrowserDialog.ShowDialog(new WindowWrapper(ownerHandle)) == DialogResult.OK)
{
dialogResult.Result = true;
dialogResult.FileName = folderBrowserDialog.SelectedPath;
}
return dialogResult;
}
private static class VistaDialog
{
private const string c_foldersFilter = "Folders|\n";
private const BindingFlags c_flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
private readonly static Assembly s_windowsFormsAssembly = typeof(FileDialog).Assembly;
private readonly static Type s_iFileDialogType = s_windowsFormsAssembly.GetType("System.Windows.Forms.FileDialogNative+IFileDialog");
private readonly static MethodInfo s_createVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("CreateVistaDialog", c_flags);
private readonly static MethodInfo s_onBeforeVistaDialogMethodInfo = typeof(OpenFileDialog).GetMethod("OnBeforeVistaDialog", c_flags);
private readonly static MethodInfo s_getOptionsMethodInfo = typeof(FileDialog).GetMethod("GetOptions", c_flags);
private readonly static MethodInfo s_setOptionsMethodInfo = s_iFileDialogType.GetMethod("SetOptions", c_flags);
private readonly static uint s_fosPickFoldersBitFlag = (uint)s_windowsFormsAssembly
.GetType("System.Windows.Forms.FileDialogNative+FOS")
.GetField("FOS_PICKFOLDERS")
.GetValue(null);
private readonly static ConstructorInfo s_vistaDialogEventsConstructorInfo = s_windowsFormsAssembly
.GetType("System.Windows.Forms.FileDialog+VistaDialogEvents")
.GetConstructor(c_flags, null, new[] { typeof(FileDialog) }, null);
private readonly static MethodInfo s_adviseMethodInfo = s_iFileDialogType.GetMethod("Advise");
private readonly static MethodInfo s_unAdviseMethodInfo = s_iFileDialogType.GetMethod("Unadvise");
private readonly static MethodInfo s_showMethodInfo = s_iFileDialogType.GetMethod("Show");
public static ShowDialogResult Show(IntPtr ownerHandle, string initialDirectory, string title)
{
var openFileDialog = new OpenFileDialog
{
AddExtension = false,
CheckFileExists = false,
DereferenceLinks = true,
Filter = c_foldersFilter,
InitialDirectory = initialDirectory,
Multiselect = false,
Title = title
};
var iFileDialog = s_createVistaDialogMethodInfo.Invoke(openFileDialog, new object[] { });
s_onBeforeVistaDialogMethodInfo.Invoke(openFileDialog, new[] { iFileDialog });
s_setOptionsMethodInfo.Invoke(iFileDialog, new object[] { (uint)s_getOptionsMethodInfo.Invoke(openFileDialog, new object[] { }) | s_fosPickFoldersBitFlag });
var adviseParametersWithOutputConnectionToken = new[] { s_vistaDialogEventsConstructorInfo.Invoke(new object[] { openFileDialog }), 0U };
s_adviseMethodInfo.Invoke(iFileDialog, adviseParametersWithOutputConnectionToken);
try
{
int retVal = (int)s_showMethodInfo.Invoke(iFileDialog, new object[] { ownerHandle });
return new ShowDialogResult
{
Result = retVal == 0,
FileName = openFileDialog.FileName
};
}
finally
{
s_unAdviseMethodInfo.Invoke(iFileDialog, new[] { adviseParametersWithOutputConnectionToken[1] });
}
}
}
// Wrap an IWin32Window around an IntPtr
private class WindowWrapper : IWin32Window
{
private readonly IntPtr _handle;
public WindowWrapper(IntPtr handle) { _handle = handle; }
public IntPtr Handle { get { return _handle; } }
}
}
}

BIN
SergeUtils.dll Normal file

Binary file not shown.

BIN
adb.7z Normal file

Binary file not shown.

85
customAdbCommandForm.Designer.cs generated Normal file
View File

@@ -0,0 +1,85 @@
namespace AndroidSideloader
{
partial class customAdbCommandForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.runcustomadbcmdbutton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(13, 13);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(775, 20);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "Enter your command here";
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(13, 39);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(775, 365);
this.richTextBox1.TabIndex = 1;
this.richTextBox1.Text = "";
this.richTextBox1.TextChanged += new System.EventHandler(this.richTextBox1_TextChanged);
//
// runcustomadbcmdbutton
//
this.runcustomadbcmdbutton.Location = new System.Drawing.Point(13, 410);
this.runcustomadbcmdbutton.Name = "runcustomadbcmdbutton";
this.runcustomadbcmdbutton.Size = new System.Drawing.Size(93, 28);
this.runcustomadbcmdbutton.TabIndex = 2;
this.runcustomadbcmdbutton.Text = "Run";
this.runcustomadbcmdbutton.UseVisualStyleBackColor = true;
this.runcustomadbcmdbutton.Click += new System.EventHandler(this.runcustomadbcmdbutton_Click);
//
// customAdbCommandForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.runcustomadbcmdbutton);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.textBox1);
this.Name = "customAdbCommandForm";
this.Text = "customAdbCommandForm";
this.Load += new System.EventHandler(this.customAdbCommandForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Button runcustomadbcmdbutton;
}
}

66
customAdbCommandForm.cs Normal file
View File

@@ -0,0 +1,66 @@
using System;
using System.Diagnostics;
using System.Windows.Forms;
using System.IO;
using System.Threading;
using System.Windows;
using System.Net.Http;
using System.Reflection;
namespace AndroidSideloader
{
public partial class customAdbCommandForm : Form
{
public customAdbCommandForm()
{
InitializeComponent();
}
string output;
private void runcustomadbcmdbutton_Click(object sender, EventArgs e)
{
var command = textBox1.Text;
if (command.StartsWith("adb "))
command = command.Remove(0, 4);
runAdbCommand(command);
}
public void runAdbCommand(string command)
{
Process cmd = new Process();
cmd.StartInfo.FileName = Environment.CurrentDirectory + "\\adb\\adb.exe";
cmd.StartInfo.Arguments = command;
cmd.StartInfo.RedirectStandardInput = true;
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.CreateNoWindow = true;
cmd.StartInfo.UseShellExecute = false;
cmd.StartInfo.WorkingDirectory = Environment.CurrentDirectory + "\\adb\\";
cmd.Start();
cmd.StandardInput.WriteLine(command);
cmd.StandardInput.Flush();
cmd.StandardInput.Close();
output = cmd.StandardOutput.ReadToEnd();
cmd.WaitForExit();
StreamWriter sw = File.AppendText("debugC.log");
sw.Write("Action name = " + command + '\n');
sw.Write(output);
sw.Write("\n--------------------------------------------------------------------\n");
sw.Flush();
sw.Close();
richTextBox1.Text = output;
}
private void customAdbCommandForm_Load(object sender, EventArgs e)
{
}
private void richTextBox1_TextChanged(object sender, EventArgs e)
{
}
}
}

120
customAdbCommandForm.resx Normal file
View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

BIN
icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

5
packages.config Normal file
View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="4.1.0" targetFramework="net452" />
<package id="Fody" version="6.0.0" targetFramework="net452" developmentDependency="true" />
</packages>

Binary file not shown.

View File

@@ -0,0 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<WeaverFiles Include="$(MsBuildThisFileDirectory)..\weaver\$(MSBuildThisFileName).dll" />
</ItemGroup>
</Project>

Binary file not shown.

View File

@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Costura</name>
</assembly>
<members>
<member name="T:CosturaUtility">
<summary>
Contains methods for interacting with the Costura system.
</summary>
</member>
<member name="M:CosturaUtility.Initialize">
<summary>
Call this to Initialize the Costura system.
</summary>
</member>
</members>
</doc>

Binary file not shown.

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8" ?>
<xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>

BIN
packages/Fody.6.0.0/Fody.6.0.0.nupkg vendored Normal file

Binary file not shown.

110
packages/Fody.6.0.0/build/Fody.targets vendored Normal file
View File

@@ -0,0 +1,110 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectWeaverXml Condition="$(ProjectWeaverXml) == ''">$(ProjectDir)FodyWeavers.xml</ProjectWeaverXml>
<FodyPath Condition="$(FodyPath) == ''">$(MSBuildThisFileDirectory)..\</FodyPath>
<FodyAssemblyDirectory Condition="$(MSBuildRuntimeType) == 'Core'">$(FodyPath)netstandardtask</FodyAssemblyDirectory>
<FodyAssemblyDirectory Condition="$(MSBuildRuntimeType) != 'Core'">$(FodyPath)netclassictask</FodyAssemblyDirectory>
<FodyAssembly Condition="$(FodyAssembly) == ''">$(FodyAssemblyDirectory)\Fody.dll</FodyAssembly>
<DefaultItemExcludes>$(DefaultItemExcludes);FodyWeavers.xsd</DefaultItemExcludes>
<FodyGenerateXsd Condition="$(FodyGenerateXsd) == ''">true</FodyGenerateXsd>
<MsBuildMajorVersion>15</MsBuildMajorVersion>
<MsBuildMajorVersion Condition="'$(MSBuildVersion)' != ''">$([System.Version]::Parse($(MSBuildVersion)).Major)</MsBuildMajorVersion>
</PropertyGroup>
<ItemGroup Condition="Exists($(ProjectWeaverXml))">
<UpToDateCheckInput Include="$(ProjectWeaverXml)" />
<CustomAdditionalCompileInputs Include="$(ProjectWeaverXml)" />
</ItemGroup>
<!-- Support for NCrunch -->
<ItemGroup Condition="'$(NCrunch)' == '1' and '$(TargetFramework)' == '' and '$(TargetFrameworks)' == ''">
<None Include="$(FodyAssemblyDirectory)\*.*" />
<None Include="@(WeaverFiles)" />
</ItemGroup>
<UsingTask TaskName="Fody.WeavingTask" AssemblyFile="$(FodyAssembly)" />
<UsingTask TaskName="Fody.UpdateReferenceCopyLocalTask" AssemblyFile="$(FodyAssembly)" />
<UsingTask TaskName="Fody.VerifyTask" AssemblyFile="$(FodyAssembly)" />
<Target
Name="FodyTarget"
AfterTargets="AfterCompile"
Condition="Exists(@(IntermediateAssembly)) And $(DesignTimeBuild) != true And $(DisableFody) != true"
DependsOnTargets="$(FodyDependsOnTargets)"
Inputs="@(IntermediateAssembly);$(ProjectWeaverXml)"
Outputs="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache">
<Error Condition="($(MsBuildMajorVersion) &lt; 16)"
Text="Fody is only supported on MSBuild 16 and above. Current version: $(MsBuildMajorVersion)." />
<Fody.WeavingTask
AssemblyFile="@(IntermediateAssembly)"
IntermediateDirectory="$(ProjectDir)$(IntermediateOutputPath)"
KeyOriginatorFile="$(KeyOriginatorFile)"
AssemblyOriginatorKeyFile="$(AssemblyOriginatorKeyFile)"
ProjectDirectory="$(MSBuildProjectDirectory)"
ProjectFile="$(MSBuildProjectFullPath)"
SolutionDirectory="$(SolutionDir)"
References="@(ReferencePath)"
SignAssembly="$(SignAssembly)"
ReferenceCopyLocalFiles="@(ReferenceCopyLocalPaths)"
DefineConstants="$(DefineConstants)"
DebugType="$(DebugType)"
DocumentationFile="@(DocFileItem->'%(FullPath)')"
WeaverFiles="@(WeaverFiles)"
NCrunchOriginalSolutionDirectory="$(NCrunchOriginalSolutionDir)"
IntermediateCopyLocalFilesCache="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache"
GenerateXsd="$(FodyGenerateXsd)"
>
<Output
TaskParameter="ExecutedWeavers"
PropertyName="FodyExecutedWeavers" />
</Fody.WeavingTask>
<ItemGroup>
<FileWrites Include="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache" />
</ItemGroup>
</Target>
<Target
Name="FodyUpdateCopyLocalFilesTarget"
AfterTargets="FodyTarget"
>
<Fody.UpdateReferenceCopyLocalTask
ReferenceCopyLocalFiles="@(ReferenceCopyLocalPaths)"
IntermediateCopyLocalFilesCache="$(IntermediateOutputPath)$(MSBuildProjectFile).Fody.CopyLocal.cache"
>
<Output
TaskParameter="UpdatedReferenceCopyLocalFiles"
ItemName="FodyUpdatedReferenceCopyLocalPaths" />
</Fody.UpdateReferenceCopyLocalTask>
<ItemGroup>
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" />
<ReferenceCopyLocalPaths Include="@(FodyUpdatedReferenceCopyLocalPaths)" />
</ItemGroup>
</Target>
<Target
Name="FodyVerifyTarget"
AfterTargets="AfterBuild"
Condition="'$(NCrunch)' != '1' And $(FodyExecutedWeavers) != '' And $(DisableFody) != true"
DependsOnTargets="$(FodyVerifyDependsOnTargets)">
<Fody.VerifyTask
ProjectDirectory="$(MSBuildProjectDirectory)"
TargetPath="$(TargetPath)"
SolutionDirectory="$(SolutionDir)"
DefineConstants="$(DefineConstants)"
NCrunchOriginalSolutionDirectory="$(NCrunchOriginalSolutionDir)"
/>
</Target>
</Project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

75
usernameForm.Designer.cs generated Normal file
View File

@@ -0,0 +1,75 @@
namespace AndroidSideloader
{
partial class usernameForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(13, 13);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(400, 20);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "Enter your username here";
//
// button1
//
this.button1.Location = new System.Drawing.Point(13, 39);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(400, 23);
this.button1.TabIndex = 1;
this.button1.Text = "Create User.Json";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// usernameForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(425, 74);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.MaximumSize = new System.Drawing.Size(441, 113);
this.MinimumSize = new System.Drawing.Size(441, 113);
this.Name = "usernameForm";
this.Text = "USER.JSON";
this.Load += new System.EventHandler(this.usernameForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
}
}

64
usernameForm.cs Normal file
View File

@@ -0,0 +1,64 @@
using System;
using System.Diagnostics;
using System.Windows.Forms;
using System.IO;
namespace AndroidSideloader
{
public partial class usernameForm : Form
{
public usernameForm()
{
InitializeComponent();
}
string defaultText;
private void usernameForm_Load(object sender, EventArgs e)
{
defaultText = textBox1.Text;
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text==defaultText || textBox1.Text.Length==0)
{
MessageBox.Show("Please enter your username first");
return;
}
File.WriteAllText("user.json", "{\"username\":\"" + textBox1.Text + "\"}");
string command = "push " + Environment.CurrentDirectory + "\\user.json " + " /sdcard/";
Process cmd = new Process();
cmd.StartInfo.FileName = Environment.CurrentDirectory + "\\adb\\adb.exe";
cmd.StartInfo.Arguments = command;
cmd.StartInfo.RedirectStandardInput = true;
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.CreateNoWindow = true;
cmd.StartInfo.UseShellExecute = false;
cmd.StartInfo.WorkingDirectory = Form1.adbPath;
cmd.Start();
cmd.StandardInput.WriteLine(command);
cmd.StandardInput.Flush();
cmd.StandardInput.Close();
string allText = cmd.StandardOutput.ReadToEnd();
cmd.WaitForExit();
File.Delete("user.json");
StreamWriter sw = File.AppendText(Form1.debugPath);
sw.Write("Action name = " + command + '\n');
sw.Write(allText);
sw.Write("\n--------------------------------------------------------------------\n");
sw.Flush();
sw.Close();
Form1.notify(allText);
}
}
}

120
usernameForm.resx Normal file
View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1 +1 @@
0.1
0.8.5