From 13472f7a254126d8994442143a5e1ee4a4e0f7a0 Mon Sep 17 00:00:00 2001 From: VLTNO <60850875+VLTNOgithub@users.noreply.github.com> Date: Sat, 12 Apr 2025 14:14:25 +0100 Subject: [PATCH 1/3] Fix java version bug --- Phunk/Core/ReqChecker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phunk/Core/ReqChecker.cs b/Phunk/Core/ReqChecker.cs index eff71ff..2444207 100644 --- a/Phunk/Core/ReqChecker.cs +++ b/Phunk/Core/ReqChecker.cs @@ -77,7 +77,7 @@ public bool IsJavaVersionValid(string command) string versionString = match.Groups[1].Value.Trim(); versionstr = versionString; - if (Version.TryParse(versionString, out Version version) && version.Major == 1 && version.Minor >= 8) + if (Version.TryParse(versionString, out Version version) && version.Major >= 18) { return true; } From b0bd59261b836d9fa172cd9f30c5fb77728fb011 Mon Sep 17 00:00:00 2001 From: VLTNOgithub Date: Sat, 2 Aug 2025 13:48:40 +0100 Subject: [PATCH 2/3] Fixed apktool errors and more. - Fixed apktool decompiling and building errors - Updated custom package setting placeholder to be accutate - Added phunk updater's build directory to .gitignore --- .gitignore | 3 ++- Phunk/Core/ApkHandler.cs | 4 ++-- Phunk/MVVM/View/Windows/SettingsWindow.xaml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e760dcb..7f681e1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .idea Phunk/obj Phunk.Updater/obj -Phunk/bin \ No newline at end of file +Phunk/bin +Phunk.Updater/bin \ No newline at end of file diff --git a/Phunk/Core/ApkHandler.cs b/Phunk/Core/ApkHandler.cs index 37df1d6..e02ac27 100644 --- a/Phunk/Core/ApkHandler.cs +++ b/Phunk/Core/ApkHandler.cs @@ -23,7 +23,7 @@ public int DecompileApkTool(string apktoolPath, string apkPath, string outputApk FileName = !GlobalViewModel.IsCustomJavaPath && GlobalViewModel.JavaPathFolderSettingsTxt.Length == 0 ? "java" : Path.Combine(GlobalViewModel.JavaPathFolderSettingsTxt + "/bin/java.exe"), - Arguments = $"-jar \"{apktoolPath}\" -f d \"{apkPath}\" -o \"{outputApkPath}\"" + " " + additionalParams, + Arguments = $"-jar \"{apktoolPath}\" d -f \"{apkPath}\" -o \"{outputApkPath}\"" + " " + additionalParams, RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false, @@ -71,7 +71,7 @@ public void BuildApkTool(string apktoolPath, string directoryPath, string output FileName = !GlobalViewModel.IsCustomJavaPath && GlobalViewModel.JavaPathFolderSettingsTxt.Length == 0 ? "java" : Path.Combine(GlobalViewModel.JavaPathFolderSettingsTxt + "/bin/java.exe"), - Arguments = $"-jar \"{apktoolPath}\" -f b \"{directoryPath}\" -o \"{outputApkPath}\"", + Arguments = $"-jar \"{apktoolPath}\" b -f \"{directoryPath}\" -o \"{outputApkPath}\"", RedirectStandardOutput = true, RedirectStandardError = true, UseShellExecute = false, diff --git a/Phunk/MVVM/View/Windows/SettingsWindow.xaml b/Phunk/MVVM/View/Windows/SettingsWindow.xaml index 2f7d60c..c071a24 100644 --- a/Phunk/MVVM/View/Windows/SettingsWindow.xaml +++ b/Phunk/MVVM/View/Windows/SettingsWindow.xaml @@ -36,7 +36,7 @@ - + From 55536643df208eb16cddadf19035b39ff3f95652 Mon Sep 17 00:00:00 2001 From: VLTNOgithub Date: Sun, 26 Oct 2025 10:32:48 +0000 Subject: [PATCH 3/3] Added a check for java 8. --- Phunk/Core/ReqChecker.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Phunk/Core/ReqChecker.cs b/Phunk/Core/ReqChecker.cs index 2444207..a803555 100644 --- a/Phunk/Core/ReqChecker.cs +++ b/Phunk/Core/ReqChecker.cs @@ -77,8 +77,9 @@ public bool IsJavaVersionValid(string command) string versionString = match.Groups[1].Value.Trim(); versionstr = versionString; - if (Version.TryParse(versionString, out Version version) && version.Major >= 18) + if (Version.TryParse(versionString, out Version version) && ( version.Major >= 18 || version.ToString() == "1.8" ) ) { + GlobalViewModel.PhunkLogs += "\n[Phunk] Java version is up to date: " + version; return true; } }