Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

Ardalan foroughi patch 1 #102

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/obfuscapk/resources/libs_to_ignore.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
afzkl/development/
android/arch/
android/content/
android/opengl/
android/support/
Expand Down
24 changes: 18 additions & 6 deletions src/obfuscapk/resources/smali/AdvancedApiReflection.smali
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,29 @@
invoke-virtual {p0, p1, p2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

move-result-object p0

:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0

:catch_0
move-exception p0
move-exception v0

invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;

const/4 p0, 0x0
move-result-object v0

return-object p0
check-cast v0, Ljava/lang/Exception;

throw v0

:catch_1
move-exception v0

invoke-virtual {v0}, Ljava/lang/IllegalAccessException;->printStackTrace()V

const/4 v0, 0x0

return-object v0
.end method
24 changes: 18 additions & 6 deletions src/obfuscapk/resources/smali/ApiReflection.smali
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,29 @@
invoke-virtual {p0, p1, p2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

move-result-object p0

:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0

:catch_0
move-exception p0
move-exception v0

invoke-virtual {p0}, Ljava/lang/Exception;->printStackTrace()V
invoke-virtual {v0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;

const/4 p0, 0x0
move-result-object v0

return-object p0
check-cast v0, Ljava/lang/Exception;

throw v0

:catch_1
move-exception v0

invoke-virtual {v0}, Ljava/lang/IllegalAccessException;->printStackTrace()V

const/4 v0, 0x0

return-object v0
.end method