Debugging Android Native C Applications with gdb

224 views
Skip to first unread message

Bill Cox

unread,
Dec 29, 2007, 6:46:54 AM12/29/07
to Android Internals
I've managed to get gdb to debug sshd running on the emulator. It's a
bit complicated, and involved porting gdbserver, but it works. If you
feel the need to debug a native C application in gdb, you can follow
the steps at my blog entry:

http://www.billrocks.org/ideas/index.php?/archives/20-Debugging-Android-Native-C-Applications-with-gdb.html#extended

gavin fang

unread,
Dec 29, 2007, 8:57:30 AM12/29/07
to android-...@googlegroups.com
Thanks for sharing...Bill.
Do you have any deep idea about the internals inside Android ?

-gavin

Bill Cox

unread,
Dec 29, 2007, 11:04:08 AM12/29/07
to android-...@googlegroups.com

Sorry, Gavin, no. I'm more of an application level C guy myself, but
I'm hoping my stumbling through the process can help the next guy. Guys
like Benno are so good at this, I'm a bit embarrassed even to post here.

How about a funny story, instead? I had an iPhone, and was happy doing
some work under the hood, though they have some great talent hacking
that device. Then Steve Jobs decided to bork everyone's phone who'd
modified the baseband in any way. I still had my contract with AT&T,
and hadn't ever violated it, but Steve just hates hackers. They borked
my phone (we argued over the definition of "bricked", so I'll say
"borked"). The Apple guys borked us on purpose, writing extra code
specifically to do so, to any phone with a modified baseband. The
"genius" at the Apple store told me I'd have to buy a new phone, and
that I'd violated the EULA, and that I was at fault. Few things piss me
off more than hardware I can't fix and a-holes who screw me. I smashed
the iPhone on his desk.

Anyway, I'm a pretty committed Android hacker now... I sure hope Google
offers us a warmer reception. BTW, I modified my baseband before I went
to Europe on a 2 week vacation. I'd read stories on slashdot about
$4,000 phone bills people would get even when their phones were never
used. I just didn't want a $4,000 bill... well I succeeded, but lost a
$400 phone.

Regards,
Bill

Aaron Ardiri

unread,
Dec 29, 2007, 11:14:10 AM12/29/07
to android-...@googlegroups.com
little offtopic :)

> How about a funny story, instead? I had an iPhone, and was happy doing
> some work under the hood, though they have some great talent hacking
> that device. Then Steve Jobs decided to bork everyone's phone who'd
> modified the baseband in any way.

for the record; i did the same process.

however, before updating to 1.1.1 - it was important to restore your
baseband to the original form. there are programs available to do this.
once you did this, upgrading a hacked iphone to 1.1.1 was not a problem
and then you use the same process to unlock it again.

my iphone has gone from

1.0 -> 1.0.1 -> 1.0.2 -> 1.1.1

i have not bothered to update to 1.1.2 :) all versions have been hacked.
i have been using my iphone in sweden (hacked) since september.

if you still have your iphone; it can be fixed :)

--
// Aaron Ardiri

Bill Cox

unread,
Dec 29, 2007, 4:04:04 PM12/29/07
to android-...@googlegroups.com
I'm afraid I smashed the thing to pieces at the Apple store. I'd been
away on vacation, so I hadn't read the latest iPhone news before pluging
it in and blindly clicking on 'OK' buttons. I was anxious to sync all
my vacation photos. I'm glad yours is still working. I think it's
great to have guys who fully understand the competition involved. Sorry
about wandering off topic.

Bill

Reply all
Reply to author
Forward
0 new messages