COMPILE From Source For Any Phone On Linux Distros [BUILD ENVIRONMENT TO COMPILE]

Search This thread

ajhavery

Senior Member
May 21, 2011
957
1,024
Gurgaon
www.progeeky.com
I've been trying to compile Paranoid Android for HTC Vision and according to them in <device>.adds file I need to add the extra files which I need to get from github before compiling so I created the following file, but I added a lot many entries just because they were available on the Andromadus github who are maintaining cm repos for our device.
So, I'm not even sure if the modifications are needed or default PA entries will do.

I'm pasting my vision.adds file, please see and comment.

Code:
[
    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "htc7x30-3.0",
        "target_path":  "kernel/htc/msm7x30-3.0",
        "revision":     "jb"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_frameworks_native",
        "target_path":  "frameworks/native",
        "revision":     "cm10.1"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_frameworks_av",
        "target_path":  "frameworks/av",
        "revision":     "cm10.1"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_build",
        "target_path":  "build",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_frameworks_base",
        "target_path":  "frameworks/base",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_packages_apps_Camera",
        "target_path":  "packages/apps/Camera",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_libhardware",
        "target_path":  "hardware/libhardware",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_system_core",
        "target_path":  "system/core",
        "revision":     "jb4.2"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_libhardware_legacy",
        "target_path":  "hardware/libhardware_legacy",
        "revision":     "jb4.2"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_ril",
        "target_path":  "hardware/ril",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_device_htc_msm7x30-common",
        "target_path":  "device/htc/msm7x30-common",
        "revision":     "cm10.1"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_device_htc_common",
        "target_path":  "device/htc/common",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_device_htc_vision",
        "target_path":  "device/htc/vision",
        "revision":     "jb"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_frameworks_opt_telephony",
        "target_path":  "frameworks/opt/telephony",
        "revision":     "jb4.2"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_external_bluetooth_bluez",
        "target_path":  "external/bluetooth/bluez",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_external_wpa_supplicant_8",
        "target_path":  "external/wpa_supplicant_8",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_packages_apps_FM",
        "target_path":  "packages/apps/FM",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_packages_apps_Torch",
        "target_path":  "packages/apps/Torch",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_prebuilt",
        "target_path":  "prebuilt",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_prebuilts_gcc_linux-x86_arm_arm-eabi-linaro-4.7",
        "target_path":  "prebuilts/gcc/linux-x86/arm/arm-eabi-linaro-4.7",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_display",
        "target_path":  "hardware/qcom/display",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_media",
        "target_path":  "hardware/qcom/media",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_audio",
        "target_path":  "hardware/qcom/audio",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_camera",
        "target_path":  "hardware/qcom/camera",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_librpc",
        "target_path":  "hardware/qcom/librpc",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_gps",
        "target_path":  "hardware/qcom/gps",
        "revision":     "gingerbread"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_msm7k",
        "target_path":  "hardware/msm7k",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "proprietary_htc_vision",
        "target_path":  "vendor/htc/vision",
        "revision":     "jb"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_vendor_qcom_opensource_omx_mm-video",
        "target_path":  "vendor/qcom/opensource/omx/mm-video",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_vendor_qcom_opensource_omx_mm-core",
        "target_path":  "vendor/qcom/opensource/omx/mm-core",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_vendor_qcom_opensource_v8",
        "target_path":  "vendor/qcom/opensource/v8",
        "revision":     "master"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_vendor_qcom_proprietary",
        "target_path":  "vendor/qcom",
        "revision":     "jellybean"
    }
   
]
 

just1nsama

Senior Member
Jan 7, 2013
381
260
Quebec
Need help with OTA

Hi,

After completing this tutorial, i decided to start compiling AOKP builds for my builds for my TF101, succeeded with AOKP41, but now struggling compiling AOKP42 since there are no device tree for the TF101 as of yet.

Using a custom kernel from another DEV as well as his CM10.1 device tree, after editing some scripts, its compiling, its able to create all the .img needed, but it fails when trying to create the .zip files so at the begining of the OTA Package part in the MakeFile.mk and i get this error:

** option --no_assert not recognized **
make: *** [/root/aokp-jb-mr1/out/target/product/tf101/aokp_tf101-ota-eng.root.zip] Error 2


I verified in the AOKP41 device tree for the TF101 and in the MakeFile.mk, i can see the same exact structure to build the OTA Package and the ---no_assert command is present but not giving me the error when building since i was able to get .zip working ROM from compiling.

Here is the code from both MakeFile.mk:

# OTA update package

name := $(TARGET_PRODUCT)
ifeq ($(TARGET_BUILD_TYPE),debug)
name := $(name)_debug
endif
name := $(name)-ota-$(FILE_NAME_TAG)

INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip

$(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR)

ifeq ($(TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT),)
OTA_FROM_TARGET_SCRIPT := ./build/tools/releasetools/ota_from_target_files
else
OTA_FROM_TARGET_SCRIPT := $(TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT)
endif

ifeq ($(TARGET_OTA_ASSERT_DEVICE),)
$(INTERNAL_OTA_PACKAGE_TARGET): override_device := auto
else
$(INTERNAL_OTA_PACKAGE_TARGET): override_device := $(TARGET_OTA_ASSERT_DEVICE)
endif

ifeq ($(TARGET_OTA_ASSERT_SKIP),true)
$(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := true
else
$(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := false
endif

$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
@echo "Package OTA: $@"
$(OTA_FROM_TARGET_SCRIPT) -v \
-p $(HOST_OUT) \
-k $(KEY_CERT_PAIR) \
--no_assert=$(skip_assert) \
--override_device=$(override_device) \
$(BUILT_TARGET_FILES_PACKAGE) $@

.PHONY: otapackage bacon
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
bacon: otapackage
ifneq ($(TARGET_CUSTOM_RELEASETOOL),)
@echo "Running releasetool"
$(hide) OTAPACKAGE=$(INTERNAL_OTA_PACKAGE_TARGET) $(TARGET_CUSTOM_RELEASETOOL)
else
$(hide) ./vendor/aokp/tools/squisher
endif


Tried to put this section in comments as well as the --no_assert=$(skip_assert) command but it would be another error or Permission Denied if also putting override_device in comments:

ifeq ($(TARGET_OTA_ASSERT_SKIP),true)
$(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := true
else
$(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := false
endif


I need to get past this section to get a flashable .zip, so if anyone can help or tell me where i can get the help, i could finish compiling this wh**e.

Thanks
 

mithun46

Senior Member
Oct 28, 2012
1,275
1,980
▒▅|▆|█|▆|▅▒
I've been trying to compile Paranoid Android for HTC Vision and according to them in <device>.adds file I need to add the extra files which I need to get from github before compiling so I created the following file, but I added a lot many entries just because they were available on the Andromadus github who are maintaining cm repos for our device.
So, I'm not even sure if the modifications are needed or default PA entries will do.

I'm pasting my vision.adds file, please see and comment.

Code:
[
    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "htc7x30-3.0",
        "target_path":  "kernel/htc/msm7x30-3.0",
        "revision":     "jb"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_frameworks_native",
        "target_path":  "frameworks/native",
        "revision":     "cm10.1"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_frameworks_av",
        "target_path":  "frameworks/av",
        "revision":     "cm10.1"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_build",
        "target_path":  "build",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_frameworks_base",
        "target_path":  "frameworks/base",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_packages_apps_Camera",
        "target_path":  "packages/apps/Camera",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_libhardware",
        "target_path":  "hardware/libhardware",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_system_core",
        "target_path":  "system/core",
        "revision":     "jb4.2"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_libhardware_legacy",
        "target_path":  "hardware/libhardware_legacy",
        "revision":     "jb4.2"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_ril",
        "target_path":  "hardware/ril",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_device_htc_msm7x30-common",
        "target_path":  "device/htc/msm7x30-common",
        "revision":     "cm10.1"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_device_htc_common",
        "target_path":  "device/htc/common",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_device_htc_vision",
        "target_path":  "device/htc/vision",
        "revision":     "jb"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_frameworks_opt_telephony",
        "target_path":  "frameworks/opt/telephony",
        "revision":     "jb4.2"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_external_bluetooth_bluez",
        "target_path":  "external/bluetooth/bluez",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_external_wpa_supplicant_8",
        "target_path":  "external/wpa_supplicant_8",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_packages_apps_FM",
        "target_path":  "packages/apps/FM",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_packages_apps_Torch",
        "target_path":  "packages/apps/Torch",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_prebuilt",
        "target_path":  "prebuilt",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_prebuilts_gcc_linux-x86_arm_arm-eabi-linaro-4.7",
        "target_path":  "prebuilts/gcc/linux-x86/arm/arm-eabi-linaro-4.7",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_display",
        "target_path":  "hardware/qcom/display",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_media",
        "target_path":  "hardware/qcom/media",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_audio",
        "target_path":  "hardware/qcom/audio",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_camera",
        "target_path":  "hardware/qcom/camera",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_librpc",
        "target_path":  "hardware/qcom/librpc",
        "revision":     "jellybean"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_qcom_gps",
        "target_path":  "hardware/qcom/gps",
        "revision":     "gingerbread"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_hardware_msm7k",
        "target_path":  "hardware/msm7k",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "proprietary_htc_vision",
        "target_path":  "vendor/htc/vision",
        "revision":     "jb"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_vendor_qcom_opensource_omx_mm-video",
        "target_path":  "vendor/qcom/opensource/omx/mm-video",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_vendor_qcom_opensource_omx_mm-core",
        "target_path":  "vendor/qcom/opensource/omx/mm-core",
        "revision":     "ics"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_vendor_qcom_opensource_v8",
        "target_path":  "vendor/qcom/opensource/v8",
        "revision":     "master"
    },

    {
        "remote":       "github",
        "account":      "Andromadus",
        "repository":   "android_vendor_qcom_proprietary",
        "target_path":  "vendor/qcom",
        "revision":     "jellybean"
    }
   
]

Hi,

After completing this tutorial, i decided to start compiling AOKP builds for my builds for my TF101, succeeded with AOKP41, but now struggling compiling AOKP42 since there are no device tree for the TF101 as of yet.

Using a custom kernel from another DEV as well as his CM10.1 device tree, after editing some scripts, its compiling, its able to create all the .img needed, but it fails when trying to create the .zip files so at the begining of the OTA Package part in the MakeFile.mk and i get this error:

** option --no_assert not recognized **
make: *** [/root/aokp-jb-mr1/out/target/product/tf101/aokp_tf101-ota-eng.root.zip] Error 2


I verified in the AOKP41 device tree for the TF101 and in the MakeFile.mk, i can see the same exact structure to build the OTA Package and the ---no_assert command is present but not giving me the error when building since i was able to get .zip working ROM from compiling.

Here is the code from both MakeFile.mk:

# OTA update package

name := $(TARGET_PRODUCT)
ifeq ($(TARGET_BUILD_TYPE),debug)
name := $(name)_debug
endif
name := $(name)-ota-$(FILE_NAME_TAG)

INTERNAL_OTA_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip

$(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR)

ifeq ($(TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT),)
OTA_FROM_TARGET_SCRIPT := ./build/tools/releasetools/ota_from_target_files
else
OTA_FROM_TARGET_SCRIPT := $(TARGET_RELEASETOOL_OTA_FROM_TARGET_SCRIPT)
endif

ifeq ($(TARGET_OTA_ASSERT_DEVICE),)
$(INTERNAL_OTA_PACKAGE_TARGET): override_device := auto
else
$(INTERNAL_OTA_PACKAGE_TARGET): override_device := $(TARGET_OTA_ASSERT_DEVICE)
endif

ifeq ($(TARGET_OTA_ASSERT_SKIP),true)
$(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := true
else
$(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := false
endif

$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
@echo "Package OTA: $@"
$(OTA_FROM_TARGET_SCRIPT) -v \
-p $(HOST_OUT) \
-k $(KEY_CERT_PAIR) \
--no_assert=$(skip_assert) \
--override_device=$(override_device) \
$(BUILT_TARGET_FILES_PACKAGE) $@

.PHONY: otapackage bacon
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
bacon: otapackage
ifneq ($(TARGET_CUSTOM_RELEASETOOL),)
@echo "Running releasetool"
$(hide) OTAPACKAGE=$(INTERNAL_OTA_PACKAGE_TARGET) $(TARGET_CUSTOM_RELEASETOOL)
else
$(hide) ./vendor/aokp/tools/squisher
endif


Tried to put this section in comments as well as the --no_assert=$(skip_assert) command but it would be another error or Permission Denied if also putting override_device in comments:

ifeq ($(TARGET_OTA_ASSERT_SKIP),true)
$(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := true
else
$(INTERNAL_OTA_PACKAGE_TARGET): skip_assert := false
endif


I need to get past this section to get a flashable .zip, so if anyone can help or tell me where i can get the help, i could finish compiling this wh**e.

Thanks

No idea . im a cm compiler
 

AndyFox2011

Senior Member
Sep 20, 2011
1,633
541
Used your guide again to setup my PC for building! Worked like a charm on 11.04, hopefully it'll build like s charm too!


Oh and its BeerGang CM10.1 I'm syncing :)

Sent from my Desire HD using xda app-developers app
 

ktempleton

Senior Member
Oct 3, 2012
4,531
5,941
Lebanon
Hey my man you shouldn't make that dependent on what other people do or do not do if you were asked by the committee then there is a reason they asked you. Just remember that sometimes other people have to point things out to us because we can't see it in ourselves get that application and fill it out my man... Not hitting the thanks button on purpose:D

Sent from my SPH-D710 using xda premium
 

AndyFox2011

Senior Member
Sep 20, 2011
1,633
541
Guys The Developer Comitee said me to apply for RC title. Don't know what to do.
If I get more than ten thanks on this post I will apply

Sent from my GT-P7300 using xda premium

Just do it! Your guides are good! I keep referring people to them when they ask me for help!

Sent from my Desire HD using xda app-developers app
 

mithun46

Senior Member
Oct 28, 2012
1,275
1,980
▒▅|▆|█|▆|▅▒
Hey my man you shouldn't make that dependent on what other people do or do not do if you were asked by the committee then there is a reason they asked you. Just remember that sometimes other people have to point things out to us because we can't see it in ourselves get that application and fill it out my man... Not hitting the thanks button on purpose:D

Sent from my SPH-D710 using xda premium

Just do it! Your guides are good! I keep referring people to them when they ask me for help!

Sent from my Desire HD using xda app-developers app

will apply . thnx ppl
 

ajhavery

Senior Member
May 21, 2011
957
1,024
Gurgaon
www.progeeky.com
I'm getting this error:

Code:
target thumb C: sshd <= external/openssh/monitor.c
target thumb C: sshd <= external/openssh/monitor_wrap.c
target thumb C: sshd <= external/openssh/kexdhs.c
target thumb C: sshd <= external/openssh/kexgexs.c
target thumb C: sshd <= external/openssh/kexecdhs.c
target thumb C: sshd <= external/openssh/auth-krb5.c
target thumb C: sshd <= external/openssh/auth2-gss.c
target thumb C: sshd <= external/openssh/gss-serv.c
target thumb C: sshd <= external/openssh/gss-serv-krb5.c
target thumb C: sshd <= external/openssh/loginrec.c
target thumb C: sshd <= external/openssh/auth-pam.c
target thumb C: sshd <= external/openssh/auth-shadow.c
target thumb C: sshd <= external/openssh/auth-sia.c
target thumb C: sshd <= external/openssh/md5crypt.c
target thumb C: sshd <= external/openssh/sftp-server.c
target thumb C: sshd <= external/openssh/sftp-common.c
external/openssh/sftp-common.c: In function 'ls_file':
external/openssh/sftp-common.c:193:9: warning: pointer targets in passing argument 1 of 'localtime' differ in signedness [-Wpointer-sign]
bionic/libc/include/time.h:73:20: note: expected 'time_t const *' but argument is of type 'long unsigned int const *'
target thumb C: sshd <= external/openssh/roaming_common.c
external/openssh/roaming_common.c: In function 'calculate_new_key':
external/openssh/roaming_common.c:238:2: warning: pointer targets in passing argument 2 of 'EVP_DigestFinal' differ in signedness [-Wpointer-sign]
external/openssl/include/openssl/evp.h:566:5: note: expected 'unsigned char *' but argument is of type 'char *'
target thumb C: sshd <= external/openssh/roaming_serv.c
target thumb C: sshd <= external/openssh/sandbox-null.c
target thumb C: sshd <= external/openssh/sandbox-rlimit.c
target thumb C: sshd <= external/openssh/sandbox-systrace.c
target thumb C++: stagefright <= frameworks/av/cmds/stagefright/stagefright.cpp
target thumb C++: stagefright <= frameworks/av/cmds/stagefright/jpeg.cpp
target thumb C++: stagefright <= frameworks/av/cmds/stagefright/SineSource.cpp
target thumb C++: stream <= frameworks/av/cmds/stagefright/stream.cpp
Import includes file: /home/ajhavery/android/paranoid/out/target/product/vision/obj/EXECUTABLES/surfaceflinger_intermediates/import_includes
target thumb C++: libsurfaceflinger <= frameworks/native/services/surfaceflinger/Client.cpp
target thumb C++: libsurfaceflinger <= frameworks/native/services/surfaceflinger/DisplayDevice.cpp
In file included from frameworks/native/services/surfaceflinger/LayerBase.h:37:0,
                 from frameworks/native/services/surfaceflinger/Layer.h:37,
                 from frameworks/native/services/surfaceflinger/Client.cpp:25:
frameworks/native/services/surfaceflinger/DisplayHardware/HWComposer.h:65:24: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
In file included from frameworks/native/services/surfaceflinger/DisplayDevice.cpp:42:0:
frameworks/native/services/surfaceflinger/DisplayHardware/HWComposer.h:65:24: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
In file included from frameworks/native/services/surfaceflinger/DisplayDevice.cpp:45:0:
frameworks/native/services/surfaceflinger/DisplayDevice.h:57:31: error: 'HWC_DISPLAY_PRIMARY' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:58:31: error: 'HWC_DISPLAY_EXTERNAL' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:59:31: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:60:31: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
In file included from frameworks/native/services/surfaceflinger/SurfaceFlinger.h:49:0,
                 from frameworks/native/services/surfaceflinger/Client.cpp:27:
frameworks/native/services/surfaceflinger/DisplayDevice.h:57:31: error: 'HWC_DISPLAY_PRIMARY' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:58:31: error: 'HWC_DISPLAY_EXTERNAL' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:59:31: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:60:31: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
make: *** [/home/ajhavery/android/paranoid/out/target/product/vision/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/Client.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [/home/ajhavery/android/paranoid/out/target/product/vision/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/DisplayDevice.o] Error 1

Please suggest.

Compiling for htc vision on ubuntu 12.10.
 

Koetermann

Senior Member
Mar 28, 2011
125
27
Bremen
Extract proprietary blobs

Now ensure that your Phone is connected to your computer via the USB cable and that you are in the ~/Source/device/***/***** directory (you can cd ~/Source/device/***/****** if necessary). Then run the this script:
Code:
./proprietary-files.sh
or
Code:
./extract-files.sh

You should see the proprietary files (aka “blobs”) get pulled from the device and moved to the right place in the vendor directory. If you see errors about adb being unable to pull the files, adb may not be in the path of execution

I'm not really sure if I'm right. But maybe it will help some users if you point out that this is the only step where you need to have root access. Adb doesn't work with normal user rights.

Regards

Koetermann
 

mithun46

Senior Member
Oct 28, 2012
1,275
1,980
▒▅|▆|█|▆|▅▒
I'm getting this error:

Code:
target thumb C: sshd <= external/openssh/monitor.c
target thumb C: sshd <= external/openssh/monitor_wrap.c
target thumb C: sshd <= external/openssh/kexdhs.c
target thumb C: sshd <= external/openssh/kexgexs.c
target thumb C: sshd <= external/openssh/kexecdhs.c
target thumb C: sshd <= external/openssh/auth-krb5.c
target thumb C: sshd <= external/openssh/auth2-gss.c
target thumb C: sshd <= external/openssh/gss-serv.c
target thumb C: sshd <= external/openssh/gss-serv-krb5.c
target thumb C: sshd <= external/openssh/loginrec.c
target thumb C: sshd <= external/openssh/auth-pam.c
target thumb C: sshd <= external/openssh/auth-shadow.c
target thumb C: sshd <= external/openssh/auth-sia.c
target thumb C: sshd <= external/openssh/md5crypt.c
target thumb C: sshd <= external/openssh/sftp-server.c
target thumb C: sshd <= external/openssh/sftp-common.c
external/openssh/sftp-common.c: In function 'ls_file':
external/openssh/sftp-common.c:193:9: warning: pointer targets in passing argument 1 of 'localtime' differ in signedness [-Wpointer-sign]
bionic/libc/include/time.h:73:20: note: expected 'time_t const *' but argument is of type 'long unsigned int const *'
target thumb C: sshd <= external/openssh/roaming_common.c
external/openssh/roaming_common.c: In function 'calculate_new_key':
external/openssh/roaming_common.c:238:2: warning: pointer targets in passing argument 2 of 'EVP_DigestFinal' differ in signedness [-Wpointer-sign]
external/openssl/include/openssl/evp.h:566:5: note: expected 'unsigned char *' but argument is of type 'char *'
target thumb C: sshd <= external/openssh/roaming_serv.c
target thumb C: sshd <= external/openssh/sandbox-null.c
target thumb C: sshd <= external/openssh/sandbox-rlimit.c
target thumb C: sshd <= external/openssh/sandbox-systrace.c
target thumb C++: stagefright <= frameworks/av/cmds/stagefright/stagefright.cpp
target thumb C++: stagefright <= frameworks/av/cmds/stagefright/jpeg.cpp
target thumb C++: stagefright <= frameworks/av/cmds/stagefright/SineSource.cpp
target thumb C++: stream <= frameworks/av/cmds/stagefright/stream.cpp
Import includes file: /home/ajhavery/android/paranoid/out/target/product/vision/obj/EXECUTABLES/surfaceflinger_intermediates/import_includes
target thumb C++: libsurfaceflinger <= frameworks/native/services/surfaceflinger/Client.cpp
target thumb C++: libsurfaceflinger <= frameworks/native/services/surfaceflinger/DisplayDevice.cpp
In file included from frameworks/native/services/surfaceflinger/LayerBase.h:37:0,
                 from frameworks/native/services/surfaceflinger/Layer.h:37,
                 from frameworks/native/services/surfaceflinger/Client.cpp:25:
frameworks/native/services/surfaceflinger/DisplayHardware/HWComposer.h:65:24: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
In file included from frameworks/native/services/surfaceflinger/DisplayDevice.cpp:42:0:
frameworks/native/services/surfaceflinger/DisplayHardware/HWComposer.h:65:24: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
In file included from frameworks/native/services/surfaceflinger/DisplayDevice.cpp:45:0:
frameworks/native/services/surfaceflinger/DisplayDevice.h:57:31: error: 'HWC_DISPLAY_PRIMARY' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:58:31: error: 'HWC_DISPLAY_EXTERNAL' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:59:31: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:60:31: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
In file included from frameworks/native/services/surfaceflinger/SurfaceFlinger.h:49:0,
                 from frameworks/native/services/surfaceflinger/Client.cpp:27:
frameworks/native/services/surfaceflinger/DisplayDevice.h:57:31: error: 'HWC_DISPLAY_PRIMARY' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:58:31: error: 'HWC_DISPLAY_EXTERNAL' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:59:31: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
frameworks/native/services/surfaceflinger/DisplayDevice.h:60:31: error: 'HWC_NUM_DISPLAY_TYPES' was not declared in this scope
make: *** [/home/ajhavery/android/paranoid/out/target/product/vision/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/Client.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [/home/ajhavery/android/paranoid/out/target/product/vision/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/DisplayDevice.o] Error 1

Please suggest.

Compiling for htc vision on ubuntu 12.10.
only cm based roms here
 

AndyFox2011

Senior Member
Sep 20, 2011
1,633
541
Okay so i got the BeerGang repo, pasted in my device config as its not in the CM repo (desire hd -- ace)

first i ran . build/envsetup.sh and it lists the ace, but then i ran brunch and it trys to get the device config from the cm repo

then i realised that i should use the jb-build.sh, but that doesn't list my cm_ace-userdebug or cm_ace-eng

so how can i add it in too get it to build?


Thanks,
Andy
 

mithun46

Senior Member
Oct 28, 2012
1,275
1,980
▒▅|▆|█|▆|▅▒
Okay so i got the BeerGang repo, pasted in my device config as its not in the CM repo (desire hd -- ace)

first i ran . build/envsetup.sh and it lists the ace, but then i ran brunch and it trys to get the device config from the cm repo

then i realised that i should use the jb-build.sh, but that doesn't list my cm_ace-userdebug or cm_ace-eng

so how can i add it in too get it to build?


Thanks,
Andy
gimme teamviewer
 

Top Liked Posts

  • There are no posts matching your filters.
  • 197
    buildve.png

    This is a guide to Compile From any CyanogenMod and CyanogenMod Source-Based source for Any Phone. This guide is for linux , Ubuntu etc.

    What you’ll need
    • A Phone Which runs Android :p
    • A relatively recent computer (Linux, OS X, or Windows) w/a reasonable amount of RAM and storage. The less RAM you have, the longer the build will take. Using SSDs results in faster builds than traditional hard drives.
    • A micro USB cable
    • A decent Internet connection & reliable electricity :)
    • Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with what a recovery image such as ClockworkMod is, for example. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /, etc.

    Note:
    You want to use a 64-bit version of Linux. According to Google, 32-bit Linux environment will only work if you are building older versions prior to Gingerbread (2.3.x)/CyanogenMod 7.

    Using a VM allows Linux to run as a guest inside your host computer-- a computer in a computer, if you will. If you hate Linux for whatever reason, you can always just uninstall and delete the whole thing. (There are plenty of places to find instructions for setting up Virtualbox with Ubuntu, so I’ll leave it to you to do that.)

    So let’s begin!

    Build ROM and ClockworkMod Recovery



    buildenvironment.png


    Prepare the Build Environment


    Note:
    You only need to do these steps the first time you build. If you previously prepared your build environment and have downloaded the CyanogenMod source code for another device, skip to Next Post.

    Install the SDK
    If you have not previously installed adb and fastboot, install the Android SDK. "SDK" stands for Software Developer Kit, and it includes useful tools that you will can use to flash software, look at the system logs in real time, grab screenshots, and more-- all from your computer.

    Helpful Tip!
    While the SDK contains lots of different things-- the two tools you are most interested in for building Android are adb and fastboot, located in the /platform-tools directory.

    Install the Build Packages
    Several "build packages" are needed to build From Source. You can install these using the package manager of your choice.
    Helpful Tip!
    A package manager in Linux is a system used to install or remove software (usually originating from the Internet) on your computer. With Ubuntu, you can use the Ubuntu Software Center. Even better, you may also use the apt-get install command directly in the Terminal. (Learn more about the apt packaging tool system from Wikipedia.)

    For 32-bit & 64-bit systems, you'll need:
    Code:
    git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl 
    libncurses5-dev zlib1g-dev openjdk-6-jre openjdk-6-jdk pngcrush schedtool
    For 64-bit only systems, get these:
    Code:
    g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.7-multilib g++-4.5-multilib
    For Linux Mint, you'll need:
    Code:
    libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils

    Create the directories
    Code:
    mkdir -p ~/bin

    Install the repo command
    Enter the following to download the "repo" binary and make it executable (runnable):
    Code:
    curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    chmod a+x ~/bin/repo

    Put the ~/bin directory in your path of execution
    Make sure that the ~/bin directory you just created is in your path of execution so that you can easily run the repo command even when you're not in ~/bin. Assuming you are using the BASH shell, the default in recent versions of Ubuntu, you can set it like this:
    Code:
    export PATH=${PATH}:~/bin

    Helpful Tip!
    You can make this change to the path permanent for all future Terminal sessions:
    Code:
    gedit ~/.bashrc
    This will launch a graphical text editor. Enter
    Code:
    export PATH=${PATH}:~/bin
    on its own line, then save the file.

    Initialize the source repository
    repox.png


    Make a Folder to Download the Sources and cd to it. For That:
    Code:
    mkdir -p ~/Source
    Code:
    cd Source

    Enter the following to initialize the repository:

    REPOSITORY'S OF FAMOUS ROMS (Select One)

    PAC-Man :
    Code:
    repo init -u git://github.com/PAC-man/android.git -b cm-10.2
    CM 11.0 :
    Code:
    repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
    CM 10.1 :
    Code:
    repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
    CM10 :
    Code:
    repo init -u git://github.com/CyanogenMod/android.git -b jellybean

    Download the source code
    Code:
    repo sync

    Helpful Tip!
    The repo sync command is used to update the latest source code from CyanogenMod and Google. Remember it, as you can do it every few days to keep your code base fresh and up-to-date.


    Get prebuilt apps
    Code:
    cd ~/Source/vendor/cm
    Code:
    ./get-prebuilts

    How To Compile is there on next post :D
    105
    Prepare the device-specific code

    After the source downloads, type:
    Code:
    . build/envsetup.sh

    Then Do This

    Code:
    breakfast ******
    Where ***** is the codename for your device

    MAKE SURE YOUR PHONE IS ON OFFICIAL LATEST CYANOGENMOD ROM


    Helpful Tip!
    If you get a command not found error for lunch, be sure you’ve done the “. build/envsetup.sh” command from ~/Source. Notice there is a period and space (“. ”) in that command.

    Extract proprietary blobs

    Now ensure that your Phone is connected to your computer via the USB cable and that you are in the ~/Source/device/***/***** directory (you can cd ~/Source/device/***/****** if necessary). Run as Root if on Debian using sudo. Then run the this script:
    Code:
    ./proprietary-files.sh
    or
    Code:
    ./extract-files.sh

    Here ***** is Device codename and *** is the Phone Company like Samsung or HTC
    For Example if my phone is note 2 then this will be the device path : ~/Source/device/Samsung/n7100

    You should see the proprietary files (aka “blobs”) get pulled from the device and moved to the right place in the vendor directory. If you see errors about adb being unable to pull the files, adb may not be in the path of execution

    Note:
    It’s important that these proprietary files are properly extracted and moved to the vendor directory. Without them, CyanogenMod will build without error, but you’ll be missing important functionality, such as the ability to see anything!

    Turn on caching to speed up build

    Code:
    export USE_CCACHE=1

    Start the build

    Code:
    cd ~/Source
    brunch *****
    Here ***** is the Phone Codename

    Helpful Tip!
    If the build doesn't start, try lunch and choose your device from the menu. If that doesn't work, try breakfast and choose from the menu. The command make ***** should then work.

    If the build breaks...
    If you experience this not-enough-memory-related error...
    Code:
    ERROR: signapk.jar failed: return code 1make: *** [out/target/product/n7100/cm_n7100-ota-eng.root.zip] Error 1
    ...you may want to make the following change to This File : system/build/tools/releasetools/common.py
    Change: java -Xmx2048m to java -Xmx1024m or java -Xmx512m
    Then start the build again (with brunch).
    If you see a message about things suddenly being “killed” for no reason, your (virtual) machine may have run out of memory or storage space. Assign it more resources and try again.

    Install the build
    Assuming the build completed without error (it will be obvious when it finishes), type:
    Code:
    # cd $OUT

    in the same terminal window that you did the build. Here you’ll find all the files that were created. The stuff that will go in /system is in a folder called system. The stuff that will become your ramdisk is in a folder called root. And your kernel is called... kernel.
    But that’s all just background info. The two files we are interested in are (1) recovery.img, which contains ClockworkMod recovery, and (2) cm-[something].zip, which contains ROM.

    Install ROM
    Back to the $OUT directory on your computer-- you should see a file that looks something like:
    Code:
    cm-10-20120718-UNOFFICIAL-***.zip
    Here *** is the phone codename

    Now you can flash the ...zip file above as usual via recovery mode. (Be sure you have backed up any previous installation before trying your new build.)


    Feedbacks to this guide
    I got my build working!
    Great tutorial by the way!
    Tom

    Well i finally sucessfully build.
    thank you for your help

    Works like a charm, used it a while ago too set up on 12.10 :)

    Compiling cm10.1 worked great for my sgs3 d2tmo.Thank's for the tutorial it's been fun setting this up.

    really really good guide, very detailed and precise.

    Hi there,
    I was finally able to compile Cyanogenmod from source.
    So, thanks for your guide an your support.Thanks a lot.
    Regards Koetermann

    Used your guide again to setup my PC for building! Worked like a charm on 11.04

    thanks for post this, great and simple guide for n00bs (like me)

    This tutorial ROCKS! :good: . Successfully built i9300 starting from fresh ubuntu 12.10 installation w/o even a hickup :D





    Read the Below Command Before Asking question regarding Device tree : Credit @speed_bot
    HTML:
    #include
    #include /ps my own header/
    main()
    {
    int device tree,rom;
    for((device==1) || (device tree =1))
    printf("you can build a rom");
    else 
    printf("you cant :P");
    }
    18
    The issue with guides like these is they are specific to one version of Ubuntu. I successfully build Android on gentoo, which has about as little in common with Ubuntu as possible. Hence we prefer to go for guides which, where possible, teach the reasoning, rather than the method.

    For building CM, this might be worthwhile merging into the "how to build android from source" one?

    Unfortunately this guide isn't usable for most people, as it relies on the hacksung build scripts, so you can only build for certain devices...

    What might be better is a guide on using roomservice via lunch, to build for any device?
    6
    What if i want to compile the PAC rom?
    https://github.com/PAC-man

    Downloading Ubuntu now!! Excited!! :)

    Edit figured it out myself!!
    repo init -u git://github.com/PAC-man/android.git -b jellybean
    thankx anyways...

    ya and you might need a minor edits to makefiles in the config ...


    btw

    this is a thread maintained by me
    http://xdaforums.com/showthread.php?t=2059939

    so feel free to post your errors that you encounter....

    @op

    explain what every step means rather then just copy paste....

    ---------- Post added at 06:37 PM ---------- Previous post was at 06:35 PM ----------

    Isn't "apt" the "stock" package manager in (K)Ubuntu?

    But I've another question @mithun46: Is it possible, that your guide only works on a 64bit edition of ubuntu? So that 32bit installations ain't supported?

    32bit systems don't have the packages to build jb and above.. so it wont work with 32bit systems..
    6
    Guys The Developer Comitee said me to apply for RC title. Don't know what to do.
    If I get more than ten thanks on this post I will apply

    Sent from my GT-P7300 using xda premium