Compiling one last build of CM9 to CM10.2 for galaxy player 4.0 - Samsung Galaxy Player 4.0, 5.0

Now that the galaxy player 4.0 has a stable 3.0 kernel and the hardware appears to be working. I am thinking of attempting to do one last build of cm9 to cm10.2 based on the current 3.0 kernel source and device tree. I was just curios to see who would be interested.
I think having one final build of the older versions of cyanogenmod would give people options if they think cm11 runs a little slow.

dorfd1 said:
Now that the galaxy player 4.0 has a stable 3.0 kernel and the hardware appears to be working. I am thinking of attempting to do one last build of cm9 to cm10.2 based on the current 3.0 kernel source and device tree. I was just curios to see who would be interested.
I think having one final build of the older versions of cyanogenmod would give people options if they think cm11 runs a little slow.
Click to expand...
Click to collapse
That's a nice idea! I thought of doing a last cm10.2 because it was known to be "smoother" than cm11 but I never got the time to do it. (because of school) You decide whether to do it or not.
Envoyé de mon Nexus 7 en utilisant Tapatalk

zaclimon said:
That's a nice idea! I thought of doing a last cm10.2 because it was known to be "smoother" than cm11 but I never got the time to do it. (because of school) You decide whether to do it or not.
Envoyé de mon Nexus 7 en utilisant Tapatalk
Click to expand...
Click to collapse
my benifit for doing this would be getting more experience in compiling roms.

Code:
curl: (22) The requested URL returned error: 404
Server does not provide clone.bundle; ignoring.
is the error I get during repo sync. Happens no matter what version I try to sync.

dorfd1 said:
Code:
curl: (22) The requested URL returned error: 404
Server does not provide clone.bundle; ignoring.
is the error I get during repo sync. Happens no matter what version I try to sync.
Click to expand...
Click to collapse
Hmm what command do you use while syncing? Also it would be best to compile each CM version in a different folder.
Also for the branches:
ics for CM9
jellybean for CM10
cm-10.1 for CM10.1
cm-10.2 for CM10.2
It could be possible that you used cm-9 while it's not the right branch. Just a quick note.

I used cm-9.1 for ICS. But I also tried syncing cm12 and had the same issue.

dorfd1 said:
I used cm-9.1 for ICS. But I also tried syncing cm12 and had the same issue.
Click to expand...
Click to collapse
Hmm okk well CM had a bit of issues so actually you could used cm-9.1.0 to build but the thing is, this branch was frozen code prior to the release of CM9.1 and does not feature the latest commits from the ICS branch of CM which is why the best would be to use the ics branch instead of the cm-9.1.0. Also for CM12, it's cm-12.0 and not cm-12. You can check the manifest to be sure that the branch you're entering while doing repo init fits for the branch for the version you wish compiling to.
https://github.com/CyanogenMod/android

zaclimon said:
Hmm okk well CM had a bit of issues so actually you could used cm-9.1.0 to build but the thing is, this branch was frozen code prior to the release of CM9.1 and does not feature the latest commits from the ICS branch of CM which is why the best would be to use the ics branch instead of the cm-9.1.0. Also for CM12, it's cm-12.0 and not cm-12. You can check the manifest to be sure that the branch you're entering while doing repo init fits for the branch for the version you wish compiling to.
https://github.com/CyanogenMod/android
Click to expand...
Click to collapse
when I said cm12 I meant cm-12.0. I'm gonna try to resync tomorrow

NVM I haven't read enough it seems...

I'm still getting
Code:
curl: (22) The requested URL returned error: 404
Server does not provide clone.bundle; ignoring.
will the code still sync?

dorfd1 said:
I'm still getting
Code:
curl: (22) The requested URL returned error: 404
Server does not provide clone.bundle; ignoring.
will the code still sync?
Click to expand...
Click to collapse
Are you getting this for every time or it shows once in a while?
Envoyé de mon Nexus 7 en utilisant Tapatalk

zaclimon said:
Are you getting this for every time or it shows once in a while?
Envoyé de mon Nexus 7 en utilisant Tapatalk
Click to expand...
Click to collapse
I am getting this every time.

dorfd1 said:
I am getting this every time.
Click to expand...
Click to collapse
I don't think the code would get synced at this time. I'll try to sync CM12's source tomorrow to see if I get the same problem as you. Also sometimes your internet connection could be the cause (but I highly doubt this as I guess that it was working perfectly fine before)

zaclimon said:
I don't think the code would get synced at this time. I'll try to sync CM12's source tomorrow to see if I get the same problem as you. Also sometimes your internet connection could be the cause (but I highly doubt this as I guess that it was working perfectly fine before)
Click to expand...
Click to collapse
I think it synced the source code fine.
I fixed it.

Code:
target Prebuilt: (/home/owner/android/system/out/target/product/ypg1/kernel)
Boot image: /home/owner/android/system/out/target/product/ypg1/boot.img
/home/owner/android/system/out/host/linux-x86/bin/acp /home/owner/android/system/out/target/product/ypg1/boot.img /home/owner/android/system/out/target/product/ypg1/recovery.img
Package target files: /home/owner/android/system/out/target/product/ypg1/obj/PACKAGING/target_files_intermediates/cm_ypg1-target_files-eng.owner.zip
Package OTA: /home/owner/android/system/out/target/product/ypg1/cm_ypg1-ota-eng.owner.zip
./build/tools/releasetools/ota_from_target_files -v \
-p /home/owner/android/system/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=true \
--override_device=YP-G1,ypg1 \
/home/owner/android/system/out/target/product/ypg1/obj/PACKAGING/target_files_intermediates/cm_ypg1-target_files-eng.owner.zip /home/owner/android/system/out/target/product/ypg1/cm_ypg1-ota-eng.owner.zip
unzipping target target-files...
running: unzip -o -q /home/owner/android/system/out/target/product/ypg1/obj/PACKAGING/target_files_intermediates/cm_ypg1-target_files-eng.owner.zip -d /tmp/targetfiles-ZOgowC
recovery: unknown option "defaults"
boot: unknown option "defaults"
cache: unknown option "defaults"
datadata: unknown option "defaults"
/dev/lvpool/system: unknown option "ro"
/dev/lvpool/userdata: unknown option "noatime"
/dev/lvpool/userdata: unknown option "nodev"
/dev/lvpool/userdata: unknown option "nosuid"
/dev/lvpool/userdata: unknown option "nomblk_io_submit"
/dev/lvpool/userdata: unknown option "errors=panic"
/devices/platform/s3c-sdhci.0/mmc_host/mmc0: unknown option "defaults"
/devices/platform/s3c-sdhci.2/mmc_host/mmc1: unknown option "defaults"
/dev/block/zram0: unknown option "defaults"
--- target info ---
blocksize = (int) 131072
default_system_dev_certificate = (str) build/target/product/security/testkey
extfs_sparse_flag = (str) -s
fs_type = (str) ext4
fstab = (dict) {'recovery': <common.Partition object at 0x250c050>, '/devices/platform/s3c-sdhci.0/mmc_host/mmc0': <common.Partition object at 0x250c290>, 'cache': <common.Partition object at 0x250c150>, 'boot': <common.Partition object at 0x250c110>, '/dev/block/zram0': <common.Partition object at 0x250c2d0>, '/dev/lvpool/system': <common.Partition object at 0x250c1d0>, '/devices/platform/s3c-sdhci.2/mmc_host/mmc1': <common.Partition object at 0x250c310>, 'datadata': <common.Partition object at 0x250c190>, '/dev/lvpool/userdata': <common.Partition object at 0x250c250>}
mkyaffs2_extra_flags = (str) -c 4096 -s 128
recovery_api_version = (int) 2
system_size = (int) 395264000
tool_extensions = (str) device/samsung/ypg1
using device-specific extensions in device/samsung/ypg1
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 863, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 831, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files", line 401, in WriteFullOTAPackage
script.Mount("/system")
File "/home/owner/android/system/build/tools/releasetools/edify_generator.py", line 155, in Mount
p = fstab[mount_point]
KeyError: '/system'
make: *** [/home/owner/android/system/out/target/product/ypg1/cm_ypg1-ota-eng.owner.zip] Error 1
Cyanogenmod 10 compiled fine but this happens when it trys to create the zip.

dorfd1 said:
Code:
target Prebuilt: (/home/owner/android/system/out/target/product/ypg1/kernel)
Boot image: /home/owner/android/system/out/target/product/ypg1/boot.img
/home/owner/android/system/out/host/linux-x86/bin/acp /home/owner/android/system/out/target/product/ypg1/boot.img /home/owner/android/system/out/target/product/ypg1/recovery.img
Package target files: /home/owner/android/system/out/target/product/ypg1/obj/PACKAGING/target_files_intermediates/cm_ypg1-target_files-eng.owner.zip
Package OTA: /home/owner/android/system/out/target/product/ypg1/cm_ypg1-ota-eng.owner.zip
./build/tools/releasetools/ota_from_target_files -v \
-p /home/owner/android/system/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=true \
--override_device=YP-G1,ypg1 \
/home/owner/android/system/out/target/product/ypg1/obj/PACKAGING/target_files_intermediates/cm_ypg1-target_files-eng.owner.zip /home/owner/android/system/out/target/product/ypg1/cm_ypg1-ota-eng.owner.zip
unzipping target target-files...
running: unzip -o -q /home/owner/android/system/out/target/product/ypg1/obj/PACKAGING/target_files_intermediates/cm_ypg1-target_files-eng.owner.zip -d /tmp/targetfiles-ZOgowC
recovery: unknown option "defaults"
boot: unknown option "defaults"
cache: unknown option "defaults"
datadata: unknown option "defaults"
/dev/lvpool/system: unknown option "ro"
/dev/lvpool/userdata: unknown option "noatime"
/dev/lvpool/userdata: unknown option "nodev"
/dev/lvpool/userdata: unknown option "nosuid"
/dev/lvpool/userdata: unknown option "nomblk_io_submit"
/dev/lvpool/userdata: unknown option "errors=panic"
/devices/platform/s3c-sdhci.0/mmc_host/mmc0: unknown option "defaults"
/devices/platform/s3c-sdhci.2/mmc_host/mmc1: unknown option "defaults"
/dev/block/zram0: unknown option "defaults"
--- target info ---
blocksize = (int) 131072
default_system_dev_certificate = (str) build/target/product/security/testkey
extfs_sparse_flag = (str) -s
fs_type = (str) ext4
fstab = (dict) {'recovery': <common.Partition object at 0x250c050>, '/devices/platform/s3c-sdhci.0/mmc_host/mmc0': <common.Partition object at 0x250c290>, 'cache': <common.Partition object at 0x250c150>, 'boot': <common.Partition object at 0x250c110>, '/dev/block/zram0': <common.Partition object at 0x250c2d0>, '/dev/lvpool/system': <common.Partition object at 0x250c1d0>, '/devices/platform/s3c-sdhci.2/mmc_host/mmc1': <common.Partition object at 0x250c310>, 'datadata': <common.Partition object at 0x250c190>, '/dev/lvpool/userdata': <common.Partition object at 0x250c250>}
mkyaffs2_extra_flags = (str) -c 4096 -s 128
recovery_api_version = (int) 2
system_size = (int) 395264000
tool_extensions = (str) device/samsung/ypg1
using device-specific extensions in device/samsung/ypg1
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 863, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 831, in main
WriteFullOTAPackage(input_zip, output_zip)
File "./build/tools/releasetools/ota_from_target_files", line 401, in WriteFullOTAPackage
script.Mount("/system")
File "/home/owner/android/system/build/tools/releasetools/edify_generator.py", line 155, in Mount
p = fstab[mount_point]
KeyError: '/system'
make: *** [/home/owner/android/system/out/target/product/ypg1/cm_ypg1-ota-eng.owner.zip] Error 1
Cyanogenmod 10 compiled fine but this happens when it trys to create the zip.
Click to expand...
Click to collapse
cm 10 probably uses and older version of fstab... Are you using the cm-11.0 tree?
https://github.com/bbelos/android_device_samsung_ypg1/blob/cm-10.1/recovery.fstab
EDIT: * I meant to ask "Are you using the cm-11.0 device tree?"

@dorfd1 For the sake of consistency between the versions, I think it would be better to not change the partition layout (which is expressed with the errors from your compiling). Also there's some stuff in the CM11 tree that won't work with the older CM versions. The best option would be the port-foward the newer fixes to the old CM's.

Related

[Q] Setting up a 4.2.1 Build Environment (Need help)

Currently,
I'm trying to set up a build environment for JB 4.2.1 (CM10.1)... I've got the repo synced, and everything looks good, however, I'm still unsure how to add the necessary Nook files, this is really my first time attempting any type of development, although i'm fairly familiar with linux.
I've followed the instructions found here (changing the device and vendor) and where I'm stuck at is creating the local_manifest.xml, doesn't matter what i put in, it tells me that the repo's don't exist, or my public keys don't work.
so i guess, to build CM10.1 for the nook tablet, what do i need to put in this manifest file?
Any help would be appretiated, i'm available on google talk as "[email protected]" (text only) if someone is able to walk me through this.
DarkShr0ud said:
Currently,
I'm trying to set up a build environment for JB 4.2.1 (CM10.1)... I've got the repo synced, and everything looks good, however, I'm still unsure how to add the necessary Nook files, this is really my first time attempting any type of development, although i'm fairly familiar with linux.
I've followed the instructions found here (changing the device and vendor) and where I'm stuck at is creating the local_manifest.xml, doesn't matter what i put in, it tells me that the repo's don't exist, or my public keys don't work.
so i guess, to build CM10.1 for the nook tablet, what do i need to put in this manifest file?
Any help would be appretiated, i'm available on google talk as "[email protected]" (text only) if someone is able to walk me through this.
Click to expand...
Click to collapse
I'm having a similar problem with my repo
i get this, whenever i'm attempting to sync with something in my local_manifest.xml file
Code:
[email protected]:~/android/system$ repo sync
Traceback (most recent call last):
File "/home/hinxman/android/system/.repo/repo/main.py", line 408, in <module>
_Main(sys.argv[1:])
File "/home/hinxman/android/system/.repo/repo/main.py", line 388, in _Main
result = repo._Run(argv) or 0
File "/home/hinxman/android/system/.repo/repo/main.py", line 122, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/hinxman/android/system/.repo/repo/command.py", line 45, in OptionParser
self._Options(self._optparse)
File "/home/hinxman/android/system/.repo/repo/subcmds/sync.py", line 147, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 256, in default
self._Load()
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 302, in _Load
nodes.append(self._ParseManifestXml(local, self.repodir))
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 313, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 13, column 2
[email protected]:~/android/system$
hinxman said:
I'm having a similar problem with my repo
i get this, whenever i'm attempting to sync with something in my local_manifest.xml file
Code:
[email protected]:~/android/system$ repo sync
Traceback (most recent call last):
File "/home/hinxman/android/system/.repo/repo/main.py", line 408, in <module>
_Main(sys.argv[1:])
File "/home/hinxman/android/system/.repo/repo/main.py", line 388, in _Main
result = repo._Run(argv) or 0
File "/home/hinxman/android/system/.repo/repo/main.py", line 122, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/hinxman/android/system/.repo/repo/command.py", line 45, in OptionParser
self._Options(self._optparse)
File "/home/hinxman/android/system/.repo/repo/subcmds/sync.py", line 147, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 256, in default
self._Load()
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 302, in _Load
nodes.append(self._ParseManifestXml(local, self.repodir))
File "/home/hinxman/android/system/.repo/repo/manifest_xml.py", line 313, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 13, column 2
[email protected]:~/android/system$
Click to expand...
Click to collapse
Forgot to add my SSH-keys to Github... and there was an error in my Local_Manifest file.
Double check the one you used, Kuzma30 updated his today, so if you're using that one, that might fix your problem.
hinxman said:
Forgot to add my SSH-keys to Github... and there was an error in my Local_Manifest file.
Double check the one you used, Kuzma30 updated his today, so if you're using that one, that might fix your problem.
Click to expand...
Click to collapse
Thanks, yeah that did help, i'm able to sync my repo now at least, i'll post back if there are any more problems.
What is the minimum hardware CPU/memory requirements for a workable build environment?
I followed this guide http://wiki.cyanogenmod.org/index.php?title=Build_for_acclaim and I got the error below when I did a 'breakfast acclaim'
Code:
including vendor/cm/vendorsetup.sh
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/bn/acclaim/cm.mk]]: "frameworks/base/build/tablet-dalvik-heap.mk" does not exist. Stop.
Device acclaim not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for acclaim not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/bn/acclaim/cm.mk]]: "frameworks/base/build/tablet-dalvik-heap.mk" does not exist. Stop.
** Don't have a product spec for: 'cm_acclaim'
** Do you have the right repo manifest?
What am I missing?
digixmax said:
I followed this guide http://wiki.cyanogenmod.org/index.php?title=Build_for_acclaim and I got the error below when I did a 'breakfast acclaim'
Code:
...
** Don't have a product spec for: 'cm_acclaim'
** Do you have the right repo manifest?
What am I missing?
Click to expand...
Click to collapse
I found the problem: I didn't have the right local_manifest in the right directory (in .repo instead of .repo/local_manifests as I was led to believe).

[Q] CM repo sync "bad object HEAD "error

Hey I've been trying to download the cyanogenmod source code for about two weeks now.
I've been trying different arguments to repo sync, resyncing multiple times but to no avail.
I've initialized the directory with:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
and synced with:
repo sync -j 4 -c -f
after hitting 100% I get this:
Fetching projects: 100% (316/316), done.
Traceback (most recent call last):
File "/home/s7hoang/android/system/.repo/repo/main.py", line 506, in <module>
_Main(sys.argv[1:])
File "/home/s7hoang/android/system/.repo/repo/main.py", line 482, in _Main
result = repo._Run(argv) or 0
File "/home/s7hoang/android/system/.repo/repo/main.py", line 161, in _Run
result = cmd.Execute(copts, cargs)
File "/home/s7hoang/android/system/.repo/repo/subcmds/sync.py", line 681, in Execute
project.Sync_LocalHalf(syncbuf)
File "/home/s7hoang/android/system/.repo/repo/project.py", line 1230, in Sync_LocalHalf
lost = self._revlist(not_rev(revid), HEAD)
File "/home/s7hoang/android/system/.repo/repo/project.py", line 2309, in _revlist
return self.work_git.rev_list(*a, **kw)
File "/home/s7hoang/android/system/.repo/repo/project.py", line 2503, in rev_list
p.stderr))
error.GitError: CyanogenMod/android_abi_cpp rev-list ('^eb789ea833d8d800662b67914d9c1785a58c2caa', 'HEAD', '--'): fatal: bad object HEAD
I don't know what it means or what to do about it so I'm looking for help.
My goal is just to experiment with getting clockworkmod onto an unsupported phone.
Thanks in advance.
Hmm.. No real clues here.
Are you using an up to date version of git?
Sent from my AOSPA One m8 using XDA Free mobile app
Tried it again with the latest version of git ( 2.3.5 ) but I'm still getting the same error.
jellybean seams to be a pretty old branch.. Please try again with cm-10.2 branch for the manifest.
Sent from my AOSPA One m8 using XDA Free mobile app

[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

hyphenation error

So, i get this error every single time i try to compile any Android ROM, even AOSP.
I'm sure i'm missing a package, but i can't figure out which it is, so i'm asking here for any help on identifying the problem.
Code:
FAILED: /bin/bash -c "frameworks/minikin/tools/mk_hyb_file.py external/hyphenation-patterns/da//hyph-da.pat.txt /home/gee/omni/out/target/product/shieldtablet/obj/ETC/hyph-da_intermediates/hyph-da.hyb"
602 unique nodes, 1676 total
Traceback (most recent call last):
File "frameworks/minikin/tools/mk_hyb_file.py", line 567, in <module>
main()
File "frameworks/minikin/tools/mk_hyb_file.py", line 564, in main
verify_hyb_file(out_fn, pat_fn, chr_fn, hyp_fn)
File "frameworks/minikin/tools/mk_hyb_file.py", line 529, in verify_hyb_file
ch_map, reconstructed_chr = map_to_chr(alphabet_map)
File "frameworks/minikin/tools/mk_hyb_file.py", line 440, in map_to_chr
assert len(lowercase) == 1, 'expected 1 lowercase character'
AssertionError: expected 1 lowercase character
[ 0% 17/2717] Ensure Jack server is installed and started
Jack server already installed in "/home/gee/.jack-server"
Server is already running
[ 0% 17/2717] Build hyb /home/gee/omni/out/target/pr... <- external/hyphenation-patterns/cy//hyph-cy.pat.txt
FAILED: /bin/bash -c "frameworks/minikin/tools/mk_hyb_file.py external/hyphenation-patterns/cy//hyph-cy.pat.txt /home/gee/omni/out/target/product/shieldtablet/obj/ETC/hyph-cy_intermediates/hyph-cy.hyb"
3290 unique nodes, 10601 total
Traceback (most recent call last):
File "frameworks/minikin/tools/mk_hyb_file.py", line 567, in <module>
main()
File "frameworks/minikin/tools/mk_hyb_file.py", line 564, in main
verify_hyb_file(out_fn, pat_fn, chr_fn, hyp_fn)
File "frameworks/minikin/tools/mk_hyb_file.py", line 529, in verify_hyb_file
ch_map, reconstructed_chr = map_to_chr(alphabet_map)
File "frameworks/minikin/tools/mk_hyb_file.py", line 440, in map_to_chr
assert len(lowercase) == 1, 'expected 1 lowercase character'
AssertionError: expected 1 lowercase character
[ 0% 17/2717] build /home/gee/omni/out/target/product/shieldtablet/obj/KERNEL_OBJ/usr
make: Entering directory '/home/gee/omni/kernel/nvidia/shield'
GEN /home/gee/omni/out/target/product/shieldtablet/obj/KERNEL_OBJ/Makefile
drivers/cpufreq/Kconfig:53:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:61:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:70:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:79:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:91:warning: choice value used outside its choice group
drivers/cpufreq/Kconfig:103:warning: choice value used outside its choice group
drivers/cpuquiet/Kconfig:60:warning: choice value used outside its choice group
drivers/cpuquiet/Kconfig:66:warning: choice value used outside its choice group
drivers/cpuquiet/Kconfig:73:warning: choice value used outside its choice group
#
# configuration written to .config
#
make: Leaving directory '/home/gee/omni/kernel/nvidia/shield'
make: Entering directory '/home/gee/omni/kernel/nvidia/shield'
CHK include/generated/uapi/linux/version.h
make: Leaving directory '/home/gee/omni/kernel/nvidia/shield'
[ 0% 17/2717] Build hyb /home/gee/omni/out/target/pr...xternal/hyphenation-patterns/de//hyph-de-1901.pat.txt
FAILED: /bin/bash -c "frameworks/minikin/tools/mk_hyb_file.py external/hyphenation-patterns/de//hyph-de-1901.pat.txt /home/gee/omni/out/target/product/shieldtablet/obj/ETC/hyph-de-1901_intermediates/hyph-de-1901.hyb"
8858 unique nodes, 29816 total
Traceback (most recent call last):
File "frameworks/minikin/tools/mk_hyb_file.py", line 567, in <module>
main()
File "frameworks/minikin/tools/mk_hyb_file.py", line 564, in main
verify_hyb_file(out_fn, pat_fn, chr_fn, hyp_fn)
File "frameworks/minikin/tools/mk_hyb_file.py", line 529, in verify_hyb_file
ch_map, reconstructed_chr = map_to_chr(alphabet_map)
File "frameworks/minikin/tools/mk_hyb_file.py", line 440, in map_to_chr
assert len(lowercase) == 1, 'expected 1 lowercase character'
AssertionError: expected 1 lowercase character
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:158: ninja_wrapper] Error 1
The distribution is Void Linux, and yes i'd like to use my distro of choice to compile a ROm instead of having to switch to Ubuntu or Arch, where it obviously works.
I did install hyphen and about 20 other packages i thought could be the missing ones.
Thanks in advance.
Found a fix by using python 3 instead of 2 for hyphenation.
For future reference: https://github.com/CM-Huawei-P8-Development/local_manifests_gra_l09/issues/1
oh wow, same error here building for htc 10, and only started since moving from arch to void... perhaps this is void related. will mention to them.

Pixel 4: Build Vendor Image with a New HAL Service (Android 11)

Is there a way to compile the vendor image for the pixel 4 (Flame)? My goal is to add some new hardware on the phone. The kernel is already compiled with the new hardware driver and works perfectly. However, I seem I cannot resolve all the dependencies for the vendor image.
There is the output error:
device/google/coral/device.mk was modified, regenerating...
device/google/coral/aosp_flame.mk was modified, regenerating...
[ 99% 219/220] finishing build rules ...
FAILED:
system/chre/Android.mk: error: "chre (EXECUTABLES android-arm64) missing libsdsprpc (SHARED_LIBRARIES android-arm64)"
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
build/make/core/main.mk:946: error: exiting from previous errors.
17:07:33 ckati failed with: exit status 1
Click to expand...
Click to collapse
libsdsprpc is missing. I fear I need more than one library to complete the build.
I added this lines the BoardConfig-common.mk file in device/google/coral
# Build a separate vendor.img partition
BOARD_USES_VENDORIMAGE := true
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
#ALLOW_MISSING_DEPENDENCIES=true
BOARD_VNDK_VERSION := current
Click to expand...
Click to collapse
and commented this line in the vendor/google_devices/flame/BoardConfigPartial.mk. (from binaries driver folder downloaded from google)
#BOARD_PREBUILT_VENDORIMAGE := vendor/google_devices/flame/proprietary/vendor.img
Click to expand...
Click to collapse

Categories

Resources