Decompile an APK and change some functions - Android Q&A, Help & Troubleshooting

hello guys,
I am new in this forum and I am Form Germany so maybe I have some mistakes in this Text but I hope you will understand.
I have lots of experience in C++ and VB.net.. I startet a few month ago with Java now I learn to do something with Android.
I have to say that I hacked much in c++ because I like it.. So no I asked myself how to do the same thing with Android.
Is it possible to decompile an apk and change some function? For example: A game give you always 50 gems for an exercise. Is it possible to change the function so you will get 100 gems? I would love to learn it because it is very interesting and useful too.
I hope you will help me
Thank you
Btw: I know that my sentences are very simple but I tried to say you what I think in german.

xR0fl said:
hello guys,
I am new in this forum and I am Form Germany so maybe I have some mistakes in this Text but I hope you will understand.
I have lots of experience in C++ and VB.net.. I startet a few month ago with Java now I learn to do something with Android.
I have to say that I hacked much in c++ because I like it.. So no I asked myself how to do the same thing with Android.
Is it possible to decompile an apk and change some function? For example: A game give you always 50 gems for an exercise. Is it possible to change the function so you will get 100 gems? I would love to learn it because it is very interesting and useful too.
I hope you will help me
Thank you
Btw: I know that my sentences are very simple but I tried to say you what I think in german.
Click to expand...
Click to collapse
there are some news I decompiled the apk with apk multi tool..then I put the .dex file into the dex2jar folder I have a.java file..I opened it and I found something what I was looking for. But I have to change the code in the .smali file but how should that work? I cant understand the **** in the smali file...
how could it works?

Related

Building apk´s

Obviously the news of android on the hd2 is spreading quite fast. now i wanted to edit some skins... ive to open some apk´s in /system change some graphics and compile them again. now my problem is how to compile the files to an apk again. i googled quite long and couldnt find an easy to understand howto... anyone has any experience in this? ty in advance.
_EDIT_
figured out. can be closed
ERM WinMO thread!!!!
prob better asking in the Android section mate, maybe the cooking section will have answers also

good place to learn code

Hello this is my first post and hi everyone.
I hope my post fits in here and appropriate.
I am starting to learn android development. Where is a good place to start learning the code itself? I am not talking about installing eclipse, the concepts etc etc.. i passed those... i need a place to look at which explains me line by line, in detail about the code itself. i am a beginner to writing java too. I just know some php as far as programing thats all.
You could try here: http://www.codeproject.com/KB/android/AndroidGuide.aspx and browse around here: http://developer.android.com/guide/index.html .
thanks for reply, i looked at google already. and the code project i saw that one too. but when i tried even the hello world tutorial at google android site yesterday, there was many things i did not know in that code. even in the tutorial it doesnt explain what is what for everything. as i am a beginner i want to learn the details of code.
You could try here: http://www.codinggreenrobots.com/episodes/ .
http://commonsware.com/Android/ is the book i see lots reccomend on IRC for android.
thanks the tutorials are great (they really need to improve video quality though)
You can also try this http://developer.android.com/resources/index.html It has a lot of codes, tutorials, etc that will make you pro within few days of hard work ...
yes i know that one in google android site i already mentioned in my question. but there it doesnt explain to me line by line the code. thats my problem. it assumes I know some coding. well i know close to nothing.

[HELP] Modification Camera.apk in stock rom.

Hi everyone!
As you know the standard chamber well, but in it there is one minus for me. It doesn't make a photo by the search button. Video removes, but doesn't photograph. The help more less understanding people is necessary. I have already a little rummaged and have understood that system code LG in classes.dex differs from other examples интренете. Therefore I do not know, where it is exact and with what to begin editing.
It should like be edited here, but I precisely am not assured:
\tools\dex-camera\com\lge\camera\CameraApp.smali
Because there is a file with the interesting name:
ShutterButton.smali
Let's together try solve this piece.
Sorry for my English. The translator isn't omnipotent
TroyxRUS said:
Hi everyone!
As you know the standard chamber well, but in it there is one minus for me. It doesn't make a photo by the search button. Video removes, but doesn't photograph. The help more less understanding people is necessary. I have already a little rummaged and have understood that system code LG in classes.dex differs from other examples интренете. Therefore I do not know, where it is exact and with what to begin editing.
It should like be edited here, but I precisely am not assured:
\tools\dex-camera\com\lge\camera\CameraApp.smali
Because there is a file with the interesting name:
ShutterButton.smali
Let's together try solve this piece.
Sorry for my English. The translator isn't omnipotent
Click to expand...
Click to collapse
What do you wanna edit/change??
YOu have several .smali decoders, so you can give Java commands to what it does.

[Q] XML Questions for my apk ...

Hi,
I've been trying to make this app mostly for personal use.
I actually am just changing/designing the images to just skin it really.
Feel free to check it out ( http://db.tt/qfFVq7uz ) (see attached as well), but I have a question or two about the xml stuff.
In the settings, I want to change the links that are inside there that go to other site to basically reroute them to our website.
I have tried looking at the xml files, I'm assuming that's where the link gets it's info, but not 100% sure.
Can anyone point me in the right direction on how to change these links. Changing the images and signing the apk is no problem for me so far.
Just a little help needed with the xml stuff. I can see it with an xml reader/editor, but it all looks foreign when I open it. I know html and what should do what, so I'm not completely useless when looking at it!
Thanks so much!
The links for the buttons are not going to be in the XML files. XML is just going to be the visual stuff, anything that does anything is going to be the java files. I know how to edit XML in apps, but I have no clue how to do smali edits, which is what you'd have to do in order to get the results you want.
Thank you. I have no idea how to edit them yet either! Doesn't mean I can't learn. I've decompiled the classes file to get to the smalis, but that's where I've stopped for now.
Sent from my HTC6435LVW using xda app-developers app

[Q] i want to learn how to mod a Rom up to my device, but i can't

i very like learn to mod the apps or a rom with my device, but i can't know which way is easy, i think i or new member like me will aslo like to do this work. Give me to advice. Thanks all you.
keveinee said:
i very like learn to mod the apps or a rom with my device, but i can't know which way is easy, i think i or new member like me will aslo like to do this work. Give me to advice. Thanks all you.
Click to expand...
Click to collapse
There is no easy way. First you have to learn Linux (ROM building) or learn to decompile the apps and look threw thousands of files. Alot of which are xmls and smali code.
^ true
Also depends which device you have
Mtk or snapdragon
zelendel said:
There is no easy way. First you have to learn Linux (ROM building) or learn to decompile the apps and look threw thousands of files. Alot of which are xmls and smali code.
Click to expand...
Click to collapse
i knew it, but i have one question that im using my device with snapdragon chip, but i don't understand that why some app, when i get from the other devices then some app, i can use, but something some app i can't use to my device? But all app from google play, the alls that can use to setup to my device, all things what is the different?
Ok first your chip has very little to do with what apps will or will not work on your device. Those are concidered by many other factors. Like screen res, ram, and in some very rare cases gpu. Others are OEM dependent. Some are dependent in if your rooted or not.
I would advise putting any development ideas on hold while you go back and do alot of research.
zelendel said:
Ok first your chip has very little to do with what apps will or will not work on your device. Those are concidered by many other factors. Like screen res, ram, and in some very rare cases gpu. Others are OEM dependent. Some are dependent in if your rooted or not.
I would advise putting any development ideas on hold while you go back and do alot of research.
Click to expand...
Click to collapse
thanks about your advice!!! First, my device had been rooted (my device is LG) then i can setup the apps from outside, and i see that when the modders decompile or rebuild a app, they also had added lge-res.apk, lge-res.odex, lge-framework.apk with command ' if ' in apktool like that 'apktool if lge-res.apk.....'
why did they do that?
I already have found very things from google search, but i could not find what things i need, cause be able to my english level is not good. im very exciting to do anything about that.
IF you be modder, professional in the modifier work. Can you help me to do that? Again that i thanks about your advice.
keveinee said:
thanks about your advice!!! First, my device had been rooted (my device is LG) then i can setup the apps from outside, and i see that when the modders decompile or rebuild a app, they also had added lge-res.apk, lge-res.odex, lge-framework.apk with command ' if ' in apktool like that 'apktool if lge-res.apk.....'
why did they do that?
I already have found very things from google search, but i could not find what things i need, cause be able to my english level is not good. im very exciting to do anything about that.
IF you be modder, professional in the modifier work. Can you help me to do that? Again that i thanks about your advice.
Click to expand...
Click to collapse
I am not an expert modder but I can try and point you in the right direction, those files are framework files that are required by the LG framework to function correctly, essentially they are extra resources that are required for the app to work correctly based on the changes LG made. Samsung, HTC, Motorola, etc. all have similar files that are required when working on any of there apk's (For example S Note is a Samsung specific app I would first have to input "if" the touchwiz framework for the app to compile and re-compile successfully in order to make any modifications to it). What other resources where you looking for?
shimp208 said:
I am not an expert modder but I can try and point you in the right direction, those files are framework files that are required by the LG framework to function correctly, essentially they are extra resources that are required for the app to work correctly based on the changes LG made. Samsung, HTC, Motorola, etc. all have similar files that are required when working on any of there apk's (For example S Note is a Samsung specific app I would first have to input "if" the touchwiz framework for the app to compile and re-compile successfully in order to make any modifications to it). What other resources where you looking for?
Click to expand...
Click to collapse
thanks your answer, you're so right. I would to be a really modder, i've just been learnt about electrical technology in my school, but i very exciting be become modder. Sure i will find additional to adding my leaked knowledge. Thank alot.

Categories

Resources