Saturday, February 19, 2011

more smali syntax and running smali files

there are some examples of smali syntax written by the author of smali/baksmali JesusFreke here: http://code.google.com/p/smali/source/browse/trunk/examples/. most are rather technical, but still illuminating.

here's one that i modified slightly that shows a basic hello world app with a standard main method. also, in the comments you will see a way to quickly compile and run a smali file. this is sometimes quite useful in testing your code:
.class public LHelloWorld;

# Ye olde hello world application
# To assemble and run this on a phone or emulator:
#
# java -jar smali.jar -o classes.dex HelloWorld.smali
# zip HelloWorld.zip classes.dex
# adb push HelloWorld.zip /data/local
# adb shell dalvikvm -cp /data/local/HelloWorld.zip HelloWorld
#
# if you get out of memory type errors when running smali.jar
# give java more memory with -Xmx512m, like this:
# java -Xmx512m -jar smali.jar HelloWorld.smali

.super Ljava/lang/Object;

.method public static main([Ljava/lang/String;)V
    .registers 2

    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v1, "hello,world!"

    # combine executing with adb shell commands and console output
    # and you have a very quick way to test code
    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    return-void
.end method

11 comments :

  1. Great Article..Thanks for the sharing..

    Bigo live is a GooD APK.Connect friends.
    Install the application here.....

    Bigo Live App

    ReplyDelete
  2. Repliche orologi italia , che combina uno stile elegante e una tecnologia all'avanguardia, una varietà di stili di Repliche orologi omega italia , il puntatore cammina tra il tuo stile di gusto esclusivo.

    ReplyDelete
  3. Great survey, I'm sure you're getting a great response. auto reply text

    ReplyDelete
  4. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. appcloner

    ReplyDelete
  5. Hello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. hoverwatch cost

    ReplyDelete
  6. I found your this post while searching for some related information on blog search...Its a good post..keep posting and update the information. HDfilme

    ReplyDelete
  7. Nice Article. Thank you for sharing the informative article with us. Morpheus tv apk is the best online Streaming App.Click the below link to know more about
    Morpheus tv apk
    morpheus tv
    morpheus tv apk
    morpheus app
    morpheus tv ios
    morpheus tv on your windows

    ReplyDelete
  8. What is the meaning of this line in smali
    .field public static final z:Z = false

    ReplyDelete
  9. What is the meaning of this line in smali
    .field public static final z:Z = false

    ReplyDelete
  10. **SELLING SSN+DOB FULLZ**

    CONTACT
    Telegram > @leadsupplier
    ICQ > 752822040
    Email > leads.sellers1212@gmail.com

    >>1$ each without DL/ID number
    >>2$ each with DL
    >>5$ each for premium (also included relative info)

    *Will reduce price if buying in bulk
    *Hope for a long term business

    FORMAT OF LEADS/FULLZ/PROS

    ->FULL NAME
    ->SSN
    ->DATE OF BIRTH
    ->DRIVING LICENSE NUMBER WITH EXPIRY DATE
    ->COMPLETE ADDRESS
    ->PHONE NUMBER, EMAIL, I.P ADDRESS
    ->EMPLOYMENT DETAILS
    ->REALTIONSHIP DETAILS
    ->MORTGAGE INFO
    ->BANK ACCOUNT DETAILS

    >Fresh Leads for tax returns & w-2 form filling
    >Payment mode BTC, ETH, LTC, PayPal, USDT & PERFECT MONEY

    ''OTHER GADGETS PROVIDING''

    >SSN+DOB Fullz
    >CC with CVV
    >Photo ID's
    >Dead Fullz
    >Spamming Tutorials
    >Carding Tutorials
    >Hacking Tutorials
    >SMTP Linux Root
    >DUMPS with pins track 1 and 2
    >Sock Tools
    >Server I.P's
    >HQ Emails with passwords

    Email > leads.sellers1212@gmail.com
    Telegram > @leadsupplier
    ICQ > 752822040

    THANK YOU

    ReplyDelete

Do NOT post about or link to specific apps!