Popup toast message (for apps & games)

In this tutorial I'll show you how to add popup toast for apps & games in different activities like when open app or open settings or menu to show popup

Adding toast Description
Steps:
1)Decompile the apk file (I personally use apkeditor for this or apktool m)
Note decompile dex files too
2)now open androidmanifest.xml and search for the activity that where you want to toast the message

(ok i personally do not use toast in my mods but I recommend you to toast msg in app start or when nenu or settings open)

Ok let's make toast to appear on sart of app

3)ok find the first activity in AndroidManifest.xml and it is mostly the startup screen or search for settings activitie your wish



Now open the activity smali which is placed under the path which i circled in the image

4)now search for the code below... Copy and search it in that activity smali


.method protected onCreate(Landroid/os/Bundle;)V

Then you see lines like  this

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 5

    const/16 v2, 0x8

    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

5)now copy the code i give below and paste it in between  . registers 5 andconst/16 v2, 0×8

(note there may be Any number after  .registers so don't care about it


const/4 v0, 0x1

    const-string v1, "Hacked by YOUR_USERNAME_HERE"

    invoke-static {p0, v1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V


Copy code and paste it there and change user name to your name

Ex:.method protected onCreate(Landroid/os/Bundle;)V
    .registers 5

const/4 v0, 0x1 const-string v1, "Hacked by YOUR_USERNAME_HERE" invoke-static {p0, v1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast; move-result-object v0 invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    const/16 v2, 0x8

    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V



6)ok save and build the app and your toast is displays


Note:For unity games plz add code in smali file in this lines observe the picture below 


And also you can place the popup code after   .registers or  .prologue

The code toasts..... 

So i think you get a clear idea that how to add a popup toast to your mod.... 



Comments

  1. Can you please provide a detailed video for this ?
    thanks in advance

    ReplyDelete

Post a Comment

latest

Tools Updated

MT manager introduction & how to use it

How to create apkeditor Patch file

Unlock Vip or Premium in an app

Remove Ad's in an App