Related
For building own custom stuff for my Gen8 Device I set up an Ubuntu 10.10 32bit Virtual Machine, so everything in here refers to it, may be different on other linux system.
[disclaimer]This is only a HowTo, if you brick your android device with some custom kernels or other stuff, don't blame me! I'm not responsible for anything you do![/disclaimer]
Notice: ** = you only have to do this step once
Prerequisites for Ubuntu 10.10 32 Bit: **
Code:
# sudo apt-get install git-core flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl automake autoconf libtool gettext texinfo libmpfr1ldbl
Prepare environment: **
Code:
# mkdir -pv $HOME/{archos,bin}
# echo export ARCHOS=\$HOME/archos >> ~/.bashrc
# echo export PATH=\$HOME/bin:\$PATH >> ~/.bashrc
# cd $HOME/archos
# wget -Oavos_env.tgz http://archos-gen8-dvb.googlecode.com/files/avos_env_20110415.tgz
# tar xzf avos_env.tgz
# install -m755 cross $HOME/bin/
# rm -f cross avos_env.tgz
RESTART CONSOLE OR REBOOT COMPUTER!
Toolchain: **
Code:
# cd $ARCHOS
# make all
Configure kernel:
Code:
# cd $ARCHOS
# make kernel-config
Restore kernel config:
Code:
# cd $ARCHOS
# make kernel-reset
Build kernel:
Code:
# cd $ARCHOS
# make kernel-build
CrossCompile: (this is just an example for if you want to build some linux libraries or tools)
Code:
# echo $ARCHOS
# cd ..xyz../..zyx../
# cross make
I followed your instructions, and I got all the way to the end, but when I did 'make kernel-build' it ended with this:
drivers/built-in.o: In function `archos_dpm_suspend':
/home/zyntax/archos/gen8-gpl-froyo/linux/drivers/usb/storage/archos_hdd.c:261: undefined reference to `usbsata_power'
make[3]: *** [.tmp_vmlinux1] Error 1
make[2]: *** [sub-make] Error 2
make[2]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/linux'
make[1]: *** [/home/zyntax/archos/gen8-gpl-froyo/buildroot//linux/arch/arm/boot/zImage] Error 2
make[1]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/buildroot'
make: *** [kernel-build] Error 2
[email protected]:~/archos$
This is on a fresh install of Ubuntu 10.10 32-bit in Virtualbox. I installed it, updated the OS, then started your steps. Not sure if this is normal and I'm holding off on the last step. I did do one extra step: in 'make kernal-config' I deselected all the Archos boards under System Type except for the A101IT since that's what I have.
jbradshw said:
This is on a fresh install of Ubuntu 10.10 32-bit in Virtualbox. I installed it, updated the OS, then started your steps. Not sure if this is normal and I'm holding off on the last step. I did do one extra step: in 'make kernal-config' I deselected all the Archos boards under System Type except for the A101IT since that's what I have.
Click to expand...
Click to collapse
can you please try again without modifying kernel config?
Did that, now I get this:
CC [M] drivers/usb/musb/omap2430.o
/home/zyntax/archos/gen8-gpl-froyo/linux/drivers/usb/musb/omap2430.c:221: warning: 'omap_phy_read' defined but not used
LD [M] drivers/usb/musb/musb_hdrc.o
LD drivers/built-in.o
make[2]: *** [sub-make] Error 2
make[2]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/linux'
make[1]: *** [/home/zyntax/archos/gen8-gpl-froyo/buildroot//linux/arch/arm/boot/zImage] Error 2
make[1]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/buildroot'
make: *** [kernel-build] Error 2
I don't believe I changed anything besides what I mentioned earlier. Is there anyway to get back a default kernel-config?
hehe, I thought you should try with default kernel-config
I added a section for restoring kernel config in the start posting :
chulri said:
[*]Restore kernel config:
Code:
# cd $ARCHOS
# tar xzf gen8-gpl-froyo.tgz gen8-gpl-froyo/linux/linux.config
Click to expand...
Click to collapse
Well I did poke around in the config, but as far as I remember I only removed those extra archos systems. I'll restore the default and run it again later tonight.
Thanks.
jbradshw said:
Well I did poke around in the config, but as far as I remember I only removed those extra archos systems. I'll restore the default and run it again later tonight.
Click to expand...
Click to collapse
You can't remove other devices (like A32, A101 etc) from Linux kernel config because Archos made bad dependencies for different parts of the kernel and even 70S requires some USB kernel code, it's only compiled when you choose A101 - so either you clean it up manually, or you are required to leave checked other archos devices :/
Thanks for this howto, this is gonna be useful for me, should be a sticky.
OK the make kernel-build worked without errors. Now I'm just questioning the command 'cd ..xyz../..zyx../' I don't have any files or directories called that, and running that reports the same. Can I just skip that and do the make cross?
@jbradshw that's just a sample if someone wants to crosscompile something (e.g. some linux library or application like linuxtv-dvb-apps or w_scan)
you don't have to do everything mentioned in the howto. it's a HowTo not a HaveTo
Ahh OK. So I guess I'm done then. I haven't installed the SDE on my Archos yet, but what's the final 'thing' that came out of this procedure that I'll be placing on the tablet?
Also I don't have an microSD card yet, and I know there was talk of putting stuff on there - can this be done using just the internal memory (8 GB for me)?
you have to install the SDE to install a custom kernel. follow this guide: http://forum.xda-developers.com/showthread.php?p=10157349#post10157349
Yeah I saw that guide, my question is where is the zImage and initramfs.cpio.gz that I assume was part of the compiling I just did? And also if a microSD card is needed for any of this?
no microsd is needed
initramfs.cpio.gz can be extracted from current installation ( /dev/mmcblk0p1 -> init ), read this: http://forum.xda-developers.com/showthread.php?t=880321&page=5
zImage is compiled at this location: $ARCHOS/gen8-gpl-froyo/buildroot/linux/arch/arm/boot/zImage
Shouldn't it be
Code:
cross make kernel-build
?
Here I have to use cross, which makes sense to find gcc arm binaries.
No you don't. In case of building stuff which comes with the gen8-gpl-froyo.tgz (e.g. kernel) the env vars are set up by the supplied makefiles
chulri said:
No you don't. In case of building stuff which comes with the gen8-gpl-froyo.tgz (e.g. kernel) the env vars are set up by the supplied makefiles
Click to expand...
Click to collapse
If I don't use cross, here is what I get:
[email protected]:~/archos$ make kernel-build
make -C gen8-gpl-froyo/linux mrproper
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/home/ubuntu/archos/gen8-gpl-froyo/linux'
make[3]: arm-linux-gcc: Command not found
But using cross it compiled fine, though I followed carefully your directions !
Apparently I was too frightened by the error messages, since it does work in the end
Thank you very much, hope some good things come from this !
Cheers !
desiresush said:
Apparently I was too frightened by the error messages, since it does work in the end
Click to expand...
Click to collapse
Yeah it's just an annoying bug, it doesn't hurt because "mrproper" only cleans the build directory and doesn't need compiler at all
2.6.29 kernel for Froyo?
Does anybody know, why Archos releases the SDK with a 2.6.29 kernel?
Shouldn't 2.2 Froyo be a 2.6.32 kernel?
Source
CyanogenMOD https://github.com/CyanogenMod
OnePlus One kernel https://github.com/CyanogenMod/andro...4/tree/cm-13.0
Credits
All credit go to Cyanogenmod and the devs in this forum (CraZY_BoY^, vinman12 and Temasek specifically). I just build, picked, tweaked and learnt a bit about cm13.
What works
Bluetooth, vpn, incoming calls, gps, outgoing calls, sim, wifi, battery %.
Install
1. wipe dalvik, system, data and cache
2. flash rom, gapps (I use slim gapps here or opengapps) and supersu. Boot.
3. Set up the device and reboot
4. Enjoy
I recommend running the rom in f2fs data and cache mode but ext4 is cool too. Clean flash is always best, however this does generally dirty flash onto previous releases. The rom now has superuser installed and operable. However I still cant work out a way of updating the binaries,hence flashing supersu is recommended and Selinux is set to permissive.
Probably lots more other problems that you can advise, but these are to do with CM13.
I take no responsibility if this messes your device. Use it at your own risk. I did this for myself but it may be of use by others, and its nice to be nice.
Download
zb-cm-13-20151101-UNOFFICIAL-bacon.zip
zb-cm-13.0-20151109-UNOFFICIAL-bacon.zip
zb-cm-13.0-20151112-UNOFFICIAL-bacon.zip
zb-cm-13.0-20151113-uber-4.9-5.2-bacon.zip
zb-cm-13.0-20151115-uber-4.9-5.2-bacon.zip
zb-cm-13.0-20151211-uber-4.9-5.2-bacon.zip
First. Oo. Flashing
Reserved
Amazing! Thanks a lot looking forward!
Sent from my A0001 using Tapatalk
Placing a call causes the phone to freeze up.
Sent from my A0001 using Tapatalk
Thanks for this build! For now the only thing that doesn't seem to work is GPS.
Edit: And the placing calls issue.
itslels said:
Placing a call causes the phone to freeze up.
Sent from my A0001 using Tapatalk
Click to expand...
Click to collapse
Oh yes. Didnt spot that. Worked fine on yesterdays build.
Spider-Vice said:
Thanks for this build! For now the only thing that doesn't seem to work is GPS.
Edit: And the placing calls issue.
Click to expand...
Click to collapse
GPS seem to be working for me.
It didn't here, probably related to network location though, CM has it broken I think.
Spider-Vice said:
It didn't here, probably related to network location though, CM has it broken I think.
Click to expand...
Click to collapse
GPS test shows up 10 satellites ok and google maps gets it right for me. The outgoing calls problem is new , as other cm13 roms built 1/11 have the same problem. Im rebuilding from source and compiling another build overnight so ill check it out tomorrow. CM13 had many changes yesterday.
Hopefully the next build will be UBER based, but its proving to be a little inconsistent with CM13.0 at the moment.
Added to OnePlus One index thread:
[INDEX] OnePlus One
Edid....
Enviado do meu Oneplus One através de Tapatalk
Just updated to cm1 09/11/15 build now with minimal changes to source. Running pretty good now, and Im using this build as my daily relatively problem free in f2fs mode.
The 12/11/15 build is perfect. Almost. Everything seems to work well. SuperSU still needs to be flashed, but all seems to be working very well, and this seems to be the best battery version of CM13.0 to date.
Dirty flashing this version over the last version works fine.
15/11/15 build has fixed the startup reboot.
Is AOKP dead?
On your rom for over a week now, working like a charm. Thnks
@zaphodbeeb thanx for ur rom, been using it since a week.
i need some help with cm13 compilation.
I am new to android development stuff and getting stuck at this error.
Code:
Launching background server java -Dfile.encoding=UTF-8 -Xms2560m -XX:+TieredCompilation -jar /home/amardeep/cm13/out/host/linux-x86/framework/jack-launcher.jar -cp /home/amardeep/cm13/out/host/linux-x86/framework/jack.jar com.android.jack.server.JackSimpleServer
GEN /home/amardeep/cm13/out/target/product/bacon/obj/KERNEL_OBJ/Makefile
Building with Jack: /home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/com.android.vcard_intermediates/classes.jack
java -Xmx3500m -jar /home/amardeep/cm13/out/host/linux-x86/framework/jill.jar --output /home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v17_intermediates/classes.jack.tmpjill.jack prebuilts/sdk/17/android.jar
#
# configuration written to .config
#
make[1]: Leaving directory `/home/amardeep/cm13/kernel/oneplus/msm8974'
Using additional config 'cyanogenmod_debug_config'
Using /home/amardeep/cm13/out/target/product/bacon/obj/KERNEL_OBJ/.config as base
Merging kernel/oneplus/msm8974/arch/arm/configs/cyanogenmod_debug_config
#
# merged configuration written to /home/amardeep/cm13/out/target/product/bacon/obj/KERNEL_OBJ/.config (needs make)
#
make[1]: Entering directory `/home/amardeep/cm13/kernel/oneplus/msm8974'
GEN /home/amardeep/cm13/out/target/product/bacon/obj/KERNEL_OBJ/Makefile
scripts/kconfig/conf --alldefconfig Kconfig
/home/amardeep/cm13/out/host/linux-x86/bin/jack: line 131: 24457 Killed $SERVER_PRG $SERVER_PORT_SERVICE $SERVER_PORT_ADMIN $SERVER_COUNT $SERVER_NB_COMPILE $SERVER_TIMEOUT >> $SERVER_LOG 2>&1
Launching background server java -Dfile.encoding=UTF-8 -Xms2560m -XX:+TieredCompilation -jar /home/amardeep/cm13/out/host/linux-x86/framework/jack-launcher.jar -cp /home/amardeep/cm13/out/host/linux-x86/framework/jack.jar com.android.jack.server.JackSimpleServer
Launching background server java -Dfile.encoding=UTF-8 -Xms2560m -XX:+TieredCompilation -jar /home/amardeep/cm13/out/host/linux-x86/framework/jack-launcher.jar -cp /home/amardeep/cm13/out/host/linux-x86/framework/jack.jar com.android.jack.server.JackSimpleServer
ERROR: Cannot launch Jack server
make: *** [/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/with-local/classes.dex] Error 41
make: *** Waiting for unfinished jobs....
#
# configuration written to .config
#
make[1]: Leaving directory `/home/amardeep/cm13/kernel/oneplus/msm8974'
ERROR: Bad request, see Jack server log (/tmp/jack-amardeep/jack-8072.log)
ERROR: Bad request, see Jack server log (/tmp/jack-amardeep/jack-8072.log)
make: *** [/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v17_intermediates/classes.jack] Error 255
make: *** Deleting file `/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v17_intermediates/classes.jack'
make: *** [/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack] Error 255
make: *** Deleting file `/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack'
make: Leaving directory `/home/amardeep/cm13'
#### make failed to build some targets (06:47 (mm:ss)) ####
amardeep434 said:
@zaphodbeeb thanx for ur rom, been using it since a week.
i need some help with cm13 compilation.
I am new to android development stuff and getting stuck at this error.
Code:
Launching background server java -Dfile.encoding=UTF-8 -Xms2560m -XX:+TieredCompilation -jar /home/amardeep/cm13/out/host/linux-x86/framework/jack-launcher.jar -cp /home/amardeep/cm13/out/host/linux-x86/framework/jack.jar com.android.jack.server.JackSimpleServer
GEN /home/amardeep/cm13/out/target/product/bacon/obj/KERNEL_OBJ/Makefile
Building with Jack: /home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/com.android.vcard_intermediates/classes.jack
java -Xmx3500m -jar /home/amardeep/cm13/out/host/linux-x86/framework/jill.jar --output /home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v17_intermediates/classes.jack.tmpjill.jack prebuilts/sdk/17/android.jar
#
# configuration written to .config
#
make[1]: Leaving directory `/home/amardeep/cm13/kernel/oneplus/msm8974'
Using additional config 'cyanogenmod_debug_config'
Using /home/amardeep/cm13/out/target/product/bacon/obj/KERNEL_OBJ/.config as base
Merging kernel/oneplus/msm8974/arch/arm/configs/cyanogenmod_debug_config
#
# merged configuration written to /home/amardeep/cm13/out/target/product/bacon/obj/KERNEL_OBJ/.config (needs make)
#
make[1]: Entering directory `/home/amardeep/cm13/kernel/oneplus/msm8974'
GEN /home/amardeep/cm13/out/target/product/bacon/obj/KERNEL_OBJ/Makefile
scripts/kconfig/conf --alldefconfig Kconfig
/home/amardeep/cm13/out/host/linux-x86/bin/jack: line 131: 24457 Killed $SERVER_PRG $SERVER_PORT_SERVICE $SERVER_PORT_ADMIN $SERVER_COUNT $SERVER_NB_COMPILE $SERVER_TIMEOUT >> $SERVER_LOG 2>&1
Launching background server java -Dfile.encoding=UTF-8 -Xms2560m -XX:+TieredCompilation -jar /home/amardeep/cm13/out/host/linux-x86/framework/jack-launcher.jar -cp /home/amardeep/cm13/out/host/linux-x86/framework/jack.jar com.android.jack.server.JackSimpleServer
Launching background server java -Dfile.encoding=UTF-8 -Xms2560m -XX:+TieredCompilation -jar /home/amardeep/cm13/out/host/linux-x86/framework/jack-launcher.jar -cp /home/amardeep/cm13/out/host/linux-x86/framework/jack.jar com.android.jack.server.JackSimpleServer
ERROR: Cannot launch Jack server
make: *** [/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/with-local/classes.dex] Error 41
make: *** Waiting for unfinished jobs....
#
# configuration written to .config
#
make[1]: Leaving directory `/home/amardeep/cm13/kernel/oneplus/msm8974'
ERROR: Bad request, see Jack server log (/tmp/jack-amardeep/jack-8072.log)
ERROR: Bad request, see Jack server log (/tmp/jack-amardeep/jack-8072.log)
make: *** [/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v17_intermediates/classes.jack] Error 255
make: *** Deleting file `/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v17_intermediates/classes.jack'
make: *** [/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack] Error 255
make: *** Deleting file `/home/amardeep/cm13/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jack'
make: Leaving directory `/home/amardeep/cm13'
#### make failed to build some targets (06:47 (mm:ss)) ####
Click to expand...
Click to collapse
Hi,
Are you building on Ubuntu? If so have you probably need to pick 113774 else the build will fail due to using Java 7 on Ubuntu. The pick enables that. I think thats should solve the problem.
Use repopick 113774
zaphodbeeb said:
Hi,
Are you building on Ubuntu? If so have you probably need to pick 113774 else the build will fail due to using Java 7 on Ubuntu. The pick enables that. I think thats should solve the problem.
Click to expand...
Click to collapse
First of all thanks for the reply
Yes im on ubuntu 14.04lts
Thanx for pointing,will surely try that and report back.
Hi folks,
(New to the forums, tho I've been reading a bit...)
I'm trying to build the Copperhead OS version of Android (marshmallow, for a 2014 Nexus 5) and have run into an issue that I can't seem to get around. Everything seems fine until I get to this:
Code:
target Generated: libv8 <= out/host/linux-x86/bin/v8_mksnapshot.arm
/bin/bash: out/host/linux-x86/bin/v8_mksnapshot.arm: No such file or directory
make: *** [out/target/product/generic/gen/STATIC_LIBRARIES/libv8_intermediates/snapshot_arm.cc] Error 127
...which kills the build. I've been through the makefile in 'external/v8/Android.mksnapshot.mk', which seems to be controlling this part of the build, but as far as I can tell the name of the right src to compile is generated on the fly -- and I don't know enough about this to work past it in a reasonable amount of time. Any hints?
Thanks!
-j
Actually, it looks like the thing that's missing (v8_mksnapshot.arm) is what's used to compile generated source -- the compiler isn't complaining about the generated source itself:
Code:
# Generate snapshot.cc
ifeq ($(ENABLE_V8_SNAPSHOT),true)
SNAP_GEN := $(generated_sources)/snapshot_$(TARGET_ARCH).cc
MKSNAPSHOT := $(HOST_OUT_EXECUTABLES)/v8_mksnapshot.$(TARGET_ARCH)
$(SNAP_GEN): PRIVATE_CUSTOM_TOOL = $(HOST_OUT_EXECUTABLES)/v8_mksnapshot.$(TARGET_ARCH) --log-snapshot-positions --logfile $(dir [email protected])/v8-snapshot_$(TARGET_ARCH).log [email protected]
$(SNAP_GEN): $(MKSNAPSHOT)
$(transform-generated-source)
LOCAL_GENERATED_SOURCES_$(TARGET_ARCH) += $(SNAP_GEN)
...except that 'v8_mksnapshot.arm' is definitely in 'out/host/linux-x86/bin/'. When I try to run that executable:
Code:
[email protected]:/deploy/copperheados-marshmallow-release$ ./out/host/linux-x86/bin/v8_mksnapshot.arm
-bash: ./out/host/linux-x86/bin/v8_mksnapshot.arm: No such file or directory
[email protected]:/deploy/copperheados-marshmallow-release$ ls -l ./out/host/linux-x86/bin/v8_mksnapshot.arm
-rwxr-xr-x 1 admin admin 181048624 Sep 17 15:34 ./out/host/linux-x86/bin/v8_mksnapshot.arm
That usually means some library on which the executable depends is missing.
Hello, I have more than three weeks with this problem.
I want to compile AOSP Android 6.0.0_r1 (openjdk-7jdk) for a LG K8 2017 phone (LGX240F) taking the free source code from LG.
I have followed all the existing tutorials in this forum I currently use Azure a computer with Ubuntu Server 16.04, 16GB Ram and 4 Core processor.
The problem that arises is that after 30 minutes elapsed sometimes 1 hour of compilation I receive the error 41 I have searched for different solutions and none of them has worked for me.
Code:
Last login: Wed Oct 31 14:00:30 2018 from 190.62.244.75
[email protected]:~$ screen -rx
Building with Jack: out/target/common/obj/JAVA_LIBRARIES/am_intermediates/with-local/classes.dex
Building with Jack: out/target/common/obj/JAVA_LIBRARIES/android.test.runner_intermediates/with-local/classes.dex
Building with Jack: out/target/common/obj/JAVA_LIBRARIES/appops_intermediates/with-local/classes.dex
Building with Jack: out/target/common/obj/JAVA_LIBRARIES/appwidget_intermediates/with-local/classes.dex
Building with Jack: out/target/common/obj/JAVA_LIBRARIES/bu_intermediates/with-local/classes.dex
Building with Jack: out/target/common/obj/JAVA_LIBRARIES/bmgr_intermediates/with-local/classes.dex
ERROR: /mnt/Storage/Android6/frameworks/base/test-runner/src/android/test/mock/MockPackageManager.java:886: The method checkAPKSignatures(String) of type MockPackageManager must override or implement a supertype method
build/core/java.mk:643: recipe for target 'out/target/common/obj/JAVA_LIBRARIES/android.test.runner_intermediates/with-local/classes.dex' failed
make: *** [out/target/common/obj/JAVA_LIBRARIES/android.test.runner_intermediates/with-local/classes.dex] Error 41
make: *** Waiting for unfinished jobs....
#### make failed to build some targets (01:10:35 (hh:mm:ss)) ####
The server-jack when starting it with the following command "./jack-admin start-server" would give me a message that the variable JACK_JAR was not declared that solves it with this code.
Code:
JACK_VM_COMMAND = "java -Dfile.encoding = UTF-8 -Xmx8g -XX: + TieredCompilation -jar prebuilts / sdk / tools / jack-launcher.jar" JACK_JAR = "prebuilts / sdk / tools / jack.jar" ./prebuilts/ sdk / tools / jack-admin start-server
I think that the problem is due to the server-jack when seeing the status of the server immediately after having started it works correctly but after about 3 minutes it shows this error.
Code:
Getting statistic from background server
ERROR: No Jack server running
I hope you can help me with this problem because I do not know what else to do.
You may be missing some dependencies needed for building, (link) which ones/tutorials have you installed or used
Sent from my Moto E (4) Plus using Tapatalk
As I'm from Azure this is the one I liked the most but they are identical to the others I've seen there, another one that is very complete is Digital Ocean but with all I got the same error I tried Ubuntu 16.04, 14.04 and nothing always the same .
Code:
https://forum.xda-developers.com/chef-central/android/guide-how-to-build-rom-microsoft-azure-t3648669
https://www.digitalocean.com/community/tutorials/how-to-build-android-roms-on-ubuntu-16-04
https://forum.xda-developers.com/chef-central/android/guide-how-to-setup-ubuntu-16-04-lts-t3363669
https://forum.xda-developers.com/showthread.php?t=2455005
Hello everyone!
Context:
I am building LineageOS 14.1 for zeroltexx as per this guide, on an Arch Linux (Linux 5.18.14-arch1-1 x86_64) using OpenJDK 1.8.
The problem:
The build is not exactly stuck on a single fatal error, but "brunch zeroltexx" proceeds a few items at a time (10-30 files out of 50,000 to be built), always ending along the lines of
Code:
[ 0% 64/39868] target Export Resources: framework-res (/home/dod/androi...t/target/common/obj/APPS/framework-res_intermediates/package-export.apk)
FAILED: /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk
/bin/bash -c "(touch /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/zipdummy ) && ((cd /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/ && jar cf package-export.apk zipdummy) ) && (zip -qd /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk zipdummy ) && (rm /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/zipdummy ) && (/home/dod/android/lineage/out/host/linux-x86/bin/aapt package -u -x --private-symbols com.android.internal -z --pseudo-localize -M frameworks/base/core/res/AndroidManifest.xml -S device/samsung/zero-common/overlay/frameworks/base/core/res/res -S device/samsung/zero-common/overlay-gsm/frameworks/base/core/res/res -S vendor/cm/overlay/common/frameworks/base/core/res/res -S frameworks/base/core/res/res -A frameworks/base/core/res/assets --min-sdk-version 25 --target-sdk-version 25 --product default --version-code 25 --version-name 7.1.2 --skip-symbols-without-default-localization -F /home/dod/android/lineage/out/target/common/obj/APPS/framework-res_intermediates/package-export.apk )"
vendor/cm/overlay/common/frameworks/base/core/res/res/drawable-xxhdpi/default_wallpaper.png: error: Duplicate file.
vendor/cm/overlay/common/frameworks/base/core/res/res/drawable-xxhdpi-v4/default_wallpaper.png: Original is here. The version qualifier may be implied.
[ 0% 64/39868] host Java: hierarchyviewer (/home/dod/android/lineage/out/host/common/obj/JAVA_LIBRARIES/hierarchyviewer_intermediates/classes)
[ 0% 64/39868] host Java: ahat (/home/dod/android/lineage/out/host/common/obj/JAVA_LIBRARIES/ahat_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 0% 64/39868] host Java: dx (/home/dod/android/lineage/out/host/common/obj/JAVA_LIBRARIES/dx_intermediates/classes)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[ 0% 64/39868] Building Kernel Headers
make: Entering directory '/home/dod/android/lineage/kernel/samsung/exynos7420'
GEN /home/dod/android/lineage/out/target/product/zeroltexx/obj/KERNEL_OBJ/Makefile
Kconfig:15:warning: environment variable ANDROID_MAJOR_VERSION undefined
arch/arm64/configs/lineageos_zeroltexx_defconfig:621:warning: override: reassigning to symbol INET_DIAG
#
# configuration written to .config
#
make: Leaving directory '/home/dod/android/lineage/kernel/samsung/exynos7420'
make: Entering directory '/home/dod/android/lineage/kernel/samsung/exynos7420'
CHK include/generated/uapi/linux/version.h
INSTALL include/asm-generic (34 files)
INSTALL include/drm (17 files)
INSTALL include/linux/byteorder (2 files)
INSTALL include/mtd (5 files)
INSTALL include/linux/caif (2 files)
INSTALL include/rdma (6 files)
INSTALL include/linux/can (5 files)
INSTALL include/scsi/fc (4 files)
INSTALL include/linux/dvb (8 files)
INSTALL include/sound (10 files)
INSTALL include/scsi (3 files)
INSTALL include/video (3 files)
INSTALL include/linux/hdlc (1 file)
INSTALL include/linux/hsi (1 file)
INSTALL include/xen (2 files)
INSTALL include/linux/isdn (1 file)
INSTALL include/uapi (0 file)
INSTALL include/linux/mmc (1 file)
INSTALL include/linux/netfilter/ipset (4 files)
INSTALL include/linux/netfilter_arp (2 files)
INSTALL include/linux/netfilter_bridge (18 files)
INSTALL include/linux/netfilter_ipv4 (10 files)
INSTALL include/linux/netfilter_ipv6 (12 files)
INSTALL include/linux/netfilter (78 files)
INSTALL include/linux/nfsd (5 files)
INSTALL include/linux/raid (2 files)
INSTALL include/linux/spi (1 file)
INSTALL include/linux/sunrpc (1 file)
INSTALL include/linux/tc_act (7 files)
INSTALL include/linux/tc_ematch (4 files)
INSTALL include/linux/usb (11 files)
INSTALL include/linux/wimax (1 file)
INSTALL include/linux (388 files)
INSTALL include/asm (33 files)
make: Leaving directory '/home/dod/android/lineage/kernel/samsung/exynos7420'
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/dod/android/lineage'
#### make failed to build some targets (03:09 (mm:ss)) ####
I could probably wrap brunch in a while loop and be done with it, but that would be much more time-intensive than if the build could run continuously.
Note that the line
Code:
vendor/cm/overlay/common/frameworks/base/core/res/res/drawable-xxhdpi/default_wallpaper.png: error: Duplicate file.
appears because I have created 4 new folders named drawable-hdpi-v4, drawable-xhdpi-v4 etc to which I copied the contents of drawable-hdpi, drawable-xhdpi etc. This was to correct an earlier error about default.png not being found for drawable-hdpi-v4 and the others:
Code:
[ 0% 78/32836] target Export Resou...s_intermediates/package-export.apk)
warning: string 'candidates_style' has no default translation.
warning: string 'gsm_alphabet_default_charset' has no default translation.
warning: string 'wfcSpnFormat' has no default translation.
nothing matches overlay file default_wallpaper.png, for flavor hdpi-v4
nothing matches overlay file default_wallpaper.png, for flavor xhdpi-v4
nothing matches overlay file default_wallpaper.png, for flavor xxhdpi-v4
nothing matches overlay file default_wallpaper.png, for flavor xxxhdpi-v4
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:152: ninja_wrapper] Error 1
make: Leaving directory '/home/dod/android/lineage'
#### make failed to build some targets (03:31 (mm:ss)) ####
The build runs for longer upon deleting these drawable-*hdpi-v4 folders I created, but only for a few hundred items before failing anyway.
Leads:
After some research, these sorts of errors are often related to running out of memory. But I have 8GB RAM and an additional 8GB from zram, and RAM usage never actually climbs above 4GB.
The whole building-a-few-items-and-failing routine happens very quickly, but I did spot in htop a few processes that start with "javac -J-Xmx1024M ...". This may have something to do with the following note in the LineageOS build guide:
Jack is the currently used Java toolchain for building LineageOS 14.1 and 15.1. It is known to run out of memory often if not configured correctly - a simple fix is to run this command:
Code:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
Click to expand...
Click to collapse
But setting -Xmx4G and even 8G does not make a difference. I also tried setting a higher max memory in _JAVA_OPTIONS, and this is explicitly acknowledged during build ("Picked up _JAVA_OPTIONS: -Xmx16G"), but I still see those "javac -J-Xmx1024m ..." in htop, and total RAM usage is still below 4GB.
I also cannot get the build to use the number of cores I want. I have 4, and it uses all of them even if I build with make -j1. The issue appears similar to this thread, particularly
I see that it should be possible to configure jack to limit the number of compilations using the SERVER_NB_COMPILE option in ~/.jack or maybe in ~/.jack-settings, or using jack.server.max-service in ~/.jack-server/config.properties. However, using both the SERVER_NB_COMPILE methods has no effect, and the config.properties file seems to be auto-generated with every build, setting the number of services to 4.
Click to expand...
Click to collapse
I'm familiar with Linux, but new to building ROMs and know nothing about Java, so any ideas would be appreciated. I'm happy to add complete logs and other information as needed.