Sunday, September 26, 2010

smali syntax highlighting for ultraedit

syntax highlighting is handy dandy if you are staring at code for more than 10 seconds. you can install this into ultraedit by following the steps here:
http://www.ultraedit.com/downloads/extras.html


get a copy here:
smali.uew

this file is included and kept up to date in lesson 0 of the way of the android cracker series.

10 comments :

  1. Hello
    I want to try to get an app to use the front camera instead of the back camera. I decompiled to smali, I think I found the code for the camera, but not sure. Dont know what next.
    Would you be able to help me?
    Thank you

    ReplyDelete
  2. @Anonymous,
    First, do you know how to do it in Java? Do you know how to program it to begin with? Once you know that, all you have to do is translate that into Smali, and integrate into what is already there. There are many tutorials and lots of documentation for how to do the first. The second part, translating to smali, I can totally help with. One easy way is to write an android app that does what you want, then baksmali the apk and borrow the smali from there, and add to this target app.

    The easiest way to get what you want may be to ask the original dev to add the feature :D

    ReplyDelete
    Replies
    1. I did, but they said no :(. its for my daughter.

      Delete
  3. Hello,
    Sorry my computer didnt show your complete response. What I did is to take the .apk and decompile it and then I isolated the image capture .method . I just dont know how to get it to use the front camera. I am not looking to do anything else other than get the app to work on my nexus tablet. The developer said they dont want to make the app front camera compatible.
    I have programed assembly before, not really Java, mostly C/C++. Can you help? this is the camera call line i think:
    const-string v4, "android.media.action.IMAGE_CAPTURE"
    there is more, it invokes other functions in the file.
    what can I do to get it to invoke front camera? thank you

    ReplyDelete
    Replies
    1. @Anonymous,
      First, do you know how to do it in Java? Do you know how to program it to begin with? Once you know that, all you have to do is translate that into Smali, and integrate into what is already there. There are many tutorials and lots of documentation for how to do the first. The second part, translating to smali, I can totally help with. One easy way is to write an android app that does what you want, then baksmali the apk and borrow the smali from there, and add to this target app.

      Delete
    2. If you're not going to bother reading my suggestions, then I can't help you.

      Delete
    3. Ya, I dont know how to do that in Java, I have read that solution, I was hoping for the code in smali. I dont know how to make an app, but I guess I have no choice but to try that then.
      I found some websites with how to get the front camera, but again, I am not a Java person and never made an app.
      Thank you for your help.

      Delete
    4. Writing the code in smali is about 10 times harder than writing it in java. Look up tutorials online for how to do it, because I don't know off hand, I'm not an Android developer. If this shit were easy, everyone would do it. It'll take you a while to write a test app that does what you want, then you just convert that to smali and shovel in the bits you need into this app you want to modify.

      It's a lot of work for anyone, even if they know what they're doing. Good luck.

      Delete
    5. Yeah, I figured that out :s. and appreciate app development. Anyhow, I found someone who already made an app to access the camera and take a pic. I looked at its smali and its the same camera capture line. So I dont know whats going on.
      Right now I am looking into my tablet, it has only a front camera and seems that the camera cant be accessed by other apps, except the likes of Skype. so that might be an issue for me to look into. maybe its that?
      Thank you for your responses!

      Delete

Do NOT post about or link to specific apps!