Warning: Module 'androidx.wear_wear' depends on non-existing optional_uses_libs 'wear-sdk'
Warning: Module 'androidx.wear.compose_compose-foundation' depends on non-existing optional_uses_libs 'wear-sdk'
Problem: These warnings indicate that the androidx.wear_wear and androidx.wear.compose_compose-foundation modules are trying to use a library called wear-sdk, which isn't being included in the build. This usually happens when a project declares an optional dependency (using optional_uses_libs) on a module that hasn't been defined or included in the manifest.
Analysis Looking at the manifest files, there isn't an explicit reference to 'wear-sdk'. It is possible that this is a dependency within the AOSP code that is not included in the VoltageOS manifest.
Solution: This would most likely require changes to the Android.bp files in the affected modules. Since I don't have those files, the best I can do is flag it as a potential problem. You may need to remove the optional dependency on wear-sdk if it's not needed, or if you intend to include it you'll need to add the necessary project to the manifest, including prebuilts and libraries, and make sure that the build system can locate them.
Error 3: com.android.tzdata dependency issue
code
error: system/timezone/apex/Android.bp:62:1: "com.android.tzdata" depends on undefined module "com.android.tzdata.certificate.override".
Or did you mean ["libcom.android.sysprop.foldlockbehavior"]?
Problem: The com.android.tzdata module (likely related to timezone data) in system/timezone/apex/Android.bp has a dependency on com.android.tzdata.certificate.override, which is not defined within the build. The build system is suggesting the similar module "libcom.android.sysprop.foldlockbehavior", which indicates a typo or misconfiguration.
Analysis:
The com.android.tzdata.certificate.override dependency is not present in the provided manifests. This suggests a possible missing dependency or a misconfiguration specific to how VoltageOS handles timezone data.
The suggestion of "libcom.android.sysprop.foldlockbehavior" implies that the build system might be attempting to reference the wrong module, or a related module is missing/incorrectly defined.
Solution:
Check system/timezone/apex/Android.bp: Examine line 62 within the file, which is where the issue is triggered, and see what the dependency is used for.
Investigate com.android.tzdata.certificate.override: The proper way of resolving the problem would be to either properly implement this module or resolve the dependency another way. You may need to investigate the AOSP source or search the VoltageOS projects for the missing dependency.
Potential Workaround: Since the build system suggested libcom.android.sysprop.foldlockbehavior, it might be worth trying to use that instead if it is a suitable replacement for com.android.tzdata.certificate.override.
Add missing module After finding what the dependency is supposed to be, you will need to add this to the manifest files and ensure it is being built.
Problem: This indicates a critical build error occurred during the Soong build system's initialization. The previous errors have caused the Soong build system to fail completely.
Analysis: This is a consequence of the previous errors. The Soong build system failed to configure the build correctly and can't proceed.
Overall Summary and Recommendations
Dependency Resolution:
The primary issue is missing dependencies in the androidx.wear and com.android.tzdata modules. These dependencies are not present in the provided manifest files, but are being referenced by the code. This likely indicates changes or modules missing from the VoltageOS manifest compared to AOSP.
Find out where these modules originate in AOSP and consider if you need to incorporate them into the VoltageOS build or if you can remove the dependency.
Android.bp Files:
You will need to inspect the Android.bp files in androidx.wear and system/timezone/apex to investigate the dependency issue.
Manifest Updates:
If the missing modules are needed, they must be added to the correct manifest file.
Soong Debugging:
Once you've addressed the dependency issues, try building again. If you encounter further issues with Soong, you might need to enable verbose logging (if possible) to get more details.
Clean Build:
After making significant changes, doing a repo sync and a clean build (make clobber followed by your regular build command) may be necessary to ensure no cached build artifacts are interfering.
Next Steps for you:
Examine Android.bp Files: Start by carefully inspecting the Android.bp files mentioned in the error messages, specifically for the dependencies on wear-sdk and com.android.tzdata.certificate.override.
Search for Missing Modules: Try searching through the AOSP or VoltageOS repositories for the definitions of these dependencies.
Update Manifest: Based on what you find, add missing projects or make the necessary adjustments to your VoltageOS manifest files.
Test Build: Run a clean build to verify the changes.
Let me know if you have more questions or encounter additional errors.
Okay, this additional information helps narrow down the problem with the com.android.tzdata dependency. It confirms that the system/timezone/apex directory exists and contains the Android.bp file that is causing the build error, along with other related files.
Analysis based on the file listing:
system/timezone/apex/Android.bp: This is the file directly referenced in the build error. This is where the module com.android.tzdata is defined, and where it has a dependency on the undefined module com.android.tzdata.certificate.override.
system/timezone/apex/com.android.tzdata.avbpubkey, com.android.tzdata.pk8, com.android.tzdata.pem, com.android.tzdata.x509.pem: These files likely contain the public keys or certificates needed for signing and verifying the timezone data. This confirms that a security feature that requires certificates is being used.
system/timezone/apex/AndroidManifest.xml: This is the manifest file for the com.android.tzdata APEX module.
system/timezone/apex/manifest.json: Likely contains metadata about the APEX module.
system/timezone/apex/tests: This folder contains tests associated with the APEX module.
Implications of the File Listing:
APEX Module: The presence of AndroidManifest.xml, manifest.json, certificate-related files, and Android.bp indicates that com.android.tzdata is being built as an APEX module. APEX modules (Android Pony EXpress) are containerized modules used to update system components.
Certificate Requirement: The files com.android.tzdata.avbpubkey, com.android.tzdata.pk8, com.android.tzdata.pem, and com.android.tzdata.x509.pem confirm that the module is expecting signing or certificate validation.
Missing Certificate Override: The original build error states that com.android.tzdata depends on com.android.tzdata.certificate.override, which doesn't exist. This suggests a misconfiguration, a missing module that generates/provides the override, or an incorrect way the certificate/signing is being used.
Refined Next Steps:
Given this new file listing, here's a more targeted approach:
Inspect Android.bp:
Open system/timezone/apex/Android.bp and go to line 62 to see the exact code that refers to com.android.tzdata.certificate.override.
Look for the specific section in the Android.bp that defines the com.android.tzdata module.
Identify how and where com.android.tzdata.certificate.override is being referenced.
Determine if com.android.tzdata.certificate.override is needed:
It's possible that the override is optional, or that VoltageOS needs to handle the certificate signing in a different way.
If the override is not necessary, then the Android.bp file will need to be changed to not require it.
If the override is necessary, investigate how the certificates are normally generated or provided in AOSP.
Find the Source of the Missing Module
If the override module is necessary then it must be built, if this module is in AOSP or part of a prebuilt that would be added to a project.
Search through the AOSP source to see how the tzdata certificates are generated.
Modify or Add Project to Manifest:
If the com.android.tzdata.certificate.override is simply a signing configuration and can be replaced, then change the Android.bp.
If the com.android.tzdata.certificate.override module must be built, then include the required AOSP projects into the manifest or build the module into the VoltageOS manifest.
Clean and Rebuild:
After making your changes, do a clean build ( make clobber && brunch <your_device>).
Important Questions to Answer:
What is the Purpose of com.android.tzdata.certificate.override? Is it a specific module providing certificates or a configuration related to signing? This must be answered before attempting a fix.
Is the Dependency Optional? If it's an optional override, you might be able to disable it in the Android.bp file.
By focusing on the Android.bp file and understanding the role of com.android.tzdata.certificate.override, you should be able to resolve this dependency issue. Remember to thoroughly check any AOSP documentation for details of com.android.tzdata and certificate generation for APEX modules.
Let me know the results of inspecting Android.bp.
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
// http://go/android-license-faq
default_applicable_licenses: ["Android-Apache-2.0"],
}
// Defaults shared between real and test versions of the APEX.
apex_defaults {
name: "com.android.tzdata-defaults",
updatable: true,
min_sdk_version: "33",
// Use a custom AndroidManifest.xml used for API targeting.
androidManifest: ":com.android.tzdata-androidManifest",
// Explicit because the defaulting behavior only works for the real
// module.
file_contexts: ":com.android.tzdata-file_contexts",
// Shared signing information.
key: "apex.tzdata.key",
certificate: ":com.android.tzdata.certificate",
}
filegroup {
name: "com.android.tzdata-androidManifest",
srcs: ["AndroidManifest.xml"],
}
apex_key {
name: "apex.tzdata.key",
public_key: "com.android.tzdata.avbpubkey",
private_key: "com.android.tzdata.pem",
}
android_app_certificate {
name: "com.android.tzdata.certificate",
certificate: "com.android.tzdata",
}
module_exports {
name: "tzdata-module-test-exports",
java_libs: [
"tzdata-testing",
],
}
// The definition for the real (not test) tzdata APEX.
apex {
name: "com.android.tzdata",
defaults: ["com.android.tzdata-defaults"],
manifest: "manifest.json",
prebuilts: [
"apex_tz_version",
"apex_tzdata",
"apex_tz_version_ver8",
"apex_tzlookup.xml_ver8",
"apex_telephonylookup.xml_ver8",
"apex_tzdata_ver8",
"apex_icu_res_files_ver8",
],
}
Okay, this Android.bp file for system/timezone/apex provides a lot of clarity! It confirms our understanding of how the com.android.tzdata APEX module is built and how certificates are involved. Let's analyze the code and the dependencies to resolve your issue.
Detailed Breakdown of Android.bp:
package { ... }: Defines the package properties, primarily the license.
This section defines the certificate used to sign the APEX.
certificate: "com.android.tzdata": This is a confusing name choice, it is the name of a module that produces a certificate and NOT the certificate directly. It should be com.android.tzdata.x509.pem. It is expecting a prebuilt module to provide this certificate, but the name is not clear.
This defines the main com.android.tzdata APEX module.
defaults: ["com.android.tzdata-defaults"]: Uses the shared defaults defined earlier.
manifest: "manifest.json": Sets the manifest to use.
prebuilts: [ ... ]: Lists the prebuilt files to include in the APEX.
The Problem: Incorrect Certificate Reference and Missing Prebuilts
The key problem is in the android_app_certificate section. It's referencing the module com.android.tzdata which does not provide the certificate directly. The certificate should be com.android.tzdata.x509.pem instead.
The module com.android.tzdata is an apex module, not the certificate itself.
The signing certificate is a prebuilt file which is com.android.tzdata.x509.pem
Additionally, the module com.android.tzdata.certificate is never actually used.
Proposed Solution:
Correct android_app_certificate Reference:
Change the android_app_certificate to refer to the correct certificate file by replacing the reference from the incorrectly named com.android.tzdata to a reference of com.android.tzdata.x509.pem.
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
// http://go/android-license-faq
default_applicable_licenses: ["Android-Apache-2.0"],
}
// Defaults shared between real and test versions of the APEX.
apex_defaults {
name: "com.android.tzdata-defaults",
updatable: true,
min_sdk_version: "33",
// Use a custom AndroidManifest.xml used for API targeting.
androidManifest: ":com.android.tzdata-androidManifest",
// Explicit because the defaulting behavior only works for the real
// module.
file_contexts: ":com.android.tzdata-file_contexts",
// Shared signing information.
key: "apex.tzdata.key",
certificate: ":com.android.tzdata.certificate",
}
filegroup {
name: "com.android.tzdata-androidManifest",
srcs: ["AndroidManifest.xml"],
}
apex_key {
name: "apex.tzdata.key",
public_key: "com.android.tzdata.avbpubkey",
private_key: "com.android.tzdata.pem",
}
android_app_certificate {
name: "com.android.tzdata.certificate",
certificate: "com.android.tzdata.x509.pem", // CORRECTED
}
module_exports {
name: "tzdata-module-test-exports",
java_libs: [
"tzdata-testing",
],
}
// The definition for the real (not test) tzdata APEX.
apex {
name: "com.android.tzdata",
defaults: ["com.android.tzdata-defaults"],
manifest: "manifest.json",
prebuilts: [
"apex_tz_version",
"apex_tzdata",
"apex_tz_version_ver8",
"apex_tzlookup.xml_ver8",
"apex_telephonylookup.xml_ver8",
"apex_tzdata_ver8",
"apex_icu_res_files_ver8",
"com.android.tzdata.x509.pem" // ADDED
],
}
Next Steps:
Modify Android.bp: Apply the change specified above to system/timezone/apex/Android.bp.
Clean and Rebuild: Run make clobber && brunch <your_device> to clear the build artifacts and rebuild the system.
Test: Check if the build succeeds. If any new problems arise you can send more data.
By making this correction, you should resolve the build error regarding the timezone data. If you encounter further issues, please let me know!