[DEV][INFO] Android x86-atom Gtab3 Development - Galaxy Tab 3 10.1 Android Development

In here you will find all info about development for the x86 architecture on the Galaxy Tab3
In the OP I will try to gather all info I can find, and what others post here.
Post below I will post my own personal dev stuff
THIS IS ONLY FOR DEVELOPMENT
IF YOUR NOT DEVELOPING PLEASE DON'T POST
If you want to say Thanks... use the button​
Links
ANDROID ON INTEL ARCHITECTURE
Google group Android x86​

Recovery
My current recovery is build on Android 4.2.1
This made me compile it, and usable.
But we want more and better features, and so we need it on Android 4.2.2
But this doesn't compile
My Setup:
Ubuntu 13.04
Java 6.0
make 3.82
ADT bundle x86_64 (latest)
My current BoardConfig.mk
Code:
USE_CAMERA_STUB := true
# inherit from the proprietary version
-include vendor/samsung/santos10wifi/BoardConfigVendor.mk
TARGET_ARCH := x86
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := clovertrail
TARGET_CPU_ABI := x86
TARGET_CPU_ABI2 := x86
TARGET_ARCH_VARIANT := x86-atom
ARCH_ARM_HAVE_TLS_REGISTER := true
TARGET_BOOTLOADER_BOARD_NAME := santos10wifi
#TARGET_KERNEL_SOURCE := kernel/samsung/santos10wifi
#TARGET_KERNEL_CONFIG := android_santos10_open_r00_user_defconfig
BOARD_KERNEL_CMDLINE := init=/init pci=noearly console=ttyS0 console=logk0 earlyprintk=nologger loglevel=4 hsu_dma=7 kmemleak=off androidboot.bootmedia=sdcard androidboot.hardware=santos10wifi androidboot.spid=xxxx:xxxx:xxxx:xxxx:xxxx:xxxx androidboot.serialno=01234567890123456789012345678901 ip=50.0.0.2:50.0.0.1::255.255.255.0::usb0:on vmalloc=172M
BOARD_KERNEL_BASE := 0x10000000
BOARD_KERNEL_PAGESIZE := 2048
# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_FLASH_BLOCK_SIZE := 131072
TARGET_PREBUILT_KERNEL := device/samsung/santos10wifi/kernel
BOARD_HAS_NO_SELECT_BUTTON := true
DEVICE_RESOLUTION := 2560x1600
#graphics modes
TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
#TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
#TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565"
My current recovery.fstab:
Code:
/efs ext4 /dev/block/mmcblk0p2
/config ext4 /dev/block/mmcblk0p3
/cache ext4 /dev/block/mmcblk0p6
/system ext4 /dev/block/mmcblk0p8
/data ext4 /dev/block/mmcblk0p9 length=-16384
/recovery emmc /dev/block/mmcblk0p11
/modem emmc /dev/block/mmcblk0p12
/preload ext4 /dev/block/mmcblk0p13
/boot emmc /dev/block/mmcblk0p10
/sdcard datamedia /dev/null
/external_sd vfat /dev/block/mmcblk1p1

More info
Just now i got all 3 open source pakages from samsung, and see how different they are, and see if I can find a solution.
While compiling a recovery, I use this:
make -j3 otatools or make ARCH=x86 CROSS_COMPILE=$CCOMPILER otatools
build/tools/device/mkvendor.sh samsung santos10wifi prebuilt/kernel/samsung/santos10wifi/boot.img
. build/envsetup.sh
lunch cm_santos10wifi-eng
. build/tools/device/makerecoveries.sh cm_santos10wifi-eng or make -j3 recoveryimage or make ARCH=x86 CROSS_COMPILE=$CCOMPILER recoveryimage
And get these errors:
Code:
target SharedLib: libc (/home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so)
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/SHARED_LIBRARIES/libc_intermediates/bionic/pthread.o: in function pthread_create:bionic/libc/bionic/pthread.c:374: error: undefined reference to '_thread_created_hook'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/SHARED_LIBRARIES/libc_intermediates/bionic/dlmalloc.o: in function sys_alloc.constprop.11:bionic/libc/bionic/../upstream-dlmalloc/malloc.c:3198: error: undefined reference to 'pthread_atfork'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/SHARED_LIBRARIES/libc_intermediates/bionic/dlmalloc.o: in function sys_trim.constprop.13:bionic/libc/bionic/../upstream-dlmalloc/malloc.c:3198: error: undefined reference to 'pthread_atfork'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/SHARED_LIBRARIES/libc_intermediates/bionic/dlmalloc.o: in function dlmalloc:bionic/libc/bionic/../upstream-dlmalloc/malloc.c:3198: error: undefined reference to 'pthread_atfork'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/SHARED_LIBRARIES/libc_intermediates/bionic/dlmalloc.o: in function dlvalloc:bionic/libc/bionic/../upstream-dlmalloc/malloc.c:3198: error: undefined reference to 'pthread_atfork'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(regcomp.o): in function p_b_cclass:bionic/libc/upstream-netbsd/libc/regex/regcomp.c:1434: error: undefined reference to 'strcpy'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(fgetln.o): in function fgetln:bionic/libc/stdio/fgetln.c:85: error: undefined reference to 'memchr'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(fgetln.o): in function fgetln:bionic/libc/stdio/fgetln.c:126: error: undefined reference to 'memchr'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(fgets.o): in function fgets:bionic/libc/stdio/fgets.c:83: error: undefined reference to 'memchr'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(fvwrite.o): in function __sfvwrite:bionic/libc/stdio/fvwrite.c:171: error: undefined reference to 'memchr'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(strtod.o): in function __dtoa:bionic/libc/stdlib/strtod.c:2158: error: undefined reference to 'strcpy'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(__strcpy_chk.o): in function __strcpy_chk:bionic/libc/string/__strcpy_chk.c:55: error: undefined reference to 'strcpy'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(asctime.o): in function asctime_r:bionic/libc/tzcode/asctime.c:117: error: undefined reference to 'strcpy'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(fork.o): in function fork:bionic/libc/bionic/fork.c:44: error: undefined reference to '__timer_table_start_stop'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(fork.o): in function fork:bionic/libc/bionic/fork.c:45: error: undefined reference to '__bionic_atfork_run_prepare'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(fork.o): in function fork:bionic/libc/bionic/fork.c:62: error: undefined reference to '__bionic_atfork_run_child'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(fork.o): in function fork:bionic/libc/bionic/fork.c:49: error: undefined reference to '__timer_table_start_stop'
/home/dutchdanny/android/source/cm/10.1/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.6/bin/../lib/gcc/i686-linux-android/4.6/../../../../i686-linux-android/bin/ld: /home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(fork.o): in function fork:bionic/libc/bionic/fork.c:50: error: undefined reference to '__bionic_atfork_run_parent'
collect2: ld returned 1 exit status
make: *** [/home/dutchdanny/android/source/cm/10.1/out/target/product/santos10wifi/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so] Error 1
Something with libc
and/or
error: undefined reference to 'memchr'

Ok. Good thread! Some questions:
In your BoardConfig.mk -
1. ARCH_ARM_HAVE_TLS_REGISTER := true - what is it for? It is for ARM architecture and don't used for us, as i know.
2. DEVICE_RESOLUTION := 2560x1600 - this row is only used for TWRP and don't needed for CWM and system (ignored). If we build TWRP it's must be DEVICE_RESOLUTION := "1280x800". (with quotes)
As for you error - i think that problem in GCC compiler.
I will try to use your recovery.fstab last 2 rows for building TWRP (building OK, but do not mount internal storage automaticaly).
P.S. If anyone have problems with last NFS MostWanted game, try to add this lines in powervr.ini file in etc folder:
Code:
[com.ea.games.nfs13_row]
DefaultVertexBufferSize=3584000
MaxVertexBufferSize=4096000
DefaultPDSVertBufferSize=768000
DefaultVDMBufferSize=102400
DefaultIndexBufferSize=1024000
DefaultPregenMTECopyBufferSize=256000
PDSFragBufferSize=768000
ParamBufferSize=104857600
MaxParamBufferSize=125829120
Wit this, i can play well.

DutchDanny said:
Just now i got all 3 open source pakages from samsung, and see how different they are, and see if I can find a solution.
Click to expand...
Click to collapse
What do you mean by 3 open source packages? Where did you get them? The ones that are available here http://o7.no/19M7ZUX on samsung's opensource website?

Yes, original and update1 & update2
Send via my BinDroided HTC ONE

DutchDanny said:
Yes, original and update1 & update2
Send via my BinDroided HTC ONE
Click to expand...
Click to collapse
Thanks. So basically you overlaid all 3 files on the the original CyanogenMod 10.1 sources?
I already downloaded these 3 packages but (original, update1 and update2) but they don't really differ. Did you manually create a santos10 product target?

xmaczi123 said:
Thanks. So basically you overlaid all 3 files on the the original CyanogenMod 10.1 sources?
I already downloaded these 3 packages but (original, update1 and update2) but they don't really differ. Did you manually create a santos10 product target?
Click to expand...
Click to collapse
I did not overlay it to CM, but to aosp, but only with update2... just downloaded all to look inside, but as you saw.. they don't differ much.
The base of the target is created when you:
build/tools/device/mkvendor.sh samsung santos10wifi prebuilt/kernel/samsung/santos10wifi/boot.img
then edit the boardconfig.mk to fit it...
Will try to setup a full device tree by hand later on, so we can build a real cm.
But a good functional recovery is needed first

DutchDanny said:
I did not overlay it to CM, but to aosp, but only with update2... just downloaded all to look inside, but as you saw.. they don't differ much.
The base of the target is created when you:
build/tools/device/mkvendor.sh samsung santos10wifi prebuilt/kernel/samsung/santos10wifi/boot.img
then edit the boardconfig.mk to fit it...
Will try to setup a full device tree by hand later on, so we can build a real cm.
But a good functional recovery is needed first
Click to expand...
Click to collapse
Unfortunately I can't find mkvendor.sh in the whole working directory. How did you get hold of it? I'm also guessing that you copied the boot.img from the existing stock ROM. Am I right?
Thanks.

xmaczi123 said:
Unfortunately I can't find mkvendor.sh in the whole working directory. How did you get hold of it? I'm also guessing that you copied the boot.img from the existing stock ROM. Am I right?
Thanks.
Click to expand...
Click to collapse
Yes I'm using the stock boot.img
All others are made by info I found
Send via my BinDroided HTC ONE

DutchDanny said:
Yes I'm using the stock boot.img
All others are made by info I found
Send via my BinDroided HTC ONE
Click to expand...
Click to collapse
Why do we actually need a working stock recovery in order to compile and use ASOP? Can't we just create a tar.md5 archive and flash it with Odin?

xmaczi123 said:
Why do we actually need a working stock recovery in order to compile and use ASOP? Can't we just create a tar.md5 archive and flash it with Odin?
Click to expand...
Click to collapse
We need stock recovery to build initial device config and tree in source. If i understood your question...

Now then folks,
I'm seriously contemplating getting one of these for my next distraction, although with it being an x86 device, there's still some fun for all the family with or without the hardware,
@DutchDanny You seem to be leading a bit of a charge with this one, you done much raw porting in the past?
I've got the kernel and a 4.2.2 Rom that I've been poking around in, It shouldn't be too difficult to get something going, these some patches requiring in CM build system to add bz kernel image support but If there been following the AOSP bionic etc it should be okay.

trevd said:
Now then folks,
I'm seriously contemplating getting one of these for my next distraction, although with it being an x86 device, there's still some fun for all the family with or without the hardware,
@DutchDanny You seem to be leading a bit of a charge with this one, you done much raw porting in the past?
I've got the kernel and a 4.2.2 Rom that I've been poking around in, It shouldn't be too difficult to get something going, these some patches requiring in CM build system to add bz kernel image support but If there been following the AOSP bionic etc it should be okay.
Click to expand...
Click to collapse
I'm more an HTC guy, and not often work from source beside kernels.
I do know some about aosp, cm etc.
But when on HTC, I modify what they make.
For now the updater-binary is killing custom roms.
When I have a bit more time I will return....
3 other devices need support.
Send via my BinDroided HTC ONE

DutchDanny said:
I'm more an HTC guy, and not often work from source beside kernels.
I do know some about aosp, cm etc.
But when on HTC, I modify what they make.
For now the updater-binary is killing custom roms.
When I have a bit more time I will return....
3 other devices need support.
Send via my BinDroided HTC ONE
Click to expand...
Click to collapse
Yeah no worries, I need to build a cm-10.2 for x86 anyway, updater-binary. There might be a working one in this post http://forum.xda-developers.com/showpost.php?p=35887703&postcount=152 . Basically I built C x86 last year because I want to run it on my desktop but It's not really practical and I got stuck trying to make OpenGLes work with my radeon HD card. That is the CWM that resulted from the build. I just stashed it in a random edify related thread for future reference

Related

[Q] How do I properly use a prebuilt kernel with AOSP?

I'm trying to build AOSP for Moto X 2013 (ghost). I've successfully built the kernel separately already (and flashed it to my device to make sure it works) but I can't seem to find a way to tell AOSP to use it. I get the following error when running make -j16 otapackage:
No private recovery resources for TARGET_DEVICE ghost
make: *** No rule to make target `out/target/product/ghost/kernel', needed by `out/target/product/ghost/boot.img'. Stop.
I've already tried to add this line to device.mk:
LOCAL_KERNEL := device/motorola/ghost-kernel/zImage
But it did nothing.
Any ideas?
I think, you should use TARGET_PREBUILT_KERNEL variable
https://stackoverflow.com/questions/9008761/replace-the-prebuilt-kernel-in-the-android-platform-source
http://wiki.cyanogenmod.org/w/Doc:_integrated_kernel_building
Fixed this build step by adding these lines to the device makefile:
Code:
TARGET_PREBUILT_KERNEL := device/motorola/ghost-kernel/zImage
PRODUCT_COPY_FILES += \
$(TARGET_PREBUILT_KERNEL):kernel
Effectively, this copies the kernel file to the output directory to be processed by subsequent steps.

Build error when porting Ubuntu Touch on Samsung Galaxy Tab S 10.5.

Hello everyone,
Hope this is the right place to address my issue.
I am trying to port for Samsung Galaxy Tab S 10.5(SM-T805) Ubuntu Touch and for that I followed the steps in the wiki tutorial for porting ubuntu touch on new devices.
Now I am on the step of building the target. First I had to fix some compiler errors, to continue the build process.
Now I am stuck when boot.img is created, because I get the following error: boot.img too large 8751104 > [8650752 - 88704].
Shell copy past error:
sed -i 's/ro.adb.secure=1//g' /media/vendor/2EF06F3EF06F0B81/UbuntuTouch/phablet/out/target/product/chagalllte/recovery/root/default.prop
/media/vendor/2EF06F3EF06F0B81/UbuntuTouch/phablet/out/target/product/chagalllte/boot.img maxsize=8562048 blocksize=4224 total=8751104 reserve=88704
error: /media/vendor/2EF06F3EF06F0B81/UbuntuTouch/phablet/out/target/product/chagalllte/boot.img too large (8751104 > [8650752 - 88704])
In BoardConfig.mk I increased the value for parameter BOARD_BOOTIMAGE_PARTITION_SIZE and the build is then successfully, but I don't know if the image will boot.
My default settings from the BoardConfig.mk are:
BOARD_BOOTIMAGE_PARTITION_SIZE := 8388608 // -> when set to 8988608 the image is created
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 9639936
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2506096640
BOARD_USERDATAIMAGE_PARTITION_SIZE := 12629049344
BOARD_FLASH_BLOCK_SIZE := 4096
Can please someone help me determine the correct value for parameter BOARD_BOOTIMAGE_PARTITION_SIZE?
Is there anything else which needs to be configure/set?

Build Error CM12.1, missing reference to a JAR

Hi,
I currently try building this one myself:
http://forum.xda-developers.com/android/development/rom-cyanogenmod-12-0-samsung-express-gt-t2949359
it's CM 12.1 for the Samsung Galaxy Express GT-I8730
After hours of building it breaks with a missing library.
Code:
frameworks/testing/runner/src/main/java/android/support/test/internal/runner/ClassPathScanner.java:19: error: package android.support.annotation does not exist
import android.support.annotation.VisibleForTesting;
build/core/java.mk:346: recipe for target '~/src/cm-12.1-main/out/target/common/obj/JAVA_LIBRARIES/android-support-test-src_intermediates/classes-full-debug.jar' failed
make: *** [~/src/cm-12.1-main/out/target/common/obj/JAVA_LIBRARIES/android-support-test-src_intermediates/classes-full-debug.jar] Error 41
package android.support.annotation is missing. It's available here
Code:
./frameworks/support/annotations/src/android/support/annotation
./prebuilts/sdk/current/support/annotations/android-support-annotations.jar
But it's not included in build.
This is the code in question, in build/core/java.mk:346
Code:
# Compile the java files to a .jar file.
# This intentionally depends on java_sources, not all_java_sources.
# Deps for generated source files must be handled separately,
# via deps on the target that generates the sources.
$(full_classes_compiled_jar): PRIVATE_JAVACFLAGS := $(LOCAL_JAVACFLAGS)
$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_FILES := $(LOCAL_JAR_EXCLUDE_FILES)
$(full_classes_compiled_jar): PRIVATE_JAR_PACKAGES := $(LOCAL_JAR_PACKAGES)
$(full_classes_compiled_jar): PRIVATE_JAR_EXCLUDE_PACKAGES := $(LOCAL_JAR_EXCLUDE_PACKAGES)
$(full_classes_compiled_jar): PRIVATE_RMTYPEDEFS := $(LOCAL_RMTYPEDEFS)
$(full_classes_compiled_jar): PRIVATE_DONT_DELETE_JAR_META_INF := $(LOCAL_DONT_DELETE_JAR_META_INF)
$(full_classes_compiled_jar): $(java_sources) $(java_resource_sources) $(full_java_lib_deps) \
$(jar_manifest_file) $(layers_file) $(RenderScript_file_stamp) \
$(proto_java_sources_file_stamp) $(LOCAL_ADDITIONAL_DEPENDENCIES)
$(transform-java-to-classes.jar)
How do I find out the content of the variables? How do I modify it?
Since I am building from a branch, it probably is a temporary problem. I issued a repo sync, but it dit not help (yet).
any idea?
thanks
JPT

How to use 3rd party jar in system app

I want to use a 3rd party jar in the system app - Settings.
I have tried two methods, but both failed.
The Android version is 4.2.2 JB.
The first method is that I put the jar file into /packages/apps/Settings/ and modify the Android.mk.
Code:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_JAVA_LIBRARIES := bouncycastle telephony-common
LOCAL_STATIC_JAVA_LIBRARIES := guava android-support-v4 jsr305 nxpnfclib
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_PACKAGE_NAME := Settings
LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
include $(BUILD_PACKAGE)
include $(CLEAR_VARS)
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := nxpnfclib.jar
include $(BUILD_MULTI_PREBUILT)
# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))
Some proguard warnings show up:
Code:
Warning: class [com/nxp/nfclib/ntag/╦К.class] unexpectedly contains class [com.nxp.nfclib.ntag.ˊ]
Warning: there were 30 classes in incorrectly named files. You should make sure all file names correspond
to their class names. The directory hierarchies must correspond to the package hierarchies. If you don't mind
the mentioned classes not being written out, you could try your luck using the '-ignorewarnings' option.
Error: Please correct the above warnings first. make: *** [out/target/common/obj/APPS/Settings_intermed
iates/proguard.classes.jar] Error 1
Then I add some proguard flags to prevent this warnings. I can compile Android now. However, when I boot the system, some errors show up:
Code:
W/dalvikvm( 732): Unable to resolve superclass of Lcom/nxp/nfclib/ntag/NTag213215216; (1855)
W/dalvikvm( 732): Link of class 'Lcom/nxp/nfclib/ntag/NTag213215216;' failed
W/dalvikvm( 732): Unable to resolve superclass of Lcom/nxp/nfclib/ntag/NTag213F216F; (1844)
W/dalvikvm( 732): Link of class 'Lcom/nxp/nfclib/ntag/NTag213F216F;' failed
E/dalvikvm( 732): Could not find class 'com.nxp.nfclib.ntag.NTag213F216F', referenced from method com.nxp.nfclib.NxpNfcLib.ˊ
Another mothod: I put the jar file to /prebuilts/misc/common/nxp and write an Android.mk:
Code:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PREBUILT_JAVA_LIBRARIES := \
nxpnfclib$(COMMON_JAVA_PACKAGE_SUFFIX)
LOCAL_MODULE_TAGS := optional
include $(BUILD_HOST_PREBUILT)
Then modify /packages/apps/Settings/Android.mk:
Code:
LOCAL_STATIC_JAVA_LIBRARIES := guava android-support-v4 jsr305 nxpnfclib
However, when I compile the whole AOSP, the same proguard warnings show up:
Code:
Warning: class [com/nxp/nfclib/ntag/╦К.class] unexpectedly contains class [com.nxp.nfclib.ntag.ˊ]
Warning: there were 30 classes in incorrectly named files. You should make sure all file names correspond
to their class names. The directory hierarchies must correspond to the package hierarchies. If you don't mind
the mentioned classes not being written out, you could try your luck using the '-ignorewarnings' option.
Error: Please correct the above warnings first. make: *** [out/target/common/obj/APPS/Settings_interm
ediates/proguard.classes.jar] Error 1
Is there some other way to add the jar?
The jar runs well if I use Android Studio to build an app.
Can I put the jar in the system instead of merge it into the system?

Pixel 4: Build Vendor Image with a New HAL Service (Android 11)

Is there a way to compile the vendor image for the pixel 4 (Flame)? My goal is to add some new hardware on the phone. The kernel is already compiled with the new hardware driver and works perfectly. However, I seem I cannot resolve all the dependencies for the vendor image.
There is the output error:
device/google/coral/device.mk was modified, regenerating...
device/google/coral/aosp_flame.mk was modified, regenerating...
[ 99% 219/220] finishing build rules ...
FAILED:
system/chre/Android.mk: error: "chre (EXECUTABLES android-arm64) missing libsdsprpc (SHARED_LIBRARIES android-arm64)"
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is intentional, but that may defer real problems until later in the build.
build/make/core/main.mk:946: error: exiting from previous errors.
17:07:33 ckati failed with: exit status 1
Click to expand...
Click to collapse
libsdsprpc is missing. I fear I need more than one library to complete the build.
I added this lines the BoardConfig-common.mk file in device/google/coral
# Build a separate vendor.img partition
BOARD_USES_VENDORIMAGE := true
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
#ALLOW_MISSING_DEPENDENCIES=true
BOARD_VNDK_VERSION := current
Click to expand...
Click to collapse
and commented this line in the vendor/google_devices/flame/BoardConfigPartial.mk. (from binaries driver folder downloaded from google)
#BOARD_PREBUILT_VENDORIMAGE := vendor/google_devices/flame/proprietary/vendor.img
Click to expand...
Click to collapse

Categories

Resources