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.
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.
Thank you =)
ReplyDeleteHello
ReplyDeleteI 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
@Anonymous,
ReplyDeleteFirst, 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
I did, but they said no :(. its for my daughter.
DeleteHello,
ReplyDeleteSorry 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
@Anonymous,
DeleteFirst, 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.
If you're not going to bother reading my suggestions, then I can't help you.
DeleteYa, 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.
DeleteI 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.
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.
DeleteIt's a lot of work for anyone, even if they know what they're doing. Good luck.
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.
DeleteRight 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!