[Q] Issues with porting OmniROM to Nubia Z18 (NX606J) - Omni Q&A

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.

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.

curtisy said:
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.
Click to expand...
Click to collapse
How do for fix?

Related

Trouble compiling omnirom for existing device

Hello all,
I'm getting started with Omnirom and wanted to compile a new device. After reading up on how this should be done, I tried a to set up a new device and compile but that resulted in errors. I figured it would be better to start out by trying to compile an existing device, however I get the same error message. Figuring this might be due to my set up, I ran the compilation in a clean docker instance with freshly installed openjdk-8-jdk and build tools, but same problem. I tried to find information about the error but there is not much to find online, so therefore I'm requesting your help.
The error I keep getting is:
Code:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/floeperd/dev/doit2/out/host/common/obj/JAVA_LIBRARIES/platform-test-annotations-host_intermediates/javalib.jar', needed by '/home/floeperd/dev/doit2/out/host/common/obj/JAVA_LIBRARIES/compatibility-common-util-hostsidelib_intermediates/classes-full-debug.jar', missing and no known rule to make it
build/core/ninja.mk:157: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
Details about the steps and error are below:
Init and sync:
Code:
repo init -u git://github.com/omnirom/android.git -b android-7.1
repo sync
Add device in .repo/local_manifests:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/xiaomi/kenzo" name="android_device_xiaomi_kenzo" remote="omnirom" revision="android-7.1" />
</manifest>
Compile:
Code:
[email protected]:~/dev/doit2$ . build/envsetup.sh
including device/xiaomi/kenzo/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:~/dev/doit2$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. omni_kenzo-userdebug
Which would you like? [aosp_arm-eng] 7
Looking for dependencies on: device/xiaomi/msm8956-common
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
TARGET_PRODUCT=omni_kenzo
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53.a57
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-32-generic-x86_64-with-Ubuntu-17.10-artful
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/home/floeperd/dev/doit2/out
============================================
but I always end up with this error:
Code:
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/floeperd/dev/doit2/out/host/common/obj/JAVA_LIBRARIES/platform-test-annotations-host_intermediates/javalib.jar', needed by '/home/floeperd/dev/doit2/out/host/common/obj/JAVA_LIBRARIES/compatibility-common-util-hostsidelib_intermediates/classes-full-debug.jar', missing and no known rule to make it
build/core/ninja.mk:157: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
I would appreciate any help. Thank you.

[GUIDE] How to build a Project Treble GSI ROM from source? [31/08]

Hello guys, in this guide I'll try to simplify building Treble GSI process.
As you read this guide now I'll assume you already have a previous knowledge about How to build android from source, so I won't cover some points with too many basic details.
So, let's start:
What you’ll need
A treble enabled device, basically all devices that come with Android 8.1 out of box support it.
A relatively recent 64-bit computer (Linux, OS X, or Windows) with a reasonable amount of RAM and about 100 GB of free storage (more if you enable ccache or build for multiple devices). The less RAM you have, the longer the build will take (aim for 8 GB or more). Using SSDs results in considerably faster build times than traditional hard drives.
A USB cable compatible with your device
A decent internet connection & reliable electricity
Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom ROMs on other devices and are familiar with recovery. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /. etc.
Summary
1. Install SDK
2. Install build packages
3. Install the repo command
4. Configure git
5. Turn on caching to speed up build
6. Build using phhusson's script
7. Build using dakkar's script
8. Build using the manual way
1. Install SDK
If you haven’t previously installed adb and fastboot, you can download them from Google. Extract it using:
Code:
unzip platform-tools-latest-linux.zip -d ~
Now we have to add adb and fastboot to our path. Open ~/.profile and add the following:
Code:
# add Android SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
PATH="$HOME/platform-tools:$PATH"
fi
Then, run this to update your environment.
Code:
source ~/.profile
2. Install build packages
Several packages are needed to build Android. You can install these using your distribution’s package manager.
You’ll need:
Code:
bc bison build-essential curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev
lib32readline-gplv2-dev lib32z1-dev libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev
libxml2 libxml2-utils lzop pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev openjdk-8-jdk
3. Install the repo command
Enter the following to download the repo binary and make it executable (runnable):
Code:
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Put the ~/bin directory in your path of execution
In recent versions of Ubuntu, ~/bin should already be in your PATH. You can check this by opening ~/.profile with a text editor and verifying the following code exists (add it if it is missing):
Code:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
Then, use this to update your environment.
Code:
source ~/.profile
4. Configure git
You’ll need to set up git identity in order to sync the source, run these commands:
Code:
git config --global user.name "your username"
git config --global user.email [email protected]
5. Turn on caching to speed up build
You can speed up subsequent builds by running:
Code:
export USE_CCACHE=1
export CCACHE_COMPRESS=1
And adding that line to your ~/.bashrc file. Then, specify the maximum amount of disk space you want the cache to use by typing this from the top of your Android tree:
Code:
prebuilts/misc/linux-x86/ccache/ccache -M 50G
Where 50G corresponds to 50GB of cache. This needs to be run once. Anywhere from 25GB-100GB will result in very noticeably increased build speeds (for instance, a typical 1hr build time can be reduced to 20min). If you’re only building for one device, 25GB-50GB is fine. If you plan to build for several devices that do not share the same kernel source, aim for 75GB-100GB. This space will be permanently occupied on your drive, so take this into consideration. See more information about ccache on Google’s Android build environment initialization page.
6. Build using phhusson's script
We can't deny that @phhusson has made amazing works and countless contributions to Project Treble ROMs development apart from his experimentations is a build script which make build a GSI super simple job.
By default, it supports building LineageOS - RR - Carbon.
1- Open your terminal and run:
Code:
git clone https://github.com/phhusson/treble_experimentations
2- To clone and build enter the following command and replace "romname" with lineage|rr|carbon
Code:
mkdir romname; cd romname
bash ../treble_experimentations/build-rom.sh android-8.1 romname
3- The script will automatically initialize the repository, sync the source, apply patches and start building.
7. Build using dakkar's script
dakkar's script is another treble building script, originally made by @Dakkar and improved by contributors on treble experimentations repo. It's customizable, easy to understand and can build almost all ROMs with simple edits.
1- Open your terminal and run:
Code:
git clone https://github.com/phhusson/treble_experimentations
2- To start the process:
Code:
bash ../treble_experimentations/build-dakkar.sh romname variant
Variants are dash-joined combinations of (in order):
* processor type
* "arm" for ARM 32 bit
* "arm64" for ARM 64 bit
* A or A/B partition layout ("aonly" or "ab")
* GApps selection
* "vanilla" to not include GApps
* "gapps" to include opengapps
* "go" to include gapps go
* SU selection ("su" or "nosu")
for example:
* arm-aonly-vanilla-nosu
* arm64-ab-gapps-su
Click to expand...
Click to collapse
Note: check patches when you use these auto scripts, if some patch is broken you'll have build errors
8. Build using the manual way
In simple steps:
1. Repo init the rom you want to build GSI for.
Code:
mkdir ~/rom && cd ~/rom
repo init -u https://github.com/LineageOS/android.git -b lineage-15.1
2. Add phh repos to your local_manifest
Code:
git clone https://github.com/phhusson/treble_manifest .repo/local_manifests -b android-8.1
After git clone you need to remove replace.xml if you're building any rom expect aosp.
phhusson said:
The replace.xml is meant only for AOSP, if you build a custom ROM, remove it, but don't forget to cherry-pick the patches.
Click to expand...
Click to collapse
3. Sync the source
Code:
repo sync -c -j4 --force-sync --no-tags --no-clone-bundle
4. Modify the source to fix issues in other devices using one of these methods:
- Apply phh patches:
Code:
git clone https://github.com/phhusson/treble_patches -b android-8.1
Then apply each path in its project
Code:
patch -p1 < patch
- Or cherry-pick changes by phhusson from here, remember to choose the latest branch
platform_build - platform_external_selinux - platform_frameworks_av - platform_frameworks_base - platform_frameworks_native - platform_frameworks_opt_telephony - platform_system_bt - platform_system_core - platform_system_libvintf - platform_system_vold
Code:
git fetch repo branch && git cherry-pick commit
5. Go to the phh device repo and edit the .mk for your ROM (example lineage.mk)
6. Lunch the build varaint you want (ex. treble_arm64_avN-userdebug) and start the build
Code:
. build/envsetup.sh
lunch treble_arm64_avN-userdebug
WITHOUT_CHECK_API=true make -j8 systemimage
7. If you want to compress the system image after build finishes, go to out/target/product/phh_*/ folder and run
Code:
xz -c system.img > system.img.xz
That's all
Credits:
- @phhusson for all his contributions, without his efforts this can't be possible.
- @Dakkar for his build script
- @fAIyaZ for helping me build my first GSI
- @sooti for his simplified instruction on phh-treble telegram.
- @lineageos guys for their wiki
- And me for writing this guide
Community Edition
I made a community edition of this guide, available on @phhusson treble experimentations wiki
Feel free to edit it and improve the current one
How to build a GSI?
Weew thanks. Will try to ?
I'm getting an error when trying to repo sync manually the sources to download all of the phhusson's code. The thing is that even modifying the "replace.xml" file (the one "causing" the error) to adapt it to the rom's manifest, the error persists.
Repo is telling me the following: fatal: remove-project element specifies non-existent project: platform/build If I change the "platform/build" reference to the correct path, it's still giving me the error but with the new route, even while the folders and files clearly exist.
Anyone got a clue on why is this happening? I mean, the way to solve the problem is pretty straightforward, I just need to download manually the file from the Github repo and then perform all the needed chances, but it's always easier and cleaner to do it via the repo command.
Sinek_ said:
I'm getting an error when trying to repo sync manually the sources to download all of the phhusson's code. The thing is that even modifying the "replace.xml" file (the one "causing" the error) to adapt it to the rom's manifest, the error persists.
Repo is telling me the following: fatal: remove-project element specifies non-existent project: platform/build If I change the "platform/build" reference to the correct path, it's still giving me the error but with the new route, even while the folders and files clearly exist.
Anyone got a clue on why is this happening? I mean, the way to solve the problem is pretty straightforward, I just need to download manually the file from the Github repo and then perform all the needed chances, but it's always easier and cleaner to do it via the repo command.
Click to expand...
Click to collapse
Ah indeed, the replace.xml is meant only for AOSP, if you build a custom ROM, remove it, but don't forget to cherry-pick the patches.
@yshalsager ^^^
I'm sure this thread will see a lot of views in the coming years. Also it gives us noobs (me) a chance to build ROMs that actually build and run on our devices. Thanks for writing this.
Edit: in future if there's a way to add device specific features into here, it would be amazing. (Alert slider etc)
Jamie_oppo said:
Edit: in future if there's a way to add device specific features into here, it would be amazing. (Alert slider etc)
Click to expand...
Click to collapse
I'm not sure what you mean. Alert slider is already supported in GSIs
Or you're asking for a documentation on how to implement such features for GSIs?
phhusson said:
I'm not sure what you mean. Alert slider is already supported in GSIs
Or you're asking for a documentation on how to implement such features for GSIs?
Click to expand...
Click to collapse
Oh I isn't know the alert slider was already implemented in gsi. ( the only one I've flashed is dot os. ) maybe thats why.
Yeah I'm asking if its possible to add documentation for device specific features. Like imagine a new budget Motorola (with something specific like alert slider v3) with treble as a base and a Dev would be able to add the device specific "alert slider V3" from source to the gsi (and that gsi can be the ones that, that specific Motorola will flash).
Its so awesome they all of us involved with treble have an awesome Dev like you.
Hi
i try to build gsi on windows subsystem for linux with dakkar's script. But it failed with the following error:
...
[ 2% 2291/105390] Build hyb /root/tre...phenation-patterns/nn//hyph-nn.pat.txt
12585 unique nodes, 42861 total
[ 2% 2359/105390] Generating TOC: /ro...S/sdk_v8_intermediates/classes.jar.toc
FAILED: /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar.toc
/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 prebuilts/build-tools/linux-x86/bin/ijar /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar.toc.tmp ) && (if cmp -s /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar.toc.tmp /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar.toc ; then rm /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar.toc.tmp ; else mv /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar.toc.tmp /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar.toc ; fi )"
ftruncate(fd_out, GetSize()): Invalid argument
/bin/bash: Zeile 1: 2346 Abgebrochen (Speicherabzug geschrieben) ( ASAN_OPTIONS=detect_leaks=0 prebuilts/build-tools/linux-x86/bin/ijar /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar /root/treble_experimentations/out/target/common/obj/JAVA_LIBRARIES/sdk_v8_intermediates/classes.jar.toc.tmp )
[ 2% 2362/105390] Build hyb /root/tre...phenation-patterns/hu//hyph-hu.pat.txt
21515 unique nodes, 102669 total
ninja: build stopped: subcommand failed.
11:27:50 ninja failed with: exit status 1
[email protected]:~/treble_experimentations#
Click to expand...
Click to collapse
I used this command to build lineage with su und gapps:
bash ../treble_experimentations/build-dakkar.sh lineage arm64-aonly-gapps-su
Click to expand...
Click to collapse
I figured out, that the error is a problem with the wsl. To fix this problem a patch is needed: https://forum.xda-developers.com/showpost.php?p=70571884&postcount=20.
How can i apply this patch?
Saftpresse99 said:
I figured out, that the error is a problem with the wsl. To fix this problem a patch is needed: https://forum.xda-developers.com/showpost.php?p=70571884&postcount=20.
How can i apply this patch?
Click to expand...
Click to collapse
Cherry pick his commit like I explained in the guide
need a developer for treble natrium. The sources of the past developer remained, but he can not continue to update, since this device does not exist anymore. if someone can continue his work, then write to me, I'm ready to become a beta tester
Saftpresse99 said:
I figured out, that the error is a problem with the wsl. To fix this problem a patch is needed: https://forum.xda-developers.com/showpost.php?p=70571884&postcount=20.
How can i apply this patch?
Click to expand...
Click to collapse
If you can't find that source file yourself and make the change because you lack C knowledge (I mean, the error log already says where the problematic file/line is), then you're probably better off using real Linux. WSL is still beta and designed for experienced developers.
yshalsager said:
Cherry pick his commit like I explained in the guide
Click to expand...
Click to collapse
CosmicDan said:
If you can't find that source file yourself and make the change because you lack C knowledge (I mean, the error log already says where the problematic file/line is), then you're probably better off using real Linux. WSL is still beta and designed for experienced developers.
Click to expand...
Click to collapse
Hi,
the problem is in zip.cc. User @Uldiniad has started a pr to fix the the problem: https://review.lineageos.org/#/c/LineageOS/android_build/+/208102/5
He also microsoft opens an issue at microsoft: https://github.com/Microsoft/WSL/issues/3157
I will try to cherry pick this commit. I don't know how exactly i can do this, but i will try
Saftpresse99 said:
Hi,
the problem is in zip.cc. User @Uldiniad has started a pr to fix the the problem: https://review.lineageos.org/#/c/LineageOS/android_build/+/208102/5
He also microsoft opens an issue at microsoft: https://github.com/Microsoft/WSL/issues/3157
I will try to cherry pick this commit. I don't know how exactly i can do this, but i will try
Click to expand...
Click to collapse
You can just edit it manually if you don't want to add the remote and cherry-pick. Just make a note of the manual change the did since a git pull from later will have a conflict, requiring you to manually resolve it.
Code:
git fetch repo branch && git cherry-pick commit
~/build-treble/rom$ git fetch repo branch && git cherry-pick commit
fatal: not a git repository (or any of the parent directories): .git
wrong directory?
meltbanana said:
Code:
git fetch repo branch && git cherry-pick commit
~/build-treble/rom$ git fetch repo branch && git cherry-pick commit
fatal: not a git repository (or any of the parent directories): .git
wrong directory?
Click to expand...
Click to collapse
No expert here but I'd say "repo branch" and "commit" don't mean absolutely anything except that you need to specifiy the repo branch and the specific commit to be applied.
On the other hand I am trying to build a CandyRom GSI following this guide and the spectacular work of phhusson and the rest of the guys making the scripts and project treble possible. I initially modified the build-rom.sh to include candy's repo and run the command. I obviously had a first error because candy.mk didn't exist. Created it and then, as source was there and patches were supposed to have been applied too (although when applying them I get a bunch of errors which I interpret are due to some files that don't exist or code that can't be modified because it doesn't match), opted for the manual building process and run . build/envsetup.sh, lunch treble_arm64_avN-userdebug and make -j8 systemimage. It starts running and then I get a whole bunch of errors before the building begins: missing libraries:
Code:
packages/apps/Bluetooth/Android.mk: error: Bluetooth (APPS android-arm64) missing sap-api-java-static (JAVA_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.
system/core/adb/Android.mk: error: adbd (EXECUTABLES android-arm64) missing libbootloader_message (STATIC_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.
system/core/healthd/Android.mk: error: libhealthd_draw (STATIC_LIBRARIES android-arm64) missing libminui (STATIC_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.
system/core/healthd/Android.mk: error: libhealthd_draw (STATIC_LIBRARIES android-arm) missing libminui (STATIC_LIBRARIES android-arm)
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.
system/core/healthd/Android.mk: error: libhealthd_charger (STATIC_LIBRARIES android-arm64) missing libminui (STATIC_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.
system/core/healthd/Android.mk: error: libhealthd_charger (STATIC_LIBRARIES android-arm) missing libminui (STATIC_LIBRARIES android-arm)
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.
system/core/healthd/Android.mk: error: charger (EXECUTABLES android-arm64) missing libminui (STATIC_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.
system/core/init/Android.mk: error: init (EXECUTABLES android-arm64) missing libbootloader_message (STATIC_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.
system/extras/slideshow/Android.mk: error: slideshow (EXECUTABLES android-arm64) missing libminui (STATIC_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.
system/vold/Android.mk: error: libvold (STATIC_LIBRARIES android-arm64) missing libbootloader_message (STATIC_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.
system/vold/Android.mk: error: libvold (STATIC_LIBRARIES android-arm) missing libbootloader_message (STATIC_LIBRARIES android-arm)
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.
system/vold/Android.mk: error: vold (EXECUTABLES android-arm64) missing libbootloader_message (STATIC_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.
system/vold/Android.mk: error: libminivold (STATIC_LIBRARIES android-arm64) missing libbootloader_message (STATIC_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.
system/vold/Android.mk: error: libminivold (STATIC_LIBRARIES android-arm) missing libbootloader_message (STATIC_LIBRARIES android-arm)
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.
system/vold/Android.mk: error: minivold (RECOVERY_EXECUTABLES android-arm64) missing libbootloader_message (STATIC_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.
vendor/candy/charger/Android.mk: error: libhealthd.candy (STATIC_LIBRARIES android-arm64) missing libminui (STATIC_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.
vendor/candy/charger/Android.mk: error: libhealthd.candy (STATIC_LIBRARIES android-arm) missing libminui (STATIC_LIBRARIES android-arm)
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/core/main.mk:798: error: exiting from previous errors.
09:08:01 ckati failed with: exit status 1
I have built and used Candy for lithium and never had any building errors, so I have no idea why those libraries are missing or of course how to fix it...
If anyone can give a hint it will be appreciated.
Thanks and keep it up!
meltbanana said:
Code:
git fetch repo branch && git cherry-pick commit
~/build-treble/rom$ git fetch repo branch && git cherry-pick commit
fatal: not a git repository (or any of the parent directories): .git
wrong directory?
Click to expand...
Click to collapse
Repo and branch are what you are trying to get changes from, I mean phh repos
albertoduqe said:
No expert here but I'd say "repo branch" and "commit" don't mean absolutely anything except that you need to specifiy the repo branch and the specific commit to be applied.
On the other hand I am trying to build a CandyRom GSI following this guide and the spectacular work of phhusson and the rest of the guys making the scripts and project treble possible. I initially modified the build-rom.sh to include candy's repo and run the command. I obviously had a first error because candy.mk didn't exist. Created it and then, as source was there and patches were supposed to have been applied too (although when applying them I get a bunch of errors which I interpret are due to some files that don't exist or code that can't be modified because it doesn't match), opted for the manual building process and run . build/envsetup.sh, lunch treble_arm64_avN-userdebug and make -j8 systemimage. It starts running and then I get a whole bunch of errors before the building begins: missing libraries:
Code:
packages/apps/Bluetooth/Android.mk: error: Bluetooth (APPS android-arm64) missing sap-api-java-static (JAVA_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.
system/core/adb/Android.mk: error: adbd (EXECUTABLES android-arm64) missing libbootloader_message (STATIC_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.
system/core/healthd/Android.mk: error: libhealthd_draw (STATIC_LIBRARIES android-arm64) missing libminui (STATIC_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.
system/core/healthd/Android.mk: error: libhealthd_draw (STATIC_LIBRARIES android-arm) missing libminui (STATIC_LIBRARIES android-arm)
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.
system/core/healthd/Android.mk: error: libhealthd_charger (STATIC_LIBRARIES android-arm64) missing libminui (STATIC_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.
system/core/healthd/Android.mk: error: libhealthd_charger (STATIC_LIBRARIES android-arm) missing libminui (STATIC_LIBRARIES android-arm)
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.
system/core/healthd/Android.mk: error: charger (EXECUTABLES android-arm64) missing libminui (STATIC_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.
system/core/init/Android.mk: error: init (EXECUTABLES android-arm64) missing libbootloader_message (STATIC_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.
system/extras/slideshow/Android.mk: error: slideshow (EXECUTABLES android-arm64) missing libminui (STATIC_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.
system/vold/Android.mk: error: libvold (STATIC_LIBRARIES android-arm64) missing libbootloader_message (STATIC_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.
system/vold/Android.mk: error: libvold (STATIC_LIBRARIES android-arm) missing libbootloader_message (STATIC_LIBRARIES android-arm)
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.
system/vold/Android.mk: error: vold (EXECUTABLES android-arm64) missing libbootloader_message (STATIC_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.
system/vold/Android.mk: error: libminivold (STATIC_LIBRARIES android-arm64) missing libbootloader_message (STATIC_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.
system/vold/Android.mk: error: libminivold (STATIC_LIBRARIES android-arm) missing libbootloader_message (STATIC_LIBRARIES android-arm)
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.
system/vold/Android.mk: error: minivold (RECOVERY_EXECUTABLES android-arm64) missing libbootloader_message (STATIC_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.
vendor/candy/charger/Android.mk: error: libhealthd.candy (STATIC_LIBRARIES android-arm64) missing libminui (STATIC_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.
vendor/candy/charger/Android.mk: error: libhealthd.candy (STATIC_LIBRARIES android-arm) missing libminui (STATIC_LIBRARIES android-arm)
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/core/main.mk:798: error: exiting from previous errors.
09:08:01 ckati failed with: exit status 1
I have built and used Candy for lithium and never had any building errors, so I have no idea why those libraries are missing or of course how to fix it...
If anyone can give a hint it will be appreciated.
Thanks and keep it up!
Click to expand...
Click to collapse
Simply type
export ALLOW_MISSING_DEPENDENCIES=true
Before building
When make system image, I got:
ninja: error: '/home/alan/dotos/out/target/common/obj/JAVA_LIBRARIES/sap-api-java-static_intermediates/classes.jack', needed by '/home/alan/dotos/out/target/common/obj/APPS/Bluetooth_intermediates/with-local/classes.dex', missing and no known rule to make it
14:35:40 ninja failed with: exit status 1
What should I do?
it is likely too hard to build by newbie.
I give up to build GSI rom.

Xperia XA2 H3133/H3113 Android 10 AOSP Not Building / Compiling

Hi
I have an issue when building AOSP, it fails to build some targets, as well as ninja fails with exit status 1. I have followed the guide provided by sony and i dont know why it happens. Log below.
Thanks
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=aosp_h3113
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
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.15.0-62-generic-x86_64-Linux-Mint-19.2
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QP1A.190711.019
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/sony/nile
============================================
hardware/qcom/gps/sdm845/etc/Android.mk was modified, regenerating...
[ 25% 113/441] including device/sony/common/Android.mk ...
IDisplayConfig version: DISPLAY_CONFIG_1_8
[ 99% 440/441] finishing build rules ...
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module 'NexusLauncherOutOfProcTests'
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module 'NexusLauncherDebug'
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module 'NexusLauncherTests'
platform_testing/build/tasks/tests/platform_test_list.mk: warning: platform_tests: Unknown installed file for module 'LauncherRotationStressTest'
platform_testing/build/tasks/tests/platform_test_list.mk: warning: platform_tests: Unknown installed file for module 'PlatformScenarioTests'
FAILED: ninja: 'kernel/sony/msm-4.14/common-kernel/kernel-dtb-pioneer', needed by 'out/target/product/pioneer/kernel', missing and no known rule to make it
02:03:49 ninja failed with: exit status 1
#### failed to build some targets (02:22 (mm:ss)) ####
FAILED: ninja: 'kernel/sony/msm-4.14/common-kernel/kernel-dtb-pioneer
no prebuilt kernel in repo!
u need to compile kernel from source 1st or change "/device/sony/nile/platform.mk" to use source code for kernel, not prebuilt.
Now u can do it =) They updated sources & make prebuild kernels
https://github.com/sonyxperiadev/kernel-sony-msm-4.14-common

Can developers help me to build rom ?

Hi everyone ,
I have faced problems. Before telling the problems ;
I want to learn how to build LineageOS on Ubuntu 18.04. I create the virtual device which is Ubuntu 18.04 64 Bit, 110GB 4 core 8GB.
And search the source on internet how to build custom rom
Then
I had installed the java jdk 8
I have created the rom file which is lineage , cd lineage
repo init -u git://github.com/LineageOS/android.git -b lineage-17.1
repo sync
git clone https://github.com/sm6150-dev/android_device_xiaomi_davinci/tree/lineage-17.1 -b lineage-17.1 device/xiaomi/davinci
git clone https://github.com/mishamyrt/davinci-pancake-kernel -b ten kernel/xiaomi/davinci
Some sources say you have to export/repo common tree but I did not find this, and you have to replace name, device name in some mk files which are the AndroidProducts.mk
when I see these files and open their, it seems ok I did not change anything.
croot
brunch davinci
and I faced this problem :
[100% 139/139] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
internal error: failed to find dex jar path for module "WfdCommon"
internal error: failed to find dex jar path for module "WfdCommon"
13:52:32 soong bootstrap failed with: exit status 1
#### failed to build some targets (02:42 (mm:ss)) ####
Could you please tell me what can I do, How can I build unoffical LineageOS 17.1, I want to build.
What trees do I use ?
Thanks
I also have the same problem
06:51:32 Build sandboxing disabled due to nsjail error.
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
LINEAGE_VERSION=17.1-20200618-UNOFFICIAL-lmi
TARGET_PRODUCT=lineage_lmi
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a75
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.19.0-9-cloud-amd64-x86_64-Debian-GNU/Linux-10-(buster)
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QQ3A.200605.001
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=vendor/xiaomi/lmi device/xiaomi/lmi hardware/qcom-caf/kona
============================================
[100% 2/2] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/bu
ild.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp
internal error: failed to find dex jar path for module "WfdCommon"
internal error: failed to find dex jar path for module "WfdCommon"
06:52:34 soong bootstrap failed with: exit status 1
ninja: build stopped: subcommand failed.
#### failed to build some targets (01:01 (mm:ss)) ####
Click to expand...
Click to collapse
I think something wrong with your local manifest.

Ran into an error while building LineageOS 16.0 for karatep

Hi all,
I was just trying to build LOS16 for karatep during the lockdown. I already run LOS16.0, I'm just trying to figure out the process.
I got this error.
[1036/1036] including vendor/qcom/opensource/dataservices/Android.mk ...
system/core/init/Android.mk: error: "init (EXECUTABLES android-arm64) missing libinit_karatep (STATIC_LIBRARIES android-arm64)"
Click to expand...
Click to collapse
I have no idea what it means.
I had added the following repos to roomservice.xml
Device Tree: malfunchan/android_vendor_lenovo_karatep
Kernel: karthick111/android_kernel_lenovo_msm8937
Vendor: tunasahinn/android_device_lenovo_karatep
I had made necessary changes in the device tree and added vendorsetup.sh and AndroidProducts.mk which were missing in the repo.
Are these even the right repos?
Any help would be appreciated!
A portion of the log is below.
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
LINEAGE_VERSION=16.0-20200507-UNOFFICIAL-karatep
TARGET_PRODUCT=lineage_karatep
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
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-5.3.0-1020-azure-x86_64-Ubuntu-18.04.4-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190801.002
OUT_DIR=/home/rah/android/lineage/out
PRODUCT_SOONG_NAMESPACES= hardware/qcom/audio-caf/msm8996 hardware/qcom/display-caf/msm8996 hardware/qcom/media-caf/msm8996
============================================
[1/1] /home/rah/android/lineage/out/soong/.minibootstrap/...home/rah/android/lineage/out/soong/.bootstrap/build.ninja
[55/56] glob libcore/openjdk_java_files.bp
[80/80] /home/rah/android/lineage/out/soong/.bootstrap/bin/soong_build /home/rah/android/lineage/out/soong/build.ninja
/home/rah/android/lineage/out/build-lineage_karatep-cleanspec.ninja is missing, regenerating...
build/make/core/combo/TARGET_linux-arm.mk:43: warning: cortex-a53 is armv8-a.
build/make/core/combo/TARGET_linux-arm.mk:45: warning: TARGET_2ND_ARCH_VARIANT, armv7-a-neon, ignored! Use armv8-a instead.
/home/rah/android/lineage/out/build-lineage_karatep.ninja is missing, regenerating...
build/make/core/combo/TARGET_linux-arm.mk:43: warning: cortex-a53 is armv8-a.
build/make/core/combo/TARGET_linux-arm.mk:45: warning: TARGET_2ND_ARCH_VARIANT, armv7-a-neon, ignored! Use armv8-a instead.
[1036/1036] including vendor/qcom/opensource/dataservices/Android.mk ...
system/core/init/Android.mk: error: "init (EXECUTABLES android-arm64) missing libinit_karatep (STATIC_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:844: error: exiting from previous errors.
14:43:22 ckati failed with: exit status 1
#### failed to build some targets (02:02 (mm:ss)) ####
Click to expand...
Click to collapse
Fixed the issue, problem with a library reference in the repo.
Raised an issue in git.

Categories

Resources