Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
140 lines (112 sloc) 4.4 KB
Android ATrace
###################
A syscall tracer for Android Emulator [1]
###################
only the subproject: external\qemu und [2]
Based probably on Android 2.2
$diff -r ../../workspace_ATrace_test/ATrace/ qemu/ | grep "diff -r"
Vergliech mit Android 2.3.4 liefert einige Änderungen, aber etliche Dateien sind gleich.
aber laut Datei "Changelog" beides auf Version 0.12.0
$ diff Changelog ../../workspace_traceDroid_v1/external/qemu/Changelog
gibt keine Ausgabe
#############
Instalation: Versuch 1
#############
$ cd ~/Uni/Master-Arbeit.big/workspace_ATrace_test
$ mkdir SDK_with_ATrace
$ wget http://dl.google.com/android/android-sdk_r11-linux_x86.tgz
$ tar xvfz android-sdk_r11-linux_x86.tgz
# SDK komplett instalieren
$ cd android-sdk-linux_x86/
$ sudo tools/android
# wähle SDK Platform 2.3.3 API10 -> instaliere
#############
Instalation: 2nd TRY
#############
#Try to get the orginal emulator run
$ git clone git://android.git.kernel.org/platform/external/qemu.git
$ make
-> run android-configure.sh
$ ./android-configure.sh
-> libesd-dev not installed (bibliotek für Sound)
$ sudo apt-get install libesd-dev
$ ./android-configure.sh
-> run make
$ make
-> error: X11/extensions/XShm.h: No such file or directory
$ sudo apt-get install x11proto-xext-dev libxext-dev
$ make
->
.../aEmulator/qemu/audio/alsaaudio.c:25: fatal error: alsa/asoundlib.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
make: *** [objs/intermediates/emulator-libqemu/audio/alsaaudio.o] Fehler 1
$ sudo apt-get install lib32asound2-dev
$ make
->
.../aEmulator/qemu/audio/paaudio.c:5: fatal error: pulse/simple.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
make: *** [objs/intermediates/emulator-libqemu/audio/paaudio.o] Fehler 1
$ sudo apt-get install libesd-dev
$ make
-> a lot of warnings
-> Successful!!!
################
#Test emulator (Information how to run [6])
$ cd objs
./emulator \
-sysdir /opt/android-sdk_linux_x86/platforms/android-10/images \
-kernel /opt/android-sdk_linux_x86/platforms/android-10/images/kernel-qemu \
-ramdisk /opt/android-sdk_linux_x86/platforms/android-10/images/ramdisk.img \
-system /opt/android-sdk_linux_x86/platforms/android-10/images/system.img \
-data ~/.android/avd/my_Android.avd/userdata.img \
-cache ~/.android/avd/my_Android.avd/cache.img \
-sdcard ~/.android/avd/my_Android.avd/sdcard.img \
-snapstorage /opt/android-sdk_linux_x86/tools/lib/emulator/snapshots1.img
-läuft, aber nicht ohne Fehlermeldungen
##############
#############
Instalation: 3rd TRY
#############
get ATrace new, and do it like 2nd TRY
##########
in INSTALL steht drin:
##
Building the emulator with the Android build system:
----------------------------------------------------
Ensure that you have properly configured your build by running the
envsetup.sh script and using the appropriate 'lunch' command.
Then type:
m emulator
This will rebuild the emulator and place it in an adequate location.
Simply type 'emulator' to start it with the currently built system
image.
##
-> Als nächstes hoffen, dass Chengu mir antwortet.
#########
#Quellen / list of qreferences
[1] https://github.com/ChengyuSong/ATrace
[2] http://android.git.kernel.org/?p=platform/external/qemu.git;a=summary
[3] Mail von csong84@gatech.edu
[4] http://wiki.qemu.org/Main_Page
[5] $ less /home/hanno/Uni/Master-Arbeit.big/workspace_ATrace_test/aEmulator/qemu/docs/ANDROID-TRACING.TXT //Sehr interessant!!
[6] $ emulator -help-disk-images | less
[7]
##############
#[3]: Mail von Chengyu
#BEGIN MAIL
The instructions is in the README, just
>./atrace-prepare.sh && make
>> I think my main problem is, that I don't now in which environment I have to compile it. I get, that you have only changed the "external/qemu.git" Part.
Yes, I only modified the emulator, and ATrace works on the emulator level, outside the box.
>> Some questions:
>> - Which Version do you take? Android 2.3.4?
I think it's 2.2 based, 2.3 has not come out at that time.
>> - Should I take the compiled SDK from developers.android.com (like told in README)?
>> - Or should I take the source Code and compile the hole sdk on my own (from source.android.com) (The same way I have done with TaintDroid.)
Well, ATrace is an emulator level syscall tracer, so you don't need to compile the whole SDK, you just need to use a pre-built image to boot, or you could simply replace the vanilla emulator.
Good luck,
Chengyu
#COMMENTS:
vaniella = unmodified
#END MAIL
#############