Created
March 29, 2015 09:44
-
-
Save mridang/cee8a98244f732dee8ef to your computer and use it in GitHub Desktop.
Enables HTTP debug logging to any decompiled APK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.method public static dhcout()V | |
.locals 2 | |
.prologue | |
.line 63 | |
const-string v0, "org.apache.http.wire" | |
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger; | |
move-result-object v0 | |
sget-object v1, Ljava/util/logging/Level;->FINEST:Ljava/util/logging/Level; | |
invoke-virtual {v0, v1}, Ljava/util/logging/Logger;->setLevel(Ljava/util/logging/Level;)V | |
.line 64 | |
const-string v0, "org.apache.http.headers" | |
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger; | |
move-result-object v0 | |
sget-object v1, Ljava/util/logging/Level;->FINEST:Ljava/util/logging/Level; | |
invoke-virtual {v0, v1}, Ljava/util/logging/Logger;->setLevel(Ljava/util/logging/Level;)V | |
.line 65 | |
return-void | |
.end method |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add that piece of code to the class where the
DefaultHttpClient
is being initialized. Right before the constructor call, add this bit of Smali to invoke the method:`invoke-static {}, Lshared/Web/Private/CWebRequestThread;->dhcout()V``
You would need to update the namespace to correctly invoke the static method. Once you've done this, rebuilt and installed your APK, you'll need to enable HTTP debug logging to the logcat output. This can be done by running: