[Q] Issues with porting OmniROM to Nubia Z18 (NX606J)

Search This thread

curtisy

Senior Member
Dec 20, 2016
77
32
Berlin
Hi,

since last week I've been trying to port Omni to the ZTE nubia Z18 (NX606J) with more or less success but a few more obstacles to clear.
Basically, what I'm stuck at at the moment is the final make to build the actual ROM itself, but it's a bit more than that.. but first things first:

- I initialized the repo from OmniRom's android repository on GitHub and successfully ran repo sync
Code:
repo init -u git://github.com/omnirom/android.git -b android-9.0 && repo sync -j `nproc` -c -f --no-clone-bundle
- I cloned the device's config from youyim123's GitHub into device/nubia/nx606j, as per the envsetup.mk (so it finds the appropriate vendorsetup)
Code:
git clone https://github.com/youyim123/android_device_nubia_nx609j.git -b master
- I run . build/envsetup.sh and then lunch omni-nx606j-eng which produces
Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=omni_nx606j
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.16-96.current-x86_64-Solus-3.9999
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PD1A.180720.031
OUT_DIR=/run/media/curtisy/Solus-Data/Omni_NX606J/out
============================================
- I run make clean && make -j4, this works for a while and then exits with of the following error:
Code:
ninja: error: 'prebuilts/ndk/current/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libunwind.a', needed by '/run/media/curtisy/Solus-Data/Omni_NX606J/out/soong/.intermediates/external/boringssl/libcrypto/android_arm_armv8-a_cortex-a53_core_shared/libcrypto.so', missing and no known rule to make it
20:00:44 ninja failed with: exit status 1
I see it's missing some files, but repo sync again, doesn't help either, so I'm lost.

One pretty weird thing I noticed is that the second ninja step is only showing 55/56 as done but still continues. Is this normal?
Code:
[1/1] /run/media/curtisy/Solus-Data/Om...X606J/out/soong/.bootstrap/build.ninja
[55/56] glob prebuilts/ndk/stl.bp
[77/77] /run/media/curtisy/Solus-Data/...Data/Omni_NX606J/out/soong/build.ninja

Running make recoveryimage worked once, but when I tried flashing that, my device said it wasn't trusted and I had to reflash the source image again.

I'm really hitting a dead end with my little knowledge here, so it would be cool if anyone could point me in the right direction so I could at least get TWRP to work.

The phone has a Snapdragon 845. If you need any additional information, feel free to ask as I'm happy about any straw I can grab here.
 
Last edited:

curtisy

Senior Member
Dec 20, 2016
77
32
Berlin
Update: I somehow got around this issue doing another repo sync but now I'm prompted with another issue.

Code:
[945/945] including vendor/omni/Android.mk ...
packages/apps/Bluetooth/Android.mk: error: Bluetooth (APPS android-arm) missing libbluetooth_jni (SHARED_LIBRARIES android-arm) 
Available variants:
  libbluetooth_jni (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:833: error: exiting from previous errors.
03:34:57 ckati failed with: exit status 1

Or with ALLLOW_MISSING_DEPENDENCIES=true
Code:
[ 99% 1390/1391] glob vendor/omni/overlay/common/**/*
ninja: error: '/run/media/curtisy/Solus-Data/omni_nx606j/out/target/product/nx606j/obj_arm/SHARED_LIBRARIES/libbluetooth_jni_intermediates/link_type', needed by '/run/media/curtisy/Solus-Data/omni_nx606j/out/target/product/nx606j/obj/APPS/Bluetooth_intermediates/2ND_jni_link_type', missing and no known rule to make it
03:39:28 ninja failed with: exit status 1

For reference, this is the kernel source and this is the device specific source I'm currently using.
 

kevinygod

Member
Aug 18, 2020
15
0
Update: I somehow got around this issue doing another repo sync but now I'm prompted with another issue.

Code:
[945/945] including vendor/omni/Android.mk ...
packages/apps/Bluetooth/Android.mk: error: Bluetooth (APPS android-arm) missing libbluetooth_jni (SHARED_LIBRARIES android-arm)
Available variants:
  libbluetooth_jni (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:833: error: exiting from previous errors.
03:34:57 ckati failed with: exit status 1

Or with ALLLOW_MISSING_DEPENDENCIES=true
Code:
[ 99% 1390/1391] glob vendor/omni/overlay/common/**/*
ninja: error: '/run/media/curtisy/Solus-Data/omni_nx606j/out/target/product/nx606j/obj_arm/SHARED_LIBRARIES/libbluetooth_jni_intermediates/link_type', needed by '/run/media/curtisy/Solus-Data/omni_nx606j/out/target/product/nx606j/obj/APPS/Bluetooth_intermediates/2ND_jni_link_type', missing and no known rule to make it
03:39:28 ninja failed with: exit status 1

For reference, this is the kernel source and this is the device specific source I'm currently using.
How do for fix?