[Q] Compiling android source code - Android Q&A, Help & Troubleshooting

Hi guys so I'm compiling android from source. After compilation I have following output:
Please see attachment for output mesaage. (could not post it here)
Did it compile? I suspect not. So, Why?
Thanks Vic

Up
Up

Related

[Q] Android Sycall Interception

Hi,
Could someone please tell me how I could intercept all the syscalls while the phone is running?
I build the kernel from source code, and load it on the Nexus S 4G device, and I have already compiled a syscall interception module for Ubuntu. But, I do not know how a syscall interception LKM would look like for android, and how it could be incorporated into the kernel's source code to be compiled automatically when the kernel is built.
Would someone please help?
::Saman
Please use the Q&A Forum for questions Thanks
Moving to Q&A

[Q] how to compile tun.ko?

can anybody tell me how to compile tun.ko for any rom? what would i need to download/install etc? any help would be appreciated. thanks!
get the kernel soruce and check config file for tun
in .config file search for "TUN" keyword, change Y to M, run make menuconfig, save, compile.
slow down guys absolute noob here. how/where do i run makeconfig? what software would i need? sorry if stupid questions :c
Sent from my GT540 using XDA App
daggerxXxsin said:
slow down guys absolute noob here. how/where do i run makeconfig? what software would i need? sorry if stupid questions :c
Sent from my GT540 using XDA App
Click to expand...
Click to collapse
First, you need the kernel source code for your device. The Linux GPL requires that OEMs provide the kernel source so you should be able to find it.
You'll need a linux machine with a development environment. You'll also need the Android NDK for the ARM toolchain.
Once you've got all that lined out, you'll need a kernel config. You can usually get this from your device's proc directory as /proc/config.gz.
Now gunzip the config.gz in your kernel source directory, rename it to ".config" and run "make oldconfig". If it is from an identical source tree, then it should run without prompting.
Now run make menuconfig and drill down to the tun options and enable it as a module. Now you can "make" your kernel and "make modules" for the modules.
okay so first thing is to setup a build environment. gotcha. will work on that.
Sent from my GT540 using XDA App
Gene Poole said:
First, you need the kernel source code for your device. The Linux GPL requires that OEMs provide the kernel source so you should be able to find it.
You'll need a linux machine with a development environment. You'll also need the Android NDK for the ARM toolchain.
Once you've got all that lined out, you'll need a kernel config. You can usually get this from your device's proc directory as /proc/config.gz.
Now gunzip the config.gz in your kernel source directory, rename it to ".config" and run "make oldconfig". If it is from an identical source tree, then it should run without prompting.
Now run make menuconfig and drill down to the tun options and enable it as a module. Now you can "make" your kernel and "make modules" for the modules.
Click to expand...
Click to collapse
Hi Gene, i want to ask, if we cannot find the config.gz file from the device, is it imposibble to get the tun.ko working?
Or if it possible, can you tell me how to gain some configuration, that used by the tun.ko, so we can set the config from menuconfig correctly?
I`ve tried to compile tun.ko for a device, the insmod working fine, but when the vpn try to use the tun, it is crash, it raise segmentation fault.

CM build: "breakfast olympus" fails (Xoom kernel build attempt)

Hi guys,
My Atrix -> Xoom kernel port is complete. This is the nvodm version.
Right now I am trying to make a build of CM 9 based on my kernel and running into lots of hiccups
Yeap I am a noob so please bear with me. I am following the steps from http://wiki.cyanogenmod.org/w/Build_for_olympus, and got stuck at the step "Prepare the device-specific code"
Code:
$ breakfast olympus
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/olympus/cm.mk]]: "device/*/olympus/cm.mk" does not exist. Stop.
Device olympus not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_motorola_olympus
CyanogenMod/android_device_motorola_olympus already exists
Syncing repository to retrieve project.
warning: local_manifest.xml is deprecated; put local manifests in local_manifests instead
Fetching projects: 100% (1/1), done.
warning: local_manifest.xml is deprecated; put local manifests in local_manifests instead
Repository synced!
Looking for dependencies
Dependencies file not found, bailing out.
Done
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/olympus/cm.mk]]: "device/*/olympus/cm.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_olympus'
** Do you have the right repo manifest?
I figure that the script is reaching out to the wrong repo at https://github.com/CyanogenMod/android_device_motorola_olympus
It should probably go to https://github.com/Atrix-Dev-Team/android_device_motorola_olympus
Am I right?
How to I correct this problem?
Thanks in advance..
Follow This
http://forum.xda-developers.com/showpost.php?p=21499412&postcount=1
I think that the best way to solve this problem is pm someone that already build a rom from source as you wanna do.
Try to reach MMontuori or EPinter (both really kind and will help for sure) by pm, just a tip hehe.
Hope you can build it, best of luck.
Sorry but this mean that we have a new kernel to get full cm9/10/10.1 roms? W/o All the bugs like the videocam...?
Thanks for the hard work!
from the (M)ATRIX...
Ask epinter, he is such a great guy and he have helped other devs,
Sent from my MB860
Your kernel is booting?
Its a full port from Xoom or you are using the leaked Kernel?
Able to retrieve logs from USB?
Whats your status?
This is very important, because there is another porting project running (http://forum.xda-developers.com/showthread.php?t=2016837) and maybe your kernel source is better to keep up than the one they are trying to port.
Please... communicate!
Thanks!
matbarni said:
Your kernel is booting?
Its a full port from Xoom or you are using the leaked Kernel?
Able to retrieve logs from USB?
Whats your status?
This is very important, because there is another porting project running (http://forum.xda-developers.com/showthread.php?t=2016837) and maybe your kernel source is better to keep up than the one they are trying to port.
Please... communicate!
Thanks!
Click to expand...
Click to collapse
Hey matbarni; take it easy and read the first post, not only the title.
It's not a matter of communication; If you can see the thread of the porting, you'll see some posts from user toyota86, which said he was working but in other branch because he has his reasons for it.
Please don't jump into conclussions and try to help, we all are struggling for an usable kernel; and EVERY help is welcome.
I'm sure any of the developers have contacted him by now or he tried to contact the developers, but he wants to see if anyone can give him a quick tip.
Enough. I'll shut my mouth off
Sorry guys. My mind was hazy when I posted that late last night.
What I meant by "complete" was that it simply built. That's it
Some early sanity testing of my kernel with CM7 resulted in a hang. Yes, I agree with most of you that the next logical thing to do is to flash That ROM and fastboot with my kernel. This can be a quick test. But I am a little suspicious the Bionic libraries may need to be rebuilt as well.
I have already sought advice from our Guru mmontuori and he has told me Kernel modules need to be rebuilt.
SO... lets build the whole she-bang
Raafat said:
Follow This
http://forum.xda-developers.com/showpost.php?p=21499412&postcount=1
Click to expand...
Click to collapse
Thanks!
you will need a build without the errata hack in board config, like the cm10 based on the leak. or build using my jb-olympus-new branch.
you can remove all the kernel modules if your defconfig follows android standard...
jhonnyx said:
Hey matbarni; take it easy and read the first post, not only the title.
It's not a matter of communication; If you can see the thread of the porting, you'll see some posts from user toyota86, which said he was working but in other branch because he has his reasons for it.
Please don't jump into conclussions and try to help, we all are struggling for an usable kernel; and EVERY help is welcome.
I'm sure any of the developers have contacted him by now or he tried to contact the developers, but he wants to see if anyone can give him a quick tip.
Enough. I'll shut my mouth off
Click to expand...
Click to collapse
I did not jump into conclusions.
As you can see, all I posted was questions. And yes, I read what toyota86 posted.
Like "Right now I am trying to make a build of CM 9 based on my kernel and running into lots of hiccups".
The way I am helping is to try to clarify to all users what this post is about.
Thanks for all the support guys
As much as I don't want you guys to be dissapointed, but dont put too much hope as to the outcome of my effort.
Now I have lots on my plate. I will update as I make progress.
thank you
Glad you have been working on this.I tried but abandoned due to insufficient knowledge. atrix was the best buy I've made in years.had it for 3 yes now and thanks to you and others it will live on. Im a trigger happy tester i try every ROM I see and can't wait to try yours.
epinter said:
you will need a build without the errata hack in board config
Click to expand...
Click to collapse
Thank you sir. One question though..
Which errata hack were you referring to? Errata 657451 in the motorola's version of the bionic library? Eg...
In motorola's bionic, we see workarounds like this:
Code:
/* BEGIN MOT GB UPMERGE, a5705c, 12/21/2010 */
# ifdef HAVE_TEGRA_ERRATA_657451
# define __munge_tls(_v) ( ((_v)&~((1ul<<20)|1ul)) | (((_v)&0x1)<<20) )
# else
# define __munge_tls(_v) (_v)
#endif
/* END MOT GB UPMERGE */
Description of this errata:
Code:
config TEGRA_ERRATA_657451
bool "Store bit 20 of CP15 TLS register c13,3 in bit 0"
depends on ARCH_TEGRA_2x_SOC && HAS_TLS_REG
default y
help
This option enables a workaround for the 657451 Tegra 2 errata
which causes unreliable reads from bit 20 of the thread storage
register c13, 3 (used by the __set_tls system call). It stores the
value intended for bit 20 into bit 0 instead; in most user-space
environments, the value saved by __set_tls is an aligned address,
so repurposing bit 0 will not cause ill effects.
In my noob'ish understanding, there is a hardware related bug in our Atrix Tegra 2 SOC that causing data corruption in Thread Local Storage (TLS). Researching this on the net, some ppl were talking about a possibility of a buggy version of this hardware in Atrix. It is also worth noting that this workaround however is NOT present in Stingray's kernel & bionic.
I don't think I remember seeing this workaround in CM's bionic, which is one of my initial concerns..I will look further at home tonight..
Errrrm... Isn't the Bionic a TI OMAP device?
can you post your kernel so others can test it? i have minimal knowledge but would love to help with testing
(Deleted)
quetzalcoatl2435 said:
Errrrm. Isn't the Bionic a TI OMAP device?
Click to expand...
Click to collapse
Bionic is Android's standard C library. Don't worry
toyota86 said:
Hi guys,
My Atrix -> Xoom kernel port is complete. This is the nvodm version.
Right now I am trying to make a build of CM 9 based on my kernel and running into lots of hiccups
Yeap I am a noob so please bear with me. I am following the steps from http://wiki.cyanogenmod.org/w/Build_for_olympus, and got stuck at the step "Prepare the device-specific code"
Code:
$ breakfast olympus
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/olympus/cm.mk]]: "device/*/olympus/cm.mk" does not exist. Stop.
Device olympus not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_motorola_olympus
CyanogenMod/android_device_motorola_olympus already exists
Syncing repository to retrieve project.
warning: local_manifest.xml is deprecated; put local manifests in local_manifests instead
Fetching projects: 100% (1/1), done.
warning: local_manifest.xml is deprecated; put local manifests in local_manifests instead
Repository synced!
Looking for dependencies
Dependencies file not found, bailing out.
Done
build/core/product_config.mk:189: *** _nic.PRODUCTS.[[device/*/olympus/cm.mk]]: "device/*/olympus/cm.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_olympus'
** Do you have the right repo manifest?
I figure that the script is reaching out to the wrong repo at https://github.com/CyanogenMod/android_device_motorola_olympus
It should probably go to https://github.com/Atrix-Dev-Team/android_device_motorola_olympus
Am I right?
How to I correct this problem?
Thanks in advance..
Click to expand...
Click to collapse
How did you solve this? I am trying to build for coconut (SE Live With Walkman) and stuck at breakfast.

[Q] kdump for Nexus 4

Hi,
Mika Westerberg has implemented kdump for OMAP3430 based arm architecture. I want to use kdump in Nexus 4.
I have config the command line as "root=/sdcard maxcpus=1 [email protected] [email protected] ", then I compile the first kernel and the crash capture kernel.
I also cross compiled the kexec-tools for nexus4. However, when I use the kdump tool, I got the error "Cannot find the start of the core dump". Can anyone help me? Thanks!

[Q] Compile Real APK Leecher v3.6

I was downloaded a source code of Real APK Leecher v3.6 from this board, can anyone expert in Java, show me the tutorial step by step to recompile the source code. I was new in Java Programming but i like to use this tool but i prefer to recompile the source code rather than the already compile JAR. Thanks in advance..

Categories

Resources