[Q] Need a little help with "downloading the source"<SOLVED> - Android Q&A, Help & Troubleshooting

So I have been working all day to get Ubuntu 11.10, Dual-boot on my Laptop. It runs smoothly, I have bee following the instructions from; Initializing a Build Enviroment, From the source.android.com Website. I am trying to get everything I need to be able to develop ROMS. Well I guess that is obvious. I have hit a road block I have tried figuring out for the past 2 hours and I am stumped. my knowledge is moderate on Linux so fair warning if you end up face palming.
I am onto the Downloading the Source tree, and I run into this error:
repo init -u https://andriod.googlesource.com/platform/manifest
No command 'repo' found, did you mean:
Command 'rep' from package 'rep' (universe)
Command 'repl' from package 'nmh' (universe)
Command 'repl' from package 'mailutils-mh' (universe)
repo: command not found
Click to expand...
Click to collapse
can someone point me in the right direction here. All help appreciated.
SOLVED!!!!
After posting I decided to keep tinkering, I found this workaround Here, I only had to do this to install repo instead:
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
chmod a+x ~/bin/repo
PATH=~/bin:$PATH
Click to expand...
Click to collapse
After that you should see it full run and download a bunch of stuff and BAM! there you go. Any questions PM me. Thread closed.

Related

[REF]HowTo build CM9 from source

Made the CM wiki a little easier to understand. Most is taken from here:
http://teamhacksung.org/wiki/index.php/CyanogenMod9:GT-I9100:How_to_build
First off you will need Ubuntu 64-bit for this to work (or one of the many ubuntu editions) I recommend the 11.10 version (will work on 10.x also), as it's the newest stable to date. 32-bit won't work. I'm using Xubuntu 64 bit, and it uses the same terminal codes of course.
Install ADB
Install the Android SDK.
NOTE: You do not need to setup the SDK with an ADV etc., just download and install to get the tools (e.g. adb).
Install the Build Packages
Open the terminal in ubuntu and paste the following code snippets:
To add sun-java to repo (works on various ubuntu versions):
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
To get the needed build packages:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04/11.10 64-bit, but should still build without issue. On 11.10 lib32readline5-dev is no longer available, but lib32readline-gplv2-dev is there instead. Just install it with "apt-get install lib32readline-gplv2-dev"
Create the Directories
You will need to set up some directories in your build environment.
To create them paste these in terminal:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Install the Repository
Enter the following in terminal to download make executable the "repo" binary:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
Code:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync -j16
Retrieve the galaxys2 repo
Code:
. build/envsetup.sh
brunch cm_galaxys2-userdebug
Copy proprietary files
NOTE: This only needs to be done the first time you build, but it's recommended to redo it when TeamHacksung makes some changes to these in their nightlies (which may occur quite often as of now)..
You will need to have a galaxys2 with the latest nightly of CM9 installed, and ADB working on the computer. This script will copy the proprietary files from the device.
Connect the device to the computer and ensure that ADB is working properly.
Paste this into terminal:
Code:
cd ~/android/system/device/samsung/galaxys2/
./extract-files.sh
NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.
Get prebuilts
Code:
~/android/system/vendor/cm/get-prebuilts
Building CyanogenMod
First, check for updates in the source:
Paste into terminal:
Code:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the galaxys2.
Paste into terminal:
Code:
. build/envsetup.sh && brunch cm_galaxys2-userdebug
--------------------
End of tutorial
--------------------
Nice guide, just installed ubuntu on my VAIO to do this kind of stuff.
Thnx
On to setting stuff up...
You should consider getting the build script (build.sh) from teamhacksung's github (https://github.com/teamhacksung/buildscripts) and placing it in your android/system folder.
It allows you to use commands like ./build.sh [devicename] [kernel] to build the version of CM7 you want and optionally will compile your own kernel (if you also have the c1 and aries kernel source)
Other commands it supports:
./build.sh clean - to clear the output folders for a clean build
./build.sh prepare - to pull the latest version of Rom Manager
When I build for the SGS2 my sequence of events are always:
repo sync -j16
./build.sh clean
then either:
./build.sh galaxys2 kernel
if kernel code has changed, or
./build.sh galaxys2
if kernel code has not changed.
Click to expand...
Click to collapse
And after the mentioned build sequence posted above to finalize everything you run the command "build/envsetup.sh && brunch galaxys2" or is that obsolete now ?
HarryRag said:
And after the mentioned build sequence posted above to finalize everything you run the command "build/envsetup.sh && brunch galaxys2" or is that obsolete now ?
Click to expand...
Click to collapse
run all those in terminal... Remember the .
Sent from my GT-I9100 using XDA Premium App
HarryRag said:
And after the mentioned build sequence posted above to finalize everything you run the command "build/envsetup.sh && brunch galaxys2" or is that obsolete now ?
Click to expand...
Click to collapse
If you use the teamhacksung build.sh script then, yes, it is obsolete.
Novek said:
Remember the .
Click to expand...
Click to collapse
Yes, don't forget the period (.) at the start of the ./build.sh command or it won't run.
I was indeed revering to the build.sh from teamhacksung, thnx.
Got another question, is about: repo sync -j16
What does the -j16 stand for?
I'm aware of the . from ./ , just using linux for the first time to do this kind of stuff, using it a few years now for game/web server and playing some around with it.
Novek said:
First of, this is a re-written guide from the cyanogenmod wiki found here. All credit goes to them!
Click to expand...
Click to collapse
the link you gave is for sgs1.
change it with this: http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S_II:_Compile_CyanogenMod_(Linux)
HarryRag said:
Got another question, is about: repo sync -j16
What does the -j16 stand for?
Click to expand...
Click to collapse
To be honest, I don't know. I tried searching the man pages etc but could never find the answer. I use it because it is what is listed on the CM wiki. I have also seen people use -j40 or no setting. They all work.
NISIM2337 said:
the link you gave is for sgs1.
change it with this: http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S_II:_Compile_CyanogenMod_(Linux)
Click to expand...
Click to collapse
Yes, the SGS2 wiki page was published today. It does not contain the teamhacksung buildscript details though as that is specific to teamhacksung.
Well just made to build my first Kang using ./build.sh galaxys2 kernel
Just for now i'm testing to see what the difference is with the other building options.
For doing the ADB install part i started with a Howtoforge page about setting up android app builds since it has a good and very detailed part on how to exactly do all the adb installing stuff etc. (which would stand for this part of the turorial *Install ADB*), very newby friendly
HarryRag said:
What does the -j16 stand for?
Click to expand...
Click to collapse
I think it's the number of the simultaneous connections that will be opened to the server.
Code:
echo "Example: ./build.sh galaxys2 (prebuilt kernel + android)"
echo "Example: ./build.sh galaxys2 kernel (kernel + android)"
As i understand the following from build.sh good. It means that with just the "./build.sh galaxys2" is for stock CM7 kernel as from the source/github after running the sync.
but is "./build.sh galaxys2 kernel (kernel + android)" then for an custom made kernel with tweaks or is this one just for when there is a (bigger) update for the CM7 kernel?
I think you should realse a rom based on cm.
Sent from my GT-I9100 using Tapatalk
Removed...
DvTonder said:
Yes, the SGS2 wiki page was published today. It does not contain the teamhacksung buildscript details though as that is specific to teamhacksung.
Click to expand...
Click to collapse
ok, sorry.
Don't remove anything, don't except defeat, everyone is equal here!
Sent from my Samsung Galactic iPhone Killing Machine S II
Novek said:
Removed due to public harrasment from the "pros"...
Click to expand...
Click to collapse
Wow, that is unexpected! And unfortunate! I was going to follow your extensive guide this evening, such a shame you took it away. I did not notice any harassment here, but i'm sorry you felt it. Hope maybe you and the "pros" can sort this out, because i think such a topic would be really valuable here!!!
mbroeders said:
Wow, that is unexpected! And unfortunate! I was going to follow your extensive guide this evening, such a shame you took it away. I did not notice any harassment here, but i'm sorry you felt it. Hope maybe you and the "pros" can sort this out, because i think such a topic would be really valuable here!!!
Click to expand...
Click to collapse
Agreed : this has great value
Sent from my GT-I9100 using XDA Premium App
Novek said:
Removed due to public harrasment from the "pros"...
Click to expand...
Click to collapse
Please, give us some names, we will know "pros" who don't like to share with others.
Some advanced devs just want to keep there secrets in order to make believe it's too hard for others ...
They would like us to re-invent everything when it exists already. Thats not my vision of linux freedom ...
Or please say us why they insult you ?
Sent from my GT-I9100 using XDA Premium App

[DEV] Solution to android.git.kernel.org being hacked

For people who want to make AOSP ROMs and Not cyanogenMod based ROMs
I have a present for you
Till the android.git.kernel.org is down
I have found a alternative
I have edited the Original "Repo" File to allow flawless syncing of google's resources
They can be found
https://github.com/spaarc/tools_repo
simply use
curl https://github.com/spaarc/tools_repo/blob/master/repo > ~/bin/repo
OR
curl https://github.com/spaarc/tools_repo/repo > ~/bin/repo
and to set git INIT use this command
repo init -u https://github.com/android/platform_manifest.git -b gingerbread
That is about it
Happy Building
First!
And what?
Prodigy said:
First!
And what?
Click to expand...
Click to collapse
How old are you? Stop this first thing. It's getting annoying. Especially when that reply is pointless.
And just read and understand that text.
spaarc provides a solution to get AOSP sources. That's it.
i was so excited when i saw this!!
but its times out on the "repo init -u https://github.com/android/platform_manifest.git -b gingerbread"
looks like its still trying to go to kernel.org
any ideas?
this repo isnt working
i keep getting error at line 1

Guide on how I build my own CM10 test builts

This is a follow up on my "old" "Guide on how I build my own CM9 test builts" thread.
Guide how I build CM10 for my Mango.
For the first time you try to build CM10.
Create ~/bin and download repo to that directory. Afterwards set executable bit to make it possible to ”execute”.
Code:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now reboot the computer.
Create ~/android/system and initialize the repository.
Code:
mkdir -p ~/android/system
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
Unpack the attached local_manifest.xml.bz2 and place local_manifest.xml into ~/android/system/.repo
Synchronise towards the current git repositories.
Code:
repo sync
Setup the environmental settings and initialize the Mango build.
Code:
. build/envsetup.sh
breakfast mango
Initialize the Mango build.
Code:
cd ~/android/system/device/semc/mango/
./setup-makefiles.sh
Download the prebuilts
Code:
~/android/system/vendor/cm/get-prebuilts
Check for new changes
Code:
cd ~/android/system/
repo sync
Setup the environment again and build the ROM (takes long time)
Code:
. build/envsetup.sh
brunch mango
You will now find the build here (change DATE into the date).
~/android/system/out/target/product/mango/cm-10-DATE-UNOFFICIAL-mango.zip
The next times you try to build it, you only need to do the following.
Delete build.prop, if not will build.prop not get generated.
Code:
rm -f ~/android/system/out/target/product/mango/system/build.prop
Syncronise the git repositories.
Code:
cd ~/android/system/
repo sync
Setup the environmental settings.
Code:
. build/envsetup.sh
Configure/build.
Code:
brunch mango
You will now find the build here (change DATE into the date).
~/android/system/out/target/product/mango/cm-10-DATE-UNOFFICIAL-mango.zip
EDIT (August 14. 2012): If the boot.img is not booting, is it most likely due to the bootloader bug.
To make it "work", do the following (replace mango with your own device)
Code:
cd out/target/product/mango/
rm -f ./boot.img ./combinedroot.cpio ./combinedroot.fs ./ramdisk.img
cp ./root/logo.rle ./root/waste_of_space1
cp ./root/logo.rle ./root/waste_of_space2
cp ./combinedroot/logo.rle ./combinedroot/waste_of_space1
cp ./combinedroot/logo.rle ./combinedroot/waste_of_space2
cd ../../../..
brunch mango
just a technical: is it really necessary to reboot the computer after downloading the repo binary? and if so, why is that??
bokrug said:
just a technical: is it really necessary to reboot the computer after downloading the repo binary? and if so, why is that??
Click to expand...
Click to collapse
It is only necessary on some Linux distributions, where you will not be able to execute anything from that directory, before a reboot. You can try to see if you can do it without. If it is working, do you not need it.
hnl_dk said:
It is only necessary on some Linux distributions, where you will not be able to execute anything from that directory, before a reboot. You can try to see if you can do it without. If it is working, do you not need it.
Click to expand...
Click to collapse
There's no really need to reboot - edit .bashrc in your home directory and add
Code:
export PATH=~/bin/:$PATH
Save, then run:
Code:
source ~/.bashrc
It have to work on all distros
pikpok said:
There's no really need to reboot - edit .bashrc in your home directory and add
Code:
export PATH=~/bin/:$PATH
Save, then run:
Code:
source ~/.bashrc
It have to work on all distros
Click to expand...
Click to collapse
I just want to show the "universal" way.
Not everyone is using bash
hnl_dk said:
I just want to show the "universal" way.
Not everyone is using bash
Click to expand...
Click to collapse
If someone use another shell, e.g. zsh, then he'll know what files he have to edit IMO rebooting is wasting time.
pikpok said:
If someone use another shell, e.g. zsh, then he'll know what files he have to edit IMO rebooting is wasting time.
Click to expand...
Click to collapse
no it is not, as you do not need to edit any files. It will work automatically.
It is as much a waste of time to edit the resource-definition scripts.
hnl_dk said:
no it is not, as you do not need to edit any files. It will work automatically.
It is as much a waste of time to edit the resource-definition scripts.
Click to expand...
Click to collapse
Reboot - about 1 min
Edit one file and paste single command in terminal - for me it's 10secs
But it comes to offtop discussion, so it would be better to end it now
@edit - now when I think about it... bin in home folder won't be added to PATH automatically, at least in Arch Linux. Maybe Ubuntu is more "intelligent" :laugh:
pikpok said:
Reboot - about 1 min
Edit one file and paste single command in terminal - for me it's 10secs
But it comes to offtop discussion, so it would be better to end it now
@edit - now when I think about it... bin in home folder won't be added to PATH automatically, at least in Arch Linux. Maybe Ubuntu is more "intelligent" :laugh:
Click to expand...
Click to collapse
It does not take that long for me to make a reboot
No matter what, is it always good to have more methods to make something work.
It did the last time I tried Arch Linux... and no I am not using Ubuntu (too flashy for me )
Assuming that there is an entry in your ~/.profile that adds ~/bin to PATH, a reboot won't do anything that logout/login wouldn't. Furthermore, logout/login (in this case) won't do anything that sourcing ~/.profile wouldn't. So, simply issuing "source ~/.profile" is sufficient on most distributions. If you are using a distribution or a shell that doesn't do this by default, then you probably already know what you need to do.
I do, however, commend hnl_dk's efforts to make things simpler for newcomers to Android and Linux, even if it's not the the "fastest" or the "best" way. Whenever you start getting into one of those "what if?" arguments, things tend to spiral out of control. Sometimes it's better to just make a few assumptions and go with what is most likely to work.
A reboot might be a bit of an overkill, though. :laugh:
Can't run 64-bit prebuilts on my 32-bit Linux
I have a 32-bit Linux box so get the errors:
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: cannot execute binary file
Had a quick look around, but are there gcc etc. prebuilts for 32-bit Linux boxes?
TIA,
AK-A
ak-a said:
I have a 32-bit Linux box so get the errors:
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: cannot execute binary file
Had a quick look around, but are there gcc etc. prebuilts for 32-bit Linux boxes?
TIA,
AK-A
Click to expand...
Click to collapse
Did you try to build it as described?
It is working fine on my 32bit debian machine.
If not, please describe hos you try it build it.
hnl_dk said:
Did you try to build it as described?
It is working fine on my 32bit debian machine.
If not, please describe hos you try it build it.
Click to expand...
Click to collapse
Yeah, followed the instructions as per the first post. Will re-try and see if I missed/messed something and report back.
Hey !!! Do you think I should post my AOSP errors in this thread...so that its easier for us to keep track..?? :highfive:
As this is a Tutorial Thread for "how to build cm10 on your own" I don't think it makes sense posting errormessages of errm. "android open source project"? As I am writing this I recognize that I do not really understand what you mean.
CosmoDroid said:
Hey !!! Do you think I should post my AOSP errors in this thread...so that its easier for us to keep track..?? :highfive:
Click to expand...
Click to collapse
Like Snoopo is saying, should that be in this thread. Compiling AOSP is not as "user friendly" as CM, as our devices are officially supported by CM and not AOSP.
If you want, can you make a new thread about compiling "AOSP - Jelly bean".
i always stop at "repo sync"
i always stop at "repo sync"
and it always tell me
"Fetching projects: 21% (66/313) fatal: unable to connect to github.com:
github.com[0: 207.97.227.239]: errno=??????"
can you help me
thanks
shufuking said:
i always stop at "repo sync"
and it always tell me
"Fetching projects: 21% (66/313) fatal: unable to connect to github.com:
github.com[0: 207.97.227.239]: errno=??????"
can you help me
thanks
Click to expand...
Click to collapse
Same also happens for me, then I try again and again and again and then it is working.
Lots of people are accessing github, and there is only a limited "whole" for the data to get through.
hnl_dk said:
Same also happens for me, then I try again and again and again and then it is working.
Lots of people are accessing github, and there is only a limited "whole" for the data to get through.
Click to expand...
Click to collapse
thanks for your suggestion
finally i make it.
another question.
when i perform " brunch smultron"
i got lots of "cannot execute binary file"
and final "make: *** [out/target/product/smultron/obj/lib/crtbegin_static.o] Error 126"
do you know what it means?
shufuking said:
thanks for your suggestion
finally i make it.
another question.
when i perform " brunch smultron"
i got lots of "cannot execute binary file"
and final "make: *** [out/target/product/smultron/obj/lib/crtbegin_static.o] Error 126"
do you know what it means?
Click to expand...
Click to collapse
without more details, my best guess is that you may be building it on a FAT32 or NTFS partition?
then there is a good chance that linux is not able to read the executable bits.

[GUIDE] How to Setup Ubuntu 16.04 LTS Xenial Xerus for Compiling Android ROMs

--- reprinted with permission from nathanpfry.com ---
--- If you would rather use a ready-to-go Virtual Machine based on these instructions, check out this post! ---​
With a new version of Ubuntu comes an update to my guide for setting up a build environment to compile Android ROMs. The aim of this is to simplify the configuration process and teach a little bit about the command line.
Follow the directions step-by-step. All you have to do is copy and paste the code in order, it will be up and running in no time!
This guide applies to all variations of Ubuntu 16.04 LTS Xenial Xerus 64 bit. Do not use the 32 Bit version.
Also, PAY CLOSE ATTENTION when to use "sudo" and when to not. It can cause unexpected issues if you do something as root that you shouldn't.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
Ready to begin?
1) Unless it's a completely fresh Ubuntu installation, many people might have the wrong version of Java installed. Let's fix that first.
The command below makes sure you're starting with a clean slate. Copy and paste it into a terminal (command prompt) window:
Code:
sudo apt-get remove openjdk-* icedtea-* icedtea6-*
If necessary, follow the on-screen instructions to remove any stray Java versions. Otherwise, move on to the next step.
2) Install the main build tools with this command:
Code:
sudo apt-get install git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng maven libc6-dev linux-libc-dev gcc-multilib g++-5-multilib libssl-dev
3) "repo" communicates with git servers for all that precious source code. The next command will grab it:
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
4) Use your favorite text editor to open ~/.bashrc - I like nano:
Code:
nano ~/.bashrc
5) At the very bottom (use the Page Down key) paste this code to a new line:
Code:
export PATH=~/bin:$PATH
export USE_CCACHE=1
6) Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
source ~/.bashrc
7) In the terminal, navigate to where you would like to download the Android source code. The commands below will make it in your home folder, but if you have limited space you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external (even 3.0) will be comparatively slow. Here we go:
Code:
mkdir ~/android
cd ~/android
8) Now you're going to initialize the repo. This is where you decide the flavor of Android you want to build, i.e. AOKP, CyanogenMod, AOSP etc.
For the purposes of this tutorial, here's the command for Cyanogenmod 13 (Marshmallow) :
Code:
repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
9) Time to get the source, many gigabytes of downloading await.
Don't worry, it's automated. It's the last one!
Code:
repo sync
Check back periodically every hour or so. It all depends on how fast your connection is.
10) Now, for Java. Some ROMs (Android Lollipop / CM 12.1 and below) require OpenJDK 7. Marshmallow / CM 13 and above require OpenJDK 8. If you're building for reallllllly old devices, OpenJDK 6. Here's the easiest way to install on Ubuntu 16.04.
First, add the PPA for OpenJDK:
Code:
sudo add-apt-repository ppa:openjdk-r/ppa
Then, install the appropriate version of Java. In this case we're going to use 7, because it's popular. Simply replace openjdk-7-jdk with 6 or 8 as needed.
Code:
sudo apt-get update && sudo apt-get install openjdk-7-jdk
That's it! Everything should be ready to go.
If this guide helped you out, feel free to click the Thanks! button or donate to the new hardware fund​
Observations
I just happened to have a literally minutes-old ISO download of this version of Kubuntu (release - replacing beta 2) ready to install when I saw this, therefore I followed it to the T.
It was, in fact, helped that I did the repo sync prior to washing my hands before dinner.
After eating, putting away leftovers, etc. (the usual post-dinner cleanup detail), I came back to find the repo sync had completed.
Next was installing openjdk8 - only to find that it had, in fact, been already grabbed when I grabbed the prereqs - then I remembered why. Between Wiley and Xenial, both JDK and OpenJDK had finished their respective transitions from 7 to 8. Still, better safe than sorry - after making sure that both the Java-related settings matched (the last two sudos), I ran repo sync one last time before writing this post.
All five hundred sixteen projects in the CM-13 tree.
What helped - having loads of bandwidth. (No - I'm not on a college connection; I have a DOCSIS 3.0 cable modem - specifically an ARRIS SurfBoard SB-6183 - and Comcast's second SLOWEST DOCSIS 3 tier (Performance Pro) - which is STILL a frigging crapton of bandwidth; I've generally hit ten megaBYTES per second of transfer when connecting via Team Akamai - no git connection is gonna tax that.
Unless there is a massive-to-monstrous surge in projects against CM-13's tree, not a single subsequent repo sync will be as massive as the first one - which itself was less than thirty minutes.
(Each repo sync after the first downloads/uploads only the CHANGES in the tree - it's the FIRST sync that's the time and bandwidth eater due to it pulling the entire tree.)
Is there a way to install JDK-7 in 16.04 ? Some Roms needed JDK7
NoN1979 said:
Is there a way to install JDK-7 in 16.04 ? Some Roms needed JDK7
Click to expand...
Click to collapse
OP updated with directions at the bottom. Thanks for the support!
@sylentprofet thanks for this guide man:good:
sylentprofet said:
OP updated with directions at the bottom. Thanks for the support!
Click to expand...
Click to collapse
hi may i ask for some help here? compiling cm-12.1 on ubuntu 16.04. does my errors are related with 16.04 ? i had no problem with 15.10. thank you.
http://pastebin.com/1X0WcZAr
I set my ubuntu 16.04 lts like your guide thread, But I build CM 12.1, It show me 'unsupported reloc 43 against global symbol stderr'
Code:
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: ~/cm12/out/host/linux-x86/obj32/EXECUTABLES/third_party_libvpx_libvpx_obj_int_extract_arm_host_gyp_intermediates/third_party/libvpx/source/libvpx/build/make/obj_int_extract.o: unsupported reloc 43 against global symbol stderr
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: ~/cm12/out/host/linux-x86/obj32/EXECUTABLES/third_party_libvpx_libvpx_obj_int_extract_arm_host_gyp_intermediates/third_party/libvpx/source/libvpx/build/make/obj_int_extract.o: unsupported reloc 43 against global symbol stderr
external/chromium_org/third_party/libvpx/source/libvpx/build/make/obj_int_extract.c:31: error: unsupported reloc 43
external/chromium_org/third_party/libvpx/source/libvpx/build/make/obj_int_extract.c:787: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to fix it?
It show always what I build Android ROMs. :/
CNBLACK said:
I set my ubuntu 16.04 lts like your guide thread, But I build CM 12.1, It show me 'unsupported reloc 43 against global symbol stderr'
Code:
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: ~/cm12/out/host/linux-x86/obj32/EXECUTABLES/third_party_libvpx_libvpx_obj_int_extract_arm_host_gyp_intermediates/third_party/libvpx/source/libvpx/build/make/obj_int_extract.o: unsupported reloc 43 against global symbol stderr
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: ~/cm12/out/host/linux-x86/obj32/EXECUTABLES/third_party_libvpx_libvpx_obj_int_extract_arm_host_gyp_intermediates/third_party/libvpx/source/libvpx/build/make/obj_int_extract.o: unsupported reloc 43 against global symbol stderr
external/chromium_org/third_party/libvpx/source/libvpx/build/make/obj_int_extract.c:31: error: unsupported reloc 43
external/chromium_org/third_party/libvpx/source/libvpx/build/make/obj_int_extract.c:787: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to fix it?
It show always what I build Android ROMs. :/
Click to expand...
Click to collapse
Same problem here, see post above
desalesouche said:
Same problem here, see post above
Click to expand...
Click to collapse
humm.. I found solution this issue, but It is temporarily solution.
Code:
ln -sf /usr/bin/ld.gold /home/(your account name)/(build source repository)/prebuilts/gcc/linux-x86/host/(glibc version)/x86_64-linux/bin/ld
check your glibc version in terminal error line.
And If you find it, You need to type this command. And It'll be work.
And It has a one more problem.
Code:
mkdir -p /home/cnblack/build/sgs2/12.1/out/target/product/i9100/obj/PACKAGING/recovery_patch_intermediates/
PATH=/home/cnblack/build/sgs2/12.1/out/host/linux-x86/bin:$PATH /home/cnblack/build/sgs2/12.1/out/host/linux-x86/bin/imgdiff /home/cnblack/build/sgs2/12.1/out/target/product/i9100/boot.img /home/cnblack/build/sgs2/12.1/out/target/product/i9100/recovery.img /home/cnblack/build/sgs2/12.1/out/target/product/i9100/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p
Error: inflate failed [invalid block type] at file offset [2535779]
imgdiff only supports gzip kernel compression, did you try CONFIG_KERNEL_LZO?
failed to break apart target image
I don't know Why I have to fix this trouble :/
BuilduntuVM
@sylentprofet: Thanks a lot for that guide.
Do you consider to release an Ubuntu 16.04 LTS based BuilduntuVM (http://forum.xda-developers.com/showthread.php?t=2585828) sometime?
revuwa said:
@sylentprofet: Thanks a lot for that guide.
Do you consider to release an Ubuntu 16.04 LTS based BuilduntuVM (http://forum.xda-developers.com/showthread.php?t=2585828) sometime?
Click to expand...
Click to collapse
Yes, definitely!
I started work on it, but ran into some issues with the installation process. Once everything is working nicely I'll post an update.
Thanks for the support!
CNBLACK said:
And It has a one more problem.
I don't know Why I have to fix this trouble :/
Click to expand...
Click to collapse
It looks like you're compiling CM 12.1, which is based on Lollipop.
Are you using OpenJDK 7 instead of 8? L uses 7 to compile, 8 is only for M onward.
There are directions at the bottom of the post to switch back to OpenJDK 7 if needed.
Reserved
CNBLACK said:
I set my ubuntu 16.04 lts like your guide thread, But I build CM 12.1, It show me 'unsupported reloc 43 against global symbol stderr'
Code:
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: ~/cm12/out/host/linux-x86/obj32/EXECUTABLES/third_party_libvpx_libvpx_obj_int_extract_arm_host_gyp_intermediates/third_party/libvpx/source/libvpx/build/make/obj_int_extract.o: unsupported reloc 43 against global symbol stderr
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: ~/cm12/out/host/linux-x86/obj32/EXECUTABLES/third_party_libvpx_libvpx_obj_int_extract_arm_host_gyp_intermediates/third_party/libvpx/source/libvpx/build/make/obj_int_extract.o: unsupported reloc 43 against global symbol stderr
external/chromium_org/third_party/libvpx/source/libvpx/build/make/obj_int_extract.c:31: error: unsupported reloc 43
external/chromium_org/third_party/libvpx/source/libvpx/build/make/obj_int_extract.c:787: error: unsupported reloc 43
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to fix it?
It show always what I build Android ROMs. :/
Click to expand...
Click to collapse
I used this fix from cyanogenMOD to solve that issue......good luck
for:
art / build/Android.common_build.mk
# Clang build support.
# Host.
ART_HOST_CLANG := false
- ifneq ($(WITHOUT_HOST_CLANG),true)
+ ifeq ($(WITHOUT_HOST_CLANG),false)
# By default, host builds use clang for better warnings.
ART_HOST_CLANG := true
endif
REF: http://review.cyanogenmod.org/#/c/120824/2/build/Android.common_build.mk
fgdn17 said:
I used this fix from cyanogenMOD to solve that issue......good luck
for:
art / build/Android.common_build.mk
# Clang build support.
# Host.
ART_HOST_CLANG := false
- ifneq ($(WITHOUT_HOST_CLANG),true)
+ ifeq ($(WITHOUT_HOST_CLANG),false)
# By default, host builds use clang for better warnings.
ART_HOST_CLANG := true
endif
REF: http://review.cyanogenmod.org/#/c/120824/2/build/Android.common_build.mk
Click to expand...
Click to collapse
I have it does not work, to build 12.1
should have specified: Marshmallow, doesn't work on Lollipop....
the "real" issue appears to be with libc6 and binutils
libc6 = 2.19-22
binutils = 2.25-4
seems depending on your combination of these sometimes a build works
correctly and sometimes not......so until a stable combo is pushed...this is a temp fix IMO
OP here.
Would it be more helpful for everyone if I separated the installation of OpenJDK into a different step, so you guys can choose 7 or 8 depending on which version of Android being built?
Thanks for the responses everyone!
CNBLACK said:
humm.. I found solution this issue, but It is temporarily solution.
Code:
ln -sf /usr/bin/ld.gold /home/(your account name)/(build source repository)/prebuilts/gcc/linux-x86/host/(glibc version)/x86_64-linux/bin/ld
check your glibc version in terminal error line.
And If you find it, You need to type this command. And It'll be work.
Click to expand...
Click to collapse
using this method , and the results worked well , thanks dude
qoejohn said:
using this method , and the results worked well , thanks dude
Click to expand...
Click to collapse
It just only work in CM 12.1, CM 13.0 is not needed to do this method

Building kernel for Google Pixel 3 - Syntax error: "(" unexpected

Following theese instructions on the AOSP site "Building Kernels"
repo init -u android.googlesource.com/kernel/manifest -b android-msm-bluecross-4.9-pie-qpr1
repo sync
sh build/build.sh //This command throws an error.
sh build/build.sh
build/build.sh: 97: build/build.sh: Syntax error: "(" unexpected
This is line 97:
function rel_path() {
So it triggers on the parenthesis. Ive googled a little back and forth. And as far as I can tell - this error triggers because of missing shebang line. The document starts with a shebang line:
#!/bin/bash
Not sure whats wrong - Should I roll back to 18.04 or 14.04?
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
michaelburrow189 said:
Following theese instructions on the AOSP site "Building Kernels"
repo init -u android.googlesource.com/kernel/manifest -b android-msm-bluecross-4.9-pie-qpr1
repo sync
sh build/build.sh //This command throws an error.
sh build/build.sh
build/build.sh: 97: build/build.sh: Syntax error: "(" unexpected
This is line 97:
function rel_path() {
So it triggers on the parenthesis. Ive googled a little back and forth. And as far as I can tell - this error triggers because of missing shebang line. The document starts with a shebang line:
#!/bin/bash
Not sure whats wrong - Should I roll back to 18.04 or 14.04?
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
Click to expand...
Click to collapse
Welcome to the wonderful world of missing android documentation! rel_path appears to be a deprecated function of realpath. This is all stackexchange knows about it, and the android developer website gives me nothing useful. The only suggested fix I found is to try installing realpath and coreutils again.
Run,
sudo apt-get install coreutils
sudo apt-get install realpath
Then try building again. If you still get an error at the parentheses, then try putting a space between rel_path() so it's rel_path (). If you still get an error after that, then I'm out of ideas. I sincerely wish you luck navigating the horrible mess that is android source code.
Spaceminer said:
Welcome to the wonderful world of missing android documentation! rel_path appears to be a deprecated function of realpath. This is all stackexchange knows about it, and the android developer website gives me nothing useful. The only suggested fix I found is to try installing realpath and coreutils again.
Run,
sudo apt-get install coreutils
sudo apt-get install realpath
Then try building again. If you still get an error at the parentheses, then try putting a space between rel_path() so it's rel_path (). If you still get an error after that, then I'm out of ideas. I sincerely wish you luck navigating the horrible mess that is android source code.
Click to expand...
Click to collapse
Code:
sudo apt-get install realpath
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package realpath is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
manpages-pl manpages-fr-extra
E: Package 'realpath' has no installation candidate
Code:
type -a realpath
realpath is /usr/bin/realpath
Installing manpages-pl and manpages-fr-ekstra did work though.
But it is throwing me the same parenthesis error as before. Thanks though! I thought building the clean kernel would work kind'a smooth.

Categories

Resources