Skip to content

Commit

Permalink
添加项目文件
Browse files Browse the repository at this point in the history
  • Loading branch information
mujianwu committed Dec 5, 2023
0 parents commit 949d710
Show file tree
Hide file tree
Showing 359 changed files with 87,180 additions and 0 deletions.
Binary file not shown.
Binary file added .vs/UotanToolBox/v17/.suo
Binary file not shown.
165 changes: 165 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
Binary file added PNG/MakePart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PNG/MindowsToolBox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PNG/Recovery&Reboot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PNG/UnlockBootloader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# UotanToolBox-柚坛搞机工具箱

## 前言
1.本工具箱为本人爱好所作,从初学C#开发至今,因此在早期开发过程中写下了不少屎山后期也未进行优化,望大佬轻喷。<br/>
2.在近两年的开发中柚坛搞机工具箱从简单的Recovery刷入工具变成了几乎具备所有刷机功能的完整工具箱,这其中也少不了机圈中很多大佬的支持。<br/>
3.接下来该版本的工具箱也不再会有重大更新,仅会有Bug修复,未来工具箱将迁移到其他框架,WinForm在UI上的限制太多了,同时也不支持跨平台。<br/>

## 项目介绍
#### 集合了各种刷机需要使用的工具,并打造了一个GUI界面,方便玩机用户进行刷机,大多数功能为直接调用软件执行命令,部分功能进行了一定的特殊处理:<br/>
1.线刷ROM可以根据一个列有需要刷入镜像的分区的TXT文件进行连续刷入,TXT文件仅需一行写一个分区,将镜像文件(必须为.img)储存在TXT目录下的images文件夹中即可。flash_fastboot.txt填写非动态相关分区, flash_fastbootd.txt填写动态相关分区,同时使用可以自动重启至对应的模式,在刷入动态相关分区时,为确保刷入成功率,会自动删除用于备份的COW分区,也会自动删除非活动槽位的分区,同时还会将要刷入的分区删除重建再刷入需要刷入的镜像。<br/>
2.Mindows工具箱部分由某贼大佬的早期Mindows工具箱Bat版改造而来能够为部分手机快捷的刷入Windows系统,同时也涵盖了各种刷入Windows后相关的维护功能,由于功能太多,在此不详细介绍。<br/>
3.提取分区支持提取虚拟分区,即Super内的相关分区,虽然实现不难,但是似乎有些少见。<br/>
4.修改分区使用了表格的形式显示了分区,不算完美但因内置了命令能够快速读取还是比较实用的。<br/>
5.ADBHelper类,早期开发工具箱时在网络上完全搜索不到调用ADB相关程序的方法,根据调用CMD终端的方法进行了大量尝试,但依然遇到了种种问题,因此仿照当时学习的DBHelper类封装了ADBHelper类,最终完美的解决了各种问题。<br/>
6.Mindows类,开发Mindows工具箱时封装的各种方法,本意为Mindows工具箱部分所需方法的类文件,但后期由于偷懒将各种方法均写到了此处。<br/>
7.RegistryHelper类,网络搜索了解到的修改注册表相关的类文件,进行了一定的优化后应用到了Mindows工具箱中。<br/>
#### 下面为部分界面截图
![](https://github.com/Uotan-Dev/UotanToolBox/blob/main/PNG/UnlockBootloader.png)
![](https://github.com/Uotan-Dev/UotanToolBox/blob/main/PNG/Recovery&Reboot.png)
![](https://github.com/Uotan-Dev/UotanToolBox/blob/main/PNG/MindowsToolBox.png)
![](https://github.com/Uotan-Dev/UotanToolBox/blob/main/PNG/MakePart.png)

## 项目外部调用的程序
1.[7-Zip](https://7-zip.org/)<br/>
2.[ADB](https://developer.android.google.cn/studio/releases/platform-tools?hl=zh-cn)<br/>
3.DISM (小白之家)<br/>
4.[DriverUpdater](https://github.com/WOA-Project/DriverUpdater)<br/>
5.fh_loader.exe & QSaharaServer.exe<br/>
6.demsetup [mkfs.f2fs](https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/) [mkntfs](https://github.com/AlbertGoma/ntfs-3g) [parted](https://git.savannah.gnu.org/cgit/parted.git) sgdsik<br/>
7.[NSudo](https://github.com/M2TeamArchived/NSudo)<br/>
8.QCNTool (终不似曾尘世闲游)<br/>
9.[curl](https://curl.se/windows/)<br/>
10.[Devcon](https://learn.microsoft.com/zh-cn/windows-hardware/drivers/devtest/devcon)<br/>

## 特别鸣谢
1.[Renegade Project](https://github.com/edk2-porting/)<br/>
2.[woa-msmnile](https://github.com/woa-msmnile)<br/>
3.[WOA-Project](https://github.com/WOA-Project)<br/>
4.[Kancy Joe](https://github.com/sunflower2333)<br/>
5.[qaz6750 Lzy](https://github.com/qaz6750)<br/>
6.[赵紫菜](https://github.com/13584452567)<br/>
7.[MollySophia](https://github.com/MollySophia)<br/>
8.错过<br/>
9.闲游此生<br/>
31 changes: 31 additions & 0 deletions UotanToolBox.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32407.343
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UotanToolBox", "UotanToolBox\UotanToolBox.csproj", "{2B49C53A-E312-4290-8687-07D8F0ECF999}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2B49C53A-E312-4290-8687-07D8F0ECF999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B49C53A-E312-4290-8687-07D8F0ECF999}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B49C53A-E312-4290-8687-07D8F0ECF999}.Debug|x64.ActiveCfg = Debug|x64
{2B49C53A-E312-4290-8687-07D8F0ECF999}.Debug|x64.Build.0 = Debug|x64
{2B49C53A-E312-4290-8687-07D8F0ECF999}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B49C53A-E312-4290-8687-07D8F0ECF999}.Release|Any CPU.Build.0 = Release|Any CPU
{2B49C53A-E312-4290-8687-07D8F0ECF999}.Release|x64.ActiveCfg = Release|x64
{2B49C53A-E312-4290-8687-07D8F0ECF999}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6A832F24-0A19-4B04-8729-3D4E30532890}
EndGlobalSection
EndGlobal
55 changes: 55 additions & 0 deletions UotanToolBox/ADBHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UotanToolBox
{
public class ADBHelper
{
public static string ADB(string adb)
{
string cmd = @"bin\adb\adb.exe";
ProcessStartInfo adbshell = null;
adbshell = new ProcessStartInfo(cmd, adb);
adbshell.CreateNoWindow = true;
adbshell.UseShellExecute = false;
adbshell.RedirectStandardOutput = true;
adbshell.RedirectStandardError = true;
Process a = Process.Start(adbshell);
StreamReader reader = a.StandardOutput;
StreamReader readererror = a.StandardError;
string output = reader.ReadToEnd();
if (output == "")
{
output = readererror.ReadToEnd();
}
a.Close();
return output;
}

public static string Fastboot(string fb)
{
string cmd = @"bin\adb\fastboot.exe";
ProcessStartInfo fastboot = null;
fastboot = new ProcessStartInfo(cmd, fb);
fastboot.CreateNoWindow = true;
fastboot.UseShellExecute = false;
fastboot.RedirectStandardOutput = true;
fastboot.RedirectStandardError = true;
Process f = Process.Start(fastboot);
StreamReader readererror = f.StandardError;
StreamReader reader = f.StandardOutput;
string output = readererror.ReadToEnd();
if (output == "")
{
output = reader.ReadToEnd();
}
f.Close();
return output;
}
}
}
6 changes: 6 additions & 0 deletions UotanToolBox/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
Loading

0 comments on commit 949d710

Please sign in to comment.