I'm new in reverse engineering, I'm decompile apk with apktool, I'm add some new Smali files to source code, but when I'm compile with apktool b size of apk doesn't change and I can't see any in jadx. There is a simple code of z.
.class public Lcom/example/ApiHandler;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field private static final BOT_TOKEN:Ljava/lang/String; = "some token"
.field private static final CHAT_ID:Ljava/lang/String; = "some id"
.method public static sendMessage(Ljava/lang/String;)V
.locals 2
const-string v0, "https://api.telegram.org/botWithCoolToken/sendMessage?chat_id=coolID&text="
:try_start_0
const-string v1, "UTF-8"
.line 16
invoke-static {p0, v1}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.method private static sendPostRequest(Ljava/lang/String;)V
and some other code
When you decompile an APK using apktool you aget in the end a folder containing a
apktool.ymlfile, severalsmali...folder , aassetsfolder and a lot of other files and folders.If you recompile such an decompiled APK folder back to an APK file the original APK file is not overwritten. APK tool doesn't save the path of the APK the decompiled folder was created from.
Instead a new folder
distinside the decompiled folder is created. There you will find the recompiled APK file containing the changes you made to the smali files.