Android N customization

I’m trying to build custom APK to Khadas VIM2 Android Nougat source code. I’m facing the following issues.

  1. I used 32 bit libraries, installed in the path /system/bin. The custom apk which I built, does not recognizing libraries from /system/lib whereas libraries packaged into the apk works fine. The error I got was “dlopen failed”. How to make the apk works with libraries installed in the /system/lib folder of Android Nougat.

  2. When I tried to install the apk which includes 32-bit libraries into /system/APP throws error.

dex2oatd F 27529 27535 art/runtime/runtime_linux.cc:336]*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Fatal signal 6 (SIGABRT), code -6 (SI_TKILL)
OS: Linux 4.4.0-124-generic (x86_64)
Cmdline: out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --runtime-arg -classpath --runtime-arg & --boot-image=out/target/product/kvim2/dex_bootjars/system/framework/boot.art --dex-file=external/krossark/./autostart_7.apk --dex-location=/system/app/autostart_7/autostart_7.apk --oat-file=out/target/product/kvim2/obj/APPS/autostart_7_intermediates/oat/arm64/package.odex --android-root=out/target/product/kvim2/system --instruction-set=arm64 --instruction-set-variant=generic --instruction-set-features=default --include-patch-information --runtime-arg -Xnorelocate --no-generate-debug-info --abort-on-hard-verifier-error --no-inline-from=core-oj.jar --compile-pic
Thread: 27535 “Compiler driver”
Registers:
rax: 0x0000000000000000 rbx: 0x0000000000006b89 rcx: 0x00002ba2e5f933c9 rdx: 0x0000000000000006
rdi: 0x0000000000006b89 rsi: 0x0000000000006b8f rbp: 0x00002ba2eb6cfab0 rsp: 0x00002ba2eb6cfa68
r8 : 0x00005586b5842310 r9 : 0x00005586b5842310 r10: 0x00002ba2f8016c80 r11: 0x0000000000000246
r12: 0x00005586b5f960c1 r13: 0x00002ba2eb6d01a0 r14: 0x00002ba2f800a4b0 r15: 0x0000000000006b89
rip: 0x00002ba2e5f933c9 eflags: 0x00000246 [ PF ZF IF ]
cs: 0x00000033 gs: 0x00000000 fs: 0x00000000

Backtrace:
#00 pc 00000000000f83c9 /lib/x86_64-linux-gnu/libc-2.19.so (syscall+25)
syscall
/build/eglibc-ripdx6/eglibc-2.19/misc/…/sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#01 pc 00000000004d9618 /media/iotuser/66a35a62-d70b-4ea4-9707-4ba8c5f734f4/maha/khadas_vim2_31may/out/host/linux-x86/lib64/libartd.so (_ZN3art7Runtime5AbortEPKc+456)
art::Runtime::Abort(char const*)
/proc/self/cwd/art/runtime/runtime.cc:444 (discriminator 2)
#02 pc 000000000017b352 /media/iotuser/66a35a62-d70b-4ea4-9707-4ba8c5f734f4/maha/khadas_vim2_31may/out/host/linux-x86/lib64/libartd.so (_ZN3art10LogMessageD1Ev+1330)
~LogMessage

Any help would be appreciated.

You can try to add LOCAL_MULTILIB := 32 into Android.mk file. :grinning:

Hi,

I did it already but observed the same error. I was able to resolve it by adding the apk into packages/apps directory.

The package got installed and working fine.

Thanks for the reply.

1 Like