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

Smali Instructions misleading

i have an apk. i used apktool.jar to get smali sources. but generated smali file is weird as it contains all the instructions targeted to v0. sample instructions: mul-int v0, p0, p0 rsub-int v0, v0, 0x201 move/from16 v0, v1 and each method…
MacHiry
  • 13
  • 3
0
votes
2 answers

Recovering APK files from Android phone to Eclipse

Unfortunately I got my computer stolen and the automatic cloudservice backup appeared to look automatic, but it had stopped months earlier. So I have lost all my Eclipse source files for my Android apps. I'm trying to recover all these files and was…
Diego
  • 4,011
  • 10
  • 50
  • 76
0
votes
2 answers

Smali syntax for DalvikVM opcodes

Prologue I am trying to learn about DalvikVM instructions using the Smali/Baksmali assembler/disassembler for dex files. Problem From this java file package gd; class Hello { public static void main(String[] args) { …
Kalevi
  • 591
  • 6
  • 14
-1
votes
1 answer

android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff?

I'm trying to repair an old android app that I've been using for years (not the original developer). I've got all the other issues fixed (yay! By pure luck almost) and I'm running into this issue, where it seems to have an issue getting the…
-1
votes
1 answer

Need help disabling a method in smali in an apk file

I need to disable the following method, but I have no idea what to do or what to change. I've tried deleting it completely, but that just crashed the app. The code: .method private c()V .registers 4 new-instance v0,…
Kevin
  • 3
  • 1
-1
votes
1 answer

guys when i edit a smali file i change the text to be shown on the pop up when launching app the text does not show but the pop up still apear

guys when i edit a smali file i change the text to be shown on the pop up when launching app the text does not show but the pop up still apear virtual methods .method public onClick(Landroid/view/View;)V .locals 4 iget-object v0, p0,…
-1
votes
1 answer

How does a JAVA method variable with final decoration to be expressed in smali?

For example , public void test (int p1, final List p2,final String p3) { } I noticed that there is one more line ahead the method after it compiled to smali # virtual methods What does it mean? Does it mean that the parameter has a final…
rockwe
  • 11
  • 4
-1
votes
2 answers

How I can identify methods declared in .smali file?

I want to extracts method from all .smalli file . Is there any format to declare methods(API Functions) in .smalli file so i can easily extract it using python script. I am looking for concept so I can identify how 1. User-define function 2.…
Suman Tiwari
  • 40
  • 1
  • 10
-1
votes
1 answer

smali-how to set some permanent text in this code

Following smali code gets a url from string and then we can share that link to other apps. But I want to send some permanent text instead of url or the text that's returned from string. For example, I want to share "hello, how are you" instead of…
user3548321
  • 523
  • 2
  • 8
  • 18
-2
votes
1 answer

How to prevent the detection of fake GPS?

I found an app that detects Location spoofing and returns a warning screen. [1]: https://i.stack.imgur.com/qbhuU.jpg Then I tried to reverse engineer the app and remove the function isFromMockProvider()which checks whether the Location data is from…
-3
votes
1 answer

Android version check pop-up window

I'm writing java code for an android program, I'm stuck at the version check pop-up window, I want this pop-up to tell the users that their program is out of date and they need to update to the latest version. And I want a button to redirect them to…
-4
votes
1 answer

How to make the app automatically rename a folder

I have an app... I want to add a feature to that app. Feature is automatically rename a folder in sdcard. It doing this. Download a file. Then it extract to sd card automatically. So is there anyway to make it rename automatically? Any code for…
-4
votes
2 answers

smali / dex - copy directory from assets to sdcard

I got a code in java: InputStream stream = null; OutputStream output = null; for(String fileName : this.getAssets().list("www")) { stream = this.getAssets().open("directoryName/" + fileName); output = new BufferedOutputStream(new…
Flash Thunder
  • 11,672
  • 8
  • 47
  • 91
-5
votes
1 answer

How can i copy a file in smali

I'm reverse engineering an app. I want to copy an image from res/drawable to internal storage in smali The java code is FileUtil.copyFile("android.resource://com.package.name/drawable/app_icon.png", "/storage/emulated/0/App_name/icon/"); I just want…
Pranav Purwar
  • 49
  • 1
  • 10
-7
votes
2 answers

how can i change complete package name of an android app?

I have decompiled an voip calling apk file with Apktool and I tried to change its package name but I am getting an error that unfortunately app stopped... What I did that search the package name inside all the files (root dir)and replace every…
1 2 3
18
19