Skip to content

Instantly share code, notes, and snippets.

@ericntd
Created October 18, 2021 21:31
Show Gist options
  • Save ericntd/e00f953621356b6b3ffc64f254161188 to your computer and use it in GitHub Desktop.
Save ericntd/e00f953621356b6b3ffc64f254161188 to your computer and use it in GitHub Desktop.
Process Proguard's mapping.txt
val mappingReader = File("/Users/ericn/tmp/algo/kotlin/src/matching_logs/mapping.txt").bufferedReader()
    val mappingTree = BinarySearchTree("com.myawesomeapp.ghafaewafe") // hopefully the tree will be balance
    mappingReader.lines().forEach {
        if (it.startsWith("com.myawesomeapp") && !it.contains("$") && !it.contains("_")) {
            val arrowIndex = it.indexOf("->")
            mappingTree.insert(it.substring(0, arrowIndex - 1))
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment