Building from source issues - G1 Q&A, Help & Troubleshooting

I am having issues with building from cyanogen's github. I have never had a problem with building for my N1 from source. I am currently trying to build for my G1. These are the basic steps I am doing, repo init -u git://github.com/cyanogen/android.git -b eclair-ds and then repo sync, then . build/envsetup.sh, then make -j3 adb, lunch cyanogen_dream_sapphire-en, then cd into vendor/htc/dream_sapphire and ./extract-files.sh, then i go to do make -j3 and it stops because of no proprietary drivers, so I went and took a look inside the proprietary folder and found out what I was missing was Fw1251r1c.bin, and libGLES_qcom.so and have been trying to figure it out for many hour's. I am guessing it has to do with my g1 running a 1.6rom and trying to build from cyanogens source a 2.1 rom or I am missing something altogether . Any help is appreciated

Related

Eclipse and building Phone.apk

I am working on a PC W7,
all the components is installed, Android SDK 1.6 r1, Eclipse Ide for Java Developer, JDK etc, all works well...
I can build without problem the apps from the SDK Sample and some other in Google Code like SMSPopup.
But I took from Cyanogen GitHub the Phone.apk Zip file
http://github.com/cyanogen/android_packages_apps_Phone
with the source and when I build I get a lot of errors in Eclipse, same problem with the Advanced Launcher, Loccy's Better browser...
Clean... and Fix from Eclipse does not change anything
Any suggestion? (apart: use linux, download the entire android source etc...)
xenio2000 said:
I am working on a PC W7,
all the components is installed, Android SDK 1.6 r1, Eclipse Ide for Java Developer, JDK etc, all works well...
I can build without problem the apps from the SDK Sample and some other in Google Code like SMSPopup.
But I took from Cyanogen GitHub the Phone.apk Zip file
http://github.com/cyanogen/android_packages_apps_Phone
with the source and when I build I get a lot of errors in Eclipse, same problem with the Advanced Launcher, Loccy's Better browser...
Any suggestion? (apart: use linux, download the entire android source etc...)
Click to expand...
Click to collapse
You can not only git clone the Phone app, you need checkout a lot many others such as build/framework/core... etc.
And then type "make Phone" to build the app. Of course, you need a cygwin or just use a linux machine...
Yep...
My hope was not to hear that answer... I am too noob for that...
Maybe I try to install a Linux machine with the entire Android source... just for fun...
Thanks.
I did some important progress.
I did it...
I am on W7 64bit Host
with Sun VirtualBox I installed a Guest Ubuntu 9.04
this part from: http://developer.android.com
Android SDK 1.6
JAVA JDK 5
Eclipse with Android Plugins (ADT)
Some add to path for Java/Android SDK in ~/.bashrc file
this from: http://source.android.com/
Installed all the packages as in the Get Source page
Installed Repo
and the get source section...
in my $HOME
$ mkdir mydroid
$ cd mydroid
$ repo init -u git://android.git.kernel.org/platform/manifest.git
type your name and email
and now get all the files from source.android
$ repo sync
and build it
$ cd ~/mydroid
$ make
...after some hour
I modified the file I need to in the ~/mydroid/packages/apps/Phone/ directory
and build only the Phone.apk
as read in this thread http://groups.google.com/group/andr...47985716f84f?lnk=gst&q=build#6de347985716f84f
Make sure you're cd'd into the mydroid/ directory
Type ". build/envsetup.sh"
Type "mmm packages/apps/Phone"
if there are no errors the build of Phone.apk is in
~/mydroid/out/target/product/generic/system/app
I know this is easy for you devs, but this took me 3 days to
Now I like to get the Phone.apk source from Cyanogen GIT and try to build in my VM, I have no idea how to do it, and I think it modify the Settings too.
Please help me for this last part...
Thanks
Xenio
This may be easy for some, but I can say you just saved me 3 days of work. Thank you for the follow up post.
how to create apk file
hai everybody
my name is sriram
i am doing MCA
actually i want to create apk file, i dont know event the basics
can you help me
Kind of you

Help Compiling Launcher.apk from Cyanogen Source Code

The title says it all, here is what I have done so far:
1. Installed Eclipse 3.5, ADT 0.95, SDK1.6r4 (all platform updates and tools), Java JDK 1.5, all additional suggest downloads from AOSP.
2. Set up repo via:
Code:
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync
wait..................
3. I then moved the HTC recovery image to ~/mydroid and copied the proprietary bits via
Code:
cd /vendor/htc/dream-open
./unzip-files.sh
4. I then entered
Code:
source build/envsetup.sh
lunch
and on different attempts have tried 5. aosp_dream_us-userdebug, and 7. aosp_dream_us-eng.
5. Finally, I entered (from ~/mydroid)
Code:
make Launcher
mmm packages/apps/Launcher
From here everything compiles, and a Launcher.apk appears in ~/mydroid/out/target/product/dream-open/system/app
When I push this to /system/app in my G1, I have a blank screen, so obviously the Launcher is not compiled correctly. My goal is to have a 3 screen browser (which is the default in launcher.java) so I have changed nothing in the source files. I am quite a noob when it comes to compiling source code, so I am at a loss here. Any help would be greatly appreciated.
Anyone, I know this is not hard for a real dev, but how many actually look in Q&A? I am starting to see why people post questions elsewhere.

Building CM6

Maybe we can get a group knowledge base going, I'm attempting to build CM6 right now. The idea is to help out with Vibrant porting, but I'm getting stuck and thought you guys might have some hints. If I can get it going, I'll update the wiki or create one somewhere else for Vibrant specific stuff.
So, right now my build system is 64-bit Ubuntu 9.04. I can switch, it looks like it might be better to be on a 32-bit setup, so there's one option.
The basic path to where I am now, following basic directions from here: http://wiki.cyanogenmod.com/index.php?title=Building_from_source
Code:
sudo aptitude install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
sudo aptitude install ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
export CCOMPILER=${HOME}/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
(Path modified to match my local path)
repo init -u git://github.com/CyanogenMod/android.git -b froyo
repo sync
source build/envsetup.sh
make -j4 adb
This results in a segfault....
Code:
host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
true
Install: out/host/linux-x86/bin/adb
make: *** [out/host/linux-x86/bin/adb] Segmentation fault (core dumped)
Using "lunch" and selecting a target, then "make clean" gives me the same error building adb. Attempting to build the ROM also gives me a segfault, so at least I'm consistent. It always seems to be on an "Install" step, if that helps.
If you get it to compile be sure to post, I'd love to start helping I just lack motivation and free time... And knowledge around Android, but I'm working on that piece
ttabbal said:
Maybe we can get a group knowledge base going, I'm attempting to build CM6 right now. The idea is to help out with Vibrant porting, but I'm getting stuck and thought you guys might have some hints. If I can get it going, I'll update the wiki or create one somewhere else for Vibrant specific stuff.
So, right now my build system is 64-bit Ubuntu 9.04. I can switch, it looks like it might be better to be on a 32-bit setup, so there's one option.
The basic path to where I am now, following basic directions from here: http://wiki.cyanogenmod.com/index.php?title=Building_from_source
Code:
sudo aptitude install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
sudo aptitude install ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
export CCOMPILER=${HOME}/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
(Path modified to match my local path)
repo init -u git://github.com/CyanogenMod/android.git -b froyo
repo sync
source build/envsetup.sh
make -j4 adb
This results in a segfault....
Code:
host Executable: adb (out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb)
true
Install: out/host/linux-x86/bin/adb
make: *** [out/host/linux-x86/bin/adb] Segmentation fault (core dumped)
Using "lunch" and selecting a target, then "make clean" gives me the same error building adb. Attempting to build the ROM also gives me a segfault, so at least I'm consistent. It always seems to be on an "Install" step, if that helps.
Click to expand...
Click to collapse
This usually meanings that there is a memory management issue but im no dev hope this helps
Now if we had others posting about what they have done.... hint...
OK, I know there aren't a ton of us messing with things at this level. Hopefully someone else has seen this. I'll try to install a 32-bit Ubuntu 10.whatever tonight and see if that helps. It is possible my issues are being caused by the 32-bit compatibility libraries or similar.
ttabbal said:
Now if we had others posting about what they have done.... hint...
OK, I know there aren't a ton of us messing with things at this level. Hopefully someone else has seen this. I'll try to install a 32-bit Ubuntu 10.whatever tonight and see if that helps. It is possible my issues are being caused by the 32-bit compatibility libraries or similar.
Click to expand...
Click to collapse
I just installed ubuntu32, and am going through the repo sync, as soon as that finishes, I'll pack up and head home and finish there, hopefully it compiles on 32bit. I'll post back as soon as i know.
I've considered contacting them that way, I was hoping the community would be interested in getting a few more devs going. I'm downloading the Ubuntu 32-bit ISO now. If you want to send them a message, cool. I'll fool with things a bit more and if I still can't get anywhere, I'll see if I can get in with thouse guys. If I do get it working, I'll try to document everything that's not covered elsewhere. I just hate to take time away from their work to help out a newb.
If you can't build, you can't contribute. The Android build system is somewhat custom and weird, so it can be off-putting to people that would be interested in helping. More people hopefully means we can get more done.
ttabal, seg fault during a "make" usually means it tried to access something that wasn't there. Make sure you have all dependencies installed. Someone said seg fault has to do with memory management ... yeah, only when running an app. When building (aka "make"), there are a lot of things being linked and each thing has a ton of dependencies and that continues recursively ... it's why I hated working with Unix back in the day. You change one thing, you have to change everything and its mother.
Still, I have been frustrated at the lack of progress recently that I am toying with the idea of jumping back in the pool and building things myself. I wish one of the more experienced folks here would offer a primer. I know what they're afraid of though ... every noob coming back with a million questions, like, "what's apt-get?" or "what's a make file?".
Yeah, maybe we should start up an invite-only dev forum and only allow public read-only access to a wiki or something so we can share with everyone. I'd love to be more open, but I do see why the big devs don't do their dev conversations here.
I did install the depandancies they listed on the Cyanogen Wiki, but it is possible they need something new that isn't listed. Hopefully someone can help us out. It's also possible my versions of the libraries need updating as I am on an older build of Ubuntu. I have another machine I can install the newer version on, and I'll try that first. May as well make sure I'm doing everything I can. I just can't install on the other machine as it's a production server for my home system. The wife gets mad if I break the TV server.
I know you are attempting to build the source, and I'm sorry I cannot help you with that. I just wanted to put a link up here for people that are getting inspired by you and are considering contributing to the rom development community.
http://forum.xda-developers.com/showthread.php?t=667298
It's a post by cyanogen about how you should go about getting in to rom development.
I managed to get it to build for Dream/Sapphire by first doing
Code:
#repo init -u git://android.git.kernel.org/platform/manifest.git
THEN
Code:
#repo init -u git://github.com/CyanogenMod/android.git -b froyo
#repo sync
#source build/envsetup.sh
on 64 bit Ubuntu. Did a bit more fidgeting after that to get it working, I'll see if
I can figure it out next time I'm home.
Interesting. I'll try pulling the aosp manifest first. Perhaps that will help. Did you do a repo sync on the aosp or just init?
There was a core dump, so if you have the core.dump file in the same directory where you ran "make" run strings against it, it might tell you what's segfaulted on you.
I got past make adb on Ubuntu 10.04 64-bit. Compile has been going for quite some time now. I haven't tried building a kernel yet.
Will be attempting a build on Monday with my secondary box at work running ubuntu. I have a knack for jury rigging things to work and more than willing to contribute, despite lacking the experience. For reference, you could try to converse with then on irc, freenode.net server, in #cyanogenmod or #sgs_dev, a bit more of a direct line to #teamdouche
Sent from my SGH-T959 using XDA App
ttabbal said:
The G1 was easy to dev for by the time 2.2 came out, and CM was already building on that platform. It's a lot easier to update an existing setup than trying to start on a new platform.
And proof-read, swype isn't perfect.
Click to expand...
Click to collapse
From what I understand (witch is very little) the G1 drivers have all been reverse engineered for some time and building it from source is incredibly easy at this point. While the Galaxy S is incredibly hard to develop for because all the drivers are wrapped up in all the kernel mods Samsung did, even though they open sourced much of it, its hard to unravel the code.
Build completed. Only issues I ran into:
1) repo sync didn't complete at first because I had never talked to android.git.kernel.org. Running "repo init -u git://android.git.kernel.org/platform/manifest.git" as anomalous3 said fixed that.
2) make complained about not being able to find RomManager.apk, so I went into vendor/cyanogen and ran get-rommanager. While I was in there i ran get-google-files and extract-google-files as well, but not sure if that was necessary.
At this point I'm not sure of the kernel requirements for attempting to run this system.img. Until I learn a bit more about the kernel and ramdisk I'm hesitant to do anything with this.
elderberry said:
Build completed. Only issues I ran into:
1) repo sync didn't complete at first because I had never talked to android.git.kernel.org. Running "repo init -u git://android.git.kernel.org/platform/manifest.git" as anomalous3 said fixed that.
2) make complained about not being able to find RomManager.apk, so I went into vendor/cyanogen and ran get-rommanager. While I was in there i ran get-google-files and extract-google-files as well, but not sure if that was necessary.
At this point I'm not sure of the kernel requirements for attempting to run this system.img. Until I learn a bit more about the kernel and ramdisk I'm hesitant to do anything with this.
Click to expand...
Click to collapse
Thanks! I'm running repo sync after the kernel.org init now. I'll see if that gets me building. I don't suggest installing anything you build yet, I want to see if we can get a couple people building before we take that step. Though it looks like we can create some nice update.zips now that flash the kernel and such. Very cool.
Anyone know how to replace parts of a local git with your own repo? I would like to clone my fork of wesgarner's vibrant tree into the main tree so I can do commits and such without messing with anyone else's stuff. git rebase? I'm a little new to git, I've only ever used it for basic stuff that SVN can do.
Looks like the sync is going to take a bit for me. Damn. I'll install the latest Ubuntu in a VM while I'm waiting on it. Who do I have to kill to get FIOS in Utah?
Hmmm... Still no joy for me. Must have done something wrong I guess. Build still segfaults and I don't get a coredump. Weird.
Thanks for the contact info for teamdouche, I'm trying to avoid bothering them until I at least have a working build. This isn't the sort of level one should bother them about IMO.
Looks like you guys are talking to wes and the others
If you guys get it working. I have a build env setup + a build bot. Just let me know
i'm installing the dev support packages right now. i'm worried, though. how much space are we looking at? my linux partition is only 8gb. so i may have to modify some things so it's all on my raid storage.

[Q] Build instruction for Xdandroid for the X1

Hi
I am working on the Kovsky kernel at the moment, but would really like to be able to make changes to the Andoid part of the system as well. Does anyone have build instructions for the XDAndroid system?
I have done cross compiling to various platforms before, so the part I need is:
*What sources to download
*What commands to run
As I didn't get any feedback I have decided to figure it out for myself and publish as I go along:
To get the sources follow the instructions at:
xdandroid.com/wiki/Getting_the_Source
mkdir ~/xdandroid
cd ~/xdandroid
repo init -u git://gitorious.org/xdandroid/manifest.git -b gingerbread
repo sync
Now I have lots of code, and the next step is found at:
xdandroid.com/wiki/Build_Configuration
What I need is a "buildspec.mk" file. If anyone has one that has been used for NAND compiles feel free to share
I have now realized that all the ROMS have been compiled based on CyanogenMod7 source that have separate repositories from xdandroid.
Sp3dev created a repo for some of the kovsky files he used in november last year at: https://github.com/astarasikov/device_kovsky
Next up is integrating them into the cyanogen tree and creating vendor files based on leo/dream
I am starting to piece everything together now. I am still not able to compile it, but I am getting closer:
Here are some steps that have only been tested on an Ubuntu system:
1. Follow the steps here http://wiki.cyanogenmod.com/wiki/HTC_Dream_&_Magic:_Compile_CyanogenMod_(Linux) down to "Install the Repository"
Code:
# 2. Install repository by running (This will take several hours):
cd ~/android/system/
repo init -u git://github.com/CoolRunnerII/android.git -b gb-release-7.2
repo sync
# 3. get the propriatary files from a running phone connected by usb by running. You may need root to do this:
cd ~/android/system/device/htc/kovsky/
./extract-files.sh
# 4. copy vendor file to correct place by running:
cp device/htc/kovsky/cyanogen_kovsky.mk vendor/cyanogen/products
# 5. Get Rom-manager by running
~/android/system/vendor/cyanogen/get-rommanager
# 6. sync repo again by running:
cd ~/android/system/
repo sync
# 7. get ready for compile with:
. build/envsetup.sh
lunch cyanogen_kovsky-eng
# 8. Start compile with:
make
Great news.Hope you can finish it!
Compile now runs to the end
On my system the compile runs to the end when doing the steps above. I have not started packageing it yet, but everything seems to compile correctly.
The other guides recoment running "make bacon" witch are supposed to create a "over the air" OTA package. This crashes when I try it. If anyone has some good information as to how the final packages is supposed to be please share. all the other CM7 roms have folder in the zip fil called META-INF that contain the update script. The .zip-file created by running make does not.
I just added Alex's fork of the gps library from xdandroid to the manifest.
If someone could try the steps above and report to me wether it works on their system or not I would be very thankfull. My goal is to create a streamlined rom build directly from source. That way getting the last issues out of the way should be possible even without guys like Alex working on it.
CoolrunnerII said:
I just added Alex's fork of the gps library from xdandroid to the manifest.
If someone could try the steps above and report to me wether it works on their system or not I would be very thankfull. My goal is to create a streamlined rom build directly from source. That way getting the last issues out of the way should be possible even without guys like Alex working on it.
Click to expand...
Click to collapse
very very nice job!!!!!! currently downloading kovsky repos to check if i can build but it will take hours with slow connection and i've little time cause of exams...
btw: if someone has problems with syncing cause of slow internet repo sync -f is a nice option
EDIT:
in time i'm going to improve cwm recovery (currently porting cwm-touch to another device...)
EDIT2: any chance to add wpa repo to existing working directory?
btw: you could also use a local_manifest.xml for the additional repos... (just if you don't already know ) (would be more official???)
i can't test cause i don't know how to add wpa repo
this should be in android development section... you posted here cause of limited posts right? btw thanks a lot for missed call fix
Yes I posted here due to limited rigths.
I'll start a new thread in the developer section now that I can
Cool runner the rhodium android development forum has a 7.2 build but I don't know how to make work for our device. I pm the maker he said I can use his rom

[Q] Download/Compile CyanogenMod: Missing files?

Hi All,
I'm trying to build CM7 from source but I'm running into a brick wall. Strangely, I did this successfully several months ago on my original dev machine but now it doesn't work on my new machine (Ubuntu 10.04).
Here's my problem: after repo init/sync, there are no devices under device/samsung (other than aries-common, c1-common and charge). Last time, there were dozens of devices, including mine: galaxysmtd. And of course there is no extract-files.sh script.
I followed the instructions exactly as given
wiki.cyanogenmod.org/wiki/Samsung_Galaxy_S:_Compile_CyanogenMod_(Linux)
The repo init/sync seemed to work (took hours), but the devices were missing as described above. I checked the projects as listed in the .repo and they agree with the installed tree (i.e., no devices).
Has something changed? Did I miss something? How can I diagnose the problem? Am I cursed for sins in a former life? Arrrgh.
I'd be very thankful for any guidance.
1) Update to Ubuntu 12.04
or
2) Update your git with
Code:
sudo apt-get install git
or
3)
Code:
repo sync
again.
SOLVED
Hi,
Thanks for the suggestions but I don't think I need to re-install the operating system - that's so Microsoft. I actually did find the problem: there was an omitted step in the instructions. Namely, after the repo sync and before the extract-files, you have to do:
. /build/envsetup.sh
breakfast galaxysmtd​I found this in a CM10 thread
http://forum.xda-developers.com/showthread.php?t=1813924
I suspect that since my last (successful) build, they omitted the collection of devices in the interest of efficiency, and only download a specific device on request per lines above. In any case, it's building successfully now. (I wish they had updated the Gingerbread instructions - it would have saved me days of hair-pulling).

Categories

Resources