Android kernel mod - getting more data about an executing applicaiton - Android Q&A, Help & Troubleshooting

Hi folks,
I would like to get more data about the application life-cycle as it executes on a device. This would mean getting data about the methods executed, api calls used, url's opened, files saved/deleted etc. I have tried a number of tools but always felt more data can be obtained. Kernel modification seems like a good approach towards this goal - would like some guidance on this topic.
What are some things I should follow to achieve this goal ? If there is something already that I can use then please point me in the right direction.
Would love to hear from the folks here on this topic.
I really appreciate any help towards this.

Related

HowTo ... get answers and contribute

How to get answers efficiently and be helpful at the same time
I have been eagerly following this project for a while now, and gleefully confusing retailers when they see android pop up on my WM phone. There are several people who put in an exceptional amount of effort into this project, and unfortunately there seem to have been an influx of users lately who seem to be fairly effective at frustrating them. Often, instead of seeking answers already clearly identified within this forum and learning from the discussions, they step into an otherwise productive thread and ask to be brought up to speed, or to have their problems solved for them. Usually these individuals are well-intentioned, but are lacking the knowledge both of where to start learning, as well as how to be helpful. I hope this post is helpful in recruiting the many well-meaning new users into becoming active and helpful contributors in their own way, while answering their own questions and solving their own problems at the same time.
I think it's reasonable to assume everyone should do Step 1, and it would be nice if most people would also do Step 2. Step 3 is for individuals with some programming skills and a willing to learn the technological challenges at hand.
Step 1: The Basics, and asking questions well
Many, if not most of us here on this forum are driven here by curiosity, and kept by the challenges faced in this project. When we first start, there often is a very low level of relevant knowledge and understanding.
The very best place to start is the FAQ. It will help orient you to XDAndroid, and will answer many of your questions - so it's a great place to return to and do some reading.
http://xdandroid.com/wiki/Faq​
Next, fortunately, we now have an excellent post by ryannathans on an introduction to Android – SD Card. If you haven’t yet read it, please do.
http://forum.xda-developers.com/showthread.php?t=980079​
You may also be interested in browsing and referring to the XDAndroid wiki:
http://xdandroid.com/wiki/Main_Page​
Finally, a useful thread to read the first few posts, search with your questions, and follow the most recent few pages is the main FRX06 Page. (This will probably change to a new thread when FRX07 is released)
http://forum.xda-developers.com/showthread.php?t=951962​
Once you’ve understood the key elements to getting your Rhodium (aka Touch Pro 2, Tilt 2,e tc) running Android, and know which model phone you have, you should probably install the suggested current base system (FRX06 at the time of this writing). Use it, learn about what works and what doesn’t, and do as much reading about your questions as you can. Almost everything has already been discussed on either XDA Developers or PPC Geeks. On XDA Forums, go to the main rhodium android page (http://forum.xda-developers.com/forumdisplay.php?f=589), and click the 'search this forum' button in the top right.
If you want to look a bit broader, or use a more familiar search engine, use Google, and if you need to, constrain the searches to the given sites (substituting “ThisIsMyQuestion” with your question).
GOOGLE site:http://forum.xda-developers.com/ ThisIsMyQuestion
GOOGLE site:http://forum.ppcgeeks.com/ ThisIsMyQuestion​
Look first, and take the time to read. Even if you don’t find the specific answer (unlikely), you will learn a lot. I found it incredibly helpful to make an account with XDA developers so that I could identify and subscribe to the various important threads and be able to see when there have been new posts on issues I was interested in.
Now, if you still have a question, then find the appropriate thread and ask it. To pose a useful question, you need to be clear, concise, and specific. (Being polite always helps, as well as being patient)
Try to ask your question as simply as possible (ie, how do I enable/do ThisCoolThing on my Rhod 400? I am running FRX06, with _____ modifications on (SD Card / NAND / etc). I’m on Telus/Verizon/etc (CDMA / GSM). It is often a good idea to state what windows is running on your phone (ie, EnergyRom WM6.5, or stock 6.1, etc...), as some of its drivers/settings are occasionally relevant. If there seem to be some situational factor that seems important to you, briefly mention it (ie, everything worked until I did xxxx) If you have gone ahead and done something silly like overclocking your phone, state it, as it may well be a complicating factor. (hint: Don’t. ... At least not in Windows Mobile).
Secondly, try to make sure you get to trying everything suggested to you. Unfortunately, good advice is often overlooked simply because the first item didn’t fix the problem, or the solution seemed too time consuming. You may be asked to delete your data file – don’t worry, you can back it up, and if it doesn’t work, simply replace the new file with your old one. Installing a backup application such as Titanium Explorer (from marketplace) helps backup your apps and their data, speeding their re-installation (and saving you from having to re-download them).
Remember that by participating in this project, by installing new, testing versions, you are not receiving a polished or supported product. You are contributing to a community, and your few hours it takes will pale in contrast to the hours and contributions others have put in. If you do put in this time, as well as do some background reading on the issues and post your findings/solutions, you very likely will help advance the general understanding of the problems at hand.
Step 2: Provide Log Files
This may help you in getting an answer, but to be even more helpful, if your question or problem is new, or is something that hasn’t been solved yet, then having logs will help those answering your question to not fumble blindly. It may even help provide a better build for the next release.
How to get the log files:
Install ADB and DroidExplorer:
http://forum.xda-developers.com/showthread.php?t=1099481​
From your command prompt, after the phone is connected, grab your logs by typing the following:
adb shell dmesg > dmesg.txt
adb logcat -b radio -v time > radiolog.txt
adb logcat -v time > logcat.txt​
You can learn more about logcat, if you're interested, at:
http://developer.android.com/guide/developing/tools/logcat.html
It is then a good idea to edit these logs to remove personal information (ie, your phone number from radiolog.txt (search for it in notepad/wordpad - it's 10 digits, no dashes, in my logs; your email address may appear in the logcat.txt, although I haven't found mine there). To simplify matters, I just do a search & replace for my phone number and email address, replacing them with XXXXXXXXXX.
If you're interested in catching an error in real time, you can omit the storing to file option, and the information will be displayed on the screen, continuing to report until you terminate the process with ^C (control + C)
If your computer isn’t able to find adb.exe, then you may have to either set the environment path to where you installed the android sdk (or where droidexplorer installed it), or simply type in the full path to execute the command
ie: C:\android-sdk-windows\adb shell dmesg > dmesg.txt​
Once you have these files, upload them along with your question (note, the files will be created in the location from which you executed the adb command), and an answer may be found much sooner. If you want to look particularly good, read the logs first, and find the areas that you think are involved. Cut and paste the relevant sections into the body of your question, and say ‘I think the problem is this...’, and you may get an answer even sooner.
Step 3: Cutting edge / bleeding edge
If you’re really eager to help, or are simply really frustrated with a problem and have some coding ability, then this step is for you. First off, know that when you start to play with fire, you may cause problems with your phone, so make sure you keep everything backed up. Titanium Explorer is a common choice to backup your applications and their data onto the SD card, and it may be a good idea to backup the important contents of the SD card too, as they have been known to fail on their own.
If these instructions don’t make sense to you, then think twice if you’re wanting to become involved at this level. This will require some coding ability, and if you want to build it yourself, you`ll need a 64-bit recent linux installation with >1 GB of memory free.
The source code for XDAndroid is located at:
http://gitorious.org/xdandroid (git://gitorious.org/xdandroid/manifest.git)​
And there’s several branches from there that contain the useful areas of development. For example, jbruneaux is working on the new audio routing (and thus you can see/follow/contribute to better solutions there), and Howard Chu is working on a variety of hardware issues.
Useful reading can be found at the XDAndroid Wiki Page:
Getting the Source: http://xdandroid.com/wiki/Getting_the_Source
Configuring the Build: http://xdandroid.com/wiki/Build_Configuration
Building and Packaging: http://xdandroid.com/wiki/Building_and_Packaging​
If you’re eager to help out with coding, spend some time getting familiar with android first, then ask around or pick something that grabs your interest and get working on it. The IRC is a great place to chat with some of the other developers/contributors, and a few others communicate directly with each other about specific challenges.
irc://chat.freenode.net/xdandroid​
The project owner of XDAndroid is Brian Stine, who’s blog often helps give some perspective on what is happening behind the scenes (http://southcape.org/).
Please let me know if there’s any changes you’d suggest to this. My goal is to round out the other guides that have been created with the goal of facilitating clearer communication and increased participation in development.
Great guide!
Couple of suggestions.
It's adb logcat -b radio, not adb shell logcat -b radio. Also, add -v time. Also add regular adb logcat, again with -v time. Also might want to mention the "things to scrub" from these logs - email addresses for example will show up in regular logcats, a whole slew of personal things show up in radio logcats. Seems like a good place to make people aware of that
That's all I have for right now, bravo!
Thanks Arrrghhh,
I had been using adb shell logcat until now, and hadn't noticed I could just use adb logcat - thanks for pointing that out. The -v time is an amazing tag - I wish I had been using that up until now, it's great to isolate when a problem happened. Too bad that's not an option for the dmesg. I've added your suggestions to the post - though I can't seem to find my email address in my current logs.
Cheers.
Great Post!
Hopefully n00bies shall read this
I think "READ THE FAQ" should be included somewhere in Step 1.
Thanks rpierce99, you're right it should be right at the top - and now is.

[Q] Bluetooth Networking Project

Hello,
I was wondering if someone could point me in the right direction for a Bluetooth Networking Project I'd like to do.
The ultimate goal:
- Having some sort of bluetooth app with root privileges, which, when walking past someone, would allow some sort of passive communication without the users authorisation nor involvement.
This is similar to the idea on the 3DS called "SpotPass":
(I would have posted the link, but I'm not allowed to)
I do not have much experience on the subject, but suppose it would involve having root permissions to access the bluetooth module, being able to broadcast a message (to other users of this application).
I'm not sure if this might involve creating a completely different driver.
The reason is actually to create a short-distanced-passive-communication application useful for getting short messages or announcements across, with the low power consumption of bluetooth (vs wifi).
If this kind of communication if not possible, could someone please explain why, or at least give me some sort of link with the reason.
Thanks in advance

[Q] Need Help with Android App Design Refinement

Hi Guys,
I am planning to make an Android App which will act as a virtual Meditation hall, where many others would have connected to, and this App, should show me the count of the number of people that are currently logged in, it must also show me, the current Idea or Notion or say, a goal, for which the people are meditating, Now, just to clarify, in case you are wondering, In Yoga, there is a practice of Group meditation with a unified thought or unified mental state, so, I am planning to emulate this real life activity, for the Yogic practitioners, also.
Anyways, here is how i imagined it would be,
Module 1: Connect to the server
Module 2: log in
Module 3: Suspension, where the user simply keeps the app on and it will update the status of the hall, i.e. whether any new members have joined in or any has left.
Module 4: exit
Now, I must say, that the only background i have is of Flash, and I am not sure how this would help me out, but I just want to know
1) how to implement modules 1,2,3,4. i.e what is the programming elements i should use, no need for detailed explanation, just to point me out to what to study, because i am just about to start learning android programming and i need to have this app up and running ASAP.
If possible, i would also like to hear how you would segment this app idea into your own modules, if you have any advice on it.
P.S Please bear with me if i had commited any of the noobish mistakes of asking in a wrong category or asking something redundant as I am new to this and It was not intentional.
Thank you

[Q] Is android right for my project?

Hi folks,
I have had this idea in my mind for a couple of years now and would like to get on with it and stop dreaming about it and just jump in and do it already!
My experience during the past 20 years has been working as a programmer on MSSQL and VB and VB.net with good working knowledge of C, HTML5, Javascript, VB, VC, Access, MSSQL, MySQL, PHP, CSS, some Java, etc...
I don't mind learning new skills and actually looking forward to getting started, but I need to know that I am not barking up the wrong tree.
I intend to make this an open source project and not as a commercial product.
My dream is to make my phone, my voice-driven computer. Where the phone might not have enough resources, I need to use my main computer as top tier and act as server.
I know ubuntu touch might be a contender but it lacks many drivers for GPS, Propriety drivers, etc...
Let me tell you about my idea first as a high level plan due to my ignorance of the details of this implementation.
I want to make my phone (Nexus 4) be able to listen to my commands via a Bluetooth headset (Through a speech recognition engine), and tell me in in natural speech, things that I need to know or care about. For example: "You have a new email from David. Do you want me to read it or display it?" Sort of like what is now a movie called "Her" without the science fiction and the lovey dovey story part .
I want to write an internet agent that would search the net (from a list of sites) for what I am interested (through an AI program like freehal.net), and keep them for display in the order of relevance when I query it.
I also need to take over the telephony hardware when needed. For example: A call comes in, I want to be able to look-up their number in my database of contacts, if an entry is found, to tell me "Sam is calling. Do you want to answer it?"
I also want to keep a black list table where I know they are trying to sell me something and answer the phone (without me pushing any buttons) and tell them that I am not interested in answering their calls and that they are on my black list. Then hangup. Without sending them to voice mail.
I tried asking the android community on Google 2 years ago to ask why the SDK doesn't provide telephony API front end to answer the call without user interaction, but got no replies.
I've installed ubuntu on my laptop to learn Linux and got it working properly after a couple of days and have downloaded and installed all the programs and sdks I think I'd need. There are a lot of interesting projects in AI and user agents going on and I like to participate in them once I am up to par with the linux environment.
Can anyone give me some guidance, pointers or what to look for. If there are any project in development that I could join, would be much appreciated.
I tried to explain my interest as best as I could. If you need more info, please let me know.
Thanks for all your help guys.

Guidance to pursue a hardware-changing system app

Hi XDA!
This is my first post here. I need some guidance on making a system application that is capable of disabling a particular hardware component device. I don't know if it is possible or not, but I need a direction towards this. Even if it isn't possible, I would be grateful if anyone can guide me atleast close to this. I know making basic android applications and am interested in making apps that have a much more stronger hold on the device. Also what knowledge and experience do I need to be capable to explore this area.
tl;dr: need a direction and advice to make a hardware disabling system application
Any advice is appreciated.
Ciao!

Categories

Resources