From b67cc0820d50d1f892a0c448e95894df569eb8df Mon Sep 17 00:00:00 2001 From: BryanGIG Date: Wed, 22 Feb 2023 20:49:54 +0700 Subject: [PATCH] Add missing changes commit dd1c773 --- app/src/main/java/com/dumper/android/core/RootServices.kt | 6 +++--- app/src/main/java/com/dumper/android/dumper/Dumper.kt | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/dumper/android/core/RootServices.kt b/app/src/main/java/com/dumper/android/core/RootServices.kt index 1307eb1..1f044af 100644 --- a/app/src/main/java/com/dumper/android/core/RootServices.kt +++ b/app/src/main/java/com/dumper/android/core/RootServices.kt @@ -39,14 +39,14 @@ class RootServices : RootService(), Handler.Callback { val logOutput = StringBuilder() val process = requestData.getString(PROCESS_NAME) val listFile = requestData.getStringArray(LIST_FILE) - val isFlagCheck = requestData.getBoolean(IS_FLAG_CHECK) - val is32Bit = requestData.getBoolean(LIBRARY_ARCH_BOOL) + val isFlagCheck = requestData.getBoolean(IS_FLAG_CHECK, false) + val is32Bit = requestData.getBoolean(LIBRARY_ARCH_BOOL, false) val isAutoFix = requestData.getBoolean(IS_FIX_NAME, false) if (process != null && listFile != null) { val dumper = Dumper(process) for (file in listFile) { dumper.file = file - logOutput.appendLine(dumper.dumpFile(isAutoFix, isFlagCheck, is32Bit)) + logOutput.appendLine(dumper.dumpFile(isAutoFix, is32Bit, isFlagCheck)) } data.putString(DUMP_LOG, logOutput.toString()) } else { diff --git a/app/src/main/java/com/dumper/android/dumper/Dumper.kt b/app/src/main/java/com/dumper/android/dumper/Dumper.kt index 696c6dc..b6da8d8 100644 --- a/app/src/main/java/com/dumper/android/dumper/Dumper.kt +++ b/app/src/main/java/com/dumper/android/dumper/Dumper.kt @@ -19,7 +19,7 @@ class Dumper(private val pkg: String) { * @param flagCheck if `true` the dumped file will be checked for flags/ * @return log of the dump */ - fun dumpFile(autoFix: Boolean, flagCheck: Boolean): String { + fun dumpFile(autoFix: Boolean, is32Bit: Boolean, flagCheck: Boolean): String { val log = StringBuilder() try { mem.pid = getProcessID() ?: throw Exception("Process not found!\ndid you already run it?") @@ -64,8 +64,7 @@ class Dumper(private val pkg: String) { if (!file.contains(".dat") && autoFix) { log.appendLine("Fixing...") - val is32bit = mem.sAddress.toHex().length == 8 - val fixer = Fixer.fixDump(pathOut, mem.sAddress.toHex(), is32bit) + val fixer = Fixer.fixDump(pathOut, mem.sAddress.toHex(), is32Bit) // Check output fixer and error fixer if (fixer[0].isNotEmpty()) { log.appendLine("Fixer output : \n${fixer[0].joinToString("\n")}")