[Miscellaneous Android Development] UtCollector@gmail.com:
Fix compile problems

Fix problems... This the learning part.. Fun but can be really anoying to.

First i got my self:

make otatools did not work.

-Try make -j4 out/host/linux-x86/bin/unpackbootimg

-put "unpackbootimg" in ~/android/system/out/host/linux-x86/bin then i copy it to ~/usr/bin and set chmod.

Im did see a download if it some place. Google.

-copy unpackbootimg to into /usr/bin If it is there, make it executable.

make executable: sudo chmod a+x /usr/bin/unpackbootimg

-Run make clubber from The ICS folder. Than restart pc might help to.

Problem: unpackbootimg not found. Is your android build environment set up and have the host tools been built?

build/tools/device/mkvendor.sh YG m805_892x ~/recovery.img

gives:

unpackbootimg not found. Is your android build environment set up and have the host tools been built?

fix: make -j4 out/host/linux-x86/bin/unpackbootimg

fix2: permission van de bestanden aanpassen.

fix3: copy unpackbootimg file into /usr/bin (change permissing)

(Look on google for: cp file to usr/bin)

how:

Copy unpackbootimg to you´re home dir.

sudo cp unpackbootimg /usr/bin

Give pasword.

chmod +x unpackbootimg ./unpackbootimg

Probleem . build/envsetup.sh with vendorsetup.sh not found (including device/YG/m805_892x/vendorsetup.sh

):

frank@frank-Aspire-5755G:~/ICS$ . build/envsetup.sh

including device/ti/panda/vendorsetup.sh

including vendor/cm/vendorsetup.sh

including sdk/bash_completion/adb.bash

Make the file vendorsetup.sh in you´re device tree. Look at a nother device tree how it set up! Have a look in my github.

My device tree is in home dir at: / ICS/device/YG/m805_892x

Now run . build/envsetup.sh again it should be there now.

Still not there? Did you run the command from inside the right folder (project folder). I have to do cd ICS.

probleem:

build/core/product_config.mk:199: *** device/YG/m805_892x/full_m805_892x.mk: PRODUCT_NAME must be a valid C identifier, not "full_m805_892x-evm". Stop.

fix make files settings:

PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0

#PRODUCT_NAME := full_m805_892x

PRODUCT_NAME := full_m805_892x-evm

PRODUCT_DEVICE := m805_892x

PRODUCT_BRAND := Android

PRODUCT_MODEL := A777

Change to this:

PRODUCT_NAME := full_m805_892x_evm

And yes you have to use _ insted of - i gues.

Make the change in: cm.mk, device_m805_892x.mk and full_m805_892x.mk

Problem building recovery:

out/target/product/K00F/recovery.img total size is 9388032

error: out/target/product/K00F/recovery.img too large (9388032 > [33792 - 8448])

make: *** [out/target/product/K00F/recovery.img] Error 1

make: *** Deleting file `out/target/product/K00F/recovery.img'

Fix use this in boardconfig (Not for the TomTec tablet but for Asus device):

BOARD_BOOTIMAGE_MAX_SIZE := $(call image-size-from-data-size,0x00010000)

BOARD_RECOVERYIMAGE_MAX_SIZE := $(call image-size-from-data-size,0x00020000)

BOARD_SYSTEMIMAGE_MAX_SIZE := $(call image-size-from-data-size,0x000FC000)

#data-size,0x00010000 this and sow on i found in the Asus stock rom.

Nother problem that i did run into trying to make ext4 images:

make_ext4fs -s -l 0x40000000 -a data out/target/product/m805_892x/userdata.img out/target/product/m805_892x/data

Need size of filesystem

make: *** [out/target/product/m805_892x/userdata.img] Error 4

make: *** Waiting for unfinished jobs..

The sizes need to be in bytes it seems.

make_ext4fs does not support hex in the -l argument

DD dump you´re partitions and you see the amount of bytes.

I put this in my BoardConfig.mk like this:

BOARD_USERDATAIMAGE_PARTITION_SIZE := 1073741824

Use this to finisch waiting jobs..:

make_ext4fs -s -l 1073741824 -a data out/target/product/m805_892x/userdata.img out/target/product/m805_892x/data

problem:

-frank@frank-Aspire-5755G:~/ICS$ make -j4 recoveryimage

build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/YG/m805_892x/device_m805_892x.mk]]: "device/YG/m805_892x/m805_892x-vendor-blobs.mk" does not exist. Stop.

The error is somewhare found in this file:

device_m805_892x.mk I used the original file and start adding things again.

Problem:

make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/m805_892x/system/app/RomManager.apk'. Stop.

make: *** Waiting for unfinished jobs....

Copy: out/target/product/m805_892x/system/bin/compcache

Copy: out/target/product/m805_892x/system/bin/handle_compcache

frank@frank-Aspire-5755G:~/ICS$

For that use the terminal and cd to:

cd /vendor/cm

run:

./get-prebuilts

This will download the RomManager.apk and bit of other stuff.

Problem:

build/core/config.mk:162: *** TARGET_ARCH not defined by board config: device/

fix:

open ¨BoardConfig.mk¨

and ad: TARGET_ARCH :=arm (I have it under: TARGET_BOARD_PLATFORM)

Problem:

Which would you like? [full-eng] 5

build/core/product_config.mk:209: *** No matches for product "full_m805_892x". Stop.

Device not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).

Repository for m805_892x not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.

build/core/product_config.mk:209: *** No matches for product "full_m805_892x". Stop.

** Don't have a product spec for: 'full_m805_892x'

** Do you have the right repo manifest?

fix:

What you need to do is to edit your blob to match the PRODUCT_NAME to the file name. For example with mine I have full_m805_892x therefore in this file I need to have PRODUCT_NAME to match it. Whatever error it is looking for you just need to change the PRODUCT_NAME line to match what the error shows. I did have a look in the files: cm.mk, device_m805_892x.mk, full_m805_892x.mk and vendorsetup.sh

probleem building obj/lib/libril.so out:

prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: error: out/target/product/K00F/obj/lib/libril.so: unknown mandatory EABI object attribute 44

collect2: ld returned 1 exit status

make: *** [out/target/product/K00F/obj/EXECUTABLES/rild_intermediates/LINKED/rild] Error 1

make: *** Waiting for unfinished jobs....

fix: I did have to change the libril.so settings in BoardConfig.mk I did disable the libril.so settings for now.

I alsow did have to remove the libril.so file in ojb/lib of the project out folder. Than the build will go on.

repo problem:

repo sync gives:

gpg: Signature made do 01 mei 2014 22:34:18 CEST using RSA key ID 692B382C

gpg: Can't check signature: public key not found

error: could not verify the tag 'v1.12.16'

warning: Skipped upgrade to unverified version

Syncing work tree: 100% (255/255), done.

fix:

run: repo selfupdate --no-repo-verify

link: http://xdaforums.com/showthread.php?t=1846651&page=97

known-issues: https://source.android.com/source/known-issues.html

Nandroid errors http://www.droidforums.net/threads/nandroid-error-codes.20546/