Questions tagged [smali]

Smali is the assembly language for the Android Dalvik Virtual Machine and is based on the Jasmin Java assembly language.

Smali is the assembly language for the Android Dalvik Virtual Machine and is based on the Jasmin Java assembly language.

Smali as an assembler takes ASCII descriptions of Dalvik Virtual Machine Classes, written in a simple assembler-like syntax using the Dalvik Virtual Machine instruction set. It converts them into binary .dex class files, suitable for incorporating into an Android Package file (.apk) for execution on an Android powered device.

Questions with this tag should be specifically relating to the Android OS including decompiling, recompiling, and modifying legitimate apks . Please do NOT ask how to "hack", pirate, or otherwise work around a legitimate copy protection or licensing scheme put in place by the original developer.

See also:

  1. Smali/Baksmali Project
  2. Dalvik Bytecode Reference
  3. Jasmin
285 questions
0
votes
1 answer

is it possible to compile android .java source files produced jd-gui

I want to change some lines in smali file. I converted android's classes.dex to classes.jar by using dex2jar. then used jd-gui to see source files and saved them . from this I got .java files . after editing I want to recompile them to see the…
Arun_005
  • 11
  • 3
0
votes
1 answer

Android: Which Method performs the "onClick" Events of the Buttons, which are defined in the XML Layouts.

I'm trying to get a better understanding of the Android framework and therefore I've created a simple App, which actually consists of just one Button. Whenever this button gets clicked, a method called sendMessage in the MainActivity starts a new…
user2989815
  • 59
  • 1
  • 7
0
votes
1 answer

Obfuscate URLs in Android client application

I wrote an android client app in which I am using static URLs to "post" to my server. I decompiled the APK using APKTool and found tht I could see the URL I mentioned in the .java code in the .smali file it generated. I want to avoid having this URL…
JPro
  • 6,292
  • 13
  • 57
  • 83
0
votes
1 answer

Is 15.0F in Java 0x4170 in Smali?

I'm trying to edit a smali file in smali itself. I do however have the corresponding java file. I'm trying to figure out why a 15.0F in java is 0x4170 in smali? Isn't 0x4170 in decimal = 16752? Code: java, smali
laggingreflex
  • 32,948
  • 35
  • 141
  • 196
0
votes
0 answers

Understanding decompiled Android method

I just got a task at my job to reverse engineer an application developed by a consultancy firm a year ago. They don’t have the source code, thats why I have to do this. Anyways, there is a token that is converted from one string to…
M3rd0n
  • 311
  • 3
  • 14
0
votes
1 answer

Found strange Davik opcode

Who can help me what command meaning: rsub-int/lit8 v9, v0, 0x8. I tried to search, but I got nothing about it. Thank you.
Ken Block
  • 3,423
  • 1
  • 21
  • 23
0
votes
1 answer

Smali:All register args must fit in 4 bits error

when i used smali to dex my mod file, I got this error: patch\android\view\Choreographer.smali[1392,4] All register args must fit in 4 bits I located to line 1392 and found: invoke-direct {p0, p1, p2, p3},…
lengxuehx
  • 1,500
  • 1
  • 18
  • 25
0
votes
1 answer

Where to put code for a global hardware key listener?

I'm trying to hack hardware key support into an existing app, but came to realize I know too little of Android app development to continue. I can decompile and recompile the app without problems using APKtool, and I made a small app myself with…
Protector one
  • 6,926
  • 5
  • 62
  • 86
0
votes
1 answer

what's the naming scheme of smali file

I'm really obfuscated by the naming of smali file. Traditionally, the class a will be named as a.smali, and the inner class b of a will be named a$b.smali. but just now I came across a class f, its file is f.2.smali, meanwhile in the same directory…
ytliu
  • 569
  • 1
  • 4
  • 12
0
votes
1 answer

Smali if structure modification

i need to modify "if statements" from smali codes to the condition will be true, in java could be something like that: if(a > b){ ..... } convert to: if(true){ ... } If is it possible to do in smali code? And have anyone idea that how…
user2366903
  • 15
  • 2
  • 5
0
votes
1 answer

What is the full chain list of formats that Android .java file is getting through?

I just noticed the .smali file, which the .dex file is compiled to. I want to be able to track over all the transformations that my .java file is going through. First, I want to know what are all the transformation that executed from creation of the…
Bush
  • 2,433
  • 5
  • 34
  • 57
0
votes
1 answer

Legal label names smali

What are the legal names for a smali label? I know a-z and _ is legal and \n isn't obviously, but are there any rules regarding the label names? I know the bytecode doesn't use the labels and the dalvik assembler (smali) converts it to position in…
Xonar
  • 1,296
  • 1
  • 14
  • 21
0
votes
2 answers

smali: String Constants

Is there anything else that must be done to load a String constant into a register, and then using it in a method invocation, besides doing: const-string v6, "TEST CONSTANT" invoke-static {v6, p1},…
Edwin Lee
  • 3,540
  • 6
  • 29
  • 36
0
votes
1 answer

smali: Handling Parameterised Classes

Let's say I have an List, I want to invoke its add(E object) method, and my list is actually a List, how should i represent this invocation in smali? Should it be invoke-interface {v1, v2},…
Edwin Lee
  • 3,540
  • 6
  • 29
  • 36
0
votes
1 answer

Identifying the leaked private informations by inspecting smali code of Android application

I'm trying to detect the leakage of private information by inspecting the smali code of Android applications. My strategy so far is.. searching the code that substitutes a personal information (e.g. IMEI, phone number) into a variable, then trace…
Ryo
  • 2,003
  • 4
  • 27
  • 42
1 2 3
18
19