Skip to content

Instantly share code, notes, and snippets.

@tosunkaya
Forked from 0rka/.smali
Created February 8, 2024 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tosunkaya/d95ab74ec3852caf6831700bac124df2 to your computer and use it in GitHub Desktop.
Save tosunkaya/d95ab74ec3852caf6831700bac124df2 to your computer and use it in GitHub Desktop.
smali example
.class public Lcom/test/helloworld/HelloWorldActivity;
.super Landroid/app/Activity;
.source "HelloWorldActivity.java"
# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
.locals 2
.parameter "savedInstanceState"
.prologue
.line 11
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 13
new-instance v0, Landroid/widget/TextView;
invoke-direct {v0, p0}, Landroid/widget/TextView;->(Landroid/content/Context;)V
.line 14
.local v0, text:Landroid/widget/TextView;
const-string v1, "Hello World, Android"
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 15
invoke-virtual {p0, v0}, Lcom/test/helloworld/HelloWorldActivity;->setContentView(Landroid/view/View;)V
.line 17
return-void
.end method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment