logo

What's here anyways ?

What's up doc ?

JNI on Android

Why JNI

Long time I wanted to write about it. One of the hot topic on the Android mailing lists is JNI. JNI is the technology that allows to bind Java code with native code. In our case, this is going to be C/C++.

On Android, the Java VM (Dalvik) is not what you would call a performance monster. Even official presentations by Google agree with that. But what they also say, it's that you can use JNI if you want performances.

That is, write the hot parts in C or C++, and the rest in Java. And then interface both parts with JNI.

→ Read more...

· 2009/02/23 10:58 · fred · 3 Comments

Playing with the G1

Disclaimer

Ok, you know the drill : all those tips, tricks and hacks can and will eventually blow up your phone, so don't do it at home.

Anyways.

I finally got my hands on a real device, for a change ! Looks a lot like the emulator, except that you can put it in your pocket for real. I am lucky enough to have a phone with a low enough RC number, so the root trick described here works. Apparently, it's becoming more and more difficult to find a “root-friendly” phone, so you might as well get a Dev Phone 1 from Google (I wish I had, anyways).

→ Read more...

Android LKM Rootkit

Rootkit ?

For some reasons, I had to write a special module for Android : a rootkit. That's the reason why I had to recompile the kernel to turn on module support (see last post).

The rootkit itself was no rocket science. The goal was to override getdents64 and kill system calls to hide files and get root with a magic signal. This has been done over and over again and is implemented in most rootkits. What I did not find, however, was a way to hijack syscalls on a ARM architecture (and Android is based on ARM).

→ Read more...

Playing with Android - Kernel and Modules

Kernel

I already wrote several notes about cross-compiling programs for Android. Well, the same thing applies for the kernel. Actually, the Scratchbox toolchain can compile the Linux kernel without any problem.

First, you need to get the kernel sources there. Then, do the usual make xconfig. Remember to do this outside Scratchbox, since the toolchain does not have the libraries necessary to build the GUI used for xconfig. The rest is regular kernel compiling configuration.

When configuration is done, log into the Scratchbox toolchain /scratchbox/login, and type make. You can use the -kernel option of the emulator to use the zImage you just built.

→ Read more...

Playing with Android (Part V)

Tab ?

I don't know about you, but if I am going to spend more than 2 minutes playing with that Android shell we just set up, I'll have to get that Tab working.

Let me explain : on my computer, the adb shell thing does not correctly handle the Tab and Arrows. That means I can't use completion and history edition/navigation on the shell. This is bad.

Note that this behavior seems to vary from one computer to another, depending on operating system an probably some other parameters which I don't know about. Anyways, let's try to hack our way around this annoying limitation.

→ Read more...

Older entries >>