Analyzing a memory leak in native code - Android Software/Hacking General [Developers Only]

Hello folks,
I have written a piece of native code (totally C, no Java at all) that runs on my rooted device, and I need to analyze a memory leak in it.
I couldn't get any solution from the web to actually work.
Not Valgrind, not the Visual Studio profiler, not AdressSanitizer, not DDMS, didn't even tried other weird solutions, couldn't find any working libc_malloc_debug_leak.so.
How come such a basic operation becomes so hard to accomplish...?
Am I missing something?
I'll be glad to hear any suggestions and advises
Thanks!

Related

Android?

Hi, i was wondering if anyone had tried the android platform yet. I was thinking about trying it out just to see how it works. Anyone have any information on it?
I haven't tried it but have found this article on it.
Its interesting to me as it seems to be a genuinely open system.
I have begun studying how to develop Java ME Midlet applications, and have just discovered some of the limitations in creating your own programs as they are required to undergo an expensive certification process if they access certain functions of the phone.

tweaking g1

I am an amateur programmer looking for a painless way to tweak a few programs on the g1. Is there an easy way to modify code in an existing application, and then run the modified app from memory card? What's the fastest way to get started?
I would like to avoid freeing the system if possible because I am awaiting the RC31 OTA push, and don't have enough faith in my own hacking to reverse the process. So ideally, I'd like to modify the apk from my computer, and run it from the sandisk.
The feasability depends on what you define "tweaks" as and whether the source of the app is available. If you want to change the functionality of an app, without the source code it might be pretty difficult, as you'll have to figure out a way to decompile the .dex file.
really, I want to write my own application. But my math skills are much better than my programming skills. There is an app on the android market that does what I want to do, but I believe I can do it more efficiently with a good algorithm. I just don't know what all the handles are for the g1, like how to access the accelerometer readout. Again, huge amateur, but I know the basics of java and C++. If I can see the code, I'll be able to go from there...
Math skills are programming skills That's why you can't get a CS degree without taking atleast one algorithms course!
Anyway, If you have some basic experience working with Java then you are like 75% of the way there. Android SDK is pretty much built entirely around Java with added interprocess communication special sauce. Download the sdk and check out the Hello World and Sample Projects.
If you just wanted to plug a better method into a poorly designed one in an existing program, i'm afraid I can't be of help. Googling "dalvik dx decompile" resulted in this. But I don't think an "assembly-like" format is very useful for Java programmers

Intercepting System calls in windows mobile

Hi
I am interested in developing a tool that can intercept all the system calls from all/as many/ processes as possible. This tool just (as I wish) gets a notification from kernel that a process pid has initiated a system call X. I came across this article
http://madoc.bib.uni-mannheim.de/madoc/volltexte/2008/1933/pdf/TR_2008_003.pdf
I got pretty confused after reading this. Is there a standard way/code available that can help me with this? I am new to programming on phones. Any help would be greatly appreciated.
Thnx
It's a decent article, but the technique has been around for a while, so you should have been able to find a few examples by searching for "WinCE system calls".
There's a sourceforge project that aims at implementing a call tracer for WinCE:
http://sourceforge.net/projects/strace-wince
And there's a tool readily available capable of this:
http://www.forwardlab.com/freestuff.htm
If you are not very familiar with mobile development, maybe it's not the right time to get to API interception level yet? Microsoft's VS debugger should be able to cover the basis for a beginner...

[Q] [Attn: Devs]Gnash Cross Compilation for Android Chrome Lite

I have a few questions for the devs here. Please forgive any assumptions that may be incorrect. I've tried to do as much research as I can online but I think I need a more experienced Android dev to help me solidify my direction. Thank you in advance for your time.
That being said, I have some experience with a device known as the GP2X. It uses ARM architecture and, in the past, I have been able to cross compile for it. Notably the Stella VCS 2600 emulator. I do have some open source experience, but I've never had any formal training in programming. Seeing that Android uses the DVM to sandbox program code, I'm still a little iffy on what I can and can't get away with programatically.
First off, I've read that the Android Chrome Lite browser allows plugins/extensions through the NPAPI. I'm assuming this is the stock web browser. It's not clear to me at the moment what the default browser is or how it works. It appears that Gnash has a C++ NPAPI plugin that may need to be cross compiled and I'm hoping to get away with as little Java coding as possible.
My main questions are:
1. Does the stock browser allow NPAPI plugins?
2. If question 1 is true, does the plugin have to be compiled in ARM architecture? Are there any caveats to this?
3. From what I've been able to gather, Chrome Lite looks in the following location for Plugins:
Code:
/data/data/com.android.browser/app_plugins
Is this correct?
4. If a plugin is dropped in the correct folder, and assuming that the mime types are associated, will the Android browser recognize/utilize it? In which case, I'm sure there would be an API call that would cause it to rescan like Firefox or Opera would.
5. If cross compilation is necessary, is it better to use OpenGL, AGG, or Cairo as far as wide Android compatibility? Again, I don't know what's native or widely available in Android. I guess I'm looking for Best Practices.
I just wanted some feedback from someone knowledgeable before I go through the trouble of setting up a toolchain to handle this. Seeing that the community has been looking for a Flash player, I wanted to see if Gnash had any practical value on Android.
Thank you in advance for your time and again, please pardon my ignorance. I have holes in my knowledge and I want to get a little closer to understanding this particular subject before investing my time in development.
References:
NPAPI
http://en.wikipedia.org/wiki/NPAPI
Android Browser Plugin Path (I had to extrapolate from the batch file)
http://wiki.eclipse.org/Android_Selector_1.1
Gnash NPAPI Documentation
http://www.gnu.org/software/gnash/manual/gnashref.html#plugincppapi

cloning windows mobile OS or program

I'll make this as quick as possible, any help would be greatly appreciated. I have been searching for weeks for a solution. I have even looked on the forums here and haven't found anything addressing this. I need to either clone the operating system with included programs from my work phone, or I need to clone a particular program that we use in the field (which is ultimately the object), and i need to either run it as a Virtual Machine on a netbook, or I need to run it on a tablet. I'm not a noob when it comes to computers, but I am when it comes to working with cell phones since computers have mostly been my focus. I'm happy to make the transition though. Any of the programs I would need or tutorials anyone knows of would be fan frickin tastic. I searched youtube also and nothing on there. I'm serious about this, you reply, I'll reply back. Thanks ahead of time.

Categories

Resources