[DEV] CyanogenMod hero's make file modify - Hero, G2 Touch Android Development

Hi, I tried to build CM7 for my htc hero recently and I found the build.prop generated by the build system was a mess. So I changed some make file.
But I don't know whether my change is totally correct. So I want to share my make files and have a discuss.
First file is BoardConfig.mk
Code:
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# config.mk
#
# Product-specific compile-time definitions.
#
# WARNING: This line must come *before* including the proprietary
# variant, so that it gets overwritten by the parent (which goes
# against the traditional rules of inheritance).
USE_CAMERA_STUB := true
JS_ENGINE := v8
# inherit from the proprietary version
-include vendor/htc/hero/BoardConfigVendor.mk
# ARMv6-compatible processor rev 5 (v6l)
TARGET_BOARD_PLATFORM := msm7k
TARGET_CPU_ABI := armeabi
TARGET_ARCH_VARIANT := armv6j
TARGET_NO_BOOTLOADER := true
TARGET_NO_RADIOIMAGE := true
# Wifi related defines
BOARD_WPA_SUPPLICANT_DRIVER := CUSTOM
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := libWifiApi
BOARD_WLAN_TI_STA_DK_ROOT := system/wlan/ti/sta_dk_4_0_4_32
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wlan.ko"
WIFI_DRIVER_MODULE_ARG := ""
WIFI_DRIVER_MODULE_NAME := "wlan"
WIFI_FIRMWARE_LOADER := "wlan_loader"
WIFI_DRIVER_FW_STA_PATH := "/etc/firmware/tiinit_5.3.53.bts"
WIFI_DRIVER_FW_AP_PATH := "/etc/wifi/Fw1251r1c.bin"
BOARD_KERNEL_BASE := 0x19200000
BOARD_KERNEL_CMDLINE := no_console_suspend=1 console=null
#libsurfaceflinger to avoid Draw Texture Extenstion
BOARD_AVOID_DRAW_TEXTURE_EXTENSION := true
BOARD_HAVE_BLUETOOTH := true
BOARD_VENDOR_USE_AKMD := akm8973
BOARD_VENDOR_QCOM_AMSS_VERSION := 6355
# The size of a block that can be marked bad.
BOARD_FLASH_BLOCK_SIZE := 131072
# OpenGL drivers config file path
BOARD_EGL_CFG := device/htc/hero/egl.cfg
BOARD_USES_QCOM_LIBS := true
BOARD_USES_ECLAIR_LIBCAMERA := true
BOARD_NO_RGBX_8888 := true
BOARD_USES_GPSSHIM := true
BOARD_GPS_LIBRARIES := libgps
TARGET_LIBAGL_USE_GRALLOC_COPYBITS := true
# Use HTC USB Function Switch to enable tethering via USB
BOARD_USE_HTC_USB_FUNCTION_SWITCH := true
BOARD_USE_USB_MASS_STORAGE_SWITCH := true
TARGET_RELEASETOOLS_EXTENSIONS := device/htc/common
#---------------------------------------------------------
# May be these properties are useless. Not sure.
#TARGET_BOARD_PLATFORM_GPU := qcom
#BOARD_USES_GENERIC_AUDIO := false
#BOARD_USES_QCOM_HARDWARE := true
#TARGET_HARDWARE_3D := false
#BOARD_USE_HTC_LIBSENSORS := true
#BOARD_USE_HERO_LIBSENSORS := true
#BUILD_LIBCAMERA := true
#BOARD_CAMERA_LIBRARIES := libcameraservice libcamera
#BOARD_GPS_NEEDS_XTRA := true
# Stagefright fully enabled
#BUILD_WITH_FULL_STAGEFRIGHT := true
#---------------------------------------------------------
TARGET_BOOTLOADER_BOARD_NAME := hero
TARGET_OTA_ASSERT_DEVICE := hero
PRODUCT_BUILD_PROP_OVERRIDES += TARGET_BOOTLOADER_BOARD_NAME=hero
# # cat /proc/mtd
# dev: size erasesize name
# mtd0: 00040000 00020000 "misc"
# mtd1: 00500000 00020000 "recovery"
# mtd2: 00280000 00020000 "boot"
# mtd3: 05a00000 00020000 "system"
# mtd4: 05000000 00020000 "cache"
# mtd5: 127c0000 00020000 "userdata"
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00280000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x0aa00000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x0a5c0000
#TARGET_RECOVERY_UI_LIB := librecovery_ui_hero librecovery_ui_htc
TARGET_PREBUILT_KERNEL := device/htc/hero/kernel
I reference some code from dream_sapphire. I found set BOARD_AVOID_DRAW_TEXTURE_EXTENSION := true seems improves 2D rendering especially the popup window in Gingerbread.
I'm not sure those properties I marked with #------------- is necessary.
But after I built the rom, the phone worked well.

2nd file is AndroidBoard.mk
Code:
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# AndroidBoard.mk is a legacy mechanism to deal with a few
# edge-cases that can't be managed otherwise. No new rules
# should be added to this file.
#
LOCAL_PATH := $(call my-dir)
# Least specific includes go first, so that they can get
# overridden further down
include $(CLEAR_VARS)
# include the non-open-source counterpart to this file
-include vendor/htc/hero/AndroidBoardVendor.mk
I cleared it like dream_sapphire did. This file is a legacy build mechanism. Shall we need it any more?

3rd file is AndroidProducts.mk
This file should be the entries of the build process.
Code:
#
# Copyright (C) 2008 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# This file should set PRODUCT_MAKEFILES to a list of product makefiles
# to expose to the build system. LOCAL_DIR will already be set to
# the directory containing this file.
#
# This file may not rely on the value of any variable other than
# LOCAL_DIR; do not use any conditionals, and do not look up the
# value of any variable that isn't set in this file or in a file that
# it includes.
#
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/full_hero.mk
I removed the generic_hero.mk file.

4th file is device_hero.mk
Code:
#
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
DEVICE_PACKAGE_OVERLAYS := device/htc/hero/overlay
# Passion uses high-density artwork where available
PRODUCT_LOCALES += mdpi
PRODUCT_PACKAGES += \
VoiceDialer \
sensors.hero \
hero-keypad.kcm \
wlan_loader \
tiwlan.ini \
libOmxCore \
gps.hero \
gralloc.msm7k \
copybit.msm7k \
lights.hero \
dhcpcd.conf
# Install the features available on this device.
PRODUCT_COPY_FILES += \
frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
frameworks/base/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \
frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/base/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/base/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \
frameworks/base/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \
frameworks/base/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/base/data/etc/android.hardware.touchscreen.multitouch.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.xml \
frameworks/base/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
PRODUCT_COPY_FILES += \
device/htc/hero/vold.fstab:system/etc/vold.fstab \
device/htc/hero/init.hero.rc:root/init.hero.rc \
device/htc/hero/ueventd.hero.rc:root/ueventd.hero.rc
# Keylayouts
PRODUCT_COPY_FILES += \
device/htc/hero/hero-keypad.kl:system/usr/keylayout/hero-keypad.kl \
device/htc/hero/h2w_headset.kl:system/usr/keylayout/h2w_headset.kl
# GSM APN list
PRODUCT_COPY_FILES += \
vendor/cyanogen/prebuilt/common/etc/apns-conf.xml:system/etc/apns-conf.xml
PRODUCT_PROPERTY_OVERRIDES += \
ro.ril.hsxpa=2 \
ro.ril.hsupa.category=5 \
ro.ril.gprsclass=10 \
ro.ril.enable.a52=1 \
ro.ril.enable.a53=1 \
ro.ril.def.agps.mode=2 \
ro.ril.def.agps.feature=1 \
ro.media.dec.jpeg.memcap=10000000 \
ro.com.google.locationfeatures = 1 \
ro.com.google.networklocation=1 \
ro.setupwizard.enable_bypass=1 \
ro.media.dec.aud.wma.enabled=1 \
ro.media.dec.vid.wmv.enabled=1 \
ro.config.sync=yes \
settings.display.autobacklight=1
PRODUCT_PROPERTY_OVERRIDES += \
rild.libpath=/system/lib/libhtc_ril.so \
wifi.interface=tiwlan0
# Time between scans in seconds. Keep it high to minimize battery drain.
# This only affects the case in which there are remembered access points,
# but none are in range.
PRODUCT_PROPERTY_OVERRIDES += \
wifi.supplicant_scan_interval=15
# density in DPI of the LCD of this board. This is used to scale the UI
# appropriately. If this property is not defined, the default value is 160 dpi.
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=160
# Default network type
# 0 => WCDMA Preferred.
PRODUCT_PROPERTY_OVERRIDES += \
ro.telephony.default_network=0
# Performences tweaks
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.execution-mode=int:jit
# OpenGL ES 1.1-CM
PRODUCT_PROPERTY_OVERRIDES += \
ro.opengles.version = 65536
# media configuration xml file
PRODUCT_COPY_FILES += \
device/htc/hero/media_profiles.xml:/system/etc/media_profiles.xml
# Kernel Targets
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := device/htc/hero/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
KERNEL_NAME := 2.6.29.6-flykernel-12a
PRODUCT_COPY_FILES += \
device/htc/hero/modules/modules.dep.bb:system/lib/modules/$(KERNEL_NAME)/modules.dep.bb \
device/htc/hero/modules/modules.order:system/lib/modules/$(KERNEL_NAME)/modules.order \
device/htc/hero/modules/ip_gre.ko:system/lib/modules/$(KERNEL_NAME)/net/ipv4/ip_gre.ko \
device/htc/hero/modules/wlan.ko:system/lib/modules/$(KERNEL_NAME)/drivers/net/wireless/tiwlan1251/wlan.ko \
device/htc/hero/modules/hid-dummy.ko:system/lib/modules/$(KERNEL_NAME)/drivers/hid/hid-dummy.ko \
device/htc/hero/modules/ramzswap.ko:system/lib/modules/$(KERNEL_NAME)/drivers/staging/ramzswap/ramzswap.ko \
device/htc/hero/modules/cifs.ko:system/lib/modules/$(KERNEL_NAME)/fs/cifs/cifs.ko \
device/htc/hero/modules/fuse.ko:system/lib/modules/$(KERNEL_NAME)/fs/fuse/fuse.ko \
device/htc/hero/modules/wlan.ko:system/lib/modules/wlan.ko
I removed some "call inherit-product" command because they had existed in full_hero.mk. In fact the relationship is below:
full_hero.mk file calls device_hero_eu.mk through "$(call inherit-product, device/htc/hero/device_hero_eu.mk)"
device_hero_eu.mk file calls device_hero.mk through "$(call inherit-product, device/htc/hero/device_hero.mk)"

5th file is full_hero.mk
Code:
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This file is the build configuration for a full Android
# build for hero hardware. This cleanly combines a set of
# device-specific aspects (drivers) with a device-agnostic
# product configuration (apps).
#
# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
$(call inherit-product, device/htc/hero/device_hero_eu.mk)
## (2) Also get non-open-source aspects if available
$(call inherit-product-if-exists, vendor/htc/hero/device_hero-vendor.mk)
# stuff common to all HTC phones
$(call inherit-product, device/htc/common/common.mk)
# Discard inherited values and use our own instead.
PRODUCT_NAME := full_hero
PRODUCT_DEVICE := hero
PRODUCT_BRAND := Android
PRODUCT_MODEL := Full Android on Hero
$(SRC_TARGET_DIR)/product/full_base.mk file in the "build/target/product" directory. This file will call generic.mk file at the same directory.

Related

Where can I find the camera binary for 4.1.1?

Its not included with the ones Google provides and I can't get my camera working on the ROM I built from source.
you need to get it from the official factory image. maguro or toro?
Sent from my i9250
edit: this is maguro's script updated for jb paths, create it under your own branch of /device/samsung/maguro, chmod +x it, git add/git commit, flash official factory images, connect device to adb, execute extract-files.sh.
Code:
#!/bin/sh
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is generated by device/common/generate-blob-scripts.sh - DO NOT EDIT
DEVICE=maguro
MANUFACTURER=samsung
mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
adb pull /system/bin/fRom ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/fRom
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/fRom
adb pull /system/lib/libsecril-client.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsecril-client.so
adb pull /system/vendor/bin/pvrsrvctl ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/pvrsrvctl
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/pvrsrvctl
adb pull /system/vendor/etc/sirfgps.conf ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/sirfgps.conf
adb pull /system/vendor/firmware/bcm4330.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/bcm4330.hcd
adb pull /system/vendor/firmware/ducati-m3.bin ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/ducati-m3.bin
adb pull /system/vendor/firmware/libpn544_fw.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libpn544_fw.so
adb pull /system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libEGL_POWERVR_SGX540_120.so
adb pull /system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv1_CM_POWERVR_SGX540_120.so
adb pull /system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv2_POWERVR_SGX540_120.so
adb pull /system/vendor/lib/hw/gps.omap4.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/gps.omap4.so
adb pull /system/vendor/lib/hw/gralloc.omap4.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/gralloc.omap4.so
adb pull /system/vendor/lib/libglslcompiler.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libglslcompiler.so
adb pull /system/vendor/lib/libIMGegl.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libIMGegl.so
adb pull /system/vendor/lib/libinvensense_mpl.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libinvensense_mpl.so
adb pull /system/vendor/lib/libpvr2d.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libpvr2d.so
adb pull /system/vendor/lib/libpvrANDROID_WSEGL.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libpvrANDROID_WSEGL.so
adb pull /system/vendor/lib/libPVRScopeServices.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libPVRScopeServices.so
adb pull /system/vendor/lib/libsec-ril.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsec-ril.so
adb pull /system/vendor/lib/libsrv_init.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsrv_init.so
adb pull /system/vendor/lib/libsrv_um.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsrv_um.so
adb pull /system/vendor/lib/libusc.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libusc.so
(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/device-vendor-blobs.mk
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is generated by device/__MANUFACTURER__/__DEVICE__/extract-files.sh - DO NOT EDIT
# Prebuilt libraries that are needed to build open-source libraries
PRODUCT_COPY_FILES := \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsecril-client.so:obj/lib/libsecril-client.so
# All the blobs necessary for maguro
PRODUCT_COPY_FILES += \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/fRom:system/bin/fRom \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsecril-client.so:system/lib/libsecril-client.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/pvrsrvctl:system/vendor/bin/pvrsrvctl \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/sirfgps.conf:system/vendor/etc/sirfgps.conf \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4330.hcd:system/vendor/firmware/bcm4330.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/ducati-m3.bin:system/vendor/firmware/ducati-m3.bin \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libpn544_fw.so:system/vendor/firmware/libpn544_fw.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libEGL_POWERVR_SGX540_120.so:system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv1_CM_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv2_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/gps.omap4.so:system/vendor/lib/hw/gps.omap4.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/gralloc.omap4.so:system/vendor/lib/hw/gralloc.omap4.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libglslcompiler.so:system/vendor/lib/libglslcompiler.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libIMGegl.so:system/vendor/lib/libIMGegl.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libinvensense_mpl.so:system/vendor/lib/libinvensense_mpl.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libpvr2d.so:system/vendor/lib/libpvr2d.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libpvrANDROID_WSEGL.so:system/vendor/lib/libpvrANDROID_WSEGL.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libPVRScopeServices.so:system/vendor/lib/libPVRScopeServices.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsec-ril.so:system/vendor/lib/libsec-ril.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsrv_init.so:system/vendor/lib/libsrv_init.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsrv_um.so:system/vendor/lib/libsrv_um.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libusc.so:system/vendor/lib/libusc.so
EOF
(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/Android.mk
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is generated by device/__MANUFACTURER__/__DEVICE__/extract-files.sh - DO NOT EDIT
ifeq (\$(TARGET_DEVICE),maguro)
LOCAL_PATH:=\$(call my-dir)
endif
EOF
./setup-makefiles.sh
Serious_Beans said:
Its not included with the ones Google provides and I can't get my camera working on the ROM I built from source.
Click to expand...
Click to collapse
If you get your ROM working, can you send me a link? I'm desperately trying to get mine working again and the problem appears to be the binaries. I think you new to do the extractfiles.sh or whatever it is called. I don't remember exactly.
Sent from my Galaxy Nexus using Tapatalk 2
rm2011 said:
If you get your ROM working, can you send me a link? I'm desperately trying to get mine working again and the problem appears to be the binaries. I think you new to do the extractfiles.sh or whatever it is called. I don't remember exactly.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Which binaries you missing? you can use the script posted above to get the ones you need and you can get the rest from Google.
https://developers.google.com/android/nexus/drivers
Serious_Beans said:
Which binaries you missing? you can use the script posted above to get the ones you need and you can get the rest from Google.
https://developers.google.com/android/nexus/drivers
Click to expand...
Click to collapse
with extract-files.sh, you don't need the ones google provides. google doesn't have the permissions to distribute the rest of the binaries.
bk201doesntexist said:
you need to get it from the official factory image. maguro or toro?
Sent from my i9250
edit: this is maguro's script updated for jb paths, create it under your own branch of /device/samsung/maguro, chmod +x it, git add/git commit, flash official factory images, connect device to adb, execute extract-files.sh.
Code:
#!/bin/sh
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is generated by device/common/generate-blob-scripts.sh - DO NOT EDIT
DEVICE=maguro
MANUFACTURER=samsung
mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
adb pull /system/bin/fRom ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/fRom
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/fRom
adb pull /system/lib/libsecril-client.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsecril-client.so
adb pull /system/vendor/bin/pvrsrvctl ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/pvrsrvctl
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/pvrsrvctl
adb pull /system/vendor/etc/sirfgps.conf ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/sirfgps.conf
adb pull /system/vendor/firmware/bcm4330.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/bcm4330.hcd
adb pull /system/vendor/firmware/ducati-m3.bin ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/ducati-m3.bin
adb pull /system/vendor/firmware/libpn544_fw.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libpn544_fw.so
adb pull /system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libEGL_POWERVR_SGX540_120.so
adb pull /system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv1_CM_POWERVR_SGX540_120.so
adb pull /system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv2_POWERVR_SGX540_120.so
adb pull /system/vendor/lib/hw/gps.omap4.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/gps.omap4.so
adb pull /system/vendor/lib/hw/gralloc.omap4.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/gralloc.omap4.so
adb pull /system/vendor/lib/libglslcompiler.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libglslcompiler.so
adb pull /system/vendor/lib/libIMGegl.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libIMGegl.so
adb pull /system/vendor/lib/libinvensense_mpl.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libinvensense_mpl.so
adb pull /system/vendor/lib/libpvr2d.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libpvr2d.so
adb pull /system/vendor/lib/libpvrANDROID_WSEGL.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libpvrANDROID_WSEGL.so
adb pull /system/vendor/lib/libPVRScopeServices.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libPVRScopeServices.so
adb pull /system/vendor/lib/libsec-ril.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsec-ril.so
adb pull /system/vendor/lib/libsrv_init.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsrv_init.so
adb pull /system/vendor/lib/libsrv_um.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libsrv_um.so
adb pull /system/vendor/lib/libusc.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libusc.so
(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/device-vendor-blobs.mk
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is generated by device/__MANUFACTURER__/__DEVICE__/extract-files.sh - DO NOT EDIT
# Prebuilt libraries that are needed to build open-source libraries
PRODUCT_COPY_FILES := \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsecril-client.so:obj/lib/libsecril-client.so
# All the blobs necessary for maguro
PRODUCT_COPY_FILES += \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/fRom:system/bin/fRom \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsecril-client.so:system/lib/libsecril-client.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/pvrsrvctl:system/vendor/bin/pvrsrvctl \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/sirfgps.conf:system/vendor/etc/sirfgps.conf \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4330.hcd:system/vendor/firmware/bcm4330.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/ducati-m3.bin:system/vendor/firmware/ducati-m3.bin \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libpn544_fw.so:system/vendor/firmware/libpn544_fw.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libEGL_POWERVR_SGX540_120.so:system/vendor/lib/egl/libEGL_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv1_CM_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv2_POWERVR_SGX540_120.so:system/vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/gps.omap4.so:system/vendor/lib/hw/gps.omap4.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/gralloc.omap4.so:system/vendor/lib/hw/gralloc.omap4.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libglslcompiler.so:system/vendor/lib/libglslcompiler.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libIMGegl.so:system/vendor/lib/libIMGegl.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libinvensense_mpl.so:system/vendor/lib/libinvensense_mpl.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libpvr2d.so:system/vendor/lib/libpvr2d.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libpvrANDROID_WSEGL.so:system/vendor/lib/libpvrANDROID_WSEGL.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libPVRScopeServices.so:system/vendor/lib/libPVRScopeServices.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsec-ril.so:system/vendor/lib/libsec-ril.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsrv_init.so:system/vendor/lib/libsrv_init.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libsrv_um.so:system/vendor/lib/libsrv_um.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libusc.so:system/vendor/lib/libusc.so
EOF
(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/Android.mk
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is generated by device/__MANUFACTURER__/__DEVICE__/extract-files.sh - DO NOT EDIT
ifeq (\$(TARGET_DEVICE),maguro)
LOCAL_PATH:=\$(call my-dir)
endif
EOF
./setup-makefiles.sh
Click to expand...
Click to collapse
extract-files.sh: 121: extract-files.sh: ./setup-makefiles.sh: not found
Where does it extract the files to?
obviously, you are also missing that one
sorry, i'll post that one later. and files should go into /vendor/samsung/maguro/proprietary. if you read the code, you'll see what its doing.
Sent from my i9250
bk201doesntexist said:
obviously, you are also missing that one
sorry, i'll post that one later. and files should go into /vendor/samsung/maguro/proprietary. if you read the code, you'll see what its doing.
Sent from my i9250
Click to expand...
Click to collapse
Alright, I was confused, I didn't realize it was going into that folder because I didn't know I had the vendor folder in my source lol. Sorry was late last night and I was out of it >_<.
Anyways, thanks for the script, I guess I have the files I need now, last question is, how do I get them onto the ROM? When I build from source will it just compile with the drivers?
Serious_Beans said:
Alright, I was confused, I didn't realize it was going into that folder because I didn't know I had the vendor folder in my source lol. Sorry was late last night and I was out of it >_<.
Anyways, thanks for the script, I guess I have the files I need now, last question is, how do I get them onto the ROM? When I build from source will it just compile with the drivers?
Click to expand...
Click to collapse
setup-makefiles.sh
Code:
#!/bin/sh
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DEVICE=maguro
MANUFACTURER=samsung
mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE
(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/device-vendor.mk
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is generated by device/__MANUFACTURER__/__DEVICE__/setup-makefiles.sh
\$(call inherit-product, vendor/__MANUFACTURER__/__DEVICE__/device-vendor-blobs.mk)
EOF
(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/BoardConfigVendor.mk
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is generated by device/__MANUFACTURER__/__DEVICE__/setup-makefiles.sh
EOF
just run 'make clobber' and 'make installclean', and rebuild.

[HOW-TO] Sync Xylons source, build with GCC 4.9, Linaro, enable -O3, & use CCACHE

cd to your Desktop
command time: (copy/paste em)
Code:
mkdir ~/bin
export PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
then:
Code:
sudo gedit ~/.bashrc
put export PATH=~/bin:$PATH at the bottom, of it
to enable CCACHE, put this code at the bottom of your bash.rc
Code:
EXPORT USE_CCACHE=1
export CCACHE_DIR=/path/to/your/ccache/folder (mine is /home/mbq/Desktop/ccache
export CCACHE_LOGFILE=/path/to/your/ccache/ccache.log
save it
then:
Code:
mkdir ~/XYAOSP
cd ~/XYAOSP
repo init -u [url]https://github.com/XYAOSP/platform_manifest[/url] -b jb4.2
repo sync -j16 (or -j8, or -j32.. whichever you want)
then:
when youre synced up..
if you want to watch CCACHE to make sure it's working, cd to:
Code:
/path/to/your/XYAOSP/prebuilts/misc/linux-x86/cache
then:
Code:
ccache -s
to change the size of your CCACHE, cd to:
Code:
/path/to/your/XYAOSP/prebuilts/misc/linux-x86
then:
Code:
ccache -M 20
(20=20GB, you can set it all the way to 100)
make sure ccache is getting hits. (The first build will take way longer than usual, so be patient).
to call linaro out correctly, open your xylon folder, go to build, and edit envsetup.sh (if you see a lock on the file(s), enter this:
Code:
sudo chmod -R 777 /path/to/your/XYAOSP/build
then, find:
Code:
# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_EABI_TOOLCHAIN=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/i686-linux-android-4.6/bin
;;
arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin
;;
mips) toolchaindir=mips/mipsel-linux-android-4.6/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
and change:
Code:
arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin
to:
Code:
arm) toolchaindir=linaro/bin
and:
Code:
unset ARM_EABI_TOOLCHAIN ARM_EABI_TOOLCHAIN_PATH
case $ARCH in
arm)
toolchaindir=arm/arm-eabi-$targetgccversion/bin
if [ -d "$gccprebuiltdir/$toolchaindir" ]; then
export ARM_EABI_TOOLCHAIN="$gccprebuiltdir/$toolchaindir"
ARM_EABI_TOOLCHAIN_PATH=":$gccprebuiltdir/$toolchaindir"
fi
;;
mips) toolchaindir=mips/mips-eabi-4.4.3/bin
;;
*)
# No need to set ARM_EABI_TOOLCHAIN for other ARCHs
;;
change:
Code:
case $ARCH in
arm)
toolchaindir=arm/arm-eabi-$targetgccversion/bin
to:
Code:
case $ARCH in
arm)
toolchaindir=linaro/bin
(Make sure linaro is in
Code:
/path/to/your/XYAOSP/prebuilts/gcc/linux-x86/linaro
)
to enable -O3 optimizations, go to:
Code:
/path/to/your/XYAOSP/build/core/combo
open: select.mk
edit:
Code:
ifneq ($(TARGET_USE_02),true)
$(combo_target)GLOBAL_CFLAGS := -fno-exceptions -Wno-multichar
$(combo_target)RELEASE_CFLAGS := -O2 -g -fno-strict-aliasing
else
$(combo_target)GLOBAL_CFLAGS := -O3 -g -Wstrict-aliasing=2
ifneq ($(combo_target),HOST_)
(combo_target)RELEASE_CFLAGS += -Werror=strict-aliasing
endif
endif
$(combo_target)GLOBAL_LDFLAGS := -Wl,-O3
$(combo_target)GLOBAL_ARFLAGS := crsP
change anything -O2 to -O3
save it
then: go to the build/core/combo
then: TARGET_linux-arm.mk
change:
Code:
ifeq ($(TARGET_USE_O3),true)
TARGET_arm_CFLAGS := -Os \
-fomit-frame-pointer \
-fstrict-aliasing \
-fno-tree-vectorize
else
TARGET_arm_CFLAGS := -O3 \
-fomit-frame-pointer \
-fstrict-aliasing \
-funswitch-loops
endif
to:
Code:
ifeq ($(TARGET_USE_O2),true)
TARGET_arm_CFLAGS := -Os \
-fomit-frame-pointer \
-fstrict-aliasing \
-fno-tree-vectorize
else
TARGET_arm_CFLAGS := -O3 \
-fomit-frame-pointer \
-fstrict-aliasing \
-funswitch-loops
endif
and:
Code:
ifeq ($(ARCH_ARM_HAVE_THUMB_SUPPORT),true)
ifeq ($(TARGET_USE_O2),true)
TARGET_thumb_CFLAGS := -mthumb \
-O2 \
-fomit-frame-pointer \
-fno-strict-aliasing \
-fno-tree-vectorize
else
TARGET_thumb_CFLAGS := -mthumb \
-O3 \
-fomit-frame-pointer \
-fno-strict-aliasing \
-fno-tree-vectorize
endif
else
TARGET_thumb_CFLAGS := $(TARGET_arm_CFLAGS)
endif
to:
Code:
ifeq ($(ARCH_ARM_HAVE_THUMB_SUPPORT),true)
ifeq ($(TARGET_USE_O3),true)
TARGET_thumb_CFLAGS := -mthumb \
-O3 \
-fomit-frame-pointer \
-fno-strict-aliasing \
-fno-tree-vectorize
else
TARGET_thumb_CFLAGS := -mthumb \
-O3 \
-fomit-frame-pointer \
-fno-strict-aliasing \
-fno-tree-vectorize
endif
else
TARGET_thumb_CFLAGS := $(TARGET_arm_CFLAGS)
endif
^^ Make any of these changes prior to building
to build with GCC 4.9, go to build/core/config.mk and find TARGET_GCC_VERSION := 4.7, change it to 4.9
to get linaro, download this: http://releases.linaro.org/13.04/co...13.04-2-2013-04-13_12-08-43-linux-x86.tar.bz2
then change the folders name to 'linaro'
move it to prebuilts/gcc/linux-x86
then, to build..
Code:
. build/envsetup.sh
croot
brunch device -j(2, 4, 8, 16, or 32, your choice)
*Note: Because CCACHE is enabled, it will take a while for your first build to complete. ~2-5 hours
Hope this helps!
Reserved! Just in case
repo sync -j16 (or -j8, or -j32.. whichever you want)
What's the difference between them. Trying to build for toro wondering which one I should use, thanks
RoyJ said:
repo sync -j16 (or -j8, or -j32.. whichever you want)
What's the difference between them. Trying to build for toro wondering which one I should use, thanks
Click to expand...
Click to collapse
How many threads of each core is used
Sent from my Galaxy Nexus using xda premium
if you have a 4x cpu you can go for -j8\-k16 and so on.i always used -j16 in the past,now it's big time i don't anything.
Great 3ad kyler,you explain all very well,especially the toolchain part rather that other guides out there.I stopped build for myself some months ago,but definetly a good howto for who have time and effort to try.
^__^
If you change TARGET_GCC_VERSION to 4.9... You'll need to wget Linaro 4.9.. No?
Sent from my Nexus
bk201doesntexist said:
If you change TARGET_GCC_VERSION to 4.9... You'll need to wget Linaro 4.9.. No?
Sent from my Nexus
Click to expand...
Click to collapse
Not to my knowledge. Xylon uses Sabermods toolchain
Great guide! Thanks!!
MisterSprinkles said:
Great guide! Thanks!!
Click to expand...
Click to collapse
Thank you!
Sent from my Galaxy Nexus using xda premium
should I dl the CCATCH separately? and what about ccatch.log? how to address that?
frost866 said:
should I dl the CCATCH separately? and what about ccatch.log? how to address that?
Click to expand...
Click to collapse
Yeah, and just call it in your bashrc
Sent from my Galaxy Nexus using xda premium
Awesome guide!!!! It helped me a lot!
Thanks!!!
pguizeline said:
Awesome guide!!!! It helped me a lot!
Thanks!!!
Click to expand...
Click to collapse
:good:
Sent from my Galaxy Nexus using xda premium
quick question why dont we use full 4.9 like what Daxx done in his maguro UKG build ?
-Jesco- said:
quick question why dont we use full 4.9 like what Daxx done in his maguro UKG build ?
Click to expand...
Click to collapse
I do
Sent from my Galaxy Nexus using xda premium
Nice guide thanks!
Can you pls. tell me how much space will the "sources" occupy during/after the first sync-up? Although am on unlimited broadband, would like to know this. I read in one of the threads (about CM 10.1 sources sync-up) that it is about 40GB. Is this right?
pmbabu said:
Nice guide thanks!
Can you pls. tell me how much space will the "sources" occupy during/after the first sync-up? Although am on unlimited broadband, would like to know this. I read in one of the threads (about CM 10.1 sources sync-up) that it is about 40GB. Is this right?
Click to expand...
Click to collapse
20-40GB
Sent from my Galaxy Nexus using xda premium
I just tried to self-compile a xyUltimatum build and I used the SaberMod GCC 4.9 toolchain since there's not a 4.9 of Linaro out yet and got an error related to the compiler itself.
Code:
external/aac/libAACenc/src/aacenc_tns.cpp: In function 'INT FDKaacEnc_TnsEncode(TNS_INFO*, TNS_DATA*, INT, const TNS_CONFIG*, INT, FIXP_DBL*, INT, INT)':
external/aac/libAACenc/src/aacenc_tns.cpp:1004:5: error: definition in block 48 follows the use
INT FDKaacEnc_TnsEncode(
^
for SSA_NAME: value_155 in statement:
# DEBUG D#405 => MAX_EXPR <value_155, _111>
external/aac/libAACenc/src/aacenc_tns.cpp:1004:5: internal compiler error: verify_ssa failed
0xc2358c verify_ssa(bool)
../.././../gcc/gcc-SaberMod/gcc/tree-ssa.c:1046
0x9f66e2 execute_function_todo
../.././../gcc/gcc-SaberMod/gcc/passes.c:1970
0x9f704d execute_todo
../.././../gcc/gcc-SaberMod/gcc/passes.c:2002
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [/home/kemikalelite/android/out/target/product/maguro/obj/STATIC_LIBRARIES/libFraunhoferAAC_intermediates/libAACenc/src/aacenc_tns.o] Error 1
Since the ROM and toolchain are from two different sources I'm not sure if it was caused by something with the ROM's source or if its just caused from a bug in the toolchain and whether or not it should be reported to the Saber dev.
KemikalElite said:
I just tried to self-compile a xyUltimatum build and I used the SaberMod GCC 4.9 toolchain since there's not a 4.9 of Linaro out yet and got an error related to the compiler itself.
Code:
external/aac/libAACenc/src/aacenc_tns.cpp: In function 'INT FDKaacEnc_TnsEncode(TNS_INFO*, TNS_DATA*, INT, const TNS_CONFIG*, INT, FIXP_DBL*, INT, INT)':
external/aac/libAACenc/src/aacenc_tns.cpp:1004:5: error: definition in block 48 follows the use
INT FDKaacEnc_TnsEncode(
^
for SSA_NAME: value_155 in statement:
# DEBUG D#405 => MAX_EXPR <value_155, _111>
external/aac/libAACenc/src/aacenc_tns.cpp:1004:5: internal compiler error: verify_ssa failed
0xc2358c verify_ssa(bool)
../.././../gcc/gcc-SaberMod/gcc/tree-ssa.c:1046
0x9f66e2 execute_function_todo
../.././../gcc/gcc-SaberMod/gcc/passes.c:1970
0x9f704d execute_todo
../.././../gcc/gcc-SaberMod/gcc/passes.c:2002
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [/home/kemikalelite/android/out/target/product/maguro/obj/STATIC_LIBRARIES/libFraunhoferAAC_intermediates/libAACenc/src/aacenc_tns.o] Error 1
Since the ROM and toolchain are from two different sources I'm not sure if it was caused by something with the ROM's source or if its just caused from a bug in the toolchain and whether or not it should be reported to the Saber dev.
Click to expand...
Click to collapse
I'd submit a bug report
Sent from my Galaxy Nexus using xda premium
Wow Tapatalk must really be messing up. Every time I post in the other thread the reply automatically redirects here. Enough Fail Posting for one day.
Error Post Please Delete.

[LineageOS Building Question]Custom third party APKs: How to add them to source code?

Hi to all!
I'm building Lineage OS for my device. I added some third party app to my source code: I put apk in a folder in the directory /packages/apps, I added all the apk's name in /vendor/cm/config/common.mk and also within /build/target/core.mk, but the building process doesn't see them and it doesn't include them in the ROM package.
I followed many guides, but all of them failed on this, so I think i'm forgetting something.
There is a method to add third party app to the source code?
Gabrius99 said:
Hi to all!
I'm building Lineage OS for my device. I added some third party app to my source code: I put apk in a folder in the directory /packages/apps, I added all the apk's name in /vendor/cm/config/common.mk and also within /build/target/core.mk, but the building process doesn't see them and it doesn't include them in the ROM package. I followed many guides, but all of them failed on this, so I think i'm forgetting something. There is a method to add third party app to the source code?
Click to expand...
Click to collapse
Try asking within the following thread since it involves how to build a custom ROM from Source Code to End.
http://forum.xda-developers.com/showthread.php?t=2814763
They should be able to either help you out or guide you in the right direction as to where to find the answer.
"Live Long and Prosper..."
~Ambassador S'chn T'gai Spock
Sent via Communicator [D2VZW] from the Bridge of the U.S.S. Enterprise
Ibuprophen said:
Try asking within the following thread since it involves how to build a custom ROM from Source Code to End.
http://forum.xda-developers.com/showthread.php?t=2814763
They should be able to either help you out or guide you in the right direction as to where to find the answer.
"Live Long and Prosper..."
~Ambassador S'chn T'gai Spock
Sent via Communicator [D2VZW] from the Bridge of the U.S.S. Enterprise
Click to expand...
Click to collapse
Thanks a lot
I hope they'll answer me
Gabrius99 said:
Hi to all!
I'm building Lineage OS for my device. I added some third party app to my source code: I put apk in a folder in the directory /packages/apps, I added all the apk's name in /vendor/cm/config/common.mk and also within /build/target/core.mk, but the building process doesn't see them and it doesn't include them in the ROM package.
I followed many guides, but all of them failed on this, so I think i'm forgetting something.
There is a method to add third party app to the source code?
Click to expand...
Click to collapse
Hi. I don't know if you achieved your goal, but I did the procedure bellow to add LibreOfficeViewer to my build and It works for me. Only change the path of device.mk to your device:
LibreofficeViewer
* Create the directory ~/android/system/packages/apps/LibreOfficeViewer
* Edit ~/android/system/packages/apps/LibreOfficeViewer/Android.mk and add:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := LibreOfficeViewer
LOCAL_CERTIFICATE := media
LOCAL_SRC_FILES := LibreOfficeViewer.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)
* Edit ~/android/system/device/motorola/harpia/device.mk and add:
# LibreOfficeViewer
PRODUCT_PACKAGES += \
LibreOfficeViewer
* Copy LibreOfficeViewer.apk to ~/android/system/packages/apps/LibreOfficeViewer
That's it.
cvbrt said:
Hi. I don't know if you achieved your goal, but I did the procedure bellow to add LibreOfficeViewer to my build and It works for me. Only change the path of device.mk to your device:
LibreofficeViewer
* Create the directory ~/android/system/packages/apps/LibreOfficeViewer
* Edit ~/android/system/packages/apps/LibreOfficeViewer/Android.mk and add:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := LibreOfficeViewer
LOCAL_CERTIFICATE := media
LOCAL_SRC_FILES := LibreOfficeViewer.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)
* Edit ~/android/system/device/motorola/harpia/device.mk and add:
# LibreOfficeViewer
PRODUCT_PACKAGES += \
LibreOfficeViewer
* Copy LibreOfficeViewer.apk to ~/android/system/packages/apps/LibreOfficeViewer
That's it.
Click to expand...
Click to collapse
I received some answers in the other thread, but I didn't tried those methods yet. Thanks anyway for the help
cvbrt said:
Hi. I don't know if you achieved your goal, but I did the procedure bellow to add LibreOfficeViewer to my build and It works for me. Only change the path of device.mk to your device:
LibreofficeViewer
* Create the directory ~/android/system/packages/apps/LibreOfficeViewer
* Edit ~/android/system/packages/apps/LibreOfficeViewer/Android.mk and add:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := LibreOfficeViewer
LOCAL_CERTIFICATE := media
LOCAL_SRC_FILES := LibreOfficeViewer.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
include $(BUILD_PREBUILT)
* Edit ~/android/system/device/motorola/harpia/device.mk and add:
# LibreOfficeViewer
PRODUCT_PACKAGES += \
LibreOfficeViewer
* Copy LibreOfficeViewer.apk to ~/android/system/packages/apps/LibreOfficeViewer
That's it.
Click to expand...
Click to collapse
Great! Still works great for lineage18.1. But u no, ~/android/system is called ~/android/lineage here.
y0va said:
Great! Still works great for lineage18.1. But u no, ~/android/system is called ~/android/lineage here.
Click to expand...
Click to collapse
I hate to revive such a long dead thread but I've been struggling with this and hoping for some help so please forgive me. Do you happen to know if the process is any different for LineageOS 20? I'm getting an error that it's failed due to a non-existent module in product_packages.

[PORT][BUILD][UNOFFICIAL] LineageOS 16 to daisy

Hi all!
Starting a new thread to make things more clear to all. We need help. Please, review this thread from page 4:
https://forum.xda-developers.com/mi...s-kernel-source-code-available-t3835130/page4
I'm working in a port of LineageOS 16 to mi a2 lite (daisy).
Thanks to @LazyT @hossman and @davze for their help.
UPDATE:
At the moment we have a device tree and blobs. Uploaded to github.
Not flashed and tested by me yet.
Device:
https://github.com/robotusr/device_xiaomi_daisy (100% uploaded)
&
https://github.com/robotusr/device_x...msm8953-common (100% uploaded)
Proprietary files:
https://github.com/robotusr/propriet...r_xiaomi_daisy (100% uploaded)
&
https://github.com/robotusr/propriet...msm8953-common (100% uploaded)
File local_manifests/roomservice.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="robotusr/device_xiaomi_daisy" path="device/xiaomi/daisy" remote="github" />
<project name="robotusr/device_xiaomi_msm8953-common" path="device/xiaomi/msm8953-common" remote="github" />
<project name="robotusr/proprietary_vendor_xiaomi" path="vendor/xiaomi/daisy" remote="github" />
<project name="robotusr/proprietary_vendor_xiaomi_msm8953-common" path="vendor/xiaomi/msm8953-common" remote="github" />
</manifest>
Steps to build:
-Init LineageOS repo with repo init -u https://github.com/LineageOS/android.git -b lineage-16.0
-repo sync
-Create roomservice file at local_manifests/roomservice.xml
-repo sync (this downloads all daisy device and proprietary files (also for msmscommon))
-Run . build/envsetup.sh
-Because we are bulding an unsupported device with Android 8.1 sources (at the moment), and there are some errors about LOCAL_SDK_VERSION (seems to be mandatory in Android 9) and some dependencies.
Edit file build/make/core/sdk_check.mk (make a backup first to use the original file in future builds).
Modify line whitelisted_modules :=
With this:
Code:
whitelisted_modules := framework-res__auto_generated_rro SystemUI__auto_generated_rro Bluetooth__auto_generated_rro Settings__auto_generated_rro
-export ALLOW_MISSING_DEPENDENCIES=TRUE
-lunch lineage_daisy-eng
-brunch daisy
Please, tell me if it builds ok for you.
Best regards,
Daniel
This is very promising.
Thank you all for the hard work <3
Thanks but need good twrp for that...
Hey there,
if you need repos created on lineageos GitHub or other help just ask them via IRC. Luk made changes in the exchange repo for me for 15.1, I recommend him
Hy, can we use pixelrom as source ?
@robotusr
No sorry, I'm not working on it - only tried to help with your questions.
monojp said:
Hey there,
if you need repos created on lineageos GitHub or other help just ask them via IRC. Luk made changes in the exchange repo for me for 15.1, I recommend him
Click to expand...
Click to collapse
Great! I'll try to contact Luk. Thanks!
LazyT said:
@robotusr
No sorry, I'm not working on it - only tried to help with your questions.
Click to expand...
Click to collapse
Well, you helped me a lot!
Mounting vendor.img to create proprietary-files.txt is the only solution I've found. generate-blob-lists.sh script doesn't works.
Also I've change make files from cm to lineage (updated post #1)
Vendorimg contents:
Code:
drwxr-xr-x. 11 0 2000 4096 dic 31 2008 app
drwxr-xr-x. 4 0 2000 8192 dic 31 2008 bin
-rw-------. 1 0 0 3382 dic 31 2008 build.prop
-rw-r--r--. 1 0 0 1886 dic 31 2008 compatibility_matrix.xml
-rw-------. 1 0 0 614 dic 31 2008 default.prop
drwxr-xr-x. 19 0 2000 4096 dic 31 2008 etc
drwxr-xr-x. 3 0 2000 4096 dic 31 2008 firmware
drwxr-xr-x. 2 0 2000 4096 dic 31 2008 framework
drwxr-xr-x. 11 0 2000 114688 dic 31 2008 lib
drwxr-xr-x. 7 0 2000 12288 dic 31 2008 lib64
drwx------. 2 0 0 16384 dic 31 2008 lost+found
-rw-r--r--. 1 0 0 22941 dic 31 2008 manifest.xml
drwxr-xr-x. 2 0 2000 4096 dic 31 2008 media
drwxr-xr-x. 4 0 2000 4096 dic 31 2008 overlay
drwxr-xr-x. 11 0 2000 4096 dic 31 2008 package
drwxr-xr-x. 3 0 2000 4096 dic 31 2008 radio
drwxr-xr-x. 5 0 2000 4096 dic 31 2008 rfs
drwxr-xr-x. 2 0 2000 4096 dic 31 2008 speccfg
-rw-r--r--. 1 0 0 15446 dic 31 2008 ueventd.rc
This is the audio acdb section I've put in propietary-files.txt at the moment:
Code:
# Audio ACDB
vendor/etc/acdbdata/QRD/QRD_Bluetooth_cal.acdb
vendor/etc/acdbdata/QRD/QRD_General_cal.acdb
vendor/etc/acdbdata/QRD/QRD_Global_cal.acdb
vendor/etc/acdbdata/QRD/QRD_Handset_cal.acdb
vendor/etc/acdbdata/QRD/QRD_Hdmi_cal.acdb
vendor/etc/acdbdata/QRD/QRD_Headset_cal.acdb
vendor/etc/acdbdata/QRD/QRD_Speaker_cal.acdb
vendor/etc/acdbdata/adsp_avs_config.acdb
vendor/etc/acdbdata/QRD/QRD_workspaceFile.qwsp
Info from etc/acdbdata (oem rom):
Code:
etc/acdbdata/:
adsp_avs_config.acdb
MTP
QRD
etc/acdbdata/MTP:
msm8953-tasha-snd-card
MTP_Bluetooth_cal.acdb
MTP_General_cal.acdb
MTP_Global_cal.acdb
MTP_Handset_cal.acdb
MTP_Hdmi_cal.acdb
MTP_Headset_cal.acdb
MTP_Speaker_cal.acdb
MTP_workspaceFile.qwsp
etc/acdbdata/MTP/msm8953-tasha-snd-card:
MTP_WCD9335_Bluetooth_cal.acdb
MTP_WCD9335_General_cal.acdb
MTP_WCD9335_Global_cal.acdb
MTP_WCD9335_Handset_cal.acdb
MTP_WCD9335_Hdmi_cal.acdb
MTP_WCD9335_Headset_cal.acdb
MTP_WCD9335_Speaker_cal.acdb
MTP_WCD9335_workspaceFile.qwsp
etc/acdbdata/QRD:
QRD_Bluetooth_cal.acdb
QRD_General_cal.acdb
QRD_Global_cal.acdb
QRD_Handset_cal.acdb
QRD_Hdmi_cal.acdb
QRD_Headset_cal.acdb
QRD_Speaker_cal.acdb
QRD_workspaceFile.qwsp
I'm creating propietary-files.txt by hand. Please, be patient...
Regards,
Daniel.
greet ,good luck guys
alcopsy said:
Thanks but need good twrp for that...
Click to expand...
Click to collapse
It's not necessary to flash system.img (at the moment) using fastboot.
Obviously, we need a custom recovery to make rom backups and to flash other partitions.
I'm not a developer. Just learning to port a rom to my device.
Regards,
Daniel
robotusr said:
It's not necessary to flash system.img (at the moment) using fastboot.
Obviously, we need a custom recovery to make rom backups and to flash other partitions.
I'm not a developer. Just learning to port a rom to my device.
Regards,
Daniel
Click to expand...
Click to collapse
We have to wait working TWRP ! TWRP by TWRPbuilder is not working, perhaps they should fix it.or we have to wait !that A/B partition make the devellopement not easy !
foudroid said:
We have to wait working TWRP ! TWRP by TWRPbuilder is not working, perhaps they should fix it.or we have to wait !that A/B partition make the devellopement not easy !
Click to expand...
Click to collapse
I agree with you, but building a new device tree has nothing to do with that (partially).
Building a new device tree is useful to porting roms, not only for a recovery. I'm focused on getting an optimised system.img for our device.
This is the hard work.
Kernel's sources for daisy are out and these files are useful to build a custom recovery.
But I repeat, I'm not an expert and, of course, not a developer.
Regards,
Some progress.
I don't need to use extract-files.sh because I have all vendor files (extracted from vendor.img and system.img).
Just tested to make clean && make clobber
breakfast daisy
and always the same. roomservice.xml pointing to my new device repo in git doesn't works. Also tested with local_manifest.xml (I think it's deprecated).
Always build/make/core/product_config.mk:234: error: Can not locate config makefile for product "lineage_daisy".
and
Repository for daisy not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
The way to get breakfast working is to upload all of my files to LineageOS git as device_xxxxxxxxxx
I'm thinking that another repository like themuppets in the past, doesn't works for Lineage. But I don't know why.
I've asked for help in LineageOS irc and an answer was:
xD
This doesn't helps
robotusr said:
Some progress.
I don't need to use extract-files.sh because I have all vendor files (extracted from vendor.img and system.img).
Just tested to make clean && make clobber
breakfast daisy
and always the same. roomservice.xml pointing to my new device repo in git doesn't works. Also tested with local_manifest.xml (I think it's deprecated).
Always build/make/core/product_config.mk:234: error: Can not locate config makefile for product "lineage_daisy".
and
Repository for daisy not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
The way to get breakfast working is to upload all of my files to LineageOS git as device_xxxxxxxxxx
I'm thinking that another repository like themuppets in the past, doesn't works for Lineage. But I don't know why.
I've asked for help in LineageOS irc and an answer was:
xD
This doesn't helps
Click to expand...
Click to collapse
did you try to directly lunch "lineage_daisy-eng"? and (even if it sounds dumb and u controlled this already 20 times) all your device makefiles are in the correct location? You could also add daisy in a vendorsetup.sh in device tree and execute ". build/envsetup.sh" again (should see daisy in lunch menu then).
Don't worry, thats the usual answer u get when asking some "devs" for help with android...
wertus33333 said:
did you try to directly lunch "lineage_daisy-eng"? and (even if it sounds dumb and u controlled this already 20 times) all your device makefiles are in the correct location? You could also add daisy in a vendorsetup.sh in device tree and execute ". build/envsetup.sh" again (should see daisy in lunch menu then).
Don't worry, thats the usual answer u get when asking some "devs" for help with android...
Click to expand...
Click to collapse
All mk files are in path and vendorsetup.sh too. envsetup includes vendorsetup.sh from device/xiaomi/daisy.
Lunch "lineage_daisy-eng", breakfast daisy, breakfast lineage_daisy fails with the same error.
Thanks!
robotusr said:
All mk files are in path and vendorsetup.sh too. envsetup includes vendorsetup.sh from device/xiaomi/daisy.
Lunch "lineage_daisy-eng", breakfast daisy, breakfast lineage_daisy fails with the same error.
Thanks!
Click to expand...
Click to collapse
Hmm... I am building oreo at the moment so i'm not sure if P builds the same way. You declared lineage_daisy in lineage.mk? like this:
device/xiaomi/daisy/lineage.mk:
HTML:
PRODUCT_NAME := lineage_daisy
BOARD_VENDOR := Xiaomi
PRODUCT_GMS_CLIENTID_BASE := android-xiaomi
wertus33333 said:
Hmm... I am building oreo at the moment so i'm not sure if P builds the same way. You declared lineage_daisy in lineage.mk? like this:
device/xiaomi/daisy/lineage.mk:
HTML:
PRODUCT_NAME := lineage_daisy
BOARD_VENDOR := Xiaomi
PRODUCT_GMS_CLIENTID_BASE := android-xiaomi
Click to expand...
Click to collapse
Hi these are my files:
lineage.mk
Code:
# Inherit some common lineage stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, device/xiaomi/daisy/full_daisy.mk)
## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := daisy
PRODUCT_NAME := lineage_daisy
BOARD_VENDOR := Xiaomi
PRODUCT_BRAND := xiaomi
PRODUCT_MODEL := daisy
PRODUCT_MANUFACTURER := xiaomi
full_daisy.mk
Code:
# Copyright (C) 2017 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Inherit from daisy_sprout device
$(call inherit-product, device/xiaomi/daisy/device.mk)
# Device identifier. This must come after all inclusions
TARGET_VENDOR := xiaomi
PRODUCT_DEVICE := daisy
PRODUCT_NAME := lineage_daisy
PRODUCT_BRAND := xiaomi
PRODUCT_MODEL := Mi A2 Lite
PRODUCT_MANUFACTURER := xiaomi
vendorsetup.sh
Code:
add_lunch_combo lineage_daisy-eng
lineage.dependencies
Code:
{
"repository": "android_device_xiaomi_msm8953-common",
"target_path": "device/xiaomi/msm8953-common"
}
]
robotusr said:
Hi these are my files:
lineage.mk
Code:
# Inherit some common lineage stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, device/xiaomi/daisy/full_daisy.mk)
## Device identifier. This must come after all inclusions
PRODUCT_DEVICE := daisy
PRODUCT_NAME := lineage_daisy
BOARD_VENDOR := Xiaomi
PRODUCT_BRAND := xiaomi
PRODUCT_MODEL := daisy
PRODUCT_MANUFACTURER := xiaomi
full_daisy.mk
Code:
# Copyright (C) 2017 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Inherit from daisy_sprout device
$(call inherit-product, device/xiaomi/daisy/device.mk)
# Device identifier. This must come after all inclusions
TARGET_VENDOR := xiaomi
PRODUCT_DEVICE := daisy
PRODUCT_NAME := lineage_daisy --> this should be "full_daisy" i think
PRODUCT_BRAND := xiaomi
PRODUCT_MODEL := Mi A2 Lite
PRODUCT_MANUFACTURER := xiaomi
vendorsetup.sh
Code:
add_lunch_combo lineage_daisy-eng --> add lunch combo for user and userdebug aswell (maybe this helps xD)
lineage.dependencies
Code:
{
"repository": "android_device_xiaomi_msm8953-common",
"target_path": "device/xiaomi/msm8953-common" --> did you include device/xiaomi/msm8953-common/BoardconfigCommon.mk in BoardConfig.mk?
}
]
Click to expand...
Click to collapse
Here is my daisy los15 tree, it is building at the moment but not sure if it works in the end (maybe this helps you to adapt) also mind the comments i put in the fields above
edit: It does NOT work yet xD
wertus33333 said:
Here is my daisy los15 tree, it is building at the moment but not sure if it works in the end (maybe this helps you to adapt) also mind the comments i put in the fields above
Click to expand...
Click to collapse
Thanks thanks thanks!
I'll try it today.
Best regards!
Finally I have managed to extract blobs. It's not possible to extract all files without root, but I really have this files from vendor.img. Copied manually to directory structure and now I'll try to compile all.
Thanks guys!
@wertus33333
Have you setup any roomservice.xml or local_manifest.xml file to lunch? I'm getting same error
build/make/core/product_config.mk:234: error: Can not locate config makefile for product "lineage_daisy".

Snapdragon Samsung Galaxy S8 LineageOS port has build errors.

Hello,
I am trying to port LineageOS to the Samsung Galaxy S8 as my first LineageOS port. I know this is probably one heck of an undertaking for a first port but a rooted snapdragon-based S8 is currently the only device I have access to and I would like to have stock-ish android on this device.
In any case, I am running into errors while trying to build for the platform.
I am using this guide with this guide for reference to try to port.
I have followed the first guide basically to the tee so far.
These are all of the things (of interest) that I have done.​
1. I executed these commands to clone the code base:
Code:
repo init -u https://github.com/LineageOS/android.git -b lineage-19.1
repo sync
2. I have created a file called "local_manifests.xml" in the directory ".repo/local_manifests/" that contains the following:
Code:
?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="android_device_samsung_dreamlte" fetch="https://github.com/TeamWin/" revision="android-9.0"/>
<project name="android_device_samsung_dreamlte" path="device/samsung/dreamlte" remote="android_device_samsung_dreamlte"
revision="android-9.0"/>
<remote name="android_kernel_samsung_msm8998" fetch="https://github.com/jesec/" revision="cm-14.1"/>
<project name="android_kernel_samsung_msm8998" path="kernel/samsung/msm8998" remote="android_kernel_samsung_msm8998" revision="cm-
14.1"/>
<remote name="vendor_samsung_dreamlte" fetch="https://github.com/AndroidBlobs/" revision="dreamltexx-user-8.0.0-R16NW-
G950FXXS4CRJD-release-keys"/>
<project name="vendor_samsung_dreamlte" path="vendor/samsung/dreamlte" remote="vendor_samsung_dreamlte" revision="dreamltexx-user-8.
0.0-R16NW-G950FXXS4CRJD-release-keys"/>
</manifest>
3. I have rerun the repo sync command to sync the blobs, kernel and architecture specific information from the local manifests.
4. I have added a file in the "device/samsung/dreamlte" directory called "lineage_dreamlte.mk" this file contains the following information based on the original "lineage.dependencies" file:
Code:
# Inherit from the common Open Source product configuration
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)
# Inherit from our custom product configuration
$(call inherit-product, vendor/lineage/config/common.mk)
PRODUCT_DEVICE := dreamlte
PRODUCT_NAME := lineage_dreamlte
PRODUCT_MODEL := Galaxy S8
PRODUCT_BRAND := Samsung
PRODUCT_MANUFACTURER := Samsung
5. I have added a blank file called "lineage.dependencies" in the same directory because the original omni.dependencies was also blank
6. I have modified the file called "BoardConfig.mk" in the same directory to read the following. This file was made based on a combination of the original file (which is for the Exynos-based model of the S8) and the board configuration for the Google Pixel 2 (available here) which has the same SOC as the Snapdragon-based S8.
Code:
Platform
DEVICE_CODENAME := dreamlte
DEVICE_PATH := device/samsung/$(DEVICE_CODENAME)
BOARD_VENDOR := samsung
TARGET_BOARD_PLATFORM := msm8998
TARGET_BOOTLOADER_BOARD_NAME := msm8998
TARGET_NO_BOOTLOADER := true
TARGET_NO_RADIOIMAGE := true
# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := cortex-a53
TARGET_CPU_SMP := true
# Secondary Architecture
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv8-a
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := cortex-a53
# File systems
BOARD_HAS_LARGE_FILESYSTEM := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
BOARD_HAS_NO_REAL_SDCARD := true
# TWRP specific build flags
RECOVERY_VARIANT := twrp
ALLOW_MISSING_DEPENDENCIES=true
TW_THEME := portrait_hdpi
RECOVERY_SDCARD_ON_DATA := true
TARGET_RECOVERY_PIXEL_FORMAT := "ABGR_8888"
TW_BRIGHTNESS_PATH := "/sys/class/backlight/panel/brightness"
TW_MAX_BRIGHTNESS := 36600
TW_DEFAULT_BRIGHTNESS := 15300
TW_NO_REBOOT_BOOTLOADER := true
TW_HAS_DOWNLOAD_MODE := true
TW_INCLUDE_NTFS_3G := true
TW_EXCLUDE_SUPERSU := true
TW_EXTRA_LANGUAGES := true
TW_USE_NEW_MINADBD := true
LZMA_RAMDISK_TARGETS := recovery
# Kernel
BOARD_KERNEL_BASE := 0x10000000
BOARD_KERNEL_PAGESIZE := 2048
TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/kernel
BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --tags_offset 0x00000100 --dt $(DEVICE_PATH)/dtb
# Include
TARGET_SPECIFIC_HEADER_PATH := $(DEVICE_PATH)/include
7. I run the "source build/envsetup.sh" command
Up to this point there has been no errors.​
8. I execute the "brunch lineage_dreamlte-eng" command and get the following
Code:
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:323:
build/make/core/board_config.mk:246: error: Building a 32-bit-app-only product on a 64-bit device. If this is intentional, set TARGET_SUPPORTS_64_BIT_APPS := false.
21:30:50 dumpvars failed with: exit status 1
Device dreamlte not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Repository for dreamlte not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:323:
build/make/core/board_config.mk:246: error: Building a 32-bit-app-only product on a 64-bit device. If this is intentional, set TARGET_SUPPORTS_64_BIT_APPS := false.
21:30:51 dumpvars failed with: exit status 1
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:323:
build/make/core/board_config.mk:246: error: Building a 32-bit-app-only product on a 64-bit device. If this is intentional, set TARGET_SUPPORTS_64_BIT_APPS := false.
21:30:51 dumpvars failed with: exit status 1
** Don't have a product spec for: 'lineage_dreamlte'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
I have looked up this error for multiple hours to no avail. I have no idea what could be the issue, it doesn't seem to me like the 32 bit error is fatal. It seems like it cannot find the product spec for some reason and that is the fatal error.
I am almost certain that I have made some sort of simple mistake that is causing the product spec to not show up. I am also almost certain I have made some sort of other error somewhere else in the process especially in step 6 (the one about the board config).
I would greatly appreciate someone looking over this for me and helping me to solve this issue. My apologies of this error can simply be chalked up to my own stupidity or carelessness.
If you want me to send the contents of any other files, results of commands, etc. I will be more than happy to send them.
Thanks,
sckzor
# Quick check to warn about likely cryptic errors later in the build.
ifeq ($(TARGET_IS_64_BIT),true)
ifeq (,$(filter true false,$(TARGET_SUPPORTS_64_BIT_APPS)))
$(error Building a 32-bit-app-only product on a 64-bit device. \
If this is intentional, set TARGET_SUPPORTS_64_BIT_APPS := false)
endif
endif
TARGET_SUPPORTS_64_BIT_APPS := true get you compiling again.

Categories

Resources