Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f75a18fd21 | ||
|
|
aafacd12da | ||
|
|
d547c37698 | ||
|
|
b5fc70df6b | ||
|
|
65fde8a768 | ||
|
|
4c9625b681 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,5 +1,8 @@
|
|||||||
# out directory
|
# out directory
|
||||||
out/
|
out/
|
||||||
|
|
||||||
|
# rro build artifacts
|
||||||
|
overlay/**/build/
|
||||||
|
|
||||||
# gapps log
|
# gapps log
|
||||||
gapps_log
|
gapps_log
|
||||||
|
|||||||
BIN
build/apktool/apktool_2.8.1.jar
Normal file
BIN
build/apktool/apktool_2.8.1.jar
Normal file
Binary file not shown.
@@ -7,18 +7,23 @@
|
|||||||
# var
|
# var
|
||||||
#
|
#
|
||||||
DATE=$(date -u +%Y%m%d_%H%M%S)
|
DATE=$(date -u +%Y%m%d_%H%M%S)
|
||||||
TOP=$(realpath .)
|
export GAPPS_TOP=$(realpath .)
|
||||||
ANDROIDV=12.1.0
|
ANDROIDV=12.1.0
|
||||||
SDKV=32
|
SDKV=32
|
||||||
GARCH=$1
|
GARCH=$1
|
||||||
CPUARCH=$GARCH
|
CPUARCH=$GARCH
|
||||||
[ ! -z "$2" ] && CPUARCH=$2
|
[ ! -z "$2" ] && CPUARCH=$2
|
||||||
OUT=$TOP/out
|
OUT=$GAPPS_TOP/out
|
||||||
BUILD=$TOP/build
|
BUILD=$GAPPS_TOP/build
|
||||||
METAINF=$BUILD/meta
|
METAINF=$BUILD/meta
|
||||||
COMMON=$TOP/common/proprietary
|
COMMON=$GAPPS_TOP/common/proprietary
|
||||||
GLOG=$TOP/gapps_log
|
export GLOG=$GAPPS_TOP/gapps_log
|
||||||
ADDOND=$TOP/addond.sh
|
ADDOND=$GAPPS_TOP/addond.sh
|
||||||
|
|
||||||
|
SIGNAPK=$GAPPS_TOP/build/sign/signapk.jar
|
||||||
|
|
||||||
|
ZIP_KEY_PK8=$GAPPS_TOP/build/sign/testkey.pk8
|
||||||
|
ZIP_KEY_PEM=$GAPPS_TOP/build/sign/testkey.x509.pem
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
@@ -41,16 +46,16 @@ function create() {
|
|||||||
echo "ARCH= $GARCH" >> $GLOG
|
echo "ARCH= $GARCH" >> $GLOG
|
||||||
echo "OS= $(uname -s -r)" >> $GLOG
|
echo "OS= $(uname -s -r)" >> $GLOG
|
||||||
echo "NAME= $(whoami) at $(uname -n)" >> $GLOG
|
echo "NAME= $(whoami) at $(uname -n)" >> $GLOG
|
||||||
PREBUILT=$TOP/$GARCH/proprietary
|
PREBUILT=$GAPPS_TOP/$GARCH/proprietary
|
||||||
test -d $OUT || mkdir $OUT;
|
test -d $OUT || mkdir $OUT;
|
||||||
test -d $OUT/$GARCH || mkdir -p $OUT/$GARCH
|
test -d $OUT/$GARCH || mkdir -p $OUT/$GARCH
|
||||||
test -d $OUT/$GARCH/system || mkdir -p $OUT/$GARCH/system
|
test -d $OUT/$GARCH/system || mkdir -p $OUT/$GARCH/system
|
||||||
echo "Build directories are now ready" >> $GLOG
|
echo "Build directories are now ready" >> $GLOG
|
||||||
echo "Compiling RROs"
|
echo "Compiling RROs"
|
||||||
$TOP/overlay/build_overlays.sh $GARCH $OUT/$GARCH
|
$GAPPS_TOP/overlay/build_overlays.sh $GARCH $OUT/$GARCH
|
||||||
echo "Getting prebuilts..."
|
echo "Getting prebuilts..."
|
||||||
echo "Copying stuff" >> $GLOG
|
echo "Copying stuff" >> $GLOG
|
||||||
cp $TOP/toybox-$GARCH $OUT/$GARCH/toybox >> $GLOG
|
cp $GAPPS_TOP/toybox-$GARCH $OUT/$GARCH/toybox >> $GLOG
|
||||||
cp -r $PREBUILT/* $OUT/$GARCH/system >> $GLOG
|
cp -r $PREBUILT/* $OUT/$GARCH/system >> $GLOG
|
||||||
cp -r $COMMON/* $OUT/$GARCH/system >> $GLOG
|
cp -r $COMMON/* $OUT/$GARCH/system >> $GLOG
|
||||||
echo "Generating addon.d script" >> $GLOG
|
echo "Generating addon.d script" >> $GLOG
|
||||||
@@ -72,10 +77,10 @@ function zipit() {
|
|||||||
cd $OUT/$GARCH
|
cd $OUT/$GARCH
|
||||||
zip -r /tmp/$BUILDZIP . >> $GLOG
|
zip -r /tmp/$BUILDZIP . >> $GLOG
|
||||||
rm -rf $OUT/tmp >> $GLOG
|
rm -rf $OUT/tmp >> $GLOG
|
||||||
cd $TOP
|
cd $GAPPS_TOP
|
||||||
if [ -f /tmp/$BUILDZIP ]; then
|
if [ -f /tmp/$BUILDZIP ]; then
|
||||||
echo "Signing zip..."
|
echo "Signing zip..."
|
||||||
java -Xmx2048m -jar $TOP/build/sign/signapk.jar -w $TOP/build/sign/testkey.x509.pem $TOP/build/sign/testkey.pk8 /tmp/$BUILDZIP $OUT/$BUILDZIP >> $GLOG
|
java -Xmx2048m -jar $SIGNAPK -w $ZIP_KEY_PEM $ZIP_KEY_PK8 /tmp/$BUILDZIP $OUT/$BUILDZIP >> $GLOG
|
||||||
else
|
else
|
||||||
echo "Couldn't zip files!"
|
echo "Couldn't zip files!"
|
||||||
echo "Couldn't find unsigned zip file, aborting" >> $GLOG
|
echo "Couldn't find unsigned zip file, aborting" >> $GLOG
|
||||||
@@ -103,7 +108,7 @@ function getmd5() {
|
|||||||
if [ -x $(which realpath) ]; then
|
if [ -x $(which realpath) ]; then
|
||||||
echo "Realpath found!" >> $GLOG
|
echo "Realpath found!" >> $GLOG
|
||||||
else
|
else
|
||||||
TOP=$(cd . && pwd) # some darwin love
|
GAPPS_TOP=$(cd . && pwd) # some darwin love
|
||||||
echo "No realpath found!" >> $GLOG
|
echo "No realpath found!" >> $GLOG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
BIN
build/sign/apksigner.jar
Normal file
BIN
build/sign/apksigner.jar
Normal file
Binary file not shown.
@@ -1,5 +0,0 @@
|
|||||||
PRODUCT_MAKEFILES := \
|
|
||||||
$(LOCAL_DIR)/lineage_gapps_arm.mk \
|
|
||||||
$(LOCAL_DIR)/lineage_gapps_arm64.mk \
|
|
||||||
$(LOCAL_DIR)/lineage_gapps_x86.mk \
|
|
||||||
$(LOCAL_DIR)/lineage_gapps_x86_64.mk
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
$(call inherit-product, build/target/product/aosp_arm.mk)
|
|
||||||
|
|
||||||
include vendor/lineage/build/target/product/lineage_generic_target.mk
|
|
||||||
|
|
||||||
TARGET_NO_KERNEL_OVERRIDE := true
|
|
||||||
|
|
||||||
PRODUCT_NAME := lineage_gapps_arm
|
|
||||||
|
|
||||||
PRODUCT_SOONG_NAMESPACES += vendor/gapps/overlay
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
$(call inherit-product, build/target/product/aosp_arm64.mk)
|
|
||||||
|
|
||||||
include vendor/lineage/build/target/product/lineage_generic_target.mk
|
|
||||||
|
|
||||||
TARGET_NO_KERNEL_OVERRIDE := true
|
|
||||||
|
|
||||||
PRODUCT_NAME := lineage_gapps_arm64
|
|
||||||
|
|
||||||
PRODUCT_SOONG_NAMESPACES += vendor/gapps/overlay
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
$(call inherit-product, build/target/product/aosp_x86.mk)
|
|
||||||
|
|
||||||
include vendor/lineage/build/target/product/lineage_generic_target.mk
|
|
||||||
|
|
||||||
PRODUCT_SDK_ADDON_NAME :=
|
|
||||||
PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP :=
|
|
||||||
|
|
||||||
TARGET_NO_KERNEL_OVERRIDE := true
|
|
||||||
|
|
||||||
PRODUCT_NAME := lineage_gapps_x86
|
|
||||||
|
|
||||||
PRODUCT_SOONG_NAMESPACES += vendor/gapps/overlay
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
$(call inherit-product, build/target/product/aosp_x86_64.mk)
|
|
||||||
|
|
||||||
include vendor/lineage/build/target/product/lineage_generic_target.mk
|
|
||||||
|
|
||||||
TARGET_NO_KERNEL_OVERRIDE := true
|
|
||||||
|
|
||||||
PRODUCT_SDK_ADDON_NAME :=
|
|
||||||
PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP :=
|
|
||||||
|
|
||||||
PRODUCT_NAME := lineage_gapps_x86_64
|
|
||||||
|
|
||||||
PRODUCT_SOONG_NAMESPACES += vendor/gapps/overlay
|
|
||||||
@@ -7,6 +7,7 @@ PRODUCT_SOONG_NAMESPACES += \
|
|||||||
|
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
vendor/gapps/common/proprietary/product/etc/default-permissions/default-permissions-google.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions-google.xml \
|
vendor/gapps/common/proprietary/product/etc/default-permissions/default-permissions-google.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions-google.xml \
|
||||||
|
vendor/gapps/common/proprietary/product/etc/default-permissions/default-permissions-mtg.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions-mtg.xml \
|
||||||
vendor/gapps/common/proprietary/product/etc/permissions/com.google.android.dialer.support.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/com.google.android.dialer.support.xml \
|
vendor/gapps/common/proprietary/product/etc/permissions/com.google.android.dialer.support.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/com.google.android.dialer.support.xml \
|
||||||
vendor/gapps/common/proprietary/product/etc/permissions/privapp-permissions-google-product.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-google-product.xml \
|
vendor/gapps/common/proprietary/product/etc/permissions/privapp-permissions-google-product.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-google-product.xml \
|
||||||
vendor/gapps/common/proprietary/product/etc/security/fsverity/gms_fsverity_cert.der:$(TARGET_COPY_OUT_PRODUCT)/etc/security/fsverity/gms_fsverity_cert.der \
|
vendor/gapps/common/proprietary/product/etc/security/fsverity/gms_fsverity_cert.der:$(TARGET_COPY_OUT_PRODUCT)/etc/security/fsverity/gms_fsverity_cert.der \
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
|
||||||
|
<exceptions>
|
||||||
|
<exception
|
||||||
|
package="com.google.android.projection.gearhead"
|
||||||
|
sha256-cert-digest="FD:B0:0C:43:DB:DE:8B:51:CB:31:2A:A8:1D:3B:5F:A1:77:13:AD:B9:4B:28:F5:98:D7:7F:8E:B8:9D:AC:EE:DF">
|
||||||
|
<!-- Gearhead legacy -->
|
||||||
|
<permission name="android.permission.READ_PHONE_STATE" fixed="false" />
|
||||||
|
<permission name="android.permission.CALL_PHONE" fixed="false" />
|
||||||
|
<permission name="android.permission.READ_CALL_LOG" fixed="false" />
|
||||||
|
<permission name="android.permission.READ_CONTACTS" fixed="false" />
|
||||||
|
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false" />
|
||||||
|
<permission name="android.permission.RECEIVE_SMS" fixed="false" />
|
||||||
|
<permission name="android.permission.SEND_SMS" fixed="false" />
|
||||||
|
<permission name="android.permission.RECORD_AUDIO" fixed="false" />
|
||||||
|
<permission name="android.permission.READ_CALENDAR" fixed="false" />
|
||||||
|
<!-- For Top Gear -->
|
||||||
|
<permission name="android.permission.PROCESS_OUTGOING_CALLS" fixed="false" />
|
||||||
|
<permission name="android.permission.READ_SMS" fixed="false" />
|
||||||
|
<permission name="android.permission.RECEIVE_MMS" fixed="false" />
|
||||||
|
<permission name="android.permission.WRITE_CALL_LOG" fixed="false" />
|
||||||
|
<permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false" />
|
||||||
|
</exception>
|
||||||
|
</exceptions>
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
soong_namespace {
|
|
||||||
}
|
|
||||||
23
overlay/GmsOverlay/apktool.yml
Normal file
23
overlay/GmsOverlay/apktool.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
!!brut.androlib.apk.ApkInfo
|
||||||
|
apkFileName: GmsOverlay.apk
|
||||||
|
doNotCompress:
|
||||||
|
- resources.arsc
|
||||||
|
isFrameworkApk: false
|
||||||
|
packageInfo:
|
||||||
|
forcedPackageId: '127'
|
||||||
|
renameManifestPackage: null
|
||||||
|
resourcesAreCompressed: false
|
||||||
|
sdkInfo:
|
||||||
|
minSdkVersion: '32'
|
||||||
|
targetSdkVersion: '32'
|
||||||
|
sharedLibrary: false
|
||||||
|
sparseResources: true
|
||||||
|
unknownFiles: {}
|
||||||
|
usesFramework:
|
||||||
|
ids:
|
||||||
|
- 1
|
||||||
|
tag: null
|
||||||
|
version: 2.8.1
|
||||||
|
versionInfo:
|
||||||
|
versionCode: '1'
|
||||||
|
versionName: '1.0'
|
||||||
23
overlay/GmsSettingsProviderOverlay/apktool.yml
Normal file
23
overlay/GmsSettingsProviderOverlay/apktool.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
!!brut.androlib.apk.ApkInfo
|
||||||
|
apkFileName: GmsSettingsProviderOverlay.apk
|
||||||
|
doNotCompress:
|
||||||
|
- resources.arsc
|
||||||
|
isFrameworkApk: false
|
||||||
|
packageInfo:
|
||||||
|
forcedPackageId: '127'
|
||||||
|
renameManifestPackage: null
|
||||||
|
resourcesAreCompressed: false
|
||||||
|
sdkInfo:
|
||||||
|
minSdkVersion: '32'
|
||||||
|
targetSdkVersion: '32'
|
||||||
|
sharedLibrary: false
|
||||||
|
sparseResources: true
|
||||||
|
unknownFiles: {}
|
||||||
|
usesFramework:
|
||||||
|
ids:
|
||||||
|
- 1
|
||||||
|
tag: null
|
||||||
|
version: 2.8.1
|
||||||
|
versionInfo:
|
||||||
|
versionCode: '1'
|
||||||
|
versionName: '1.0'
|
||||||
@@ -5,24 +5,26 @@ set -e
|
|||||||
GARCH=$1
|
GARCH=$1
|
||||||
GOUT=$2
|
GOUT=$2
|
||||||
|
|
||||||
|
APKTOOL=$GAPPS_TOP/build/apktool/apktool_2.8.1.jar
|
||||||
|
APKSIGNER=$GAPPS_TOP/build/sign/apksigner.jar
|
||||||
|
|
||||||
|
APK_KEY_PK8=$GAPPS_TOP/build/sign/testkey.pk8
|
||||||
|
APK_KEY_PEM=$GAPPS_TOP/build/sign/testkey.x509.pem
|
||||||
|
|
||||||
SCRIPT_DIR=$(dirname "$0")
|
SCRIPT_DIR=$(dirname "$0")
|
||||||
cd "$SCRIPT_DIR"
|
cd "$SCRIPT_DIR"
|
||||||
|
|
||||||
OVERLAYS=$(for dir in $(ls -d */); do echo ${dir%%/}; done)
|
OVERLAYS=$(for dir in $(ls -d */); do echo ${dir%%/}; done)
|
||||||
|
|
||||||
croot 2>/dev/null || cd ../../../
|
for OVERLAY in $OVERLAYS; do
|
||||||
|
PARTITION=$(grep -Eo "\w+_specific: true" $OVERLAY/Android.bp | sed "s/_specific.*$//")
|
||||||
source build/envsetup.sh
|
OVERLAY_TARGET_DIR="$GOUT/system/$PARTITION/overlay/"
|
||||||
breakfast gapps_$GARCH
|
OVERLAY_TARGET="$OVERLAY_TARGET_DIR/$OVERLAY.apk"
|
||||||
m installclean
|
test -d $OVERLAY_TARGET_DIR || mkdir -p $OVERLAY_TARGET_DIR
|
||||||
mkdir -p $OUT # $OUT may not exist yet, but we need to start creating the log file now
|
java -Xmx2048m -jar $APKTOOL b $OVERLAY --use-aapt2 >> $GLOG 2>&1
|
||||||
m $OVERLAYS | tee $OUT/.log
|
zip -j $OVERLAY_TARGET -n .arsc \
|
||||||
|
$OVERLAY/build/apk/resources.arsc \
|
||||||
RELOUT=$(echo $OUT | sed "s#^${ANDROID_BUILD_TOP}/##")
|
$OVERLAY/build/apk/AndroidManifest.xml >> $GLOG 2>&1
|
||||||
LOC="$(cat $OUT/.log | sed -r -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' -e 's/^\[ {0,2}[0-9]{1,3}% [0-9]{1,6}\/[0-9]{1,6}\] +//' \
|
java -Xmx2048m -jar $APKSIGNER sign --key $APK_KEY_PK8 --cert $APK_KEY_PEM $OVERLAY_TARGET
|
||||||
| grep '^Install: ' | grep "$RELOUT" | cut -d ':' -f 2)"
|
rm $OVERLAY_TARGET.idsig
|
||||||
FILES=$(echo $LOC | tr " " "\n" | sed "s#.*${RELOUT}##" | sort | uniq)
|
|
||||||
|
|
||||||
for TARGET in $FILES; do
|
|
||||||
mkdir -p $(dirname $GOUT/$TARGET) && cp $OUT/$TARGET $GOUT/$TARGET
|
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
-product/framework/com.google.android.dialer.support.jar;PRESIGNED
|
-product/framework/com.google.android.dialer.support.jar;PRESIGNED
|
||||||
|
|
||||||
product/etc/default-permissions/default-permissions-google.xml
|
product/etc/default-permissions/default-permissions-google.xml
|
||||||
|
product/etc/default-permissions/default-permissions-mtg.xml|b0e11fec4c6d134e205a856733bc89d95f2f24c9
|
||||||
|
|
||||||
product/etc/permissions/com.google.android.dialer.support.xml
|
product/etc/permissions/com.google.android.dialer.support.xml
|
||||||
product/etc/permissions/privapp-permissions-google-product.xml
|
product/etc/permissions/privapp-permissions-google-product.xml
|
||||||
|
|||||||
Reference in New Issue
Block a user