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

Android smali mod: replace intent

I'm trying to modify an existing App. Currently this is one action of this App which when chosen will bring out the Wireless & Network setting page. I used APKTOOL to get the smali and located the code: .line 238 new-instance p5,…
dohanin
  • 11
  • 6
0
votes
1 answer

How can I convert Java code to Jasmin without compiling?

I need to convert some pieces of a class into Jasmin (or if possible, Smali) and mix new codes with disassembled ones together. What I want to know is: Is that possible? and if yes, How? (I have diff patches of java files but don't have source code…
Hadi77
  • 127
  • 8
0
votes
0 answers

Dalvik Verifier Error: tried to get class from non-ref register v14

I am playing around with writting smali and get the following error: W/dalvikvm( 2798): VFY: tried to get class from non-ref register v14 (type=0) W/dalvikvm( 2798): VFY: rejecting opcode 0x6e at 0x001c W/dalvikvm( 2798): VFY: rejected…
joe-jeff
  • 324
  • 1
  • 9
  • 27
0
votes
0 answers

Is it possible to log every http request in an android application? ( By recompiling & Without sniffing )

Important: i do not wish to log using packet logger / proxy / etc - for various reasons I have an application that i want to log every request that goes through it by decompile / recompiling the application invoke-static {v0, v2},…
Ahmed Yusuf
  • 151
  • 3
  • 13
0
votes
1 answer

Requirements for an Android App to be decompiled?

Good evening, I know that this subject is very common on StackOverFlow but my question is a little bit different and i couldn't find any solution on the WHOLE WEB ! ;) SO THIS IS MY QUESTION : "What are the building requirements (on Eclypse) to…
MisterX
  • 49
  • 3
  • 9
0
votes
1 answer

How to add some stuff from java files to smali files?

I'll try to be as clear as possible :) I would like to add an activity (let's call it X not to do confusions) to an app in order to do this when the app start : First of all, start my activity X and show the layout that contains a button. The…
MisterX
  • 49
  • 3
  • 9
0
votes
1 answer

Force Close in alarm while porting

i was trying to port SemcClock.apk by decompiling with apktool (From api 19 to api 18)But experiencing some fc. the alarm sets properly but at the alarm time it force closes. Logcat 09-08 00:37:00.130 E/AndroidRuntime(21010):…
user3813862
  • 97
  • 1
  • 9
0
votes
0 answers

Learning smali and Dalvik and Android Run Time

we all know that google is shifting from Dalvik to ART ( 4.4.2 has even experimental support too) for obvious reason, A very basic question is arising in my mind after i recently started working on mdifying the generated smali files for some…
0
votes
2 answers

Smali Folder Without A Proper Name

I was trying to reverse-engineering Android APK file through the use of the magical apktool. However, I notice that under the smali folder, there are folders without a proper name, i.e: a/a/a/a/a/b.smali and b/b/b/b/b/a.smali I have previously try…
yi2ng2
  • 141
  • 2
  • 5
  • 14
0
votes
1 answer

Uninitialized static final field in disassembly

How can it be? R$styleable.smali : ... # static fields .field public static final CallForwardEditPreference:[I = null .field public static final CallForwardEditPreference_reason:I = 0x1 .field public static final…
basin
  • 3,949
  • 2
  • 27
  • 63
0
votes
0 answers

Baksmali error for android odex file

I downloaded core.odex and framework.odex from my Samsung Galaxy Player, in order to make some changes for the hidden apis, following this webpage: https://devmaze.wordpress.com/2011/01/18/using-com-android-internal-part-2-hacking-around/ Also, I…
gus
  • 355
  • 2
  • 5
  • 19
0
votes
0 answers

Apktool showing exception during reassembly

I Disassembled my APK using apktool. I encrypted all of the constant strings in smali files. After that, I tried to reassemble the app using apktool, but it is showing an exception: Exception in thread "main" brut.androlib.AndrolibException: Could…
vinita
  • 95
  • 1
  • 14
0
votes
1 answer

How do you handle smali jumps (conditions, exceptions, etc...) in big files / methods

Today I was modifying some rom files in a little mod I'm creating. Some of the smali methods I had to modify were huge, around 1200 lines of smali from an anonymous class. Following code with a lot of jumps was a nightmare. I tried to create some…
Notbad
  • 5,936
  • 12
  • 54
  • 100
0
votes
1 answer

Need help changing AndroidManifest.xml in an APK file

I'm trying to make a minor change to AndroidManifest.xml using the APK Multi Tool (apktool). I am able to disassemble and make the change, but when I try to reassemble into a new APK, I get an error: error: Error retrieving parent for item: No…
Sean N.
  • 963
  • 2
  • 10
  • 23
0
votes
1 answer

Declaring a global variable and increasing its value in smali

I am trying to alter an apk file using smali, so that each time it accesses another member of a list a variable gets incremented. I am looking to do two things, first to declare a public static int named val1, and secondly implement this…
ᴘᴀɴᴀʏɪᴏᴛɪs
  • 7,169
  • 9
  • 50
  • 81