From 1bf1031c2e56b5f53dfee4ed50305665574dbcaf Mon Sep 17 00:00:00 2001 From: Tesla <43712252+0x11DFE@users.noreply.github.com> Date: Sun, 13 Mar 2022 17:13:35 +0100 Subject: [PATCH] service fix and device_prefs --- changelog.md | 6 + common/adaptive_audio.sh | 5 - common/addon/Utils/install.sh | 8 + common/device_personalization.sh | 1 + common/gboard.sh | 13 +- common/google_dialer.sh | 13 +- common/nga_resources.sh | 1 + common/pixel_wallpapers.sh | 1 + common/unlimited_gphoto.sh | 2 +- customize.sh | 8 +- device_prefs/boolean/adaptive_charging.ini | 5 + device_prefs/boolean/gboard.ini | 103 ++++++++ device_prefs/boolean/google_dialer.ini | 77 ++++++ device_prefs/integer/gboard.ini | 11 + device_prefs/string/gboard.ini | 15 ++ device_prefs/string/google_dialer.ini | 9 + module.prop | 4 +- service.sh | 283 ++++++++++++++------- update.json | 6 +- 19 files changed, 441 insertions(+), 130 deletions(-) create mode 100644 device_prefs/boolean/adaptive_charging.ini create mode 100644 device_prefs/boolean/gboard.ini create mode 100644 device_prefs/boolean/google_dialer.ini create mode 100644 device_prefs/integer/gboard.ini create mode 100644 device_prefs/string/gboard.ini create mode 100644 device_prefs/string/google_dialer.ini diff --git a/changelog.md b/changelog.md index 9892647..ef726d3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +**2022-03-13 (22031300)** +- Made a device_prefs directory where all the device preferences are stored and used by both the service and installer. +- Fixed a bug where [busybox](https://github.com/topjohnwu/Magisk/issues/5540#issuecomment-1059940824) could not read from a string (creating temp file instead). Which resulted in a fix of the [service.sh](https://github.com/Pixel-Props/pixel.features/blob/main/system/product/etc/sysconfig/service.sh) script. +- The installer now backs up Utils to the root MODPATH as it is used by the service. +- If does not have package the package is removed from the module. + **2022-03-03 (22030300)** - Fixed [insert_gms_features()](https://github.com/Pixel-Props/pixel.features/blob/main/addon/SQLite3/install.sh) where variables were not defined which caused the service to not install flags properly. - Added more flags to the [service.sh](https://github.com/Pixel-Props/pixel.features/blob/main/system/product/etc/sysconfig/service.sh) diff --git a/common/adaptive_audio.sh b/common/adaptive_audio.sh index 1122519..3ac8721 100644 --- a/common/adaptive_audio.sh +++ b/common/adaptive_audio.sh @@ -1,6 +1,5 @@ #!/system/bin/sh -packageName="com.google.android.platform.device_personalization_services" download_size "$MusicDetector_download" file_size if [ -f "$MusicDetector_location" ] && @@ -15,10 +14,6 @@ if [ -f "$MusicDetector_location" ] && tar -xf "$MusicDetector_location" -C "$MODPATH/system/product/etc/" rm "$MusicDetector_location" - # Adding flags - ui_print ' [+] Adding flags...' - insert_gms_features "FlagOverrides" $packageName 0 null 1 null null 1 "Echo__enable_headphones_suggestions_from_agsa" "Echo__smartspace_enable_doorbell" "Echo__smartspace_enable_earthquake_alert_predictor" "Echo__smartspace_enable_echo_settings" "Echo__smartspace_enable_light_predictor" "Echo__smartspace_enable_paired_device_predictor" "Echo__smartspace_enable_safety_check_predictor" "NowPlaying__ambient_music_on_demand_enabled" "NowPlaying__cloud_api_allowed" "NowPlaying__enable_usage_fa" "NowPlaying__favorites_enabled" "NowPlaying__handle_ambient_music_results_with_history" "NowPlaying__youtube_export_enabled" "Overview__enable_lens_r_overview_long_press" "Overview__enable_lens_r_overview_select_mode" "Overview__enable_lens_r_overview_translate_action" - # Done ui_print " [✓] Installed" ui_print '' diff --git a/common/addon/Utils/install.sh b/common/addon/Utils/install.sh index 1a517b0..73c5a26 100644 --- a/common/addon/Utils/install.sh +++ b/common/addon/Utils/install.sh @@ -45,6 +45,14 @@ install_package() { rm -rf "$2" } +grep_prop() { + REGEX="s/^$1=//p" + shift + FILES=$* + [ -z "$FILES" ] && FILES='/system/build.prop' + cat $FILES 2>/dev/null | dos2unix | sed -n "$REGEX" | head -n 1 +} + # Get the download size of a website using wget download_size() { [ "$1" ] && url=$1 || url="https://example.com" diff --git a/common/device_personalization.sh b/common/device_personalization.sh index c169faf..19745b7 100644 --- a/common/device_personalization.sh +++ b/common/device_personalization.sh @@ -7,6 +7,7 @@ if [ "$API" -ge 31 ]; then if has_package "$packageName"; then ui_print " [?] Android System Intelligence is already installed on this device." ui_print '' + rm -rf "$MODPATH"/system/product/priv-app/DevicePersonalization* else ui_print " [?] Android System Intelligence is not installed on this device." fi diff --git a/common/gboard.sh b/common/gboard.sh index 736b172..9fb8b1c 100644 --- a/common/gboard.sh +++ b/common/gboard.sh @@ -1,17 +1,10 @@ #!/system/bin/sh -packageName="com.google.android.inputmethod.latin#com.google.android.inputmethod.latin" - if selector "Enable Pixel GBoard Features ?" "$useRecommendedSettings" "Enable" "Disable"; then - ui_print ' [+] Adding flags...' - insert_gms_features "FlagOverrides" $packageName 0 null 1 null null 1 "crank_trigger_decoder_inline_completion_first" "crank_trigger_decoder_inline_prediction_first" "enable_core_typing_experience_indicator_on_candidates" "enable_core_typing_experience_indicator_on_composing_text" "enable_email_provider_completion" "enable_floating_keyboard_v2" "enable_inline_suggestions_on_client_side" "enable_inline_suggestions_on_decoder_side" "enable_inline_suggestions_space_tooltip" "enable_inline_suggestions_tooltip_v2" "enable_matched_predictions_as_inline_from_crank_cifg" "enable_multiword_predictions_as_inline_from_crank_cifg" "enable_multiword_predictions_from_user_history" "enable_multiword_suggestions_as_inline_from_crank_cifg" "enable_next_generation_hwr_support" "enable_nga" "enable_single_word_predictions_as_inline_from_crank_cifg" "enable_single_word_suggestions_as_inline_from_crank_cifg" "enable_user_history_predictions_as_inline_from_crank_cifg" "nga_enable_mic_button_when_dictation_eligible" "nga_enable_mic_onboarding_animation" "nga_enable_spoken_emoji_sticky_variant" "nga_enable_sticky_mic" "nga_enable_undo_delete" "silk_on_all_devices" "silk_on_all_pixel" - insert_gms_features "FlagOverrides" $packageName 0 4 null null null 1 "inline_suggestion_experiment_version" - insert_gms_features "FlagOverrides" $packageName 0 1 null null null 1 "user_history_learning_strategies" - - # Done - ui_print " [✓] Installed" + ui_print ' [+] Flags kept...' ui_print '' else - ui_print " [~] Ignoring" + ui_print " [~] Flags removed from module..." ui_print '' + rm -rf "$MODPATH"/device_prefs/*/gboard.ini fi diff --git a/common/google_dialer.sh b/common/google_dialer.sh index 12ab3a1..f241e39 100644 --- a/common/google_dialer.sh +++ b/common/google_dialer.sh @@ -1,17 +1,10 @@ #!/system/bin/sh -packageName="com.google.android.dialer" - if selector "Enable Pixel Google Dialer Features ?" "$useRecommendedSettings" "Enable" "Disable"; then - ui_print ' [+] Adding flags...' - insert_gms_features "FlagOverrides" $packageName 0 null 1 null null 1 "CallLogInformationArchitecture__enable_call_log_information_architecture" "CallRecording__enable_call_recording_for_fi" "G__always_enable_new_call_log_framework_and_fragment" "G__answer_false_touch_detection_enabled" "G__are_embeddings_jobs_enabled" "G__bypass_revelio_roaming_check" "G__call_screen_audio_listener_enabled" "G__config_caller_id_enabled" "G__enable_after_call_spam_blocking_promo" "G__enable_atlas" "G__enable_call_recording" "G__enable_call_screen_audio_stitching" "G__enable_call_screen_data_in_call_log" "G__enable_call_screen_saving_audio" "G__enable_duplicates_promo_v2_ui" "G__enable_embedding_spam_revelio" "G__enable_embedding_spam_revelio" "G__enable_new_voicemail_tab" "G__enable_patronus_spam" "G__enable_pendingcall" "G__enable_phone_number_classification_spam" "G__enable_reject_embedding_spam_calls" "G__enable_revelio" "G__enable_revelio_on_bluetooth" "G__enable_revelio_on_wired_headset" "G__enable_revelio_r_api" "G__enable_rtt_visibility_setting_part2" "G__enable_spam_blocking_promo" "G__enable_speak_easy_is_spam_survey" "G__enable_speakeasy_details" "G__enable_video_share" "G__enable_wifi_calling_icons_all_carriers" "G__force_disable_enriched_call" "G__force_within_call_recording_geofence_value" "G__force_within_crosby_geofence_value" "G__is_call_log_item_anim_null" "G__new_call_log_fragment_enabled" "G__new_voicemail_fragment_enabled" "G__show_call_screen_recording_player_in_call_log" "G__speak_easy_bypass_locale_check" "G__speak_easy_enable_listen_in_button" "G__speak_easy_enabled" "G__speak_easy_use_soda_asr" "G__use_call_recording_geofence_overrides" "G__voicemail_change_greeting_enabled" "G_answer_proximity_sensor_enabled" "G_call_screen_audio_listener_enabled" "Scooby__are_spam_jobs_enabled" "Scooby__enable_same_prefix_logging" "atlas_use_soda_for_transcription" "enable_android_s_notifications" "enable_atlas_on_tidepods_voice_screen" "enable_dialer_hold_handling" "enable_dialpad_v2_ux" "enable_hold_detection" "enable_precall_dialpad_v2" "enable_revelio_transcript" "enable_smart_reply" "enable_stir_shaken_call_log" "enable_theme_pushing" "enable_video_call_landscape" "enable_video_handover_dialog" "enable_voice_autofill" "enable_xatu" "enable_xatu_music_detection" "force_flip_to_silence" "show_atlas_hold_for_me_confirmation_dialog" - insert_gms_features "FlagOverrides" $packageName 0 null 0 null null 1 "G__enable_pride_month_celebration" "G__enable_primes" "G__enable_primes_crash_metric" "G__enable_primes_timer_metric" "G__enable_tidepods_video" "enable_profile_photo_for_on_hold_video_call" - insert_gms_features "FlagOverrides" $packageName 0 null null null "" 1 "CallRecording__call_recording_countries" "CallRecording__call_recording_countries_with_built_in_audio_file" "CallRecording__call_recording_force_enable_built_in_audio_file_countries" "CallRecording__call_recording_force_enable_tts_countries" "CallRecording__crosby_countries" "G__assisted_dialing_csv_country_codes" - - # Done - ui_print " [✓] Installed" + ui_print ' [+] Flags kept...' ui_print '' else - ui_print " [~] Removing from module" + ui_print " [~] Flags removed from module..." ui_print '' + rm -rf "$MODPATH"/device_prefs/*/google_dialer.ini fi diff --git a/common/nga_resources.sh b/common/nga_resources.sh index eec9733..4ba0c97 100644 --- a/common/nga_resources.sh +++ b/common/nga_resources.sh @@ -7,6 +7,7 @@ if [ "$API" -ge 31 ]; then if has_package "$packageName"; then ui_print " [?] NgaResources is already installed on this device." ui_print '' + rm -rf "$MODPATH"/system/product/app/NgaResources* else ui_print " [?] NgaResources is not installed on this device." fi diff --git a/common/pixel_wallpapers.sh b/common/pixel_wallpapers.sh index 258e97a..78f3251 100644 --- a/common/pixel_wallpapers.sh +++ b/common/pixel_wallpapers.sh @@ -7,6 +7,7 @@ if [ "$API" -ge 31 ]; then if has_package "$packageName"; then ui_print " [?] PixelWallpapers2021 is already installed on this device." ui_print '' + rm -rf "$MODPATH"/system/product/app/PixelWallpapers2021* else ui_print " [?] PixelWallpapers2021 is not installed on this device." fi diff --git a/common/unlimited_gphoto.sh b/common/unlimited_gphoto.sh index ce74b86..1f26695 100644 --- a/common/unlimited_gphoto.sh +++ b/common/unlimited_gphoto.sh @@ -2,7 +2,7 @@ ui_print "[?+] Keeping *breaks* Unlimited GPhoto." ui_print "[?-] Removing *removes* some new features." -if selector "keep 2020 and later sysconfigs ?" null "Keep" "Remove"; then +if selector "Keep 2020 and later sysconfigs ?" null "Keep" "Remove"; then ui_print " [+] Keeping 2020 and later pixel experience xml" ui_print '' else diff --git a/customize.sh b/customize.sh index 5ccc89d..a2fc1a9 100644 --- a/customize.sh +++ b/customize.sh @@ -1,10 +1,10 @@ #!/system/bin/sh # Running installer -[ -f "$MODPATH/common/install.sh" ] && . "$MODPATH/common/install.sh" +[ -f "$MODPATH/common/install.sh" ] && . "$MODPATH"/common/install.sh -# Cleanup -[ -d "$MODPATH/common" ] && rm -rf "$MODPATH/common" +# Cleanup common install files +[ -d "$MODPATH/common" ] && rm -rf "$MODPATH"/common/*.sh # Fixing permission chmod 0644 "$MODPATH/system/product/app/*/*.apk" @@ -12,7 +12,7 @@ chmod 0644 "$MODPATH/system/product/app/*/*.apk" # Remove comments from files and place them, add blank line to end if not already present for file in $(find "$MODPATH" -type f -name "*.sh" -o -name "*.prop" -o -name "*.rule"); do [ -f "$file" ] && { - sed -i -e "/#/d" -e "/^ *$/d" "$file" + sed -i -e "/^[[:blank:]]*#/d" -e "/^ *$/d" "$file" [ "$(tail -1 "$file")" ] && echo "" >>"$file" } done diff --git a/device_prefs/boolean/adaptive_charging.ini b/device_prefs/boolean/adaptive_charging.ini new file mode 100644 index 0000000..ec54516 --- /dev/null +++ b/device_prefs/boolean/adaptive_charging.ini @@ -0,0 +1,5 @@ +db_pref_packageName="com.google.android.apps.turbo" +db_pref_path="/data/user/0/com.google.android.gms/databases/phenotype.db" +xml_pref_path="/data/data/com.google.android.apps.turbo/shared_prefs/phenotypeFlags.xml" +AdaptiveCharging__enabled=true +AdaptiveCharging__v1_enabled=true diff --git a/device_prefs/boolean/gboard.ini b/device_prefs/boolean/gboard.ini new file mode 100644 index 0000000..fa58ec3 --- /dev/null +++ b/device_prefs/boolean/gboard.ini @@ -0,0 +1,103 @@ +db_pref_packageName="com.google.android.inputmethod.latin#com.google.android.inputmethod.latin" +db_pref_path="/data/user/0/com.google.android.gms/databases/phenotype.db" +xml_pref_path="/data/data/com.google.android.inputmethod.latin/shared_prefs/flag_value.xml" +material3_theme=true +enable_fetch_lm_v2=true +populate_ngram_count_in_dynamic_lms=true +lm_personalization_enabled=true +normalize_lm_score_for_nearby_key=true +enable_more_candidates_view_for_multilingual=true +enable_crank_for_primary_locale_in_multilingual=true +enable_crank_for_first_supported_locale_in_multilingual=true +enable_shared_multilingual_user_history_lm=true +enable_multilingual_emoji_search=true +enable_multilingual_sequential_decoding=true +crank_trigger_decoder_inline_completion_first=true +crank_trigger_decoder_inline_prediction_first=true +enable_core_typing_experience_indicator_on_candidates=true +enable_core_typing_experience_indicator_on_composing_text=true +enable_email_provider_completion=true +enable_floating_keyboard_v2=true +enable_inline_suggestions_on_client_side=true +enable_inline_suggestions_on_decoder_side=true +enable_inline_suggestions_space_tooltip=true +enable_inline_suggestions_tooltip_v2=true +enable_matched_predictions_as_inline_from_crank_cifg=true +enable_twiddler_multiword_engine=true +enable_multiword_predictions=true +enable_multiword_predictions_as_inline_from_crank_cifg=true +enable_multiword_predictions_from_user_history=true +enable_multiword_suggestions_as_inline_from_crank_cifg=true +enable_multiword_suggestions_from_user_history=true +enable_next_generation_hwr_support=true +enable_nga=true +enable_nga_undo_for_japanese=true +nga_enable_firstrun_flow=true +enable_single_word_predictions_as_inline_from_crank_cifg=true +enable_single_word_suggestions_as_inline_from_crank_cifg=true +enable_user_history_predictions_as_inline_from_crank_cifg=true +nga_enable_mic_button_when_dictation_eligible=true +nga_enable_mic_onboarding_animation=true +nga_enable_spoken_emoji_sticky_variant=true +nga_enable_sticky_mic=true +nga_enable_undo_delete=true +silk_on_all_devices=true +silk_on_all_pixel=true +silk_key_press=true +silk_popup_modal_backdrop=true +silk_theme=true +use_silk_theme_by_default=true +silk_popup=true +enable_lens=true +enable_logging_agsa_search_queries_to_training_cache=true +enable_link_suggestion_in_agsa=true +force_autocorrection_in_agsa=true +enable_nwp_tflite_engine=true +enable_emoji_predictor_tflite_engine=true +enable_tflite_triggering_model=true +tiresias_log_training_context=true +tiresias_enabled=true +tiresias_speech_personalization_enabled=false +tiresias_training_requires_idle=true +tiresias_enable_voice_logging=true +tiresias_lm_personalization_enabled=false +keyboard_redesign_google_sans=true +keyboard_redesign_forbid_key_shadows=true +keyboard_redesign_platform_google_sans=true +translate_new_ui=true +auto_show_translate=true +offline_translate=true +enable_voice_promo=true +enable_voice_in_chinese=true +enable_voice_in_japanese=true +enable_voice_in_korean=true +enable_voice_donation_flow=true +enable_voice_ellipsis=true +enable_voice_clear_button=true +enable_voice_in_handwriting=true +enable_feature_cards=true +log_auto_space=true +pill_shaped_key=true +enable_fast_access_bar=true +fast_access_bar_internal_dialog_enabled=true +fast_access_bar_disable_access_point=true +fast_access_bar_enable_frequently_used=true +fast_access_bar_enable_designated_variant=true +enable_fast_access_bar_auto_add_space=true +fast_access_bar_enable_offboarding_tooltip=true +fast_access_bar_enable_onboarding_tooltip_v2=true +fast_access_bar_enable_variants_popup_view=true +fast_access_bar_disable_settings_button_when_onboarding=true +fast_access_bar_enable_instantly_remove=true +enable_dynamic_trainer=true +enable_trainer_manager_v2=true +enable_preemptive_decode=true +enable_matrializer_manager=true +use_scrollable_candidate_for_voice=true +enable_inline_suggestions_on_client_side=true +enable_training_cache_metrics_processors=true +show_voice_reconversion_suggestion_as_chip=true +enable_show_inline_suggestions_in_popup_view=true +show_suggestions_for_selected_text_while_dictating=true +enable_expression_candidate_precaching_for_bitmoji=true +show_branding_on_space=false diff --git a/device_prefs/boolean/google_dialer.ini b/device_prefs/boolean/google_dialer.ini new file mode 100644 index 0000000..ede4b65 --- /dev/null +++ b/device_prefs/boolean/google_dialer.ini @@ -0,0 +1,77 @@ +db_pref_packageName="com.google.android.dialer" +db_pref_path="/data/user/0/com.google.android.gms/databases/phenotype.db" +xml_pref_path="/data/data/com.google.android.dialer/shared_prefs/dialer_phenotype_flags.xml" +CallLogInformationArchitecture__enable_call_log_information_architecture=true +CallRecording__enable_call_recording_for_fi=true +G__always_enable_new_call_log_framework_and_fragment=true +G__answer_false_touch_detection_enabled=true +G__are_embeddings_jobs_enabled=true +G__bypass_revelio_roaming_check=true +G__call_screen_audio_listener_enabled=true +G__config_caller_id_enabled=true +G__enable_after_call_spam_blocking_promo=true +G__enable_atlas=true +G__enable_call_recording=true +G__enable_call_screen_audio_stitching=true +G__enable_call_screen_data_in_call_log=true +G__enable_call_screen_saving_audio=true +G__enable_duplicates_promo_v2_ui=true +G__enable_embedding_spam_revelio=true +G__enable_embedding_spam_revelio=true +G__enable_new_voicemail_tab=true +G__enable_patronus_spam=true +G__enable_pendingcall=true +G__enable_phone_number_classification_spam=true +G__enable_reject_embedding_spam_calls=true +G__enable_revelio=true +G__enable_revelio_on_bluetooth=true +G__enable_revelio_on_wired_headset=true +G__enable_revelio_r_api=true +G__enable_rtt_visibility_setting_part2=true +G__enable_spam_blocking_promo=true +G__enable_speak_easy_is_spam_survey=true +G__enable_speakeasy_details=true +G__enable_video_share=true +G__enable_wifi_calling_icons_all_carriers=true +G__force_disable_enriched_call=true +G__force_within_call_recording_geofence_value=true +G__force_within_crosby_geofence_value=true +G__is_call_log_item_anim_null=true +G__new_call_log_fragment_enabled=true +G__new_voicemail_fragment_enabled=true +G__show_call_screen_recording_player_in_call_log=true +G__speak_easy_bypass_locale_check=true +G__speak_easy_enable_listen_in_button=true +G__speak_easy_enabled=true +G__speak_easy_use_soda_asr=true +G__use_call_recording_geofence_overrides=true +G__voicemail_change_greeting_enabled=true +G_answer_proximity_sensor_enabled=true +G_call_screen_audio_listener_enabled=true +Scooby__are_spam_jobs_enabled=true +Scooby__enable_same_prefix_logging=true +atlas_use_soda_for_transcription=true +enable_android_s_notifications=true +enable_atlas_on_tidepods_voice_screen=true +enable_dialer_hold_handling=true +enable_dialpad_v2_ux=true +enable_hold_detection=true +enable_precall_dialpad_v2=true +enable_revelio_transcript=true +enable_smart_reply=true +enable_stir_shaken_call_log=true +enable_theme_pushing=true +enable_video_call_landscape=true +enable_video_handover_dialog=true +enable_voice_autofill=true +enable_xatu=true +enable_xatu_music_detection=true +force_flip_to_silence=true +show_atlas_hold_for_me_confirmation_dialog=true +G__enable_pride_month_celebration=false +G__enable_primes=false +G__enable_primes_crash_metric=false +G__enable_primes_timer_metric=false +G__enable_tidepods_video=false +enable_profile_photo_for_on_hold_video_call=false + diff --git a/device_prefs/integer/gboard.ini b/device_prefs/integer/gboard.ini new file mode 100644 index 0000000..fcc7c34 --- /dev/null +++ b/device_prefs/integer/gboard.ini @@ -0,0 +1,11 @@ +db_pref_packageName="com.google.android.inputmethod.latin#com.google.android.inputmethod.latin" +db_pref_path="/data/user/0/com.google.android.gms/databases/phenotype.db" +xml_pref_path="/data/data/com.google.android.inputmethod.latin/shared_prefs/flag_value.xml" +inline_suggestion_experiment_version=1 +user_history_learning_strategies=1 +crank_min_char_num_limit=10 +crank_max_char_num_limit=100 +branding_fadeout_delay_ms=900 +show_branding_interval_seconds=0 +mutex_profiler_inverse_stack_trace_freq=4096 +max_chars_to_read_before_and_after_cursor=1024 diff --git a/device_prefs/string/gboard.ini b/device_prefs/string/gboard.ini new file mode 100644 index 0000000..19e1d7b --- /dev/null +++ b/device_prefs/string/gboard.ini @@ -0,0 +1,15 @@ +db_pref_packageName="com.google.android.inputmethod.latin#com.google.android.inputmethod.latin" +db_pref_path="/data/user/0/com.google.android.gms/databases/phenotype.db" +xml_pref_path="/data/data/com.google.android.inputmethod.latin/shared_prefs/flag_value.xml" +multiword_candidate_language_tags="af,af-ZA,ar,ar-AE,ar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,uk,uk-UA,ur,ur-PK,uz,uz-UZ,uz-UZ,vi,vi-VN,xh,xh-ZA,zh,zh-CN,zh-HK,zh-MO,zh-SG,zh-TW,zu,zu-ZA" +fast_access_bar_app_whitelist="com.whatsapp,com.facebook.orca,com.facebook.katana,com.facebook.lite,com.android.mms,com.google.android.apps.messaging,com.google.android.youtube,com.snapchat.android,com.verizon.messaging.vzmsgs,com.viber.voip,com.google.android.gm,com.discord" +locales_to_enable_multilingual_language_switch="" +enable_magic_g_locales="" diff --git a/device_prefs/string/google_dialer.ini b/device_prefs/string/google_dialer.ini new file mode 100644 index 0000000..513c7d4 --- /dev/null +++ b/device_prefs/string/google_dialer.ini @@ -0,0 +1,9 @@ +db_pref_packageName="com.google.android.dialer" +db_pref_path="/data/user/0/com.google.android.gms/databases/phenotype.db" +xml_pref_path="/data/data/com.google.android.dialer/shared_prefs/dialer_phenotype_flags.xml" +CallRecording__call_recording_countries="af,af-ZA,ar,ar-AE,ar-BH,ar-DZ,ar-EG,ar-IQ,ar-JO,ar-KW,ar-LB,ar-LY,ar-MA,ar-OM,ar-QA,ar-SA,ar-SY,ar-TN,ar-YE,az,az-AZ,az-AZ,be,be-BY,bg,bg-BG,bs-BA,ca,ca-ES,cs,cs-CZ,cy,cy-GB,da,da-DK,de,de-AT,de-CH,de-DE,de-LI,de-LU,dv,dv-MV,el,el-GR,en,en-AU,en-BZ,en-CA,en-CB,en-GB,en-IE,en-JM,en-NZ,en-PH,en-TT,en-US,en-ZA,en-ZW,eo,es,es-AR,es-BO,es-CL,es-CO,es-CR,es-DO,es-EC,es-ES,es-ES,es-GT,es-HN,es-MX,es-NI,es-PA,es-PE,es-PR,es-PY,es-SV,es-UY,es-VE,et,et-EE,eu,eu-ES,fa,fa-IR,fi,fi-FI,fo,fo-FO,fr,fr-BE,fr-CA,fr-CH,fr-FR,fr-LU,fr-MC,gl,gl-ES,gu,gu-IN,he,he-IL,hi,hi-IN,hr,hr-BA,hr-HR,hu,hu-HU,hy,hy-AM,id,id-ID,is,is-IS,it,it-CH,it-IT,ja,ja-JP,ka,ka-GE,kk,kk-KZ,kn,kn-IN,ko,ko-KR,kok,kok-IN,ky,ky-KG,lt,lt-LT,lv,lv-LV,mi,mi-NZ,mk,mk-MK,mn,mn-MN,mr,mr-IN,ms,ms-BN,ms-MY,mt,mt-MT,nb,nb-NO,nl,nl-BE,nl-NL,nn-NO,ns,ns-ZA,pa,pa-IN,pl,pl-PL,ps,ps-AR,pt,pt-BR,pt-PT,qu,qu-BO,qu-EC,qu-PE,ro,ro-RO,ru,ru-RU,sa,sa-IN,se,se-FI,se-FI,se-FI,se-NO,se-NO,se-NO,se-SE,se-SE,se-SE,sk,sk-SK,sl,sl-SI,sq,sq-AL,sr-BA,sr-BA,sr-SP,sr-SP,sv,sv-FI,sv-SE,sw,sw-KE,syr,syr-SY,ta,ta-IN,te,te-IN,th,th-TH,tl,tl-PH,tn,tn-ZA,tr,tr-TR,tt,tt-RU,ts,uk,uk-UA,ur,ur-PK,uz,uz-UZ,uz-UZ,vi,vi-VN,xh,xh-ZA,zh,zh-CN,zh-HK,zh-MO,zh-SG,zh-TW,zu,zu-ZA" +CallRecording__call_recording_countries_with_built_in_audio_file="af,af-ZA,ar,ar-AE,ar-BH,ar-DZ,ar-EG,ar-IQ,ar-JO,ar-KW,ar-LB,ar-LY,ar-MA,ar-OM,ar-QA,ar-SA,ar-SY,ar-TN,ar-YE,az,az-AZ,az-AZ,be,be-BY,bg,bg-BG,bs-BA,ca,ca-ES,cs,cs-CZ,cy,cy-GB,da,da-DK,de,de-AT,de-CH,de-DE,de-LI,de-LU,dv,dv-MV,el,el-GR,en,en-AU,en-BZ,en-CA,en-CB,en-GB,en-IE,en-JM,en-NZ,en-PH,en-TT,en-US,en-ZA,en-ZW,eo,es,es-AR,es-BO,es-CL,es-CO,es-CR,es-DO,es-EC,es-ES,es-ES,es-GT,es-HN,es-MX,es-NI,es-PA,es-PE,es-PR,es-PY,es-SV,es-UY,es-VE,et,et-EE,e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sk,sk-SK,sl,sl-SI,sq,sq-AL,sr-BA,sr-BA,sr-SP,sr-SP,sv,sv-FI,sv-SE,sw,sw-KE,syr,syr-SY,ta,ta-IN,te,te-IN,th,th-TH,tl,tl-PH,tn,tn-ZA,tr,tr-TR,tt,tt-RU,ts,uk,uk-UA,ur,ur-PK,uz,uz-UZ,uz-UZ,vi,vi-VN,xh,xh-ZA,zh,zh-CN,zh-HK,zh-MO,zh-SG,zh-TW,zu,zu-ZA" diff --git a/module.prop b/module.prop index 5e8bdc6..2736b39 100644 --- a/module.prop +++ b/module.prop @@ -1,7 +1,7 @@ id=Pixel_Features name=Pixel Features -version=2022-03-03 -versionCode=22030300 +version=2022-03-13 +versionCode=22031300 author=Tesla description=A mix of files from the Pixel Phones to unlock the full potential of Android updateJson=https://raw.githubusercontent.com/Pixel-Props/pixel.features/main/update.json diff --git a/service.sh b/service.sh index 66c45ba..15aaf88 100644 --- a/service.sh +++ b/service.sh @@ -1,8 +1,32 @@ -#!/system/bin/sh +#!/data/adb/magisk/busybox sh +# shellcheck shell=sh + +## +# Script environment +## + export MODDIR="${0%/*}" +export MODPATH="$MODDIR" +export TMPDIR="$MODDIR"/tmp +export LOGPATH="$MODDIR"/service.log log_service() { - echo "[$(date)] $*" >>"$MODDIR"/service.log + # If the log path is bigger than 5MB, delete the oldest log + if [ -f "$LOGPATH" ] && [ "$(wc -c <"$LOGPATH")" -gt 5000000 ]; then + rm -f "$LOGPATH" + fi + + # Write log to file + echo "[$(date)] $*" >>"$LOGPATH" +} + +ui_print() { + log_service "$*" +} + +abort() { + log_service "$*" + exit 1 } wait_until_boot_complete() { @@ -11,8 +35,7 @@ wait_until_boot_complete() { # CHECK if [ "$loop_count" -gt 10 ]; then log_service "Exceeded the maximum number of retries for loading the service." - log_service "Boot Animation: $(getprop init.svc.bootanim) | Boot Complete: $(getprop sys.boot_completed) | /sdcard: $(if [ -d /sdcard ]; then echo "Exists"; else echo "Does not exist"; fi)" - exit 0 + abort "Boot Animation: $(getprop init.svc.bootanim) | Boot Complete: $(getprop sys.boot_completed) | /sdcard: $(if [ -d /sdcard ]; then echo "Exists"; else echo "Does not exist"; fi)" fi # WAIT @@ -21,12 +44,40 @@ wait_until_boot_complete() { done } +export_IS64BIT() { + abi_prop=$(getprop ro.product.cpu.abi) + IS64BIT=false + + if [ "${abi_prop%64}" != "$abi_prop" ]; then + IS64BIT=true + fi + export IS64BIT +} + +## +# End of Script environment +## + ## -# Begin patching config files ## -set_patch_filepath() { - export PATCH_FILEPATH="$1" +## +# Begin patching device_prefs +## + +export_prop_prefs() { + propPath="$1" + shift + + for propName in "$@"; do + pref_prop="$(grep_prop "$propName" "$propPath")" + + # Remove quotes from the filepath + PREF_FILEPATH="${pref_prop%\"}" + PREF_FILEPATH="${PREF_FILEPATH#\"}" + + export "$propName"="$PREF_FILEPATH" + done } str_replace() { @@ -44,6 +95,11 @@ str_replace() { # Escape the subject subject=$(echo "$subject" | sed -e 's/[]\/$*.^|[]/\\&/g') + # Save subject to a temp file + TMPDIR_FILE="$TMPDIR/$(xxd -l 5 -c 5 -p "$TMPDIR_FILE" + # Loop true subject new lines while read -r line; do # Grep the line from the subject and replace it @@ -57,112 +113,114 @@ str_replace() { # Replace the subject with the replaced subject in the file sed -i "s/$subject/$escaped_replaced_subject/g" "$file" - done <<<"$subject" + done <"$TMPDIR_FILE" + + # Remove the temp file + rm -f "$TMPDIR_FILE" } bool_patch_false() { - str_replace true false "$1" "$PATCH_FILEPATH" + str_replace true false "$1" "$xml_pref_path" } bool_patch() { - str_replace false true "$1" "$PATCH_FILEPATH" + str_replace false true "$1" "$xml_pref_path" } value_patch() { # Replace subject with a parsed version of itself - subject=$(grep "$1" "$PATCH_FILEPATH" | xargs | sed 's/> \n \n"$TMPDIR_FILE" while read -r line; do - #If the string has a closing tag use the value inside it + # If the string has a closing tag use the value inside it if [[ "$line" == *"' -f2 | cut -d'<' -f1)" "$2" "$1" "$PATCH_FILEPATH" + str_replace "$(echo "$line" | cut -d'>' -f2 | cut -d'<' -f1)" "$2" "$1" "$xml_pref_path" else - str_replace "$(echo "$line" | sed -rn 's/.*value="(.*)".*/\1/p')" "$2" "$1" "$PATCH_FILEPATH" + str_replace "$(echo "$line" | sed -rn 's/.*value="(.*)".*/\1/p')" "$2" "$1" "$xml_pref_path" fi - done <<<"$subject" + done <"$TMPDIR_FILE" + + # Remove the temp file + rm -f "$TMPDIR_FILE" } set_prefs() { - iso_lang_code="af,af-ZA,ar,ar-AE,ar-BH,ar-DZ,ar-EG,ar-IQ,ar-JO,ar-KW,ar-LB,ar-LY,ar-MA,ar-OM,ar-QA,ar-SA,ar-SY,ar-TN,ar-YE,az,az-AZ,az-AZ,be,be-BY,bg,bg-BG,bs-BA,ca,ca-ES,cs,cs-CZ,cy,cy-GB,da,da-DK,de,de-AT,de-CH,de-DE,de-LI,de-LU,dv,dv-MV,el,el-GR,en,en-AU,en-BZ,en-CA,en-CB,en-GB,en-IE,en-JM,en-NZ,en-PH,en-TT,en-US,en-ZA,en-ZW,eo,es,es-AR,es-BO,es-CL,es-CO,es-CR,es-DO,es-EC,es-ES,es-ES,es-GT,es-HN,es-MX,es-NI,es-PA,es-PE,es-PR,es-PY,es-SV,es-UY,es-VE,et,et-EE,eu,eu-ES,fa,fa-IR,fi,fi-FI,fo,fo-FO,fr,fr-BE,fr-CA,fr-CH,fr-FR,fr-LU,fr-MC,gl,gl-ES,gu,gu-IN,he,he-IL,hi,hi-IN,hr,hr-BA,hr-HR,hu,hu-HU,hy,hy-AM,id,id-ID,is,is-IS,it,it-CH,it-IT,ja,ja-JP,ka,ka-GE,kk,kk-KZ,kn,kn-IN,ko,ko-KR,kok,kok-IN,ky,ky-KG,lt,lt-LT,lv,lv-LV,mi,mi-NZ,mk,mk-MK,mn,mn-MN,mr,mr-IN,ms,ms-BN,ms-MY,mt,mt-MT,nb,nb-NO,nl,nl-BE,nl-NL,nn-NO,ns,ns-ZA,pa,pa-IN,pl,pl-PL,ps,ps-AR,pt,pt-BR,pt-PT,qu,qu-BO,qu-EC,qu-PE,ro,ro-RO,ru,ru-RU,sa,sa-IN,se,se-FI,se-FI,se-FI,se-NO,se-NO,se-NO,se-SE,se-SE,se-SE,sk,sk-SK,sl,sl-SI,sq,sq-AL,sr-BA,sr-BA,sr-SP,sr-SP,sv,sv-FI,sv-SE,sw,sw-KE,syr,syr-SY,ta,ta-IN,te,te-IN,th,th-TH,tl,tl-PH,tn,tn-ZA,tr,tr-TR,tt,tt-RU,ts,uk,uk-UA,ur,ur-PK,uz,uz-UZ,uz-UZ,vi,vi-VN,xh,xh-ZA,zh,zh-CN,zh-HK,zh-MO,zh-SG,zh-TW,zu,zu-ZA" - - # Turbo - set_patch_filepath "/data/data/com.google.android.apps.turbo/shared_prefs/phenotypeFlags.xml" - bool_patch AdaptiveCharging__enabled - bool_patch AdaptiveCharging__v1_enabled - - # Call Screening - set_patch_filepath "/data/data/com.google.android.dialer/shared_prefs/dialer_phenotype_flags.xml" - bool_patch speak_easy - bool_patch speakeasy - bool_patch call_screen - bool_patch revelio - bool_patch record - bool_patch atlas - - # GBoard - set_patch_filepath "/data/data/com.google.android.inputmethod.latin/shared_prefs/flag_value.xml" - bool_patch lm - bool_patch nga - bool_patch silk - bool_patch lens - bool_patch agsa - bool_patch tflite - bool_patch tiresias - bool_patch redesign - bool_patch floating - bool_patch translate - bool_patch multiword - bool_patch generation - bool_patch voice_promo - bool_patch dynamic_art - bool_patch multilingual - bool_patch enable_voice - bool_patch feature_cards - bool_patch log_auto_space - bool_patch pill_shaped_key - bool_patch personalization - bool_patch fast_access_bar - bool_patch material3_theme - bool_patch translate_new_ui - bool_patch keyboard_redesign - bool_patch offline_translate - bool_patch enable_dynamic_trainer - bool_patch enable_preemptive_decode - bool_patch enable_trainer_manager_v2 - bool_patch enable_matrializer_manager - bool_patch enable_multiword_predictions - bool_patch enable_email_provider_completion - bool_patch use_scrollable_candidate_for_voice - bool_patch enable_inline_suggestions_on_client_side - bool_patch enable_training_cache_metrics_processors - bool_patch enable_inline_suggestions_on_decoder_side - bool_patch show_voice_reconversion_suggestion_as_chip - bool_patch enable_show_inline_suggestions_in_popup_view - bool_patch show_suggestions_for_selected_text_while_dictating - bool_patch enable_core_typing_experience_indicator_on_candidates - bool_patch enable_core_typing_experience_indicator_on_composing_text - bool_patch_false personalization - bool_patch_false show_branding_on_space - value_patch enable_magic_g_locales "" - value_patch crank_min_char_num_limit 5 - value_patch crank_max_char_num_limit 100 - value_patch branding_fadeout_delay_ms 900 - value_patch user_history_learning_strategies 1 - value_patch inline_suggestion_experiment_version 4 - value_patch show_branding_interval_seconds 86400000 - value_patch speech_ondevice_locales "$iso_lang_code" - value_patch mutex_profiler_inverse_stack_trace_freq 4096 - value_patch key_locale_cutout_switches_lm "$iso_lang_code" - value_patch max_chars_to_read_before_and_after_cursor 1024 - value_patch enable_dynamic_art_language_tags "$iso_lang_code" - value_patch multiword_candidate_language_tags "$iso_lang_code" - value_patch crank_inline_suggestion_language_tags "$iso_lang_code" - value_patch enable_expression_moment_language_tags "$iso_lang_code" - value_patch enable_autocorrection_adaptation_locales "$iso_lang_code" + log_service "Setting prefs..." + + for file in "$MODDIR"/device_prefs/*/*.ini; do + # Get folder base name + folder_path=${file%/*} # Remove last / + folder_name=${folder_path##*/} # Remove path before folder name + + if [ -f "$file" ]; then + file_name=${file##*/} + file_name_no_ext=${file_name%.*} + log_service "Patching \"$folder_name\" on \"$file_name_no_ext\"" + + # Export prefs + export_prop_prefs "$file" "db_pref_packageName" "db_pref_path" "xml_pref_path" + + # Create temp file + TMPDIR_FILE="$TMPDIR/$(xxd -l 5 -c 5 -p "$TMPDIR_FILE" + + # Explode the key and value based on the equal sign + IFS='=' read -r key value <"$TMPDIR_FILE" + + # Remove the quotes sign between the value + value=${value#\"} + value=${value%\"} + + log_service "Patching \"$key\" -> \"$value\"" + + # Patch XML values + value_patch "$key" "$value" + + # Switch the type of patch value based on folder name + case "$folder_name" in + "boolean") + insert_gms_features "FlagOverrides" "$db_pref_packageName" 0 null "$value" null null 1 "$key" + ;; + "integer") + insert_gms_features "FlagOverrides" "$db_pref_packageName" 0 "$value" null null null 1 "$key" + ;; + "string") + insert_gms_features "FlagOverrides" "$db_pref_packageName" 0 null null null "$value" 1 "$key" + ;; + *) + ui_print "Unknown folder name: $folder_name" + ;; + esac + + fi + done <"$file" + + # Remove temp file + rm -f "$TMPDIR_FILE" + fi + done } ## -# End patching xml files +# End patching device_prefs +## + +## ## ## @@ -188,11 +246,22 @@ set_flags() { # Set service name dc_set_service "$file_name_no_ext" + # Create temp file + TMPDIR_FILE="$TMPDIR/$(xxd -l 5 -c 5 -p "$TMPDIR_FILE" + + # Explode the key and value based on the equal sign + IFS='=' read -r key value <"$TMPDIR_FILE" dc_put "$key" "$value" - done <<<"$(cat "$file")" + done <"$file" + + # Remove temp file + rm -f "$TMPDIR_FILE" fi done } @@ -201,12 +270,36 @@ set_flags() { # End patching device_config ## -# Starting... +## +## + +## +# Script start +## + log_service "Service started." log_service "MODDIR: $MODDIR" wait_until_boot_complete +export_IS64BIT +mkdir "$TMPDIR" log_service "System fully started. Beginning to patch..." +# Run utils +[ -f "$MODDIR/common/addon/Utils/install.sh" ] && . "$MODDIR/common/addon/Utils/install.sh" + +# Run SQLite3 +[ -f "$MODDIR/common/addon/SQLite3/install.sh" ] && . "$MODDIR/common/addon/SQLite3/install.sh" + # Start patching set_flags set_prefs + +# Clean temp files +rm -rf "$TMPDIR" + +# Finish +log_service "Service finished." + +## +# Script end +## diff --git a/update.json b/update.json index ff3d357..b46e6eb 100644 --- a/update.json +++ b/update.json @@ -1,6 +1,6 @@ { - "version": "2022-02-28", - "versionCode": 22022802, - "zipUrl": "https://github.com/Pixel-Props/pixel.features/releases/download/22022802/Pixel.Features.Online.zip", + "version": "2022-03-10", + "versionCode": 22031000, + "zipUrl": "https://github.com/Pixel-Props/pixel.features/releases/download/22031000/Pixel.Features.Online.zip", "changelog": "https://raw.githubusercontent.com/Pixel-Props/pixel.features/main/changelog.md" }