Skip to content

Commit

Permalink
🎉 release 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
theapache64 committed Sep 7, 2024
1 parent 31a1951 commit ba95da2
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 30 deletions.
1 change: 1 addition & 0 deletions .idea/artifacts/dex_diff_main_jar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dex-diff before.apk after.apk [com.my.app.packageName]
with-fullmode.apk without-fullmode.apk

❯ dex-diff without-fullmode.apk with-fullmode.apk com.example.flowobjectrepro
⚔️ dex-diff v0.0.7
⚔️ dex-diff v0.1.1
🚀 Initialising...
➡️ Deleting old results (dex-diff-result)...
✅ Deleted old results
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"preferGlobal": "true",
"repository": "https://github.com/theapache64/dex-diff",
"version": "0.0.7",
"version": "0.1.2",
"jdeploy": {
"jdk": "false",
"javaVersion": "17",
Expand Down
3 changes: 1 addition & 2 deletions src/main/kotlin/com/github/theapache64/dexdiff/app/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ class App : Application() {
* Entry point
*/
fun main(args: Array<String>) {
println("⚔️ dex-diff v0.0.7")
println("⚔️ dex-diff v0.1.2")
val heapSize = Runtime.getRuntime().maxMemory() / 1024 / 1024
println("🧠 Heap size: $heapSize MB")

App.args = args
App().onCreate()
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,41 @@ class HomeViewModel @Inject constructor(
_status.value = "✅ Decompiling after APK finished"
_status.value = "✅ Decompile finished (${System.currentTimeMillis() - startTime}ms)"


startTime = System.currentTimeMillis()
_status.value = "➡️ Comparing before and after... (this may take some time)"
val beforeFiles = beforeReport.sourceDir.walk().toList().filter { it.isFile }
val afterFiles = afterReport.sourceDir.walk().toList().filter { it.isFile }
val filesResult = createFileResult(
appPackages = appArgs.appPackages,
beforeReport = beforeReport,
afterReport = afterReport
)

// app files
val beforeAppFiles = filesResult.beforeAppFiles
val afterAppFiles = filesResult.afterAppFiles
val changedAppFiles = filesResult.changedAppFiles

// library files
val beforeLibraryFiles = filesResult.beforeLibraryFiles
val afterLibraryFiles = filesResult.afterLibraryFiles
val beforeTotalLibraryFiles = beforeLibraryFiles.size
val afterTotalLibraryFiles = afterLibraryFiles.size

// framework files
val beforeFrameworkFiles = filesResult.beforeFrameworkFiles
val afterFrameworkFiles = filesResult.afterFrameworkFiles
val beforeTotalFrameworkFiles = beforeFrameworkFiles.size
val afterTotalFrameworkFiles = afterFrameworkFiles.size

val reportFile = File("dex-diff-result/${beforeMd5}_${afterMd5}_report.html")

if (reportFile.exists()) {
println("🙌 skipping new report file generation as cache exist")
} else {

_status.value = "➡️ Comparing before and after... (this may take some time)"

val beforeFiles = beforeReport.sourceDir.walk().toList().filter { it.isFile }
val afterFiles = afterReport.sourceDir.walk().toList().filter { it.isFile }
val filesResult = createFileResult(
appPackages = appArgs.appPackages,
beforeReport = beforeReport,
afterReport = afterReport
)

// app files
val beforeAppFiles = filesResult.beforeAppFiles
val afterAppFiles = filesResult.afterAppFiles
val changedAppFiles = filesResult.changedAppFiles

// library files
val beforeLibraryFiles = filesResult.beforeLibraryFiles
val afterLibraryFiles = filesResult.afterLibraryFiles
val beforeTotalLibraryFiles = beforeLibraryFiles.size
val afterTotalLibraryFiles = afterLibraryFiles.size

// framework files
val beforeFrameworkFiles = filesResult.beforeFrameworkFiles
val afterFrameworkFiles = filesResult.afterFrameworkFiles
val beforeTotalFrameworkFiles = beforeFrameworkFiles.size
val afterTotalFrameworkFiles = afterFrameworkFiles.size

_status.value = "✅ Comparing finished (${System.currentTimeMillis() - startTime}ms)"
_status.value = "➡️ Making report..."

Expand Down

0 comments on commit ba95da2

Please sign in to comment.