From d3e03dd3c04fd21a753c8bfdff7362f0b4a70684 Mon Sep 17 00:00:00 2001
From: Daniel <790119+DanTheMan827@users.noreply.github.com>
Date: Sun, 11 Dec 2022 22:07:34 -0600
Subject: [PATCH] Add dumper target for a dump-only build
---
.gitmodules | 2 +-
Libraries/ProgressODoom | 2 +-
Libraries/SSH.NET | 2 +-
hakchi_gui.sln | 102 +++++++++++++++++++++++++
hakchi_gui/DumperForm.Designer.cs | 49 ++++++++++++
hakchi_gui/DumperForm.cs | 23 ++++++
hakchi_gui/DumperForm.resx | 120 ++++++++++++++++++++++++++++++
hakchi_gui/MainForm.cs | 15 +++-
hakchi_gui/Program.cs | 10 +++
hakchi_gui/Sunxi/NandInfo.cs | 11 ++-
hakchi_gui/Tasks/MembootTasks.cs | 27 +++++--
hakchi_gui/hakchi.cs | 21 +++++-
hakchi_gui/hakchi_gui.csproj | 10 ++-
13 files changed, 379 insertions(+), 15 deletions(-)
create mode 100644 hakchi_gui/DumperForm.Designer.cs
create mode 100644 hakchi_gui/DumperForm.cs
create mode 100644 hakchi_gui/DumperForm.resx
diff --git a/.gitmodules b/.gitmodules
index 61bf88e6c..33f80c970 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,7 +4,7 @@
branch = notracesource
[submodule "Libraries/ProgressODoom"]
path = Libraries/ProgressODoom
- url = https://github.com/daPhie79/ProgressODoom.git
+ url = https://github.com/TeamShinkansen/ProgressODoom.git
[submodule "Libraries/tiny7z"]
path = Libraries/tiny7z
url = https://github.com/daPhie79/tiny7z.git
diff --git a/Libraries/ProgressODoom b/Libraries/ProgressODoom
index 834cdfc7e..9f1b816f0 160000
--- a/Libraries/ProgressODoom
+++ b/Libraries/ProgressODoom
@@ -1 +1 @@
-Subproject commit 834cdfc7e0bb312a5e3e45b78e4a6a1be59d254e
+Subproject commit 9f1b816f0ec1d221233ba3a96cad67e7fea8d62f
diff --git a/Libraries/SSH.NET b/Libraries/SSH.NET
index 32181aeb4..3606c4952 160000
--- a/Libraries/SSH.NET
+++ b/Libraries/SSH.NET
@@ -1 +1 @@
-Subproject commit 32181aeb4ce69e8f07e5e1d585fd592a44017bc1
+Subproject commit 3606c49529fb2fcd65384e50c46a718998ecd9c1
diff --git a/hakchi_gui.sln b/hakchi_gui.sln
index e0a31f16b..5f84fbc25 100644
--- a/hakchi_gui.sln
+++ b/hakchi_gui.sln
@@ -44,6 +44,9 @@ Global
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
+ Dumper|Any CPU = Dumper|Any CPU
+ Dumper|x64 = Dumper|x64
+ Dumper|x86 = Dumper|x86
Installer|Any CPU = Installer|Any CPU
Installer|x64 = Installer|x64
Installer|x86 = Installer|x86
@@ -58,6 +61,12 @@ Global
{F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Debug|x64.Build.0 = Debug|Any CPU
{F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Debug|x86.ActiveCfg = Debug|Any CPU
{F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Debug|x86.Build.0 = Debug|Any CPU
+ {F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Dumper|Any CPU.ActiveCfg = Dumper|Any CPU
+ {F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Dumper|Any CPU.Build.0 = Dumper|Any CPU
+ {F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Dumper|x64.Build.0 = Debug|Any CPU
+ {F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Dumper|x86.Build.0 = Debug|Any CPU
{F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Installer|x64.ActiveCfg = Debug|Any CPU
{F1F983FD-A54F-4881-8394-5A4BA65EFD6B}.Installer|x64.Build.0 = Debug|Any CPU
@@ -75,6 +84,12 @@ Global
{8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Debug|x64.Build.0 = Debug|Any CPU
{8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Debug|x86.ActiveCfg = Debug|Any CPU
{8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Debug|x86.Build.0 = Debug|Any CPU
+ {8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Dumper|x64.Build.0 = Debug|Any CPU
+ {8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Dumper|x86.Build.0 = Debug|Any CPU
{8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Installer|x64.ActiveCfg = Debug|Any CPU
{8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1}.Installer|x64.Build.0 = Debug|Any CPU
@@ -92,6 +107,12 @@ Global
{2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Debug|x64.Build.0 = Debug|Any CPU
{2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Debug|x86.ActiveCfg = Debug|Any CPU
{2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Debug|x86.Build.0 = Debug|Any CPU
+ {2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Dumper|x64.Build.0 = Debug|Any CPU
+ {2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Dumper|x86.Build.0 = Debug|Any CPU
{2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Installer|x64.ActiveCfg = Debug|Any CPU
{2F5F8C90-0BD1-424F-997C-7BC6280919D1}.Installer|x64.Build.0 = Debug|Any CPU
@@ -109,6 +130,12 @@ Global
{E52AE256-6645-423A-B262-2CC5B6060F94}.Debug|x64.Build.0 = Debug|Any CPU
{E52AE256-6645-423A-B262-2CC5B6060F94}.Debug|x86.ActiveCfg = Debug|Any CPU
{E52AE256-6645-423A-B262-2CC5B6060F94}.Debug|x86.Build.0 = Debug|Any CPU
+ {E52AE256-6645-423A-B262-2CC5B6060F94}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {E52AE256-6645-423A-B262-2CC5B6060F94}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {E52AE256-6645-423A-B262-2CC5B6060F94}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {E52AE256-6645-423A-B262-2CC5B6060F94}.Dumper|x64.Build.0 = Debug|Any CPU
+ {E52AE256-6645-423A-B262-2CC5B6060F94}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {E52AE256-6645-423A-B262-2CC5B6060F94}.Dumper|x86.Build.0 = Debug|Any CPU
{E52AE256-6645-423A-B262-2CC5B6060F94}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{E52AE256-6645-423A-B262-2CC5B6060F94}.Installer|x64.ActiveCfg = Debug|Any CPU
{E52AE256-6645-423A-B262-2CC5B6060F94}.Installer|x64.Build.0 = Debug|Any CPU
@@ -126,6 +153,12 @@ Global
{8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Debug|x64.Build.0 = Debug|Any CPU
{8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Debug|x86.ActiveCfg = Debug|Any CPU
{8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Debug|x86.Build.0 = Debug|Any CPU
+ {8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Dumper|x64.Build.0 = Debug|Any CPU
+ {8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Dumper|x86.Build.0 = Debug|Any CPU
{8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Installer|x64.ActiveCfg = Debug|Any CPU
{8CEA386D-1CCA-4533-AA2D-9B3A3139338B}.Installer|x64.Build.0 = Debug|Any CPU
@@ -143,6 +176,12 @@ Global
{2865B421-2F1D-484B-9826-D92A002702E6}.Debug|x64.Build.0 = Debug|Any CPU
{2865B421-2F1D-484B-9826-D92A002702E6}.Debug|x86.ActiveCfg = Debug|Any CPU
{2865B421-2F1D-484B-9826-D92A002702E6}.Debug|x86.Build.0 = Debug|Any CPU
+ {2865B421-2F1D-484B-9826-D92A002702E6}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {2865B421-2F1D-484B-9826-D92A002702E6}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {2865B421-2F1D-484B-9826-D92A002702E6}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {2865B421-2F1D-484B-9826-D92A002702E6}.Dumper|x64.Build.0 = Debug|Any CPU
+ {2865B421-2F1D-484B-9826-D92A002702E6}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {2865B421-2F1D-484B-9826-D92A002702E6}.Dumper|x86.Build.0 = Debug|Any CPU
{2865B421-2F1D-484B-9826-D92A002702E6}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{2865B421-2F1D-484B-9826-D92A002702E6}.Installer|x64.ActiveCfg = Debug|Any CPU
{2865B421-2F1D-484B-9826-D92A002702E6}.Installer|x64.Build.0 = Debug|Any CPU
@@ -159,6 +198,11 @@ Global
{15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Debug|x64.Build.0 = Debug|x64
{15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Debug|x86.ActiveCfg = Debug|Win32
{15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Debug|x86.Build.0 = Debug|Win32
+ {15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Dumper|Any CPU.ActiveCfg = Debug|Win32
+ {15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Dumper|x64.ActiveCfg = Debug|x64
+ {15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Dumper|x64.Build.0 = Debug|x64
+ {15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Dumper|x86.ActiveCfg = Debug|Win32
+ {15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Dumper|x86.Build.0 = Debug|Win32
{15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Installer|Any CPU.ActiveCfg = Debug|Win32
{15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Installer|Any CPU.Build.0 = Debug|Win32
{15F9D451-9DAF-4904-B2EC-6B485FCA86FD}.Installer|x64.ActiveCfg = Debug|x64
@@ -175,6 +219,11 @@ Global
{1994C582-5BCD-45B1-A825-93123C16E33D}.Debug|x64.Build.0 = Debug|x64
{1994C582-5BCD-45B1-A825-93123C16E33D}.Debug|x86.ActiveCfg = Debug|Win32
{1994C582-5BCD-45B1-A825-93123C16E33D}.Debug|x86.Build.0 = Debug|Win32
+ {1994C582-5BCD-45B1-A825-93123C16E33D}.Dumper|Any CPU.ActiveCfg = Debug|Win32
+ {1994C582-5BCD-45B1-A825-93123C16E33D}.Dumper|x64.ActiveCfg = Debug|x64
+ {1994C582-5BCD-45B1-A825-93123C16E33D}.Dumper|x64.Build.0 = Debug|x64
+ {1994C582-5BCD-45B1-A825-93123C16E33D}.Dumper|x86.ActiveCfg = Debug|Win32
+ {1994C582-5BCD-45B1-A825-93123C16E33D}.Dumper|x86.Build.0 = Debug|Win32
{1994C582-5BCD-45B1-A825-93123C16E33D}.Installer|Any CPU.ActiveCfg = Debug|Win32
{1994C582-5BCD-45B1-A825-93123C16E33D}.Installer|x64.ActiveCfg = Debug|x64
{1994C582-5BCD-45B1-A825-93123C16E33D}.Installer|x64.Build.0 = Debug|x64
@@ -190,6 +239,11 @@ Global
{2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Debug|x64.Build.0 = Debug|x64
{2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Debug|x86.ActiveCfg = Debug|Win32
{2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Debug|x86.Build.0 = Debug|Win32
+ {2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Dumper|Any CPU.ActiveCfg = Debug|Win32
+ {2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Dumper|x64.ActiveCfg = Debug|x64
+ {2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Dumper|x64.Build.0 = Debug|x64
+ {2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Dumper|x86.ActiveCfg = Debug|Win32
+ {2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Dumper|x86.Build.0 = Debug|Win32
{2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Installer|Any CPU.ActiveCfg = Debug|Win32
{2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Installer|x64.ActiveCfg = Debug|x64
{2A876B34-06C7-4CD4-AF78-6783AC37DBAC}.Installer|x64.Build.0 = Debug|x64
@@ -206,6 +260,12 @@ Global
{3CB5E644-AB96-478C-8D88-093C48781174}.Debug|x64.Build.0 = Debug|Any CPU
{3CB5E644-AB96-478C-8D88-093C48781174}.Debug|x86.ActiveCfg = Debug|Any CPU
{3CB5E644-AB96-478C-8D88-093C48781174}.Debug|x86.Build.0 = Debug|Any CPU
+ {3CB5E644-AB96-478C-8D88-093C48781174}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {3CB5E644-AB96-478C-8D88-093C48781174}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {3CB5E644-AB96-478C-8D88-093C48781174}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {3CB5E644-AB96-478C-8D88-093C48781174}.Dumper|x64.Build.0 = Debug|Any CPU
+ {3CB5E644-AB96-478C-8D88-093C48781174}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {3CB5E644-AB96-478C-8D88-093C48781174}.Dumper|x86.Build.0 = Debug|Any CPU
{3CB5E644-AB96-478C-8D88-093C48781174}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{3CB5E644-AB96-478C-8D88-093C48781174}.Installer|x64.ActiveCfg = Debug|Any CPU
{3CB5E644-AB96-478C-8D88-093C48781174}.Installer|x64.Build.0 = Debug|Any CPU
@@ -223,6 +283,12 @@ Global
{AEC446C6-FA7D-4224-83C4-87C270759403}.Debug|x64.Build.0 = Debug|Any CPU
{AEC446C6-FA7D-4224-83C4-87C270759403}.Debug|x86.ActiveCfg = Debug|Any CPU
{AEC446C6-FA7D-4224-83C4-87C270759403}.Debug|x86.Build.0 = Debug|Any CPU
+ {AEC446C6-FA7D-4224-83C4-87C270759403}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {AEC446C6-FA7D-4224-83C4-87C270759403}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {AEC446C6-FA7D-4224-83C4-87C270759403}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {AEC446C6-FA7D-4224-83C4-87C270759403}.Dumper|x64.Build.0 = Debug|Any CPU
+ {AEC446C6-FA7D-4224-83C4-87C270759403}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {AEC446C6-FA7D-4224-83C4-87C270759403}.Dumper|x86.Build.0 = Debug|Any CPU
{AEC446C6-FA7D-4224-83C4-87C270759403}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{AEC446C6-FA7D-4224-83C4-87C270759403}.Installer|x64.ActiveCfg = Debug|Any CPU
{AEC446C6-FA7D-4224-83C4-87C270759403}.Installer|x64.Build.0 = Debug|Any CPU
@@ -240,6 +306,12 @@ Global
{6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Debug|x64.Build.0 = Debug|Any CPU
{6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Debug|x86.ActiveCfg = Debug|Any CPU
{6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Debug|x86.Build.0 = Debug|Any CPU
+ {6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Dumper|x64.Build.0 = Debug|Any CPU
+ {6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Dumper|x86.Build.0 = Debug|Any CPU
{6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Installer|x64.ActiveCfg = Debug|Any CPU
{6E55D051-3F0A-42B7-BF32-12785C60EBA0}.Installer|x64.Build.0 = Debug|Any CPU
@@ -257,6 +329,12 @@ Global
{72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Debug|x64.Build.0 = Debug|Any CPU
{72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Debug|x86.ActiveCfg = Debug|Any CPU
{72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Debug|x86.Build.0 = Debug|Any CPU
+ {72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Dumper|x64.Build.0 = Debug|Any CPU
+ {72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Dumper|x86.Build.0 = Debug|Any CPU
{72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Installer|x64.ActiveCfg = Debug|Any CPU
{72C8CAF9-2E7E-41C9-89A8-0BB189B7CDE4}.Installer|x64.Build.0 = Debug|Any CPU
@@ -274,6 +352,12 @@ Global
{516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Debug|x64.Build.0 = Debug|Any CPU
{516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Debug|x86.ActiveCfg = Debug|Any CPU
{516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Debug|x86.Build.0 = Debug|Any CPU
+ {516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Dumper|x64.Build.0 = Debug|Any CPU
+ {516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Dumper|x86.Build.0 = Debug|Any CPU
{516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Installer|x64.ActiveCfg = Debug|Any CPU
{516FAF96-3E40-44EF-A4EC-B2EA1B5879FA}.Installer|x64.Build.0 = Debug|Any CPU
@@ -291,6 +375,12 @@ Global
{5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Debug|x64.Build.0 = Debug|Any CPU
{5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Debug|x86.ActiveCfg = Debug|Any CPU
{5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Debug|x86.Build.0 = Debug|Any CPU
+ {5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Dumper|x64.Build.0 = Debug|Any CPU
+ {5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Dumper|x86.Build.0 = Debug|Any CPU
{5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Installer|x64.ActiveCfg = Debug|Any CPU
{5AA091A1-CFD0-494E-AD89-0DBE4F1E7ED7}.Installer|x64.Build.0 = Debug|Any CPU
@@ -308,6 +398,12 @@ Global
{0044F5F6-FFB4-442D-897D-08D41433EE4A}.Debug|x64.Build.0 = Debug|Any CPU
{0044F5F6-FFB4-442D-897D-08D41433EE4A}.Debug|x86.ActiveCfg = Debug|Any CPU
{0044F5F6-FFB4-442D-897D-08D41433EE4A}.Debug|x86.Build.0 = Debug|Any CPU
+ {0044F5F6-FFB4-442D-897D-08D41433EE4A}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {0044F5F6-FFB4-442D-897D-08D41433EE4A}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {0044F5F6-FFB4-442D-897D-08D41433EE4A}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {0044F5F6-FFB4-442D-897D-08D41433EE4A}.Dumper|x64.Build.0 = Debug|Any CPU
+ {0044F5F6-FFB4-442D-897D-08D41433EE4A}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {0044F5F6-FFB4-442D-897D-08D41433EE4A}.Dumper|x86.Build.0 = Debug|Any CPU
{0044F5F6-FFB4-442D-897D-08D41433EE4A}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{0044F5F6-FFB4-442D-897D-08D41433EE4A}.Installer|x64.ActiveCfg = Debug|Any CPU
{0044F5F6-FFB4-442D-897D-08D41433EE4A}.Installer|x64.Build.0 = Debug|Any CPU
@@ -325,6 +421,12 @@ Global
{070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Debug|x64.Build.0 = Debug|Any CPU
{070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Debug|x86.ActiveCfg = Debug|Any CPU
{070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Debug|x86.Build.0 = Debug|Any CPU
+ {070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Dumper|Any CPU.ActiveCfg = Debug|Any CPU
+ {070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Dumper|Any CPU.Build.0 = Debug|Any CPU
+ {070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Dumper|x64.ActiveCfg = Debug|Any CPU
+ {070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Dumper|x64.Build.0 = Debug|Any CPU
+ {070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Dumper|x86.ActiveCfg = Debug|Any CPU
+ {070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Dumper|x86.Build.0 = Debug|Any CPU
{070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Installer|Any CPU.ActiveCfg = Debug|Any CPU
{070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Installer|Any CPU.Build.0 = Debug|Any CPU
{070DE232-4EBE-44A8-841E-B5F6ECD4B943}.Installer|x64.ActiveCfg = Debug|Any CPU
diff --git a/hakchi_gui/DumperForm.Designer.cs b/hakchi_gui/DumperForm.Designer.cs
new file mode 100644
index 000000000..faa569db1
--- /dev/null
+++ b/hakchi_gui/DumperForm.Designer.cs
@@ -0,0 +1,49 @@
+namespace com.clusterrr.hakchi_gui
+{
+ partial class DumperForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.SuspendLayout();
+ //
+ // DumperForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Name = "DumperForm";
+ this.ShowInTaskbar = false;
+ this.Text = "DumperForm";
+ this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
+ this.Load += new System.EventHandler(this.DumperForm_Load);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/hakchi_gui/DumperForm.cs b/hakchi_gui/DumperForm.cs
new file mode 100644
index 000000000..deafb601f
--- /dev/null
+++ b/hakchi_gui/DumperForm.cs
@@ -0,0 +1,23 @@
+using com.clusterrr.hakchi_gui.Properties;
+using System;
+using System.Windows.Forms;
+
+namespace com.clusterrr.hakchi_gui
+{
+ public partial class DumperForm : Form
+ {
+ public DumperForm()
+ {
+ InitializeComponent();
+ hakchi.Initialize();
+ }
+
+ private void DumperForm_Load(object sender, EventArgs e)
+ {
+#if DUMPER
+ MainForm.DoNand(Tasks.MembootTasks.NandTasks.DumpNand, Resources.DumpingNand, this);
+#endif
+ Close();
+ }
+ }
+}
diff --git a/hakchi_gui/DumperForm.resx b/hakchi_gui/DumperForm.resx
new file mode 100644
index 000000000..1af7de150
--- /dev/null
+++ b/hakchi_gui/DumperForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/hakchi_gui/MainForm.cs b/hakchi_gui/MainForm.cs
index 3cb6b65d5..9fcd0c694 100644
--- a/hakchi_gui/MainForm.cs
+++ b/hakchi_gui/MainForm.cs
@@ -1950,8 +1950,15 @@ bool UploadGames(bool exportGames = false)
}
}
+#if DUMPER
+internal static
+#endif
bool DumpDialog(FileAccess type, string FileName, string FileExt, out string DumpFileName, string DialogFilter = null)
{
+#if DUMPER
+ var openDumpFileDialog = new OpenFileDialog();
+ var saveDumpFileDialog = new SaveFileDialog();
+#endif
DumpFileName = null;
string currentFilter;
switch (type)
@@ -1997,9 +2004,13 @@ bool DumpDialog(FileAccess type, string FileName, string FileExt, out string Dum
}
}
- bool DoNand(MembootTasks.NandTasks task, string title)
+ bool DoNand(MembootTasks.NandTasks task, string title) => DoNand(task, title, this);
+#if DUMPER
+internal static
+#endif
+ bool DoNand(MembootTasks.NandTasks task, string title, Form owner)
{
- using (Tasker tasker = new Tasker(this))
+ using (Tasker tasker = new Tasker(owner))
{
tasker.AttachViews(new Tasks.TaskerTaskbar(), new Tasks.TaskerForm());
tasker.SetStatusImage(Resources.sign_cogs);
diff --git a/hakchi_gui/Program.cs b/hakchi_gui/Program.cs
index 12990b06a..98218460a 100644
--- a/hakchi_gui/Program.cs
+++ b/hakchi_gui/Program.cs
@@ -112,7 +112,9 @@ static void Main(string[] args)
Trace.Listeners.Add(new TextWriterTraceListener(stdout));
+#if !DUMPER
if (Debugger.IsAttached || Array.IndexOf(args, "/debug") != -1)
+#endif
{
try
{
@@ -173,6 +175,7 @@ static void Main(string[] args)
{
if (createdNew)
{
+#if !DUMPER
if (!isPortable)
{
BaseDirectoryExternal = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "hakchi2");
@@ -258,6 +261,9 @@ static void Main(string[] args)
}
SetupScrapers();
+#else
+ BaseDirectoryExternal = BaseDirectoryInternal;
+#endif
Trace.WriteLine("Starting, version: " + Shared.AppDisplayVersion);
@@ -267,7 +273,11 @@ static void Main(string[] args)
FormContext.AllFormsClosed += Process.GetCurrentProcess().Kill; // Suicide! Just easy and dirty way to kill all threads.
+#if !DUMPER
FormContext.AddForm(new MainForm());
+#else
+ FormContext.AddForm(new DumperForm());
+#endif
Application.Run(FormContext);
Trace.WriteLine("Done.");
}
diff --git a/hakchi_gui/Sunxi/NandInfo.cs b/hakchi_gui/Sunxi/NandInfo.cs
index f9a9dba0b..e2d0d596e 100644
--- a/hakchi_gui/Sunxi/NandInfo.cs
+++ b/hakchi_gui/Sunxi/NandInfo.cs
@@ -24,7 +24,7 @@ internal PartitionInfo(string device, string label, long blocks)
public static PartitionInfo GetByLabel(IEnumerable info, params string[] labels)
{
- return info.Where(e => labels.Contains(e.Label)).First();
+ return info.Where(e => labels.Contains(e.Label)).FirstOrDefault();
}
}
@@ -46,7 +46,14 @@ private NandInfo(PartitionInfo[] partitions, long pageSize, long pagesPerBlock,
public static NandInfo GetNandInfo(string partCommand = "sunxi-part")
{
string partInfo = hakchi.Shell.ExecuteSimple(partCommand);
- string[] nandInfo = hakchi.Shell.ExecuteSimple("sunxi-flash nandinfo").Split(' ');
+ string commandOutput = hakchi.Shell.ExecuteSimple("sunxi-flash nandinfo");
+
+ if (string.IsNullOrWhiteSpace(commandOutput))
+ {
+ return new NandInfo(new PartitionInfo[] { }, 0, 0, 0);
+ }
+
+ string[] nandInfo = commandOutput.Split(' ');
var partitions = new List();
diff --git a/hakchi_gui/Tasks/MembootTasks.cs b/hakchi_gui/Tasks/MembootTasks.cs
index c54b8b761..1d37dbf8f 100644
--- a/hakchi_gui/Tasks/MembootTasks.cs
+++ b/hakchi_gui/Tasks/MembootTasks.cs
@@ -853,13 +853,15 @@ public static TaskFunc ProcessNand(string nandDump, NandTasks task)
throw new Exception(Properties.Resources.InvalidUserDataBackup);
}
+ var hasNand = hakchi.Shell.ExecuteSimple("ls -lah /dev/nanda &> /dev/null && echo 1 || echo 0") == "1";
+ var hasMmc = hakchi.Shell.ExecuteSimple("ls -lah /dev/mmcblk0 &> /dev/null && echo 1 || echo 0") == "1";
var nandInfo = Sunxi.NandInfo.GetNandInfo();
long partitionSize = 300 * 1024 * 1024;
var splitStream = new SplitterStream(Program.debugStreams);
- string rootfsDevice = $"/dev/{nandInfo.GetRootfsPartition().Device}";
+ string rootfsDevice = $"/dev/{nandInfo.GetRootfsPartition()?.Device}";
string osDecryptedDevice = rootfsDevice;
- string userDataDevice = $"/dev/{nandInfo.GetDataPartition().Device}";
+ string userDataDevice = $"/dev/{nandInfo.GetDataPartition()?.Device}";
bool hasKeyfile = hakchi.Shell.Execute("[ -f /key-file ]") == 0;
if (hasKeyfile)
@@ -901,7 +903,14 @@ public static TaskFunc ProcessNand(string nandDump, NandTasks task)
break;
case NandTasks.DumpNand:
- partitionSize = 536870912;
+ if (hasNand)
+ {
+ partitionSize = 536870912;
+ }
+ if (!hasNand && hasMmc)
+ {
+ partitionSize = long.Parse(hakchi.Shell.ExecuteSimple($"blockdev --getsize64 /dev/mmcblk0", throwOnNonZero: true));
+ }
break;
}
@@ -1050,8 +1059,16 @@ public static TaskFunc ProcessNand(string nandDump, NandTasks task)
break;
case NandTasks.DumpNand:
- hakchi.Shell.Execute("hakchi umount_base", null, splitStream, splitStream, 0, true);
- Shared.ShellPipe("sntool sunxi_flash phy_read 0", null, file, throwOnNonZero: true);
+ if (hasNand)
+ {
+ hakchi.Shell.Execute("hakchi umount_base", null, splitStream, splitStream, 0, true);
+ Shared.ShellPipe("sntool sunxi_flash phy_read 0", null, file, throwOnNonZero: true);
+ }
+
+ if (!hasNand && hasMmc)
+ {
+ Shared.ShellPipe("dd if=/dev/mmcblk0 bs=1M", null, file, throwOnNonZero: true);
+ }
break;
}
file.Close();
diff --git a/hakchi_gui/hakchi.cs b/hakchi_gui/hakchi.cs
index 0fa5f5b24..095447f61 100644
--- a/hakchi_gui/hakchi.cs
+++ b/hakchi_gui/hakchi.cs
@@ -20,7 +20,11 @@ public static class hakchi
public const string SERVICE_TYPE = "_ssh._tcp";
public const string USERNAME = "root";
public const string PASSWORD = "";
+#if DUMPER
+ public static readonly string latestHmodFile = Path.Combine(Program.BaseDirectoryInternal, "hakchi.hmod");
+#else
public static readonly string latestHmodFile = Path.Combine(Program.BaseDirectoryExternal ?? "", "data", "hakchi-latest.hmod");
+#endif
public const string latestHmodUrl = "https://hakchi.net/hakchi/hmods/hakchi-latest.hmod";
public const long BLOCK_SIZE = 4096;
@@ -39,11 +43,26 @@ public enum HmodLocation
public DateTime LastModified;
public static Hmod Get()
{
+ var baseHmodsPath = Path.Combine(Program.BaseDirectoryInternal, "basehmods.tar");
Hmod hakchiHmod = new Hmod();
hakchiHmod.HmodStream = new MemoryStream();
- using (var extractor = ArchiveFactory.Open(Path.Combine(Program.BaseDirectoryInternal, "basehmods.tar")))
+ if (!File.Exists(baseHmodsPath) && File.Exists(latestHmodFile))
+ {
+ using (var file = File.OpenRead(latestHmodFile))
+ {
+ hakchiHmod.LastModified = File.GetLastWriteTime(latestHmodFile);
+ hakchiHmod.Location = Hmod.HmodLocation.HakchiLatest;
+ file.CopyTo(hakchiHmod.HmodStream);
+ }
+
+ hakchiHmod.HmodStream.Seek(0, SeekOrigin.Begin);
+
+ return hakchiHmod;
+ }
+
+ using (var extractor = ArchiveFactory.Open(baseHmodsPath))
{
var hakchiEntry = extractor.Entries.Where(e => e.Key == "./hakchi.hmod" || e.Key == "hakchi.hmod").First();
if (File.Exists(latestHmodFile) && File.GetLastWriteTime(latestHmodFile) > hakchiEntry.LastModifiedTime)
diff --git a/hakchi_gui/hakchi_gui.csproj b/hakchi_gui/hakchi_gui.csproj
index f4561f22e..a59d28f5f 100644
--- a/hakchi_gui/hakchi_gui.csproj
+++ b/hakchi_gui/hakchi_gui.csproj
@@ -54,12 +54,17 @@ Gert Driesen for SSH.NET.
true
$(BuildDependsOn);MoveLanguageResourceFiles;
$(CleanDependsOn); CustomAfterClean
+ Debug;Release;Dumper
$(DefineConstants);TRACE;LIBUSBDOTNET WINDOWS_TESTING
+
+ $(DefineConstants);TRACE;LIBUSBDOTNET WINDOWS_TESTING;DEBUG
+
+
$(DefineConstants);TRACE;LIBUSBDOTNET WINDOWS_TESTING
@@ -113,7 +118,7 @@ Gert Driesen for SSH.NET.
-
+
PreserveNewest
@@ -236,7 +241,8 @@ Gert Driesen for SSH.NET.
-
+
+