[ROM] AOSP with BlueZ Bluetooth stack HOWTO - Nexus 9 Android Development

Getting Started with Android BlueZ for Lollipop steps
Follow instructions to Initialize Build environment http://source.android.com/source/initializing.html
Download the sources like it is explained in http://source.android.com/source/downloading.html but use my manifest in repo init like
$ repo init -u https://code.google.com/p/android-bluez.manifest/ -b lollipop -m topic/bluetooth/bluez
Get complete Android source tree
$ repo sync
Then build normally following instructions here: http://source.android.com/source/building-running.html
Supported targets
Following targets shall be supported:
Nexus 4 (mako)
Nexus 7 (flo)
Nexus 5 (hammerhead)
Nexus 9 (volantis)
References:
https://code.google.com/p/android-bluez/wiki/AndroidLollipopVolantisBuild
https://code.google.com/p/android-bluez/wiki/AndroidLollipopVolantisBlueZKernelBuild
XDA:DevDB Information
Android BlueZ Nexus 9, ROM for the Nexus 9
Contributors
finikorg
ROM OS Version: 5.0.x Lollipop
Based On: AOSP
Version Information
Status: Testing
Created 2015-01-13
Last Updated 2015-01-13

I get a build error following this instructions
In file included from external/bluetooth/glib/glib/../glib/gtypes.h:34:0,
from external/bluetooth/glib/glib/../glib/gquark.h:34,
from external/bluetooth/glib/glib/gdataset.h:34,
from external/bluetooth/glib/glib/gdataset.c:37:
external/bluetooth/glib/glib/gdataset.c: In function 'g_quark_try_string':
external/bluetooth/glib/glib/../glibconfig.h:85:38: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
#define GPOINTER_TO_UINT(p) ((guint) (guint) (p))
^
external/bluetooth/glib/glib/gdataset.c:1133:13: note: in expansion of macro 'GPOINTER_TO_UINT'
quark = GPOINTER_TO_UINT (g_hash_table_lookup (g_quark_ht, string));
^
external/bluetooth/glib/glib/gdataset.c: In function 'g_quark_from_string_internal':
external/bluetooth/glib/glib/../glibconfig.h:85:38: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
#define GPOINTER_TO_UINT(p) ((guint) (guint) (p))
^
external/bluetooth/glib/glib/gdataset.c:1179:13: note: in expansion of macro 'GPOINTER_TO_UINT'
quark = GPOINTER_TO_UINT (g_hash_table_lookup (g_quark_ht, string));
^
external/bluetooth/glib/glib/gdataset.c: In function 'g_quark_new':
external/bluetooth/glib/glib/../glibconfig.h:88:30: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
#define GUINT_TO_POINTER(u) ((gpointer) (guint) (u))
^
external/bluetooth/glib/glib/gdataset.c:1300:44: note: in expansion of macro 'GUINT_TO_POINTER'
g_hash_table_insert (g_quark_ht, string, GUINT_TO_POINTER (quark));
^
cc1: some warnings being treated as errors
build/core/binary.mk:698: recipe for target 'out/target/product/flounder/obj/SHARED_LIBRARIES/libglib_intermediates/gdataset.o' failed
make: *** [out/target/product/flounder/obj/SHARED_LIBRARIES/libglib_intermediates/gdataset.o] Error 1
In file included from external/bluetooth/glib/glib/gtypes.h:34:0,
from external/bluetooth/glib/glib/galloca.h:34,
from external/bluetooth/glib/glib/glib.h:32,
from external/bluetooth/bluez/android/handsfree.c:32:
external/bluetooth/bluez/android/handsfree.c: In function 'confirm_cb':
external/bluetooth/glib/glibconfig.h:84:37: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
#define GPOINTER_TO_INT(p) ((gint) (gint) (p))
^
external/bluetooth/bluez/android/handsfree.c:1526:13: note: in expansion of macro 'GPOINTER_TO_INT'
dev->hsp = GPOINTER_TO_INT(data);
^
cc1: some warnings being treated as errors
build/core/binary.mk:698: recipe for target 'out/target/product/flounder/obj/EXECUTABLES/bluetoothd-main_intermediates/bluez/android/handsfree.o' failed
make: *** [out/target/product/flounder/obj/EXECUTABLES/bluetoothd-main_intermediates/bluez/android/handsfree.o] Error 1
make: *** wait: No child processes. Stop.

Related

[Q] Cannot compile Android L branch from AOSP: wrong binaries?

I am trying to compile the Android L preview branch from AOSP for the Nexus 7 (flo), I get this error:
hardware/qcom/wlan/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c:65: error: undefined reference to 'os_strncpy'
collect2: error: ld returned 1 exit status
make: *** [out/target/product/flo/obj/EXECUTABLES/hostapd_intermediates/LINKED/hostapd] Error 1
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
I have the preview binaries installed from the official page. I can confirm I have sub-folders in vendor named flo and it contains the binaries.
I have executed make clobber as well before building it again.
Are the preview binaries only for the master branch and not for the l-preview branch?

[Q] [E975] fail to build kernel for AOSP

I'm trying top compile a kernel from https://github.com/lollipop-og/kernel_msm by @Kevinjoa, but it fails with this error message. Can anybody help me?
Code:
WARNING: vmlinux.o(.meminit.text+0x48c): Section mismatch in reference from the function free_area_init_node() to the function .init.text:set_pageblock_order()
The function __meminit free_area_init_node() references
a function __init set_pageblock_order().
If set_pageblock_order is only used by free_area_init_node then
annotate set_pageblock_order with a matching annotation.
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: ** [vmlinux.o] Erro 1
make: ** [vmlinux.o] Erro 2

Need help for fixing these errors occurred during compiling cm 14

I am compiling cm 14 for core prime ve 3g (sm-g361h).
i am getting these error after executing mka bacon command (i have skipped all log above errors). I am building rom from source first time so i ain't got any clue what this error says (maybe a little bit but that ain't helping).
Code:
device/samsung/coreprimeve3g/ril/SamsungSPRDRIL.java:276: error: method does not override or implement a method from a supertype
@Override
^
device/samsung/coreprimeve3g/ril/SamsungSPRDRIL.java:314: error: method processSolicited in class RIL cannot be applied to given types;
return super.processSolicited(p);
^
required: Parcel,int
found: Parcel
reason: actual and formal argument lists differ in length
device/samsung/coreprimeve3g/ril/SamsungSPRDRIL.java:366: error: method does not override or implement a method from a supertype
@Override
^
device/samsung/coreprimeve3g/ril/SamsungSPRDRIL.java:422: error: method processUnsolicited in class RIL cannot be applied to given types;
super.processUnsolicited(p);
^
required: Parcel,int
found: Parcel
reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
[ 3% 1018/28725] host C++: libLLVMCor...2 <= external/llvm/lib/IR/Function.cpp
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/hamza/cm14'
#### make failed to build some targets (27:37 (mm:ss)) ####
bump

trouble building kernel

Closed per OP request
So i need to build a modified kernel to patch the usb host driver to hack a nintendo switch.
the patch is here
ive tried 2 kernel sources, here and here
and both are giving the same errors
Code:
CC arch/arm64/kernel/setup.o
arch/arm64/kernel/setup.c: In function 'c_show':
arch/arm64/kernel/setup.c:643:38: error: 'system_rev' undeclared (first use in this function)
seq_printf(m, "Revision\t: %04x\n", system_rev);
^
arch/arm64/kernel/setup.c:643:38: note: each undeclared identifier is reported only once for each function it appears in
arch/arm64/kernel/setup.c:645:4: error: 'system_serial_high' undeclared (first use in this function)
system_serial_high, system_serial_low);
^
arch/arm64/kernel/setup.c:645:24: error: 'system_serial_low' undeclared (first use in this function)
system_serial_high, system_serial_low);
^
scripts/Makefile.build:257: recipe for target 'arch/arm64/kernel/setup.o' failed
make[1]: *** [arch/arm64/kernel/setup.o] Error 1
Makefile:964: recipe for target 'arch/arm64/kernel' failed
make: *** [arch/arm64/kernel] Error 2
the variables i set are:
Code:
$echo $CROSS_COMPILE
/home/xxxx/Android/Sdk/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-
$echo $ARCH
arm64
for a config i used
Code:
arch/arm64/configs/msm8937_defconfig
set all "NEW" options to defaults. its my first kernel build, i have no idea what most of it is /shrug
if anyone can give me some tips or a .config that works, would be very much appreciated. i havent had any luck googling the errors yet

Adding Note 4 to lineage OS

I have successfully completed the repo sync process for lineage-17.1 build
I have executed the command lunch lineage-trlte-userdebug to add SM-n910G device to my lineageOS build.
Returns this error
Code:
build/make/core/product_config.mk:223: error: Can not locate config makefile for product "lineage".
10:46:02 dumpvars failed with: exit status 1
Device lineage not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Repository for lineage 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.
build/make/core/product_config.mk:223: error: Can not locate config makefile for product "lineage".
10:46:04 dumpvars failed with: exit status 1
build/make/core/version_defaults.mk:56: warning: Invalid TARGET_PLATFORM_VERSION 'userdebug', must be one of
build/make/core/version_defaults.mk:57: error: QP1A.
10:46:05 dumpvars failed with: exit status 1
** Don't have a product spec for: 'lineage'
** Do you have the right repo manifest?
But the device is already avaiable under the following link
https://github.com/LineageOS/android_device_samsung_trlte-common
Please correct/advise what am I missing here.

Categories

Resources