Skip to content

Commit

Permalink
Add missing changes commit dd1c773
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanGIG committed Feb 22, 2023
1 parent 32c76df commit b67cc08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/com/dumper/android/core/RootServices.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/java/com/dumper/android/dumper/Dumper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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?")
Expand Down Expand Up @@ -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")}")
Expand Down

0 comments on commit b67cc08

Please sign in to comment.