Quantcast
Channel: xda-developers - Galaxy S III General
Viewing all articles
Browse latest Browse all 3987

[Q] [Module] Build and load module on GS3

$
0
0
Hello,

I tried to do a simple task which raise several problem and it start to drive me crazy, so here I am, asking for help. The subject may have been already mentioned, but can't find an issue with the galaxy s3.

I work with ubuntu 12.04 and Odin on win7. My GS3 has XXELL4 baseband, and 3.0.31-742798 kernel version.

I need to load and run a custom module (let's say a "hello world" one for begin) on the galaxy S3.
I compiled it through a Makefile with the toolchain from the ndk package (
Code:

path_to_ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
and the source code from the samsung web site (GT-I9300_JB_Opensource_Update8.zip).

Obviously, when i tried to insmod my module, I've got some compatibility error like
Code:

Exec format error
.
The fact is that the kernel from website is not the same as the phone one.

  • So I tried to put the kernel from the website on the phone

    I compiled it with the same toolchain and I received a zImage file in result. But what to do with this file ? I extracted a boot.img from the phone with Odin and split it (with perl script stuff) to use the extracted files with my compiled zImage for reconstruct a new boot.img. But since fastboot is not available on GS3 (or I miss something) I can't simply
    Code:

    $ fastboot flash boot boot.img
    , and need to use Odin again. So I replace the boot.img from odin's backup folder on my PC with my boot.img. But the nandroid.md5 file raise an error. Am I doing it wrong or too complicated ? If I can correct the md5 error, is that my module will work ?
  • I also tried to compil my module directly with the kernel from the phone but didn't manage to extract the kernel files to do it. Stuck with a boot.img. Same with the stock kernel from http://forum.xda-developers.com/show....php?t=1646610

I made a lot of research but don't find any concrete solutions to my simple task. Maybe I miss something or looking too deep.

Is there a more simple way to run a custom module on the GS3 ?


sorry for my english

Viewing all articles
Browse latest Browse all 3987

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>