dankoman30 / slim_gapps Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Sorry I cannot create a pull request as my branch has way too many changes and it will be impractical for you to incorporate it.
I've a new build.xml which is way clean and don't require to put anything in gapps.sh or updater-script.
Please find it below. Try and test it at your convenience.
This file list is used by ant to build the Slim Gapps project
<!--=======================================================================-->
<!-- some variables -->
<!--=======================================================================-->
<property name="app.name" value="buildGapps"/>
<property name="app.dir" value="${basedir}"/>
<property name="work.dir" value="${app.dir}/work"/>
<property name="build.dir" value="${app.dir}/build"/>
<property name="structure.dir" value="${app.dir}/structure"/>
<property name="sign.jar" value="${app.dir}/tools/signapk.jar"/>
<property name="sign.pem" value="${app.dir}/tools/testkey.x509.pem"/>
<property name="sign.pk8" value="${app.dir}/tools/testkey.pk8"/>
<property name="extra.dir" value="${app.dir}/extras"/>
<tstamp>
<format property="build.today" pattern="yyyyMMdd"/>
</tstamp>
<!--=======================================================================-->
<!-- complete build -->
<!--=======================================================================-->
<target name="buildAll"
depends="cleanupBefore,initit,generateCleanUpList,buildZero,buildMini,buildNormal,buildFull,cleanupAfter"
description="execute complete build"/>
<!--=======================================================================-->
<!-- zero -->
<!--=======================================================================-->
<target name="buildZero"
description="execute zero gapps build">
<!-- preparations -->
<property environment="env"/>
<property name="file.name.zero"
value="${build.dir}/Slim_zero_gapps.BETA.${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}.${PRODUCT_VERSION_MAINTENANCE}-${build.today}.zip"/>
<delete dir="${work.dir}"/>
<!-- copy files -->
<copy todir="${work.dir}">
<fileset dir="${structure.dir}">
<include name="META-INF/**"/>
<include name="system/app/ConfigUpdater/**"/>
<include name="system/app/ExchangeServices/**"/>
<include name="system/app/GoogleCalendarSyncAdapter/**"/>
<include name="system/app/GoogleContactsSyncAdapter/**"/>
<include name="system/etc/**"/>
<include name="system/framework/**"/>
<include name="system/lib/**"/>
<include name="system/priv-app/GoogleBackupTransport/**"/>
<include name="system/priv-app/GoogleFeedback/**"/>
<include name="system/priv-app/GoogleLoginService/**"/>
<include name="system/priv-app/GoogleOneTimeInitializer/**"/>
<include name="system/priv-app/GooglePartnerSetup/**"/>
<include name="system/priv-app/GoogleServicesFramework/**"/>
<include name="system/priv-app/Phonesky/**"/>
<include name="system/priv-app/PrebuiltGmsCore/**"/>
<include name="system/priv-app/SetupWizard/**"/>
<include name="optional/**"/>
<exclude name="optional/face/**"/>
</fileset>
</copy>
<antcall target="createUpdaterScript-zero"/>
<antcall target="copyAddonsAndGenerateBackup"/>
<!-- zip and sign it -->
<antcall target="ZipAndSigning">
<param name="hfile.name" value="${file.name.zero}"/>
</antcall>
</target>
<!--=======================================================================-->
<!-- mini -->
<!--=======================================================================-->
<target name="buildMini"
description="execute mini gapps build">
<!-- preparations -->
<property environment="env"/>
<property name="file.name.mini"
value="${build.dir}/Slim_mini_gapps.BETA.${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}.${PRODUCT_VERSION_MAINTENANCE}-${build.today}.zip"/>
<delete dir="${work.dir}"/>
<!-- copy files -->
<copy todir="${work.dir}">
<fileset dir="${structure.dir}">
<exclude name="system/app/Books/**"/>
<exclude name="system/app/CalendarGoogle/**"/>
<exclude name="system/app/CameraGoogle/**"/>
<exclude name="system/app/Chrome/**"/>
<exclude name="system/app/CloudPrint/**"/>
<exclude name="system/app/Docs/**"/>
<exclude name="system/app/Drive/**"/>
<exclude name="system/app/Games/**"/>
<exclude name="system/app/GenieWidget/**"/>
<exclude name="system/app/GoogleHome/**"/>
<exclude name="system/app/GoogleTTS/**"/>
<exclude name="system/app/Keep/**"/>
<exclude name="system/app/Keyboard/**"/>
<exclude name="system/app/Maps/**"/>
<exclude name="system/app/Messenger/**"/>
<exclude name="system/app/Movies/**"/>
<exclude name="system/app/Newsstand/**"/>
<exclude name="system/app/Sheets/**"/>
<exclude name="system/app/Slides/**"/>
<exclude name="system/app/Street/**"/>
<exclude name="system/app/Translate/**"/>
<exclude name="system/app/Wallet/**"/>
<exclude name="system/tts/**"/>
<exclude name="system/usr/**"/>
<exclude name="optional/face/**"/>
</fileset>
</copy>
<antcall target="createUpdaterScript"/>
<antcall target="copyAddonsAndGenerateBackup"/>
<antcall target="ZipAndSigning">
<param name="hfile.name" value="${file.name.mini}"/>
</antcall>
</target>
<!--=======================================================================-->
<!-- normal -->
<!--=======================================================================-->
<target name="buildNormal"
description="execute normal gapps build">
<!-- preparations -->
<property environment="env"/>
<property name="file.name.normal"
value="${build.dir}/Slim_normal_gapps.BETA.${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}.${PRODUCT_VERSION_MAINTENANCE}-${build.today}.zip"/>
<delete dir="${work.dir}"/>
<!-- copy files -->
<copy todir="${work.dir}">
<fileset dir="${structure.dir}">
<exclude name="system/app/Books/**"/>
<exclude name="system/app/Docs/**"/>
<exclude name="system/app/Games/**"/>
<exclude name="system/app/Movies/**"/>
<exclude name="system/app/Newsstand/**"/>
<exclude name="system/app/Sheets/**"/>
<exclude name="system/app/Slides/**"/>
</fileset>
</copy>
<antcall target="createUpdaterScript"/>
<antcall target="copyAddonsAndGenerateBackup"/>
<antcall target="ZipAndSigning">
<param name="hfile.name" value="${file.name.normal}"/>
</antcall>
</target>
<!--=======================================================================-->
<!-- full -->
<!--=======================================================================-->
<target name="buildFull"
description="execute full gapps build">
<!-- preparations -->
<property environment="env"/>
<property name="file.name.full"
value="${build.dir}/Slim_full_gapps.BETA.${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}.${PRODUCT_VERSION_MAINTENANCE}-${build.today}.zip"/>
<delete dir="${work.dir}"/>
<!-- copy files -->
<copy todir="${work.dir}">
<fileset dir="${structure.dir}"/>
</copy>
<antcall target="createUpdaterScript"/>
<antcall target="copyAddonsAndGenerateBackup"/>
<antcall target="ZipAndSigning">
<param name="hfile.name" value="${file.name.full}"/>
</antcall>
</target>
<!--======================================================================-->
<!-- Copy addon and generate gapps backup from work dir file -->
<!--======================================================================-->
<target name="copyAddonsAndGenerateBackup">
<!-- generate backup script -->
<copy todir="${work.dir}/system/addon.d" >
<fileset dir="${extra.dir}">
<include name="*.sh"/>
</fileset>
</copy>
<path id="item.file">
<fileset dir="${work.dir}/system">
<exclude name="**/*.sh"/>
</fileset>
<fileset dir="${work.dir}/optional/" erroronmissingdir="false">
<exclude name="**/*.sh"/>
</fileset>
</path>
<pathconvert refid="item.file" property="file.list.backup" pathsep=" " dirsep="/">
<map from="${work.dir}/system/" to=""/>
<map from="${work.dir}/optional/common/" to=""/>
<map from="${work.dir}/optional/face/" to=""/>
<map from="${work.dir}/optional/hammerhead/" to=""/>
<map from="${work.dir}/optional/manta/" to=""/>
<map from="${work.dir}/optional/shamu/" to=""/>
<map from="${work.dir}/optional/tuna/" to=""/>
</pathconvert>
<replaceregexp match="@file.list@" replace="${file.list.backup}" flags="i" byline="true">
<fileset dir="${work.dir}/system/addon.d">
<include name="**/*-gapps.sh"/>
</fileset>
</replaceregexp>
</target>
<!--======================================================================-->
<!-- Create updater script - removing #zero -->
<!--======================================================================-->
<target name="createUpdaterScript-zero">
<copy file="${extra.dir}/updater-script" todir="${work.dir}/META-INF/com/google/android">
<filterchain>
<replaceregex pattern="@package@" replace="zero" flags="i"/>
<replaceregex pattern="@cleanup.list@" replace="${cleanup.list}" flags="i"/>
<linecontains negate="true">
<contains value="#zero"/>
</linecontains>
</filterchain>
</copy>
</target>
<!--======================================================================-->
<!-- Create updater script - with #zero -->
<!--======================================================================-->
<target name="createUpdaterScript">
<copy file="${extra.dir}/updater-script" todir="${work.dir}/META-INF/com/google/android">
<filterchain>
<replaceregex pattern="@package@" replace="zero" flags="i"/>
<replaceregex pattern="@cleanup.list@" replace="${cleanup.list}" flags="i"/>
</filterchain>
</copy>
</target>
<!--=======================================================================-->
<!-- generate clean up list -->
<!--=======================================================================-->
<target name="generateCleanUpList">
<path id="cleanup.file">
<fileset dir="${extra.dir}">
<include name="*.sh"/>
</fileset>
<fileset dir="${structure.dir}/system"/>
<fileset dir="${structure.dir}/optional/"/>
</path>
<pathconvert refid="cleanup.file" property="cleanup.list" pathsep="", "" dirsep="/">
<map from="${extra.dir}" to="/system/addon.d"/>
<map from="${structure.dir}/system/" to="/system/"/>
<map from="${structure.dir}/optional/common/" to="/system/"/>
<map from="${structure.dir}/optional/face/" to="/system/"/>
<map from="${structure.dir}/optional/hammerhead/" to="/system/"/>
<map from="${structure.dir}/optional/manta/" to="/system/"/>
<map from="${structure.dir}/optional/shamu/" to="/system/"/>
<map from="${structure.dir}/optional/tuna/" to="/system/"/>
</pathconvert>
</target>
<!--=======================================================================-->
<!-- zip and sign it -->
<!--=======================================================================-->
<target name="ZipAndSigning">
<zip destfile="${build.dir}/unsigned.zip" basedir="${work.dir}"/>
<echo message="Signing gapps"/>
<java dir="${build.dir}" fork="true" failonerror="true" maxmemory="1536m" jar="${sign.jar}">
<arg value="-w"/>
<arg value="${sign.pem}"/>
<arg value="${sign.pk8}"/>
<arg value="${build.dir}/unsigned.zip"/>
<arg value="${hfile.name}"/>
</java>
</target>
<!--=======================================================================-->
<!-- cleanupBefore new build -->
<!--=======================================================================-->
<target name="cleanupBefore"
description="delete old directories">
<delete dir="${build.dir}"/>
<delete dir="${work.dir}"/>
</target>
<!--=======================================================================-->
<!-- cleanupAfter build is done -->
<!--=======================================================================-->
<target name="cleanupAfter"
description="delete unnecessary build files">
<echo message="Cleaning up"/>
<delete file="${build.dir}/unsigned.zip"/>
<delete file="${build.dir}/gapps.filenames"/>
</target>
<!--=======================================================================-->
<!-- initiating build -->
<!--=======================================================================-->
<target name="initit"
description="initiating-steps">
<mkdir dir="${build.dir}"/>
<mkdir dir="${work.dir}"/>
</target>
whether it is possible to flash the gapps through CWM recovery?
The Nexus 6 supports a feature "Require pattern to start device". In other non-functioning gapps packages, this scales correctly. However, in this package, the entire unlock pattern view scales down to about half an inch. This results in me having to carefully guide my pinkie blindly, feeling for vibrations as I go.
I'm using CyanogenMod 12.1, which supports and provides views for alternative unlock sizes and am comfortable building with different heads. I am however clueless as to how to diagnose how components integrate with CyanogenMod. I'd blame CyanogenMod for this issue, but it seems to work in other gapps packages(though they invariably result in a boot loop on "Android is upgrading" after flash). Any clue as to where to begin diagnostics to provide better problem descriptions is welcome.
assert(getprop("ro.build.version.sdk") == "21" || abort("This package is for version: 5.0.x"););
the above line works for twrp or recovery build version and not the rom version. For instance, on oneplusone the twrp is still using sdk 19 so it will fail installation even though the rom is lollipop.
Please revert that line of code.
I think need to create the package to remove all GAPPS or at least post a link to it.
In my view it should look something like this
updater-script
run_program("/sbin/busybox", "mount", "/system");
ui_print("Deleting files from the previous package...");
run_program("/system/addon.d/80-gapps.sh", "remove");
package_extract_file("gapps-remove", "/tmp/gapps-remove");
set_perm(0, 0, 0777, "/tmp/gapps-remove");
package_extract_file("delete-files.sh", "/tmp/delete-files.sh");
set_perm(0, 0, 0777, "/tmp/delete-files.sh");
ui_print("Remove 'other' apps");
run_program("/tmp/delete-files.sh", "");
show_progress(1, 15);
delete("/system/addon.d/82-full_gapps.sh","/system/addon.d/81-normal_gapps.sh","/system/addon.d/80-gapps.sh");
run_program("/sbin/busybox", "umount", "/system");
delete-files.sh
gapps_removal_list=/tmp/gapps-remove
if [ -e /sdcard/.full ]; then
while read file_name; do
rm -f /system/$file_name;
done < ${gapps_removal_list}
fi
gapps-remove
app/Books.apk
app/CalendarGoogle.apk
app/Chrome.apk
app/ChromeBookmarksSyncAdapter.apk
app/CloudPrint2.apk
app/Drive.apk
app/EmailGoogle.apk
app/Exchange2Google.apk
app/FaceLock.apk
app/GalleryGoogle.apk
app/GenieWidget.apk
app/Gmail2.apk
app/GoogleCalendarSyncAdapter.apk
app/GoogleCamera.apk
app/GoogleContactsSyncAdapter.apk
app/GoogleEars.apk
app/GoogleEarth.apk
app/GoogleHome.apk
app/GoogleTTS.apk
app/Hangouts.apk
app/Keep.apk
app/LatinImeGoogle.apk
app/Magazines.apk
app/Maps.apk
app/Music2.apk
app/PlayGames.apk
app/PlusOne.apk
app/QuickOffice.apk
app/Street.apk
app/SunBeam.apk
app/Videos.apk
app/YouTube.apk
etc/permissions/com.google.android.ble.xml
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
etc/preferred-apps/google.xml
framework/com.google.android.ble.jar
framework/com.google.android.camera2.jar
framework/com.google.android.maps.jar
framework/com.google.android.media.effects.jar
framework/com.google.widevine.software.drm.jar
lib/libAppDataSearch.so
lib/libbitmap_parcel.so
lib/libchrome.2214.89.so
lib/libchromium_android_linker.so
lib/libconscrypt_gmscore_jni.so
lib/libcrashreporter.so
lib/libcrashreporterer.so
lib/libcronet.so
lib/libdocscanner_image.so
lib/libdocsimageutils.so
lib/libearthmobile.so
lib/libfacelock_jni.so
lib/libfilterframework_jni.so
lib/libfilterpack_facedetect.so
lib/libfoxit.so
lib/libframesequence.so
lib/libgames_rtmp_jni.so
lib/libgcam.so
lib/libgcam_swig_jni.so
lib/libgcastv2_base.so
lib/libgcastv2_support.so
lib/libgmm-jni.so
lib/libgmscore.so
lib/libgms-ocrclient.so
lib/libgoogle_hotword_jni.so
lib/libgoogle_recognizer_jni_l.so
lib/libgoogle-ocrclient.so
lib/libjgcastservice.so
lib/libjni_eglfence.so
lib/libjni_filtershow_filters.so
lib/libjni_jpegutil.so
lib/libjni_latinime.so
lib/libjni_tinyplanet.so
lib/libjni_unbundled_latinimegoogle.so
lib/libjpeg.so
lib/liblightcycle.so
lib/libm2ts_player.so
lib/libmoviemaker-jni.so
lib/libnativehelper_compat_libc++.so
lib/libpatts_engine_jni_api_ub.210303130.so
lib/libphotoeditor_native.so
lib/librectifier.so
lib/librefocus.so
lib/librs.layered_filter_f32.so
lib/librs.layered_filter_fast_f32.so
lib/librsjni.so
lib/libRSSupport.so
lib/libspeexwrapper_ub.210303130.so
lib/libsslwrapper_jni.so
lib/libvcdecoder_jni.so
lib/libvideochat_jni.so
lib/libvorbisencoder.so
lib/libwebp_android.so
lib/libWhisper.so
lib/libWVphoneAPI.so
priv-app/CalendarProvider.apk
priv-app/GoogleBackupTransport.apk
priv-app/GoogleFeedback.apk
priv-app/GoogleLoginService.apk
priv-app/GoogleOneTimeInitializer.apk
priv-app/GooglePartnerSetup.apk
priv-app/GoogleServicesFramework.apk
priv-app/Phonesky.apk
priv-app/PrebuiltGmsCore.apk
priv-app/SetupWizard.apk
priv-app/talkback.apk
priv-app/Velvet.apk
priv-app/Wallet.apk
usr/srec/en-US/c_fst
usr/srec/en-US/clg
usr/srec/en-US/commands.abnf
usr/srec/en-US/compile_grammar.config
usr/srec/en-US/contacts.abnf
usr/srec/en-US/dict
usr/srec/en-US/dictation.config
usr/srec/en-US/dnn
usr/srec/en-US/endpointer_dictation.config
usr/srec/en-US/endpointer_voicesearch.config
usr/srec/en-US/ep_acoustic_model
usr/srec/en-US/g2p_fst
usr/srec/en-US/grammar.config
usr/srec/en-US/hclg_shotword
usr/srec/en-US/hmm_symbols
usr/srec/en-US/hmmlist
usr/srec/en-US/hotword.config
usr/srec/en-US/hotword_classifier
usr/srec/en-US/hotword_normalizer
usr/srec/en-US/hotword_prompt.txt
usr/srec/en-US/hotword_word_symbols
usr/srec/en-US/metadata
usr/srec/en-US/norm_fst
usr/srec/en-US/normalizer
usr/srec/en-US/offensive_word_normalizer
usr/srec/en-US/phone_state_map
usr/srec/en-US/phonelist
usr/srec/en-US/rescoring_lm
usr/srec/en-US/wordlist
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/left_eye-y0-yi45-p0-pi45-r0-ri20.lg_32.bin
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/nose_base-y0-yi45-p0-pi45-r0-ri20.lg_32.bin
vendor/pittpatt/models/detection/multi_pose_face_landmark_detectors.7/right_eye-y0-yi45-p0-pi45-r0-ri20.lg_32-2.bin
vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-r0-ri30.4a-v24.bin
vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rn30-ri30.5-v24.bin
vendor/pittpatt/models/detection/yaw_roll_face_detectors.6/head-y0-yi45-p0-pi45-rp30-ri30.5-v24.bin
vendor/pittpatt/models/recognition/face.face.y0-y0-22-b-N.bin
80-gapps.sh
case "$1" in
...
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
remove)
code for removal
;;
esac
Hi! How build gapps?
Currently, the updater script is having all libraries and apps from optional folder.
You can incorporate the following generateCleanUpList task and remove them from the updater-script.
< property name="extra.dir" value="${app.dir}/extras" />
<!-- generate clean up list -->
<!--=======================================================================-->
<target name="generateCleanUpList">
<path id="cleanup.file">
<fileset dir="${extra.dir}">
<include name="*.sh"/>
</fileset>
<fileset dir="${structure.dir}/system"/>
<fileset dir="${structure.dir}/optional/"/>
</path>
<pathconvert refid="cleanup.file" property="cleanup.list" pathsep="", "" dirsep="/">
<map from="${extra.dir}" to="/system/addon.d"/>
<map from="${structure.dir}/system/" to="/system/"/>
<map from="${structure.dir}/optional/common/" to="/system/"/>
<map from="${structure.dir}/optional/face/" to="/system/"/>
<map from="${structure.dir}/optional/hammerhead/" to="/system/"/>
<map from="${structure.dir}/optional/manta/" to="/system/"/>
<map from="${structure.dir}/optional/shamu/" to="/system/"/>
<map from="${structure.dir}/optional/tuna/" to="/system/"/>
</pathconvert>
</target>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.