├── .gitee
├── ISSUE_TEMPLATE.zh-CN.md
└── PULL_REQUEST_TEMPLATE.zh-CN.md
├── .gitignore
├── LICENSE
├── README.en.md
├── README.md
├── WSAInstallTool.sln
├── WSAInstallTool.v11.suo
├── WSAInstallTool.v12.suo
└── WSAInstallTool
├── 3185263_android_app_circle_smartphone_design_icon.ico
├── App.config
├── AppForm
├── AboutBox.Designer.cs
├── AboutBox.cs
├── AboutBox.resx
├── DeviceSelectForm.Designer.cs
├── DeviceSelectForm.cs
├── DeviceSelectForm.resx
├── InstallForm.Designer.cs
├── InstallForm.cs
├── InstallForm.resx
├── InstallFormPro.Designer.cs
├── InstallFormPro.cs
├── InstallFormPro.resx
├── MainForm.Designer.cs
├── MainForm.cs
├── MainForm.resx
├── PermissionForm.Designer.cs
├── PermissionForm.cs
├── PermissionForm.resx
├── SettingForm.Designer.cs
├── SettingForm.cs
└── SettingForm.resx
├── AppModel
├── AppString.cs
└── SupportLanguage.cs
├── Assets
├── AdbWinApi.dll
├── AdbWinUsbApi.dll
├── ApkShellext2.dll
├── ApkShellext2.resources.dll
├── BadApk.dll
├── aapt2.exe
├── adb.exe
├── blacklist
│ └── blacklist.xyz
├── install.bat
├── lang
│ ├── en.json
│ ├── lang.json
│ ├── zh_CN.json
│ ├── zh_HK.json
│ └── zh_TW.json
├── libwebp_x64.dll
├── libwebp_x86.dll
├── readme.txt
├── restart_explorer.bat
├── setting.ini
└── uninstall.bat
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── Resources
├── alipay_small.jpg
├── bad_apk.png
├── bad_apk_safety.png
├── setting.png
└── wechat_small.jpg
├── Util
├── AAPTParseUtil.cs
├── AndroidPerimission.cs
├── AndroidSDKVersion.cs
├── ApkShellDetection.cs
├── CMDUtil.cs
├── CommonUtil.cs
├── HashUtil.cs
├── IniUtil.cs
├── LangUtil.cs
└── PreferenceUtil.cs
├── WSAInstallTool.csproj
├── WSAInstallTool.csproj.user
└── apkinstaller.pfx
/.gitee/ISSUE_TEMPLATE.zh-CN.md:
--------------------------------------------------------------------------------
1 | ### 该问题是怎么引起的?
2 |
3 |
4 |
5 | ### 重现步骤
6 |
7 |
8 |
9 | ### 报错信息
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md:
--------------------------------------------------------------------------------
1 | ### 相关的Issue
2 |
3 |
4 | ### 原因(目的、解决的问题等)
5 |
6 |
7 | ### 描述(做了什么,变更了什么)
8 |
9 |
10 | ### 测试用例(新增、改动、可能影响的功能)
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # git ignore file
2 | /WSAInstallTool/bin
3 | /WSAInstallTool/obj
4 | .vs/*
--------------------------------------------------------------------------------
/README.en.md:
--------------------------------------------------------------------------------
1 | # Apk Installer
2 |
3 |
 
4 |
5 | #### Description
6 |
7 | Apk Installer (former name: WSAInstallTool, renamed since version 1.2.3.0) is a tool for Windows that automatically associates APK files and installs them on any Android device by double-clicking on them. The software can display the icon of Apk itself, a detailed list of permissions, etc.
8 |
9 | #### Software Architecture
10 | C# + Winform
11 |
12 | #### Installation
13 |
14 | After downloading and extracting to any location, double-click **ApkInstaller.exe** The installation and uninstallation of ApkInstaller requires manipulation of the registry, please **run as administrator** this software.
15 |
16 | 1. Install: Click `Install` with one click.
17 | 2. Uninstall: Click `Uninstall/Clear old version` , and then delete the folder.
18 |
19 | #### Instructions
20 |
21 | 
22 |
23 | * Display .Apk/.Ipa/.Appx icon
24 | * Automatically install it on any Android Device by double-clicking .apk file
25 | * Display apk Info
26 | * etc
27 |
28 | #### Donate
29 |
30 | - [PayPal](https://github.com/1595901624/apkshellext/blob/ApkShellext2_hy/PayPal.Me/haoyu94)
31 | - AliPay Account: [1595901624@qq.com](mailto:1595901624@qq.com)
32 |
33 | #### Contribution
34 |
35 | 1. Fork the repository
36 | 2. Create Feat_xxx branch
37 | 3. Commit your code
38 | 4. Create Pull Request
39 |
40 | #### Feedback
41 |
42 | Please submit issue.
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Apk Installer——Apk 安装工具
2 |
3 |
 
4 |
5 | #### 介绍
6 |
7 | Apk Installer(原名:WSAInstallTool,自1.2.3.0版本后更名)是一款Windows下自动关联APK文件且双击APK安装到任意安卓设备上的工具。该软件可以显示Apk自身的图标,详细的权限列表等。
8 |
9 | 支持Windows 11 安卓子系统,支持Windows 7、Windows 10 、Windows 11安装软件至任意安卓设备上。如软件无法运行,请安装.Net Framework 4.5.2。该软件主要服务于Windows 11 的Android子系统和Android开发者。
10 |
11 | #### 软件架构
12 |
13 | 软件采用C# + WinForm开发。
14 |
15 | #### 安装教程
16 |
17 | **如果旧版本升级到1.2.3.0,打开软件后,先点击点击一键清除然后再重新点击一键安装即可**
18 |
19 | 下载解压至任意位置后,双击**ApkInstaller.exe**即可。ApkInstaller的安装和卸载需要操作注册表,请使用**管理员身份运行**此软件。
20 |
21 | 
22 |
23 | #### 软件截图
24 |
25 | 
26 |
27 | #### 使用说明
28 |
29 | 安装:点击一键安装。
30 | 卸载:点击卸载软件或者清除旧版本,然后删除文件夹即可。
31 |
32 | #### 软件功能
33 |
34 | * 支持显示APK自身图标[1.1.0.5]
35 | * 双击APK直接安装至安卓设备[1.1.0.5]
36 | * 显示Apk的包名,版本号,最低支持安卓版本,大小,权限等信息[1.0.3.0]
37 | * 支持覆盖安装,降级安装[1.2.3.0]
38 | * 新增**实验室功能-恶意软件识别**[1.4.0.0]。该功能为Beta功能,如果遇到软件崩溃请停用此功能。如有误报,请提交issue或者发邮件至haoyu3@163.com
39 |
40 | 
41 |
42 | 开启此功能后,如果遇到恶意软件会展示**疑似恶意应用**的红色标签。正常应用会显示**安全**的绿色标签。如下图。
43 |
44 | 
45 |
46 | 
47 |
48 | #### 多语言包支持``
49 |
50 | 自`1.3.0.0`开始将支持多语言配置。该软件默认集成了**中国-简体中文**、**中國-繁体中文(香港)**、**中國-繁体中文(台灣)**。
51 |
52 | `1.4.0.0`新增**英文**支持。
53 |
54 | ##### 如何支持更多语言?
55 |
56 | 说实话,本地化工作是一项非常劳累的工作。作者能力和时间有限,如果您想支持其它语言,可参照下面的方法进行本地化操作。
57 |
58 | 软件的语言包在**软件安装目录 / lang**目录下。其中`lang.json`是存放目前支持的所有语言包信息(如下所示)。`id`表示序号,`name`表示语言包的名称,`file`表示语言包的文件名。这三个字段是必须的。
59 |
60 | ```json
61 | [
62 | {
63 | "id": 0,
64 | "name": "中国-简体中文",
65 | "file": "zh_CN.json"
66 | },
67 | {
68 | "id": 1,
69 | "name": "中國-繁體中文(香港)",
70 | "file": "zh_HK.json"
71 | }
72 | ]
73 |
74 | ```
75 |
76 | 另外,目录下的其它文件则是真正的语言包了,通过键值对的形式一一对应。其结构如下所示:
77 |
78 | ```json
79 | {
80 | "launchTip": "部分設置項需要操作註冊表,請使用管理員身份運行此軟體!",
81 | "ok": "確定",
82 | "associateApk": "關聯APK",
83 | "oneKeyInstall": "一鍵安裝",
84 | "oneKeyUninstall": "卸載軟體/清除舊版本",
85 | "about": "關於"
86 | }
87 | ```
88 |
89 | PS:语言包必须保存为**UTF8**字符编码的`.json`格式。您也可以在gitee上提交您的语言包。或者发送邮件至`haoyu3@163.com`。
90 |
91 | #### 参与贡献
92 |
93 | 1. Fork 本仓库
94 | 2. 新建 Feat_xxx 分支
95 | 3. 提交代码
96 | 4. 新建 Pull Request
97 |
98 | #### Bug/意见/建议提交
99 |
100 | 请直接提交Issue
101 |
102 | #### 其它版权信息
103 |
104 | AAPT
105 |
106 | ADBShell
107 |
108 | ApkShellext2
109 |
110 | #### 版本计划
111 |
112 | - [x] 支持APK图标显示(1.1.0.5版本已经支持)
113 | - [x] 支持Android所有权限提示(1.0.3.0版本已经支持)
114 | - [x] 支持多国语言(1.3.0.0 Beta)
115 | - [x] 支持恶意软件识别(1.5.0.0版本已经支持)
116 | - [ ] 支持敏感权限重点提醒
117 | - [ ] WinUI版本(远景计划)
118 | - [ ] 使用 Rust 重构跨平台(进行中...)
119 | - [ ] 支持 .aab/.apks 等文件的安装(远景计划)
120 |
121 | #### 开源仓库
122 |
123 | * Gitee:[ApkInstaller: windows下自动关联APK文件且双击即可安装到手机上。多个手机连接电脑时会弹窗提示选择设备。 (gitee.com)](https://gitee.com/haoyu3/wsainstall-tool)
124 |
125 | * Github:[ApkInstaller: 一款可以在Windows上双击安装APK的软件 (github.com)](https://github.com/1595901624/ApkInstaller)
126 |
127 | #### 软件下载
128 |
129 | * 通过gitee的发行版下载
130 | * 通过github发行版下载
131 | * [蓝奏云网盘下载,密码:52pj](https://wwi.lanzouj.com/b04c1p59c)
132 |
133 | #### 更新日志
134 |
135 | ##### [1.6.0.0 2023-02-24]
136 | 更新内容:
137 |
138 | * 【新增】支持显示最低版本为“Android 12L”和“Android 13”的Apk
139 | * 【修复】在Edge和Chrome等浏览器下载.apk/.ipa/.aapx文件时,导致浏览器Crash的问题
140 | * 【更新】adb 版本由 33.0.2-8557947 更新至 33.0.3-8952118
141 | * 【更新】aapt 版本由 v0.2-6966805 更新至 v0.2-9306103
142 | * 【更新】ApkShellext2 更新至 ApkShellext2_hy 3.0.0 版本
143 |
144 | ##### [1.5.0.0 2022-07-31]
145 |
146 | **【重要】此次更新将.Net Framework 升级到了4.8,可能会影响到Windows 7 和 Windows 8 的用户,请使用上面两个系统的用户安装.Net Framework 4.8的运行时**
147 |
148 | * 【优化】提前启动 adb 服务,提升首次安装 Apk 的时间
149 |
150 | * 【优化】只连接一个手机时,却弹窗提示多手机的问题
151 |
152 | * 【优化】清除卸载软件时,主动停止adb服务
153 |
154 | * 【优化】部分电脑已经连接了手机却提示未连接的问题
155 |
156 | * 【更新】 adb 版本由`29.0.5-5949299`更新至 `33.0.2-8557947`
157 |
158 | * 【更新】aapt 版本由 `v0.2-4913185` 更新至 `v0.2-6966805`
159 |
160 | * 【更新】ApkShellext2 更新至 `2.0.7`版本
161 |
162 | ##### [1.4.0.0 Beta 2022-02-08]
163 |
164 | 该版本为beta测试版。
165 |
166 | * 新增-恶意软件识别(实验室功能)如出现软件崩溃,请关闭此功能;
167 |
168 | * 新增-软件配置页面新增偏好设置入口。
169 |
170 | PS:如果当前正在使用旧版本,删除旧版软件。直接解压后先点击“卸载软件/清除旧版本”,再点击“一键安装”。
171 |
172 | ##### [1.3.0.0 Beta 2022-01-04]
173 |
174 | 该版本为beta测试版。
175 | 更新内容:
176 |
177 | * 新增-偏好设置新增多语言支持,内置“中国-简体中文”,“中國-繁體中文(香港)”,“中國-繁體中文(台灣)”三个语言包;
178 |
179 | * 新增-软件配置页面新增偏好设置入口;
180 |
181 | * 优化-修复安装APK时在仅有一台设备连接电脑时弹出设备选择的问题;
182 |
183 | * 优化-修复某些app无法获取icon的问题。
184 |
185 | PS:如果当前正在使用旧版本,删除旧版软件。直接解压后先点击“卸载软件/清除旧版本”,再点击“一键安装”。
186 |
187 | ##### [1.2.3.0 2021-12-26]
188 |
189 | * 新增-显示Apk文件的大小;
190 |
191 | * 新增-添加偏好设置,支持Apk降级覆盖安装;
192 |
193 | * 新增-添加偏好设置,支持安装Apk后自动关闭窗口;
194 |
195 | * 优化-修复修改文件名之后无法安装注册的问题;
196 |
197 | * 优化-修复Apk安装失败不显示失败原因的问题;
198 |
199 | * 优化-软件更名为Apk Installer-为上架商店做准备。
200 |
201 | PS:如果当前正在使用旧版本,删除旧版软件。直接解压后先点击“卸载软件/清除旧版本”,再点击“一键安装”。
202 |
203 | ##### [1.2.0.0 2021-11-20]
204 |
205 | * 优化-将关联APK和显示应用自身图标合二为一,简化安装过程;
206 |
207 | * 优化-修复包含空格名称的APK无法解析的问题;
208 |
209 | * 优化-修复包含空格名称的APK无法安装的问题;
210 |
211 | * 优化-修复部分用户关联APK导致软件崩溃的问题。
212 |
213 | PS:如果当前正在使用旧版本,直接解压覆盖即可。
214 |
215 | ##### [1.1.0.5 2021-11-10]
216 |
217 | * 新增-显示APK支持的最低版本;
218 |
219 | * 新增-显示APK应用本身的图标;
220 |
221 | * 提升稳定性,修复若干问题。
222 |
223 | PS:如果当前正在使用旧版本,直接解压覆盖即可。
224 |
--------------------------------------------------------------------------------
/WSAInstallTool.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WSAInstallTool", "WSAInstallTool\WSAInstallTool.csproj", "{A03F54F1-BA11-43C1-95E1-5823C0E5DA6C}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {A03F54F1-BA11-43C1-95E1-5823C0E5DA6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {A03F54F1-BA11-43C1-95E1-5823C0E5DA6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {A03F54F1-BA11-43C1-95E1-5823C0E5DA6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {A03F54F1-BA11-43C1-95E1-5823C0E5DA6C}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/WSAInstallTool.v11.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool.v11.suo
--------------------------------------------------------------------------------
/WSAInstallTool.v12.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool.v12.suo
--------------------------------------------------------------------------------
/WSAInstallTool/3185263_android_app_circle_smartphone_design_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/3185263_android_app_circle_smartphone_design_icon.ico
--------------------------------------------------------------------------------
/WSAInstallTool/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/AboutBox.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WSAInstallTool
2 | {
3 | partial class AboutBox
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | protected override void Dispose(bool disposing)
14 | {
15 | if (disposing && (components != null))
16 | {
17 | components.Dispose();
18 | }
19 | base.Dispose(disposing);
20 | }
21 |
22 | #region Windows 窗体设计器生成的代码
23 |
24 | ///
25 | /// 设计器支持所需的方法 - 不要
26 | /// 使用代码编辑器修改此方法的内容。
27 | ///
28 | private void InitializeComponent()
29 | {
30 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox));
31 | this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
32 | this.logoPictureBox = new System.Windows.Forms.PictureBox();
33 | this.labelProductName = new System.Windows.Forms.Label();
34 | this.labelVersion = new System.Windows.Forms.Label();
35 | this.labelCopyright = new System.Windows.Forms.Label();
36 | this.labelCompanyName = new System.Windows.Forms.Label();
37 | this.textBoxDescription = new System.Windows.Forms.TextBox();
38 | this.okButton = new System.Windows.Forms.Button();
39 | this.tableLayoutPanel.SuspendLayout();
40 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit();
41 | this.SuspendLayout();
42 | //
43 | // tableLayoutPanel
44 | //
45 | this.tableLayoutPanel.ColumnCount = 2;
46 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F));
47 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F));
48 | this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0);
49 | this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0);
50 | this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1);
51 | this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2);
52 | this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3);
53 | this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4);
54 | this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5);
55 | this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
56 | this.tableLayoutPanel.Location = new System.Drawing.Point(19, 16);
57 | this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
58 | this.tableLayoutPanel.Name = "tableLayoutPanel";
59 | this.tableLayoutPanel.RowCount = 6;
60 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
61 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
62 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
63 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
64 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
65 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
66 | this.tableLayoutPanel.Size = new System.Drawing.Size(831, 492);
67 | this.tableLayoutPanel.TabIndex = 0;
68 | //
69 | // logoPictureBox
70 | //
71 | this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
72 | this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image")));
73 | this.logoPictureBox.Location = new System.Drawing.Point(5, 4);
74 | this.logoPictureBox.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
75 | this.logoPictureBox.Name = "logoPictureBox";
76 | this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6);
77 | this.logoPictureBox.Size = new System.Drawing.Size(264, 484);
78 | this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
79 | this.logoPictureBox.TabIndex = 12;
80 | this.logoPictureBox.TabStop = false;
81 | //
82 | // labelProductName
83 | //
84 | this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill;
85 | this.labelProductName.Location = new System.Drawing.Point(286, 0);
86 | this.labelProductName.Margin = new System.Windows.Forms.Padding(12, 0, 5, 0);
87 | this.labelProductName.MaximumSize = new System.Drawing.Size(0, 32);
88 | this.labelProductName.Name = "labelProductName";
89 | this.labelProductName.Size = new System.Drawing.Size(540, 32);
90 | this.labelProductName.TabIndex = 19;
91 | this.labelProductName.Text = "产品名称";
92 | this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
93 | //
94 | // labelVersion
95 | //
96 | this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
97 | this.labelVersion.Location = new System.Drawing.Point(286, 49);
98 | this.labelVersion.Margin = new System.Windows.Forms.Padding(12, 0, 5, 0);
99 | this.labelVersion.MaximumSize = new System.Drawing.Size(0, 32);
100 | this.labelVersion.Name = "labelVersion";
101 | this.labelVersion.Size = new System.Drawing.Size(540, 32);
102 | this.labelVersion.TabIndex = 0;
103 | this.labelVersion.Text = "版本";
104 | this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
105 | //
106 | // labelCopyright
107 | //
108 | this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill;
109 | this.labelCopyright.Location = new System.Drawing.Point(286, 98);
110 | this.labelCopyright.Margin = new System.Windows.Forms.Padding(12, 0, 5, 0);
111 | this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 32);
112 | this.labelCopyright.Name = "labelCopyright";
113 | this.labelCopyright.Size = new System.Drawing.Size(540, 32);
114 | this.labelCopyright.TabIndex = 21;
115 | this.labelCopyright.Text = "版权";
116 | this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
117 | //
118 | // labelCompanyName
119 | //
120 | this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill;
121 | this.labelCompanyName.Location = new System.Drawing.Point(286, 147);
122 | this.labelCompanyName.Margin = new System.Windows.Forms.Padding(12, 0, 5, 0);
123 | this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 32);
124 | this.labelCompanyName.Name = "labelCompanyName";
125 | this.labelCompanyName.Size = new System.Drawing.Size(540, 32);
126 | this.labelCompanyName.TabIndex = 22;
127 | this.labelCompanyName.Text = "作者";
128 | this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
129 | //
130 | // textBoxDescription
131 | //
132 | this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
133 | this.textBoxDescription.Location = new System.Drawing.Point(286, 200);
134 | this.textBoxDescription.Margin = new System.Windows.Forms.Padding(12, 4, 5, 4);
135 | this.textBoxDescription.Multiline = true;
136 | this.textBoxDescription.Name = "textBoxDescription";
137 | this.textBoxDescription.ReadOnly = true;
138 | this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
139 | this.textBoxDescription.Size = new System.Drawing.Size(540, 238);
140 | this.textBoxDescription.TabIndex = 23;
141 | this.textBoxDescription.TabStop = false;
142 | this.textBoxDescription.Text = "说明";
143 | //
144 | // okButton
145 | //
146 | this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
147 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
148 | this.okButton.Location = new System.Drawing.Point(677, 446);
149 | this.okButton.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
150 | this.okButton.Name = "okButton";
151 | this.okButton.Size = new System.Drawing.Size(149, 42);
152 | this.okButton.TabIndex = 24;
153 | this.okButton.Text = "确定(&O)";
154 | this.okButton.Click += new System.EventHandler(this.okButton_Click);
155 | //
156 | // AboutBox
157 | //
158 | this.AcceptButton = this.okButton;
159 | this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
160 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
161 | this.ClientSize = new System.Drawing.Size(869, 524);
162 | this.Controls.Add(this.tableLayoutPanel);
163 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
164 | this.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
165 | this.MaximizeBox = false;
166 | this.MinimizeBox = false;
167 | this.Name = "AboutBox";
168 | this.Padding = new System.Windows.Forms.Padding(19, 16, 19, 16);
169 | this.ShowIcon = false;
170 | this.ShowInTaskbar = false;
171 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
172 | this.Text = "AboutBox";
173 | this.tableLayoutPanel.ResumeLayout(false);
174 | this.tableLayoutPanel.PerformLayout();
175 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit();
176 | this.ResumeLayout(false);
177 |
178 | }
179 |
180 | #endregion
181 |
182 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
183 | private System.Windows.Forms.PictureBox logoPictureBox;
184 | private System.Windows.Forms.Label labelProductName;
185 | private System.Windows.Forms.Label labelVersion;
186 | private System.Windows.Forms.Label labelCopyright;
187 | private System.Windows.Forms.Label labelCompanyName;
188 | private System.Windows.Forms.TextBox textBoxDescription;
189 | private System.Windows.Forms.Button okButton;
190 | }
191 | }
192 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/AboutBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Linq;
6 | using System.Reflection;
7 | using System.Threading.Tasks;
8 | using System.Windows.Forms;
9 |
10 | namespace WSAInstallTool
11 | {
12 | partial class AboutBox : Form
13 | {
14 | public AboutBox()
15 | {
16 | InitializeComponent();
17 | this.Text = String.Format("关于 {0}", AssemblyTitle);
18 | this.labelProductName.Text = AssemblyProduct;
19 | this.labelVersion.Text = String.Format("版本 {0}", AssemblyVersion);
20 | this.labelCopyright.Text = AssemblyCopyright;
21 | this.labelCompanyName.Text = AssemblyCompany;
22 | this.textBoxDescription.Text = AssemblyDescription;
23 | }
24 |
25 | #region 程序集特性访问器
26 |
27 | public string AssemblyTitle
28 | {
29 | get
30 | {
31 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
32 | if (attributes.Length > 0)
33 | {
34 | AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
35 | if (titleAttribute.Title != "")
36 | {
37 | return titleAttribute.Title;
38 | }
39 | }
40 | return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
41 | }
42 | }
43 |
44 | public string AssemblyVersion
45 | {
46 | get
47 | {
48 | return Assembly.GetExecutingAssembly().GetName().Version.ToString();
49 | }
50 | }
51 |
52 | public string AssemblyDescription
53 | {
54 | get
55 | {
56 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
57 | if (attributes.Length == 0)
58 | {
59 | return "";
60 | }
61 | return ((AssemblyDescriptionAttribute)attributes[0]).Description;
62 | }
63 | }
64 |
65 | public string AssemblyProduct
66 | {
67 | get
68 | {
69 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
70 | if (attributes.Length == 0)
71 | {
72 | return "";
73 | }
74 | return ((AssemblyProductAttribute)attributes[0]).Product;
75 | }
76 | }
77 |
78 | public string AssemblyCopyright
79 | {
80 | get
81 | {
82 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
83 | if (attributes.Length == 0)
84 | {
85 | return "";
86 | }
87 | return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
88 | }
89 | }
90 |
91 | public string AssemblyCompany
92 | {
93 | get
94 | {
95 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
96 | if (attributes.Length == 0)
97 | {
98 | return "";
99 | }
100 | return ((AssemblyCompanyAttribute)attributes[0]).Company;
101 | }
102 | }
103 | #endregion
104 |
105 | private void okButton_Click(object sender, EventArgs e)
106 | {
107 | this.Close();
108 | }
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/DeviceSelectForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WSAInstallTool
2 | {
3 | partial class DeviceSelectForm
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.deviceSelectTipLabel = new System.Windows.Forms.Label();
32 | this.deviceComboBox = new System.Windows.Forms.ComboBox();
33 | this.okButton = new System.Windows.Forms.Button();
34 | this.SuspendLayout();
35 | //
36 | // deviceSelectTipLabel
37 | //
38 | this.deviceSelectTipLabel.AutoSize = true;
39 | this.deviceSelectTipLabel.Location = new System.Drawing.Point(35, 31);
40 | this.deviceSelectTipLabel.Name = "deviceSelectTipLabel";
41 | this.deviceSelectTipLabel.Size = new System.Drawing.Size(292, 15);
42 | this.deviceSelectTipLabel.TabIndex = 0;
43 | this.deviceSelectTipLabel.Text = "发现多款安卓设备,请选择要安装的设备:";
44 | //
45 | // deviceComboBox
46 | //
47 | this.deviceComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
48 | this.deviceComboBox.FormattingEnabled = true;
49 | this.deviceComboBox.Location = new System.Drawing.Point(68, 81);
50 | this.deviceComboBox.Name = "deviceComboBox";
51 | this.deviceComboBox.Size = new System.Drawing.Size(259, 23);
52 | this.deviceComboBox.TabIndex = 1;
53 | //
54 | // okButton
55 | //
56 | this.okButton.Location = new System.Drawing.Point(115, 135);
57 | this.okButton.Name = "okButton";
58 | this.okButton.Size = new System.Drawing.Size(165, 47);
59 | this.okButton.TabIndex = 2;
60 | this.okButton.Text = "确定安装";
61 | this.okButton.UseVisualStyleBackColor = true;
62 | this.okButton.Click += new System.EventHandler(this.okButton_Click);
63 | //
64 | // DeviceSelectForm
65 | //
66 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
67 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
68 | this.ClientSize = new System.Drawing.Size(403, 194);
69 | this.Controls.Add(this.okButton);
70 | this.Controls.Add(this.deviceComboBox);
71 | this.Controls.Add(this.deviceSelectTipLabel);
72 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
73 | this.MaximizeBox = false;
74 | this.Name = "DeviceSelectForm";
75 | this.ShowIcon = false;
76 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
77 | this.Text = "选择安装的设备";
78 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DeviceSelectForm_FormClosing);
79 | this.Load += new System.EventHandler(this.DeviceSelectForm_Load);
80 | this.ResumeLayout(false);
81 | this.PerformLayout();
82 |
83 | }
84 |
85 | #endregion
86 |
87 | private System.Windows.Forms.Label deviceSelectTipLabel;
88 | private System.Windows.Forms.ComboBox deviceComboBox;
89 | private System.Windows.Forms.Button okButton;
90 | }
91 | }
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/DeviceSelectForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 | using WSAInstallTool.Util;
12 |
13 | namespace WSAInstallTool
14 | {
15 | public partial class DeviceSelectForm : Form
16 | {
17 | // 设备列表
18 | private List mDevcies = new List();
19 |
20 | public string resultDevice = "";
21 |
22 | public DeviceSelectForm(List deviceList)
23 | {
24 | InitializeComponent();
25 | this.mDevcies = deviceList;
26 | }
27 |
28 | private void DeviceSelectForm_Load(object sender, EventArgs e)
29 | {
30 | InitLanguage();
31 | foreach (string str in mDevcies)
32 | {
33 | deviceComboBox.Items.Add(str);
34 | }
35 |
36 | if (mDevcies.Count > 0)
37 | {
38 | deviceComboBox.SelectedIndex = 0;
39 | }
40 |
41 | }
42 |
43 | private void okButton_Click(object sender, EventArgs e)
44 | {
45 | this.Close();
46 | Debug.Write("deviceComboBox.SelectedText => " + mDevcies[deviceComboBox.SelectedIndex]);
47 | this.resultDevice = mDevcies[deviceComboBox.SelectedIndex];
48 | }
49 |
50 | private void DeviceSelectForm_FormClosing(object sender, FormClosingEventArgs e)
51 | {
52 |
53 | }
54 |
55 | private void InitLanguage()
56 | {
57 | this.Text = LangUtil.Instance.GetDeviceSelectFormTitle();
58 | deviceSelectTipLabel.Text = LangUtil.Instance.GetDeviceSelectTIp();
59 | okButton.Text = LangUtil.Instance.GetConfirmInstall();
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/DeviceSelectForm.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 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/InstallForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WSAInstallTool
2 | {
3 | partial class InstallForm
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InstallForm));
32 | this.packageNameLabel = new System.Windows.Forms.Label();
33 | this.versionNameLabel = new System.Windows.Forms.Label();
34 | this.permissionLabel = new System.Windows.Forms.Label();
35 | this.appNameLabel = new System.Windows.Forms.Label();
36 | this.installButton = new System.Windows.Forms.Button();
37 | this.installProgressBar = new System.Windows.Forms.ProgressBar();
38 | this.moreLinkLabel = new System.Windows.Forms.LinkLabel();
39 | this.minVersionLabel = new System.Windows.Forms.Label();
40 | this.spaceLabel = new System.Windows.Forms.Label();
41 | this.badApkPictureBox = new System.Windows.Forms.PictureBox();
42 | this.settingButton = new System.Windows.Forms.Button();
43 | this.iconPictureBox = new System.Windows.Forms.PictureBox();
44 | this.realPackageNameLabel = new System.Windows.Forms.Label();
45 | ((System.ComponentModel.ISupportInitialize)(this.badApkPictureBox)).BeginInit();
46 | ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox)).BeginInit();
47 | this.SuspendLayout();
48 | //
49 | // packageNameLabel
50 | //
51 | this.packageNameLabel.AutoSize = true;
52 | this.packageNameLabel.Location = new System.Drawing.Point(17, 77);
53 | this.packageNameLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
54 | this.packageNameLabel.Name = "packageNameLabel";
55 | this.packageNameLabel.Size = new System.Drawing.Size(77, 12);
56 | this.packageNameLabel.TabIndex = 0;
57 | this.packageNameLabel.Text = "packageName:";
58 | //
59 | // versionNameLabel
60 | //
61 | this.versionNameLabel.AutoSize = true;
62 | this.versionNameLabel.Location = new System.Drawing.Point(17, 98);
63 | this.versionNameLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
64 | this.versionNameLabel.Name = "versionNameLabel";
65 | this.versionNameLabel.Size = new System.Drawing.Size(71, 12);
66 | this.versionNameLabel.TabIndex = 1;
67 | this.versionNameLabel.Text = "versionName";
68 | //
69 | // permissionLabel
70 | //
71 | this.permissionLabel.AutoSize = true;
72 | this.permissionLabel.Location = new System.Drawing.Point(18, 164);
73 | this.permissionLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
74 | this.permissionLabel.Name = "permissionLabel";
75 | this.permissionLabel.Size = new System.Drawing.Size(65, 12);
76 | this.permissionLabel.TabIndex = 1;
77 | this.permissionLabel.Text = "permission";
78 | //
79 | // appNameLabel
80 | //
81 | this.appNameLabel.AutoEllipsis = true;
82 | this.appNameLabel.AutoSize = true;
83 | this.appNameLabel.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
84 | this.appNameLabel.Location = new System.Drawing.Point(20, 22);
85 | this.appNameLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
86 | this.appNameLabel.MaximumSize = new System.Drawing.Size(420, 35);
87 | this.appNameLabel.Name = "appNameLabel";
88 | this.appNameLabel.Size = new System.Drawing.Size(91, 35);
89 | this.appNameLabel.TabIndex = 3;
90 | this.appNameLabel.Text = "Name";
91 | //
92 | // installButton
93 | //
94 | this.installButton.Location = new System.Drawing.Point(442, 309);
95 | this.installButton.Margin = new System.Windows.Forms.Padding(2);
96 | this.installButton.Name = "installButton";
97 | this.installButton.Size = new System.Drawing.Size(99, 36);
98 | this.installButton.TabIndex = 4;
99 | this.installButton.Text = "安装";
100 | this.installButton.UseVisualStyleBackColor = true;
101 | this.installButton.Click += new System.EventHandler(this.installButton_Click);
102 | //
103 | // installProgressBar
104 | //
105 | this.installProgressBar.Location = new System.Drawing.Point(54, 319);
106 | this.installProgressBar.Margin = new System.Windows.Forms.Padding(2);
107 | this.installProgressBar.Name = "installProgressBar";
108 | this.installProgressBar.Size = new System.Drawing.Size(380, 26);
109 | this.installProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
110 | this.installProgressBar.TabIndex = 5;
111 | this.installProgressBar.Visible = false;
112 | //
113 | // moreLinkLabel
114 | //
115 | this.moreLinkLabel.AutoSize = true;
116 | this.moreLinkLabel.Location = new System.Drawing.Point(203, 300);
117 | this.moreLinkLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
118 | this.moreLinkLabel.Name = "moreLinkLabel";
119 | this.moreLinkLabel.Size = new System.Drawing.Size(77, 12);
120 | this.moreLinkLabel.TabIndex = 6;
121 | this.moreLinkLabel.TabStop = true;
122 | this.moreLinkLabel.Text = "查看更多权限";
123 | this.moreLinkLabel.Visible = false;
124 | this.moreLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.moreLinkLabel_LinkClicked);
125 | //
126 | // minVersionLabel
127 | //
128 | this.minVersionLabel.AutoSize = true;
129 | this.minVersionLabel.Location = new System.Drawing.Point(17, 119);
130 | this.minVersionLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
131 | this.minVersionLabel.Name = "minVersionLabel";
132 | this.minVersionLabel.Size = new System.Drawing.Size(65, 12);
133 | this.minVersionLabel.TabIndex = 7;
134 | this.minVersionLabel.Text = "minVersion";
135 | //
136 | // spaceLabel
137 | //
138 | this.spaceLabel.AutoSize = true;
139 | this.spaceLabel.Location = new System.Drawing.Point(17, 142);
140 | this.spaceLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
141 | this.spaceLabel.Name = "spaceLabel";
142 | this.spaceLabel.Size = new System.Drawing.Size(41, 12);
143 | this.spaceLabel.TabIndex = 8;
144 | this.spaceLabel.Text = "space:";
145 | //
146 | // badApkPictureBox
147 | //
148 | this.badApkPictureBox.Image = global::WSAInstallTool.Properties.Resources.bad_apk_safety;
149 | this.badApkPictureBox.InitialImage = null;
150 | this.badApkPictureBox.Location = new System.Drawing.Point(436, 126);
151 | this.badApkPictureBox.Name = "badApkPictureBox";
152 | this.badApkPictureBox.Size = new System.Drawing.Size(100, 50);
153 | this.badApkPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
154 | this.badApkPictureBox.TabIndex = 10;
155 | this.badApkPictureBox.TabStop = false;
156 | this.badApkPictureBox.Visible = false;
157 | //
158 | // settingButton
159 | //
160 | this.settingButton.BackgroundImage = global::WSAInstallTool.Properties.Resources.setting;
161 | this.settingButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
162 | this.settingButton.Location = new System.Drawing.Point(20, 319);
163 | this.settingButton.Name = "settingButton";
164 | this.settingButton.Size = new System.Drawing.Size(29, 26);
165 | this.settingButton.TabIndex = 9;
166 | this.settingButton.UseVisualStyleBackColor = true;
167 | this.settingButton.Click += new System.EventHandler(this.settingButton_Click);
168 | //
169 | // iconPictureBox
170 | //
171 | this.iconPictureBox.Location = new System.Drawing.Point(436, 14);
172 | this.iconPictureBox.Margin = new System.Windows.Forms.Padding(2);
173 | this.iconPictureBox.Name = "iconPictureBox";
174 | this.iconPictureBox.Size = new System.Drawing.Size(104, 107);
175 | this.iconPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
176 | this.iconPictureBox.TabIndex = 2;
177 | this.iconPictureBox.TabStop = false;
178 | //
179 | // realPackageNameLabel
180 | //
181 | this.realPackageNameLabel.AutoSize = true;
182 | this.realPackageNameLabel.Location = new System.Drawing.Point(98, 77);
183 | this.realPackageNameLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
184 | this.realPackageNameLabel.Name = "realPackageNameLabel";
185 | this.realPackageNameLabel.Size = new System.Drawing.Size(0, 12);
186 | this.realPackageNameLabel.TabIndex = 11;
187 | //
188 | // InstallForm
189 | //
190 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
191 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
192 | this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
193 | this.ClientSize = new System.Drawing.Size(552, 356);
194 | this.Controls.Add(this.realPackageNameLabel);
195 | this.Controls.Add(this.badApkPictureBox);
196 | this.Controls.Add(this.settingButton);
197 | this.Controls.Add(this.spaceLabel);
198 | this.Controls.Add(this.minVersionLabel);
199 | this.Controls.Add(this.moreLinkLabel);
200 | this.Controls.Add(this.installProgressBar);
201 | this.Controls.Add(this.installButton);
202 | this.Controls.Add(this.appNameLabel);
203 | this.Controls.Add(this.iconPictureBox);
204 | this.Controls.Add(this.permissionLabel);
205 | this.Controls.Add(this.versionNameLabel);
206 | this.Controls.Add(this.packageNameLabel);
207 | this.DoubleBuffered = true;
208 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
209 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
210 | this.Margin = new System.Windows.Forms.Padding(2);
211 | this.MaximizeBox = false;
212 | this.MinimizeBox = false;
213 | this.Name = "InstallForm";
214 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
215 | this.Text = "APK安装";
216 | this.Load += new System.EventHandler(this.InstallForm_Load);
217 | ((System.ComponentModel.ISupportInitialize)(this.badApkPictureBox)).EndInit();
218 | ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox)).EndInit();
219 | this.ResumeLayout(false);
220 | this.PerformLayout();
221 |
222 | }
223 |
224 | #endregion
225 |
226 | private System.Windows.Forms.Label packageNameLabel;
227 | private System.Windows.Forms.Label versionNameLabel;
228 | private System.Windows.Forms.PictureBox iconPictureBox;
229 | private System.Windows.Forms.Label permissionLabel;
230 | private System.Windows.Forms.Label appNameLabel;
231 | private System.Windows.Forms.Button installButton;
232 | private System.Windows.Forms.ProgressBar installProgressBar;
233 | private System.Windows.Forms.LinkLabel moreLinkLabel;
234 | private System.Windows.Forms.Label minVersionLabel;
235 | private System.Windows.Forms.Label spaceLabel;
236 | private System.Windows.Forms.Button settingButton;
237 | private System.Windows.Forms.PictureBox badApkPictureBox;
238 | private System.Windows.Forms.Label realPackageNameLabel;
239 | }
240 | }
241 |
242 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/InstallFormPro.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WSAInstallTool
2 | {
3 | partial class InstallFormPro
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InstallFormPro));
32 | this.packageNameLabel = new System.Windows.Forms.Label();
33 | this.versionNameLabel = new System.Windows.Forms.Label();
34 | this.permissionLabel = new System.Windows.Forms.Label();
35 | this.appNameLabel = new System.Windows.Forms.Label();
36 | this.installButton = new System.Windows.Forms.Button();
37 | this.installProgressBar = new System.Windows.Forms.ProgressBar();
38 | this.moreLinkLabel = new System.Windows.Forms.LinkLabel();
39 | this.minVersionLabel = new System.Windows.Forms.Label();
40 | this.spaceLabel = new System.Windows.Forms.Label();
41 | this.badApkPictureBox = new System.Windows.Forms.PictureBox();
42 | this.settingButton = new System.Windows.Forms.Button();
43 | this.iconPictureBox = new System.Windows.Forms.PictureBox();
44 | this.realPackageNameLabel = new System.Windows.Forms.Label();
45 | ((System.ComponentModel.ISupportInitialize)(this.badApkPictureBox)).BeginInit();
46 | ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox)).BeginInit();
47 | this.SuspendLayout();
48 | //
49 | // packageNameLabel
50 | //
51 | this.packageNameLabel.AutoSize = true;
52 | this.packageNameLabel.Location = new System.Drawing.Point(35, 155);
53 | this.packageNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
54 | this.packageNameLabel.Name = "packageNameLabel";
55 | this.packageNameLabel.Size = new System.Drawing.Size(154, 24);
56 | this.packageNameLabel.TabIndex = 0;
57 | this.packageNameLabel.Text = "packageName:";
58 | //
59 | // versionNameLabel
60 | //
61 | this.versionNameLabel.AutoSize = true;
62 | this.versionNameLabel.Location = new System.Drawing.Point(35, 196);
63 | this.versionNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
64 | this.versionNameLabel.Name = "versionNameLabel";
65 | this.versionNameLabel.Size = new System.Drawing.Size(142, 24);
66 | this.versionNameLabel.TabIndex = 1;
67 | this.versionNameLabel.Text = "versionName";
68 | //
69 | // permissionLabel
70 | //
71 | this.permissionLabel.AutoSize = true;
72 | this.permissionLabel.Location = new System.Drawing.Point(36, 328);
73 | this.permissionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
74 | this.permissionLabel.Name = "permissionLabel";
75 | this.permissionLabel.Size = new System.Drawing.Size(130, 24);
76 | this.permissionLabel.TabIndex = 1;
77 | this.permissionLabel.Text = "permission";
78 | //
79 | // appNameLabel
80 | //
81 | this.appNameLabel.AutoEllipsis = true;
82 | this.appNameLabel.AutoSize = true;
83 | this.appNameLabel.Font = new System.Drawing.Font("宋体", 25.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
84 | this.appNameLabel.Location = new System.Drawing.Point(40, 44);
85 | this.appNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
86 | this.appNameLabel.MaximumSize = new System.Drawing.Size(840, 69);
87 | this.appNameLabel.Name = "appNameLabel";
88 | this.appNameLabel.Size = new System.Drawing.Size(174, 69);
89 | this.appNameLabel.TabIndex = 3;
90 | this.appNameLabel.Text = "Name";
91 | //
92 | // installButton
93 | //
94 | this.installButton.Location = new System.Drawing.Point(884, 619);
95 | this.installButton.Margin = new System.Windows.Forms.Padding(4);
96 | this.installButton.Name = "installButton";
97 | this.installButton.Size = new System.Drawing.Size(197, 72);
98 | this.installButton.TabIndex = 4;
99 | this.installButton.Text = "安装";
100 | this.installButton.UseVisualStyleBackColor = true;
101 | this.installButton.Click += new System.EventHandler(this.installButton_Click);
102 | //
103 | // installProgressBar
104 | //
105 | this.installProgressBar.Location = new System.Drawing.Point(108, 637);
106 | this.installProgressBar.Margin = new System.Windows.Forms.Padding(4);
107 | this.installProgressBar.Name = "installProgressBar";
108 | this.installProgressBar.Size = new System.Drawing.Size(760, 52);
109 | this.installProgressBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
110 | this.installProgressBar.TabIndex = 5;
111 | this.installProgressBar.Visible = false;
112 | //
113 | // moreLinkLabel
114 | //
115 | this.moreLinkLabel.AutoSize = true;
116 | this.moreLinkLabel.Location = new System.Drawing.Point(405, 600);
117 | this.moreLinkLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
118 | this.moreLinkLabel.Name = "moreLinkLabel";
119 | this.moreLinkLabel.Size = new System.Drawing.Size(154, 24);
120 | this.moreLinkLabel.TabIndex = 6;
121 | this.moreLinkLabel.TabStop = true;
122 | this.moreLinkLabel.Text = "查看更多权限";
123 | this.moreLinkLabel.Visible = false;
124 | this.moreLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.moreLinkLabel_LinkClicked);
125 | //
126 | // minVersionLabel
127 | //
128 | this.minVersionLabel.AutoSize = true;
129 | this.minVersionLabel.Location = new System.Drawing.Point(35, 237);
130 | this.minVersionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
131 | this.minVersionLabel.Name = "minVersionLabel";
132 | this.minVersionLabel.Size = new System.Drawing.Size(130, 24);
133 | this.minVersionLabel.TabIndex = 7;
134 | this.minVersionLabel.Text = "minVersion";
135 | //
136 | // spaceLabel
137 | //
138 | this.spaceLabel.AutoSize = true;
139 | this.spaceLabel.Location = new System.Drawing.Point(35, 284);
140 | this.spaceLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
141 | this.spaceLabel.Name = "spaceLabel";
142 | this.spaceLabel.Size = new System.Drawing.Size(82, 24);
143 | this.spaceLabel.TabIndex = 8;
144 | this.spaceLabel.Text = "space:";
145 | //
146 | // badApkPictureBox
147 | //
148 | this.badApkPictureBox.Image = global::WSAInstallTool.Properties.Resources.bad_apk_safety;
149 | this.badApkPictureBox.InitialImage = null;
150 | this.badApkPictureBox.Location = new System.Drawing.Point(872, 252);
151 | this.badApkPictureBox.Margin = new System.Windows.Forms.Padding(5);
152 | this.badApkPictureBox.Name = "badApkPictureBox";
153 | this.badApkPictureBox.Size = new System.Drawing.Size(200, 100);
154 | this.badApkPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
155 | this.badApkPictureBox.TabIndex = 10;
156 | this.badApkPictureBox.TabStop = false;
157 | this.badApkPictureBox.Visible = false;
158 | //
159 | // settingButton
160 | //
161 | this.settingButton.BackgroundImage = global::WSAInstallTool.Properties.Resources.setting;
162 | this.settingButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
163 | this.settingButton.Location = new System.Drawing.Point(40, 637);
164 | this.settingButton.Margin = new System.Windows.Forms.Padding(5);
165 | this.settingButton.Name = "settingButton";
166 | this.settingButton.Size = new System.Drawing.Size(59, 52);
167 | this.settingButton.TabIndex = 9;
168 | this.settingButton.UseVisualStyleBackColor = true;
169 | this.settingButton.Click += new System.EventHandler(this.settingButton_Click);
170 | //
171 | // iconPictureBox
172 | //
173 | this.iconPictureBox.Location = new System.Drawing.Point(872, 28);
174 | this.iconPictureBox.Margin = new System.Windows.Forms.Padding(4);
175 | this.iconPictureBox.Name = "iconPictureBox";
176 | this.iconPictureBox.Size = new System.Drawing.Size(208, 213);
177 | this.iconPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
178 | this.iconPictureBox.TabIndex = 2;
179 | this.iconPictureBox.TabStop = false;
180 | //
181 | // realPackageNameLabel
182 | //
183 | this.realPackageNameLabel.AutoSize = true;
184 | this.realPackageNameLabel.Location = new System.Drawing.Point(196, 155);
185 | this.realPackageNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
186 | this.realPackageNameLabel.Name = "realPackageNameLabel";
187 | this.realPackageNameLabel.Size = new System.Drawing.Size(0, 24);
188 | this.realPackageNameLabel.TabIndex = 11;
189 | //
190 | // InstallFormPro
191 | //
192 | this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
193 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
194 | this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
195 | this.ClientSize = new System.Drawing.Size(1104, 706);
196 | this.Controls.Add(this.realPackageNameLabel);
197 | this.Controls.Add(this.badApkPictureBox);
198 | this.Controls.Add(this.settingButton);
199 | this.Controls.Add(this.spaceLabel);
200 | this.Controls.Add(this.minVersionLabel);
201 | this.Controls.Add(this.moreLinkLabel);
202 | this.Controls.Add(this.installProgressBar);
203 | this.Controls.Add(this.installButton);
204 | this.Controls.Add(this.appNameLabel);
205 | this.Controls.Add(this.iconPictureBox);
206 | this.Controls.Add(this.permissionLabel);
207 | this.Controls.Add(this.versionNameLabel);
208 | this.Controls.Add(this.packageNameLabel);
209 | this.DoubleBuffered = true;
210 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
211 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
212 | this.Margin = new System.Windows.Forms.Padding(4);
213 | this.MaximizeBox = false;
214 | this.MinimizeBox = false;
215 | this.Name = "InstallFormPro";
216 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
217 | this.Text = "APK安装";
218 | this.Load += new System.EventHandler(this.InstallFormPro_Load);
219 | ((System.ComponentModel.ISupportInitialize)(this.badApkPictureBox)).EndInit();
220 | ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox)).EndInit();
221 | this.ResumeLayout(false);
222 | this.PerformLayout();
223 |
224 | }
225 |
226 | #endregion
227 |
228 | private System.Windows.Forms.Label packageNameLabel;
229 | private System.Windows.Forms.Label versionNameLabel;
230 | private System.Windows.Forms.PictureBox iconPictureBox;
231 | private System.Windows.Forms.Label permissionLabel;
232 | private System.Windows.Forms.Label appNameLabel;
233 | private System.Windows.Forms.Button installButton;
234 | private System.Windows.Forms.ProgressBar installProgressBar;
235 | private System.Windows.Forms.LinkLabel moreLinkLabel;
236 | private System.Windows.Forms.Label minVersionLabel;
237 | private System.Windows.Forms.Label spaceLabel;
238 | private System.Windows.Forms.Button settingButton;
239 | private System.Windows.Forms.PictureBox badApkPictureBox;
240 | private System.Windows.Forms.Label realPackageNameLabel;
241 | }
242 | }
243 |
244 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/MainForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WSAInstallTool
2 | {
3 | partial class MainForm
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(MainForm));
32 | this.installButton = new System.Windows.Forms.Button();
33 | this.uninstallButton = new System.Windows.Forms.Button();
34 | this.aboutLinkLabel = new System.Windows.Forms.LinkLabel();
35 | this.installApkIconButton = new System.Windows.Forms.Button();
36 | this.uninsallApkIconButton = new System.Windows.Forms.Button();
37 | this.associateApkGroup = new System.Windows.Forms.GroupBox();
38 | this.groupBox2 = new System.Windows.Forms.GroupBox();
39 | this.readMeLabel = new System.Windows.Forms.LinkLabel();
40 | this.settingLinkLabel = new System.Windows.Forms.LinkLabel();
41 | this.associateApkGroup.SuspendLayout();
42 | this.groupBox2.SuspendLayout();
43 | this.SuspendLayout();
44 | //
45 | // installButton
46 | //
47 | this.installButton.Location = new System.Drawing.Point(46, 19);
48 | this.installButton.Margin = new System.Windows.Forms.Padding(2);
49 | this.installButton.Name = "installButton";
50 | this.installButton.Size = new System.Drawing.Size(158, 46);
51 | this.installButton.TabIndex = 0;
52 | this.installButton.Text = "一键安装";
53 | this.installButton.UseVisualStyleBackColor = true;
54 | this.installButton.Click += new System.EventHandler(this.installButton_Click);
55 | //
56 | // uninstallButton
57 | //
58 | this.uninstallButton.Location = new System.Drawing.Point(46, 83);
59 | this.uninstallButton.Margin = new System.Windows.Forms.Padding(2);
60 | this.uninstallButton.Name = "uninstallButton";
61 | this.uninstallButton.Size = new System.Drawing.Size(158, 45);
62 | this.uninstallButton.TabIndex = 1;
63 | this.uninstallButton.Text = "卸载软件/清除旧版本";
64 | this.uninstallButton.UseVisualStyleBackColor = true;
65 | this.uninstallButton.Click += new System.EventHandler(this.uninstallButton_Click);
66 | //
67 | // aboutLinkLabel
68 | //
69 | this.aboutLinkLabel.AutoSize = true;
70 | this.aboutLinkLabel.Location = new System.Drawing.Point(16, 180);
71 | this.aboutLinkLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
72 | this.aboutLinkLabel.Name = "aboutLinkLabel";
73 | this.aboutLinkLabel.Size = new System.Drawing.Size(29, 12);
74 | this.aboutLinkLabel.TabIndex = 2;
75 | this.aboutLinkLabel.TabStop = true;
76 | this.aboutLinkLabel.Text = "关于";
77 | this.aboutLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.aboutLinkLabel_LinkClicked);
78 | //
79 | // installApkIconButton
80 | //
81 | this.installApkIconButton.Location = new System.Drawing.Point(65, 19);
82 | this.installApkIconButton.Margin = new System.Windows.Forms.Padding(2);
83 | this.installApkIconButton.Name = "installApkIconButton";
84 | this.installApkIconButton.Size = new System.Drawing.Size(130, 46);
85 | this.installApkIconButton.TabIndex = 3;
86 | this.installApkIconButton.Text = "显示APK自身图标";
87 | this.installApkIconButton.UseVisualStyleBackColor = true;
88 | this.installApkIconButton.Click += new System.EventHandler(this.installApkIconButton_Click);
89 | //
90 | // uninsallApkIconButton
91 | //
92 | this.uninsallApkIconButton.Location = new System.Drawing.Point(65, 81);
93 | this.uninsallApkIconButton.Margin = new System.Windows.Forms.Padding(2);
94 | this.uninsallApkIconButton.Name = "uninsallApkIconButton";
95 | this.uninsallApkIconButton.Size = new System.Drawing.Size(130, 45);
96 | this.uninsallApkIconButton.TabIndex = 4;
97 | this.uninsallApkIconButton.Text = "清除APK自身图标";
98 | this.uninsallApkIconButton.UseVisualStyleBackColor = true;
99 | this.uninsallApkIconButton.Click += new System.EventHandler(this.uninsallApkIconButton_Click);
100 | //
101 | // associateApkGroup
102 | //
103 | this.associateApkGroup.Controls.Add(this.installButton);
104 | this.associateApkGroup.Controls.Add(this.uninstallButton);
105 | this.associateApkGroup.Location = new System.Drawing.Point(19, 10);
106 | this.associateApkGroup.Margin = new System.Windows.Forms.Padding(2);
107 | this.associateApkGroup.Name = "associateApkGroup";
108 | this.associateApkGroup.Padding = new System.Windows.Forms.Padding(2);
109 | this.associateApkGroup.Size = new System.Drawing.Size(248, 150);
110 | this.associateApkGroup.TabIndex = 5;
111 | this.associateApkGroup.TabStop = false;
112 | this.associateApkGroup.Text = "关联APK";
113 | //
114 | // groupBox2
115 | //
116 | this.groupBox2.Controls.Add(this.uninsallApkIconButton);
117 | this.groupBox2.Controls.Add(this.installApkIconButton);
118 | this.groupBox2.Location = new System.Drawing.Point(299, 12);
119 | this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
120 | this.groupBox2.Name = "groupBox2";
121 | this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
122 | this.groupBox2.Size = new System.Drawing.Size(244, 147);
123 | this.groupBox2.TabIndex = 6;
124 | this.groupBox2.TabStop = false;
125 | this.groupBox2.Text = "2、APK图标";
126 | //
127 | // readMeLabel
128 | //
129 | this.readMeLabel.AutoSize = true;
130 | this.readMeLabel.Location = new System.Drawing.Point(50, 180);
131 | this.readMeLabel.Name = "readMeLabel";
132 | this.readMeLabel.Size = new System.Drawing.Size(65, 12);
133 | this.readMeLabel.TabIndex = 7;
134 | this.readMeLabel.TabStop = true;
135 | this.readMeLabel.Text = "使用前必读";
136 | this.readMeLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.readMeLabel_LinkClicked);
137 | //
138 | // settingLinkLabel
139 | //
140 | this.settingLinkLabel.AutoSize = true;
141 | this.settingLinkLabel.Location = new System.Drawing.Point(121, 180);
142 | this.settingLinkLabel.Name = "settingLinkLabel";
143 | this.settingLinkLabel.Size = new System.Drawing.Size(53, 12);
144 | this.settingLinkLabel.TabIndex = 8;
145 | this.settingLinkLabel.TabStop = true;
146 | this.settingLinkLabel.Text = "偏好设置";
147 | this.settingLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.settingLinkLabel_LinkClicked);
148 | //
149 | // MainForm
150 | //
151 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
152 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
153 | this.ClientSize = new System.Drawing.Size(292, 204);
154 | this.Controls.Add(this.settingLinkLabel);
155 | this.Controls.Add(this.readMeLabel);
156 | this.Controls.Add(this.groupBox2);
157 | this.Controls.Add(this.associateApkGroup);
158 | this.Controls.Add(this.aboutLinkLabel);
159 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
160 | this.Margin = new System.Windows.Forms.Padding(2);
161 | this.MaximizeBox = false;
162 | this.MinimizeBox = false;
163 | this.Name = "MainForm";
164 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
165 | this.Text = "Apk Installer";
166 | this.Load += new System.EventHandler(this.MainForm_Load);
167 | this.associateApkGroup.ResumeLayout(false);
168 | this.groupBox2.ResumeLayout(false);
169 | this.ResumeLayout(false);
170 | this.PerformLayout();
171 |
172 | }
173 |
174 | #endregion
175 |
176 | private System.Windows.Forms.Button installButton;
177 | private System.Windows.Forms.Button uninstallButton;
178 | private System.Windows.Forms.LinkLabel aboutLinkLabel;
179 | private System.Windows.Forms.Button installApkIconButton;
180 | private System.Windows.Forms.Button uninsallApkIconButton;
181 | private System.Windows.Forms.GroupBox associateApkGroup;
182 | private System.Windows.Forms.GroupBox groupBox2;
183 | private System.Windows.Forms.LinkLabel readMeLabel;
184 | private System.Windows.Forms.LinkLabel settingLinkLabel;
185 | }
186 | }
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/MainForm.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.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using Microsoft.Win32;
11 | using System.Diagnostics;
12 | using System.IO;
13 | using WSAInstallTool.Util;
14 | using WSAInstallTool.AppForm;
15 |
16 | namespace WSAInstallTool
17 | {
18 | public partial class MainForm : Form
19 | {
20 | public MainForm()
21 | {
22 | InitializeComponent();
23 | }
24 |
25 | ///
26 | /// 关联APK
27 | ///
28 | private void associatedApk()
29 | {
30 | // 判断.apk项是否存在
31 | if (IsRegistryKeyExist(".apk"))
32 | {
33 | // 删除.apk的相关信息
34 | Debug.WriteLine("exist!!!");
35 | DeleteClassesRootRegistryKey(".apk");
36 |
37 | }
38 | // 创建
39 | CreateAssociationProgram();
40 | }
41 |
42 | ///
43 | /// 创建关联程序
44 | ///
45 | private void CreateAssociationProgram()
46 | {
47 | // 默认 Apkdb.apk
48 | //主要用到了SetValue(),表示在test下创建名称为Name,值为RegistryTest的键值。第三个参数表示键值类型,省略时,默认为字符串
49 | // 1.设置打开APK扩展名的软件
50 | RegistryKey hklm = Registry.ClassesRoot;
51 | RegistryKey hkSoftWare = hklm.CreateSubKey(@"HYWINXYZWSATOOL\shell\open\command");
52 | string softwarePath = System.Threading.Thread.GetDomain().BaseDirectory;
53 | string fileNamePath = Process.GetCurrentProcess().MainModule.FileName;
54 | string exeName = "ApkInstaller.exe";
55 | try
56 | {
57 | FileInfo fileInfo = new FileInfo(fileNamePath);
58 | exeName = fileInfo.Name;
59 | Debug.WriteLine("[MainForm][CreateAssociationProgram] exeName: " + fileInfo.Name);
60 |
61 | }
62 | catch (Exception ex)
63 | {
64 | Debug.WriteLine("[MainForm][CreateAssociationProgram] error: " + ex.Message);
65 | }
66 |
67 | hkSoftWare.SetValue("", "\"" + softwarePath + exeName + "\" \"%1\"", RegistryValueKind.String);
68 |
69 | // 2.创建.apk
70 | RegistryKey apkSoftWare = hklm.CreateSubKey(@".apk");
71 | apkSoftWare.SetValue("", "HYWINXYZWSATOOL", RegistryValueKind.String);
72 | hklm.Close();
73 | hkSoftWare.Close();
74 | }
75 |
76 | ///
77 | /// 删除已经存在的APK项
78 | ///
79 | private void DeleteClassesRootRegistryKey(string key)
80 | {
81 | //主要用到了DeleteSubKey()
82 | RegistryKey hklm = Registry.ClassesRoot;
83 |
84 |
85 | hklm.DeleteSubKeyTree(key, false); //为true时,删除的注册表不存在时抛出异常;当为false时不抛出异常。
86 | hklm.Close();
87 | }
88 |
89 | ///
90 | /// 判断注册表项是否存在
91 | ///
92 | ///
93 | ///
94 | private bool IsRegistryKeyExist(string sKeyName)
95 | {
96 | string[] sKeyNameColl;
97 | RegistryKey hklm = Registry.ClassesRoot;
98 | sKeyNameColl = hklm.GetSubKeyNames();
99 | foreach (string sName in sKeyNameColl)
100 | {
101 | if (sName == sKeyName)
102 | {
103 | hklm.Close();
104 | return true;
105 | }
106 | }
107 | hklm.Close();
108 | return false;
109 | }
110 |
111 | private void installButton_Click(object sender, EventArgs e)
112 | {
113 | //1.设置关联APK文件
114 | associatedApk();
115 | CMDUtil.ExecBat("install.bat");
116 | MessageBox.Show(LangUtil.Instance.GetInstallFinished());
117 | }
118 |
119 | private void uninstallButton_Click(object sender, EventArgs e)
120 | {
121 | CMDUtil.ExecBat("uninstall.bat");
122 | CMDUtil.StopAdbServer(1);
123 | RegistryKey hklm = Registry.ClassesRoot;
124 | hklm.DeleteSubKeyTree(".apk", false); //为true时,删除的注册表不存在时抛出异常;当为false时不抛出异常。
125 | hklm.DeleteSubKeyTree("HYWINXYZWSATOOL", false);
126 | //hklm.DeleteSubKey(@"HYWINXYZWSATOOL\shell\open\command", false);
127 | //hklm.DeleteSubKey(@"HYWINXYZWSATOOL\shell\open", false);
128 | //hklm.DeleteSubKey(@"HYWINXYZWSATOOL\shell", false);
129 | //hklm.DeleteSubKey(@"HYWINXYZWSATOOL", false);
130 |
131 | hklm.Close();
132 | MessageBox.Show(LangUtil.Instance.GetUninstallFinished());
133 | }
134 |
135 | private void aboutLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
136 | {
137 | AboutBox aboutBox = new AboutBox();
138 | aboutBox.Show();
139 | }
140 |
141 | ///
142 | /// 安装APK图标点击事件
143 | ///
144 | ///
145 | ///
146 | private void installApkIconButton_Click(object sender, EventArgs e)
147 | {
148 | //2.显示自身APK图标
149 | CMDUtil.ExecBat("install.bat");
150 | }
151 |
152 | private void uninsallApkIconButton_Click(object sender, EventArgs e)
153 | {
154 | CMDUtil.ExecBat("uninstall.bat");
155 | associatedApk();
156 | }
157 |
158 | private void readMeLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
159 | {
160 | //string s = "1、点击“一键安装”将会自动关联APK文件,并且显示APK自身应用图标\n"
161 | // + "2、点击“一键清除”将会自动解关联APK文件,并且解除显示APK自身应用图标\n"
162 | // + "3、点击“一键清除”后如果依然显示APK图标是由于电脑软件的原因,重启电脑即可解决\n"
163 | // + "4、卸载软件:请先点击“一键清除”,然后直接删除软件所在目录即可。";
164 | MessageBox.Show(LangUtil.Instance.GetReadMeMessageTip());
165 | }
166 |
167 | private void MainForm_Load(object sender, EventArgs e)
168 | {
169 | // 每次进入这个页面都初始化黑名单
170 | CommonUtil.InitBlackListBackground();
171 | associateApkGroup.Text = LangUtil.Instance.GetAssociateApk();
172 | installButton.Text = LangUtil.Instance.GetOneKeyInstall();
173 | uninstallButton.Text = LangUtil.Instance.GetOnKeyUninstall();
174 | aboutLinkLabel.Text = LangUtil.Instance.GetAbout();
175 | readMeLabel.Text = LangUtil.Instance.GetReadMe();
176 | settingLinkLabel.Text = LangUtil.Instance.GetSettingFormTitle();
177 | }
178 |
179 | private void settingLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
180 | {
181 | new SettingForm().Show();
182 | }
183 | }
184 | }
185 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/PermissionForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace WSAInstallTool
2 | {
3 | partial class PermissionForm
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.permissionListView = new System.Windows.Forms.ListView();
32 | this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
33 | this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
34 | this.SuspendLayout();
35 | //
36 | // permissionListView
37 | //
38 | this.permissionListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
39 | this.columnHeader1,
40 | this.columnHeader2});
41 | this.permissionListView.FullRowSelect = true;
42 | this.permissionListView.Location = new System.Drawing.Point(9, 11);
43 | this.permissionListView.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
44 | this.permissionListView.Name = "permissionListView";
45 | this.permissionListView.Size = new System.Drawing.Size(432, 263);
46 | this.permissionListView.TabIndex = 0;
47 | this.permissionListView.UseCompatibleStateImageBehavior = false;
48 | this.permissionListView.View = System.Windows.Forms.View.Details;
49 | //
50 | // columnHeader1
51 | //
52 | this.columnHeader1.Text = "序号";
53 | //
54 | // columnHeader2
55 | //
56 | this.columnHeader2.Text = "权限";
57 | this.columnHeader2.Width = 515;
58 | //
59 | // PermissionForm
60 | //
61 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
62 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
63 | this.ClientSize = new System.Drawing.Size(449, 282);
64 | this.Controls.Add(this.permissionListView);
65 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
66 | this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
67 | this.MaximizeBox = false;
68 | this.MinimizeBox = false;
69 | this.Name = "PermissionForm";
70 | this.ShowIcon = false;
71 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
72 | this.Text = "所有权限";
73 | this.Load += new System.EventHandler(this.PermissionForm_Load);
74 | this.ResumeLayout(false);
75 |
76 | }
77 |
78 | #endregion
79 |
80 | private System.Windows.Forms.ListView permissionListView;
81 | private System.Windows.Forms.ColumnHeader columnHeader1;
82 | private System.Windows.Forms.ColumnHeader columnHeader2;
83 | }
84 | }
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/PermissionForm.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.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using WSAInstallTool.Util;
11 |
12 | namespace WSAInstallTool
13 | {
14 | public partial class PermissionForm : Form
15 | {
16 | private List permissionList = new List();
17 |
18 | public PermissionForm(List permissionList)
19 | {
20 | InitializeComponent();
21 |
22 | if (permissionList != null)
23 | {
24 | this.permissionList = permissionList;
25 | }
26 | }
27 |
28 | private void PermissionForm_Load(object sender, EventArgs e)
29 | {
30 | InitLanguage();
31 | permissionListView.BeginUpdate();
32 | //permissionListView.Columns.Add("序号");
33 | //permissionListView.Columns.Add("权限");
34 |
35 | for (int i = 0; i < permissionList.Count; i++)
36 | {
37 | var lvi = new ListViewItem();
38 | lvi.Text = (i + 1) + "";
39 | lvi.SubItems.Add(permissionList[i]);
40 | permissionListView.Items.Add(lvi);
41 | }
42 | permissionListView.EndUpdate();
43 | }
44 |
45 | private void InitLanguage()
46 | {
47 | this.Text = LangUtil.Instance.GetPermissionFormTitle();
48 | permissionListView.Columns[0].Text = LangUtil.Instance.GetColumnNumber();
49 | permissionListView.Columns[1].Text = LangUtil.Instance.GetColumnPermission();
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/PermissionForm.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 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/SettingForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Reflection;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 | using WSAInstallTool.AppModel;
13 | using WSAInstallTool.Util;
14 |
15 | namespace WSAInstallTool.AppForm
16 | {
17 | public partial class SettingForm : Form
18 | {
19 | // 是否已经初始化结束
20 | private bool inited = false;
21 |
22 | public SettingForm()
23 | {
24 | InitializeComponent();
25 | }
26 |
27 | private void SettingForm_Load(object sender, EventArgs e)
28 | {
29 | inited = false;
30 |
31 | InitLanguage();
32 | InitInstallMethod();
33 | InitInstallSuccessStatus();
34 | InitSelectLanguage();
35 | InitScanApkStatus();
36 | InitWSAConnect();
37 | InitWSAConnectIpAddress();
38 | InitAboutPage();
39 |
40 | inited = true;
41 | }
42 |
43 | ///
44 | /// 初始化安装方式
45 | ///
46 | private void InitInstallMethod()
47 | {
48 | if (PreferenceUtil.Instance.GetInstallMethod() == PreferenceUtil.InstallMethod.DEGRADED_OVERLAY)
49 | {
50 | degradedOverlayRadioButton.Checked = true;
51 | }
52 | else
53 | {
54 | overlayRadioButton.Checked = true;
55 | }
56 | }
57 |
58 | ///
59 | /// 初始化安装完成的开关
60 | ///
61 | private void InitInstallSuccessStatus()
62 | {
63 | afterInstalledCloseCheckBox.Checked = PreferenceUtil.Instance.IsCloseAfterInstalled();
64 | }
65 |
66 | // **************************************************以下是开关监听*********************************************************************//
67 | private void overlayRadioButton_CheckedChanged(object sender, EventArgs e)
68 | {
69 | if (overlayRadioButton.Checked && inited)
70 | {
71 | PreferenceUtil.Instance.SetInstallMethod(PreferenceUtil.InstallMethod.OVERLAY);
72 | Debug.WriteLine("[PreferenceUtil][overlayRadioButton_CheckedChanged] true");
73 | }
74 | }
75 |
76 | private void degradedOverlayRadioButton_CheckedChanged(object sender, EventArgs e)
77 | {
78 | if (degradedOverlayRadioButton.Checked && inited)
79 | {
80 | PreferenceUtil.Instance.SetInstallMethod(PreferenceUtil.InstallMethod.DEGRADED_OVERLAY);
81 | Debug.WriteLine("[PreferenceUtil][degradedOverlayRadioButton_CheckedChanged] true");
82 | }
83 | }
84 |
85 | private void afterInstalledCloseCheckBox_CheckedChanged(object sender, EventArgs e)
86 | {
87 | if (inited)
88 | {
89 | bool check = afterInstalledCloseCheckBox.Checked;
90 | Debug.WriteLine("[PreferenceUtil][afterInstalledCloseCheckBox_CheckedChanged] " + check);
91 | PreferenceUtil.Instance.SetCloseAfterInstalled(check ? 1 : 0);
92 | }
93 |
94 | }
95 |
96 |
97 | private void badApkCheckBox_CheckedChanged(object sender, EventArgs e)
98 | {
99 | if (inited)
100 | {
101 | bool check = badApkCheckBox.Checked;
102 | Debug.WriteLine("[PreferenceUtil][badApkCheckBox_CheckedChanged] " + check);
103 | PreferenceUtil.Instance.SetScanBadApk(check ? 1 : 0);
104 | }
105 | }
106 |
107 | private void InitScanApkStatus()
108 | {
109 | bool check = PreferenceUtil.Instance.GetScanBadApk();
110 | badApkCheckBox.Checked = check;
111 | }
112 |
113 | private void InitLanguage()
114 | {
115 | this.Text = LangUtil.Instance.GetSettingFormTitle();
116 | // 安装设置
117 | settingTabControl.TabPages[0].Text = LangUtil.Instance.GetInstallSettingTabTitle();
118 | afterInstalledCloseCheckBox.Text = LangUtil.Instance.GetAfterInstallSuccessClose();
119 | installMethodLabel.Text = LangUtil.Instance.GetInstallMethod();
120 | overlayRadioButton.Text = LangUtil.Instance.GetOverlayInstall();
121 | degradedOverlayRadioButton.Text = LangUtil.Instance.GetDowngradeOverlayInsall();
122 | tipLabel.Text = LangUtil.Instance.GetSettingFormBottomTip();
123 |
124 | // 语言设置
125 | settingTabControl.TabPages[1].Text = LangUtil.Instance.GetLanguageSettingTitle();
126 | selectLanguageLabel.Text = LangUtil.Instance.GetSelectLanguage();
127 | selectLanguageTipLabel.Text = LangUtil.Instance.GetSelectLanguageTip();
128 |
129 | // 实验室功能
130 | settingTabControl.TabPages[2].Text = LangUtil.Instance.GetExperimentalFunction();
131 | maliciousApkTipLabel.Text = LangUtil.Instance.GetDetectionMaliciousApkTip();
132 | badApkCheckBox.Text = LangUtil.Instance.GetDetectionMaliciousApk();
133 | }
134 |
135 | private void selectLanguageComboBox_SelectedIndexChanged(object sender, EventArgs e)
136 | {
137 | if (inited)
138 | {
139 | var sl = (SupportLanguage)selectLanguageComboBox.SelectedItem;
140 | Debug.WriteLine("[SettingForm][selectLanguageComboBox_SelectedIndexChanged] select => " + sl.id);
141 |
142 | PreferenceUtil.Instance.SetLanguage(sl.id);
143 | }
144 | }
145 |
146 |
147 | private void InitSelectLanguage()
148 | {
149 | var list = PreferenceUtil.Instance.GetLanguageList();
150 | selectLanguageComboBox.DataSource = PreferenceUtil.Instance.GetLanguageList();
151 | selectLanguageComboBox.DisplayMember = "name";
152 | selectLanguageComboBox.ValueMember = "id";
153 |
154 | int id = PreferenceUtil.Instance.GetLanguage();
155 | if (id < list.Count)
156 | {
157 | selectLanguageComboBox.SelectedIndex = id;
158 | }
159 |
160 | }
161 |
162 | ///
163 | /// 无线连接 / WSA 设置
164 | ///
165 | ///
166 | ///
167 | private void connectCheckBox_CheckedChanged(object sender, EventArgs e)
168 | {
169 | if (inited)
170 | {
171 | bool check = connectCheckBox.Checked;
172 | Debug.WriteLine("[PreferenceUtil][connectCheckBox_CheckedChanged] " + check);
173 | PreferenceUtil.Instance.SetWSAConnect(check ? 1 : 0);
174 | }
175 | }
176 |
177 | private void InitWSAConnect()
178 | {
179 | bool check = PreferenceUtil.Instance.GetWSAConnect();
180 | connectCheckBox.Checked = check;
181 | }
182 |
183 | ///
184 | /// ip地址改变就保存
185 | ///
186 | ///
187 | ///
188 | private void connectTextBox_TextChanged(object sender, EventArgs e)
189 | {
190 | // 127.0.0.1:58526
191 | // 随时保存
192 | if (!inited)
193 | {
194 | return;
195 | }
196 | PreferenceUtil.Instance.SetWSAConnectIpAddress(connectTextBox.Text.ToString().Trim());
197 | }
198 |
199 | private void InitWSAConnectIpAddress()
200 | {
201 | string ip = PreferenceUtil.Instance.GetWSAConnectIpAddress();
202 | connectTextBox.Text = ip;
203 | }
204 |
205 | ///
206 | /// 初始化关于页面
207 | ///
208 | private void InitAboutPage()
209 | {
210 | versionLabel.Text = String.Format("版本号: {0}", Assembly.GetExecutingAssembly().GetName().Version.ToString());
211 | authorLabel.Text = "作者:我是小学生";
212 | githubLabel.Text = "Github:";
213 | githubLinkLabel.Text = "https://github.com/1595901624/ApkInstaller";
214 | giteeLinkLabel.Text = "https://gitee.com/haoyu3/wsainstall-tool/";
215 | StringBuilder sb = new StringBuilder();
216 | sb.Append("感谢开源软件:").Append("\n")
217 | .Append("kkguo —— ApkShellExt2").Append("\n")
218 | .Append("我是小学生 —— ApkShellExt2 v3.0.0").Append("\n")
219 | .Append("Google —— AAPT2").Append("\n")
220 | .Append("Google —— ADB Shell").Append("\n");
221 | thankLabel.Text = sb.ToString();
222 | }
223 |
224 | private void githubLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
225 | {
226 | System.Diagnostics.Process.Start("https://github.com/1595901624/ApkInstaller");
227 | }
228 |
229 | private void giteeLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
230 | {
231 | System.Diagnostics.Process.Start("https://gitee.com/haoyu3/wsainstall-tool/");
232 | }
233 | }
234 | }
235 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppForm/SettingForm.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 |
--------------------------------------------------------------------------------
/WSAInstallTool/AppModel/SupportLanguage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.Serialization;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace WSAInstallTool.AppModel
9 | {
10 | ///
11 | /// 支持的语言
12 | ///
13 | [DataContractAttribute]
14 | class SupportLanguage
15 | {
16 | [DataMember]
17 | public int id { get; set; }
18 | [DataMember]
19 | public string name { get; set; }
20 | [DataMember]
21 | public string file { get; set; }
22 |
23 | public override string ToString()
24 | {
25 | return "id = " + id + ", name = " + name + ", file = " + file;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/AdbWinApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/AdbWinApi.dll
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/AdbWinUsbApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/AdbWinUsbApi.dll
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/ApkShellext2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/ApkShellext2.dll
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/ApkShellext2.resources.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/ApkShellext2.resources.dll
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/BadApk.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/BadApk.dll
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/aapt2.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/aapt2.exe
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/adb.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/adb.exe
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/blacklist/blacklist.xyz:
--------------------------------------------------------------------------------
1 | wr7DnsKFw5LDhcONw4jDhsOXwqzDh8KFwp3ChcKvw5DCvcOSwqTCpMKkwqnChcKPwoXDk8OEw4bDjsOEw4rDiMKxw4TDkMOIwoXCncKFw4bDksOQwpHDhMOJwpHDlMOUwpTCmcKbwpzCmcKXwpfCmMKUwpzChcKPwoXDlsOLw4TClcKYwpnChcKdwoXChcOgwo/DnsKFw5LDhcONw4jDhsOXwqzDh8KFwp3ChcKcw4fDicOEwpvDiMOEwpPCmsKWwoXCj8KFw5PDhMOGw47DhMOKw4jCscOEw5DDiMKFwp3ChcOGw5LDkMKRw4vChcKPwoXDlsOLw4TClcKYwpnChcKdwoXChcOgwo/DnsKFw5LDhcONw4jDhsOXwqzDh8KFwp3ChcKwwqXDh8OGwq3CrcKtwrnChcKPwoXDk8OEw4bDjsOEw4rDiMKxw4TDkMOIwoXCncKFw4bDksOQwpHDkMOcw4bDksOQw5PDhMORw5zCkcOQw5zDhMOTw5PCl8KFwo/ChcOWw4vDhMKVwpjCmcKFwp3ChcKFw6DCj8OewoXDksOFw43DiMOGw5fCrMOHwoXCncKFwprCqcOOw5XCuMK4wrjCvcKFwo/ChcOTw4TDhsOOw4TDisOIwrHDhMOQw4jChcKdwoXDhsOSw5DCkcOEw4fDisKFwo/ChcOWw4vDhMKVwpjCmcKFwp3ChcKFw6DCj8OewoXDksOFw43DiMOGw5fCrMOHwoXCncKFwrLCp8OZwrrCpcKlwqXCp8KFwo/ChcOTw4TDhsOOw4TDisOIwrHDhMOQw4jChcKdwoXDhsOSw5DCkcORw5DCkcKow4zDnMKFwo/ChcOWw4vDhMKVwpjCmcKFwp3ChcKFw6DCj8OewoXDksOFw43DiMOGw5fCrMOHwoXCncKFw47Dh8ObwpvCqsKqwqrCsMKFwo/ChcOTw4TDhsOOw4TDisOIwrHDhMOQw4jChcKdwoXDhsOSw5DCkcOJw4TDkcOOw4jDlsKRw5fDkMOSw5XDiMOTw4/DmMOWwoXCj8KFw5bDi8OEwpXCmMKZwoXCncKFwoXDoMKPw57ChcOSw4XDjcOIw4bDl8Ksw4fChcKdwoXDj8K6wpfCqsKcwpzCnMKmwoXCj8KFw5PDhMOGw47DhMOKw4jCscOEw5DDiMKFwp3ChcOGw5LDkMKRw4fDhMOFw4TDjMKRwqbDi8OEw5HDisOIwrDDksOHw4jDj8KVwoXCj8KFw5bDi8OEwpXCmMKZwoXCncKFwoXDoMKPw57ChcOSw4XDjcOIw4bDl8Ksw4fChcKdwoXDk8K6wrHCtMKmwqbCpsKvwoXCj8KFw5PDhMOGw47DhMOKw4jCscOEw5DDiMKFwp3ChcOGw5LDkMKRw4XDhMOKw4jClcKVwpXClcKVwpHDkMOcw4/DjMOZw4jChcKPwoXDlsOLw4TClcKYwpnChcKdwoXChcOgwo/DnsKFw5LDhcONw4jDhsOXwqzDh8KFwp3ChcK1w4fDiMKlwpbClsKWwq/ChcKPwoXDk8OEw4bDjsOEw4rDiMKxw4TDkMOIwoXCncKFw4bDksOQwpHDhMOcw53DkMOJw4XDjMOFw5XCkcOQw5zDkMOJwoXCj8KFw5bDi8OEwpXCmMKZwoXCncKFwoXDoMKPw57ChcOSw4XDjcOIw4bDl8Ksw4fChcKdwoXDkcOKwqTClMKVwpXClcKlwoXCj8KFw5PDhMOGw47DhMOKw4jCscOEw5DDiMKFwp3ChcOGw5LDkMKRw4zDhMOTw5PDmcKYw5DDjMOEw5HDicOIw5HChcKPwoXDlsOLw4TClcKYwpnChcKdwoXChcOgwo/DnsKFw5LDhcONw4jDhsOXwqzDh8KFwp3ChcK5w47Ck8KzwqbCpsKmwrDChcKPwoXDk8OEw4bDjsOEw4rDiMKxw4TDkMOIwoXCncKFw5PDj8OYw5bCkcOHw43Dh8ONw4fDjcOPw4/Dk8OTw5DDkcObw5HDm8KFwo/ChcOWw4vDhMKVwpjCmcKFwp3ChcKFw6DCj8OewoXDksOFw43DiMOGw5fCrMOHwoXCncKFw5zCpcKXwrfCtcK1wrXDjMKFwo/ChcOTw4TDhsOOw4TDisOIwrHDhMOQw4jChcKdwoXDhsOSw5DCkcOGw4vDmMORw5jDksKRw5TDjMKFwo/ChcOWw4vDhMKVwpjCmcKFwp3ChcKFw6DCj8OewoXDksOFw43DiMOGw5fCrMOHwoXCncKFwq/DkcKYw4bCrsKnwqfCrsKFwo/ChcOTw4TDhsOOw4TDisOIwrHDhMOQw4jChcKdwoXDhsOSw5DCkcONw4TDkMOIw5bCkcOPw5LDisOMw5HChcKPwoXDlsOLw4TClcKYwpnChcKdwoXCk8OJw4bCm8KVwpPCmcOEw4bDhcKUwpTClcOIwpjCl8KYw4fCm8OJwpPCl8Kcw4nClMOJwpTCmsOJwprDicKWw4XClsKcw4jDhcKTw4jDhcKZwpvDiMKbwpbDhMKUwpfClcOHwpjDhMOEw4nDhcOIwprCmcKcwpvDhsKZw4TDhMKFw6DCj8OewoXDksOFw43DiMOGw5fCrMOHwoXCncKFw4jDh8KXw4bCmsKTwprClMKcwpPChcKPwoXDk8OEw4bDjsOEw4rDiMKxw4TDkMOIwoXCncKFw4bDlMOWw4rDjsKRw4bDksOQwoXCj8KFw5bDi8OEwpXCmMKZwoXCncKFwprCnMKYwpXClcOEw4TCl8KcwpzDhMKVw4TClMKcwpXCnMOJwpnCm8KWwpfDhMKVw4nClMKcwpTCmsKawpnDicKcwpvCk8KWwpPCm8KWwpvCm8KUwpbDhMKbwpPCmsOHwpfDhsKXwpTDicKawpPDhMKVwpvCmMKaw4bCmcOFw4fChcOgwo/DnsKFw5LDhcONw4jDhsOXwqzDh8KFwp3ChcOIwpzCm8OGwpjClcOHwpbCk8KVwoXCj8KFw5PDhMOGw47DhMOKw4jCscOEw5DDiMKFwp3ChcOGw5LDkMKRw5zDjcOcw5jDkMOMw4XDlcKRw5DDnMOQw4nChcKPwoXDlsOLw4TClcKYwpnChcKdwoXClsOJw4XCm8OGw4fClcKcw4nClcOJw4XCmsKUwpPCl8KcwpzClsOJw4bCk8OIw4XClMKWwprDhcOIwpvClsOIw4bDh8OGw4nCm8KWw4bDiMKaw4nCm8KVwpjCmsKbwpPClsOJw4TClsOIwpfCmMKXw4jDhsOJw4nCk8KTw4jClMKFw6DCj8OewoXDksOFw43DiMOGw5fCrMOHwoXCncKFw4XDhcKbw4TDiMKYwpXClsKaw4XChcKPwoXDk8OEw4bDjsOEw4rDiMKxw4TDkMOIwoXCncKFw5DDl8KRw5PDksONw4zDiMOLw5jDj8OYw5vDjMOEwpHDhsOSw5LChcKPwoXDlsOLw4TClcKYwpnChcKdwoXDhsKXwpvClsKVw4bDhsKcw4XDhMKZwpjCnMKVwpPDhMKawpTClcOFw4fCmcKZw4XDhsOIwpjClMKUw4TClcKZw4jClcKZwpPClcKVwpPCk8KYw4nDiMOEwpXCm8KbwpvCm8OEw4fDhMOGwpXCmcKYwpjCm8KYwpvClMOFwpPClMKFw6DDgA==
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/install.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/install.bat
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/lang/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "launchTip": "Please run as Administrator!",
3 | "ok": "OK",
4 | "associateApk": "Install Options",
5 | "oneKeyInstall": "One-Click Install",
6 | "oneKeyUninstall": "Uninstall/Clear Old Version",
7 | "about": "About",
8 | "readMe": "Read Me",
9 | "installFinished": "Install complete!",
10 | "uninstallFinished": "Cleanup complete! Please delete the directory where the software is located!",
11 | "readMeMessageTip": "1、Click \"One-Click Install\" will automatically associate the APK file, and display the APK itself application icon\n2、Click \"Uninstall/Clear Old Version\" will automatically unlink the APK file, and unshow the APK itself application icon\n3、After clicking \"Uninstall/Clear Old Version\", If the APK icon is still displayed, please restart the computer\n4、How to uninstall the software? Please click \"Uninstall/Clear Old Version\" first, then delete the directory where the software is located.",
12 | "packageName": "Package Name:",
13 | "versionName": "Version Name:",
14 | "minVersionName": "Min-Supported Version:",
15 | "permissions": "Permissions:",
16 | "size": "Size:",
17 | "noAnyAndroidDevice": "No Android devices are detected!",
18 | "appInstalling": "Installing...",
19 | "appInstall": "Install",
20 | "appInstallSuccess": "Install Success!",
21 | "appInstallFailedDowngrade": "Install Failed:\nThe current installed version is detected to be lower than the version installed in the device. If you need to force the installation, please go to the settings page and enable \"Downgrade Overlay\"",
22 | "appInstallFailed": "Install Failed:",
23 | "appUnknown": "Unknown",
24 | "viewMorePermissions": "See More...",
25 | "installFormTitle": "Install Apk",
26 | "nothing": "nothing",
27 | "unrecognizedVersion": "Unrecognized Version",
28 | "deviceSelectFormTitle": "Select Device",
29 | "deviceSelectTip": "To find multiple Android devices, select the device you want to install:",
30 | "confirmInstall": "Confirm",
31 | "permissionFormTitle": "All Permissions",
32 | "columnNumber": "No.",
33 | "columnPermission": "Permission",
34 | "settingFormTitle": "Options",
35 | "installSettingTabTitle": "Apk Installation",
36 | "afterInstallSuccessClose": "The window closes automatically after successful installation",
37 | "installMethod": "Install Method:",
38 | "overlayInstall": "Overlay",
39 | "downgradeOverlayInsall": "Downgrade Overlay",
40 | "settingFormBottomTip": "Note: All settings under this page take effect globally.",
41 | "languageSettingTitle": "Language",
42 | "selectLanguage": "Select Language:",
43 | "selectLanguageTip": "Note: Language selection needs to take effect next time",
44 | "experimentalFunctionTabTitle": "Experimental",
45 | "detectionMaliciousApk": "Enable malware identification",
46 | "detectionMaliciousApkTip": "Note: Malware identification requires a computer to connect to the network, which is currently in the experimental stage, with a low recognition rate and even false positives. Of course, with the improvement of user usage, the recognition rate will gradually increase. Since this function requires the use of server detection, in order to alleviate server pressure, this function is turned off by default.",
47 | "LANG_ACCESS_COARSE_LOCATION": "android.permission.ACCESS_COARSE_LOCATION",
48 | "LANG_ACCESS_FINE_LOCATION": "android.permission.ACCESS_FINE_LOCATION",
49 | "LANG_ACCESS_LOCATION_EXTRA_COMMANDS": "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS",
50 | "LANG_ACCESS_MOCK_LOCATION": "android.permission.ACCESS_MOCK_LOCATION",
51 | "LANG_ACCESS_NETWORK_STATE": "android.permission.ACCESS_NETWORK_STATE",
52 | "LANG_ACCESS_SURFACE_FLINGER": "android.permission.ACCESS_SURFACE_FLINGER",
53 | "LANG_ACCESS_WIFI_STATE": "android.permission.ACCESS_WIFI_STATE",
54 | "LANG_BATTERY_STATS": "android.permission.BATTERY_STATS",
55 | "LANG_BLUETOOTH": "android.permission.BLUETOOTH",
56 | "LANG_BLUETOOTH_ADMIN": "android.permission.BLUETOOTH_ADMIN",
57 | "LANG_BRICK": "android.permission.BRICK",
58 | "LANG_BROADCAST_PACKAGE_REMOVED": "android.permission.BROADCAST_PACKAGE_REMOVED",
59 | "LANG_BROADCAST_SMS": "android.permission.BROADCAST_SMS",
60 | "LANG_BROADCAST_STICKY": "android.permission.BROADCAST_STICKY",
61 | "LANG_BROADCAST_WAP_PUSH": "android.permission.BROADCAST_WAP_PUSH",
62 | "LANG_CALL_PHONE": "android.permission.CALL_PHONE",
63 | "LANG_CALL_PRIVILEGED": "android.permission.CALL_PRIVILEGED",
64 | "LANG_CAMERA": "android.permission.CAMERA",
65 | "LANG_CHANGE_CONFIGURATION": "android.permission.CHANGE_CONFIGURATION",
66 | "LANG_CHANGE_NETWORK_STATE": "android.permission.CHANGE_NETWORK_STATE",
67 | "LANG_CHANGE_WIFI_MULTICAST_STATE": "android.permission.CHANGE_WIFI_MULTICAST_STATE",
68 | "LANG_CHANGE_WIFI_STATE": "android.permission.CHANGE_WIFI_STATE",
69 | "LANG_CLEAR_APP_CACHE": "android.permission.CLEAR_APP_CACHE",
70 | "LANG_CLEAR_APP_USER_DATA": "android.permission.CLEAR_APP_USER_DATA",
71 | "LANG_CONTROL_LOCATION_UPDATES": "android.permission.CONTROL_LOCATION_UPDATES",
72 | "LANG_DELETE_CACHE_FILES": "android.permission.DELETE_CACHE_FILES",
73 | "LANG_DELETE_PACKAGES": "android.permission.DELETE_PACKAGES",
74 | "LANG_DEVICE_POWER": "android.permission.DEVICE_POWER",
75 | "LANG_DIAGNOSTIC": "android.permission.DIAGNOSTIC",
76 | "LANG_DISABLE_KEYGUARD": "android.permission.DISABLE_KEYGUARD",
77 | "LANG_DUMP": "android.permission.DUMP",
78 | "LANG_EXPAND_STATUS_BAR": "android.permission.EXPAND_STATUS_BAR",
79 | "LANG_FACTORY_TEST": "android.permission.FACTORY_TEST",
80 | "LANG_FLASHLIGHT": "android.permission.FLASHLIGHT",
81 | "LANG_FORCE_BACK": "android.permission.FORCE_BACK",
82 | "LANG_GET_PACKAGE_SIZE": "android.permission.GET_PACKAGE_SIZE",
83 | "LANG_GET_TASKS": "android.permission.GET_TASKS",
84 | "LANG_GLOBAL_SEARCH": "android.permission.GLOBAL_SEARCH",
85 | "LANG_HARDWARE_TEST": "android.permission.HARDWARE_TEST",
86 | "LANG_INJECT_EVENTS": "android.permission.INJECT_EVENTS",
87 | "LANG_INSTALL_LOCATION_PROVIDER": "android.permission.INSTALL_LOCATION_PROVIDER",
88 | "LANG_INSTALL_PACKAGES": "android.permission.INSTALL_PACKAGES",
89 | "LANG_INTERNAL_SYSTEM_WINDOW": "android.permission.INTERNAL_SYSTEM_WINDOW",
90 | "LANG_INTERNET": "android.permission.INTERNET",
91 | "LANG_KILL_BACKGROUND_PROCESSES": "android.permission.KILL_BACKGROUND_PROCESSES",
92 | "LANG_MANAGE_ACCOUNTS": "android.permission.MANAGE_ACCOUNTS",
93 | "LANG_MANAGE_APP_TOKENS": "android.permission.MANAGE_APP_TOKENS",
94 | "LANG_MTWEAK_USER": "android.permission.MTWEAK_USER",
95 | "LANG_MTWEAK_FORUM": "android.permission.MTWEAK_FORUM",
96 | "LANG_MASTER_CLEAR": "android.permission.MASTER_CLEAR",
97 | "LANG_MODIFY_AUDIO_SETTINGS": "android.permission.MODIFY_AUDIO_SETTINGS",
98 | "LANG_MODIFY_PHONE_STATE": "android.permission.MODIFY_PHONE_STATE",
99 | "LANG_MOUNT_FORMAT_FILESYSTEMS": "android.permission.MOUNT_FORMAT_FILESYSTEMS",
100 | "LANG_MOUNT_UNMOUNT_FILESYSTEMS": "android.permission.MOUNT_UNMOUNT_FILESYSTEMS",
101 | "LANG_NFC": "android.permission.NFC",
102 | "LANG_PERSISTENT_ACTIVITY": "android.permission.PERSISTENT_ACTIVITY",
103 | "LANG_PROCESS_OUTGOING_CALLS": "android.permission.PROCESS_OUTGOING_CALLS",
104 | "LANG_READ_CALENDAR": "android.permission.READ_CALENDAR",
105 | "LANG_READ_CONTACTS": "android.permission.READ_CONTACTS",
106 | "LANG_READ_FRAME_BUFFER": "android.permission.READ_FRAME_BUFFER",
107 | "LANG_READ_HISTORY_BOOKMARKS": "com.android.browser.permission.READ_HISTORY_BOOKMARKS",
108 | "LANG_READ_INPUT_STATE": "android.permission.READ_INPUT_STATE",
109 | "LANG_READ_LOGS": "android.permission.READ_LOGS",
110 | "LANG_READ_PHONE_STATE": "android.permission.READ_PHONE_STATE",
111 | "LANG_READ_SMS": "android.permission.READ_SMS",
112 | "LANG_READ_EXTERNAL_STORAGE": "android.permission.READ_EXTERNAL_STORAGE",
113 | "LANG_READ_SYNC_SETTINGS": "android.permission.READ_SYNC_SETTINGS",
114 | "LANG_READ_SYNC_STATS": "android.permission.READ_SYNC_STATS",
115 | "LANG_REBOOT": "android.permission.REBOOT",
116 | "LANG_RECEIVE_BOOT_COMPLETED": "android.permission.RECEIVE_BOOT_COMPLETED",
117 | "LANG_RECEIVE_MMS": "android.permission.RECEIVE_MMS",
118 | "LANG_RECEIVE_SMS": "android.permission.RECEIVE_SMS",
119 | "LANG_RECEIVE_WAP_PUSH": "android.permission.RECEIVE_WAP_PUSH",
120 | "LANG_RECORD_AUDIO": "android.permission.RECORD_AUDIO",
121 | "LANG_REORDER_TASKS": "android.permission.REORDER_TASKS",
122 | "LANG_RESTART_PACKAGES": "android.permission.RESTART_PACKAGES",
123 | "LANG_SEND_SMS": "android.permission.SEND_SMS",
124 | "LANG_SET_ACTIVITY_WATCHER": "android.permission.SET_ACTIVITY_WATCHER",
125 | "LANG_SET_ALARM": "com.android.alarm.permission.SET_ALARM",
126 | "LANG_SET_ALWAYS_FINISH": "android.permission.SET_ALWAYS_FINISH",
127 | "LANG_SET_ANIMATION_SCALE": "android.permission.SET_ANIMATION_SCALE",
128 | "LANG_SET_DEBUG_APP": "android.permission.SET_DEBUG_APP",
129 | "LANG_SET_ORIENTATION": "android.permission.SET_ORIENTATION",
130 | "LANG_SET_PREFERRED_APPLICATIONS": "android.permission.SET_PREFERRED_APPLICATIONS",
131 | "LANG_SET_PROCESS_LIMIT": "android.permission.SET_PROCESS_LIMIT",
132 | "LANG_SET_TIME": "android.permission.SET_TIME",
133 | "LANG_SET_TIME_ZONE": "android.permission.SET_TIME_ZONE",
134 | "LANG_SET_WALLPAPER": "android.permission.SET_WALLPAPER",
135 | "LANG_SET_WALLPAPER_HINTS": "android.permission.SET_WALLPAPER_HINTS",
136 | "LANG_SIGNAL_PERSISTENT_PROCESSES": "android.permission.SIGNAL_PERSISTENT_PROCESSES",
137 | "LANG_STATUS_BAR": "android.permission.STATUS_BAR",
138 | "LANG_SUBSCRIBED_FEEDS_READ": "android.permission.SUBSCRIBED_FEEDS_READ",
139 | "LANG_SUBSCRIBED_FEEDS_WRITE": "android.permission.SUBSCRIBED_FEEDS_WRITE",
140 | "LANG_SYSTEM_ALERT_WINDOW": "android.permission.SYSTEM_ALERT_WINDOW",
141 | "LANG_UPDATE_DEVICE_STATS": "android.permission.UPDATE_DEVICE_STATS",
142 | "LANG_USE_CREDENTIALS": "android.permission.USE_CREDENTIALS",
143 | "LANG_USE_SIP": "android.permission.USE_SIP",
144 | "LANG_VIBRATE": "android.permission.VIBRATE",
145 | "LANG_WAKE_LOCK": "android.permission.WAKE_LOCK",
146 | "LANG_WRITE_APN_SETTINGS": "android.permission.WRITE_APN_SETTINGS",
147 | "LANG_WRITE_CALENDAR": "android.permission.WRITE_CALENDAR",
148 | "LANG_WRITE_CONTACTS": "android.permission.WRITE_CONTACTS",
149 | "LANG_WRITE_EXTERNAL_STORAGE": "android.permission.WRITE_EXTERNAL_STORAGE",
150 | "LANG_WRITE_GSERVICES": "android.permission.WRITE_GSERVICES",
151 | "LANG_WRITE_HISTORY_BOOKMARKS": "com.android.browser.permission.WRITE_HISTORY_BOOKMARKS",
152 | "LANG_WRITE_SECURE_SETTINGS": "android.permission.WRITE_SECURE_SETTINGS",
153 | "LANG_WRITE_SETTINGS": "android.permission.WRITE_SETTINGS",
154 | "LANG_WRITE_SMS": "android.permission.WRITE_SMS",
155 | "LANG_WRITE_SYNC_SETTINGS": "android.permission.WRITE_SYNC_SETTINGS"
156 | }
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/lang/lang.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 0,
4 | "name": "中国-简体中文",
5 | "file": "zh_CN.json"
6 | },
7 | {
8 | "id": 1,
9 | "name": "中國-繁體中文(香港)",
10 | "file": "zh_HK.json"
11 | },
12 | {
13 | "id": 2,
14 | "name": "中國-繁體中文(台灣)",
15 | "file": "zh_TW.json"
16 | },
17 | {
18 | "id": 3,
19 | "name": "English",
20 | "file": "en.json"
21 | }
22 | ]
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/lang/zh_CN.json:
--------------------------------------------------------------------------------
1 | {
2 | "launchTip": "部分设置项需要操作注册表,请使用管理员身份运行此软件!",
3 | "ok": "确定",
4 | "associateApk": "关联APK",
5 | "oneKeyInstall": "一键安装",
6 | "oneKeyUninstall": "卸载软件/清除旧版本",
7 | "about": "关于",
8 | "readMe": "使用前必读",
9 | "installFinished": "安装完成!",
10 | "uninstallFinished": "清除完成!请直接删除软件所在目录即可!",
11 | "readMeMessageTip": "1、点击“一键安装”将会自动关联APK文件,并且显示APK自身应用图标\n2、点击“一键清除”将会自动解关联APK文件,并且解除显示APK自身应用图标\n3、点击“一键清除”后如果依然显示APK图标是由于电脑软件的原因,重启电脑即可解决\n4、卸载软件:请先点击“一键清除”,然后直接删除软件所在目录即可。",
12 | "packageName": "包名:",
13 | "versionName": "版本名称:",
14 | "minVersionName": "最低支持版本:",
15 | "permissions": "权限:",
16 | "size": "大小:",
17 | "noAnyAndroidDevice": "没有检测到任何安卓设备!",
18 | "appInstalling": "安装中...",
19 | "appInstall": "安装",
20 | "appInstallSuccess": "安装成功!",
21 | "appInstallFailedDowngrade": "安装失败:检测到当前安装版本低于设备中已安装的版本。\n如果需要强制安装,请到设置页勾选“降级覆盖安装”!",
22 | "appInstallFailed": "安装失败:",
23 | "appUnknown": "未知",
24 | "viewMorePermissions": "查看更多权限",
25 | "installFormTitle": "安装 Apk",
26 | "nothing": "无",
27 | "unrecognizedVersion": "无法识别的版本",
28 | "deviceSelectFormTitle": "选择安装的设备",
29 | "deviceSelectTip": "发现多款安卓设备,请选择要安装的设备:",
30 | "confirmInstall": "确定安装",
31 | "permissionFormTitle": "所有权限",
32 | "columnNumber": "序号",
33 | "columnPermission": "权限",
34 | "settingFormTitle": "偏好设置",
35 | "installSettingTabTitle": "Apk安装设置",
36 | "afterInstallSuccessClose": "安装成功后自动关闭窗口",
37 | "installMethod": "安装方式:",
38 | "overlayInstall": "覆盖安装",
39 | "downgradeOverlayInsall": "降级覆盖安装",
40 | "settingFormBottomTip": "注:该页面下的所有设置全局生效。",
41 | "languageSettingTitle": "语言设置",
42 | "selectLanguage": "选择语言:",
43 | "selectLanguageTip": "注:语言选择后需要下一次生效",
44 | "experimentalFunctionTabTitle":"实验室功能",
45 | "detectionMaliciousApk":"启用恶意软件识别功能",
46 | "detectionMaliciousApkTip":"注:恶意软件识别功能需要电脑连接网络,该功能目前尚处于实验性阶段,识别率较低,甚至出现误报。当然随着用户使用率的提高,识别率会逐渐提高。由于该功能需要使用平台去检测,为缓解服务器压力,默认关闭此功能。",
47 | "LANG_ACCESS_COARSE_LOCATION": "通过WiFi或移动基站的方式获取用户粗略的经纬度信息,定位精度大概误差在30~1500米",
48 | "LANG_ACCESS_FINE_LOCATION": "通过GPS芯片接收卫星的定位信息,定位精度达10米以内",
49 | "LANG_ACCESS_LOCATION_EXTRA_COMMANDS": "允许程序访问额外的定位提供者指令",
50 | "LANG_ACCESS_MOCK_LOCATION": "获取模拟定位信息,一般用于帮助开发者调试应用",
51 | "LANG_ACCESS_NETWORK_STATE": "获取网络信息状态,如当前的网络连接是否有效",
52 | "LANG_ACCESS_SURFACE_FLINGER": "Android平台上底层的图形显示支持,一般用于游戏或照相机预览界面和底层模式的屏幕截图",
53 | "LANG_ACCESS_WIFI_STATE": "获取当前WiFi接入的状态以及WLAN热点的信息",
54 | "LANG_BATTERY_STATS": "获取电池电量统计信息",
55 | "LANG_BLUETOOTH": "允许程序连接配对过的蓝牙设备",
56 | "LANG_BLUETOOTH_ADMIN": "允许程序进行发现和配对新的蓝牙设备",
57 | "LANG_BRICK": "【危险权限】能够禁止使用手机",
58 | "LANG_BROADCAST_PACKAGE_REMOVED": "当一个应用在删除时触发一个广播",
59 | "LANG_BROADCAST_SMS": "当收到短信时触发一个广播",
60 | "LANG_BROADCAST_STICKY": "允许一个程序收到广播后快速收到下一个广播",
61 | "LANG_BROADCAST_WAP_PUSH": "WAP PUSH服务收到后触发一个广播",
62 | "LANG_CALL_PHONE": "允许程序从非系统拨号器里输入电话号码",
63 | "LANG_CALL_PRIVILEGED": "允许程序拨打电话,替换系统的拨号器界面",
64 | "LANG_CAMERA": "允许访问摄像头进行拍照",
65 | "LANG_CHANGE_CONFIGURATION": "允许当前应用改变配置,如定位",
66 | "LANG_CHANGE_NETWORK_STATE": "改变网络状态如是否能联网",
67 | "LANG_CHANGE_WIFI_MULTICAST_STATE": "改变WiFi多播状态",
68 | "LANG_CHANGE_WIFI_STATE": "改变WiFi状态",
69 | "LANG_CLEAR_APP_CACHE": "清除应用缓存",
70 | "LANG_CLEAR_APP_USER_DATA": "清除应用的用户数据",
71 | "LANG_CONTROL_LOCATION_UPDATES": "允许获得移动网络定位信息改变",
72 | "LANG_DELETE_CACHE_FILES": "允许应用删除缓存文件",
73 | "LANG_DELETE_PACKAGES": "允许程序删除应用",
74 | "LANG_DEVICE_POWER": "允许访问底层电源管理",
75 | "LANG_DIAGNOSTIC": "允许程序到RW到诊断资源",
76 | "LANG_DISABLE_KEYGUARD": "允许程序禁用键盘锁",
77 | "LANG_DUMP": "允许程序获取系统dump信息并转存",
78 | "LANG_EXPAND_STATUS_BAR": "允许程序扩展或收缩状态栏",
79 | "LANG_FACTORY_TEST": "允许程序运行工厂测试模式",
80 | "LANG_FLASHLIGHT": "允许访问闪光灯",
81 | "LANG_FORCE_BACK": "允许程序强制使用back后退按键,无论页面是否在顶层",
82 | "LANG_GET_PACKAGE_SIZE": "获取应用的文件大小",
83 | "LANG_GET_TASKS": "允许程序获取当前或最近运行的应用",
84 | "LANG_GLOBAL_SEARCH": "允许程序使用全局搜索功能",
85 | "LANG_HARDWARE_TEST": "访问硬件辅助设备,用于硬件测试",
86 | "LANG_INJECT_EVENTS": "允许访问本程序的底层事件,获取按键、轨迹球的事件流",
87 | "LANG_INSTALL_LOCATION_PROVIDER": "安装定位提供",
88 | "LANG_INSTALL_PACKAGES": "允许程序安装应用",
89 | "LANG_INTERNAL_SYSTEM_WINDOW": "允许程序打开内部窗口,不对第三方应用程序开放此权限",
90 | "LANG_INTERNET": "访问网络连接,可能产生GPRS流量",
91 | "LANG_KILL_BACKGROUND_PROCESSES": "允许程序调用killBackgroundProcesses(String)方法结束后台进程",
92 | "LANG_MANAGE_ACCOUNTS": "允许程序管理AccountManager中的账户列表",
93 | "LANG_MANAGE_APP_TOKENS": "管理创建、摧毁、Z轴顺序,仅用于系统",
94 | "LANG_MTWEAK_USER": "允许mTweak用户访问高级系统权限",
95 | "LANG_MTWEAK_FORUM": "允许使用mTweak社区权限",
96 | "LANG_MASTER_CLEAR": "允许程序执行软格式化,删除系统配置信息",
97 | "LANG_MODIFY_AUDIO_SETTINGS": "修改声音设置信息",
98 | "LANG_MODIFY_PHONE_STATE": "修改电话状态,如飞行模式,但不包含替换系统拨号器界面",
99 | "LANG_MOUNT_FORMAT_FILESYSTEMS": "格式化可移动文件系统,比如格式化清空SD卡",
100 | "LANG_MOUNT_UNMOUNT_FILESYSTEMS": "挂载、反挂载外部文件系统",
101 | "LANG_NFC": "允许程序执行NFC近距离通讯操作,用于移动支持",
102 | "LANG_PERSISTENT_ACTIVITY": "创建一个永久的Activity,该功能标记为将来将被移除",
103 | "LANG_PROCESS_OUTGOING_CALLS": "允许程序监视,修改或放弃播出电话",
104 | "LANG_READ_CALENDAR": "允许程序读取用户的日程信息",
105 | "LANG_READ_CONTACTS": "允许应用访问联系人通讯录信息",
106 | "LANG_READ_FRAME_BUFFER": "读取帧缓存用于屏幕截图",
107 | "LANG_READ_HISTORY_BOOKMARKS": "读取浏览器收藏夹和历史记录",
108 | "LANG_READ_INPUT_STATE": "读取当前键的输入状态,仅用于系统",
109 | "LANG_READ_LOGS": "读取系统底层日志",
110 | "LANG_READ_PHONE_STATE": "访问电话状态",
111 | "LANG_READ_SMS": "读取短信内容",
112 | "LANG_READ_EXTERNAL_STORAGE": "允许程序读取内部存储",
113 | "LANG_READ_SYNC_SETTINGS": "读取同步设置,读取Google在线同步设置",
114 | "LANG_READ_SYNC_STATS": "读取同步状态,获得Google在线同步状态",
115 | "LANG_REBOOT": "允许程序重新启动设备",
116 | "LANG_RECEIVE_BOOT_COMPLETED": "允许程序开机自动运行",
117 | "LANG_RECEIVE_MMS": "接收彩信",
118 | "LANG_RECEIVE_SMS": "接收短信",
119 | "LANG_RECEIVE_WAP_PUSH": "接收WAP PUSH信息",
120 | "LANG_RECORD_AUDIO": "录制声音通过手机或耳机的麦克",
121 | "LANG_REORDER_TASKS": "重新排序系统Z轴运行中的任务",
122 | "LANG_RESTART_PACKAGES": "结束任务通过restartPackage(String)方法,该方式将在外来放弃",
123 | "LANG_SEND_SMS": "发送短信",
124 | "LANG_SET_ACTIVITY_WATCHER": "设置Activity观察器一般用于monkey测试",
125 | "LANG_SET_ALARM": "设置闹铃提醒",
126 | "LANG_SET_ALWAYS_FINISH": "设置程序在后台是否总是退出",
127 | "LANG_SET_ANIMATION_SCALE": "设置全局动画缩放",
128 | "LANG_SET_DEBUG_APP": "设置调试程序,一般用于开发",
129 | "LANG_SET_ORIENTATION": "设置屏幕方向为横屏或标准方式显示,不用于普通应用",
130 | "LANG_SET_PREFERRED_APPLICATIONS": "设置应用的参数,已不再工作,具体查看addPackageToPreferred(String)介绍",
131 | "LANG_SET_PROCESS_LIMIT": "允许程序设置最大的进程数量的限制",
132 | "LANG_SET_TIME": "设置系统时间",
133 | "LANG_SET_TIME_ZONE": "设置系统时区",
134 | "LANG_SET_WALLPAPER": "设置桌面壁纸",
135 | "LANG_SET_WALLPAPER_HINTS": "设置壁纸建议",
136 | "LANG_SIGNAL_PERSISTENT_PROCESSES": "发送一个永久的进程信号",
137 | "LANG_STATUS_BAR": "允许程序打开、关闭、禁用状态栏",
138 | "LANG_SUBSCRIBED_FEEDS_READ": "访问订阅信息的数据库",
139 | "LANG_SUBSCRIBED_FEEDS_WRITE": "写入或修改订阅内容的数据库",
140 | "LANG_SYSTEM_ALERT_WINDOW": "显示系统窗口",
141 | "LANG_UPDATE_DEVICE_STATS": "更新设备状态",
142 | "LANG_USE_CREDENTIALS": "允许程序请求验证从AccountManager",
143 | "LANG_USE_SIP": "允许程序使用SIP视频服务",
144 | "LANG_VIBRATE": "允许振动",
145 | "LANG_WAKE_LOCK": "允许程序在手机屏幕关闭后后台进程仍然运行",
146 | "LANG_WRITE_APN_SETTINGS": "写入网络GPRS接入点设置",
147 | "LANG_WRITE_CALENDAR": "写入日程,但不可读取",
148 | "LANG_WRITE_CONTACTS": "写入联系人,但不可读取",
149 | "LANG_WRITE_EXTERNAL_STORAGE": "允许程序写入外部存储,如SD卡上写文件",
150 | "LANG_WRITE_GSERVICES": "允许程序写入Google Map服务数据",
151 | "LANG_WRITE_HISTORY_BOOKMARKS": "写入浏览器历史记录或收藏夹,但不可读取",
152 | "LANG_WRITE_SECURE_SETTINGS": "允许程序读写系统安全敏感的设置项",
153 | "LANG_WRITE_SETTINGS": "允许读写系统设置项",
154 | "LANG_WRITE_SMS": "允许编写短信",
155 | "LANG_WRITE_SYNC_SETTINGS": "写入Google在线同步设置"
156 | }
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/lang/zh_HK.json:
--------------------------------------------------------------------------------
1 | {
2 | "launchTip": "部分設置項需要操作註冊表,請使用管理員身份運行此軟件!",
3 | "ok": "確定",
4 | "associateApk": "關聯APK",
5 | "oneKeyInstall": "一鍵安裝",
6 | "oneKeyUninstall": "卸載軟件/清除舊版本",
7 | "about": "關於",
8 | "readMe": "使用前必讀",
9 | "installFinished": "安裝完成!",
10 | "uninstallFinished": "清除完成!請直接刪除軟件所在目錄即可!",
11 | "readMeMessageTip": "1、點擊「一鍵安裝」將會自動關聯APK文件,並且顯示APK自身應用圖標\n2、點擊「一鍵清除」將會自動解關聯APK文件,並且解除顯示APK自身應用圖標\n3、點擊「一鍵清除」後如果依然顯示APK圖標是由於電腦軟件的原因,重啟電腦即可解決\n4、卸載軟件:請先點擊「一鍵清除」,然後直接刪除軟件所在目錄即可。",
12 | "packageName": "包名:",
13 | "versionName": "版本名稱:",
14 | "minVersionName": "最低支持版本:",
15 | "permissions": "權限:",
16 | "size": "大小:",
17 | "noAnyAndroidDevice": "沒有檢測到任何安卓設備!",
18 | "appInstalling": "安裝中...",
19 | "appInstall": "安裝",
20 | "appInstallSuccess": "安裝成功!",
21 | "appInstallFailedDowngrade": "安裝失敗:檢測到當前安裝版本低於設備中已安裝的版本。\n如果需要強制安裝,請到設置頁勾選「降級覆蓋安裝」!",
22 | "appInstallFailed": "安裝失敗:",
23 | "appUnknown": "未知",
24 | "viewMorePermissions": "查看更多權限",
25 | "installFormTitle": "安裝 Apk",
26 | "nothing": "無",
27 | "unrecognizedVersion": "無法識別的版本",
28 | "deviceSelectFormTitle": "選擇安裝的設備",
29 | "deviceSelectTip": "發現多款安卓設備,請選擇要安裝的設備:",
30 | "confirmInstall": "確定安裝",
31 | "permissionFormTitle": "所有權限",
32 | "columnNumber": "序號",
33 | "columnPermission": "權限",
34 | "settingFormTitle": "偏好設置",
35 | "installSettingTabTitle": "Apk安裝設置",
36 | "afterInstallSuccessClose": "安裝成功後自動關閉窗口",
37 | "installMethod": "安裝方式:",
38 | "overlayInstall": "覆蓋安裝",
39 | "downgradeOverlayInsall": "降級覆蓋安裝",
40 | "settingFormBottomTip": "註:該頁面下的所有設置全局生效。",
41 | "languageSettingTitle": "語言設置",
42 | "selectLanguage": "選擇語言:",
43 | "selectLanguageTip": "註:語言選擇後需要下一次生效",
44 | "experimentalFunctionTabTitle": "實驗室功能",
45 | "detectionMaliciousApk": "啟用惡意軟件識別功能",
46 | "detectionMaliciousApkTip": "註:惡意軟件識別功能需要電腦連接網絡,該功能目前尚處於實驗性階段,識別率較低,甚至出現誤報。當然隨着用戶使用率的提高,識別率會逐漸提高。由於該功能需要使用平台去檢測,為緩解伺服器壓力,默認關閉此功能。",
47 | "LANG_ACCESS_COARSE_LOCATION": "通過WiFi或移動基站的方式獲取用戶粗略的經緯度信息,定位精度大概誤差在30~1500米",
48 | "LANG_ACCESS_FINE_LOCATION": "通過GPS晶片接收衛星的定位信息,定位精度達10米以內",
49 | "LANG_ACCESS_LOCATION_EXTRA_COMMANDS": "允許程序訪問額外的定位提供者指令",
50 | "LANG_ACCESS_MOCK_LOCATION": "獲取模擬定位信息,一般用於幫助開發者調試應用",
51 | "LANG_ACCESS_NETWORK_STATE": "獲取網絡信息狀態,如當前的網絡連接是否有效",
52 | "LANG_ACCESS_SURFACE_FLINGER": "Android平台上底層的圖形顯示支持,一般用於遊戲或照相機預覽界面和底層模式的屏幕截圖",
53 | "LANG_ACCESS_WIFI_STATE": "獲取當前WiFi接入的狀態以及WLAN熱點的信息",
54 | "LANG_BATTERY_STATS": "獲取電池電量統計信息",
55 | "LANG_BLUETOOTH": "允許程序連接配對過的藍牙設備",
56 | "LANG_BLUETOOTH_ADMIN": "允許程序進行發現和配對新的藍牙設備",
57 | "LANG_BRICK": "【危險權限】能夠禁止使用手機",
58 | "LANG_BROADCAST_PACKAGE_REMOVED": "當一個應用在刪除時觸發一個廣播",
59 | "LANG_BROADCAST_SMS": "當收到短訊時觸發一個廣播",
60 | "LANG_BROADCAST_STICKY": "允許一個程序收到廣播後快速收到下一個廣播",
61 | "LANG_BROADCAST_WAP_PUSH": "WAP PUSH服務收到後觸發一個廣播",
62 | "LANG_CALL_PHONE": "允許程序從非系統撥號器里輸入電話號碼",
63 | "LANG_CALL_PRIVILEGED": "允許程序撥打電話,替換系統的撥號器界面",
64 | "LANG_CAMERA": "允許訪問攝像頭進行拍照",
65 | "LANG_CHANGE_CONFIGURATION": "允許當前應用改變配置,如定位",
66 | "LANG_CHANGE_NETWORK_STATE": "改變網絡狀態如是否能聯網",
67 | "LANG_CHANGE_WIFI_MULTICAST_STATE": "改變WiFi多播狀態",
68 | "LANG_CHANGE_WIFI_STATE": "改變WiFi狀態",
69 | "LANG_CLEAR_APP_CACHE": "清除應用緩存",
70 | "LANG_CLEAR_APP_USER_DATA": "清除應用的用戶數據",
71 | "LANG_CONTROL_LOCATION_UPDATES": "允許獲得流動網絡定位信息改變",
72 | "LANG_DELETE_CACHE_FILES": "允許應用刪除緩存文件",
73 | "LANG_DELETE_PACKAGES": "允許程序刪除應用",
74 | "LANG_DEVICE_POWER": "允許訪問底層電源管理",
75 | "LANG_DIAGNOSTIC": "允許程序到RW到診斷資源",
76 | "LANG_DISABLE_KEYGUARD": "允許程序禁用鍵盤鎖",
77 | "LANG_DUMP": "允許程序獲取系統dump信息並轉存",
78 | "LANG_EXPAND_STATUS_BAR": "允許程序擴展或收縮狀態欄",
79 | "LANG_FACTORY_TEST": "允許程序運行工廠測試模式",
80 | "LANG_FLASHLIGHT": "允許訪問閃光燈",
81 | "LANG_FORCE_BACK": "允許程序強制使用back後退按鍵,無論頁面是否在頂層",
82 | "LANG_GET_PACKAGE_SIZE": "獲取應用的文件大小",
83 | "LANG_GET_TASKS": "允許程序獲取當前或最近運行的應用",
84 | "LANG_GLOBAL_SEARCH": "允許程序使用全局搜索功能",
85 | "LANG_HARDWARE_TEST": "訪問硬件輔助設備,用於硬件測試",
86 | "LANG_INJECT_EVENTS": "允許訪問本程序的底層事件,獲取按鍵、軌跡球的事件流",
87 | "LANG_INSTALL_LOCATION_PROVIDER": "安裝定位提供",
88 | "LANG_INSTALL_PACKAGES": "允許程序安裝應用",
89 | "LANG_INTERNAL_SYSTEM_WINDOW": "允許程序打開內部窗口,不對第三方應用程式開放此權限",
90 | "LANG_INTERNET": "訪問網絡連接,可能產生GPRS流量",
91 | "LANG_KILL_BACKGROUND_PROCESSES": "允許程序調用killBackgroundProcesses(String)方法結束後台進程",
92 | "LANG_MANAGE_ACCOUNTS": "允許程序管理AccountManager中的帳戶列表",
93 | "LANG_MANAGE_APP_TOKENS": "管理創建、摧毀、Z軸順序,僅用於系統",
94 | "LANG_MTWEAK_USER": "允許mTweak用戶訪問高級系統權限",
95 | "LANG_MTWEAK_FORUM": "允許使用mTweak社區權限",
96 | "LANG_MASTER_CLEAR": "允許程序執行軟格式化,刪除系統配置信息",
97 | "LANG_MODIFY_AUDIO_SETTINGS": "修改聲音設置信息",
98 | "LANG_MODIFY_PHONE_STATE": "修改電話狀態,如飛行模式,但不包含替換系統撥號器界面",
99 | "LANG_MOUNT_FORMAT_FILESYSTEMS": "格式化可移動文件系統,比如格式化清空SD卡",
100 | "LANG_MOUNT_UNMOUNT_FILESYSTEMS": "掛載、反掛載外部文件系統",
101 | "LANG_NFC": "允許程序執行NFC近距離通訊操作,用於移動支持",
102 | "LANG_PERSISTENT_ACTIVITY": "創建一個永久的Activity,該功能標記為將來將被移除",
103 | "LANG_PROCESS_OUTGOING_CALLS": "允許程序監視,修改或放棄播出電話",
104 | "LANG_READ_CALENDAR": "允許程序讀取用戶的日程信息",
105 | "LANG_READ_CONTACTS": "允許應用訪問聯繫人通訊錄信息",
106 | "LANG_READ_FRAME_BUFFER": "讀取幀緩存用於屏幕截圖",
107 | "LANG_READ_HISTORY_BOOKMARKS": "讀取瀏覽器收藏夾和歷史記錄",
108 | "LANG_READ_INPUT_STATE": "讀取當前鍵的輸入狀態,僅用於系統",
109 | "LANG_READ_LOGS": "讀取系統底層日誌",
110 | "LANG_READ_PHONE_STATE": "訪問電話狀態",
111 | "LANG_READ_SMS": "讀取短訊內容",
112 | "LANG_READ_EXTERNAL_STORAGE": "允許程序讀取內部存儲",
113 | "LANG_READ_SYNC_SETTINGS": "讀取同步設置,讀取Google在線同步設置",
114 | "LANG_READ_SYNC_STATS": "讀取同步狀態,獲得Google在線同步狀態",
115 | "LANG_REBOOT": "允許程序重新啟動設備",
116 | "LANG_RECEIVE_BOOT_COMPLETED": "允許程序開機自動運行",
117 | "LANG_RECEIVE_MMS": "接收彩信",
118 | "LANG_RECEIVE_SMS": "接收短訊",
119 | "LANG_RECEIVE_WAP_PUSH": "接收WAP PUSH信息",
120 | "LANG_RECORD_AUDIO": "錄製聲音通過手機或耳機的麥克",
121 | "LANG_REORDER_TASKS": "重新排序系統Z軸運行中的任務",
122 | "LANG_RESTART_PACKAGES": "結束任務通過restartPackage(String)方法,該方式將在外來放棄",
123 | "LANG_SEND_SMS": "發送短訊",
124 | "LANG_SET_ACTIVITY_WATCHER": "設置Activity觀察器一般用於monkey測試",
125 | "LANG_SET_ALARM": "設置鬧鈴提醒",
126 | "LANG_SET_ALWAYS_FINISH": "設置程序在後台是否總是退出",
127 | "LANG_SET_ANIMATION_SCALE": "設置全局動畫縮放",
128 | "LANG_SET_DEBUG_APP": "設置調試程序,一般用於開發",
129 | "LANG_SET_ORIENTATION": "設置屏幕方向為橫屏或標準方式顯示,不用於普通應用",
130 | "LANG_SET_PREFERRED_APPLICATIONS": "設置應用的參數,已不再工作,具體查看addPackageToPreferred(String)介紹",
131 | "LANG_SET_PROCESS_LIMIT": "允許程序設置最大的進程數量的限制",
132 | "LANG_SET_TIME": "設置系統時間",
133 | "LANG_SET_TIME_ZONE": "設置系統時區",
134 | "LANG_SET_WALLPAPER": "設置桌面壁紙",
135 | "LANG_SET_WALLPAPER_HINTS": "設置壁紙建議",
136 | "LANG_SIGNAL_PERSISTENT_PROCESSES": "發送一個永久的進程信號",
137 | "LANG_STATUS_BAR": "允許程序打開、關閉、禁用狀態欄",
138 | "LANG_SUBSCRIBED_FEEDS_READ": "訪問訂閱信息的資料庫",
139 | "LANG_SUBSCRIBED_FEEDS_WRITE": "寫入或修改訂閱內容的資料庫",
140 | "LANG_SYSTEM_ALERT_WINDOW": "顯示系統窗口",
141 | "LANG_UPDATE_DEVICE_STATS": "更新設備狀態",
142 | "LANG_USE_CREDENTIALS": "允許程序請求驗證從AccountManager",
143 | "LANG_USE_SIP": "允許程序使用SIP視頻服務",
144 | "LANG_VIBRATE": "允許振動",
145 | "LANG_WAKE_LOCK": "允許程序在手機屏幕關閉後後台進程仍然運行",
146 | "LANG_WRITE_APN_SETTINGS": "寫入網絡GPRS接入點設置",
147 | "LANG_WRITE_CALENDAR": "寫入日程,但不可讀取",
148 | "LANG_WRITE_CONTACTS": "寫入聯繫人,但不可讀取",
149 | "LANG_WRITE_EXTERNAL_STORAGE": "允許程序寫入外部存儲,如SD卡上寫文件",
150 | "LANG_WRITE_GSERVICES": "允許程序寫入Google Map服務數據",
151 | "LANG_WRITE_HISTORY_BOOKMARKS": "寫入瀏覽器歷史記錄或收藏夾,但不可讀取",
152 | "LANG_WRITE_SECURE_SETTINGS": "允許程序讀寫系統安全敏感的設置項",
153 | "LANG_WRITE_SETTINGS": "允許讀寫系統設置項",
154 | "LANG_WRITE_SMS": "允許編寫短訊",
155 | "LANG_WRITE_SYNC_SETTINGS": "寫入Google在線同步設置"
156 | }
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/lang/zh_TW.json:
--------------------------------------------------------------------------------
1 | {
2 | "launchTip": "部分設置項需要操作註冊表,請使用管理員身份運行此軟體!",
3 | "ok": "確定",
4 | "associateApk": "關聯APK",
5 | "oneKeyInstall": "一鍵安裝",
6 | "oneKeyUninstall": "卸載軟體/清除舊版本",
7 | "about": "關於",
8 | "readMe": "使用前必讀",
9 | "installFinished": "安裝完成!",
10 | "uninstallFinished": "清除完成!請直接刪除軟體所在目錄即可!",
11 | "readMeMessageTip": "1、點擊「一鍵安裝」將會自動關聯APK文件,並且顯示APK自身應用圖標\n2、點擊「一鍵清除」將會自動解關聯APK文件,並且解除顯示APK自身應用圖標\n3、點擊「一鍵清除」後如果依然顯示APK圖標是由於電腦軟體的原因,重啟電腦即可解決\n4、卸載軟體:請先點擊「一鍵清除」,然後直接刪除軟體所在目錄即可。",
12 | "packageName": "包名:",
13 | "versionName": "版本名稱:",
14 | "minVersionName": "最低支持版本:",
15 | "permissions": "權限:",
16 | "size": "大小:",
17 | "noAnyAndroidDevice": "沒有檢測到任何安卓設備!",
18 | "appInstalling": "安裝中...",
19 | "appInstall": "安裝",
20 | "appInstallSuccess": "安裝成功!",
21 | "appInstallFailedDowngrade": "安裝失敗:檢測到當前安裝版本低於設備中已安裝的版本。\n如果需要強制安裝,請到設置頁勾選「降級覆蓋安裝」!",
22 | "appInstallFailed": "安裝失敗:",
23 | "appUnknown": "未知",
24 | "viewMorePermissions": "查看更多權限",
25 | "installFormTitle": "安裝 Apk",
26 | "nothing": "無",
27 | "unrecognizedVersion": "無法識別的版本",
28 | "deviceSelectFormTitle": "選擇安裝的設備",
29 | "deviceSelectTip": "發現多款安卓設備,請選擇要安裝的設備:",
30 | "confirmInstall": "確定安裝",
31 | "permissionFormTitle": "所有權限",
32 | "columnNumber": "序號",
33 | "columnPermission": "權限",
34 | "settingFormTitle": "偏好設置",
35 | "installSettingTabTitle": "Apk安裝設置",
36 | "afterInstallSuccessClose": "安裝成功後自動關閉窗口",
37 | "installMethod": "安裝方式:",
38 | "overlayInstall": "覆蓋安裝",
39 | "downgradeOverlayInsall": "降級覆蓋安裝",
40 | "settingFormBottomTip": "註:該頁面下的所有設置全局生效。",
41 | "languageSettingTitle": "語言設置",
42 | "selectLanguage": "選擇語言:",
43 | "selectLanguageTip": "註:語言選擇後需要下一次生效",
44 | "experimentalFunctionTabTitle": "實驗室功能",
45 | "detectionMaliciousApk": "啟用惡意軟體識別功能",
46 | "detectionMaliciousApkTip": "註:惡意軟體識別功能需要電腦連接網絡,該功能目前尚處於實驗性階段,識別率較低,甚至出現誤報。當然隨著用戶使用率的提高,識別率會逐漸提高。由於該功能需要使用平台去檢測,為緩解伺服器壓力,默認關閉此功能。",
47 | "LANG_ACCESS_COARSE_LOCATION": "通過WiFi或移動基站的方式獲取用戶粗略的經緯度信息,定位精度大概誤差在30~1500米",
48 | "LANG_ACCESS_FINE_LOCATION": "通過GPS晶片接收衛星的定位信息,定位精度達10米以內",
49 | "LANG_ACCESS_LOCATION_EXTRA_COMMANDS": "允許程序訪問額外的定位提供者指令",
50 | "LANG_ACCESS_MOCK_LOCATION": "獲取模擬定位信息,一般用於幫助開發者調試應用",
51 | "LANG_ACCESS_NETWORK_STATE": "獲取網絡信息狀態,如當前的網絡連接是否有效",
52 | "LANG_ACCESS_SURFACE_FLINGER": "Android平台上底層的圖形顯示支持,一般用於遊戲或照相機預覽界面和底層模式的屏幕截圖",
53 | "LANG_ACCESS_WIFI_STATE": "獲取當前WiFi接入的狀態以及WLAN熱點的信息",
54 | "LANG_BATTERY_STATS": "獲取電池電量統計信息",
55 | "LANG_BLUETOOTH": "允許程序連接配對過的藍牙設備",
56 | "LANG_BLUETOOTH_ADMIN": "允許程序進行發現和配對新的藍牙設備",
57 | "LANG_BRICK": "【危險權限】能夠禁止使用手機",
58 | "LANG_BROADCAST_PACKAGE_REMOVED": "當一個應用在刪除時觸發一個廣播",
59 | "LANG_BROADCAST_SMS": "當收到簡訊時觸發一個廣播",
60 | "LANG_BROADCAST_STICKY": "允許一個程序收到廣播後快速收到下一個廣播",
61 | "LANG_BROADCAST_WAP_PUSH": "WAP PUSH服務收到後觸發一個廣播",
62 | "LANG_CALL_PHONE": "允許程序從非系統撥號器里輸入電話號碼",
63 | "LANG_CALL_PRIVILEGED": "允許程序撥打電話,替換系統的撥號器界面",
64 | "LANG_CAMERA": "允許訪問攝像頭進行拍照",
65 | "LANG_CHANGE_CONFIGURATION": "允許當前應用改變配置,如定位",
66 | "LANG_CHANGE_NETWORK_STATE": "改變網絡狀態如是否能聯網",
67 | "LANG_CHANGE_WIFI_MULTICAST_STATE": "改變WiFi多播狀態",
68 | "LANG_CHANGE_WIFI_STATE": "改變WiFi狀態",
69 | "LANG_CLEAR_APP_CACHE": "清除應用緩存",
70 | "LANG_CLEAR_APP_USER_DATA": "清除應用的用戶數據",
71 | "LANG_CONTROL_LOCATION_UPDATES": "允許獲得行動網路定位信息改變",
72 | "LANG_DELETE_CACHE_FILES": "允許應用刪除緩存文件",
73 | "LANG_DELETE_PACKAGES": "允許程序刪除應用",
74 | "LANG_DEVICE_POWER": "允許訪問底層電源管理",
75 | "LANG_DIAGNOSTIC": "允許程序到RW到診斷資源",
76 | "LANG_DISABLE_KEYGUARD": "允許程序禁用鍵盤鎖",
77 | "LANG_DUMP": "允許程序獲取系統dump信息並轉存",
78 | "LANG_EXPAND_STATUS_BAR": "允許程序擴展或收縮狀態欄",
79 | "LANG_FACTORY_TEST": "允許程序運行工廠測試模式",
80 | "LANG_FLASHLIGHT": "允許訪問閃光燈",
81 | "LANG_FORCE_BACK": "允許程序強制使用back後退按鍵,無論頁面是否在頂層",
82 | "LANG_GET_PACKAGE_SIZE": "獲取應用的文件大小",
83 | "LANG_GET_TASKS": "允許程序獲取當前或最近運行的應用",
84 | "LANG_GLOBAL_SEARCH": "允許程序使用全局搜索功能",
85 | "LANG_HARDWARE_TEST": "訪問硬體輔助設備,用於硬體測試",
86 | "LANG_INJECT_EVENTS": "允許訪問本程序的底層事件,獲取按鍵、軌跡球的事件流",
87 | "LANG_INSTALL_LOCATION_PROVIDER": "安裝定位提供",
88 | "LANG_INSTALL_PACKAGES": "允許程序安裝應用",
89 | "LANG_INTERNAL_SYSTEM_WINDOW": "允許程序打開內部窗口,不對第三方應用程式開放此權限",
90 | "LANG_INTERNET": "訪問網絡連接,可能產生GPRS流量",
91 | "LANG_KILL_BACKGROUND_PROCESSES": "允許程序調用killBackgroundProcesses(String)方法結束後台進程",
92 | "LANG_MANAGE_ACCOUNTS": "允許程序管理AccountManager中的帳戶列表",
93 | "LANG_MANAGE_APP_TOKENS": "管理創建、摧毀、Z軸順序,僅用於系統",
94 | "LANG_MTWEAK_USER": "允許mTweak用戶訪問高級系統權限",
95 | "LANG_MTWEAK_FORUM": "允許使用mTweak社區權限",
96 | "LANG_MASTER_CLEAR": "允許程序執行軟格式化,刪除系統配置信息",
97 | "LANG_MODIFY_AUDIO_SETTINGS": "修改聲音設置信息",
98 | "LANG_MODIFY_PHONE_STATE": "修改電話狀態,如飛行模式,但不包含替換系統撥號器界面",
99 | "LANG_MOUNT_FORMAT_FILESYSTEMS": "格式化可移動文件系統,比如格式化清空SD卡",
100 | "LANG_MOUNT_UNMOUNT_FILESYSTEMS": "掛載、反掛載外部文件系統",
101 | "LANG_NFC": "允許程序執行NFC近距離通訊操作,用於移動支持",
102 | "LANG_PERSISTENT_ACTIVITY": "創建一個永久的Activity,該功能標記為將來將被移除",
103 | "LANG_PROCESS_OUTGOING_CALLS": "允許程序監視,修改或放棄播出電話",
104 | "LANG_READ_CALENDAR": "允許程序讀取用戶的日程信息",
105 | "LANG_READ_CONTACTS": "允許應用訪問聯繫人通訊錄信息",
106 | "LANG_READ_FRAME_BUFFER": "讀取幀緩存用於屏幕截圖",
107 | "LANG_READ_HISTORY_BOOKMARKS": "讀取瀏覽器收藏夾和歷史記錄",
108 | "LANG_READ_INPUT_STATE": "讀取當前鍵的輸入狀態,僅用於系統",
109 | "LANG_READ_LOGS": "讀取系統底層日誌",
110 | "LANG_READ_PHONE_STATE": "訪問電話狀態",
111 | "LANG_READ_SMS": "讀取簡訊內容",
112 | "LANG_READ_EXTERNAL_STORAGE": "允許程序讀取內部存儲",
113 | "LANG_READ_SYNC_SETTINGS": "讀取同步設置,讀取Google在線同步設置",
114 | "LANG_READ_SYNC_STATS": "讀取同步狀態,獲得Google在線同步狀態",
115 | "LANG_REBOOT": "允許程序重新啟動設備",
116 | "LANG_RECEIVE_BOOT_COMPLETED": "允許程序開機自動運行",
117 | "LANG_RECEIVE_MMS": "接收彩信",
118 | "LANG_RECEIVE_SMS": "接收簡訊",
119 | "LANG_RECEIVE_WAP_PUSH": "接收WAP PUSH信息",
120 | "LANG_RECORD_AUDIO": "錄製聲音通過手機或耳機的麥克",
121 | "LANG_REORDER_TASKS": "重新排序系統Z軸運行中的任務",
122 | "LANG_RESTART_PACKAGES": "結束任務通過restartPackage(String)方法,該方式將在外來放棄",
123 | "LANG_SEND_SMS": "發送簡訊",
124 | "LANG_SET_ACTIVITY_WATCHER": "設置Activity觀察器一般用於monkey測試",
125 | "LANG_SET_ALARM": "設置鬧鈴提醒",
126 | "LANG_SET_ALWAYS_FINISH": "設置程序在後台是否總是退出",
127 | "LANG_SET_ANIMATION_SCALE": "設置全局動畫縮放",
128 | "LANG_SET_DEBUG_APP": "設置調試程序,一般用於開發",
129 | "LANG_SET_ORIENTATION": "設置屏幕方向為橫屏或標準方式顯示,不用於普通應用",
130 | "LANG_SET_PREFERRED_APPLICATIONS": "設置應用的參數,已不再工作,具體查看addPackageToPreferred(String)介紹",
131 | "LANG_SET_PROCESS_LIMIT": "允許程序設置最大的進程數量的限制",
132 | "LANG_SET_TIME": "設置系統時間",
133 | "LANG_SET_TIME_ZONE": "設置系統時區",
134 | "LANG_SET_WALLPAPER": "設置桌面壁紙",
135 | "LANG_SET_WALLPAPER_HINTS": "設置壁紙建議",
136 | "LANG_SIGNAL_PERSISTENT_PROCESSES": "發送一個永久的進程信號",
137 | "LANG_STATUS_BAR": "允許程序打開、關閉、禁用狀態欄",
138 | "LANG_SUBSCRIBED_FEEDS_READ": "訪問訂閱信息的資料庫",
139 | "LANG_SUBSCRIBED_FEEDS_WRITE": "寫入或修改訂閱內容的資料庫",
140 | "LANG_SYSTEM_ALERT_WINDOW": "顯示系統窗口",
141 | "LANG_UPDATE_DEVICE_STATS": "更新設備狀態",
142 | "LANG_USE_CREDENTIALS": "允許程序請求驗證從AccountManager",
143 | "LANG_USE_SIP": "允許程序使用SIP視頻服務",
144 | "LANG_VIBRATE": "允許振動",
145 | "LANG_WAKE_LOCK": "允許程序在手機屏幕關閉後後台進程仍然運行",
146 | "LANG_WRITE_APN_SETTINGS": "寫入網絡GPRS接入點設置",
147 | "LANG_WRITE_CALENDAR": "寫入日程,但不可讀取",
148 | "LANG_WRITE_CONTACTS": "寫入聯繫人,但不可讀取",
149 | "LANG_WRITE_EXTERNAL_STORAGE": "允許程序寫入外部存儲,如SD卡上寫文件",
150 | "LANG_WRITE_GSERVICES": "允許程序寫入Google Map服務數據",
151 | "LANG_WRITE_HISTORY_BOOKMARKS": "寫入瀏覽器歷史記錄或收藏夾,但不可讀取",
152 | "LANG_WRITE_SECURE_SETTINGS": "允許程序讀寫系統安全敏感的設置項",
153 | "LANG_WRITE_SETTINGS": "允許讀寫系統設置項",
154 | "LANG_WRITE_SMS": "允許編寫簡訊",
155 | "LANG_WRITE_SYNC_SETTINGS": "寫入Google在線同步設置"
156 | }
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/libwebp_x64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/libwebp_x64.dll
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/libwebp_x86.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/libwebp_x86.dll
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/readme.txt:
--------------------------------------------------------------------------------
1 | 【Apk Installer 1.7.0.0 2023-03-12】
2 | 更新内容:
3 | 1、【新增/修复】Fix#I6KDFX 增加在安装Apk前主动连接无线设备或者Windows Subsystem Android,需要在设置页主动开启
4 | 2、【修复】1.6.0.0 版本打开某些 apk 没有任何信息显示的问题
5 | 3、【更新】aapt 版本由 aapt v0.2-6966805 更新至 aapt2 2.19-9306103
6 |
7 |
8 | 【Apk Installer 1.6.0.0 2023-02-24】
9 | 更新内容:
10 | 1、【新增】支持显示最低版本为“Android 12L”和“Android 13”的Apk
11 | 2、【修复】在Edge和Chrome等浏览器下载.apk/.ipa/.aapx文件时,导致浏览器Crash的问题
12 | 3、【更新】adb 版本由 33.0.2-8557947 更新至 33.0.3-8952118
13 | 4、【更新】aapt 版本由 v0.2-6966805 更新至 v0.2-9306103
14 | 5、【更新】ApkShellext2 更新至 ApkShellext2_hy 3.0.0 版本
15 |
16 | 【Apk Installer 1.5.0.0 2022-07-31】
17 | 【重要】此次更新将.Net Framework 升级到了4.8,可能会影响到Windows 7 和 Windows 8 的用户,请使用上面两个系统的用户安装.Net Framework 4.8的运行时
18 | 更新内容:
19 | 1、【优化】提前启动 adb 服务,提升首次安装 Apk 的时间
20 | 2、【优化】只连接一个手机时,却弹窗提示多手机的问题
21 | 3、【优化】清除卸载软件时,主动停止adb服务
22 | 4、【优化】部分电脑已经连接了手机却提示未连接的问题
23 | 5、【更新】 adb 版本由29.0.5-5949299更新至 33.0.2-8557947
24 | 6、【更新】aapt 版本由 v0.2-4913185 更新至 v0.2-6966805
25 | 7、【更新】ApkShellext2 更新至 2.0.7版本
26 |
27 | 【Apk Installer 1.4.0.0 Beta 2022-02-08】
28 | 该版本为beta测试版。
29 | 更新内容:
30 | 1、新增-恶意软件识别(实验室功能)如出现软件崩溃,请关闭此功能;
31 | 2、新增-软件配置页面新增偏好设置入口。
32 |
33 | PS:如果当前正在使用旧版本,删除旧版软件。直接解压后先点击“卸载软件/清除旧版本”,再点击“一键安装”。
34 |
35 | 【Apk Installer 1.3.0.0 Beta 2022-01-04】
36 | 该版本为beta测试版。
37 | 更新内容:
38 | 1、新增-偏好设置新增多语言支持,内置“中国-简体中文”,“中國-繁體中文(香港)”,“中國-繁體中文(台灣)”三个语言包;
39 | 2、新增-软件配置页面新增偏好设置入口;
40 | 3、优化-修复安装APK时在仅有一台设备连接电脑时弹出设备选择的问题;
41 | 4、优化-修复某些app无法获取icon的问题。
42 |
43 | PS:如果当前正在使用旧版本,删除旧版软件。直接解压后先点击“卸载软件/清除旧版本”,再点击“一键安装”。
44 |
45 | 【Apk Installer 1.2.3.0 2021-12-26】
46 | 更新内容:
47 | 1、新增-显示Apk文件的大小;
48 | 2、新增-添加偏好设置,支持Apk降级覆盖安装;
49 | 3、新增-添加偏好设置,支持安装Apk后自动关闭窗口;
50 | 4、优化-修复修改文件名之后无法安装注册的问题;
51 | 5、优化-修复Apk安装失败不显示失败原因的问题;
52 | 6、优化-软件更名为Apk Installer-为上架商店做准备。
53 |
54 | PS:如果当前正在使用旧版本,删除旧版软件。直接解压后先点击“卸载软件/清除旧版本”,再点击“一键安装”。
55 |
56 | 【APK安装器 1.2.0.0 2021-11-20】
57 | 更新内容:
58 | 1、优化-将关联APK和显示应用自身图标合二为一,简化安装过程;
59 | 2、优化-修复包含空格名称的APK无法解析的问题;
60 | 3、优化-修复包含空格名称的APK无法安装的问题;
61 | 4、优化-修复部分用户关联APK导致软件崩溃的问题。
62 |
63 | PS:如果当前正在使用旧版本,直接解压覆盖即可。
64 |
65 | 开源地址:https://gitee.com/haoyu3/wsainstall-tool
66 |
67 | 【APK安装器 1.1.0.5 2021-11-10】
68 | 更新内容:
69 | 1、新增-显示APK支持的最低版本;
70 | 2、新增-显示APK应用本身的图标;
71 | 3、提升稳定性,修复若干问题。
72 |
73 | PS:如果当前正在使用旧版本,直接解压覆盖即可。
74 |
75 | 开源地址:https://gitee.com/haoyu3/wsainstall-tool
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/restart_explorer.bat:
--------------------------------------------------------------------------------
1 | REM CHOICE /M "Restart explorer process?"
2 | REM IF %ERRORLEVEL%==1 (
3 | TASKKILL /F /IM explorer.exe
4 | REM pause
5 | START %WINDIR%\explorer.exe
6 | REM )
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/setting.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/setting.ini
--------------------------------------------------------------------------------
/WSAInstallTool/Assets/uninstall.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Assets/uninstall.bat
--------------------------------------------------------------------------------
/WSAInstallTool/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 | using System.Security.Principal;
7 | using WSAInstallTool.Util;
8 | using System.Diagnostics;
9 | using System.Runtime.InteropServices;
10 | using System.Threading;
11 |
12 | namespace WSAInstallTool
13 | {
14 | static class Program
15 | {
16 |
17 | ///
18 | /// 应用程序的主入口点。
19 | ///
20 | [STAThread]
21 | static void Main(String[] args)
22 | {
23 | Application.EnableVisualStyles();
24 | Application.SetCompatibleTextRenderingDefault(false);
25 | IniUtil.Instance.Init();
26 | LangUtil.Instance.Init();
27 | // 更新黑名单
28 | PreferenceUtil.Instance.UpdateBlackListByTime();
29 | //Application.Run(new InstallForm(args));
30 | if (args.Length == 0)
31 | {
32 | if (!IsAdministrator())
33 | {
34 | MessageBox.Show(LangUtil.Instance.GetLauncherTip(), "Apk Installer", MessageBoxButtons.OK);
35 | return;
36 | }
37 | Application.Run(new MainForm());
38 | //Application.Run(new InstallForm(args));
39 | }
40 | else
41 | {
42 | Application.Run(new InstallForm(args));
43 | }
44 |
45 |
46 | }
47 |
48 | public static bool IsAdministrator()
49 | {
50 | WindowsIdentity current = WindowsIdentity.GetCurrent();
51 | WindowsPrincipal windowsPrincipal = new WindowsPrincipal(current);
52 | return windowsPrincipal.IsInRole(WindowsBuiltInRole.Administrator);
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/WSAInstallTool/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("ApkInstaller")]
9 | [assembly: AssemblyDescription("Apk Installer(原名:WSAInstallTool),在1.2.3.0版本之后改名为Apk Installer。如果您有意见或者建议请前往Gitee或者Github提交Issue。 \r\n\r\n Gitee地址: https://gitee.com/haoyu3/wsainstall-tool \r\n\r\n Github地址: https://github.com/1595901624/ApkInstaller")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("开发人员: 我是小学生")]
12 | [assembly: AssemblyProduct("ApkInstaller")]
13 | [assembly: AssemblyCopyright("使用 GPL-3.0 开源协议")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("ae6f6a18-8245-4b37-944f-738cf6639e6a")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.7.0.0")]
36 | [assembly: AssemblyFileVersion("1.7.0.0")]
37 |
--------------------------------------------------------------------------------
/WSAInstallTool/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | //
5 | // Changes to this file may cause incorrect behavior and will be lost if
6 | // the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | namespace WSAInstallTool.Properties {
11 | using System;
12 |
13 |
14 | ///
15 | /// A strongly-typed resource class, for looking up localized strings, etc.
16 | ///
17 | // This class was auto-generated by the StronglyTypedResourceBuilder
18 | // class via a tool like ResGen or Visual Studio.
19 | // To add or remove a member, edit your .ResX file then rerun ResGen
20 | // with the /str option, or rebuild your VS project.
21 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
22 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
23 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
24 | internal class Resources {
25 |
26 | private static global::System.Resources.ResourceManager resourceMan;
27 |
28 | private static global::System.Globalization.CultureInfo resourceCulture;
29 |
30 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
31 | internal Resources() {
32 | }
33 |
34 | ///
35 | /// Returns the cached ResourceManager instance used by this class.
36 | ///
37 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
38 | internal static global::System.Resources.ResourceManager ResourceManager {
39 | get {
40 | if (object.ReferenceEquals(resourceMan, null)) {
41 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WSAInstallTool.Properties.Resources", typeof(Resources).Assembly);
42 | resourceMan = temp;
43 | }
44 | return resourceMan;
45 | }
46 | }
47 |
48 | ///
49 | /// Overrides the current thread's CurrentUICulture property for all
50 | /// resource lookups using this strongly typed resource class.
51 | ///
52 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
53 | internal static global::System.Globalization.CultureInfo Culture {
54 | get {
55 | return resourceCulture;
56 | }
57 | set {
58 | resourceCulture = value;
59 | }
60 | }
61 |
62 | ///
63 | /// Looks up a localized resource of type System.Drawing.Bitmap.
64 | ///
65 | internal static System.Drawing.Bitmap alipay_small {
66 | get {
67 | object obj = ResourceManager.GetObject("alipay_small", resourceCulture);
68 | return ((System.Drawing.Bitmap)(obj));
69 | }
70 | }
71 |
72 | ///
73 | /// Looks up a localized resource of type System.Drawing.Bitmap.
74 | ///
75 | internal static System.Drawing.Bitmap bad_apk {
76 | get {
77 | object obj = ResourceManager.GetObject("bad_apk", resourceCulture);
78 | return ((System.Drawing.Bitmap)(obj));
79 | }
80 | }
81 |
82 | ///
83 | /// Looks up a localized resource of type System.Drawing.Bitmap.
84 | ///
85 | internal static System.Drawing.Bitmap bad_apk_safety {
86 | get {
87 | object obj = ResourceManager.GetObject("bad_apk_safety", resourceCulture);
88 | return ((System.Drawing.Bitmap)(obj));
89 | }
90 | }
91 |
92 | ///
93 | /// Looks up a localized resource of type System.Drawing.Bitmap.
94 | ///
95 | internal static System.Drawing.Bitmap setting {
96 | get {
97 | object obj = ResourceManager.GetObject("setting", resourceCulture);
98 | return ((System.Drawing.Bitmap)(obj));
99 | }
100 | }
101 |
102 | ///
103 | /// Looks up a localized resource of type System.Drawing.Bitmap.
104 | ///
105 | internal static System.Drawing.Bitmap wechat_small {
106 | get {
107 | object obj = ResourceManager.GetObject("wechat_small", resourceCulture);
108 | return ((System.Drawing.Bitmap)(obj));
109 | }
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/WSAInstallTool/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | text/microsoft-resx
51 |
52 |
53 | 2.0
54 |
55 |
56 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
57 |
58 |
59 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
60 |
61 |
62 |
63 | ..\Resources\setting.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
64 |
65 |
66 | ..\Resources\bad_apk_safety.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
67 |
68 |
69 | ..\Resources\bad_apk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
70 |
71 |
72 | ..\Resources\wechat_small.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
73 |
74 |
75 | ..\Resources\alipay_small.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
76 |
77 |
--------------------------------------------------------------------------------
/WSAInstallTool/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace WSAInstallTool.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.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 |
--------------------------------------------------------------------------------
/WSAInstallTool/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/WSAInstallTool/Resources/alipay_small.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Resources/alipay_small.jpg
--------------------------------------------------------------------------------
/WSAInstallTool/Resources/bad_apk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Resources/bad_apk.png
--------------------------------------------------------------------------------
/WSAInstallTool/Resources/bad_apk_safety.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Resources/bad_apk_safety.png
--------------------------------------------------------------------------------
/WSAInstallTool/Resources/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Resources/setting.png
--------------------------------------------------------------------------------
/WSAInstallTool/Resources/wechat_small.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/Resources/wechat_small.jpg
--------------------------------------------------------------------------------
/WSAInstallTool/Util/AAPTParseUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Text.RegularExpressions;
6 | using System.Threading.Tasks;
7 |
8 | using System.IO.Compression;
9 | using System.IO;
10 | using System.Diagnostics;
11 | using WSAInstallTool.Util;
12 |
13 | namespace WSAInstallTool
14 | {
15 | class AAPTParseUtil
16 | {
17 | private string appInfo = "";
18 | private string[] appInfoList = null;
19 |
20 | public AAPTParseUtil(string appInfo)
21 | {
22 | if (appInfo == null || appInfo.Length == 0)
23 | {
24 | return;
25 | }
26 | this.appInfo = appInfo;
27 | this.appInfoList = appInfo.Split('\n');
28 | //Console.WriteLine(appInfoList.Length);
29 | }
30 |
31 | public string GetPackageName()
32 | {
33 | if (appInfo.Length == 0 || appInfoList.Length < 1) return "";
34 |
35 | return GetValue(appInfoList[0], "package: name='", "' versionCode='");
36 | }
37 |
38 | ///
39 | /// 获取版本名称
40 | ///
41 | ///
42 | public string GetVersionName()
43 | {
44 | if (appInfo.Length == 0 || appInfoList.Length < 1) return "";
45 |
46 | if (appInfoList[0].Contains("' platformBuildVersionName="))
47 | {
48 | return GetValue(appInfoList[0], "versionName='", "' platformBuildVersionName=");
49 | }
50 |
51 | return GetValue(appInfoList[0], "versionName='", "' compileSdkVersion='");
52 | }
53 |
54 | ///
55 | /// 获取详细的权限列表
56 | ///
57 | ///
58 | public string GetPermissionDetail()
59 | {
60 | if (appInfo.Length == 0 || appInfoList.Length < 1) return "";
61 | StringBuilder sb = new StringBuilder();
62 | foreach (string str in appInfoList)
63 | {
64 | if (str.Contains("uses-permission:"))
65 | {
66 | sb.Append(str).Append("\n");
67 | }
68 | }
69 | return sb.ToString().Trim();
70 | }
71 |
72 | ///
73 | /// 获取详细的权限信息解释 返回String
74 | ///
75 | ///
76 | public string GetPermissionDetailString()
77 | {
78 | if (appInfo.Length == 0 || appInfoList.Length < 1) return "";
79 |
80 | StringBuilder sb = new StringBuilder();
81 |
82 | List temp = GetPermissionList();
83 |
84 | foreach (String str in temp)
85 | {
86 |
87 | //if (str.Contains(AndroidPerimission.READ_EXTERNAL_STORAGE.permissionName))
88 | //{
89 | // sb.Append(AndroidPerimission.READ_EXTERNAL_STORAGE.description).Append("\n");
90 | //}
91 | //Console.WriteLine("....." + AndroidPerimission.Values + "..." + str);
92 | foreach (AndroidPerimission permission in AndroidPerimission.Values)
93 | {
94 | //Console.WriteLine("....." + permission.description);
95 | //Console.WriteLine("....." + permission.permission);
96 | if (str == permission.permission)
97 | {
98 | sb.Append("· ").Append(permission.description).Append("\n");
99 | }
100 | }
101 | }
102 |
103 | return sb.ToString().Trim();
104 | }
105 |
106 | ///
107 | /// 获取详细的权限信息解释 返回List
108 | ///
109 | ///
110 | public List GetPermissionDetailList()
111 | {
112 | if (appInfo.Length == 0 || appInfoList.Length < 1) return new List();
113 |
114 | List result = new List();
115 |
116 | List temp = GetPermissionList();
117 |
118 | foreach (String str in temp)
119 | {
120 | foreach (AndroidPerimission permission in AndroidPerimission.Values)
121 | {
122 | if (str == permission.permission)
123 | {
124 | result.Add(permission.description);
125 | }
126 | }
127 | }
128 |
129 | return result;
130 | }
131 |
132 | ///
133 | /// 获取权限信息列表 返回List
134 | ///
135 | /// List
136 | public List GetPermissionList()
137 | {
138 | if (appInfo.Length == 0 || appInfoList.Length < 1) return new List();
139 |
140 | StringBuilder sb = new StringBuilder();
141 |
142 | List temp = new List();
143 |
144 | foreach (string str in appInfoList)
145 | {
146 | if (str.Contains("uses-permission: name='"))
147 | {
148 | if (!temp.Contains(str))
149 | {
150 | temp.Add(GetValue(str, "uses-permission: name='", "'"));
151 | }
152 | }
153 | }
154 | return temp;
155 | }
156 |
157 | ///
158 | /// 获取APK图标
159 | ///
160 | ///
161 | ///
162 | public string GetApkIcon(string apkPath)
163 | {
164 | string result = System.Threading.Thread.GetDomain().BaseDirectory + "icon\\" + GetPackageName() + ".png";
165 |
166 | if (File.Exists(result))
167 | {
168 | //Console.WriteLine("logo exist!");
169 | return result;
170 | }
171 | try
172 | {
173 | //ZipFile.ExtractToDirectory(apkPath, "temp"); //解压
174 | string logoPath = "";
175 | // 1. 获取logo
176 | foreach (string str in appInfoList)
177 | {
178 | if (str.Contains("application-icon-120"))
179 | {
180 | logoPath = GetValue(str.Trim(), "application-icon-120:'", "'");
181 | break;
182 | }
183 | if (str.Contains("application-icon-160"))
184 | {
185 | logoPath = GetValue(str.Trim(), "application-icon-160:'", "'");
186 | break;
187 | }
188 | }
189 | if (logoPath == null || logoPath.Length == 0) return "";
190 | string logoFileName = Path.GetFileName(logoPath);
191 | Debug.WriteLine("[AAPTParseUtil][GetApkIcon]logoFileName==" + logoFileName);
192 |
193 | if (logoFileName.EndsWith(".xml"))
194 | {
195 | logoFileName = logoFileName.Replace(".xml", ".png");
196 | }
197 |
198 | // 2. 解压logo
199 | using (ZipArchive zipArchive = ZipFile.Open(apkPath, ZipArchiveMode.Read))
200 | {
201 | foreach (ZipArchiveEntry entry in zipArchive.Entries)
202 | {
203 |
204 | if (entry.Name == logoFileName)
205 | {
206 | //Console.WriteLine(entry.Name);
207 | using (Stream stream = entry.Open())
208 | {
209 | if (!Directory.Exists(System.Threading.Thread.GetDomain().BaseDirectory + "icon"))
210 | {
211 | Directory.CreateDirectory(System.Threading.Thread.GetDomain().BaseDirectory + "icon");
212 | }
213 | entry.ExtractToFile(result, true);
214 | }
215 | }
216 | }
217 | }
218 | Debug.WriteLine("apk logo path => " + result);
219 | return result;
220 | }
221 | catch (Exception e)
222 | {
223 | Debug.WriteLine("get apk icon error! " + e.Message);
224 | return "";
225 | }
226 | }
227 |
228 | ///
229 | /// 获取APP名称
230 | ///
231 | ///
232 | public string GetAppName()
233 | {
234 | if (appInfo.Length == 0 || appInfoList.Length < 1) return "";
235 | string zhName = "";
236 | string defaultName = "";
237 | foreach (string str in appInfoList)
238 | {
239 | if (str.Contains("application-label-zh:"))
240 | {
241 |
242 | //return GetValue(str, "application-label:", "");
243 | zhName = GetValue(str, "application-label-zh:'", "'");
244 | }
245 | else if (str.Contains("application-label:"))
246 | {
247 | defaultName = GetValue(str, "application-label:'", "'");
248 | }
249 | }
250 |
251 | if (zhName != null && zhName != "" && zhName.Length != 0)
252 | {
253 | return Utf82Gb2312(zhName);
254 | }
255 | else if (defaultName != null && defaultName != "" && defaultName.Length != 0)
256 | {
257 | return defaultName;
258 | }
259 | return "";
260 | }
261 |
262 | public int GetMinSdkVersion()
263 | {
264 | if (appInfo.Length == 0 || appInfoList.Length < 1)
265 | {
266 | return -1;
267 | }
268 |
269 | foreach (string s in appInfoList)
270 | {
271 | if (s.Contains("sdkVersion:'"))
272 | {
273 | try
274 | {
275 | var result = int.Parse(GetValue(s, "sdkVersion:'", "'"));
276 | return result;
277 | }
278 | catch (Exception e)
279 | {
280 | Debug.WriteLine("GetMinSdkVersion Error! = " + e.Message);
281 | return -1;
282 | }
283 | }
284 | }
285 |
286 | return -1;
287 | }
288 |
289 | ///
290 | /// 获取最小支持的android版本
291 | ///
292 | ///
293 | public string getMinSupportVersion()
294 | {
295 | int minSdk = GetMinSdkVersion();
296 | if (minSdk == -1)
297 | {
298 | return LangUtil.Instance.GetUnrecognizedVersion();
299 | }
300 | foreach (AndroidSDKVersion sdkVersion in AndroidSDKVersion.Values)
301 | {
302 | if (sdkVersion.api == minSdk)
303 | {
304 | return "Android " + sdkVersion.version;
305 | }
306 | }
307 | return LangUtil.Instance.GetUnrecognizedVersion();
308 | }
309 |
310 | ///
311 | /// 获得字符串中开始和结束字符串中间得值
312 | ///
313 | /// 字符串
314 | /// 开始
315 | /// 结束
316 | ///
317 | public string GetValue(string str, string s, string e)
318 | {
319 | Regex rg = new Regex("(?<=(" + s + "))[.\\s\\S]*?(?=(" + e + "))", RegexOptions.Multiline | RegexOptions.Singleline);
320 | return rg.Match(str).Value;
321 | }
322 |
323 | ///
324 | /// UTF8转换成GB2312
325 | ///
326 | ///
327 | ///
328 | public string Utf82Gb2312(string text)
329 | {
330 | //声明字符集
331 | System.Text.Encoding utf8, gb2312;
332 | //utf8
333 | utf8 = System.Text.Encoding.GetEncoding("utf-8");
334 | //gb2312
335 | gb2312 = System.Text.Encoding.GetEncoding("gb2312");
336 | byte[] utf;
337 | utf = utf8.GetBytes(text);
338 | utf = System.Text.Encoding.Convert(utf8, gb2312, utf);
339 | //返回转换后的字符
340 | return gb2312.GetString(utf);
341 | }
342 | }
343 | }
344 |
--------------------------------------------------------------------------------
/WSAInstallTool/Util/AndroidSDKVersion.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace WSAInstallTool
8 | {
9 | class AndroidSDKVersion
10 | {
11 | public static readonly AndroidSDKVersion BASE = new AndroidSDKVersion(1, "1.0");
12 | public static readonly AndroidSDKVersion BASE_1_1 = new AndroidSDKVersion(2, "1.1");
13 | public static readonly AndroidSDKVersion CUPCAKE = new AndroidSDKVersion(3, "1.5");
14 | public static readonly AndroidSDKVersion DONUT = new AndroidSDKVersion(4, "1.6");
15 | public static readonly AndroidSDKVersion ECLAIR = new AndroidSDKVersion(5, "2.0");
16 | public static readonly AndroidSDKVersion ECLAIR_0_1 = new AndroidSDKVersion(6, "2.0.1");
17 | public static readonly AndroidSDKVersion ECLAIR_MR1 = new AndroidSDKVersion(7, "2.1.x");
18 | public static readonly AndroidSDKVersion FROYO = new AndroidSDKVersion(8, "2.2.x");
19 | public static readonly AndroidSDKVersion GINGERBREAD = new AndroidSDKVersion(9, "2.3/2.3.1/2.3.2");
20 | public static readonly AndroidSDKVersion GINGERBREAD_MR1 = new AndroidSDKVersion(10, "2.3.3/2.3.4");
21 | public static readonly AndroidSDKVersion HONEYCOMB = new AndroidSDKVersion(11, "3.0.x");
22 | public static readonly AndroidSDKVersion HONEYCOMB_MR1 = new AndroidSDKVersion(12, "3.1.x");
23 | public static readonly AndroidSDKVersion HONEYCOMB_MR2 = new AndroidSDKVersion(13, "3.2");
24 | public static readonly AndroidSDKVersion ICE_CREAM_SANDWICH = new AndroidSDKVersion(14, "4.0/4.0.1/4.0.2");
25 | public static readonly AndroidSDKVersion ICE_CREAM_SANDWICH_MR1 = new AndroidSDKVersion(15, "4.0.3/4.0.4");
26 | public static readonly AndroidSDKVersion JELLY_BEAN = new AndroidSDKVersion(16, "4.1/4.1.1");
27 | public static readonly AndroidSDKVersion JELLY_BEAN_MR1 = new AndroidSDKVersion(17, "4.2/4.2.2");
28 | public static readonly AndroidSDKVersion JELLY_BEAN_MR2 = new AndroidSDKVersion(18, "4.3");
29 | public static readonly AndroidSDKVersion KITKAT = new AndroidSDKVersion(19, "4.4");
30 | public static readonly AndroidSDKVersion KITKAT_WATCH = new AndroidSDKVersion(20, "4.4W");
31 | public static readonly AndroidSDKVersion LOLLIPOP = new AndroidSDKVersion(21, "5.0");
32 | public static readonly AndroidSDKVersion LOLLIPOP_MR1 = new AndroidSDKVersion(22, "5.1");
33 | public static readonly AndroidSDKVersion M = new AndroidSDKVersion(23, "6.0");
34 | public static readonly AndroidSDKVersion N1 = new AndroidSDKVersion(24, "7.0");
35 | public static readonly AndroidSDKVersion N2 = new AndroidSDKVersion(25, "7.1");
36 | public static readonly AndroidSDKVersion O1 = new AndroidSDKVersion(26, "8.0");
37 | public static readonly AndroidSDKVersion O2 = new AndroidSDKVersion(27, "8.1");
38 | public static readonly AndroidSDKVersion P = new AndroidSDKVersion(28, "9");
39 | public static readonly AndroidSDKVersion Q = new AndroidSDKVersion(29, "10");
40 | public static readonly AndroidSDKVersion R = new AndroidSDKVersion(30, "11");
41 | public static readonly AndroidSDKVersion S = new AndroidSDKVersion(31, "12");
42 | public static readonly AndroidSDKVersion S_V2 = new AndroidSDKVersion(32, "12L");
43 | public static readonly AndroidSDKVersion TIRAMISU = new AndroidSDKVersion(33, "13");
44 |
45 | public static IEnumerable Values
46 | {
47 | get
48 | {
49 | yield return BASE;
50 | yield return BASE_1_1;
51 | yield return CUPCAKE;
52 | yield return DONUT;
53 | yield return ECLAIR;
54 | yield return ECLAIR_0_1;
55 | yield return ECLAIR_MR1;
56 | yield return FROYO;
57 | yield return GINGERBREAD;
58 | yield return GINGERBREAD_MR1;
59 | yield return HONEYCOMB;
60 | yield return HONEYCOMB_MR1;
61 | yield return HONEYCOMB_MR2;
62 | yield return ICE_CREAM_SANDWICH;
63 | yield return ICE_CREAM_SANDWICH_MR1;
64 | yield return JELLY_BEAN;
65 | yield return JELLY_BEAN_MR1;
66 | yield return JELLY_BEAN_MR2;
67 | yield return KITKAT;
68 | yield return KITKAT_WATCH;
69 | yield return LOLLIPOP;
70 | yield return LOLLIPOP_MR1;
71 | yield return M;
72 | yield return N1;
73 | yield return N2;
74 | yield return O1;
75 | yield return O2;
76 | yield return P;
77 | yield return Q;
78 | yield return R;
79 | yield return S;
80 | }
81 | }
82 |
83 | public int api { get; private set; }
84 | public string version { get; private set; }
85 |
86 | public AndroidSDKVersion(int api, string version)
87 | {
88 | this.api = api;
89 | this.version = version;
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/WSAInstallTool/Util/ApkShellDetection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace WSAInstallTool
8 | {
9 | class ApkShellDetection
10 | {
11 | public static Dictionary sMap = new Dictionary()
12 | {
13 | {"libnqshield.so", "国信灵通" },
14 | {"libvenSec.so", "启明星辰"},
15 | {"libvenustech.so", "启明星辰"},
16 | {"libchaosvmp.so", "娜迦加固"},
17 | {"libddog.so", "娜迦加固"},
18 | {"libfdog.so", "娜迦加固"},
19 | {"libedog.so", "娜迦加固(企业版)"},
20 | {"libexec.so", "爱加密"},
21 | {"libexecmain.so", "爱加密"},
22 | {"ijiami.dat", "爱加密"},
23 | {"ijiami.ajm", "爱加密"},
24 | {"libsecexe.so", "梆梆安全"},
25 | {"libsecmain.so", "梆梆安全"},
26 | {"libSecShell.so", "梆梆安全"},
27 | {"libDexHelper.so", "梆梆安全(企业版)"},
28 | {"libDexHelper-x86.so", "梆梆安全(企业版)"},
29 | {".appkey", "360加固"},
30 | {"libprotectClass.so", "360加固"},
31 | {"libjiagu.so", "360加固"},
32 | {"libjiagu_ls.so", "360加固"},
33 | {"libjiagu_x86.so", "360加固"},
34 | {"libjiagu_a64.so", "360加固"},
35 | {"libjiagu_x64.so", "360加固"},
36 | {"libjiagu_art.so", "360加固"},
37 | {"libjgdtc.so", "360加固"},
38 | {"libjgdtc_x86.so", "360加固"},
39 | {"libjgdtc_a64.so", "360加固"},
40 | {"libjgdtc_x64.so", "360加固"},
41 | {"libjgdtc_art.so", "360加固"},
42 | {"libegis.so", "通付盾"},
43 | {"libNSaferOnly.so", "通付盾"},
44 | {"libapssec.so", "盛大加固"},
45 | {"librsprotect.so", "瑞星加固"},
46 | {"libitsec.so", "海云安加固"},
47 | {"libnqshield.so", "网秦加固"},
48 | {"libbaiduprotect.so", "百度加固"},
49 | {"libbaiduprotect_x86.so", "百度加固"},
50 | {"libbaiduprotect_art.so", "百度加固"},
51 | {"baiduprotect1.jar", "百度加固"},
52 | {"aliprotect.dat", "阿里聚安全"},
53 | {"libsgmain.so", "阿里聚安全"},
54 | {"libfakejni.so", "阿里聚安全"},
55 | {"libzuma.so", "阿里聚安全"},
56 | {"libzumadata.so", "阿里聚安全"},
57 | {"libpreverify1.so", "阿里聚安全"},
58 | {"libdemolishdata.so", "阿里聚安全"},
59 | {"libdemolish.so", "阿里聚安全"},
60 | {"libsgsecuritybody.so", "阿里聚安全"},
61 | {"libmobisec.so", "阿里聚安全"},
62 | {"libtup.so", "腾讯乐固"},
63 | {"liblegudb.so", "腾讯乐固"},
64 | {"libshella", "腾讯乐固"},
65 | {"libshellx", "腾讯乐固"},
66 | {"mix.dex", "腾讯乐固"},
67 | {"mixz.dex", "腾讯乐固"},
68 | {"libshell-super.2019.so", "腾讯云移动应用安全"},
69 | {"libBugly-yaq.so", "腾讯云移动应用安全"},
70 | {"libzBugly-yaq.so", "腾讯云移动应用安全"},
71 | {"tosversion", "腾讯云移动应用安全"},
72 | {"libshellx-super.2019.so", "腾讯云移动应用安全"},
73 | {"tosprotection", "腾讯云移动应用安全"},
74 | {"00O000ll111l.dex", "腾讯云移动应用安全"},
75 | {"000O00ll111l.dex", "腾讯云移动应用安全)"},
76 | {"0000000lllll.dex", "腾讯云移动应用安全"},
77 | {"00000olllll.dex", "腾讯云移动应用安全"},
78 | {"0OO00l111l1l", "腾讯云移动应用安全"},
79 | {"o0oooOO0ooOo.dat", "腾讯云移动应用安全"},
80 | {"t86", "腾讯云移动应用安全"},
81 | {"libtosprotection.x86.so", "腾讯云移动应用安全"},
82 | {"libtosprotection.armeabi.so", "腾讯云移动应用安全"},
83 | {"libtosprotection.armeabi-v7a.so", "腾讯云移动应用安全"},
84 | {"libnesec.so", "网易易盾"},
85 | {"libAPKProtect.so", "APKProtect"},
86 | {"libkwscmm.so", "几维安全"},
87 | {"libkwscr.so", "几维安全"},
88 | {"libkwslinker.so", "几维安全"},
89 | {"libx3g.so", "顶像科技"},
90 | {"libuusafe.jar.so", "UU安全"},
91 | {"libuusafe.so", "UU安全"},
92 | {"libuusafeempty.so", "UU安全"},
93 | {"mogosec_classes", "中国移动加固"},
94 | {"mogosec_data", "中国移动加固"},
95 | {"mogosec_dexinfo", "中国移动加固"},
96 | {"mogosec_march", "中国移动加固"},
97 | {"libcmvmp.so", "中国移动加固"},
98 | {"libmogosec_dex.so", "中国移动加固"},
99 | {"libmogosec_sodecrypt.so", "中国移动加固"},
100 | {"ibmogosecurity.so", "中国移动加固"},
101 | {"libreincp.so", "珊瑚灵御"},
102 | {"libreincp_x86.so", "珊瑚灵御"},
103 | {"jiagu_data.bin", "apktoolplus"},
104 | {"sign.bin", "apktoolplus"},
105 | {"libapktoolplus_jiagu.so", "apktoolplus"},
106 | };
107 | }
108 |
109 |
110 | }
111 |
--------------------------------------------------------------------------------
/WSAInstallTool/Util/CMDUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Diagnostics;
7 |
8 | namespace WSAInstallTool
9 | {
10 | class CMDUtil
11 | {
12 | //执行命令行命令,获取输出结果
13 | //cmd_filename: DOS程序文件名
14 | //arguments: 命令行参数
15 | public static string ExecCMD(string cmd_filename, string arguments)
16 | {
17 | ProcessStartInfo psi = new ProcessStartInfo(cmd_filename, arguments);//如:调用ipconfig ,并传入参数: /all
18 | psi.CreateNoWindow = true; //若为false,则会出现cmd的黑窗体
19 | psi.RedirectStandardOutput = true;
20 | psi.RedirectStandardError = true;
21 | psi.UseShellExecute = false;
22 | psi.StandardOutputEncoding = Encoding.UTF8;
23 | System.Diagnostics.Process p = System.Diagnostics.Process.Start(psi);
24 | string s = p.StandardOutput.ReadToEnd();
25 | s += p.StandardError.ReadToEnd();
26 | return s;
27 | }
28 |
29 | ///
30 | /// 执行bat文件
31 | ///
32 | ///
33 | public static void ExecBat(string batName)
34 | {
35 | //Process process = new Process();
36 | //process.StartInfo.FileName = batName;
37 | //process.Start();
38 | //cmd为想要执行的进程名,workingDir为它的所在路径,如果在windows\system32可以为空
39 | var pStartInfo = new System.Diagnostics.ProcessStartInfo(batName);
40 | pStartInfo.Verb = "runas";//设置该启动动作,会以管理员权限运行进程
41 | pStartInfo.CreateNoWindow = false;
42 | pStartInfo.UseShellExecute = true;
43 | pStartInfo.RedirectStandardError = false;
44 | pStartInfo.RedirectStandardInput = false;
45 | pStartInfo.RedirectStandardOutput = false;
46 | Process p = Process.Start(pStartInfo);
47 | p.WaitForExit();
48 | }
49 |
50 | ///
51 | /// 开启Adb服务
52 | ///
53 | public static void StartAdbServer(object state)
54 | {
55 | Console.WriteLine("[CMDUtil][StartAdbServer] starting adb server...");
56 | string result = CMDUtil.ExecCMD("adb.exe", "start-server");
57 | Console.WriteLine("[CMDUtil][StartAdbServer] adb server result: " + result);
58 | }
59 |
60 | public static void StopAdbServer(object state)
61 | {
62 | Console.WriteLine("[CMDUtil][StopAdbServer] stoping adb server...");
63 | string result = CMDUtil.ExecCMD("adb.exe", "kill-server");
64 | Console.WriteLine("[CMDUtil][StopAdbServer] adb server result: " + result);
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/WSAInstallTool/Util/CommonUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Runtime.InteropServices;
7 | using System.Runtime.Serialization.Json;
8 | using System.Text;
9 | using System.Threading;
10 | using System.Threading.Tasks;
11 |
12 | namespace WSAInstallTool.Util
13 | {
14 | class CommonUtil
15 | {
16 | public static long GetCurrentTimeStamps()
17 | {
18 | TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0);
19 | return Convert.ToInt64(ts.TotalMilliseconds);
20 | }
21 |
22 | ///
23 | /// Json字符串转内存对象
24 | ///
25 | ///
26 | ///
27 | ///
28 | public static T JsonToObject(string jsonString)
29 | {
30 | DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(T));
31 | MemoryStream mStream = new MemoryStream(Encoding.UTF8.GetBytes(jsonString));
32 | return (T)serializer.ReadObject(mStream);
33 | }
34 |
35 | ///
36 | /// 获取exe启动的目录
37 | ///
38 | /// D:\test
39 | public static string GetCurrentStartupPath()
40 | {
41 | return System.Windows.Forms.Application.StartupPath;
42 | }
43 |
44 | ///
45 | /// 在线程中初始化本地黑名单
46 | ///
47 | public static void InitBlackListBackground()
48 | {
49 | // 根据配置更新列表
50 | if (!PreferenceUtil.Instance.GetScanBadApk())
51 | {
52 | return;
53 | }
54 | ThreadStart ts = new ThreadStart(InitBlackList);
55 | Thread t = new Thread(ts);
56 | t.Start();
57 | }
58 |
59 | public static bool IsBadApk(string packageName, string hash)
60 | {
61 | // 根据配置更新列表
62 | byte[] csp = System.Text.Encoding.UTF8.GetBytes(GetCurrentStartupPath());
63 | byte[] pn = System.Text.Encoding.UTF8.GetBytes(packageName);
64 | return IsBadApk(csp, pn, hash);
65 | }
66 |
67 | [DllImport("BadApk.dll", EntryPoint = "is_bad_apk", CallingConvention = CallingConvention.Cdecl)]
68 | private extern static bool IsBadApk(byte[] runPath, byte[] packageName, string hash);
69 |
70 | [DllImport("BadApk.dll", EntryPoint = "init_black_list", CallingConvention = CallingConvention.Cdecl)]
71 | private extern static void InitBlackList(byte[] runPath);
72 |
73 | [DllImport("BadApk.dll", EntryPoint = "test", CallingConvention = CallingConvention.Cdecl)]
74 | private extern static void test(byte[] runPath);
75 |
76 | ///
77 | /// 初始化本地黑名单
78 | ///
79 | private static void InitBlackList()
80 | {
81 | Debug.WriteLine("[CommonUtil][InitBlackList] start..." + GetCurrentStartupPath());
82 | byte[] bs = System.Text.Encoding.UTF8.GetBytes(GetCurrentStartupPath());
83 | InitBlackList(bs);
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/WSAInstallTool/Util/HashUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace WSAInstallTool.Util
8 | {
9 | class HashUtil
10 | {
11 | public enum Sha26ParseType
12 | {
13 | StringType,
14 | StreamType
15 | }
16 |
17 | public static string GetSha256Hash(string filePath)
18 | {
19 | return GetSha256Hash(filePath, Sha26ParseType.StreamType);
20 | }
21 |
22 | private static string GetSha256Hash(string str, Sha26ParseType type)
23 | {
24 | string result = string.Empty;
25 | byte[] by = null;
26 | //求字节流的SHA256
27 | if (type.Equals(Sha26ParseType.StreamType))
28 | {
29 | if (!System.IO.File.Exists(str))
30 | return result;
31 |
32 | System.IO.FileStream stream = new System.IO.FileStream(str, System.IO.FileMode.Open, System.IO.FileAccess.Read);
33 | System.Security.Cryptography.SHA256Managed Sha256 = new System.Security.Cryptography.SHA256Managed();
34 | by = Sha256.ComputeHash(stream);
35 | stream.Close();
36 | }
37 | //求字符串的SHA256
38 | else
39 | {
40 | byte[] SHA256Data = Encoding.UTF8.GetBytes(str);
41 |
42 | System.Security.Cryptography.SHA256Managed Sha256 = new System.Security.Cryptography.SHA256Managed();
43 | by = Sha256.ComputeHash(SHA256Data);
44 | }
45 |
46 | result = BitConverter.ToString(by).Replace("-", "").ToLower(); //64
47 | //return Convert.ToBase64String(by); //44
48 |
49 | return result;
50 | }
51 | }
52 |
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/WSAInstallTool/Util/IniUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Runtime.InteropServices;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace WSAInstallTool.Util
11 | {
12 | class IniUtil
13 | {
14 |
15 | //读写INI文件的API函数
16 | //[DllImport("kernel32", CharSet = CharSet.Auto, EntryPoint = "WritePrivateProfileStringA")]
17 | [DllImport("kernel32", CharSet = CharSet.Auto)]
18 | private static extern bool WritePrivateProfileString(string section, string key, string val, string filePath);
19 |
20 | [DllImport("kernel32", CharSet = CharSet.Auto)]
21 | //[DllImport("kernel32", CharSet = CharSet.Auto)]
22 | private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
23 |
24 | // 配置项
25 | private const string SETTING_PATH = "setting.ini";
26 | private string ABSOLUTE_SETTING_PATH = "";
27 |
28 | // 语言文件(预留)
29 | //private string LANG_PATH = "lang\\";
30 | //private string ABSOLUTE_LANG_PATH = "";
31 |
32 | private static IniUtil _instance = null;
33 | private static readonly object SyncObject = new object();
34 |
35 | private IniUtil()
36 | {
37 |
38 | }
39 |
40 | public static IniUtil Instance
41 | {
42 | get {
43 | lock(SyncObject)
44 | {
45 | return _instance ?? (_instance = new IniUtil());
46 | }
47 | }
48 | }
49 |
50 | ///
51 | /// init方法,需要在程序启动时调用
52 | ///
53 | public void Init()
54 | {
55 | ABSOLUTE_SETTING_PATH = System.Windows.Forms.Application.StartupPath + "\\" + SETTING_PATH;
56 | if (!File.Exists(ABSOLUTE_SETTING_PATH))
57 | {
58 | Debug.WriteLine("not exist setting.ini");
59 | CreateIniFile(ABSOLUTE_SETTING_PATH);
60 | }
61 |
62 | //ABSOLUTE_LANG_PATH = System.Windows.Forms.Application.StartupPath + "\\" + LANG_PATH + PreferenceUtil.Instance.GetCurrentLang();
63 |
64 | Debug.WriteLine("[IniUtil][Init] setting path :" + ABSOLUTE_SETTING_PATH);
65 | //Debug.WriteLine("[IniUtil][Init] lang path :" + ABSOLUTE_LANG_PATH);
66 |
67 |
68 | }
69 |
70 | ///
71 | /// UTF8转换成GB2312
72 | ///
73 | ///
74 | ///
75 | public string Utf2Default(string text)
76 | {
77 | //声明字符集
78 | System.Text.Encoding utf8 = System.Text.Encoding.GetEncoding("utf-8");
79 |
80 | byte[] utf = utf8.GetBytes(text);
81 | utf = System.Text.Encoding.Convert(utf8, Encoding.Default, utf);
82 | //返回转换后的字符
83 | return Encoding.Default.GetString(utf);
84 | }
85 |
86 | ///
87 | /// 读取偏好设置的值
88 | ///
89 | ///
90 | ///
91 | ///
92 | ///
93 | public string ReadSettingValue(string section, string key, string defaultValue)
94 | {
95 | string result = ReadIniValue(ABSOLUTE_SETTING_PATH, section, key, defaultValue);
96 | return result;
97 | }
98 |
99 | ///
100 | ///
101 | ///
102 | ///
103 | ///
104 | ///
105 | public void WriteSettingValue(string section, string key, string value)
106 | {
107 | WriteIniValue(ABSOLUTE_SETTING_PATH, section, key, value);
108 | }
109 |
110 | ///
111 | /// 写INI文件
112 | ///
113 | ///
114 | ///
115 | ///
116 | ///
117 | private void WriteIniValue(string path, string section, string key, string value)
118 | {
119 | WritePrivateProfileString(section, key, value, path);
120 | }
121 |
122 | ///
123 | /// 读取INI文件指定关键字的值
124 | ///
125 | ///
126 | ///
127 | ///
128 | ///
129 | ///
130 | private string ReadIniValue(string path, string section, string key, string defaultValue)
131 | {
132 | try
133 | {
134 | StringBuilder sb = new StringBuilder(1024);
135 | //byte[] buffer = new byte[1024];
136 | int count = GetPrivateProfileString(section, key, "", sb, 1024, path);
137 | Debug.WriteLine("[IniUtil][ReadIniValue] get result = " + count);
138 | //return Encoding.UTF8.GetString(buffer, 0, count);
139 | if (sb == null)
140 | {
141 | return defaultValue;
142 | }
143 | return string.IsNullOrEmpty(sb.ToString()) ? defaultValue : sb.ToString().Trim();
144 | }
145 | catch (Exception ex)
146 | {
147 | Debug.WriteLine("[IniUtil][ReadIniValue] error : " + ex.Message);
148 | return defaultValue;
149 | }
150 | }
151 |
152 | private byte[] getUTF8Bytes(string s)
153 | {
154 | return Encoding.UTF8.GetBytes(s);
155 | }
156 |
157 | ///
158 | /// 创建ini文件
159 | ///
160 | private void CreateIniFile(string path)
161 | {
162 | StreamWriter w = File.CreateText(path);
163 | w.Write("");
164 | w.Flush();
165 | w.Close();
166 | }
167 | }
168 | }
169 |
--------------------------------------------------------------------------------
/WSAInstallTool/Util/PreferenceUtil.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using WSAInstallTool.AppModel;
8 |
9 |
10 | namespace WSAInstallTool.Util
11 | {
12 | ///
13 | /// 获取设置
14 | ///
15 | class PreferenceUtil
16 | {
17 | public const string INSTALL_SECTION = "install";
18 | public const string LANG_SECTION = "lang";
19 | public const string OTHER_SECTION = "other";
20 |
21 | // 安装方式 1:覆盖安装 2:降级覆盖安装
22 | public const string INSTALL_METHOD = "installMethod";
23 |
24 | // 安装成功后是否关闭窗口
25 | public const string INSTALL_SUCCESS_CLOSE = "installSuccessClose";
26 |
27 | // 默认语言
28 | public const string LANG_DEFAULT = "current";
29 |
30 | // 黑名单更新时间
31 | public const string UPDATE_BLACK_LIST_TIME = "updateBlackListTime";
32 |
33 | // 恶意软件检测功能
34 | public const String SCAN_BAD_APK = "scanBadApk";
35 |
36 | // WSA/无线连接功能
37 | public const String WSA_CONNECT = "wsaConnect";
38 |
39 | // WSA/无线连接功能 ip
40 | public const String WSA_CONNECT_IP_ADDRESS = "wsaConnectIpAddress";
41 |
42 | private static PreferenceUtil _instance = null;
43 | private static readonly object SyncObject = new object();
44 |
45 | private PreferenceUtil()
46 | {
47 |
48 | }
49 |
50 | public static PreferenceUtil Instance
51 | {
52 | get
53 | {
54 | lock (SyncObject)
55 | {
56 | return _instance ?? (_instance = new PreferenceUtil());
57 | }
58 | }
59 | }
60 |
61 | ///
62 | /// 设置当前恶意APK检测的状态
63 | ///
64 | ///
65 | public void SetScanBadApk(int check)
66 | {
67 | IniUtil.Instance.WriteSettingValue(OTHER_SECTION, SCAN_BAD_APK, check.ToString());
68 | }
69 |
70 | ///
71 | /// 获取当前恶意APK检测配置的状态
72 | ///
73 | ///
74 | public bool GetScanBadApk()
75 | {
76 | string result = IniUtil.Instance.ReadSettingValue(OTHER_SECTION, SCAN_BAD_APK, "0");
77 | try
78 | {
79 | if ("1".Equals(result))
80 | {
81 | return true;
82 | }
83 | }
84 | catch (Exception e)
85 | {
86 | Debug.Write("[PreferenceUtil][GetScanBadApk] error => " + e.Message);
87 | }
88 | return false;
89 | }
90 |
91 | ///
92 | /// 定时更新黑名单
93 | ///
94 | ///
95 | public void UpdateBlackListByTime()
96 | {
97 | try
98 | {
99 | // 根据配置更新列表
100 | if (!PreferenceUtil.Instance.GetScanBadApk())
101 | {
102 | return;
103 | }
104 |
105 | string updateTimeStr = IniUtil.Instance.ReadSettingValue(OTHER_SECTION, UPDATE_BLACK_LIST_TIME, "0");
106 | long updateTime = long.Parse(updateTimeStr);
107 | if (CommonUtil.GetCurrentTimeStamps() - updateTime > 24 * 60 * 60 * 1000)
108 | {
109 | // 更新时间超过一天,则更新黑名单
110 | CommonUtil.InitBlackListBackground();
111 | IniUtil.Instance.WriteSettingValue(OTHER_SECTION, UPDATE_BLACK_LIST_TIME, CommonUtil.GetCurrentTimeStamps().ToString());
112 | }
113 | }
114 | catch (Exception e)
115 | {
116 | Debug.WriteLine("[PreferenceUtil][UpdateBlackListByTime] error:" + e.Message);
117 | // 解析时间错误,则强制更新黑名单
118 | CommonUtil.InitBlackListBackground();
119 | IniUtil.Instance.WriteSettingValue(OTHER_SECTION, UPDATE_BLACK_LIST_TIME, CommonUtil.GetCurrentTimeStamps().ToString());
120 |
121 | }
122 | }
123 |
124 |
125 | ///
126 | /// 设置当前语言
127 | ///
128 | ///
129 | public void SetLanguage(int id)
130 | {
131 | IniUtil.Instance.WriteSettingValue(LANG_SECTION, LANG_DEFAULT, id.ToString());
132 | }
133 |
134 | public int GetLanguage()
135 | {
136 | string id = IniUtil.Instance.ReadSettingValue(LANG_SECTION, LANG_DEFAULT, "0");
137 | try
138 | {
139 | return int.Parse(id);
140 | }
141 | catch (Exception e)
142 | {
143 | Debug.WriteLine("[PreferenceUtil][Getlanguage] error => " + e.Message);
144 | return 0;
145 | }
146 | }
147 |
148 | ///
149 | /// 获取语言包列表
150 | ///
151 | ///
152 | public List GetLanguageList()
153 | {
154 | try
155 | {
156 | string currentLangId = IniUtil.Instance.ReadSettingValue(LANG_SECTION, LANG_DEFAULT, "0");
157 | int id = int.Parse(currentLangId);
158 | string json = System.IO.File.ReadAllText(CommonUtil.GetCurrentStartupPath() + @"\lang\lang.json");
159 | List sls = CommonUtil.JsonToObject>(json);
160 | Debug.WriteLine("[PreferenceUtil][GetLanguageList] lang size: " + sls.Count + ", currentLangId: " + id);
161 | return sls;
162 | }
163 | catch (Exception ex)
164 | {
165 | Debug.WriteLine("[PreferenceUtil][GetLanguageList] error: " + ex.Message);
166 | var sl = new SupportLanguage();
167 | sl.name = "中国-简体中文";
168 | sl.id = 0;
169 | sl.file = "zh_CN.json";
170 | return new List() { sl };
171 | }
172 | }
173 |
174 | ///
175 | /// 获取当前的语言包
176 | ///
177 | ///
178 | public string GetCurrentLangPath()
179 | {
180 | try
181 | {
182 | string currentLangId = IniUtil.Instance.ReadSettingValue(LANG_SECTION, LANG_DEFAULT, "0");
183 | int id = int.Parse(currentLangId);
184 | string json = System.IO.File.ReadAllText(CommonUtil.GetCurrentStartupPath() + @"\lang\lang.json");
185 | List sls = CommonUtil.JsonToObject>(json);
186 | Debug.WriteLine("[PreferenceUtil][GetCurrentLang] lang size: " + sls.Count + ", currentLangId: " + id);
187 | foreach (var sl in sls)
188 | {
189 | Debug.WriteLine("sl ... " + sl.ToString());
190 | if (sl.id == id)
191 | {
192 | return CommonUtil.GetCurrentStartupPath() + @"\lang\" + sl.file;
193 | }
194 | }
195 | }
196 | catch (Exception ex)
197 | {
198 | Debug.WriteLine("[PreferenceUtil][GetCurrentLang] error: " + ex.Message);
199 | }
200 | return CommonUtil.GetCurrentStartupPath() + @"\lang\zh_CN.json";
201 | }
202 |
203 | ///
204 | /// 获取安装方式
205 | ///
206 | /// 1:覆盖安装 2:降级覆盖安装
207 | public InstallMethod GetInstallMethod()
208 | {
209 | string result = IniUtil.Instance.ReadSettingValue(INSTALL_SECTION, INSTALL_METHOD, "1");
210 | if ("2".Equals(result))
211 | {
212 | return InstallMethod.DEGRADED_OVERLAY;
213 | }
214 | return InstallMethod.OVERLAY;
215 | }
216 |
217 | ///
218 | /// 获取当前的安装命令
219 | ///
220 | ///
221 | public string GetInstallMethodCommand()
222 | {
223 | if (GetInstallMethod() == InstallMethod.DEGRADED_OVERLAY)
224 | {
225 | return "-r -d";
226 | }
227 |
228 | return "-r";
229 | }
230 |
231 |
232 | ///
233 | ///
234 | ///
235 | /// 1:覆盖安装 2:降级覆盖安装
236 | public void SetInstallMethod(InstallMethod method)
237 | {
238 | IniUtil.Instance.WriteSettingValue(INSTALL_SECTION, INSTALL_METHOD, Convert.ToInt32(method).ToString());
239 | }
240 |
241 | ///
242 | /// 安装成功后是否关闭窗口
243 | ///
244 | /// 默认不关闭窗口
245 | public bool IsCloseAfterInstalled()
246 | {
247 | string result = IniUtil.Instance.ReadSettingValue(INSTALL_SECTION, INSTALL_SUCCESS_CLOSE, "0");
248 | if ("1".Equals(result))
249 | {
250 | return true;
251 | }
252 | return false;
253 | }
254 |
255 | ///
256 | /// 设置在安装成功后,是否关闭窗口
257 | ///
258 | /// 0:不关闭,1:关闭
259 | public void SetCloseAfterInstalled(int close)
260 | {
261 | IniUtil.Instance.WriteSettingValue(INSTALL_SECTION, INSTALL_SUCCESS_CLOSE, close.ToString());
262 | }
263 |
264 | ///
265 | /// 设置当前恶意APK检测的状态
266 | ///
267 | ///
268 | public void SetWSAConnect(int check)
269 | {
270 | IniUtil.Instance.WriteSettingValue(OTHER_SECTION, WSA_CONNECT, check.ToString());
271 | }
272 |
273 | ///
274 | /// 获取当前恶意APK检测配置的状态
275 | ///
276 | ///
277 | public bool GetWSAConnect()
278 | {
279 | string result = IniUtil.Instance.ReadSettingValue(OTHER_SECTION, WSA_CONNECT, "0");
280 | try
281 | {
282 | if ("1".Equals(result))
283 | {
284 | return true;
285 | }
286 | }
287 | catch (Exception e)
288 | {
289 | Debug.Write("[PreferenceUtil][GetWSAConnect] error => " + e.Message);
290 | }
291 | return false;
292 | }
293 |
294 | ///
295 | /// 设置当前恶意APK检测的状态
296 | ///
297 | ///
298 | public void SetWSAConnectIpAddress(string address)
299 | {
300 | IniUtil.Instance.WriteSettingValue(OTHER_SECTION, WSA_CONNECT_IP_ADDRESS, address);
301 | }
302 |
303 | ///
304 | /// 获取当前恶意APK检测配置的状态
305 | ///
306 | ///
307 | public string GetWSAConnectIpAddress()
308 | {
309 | string result = IniUtil.Instance.ReadSettingValue(OTHER_SECTION, WSA_CONNECT_IP_ADDRESS, "127.0.0.1:58526");
310 | return result;
311 | }
312 |
313 | public enum InstallMethod
314 | {
315 | OVERLAY = 1,
316 | DEGRADED_OVERLAY = 2
317 | }
318 | }
319 | }
320 |
--------------------------------------------------------------------------------
/WSAInstallTool/WSAInstallTool.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {A03F54F1-BA11-43C1-95E1-5823C0E5DA6C}
8 | WinExe
9 | Properties
10 | WSAInstallTool
11 | ApkInstaller
12 | v4.8
13 | 512
14 | false
15 | 发布\
16 | true
17 | Disk
18 | false
19 | Foreground
20 | 7
21 | Days
22 | false
23 | false
24 | true
25 | 0
26 | 1.0.0.%2a
27 | false
28 | true
29 |
30 |
31 |
32 | x86
33 | true
34 | full
35 | false
36 | bin\Debug\
37 | DEBUG;TRACE
38 | prompt
39 | 0
40 |
41 |
42 | AnyCPU
43 | pdbonly
44 | true
45 | bin\Release\
46 | TRACE
47 | prompt
48 | 4
49 |
50 |
51 | 3185263_android_app_circle_smartphone_design_icon.ico
52 |
53 |
54 | Always
55 |
56 |
57 | true
58 |
59 |
60 | false
61 |
62 |
63 | apkinstaller.pfx
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | Form
84 |
85 |
86 | InstallFormPro.cs
87 |
88 |
89 | Form
90 |
91 |
92 | PermissionForm.cs
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | Form
101 |
102 |
103 | SettingForm.cs
104 |
105 |
106 |
107 | Form
108 |
109 |
110 | AboutBox.cs
111 |
112 |
113 |
114 |
115 |
116 | Form
117 |
118 |
119 | DeviceSelectForm.cs
120 |
121 |
122 | Form
123 |
124 |
125 | InstallForm.cs
126 |
127 |
128 |
129 |
130 | Form
131 |
132 |
133 | MainForm.cs
134 |
135 |
136 |
137 |
138 |
139 | AboutBox.cs
140 |
141 |
142 | DeviceSelectForm.cs
143 |
144 |
145 | InstallFormPro.cs
146 |
147 |
148 | InstallForm.cs
149 |
150 |
151 | PermissionForm.cs
152 |
153 |
154 | SettingForm.cs
155 |
156 |
157 | ResXFileCodeGenerator
158 | Resources.Designer.cs
159 | Designer
160 |
161 |
162 | True
163 | Resources.resx
164 | True
165 |
166 |
167 | MainForm.cs
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 | SettingsSingleFileGenerator
181 | Settings.Designer.cs
182 |
183 |
184 | True
185 | Settings.settings
186 | True
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 | False
210 | .NET Framework 3.5 SP1 Client Profile
211 | false
212 |
213 |
214 | False
215 | .NET Framework 3.5 SP1
216 | false
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 | if $(ConfigurationName) == Release (
225 | "C:\Program Files\7-Zip\7z.exe" a ApkInstaller.zip *.bat *.dll *.ini *.txt lang/* blacklist/ *.exe
226 | )
227 |
228 |
229 | xcopy ..\..\Assets\*.* /Y /I /E /C
230 |
231 |
238 |
--------------------------------------------------------------------------------
/WSAInstallTool/WSAInstallTool.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Project
5 |
6 |
7 | 发布\
8 |
9 |
10 |
11 |
12 |
13 | zh-CN
14 | false
15 | ShowAllFiles
16 |
17 |
--------------------------------------------------------------------------------
/WSAInstallTool/apkinstaller.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/1595901624/ApkInstaller/258a605368ea82194239321260311c306bc37d99/WSAInstallTool/apkinstaller.pfx
--------------------------------------------------------------------------------