How can I view the source code of an android app? - Android Software/Hacking General [Developers Only]

This is probably a noob question, but how can you view the coding of an android application? I just had a small test app developed for me and I would like to look at the "guts" of it.
I downloaded the emulator but I haven't been able to figure out how to see my app's code using it. Maybe there is another way that's easier? You know, something akin to the "view page source" tab enabled in many browsers that allows you to see an html page's code?
I tried opening it with TextEdit on my Mac but it says its not readable.
What's an easy way to take a look at/edit the code?
Thanks in advance for your help!

Android-apktool
Android-apktool - A tool for reengineering Android apk files ...
http: / / code.google.com/p/android-apktool
It is a tool for reengineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications; it makes possible to debug smali code step by step. Also it makes working with app easier because of project-like files structure and automation of some repetitive tasks like building apk, etc.
It is NOT intended for piracy and other non-legal uses. It could be used for localizing, adding some features or support for custom platforms and other GOOD purposes. Just try to be fair with authors of an app, that you use and probably like.
Click to expand...
Click to collapse

Google "apk manager"
Sent from my DROIDX using XDA App

Thank guys, however it says it can't be found - see this screencast I recorded: screencast.com/t/kII8UcBqE1RQ
Any ideas?
I feel like it can't be that complicated, but there is almost no info about in on Google...

Related

Possible convert my iPhone-app to Android?

Hi!
Ive just finished an iPhone-application, and Im looking into the possibility to convert it to an android-application.
Let me tell you the basic structure of the app:
- It has a simple drill-down-menu, with three levels of lists. Pressing a list-item will bring you deeper down into the hierarchy, and pressing a back-button will take you up a step.
- At the bottom of the hierarchy is a webview that loads a unique webpage depending on the hierarchical path the user has taken. These web-pages (html and javascript) are all localized on the device so it never goes online.
- The webpages has two main resources: images, and sound (mp3). The sound should be playable from within the webpage. All these resources are also loaded from the device.
- When exiting the app, it should save its location and when relaunched it should reopen that location.
As you can see, its a pretty simple application. Im wondering if anybody could detail a little what I need for this to come alive on Android. Perhaps the application-layout Im after is so generic, even, that there is a template for this?
My background as a programmer is mostly C++ and C#, so Im more at home with the Java-syntax than the awful Objective-C that iPhone uses.
So far Ive installed the development-environment, and have tried out the basic "Hello Android"-sample. Thats about it for the moment.
porting your iphone add to android
hi there,
i'm a android programmer and did many games already. you can see my games at:
not sure you still need help to port your iphone app to android. may be you can send me the source code. i can do it for you. very easy for me.
Tony Chan
[email protected]
Android uses java syntax and java libraries
so if you like java, then you would probably like android
layouts are done in XML
chingy1788 said:
Android uses java syntax and java libraries
so if you like java, then you would probably like android
layouts are done in XML
Click to expand...
Click to collapse
hehe well said
I don't think anybody can tell you what you need to do. Just start by reading through all of this: http://developer.android.com/guide/topics/fundamentals.html and you should be able to handle this.
Note: your application appears to be trivial.
One thing that I suggest is that you forget about locally-stored web pages and just rewrite those pages in Android/Java. The reason I suggest this is that unlike apple, you can't make any assumptions about what browser the user has installed (if any), or what rendering engine their browser happens to have, or javascript engine, etc. There are AT LEAST three different rendering engines in use on Android, including khtml, gecko, and presto. There are at LEAST two different JAVASCRIPT engines, including SquirrelFish and V8, and soon you will be able to add SpiderMonkey to this list (when Firefox launches). And no, you can't force your application to call on a particular browser since this would violate the modularity designed into the platform.
DANNEMAN101 said:
Hi!
Ive just finished an iPhone-application, and Im looking into the possibility to convert it to an android-application.
Let me tell you the basic structure of the app:
- It has a simple drill-down-menu, with three levels of lists. Pressing a list-item will bring you deeper down into the hierarchy, and pressing a back-button will take you up a step.
- At the bottom of the hierarchy is a webview that loads a unique webpage depending on the hierarchical path the user has taken. These web-pages (html and javascript) are all localized on the device so it never goes online.
- The webpages has two main resources: images, and sound (mp3). The sound should be playable from within the webpage. All these resources are also loaded from the device.
- When exiting the app, it should save its location and when relaunched it should reopen that location.
As you can see, its a pretty simple application. Im wondering if anybody could detail a little what I need for this to come alive on Android. Perhaps the application-layout Im after is so generic, even, that there is a template for this?
My background as a programmer is mostly C++ and C#, so Im more at home with the Java-syntax than the awful Objective-C that iPhone uses.
So far Ive installed the development-environment, and have tried out the basic "Hello Android"-sample. Thats about it for the moment.
Click to expand...
Click to collapse
look at the NDK
Freedomcaller said:
look at the NDK
Click to expand...
Click to collapse
The NDK is *NOT APPLICABLE*.
Why don't you create a converter from iPhone to Android? There are few Italian app.. only this is better than Android for Italian user.. but I love Android!
I have an app that has been created for android, and I need help creating it for the iphone. I'll share the source code if someone will create the app for me please.
DANNEMAN101 said:
Hi!
Ive just finished an iPhone-application, and Im looking into the possibility to convert it to an android-application.
Let me tell you the basic structure of the app:
- It has a simple drill-down-menu, with three levels of lists. Pressing a list-item will bring you deeper down into the hierarchy, and pressing a back-button will take you up a step.
- At the bottom of the hierarchy is a webview that loads a unique webpage depending on the hierarchical path the user has taken. These web-pages (html and javascript) are all localized on the device so it never goes online.
- The webpages has two main resources: images, and sound (mp3). The sound should be playable from within the webpage. All these resources are also loaded from the device.
- When exiting the app, it should save its location and when relaunched it should reopen that location.
As you can see, its a pretty simple application. Im wondering if anybody could detail a little what I need for this to come alive on Android. Perhaps the application-layout Im after is so generic, even, that there is a template for this?
My background as a programmer is mostly C++ and C#, so Im more at home with the Java-syntax than the awful Objective-C that iPhone uses.
So far Ive installed the development-environment, and have tried out the basic "Hello Android"-sample. Thats about it for the moment.
Click to expand...
Click to collapse
Is it possible to post this in the Q&A and not development section?
sparksco said:
Is it possible to post this in the Q&A and not development section?
Click to expand...
Click to collapse
This is from the first half of 2009, I highly doubt that they care where it should be posted (now).
Converting iPhone app to Android will be greate.
I would like to have All My Recipes iphone app in my Galaxy Tab
It was be great if somebody can port the secret of mana game from iphone to android ! =)

[app] [Think Tank] omnipatcher - patching apps the easy way

This thread is for discussion on how to implement omnipatcher for android.
Project site => http://android-omnipatcher.googlecode.com
Project owner is brut.all
An Android app that can automatically download and apply patches/fixes for installed apps. It makes possible to add features to closed source apps without distributing proprietary code.
Planned features (in more or less chronological order):
* apks patching
o res files adding, deleting, replacing - especially useful for themes designers
o applying smali patches
o bsdiff patching
o xml assets patching
o resources.arsc patching
* signing and zipaligning apks after patching
* automatic app version matching
* automatic downloading to SD card some dependencies like smali, baksmali, zipalign, etc.
* patching system apps
o with root permissions
o without root - by changing package name and installing it beside original app
* possibility to generate update.zip file to reinstall some critical apps
* online repository of users fixes
* tool that simplify or maybe fully automate generating of patches
[Reserved for future use]
[Reserved for future use]
Brut.all said:
I though Java has native zip support?
Click to expand...
Click to collapse
Ok, Metamorph is run from console, so it hasn't got access to Java's zip lib. We wouldn't have this problem.
Brut.all said:
Big, but not huge And so far it was evolving very rapidly
Beside of that it will be iterating project. First we need patcher with some of basic features. Minimalistic UI and configuration, libs and patches will be downloaded manually to SD. Then we will add some automation, new features and so on.
Click to expand...
Click to collapse
Yes, I think an iterative project is the best for this
Brut.all said:
I did it already, this was really esay And file is significantly smaller, because smali/baksmali are built with Maven and hence have doubled deps.
I don't understand... You mean (bak)smaling only needed files? It is possible, I checked it
Click to expand...
Click to collapse
I don't know how exactly baksmali work but I have some idea in mind that I have to check... will tell after reasearching some stuff ;-)
Brut.all said:
I though Java has native zip support?
Click to expand...
Click to collapse
Yes, java has built in support (at least on desktop)
It's very interesting!
I made majority of work needed to release the first version of Omnipatcher with basic functionality and then I took to all Android stuff: UI, etc. 2 days passed and I'm almost at the starting point :-/ I got -10 to Android enthusiasm :-/
Android Layouting is not always that easy :-/
I don't have too much time now because I have to finish my pre bachelor thesis (have final design review on Wednesday) but...
How can I help with it?
Hey -- looking this over, as a non-developer/programmer; I am curious: is there any chance that this program could work to apply patches to *.img files? (Specifically, I'm thinking about hot-swapping the kernel.)
IConrad01 said:
Hey -- looking this over, as a non-developer/programmer; I am curious: is there any chance that this program could work to apply patches to *.img files? (Specifically, I'm thinking about hot-swapping the kernel.)
Click to expand...
Click to collapse
Nope, because the intent of this app is decompiling apk's, patch it and compiling again to make the patching app itself legal because no proprietary content will be distributed... the user has to provide the proprietary app to the patching util.
What you want to do could be easily done with just a binary patcher like bsdiff.
rac2030 said:
Android Layouting is not always that easy :-/
I don't have too much time now because I have to finish my pre bachelor thesis (have final design review on Wednesday) but...
How can I help with it?
Click to expand...
Click to collapse
@brut.all If you want, we could open a wave for Brainstorming on the app and I can help you with the Android app stuff your having problems with?
I'm working on it alone because I write much faster in languages like Java, than in English ;-)
I want to get first basic (root only, sorry), but working version, clean up code, release it, update googlecode site a bit (TODOs in form of issues, some usage docs, etc.) and then I will open to community development. In a few days, I think
Nice, MetaMorph pretty much does alot of this, at least in regards to apk and jar patching. MetaMorph is in the market now. the only problem we have had so far is that market apps require them to be resigned when you edit their contents, so that is problematic.
Yep, someone told me about MetaMorph already, so I checked it out, cause I prefer team work than many parallel projects on the same topic.
However I concluded that MetaMorh has different assumptions: it was created as a theme designers tool mainly, so it emphasizes speed and simplicity.
I want to create all-in-one framework with many methods of patching (simple file replacement, bsdiff, smali, XML patching) and installation (in-place replacement, uninstall & install by package manager, generating update.zip), apk version control and possibility to distribute patches without containing proprietary stuff in them. And hence I have chosen Java in contrast to MetaMorph, which is a shell script.
And you have surprised me by info that MM is in the market. You wrote about MM app here, but you didn't write that you finished it... Is it just a front-end to shell script?
too bad this thread's dead

Learning about Android as an OS

I hope this isn't a stupid question. But I couldn't find any real info regarding this. And after reading the Mysteries of Science thread it seemed to me, there really isn't much information regarding such things. So:
I noticed that for almost all Linux based OS you can find in-depth descriptions on how the OS works on a basic level. For example where specific settings are stored.
The guides at android.com deal with app development, but don't specify how you use the OS as a root user. For example, if I want to change WLAN settings, there must be a way to do that without using the GUI or by using special classes but by editing a config file. Or where does Android store the startup settings, i.e. which apps to start at boot time or at specific system events. Or where do apps register as default app for viewing certain filetypes. There is a description how to code it, but not how Android stores that information and how it can be edited/viewed manually.
Since it's linux based I guess there are plain text config files for all those things. But where...? Was such information ever released by Google?
bur2000 said:
For example, if I want to change WLAN settings, there must be a way to do that without using the GUI or by using special classes but by editing a config file.
Click to expand...
Click to collapse
You can change network interface with 'ifconfig' command.
You can get ifconfig command by installing busybox.
There are commands that can be used, but this is still a bit liek try&error. So it seems there is no full documentation on how Android works?
Has Google ever addressed this, do they plan to release such documentation?

[Q] how execute/apply xml file?

Hello,
I have a lot of problems with omnia 7 due to app profile network of samsung haven´t got the profile of my operator. I can set it thanks to a post of here, but I think that it is a bit difficult and you need the computer to set it. As I have studied some of programming c#, I decided to make an app that set mms and internet. I have already done the screen and I´ve get to make that app create the file xml with the code in order to set mms and internet, but I haven´t found information about how execute/apply the file xml with the app. Where can I find about it?
PD: Sorry, I do not control English very well
Hi,
I guess it's a topic a bit complex, but can not someone help me with this?
You use an OEM COM interface, accessed from C# by using Microsoft.Phone.InteropServices.ComBridge. One easy way to see how this is done is to look at the source of an app that does it. If you can't get the source to DiagProvXML, you could always just decompile it (decompiling .NET code is pretty easy and there are several tools that can do it). There are several other apps that also use provxml; one or more of them may offer source access.
Hi,
Thank for your help and I can select the services that I have load, but I have a small problem that I hadn't taken into account. I know c# but my apps are a lot of more easy that diagprovxml, and I can´t find the part of program that I´m interested. I use "JustDecompile" to decompile the app. Could you tell me what class(or classes) is (are) what I'm looking for?
Thank you very much again
Hmm... it's not linked in my SIG because it's out-o-date, but you could try using Search to find my old DeployProvXml app. It includes a pretty straightforward example of using provxml.
Essentially, you need the following things:
The interopservices DLL (allows you to use the ComBridge class).
The OEM DLLs (DMXMLCOM.dll and such).
COM class and interface definitions for them in C# (this is the stuff with the [ComImport] attributes and the GUIDs).
ID_CAP_INTEROPSERVICES in your WMAppManifest.
WPInteropManifest.xml file in your project.
Use the ComBridge to register the COM interfaces, then create an instance of the COM class(es), cast to the appropriate interface type(s), and use a variable of the interface type like any other .NET object.
You can read a bit more about COM and native code in Heathcliff74's guide. It's aimed at making your own native libraries, so skip all the stuff about creating your own COM classes and writing native code. http://forum.xda-developers.com/showthread.php?t=1299134
Hi again, Does the method WP7RootToolsSDK.Environment.ProcessConfigXml allow to set the parameters that have a tipical xml file?
thank you again
I'm not sure what you mean by "set the parameters" but the Root Tools SDK does in fact allow you to consume ProvXML files now (I think it even supports the query provXML and returns the output, though I haven't tried).

new to application development I need something explained

I have been working on an app that I've been coding in HTML 5 CSS and JavaScript.. here is a website that I went to for software that I I'm able to use to compile my HTML 5 Javascript and CSS files. the software from this website just packages it all up into a single apk file for me to install. the problem is that I get a different icon in the file name that I don't want. what exactly does this program do. all I'm trying to figure out is where the strings come from for the app title and where the iPhone comes from from the app. and what exactly does it mean when the application is being signed and how can I change this signature.
the software I'm talking about comes from a website who is donating domain name is mrchay which you can Google search

Categories

Resources