Wednesday, January 16, 2008

Create google android strace tool

Prerequisite, you already have the cross compiler downloaded from download GNU toolchain site, make sure you select ARM GNU/Linux, and IA32 GNU/Linux.

  1. Download the strace source distribution from SourceForge strace project
  2. Extract the strace package on your linux machine
  3. Set your cross compiler information with command: # export CC=your_cross_compiler_folder/bin/arm-none-linux-gnueabi-gcc
  4. Add your_cross_compiler_folder/bin into your $PATH for path searching
  5. Change your current folder to strace package extract folder, use command: # ./configure -host=arm-linux
  6. You have the Makefile generated, edit it, append -static after CFLAGS variable in Makefile
  7. Compile it with simple command: # make
  8. You have the strace now, verify it with command: # file strace, you shall see "strace: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14, statically linked, not stripped"
Done, you have another powerful tool for your android

9 comments:

Maxwell said...

According guide,I ran my strace on my android emulator shell.However I got a error like this,
# ./strace ./hello
execve("./hello", ["./hello"], [/* 10 vars */]) = 0
syscall: unknown syscall trap 0xe8bd8010.
Could you help me?Thanks

rtm said...

It looks your "hello" can not be executed. Do you have error if you just run "./hello"? How is your hello created? It must be a static linked executable or dynamic linked to bionic libc.

sasha said...

The Team Android phenomenon is spreading like wildfire. Lots of people are turning to the openness and diversity of Android smartphones when choosing a mobile device.
best android apps

best iphone apps

jenifer said...

That an interesting post. I never thought about this before. But, looking back at different situations, this might be right. Keep it up friend!
best online pharmacy

Cheap wedding dresses said...

Very happy to see your article, I very much to like and agree with your point of view. Thank you for sharing. At the same time,i love best pram very much .Welcome to look at my website and blog articles.Hope we can become good friends, and exchange and to help each other! Thanks!!
wedding dresses

Pharmacy Blogger said...

I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end.
Generic Plavix

jean-michel said...

give us directly the binary

Pop Neo said...

We offer wedding dresses, bridesmaid dresses, beach wedding dresses,my friends welcome to visit and see!
wedding dresses

JAMES DEAN said...

Wow!! What a great writing, really I appreciate such kind of topics. It will be very helpful for us. Waiting for more articles, blogs like this. I’m going bookmark your blog for future reference. Thanks a lot for sharing this.
advertising | top advertising agencies in Pakistan | Marketing Agency | Advertisement