yashsingh1/xdaforums huggingface dataset:
[Android] dastin1015:
But that only pertains for source tree in which kernel build time complication is supported, which in AOSP it is not. Since he is compiling AOSP he needs to utilize a kernel source (such as the CM smdk4210 kernel source) and precompile it and link it to his tree via the BoardConfig.mk and then create a make file and call that make file to properly copy over the compiled modules for the kernel into the output system folder.
[Android] speed_bot:
yes to some extent he can use device.mk to copy the modules..and we can still use the prebuilt kernel even in aosp .. i have used them in past..
[Android] dastin1015:
That's what I said, "precompile it and link it to his tree via the BoardConfig.mk" A zImage alone won't work because you need the corresponding modules as well otherwise you'd have a half broken kernel, unless all modules are built into the kernel, but I use the smdk4210 kernel and they are not all built in.
[Android] speed_bot:
he asked a solution for that problem..i seem to have given a solution for the modules part i just copy them via some makefile all the time..
[Android] dastin1015:
But you did forget to mention to him about the modules situation.
[Android] speed_bot:
he hasnt pointed to his config so i assumed the developer has the modules prebuilt in the config as most do so
[Android] dastin1015:
Most don't anymore. That was deprecated after ICS and even then wasn't really utilized anymore. The i9100 is the international GS2 and is maintained by CM and most device trees are a derivative of theirs. I tend to not assume before looking at a actual device tree. That's so that I can accurately give help. No criticism to you. I know you're helping which I appreciate cause I can't maintain this thread all the time.

私のEVO 4G LTEから送信される。
[Android] speed_bot:
i know from ics one was asked to point at a kernel source rather than using the prebuilt kernel..but i guess the guy asked for a solution to his build error not the future stuff that may come into play and too many things told will confuses people who are new to source building..so i would like to take one problem at a time...

ps i know you have worked hard in maintaining your thread..i do have another one which i maintain here

http://xdaforums.com/showthread.php?t=2059939
[Android] dastin1015:
I'll look it over sometime. I need to update this threads OP since it's been awhile. I'll do that after I update all my ROM threads though.

私のEVO 4G LTEから送信される。
[Android] speed_bot:
and the featuring on portal got a lot of eyeballs to roll into your thread and most got benefited too..
[Android] evol4g:
so i'm working on a bunch of different roms and the one thing that bugs me is all the time it takes to sync my repositories.. is there any way to speed it up? I noticed the .repo folder is about 10gb, and is very similar in most directories.. can that be copied with the exception of the manifests and stuff or anything to speed it up?
[Android] Kayant:
repo init --reference= -u

E.g

$ repo init --reference=~/CM10 -u https://github.com/Quarx2k/android -b jellybean

Learnt this from the xda university website :)

It makes a massive difference cut my sync time from on average 2 hrs to about 15 to 20 minutes ^_^

Let's Go ^_^
[Android] xSkArx:
I've cloned android_kernel_samsung_smdk4210 but idk how to compile, reading the tut for compiling kernel I've downloaded DooMLorD's toolchain but I can't apply kernelPatch, if exist other way to compile kernel please me help, thanks
[Android] speed_bot:
ok put your kernel in root of source/kernel/samsung/smdk4210

and then put this line in boardconfig.mk

TARGET_KERNEL_SOURCE =: kernel/samsung/smdk4210

TARGET_DEFCONFIG =: your defconfig name

then compile..
[Android] xSkArx:
My boardconfig.mk "say" this

# Inline kernel building
TARGET_KERNEL_SOURCE := kernel/samsung/smdk4210
TARGET_KERNEL_CONFIG := cyanogenmod_i9100_defconfig

Is necessary to change "cyanogenmod" to "full"?
[Android] dastin1015:
No because in the kernel source a full_i9100_defconfig doesn't exist. You also need to add in inline kernel building with this file and place it in the directory it is shown in:

https://github.com/CyanogenMod/android_build/blob/cm-10.1/core/tasks/kernel.mk

Once implemented do a 'make clean', a quick 'repo sync' and then begin your compile again.
[Android] xSkArx:
I place the file that you mentioned on "buil/core/tasks/" but now i get this

"out/target/product/i9100/obj/KERNEL_OBJ" exist but idk what happend
[Android] dastin1015:
For now you can just hardcode the location in the kernel.mk

Look for the KERNEL_OUT :=

私のEVO 4G LTEから送信される。
[Android] evol4g:
ok which directory do i put this in? all my roms? and should i use the aosp source instead of cm's because i do like half cm builds and half aosp based builds..?
[Android] Kayant:
if you want to ;) ...... doesn't matter what directory you use but since all roms are AOSP based it will be best to point it to your aosp source.......

This is meant for new sources (folders) using it on existing downloaded source is point less since it's already download ;)

P.s Does anyone know how to fix this error

Package OTA: /home/kayant/RootBox/out/target/product/mb526/rootbox_mb526-ota-eng.kayant.zip
./build/tools/releasetools/ota_from_target_files -v \
-p /home/kayant/RootBox/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=false \
--override_device=auto \
/home/kayant/RootBox/out/target/product/mb526/obj/PACKAGING/target_files_intermediates/rootbox_mb526-target_files-eng.kayant.zip /home/kayant/RootBox/out/target/product/mb526/rootbox_mb526-ota-eng.kayant.zip
unzipping target target-files...
running: unzip -o -q /home/kayant/RootBox/out/target/product/mb526/obj/PACKAGING/target_files_intermediates/rootbox_mb526-target_files-eng.kayant.zip -d /tmp/targetfiles-uSXTQ7
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 889, in
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 841, in main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File "/home/kayant/RootBox/build/tools/releasetools/common.py", line 146, in LoadInfoDict
d["build.prop"] = LoadBuildProp(zip)
File "/home/kayant/RootBox/build/tools/releasetools/common.py", line 160, in LoadBuildProp
name, value = line.split("=", 1)
ValueError: need more than 1 value to unpack
make: *** [/home/kayant/RootBox/out/target/product/mb526/rootbox_mb526-ota-eng.kayant.zip] Error 1
[Android] sy224048:
Is it possible to compile ubuntu touch using a clone display on Jb? Ie compile ubuntu on Jb?
[Android] dastin1015:
OP has been updated with new information. Everybody please reread it and update accordingly. Even the libs installed have been updated.
[Android] xSkArx:
Kernel.mk

## Internal variables
#KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
KERNEL_OUT := out/target/product/i9100/obj/KERNEL_OBJ
KERNEL_CONFIG := $(KERNEL_OUT)/.config

I changed the KERNEL_OUT value but still won't work
[Android] dastin1015:
Try this:

KERNEL_OUT := $(ANDROID_BUILD_TOP)/$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
[Android] xSkArx:
unfortunately still not working

make -C kernel/samsung/smdk4210 O=/home/skar/aosp/out/target/product/i9100/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/skar/aosp/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-" cyanogenmod_i9100_defconfig
/bin/sh: 1: cd: can't cd to /home/skar/aosp/out/target/product/i9100/obj/KERNEL_OBJ
make[1]: se ingresa al directorio «/home/skar/aosp/kernel/samsung/smdk4210»
Makefile:121: *** output directory "/home/skar/aosp/out/target/product/i9100/obj/KERNEL_OBJ" does not exist. Alto.
make[1]: se sale del directorio «/home/skar/aosp/kernel/samsung/smdk4210»
make: *** [/.config] Error 2
[Android] speed_bot:
yes this looks good..go to kernel /samsung/smdk4210/arch/arm configs see if cyanogenmod_i9100_defconfig exists there

after git cloning the folder name will be differnt you have to rename it to "smdk4210"
[Android] Hard2PickOneName:
Same problem and no one gave answer.Any one help?
[Android] Mm7:
Does it work also in debian (64 bit) ?
[Android] dastin1015:
Ubuntu is a debian derivative
[Android] xSkArx:
@dastin1015 @speed_bot can you help me please?
[Android] ktempleton:
Just a guess but have you tried creating a folder in that directory and naming it KERNEL_OBJ
[Android] xSkArx:
the folder already exist

EDIT: is rare, the folder didn't exist, but now a make it and compile is work atm

EDIT 2: now i got this

File ../../ramdisk.cpio could not be opened for reading
line 32
File ../../ramdisk-recovery.cpio could not be opened for reading
line 33
make[3]: *** [usr/initramfs_data.cpio] Error 255
make[2]: *** [usr] Error 2
make[1]: *** [sub-make] Error 2
make[1]: se sale del directorio «/home/skar/aosp/kernel/samsung/smdk4210»
make: *** [TARGET_KERNEL_BINARIES] Error 2

I've search both files but I don't found
[Android] speed_bot:
a weird problem its able to cd into the directory ..cc defconfig but has problems putting the output..can you try compiling as root?

do this

sudo gnome-terminal

a new terminal will open try compiling in that..this might be a permission problem..

---------- Post added at 07:40 AM ---------- Previous post was at 07:38 AM ----------

ramdisk is not getting opened some package missing

gzip maybe install all packages from source.android.com
[Android] xSkArx:
package are installed and updated
[Android] speed_bot:
hmmm try compiling kernel seperately and use it as prebuilt kernel
[Android] xSkArx:
How can i do? sorry i'm noob :c
[Android] speed_bot:
this one is specific for my device but stuff like toolchain path etc are same read this ones you will know how to compile a kernel..

http://xdaforums.com/showthread.php?t=1467149
[Android] rauma:
I get this error: Random offset 0x175 or 0x188...

Many people said that Its a normal error and can be ignored, but I can not ignore it because It make installation aborted.

How can i get rid of this?

Thank you.
[Android] djsubtronic:
---------------(delete)
[Android] hadron:
s really good guide ! i will try to compile using this guide
[Android] solracarevir:
I have been Able to fix most of the issues I encountered but this one got me stuck:

target thumb C: sensors.stingray <= device/moto/stingray/sensors/sensors.c
target thumb C++: sensors.ville <= device/htc/ville/libsensors/nusensors.cpp
target thumb C++: sensors.ville <= device/htc/ville/libsensors/InputEventReader.cpp
target thumb C++: sensors.ville <= device/htc/ville/libsensors/SensorBase.cpp
target thumb C++: sensors.ville <= device/htc/ville/libsensors/LightSensor.cpp
device/htc/ville/libsensors/nusensors.cpp: In constructor 'sensors_poll_context_t::sensors_poll_context_t()':
device/htc/ville/libsensors/nusensors.cpp:98:71: error: 'LOGE_IF' was not declared in this scope
device/htc/ville/libsensors/nusensors.cpp: In member function 'int sensors_poll_context_t::activate(int, int)':
device/htc/ville/libsensors/nusensors.cpp:123:77: error: 'LOGE_IF' was not declared in this scope
device/htc/ville/libsensors/nusensors.cpp: In member function 'int sensors_poll_context_t::pollEvents(sensors_event_t*, int)':
device/htc/ville/libsensors/nusensors.cpp:162:59: error: 'LOGE' was not declared in this scope
device/htc/ville/libsensors/nusensors.cpp:168:87: error: 'LOGE_IF' was not declared in this scope
device/htc/ville/libsensors/LightSensor.cpp: In member function 'virtual int LightSensor::enable(int32_t, int)':
device/htc/ville/libsensors/LightSensor.cpp:80:76: error: 'LOGE_IF' was not declared in this scope
make: *** [out/target/product/ville/obj/SHARED_LIBRARIES/sensors.ville_intermediates/nusensors.o] Error 1
make: *** Waiting for unfinished jobs....
device/htc/ville/libsensors/LightSensor.cpp: In member function 'virtual int LightSensor::readEvents(sensors_event_t*, int)':
device/htc/ville/libsensors/LightSensor.cpp:135:38: error: 'LOGE' was not declared in this scope
device/htc/ville/libsensors/SensorBase.cpp: In member function 'int SensorBase::open_device()':
device/htc/ville/libsensors/SensorBase.cpp:54:77: error: 'LOGE_IF' was not declared in this scope
device/htc/ville/libsensors/SensorBase.cpp: In static member function 'static int SensorBase::openInput(char const*)':
device/htc/ville/libsensors/SensorBase.cpp:120:63: error: 'LOGE_IF' was not declared in this scope
make: *** [out/target/product/ville/obj/SHARED_LIBRARIES/sensors.ville_intermediates/SensorBase.o] Error 1
make: *** [out/target/product/ville/obj/SHARED_LIBRARIES/sensors.ville_intermediates/LightSensor.o] Error 1
Carlos-Riveras-MacBook:WORKING_DIRECTORY carlos$
[Android] dastin1015:
Add this line:

#define LOGE_IF

to these files:

nusensors.cpp

LightSensor.cpp

SensorBase.cpp

Add this line to LightSensor.cpp:

#define LOGE
[Android] solracarevir:
Thanks for guiding me in the right direction. Had to include

#define LOGE
#define LOGE_IF

to all the .cpp's on the libsensors folder
[Android] kevdliu:
not sure how the solution works but apparently it does
[Android] T-Macgnolia:
Ok I finally got my repo sync finished, I ended up having to use Ubuntu Software Center to get Java installed. Anyway I am at the point of pulling the files from my device. But when I type the command.

./extract-files.sh

I get the following.

bash: ./extract-files.sh: No such file or directory

Now when i open a teminal and type in "$ adb devices" it shows my device, so adb is suppose to be working.

Now I have looked in both the tools and the platform tools folders and I do not see a bash file in either one. Any suggestions?

Edit: I am running SDK Manager now to see if I missed it some how.

Edit 2: The only files from SDK Manager I do not have installed are the ones for Motorola devices and Sony devices.
[Android] dastin1015:
Did you navigate to your device repo first then execute the command?

私のEVO 3Dから送信される。
[Android] T-Macgnolia:
Yes i am in .

tmacgnolia@tmacgnolia-laptop:~/WORKING_DIRECTORY/device/pyramid
[Android] dastin1015:
Link me to your repo you used, also the device is supposed to be cloned in this fashion:

device/{manufacturer}/{device-codename}

So yours should be like:

device/htc/pyramid
[Android] T-Macgnolia:
Ok here is the repo I used, at least I think this is what you are wanting.

So do I need to move the pyramid folder inside the HTC file folder. And if so can I do this manually are do I need to delete the pyramid folder and then use terminal to do another repo that creates the pyramid folder in the HTC folder?

Edit: Ok I think i need to use this GIT and maybe the other one as well as i see the first one I used does not appear to have all the files I need.
[Android] CdTDroiD:
It seems every build i make the camera is broken lol, any idea why mate? previously i just use the self extracting proprietary binaries from google but it still never works... In your guide you dont have the binaries. How do you go about getting a working build usually? Thanks
[Android] dastin1015:
I don't own any Nexus devices. I build for other devices. I don't even have a working build yet, not a successful compile yet. Try taking a look at CM repos and see if they have any commits for camera.
[Android] T-Macgnolia:
@dastin1015, I got the files to extract from my device now. I used the CM git and then merged the files from febycv's git has his has made some changes to his files plus he had some files that CM does not have. But after i did this I was able to extract the files from my device. I now have the correct directory.

/WORKING_DIRECTORY/device/htc/pyramid

Thanks for the help man. Going back to smash yoour thanks button now.
[Android] dastin1015:
Good to see you got it figured out!
[Android] CdTDroiD:
Yea bit stumped with the CM commits and how to get them to work, will get on to google lol, its such a pain in the ass because everything in my build works flawless except camera! Thanks mate
[Android] dastin1015:
Well this one is easy: https://github.com/CyanogenMod/andr...mmit/e62de81f766b5082878ad1a6077d9a928bdf198e

What you do is click view file which will take you to this: https://github.com/CyanogenMod/andr...ay/packages/apps/Camera/res/values/config.xml

Copy and paste that in the directory at the top so like this: device/samsung/maguro/overlay/packages/apps/Camera/res/values/config.xml

And with that I'm going to sleep. It's 3:36am and I promised my girlfriend I would sleep when she goes to sleep which was at 1:50am. Oops lol
[Android] lorjay589:
hello, umm lol i did everything to the T but when soon as i make -j3 and the build prop come up, i get a find: "src" No such directory,

and also a javalib.jar error, its not in the folder
[Android] djsubtronic:
I also used to get find: "src" No such directory, right at the start of the 'make' , but it would continue anyway so I imagined it wasn't an issue. - Someone please correct me if I am wrong?

Also, when Android SDK is extracted, what needs to be downloaded through it besides tools and platform tools? Are all the APIs needed too?
[Android] lithid-cm:
I had the same thing. Using maguro here. The camera is using proprietary bits. I basically created a extract-files.sh from the proprietary.txt in the maguro device tree and then it included a few things that was not included with the nexus binaries.

Here is an example of the file I created. This also automates the nexus drivers as well.

https://github.com/GeekRom/android_device_samsung_maguro/blob/master/extract-prop.sh
[Android] speed_bot:
if installation is getting aborted its assert error not these random offset ones..
[Android] rauma:
If that errors is not cause, so, how do I know what is problem?

---------- Post added at 09:41 AM ---------- Previous post was at 09:37 AM ----------

Oh, After pressing back button, I got: E:Can't read misc (No space left on device)

My phone has 512MB of ROM and the zip file is just 71MB ( 112MB when extracted).

So, why do i get this error?, can you please help me?

Thank you.
[Android] Kayant:
Python error

Sorry to repost this but I really need so assistance here :)

Am getting this error at the last stage of compilation.... From my search it's a python error but am not sure what it means I don't know programming enough yet :( ...... I also compared it to other build setup's like CM's but they are identical apart from a few additional commits

Thanks for the help

Package OTA: /home/kayant/RootBox/out/target/product/mb526/rootbox_mb526-ota-eng.kayant.zip
./build/tools/releasetools/ota_from_target_files -v \
-p /home/kayant/RootBox/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=false \
--override_device=auto \
/home/kayant/RootBox/out/target/product/mb526/obj/PACKAGING/target_files_intermediates/rootbox_mb526-target_files-eng.kayant.zip /home/kayant/RootBox/out/target/product/mb526/rootbox_mb526-ota-eng.kayant.zip
unzipping target target-files...
running: unzip -o -q /home/kayant/RootBox/out/target/product/mb526/obj/PACKAGING/target_files_intermediates/rootbox_mb526-target_files-eng.kayant.zip -d /tmp/targetfiles-uSXTQ7
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 889, in
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 841, in main
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
File "/home/kayant/RootBox/build/tools/releasetools/common.py", line 146, in LoadInfoDict
d["build.prop"] = LoadBuildProp(zip)
File "/home/kayant/RootBox/build/tools/releasetools/common.py", line 160, in LoadBuildProp
name, value = line.split("=", 1)
ValueError: need more than 1 value to unpack
make: *** [/home/kayant/RootBox/out/target/product/mb526/rootbox_mb526-ota-eng.kayant.zip] Error
[Android] speed_bot:
i guess the /tmp folder it too short its where the contents get extracted..
[Android] Black_Prince:
See the build/core/Makefile build/tools/releasetools/editor.py , common.py and ota_from_target_file compare with CM cherry pick ...
[Android] Kayant:
Thanks will do :) .....I tried something similar already but not on all the file you suggested..... Hope this time it works.
[Android] rauma:
I don't know why but after reboot, its disappeared, but now i got some errors:

state 0, after some changes, I get state 6 error, after some changes, I still get this.

I use a very diffirent device tree for my phone to build, I use a diffirent CPU, GPU, screen dimension, resolution as well but same manufacturer... for my phone. Now i'm thinking this is cause all troubles?, I don't know.?
[Android] dastin1015:
You need to use a device tree specifically for your phone and if there isn't one you need to create it.

私のEVO 4G LTEから送信される。
[Android] speed_bot:
you need one excatly for your phone thats why you get installation aborted..

ps

cwm is intellignet it doesnt wanna brick your phone.. you need to use a tree which for your device you cant use a s3's config on s2 it may be from samsung but it just doent work..
[Android] Kayant:
Don't work :( ..... am confused because the releasetools stuff are identical..... and Makefile is also similar just a few changes needed by AOKP/RootBox....

Does anyone have any more suggestions??
[Android] bieltv3:
Sorry seems solved xD
[Android] rauma:
Thanks for reply, I've searched on internet for some days to learn how to creat a device tree, and yes, there are some webpages have a little bit teaching for that, but I wonder that, they just say about 4 makefile files ( Android.mk, BoardConfig.mk....) while a real device tree has too many file s and folders in it. I've tried to figure out how to create that files, but I can not. Could you please tell me some links to create a complelely device tree?.

Thank you.

---------- Post added at 03:02 AM ---------- Previous post was at 02:52 AM ----------

I know I need to use a exactly device tree for my phone but I can not find it on github. I want to create one for my phone, and I did, but my device tree has only 4 file ( AndroidProducts.mk, Boardconfig.mk, vendorsetup.sh, sky_a730s.mk) while I see in some other trees have many file and folder in it. At this time, I just want to creat a rom ics that can be runable on my real device ( wifi, gps, 3g... is not necessary now).
[Android] speed_bot:
you can do with only 4..the additional makefiles are just for sepearation purpose..
[Android] dastin1015:
Find a similar device with same processor, hardware, etc and then use that as a reference
[Android] rauma:
Thank you but I did with HTC Vivo ( Incredible S, this is the most similar to my phone, CPU( Snapdragon S2, but HTC is msm7x30 and mine is msm7k), GPU, Screen)) but In extract-files.sh, at lines like adb pull ..., I see many file that only HTC Vivo has and mine has not. How can I handle these files?

---------- Post added at 03:42 AM ---------- Previous post was at 03:37 AM ----------

Yes, I did, but it gave me: no rule make target for "otapackage"...

I googled it and found a solution for that ( by changing makefile in build/core) but error is still there.
[Android] speed_bot:
first find a device with same chipset as yours..msm7x30 or something like that then the boardconfig will be same for most part you need to change the image sizes for mount points see init.rc and recovery.fstab ..you can get the recovery.fstab from stock recovery image.. and the propreitary blobs get it from a similar device from same oem..btw which device? most the devices have atleast 1 version of cm so i dont find a reason why you dont have a tree..
[Android] rauma:
Thank you, but yes, I did every things you said, I open boardconfig and change some necessary thing, I also copy init.rc init.qcom.rc... from stock rom ( oh, stock rom is Gingerbread, and what I'm compliling and complied is ics).

My device is Pantech Sky IM A730S (or Sky Vega S). Unlucky for my device, there is no device tree found on github.
[Android] rauma:
My phone's rom is still GB, so can I compile a new ICS ROM totally for this ( I mean, I dont need any files from currently stock rom???).

Please help.

Thank you.
[Android] speed_bot:
there is no sepearate ramdisk for ics..system is what changes and the ramdisk contains mountpoints which dont change with change in android version..
[Android] rauma:
So you mean I can use some files (some rc files...) on my currently GB stock ROM to build for ICS?.
[Android] speed_bot:
yes ramdisk is same..and the vendor blobs you can get the updated ones