Hi guys.
I joined the QEMU developer list a few days ago and have to admit that this
is my first 'official' and bigger open source project I want to participate.
So please give me a bit time to acclimatise; and don't hesitate to give me
feedback to speed up this process :-)

*Preliminaries: What I want to do*
My aim is to add Android support to QEMU, i.e. make Android run with a
recent version of QEMU. For this I want to reuse parts of the Android
emulator which utilizes a modified 0.10.5 QEMU.
I want to do this for my fresh master thesis which aims to automatically
detect leakage of sensitive data in Android Apps. If you wonder how this
fits together with QEMU, see more details
here<http://wiki.diebin.at/Privacy_Certification_for_Smartphones>
.

During my research I came along a wiki page where a similar
idea<http://wiki.qemu.org/Google_Summer_of_Code_2011#Upstreaming_some_of_the_Android_emulator_bits>was
written. In fact it is a Google Summer of Code initiative, which would
fit perfectly in my master thesis plan. You'll receive a project proposal
the next days. I know there is little time left to discuss the idea
(proposal deadline is in 6 days), but I just saw this yesterday and I
thought it would be a win-win-situation.

*Side effects of my hacking: Documentation*
During my learning process I want to make a documentation which makes it
easier for other people to get into QEMU source code. I want to do it in a
separate wiki first and if it is usable we can move it to the official QEMU
wiki.

*Why I write here: I want to branch/patch but I don't understand the source
code*
I read the QEMU paper and some entries on blogs and mailing lists (also in
the archive of this mailing list) and I think I got the high level mechanics
of QEMU (guest code, dynamic binary translation with an intermediate step:
the micro operations and from them to TCG targets, f.ex. X86 host
instructions) and what it would take to add this specific machine which
makes up Goldfish and enables the Android (linux) kernel to work.

Unfortunately I was a bit lost when I looked at the source code. I guess
this is at least for two reasons:

   - I am no expert in C and not much familiar to this lower level of system
   programming. But I am willing to learn everything necessary to start being
   part of QEMU's community and to submit patches according to the conventions
   here.
   - It is a big project with a lot of files and dependencies. It may have a
   structure, important data structured, and separated parts (like TCG or
   device emulation,), but when you start you don't see (all important) borders
   to manage complexity.

*Do you have any recommendations where I should start according to what I
want to do?* Before I start adapting goldfish-hardware to QEMU I want to
understand at least important parts of the code (data structures, global
variables, conventions).

*What I have tried so far to understand the source code*

   - *Diffs*: I made a Diff of the Android emulator code base and the
   corresponding QEMU 0.10.x (lots of changes) and to a newer QEMU (it's easier
   to enumerate what has *not* changed ^^)
   - *Code Inspections* / Mental Execution: I tried to understand the main
   loop(s), beginning from vl.c. So basically what I later found in this
   blog entry<http://converse-2008.blogspot.com/2011/03/understand-qemu.html>
   .
   - *Debugging*: I tried to use gdb to run the code. Unfortunately I get
   signal SIGTRAP after every statement.

I want to continue to get to the point where I can ask specific questions,
but I was wondering if I am on the right way.

Thanks for your patience and your hints. Btw: hello :-)
Andy

Reply via email to