Giter Site home page Giter Site logo

sfx-android / android_vendor_extendrom Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 7.0 9.81 MB

modifying / extending the Android build process

License: Apache License 2.0

Makefile 36.11% Shell 53.06% Python 2.52% Java 8.31%
android aosp build customizer extend lineage rooting signature-spoofing deblob apk-installation

android_vendor_extendrom's People

Contributors

2lucem2 avatar cryptomilk avatar martmists-gh avatar nailyk-fr avatar petefoth avatar pippo8291 avatar steadfasterx avatar stel-bl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

android_vendor_extendrom's Issues

Problems building LOS20 that I couldn't fix in code

I used (my fork of) this project to make a customised build of LineageOS for Microg. I have submitted the changes that I needed to make as a Pull Request . The build included the following extendrom packages:
AuroraStore AuroraServices BlissLauncher Bromite DAVx5 ICSx5 NextCloud NextCloudNotes OpenTasks K9-Mail-latest Fennec QKSMS OpenCamera noLOSSnap noLOSEmail noLOSMessaging noLOSJelly

When I built the Android 13 / LOS 20.0 version, the build succeeded, but when the device booted, some of the apps were not present. The missing apps were Aurora Services, Bromite, DAVx5, ICSx5 ,Fennec

I was able to "fix" the problem by making changes to the automatically generated vendor/extendrom/Android.mk. For each of the missing target I changed the line
LOCAL_CERTIFICATE := PRESIGNED
to
LOCAL_CERTIFICATE := $(DEFAULT_SYSTEM_DEV_CERTIFICATE)

For the remaining targets (AuroraStore, BlissLauncher, NextCloud, NextCloudNotes, OpenTasks, K9-Mail-latest) I did not change the LOCAL_CERTIFICATE value, and the apps were present.
(The full patched file can be found at https://codeberg.org/attachments/9946cfb3-9b92-47c8-8f38-48e052269abf)

I found this "fix" in this commit in danielk43's android_vendor_partner_gms repo

I have no idea why the change is needed for some apps and not for others. (I believe it would also be needed for Phonesky but I'm not sure about that as Phonesky didn't make it into my final build for other reasons - see #24).

I have no idea what changes would be needed to make the change when the makefile is being generated.

Add some more alternatives to /e/'s system apps

I will include the following in my custom ROMs. Adding them here will allow others to use them in their ROMs if they choose, without needing to fork this repo. All are available in the F-Droid repo

  • Email: K-9 Mail (forked by /e/ for their Mail app)
  • Messaging: QKSMS (forked by /e/ for their Message app)
  • Browser: Fennec-FDroid (because I prefer Mozilla-based browsers)
  • ETAR (forked by /e/ for their Calendar app)

Allow combinations of additional F-Droid repos

The Problem

The additional_repos.xml module adds some popular F-Droid repos which the F-Droid app uses to install and update the apps published in those repos.

We are adding new modules (Bromite browser, more MicroG components) which also have F-Droid repos where updates are releases are published.

Users need to be able to combine these lists of repos and use the combined list in their builds, by including them in the file additional_repos.xml (which the build system places in /vendor/etc/org.fdroid.fdroid).

Upstream F-Droid Android client app looks in the etc/org.fdroid.fdroid subdirectory of a number of different directories (/system, /product, /vendor, /odm, /oem) for a single file named additional_repos.txt, and adds the repo items defined in that file.

Proposed solution

Have a number of different F-DroidRepos targets: one for each possible combination

  1. Extra_FDroidRepos: (the current additional_repos.xmlfile / target )
  2. Microg_FDroidRepos: contains microG F-Droid repo and microG F-Droid archive
  3. Bromite_FDroidRepos: contains Bromite F-Droid repo
  4. MicrogBromite_FDroidRepos: 2 and 3 combined
  5. All_FDroidRepos: 1, 2 and 3 combined

This is not the most elegant solution - see below - but it is the one that involves the least work / fewest changes. It also gives a clear pattern for how users can add their own additional repos in combination with existing ones

Alternative solutions

  1. Change upstream: Make changes in the F-Droid android client, so that , instead of including repos speciied only in a file named additional_repos.xml, it includes content from all files matching the regexp *_repos.xml
    • pro: very flexible; no inter-dependencies between modules that have associated F-Droid repos
    • con: needs java code to be written (and tested and inspected); no guarantee upstream would accept the change
  2. Add code in this project to combine information from multiple *_repo_items.xml into a single additional_repos.xml file
    • pro: very flexible; easy to add more repos for new targets
    • con: more code (shell scripts and / or makefiles) to be written, inspected, and tested (and to introduce bugs :) ) I don't have the skills to write that code

MicroG GmsCore: replace /e/ version with LineageOS for microG

Current /e/ OS ROMs contain a version of MicroG GmsCore that does not include the Exposure Notification framework, used by Covid contact tracing apps. Their preferred method of installing the EN Framework is to use their Apps app store, which is buggy, and which is not possible when Apps is removed from the ROM. It is also not clear whether - or how - /e/ will provide updates to the EN Framework in future.

Solution is to

  • use the version of GmsCore used by LineageOS for microG
  • add the MicroG F-Droid repos to the additional_repos package/module

[FR] add OS/Apps key signing setup

Description

describe your feature request as detailed as possible:

Include/move: https://github.com/sfX-android/android_buildtools/tree/main/sign

Target version

What's your current custom OS and Android version you're building for:

...

_What Android version should support that feature (add an x within the [ ] brackets, select all that should

  • Android 9
  • Android 10
  • Android 11
  • Android 12
  • Android 13
  • Android 14

What custom OS should support that feature (add an x within the [ ] brackets, select / add all that should apply):

  • Lineage OS
  • AXP.OS
  • AOSP

Note

when sharing logs it is strongly recommended
using github gists

Clarification needed for mkbootimg.mk instructions

copy the whole (matching to your device..) $(INSTALLED_BOOTIMAGE_TARGET): block from build/core/Makefile

my Makefile has multiple $(INSTALLED_BOOTIMAGE_TARGET): blocks in it. How do I know which one to copy?

add: @/bin/bash $(ROOT_BOOT_BIN) $$PWD/$@ in the block of $(INSTALLED_BOOTIMAGE_TARGET): , AFTER the MKBOOTIMG line and BEFORE any AVB line

none of the $(INSTALLED_BOOTIMAGE_TARGET): blocks in the file contain a MKBOOTIMG line.

there is a block called $(INSTALLED_VENDOR_BOOTIMAGE_TARGET): which contains a MKBOOTIMG line.

MicrogGmsCore doesnt work.

when trying to include MIcroG GMS core, it doesnt work.

  • custom OS name you build for (e.g. LOS, AXP.OS, ...) -> Ressurection Remix
  • Android version (e.g. A9, A10, A11, ...) -> A10
COMPLETE(!!!) output when executing: `vendor/extendrom/er.sh`

************************************************** STARTING EXTENDROM **************************************************

extendrom version: HEAD a0f5c38

ENABLE_EXTENDROM: true
EXTENDROM_PREROOT_BOOT: true
EXTENDROM_PACKAGES: noEOSappstore Phonesky MicrogGmsCore Magisk AdAway GsfProxy
EOS_EDITION:
EXTENDROM_SIGNING_PATCHES:
EXTENDROM_SIGNATURE_SPOOFING:
EXTENDROM_SIGSPOOF_RESET:
EXTENDROM_SIGSPOOF_FORCE_PDIR:
EXTENDROM_TARGET_VERSION: 10
EXTENDROM_TARGET_PRODUCT: rr
SRC_TOP: /media/tessa1mass/AOSP/RR-Qext/
SRC_TOP_FULL: /media/tessa1mass/AOSP/RR-Qext
EXTENDROM_PRODUCT_DEVICE=kiev
EXTENDROM_BOOT_DEBUG=
EXTENDROM_DEBUG_PATH=/data/vendor_de (will be suffixed with /boot_debug)
EXTENDROM_DEBUG_PATH_SIZE_FULL=5000 KB
EXTENDROM_DEBUG_PATH_SIZE_CRASH=500 KB
EXTENDROM_DEBUG_PATH_SIZE_KERNEL=500 KB
EXTENDROM_DEBUG_PATH_SIZE_SELINUX=500 KB
/usr/bin/aapt
MY_DIR: vendor/extendrom
[F_GET_GPG_KEYS] ... skipping already imported gpg pub key (7A029E54DD5DCE7A)
[F_GET_GPG_KEYS] ... skipping already imported gpg pub key (22F796D6E62E6625A0BCEFEA7F979A66F3E08422)
[get_packages] ... skipping F-Droid as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping F-Droid_v1.16.3 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping F-DroidPrivilegedExtension_pb as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping AuroraStore as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping AuroraServices as not requested by EXTENDROM_PACKAGES
[get_packages] ... parsing repo to find latest apk file name
[get_packages] ... parsing result: org.adaway_LATEST.apk -> org.adaway_60101.apk
[download_package] ... downloading package: org.adaway_LATEST.apk
[get_packages] ... target package: vendor/extendrom/prebuilt/AdAway.apk

[get_packages] ... skipping DNS66 as not requested by EXTENDROM_PACKAGES
[download_package] ... downloading package: Magisk-v26.4.apk
[get_packages] ... target package: vendor/extendrom/prebuilt/Magisk.apk

[get_packages] ... skipping SignMagisk as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Magisk_v26.3 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping SignMagisk_v26.3 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Magisk_v26.2 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping SignMagisk_v26.2 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Magisk_v25.2 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping SignMagisk_v25.2 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Magisk_v24.3 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping SignMagisk_v24.3 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Magisk_v23.0 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping SignMagisk_v23.0 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Magisk_v22.1 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping SignMagisk_v22.1 as not requested by EXTENDROM_PACKAGES
[download_package] ... downloading package: Phonesky_132.apk
[get_packages] ... target package: vendor/extendrom/prebuilt/Phonesky.apk

[get_packages] ... skipping Phonesky_AXP-OS as not requested by EXTENDROM_PACKAGES
[get_packages] ... parsing repo to find latest apk file name
[get_packages] ... parsing result: com.google.android.gms-LATEST.apk -> com.google.android.gms-233515000.apk
[download_package] ... downloading package: com.google.android.gms-LATEST.apk
[get_packages] ... target package: vendor/extendrom/prebuilt/MicrogGmsCore.apk

[get_packages] ... skipping MicrogGmsCore_GH as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping MicrogGmsCore_unified-latest as not requested by EXTENDROM_PACKAGES
[get_packages] ... parsing repo to find latest apk file name
[get_packages] ... parsing result: com.google.android.gsf-LATEST.apk -> com.google.android.gsf-8.apk
[download_package] ... downloading package: com.google.android.gsf-LATEST.apk
[get_packages] ... target package: vendor/extendrom/prebuilt/GsfProxy.apk

[get_packages] ... skipping GsfProxy_GH as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping FakeStore as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping FakeStore_GH as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping NominatimBackend as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping MozillaNlpBackend as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping DroidGuard as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping OpenCamera as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping opencamera_j5_latest as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping SimpleLauncher as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Omega as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping NeoLauncher-latest as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping NeoLauncher as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Lawnchair-stable as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Lawnchair-latest as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping OpenLauncher as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping BlissLauncher as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping K9-Mail-latest as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping FairEmail as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Fennec as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping QKSMS as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping FFUpdater as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping ICSx5 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping DAVx5 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping NextCloud as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Cromite_arm64 as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping Etar as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping OpenTasks as not requested by EXTENDROM_PACKAGES
[get_packages] ... skipping NextCloudNotes as not requested by EXTENDROM_PACKAGES
[MAGISK] preparing the root process as requested
[MAGISK] using patch dir: /media/tessa1mass/AOSP/RR-Qext/vendor/extendrom/config/magisk/rr/A10
ABORT: missing or wrong parameter: vendor/extendrom/tools/apply_patches.sh
arg was: >/media/tessa1mass/AOSP/RR-Qext/vendor/extendrom/config/magisk/rr/A10<

bash stack trace (first occurence is likely where you should look at):

ERROR: last command ended with status >4< at line >454<
[MAGISK] Injecting Magisk patcher ended with 4

content of `vendor/extendrom/Android.mk` # Copyright (C) 2021-2023 steadfasterX # This file is generated by vendor/extendrom/er.sh

VENDOR_DIR := $(call my-dir)

ifeq ($(ENABLE_EXTENDROM),true)

LOCAL_PATH := $(VENDOR_DIR)

Trying to include MicroG GMS Core yields this error:
FAILED: ninja: 'user-keys/shared.pk8', needed by 'out/target/product/kiev/obj/APPS/MicrogGmsCore_intermediates/package.apk', missing and no known rule to make it

lack of vendorsetup.sh

What do I do if there is no vendorsetup.sh?

I tried to have your Android.mk call it using $(shell ) but it didn't like that lol.

magisk: cannot find patch file

I got this error when trying to patch magisk boot all is setup but seems the path has a problem if I change the code with chatgpt it runs forever.

[PATCHER]  ... ended with errorcode 2/0
patch: **** Can't open patch file /home/clawdev/A9//home/clawdev/A9/vendor/extendrom/config/magisk/patches/0001-build_make_tools_releasetools_common.patch : No such file or directory
[PATCHER]  FATAL ERROR occured while applying >0001-build_make_tools_releasetools_common.patch<!!!

bash stack trace (first occurence is likely where you should look at):

ERROR: last command ended with status >3< at line >427<
[MAGISK] Injecting Magisk patcher ended with 3

Changes needed in 'Phonesky' for LOS 20.0

When I made a custom build of Lineageos for Microg including the Phonesky extendrom package, the build succeeded, but the built ROM bootlooped.

The problem is that for Android 13 / LOS 20 Phonesky needs some additional permissions in extra/com.android.vending.xml

I found details of the fix in this commit in the MinMicrog github repo

Making those changes allowed the ROM to boot successfully. However, I didn't save the changes, and removed Phonesky from my build, while I was trying to get round the "missing apps" problem (see #23), so I can't submit working patches (or a PR ;) )

Magisk: build fails when including Magisk in vendorsetup.sh

Description

I am trying to build LineageOS 20 for Sony Xperia XZ1 Compact (lilac) with Magisk included. These are the files:

cat device/sony/lilac/device.mk 
### PLATFORM
$(call inherit-product, device/sony/yoshino-common/platform.mk)
### PROPRIETARY VENDOR FILES
$(call inherit-product, vendor/sony/lilac/lilac-vendor.mk)

ifeq ($(WITH_FDROID),true)
$(call inherit-product, vendor/fdroid/fdroid-vendor.mk)
endif
ifeq ($(WITH_MICROG),true)
$(call inherit-product, vendor/microg/microg-vendor.mk)
endif

DEVICE_PATH := device/sony/lilac

# Soong
PRODUCT_SOONG_NAMESPACES += \
    $(DEVICE_PATH)

# Device uses high-density artwork where available
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREBUILT_DPI := xhdpi hdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi

DEVICE_PACKAGE_OVERLAYS += \
    $(DEVICE_PATH)/overlay

### POWER
TARGET_USE_CUSTOM_POWERHINT := true

include $(DEVICE_PATH)/device/*.mk

# Enable extendrom
$(call inherit-product-if-exists, vendor/extendrom/config/common.mk)
cat device/sony/lilac/vendorsetup.sh 
########### extendrom section ###########
export ENABLE_EXTENDROM=true
export EXTENDROM_PREROOT_BOOT=true
export EXTENDROM_PACKAGES="Magisk AuroraStore AuroraServices"

$PWD/vendor/extendrom/er.sh

source build/envsetup.sh runs without any problems. I can see Magisk being downloaded:

[download_package] ... downloading package: Magisk.v26.3.apk
[get_packages] ... target package: /speicher/android/lineage/vendor/extendrom/prebuilt/Magisk.apk
…
[MAGISK] Injecting Magisk patcher ended with 0
[MAGISK] ... Magisk found!
[MAGISK] ... MAGISK_TARGET_ARCH specified as arm64
[MAGISK] preparing root finished

However, building fails at finishing the build rules:

finishing build rules ...
FAILED: 
build/make/core/main.mk:1312: warning:  device/sony/lilac/lineage_lilac.mk includes non-existent modules in PRODUCT_PACKAGES
Offending entries:
Magisk
build/make/core/main.mk:1312: error: Build failed.
17:14:16 ckati failed with: exit status 1

device/sony/lilac/lineage_lilac.mk is inheriting device/sony/lilac/device.mk, which is inheriting vendor/extendrom/config/common.mk, which populates PRODUCT_PACKAGES (PRODUCT_PACKAGES += $(EXTENDROM_PACKAGES)) as set per device/sony/lilac/vendorsetup.sh (see above)

Optional information

Required(!) information

Lawnchair-latest is broken

When I used Lawnchair-latest in my build, I got the following error

FAILED: out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk
/bin/bash -c "(rm -f out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk ) && (cp \"vendor/extendrom/prebuilt/Lawnchair_latest.apk\" \"out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk\" ) && (if (zipinfo out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk 'lib/*.so' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then out/host/linux-x86/bin/zip2zip -i out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk -o out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk.tmp -0 'lib/**/*.so' && mv -f out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk.tmp out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk ; fi ) && (if ! out/host/linux-x86/bin/zipalign -c -p 4 out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk >/dev/null ; then mv out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk.unaligned; out/host/linux-x86/bin/zipalign -f -p 4 out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk.unaligned out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk.aligned; mv out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk.aligned out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk; fi )"
Unable to open 'out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk' for verification
Unable to open 'out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk.unaligned' as zip archive
mv: bad 'out/target/product/lilac/obj/APPS/Lawnchair-latest_intermediates/package.apk.aligned': No such file or directory

Use a 'production' version of Lawnchair

The Lawnchair builds available on APK Mirror are C/I builds. When they are installed, when they are first used, or when set as default home screen / launcher, they display a popup message saying something like "Please don't use CI builds in production: use official releases".

Solution is to pick up the version from the Google Play store (via Aurora Store app), and use that version instead

Fennec is broken

Launching Fennec installed into /system/app throws this for me:

01-09 19:45:12.826 14949 14970 E GeckoLibLoad: Load sqlite start
01-09 19:45:12.826 14949 14970 E GeckoLibLoad: Couldn't get a handle to libnss3!
01-09 19:45:12.826 14949 14970 E GeckoLibLoad: Throw
01-09 19:45:12.826 14949 14970 E GeckoLibLoad: Load sqlite done
01-09 19:45:12.827 14949 14970 E AndroidRuntime: FATAL EXCEPTION: Gecko
01-09 19:45:12.827 14949 14970 E AndroidRuntime: Process: org.mozilla.fennec_fdroid, PID: 14949
01-09 19:45:12.827 14949 14970 E AndroidRuntime: java.lang.Exception: Error loading sqlite libraries
01-09 19:45:12.827 14949 14970 E AndroidRuntime:        at org.mozilla.gecko.mozglue.GeckoLoader.loadSQLiteLibsNative(Native Method)
01-09 19:45:12.827 14949 14970 E AndroidRuntime:        at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:106)
01-09 19:45:12.827 14949 14970 E ExceptionHandler: Uncaught exception handled:
01-09 19:45:12.827 14949 14970 E ExceptionHandler: java.lang.Exception: Error loading sqlite libraries
01-09 19:45:12.827 14949 14970 E ExceptionHandler:      at org.mozilla.gecko.mozglue.GeckoLoader.loadSQLiteLibsNative(Native Method)
01-09 19:45:12.827 14949 14970 E ExceptionHandler:      at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:106)
01-09 19:45:12.828 14949 14970 I mozac/CrashReporter: Received crash: UncaughtExceptionCrash(timestamp=1641746712827, throwable=java.lang.Exception: Error loading sqlite libraries, breadcrumbs=[], uuid=e3e9c4dd-927c-47d8-8063-2527d2aeb6f9)

Removing it from system and installing it manually through f-droid makes it work fine however.

LOS 19.1 extendrom builds fail due to `--enforce-uses-libraries`

I got a build error below when building extendrom targets (repeated for most of the prebuilt targets)
error: mismatch in the <uses-library> tags between the build system and the manifest:

The interesting bit from the full error message is

- to temporarily disable the check on command line, rebuild with RELAX_USES_LIBRARY_CHECK=true 
  (this will set compiler filter "verify" and disable AOT-compilation in dexpreopt)
- to temporarily disable the check for the whole product, set PRODUCT_BROKEN_VERIFY_USES_LIBRARIES := 
  true in the product makefiles
- to fix the check, make build system properties coherent with the manifest
- see build/make/Changes.md for details

The file build/make/Changes.md says

* Android.bp property: `provides_uses_lib`
* Android.mk variable: `LOCAL_PROVIDES_USES_LIBRARY`

It is possible to disable the check on a per-module basis. When doing that it is
also recommended to disable dexpreopt, as disabling a failed check will result
in incorrect class loader context recorded in the .odex file, which will cause
class loader context mismatch and dexopt at first boot.

* Android.bp property: `enforce_uses_lib`
* Android.mk variable: `LOCAL_ENFORCE_USES_LIBRARIES`

I "fixed" my build by calling export RELAX_USES_LIBRARY_CHECK=true (as suggested by the error message), then mka bacon. I now put that export in my vendorsetup.sh and builds seem to work fine.

The effect of the fix is to disable the check for the whole build. A better "fix" is by changing /tools/extract_utils.sh to add the line LOCAL_ENFORCE_USES_LIBRARIES := false to each module in Android.mk.

I thought about trying to make some changes in my extendrom fork, but decided that I'm not a shell programmer, and I chose to get on with making builds using the workaround


Here's the full error text

 66% 93070/139054] Verifying uses-libraries: vendor/extendrom/prebuilt/at.bitfire.davdroid_LATEST.apk
FAILED: out/target/common/obj/APPS/DAVx5_intermediates/enforce_uses_libraries.status
/bin/bash -c "(rm -f out/target/common/obj/APPS/DAVx5_intermediates/enforce_uses_libraries.status ) && (build/soong/scripts/manifest_check.py 	  --enforce-uses-libraries 	  --enforce-uses-libraries-status out/target/common/obj/APPS/DAVx5_intermediates/enforce_uses_libraries.status 	  --aapt out/host/linux-x86/bin/aapt 	   	   	   	   	  vendor/extendrom/prebuilt/at.bitfire.davdroid_LATEST.apk )"
error: mismatch in the <uses-library> tags between the build system and the manifest:
	- required libraries in build system: []
	                 vs. in the manifest: []
	- optional libraries in build system: []
	                 vs. in the manifest: [androidx.window.extensions, androidx.window.sidecar]
	- tags in the manifest (vendor/extendrom/prebuilt/at.bitfire.davdroid_LATEST.apk):
		uses-library-not-required:'androidx.window.extensions'		uses-library-not-required:'androidx.window.sidecar'
note: the following options are available:
	- to temporarily disable the check on command line, rebuild with RELAX_USES_LIBRARY_CHECK=true (this will set compiler filter "verify" and disable AOT-compilation in dexpreopt)
	- to temporarily disable the check for the whole product, set PRODUCT_BROKEN_VERIFY_USES_LIBRARIES := true in the product makefiles
	- to fix the check, make build system properties coherent with the manifest
	- see build/make/Changes.md for details

22:55:00 ninja failed with: exit status 1

#### failed to build some targets (01:08:45 (hh:mm:ss)) ####

Change the split repos implementation...

... to allow the additional_repos.xmlmodule to replace LineageOS for MicroG's version

I'm using this project to make customised builds ofLineageOS for MicroG.

L4M includes F-Droid, and their own additional_repos.xml module, containing only the Microg repos. I would like to be able to replace their module, with the 'split repos' version from here. I think that can be done by writing a LOCAL_OVERRIDES_PACKAGES line in F_WRITE_MAKEFILE_FDROID()

[FR] pass safetynet

Description

add an option to pass safeteynet.

Details: https://protonaosp.org/developers/details/safetynet

Target version

What Android version should support that feature (add an x within the [ ] brackets, select all that should apply):

  • Android 9
  • Android 10
  • Android 11
  • Android 12
  • Android 13
  • Android 14

What custom OS should support that feature (add an x within the [ ] brackets, select / add all that should apply):

  • Lineage OS
  • AXP.OS

Note

when sharing logs it is strongly recommended
using github gists

[FR] Lineage 21 / Android 14 support

Description

When attempting to set up, I noticed that vendorsetup.sh is gone in Lineage 21. It's the preferred way to install extendrom. What line can I add in device.mk to get it to execute er.sh at the right time?

Target version

LineageOS 21 / Android 14

What Android version should support that feature (add an x within the [ ] brackets, select all that should apply):

  • Android 7
  • Android 8
  • Android 9
  • Android 10
  • Android 11
  • Android 12
  • Android 13
  • Android 14

What custom OS should support that feature (add an x within the [ ] brackets, select / add all that should apply):

  • Lineage OS
  • AXP.OS
  • AOSP
  • ...

Note

when sharing logs it is strongly recommended
using github gists

Extendrom tries to run even if disabled

I have this in my device.mk:

ENABLE_EXTENDROM := false
EXTENDROM_PREROOT_BOOT := false

However it's still trying to install magisk:

[ 99% 349/352] Target boot image: out/target/product/dre/boot.img
++++  Add hash footer to BOOT image  ++++
[ 99% 350/352] Package target files: out/target/product/dre/obj/PACKAGING/target_files_intermediates/lineage_dre-tar
FAILED: out/target/product/dre/obj/PACKAGING/target_files_intermediates/lineage_dre-target_files-eng.nathan.zip

magisk: patch file does not apply correctly on A9

Description

splitted from #35

Required(!) information

  • Android version: A9
building image from target_files BOOT...
Traceback (most recent call last):
File "build/make/tools/releasetools/make_recovery_patch", line 55, in
main(sys.argv[1:])
File "build/make/tools/releasetools/make_recovery_patch", line 42, in main
input_dir, "BOOT")
File "/home/clawdev/A9/build/make/tools/releasetools/common.py", line 577, in GetBootableImage
info_dict, has_ramdisk, two_step_image)
File "/home/clawdev/A9/build/make/tools/releasetools/common.py", line 516, in _BuildBootableImage
RunAndCheckOutput(mpatcher, verbose=True, env={'system_root_image': info_dict.get("system_root_image", "false")})
NameError: global name 'RunAndCheckOutput' is not defined

Note

when sharing logs or longer texts it is strongly recommended
using github gists

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.