├── .gitignore
├── APK Edit.sln
├── APK Edit
├── APK Edit.csproj
├── Android.ico
├── ApkFile.cs
├── AppSettings.cs
├── Program.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Resources
│ ├── Add_16.png
│ ├── Add_20.png
│ ├── Add_24.png
│ ├── Add_Clicked_16.png
│ ├── Add_Hover_16.png
│ ├── Add_Normal_16.png
│ ├── Android.ico
│ ├── Browse_16.png
│ ├── FileWarning_128.png
│ ├── Loading_64.gif
│ ├── Settings_16.png
│ ├── Translate_16.png
│ ├── mspaint_6404_16x16-32.png
│ ├── mspaint_6405_16x16-32.png
│ ├── mspaint_6406_16x16-32.png
│ ├── mspaint_6407_16x16-32.png
│ ├── mspaint_6408_16x16-32.png
│ ├── mspaint_6409_16x16-32.png
│ └── mspaint_6410_16x16-32.png
├── app.config
├── frmAddTranslation.Designer.cs
├── frmAddTranslation.cs
├── frmAddTranslation.resx
├── frmMain.Designer.cs
├── frmMain.cs
├── frmMain.resx
├── frmOptions.Designer.cs
├── frmOptions.cs
├── frmOptions.resx
├── frmTranslate.Designer.cs
├── frmTranslate.cs
└── frmTranslate.resx
├── README
├── Setup
└── Setup.vdproj
├── Test Apk Files
├── com.htc.WeatherWidget.apk
└── com.htc.resources.apk
└── Wrappers
├── Wrappers.Aapt
├── Aapt.cs
├── Aapt.csproj
├── Command.cs
├── PackageInfoType.cs
├── Properties
│ └── AssemblyInfo.cs
└── Tools
│ └── apktool
│ └── aapt.exe
├── Wrappers.Apktool
├── Apktool.cs
├── Apktool.csproj
├── Command.cs
├── Properties
│ └── AssemblyInfo.cs
└── Tools
│ └── apktool
│ └── apktool.jar
├── Wrappers.Java
├── Java.cs
├── Java.csproj
└── Properties
│ └── AssemblyInfo.cs
└── Wrappers.Signapk
├── Command.cs
├── Properties
└── AssemblyInfo.cs
├── Signapk.cs
├── Signapk.csproj
└── Tools
└── signapk
├── signapk.jar
├── testkey.pk8
└── testkey.x509.pem
/.gitignore:
--------------------------------------------------------------------------------
1 | #ignore thumbnails created by windows
2 | Thumbs.db
3 | #Ignore files build by Visual Studio
4 | *.obj
5 | *.pdb
6 | *.user
7 | *.aps
8 | *.pch
9 | *.vspscc
10 | *_i.c
11 | *_p.c
12 | *.ncb
13 | *.suo
14 | *.tlb
15 | *.tlh
16 | *.bak
17 | *.cache
18 | *.ilk
19 | *.log
20 | [Bb]in
21 | [Dd]ebug*/
22 | *.lib
23 | *.sbr
24 | obj/
25 | [Rr]elease*/
26 | _ReSharper*/
27 | [Tt]est[Rr]esult*
28 |
--------------------------------------------------------------------------------
/APK Edit.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "APK Edit", "APK Edit\APK Edit.csproj", "{ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}"
5 | EndProject
6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Wrappers", "Wrappers", "{FA8A6A90-4F55-49E2-8C51-27373FAEA55F}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aapt", "Wrappers\Wrappers.Aapt\Aapt.csproj", "{FD7D2FC3-7037-44B3-80FD-1798F3A15A96}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apktool", "Wrappers\Wrappers.Apktool\Apktool.csproj", "{1AAC66A7-C638-4B71-8A56-8725216E075C}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Java", "Wrappers\Wrappers.Java\Java.csproj", "{0277F2C6-EF61-4EC7-A17C-8CD0663C0258}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Signapk", "Wrappers\Wrappers.Signapk\Signapk.csproj", "{D8A98AC9-5E23-4282-9237-9AF81B8488CE}"
15 | EndProject
16 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DDA2A4E6-0C41-49AA-98FB-D531896DCDD7}"
17 | ProjectSection(SolutionItems) = preProject
18 | Test Apk Files\com.htc.resources.apk = Test Apk Files\com.htc.resources.apk
19 | Test Apk Files\com.htc.WeatherWidget.apk = Test Apk Files\com.htc.WeatherWidget.apk
20 | README = README
21 | EndProjectSection
22 | EndProject
23 | Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup", "Setup\Setup.vdproj", "{D67F38D2-561C-4569-8D94-4BCBA803EE93}"
24 | EndProject
25 | Global
26 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
27 | Debug|Any CPU = Debug|Any CPU
28 | Debug|Mixed Platforms = Debug|Mixed Platforms
29 | Debug|x86 = Debug|x86
30 | Release|Any CPU = Release|Any CPU
31 | Release|Mixed Platforms = Release|Mixed Platforms
32 | Release|x86 = Release|x86
33 | EndGlobalSection
34 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
35 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Debug|Any CPU.ActiveCfg = Debug|x86
36 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
37 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Debug|Mixed Platforms.Build.0 = Debug|x86
38 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Debug|x86.ActiveCfg = Debug|x86
39 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Debug|x86.Build.0 = Debug|x86
40 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Release|Any CPU.ActiveCfg = Release|x86
41 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Release|Mixed Platforms.ActiveCfg = Release|x86
42 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Release|Mixed Platforms.Build.0 = Release|x86
43 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Release|x86.ActiveCfg = Release|x86
44 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}.Release|x86.Build.0 = Release|x86
45 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Debug|Any CPU.Build.0 = Debug|Any CPU
47 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
48 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
49 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Debug|x86.ActiveCfg = Debug|Any CPU
50 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Release|Any CPU.ActiveCfg = Release|Any CPU
51 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Release|Any CPU.Build.0 = Release|Any CPU
52 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
53 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Release|Mixed Platforms.Build.0 = Release|Any CPU
54 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}.Release|x86.ActiveCfg = Release|Any CPU
55 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
56 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Debug|Any CPU.Build.0 = Debug|Any CPU
57 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
58 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
59 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Debug|x86.ActiveCfg = Debug|Any CPU
60 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Release|Any CPU.ActiveCfg = Release|Any CPU
61 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Release|Any CPU.Build.0 = Release|Any CPU
62 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
63 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
64 | {1AAC66A7-C638-4B71-8A56-8725216E075C}.Release|x86.ActiveCfg = Release|Any CPU
65 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
66 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Debug|Any CPU.Build.0 = Debug|Any CPU
67 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
68 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
69 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Debug|x86.ActiveCfg = Debug|Any CPU
70 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Release|Any CPU.ActiveCfg = Release|Any CPU
71 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Release|Any CPU.Build.0 = Release|Any CPU
72 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
73 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Release|Mixed Platforms.Build.0 = Release|Any CPU
74 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}.Release|x86.ActiveCfg = Release|Any CPU
75 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
76 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
77 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
78 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
79 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Debug|x86.ActiveCfg = Debug|Any CPU
80 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
81 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Release|Any CPU.Build.0 = Release|Any CPU
82 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
83 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
84 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}.Release|x86.ActiveCfg = Release|Any CPU
85 | {D67F38D2-561C-4569-8D94-4BCBA803EE93}.Debug|Any CPU.ActiveCfg = Debug
86 | {D67F38D2-561C-4569-8D94-4BCBA803EE93}.Debug|Mixed Platforms.ActiveCfg = Debug
87 | {D67F38D2-561C-4569-8D94-4BCBA803EE93}.Debug|x86.ActiveCfg = Debug
88 | {D67F38D2-561C-4569-8D94-4BCBA803EE93}.Release|Any CPU.ActiveCfg = Release
89 | {D67F38D2-561C-4569-8D94-4BCBA803EE93}.Release|Mixed Platforms.ActiveCfg = Release
90 | {D67F38D2-561C-4569-8D94-4BCBA803EE93}.Release|x86.ActiveCfg = Release
91 | EndGlobalSection
92 | GlobalSection(SolutionProperties) = preSolution
93 | HideSolutionNode = FALSE
94 | EndGlobalSection
95 | GlobalSection(NestedProjects) = preSolution
96 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96} = {FA8A6A90-4F55-49E2-8C51-27373FAEA55F}
97 | {1AAC66A7-C638-4B71-8A56-8725216E075C} = {FA8A6A90-4F55-49E2-8C51-27373FAEA55F}
98 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258} = {FA8A6A90-4F55-49E2-8C51-27373FAEA55F}
99 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE} = {FA8A6A90-4F55-49E2-8C51-27373FAEA55F}
100 | EndGlobalSection
101 | GlobalSection(SubversionScc) = preSolution
102 | Svn-Managed = True
103 | Manager = AnkhSVN - Subversion Support for Visual Studio
104 | EndGlobalSection
105 | EndGlobal
106 |
--------------------------------------------------------------------------------
/APK Edit/APK Edit.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | x86
6 | 8.0.30703
7 | 2.0
8 | {ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}
9 | WinExe
10 | Properties
11 | APK_Edit
12 | APK Edit
13 | v4.0
14 | Client
15 | 512
16 |
17 |
18 | x86
19 | true
20 | full
21 | false
22 | bin\Debug\
23 | DEBUG;TRACE
24 | prompt
25 | 4
26 |
27 |
28 | x86
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 |
36 |
37 | Android.ico
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | Form
56 |
57 |
58 | frmAddTranslation.cs
59 |
60 |
61 | Form
62 |
63 |
64 | frmMain.cs
65 |
66 |
67 | Form
68 |
69 |
70 | frmOptions.cs
71 |
72 |
73 | Form
74 |
75 |
76 | frmTranslate.cs
77 |
78 |
79 |
80 |
81 | frmAddTranslation.cs
82 |
83 |
84 | frmMain.cs
85 |
86 |
87 | frmOptions.cs
88 |
89 |
90 | frmTranslate.cs
91 |
92 |
93 | ResXFileCodeGenerator
94 | Resources.Designer.cs
95 | Designer
96 |
97 |
98 | True
99 | Resources.resx
100 | True
101 |
102 |
103 |
104 | SettingsSingleFileGenerator
105 | Settings.Designer.cs
106 |
107 |
108 | True
109 | Settings.settings
110 | True
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}
132 | Aapt
133 |
134 |
135 | {1AAC66A7-C638-4B71-8A56-8725216E075C}
136 | Apktool
137 |
138 |
139 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}
140 | Java
141 |
142 |
143 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}
144 | Signapk
145 |
146 |
147 |
148 |
155 |
--------------------------------------------------------------------------------
/APK Edit/Android.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Android.ico
--------------------------------------------------------------------------------
/APK Edit/ApkFile.cs:
--------------------------------------------------------------------------------
1 | namespace APK_Edit
2 | {
3 | using System;
4 | using System.ComponentModel;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Globalization;
8 | using System.IO;
9 | using System.Linq;
10 | using System.Windows.Forms;
11 | using System.Xml;
12 |
13 | using Wrappers;
14 |
15 | ///
16 | /// The apk file.
17 | ///
18 | internal class ApkFile
19 | {
20 | #region Constants and Fields
21 |
22 | private static readonly string ManifestFileName = TempPath + @"\AndroidManifest.xml";
23 | private static readonly string ApkToolYmlFileName = TempPath + @"\apktool.yml";
24 | private static readonly string StringsFileName = TempPath + @"\res\values\strings.xml";
25 |
26 | private readonly FileInfo fileInfo;
27 | private readonly Aapt.DumpResult aaptDump;
28 | private readonly string iconPath;
29 |
30 | private static string tempPath;
31 |
32 | private bool enableSigning = true;
33 | private bool createSeperateSigningFile = true;
34 | private bool enableBackup = true;
35 | private bool overWriteBackup = true;
36 | private string applicationName;
37 | private bool applicationNameInStringsXml;
38 | private string applicationNameAttribute;
39 | private Image defaultIcon;
40 | private bool isFrameworkApk;
41 | private bool isSystemApp;
42 |
43 | #endregion
44 |
45 | #region Constructors and Destructors
46 |
47 | public ApkFile()
48 | {
49 | this.fileInfo = OpenFile();
50 | this.aaptDump = Aapt.Dump(this.fileInfo);
51 | this.iconPath = TempPath + @"\" + this.aaptDump.application.icon.Replace('/', '\\');
52 | }
53 |
54 | ~ApkFile()
55 | {
56 | var path = new DirectoryInfo(TempPath);
57 |
58 | try
59 | {
60 | path.Delete(true);
61 | }
62 | catch (IOException)
63 | {
64 | // TODO - Handle IOException exception (Files in use, delete after reboot action)
65 | }
66 | }
67 |
68 | #endregion
69 |
70 | #region Delegates
71 |
72 | public delegate void DecompiledEventHandler();
73 |
74 | public delegate void DecompilingEventHandler();
75 |
76 | public delegate void FrameworkInstallingEventHandler();
77 |
78 | public delegate void FrameworkInstalledEventHandler();
79 |
80 | public delegate void FrameworkMissingEventHandler();
81 |
82 | public delegate void CompiledEventHandler();
83 |
84 | public delegate void CompilingEventHandler();
85 |
86 | #endregion
87 |
88 | #region Public Events
89 |
90 | public event DecompiledEventHandler Decompiled;
91 |
92 | public event DecompilingEventHandler Decompiling;
93 |
94 | public event FrameworkInstallingEventHandler FrameworkInstalling;
95 |
96 | public event FrameworkInstalledEventHandler FrameworkInstalled;
97 |
98 | public event FrameworkMissingEventHandler FrameworkMissing;
99 |
100 | public event DecompiledEventHandler Compiled;
101 |
102 | public event DecompilingEventHandler Compiling;
103 |
104 | #endregion
105 |
106 | #region Public Properties
107 |
108 | public static string TempPath
109 | {
110 | get
111 | {
112 | if (tempPath == null)
113 | {
114 | var di = new DirectoryInfo(Path.GetTempPath() + Path.GetRandomFileName());
115 | if (di.Exists)
116 | {
117 | di.Delete(true);
118 | }
119 |
120 | di.Create();
121 | tempPath = di.FullName;
122 | }
123 |
124 | return tempPath;
125 | }
126 | }
127 |
128 | public string ApplicationName
129 | {
130 | get
131 | {
132 | return this.applicationName ?? (this.applicationName = this.aaptDump.application.label);
133 | }
134 |
135 | set
136 | {
137 | // Save to xml file...
138 | var xmlDoc = new XmlDocument();
139 | xmlDoc.Load(this.applicationNameInStringsXml ? StringsFileName : ManifestFileName);
140 | if (this.applicationNameInStringsXml)
141 | {
142 | var elements = xmlDoc.SelectNodes("//resources/string");
143 | if (elements != null)
144 | {
145 | for (int i = 0; i < elements.Count; i++)
146 | {
147 | var xmlAttributeCollection = elements[i].Attributes;
148 | if (xmlAttributeCollection != null
149 | && xmlAttributeCollection["name"].Value == this.applicationNameAttribute)
150 | {
151 | elements[i].InnerText = value;
152 | }
153 | }
154 | }
155 | }
156 | else
157 | {
158 | var elements = xmlDoc.SelectSingleNode("//manifest/application");
159 | if (elements != null)
160 | {
161 | if (elements.Attributes != null)
162 | {
163 | var labelAttr = elements.Attributes["android:label"];
164 | labelAttr.Value = value;
165 | }
166 | }
167 | }
168 |
169 | xmlDoc.Save(StringsFileName);
170 | this.applicationName = value;
171 | }
172 | }
173 |
174 | public bool EnableSigning
175 | {
176 | get
177 | {
178 | return this.enableSigning;
179 | }
180 |
181 | set
182 | {
183 | this.enableSigning = value;
184 | }
185 | }
186 |
187 | public bool CreateSeperateSigningFile
188 | {
189 | get
190 | {
191 | return this.createSeperateSigningFile;
192 | }
193 |
194 | set
195 | {
196 | this.createSeperateSigningFile = value;
197 | }
198 | }
199 |
200 | public bool EnableBackup
201 | {
202 | get
203 | {
204 | return enableBackup;
205 | }
206 | set
207 | {
208 | enableBackup = value;
209 | }
210 | }
211 |
212 | public bool OverWriteBackup
213 | {
214 | get
215 | {
216 | return overWriteBackup;
217 | }
218 | set
219 | {
220 | overWriteBackup = value;
221 | }
222 | }
223 |
224 |
225 |
226 | #endregion
227 |
228 | #region Public Methods and Operators
229 |
230 | public void Decompile()
231 | {
232 | if (this.Decompiling != null)
233 | {
234 | this.Decompiling();
235 | }
236 |
237 | var decompile = new BackgroundWorker();
238 |
239 | decompile.DoWork += (sender, args) => args.Result = Apktool.Decode(this.fileInfo, new DirectoryInfo(TempPath));
240 |
241 | decompile.RunWorkerCompleted += (sender, args) =>
242 | {
243 | var result = (Apktool.Command.RunResult)args.Result;
244 | Trace.TraceInformation(result.Error);
245 | Trace.TraceInformation(result.Output);
246 |
247 | // Parse apktool.yml
248 | var fileApktoolYml = new FileInfo(ApkToolYmlFileName);
249 | if (fileApktoolYml.Exists)
250 | {
251 | string content = File.ReadAllText(fileApktoolYml.FullName);
252 | this.isFrameworkApk = content.Contains("isFrameworkApk: true");
253 | this.isSystemApp = content.Contains(" - 2");
254 | }
255 |
256 | // Update icon
257 | this.defaultIcon = ConvertToImage(this.iconPath);
258 |
259 | // Check ApplicationNameInStringsXml;
260 | var xmlFile = new XmlDocument();
261 | xmlFile.Load(ManifestFileName);
262 | var selectSingleNode = xmlFile.SelectSingleNode("//manifest/application");
263 | if (selectSingleNode != null)
264 | {
265 | if (selectSingleNode.Attributes != null)
266 | {
267 | var labelAttr = selectSingleNode.Attributes["android:label"];
268 | var labelValue = (labelAttr != null) ? labelAttr.Value.ToString(CultureInfo.InvariantCulture) : string.Empty;
269 |
270 | this.applicationNameInStringsXml = labelValue.StartsWith("@string");
271 | this.applicationNameAttribute = this.applicationNameInStringsXml ? labelValue.Replace("@string/", string.Empty) : string.Empty;
272 | }
273 | }
274 |
275 | if (result.Error.Contains("Could not decode file"))
276 | {
277 | throw new Exception("Could not decode file");
278 | }
279 |
280 | // Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info.
281 | if (result.Output.Contains("Can't find"))
282 | {
283 | if (this.FrameworkMissing != null)
284 | {
285 | this.FrameworkMissing();
286 | }
287 | }
288 | else
289 | {
290 | if (this.Decompiled != null)
291 | {
292 | this.Decompiled();
293 | }
294 | }
295 | };
296 | decompile.RunWorkerAsync();
297 | }
298 |
299 | public void InstallFramework(string fileName)
300 | {
301 | if (this.FrameworkInstalling != null)
302 | {
303 | this.FrameworkInstalling();
304 | }
305 |
306 | var installFramework = new BackgroundWorker();
307 |
308 | installFramework.DoWork += (sender, args) => args.Result = Apktool.InstallFramework(fileName);
309 |
310 | installFramework.RunWorkerCompleted += (sender, args) =>
311 | {
312 | var result = (Apktool.Command.RunResult)args.Result;
313 | Trace.TraceInformation(result.Error);
314 | Trace.TraceInformation(result.Output);
315 |
316 | if (this.FrameworkInstalled != null)
317 | {
318 | this.FrameworkInstalled();
319 | }
320 | };
321 | installFramework.RunWorkerAsync();
322 | }
323 |
324 | public void Compile()
325 | {
326 | if (this.Compiling != null)
327 | {
328 | this.Compiling();
329 | }
330 |
331 | // Backup file if needed
332 | if (this.enableBackup)
333 | {
334 | var backupFile = new FileInfo(this.fileInfo.FullName + ".backup");
335 |
336 | if (backupFile.Exists)
337 | {
338 | if (this.overWriteBackup)
339 | {
340 | backupFile.Delete();
341 | this.fileInfo.CopyTo(backupFile.FullName);
342 | }
343 | }
344 | else
345 | {
346 | this.fileInfo.CopyTo(backupFile.FullName);
347 | }
348 | }
349 |
350 | var compile = new BackgroundWorker();
351 | compile.DoWork += (sender, args) =>
352 | {
353 | var result = Apktool.Build(new DirectoryInfo(TempPath), this.fileInfo);
354 | Trace.TraceInformation(result.Error);
355 | Trace.TraceInformation(result.Output);
356 | if (this.enableSigning)
357 | {
358 | Signapk.Sign(this.fileInfo, !this.createSeperateSigningFile);
359 | }
360 | };
361 |
362 | compile.RunWorkerCompleted += (sender, args) =>
363 | {
364 | if (this.Compiled != null)
365 | {
366 | this.Compiled();
367 | }
368 | };
369 | compile.RunWorkerAsync();
370 | }
371 |
372 | public Image GetIcon()
373 | {
374 | return this.defaultIcon;
375 | }
376 |
377 | public Image SetIcon(string fileName)
378 | {
379 | File.Copy(fileName, this.iconPath, true);
380 | this.defaultIcon = ConvertToImage(this.iconPath);
381 | return this.defaultIcon;
382 | }
383 |
384 | #endregion
385 |
386 | #region Methods
387 |
388 | private static Image ConvertToImage(string fileName)
389 | {
390 | var icon = new FileInfo(fileName);
391 | return icon.Exists ? Image.FromStream(new MemoryStream(File.ReadAllBytes(icon.FullName))) : null;
392 | }
393 |
394 | private static FileInfo OpenFile()
395 | {
396 | FileInfo fileInfo = null;
397 | var args = Environment.GetCommandLineArgs();
398 | if (args.Count() == 1)
399 | {
400 | const string ApkFilter = "Android package files|*.apk";
401 | using (var openFileApk = new OpenFileDialog { Filter = ApkFilter })
402 | {
403 | if (openFileApk.ShowDialog() == DialogResult.OK)
404 | {
405 | fileInfo = new FileInfo(openFileApk.FileName);
406 | }
407 | }
408 | }
409 | else
410 | {
411 | fileInfo = new FileInfo(args[1]);
412 | }
413 |
414 | if (fileInfo == null || !fileInfo.Exists)
415 | {
416 | throw new FileNotFoundException(".apk file not found");
417 | }
418 |
419 | return fileInfo;
420 | }
421 |
422 | #endregion
423 | }
424 | }
--------------------------------------------------------------------------------
/APK Edit/AppSettings.cs:
--------------------------------------------------------------------------------
1 | namespace APK_Edit
2 | {
3 | using System.Globalization;
4 | using System.Windows.Forms;
5 |
6 | public class AppSettings
7 | {
8 | public static bool EnableBackup
9 | {
10 | get
11 | {
12 | bool? result = ReadConfigBool("EnableBackup");
13 | return result.HasValue ? result.Value : true;
14 | }
15 |
16 | set
17 | {
18 | WriteConfigBool("EnableBackup", value);
19 | }
20 | }
21 |
22 | public static bool OverWriteBackup
23 | {
24 | get
25 | {
26 | bool? result = ReadConfigBool("OverWriteBackup");
27 | return result.HasValue ? result.Value : false;
28 | }
29 |
30 | set
31 | {
32 | WriteConfigBool("OverWriteBackup", value);
33 | }
34 | }
35 |
36 | public static bool CreateSeperateSigningFile
37 | {
38 | get
39 | {
40 | bool? result = ReadConfigBool("CreateSeperateSigningFile");
41 | return result.HasValue ? result.Value : false;
42 | }
43 |
44 | set
45 | {
46 | WriteConfigBool("CreateSeperateSigningFile", value);
47 | }
48 | }
49 |
50 | public static bool EnableSigning
51 | {
52 | get
53 | {
54 | bool? result = ReadConfigBool("EnableSigning");
55 | return result.HasValue ? result.Value : true;
56 | }
57 |
58 | set
59 | {
60 | WriteConfigBool("EnableSigning", value);
61 | }
62 | }
63 |
64 | private static bool? ReadConfigBool(string key)
65 | {
66 | // Read registry
67 | if (Application.UserAppDataRegistry != null)
68 | {
69 | object registryValue = Application.UserAppDataRegistry.GetValue(key);
70 | if (registryValue != null)
71 | {
72 | bool tempBool;
73 | if (bool.TryParse(registryValue.ToString(), out tempBool))
74 | {
75 | return tempBool;
76 | }
77 | }
78 | }
79 |
80 | return null;
81 | }
82 |
83 | private static void WriteConfigBool(string key, bool value)
84 | {
85 | // Write registry
86 | if (Application.UserAppDataRegistry != null)
87 | {
88 | Application.UserAppDataRegistry.SetValue(key, value.ToString(CultureInfo.InvariantCulture));
89 | }
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/APK Edit/Program.cs:
--------------------------------------------------------------------------------
1 | namespace APK_Edit
2 | {
3 | using System;
4 | using System.Windows.Forms;
5 |
6 | static class Program
7 | {
8 | ///
9 | /// The main entry point for the application.
10 | ///
11 | [STAThread]
12 | static void Main()
13 | {
14 | Application.EnableVisualStyles();
15 | Application.SetCompatibleTextRenderingDefault(false);
16 | Application.Run(new frmMain());
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/APK Edit/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("APK Edit")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("APK Edit")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72958b95-0f6c-49d1-9e33-5d2d0880bc12")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/APK Edit/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.261
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace APK_Edit.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("APK_Edit.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | internal static System.Drawing.Bitmap Add_16 {
64 | get {
65 | object obj = ResourceManager.GetObject("Add_16", resourceCulture);
66 | return ((System.Drawing.Bitmap)(obj));
67 | }
68 | }
69 |
70 | internal static System.Drawing.Bitmap Add_Clicked_16 {
71 | get {
72 | object obj = ResourceManager.GetObject("Add_Clicked_16", resourceCulture);
73 | return ((System.Drawing.Bitmap)(obj));
74 | }
75 | }
76 |
77 | internal static System.Drawing.Bitmap Add_Hover_16 {
78 | get {
79 | object obj = ResourceManager.GetObject("Add_Hover_16", resourceCulture);
80 | return ((System.Drawing.Bitmap)(obj));
81 | }
82 | }
83 |
84 | internal static System.Drawing.Bitmap Add_Normal_16 {
85 | get {
86 | object obj = ResourceManager.GetObject("Add_Normal_16", resourceCulture);
87 | return ((System.Drawing.Bitmap)(obj));
88 | }
89 | }
90 |
91 | internal static System.Drawing.Bitmap Browse_16 {
92 | get {
93 | object obj = ResourceManager.GetObject("Browse_16", resourceCulture);
94 | return ((System.Drawing.Bitmap)(obj));
95 | }
96 | }
97 |
98 | internal static System.Drawing.Bitmap FileWarning_128 {
99 | get {
100 | object obj = ResourceManager.GetObject("FileWarning_128", resourceCulture);
101 | return ((System.Drawing.Bitmap)(obj));
102 | }
103 | }
104 |
105 | internal static System.Drawing.Bitmap Loading_64 {
106 | get {
107 | object obj = ResourceManager.GetObject("Loading_64", resourceCulture);
108 | return ((System.Drawing.Bitmap)(obj));
109 | }
110 | }
111 |
112 | internal static System.Drawing.Bitmap Settings_16 {
113 | get {
114 | object obj = ResourceManager.GetObject("Settings_16", resourceCulture);
115 | return ((System.Drawing.Bitmap)(obj));
116 | }
117 | }
118 |
119 | internal static System.Drawing.Bitmap Translate_16 {
120 | get {
121 | object obj = ResourceManager.GetObject("Translate_16", resourceCulture);
122 | return ((System.Drawing.Bitmap)(obj));
123 | }
124 | }
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/APK Edit/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\Add_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\Add_Clicked_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\Resources\Add_Hover_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | ..\Resources\Add_Normal_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
134 | ..\Resources\Browse_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
135 |
136 |
137 | ..\Resources\FileWarning_128.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
138 |
139 |
140 | ..\Resources\Loading_64.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
141 |
142 |
143 | ..\Resources\Settings_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
144 |
145 |
146 | ..\Resources\Translate_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
147 |
148 |
--------------------------------------------------------------------------------
/APK Edit/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.239
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace APK_Edit.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/APK Edit/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/APK Edit/Resources/Add_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Add_16.png
--------------------------------------------------------------------------------
/APK Edit/Resources/Add_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Add_20.png
--------------------------------------------------------------------------------
/APK Edit/Resources/Add_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Add_24.png
--------------------------------------------------------------------------------
/APK Edit/Resources/Add_Clicked_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Add_Clicked_16.png
--------------------------------------------------------------------------------
/APK Edit/Resources/Add_Hover_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Add_Hover_16.png
--------------------------------------------------------------------------------
/APK Edit/Resources/Add_Normal_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Add_Normal_16.png
--------------------------------------------------------------------------------
/APK Edit/Resources/Android.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Android.ico
--------------------------------------------------------------------------------
/APK Edit/Resources/Browse_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Browse_16.png
--------------------------------------------------------------------------------
/APK Edit/Resources/FileWarning_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/FileWarning_128.png
--------------------------------------------------------------------------------
/APK Edit/Resources/Loading_64.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Loading_64.gif
--------------------------------------------------------------------------------
/APK Edit/Resources/Settings_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Settings_16.png
--------------------------------------------------------------------------------
/APK Edit/Resources/Translate_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/Translate_16.png
--------------------------------------------------------------------------------
/APK Edit/Resources/mspaint_6404_16x16-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/mspaint_6404_16x16-32.png
--------------------------------------------------------------------------------
/APK Edit/Resources/mspaint_6405_16x16-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/mspaint_6405_16x16-32.png
--------------------------------------------------------------------------------
/APK Edit/Resources/mspaint_6406_16x16-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/mspaint_6406_16x16-32.png
--------------------------------------------------------------------------------
/APK Edit/Resources/mspaint_6407_16x16-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/mspaint_6407_16x16-32.png
--------------------------------------------------------------------------------
/APK Edit/Resources/mspaint_6408_16x16-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/mspaint_6408_16x16-32.png
--------------------------------------------------------------------------------
/APK Edit/Resources/mspaint_6409_16x16-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/mspaint_6409_16x16-32.png
--------------------------------------------------------------------------------
/APK Edit/Resources/mspaint_6410_16x16-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/APK Edit/Resources/mspaint_6410_16x16-32.png
--------------------------------------------------------------------------------
/APK Edit/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/APK Edit/frmAddTranslation.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace APK_Edit
2 | {
3 | partial class frmAddTranslation
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAddTranslation));
32 | this.comboBox1 = new System.Windows.Forms.ComboBox();
33 | this.buttonOK = new System.Windows.Forms.Button();
34 | this.SuspendLayout();
35 | //
36 | // comboBox1
37 | //
38 | this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
39 | | System.Windows.Forms.AnchorStyles.Right)));
40 | this.comboBox1.FormattingEnabled = true;
41 | this.comboBox1.Location = new System.Drawing.Point(13, 13);
42 | this.comboBox1.Name = "comboBox1";
43 | this.comboBox1.Size = new System.Drawing.Size(198, 21);
44 | this.comboBox1.TabIndex = 0;
45 | //
46 | // buttonOK
47 | //
48 | this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
49 | this.buttonOK.Location = new System.Drawing.Point(217, 11);
50 | this.buttonOK.Name = "buttonOK";
51 | this.buttonOK.Size = new System.Drawing.Size(75, 23);
52 | this.buttonOK.TabIndex = 1;
53 | this.buttonOK.Text = "OK";
54 | this.buttonOK.UseVisualStyleBackColor = true;
55 | //
56 | // frmAddTranslation
57 | //
58 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
59 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
60 | this.ClientSize = new System.Drawing.Size(304, 46);
61 | this.Controls.Add(this.buttonOK);
62 | this.Controls.Add(this.comboBox1);
63 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
64 | this.MaximizeBox = false;
65 | this.MaximumSize = new System.Drawing.Size(870, 84);
66 | this.MinimizeBox = false;
67 | this.MinimumSize = new System.Drawing.Size(320, 84);
68 | this.Name = "frmAddTranslation";
69 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
70 | this.Text = "Choose Country";
71 | this.ResumeLayout(false);
72 |
73 | }
74 |
75 | #endregion
76 |
77 | private System.Windows.Forms.ComboBox comboBox1;
78 | private System.Windows.Forms.Button buttonOK;
79 | }
80 | }
--------------------------------------------------------------------------------
/APK Edit/frmAddTranslation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace APK_Edit
11 | {
12 | public partial class frmAddTranslation : Form
13 | {
14 | public frmAddTranslation()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/APK Edit/frmMain.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace APK_Edit
2 | {
3 | partial class frmMain
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
33 | this.btnApply = new System.Windows.Forms.Button();
34 | this.btnCancel = new System.Windows.Forms.Button();
35 | this.btnOK = new System.Windows.Forms.Button();
36 | this.tabControlMain = new System.Windows.Forms.TabControl();
37 | this.tabPageGeneral = new System.Windows.Forms.TabPage();
38 | this.pictureBoxBrowse = new System.Windows.Forms.PictureBox();
39 | this.pictureBoxTranslate = new System.Windows.Forms.PictureBox();
40 | this.pictureBoxSettings = new System.Windows.Forms.PictureBox();
41 | this.pictureBoxStatus = new System.Windows.Forms.PictureBox();
42 | this.labelStatus = new System.Windows.Forms.Label();
43 | this.pictureBoxHDPI = new System.Windows.Forms.PictureBox();
44 | this.textBoxName = new System.Windows.Forms.TextBox();
45 | this.labelIcons = new System.Windows.Forms.Label();
46 | this.labelName = new System.Windows.Forms.Label();
47 | this.tabPageDetails = new System.Windows.Forms.TabPage();
48 | this.labelApkToolVersion = new System.Windows.Forms.Label();
49 | this.labelApkToolVersionLabel = new System.Windows.Forms.Label();
50 | this.openFileDialogIcon = new System.Windows.Forms.OpenFileDialog();
51 | this.openFileDialogFramework = new System.Windows.Forms.OpenFileDialog();
52 | this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
53 | this.tabControlMain.SuspendLayout();
54 | this.tabPageGeneral.SuspendLayout();
55 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBrowse)).BeginInit();
56 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTranslate)).BeginInit();
57 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxSettings)).BeginInit();
58 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxStatus)).BeginInit();
59 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxHDPI)).BeginInit();
60 | this.tabPageDetails.SuspendLayout();
61 | this.SuspendLayout();
62 | //
63 | // btnApply
64 | //
65 | this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
66 | this.btnApply.Enabled = false;
67 | this.btnApply.Location = new System.Drawing.Point(279, 447);
68 | this.btnApply.Name = "btnApply";
69 | this.btnApply.Size = new System.Drawing.Size(75, 23);
70 | this.btnApply.TabIndex = 20;
71 | this.btnApply.Text = "Apply";
72 | this.btnApply.UseVisualStyleBackColor = true;
73 | this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
74 | //
75 | // btnCancel
76 | //
77 | this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
78 | this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
79 | this.btnCancel.Enabled = false;
80 | this.btnCancel.Location = new System.Drawing.Point(198, 447);
81 | this.btnCancel.Name = "btnCancel";
82 | this.btnCancel.Size = new System.Drawing.Size(75, 23);
83 | this.btnCancel.TabIndex = 19;
84 | this.btnCancel.Text = "Cancel";
85 | this.btnCancel.UseVisualStyleBackColor = true;
86 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
87 | //
88 | // btnOK
89 | //
90 | this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
91 | this.btnOK.Enabled = false;
92 | this.btnOK.Location = new System.Drawing.Point(117, 447);
93 | this.btnOK.Name = "btnOK";
94 | this.btnOK.Size = new System.Drawing.Size(75, 23);
95 | this.btnOK.TabIndex = 17;
96 | this.btnOK.Text = "OK";
97 | this.btnOK.UseVisualStyleBackColor = true;
98 | this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
99 | //
100 | // tabControlMain
101 | //
102 | this.tabControlMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
103 | | System.Windows.Forms.AnchorStyles.Left)
104 | | System.Windows.Forms.AnchorStyles.Right)));
105 | this.tabControlMain.Controls.Add(this.tabPageGeneral);
106 | this.tabControlMain.Controls.Add(this.tabPageDetails);
107 | this.tabControlMain.Location = new System.Drawing.Point(7, 7);
108 | this.tabControlMain.Name = "tabControlMain";
109 | this.tabControlMain.SelectedIndex = 0;
110 | this.tabControlMain.Size = new System.Drawing.Size(347, 434);
111 | this.tabControlMain.TabIndex = 21;
112 | //
113 | // tabPageGeneral
114 | //
115 | this.tabPageGeneral.Controls.Add(this.pictureBoxBrowse);
116 | this.tabPageGeneral.Controls.Add(this.pictureBoxTranslate);
117 | this.tabPageGeneral.Controls.Add(this.pictureBoxSettings);
118 | this.tabPageGeneral.Controls.Add(this.pictureBoxStatus);
119 | this.tabPageGeneral.Controls.Add(this.labelStatus);
120 | this.tabPageGeneral.Controls.Add(this.pictureBoxHDPI);
121 | this.tabPageGeneral.Controls.Add(this.textBoxName);
122 | this.tabPageGeneral.Controls.Add(this.labelIcons);
123 | this.tabPageGeneral.Controls.Add(this.labelName);
124 | this.tabPageGeneral.Location = new System.Drawing.Point(4, 22);
125 | this.tabPageGeneral.Name = "tabPageGeneral";
126 | this.tabPageGeneral.Padding = new System.Windows.Forms.Padding(3);
127 | this.tabPageGeneral.Size = new System.Drawing.Size(339, 408);
128 | this.tabPageGeneral.TabIndex = 0;
129 | this.tabPageGeneral.Text = "General";
130 | this.tabPageGeneral.UseVisualStyleBackColor = true;
131 | //
132 | // pictureBoxBrowse
133 | //
134 | this.pictureBoxBrowse.Cursor = System.Windows.Forms.Cursors.Hand;
135 | this.pictureBoxBrowse.Image = global::APK_Edit.Properties.Resources.Browse_16;
136 | this.pictureBoxBrowse.Location = new System.Drawing.Point(265, 376);
137 | this.pictureBoxBrowse.Name = "pictureBoxBrowse";
138 | this.pictureBoxBrowse.Size = new System.Drawing.Size(16, 16);
139 | this.pictureBoxBrowse.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
140 | this.pictureBoxBrowse.TabIndex = 29;
141 | this.pictureBoxBrowse.TabStop = false;
142 | this.toolTip1.SetToolTip(this.pictureBoxBrowse, "Browse");
143 | this.pictureBoxBrowse.Click += new System.EventHandler(this.pictureBoxBrowse_Click);
144 | //
145 | // pictureBoxTranslate
146 | //
147 | this.pictureBoxTranslate.Cursor = System.Windows.Forms.Cursors.Hand;
148 | this.pictureBoxTranslate.Image = global::APK_Edit.Properties.Resources.Translate_16;
149 | this.pictureBoxTranslate.Location = new System.Drawing.Point(287, 376);
150 | this.pictureBoxTranslate.Name = "pictureBoxTranslate";
151 | this.pictureBoxTranslate.Size = new System.Drawing.Size(16, 16);
152 | this.pictureBoxTranslate.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
153 | this.pictureBoxTranslate.TabIndex = 28;
154 | this.pictureBoxTranslate.TabStop = false;
155 | this.toolTip1.SetToolTip(this.pictureBoxTranslate, "Edit Translations");
156 | this.pictureBoxTranslate.Click += new System.EventHandler(this.pictureBoxTranslate_Click);
157 | //
158 | // pictureBoxSettings
159 | //
160 | this.pictureBoxSettings.Cursor = System.Windows.Forms.Cursors.Hand;
161 | this.pictureBoxSettings.Image = global::APK_Edit.Properties.Resources.Settings_16;
162 | this.pictureBoxSettings.Location = new System.Drawing.Point(309, 376);
163 | this.pictureBoxSettings.Name = "pictureBoxSettings";
164 | this.pictureBoxSettings.Size = new System.Drawing.Size(16, 16);
165 | this.pictureBoxSettings.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
166 | this.pictureBoxSettings.TabIndex = 27;
167 | this.pictureBoxSettings.TabStop = false;
168 | this.toolTip1.SetToolTip(this.pictureBoxSettings, "Settings");
169 | this.pictureBoxSettings.Click += new System.EventHandler(this.pictureBoxSettings_Click);
170 | //
171 | // pictureBoxStatus
172 | //
173 | this.pictureBoxStatus.Location = new System.Drawing.Point(131, 166);
174 | this.pictureBoxStatus.Name = "pictureBoxStatus";
175 | this.pictureBoxStatus.Size = new System.Drawing.Size(76, 76);
176 | this.pictureBoxStatus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
177 | this.pictureBoxStatus.TabIndex = 25;
178 | this.pictureBoxStatus.TabStop = false;
179 | //
180 | // labelStatus
181 | //
182 | this.labelStatus.Location = new System.Drawing.Point(2, 250);
183 | this.labelStatus.Name = "labelStatus";
184 | this.labelStatus.Size = new System.Drawing.Size(335, 13);
185 | this.labelStatus.TabIndex = 24;
186 | this.labelStatus.TextAlign = System.Drawing.ContentAlignment.TopCenter;
187 | //
188 | // pictureBoxHDPI
189 | //
190 | this.pictureBoxHDPI.Location = new System.Drawing.Point(50, 32);
191 | this.pictureBoxHDPI.Name = "pictureBoxHDPI";
192 | this.pictureBoxHDPI.Size = new System.Drawing.Size(76, 76);
193 | this.pictureBoxHDPI.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
194 | this.pictureBoxHDPI.TabIndex = 23;
195 | this.pictureBoxHDPI.TabStop = false;
196 | this.pictureBoxHDPI.Click += new System.EventHandler(this.pictureBoxHDPI_Click);
197 | //
198 | // textBoxName
199 | //
200 | this.textBoxName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
201 | | System.Windows.Forms.AnchorStyles.Right)));
202 | this.textBoxName.Enabled = false;
203 | this.textBoxName.Location = new System.Drawing.Point(50, 6);
204 | this.textBoxName.Name = "textBoxName";
205 | this.textBoxName.Size = new System.Drawing.Size(275, 20);
206 | this.textBoxName.TabIndex = 22;
207 | //
208 | // labelIcons
209 | //
210 | this.labelIcons.AutoSize = true;
211 | this.labelIcons.Location = new System.Drawing.Point(6, 32);
212 | this.labelIcons.Name = "labelIcons";
213 | this.labelIcons.Size = new System.Drawing.Size(36, 13);
214 | this.labelIcons.TabIndex = 1;
215 | this.labelIcons.Text = "Icons:";
216 | //
217 | // labelName
218 | //
219 | this.labelName.AutoSize = true;
220 | this.labelName.Location = new System.Drawing.Point(6, 8);
221 | this.labelName.Name = "labelName";
222 | this.labelName.Size = new System.Drawing.Size(38, 13);
223 | this.labelName.TabIndex = 0;
224 | this.labelName.Text = "Name:";
225 | //
226 | // tabPageDetails
227 | //
228 | this.tabPageDetails.Controls.Add(this.labelApkToolVersion);
229 | this.tabPageDetails.Controls.Add(this.labelApkToolVersionLabel);
230 | this.tabPageDetails.Location = new System.Drawing.Point(4, 22);
231 | this.tabPageDetails.Name = "tabPageDetails";
232 | this.tabPageDetails.Padding = new System.Windows.Forms.Padding(3);
233 | this.tabPageDetails.Size = new System.Drawing.Size(339, 408);
234 | this.tabPageDetails.TabIndex = 1;
235 | this.tabPageDetails.Text = "Details";
236 | this.tabPageDetails.UseVisualStyleBackColor = true;
237 | //
238 | // labelApkToolVersion
239 | //
240 | this.labelApkToolVersion.AutoSize = true;
241 | this.labelApkToolVersion.Enabled = false;
242 | this.labelApkToolVersion.Location = new System.Drawing.Point(103, 13);
243 | this.labelApkToolVersion.Name = "labelApkToolVersion";
244 | this.labelApkToolVersion.Size = new System.Drawing.Size(0, 13);
245 | this.labelApkToolVersion.TabIndex = 1;
246 | //
247 | // labelApkToolVersionLabel
248 | //
249 | this.labelApkToolVersionLabel.AutoSize = true;
250 | this.labelApkToolVersionLabel.Location = new System.Drawing.Point(7, 13);
251 | this.labelApkToolVersionLabel.Name = "labelApkToolVersionLabel";
252 | this.labelApkToolVersionLabel.Size = new System.Drawing.Size(90, 13);
253 | this.labelApkToolVersionLabel.TabIndex = 0;
254 | this.labelApkToolVersionLabel.Text = "Apk Tool version:";
255 | //
256 | // openFileDialogIcon
257 | //
258 | this.openFileDialogIcon.Filter = "Android icon files|*.png";
259 | //
260 | // openFileDialogFramework
261 | //
262 | this.openFileDialogFramework.FileName = "Framework.apk";
263 | this.openFileDialogFramework.Filter = "Android framework files|*.apk";
264 | //
265 | // frmMain
266 | //
267 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
268 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
269 | this.ClientSize = new System.Drawing.Size(361, 477);
270 | this.Controls.Add(this.tabControlMain);
271 | this.Controls.Add(this.btnApply);
272 | this.Controls.Add(this.btnCancel);
273 | this.Controls.Add(this.btnOK);
274 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
275 | this.MaximumSize = new System.Drawing.Size(377, 515);
276 | this.MinimumSize = new System.Drawing.Size(377, 515);
277 | this.Name = "frmMain";
278 | this.Text = "APK Edit 0.5";
279 | this.Load += new System.EventHandler(this.frmMain_Load);
280 | this.tabControlMain.ResumeLayout(false);
281 | this.tabPageGeneral.ResumeLayout(false);
282 | this.tabPageGeneral.PerformLayout();
283 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxBrowse)).EndInit();
284 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxTranslate)).EndInit();
285 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxSettings)).EndInit();
286 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxStatus)).EndInit();
287 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxHDPI)).EndInit();
288 | this.tabPageDetails.ResumeLayout(false);
289 | this.tabPageDetails.PerformLayout();
290 | this.ResumeLayout(false);
291 |
292 | }
293 |
294 | #endregion
295 |
296 | private System.Windows.Forms.Button btnApply;
297 | private System.Windows.Forms.Button btnCancel;
298 | private System.Windows.Forms.Button btnOK;
299 | private System.Windows.Forms.TabControl tabControlMain;
300 | private System.Windows.Forms.TabPage tabPageGeneral;
301 | private System.Windows.Forms.TabPage tabPageDetails;
302 | private System.Windows.Forms.Label labelIcons;
303 | private System.Windows.Forms.Label labelName;
304 | private System.Windows.Forms.PictureBox pictureBoxHDPI;
305 | private System.Windows.Forms.TextBox textBoxName;
306 | private System.Windows.Forms.PictureBox pictureBoxStatus;
307 | private System.Windows.Forms.Label labelStatus;
308 | private System.Windows.Forms.OpenFileDialog openFileDialogIcon;
309 | private System.Windows.Forms.OpenFileDialog openFileDialogFramework;
310 | private System.Windows.Forms.Label labelApkToolVersion;
311 | private System.Windows.Forms.Label labelApkToolVersionLabel;
312 | private System.Windows.Forms.PictureBox pictureBoxSettings;
313 | private System.Windows.Forms.PictureBox pictureBoxBrowse;
314 | private System.Windows.Forms.PictureBox pictureBoxTranslate;
315 | private System.Windows.Forms.ToolTip toolTip1;
316 | }
317 | }
--------------------------------------------------------------------------------
/APK Edit/frmMain.cs:
--------------------------------------------------------------------------------
1 | // --------------------------------------------------------------------------------------------------------------------
2 | //
3 | //
4 | //
5 | //
6 | // Defines the frmMain type.
7 | //
8 | // --------------------------------------------------------------------------------------------------------------------
9 |
10 | namespace APK_Edit
11 | {
12 | using System;
13 | using System.ComponentModel;
14 | using System.Windows.Forms;
15 |
16 | ///
17 | ///
18 | public partial class frmMain : Form
19 | {
20 | private ApkFile apkFile;
21 | private bool closeAfterCompiling;
22 |
23 | public frmMain()
24 | {
25 | InitializeComponent();
26 | }
27 |
28 | private void frmMain_Load(object sender, EventArgs e)
29 | {
30 | try
31 | {
32 | this.apkFile = new ApkFile();
33 | this.apkFile.EnableBackup = AppSettings.EnableBackup;
34 | this.apkFile.OverWriteBackup = AppSettings.OverWriteBackup;
35 | this.apkFile.EnableSigning = AppSettings.EnableSigning;
36 | this.apkFile.CreateSeperateSigningFile = AppSettings.CreateSeperateSigningFile;
37 |
38 | this.apkFile.Decompiling += this.Decompiling;
39 | this.apkFile.Decompiled += this.Decompiled;
40 | this.apkFile.FrameworkMissing += this.FrameworkMissing;
41 | this.apkFile.Compiling += this.Compiling;
42 | this.apkFile.Compiled += this.Compiled;
43 | this.apkFile.Decompile();
44 |
45 | textBoxName.Text = this.apkFile.ApplicationName;
46 | labelApkToolVersion.Text = Wrappers.Apktool.Version;
47 | }
48 | catch (Exception ex)
49 | {
50 | MessageBox.Show(ex.Message);
51 | this.Close();
52 | }
53 | }
54 |
55 | private void Decompiling()
56 | {
57 | this.DisableUI();
58 | labelStatus.Text = "Loading.";
59 | pictureBoxStatus.Image = Properties.Resources.Loading_64;
60 | }
61 |
62 | private void Decompiled()
63 | {
64 | labelStatus.Text = string.Empty;
65 | pictureBoxStatus.Image = null;
66 | pictureBoxHDPI.Image = this.apkFile.GetIcon();
67 | pictureBoxHDPI.Cursor = Cursors.Hand;
68 | this.EnableUI();
69 | }
70 |
71 | private void FrameworkMissing()
72 | {
73 | labelStatus.Text = "Framework file missing.";
74 | pictureBoxStatus.Image = Properties.Resources.FileWarning_128;
75 | if (openFileDialogFramework.ShowDialog() == DialogResult.OK)
76 | {
77 | this.apkFile.FrameworkInstalling += this.FrameworkInstalling;
78 | this.apkFile.FrameworkInstalled += this.FrameworkInstalled;
79 | this.apkFile.InstallFramework(this.openFileDialogFramework.FileName);
80 | }
81 | else
82 | {
83 | this.Close();
84 | }
85 | }
86 |
87 | private void FrameworkInstalling()
88 | {
89 | labelStatus.Text = "Installing framework.";
90 | pictureBoxStatus.Image = Properties.Resources.Loading_64;
91 | }
92 |
93 | private void FrameworkInstalled()
94 | {
95 | this.apkFile.Decompile();
96 | }
97 |
98 | private void Compiling()
99 | {
100 | this.DisableUI();
101 | labelStatus.Text = "Saving changes.";
102 | pictureBoxStatus.Image = Properties.Resources.Loading_64;
103 | }
104 |
105 | private void Compiled()
106 | {
107 | if (this.closeAfterCompiling)
108 | {
109 | this.Close();
110 | }
111 | else
112 | {
113 | labelStatus.Text = string.Empty;
114 | pictureBoxStatus.Image = null;
115 | pictureBoxHDPI.Image = this.apkFile.GetIcon();
116 | pictureBoxHDPI.Cursor = Cursors.Hand;
117 | this.EnableUI();
118 | }
119 | }
120 |
121 | private void EnableUI()
122 | {
123 | btnOK.Enabled = true;
124 | btnCancel.Enabled = true;
125 | btnApply.Enabled = true;
126 | textBoxName.Enabled = true;
127 | pictureBoxHDPI.Enabled = true;
128 | labelStatus.Enabled = true;
129 | pictureBoxBrowse.Enabled = true;
130 | pictureBoxBrowse.Visible = true;
131 | pictureBoxTranslate.Enabled = true;
132 | pictureBoxTranslate.Visible = true;
133 | }
134 |
135 | private void DisableUI()
136 | {
137 | tabControlMain.SelectTab(0);
138 | btnOK.Enabled = false;
139 | btnCancel.Enabled = false;
140 | btnApply.Enabled = false;
141 | textBoxName.Enabled = false;
142 | pictureBoxHDPI.Enabled = false;
143 | labelStatus.Enabled = false;
144 | pictureBoxBrowse.Enabled = false;
145 | pictureBoxBrowse.Visible = false;
146 | pictureBoxTranslate.Enabled = false;
147 | pictureBoxTranslate.Visible = false;
148 | }
149 |
150 | private void btnApply_Click(object sender, EventArgs e)
151 | {
152 | this.apkFile.ApplicationName = this.textBoxName.Text;
153 | this.apkFile.Compile();
154 | }
155 |
156 | private void btnOK_Click(object sender, EventArgs e)
157 | {
158 | this.closeAfterCompiling = true;
159 | this.apkFile.ApplicationName = this.textBoxName.Text;
160 | this.apkFile.Compile();
161 | }
162 |
163 | private void btnCancel_Click(object sender, EventArgs e)
164 | {
165 | this.Close();
166 | }
167 |
168 | private void pictureBoxHDPI_Click(object sender, EventArgs e)
169 | {
170 | if (openFileDialogIcon.ShowDialog() == DialogResult.OK)
171 | {
172 | this.pictureBoxHDPI.Image = this.apkFile.SetIcon(this.openFileDialogIcon.FileName);
173 | }
174 | }
175 |
176 | private void pictureBoxSettings_Click(object sender, EventArgs e)
177 | {
178 | frmOptions frm = new frmOptions();
179 | if (frm.ShowDialog() == DialogResult.OK)
180 | {
181 | this.apkFile.EnableBackup = AppSettings.EnableBackup;
182 | this.apkFile.OverWriteBackup = AppSettings.OverWriteBackup;
183 | this.apkFile.EnableSigning = AppSettings.EnableSigning;
184 | this.apkFile.CreateSeperateSigningFile = AppSettings.CreateSeperateSigningFile;
185 | }
186 | }
187 |
188 | private void pictureBoxBrowse_Click(object sender, EventArgs e)
189 | {
190 | System.Diagnostics.Process.Start("explorer.exe", ApkFile.TempPath);
191 | }
192 |
193 | private void pictureBoxTranslate_Click(object sender, EventArgs e)
194 | {
195 | frmTranslate frm = new frmTranslate();
196 | if(frm.ShowDialog() == DialogResult.OK)
197 | {
198 | // Add new language xml
199 | }
200 | }
201 |
202 |
203 | }
204 | }
205 |
--------------------------------------------------------------------------------
/APK Edit/frmOptions.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace APK_Edit
2 | {
3 | partial class frmOptions
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmOptions));
32 | this.groupBoxSigning = new System.Windows.Forms.GroupBox();
33 | this.checkBoxCreateSeperateSignFile = new System.Windows.Forms.CheckBox();
34 | this.checkBoxSigning = new System.Windows.Forms.CheckBox();
35 | this.groupBoxBackup = new System.Windows.Forms.GroupBox();
36 | this.checkBoxOverWritebackup = new System.Windows.Forms.CheckBox();
37 | this.checkBoxBackup = new System.Windows.Forms.CheckBox();
38 | this.button1 = new System.Windows.Forms.Button();
39 | this.groupBoxSigning.SuspendLayout();
40 | this.groupBoxBackup.SuspendLayout();
41 | this.SuspendLayout();
42 | //
43 | // groupBoxSigning
44 | //
45 | this.groupBoxSigning.Controls.Add(this.checkBoxCreateSeperateSignFile);
46 | this.groupBoxSigning.Controls.Add(this.checkBoxSigning);
47 | this.groupBoxSigning.Location = new System.Drawing.Point(12, 89);
48 | this.groupBoxSigning.Name = "groupBoxSigning";
49 | this.groupBoxSigning.Size = new System.Drawing.Size(313, 73);
50 | this.groupBoxSigning.TabIndex = 5;
51 | this.groupBoxSigning.TabStop = false;
52 | this.groupBoxSigning.Text = "Signing configuration";
53 | //
54 | // checkBoxCreateSeperateSignFile
55 | //
56 | this.checkBoxCreateSeperateSignFile.AutoSize = true;
57 | this.checkBoxCreateSeperateSignFile.Location = new System.Drawing.Point(31, 44);
58 | this.checkBoxCreateSeperateSignFile.Name = "checkBoxCreateSeperateSignFile";
59 | this.checkBoxCreateSeperateSignFile.Size = new System.Drawing.Size(230, 17);
60 | this.checkBoxCreateSeperateSignFile.TabIndex = 1;
61 | this.checkBoxCreateSeperateSignFile.Text = "Create a seperate signed version of the file ";
62 | this.checkBoxCreateSeperateSignFile.UseVisualStyleBackColor = true;
63 | //
64 | // checkBoxSigning
65 | //
66 | this.checkBoxSigning.AutoSize = true;
67 | this.checkBoxSigning.Location = new System.Drawing.Point(12, 20);
68 | this.checkBoxSigning.Name = "checkBoxSigning";
69 | this.checkBoxSigning.Size = new System.Drawing.Size(226, 17);
70 | this.checkBoxSigning.TabIndex = 0;
71 | this.checkBoxSigning.Text = "Automatically sign the file when it is saved.";
72 | this.checkBoxSigning.UseVisualStyleBackColor = true;
73 | this.checkBoxSigning.CheckedChanged += new System.EventHandler(this.checkBoxSigning_CheckedChanged);
74 | //
75 | // groupBoxBackup
76 | //
77 | this.groupBoxBackup.Controls.Add(this.checkBoxOverWritebackup);
78 | this.groupBoxBackup.Controls.Add(this.checkBoxBackup);
79 | this.groupBoxBackup.Location = new System.Drawing.Point(12, 12);
80 | this.groupBoxBackup.Name = "groupBoxBackup";
81 | this.groupBoxBackup.Size = new System.Drawing.Size(313, 71);
82 | this.groupBoxBackup.TabIndex = 4;
83 | this.groupBoxBackup.TabStop = false;
84 | this.groupBoxBackup.Text = "Backup configuration";
85 | //
86 | // checkBoxOverWritebackup
87 | //
88 | this.checkBoxOverWritebackup.AutoSize = true;
89 | this.checkBoxOverWritebackup.Location = new System.Drawing.Point(31, 44);
90 | this.checkBoxOverWritebackup.Name = "checkBoxOverWritebackup";
91 | this.checkBoxOverWritebackup.Size = new System.Drawing.Size(229, 17);
92 | this.checkBoxOverWritebackup.TabIndex = 1;
93 | this.checkBoxOverWritebackup.Text = "Overwrite the backup file if it already exists.";
94 | this.checkBoxOverWritebackup.UseVisualStyleBackColor = true;
95 | //
96 | // checkBoxBackup
97 | //
98 | this.checkBoxBackup.AutoSize = true;
99 | this.checkBoxBackup.Location = new System.Drawing.Point(12, 20);
100 | this.checkBoxBackup.Name = "checkBoxBackup";
101 | this.checkBoxBackup.Size = new System.Drawing.Size(277, 17);
102 | this.checkBoxBackup.TabIndex = 0;
103 | this.checkBoxBackup.Text = "Automatically create a backup when the file is saved.";
104 | this.checkBoxBackup.UseVisualStyleBackColor = true;
105 | this.checkBoxBackup.CheckedChanged += new System.EventHandler(this.checkBoxBackup_CheckedChanged);
106 | //
107 | // button1
108 | //
109 | this.button1.Location = new System.Drawing.Point(251, 174);
110 | this.button1.Name = "button1";
111 | this.button1.Size = new System.Drawing.Size(75, 23);
112 | this.button1.TabIndex = 6;
113 | this.button1.Text = "OK";
114 | this.button1.UseVisualStyleBackColor = true;
115 | this.button1.Click += new System.EventHandler(this.button1_Click);
116 | //
117 | // frmOptions
118 | //
119 | this.AcceptButton = this.button1;
120 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
121 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
122 | this.ClientSize = new System.Drawing.Size(338, 209);
123 | this.Controls.Add(this.button1);
124 | this.Controls.Add(this.groupBoxSigning);
125 | this.Controls.Add(this.groupBoxBackup);
126 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
127 | this.MaximizeBox = false;
128 | this.MinimizeBox = false;
129 | this.Name = "frmOptions";
130 | this.ShowInTaskbar = false;
131 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
132 | this.Text = "Settings";
133 | this.Load += new System.EventHandler(this.frmOptions_Load);
134 | this.groupBoxSigning.ResumeLayout(false);
135 | this.groupBoxSigning.PerformLayout();
136 | this.groupBoxBackup.ResumeLayout(false);
137 | this.groupBoxBackup.PerformLayout();
138 | this.ResumeLayout(false);
139 |
140 | }
141 |
142 | #endregion
143 |
144 | private System.Windows.Forms.GroupBox groupBoxSigning;
145 | private System.Windows.Forms.CheckBox checkBoxCreateSeperateSignFile;
146 | private System.Windows.Forms.CheckBox checkBoxSigning;
147 | private System.Windows.Forms.GroupBox groupBoxBackup;
148 | private System.Windows.Forms.CheckBox checkBoxOverWritebackup;
149 | private System.Windows.Forms.CheckBox checkBoxBackup;
150 | private System.Windows.Forms.Button button1;
151 |
152 | }
153 | }
--------------------------------------------------------------------------------
/APK Edit/frmOptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace APK_Edit
11 | {
12 | public partial class frmOptions : Form
13 | {
14 | public frmOptions()
15 | {
16 | InitializeComponent();
17 | }
18 |
19 |
20 |
21 | private void frmOptions_Load(object sender, EventArgs e)
22 | {
23 | this.checkBoxCreateSeperateSignFile.Checked = AppSettings.CreateSeperateSigningFile;
24 | this.checkBoxBackup.Checked = AppSettings.EnableBackup;
25 | this.checkBoxSigning.Checked = AppSettings.EnableSigning;
26 | this.checkBoxOverWritebackup.Checked = AppSettings.OverWriteBackup;
27 | this.checkBoxOverWritebackup.Enabled = this.checkBoxBackup.Checked;
28 | this.checkBoxCreateSeperateSignFile.Enabled = this.checkBoxSigning.Checked;
29 | }
30 |
31 | private void button1_Click(object sender, EventArgs e)
32 | {
33 | AppSettings.CreateSeperateSigningFile = this.checkBoxCreateSeperateSignFile.Checked;
34 | AppSettings.EnableBackup = this.checkBoxBackup.Checked;
35 | AppSettings.EnableSigning = this.checkBoxSigning.Checked;
36 | AppSettings.OverWriteBackup = this.checkBoxOverWritebackup.Checked;
37 | this.DialogResult = DialogResult.OK;
38 | this.Close();
39 | }
40 |
41 | private void checkBoxBackup_CheckedChanged(object sender, EventArgs e)
42 | {
43 | this.checkBoxOverWritebackup.Enabled = (((CheckBox)sender).CheckState == CheckState.Checked);
44 | }
45 |
46 | private void checkBoxSigning_CheckedChanged(object sender, EventArgs e)
47 | {
48 | this.checkBoxCreateSeperateSignFile.Enabled = (((CheckBox)sender).CheckState == CheckState.Checked);
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/APK Edit/frmTranslate.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace APK_Edit
2 | {
3 | partial class frmTranslate
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
33 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
34 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
35 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmTranslate));
36 | this.comboBox1 = new System.Windows.Forms.ComboBox();
37 | this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
38 | this.DataGridViewStrings = new System.Windows.Forms.DataGridView();
39 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
40 | ((System.ComponentModel.ISupportInitialize)(this.DataGridViewStrings)).BeginInit();
41 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
42 | this.SuspendLayout();
43 | //
44 | // comboBox1
45 | //
46 | this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
47 | | System.Windows.Forms.AnchorStyles.Right)));
48 | this.comboBox1.FormattingEnabled = true;
49 | this.comboBox1.Location = new System.Drawing.Point(13, 13);
50 | this.comboBox1.Name = "comboBox1";
51 | this.comboBox1.Size = new System.Drawing.Size(256, 21);
52 | this.comboBox1.TabIndex = 0;
53 | //
54 | // DataGridViewStrings
55 | //
56 | this.DataGridViewStrings.AllowUserToResizeColumns = false;
57 | this.DataGridViewStrings.AllowUserToResizeRows = false;
58 | this.DataGridViewStrings.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
59 | | System.Windows.Forms.AnchorStyles.Left)
60 | | System.Windows.Forms.AnchorStyles.Right)));
61 | this.DataGridViewStrings.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
62 | this.DataGridViewStrings.BackgroundColor = System.Drawing.SystemColors.Window;
63 | this.DataGridViewStrings.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
64 | this.DataGridViewStrings.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
65 | this.DataGridViewStrings.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.EnableWithoutHeaderText;
66 | dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
67 | dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
68 | dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
69 | dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
70 | dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
71 | dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
72 | dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
73 | this.DataGridViewStrings.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
74 | this.DataGridViewStrings.ColumnHeadersVisible = false;
75 | dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
76 | dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
77 | dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
78 | dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
79 | dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.White;
80 | dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Black;
81 | dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
82 | this.DataGridViewStrings.DefaultCellStyle = dataGridViewCellStyle2;
83 | this.DataGridViewStrings.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
84 | this.DataGridViewStrings.Location = new System.Drawing.Point(12, 40);
85 | this.DataGridViewStrings.MultiSelect = false;
86 | this.DataGridViewStrings.Name = "DataGridViewStrings";
87 | dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
88 | dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
89 | dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
90 | dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
91 | dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
92 | dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
93 | dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
94 | this.DataGridViewStrings.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
95 | this.DataGridViewStrings.RowHeadersVisible = false;
96 | this.DataGridViewStrings.RowTemplate.Height = 18;
97 | this.DataGridViewStrings.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
98 | this.DataGridViewStrings.ShowCellToolTips = false;
99 | this.DataGridViewStrings.ShowEditingIcon = false;
100 | this.DataGridViewStrings.ShowRowErrors = false;
101 | this.DataGridViewStrings.Size = new System.Drawing.Size(280, 190);
102 | this.DataGridViewStrings.TabIndex = 7;
103 | //
104 | // pictureBox1
105 | //
106 | this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
107 | this.pictureBox1.Image = global::APK_Edit.Properties.Resources.Add_Normal_16;
108 | this.pictureBox1.Location = new System.Drawing.Point(273, 15);
109 | this.pictureBox1.Name = "pictureBox1";
110 | this.pictureBox1.Size = new System.Drawing.Size(16, 16);
111 | this.pictureBox1.TabIndex = 1;
112 | this.pictureBox1.TabStop = false;
113 | this.toolTip1.SetToolTip(this.pictureBox1, "Add New Translation");
114 | this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
115 | this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
116 | this.pictureBox1.MouseEnter += new System.EventHandler(this.pictureBox1_MouseEnter);
117 | this.pictureBox1.MouseLeave += new System.EventHandler(this.pictureBox1_MouseLeave);
118 | this.pictureBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseUp);
119 | //
120 | // frmTranslate
121 | //
122 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
123 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
124 | this.ClientSize = new System.Drawing.Size(304, 242);
125 | this.Controls.Add(this.DataGridViewStrings);
126 | this.Controls.Add(this.pictureBox1);
127 | this.Controls.Add(this.comboBox1);
128 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
129 | this.MaximumSize = new System.Drawing.Size(930, 750);
130 | this.MinimumSize = new System.Drawing.Size(320, 280);
131 | this.Name = "frmTranslate";
132 | this.ShowInTaskbar = false;
133 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
134 | this.Text = "Edit Translations";
135 | ((System.ComponentModel.ISupportInitialize)(this.DataGridViewStrings)).EndInit();
136 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
137 | this.ResumeLayout(false);
138 |
139 | }
140 |
141 | #endregion
142 |
143 | private System.Windows.Forms.ComboBox comboBox1;
144 | private System.Windows.Forms.PictureBox pictureBox1;
145 | private System.Windows.Forms.ToolTip toolTip1;
146 | private System.Windows.Forms.DataGridView DataGridViewStrings;
147 | }
148 | }
--------------------------------------------------------------------------------
/APK Edit/frmTranslate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace APK_Edit
11 | {
12 | public partial class frmTranslate : Form
13 | {
14 | public frmTranslate()
15 | {
16 | InitializeComponent();
17 | }
18 |
19 | private void pictureBox1_MouseEnter(object sender, EventArgs e)
20 | {
21 | pictureBox1.Image = Properties.Resources.Add_Hover_16;
22 | }
23 |
24 | private void pictureBox1_MouseLeave(object sender, EventArgs e)
25 | {
26 | pictureBox1.Image = Properties.Resources.Add_Normal_16;
27 | }
28 |
29 | private void pictureBox1_Click(object sender, EventArgs e)
30 | {
31 | frmAddTranslation frm = new frmAddTranslation();
32 | if (frm.ShowDialog() == DialogResult.OK)
33 | {
34 | // Add new translation
35 | }
36 | }
37 |
38 | private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
39 | {
40 | pictureBox1.Image = Properties.Resources.Add_Clicked_16;
41 | }
42 |
43 | private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
44 | {
45 | pictureBox1.Image = Properties.Resources.Add_Hover_16;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | APK Edit
2 |
3 | Ever wanted to simply change an icon on your Android phone and found yourself lost in the endless lists of forum posts saying: you have to change heaven and earth to do this...
4 | NOT ANYMORE!!!!
--------------------------------------------------------------------------------
/Setup/Setup.vdproj:
--------------------------------------------------------------------------------
1 | "DeployProject"
2 | {
3 | "VSVersion" = "3:800"
4 | "ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}"
5 | "IsWebType" = "8:FALSE"
6 | "ProjectName" = "8:Setup"
7 | "LanguageId" = "3:1033"
8 | "CodePage" = "3:1252"
9 | "UILanguageId" = "3:1033"
10 | "SccProjectName" = "8:"
11 | "SccLocalPath" = "8:"
12 | "SccAuxPath" = "8:"
13 | "SccProvider" = "8:"
14 | "Hierarchy"
15 | {
16 | "Entry"
17 | {
18 | "MsmKey" = "8:_20DB72B26A994F1A88E78188E8404BC5"
19 | "OwnerKey" = "8:_UNDEFINED"
20 | "MsmSig" = "8:_UNDEFINED"
21 | }
22 | "Entry"
23 | {
24 | "MsmKey" = "8:_69345C95524E7E1B73F007F7C3520A86"
25 | "OwnerKey" = "8:_FEA926BC5B775606107CFAEDF162A878"
26 | "MsmSig" = "8:_UNDEFINED"
27 | }
28 | "Entry"
29 | {
30 | "MsmKey" = "8:_69345C95524E7E1B73F007F7C3520A86"
31 | "OwnerKey" = "8:_F89E94B73B5AC265A1D7251AE6DA2A62"
32 | "MsmSig" = "8:_UNDEFINED"
33 | }
34 | "Entry"
35 | {
36 | "MsmKey" = "8:_69345C95524E7E1B73F007F7C3520A86"
37 | "OwnerKey" = "8:_8CCCBE0339F6455BA759A90DB8BBA385"
38 | "MsmSig" = "8:_UNDEFINED"
39 | }
40 | "Entry"
41 | {
42 | "MsmKey" = "8:_8CCCBE0339F6455BA759A90DB8BBA385"
43 | "OwnerKey" = "8:_UNDEFINED"
44 | "MsmSig" = "8:_UNDEFINED"
45 | }
46 | "Entry"
47 | {
48 | "MsmKey" = "8:_BBF811C7A3B455DF082B6915F1F8BACB"
49 | "OwnerKey" = "8:_8CCCBE0339F6455BA759A90DB8BBA385"
50 | "MsmSig" = "8:_UNDEFINED"
51 | }
52 | "Entry"
53 | {
54 | "MsmKey" = "8:_F89E94B73B5AC265A1D7251AE6DA2A62"
55 | "OwnerKey" = "8:_8CCCBE0339F6455BA759A90DB8BBA385"
56 | "MsmSig" = "8:_UNDEFINED"
57 | }
58 | "Entry"
59 | {
60 | "MsmKey" = "8:_FEA926BC5B775606107CFAEDF162A878"
61 | "OwnerKey" = "8:_8CCCBE0339F6455BA759A90DB8BBA385"
62 | "MsmSig" = "8:_UNDEFINED"
63 | }
64 | "Entry"
65 | {
66 | "MsmKey" = "8:_UNDEFINED"
67 | "OwnerKey" = "8:_8CCCBE0339F6455BA759A90DB8BBA385"
68 | "MsmSig" = "8:_UNDEFINED"
69 | }
70 | "Entry"
71 | {
72 | "MsmKey" = "8:_UNDEFINED"
73 | "OwnerKey" = "8:_F89E94B73B5AC265A1D7251AE6DA2A62"
74 | "MsmSig" = "8:_UNDEFINED"
75 | }
76 | "Entry"
77 | {
78 | "MsmKey" = "8:_UNDEFINED"
79 | "OwnerKey" = "8:_FEA926BC5B775606107CFAEDF162A878"
80 | "MsmSig" = "8:_UNDEFINED"
81 | }
82 | "Entry"
83 | {
84 | "MsmKey" = "8:_UNDEFINED"
85 | "OwnerKey" = "8:_69345C95524E7E1B73F007F7C3520A86"
86 | "MsmSig" = "8:_UNDEFINED"
87 | }
88 | "Entry"
89 | {
90 | "MsmKey" = "8:_UNDEFINED"
91 | "OwnerKey" = "8:_BBF811C7A3B455DF082B6915F1F8BACB"
92 | "MsmSig" = "8:_UNDEFINED"
93 | }
94 | }
95 | "Configurations"
96 | {
97 | "Debug"
98 | {
99 | "DisplayName" = "8:Debug"
100 | "IsDebugOnly" = "11:TRUE"
101 | "IsReleaseOnly" = "11:FALSE"
102 | "OutputFilename" = "8:Debug\\Setup.msi"
103 | "PackageFilesAs" = "3:2"
104 | "PackageFileSize" = "3:-2147483648"
105 | "CabType" = "3:1"
106 | "Compression" = "3:2"
107 | "SignOutput" = "11:FALSE"
108 | "CertificateFile" = "8:"
109 | "PrivateKeyFile" = "8:"
110 | "TimeStampServer" = "8:"
111 | "InstallerBootstrapper" = "3:2"
112 | "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
113 | {
114 | "Enabled" = "11:TRUE"
115 | "PromptEnabled" = "11:TRUE"
116 | "PrerequisitesLocation" = "2:1"
117 | "Url" = "8:"
118 | "ComponentsUrl" = "8:"
119 | "Items"
120 | {
121 | "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0,Profile=Client"
122 | {
123 | "Name" = "8:Microsoft .NET Framework 4 Client Profile (x86 and x64)"
124 | "ProductCode" = "8:.NETFramework,Version=v4.0,Profile=Client"
125 | }
126 | "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
127 | {
128 | "Name" = "8:Windows Installer 3.1"
129 | "ProductCode" = "8:Microsoft.Windows.Installer.3.1"
130 | }
131 | }
132 | }
133 | }
134 | "Release"
135 | {
136 | "DisplayName" = "8:Release"
137 | "IsDebugOnly" = "11:FALSE"
138 | "IsReleaseOnly" = "11:TRUE"
139 | "OutputFilename" = "8:Release\\Setup.msi"
140 | "PackageFilesAs" = "3:2"
141 | "PackageFileSize" = "3:-2147483648"
142 | "CabType" = "3:1"
143 | "Compression" = "3:2"
144 | "SignOutput" = "11:FALSE"
145 | "CertificateFile" = "8:"
146 | "PrivateKeyFile" = "8:"
147 | "TimeStampServer" = "8:"
148 | "InstallerBootstrapper" = "3:2"
149 | "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
150 | {
151 | "Enabled" = "11:TRUE"
152 | "PromptEnabled" = "11:TRUE"
153 | "PrerequisitesLocation" = "2:1"
154 | "Url" = "8:"
155 | "ComponentsUrl" = "8:"
156 | "Items"
157 | {
158 | "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.0,Profile=Client"
159 | {
160 | "Name" = "8:Microsoft .NET Framework 4 Client Profile (x86 and x64)"
161 | "ProductCode" = "8:.NETFramework,Version=v4.0,Profile=Client"
162 | }
163 | "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
164 | {
165 | "Name" = "8:Windows Installer 3.1"
166 | "ProductCode" = "8:Microsoft.Windows.Installer.3.1"
167 | }
168 | }
169 | }
170 | }
171 | }
172 | "Deployable"
173 | {
174 | "CustomAction"
175 | {
176 | }
177 | "DefaultFeature"
178 | {
179 | "Name" = "8:DefaultFeature"
180 | "Title" = "8:"
181 | "Description" = "8:"
182 | }
183 | "ExternalPersistence"
184 | {
185 | "LaunchCondition"
186 | {
187 | "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_91F2696216EF447AB11A09DBF635F027"
188 | {
189 | "Name" = "8:.NET Framework"
190 | "Message" = "8:[VSDNETMSG]"
191 | "FrameworkVersion" = "8:.NETFramework,Version=v4.0,Profile=Client"
192 | "AllowLaterVersions" = "11:FALSE"
193 | "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=131000"
194 | }
195 | }
196 | }
197 | "File"
198 | {
199 | "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_20DB72B26A994F1A88E78188E8404BC5"
200 | {
201 | "SourcePath" = "8:..\\APK Edit\\Android.ico"
202 | "TargetName" = "8:Android.ico"
203 | "Tag" = "8:"
204 | "Folder" = "8:_A5AA208578524FABB8CCBCD94CBEED81"
205 | "Condition" = "8:"
206 | "Transitive" = "11:FALSE"
207 | "Vital" = "11:TRUE"
208 | "ReadOnly" = "11:FALSE"
209 | "Hidden" = "11:FALSE"
210 | "System" = "11:FALSE"
211 | "Permanent" = "11:FALSE"
212 | "SharedLegacy" = "11:FALSE"
213 | "PackageAs" = "3:1"
214 | "Register" = "3:1"
215 | "Exclude" = "11:FALSE"
216 | "IsDependency" = "11:FALSE"
217 | "IsolateTo" = "8:"
218 | }
219 | "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_69345C95524E7E1B73F007F7C3520A86"
220 | {
221 | "AssemblyRegister" = "3:1"
222 | "AssemblyIsInGAC" = "11:FALSE"
223 | "AssemblyAsmDisplayName" = "8:Wrappers.Java, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
224 | "ScatterAssemblies"
225 | {
226 | "_69345C95524E7E1B73F007F7C3520A86"
227 | {
228 | "Name" = "8:Wrappers.Java.dll"
229 | "Attributes" = "3:512"
230 | }
231 | }
232 | "SourcePath" = "8:Wrappers.Java.dll"
233 | "TargetName" = "8:"
234 | "Tag" = "8:"
235 | "Folder" = "8:_A5AA208578524FABB8CCBCD94CBEED81"
236 | "Condition" = "8:"
237 | "Transitive" = "11:FALSE"
238 | "Vital" = "11:TRUE"
239 | "ReadOnly" = "11:FALSE"
240 | "Hidden" = "11:FALSE"
241 | "System" = "11:FALSE"
242 | "Permanent" = "11:FALSE"
243 | "SharedLegacy" = "11:FALSE"
244 | "PackageAs" = "3:1"
245 | "Register" = "3:1"
246 | "Exclude" = "11:FALSE"
247 | "IsDependency" = "11:TRUE"
248 | "IsolateTo" = "8:"
249 | }
250 | "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_BBF811C7A3B455DF082B6915F1F8BACB"
251 | {
252 | "AssemblyRegister" = "3:1"
253 | "AssemblyIsInGAC" = "11:FALSE"
254 | "AssemblyAsmDisplayName" = "8:Wrappers.Aapt, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
255 | "ScatterAssemblies"
256 | {
257 | "_BBF811C7A3B455DF082B6915F1F8BACB"
258 | {
259 | "Name" = "8:Wrappers.Aapt.dll"
260 | "Attributes" = "3:512"
261 | }
262 | }
263 | "SourcePath" = "8:Wrappers.Aapt.dll"
264 | "TargetName" = "8:"
265 | "Tag" = "8:"
266 | "Folder" = "8:_A5AA208578524FABB8CCBCD94CBEED81"
267 | "Condition" = "8:"
268 | "Transitive" = "11:FALSE"
269 | "Vital" = "11:TRUE"
270 | "ReadOnly" = "11:FALSE"
271 | "Hidden" = "11:FALSE"
272 | "System" = "11:FALSE"
273 | "Permanent" = "11:FALSE"
274 | "SharedLegacy" = "11:FALSE"
275 | "PackageAs" = "3:1"
276 | "Register" = "3:1"
277 | "Exclude" = "11:FALSE"
278 | "IsDependency" = "11:TRUE"
279 | "IsolateTo" = "8:"
280 | }
281 | "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F89E94B73B5AC265A1D7251AE6DA2A62"
282 | {
283 | "AssemblyRegister" = "3:1"
284 | "AssemblyIsInGAC" = "11:FALSE"
285 | "AssemblyAsmDisplayName" = "8:Wrappers.Signapk, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
286 | "ScatterAssemblies"
287 | {
288 | "_F89E94B73B5AC265A1D7251AE6DA2A62"
289 | {
290 | "Name" = "8:Wrappers.Signapk.dll"
291 | "Attributes" = "3:512"
292 | }
293 | }
294 | "SourcePath" = "8:Wrappers.Signapk.dll"
295 | "TargetName" = "8:"
296 | "Tag" = "8:"
297 | "Folder" = "8:_A5AA208578524FABB8CCBCD94CBEED81"
298 | "Condition" = "8:"
299 | "Transitive" = "11:FALSE"
300 | "Vital" = "11:TRUE"
301 | "ReadOnly" = "11:FALSE"
302 | "Hidden" = "11:FALSE"
303 | "System" = "11:FALSE"
304 | "Permanent" = "11:FALSE"
305 | "SharedLegacy" = "11:FALSE"
306 | "PackageAs" = "3:1"
307 | "Register" = "3:1"
308 | "Exclude" = "11:FALSE"
309 | "IsDependency" = "11:TRUE"
310 | "IsolateTo" = "8:"
311 | }
312 | "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_FEA926BC5B775606107CFAEDF162A878"
313 | {
314 | "AssemblyRegister" = "3:1"
315 | "AssemblyIsInGAC" = "11:FALSE"
316 | "AssemblyAsmDisplayName" = "8:Wrappers.Apktool, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
317 | "ScatterAssemblies"
318 | {
319 | "_FEA926BC5B775606107CFAEDF162A878"
320 | {
321 | "Name" = "8:Wrappers.Apktool.dll"
322 | "Attributes" = "3:512"
323 | }
324 | }
325 | "SourcePath" = "8:Wrappers.Apktool.dll"
326 | "TargetName" = "8:"
327 | "Tag" = "8:"
328 | "Folder" = "8:_A5AA208578524FABB8CCBCD94CBEED81"
329 | "Condition" = "8:"
330 | "Transitive" = "11:FALSE"
331 | "Vital" = "11:TRUE"
332 | "ReadOnly" = "11:FALSE"
333 | "Hidden" = "11:FALSE"
334 | "System" = "11:FALSE"
335 | "Permanent" = "11:FALSE"
336 | "SharedLegacy" = "11:FALSE"
337 | "PackageAs" = "3:1"
338 | "Register" = "3:1"
339 | "Exclude" = "11:FALSE"
340 | "IsDependency" = "11:TRUE"
341 | "IsolateTo" = "8:"
342 | }
343 | }
344 | "FileType"
345 | {
346 | "{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_9F39AE9767904F9E8D6E389BDC6BE10E"
347 | {
348 | "Name" = "8:APK File"
349 | "Description" = "8:Android Package File"
350 | "Extensions" = "8:.apk"
351 | "MIME" = "8:"
352 | "Icon" = "8:_20DB72B26A994F1A88E78188E8404BC5"
353 | "IconIndex" = "3:0"
354 | "Command"
355 | {
356 | "Command" = "8:_8CCCBE0339F6455BA759A90DB8BBA385"
357 | }
358 | "Verbs"
359 | {
360 | "{95C0C507-CBF0-42B8-B119-07219E384A4A}:_1085D7A07E4D4367AD70FFCCBDEAB4E9"
361 | {
362 | "Command" = "8:&Edit"
363 | "Verb" = "8:edit"
364 | "Arguments" = "8:\"%1\""
365 | "Order" = "3:0"
366 | }
367 | }
368 | }
369 | }
370 | "Folder"
371 | {
372 | "{3C67513D-01DD-4637-8A68-80971EB9504F}:_A5AA208578524FABB8CCBCD94CBEED81"
373 | {
374 | "DefaultLocation" = "8:[ProgramFilesFolder][ProductName] [ProductVersion]"
375 | "Name" = "8:#1925"
376 | "AlwaysCreate" = "11:FALSE"
377 | "Condition" = "8:"
378 | "Transitive" = "11:FALSE"
379 | "Property" = "8:TARGETDIR"
380 | "Folders"
381 | {
382 | }
383 | }
384 | "{1525181F-901A-416C-8A58-119130FE478E}:_C8F1912A461644098E96C893A1F82B07"
385 | {
386 | "Name" = "8:#1919"
387 | "AlwaysCreate" = "11:FALSE"
388 | "Condition" = "8:"
389 | "Transitive" = "11:FALSE"
390 | "Property" = "8:ProgramMenuFolder"
391 | "Folders"
392 | {
393 | }
394 | }
395 | "{1525181F-901A-416C-8A58-119130FE478E}:_EDFF3AFD21D54D9A863193833462DC19"
396 | {
397 | "Name" = "8:#1916"
398 | "AlwaysCreate" = "11:FALSE"
399 | "Condition" = "8:"
400 | "Transitive" = "11:FALSE"
401 | "Property" = "8:DesktopFolder"
402 | "Folders"
403 | {
404 | }
405 | }
406 | }
407 | "LaunchCondition"
408 | {
409 | "{836E08B8-0285-4809-BA42-01DB6754A45D}:_096E5F5B7473447CAFBCC73469AD83B8"
410 | {
411 | "Name" = "8:Java"
412 | "Condition" = "8:JAVAVERSION>=\"1.6\""
413 | "Message" = "8:Java 1.6 or higher is required for this program. Do you want to download it now?"
414 | "InstallUrl" = "8:http://javadl.sun.com/webapps/download/AutoDL?BundleId=58124"
415 | }
416 | }
417 | "Locator"
418 | {
419 | "{CF66B7F7-B7DA-4B08-A67A-233430638C9C}:_4D29848710B24F60B9140D1ED38AFE08"
420 | {
421 | "Name" = "8:Search for Java"
422 | "Root" = "2:1"
423 | "RegKey" = "8:SOFTWARE\\JavaSoft\\Java Runtime Environment"
424 | "Value" = "8:CurrentVersion"
425 | "Property" = "8:JAVAVERSION"
426 | }
427 | }
428 | "MsiBootstrapper"
429 | {
430 | "LangId" = "3:1033"
431 | "RequiresElevation" = "11:FALSE"
432 | }
433 | "Product"
434 | {
435 | "Name" = "8:Microsoft Visual Studio"
436 | "ProductName" = "8:APK Edit"
437 | "ProductCode" = "8:{A64134A3-EC70-4984-8F36-3C3860F0F8BA}"
438 | "PackageCode" = "8:{3359E838-095F-4CA4-8DC8-670527706E53}"
439 | "UpgradeCode" = "8:{E4027CB5-2AD2-4FB3-8D26-859496A7061B}"
440 | "AspNetVersion" = "8:4.0.30319.0"
441 | "RestartWWWService" = "11:FALSE"
442 | "RemovePreviousVersions" = "11:TRUE"
443 | "DetectNewerInstalledVersion" = "11:TRUE"
444 | "InstallAllUsers" = "11:TRUE"
445 | "ProductVersion" = "8:0.0.5"
446 | "Manufacturer" = "8:Wouter Spaans"
447 | "ARPHELPTELEPHONE" = "8:"
448 | "ARPHELPLINK" = "8:"
449 | "Title" = "8:APK Edit"
450 | "Subject" = "8:"
451 | "ARPCONTACT" = "8:Wouter Spaans"
452 | "Keywords" = "8:APK Edit"
453 | "ARPCOMMENTS" = "8:Allows you to edit your apk file"
454 | "ARPURLINFOABOUT" = "8:https://github.com/WouterSpaans/APK-Edit"
455 | "ARPPRODUCTICON" = "8:"
456 | "ARPIconIndex" = "3:0"
457 | "SearchPath" = "8:"
458 | "UseSystemSearchPath" = "11:TRUE"
459 | "TargetPlatform" = "3:0"
460 | "PreBuildEvent" = "8:"
461 | "PostBuildEvent" = "8:"
462 | "RunPostBuildEvent" = "3:0"
463 | }
464 | "Registry"
465 | {
466 | "HKLM"
467 | {
468 | "Keys"
469 | {
470 | "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_C611750BDC084807A6F28502C438F4CB"
471 | {
472 | "Name" = "8:Software"
473 | "Condition" = "8:"
474 | "AlwaysCreate" = "11:FALSE"
475 | "DeleteAtUninstall" = "11:FALSE"
476 | "Transitive" = "11:FALSE"
477 | "Keys"
478 | {
479 | "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_B6BFC948E58B4F6DA483DCD231925C02"
480 | {
481 | "Name" = "8:[Manufacturer]"
482 | "Condition" = "8:"
483 | "AlwaysCreate" = "11:FALSE"
484 | "DeleteAtUninstall" = "11:FALSE"
485 | "Transitive" = "11:FALSE"
486 | "Keys"
487 | {
488 | }
489 | "Values"
490 | {
491 | }
492 | }
493 | }
494 | "Values"
495 | {
496 | }
497 | }
498 | }
499 | }
500 | "HKCU"
501 | {
502 | "Keys"
503 | {
504 | "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_C8105B8B82494D36AE8B995FC67803A6"
505 | {
506 | "Name" = "8:Software"
507 | "Condition" = "8:"
508 | "AlwaysCreate" = "11:FALSE"
509 | "DeleteAtUninstall" = "11:FALSE"
510 | "Transitive" = "11:FALSE"
511 | "Keys"
512 | {
513 | "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_E2C6C5D03CBA467A89C35BE0F0DCE409"
514 | {
515 | "Name" = "8:[Manufacturer]"
516 | "Condition" = "8:"
517 | "AlwaysCreate" = "11:FALSE"
518 | "DeleteAtUninstall" = "11:FALSE"
519 | "Transitive" = "11:FALSE"
520 | "Keys"
521 | {
522 | }
523 | "Values"
524 | {
525 | }
526 | }
527 | }
528 | "Values"
529 | {
530 | }
531 | }
532 | }
533 | }
534 | "HKCR"
535 | {
536 | "Keys"
537 | {
538 | }
539 | }
540 | "HKU"
541 | {
542 | "Keys"
543 | {
544 | }
545 | }
546 | "HKPU"
547 | {
548 | "Keys"
549 | {
550 | }
551 | }
552 | }
553 | "Sequences"
554 | {
555 | }
556 | "Shortcut"
557 | {
558 | }
559 | "UserInterface"
560 | {
561 | "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_0543B1961DCE4D148C2FBFB56022A74A"
562 | {
563 | "Name" = "8:#1901"
564 | "Sequence" = "3:2"
565 | "Attributes" = "3:2"
566 | "Dialogs"
567 | {
568 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_9A5D187400C3477D947F74BEDAFC67EF"
569 | {
570 | "Sequence" = "3:100"
571 | "DisplayName" = "8:Progress"
572 | "UseDynamicProperties" = "11:TRUE"
573 | "IsDependency" = "11:FALSE"
574 | "SourcePath" = "8:\\VsdAdminProgressDlg.wid"
575 | "Properties"
576 | {
577 | "BannerBitmap"
578 | {
579 | "Name" = "8:BannerBitmap"
580 | "DisplayName" = "8:#1001"
581 | "Description" = "8:#1101"
582 | "Type" = "3:8"
583 | "ContextData" = "8:Bitmap"
584 | "Attributes" = "3:4"
585 | "Setting" = "3:1"
586 | "UsePlugInResources" = "11:TRUE"
587 | }
588 | "ShowProgress"
589 | {
590 | "Name" = "8:ShowProgress"
591 | "DisplayName" = "8:#1009"
592 | "Description" = "8:#1109"
593 | "Type" = "3:5"
594 | "ContextData" = "8:1;True=1;False=0"
595 | "Attributes" = "3:0"
596 | "Setting" = "3:0"
597 | "Value" = "3:1"
598 | "DefaultValue" = "3:1"
599 | "UsePlugInResources" = "11:TRUE"
600 | }
601 | }
602 | }
603 | }
604 | }
605 | "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_25EFD81D2CCF46B0900F4A9311FD57CA"
606 | {
607 | "Name" = "8:#1901"
608 | "Sequence" = "3:1"
609 | "Attributes" = "3:2"
610 | "Dialogs"
611 | {
612 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A7B9902904ED4F5984D874184E1667EC"
613 | {
614 | "Sequence" = "3:100"
615 | "DisplayName" = "8:Progress"
616 | "UseDynamicProperties" = "11:TRUE"
617 | "IsDependency" = "11:FALSE"
618 | "SourcePath" = "8:\\VsdProgressDlg.wid"
619 | "Properties"
620 | {
621 | "BannerBitmap"
622 | {
623 | "Name" = "8:BannerBitmap"
624 | "DisplayName" = "8:#1001"
625 | "Description" = "8:#1101"
626 | "Type" = "3:8"
627 | "ContextData" = "8:Bitmap"
628 | "Attributes" = "3:4"
629 | "Setting" = "3:1"
630 | "UsePlugInResources" = "11:TRUE"
631 | }
632 | "ShowProgress"
633 | {
634 | "Name" = "8:ShowProgress"
635 | "DisplayName" = "8:#1009"
636 | "Description" = "8:#1109"
637 | "Type" = "3:5"
638 | "ContextData" = "8:1;True=1;False=0"
639 | "Attributes" = "3:0"
640 | "Setting" = "3:0"
641 | "Value" = "3:1"
642 | "DefaultValue" = "3:1"
643 | "UsePlugInResources" = "11:TRUE"
644 | }
645 | }
646 | }
647 | }
648 | }
649 | "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_28DE29AC996F41A9B5E7F6A39ED3D9D3"
650 | {
651 | "UseDynamicProperties" = "11:FALSE"
652 | "IsDependency" = "11:FALSE"
653 | "SourcePath" = "8:\\VsdBasicDialogs.wim"
654 | }
655 | "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_3D6640B5B12D467FA4670AE63EF962D8"
656 | {
657 | "Name" = "8:#1900"
658 | "Sequence" = "3:2"
659 | "Attributes" = "3:1"
660 | "Dialogs"
661 | {
662 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_463BF567B40F4843A9252442803B1900"
663 | {
664 | "Sequence" = "3:300"
665 | "DisplayName" = "8:Confirm Installation"
666 | "UseDynamicProperties" = "11:TRUE"
667 | "IsDependency" = "11:FALSE"
668 | "SourcePath" = "8:\\VsdAdminConfirmDlg.wid"
669 | "Properties"
670 | {
671 | "BannerBitmap"
672 | {
673 | "Name" = "8:BannerBitmap"
674 | "DisplayName" = "8:#1001"
675 | "Description" = "8:#1101"
676 | "Type" = "3:8"
677 | "ContextData" = "8:Bitmap"
678 | "Attributes" = "3:4"
679 | "Setting" = "3:1"
680 | "UsePlugInResources" = "11:TRUE"
681 | }
682 | }
683 | }
684 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_97DBB705D32A4EFF8C3A43059B8675AA"
685 | {
686 | "Sequence" = "3:200"
687 | "DisplayName" = "8:Installation Folder"
688 | "UseDynamicProperties" = "11:TRUE"
689 | "IsDependency" = "11:FALSE"
690 | "SourcePath" = "8:\\VsdAdminFolderDlg.wid"
691 | "Properties"
692 | {
693 | "BannerBitmap"
694 | {
695 | "Name" = "8:BannerBitmap"
696 | "DisplayName" = "8:#1001"
697 | "Description" = "8:#1101"
698 | "Type" = "3:8"
699 | "ContextData" = "8:Bitmap"
700 | "Attributes" = "3:4"
701 | "Setting" = "3:1"
702 | "UsePlugInResources" = "11:TRUE"
703 | }
704 | }
705 | }
706 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_C79E5844F7D74945A4AD5E4F4039A0BA"
707 | {
708 | "Sequence" = "3:100"
709 | "DisplayName" = "8:Welcome"
710 | "UseDynamicProperties" = "11:TRUE"
711 | "IsDependency" = "11:FALSE"
712 | "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid"
713 | "Properties"
714 | {
715 | "BannerBitmap"
716 | {
717 | "Name" = "8:BannerBitmap"
718 | "DisplayName" = "8:#1001"
719 | "Description" = "8:#1101"
720 | "Type" = "3:8"
721 | "ContextData" = "8:Bitmap"
722 | "Attributes" = "3:4"
723 | "Setting" = "3:1"
724 | "UsePlugInResources" = "11:TRUE"
725 | }
726 | "CopyrightWarning"
727 | {
728 | "Name" = "8:CopyrightWarning"
729 | "DisplayName" = "8:#1002"
730 | "Description" = "8:#1102"
731 | "Type" = "3:3"
732 | "ContextData" = "8:"
733 | "Attributes" = "3:0"
734 | "Setting" = "3:1"
735 | "Value" = "8:#1202"
736 | "DefaultValue" = "8:#1202"
737 | "UsePlugInResources" = "11:TRUE"
738 | }
739 | "Welcome"
740 | {
741 | "Name" = "8:Welcome"
742 | "DisplayName" = "8:#1003"
743 | "Description" = "8:#1103"
744 | "Type" = "3:3"
745 | "ContextData" = "8:"
746 | "Attributes" = "3:0"
747 | "Setting" = "3:1"
748 | "Value" = "8:#1203"
749 | "DefaultValue" = "8:#1203"
750 | "UsePlugInResources" = "11:TRUE"
751 | }
752 | }
753 | }
754 | }
755 | }
756 | "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_54EBB96A8686428E8F8B95312EDA045E"
757 | {
758 | "Name" = "8:#1900"
759 | "Sequence" = "3:1"
760 | "Attributes" = "3:1"
761 | "Dialogs"
762 | {
763 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_066F3B8D07EE4CE7B9256A7FBD586CA6"
764 | {
765 | "Sequence" = "3:300"
766 | "DisplayName" = "8:Confirm Installation"
767 | "UseDynamicProperties" = "11:TRUE"
768 | "IsDependency" = "11:FALSE"
769 | "SourcePath" = "8:\\VsdConfirmDlg.wid"
770 | "Properties"
771 | {
772 | "BannerBitmap"
773 | {
774 | "Name" = "8:BannerBitmap"
775 | "DisplayName" = "8:#1001"
776 | "Description" = "8:#1101"
777 | "Type" = "3:8"
778 | "ContextData" = "8:Bitmap"
779 | "Attributes" = "3:4"
780 | "Setting" = "3:1"
781 | "UsePlugInResources" = "11:TRUE"
782 | }
783 | }
784 | }
785 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_5CA70A5F2FA643A0A987A20966F8B847"
786 | {
787 | "Sequence" = "3:200"
788 | "DisplayName" = "8:Installation Folder"
789 | "UseDynamicProperties" = "11:TRUE"
790 | "IsDependency" = "11:FALSE"
791 | "SourcePath" = "8:\\VsdFolderDlg.wid"
792 | "Properties"
793 | {
794 | "BannerBitmap"
795 | {
796 | "Name" = "8:BannerBitmap"
797 | "DisplayName" = "8:#1001"
798 | "Description" = "8:#1101"
799 | "Type" = "3:8"
800 | "ContextData" = "8:Bitmap"
801 | "Attributes" = "3:4"
802 | "Setting" = "3:1"
803 | "UsePlugInResources" = "11:TRUE"
804 | }
805 | "InstallAllUsersVisible"
806 | {
807 | "Name" = "8:InstallAllUsersVisible"
808 | "DisplayName" = "8:#1059"
809 | "Description" = "8:#1159"
810 | "Type" = "3:5"
811 | "ContextData" = "8:1;True=1;False=0"
812 | "Attributes" = "3:0"
813 | "Setting" = "3:0"
814 | "Value" = "3:1"
815 | "DefaultValue" = "3:1"
816 | "UsePlugInResources" = "11:TRUE"
817 | }
818 | }
819 | }
820 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F985084E6C5A48E2A5F8EBC88333606B"
821 | {
822 | "Sequence" = "3:100"
823 | "DisplayName" = "8:Welcome"
824 | "UseDynamicProperties" = "11:TRUE"
825 | "IsDependency" = "11:FALSE"
826 | "SourcePath" = "8:\\VsdWelcomeDlg.wid"
827 | "Properties"
828 | {
829 | "BannerBitmap"
830 | {
831 | "Name" = "8:BannerBitmap"
832 | "DisplayName" = "8:#1001"
833 | "Description" = "8:#1101"
834 | "Type" = "3:8"
835 | "ContextData" = "8:Bitmap"
836 | "Attributes" = "3:4"
837 | "Setting" = "3:1"
838 | "UsePlugInResources" = "11:TRUE"
839 | }
840 | "CopyrightWarning"
841 | {
842 | "Name" = "8:CopyrightWarning"
843 | "DisplayName" = "8:#1002"
844 | "Description" = "8:#1102"
845 | "Type" = "3:3"
846 | "ContextData" = "8:"
847 | "Attributes" = "3:0"
848 | "Setting" = "3:1"
849 | "Value" = "8:#1202"
850 | "DefaultValue" = "8:#1202"
851 | "UsePlugInResources" = "11:TRUE"
852 | }
853 | "Welcome"
854 | {
855 | "Name" = "8:Welcome"
856 | "DisplayName" = "8:#1003"
857 | "Description" = "8:#1103"
858 | "Type" = "3:3"
859 | "ContextData" = "8:"
860 | "Attributes" = "3:0"
861 | "Setting" = "3:1"
862 | "Value" = "8:#1203"
863 | "DefaultValue" = "8:#1203"
864 | "UsePlugInResources" = "11:TRUE"
865 | }
866 | }
867 | }
868 | }
869 | }
870 | "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_CDCABBBF25724FC3853D836B95B9C166"
871 | {
872 | "Name" = "8:#1902"
873 | "Sequence" = "3:2"
874 | "Attributes" = "3:3"
875 | "Dialogs"
876 | {
877 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_052F4EE897584C95AC9EEA90E6050DC0"
878 | {
879 | "Sequence" = "3:100"
880 | "DisplayName" = "8:Finished"
881 | "UseDynamicProperties" = "11:TRUE"
882 | "IsDependency" = "11:FALSE"
883 | "SourcePath" = "8:\\VsdAdminFinishedDlg.wid"
884 | "Properties"
885 | {
886 | "BannerBitmap"
887 | {
888 | "Name" = "8:BannerBitmap"
889 | "DisplayName" = "8:#1001"
890 | "Description" = "8:#1101"
891 | "Type" = "3:8"
892 | "ContextData" = "8:Bitmap"
893 | "Attributes" = "3:4"
894 | "Setting" = "3:1"
895 | "UsePlugInResources" = "11:TRUE"
896 | }
897 | }
898 | }
899 | }
900 | }
901 | "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_D2A93B468D8543F1AC62263391C19E51"
902 | {
903 | "Name" = "8:#1902"
904 | "Sequence" = "3:1"
905 | "Attributes" = "3:3"
906 | "Dialogs"
907 | {
908 | "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_36D7E26820424A6799164DDF108C9FDF"
909 | {
910 | "Sequence" = "3:100"
911 | "DisplayName" = "8:Finished"
912 | "UseDynamicProperties" = "11:TRUE"
913 | "IsDependency" = "11:FALSE"
914 | "SourcePath" = "8:\\VsdFinishedDlg.wid"
915 | "Properties"
916 | {
917 | "BannerBitmap"
918 | {
919 | "Name" = "8:BannerBitmap"
920 | "DisplayName" = "8:#1001"
921 | "Description" = "8:#1101"
922 | "Type" = "3:8"
923 | "ContextData" = "8:Bitmap"
924 | "Attributes" = "3:4"
925 | "Setting" = "3:1"
926 | "UsePlugInResources" = "11:TRUE"
927 | }
928 | "UpdateText"
929 | {
930 | "Name" = "8:UpdateText"
931 | "DisplayName" = "8:#1058"
932 | "Description" = "8:#1158"
933 | "Type" = "3:15"
934 | "ContextData" = "8:"
935 | "Attributes" = "3:0"
936 | "Setting" = "3:1"
937 | "Value" = "8:#1258"
938 | "DefaultValue" = "8:#1258"
939 | "UsePlugInResources" = "11:TRUE"
940 | }
941 | }
942 | }
943 | }
944 | }
945 | "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_D8F41852C4D945E8BC997BB2AE8CE040"
946 | {
947 | "UseDynamicProperties" = "11:FALSE"
948 | "IsDependency" = "11:FALSE"
949 | "SourcePath" = "8:\\VsdUserInterface.wim"
950 | }
951 | }
952 | "MergeModule"
953 | {
954 | }
955 | "ProjectOutput"
956 | {
957 | "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_413969CB359A43789A0A0139980AB08E"
958 | {
959 | "SourcePath" = "8:"
960 | "TargetName" = "8:"
961 | "Tag" = "8:"
962 | "Folder" = "8:_A5AA208578524FABB8CCBCD94CBEED81"
963 | "Condition" = "8:"
964 | "Transitive" = "11:FALSE"
965 | "Vital" = "11:TRUE"
966 | "ReadOnly" = "11:FALSE"
967 | "Hidden" = "11:FALSE"
968 | "System" = "11:FALSE"
969 | "Permanent" = "11:FALSE"
970 | "SharedLegacy" = "11:FALSE"
971 | "PackageAs" = "3:1"
972 | "Register" = "3:1"
973 | "Exclude" = "11:FALSE"
974 | "IsDependency" = "11:FALSE"
975 | "IsolateTo" = "8:"
976 | "ProjectOutputGroupRegister" = "3:1"
977 | "OutputConfiguration" = "8:"
978 | "OutputGroupCanonicalName" = "8:ContentFiles"
979 | "OutputProjectGuid" = "8:{1AAC66A7-C638-4B71-8A56-8725216E075C}"
980 | "ShowKeyOutput" = "11:TRUE"
981 | "ExcludeFilters"
982 | {
983 | }
984 | }
985 | "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_8CCCBE0339F6455BA759A90DB8BBA385"
986 | {
987 | "SourcePath" = "8:..\\APK Edit\\obj\\x86\\Debug\\APK Edit.exe"
988 | "TargetName" = "8:"
989 | "Tag" = "8:"
990 | "Folder" = "8:_A5AA208578524FABB8CCBCD94CBEED81"
991 | "Condition" = "8:"
992 | "Transitive" = "11:FALSE"
993 | "Vital" = "11:TRUE"
994 | "ReadOnly" = "11:FALSE"
995 | "Hidden" = "11:FALSE"
996 | "System" = "11:FALSE"
997 | "Permanent" = "11:FALSE"
998 | "SharedLegacy" = "11:FALSE"
999 | "PackageAs" = "3:1"
1000 | "Register" = "3:1"
1001 | "Exclude" = "11:FALSE"
1002 | "IsDependency" = "11:FALSE"
1003 | "IsolateTo" = "8:"
1004 | "ProjectOutputGroupRegister" = "3:1"
1005 | "OutputConfiguration" = "8:"
1006 | "OutputGroupCanonicalName" = "8:Built"
1007 | "OutputProjectGuid" = "8:{ECEE93A4-D620-48DD-A2D7-9F4ED7EC4406}"
1008 | "ShowKeyOutput" = "11:TRUE"
1009 | "ExcludeFilters"
1010 | {
1011 | }
1012 | }
1013 | "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_F830704464E041038BB96185D80C793C"
1014 | {
1015 | "SourcePath" = "8:"
1016 | "TargetName" = "8:"
1017 | "Tag" = "8:"
1018 | "Folder" = "8:_A5AA208578524FABB8CCBCD94CBEED81"
1019 | "Condition" = "8:"
1020 | "Transitive" = "11:FALSE"
1021 | "Vital" = "11:TRUE"
1022 | "ReadOnly" = "11:FALSE"
1023 | "Hidden" = "11:FALSE"
1024 | "System" = "11:FALSE"
1025 | "Permanent" = "11:FALSE"
1026 | "SharedLegacy" = "11:FALSE"
1027 | "PackageAs" = "3:1"
1028 | "Register" = "3:1"
1029 | "Exclude" = "11:FALSE"
1030 | "IsDependency" = "11:FALSE"
1031 | "IsolateTo" = "8:"
1032 | "ProjectOutputGroupRegister" = "3:1"
1033 | "OutputConfiguration" = "8:"
1034 | "OutputGroupCanonicalName" = "8:ContentFiles"
1035 | "OutputProjectGuid" = "8:{FD7D2FC3-7037-44B3-80FD-1798F3A15A96}"
1036 | "ShowKeyOutput" = "11:TRUE"
1037 | "ExcludeFilters"
1038 | {
1039 | }
1040 | }
1041 | "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_FAA1D2C7DB3A4AB1AAB22E2571A9E8A4"
1042 | {
1043 | "SourcePath" = "8:"
1044 | "TargetName" = "8:"
1045 | "Tag" = "8:"
1046 | "Folder" = "8:_A5AA208578524FABB8CCBCD94CBEED81"
1047 | "Condition" = "8:"
1048 | "Transitive" = "11:FALSE"
1049 | "Vital" = "11:TRUE"
1050 | "ReadOnly" = "11:FALSE"
1051 | "Hidden" = "11:FALSE"
1052 | "System" = "11:FALSE"
1053 | "Permanent" = "11:FALSE"
1054 | "SharedLegacy" = "11:FALSE"
1055 | "PackageAs" = "3:1"
1056 | "Register" = "3:1"
1057 | "Exclude" = "11:FALSE"
1058 | "IsDependency" = "11:FALSE"
1059 | "IsolateTo" = "8:"
1060 | "ProjectOutputGroupRegister" = "3:1"
1061 | "OutputConfiguration" = "8:"
1062 | "OutputGroupCanonicalName" = "8:ContentFiles"
1063 | "OutputProjectGuid" = "8:{D8A98AC9-5E23-4282-9237-9AF81B8488CE}"
1064 | "ShowKeyOutput" = "11:TRUE"
1065 | "ExcludeFilters"
1066 | {
1067 | }
1068 | }
1069 | }
1070 | }
1071 | }
1072 |
--------------------------------------------------------------------------------
/Test Apk Files/com.htc.WeatherWidget.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/Test Apk Files/com.htc.WeatherWidget.apk
--------------------------------------------------------------------------------
/Test Apk Files/com.htc.resources.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/Test Apk Files/com.htc.resources.apk
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Aapt/Aapt.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.IO;
5 | using System.Globalization;
6 | using System.Text;
7 |
8 | namespace Wrappers
9 | {
10 | public static partial class Aapt
11 | {
12 | public static DumpResult Dump(FileInfo SourceFile)
13 | {
14 | DumpResult returnValue = new DumpResult() { sourcefile = SourceFile };
15 |
16 | if (SourceFile.Exists)
17 | if (SourceFile.Extension.ToLower() == ".apk")
18 | {
19 | // Run external command
20 | string[] lines = Command.Run(@"dump badging ""{0}""", SourceFile.FullName).Replace("\r", "").Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
21 | string[] packageLine = GetLines(lines, "package:");
22 | string[] applicationLine = GetLines(lines, "application:");
23 | string[] launchable_activityLine = GetLines(lines, "launchable activity");
24 | string[] sdkVersionLine = GetLines(lines, "sdkVersion:");
25 | string[] targetSdkVersionLine = GetLines(lines, "targetSdkVersion:");
26 | string[] native_codeLine = GetLines(lines, "native-code:");
27 | string[] uses_permissionLine = GetLines(lines, "uses-permission:");
28 | string[] uses_featureLine = GetLines(lines, "uses-feature:");
29 | string[] supports_screensLine = GetLines(lines, "supports-screens: ");
30 |
31 | returnValue.package.name = SearchValue(packageLine, "name=");
32 | returnValue.package.versionCode = SearchValue(packageLine, "versionCode=");
33 | returnValue.package.versionName = SearchValue(packageLine, "versionName=");
34 | returnValue.application.label = SearchValue(applicationLine, "label=");
35 | returnValue.application.icon = SearchValue(applicationLine, "icon=");
36 | returnValue.launchable_activity.name = SearchValue(launchable_activityLine, "name=");
37 | returnValue.launchable_activity.label = SearchValue(launchable_activityLine, "label=");
38 | returnValue.launchable_activity.icon = SearchValue(launchable_activityLine, "icon=");
39 | returnValue.sdkVersion = SearchValue(sdkVersionLine, "sdkVersion:");
40 | returnValue.targetSdkVersion = SearchValue(targetSdkVersionLine, "targetSdkVersion:");
41 | returnValue.native_code = SearchValue(native_codeLine, "native-code: ");
42 | returnValue.uses_permission = SearchValues(uses_permissionLine, "uses-permission:");
43 | returnValue.uses_feature = SearchValues(uses_featureLine, "uses-feature:");
44 | returnValue.supports_screens = Get_Supports_screens(supports_screensLine).ToArray();
45 | returnValue.locales = Get_Locales(lines).ToArray();
46 | returnValue.densities = Get_Densities(lines).ToArray();
47 | }
48 |
49 | return returnValue;
50 | }
51 |
52 | private static string[] GetLines(string[] str, string SearchValue)
53 | {
54 | return str.Where(cust => cust.Contains(SearchValue)).ToArray();
55 | }
56 |
57 | private static string SearchValue(string[] strArr, string SearchValue)
58 | {
59 | string returnValue = "";
60 | if (strArr.Count() > 0)
61 | {
62 | string str = strArr[0]; // Only check first row
63 |
64 | if (!SearchValue.EndsWith("'")) SearchValue += "'"; // Add ' if needed
65 | int i = str.IndexOf(SearchValue) + SearchValue.Length;
66 | int j = str.IndexOf("'", i);
67 |
68 | returnValue = str.Substring(i, j - i);
69 | }
70 |
71 | return returnValue;
72 | }
73 |
74 | private static string[] SearchValues(string[] strArr, string SearchValue)
75 | {
76 | // Add ' if needed
77 | if (!SearchValue.EndsWith("'")) SearchValue += "'";
78 |
79 | List returnValue = new List();
80 | foreach (string line in strArr)
81 | {
82 | if (line.Contains(SearchValue))
83 | {
84 | // remove pre stuff...
85 | // string finalline = line.Replace(SearchValue, "").Replace("'", "").Replace("android.permission.", "").Replace("android.hardware.", "");
86 | int last = line.LastIndexOf('.');
87 | string stripped = line.Substring(last + 1, line.Length - last - 2).Replace("_", " ");
88 | returnValue.Add(CapitalizeWords(stripped));
89 | }
90 | }
91 | return returnValue.ToArray();
92 | }
93 |
94 | private static List Get_Supports_screens(string[] supports_screensLine)
95 | {
96 | //supports_screens
97 | List supports_screensList = new List();
98 | if (supports_screensLine.Count() > 0)
99 | {
100 | if (supports_screensLine[0].Contains("small")) supports_screensList.Add(DumpResult.ScreenType.Small);
101 | if (supports_screensLine[0].Contains("normal")) supports_screensList.Add(DumpResult.ScreenType.Normal);
102 | if (supports_screensLine[0].Contains("large")) supports_screensList.Add(DumpResult.ScreenType.Large);
103 | }
104 | return supports_screensList;
105 | }
106 |
107 | private static List Get_Locales(string[] lines)
108 | {
109 | //public string[] locales;
110 | List l = new List();
111 | string[] localesLine = GetLines(lines, "locales:");
112 | if (localesLine.Count() > 0)
113 | {
114 | char[] split = { ' ' };
115 | string[] locs = localesLine[0].Replace("locales: ", "").Replace("'", "").Split(split, StringSplitOptions.RemoveEmptyEntries);
116 |
117 | // now add real locales?
118 | foreach (string Name in locs)
119 | {
120 | string PathName = Name.Replace("_", "-r");
121 |
122 | string EnglishName;
123 | try
124 | {
125 | CultureInfo culture = CultureInfo.GetCultureInfo(Name.Replace("_", "-"));
126 | EnglishName = string.Format("{0} ({1})", culture.EnglishName, Name);
127 | }
128 | catch
129 | {
130 | if (Name == ("--_--"))
131 | EnglishName = string.Format("Default ({0})", Name);
132 | else
133 | EnglishName = string.Format("Unknown ({0})", Name);
134 | }
135 |
136 | l.Add(new DumpResult.LocaleType(Name, EnglishName, PathName));
137 | }
138 |
139 | }
140 | return l;
141 | }
142 |
143 | private static List Get_Densities(string[] lines)
144 | {
145 | //public int[] densities;
146 | string[] densitiesLine = GetLines(lines, "densities:");
147 | List desList = new List();
148 | if (densitiesLine.Count() > 0)
149 | {
150 | char[] split = { ' ' };
151 | string[] tmpArr;
152 | tmpArr = densitiesLine[0].Replace("densities: ", "").Replace("'", "").Split(split, StringSplitOptions.RemoveEmptyEntries);
153 | // Convert all
154 |
155 | foreach (string val in tmpArr)
156 | {
157 | int outVal;
158 | if (int.TryParse(val, out outVal))
159 | desList.Add(outVal);
160 | }
161 | }
162 | return desList;
163 | }
164 |
165 | private static string CapitalizeWords(string str)
166 | {
167 | if (string.IsNullOrEmpty(str))
168 | return str;
169 |
170 | StringBuilder result = new StringBuilder(str);
171 | result[0] = char.ToUpper(result[0]);
172 | for (int i = 1; i < result.Length; ++i)
173 | result[i] = char.IsWhiteSpace(result[i - 1]) ? char.ToUpper(result[i]) : char.ToLower(result[i]);
174 | return result.ToString();
175 | }
176 | }
177 | }
178 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Aapt/Aapt.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {FD7D2FC3-7037-44B3-80FD-1798F3A15A96}
9 | Library
10 | Properties
11 | Wrappers
12 | Wrappers.Aapt
13 | v4.0
14 | 512
15 | Client
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | Always
52 |
53 |
54 |
55 |
62 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Aapt/Command.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.IO;
5 | using System.Diagnostics;
6 |
7 | namespace Wrappers
8 | {
9 | public partial class Aapt
10 | {
11 | public static class Command
12 | {
13 | private static FileInfo _FileInfo;
14 | public static FileInfo FileInfo
15 | {
16 | get
17 | {
18 | if (_FileInfo != null)
19 | return _FileInfo;
20 |
21 | _FileInfo = new FileInfo(Path.GetDirectoryName(
22 | System.Reflection.Assembly.GetCallingAssembly().Location) +
23 | @"\Tools\apktool\aapt.exe");
24 | return _FileInfo;
25 | }
26 | }
27 |
28 | public static string Run(string argument, params object[] args)
29 | {
30 | string result;
31 | ProcessStartInfo start = new ProcessStartInfo()
32 | {
33 | FileName = FileInfo.FullName,
34 | Arguments = string.Format(argument, args),
35 | UseShellExecute = false,
36 | RedirectStandardOutput = true,
37 | CreateNoWindow = true
38 | };
39 |
40 | using (Process process = Process.Start(start))
41 | using (StreamReader reader = process.StandardOutput)
42 | result = reader.ReadToEnd();
43 |
44 | return result;
45 | }
46 |
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Aapt/PackageInfoType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.IO;
5 | using System.Globalization;
6 |
7 | namespace Wrappers
8 | {
9 | public static partial class Aapt
10 | {
11 | public class DumpResult
12 | {
13 | public FileInfo sourcefile;
14 | public PackageType package;
15 | public ApplicationType application;
16 | public ActivityType launchable_activity;
17 | public string[] uses_permission;
18 | public string[] uses_feature;
19 | public string sdkVersion;
20 | public string targetSdkVersion;
21 | public ScreenType[] supports_screens;
22 | public LocaleType[] locales;
23 | public int[] densities;
24 | public string native_code;
25 |
26 | public enum ScreenType
27 | {
28 | Small, Normal, Large
29 | }
30 |
31 | public class LocaleType
32 | {
33 | public string Name;
34 | public string EnglishName;
35 | public string PathName;
36 |
37 | public LocaleType(string _Name, string _EnglishName, string _PathName)
38 | {
39 | Name = _Name;
40 | EnglishName = _EnglishName;
41 | PathName = _PathName;
42 | }
43 |
44 | public LocaleType(CultureInfo ci)
45 | {
46 | Name = ci.Name;
47 | EnglishName = string.Format("{0} ({1})", ci.EnglishName, ci.Name);
48 | PathName = ci.Name.Replace("_", "-r");
49 | }
50 |
51 | public override string ToString()
52 | {
53 | return EnglishName;
54 | }
55 | }
56 |
57 | public struct PackageType
58 | {
59 | public string name;
60 | public string versionCode;
61 | public string versionName;
62 | }
63 |
64 | public struct ApplicationType
65 | {
66 | public string label;
67 | public string icon;
68 | }
69 |
70 | public struct ActivityType
71 | {
72 | public string name;
73 | public string label;
74 | public string icon;
75 | }
76 | }
77 |
78 |
79 | }
80 | }
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Aapt/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Wrappers.Aapt")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("Wrappers.Aapt")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("8ce00bab-b6ca-437e-b669-b2fce20019fe")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Aapt/Tools/apktool/aapt.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/Wrappers/Wrappers.Aapt/Tools/apktool/aapt.exe
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Apktool/Apktool.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 |
7 | namespace Wrappers
8 | {
9 | public static partial class Apktool
10 | {
11 | public static string Version
12 | {
13 | get
14 | {
15 | return Command.Run(null, null).Output.Substring(9, 5);
16 | }
17 | }
18 | public static Command.RunResult Decode(string apkFile, string directory, bool decodeSources = true, bool decodeResources = true, bool debugMode = false, bool forceDeleteDestination = true, string frameworkTag = null, bool keepBrokenResources = false)
19 | {
20 | return Decode(new FileInfo(apkFile), new DirectoryInfo(directory), decodeSources, decodeResources, debugMode, forceDeleteDestination, frameworkTag, keepBrokenResources);
21 | }
22 |
23 | public static Command.RunResult Decode(FileInfo apkFile, DirectoryInfo directory, bool decodeSources = true, bool decodeResources = true, bool debugMode = false, bool forceDeleteDestination = true, string frameworkTag = null, bool keepBrokenResources = false)
24 | {
25 | string optionalArgs = string.Empty;
26 | if (!decodeSources) optionalArgs += "-s ";
27 | if (!decodeResources) optionalArgs += "-r ";
28 | if (debugMode) optionalArgs += "-d ";
29 | if (forceDeleteDestination) optionalArgs += "-f ";
30 | if (frameworkTag != null) optionalArgs += string.Format("-t {0} ", frameworkTag);
31 | if (keepBrokenResources) optionalArgs += "--keep-broken-res ";
32 |
33 | return Command.Run("d {0} \"{1}\" \"{2}\"", optionalArgs, apkFile.FullName, directory.FullName);
34 | }
35 |
36 |
37 |
38 | public static Command.RunResult Build(string directory, string apkFile, bool forceAll = false, bool debugMode = false)
39 | {
40 | return Build(new DirectoryInfo(directory), new FileInfo(apkFile), forceAll, debugMode);
41 | }
42 |
43 | public static Command.RunResult Build(DirectoryInfo directory, FileInfo apkFile, bool forceAll = false, bool debugMode = false)
44 | {
45 | string optionalArgs = string.Empty;
46 | if (forceAll) optionalArgs += "-f ";
47 | if (debugMode) optionalArgs += "-d ";
48 |
49 | return Command.Run("b {0} \"{1}\" \"{2}\"", optionalArgs, directory.FullName, apkFile.FullName);
50 | }
51 |
52 | public static Command.RunResult InstallFramework(string apkFile, string frameworkTag = null)
53 | {
54 | return InstallFramework(new FileInfo(apkFile), frameworkTag);
55 | }
56 |
57 | public static Command.RunResult InstallFramework(FileInfo apkFile, string frameworkTag = null)
58 | {
59 | return Command.Run("if \"{0}\" {1}", apkFile.FullName, frameworkTag ?? "");
60 | }
61 |
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Apktool/Apktool.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {1AAC66A7-C638-4B71-8A56-8725216E075C}
9 | Library
10 | Properties
11 | Wrappers
12 | Wrappers.Apktool
13 | v4.0
14 | 512
15 | Client
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | Always
51 |
52 |
53 |
54 |
55 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}
56 | Java
57 |
58 |
59 |
60 |
67 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Apktool/Command.cs:
--------------------------------------------------------------------------------
1 | namespace Wrappers
2 | {
3 | using System;
4 | using System.Diagnostics;
5 | using System.IO;
6 |
7 | public partial class Apktool
8 | {
9 | public static class Command
10 | {
11 | private static FileInfo fileInfo;
12 |
13 | public static FileInfo FileInfo
14 | {
15 | get
16 | {
17 | if (fileInfo != null)
18 | {
19 | return fileInfo;
20 | }
21 |
22 | fileInfo = new FileInfo(Path.GetDirectoryName(
23 | System.Reflection.Assembly.GetCallingAssembly().Location) +
24 | @"\Tools\apktool\apktool.jar");
25 | return fileInfo;
26 | }
27 | }
28 |
29 | public static RunResult Run(string argument, params object[] args)
30 | {
31 | return Run(argument, true, args);
32 | }
33 |
34 | public static RunResult Run(string argument, bool waitForExit = true, params object[] args)
35 | {
36 | var runResult = new RunResult();
37 | try
38 | {
39 | string arguments = argument != null && args != null ? string.Format(argument, args) : string.Empty;
40 | var process = new Process();
41 | process.StartInfo.WorkingDirectory = FileInfo.DirectoryName;
42 | process.StartInfo.FileName = Java.Executable.FullName;
43 | process.StartInfo.Arguments = string.Format("-jar \"{0}\" {1}", FileInfo.FullName, arguments);
44 | process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
45 | process.StartInfo.CreateNoWindow = true;
46 | process.StartInfo.UseShellExecute = false;
47 | process.StartInfo.ErrorDialog = false;
48 |
49 | if (waitForExit)
50 | {
51 | process.StartInfo.RedirectStandardOutput = true;
52 | process.StartInfo.RedirectStandardError = true;
53 | process.Start();
54 | StreamReader outputReader = process.StandardOutput;
55 | StreamReader errorReader = process.StandardError;
56 |
57 | runResult.Output = outputReader.ReadToEnd();
58 | runResult.Error = errorReader.ReadToEnd();
59 | process.WaitForExit();
60 | runResult.Succes = true;
61 | }
62 | else
63 | {
64 | process.Start();
65 | runResult.Output = string.Empty;
66 | runResult.Error = string.Empty;
67 | runResult.Succes = true;
68 | }
69 | }
70 | catch (Exception ex)
71 | {
72 | runResult.Output = string.Empty;
73 | runResult.Error = ex.Message;
74 | runResult.Succes = false;
75 | }
76 | return runResult;
77 | }
78 |
79 | public struct RunResult
80 | {
81 | public bool Succes;
82 | public string Output;
83 | public string Error;
84 | }
85 | }
86 | }
87 | }
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Apktool/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Wrappers.Apktool")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("Wrappers.Apktool")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("b6ccf8bb-b88f-463b-8614-98833e0fd246")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Apktool/Tools/apktool/apktool.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/Wrappers/Wrappers.Apktool/Tools/apktool/apktool.jar
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Java/Java.cs:
--------------------------------------------------------------------------------
1 | namespace Wrappers
2 | {
3 | using System;
4 | using System.Diagnostics;
5 | using System.IO;
6 | using System.Net;
7 |
8 | using Microsoft.Win32;
9 |
10 | public static class Java
11 | {
12 | const string JavaKey32 = "SOFTWARE\\JavaSoft\\Java Runtime Environment";
13 | const string JavaKey64 = "SOFTWARE\\Wow6432Node\\JavaSoft\\Java Runtime Environment";
14 |
15 | const string Url64Bit = "http://javadl.sun.com/webapps/download/AutoDL?BundleId=58126";
16 | const string Url32Bit = "http://javadl.sun.com/webapps/download/AutoDL?BundleId=58124";
17 |
18 | const string FileName64Bit = "jre-6u30-windows-x64.exe";
19 | const string FileName32Bit = "jre-6u30-windows-i586-s.exe";
20 |
21 | public static bool Installed
22 | {
23 | get { return Executable != null; }
24 | }
25 |
26 | public static FileInfo Executable
27 | {
28 | get
29 | {
30 | var installDirectory = InstallDirectory;
31 | if (installDirectory != null)
32 | {
33 | var fileName = installDirectory.FullName + @"\bin\java.exe";
34 | var returnValue = new FileInfo(fileName);
35 | if (returnValue.Exists)
36 | {
37 | return returnValue;
38 | }
39 | }
40 |
41 | return null;
42 | }
43 | }
44 |
45 | public static DirectoryInfo InstallDirectory
46 | {
47 | get
48 | {
49 |
50 | bool javaKey32Found;
51 | bool javaKey64Found;
52 |
53 | using (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).OpenSubKey(JavaKey32))
54 | {
55 | javaKey32Found = baseKey != null;
56 | }
57 |
58 | using (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).OpenSubKey(JavaKey64))
59 | {
60 | javaKey64Found = baseKey != null;
61 | }
62 |
63 | if (javaKey32Found || javaKey64Found)
64 | {
65 | using (var baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).OpenSubKey(javaKey32Found ? JavaKey32 : JavaKey64))
66 | {
67 | if (baseKey != null)
68 | {
69 | using (var homeKey = baseKey.OpenSubKey(baseKey.GetValue("CurrentVersion").ToString()))
70 | {
71 | if (homeKey != null)
72 | {
73 | string javaHome = homeKey.GetValue("JavaHome").ToString();
74 | if (!string.IsNullOrEmpty(javaHome))
75 | {
76 | var javaHomeDirectoryInfo = new DirectoryInfo(javaHome);
77 | if (javaHomeDirectoryInfo.Exists)
78 | {
79 | return javaHomeDirectoryInfo;
80 | }
81 | }
82 | }
83 | }
84 | }
85 | }
86 | }
87 |
88 | return null;
89 | }
90 | }
91 |
92 | public static void Install()
93 | {
94 | string url = Environment.Is64BitProcess ? Url64Bit : Url32Bit;
95 | string filename = Environment.Is64BitProcess ? FileName64Bit : FileName32Bit;
96 |
97 | var client = new WebClient();
98 | client.DownloadFile(url, filename);
99 |
100 | // Install with option [/s]
101 | var start = new ProcessStartInfo
102 | {
103 | FileName = filename,
104 | Arguments = "/s",
105 | UseShellExecute = false,
106 | RedirectStandardOutput = true
107 | };
108 |
109 | using (Process process = Process.Start(start))
110 | {
111 | using (StreamReader reader = process.StandardOutput)
112 | {
113 | reader.ReadToEnd();
114 | }
115 | }
116 |
117 | // Cleanup downloaded file
118 | var javaDownload = new FileInfo(filename);
119 | if (javaDownload.Exists)
120 | {
121 | if (WaitForFile(javaDownload.FullName))
122 | {
123 | javaDownload.Delete();
124 | }
125 | }
126 | }
127 |
128 | public static void UnInstall()
129 | {
130 | var start = new ProcessStartInfo()
131 | {
132 | FileName = "MsiExec.exe",
133 | Arguments = "/X {26A24AE4-039D-4CA4-87B4-2F86416030FF} /QUIET",
134 | UseShellExecute = false,
135 | RedirectStandardOutput = true
136 | };
137 |
138 | using (Process process = Process.Start(start))
139 | {
140 | using (StreamReader reader = process.StandardOutput)
141 | {
142 | reader.ReadToEnd();
143 | }
144 | }
145 | }
146 |
147 | ///
148 | /// Blocks until the file is not locked any more.
149 | ///
150 | ///
151 | private static bool WaitForFile(string fullPath)
152 | {
153 | int numTries = 0;
154 | while (true)
155 | {
156 | ++numTries;
157 | try
158 | {
159 | // Attempt to open the file exclusively.
160 | using (FileStream fs = new FileStream(fullPath,
161 | FileMode.Open, FileAccess.ReadWrite,
162 | FileShare.None, 100))
163 | {
164 | fs.ReadByte();
165 |
166 | // If we got this far the file is ready
167 | break;
168 | }
169 | }
170 | catch
171 | {
172 | //Log.LogWarning(
173 | // "WaitForFile {0} failed to get an exclusive lock: {1}",
174 | // fullPath, ex.ToString());
175 |
176 | if (numTries > 10)
177 | {
178 | //Log.LogWarning(
179 | // "WaitForFile {0} giving up after 10 tries",
180 | // fullPath);
181 | return false;
182 | }
183 |
184 | // Wait for the lock to be released
185 | System.Threading.Thread.Sleep(500);
186 | }
187 | }
188 |
189 | //Log.LogTrace("WaitForFile {0} returning true after {1} tries",
190 | // fullPath, numTries);
191 | return true;
192 | }
193 |
194 |
195 | }
196 | }
197 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Java/Java.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}
9 | Library
10 | Properties
11 | Wrappers
12 | Wrappers.Java
13 | v4.0
14 | 512
15 | Client
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
55 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Java/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Wrappers.Java")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("Wrappers.Java")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("072460cc-4f1c-4b55-9bc3-425a082524c1")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Signapk/Command.cs:
--------------------------------------------------------------------------------
1 | namespace Wrappers
2 | {
3 | using System;
4 | using System.Diagnostics;
5 | using System.IO;
6 |
7 | public partial class Signapk
8 | {
9 | public static class Command
10 | {
11 | private static FileInfo fileInfo;
12 |
13 | public static FileInfo FileInfo
14 | {
15 | get
16 | {
17 | if (fileInfo != null)
18 | {
19 | return fileInfo;
20 | }
21 |
22 | fileInfo = new FileInfo(Path.GetDirectoryName(
23 | System.Reflection.Assembly.GetCallingAssembly().Location) +
24 | @"\Tools\signapk\signapk.jar");
25 | return fileInfo;
26 | }
27 | }
28 |
29 | public static RunResult Run(string argument, params object[] args)
30 | {
31 | return Run(argument, true, args);
32 | }
33 |
34 | public static RunResult Run(string argument, bool waitForExit = true, params object[] args)
35 | {
36 | var runResult = new RunResult();
37 | try
38 | {
39 | string arguments = argument != null && args != null ? string.Format(argument, args) : string.Empty;
40 | var process = new Process();
41 | process.StartInfo.WorkingDirectory = FileInfo.DirectoryName;
42 | process.StartInfo.FileName = Java.Executable.FullName;
43 | process.StartInfo.Arguments = string.Format("-jar \"{0}\" {1}", FileInfo.FullName, arguments);
44 | process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
45 | process.StartInfo.CreateNoWindow = true;
46 | process.StartInfo.UseShellExecute = false;
47 | process.StartInfo.ErrorDialog = false;
48 |
49 | if (waitForExit)
50 | {
51 | process.StartInfo.RedirectStandardOutput = true;
52 | process.StartInfo.RedirectStandardError = true;
53 | process.Start();
54 | StreamReader outputReader = process.StandardOutput;
55 | StreamReader errorReader = process.StandardError;
56 |
57 | runResult.Output = outputReader.ReadToEnd();
58 | runResult.Error = errorReader.ReadToEnd();
59 | process.WaitForExit();
60 | runResult.Succes = true;
61 | }
62 | else
63 | {
64 | process.Start();
65 | runResult.Output = string.Empty;
66 | runResult.Error = string.Empty;
67 | runResult.Succes = true;
68 | }
69 | }
70 | catch (Exception ex)
71 | {
72 | runResult.Output = string.Empty;
73 | runResult.Error = ex.Message;
74 | runResult.Succes = false;
75 | }
76 | return runResult;
77 | }
78 |
79 | public struct RunResult
80 | {
81 | public bool Succes;
82 | public string Output;
83 | public string Error;
84 | }
85 | }
86 | }
87 | }
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Signapk/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Wrappers.Signapk")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("Wrappers.Signapk")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("06ad548b-b17e-4ff7-b903-3b276352c606")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Signapk/Signapk.cs:
--------------------------------------------------------------------------------
1 | namespace Wrappers
2 | {
3 | using System.IO;
4 |
5 | public partial class Signapk
6 | {
7 | public static string Sign(string apkFile, bool overWrite)
8 | {
9 | return Sign(new FileInfo(apkFile), overWrite).FullName;
10 | }
11 |
12 | public static FileInfo Sign(FileInfo apkFile, bool overWrite)
13 | {
14 | var signedApkFile = new FileInfo(Path.ChangeExtension(apkFile.FullName, null) + "-signed" + apkFile.Extension);
15 |
16 | Command.Run(
17 | "-w \"{0}\\testkey.x509.pem\" \"{0}\\testkey.pk8\" \"{1}\" \"{2}\"",
18 | Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().Location) + @"\Tools\signapk",
19 | apkFile.FullName,
20 | signedApkFile.FullName);
21 |
22 | if (overWrite)
23 | {
24 | apkFile.Delete();
25 | signedApkFile.MoveTo(apkFile.FullName);
26 | }
27 |
28 | return signedApkFile;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Signapk/Signapk.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {D8A98AC9-5E23-4282-9237-9AF81B8488CE}
9 | Library
10 | Properties
11 | Wrappers
12 | Wrappers.Signapk
13 | v4.0
14 | 512
15 | Client
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | Always
51 |
52 |
53 |
54 |
55 | Always
56 |
57 |
58 | Always
59 |
60 |
61 |
62 |
63 | {0277F2C6-EF61-4EC7-A17C-8CD0663C0258}
64 | Java
65 |
66 |
67 |
68 |
75 |
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Signapk/Tools/signapk/signapk.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/Wrappers/Wrappers.Signapk/Tools/signapk/signapk.jar
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Signapk/Tools/signapk/testkey.pk8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WouterSpaans/APK-Edit/5a0744ff337eedf971c09dad30bafe5f8d4eff4c/Wrappers/Wrappers.Signapk/Tools/signapk/testkey.pk8
--------------------------------------------------------------------------------
/Wrappers/Wrappers.Signapk/Tools/signapk/testkey.x509.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIEqDCCA5CgAwIBAgIJAJNurL4H8gHfMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
3 | VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g
4 | VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE
5 | AxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe
6 | Fw0wODAyMjkwMTMzNDZaFw0zNTA3MTcwMTMzNDZaMIGUMQswCQYDVQQGEwJVUzET
7 | MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G
8 | A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p
9 | ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI
10 | hvcNAQEBBQADggENADCCAQgCggEBANaTGQTexgskse3HYuDZ2CU+Ps1s6x3i/waM
11 | qOi8qM1r03hupwqnbOYOuw+ZNVn/2T53qUPn6D1LZLjk/qLT5lbx4meoG7+yMLV4
12 | wgRDvkxyGLhG9SEVhvA4oU6Jwr44f46+z4/Kw9oe4zDJ6pPQp8PcSvNQIg1QCAcy
13 | 4ICXF+5qBTNZ5qaU7Cyz8oSgpGbIepTYOzEJOmc3Li9kEsBubULxWBjf/gOBzAzU
14 | RNps3cO4JFgZSAGzJWQTT7/emMkod0jb9WdqVA2BVMi7yge54kdVMxHEa5r3b97s
15 | zI5p58ii0I54JiCUP5lyfTwE/nKZHZnfm644oLIXf6MdW2r+6R8CAQOjgfwwgfkw
16 | HQYDVR0OBBYEFEhZAFY9JyxGrhGGBaR0GawJyowRMIHJBgNVHSMEgcEwgb6AFEhZ
17 | AFY9JyxGrhGGBaR0GawJyowRoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UE
18 | CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMH
19 | QW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAG
20 | CSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJAJNurL4H8gHfMAwGA1Ud
21 | EwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHqvlozrUMRBBVEY0NqrrwFbinZa
22 | J6cVosK0TyIUFf/azgMJWr+kLfcHCHJsIGnlw27drgQAvilFLAhLwn62oX6snb4Y
23 | LCBOsVMR9FXYJLZW2+TcIkCRLXWG/oiVHQGo/rWuWkJgU134NDEFJCJGjDbiLCpe
24 | +ZTWHdcwauTJ9pUbo8EvHRkU3cYfGmLaLfgn9gP+pWA7LFQNvXwBnDa6sppCccEX
25 | 31I828XzgXpJ4O+mDL1/dBd+ek8ZPUP0IgdyZm5MTYPhvVqGCHzzTy3sIeJFymwr
26 | sBbmg2OAUNLEMO6nwmocSdN2ClirfxqCzJOLSDE4QyS9BAH6EhY6UFcOaE0=
27 | -----END CERTIFICATE-----
28 |
--------------------------------------------------------------------------------