Decomplle APK - General Questions and Answers

Ok, So I have tried APKTool and APK Manager and I searched on here but I couldn't find any more updated information. So I have to ask, are there any apps out there to help decompile applications.
I have the updated Android SDK, frameworks, Java SDK, Eclipse and all the goodies installed, but I am trying to find a way to decompile an APK to view its code, graphics, and the rest of its guts. I have no interest in re-writing an application by "stealing" someone else's work. I just want to get a understanding how some basic applications run and the brains behind it.
Any help would be much appreciated
-Nick

As far as I understand, upon compilation, chances are you can decompile quite a fair bit of the content. But not all, because some has turned into language that only the processor should recognise.
But again, maybe I'm not updated enough.

Related

How do i develop a C# or C++ app to copy files

Basically what i want to do is what M2DC does.
i want the program to list all the .zip files that are in a certain theme folder and then when you apply the theme, it unzips the file and copies whatever is in that file and copy it to the windows folder.
Please help me.
i know NOTHING about programming.
you dont even need to show me, even if you give me a link that give me the necessary information to help me do so.
btw, i have Visual Studio 2008.
http://msdn.microsoft.com/en-us/windowsmobile/default.aspx
that is microsofts windows mobile developer center you may find some stuff there, but if you have no programing experience you may just want to get the developer of m2dc to help you out getting started
best of luck
forgot to mention i already looked there.
good tutorials. just none of which help me in this situation.
kidnamedAlbert said:
Basically what i want to do is what M2DC does.
i want the program to list all the .zip files that are in a certain theme folder and then when you apply the theme, it unzips the file and copies whatever is in that file and copy it to the windows folder.
Please help me.
i know NOTHING about programming.
you dont even need to show me, even if you give me a link that give me the necessary information to help me do so.
btw, i have Visual Studio 2008.
Click to expand...
Click to collapse
Did you download the free copy of visual studio?
bedaweed said:
Did you download the free copy of visual studio?
Click to expand...
Click to collapse
i have the full version
the only reason he would have asked is that you have to have the full version for windows mobile development....
okay well i do.
but im not a programmer so i need some help.
i started trying to jump in just recently, mostly i've just been skinning before so i am in the same boat
this is the c++ library reference, it may provide some help.
http://msdn.microsoft.com/en-us/library/cscc687y.aspx
the code should be the same on a pc performing the same operation
so such code exmpls should be fine too
i tried to do some searching but it appears that there is not very many beginners tutorials for windows mobile so I will just put a couple of suggestions out there.
If you have never written code before I would recommend starting with C#
I personally use C++ but that is because I started writing C++ while still in high school before C# even existed. From what I can tell C# would be a much less painful experience that learning c++.
If you are not all that interested in learning the ins and outs of programming I would take a took at mortscript because that basically gives you just about everything that you would need and I just checked the documentation they have everything you need, the ability to unzip files and make a simple gui
Whenever looking about learning a new programming language you will do best to look for a "Hello World" example, whenever I learna new language / platform (like i am currently doing with android) I always look for a hello world example so that I can get something simple up and running
I end up getting a lot of information from http://www.codeproject.com/ and http://www.pocketpcdn.com/ sometimes the information is outdated, but it is usually pretty good.
The latest and greatest programming website is stackoverflow.com You can ask a question and Usually you will get an answer to your question in a day or so.
If you are ever interested in looking at some C++ things you can look at the full M2DC source code by downloading the zip file from the google code page (latest source code). In the zip file there is a sln file somewhere, that is the entire solution for the program. You should be able to open that file with you copy of visual studio and build a fully working copy of M2DC
good luck
How to teach programming in one post...
Well I don't know where to start, Developing C# apps for PPC is similar to developing desktop apps. The best way to learn is to see what others have done and copy across the code you need (Lookup Popfly Development ).
I'd try and find the code for this in a Normal WinForms app to do this and then port it across to the PPC App.
I'd do it in C#. The un-zipping maybe complicated, I'm not sure what ZIP code is in the .Net Compact Framework.
Let me know if you need any help, I might even knock some code together for ya.
Ta
Dave
mpenguin14 said:
i tried to do some searching but it appears that there is not very many beginners tutorials for windows mobile so I will just put a couple of suggestions out there.
If you have never written code before I would recommend starting with C#
I personally use C++ but that is because I started writing C++ while still in high school before C# even existed. From what I can tell C# would be a much less painful experience that learning c++.
If you are not all that interested in learning the ins and outs of programming I would take a took at mortscript because that basically gives you just about everything that you would need and I just checked the documentation they have everything you need, the ability to unzip files and make a simple gui
Whenever looking about learning a new programming language you will do best to look for a "Hello World" example, whenever I learna new language / platform (like i am currently doing with android) I always look for a hello world example so that I can get something simple up and running
I end up getting a lot of information from http://www.codeproject.com/ and http://www.pocketpcdn.com/ sometimes the information is outdated, but it is usually pretty good.
The latest and greatest programming website is stackoverflow.com You can ask a question and Usually you will get an answer to your question in a day or so.
If you are ever interested in looking at some C++ things you can look at the full M2DC source code by downloading the zip file from the google code page (latest source code). In the zip file there is a sln file somewhere, that is the entire solution for the program. You should be able to open that file with you copy of visual studio and build a fully working copy of M2DC
good luck
Click to expand...
Click to collapse
actually thats the first thing i tried(using m2dc as a template)
but i was super confused.
i tried taking out unessicary things like softkeys, background, internet, etc. but it didnt want to build. and plus, i probably did it all wrong.
if i cant get a good mortscript to do it, ill look into those websites you recommended me.
im in high school right now and im trying to find classing that will teach me some basic programming.
my school is filled with idiots though.
but im moving to a different city, so maybe they can teach me better than i would here.
thanks again.

Where should I start if I wanted to start developing ROMs?

I have coding experience in C++ and windows programming languages, but I haven't a clue about android. I tried searching google and this forum for a good master thread or even a book, but haven't had much luck.
Can anyone help me out?
jojo54696 said:
I have coding experience in C++ and windows programming languages, but I haven't a clue about android. I tried searching google and this forum for a good master thread or even a book, but haven't had much luck.
Can anyone help me out?
Click to expand...
Click to collapse
same here
Hello I am new to xda and I would like to start developing new custom roms and kernels however I do not know where to start.
Just some background info about me:
I am 15 yrs old
I am have programmed in the following:
c++
visual basic
c#
asm
Java
javascript
html
android 2.2 framework
window phone 7 framework
xml
ios
XNA
I have done computer repair for people along with console repair
Tools I have used:
visual studio
android sdk
eclipse
dreamweaver
dev c++
Photoshop
appmobi xdk
phonegap xda
xcode iphone sdk
and some more
Phone I currently have:
evo 3d
I am a noob to making roms and I do not know how to start if someone could help me or point me into the right direction that would great. Thanks
Click to expand...
Click to collapse
that was my post and still no replys
First of all, learn and become comfortable with Java. If you're not comfortable with Java you're going to have some problems since besides the c libraries/kernel the android source is Java/XML.
Second, you need to decide if you're going to be messing with pre-built ROMs (or RUUs or whatever) or the actual AOSP. Actual AOSP is the actual source code but if you're modding a pre-built ROM you're going to have to also learn how to deal with smali code (which as far as I know is basically machine code [if you know what that is]).. Eris has a pretty good guide-in-progress which I'll find and post here later if I can.
It's a lot of work and a lot of looking and learning and not very clear. I have a lot of respect for the people who do it a lot I'm thinking of dabbling soon...
Edit:
here: http://teambamf.net/showthread.php/2793-Guide-Eris-s-Ultimate-Guide-to-ROM-ing-and-Porting

Question for Development

So is it easy as just editing XML files to Mod? For example media_profiles.xml has a bunch of camera related variables. If I just change those and reboot, is that going to change anything? I know it could screw up my phone, but I am going for tips and tricks on how to mess with Android.
I know how to code, and would like someone to maybe point me to a guide.
Thanks
When I say know how to code. I mean I know xml and SQL....some Java. Was going to see what I could do with Android and maybe help community if I can learn.
Thanks
Depends on what you're trying to do. You can modify the ROM's apk's by deodexing and extracting. Depending on what you want to do, you can either modify whatever xml files or jpegs or whatnot that are inside, or if the task requires it, decompile, mod and recompile the code with smali/baksmali. A program called apk manager is also pretty handy for modifying apks. You can modify certain aspects of the rom with simple shell scripts, like you would on any regular linux installation. And then there's system development that will require you to learn C. If you want to get into that sort of thing, there's a guide on http://developer.android.com that goes over how to grab the android source and compile it. You could try poking around the CM9 code for an example too, even better if you have a device to flash it to.
Actually, there's a pretty decent how-to-get-started guide written by an awesome chap in the Captivate forum:
http://forum.xda-developers.com/showthread.php?t=928955

Android Malware Analysis

Hi folks,
I have just started exploring the prospect of Android Malware Analysis recently. As of now I have mostly done Static Analysis using tools like APKTool, APKManager, Dex2Jar, Jd-GUI. Cheers to people in the forum who have contributed with these tools and cleared the initial questions, that was really helpful.
Recently I was trying to analyze a malware that sends SMS to the C&C individuals, using the above mentioned tools I changed the C&C number which was hardcoded in the code to the port number of an emulator on my system. I was able to se the SMSes being diverted to the emulator.
I wanted to try something at the next level now, I was thinking of loading the apk in eclipse and putting breakpoints in the code so that I can catch the different activities. A scenario would be before the SMS is sent out of the app the code stops executing at my breakpoint so that I can view what is going on. Hoping that this feels similar to debugging an exe in OllyDBG. I hope I got my point right.
Right now I followed a number of tutorials online and imported the apk code onto eclipse. I have been following a tutorial highlighted here
http://kkinder.com/2011/11/27/so-you-want-to-reverse-engineer-an-android-app-apk/
So right now I have .smali code as well as java code ( which I am getting by opening the apk as a jar file in JD GUI and saving from there as mentioned in the tutorial). The problem is I am getting errors in every java file that I import in eclipse.
Is there a better and easier way to debug apk files on eclipse, or rather is there a tool which I can use to do something like adding breakpoints before an app sends out an sms for instance.
Pardon me for the long post but i thought ill provide as much information as possible so that you guys can help.
Thanks in advance :good:
Bump
skeptre said:
Hi folks,
I have just started exploring the prospect of Android Malware Analysis recently. As of now I have mostly done Static Analysis using tools like APKTool, APKManager, Dex2Jar, Jd-GUI. Cheers to people in the forum who have contributed with these tools and cleared the initial questions, that was really helpful.
Recently I was trying to analyze a malware that sends SMS to the C&C individuals, using the above mentioned tools I changed the C&C number which was hardcoded in the code to the port number of an emulator on my system. I was able to se the SMSes being diverted to the emulator.
I wanted to try something at the next level now, I was thinking of loading the apk in eclipse and putting breakpoints in the code so that I can catch the different activities. A scenario would be before the SMS is sent out of the app the code stops executing at my breakpoint so that I can view what is going on. Hoping that this feels similar to debugging an exe in OllyDBG. I hope I got my point right.
Right now I followed a number of tutorials online and imported the apk code onto eclipse. I have been following a tutorial highlighted here
http://kkinder.com/2011/11/27/so-you-want-to-reverse-engineer-an-android-app-apk/
So right now I have .smali code as well as java code ( which I am getting by opening the apk as a jar file in JD GUI and saving from there as mentioned in the tutorial). The problem is I am getting errors in every java file that I import in eclipse.
Is there a better and easier way to debug apk files on eclipse, or rather is there a tool which I can use to do something like adding breakpoints before an app sends out an sms for instance.
Pardon me for the long post but i thought ill provide as much information as possible so that you guys can help.
Thanks in advance :good:
Click to expand...
Click to collapse

Decompiling APKs

Hello Everyone,
I was wondering, in this day and age what tools do I need for decompiling APK Files? I am also assuming that these tools would also serve me well if I just wanted to edit a file in an APK. If not, then what tools do I need for that as well?
I have scoured the net and found pages that gives many different answers. However those pages are from 2012 on back. So it could be old out dated information.
For now I am assuming the minimum Java JDK, Eclipse (or the new program that was highlighted a month back here on XDA but I forget the name of it), Android SDK, and a Java Decompiler (But which one is best??)
Guidance...Anyone...Anyone...Bueller?
After 52 Views no one has any suggestions? If you all think I answered my own question, that's fine but at least if someone has a suggestion on what a good JAVA Decompiler is to use, that would be helpful?
Thanks all.
Neither Eclipse nor the SDK would help you decompile apps.
To get the resources, use Apktool.
To get the Java, use Dex2jar and JDGUI.
Or use a simplified tool like VTS.

Categories

Resources