15.06 Update:

- x86 files (kindly given by @balika011) > 1cfeda8a9dbe1a328259edb42f48f0e4ea716072
- Update compilation script

Signed-off-by: jrizzoli <joey@cyanogenmoditalia.it>
This commit is contained in:
jrizzoli
2015-06-02 15:24:07 +02:00
parent f509e98dcb
commit ff04312900
79 changed files with 192 additions and 177 deletions

View File

@@ -2,34 +2,6 @@
**GApps for android devices** **GApps for android devices**
Information
------------------
These are Google Apps for who want to install Google Packages on a custom rom.
Remember Apks and Jars files are prebuilt from Google.
All closed source files come from Nexuses' factory images.
This contains just the core files needed to setup a fully working Google account,
users will choose wich apps they want on their devices.
GApps contain a "quite old" universal Play Service, so the Play Store will download the proper one
for your device asap.
These GApps get monthly updates, fell free to fork and contribute to this, but remember,
**Opensource does not mean out-of-respect**. Also **NO MIRRORS ALLOWED**
Downloads
------------------
https://github.com/linuxxxxx/vendor_google/releases
Links
------------------
[Google +](https://google.com/+CgappsGithubIo0)
[Community](https://plus.google.com/u/0/b/104503298104020811639/communities/114625799842477562713)
[Website](cgapps.github.io)
Build Build
------------------- -------------------
@@ -38,11 +10,11 @@ You can compile your GApps package with GNU make
_make distclean_ _make distclean_
- Remove output directory - Remove output directory
_make gapps_ _make arm_
- compile signed flashable GApps for arm - compile signed flashable GApps for arm
_make gapps_arm64_ _make arm64_
- compile signed flashable GApps for arm64 - compile signed flashable GApps for arm64
_make gapps_x86_ _make x86_
- compila signed flashable GApps for x86 (NOT supported atm) - compile signed flashable GApps for x86 (NOT supported atm)

28
build/arch/arch.sh Normal file
View File

@@ -0,0 +1,28 @@
#!/sbin/sh
ARCH=$(grep ro.product.cpu.abi= /system/build.prop | cut -d "=" -f 2)
CGAPPS=/tmp/cgapps
GARM=$CGAPPS/arm
GARM64=$CGAPPS/arm64
GX86=$CGAPPS/x86
if [ $ARCH == armeabi-v7a ]; then # arm
cp -r $GARM/app/FaceLock /system/app/FaceLock
cp -r $GARM/priv-app/PrebuiltGmsCore /system/priv-app/PrebuiltGmsCore
cp -r $GARM/priv-app/Velvet /system/priv-app/Velvet
cp -r $GARM/lib /system/lib
elif [ $ARCH == arm64-v8a ]; then # arm64
cp -r $GARM64/app/FaceLock /system/app/FaceLock
cp -r $GARM64/priv-app/PrebuiltGmsCore /system/priv-app/PrebuiltGmsCore
cp -r $GARM64/priv-app/Velvet /system/priv-app/Velvet
if [ $(grep ro.product.device= /system/build.prop | cut -d "=" -f 2) == "flounder" ]; then
cp -r $GARM64/priv-app/HotWord /system/priv-app/HotWord
fi
cp -r $GARM64/lib /system/lib
cp -r $GARM64/lib64 /system/lib64
cp -r $GARM64/addon.d /system/addon.d
elif [ $ARCH == x86 ]; then # x86
cp -r $X86/priv-app/PrebuiltGmsCore /system/priv-app/PrebuiltGmsCore
cp -r $x86/priv-app/Velvet /system/priv-app/Velvet
else # flashing on microwave
echo "Couldn't get info, empty system??"
fi

View File

@@ -5,12 +5,13 @@
## ##
# var # var
# #
DATE=$(date +%F-%H-%M-%S) DATE=$(date +%F-%H-%M)
TOP=$(realpath .) TOP=$(realpath .)
ANDROIDV=5.1 ANDROIDV=5.1
OUT=$TOP/out OUT=$TOP/out
BUILD=$TOP/build BUILD=$TOP/build
METAINF=$BUILD/meta METAINF=$BUILD/meta
COMMON=$TOP/prebuilt/gapps/common
## ##
# functions # functions
@@ -26,33 +27,31 @@ function printdone(){
function create(){ function create(){
PREBUILT=$TOP/prebuilt/gapps/$GARCH PREBUILT=$TOP/prebuilt/gapps/$GARCH
if [ -d $OUT/$GARCH ]; then if [ -d $OUT/$GARCH ]; then
echo "Previous build found for $GARCH" echo "Previous build found for $GARCH!"
else else
echo "No previous build found for $GARCH" echo "No previous build found for $GARCH!"
mkdir $OUT mkdir $OUT
TARGET=$OUT/$GARCH mkdir $OUT/$GARCH
mkdir $TARGET
mkdir $TARGET/tmp
fi fi
echo "Getting prebuilts..." echo "Getting prebuilts..."
cp -r $PREBUILT $TARGET/gapps cp -r $PREBUILT $OUT/$GARCH
return $? mv $OUT/$GARCH/$GARCH $OUT/$GARCH/arch
cp -r $COMMON $OUT/$GARCH
} }
function zipit(){ function zipit(){
if [ "$LASTRETURN" == 0 ]; then if [ "$LASTRETURN" == 0 ]; then
BUILDZIP=gapps-$ANDROIDV-$GARCH-$DATE.zip BUILDZIP=gapps-$ANDROIDV-$DATE.zip
echo "Importing installation scripts..." echo "Importing installation scripts..."
cp -r $TARGET/gapps $TARGET/tmp/system cp -r $METAINF $OUT/$GARCH/META-INF
cp -r $METAINF $TARGET/tmp/META-INF
echo "Creating package..." echo "Creating package..."
cd $TARGET/tmp cd $OUT/$GARCH
zip -r /tmp/$BUILDZIP . &>/dev/null zip -r /tmp/$BUILDZIP . &>/dev/null
rm -rf $TARGET/tmp rm -rf $OUT/tmp
cd $TOP cd $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 java -Xmx2048m -jar $TOP/build/sign/signapk.jar -w $TOP/build/sign/testkey.x509.pem $TOP/build/sign/testkey.pk8 /tmp/$BUILDZIP $OUT/$GARCH/$BUILDZIP
else else
printerr "Couldn't zip files!" printerr "Couldn't zip files!"
return 1 return 1
@@ -77,7 +76,7 @@ LASTRETURN=$?
zipit zipit
LASTRETURN=$? LASTRETURN=$?
if [ "$LASTRETURN" == 0 ]; then if [ "$LASTRETURN" == 0 ]; then
printdone "Build completed: $OUT/$BUILDZIP" printdone "Build completed: $OUT/$GARCH/$BUILDZIP"
exit 0 exit 0
else else
printerr "Build failed, check /tmp/gapps_log" printerr "Build failed, check /tmp/gapps_log"

View File

@@ -9,14 +9,14 @@ distclean :
@rm -fr $(OUTDIR) @rm -fr $(OUTDIR)
@echo "$(tput setaf 2)Output removed! Ready for a clean build$(tput sgr 0)" @echo "$(tput setaf 2)Output removed! Ready for a clean build$(tput sgr 0)"
gapps : arm :
@echo "Compiling GApps for arm..." @echo "Compiling GApps for arm..."
@bash $(BUILD_GAPPS) arm 2>&1 | tee $(LOG_BUILD) @bash $(BUILD_GAPPS) arm 2>&1 | tee $(LOG_BUILD)
gapps_arm64 : arm64 :
@echo "Compiling GApps for arm64..." @echo "Compiling GApps for arm64..."
@bash $(BUILD_GAPPS) arm64 2>&1 | tee $(LOG_BUILD) @bash $(BUILD_GAPPS) arm64 2>&1 | tee $(LOG_BUILD)
gapps_x86 : x86 :
@echo "Compiling GApps for arm64..." @echo "Compiling GApps for x86..."
@bash $(BUILD_GAPPS) x86 2>&1 | tee $(LOG_BUILD) @bash $(BUILD_GAPPS) x86 2>&1 | tee $(LOG_BUILD)

View File

@@ -1,11 +1,12 @@
ui_print("Installing GApps..."); ui_print("Installing GApps...");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "mount", "/system"); run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15); show_progress(1, 15);
package_extract_dir("system", "/system"); package_extract_dir("arch", "/system");
set_perm(0, 0, 0755, "/system/addon.d/30-gapps.sh"); package_extract_dir("common", "/system");
package_extract_file("system/faceunlock.sh", "/tmp/faceunlock.sh"); set_perm(0, 0, 0777, "/system/gapps_scripts.sh");
set_perm(0, 0, 0777, "/tmp/faceunlock.sh"); run_program("/systen/gapps_scripts.sh", "");
run_program("/tmp/faceunlock.sh", ""); delete("/system/gapps_scripts");
show_progress(1, 15); show_progress(1, 15);
set_metadata_recursive("/system/addon.d", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0"); set_metadata_recursive("/system/addon.d", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0"); set_metadata_recursive("/system/app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");

View File

@@ -12,6 +12,7 @@ list_files() {
cat <<EOF cat <<EOF
app/FaceLock/FaceLock.apk app/FaceLock/FaceLock.apk
app/FaceLock/lib/arm/libfacelock_jni.so app/FaceLock/lib/arm/libfacelock_jni.so
lib/libfacelock_jni.so
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/landmark_group_meta_data.bin vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/landmark_group_meta_data.bin
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-tree7-wmd.bin vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-tree7-wmd.bin
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32-tree7-wmd.bin vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32-tree7-wmd.bin

View File

@@ -1 +0,0 @@
/system/lib/libfacelock_jni.so

View File

@@ -29,6 +29,7 @@ priv-app/GoogleLoginService/GoogleLoginService.apk
priv-app/GoogleOneTimeInitializer/GoogleOneTimeInitializer.apk priv-app/GoogleOneTimeInitializer/GoogleOneTimeInitializer.apk
priv-app/GooglePartnerSetup/GooglePartnerSetup.apk priv-app/GooglePartnerSetup/GooglePartnerSetup.apk
priv-app/GoogleServicesFramework/GoogleServicesFramework.apk priv-app/GoogleServicesFramework/GoogleServicesFramework.apk
priv-app/Hotword/Hotword.apk
priv-app/Phonesky/Phonesky.apk priv-app/Phonesky/Phonesky.apk
priv-app/PrebuiltGmsCore/PreBuiltGmsCore.apk priv-app/PrebuiltGmsCore/PreBuiltGmsCore.apk
priv-app/PrebuiltGmsCore/lib/arm/libAppDataSearch.so priv-app/PrebuiltGmsCore/lib/arm/libAppDataSearch.so

View File

@@ -12,6 +12,7 @@ list_files() {
cat <<EOF cat <<EOF
app/FaceLock/FaceLock.apk app/FaceLock/FaceLock.apk
app/FaceLock/lib/arm/libfacelock_jni.so app/FaceLock/lib/arm/libfacelock_jni.so
lib/libfacelock_jni.so
lib64/libfacelock_jni.so lib64/libfacelock_jni.so
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/landmark_group_meta_data.bin vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/landmark_group_meta_data.bin
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-tree7-wmd.bin vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-tree7-wmd.bin

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 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.
-->
<permissions>
<library name="com.google.android.camera2"
file="/system/framework/com.google.android.camera2.jar" />
</permissions>

View File

@@ -1,4 +0,0 @@
<permissions>
<library name="com.google.android.dialer.support"
file="/system/framework/com.google.android.dialer.support.jar" />
</permissions>

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2008 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.
-->
<permissions>
<library name="com.google.android.maps"
file="/system/framework/com.google.android.maps.jar" />
</permissions>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->
<permissions>
<library name="com.google.android.media.effects"
file="/system/framework/com.google.android.media.effects.jar" />
</permissions>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2011 Google, Inc. All Rights Reserved
-->
<permissions>
<library name="com.google.widevine.software.drm"
file="/system/framework/com.google.widevine.software.drm.jar"/>
</permissions>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 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.
-->
<!-- This is the standard set of features for an auto-focus camera. -->
<permissions>
<feature name="com.google.android.feature.GOOGLE_BUILD" />
<!-- This should be added to all Nexus and GPe devices -->
<feature name="com.google.android.feature.GOOGLE_EXPERIENCE" />
</permissions>

View File

@@ -1,24 +0,0 @@
#!/sbin/sh
good_ffc_device() {
if cat /proc/cpuinfo |grep -q Victory; then
return 1
fi
if cat /proc/cpuinfo |grep -q herring; then
return 1
fi
if cat /proc/cpuinfo |grep -q sun4i; then
return 1
fi
return 0
}
if good_ffc_device && [ -e /system/etc/permissions/android.hardware.camera.front.xml ]; then
chmod 755 /system/addon.d/31-faceunlock.sh
elif [ -d /system/vendor/pittpatt/ ]; then
rm -rf /system/vendor/pittpatt/
rm -f /system/app/FaceLock.apk
rm -f /system/lib/libfacelock_jni.so
rm -f /system/addon.d/31-faceunlock.sh
fi
rm -rf /tmp/face

Binary file not shown.

View File

@@ -13,6 +13,10 @@ good_ffc_device() {
return 0 return 0
} }
chmod 755 /system/addon.d/30-gapps.sh
if [ -f "/system/addon.d/faceunlock.sh" ]; then
chmod 755 /system/addon.d/31-faceunlock.sh
fi
if good_ffc_device && [ -e /system/etc/permissions/android.hardware.camera.front.xml ]; then if good_ffc_device && [ -e /system/etc/permissions/android.hardware.camera.front.xml ]; then
chmod 755 /system/addon.d/31-faceunlock.sh chmod 755 /system/addon.d/31-faceunlock.sh
elif [ -d /system/vendor/pittpatt/ ]; then elif [ -d /system/vendor/pittpatt/ ]; then

View File

@@ -0,0 +1,76 @@
#!/sbin/sh
#
# /system/addon.d/70-gapps.sh
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
addon.d/30-gapps.sh
app/GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk
app/GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk
etc/permissions/com.google.android.camera2.xml
etc/permissions/com.google.android.maps.xml
etc/permissions/com.google.android.media.effects.xml
etc/permissions/com.google.widevine.software.drm.xml
etc/permissions/features.xml
framework/com.google.camera2.jar
framework/com.google.android.maps.jar
framework/com.google.android.media.effects.jar
framework/com.google.widevine.software.drm.jar
lib/libfilterpack_facedetect.so
lib/libgoogle_hotword_jni.so
lib/libgoogle_recognizer_jni_l.so
lib/libjni_latinimegoogle.so
priv-app/GoogleBackupTransport/GoogleBackupTransport.apk
priv-app/GoogleFeedback/GoogleFeedback.apk
priv-app/GoogleLoginService/GoogleLoginService.apk
priv-app/GoogleOneTimeInitializer/GoogleOneTimeInitializer.apk
priv-app/GooglePartnerSetup/GooglePartnerSetup.apk
priv-app/GoogleServicesFramework/GoogleServicesFramework.apk
priv-app/Phonesky/Phonesky.apk
priv-app/PrebuiltGmsCore/PreBuiltGmsCore.apk
priv-app/PrebuiltGmsCore/lib/x86/libAppDataSearch.so
priv-app/PrebuiltGmsCore/lib/x86/libconscrypt_gmscore_jni.so
priv-app/PrebuiltGmsCore/lib/x86/libgames_rtmp_jni.so
priv-app/PrebuiltGmsCore/lib/x86/libgcastv2_base.so
priv-app/PrebuiltGmsCore/lib/x86/libgcastv2_support.so
priv-app/PrebuiltGmsCore/lib/x86/libgmscore.so
priv-app/PrebuiltGmsCore/lib/x86/libgms-ocrclient.so
priv-app/PrebuiltGmsCore/lib/x86/libjgcastservice.so
priv-app/PrebuiltGmsCore/lib/x86/libsslwrapper_jni.so
priv-app/PrebuiltGmsCore/lib/x86/libWhisper.so
priv-app/SetupWizardSetupWizard.apk app/Provision/Provision.apk
priv-app/Velvet/Velvet.apk app/QuickSearchBox/QuickSearchBox.apk
priv-app/Velvet/lib/x86/libgoogle_hotword_jni.so
priv-app/Velvet/lib/x86/libgoogle_recognizer_jni_l.so
priv-app/Velvet/lib/x86/libvcdecoder_jni.so
EOF
}
case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/$FILE
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/$FILE $R
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac

View File

@@ -0,0 +1,53 @@
#!/sbin/sh
#
# /system/addon.d/71-gapps-faceunlock.sh
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
app/FaceLock/FaceLock.apk
app/FaceLock/lib/arm/libfacelock_jni.so
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/landmark_group_meta_data.bin
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-tree7-wmd.bin
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32-tree7-wmd.bin
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.8/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-3-tree7-wmd.bin
vendor/pittpatt/models/detection/yaw_roll_face_detectors.7.1/head-y0-yi45-p0-pi45-r0-ri30.4a-v24-tree7-2-wmd.bin
vendor/pittpatt/models/detection/yaw_roll_face_detectors.7.1/head-y0-yi45-p0-pi45-rn30-ri30.5-v24-tree7-2-wmd.bin
vendor/pittpatt/models/detection/yaw_roll_face_detectors.7.1/head-y0-yi45-p0-pi45-rp30-ri30.5-v24-tree7-2-wmd.bin
vendor/pittpatt/models/detection/yaw_roll_face_detectors.7.1/pose-r.8.1.bin
vendor/pittpatt/models/detection/yaw_roll_face_detectors.7.1/pose-y-r.8.1.bin
vendor/pittpatt/models/recognition/face.face.y0-y0-71-N-tree_7-wmd.bin
EOF
}
case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/$FILE
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/$FILE $R
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac

View File

@@ -1 +0,0 @@
x86 gapps will come in future

Binary file not shown.