How to create a working vendor folder? - Android

Hi all!
I'm fairly new to this whole ROM development thing, and the most I know how to do is use the kitchen to modify working ROMs to my leisure.
Lately I've been trying to port/build CM7 to my device, which is fairly new (and only recently got a forum here on XDA) which is the Samsung Galaxy W (codename Ancora).
First I tried to use as a base existing CM7 ROMs from devices with similar hardware, by just modifying the updater-script to put the files in the right partitions, however with no luck.
So then I decided to download the sources for CM7 and try to port using a generic build and then filling in the blanks related to hardware and such, but again with no luck (maybe related to something I heard about samsung specific patches?)
So now I'm trying to build it from source for the device, but I'm stuck at creating a vendor folder that works.
I've updated most the files that need updating but I keep getting this error:
Code:
build/core/product_config.mk:205: *** No matches for product "cyanogen_galaxyw". Stop.
I've inserted the references need in almost all files called but still nothing. Any ideas?

You have device and vendor folder, properly referred??
Greets!

mDroidd said:
You have device and vendor folder, properly referred??
Greets!
Click to expand...
Click to collapse
I believe so. But could you be a little more specific so I can double check? Some file may have gone over my head.
Thanks in advance,

At what stage is this failing? When you run envsetup.sh or when you setup lunch or when you call make?

medizen said:
At what stage is this failing? When you run envsetup.sh or when you setup lunch or when you call make?
Click to expand...
Click to collapse
When I setup lunch
Sent from my GT-I8150 using XDA App

When you run . build/envsetup.sh does it populate lunch with cyanogen_galaxyw?
i.e "including device/samsung/galaxyw/vendorsetup.sh"
it should populate lunch with an option to select for the cyanogen_galaxyw.
You're building on Linux
Lunch menu... pick a combo:
1. full-eng
2. full_x86-eng
3. simulator
4. medizen_olympus-eng
Which would you like? [full-eng]
If not check your vendorsetup.sh that is in your vendor/(Brand)/(Device) directory.

medizen said:
When you run . build/envsetup.sh does it populate lunch with cyanogen_galaxyw?
i.e "including device/samsung/galaxyw/vendorsetup.sh"
it should populate lunch with an option to select for the cyanogen_galaxyw.
You're building on Linux
Lunch menu... pick a combo:
1. full-eng
2. full_x86-eng
3. simulator
4. medizen_olympus-eng
Which would you like? [full-eng]
If not check your vendorsetup.sh that is in your vendor/(Brand)/(Device) directory.
Click to expand...
Click to collapse
Edit2: Yes it does. I just wasn't seeing it.
Edit3: This is what I get in the lunch menu:
Code:
Which would you like? [full-eng] 76
build/core/product_config.mk:205: *** No matches for product "cyanogen_galaxyw". Stop.
Device galaxyw not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Traceback (most recent call last):
File "build/tools/roomservice.py", line 16, in <module>
result = json.loads(urllib2.urlopen("http://github.com/api/v2/json/repos/show/CyanogenMod?page=%d" % page).read())
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 394, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 412, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1201, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1174, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1027, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline()
File "/usr/lib/python2.7/socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
socket.error: [Errno 104] Connection reset by peer
build/core/product_config.mk:205: *** No matches for product "cyanogen_galaxyw". Stop.
** Don't have a product spec for: 'cyanogen_galaxyw'
** Do you have the right repo manifest?

Do you have a .mk file from you devices/[vendor]/[model] that references your vendor .mk files?

Maybe you did not extract the files in the folders, poor am I not understanding you?
Greets!

The problem has to do with some of the core files, which is why it doesn't build.
I have recently attempted the same thing with CM7 for the HTC Flyer/View tablet, without much success. I believe my tablet shares the same chipset and CPU as your Samsung Galaxy W (MSM8255T)
What I did was clone a similar build and try to modify some of the script sh files and mk files from a similar device (HTC Incredible 2/S aka vivow and vivo on HTC codenames/CM7). Once you edit these files and properly substitute the device name, you can get past the problem you are having in the OP with the "device not found and looking up cyanogen repos", but you must already have the proprietary and device files extracted, and properly edited in /rootcm7folder/device/htc/galaxyw and /rootcm7folder/vendor/htc/galaxyw
For the proprietary files, it's pretty easy, just take the extract-files.sh script and modify the device name and it'll copy the necessary ones to /vendor/htc/galaxyw
That'll let you finish lunch, but once you compile, it won't start. I think it has something to do with some different libraries in my case, but I'll update you if I figure out more.
---------- Post added at 12:27 PM ---------- Previous post was at 12:16 PM ----------
whoops, ignore the htc folders I wrote above and substitute it for samsung. I was thinking wrong for some reason.

I'm making an attempt at building the ics source code from google and modifying the build to run on my lg thrill and I was wondering if anyone can shed any light on making a vendor folder for my device?

Related

Questions about Android source code for N1

Hi,
Followed cyanogen's instruction in his wiki, I could build and flash my own ROM to N1, and it is working. Thanks cyanogen so much for everything he has done with Android.
However, the instruction is based on cyanogen's source code. Now, I am trying to figure out how to build a new ROM from pure Android source code (i.e. the one from AOSD).
I obtained the eclair branch as follows:
Code:
repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
repo sync
My questions are:
1. There is not any directory under ./vendor for N1 (i.e. passion). I can see only directories for Dream & Sapphire. Does it mean I can build only ROM for Dream/Sapphire? The following result seems support that point. Did I misunderstand some points?
Code:
$ sed -n -e "s/^add_lunch_combo//gp" vendor/*/vendorsetup.sh
aosp_emulator_us-eng
aosp_emulator_eu-eng
aosp_dream_us-userdebug
aosp_dream_eu-userdebug
aosp_dream_us-eng
aosp_dream_eu-eng
aosp_sapphire_us-userdebug
aosp_sapphire_eu-userdebug
aosp_sapphire_us-eng
aosp_sapphire_eu-eng
2. There is not extract-files.sh there. So I suppose I need to use the file from cyanogen. But what else should I do to be able build a new ROM?
Any help is really appreciated!
I'm just as clueless as you are to this--but when I compiled for the HTC Touch, all I did was pull down the stock AOSP build (repo sync) and simply ran "make" from the root directory, which produced a blank System image.
From there, I either copy & pasted the compiled library .so files into the image (to provide driver support), or if necessary to have the source compiled for the version, I included the source into the repo sync directory and ran the "make" which would also produce a compiled library.so that functioned.
Not sure any of this will help, but I figured I'd offer what I could.
Shidell said:
I'm just as clueless as you are to this--but when I compiled for the HTC Touch, all I did was pull down the stock AOSP build (repo sync) and simply ran "make" from the root directory, which produced a blank System image.
From there, I either copy & pasted the compiled library .so files into the image (to provide driver support), or if necessary to have the source compiled for the version, I included the source into the repo sync directory and ran the "make" which would also produce a compiled library.so that functioned.
Not sure any of this will help, but I figured I'd offer what I could.
Click to expand...
Click to collapse
Thanks Shidell. So you meant that it worked for your HTC Touch?
How do you copy & paste library files into image?
How do you include the source into the repo sync directory?

Compile help with classes not in android.jar

Trying to compile some samples from the Android SDK.
I just took the AccelerometerPlay example, ran the command:
Code:
android update project -p . -t 1
which creates the Ant build file, then
Code:
ant release
which builds release APK files.
The problem is, if I add something like:
Code:
import android.util.Slog;
to the .java file, the build fails, claiming that it can't find the file (even though it exists in {sdk_path}/sources/android-15
I'm guessing that it looks for .class files inside {sdk_path}/platforms/android-15/android.jar , where android/util/Slog.class doesn't exist.
How do I get this build to work?
I've tried adding
Code:
<src path="${sdk.dir}/sources/android-15" />
under the <javac> task in {sdk_dir}/tools/ant/build.xml, but it seems to throw out more errors, whilst also appearing to try to compile every single .java file there.
I'm new to Java so really don't know what I'm doing - can anyone please point me in the correct direction?
Thanks.
Anyone have any idea?
If you're new to Java, you may want to give Eclipse a try. You won't have to mess around with Ant too much and it will help you with your syntax/imports.
From your description, it looks like you'll want to add the .jar file you mentioned to the 'classpath' attribute of the <javac> element in your ant XML file.
- chris
Thanks for the reply cttttt.
What .jar file are you referring to? android.jar? Because that doesn't have the classes as far as I know.
Eclipse gets me even less further - I can't seem to install the ADT plugin at all. On Eclipse 3.7.2, it throws the WST error, and when I try the solutions "that work", I get thrown network errors.
(so at least I can get a build actually going with Ant)

[WIP] Building CM9 for xt910 RAZR

Work in Progress, this not work for now
Hi guys,
So, for now i'm trying to build CM9 from source for xt910.
Before starting a Huge thanks to
STS-dev-team (droidhive.com) (droidth3ory / hashcode / dhacker29)
For their huge work to add spyder into cm9 & aokp.
Now the hard stuff
i won't make another tutorial on how sync cm9 repo etc... i lead you to this thread which worked well for me.
http://forum.xda-developers.com/showthread.php?p=27722264
Follow everything and you will be able to build cm9.
What you need for spyder
so you need to download few folder from STS-dev-team github
https://github.com/STS-Dev-Team
Here's the list of what i dowloaded from 'em:
- https://github.com/STS-Dev-Team/android_local_STS (which is the local_manifest you have to replace)
Code:
put into :
.repo/local_manifext.xml
- https://github.com/STS-Dev-Team/android_device_motorola_spyder (file needed to build spyder)
Code:
put into :
devices/motorola/spyder
- https://github.com/STS-Dev-Team/android_hardware_ti_omap4xxx (hardware file for OMAP4xxx)
Code:
put into :
hardware/OMAP4XXX (replace the existing one)
- https://github.com/STS-Dev-Team/android_vendor_motorola_spyder (vendor file for spyder)
Code:
put into :
vendor/motorola/spyder
- https://github.com/Hashcode/android_hardware_ti_wpan (hardware file needed)
Code:
put into :
hardware/wpan
- https://github.com/Hashcode/android_hardware_ti_camera (hardware file needed)
Code:
put into :
hardware/camera
How to
Once you synced up cyanogen repo download and place all the file above.
then do:
Code:
curl -L -o .repo/local_manifest.xml -O -L https://raw.github.com/STS-Dev-Team/android_local_STS/ics/local_manifest.xml
once finished you'll have to edit this file : device/motorola/spyder/extract-files.sh to make it work with xt910 (just replace it by the file attached
Ok, now you can start trying to build:
Code:
make clean && make clobber
lunch
(choose cm_spyder, 5 for me)
make bacon -j4
Now my error
my building stop with this error
Code:
make: *** No rules to build target « out/target/product/spyder/obj/STATIC_LIBRARIES/libhostapdcli_intermediates/libhostapdcli.a », needed for « out/target/product/spyder/obj/EXECUTABLES/tiap_cu_intermediates/LINKED/tiap_cu ». Stop.
i tried to google it but nothing helped me.
So here we are, if someone have any ideas tips knowledge to share, you're welcome.
Nice! Keep your hard work! Congrats!
Into what path are you putting them into? I had problems compiling if the path contained any spaces or some other special characters.
Check the listing of the Makefile, it will execute some special commands and if those have spaces it will as well fail.
private files under the system/bin is much less, so the error is inevitable.
PS:My English is not very good
---------- Post added at 02:27 AM ---------- Previous post was at 02:08 AM ----------
Reference cdma xt912 extract-files.sh file, executed once, and then to private files the gsm xt910 does not exist shielding to name the difference between rename the file.
Note, divided into two:
1, copy the file
2, spyder-vendor-blobs.mk file creation
Must make the appropriate match to modify.
brainwash123 said:
Into what path are you putting them into? I had problems compiling if the path contained any spaces or some other special characters.
Check the listing of the Makefile, it will execute some special commands and if those have spaces it will as well fail.
Click to expand...
Click to collapse
Well, check the OP i edit it with path.
mapleshadow said:
private files under the system/bin is much less, so the error is inevitable.
PS:My English is not very good
---------- Post added at 02:27 AM ---------- Previous post was at 02:08 AM ----------
Reference cdma xt912 extract-files.sh file, executed once, and then to private files the gsm xt910 does not exist shielding to name the difference between rename the file.
Note, divided into two:
1, copy the file
2, spyder-vendor-blobs.mk file creation
Must make the appropriate match to modify.
Click to expand...
Click to collapse
Exactly, that's why i attached a new extract_files.sh, working for xt910, i only removed missing files, but we may need to add other files.
Yes, you need to add the missing files.
Hi guys, i'm actually builing for 20mn now without error, so i think it's on good way, but don't yeld victory too fast, i have to test the build after that.
Anyway i'll update OP to make it easier and with all the new file & script i added.(probably monday, little busy for weekend )
Stay tuned
Damned computer crashed, dont use it while building
sevenup30 said:
Damned computer crashed, dont use it while building
Click to expand...
Click to collapse
Lol
Are you going to post this as a rom or just leave it as a guide? Be nice to try it but then I need more motivation to learn to build
Sent from my XT910 using xda premium
MarkyG82 said:
Lol
Are you going to post this as a rom or just leave it as a guide? Be nice to try it but then I need more motivation to learn to build
Sent from my XT910 using xda premium
Click to expand...
Click to collapse
i had to add somes files, but for now > bootloop. Try to figure it out
edit:: Ok problem with audio, it can found it because of lib.
I tried replace most part of the lib, it fix display issue but logcat is not wirking anymore :s
i think we have to rework a lot the work done by STS dev team before compile. monday i'll upload the build if someone want to try something with it.

how to add directory to include_paths?

I have multiple errors like this
frameworks/av/media/libstagefright/ACodec.cpp:39:24: fatal error: QCMetaData.h: No such file or directory
this file located in hardware/qcom/media/mm-core/inc/ directory
how i can add this directory to include_paths?
if it is to a linux computer, you would add this to your /home/user/.bashrc file <- notice the dot.
export PATH=$PATH:/path/to/whatever/file/you/need
you can add this line below the same line, if you have one like this already.
to test, youc an also type it on the CLI, if it works, and you needed it permanent, then add it to the file mentioned.
no. it not about PATH variable
on UT compilation i have multiple errors like this
frameworks/av/media/libstagefright/ACodec.cpp:39:24: fatal error: QCMetaData.h: No such file or directory
becouce including header file QCMetaData.h locating in hardware/qcom/media/mm-core/inc/ directory that was not in <<includes_directories>>
how i can add this includes directory to each project which include files from it?
i dont want to catch all dependencies. how get it automatics?
ah I see. that's beyond my sys admin knowledge. someone with programming (gcc) skills can help you. Sorry
Hi Maybe this can help http://stackoverflow.com/questions/...odec-cpp-in-android-sources-in-libstagefright
gazhead said:
Hi Maybe this can help http://stackoverflow.com/questions/...odec-cpp-in-android-sources-in-libstagefright
Click to expand...
Click to collapse
nope

[Q] aosp initramfs/ramdisk source

I am working on building from aosp 4.4.2. I have built it with the pre-built kernel without any problems. Then, I managed to get a custom kernel code in place and it builds. Now the only thing left to do is the initramfs/ramdisk for the custom kernel I have in place. Currenlty my build will not boot. I suspect it is using the initramfs/ramdisk from aosp.
Can someone point me to the source files or files that handle the initramfs/ramdisk? I have found bits and pieces strewn throughout the source code but cannot pinpoint the indivitual files or the script/mk file that produces the ramdisk found in the out folder after my system finishes building.
I kinow I can change the initramfs/ramdisk manually by repacking the boot.img, but I would prefer everything be completed in the updatpackage.
what device do you have?
Anyways, just decompile the working boot.img with dsixda's kitchen, and replace the zImage, build it again and done
broodplank1337 said:
what device do you have?
Anyways, just decompile the working boot.img with dsixda's kitchen, and replace the zImage, build it again and done
Click to expand...
Click to collapse
I have a Nexus 5. I'm trying to avoid the, "build it again."
I would like to envsetup, lunch, make clean, make updatepackage, flash and done.
So, I'm still trying to figure out, how make knows where to get all the files and create the ramdisk in the out directory.
AOSP radisk
I am no expert but I think this is how ramdisk is built and it worked for me al the time. ramdisk is composed from the directory 'root' in the product build output folder. the contents are coming from different part of the build tree, mostly from the device source, vendor source. for eg:- check hammer head tree for omni https://github.com/omnirom/android_device_lge_hammerhead in the device.mk you can see PRODUCT_COPY entries to the root similar thing goes with vendor makefiles. If you are looking for executable built from source you can set
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) so that they will end up in initrd
related to this: I can see using PRODUCT_COPY_FILES to stage files to the root directory. but where is the directory structure created? Such as /firmware ... etc? I am trying to add a directory to the root fs. When I just create a new directory such as /foo the build fails. I want the new directory to be permanent part of the build process so solutions like unpack - modify - repack is less than satisfactory. Thanks

Categories

Resources