Skip to content

Commit

Permalink
Add boot scripts; tested on Pixel 7;
Browse files Browse the repository at this point in the history
  • Loading branch information
cxOrz committed Apr 21, 2024
1 parent 3ab6e07 commit b2fc163
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 2 deletions.
33 changes: 33 additions & 0 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/sbin/sh

#################
# Initialization
#################

umask 022

# echo before loading util_functions
ui_print() { echo "$1"; }

require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
ui_print "*******************************"
exit 1
}

#########################
# Load util_functions.sh
#########################

OUTFD=$2
ZIPFILE=$3

mount /data 2>/dev/null

[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk

install_module
exit 0
1 change: 1 addition & 0 deletions META-INF/com/google/android/updater-script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#MAGISK
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,37 @@
# pixel_ims
A magisk module enables VoLTE, VoNR, Wifi Calling for Pixel devices.
# Pixel_IMS_MODULE
A magisk module enables VoLTE, VoNR, Wifi Calling and some enhanced features for Pixel devices.

## How to use
Just install the module through Magisk App then reboot, open SIM Setting and turn on the options you need.

1. Download the latest release [here](https://github.com/cxOrz/pixel_ims_module/releases).
2. Install the zip file using your **Magisk App**.
3. Reboot your device.

## Modify Details
Add some boolean configs in carrier config files, this will have minimal impact on the system.

You can find your carrier config files in the directory: `/data/user_de/0/com.android.phone/files/`.

- `carrier_volte_available_bool`: Flag specifying whether VoLTE should be available for carrier, independent of carrier provisioning.
- `carrier_vt_available_bool`: Flag specifying whether video telephony is available for carrier.
- `carrier_wfc_ims_available_bool`: Flag specifying whether WFC over IMS should be available for carrier: independent of carrier provisioning.
- `carrier_wfc_supports_wifi_only_bool`: Flag specifying whether WFC over IMS supports the "wifi only" option.
- `editable_enhanced_4g_lte_bool`: Determine whether user can toggle Enhanced 4G LTE Mode in Settings.
- `editable_wfc_mode_bool`: Determine whether user can switch Wi-Fi preferred or Cellular preferred in calling preference.
- `editable_wfc_roaming_mode_bool`: Determine whether user can change Wi-Fi Calling preference in roaming.
- `hide_lte_plus_data_icon_bool`: Boolean indicating if LTE+ icon should be shown if available.
- `show_4g_for_lte_data_icon_bool`: Boolean indicating if default data account should show LTE or 4G icon.
- `vonr_enabled_bool`: Flag specifying whether VoNR should be enabled for carrier.
- `vonr_setting_visibility_bool`: Boolean indicating if the VoNR setting is visible in the Call Settings menu.

## Availability

**Tested on:**
- Pixel 7

**Works on(theoretically):**
- Pixel 6 / 6a / 6Pro
- Pixel 7 / 7a / 7Pro
- Pixel 8 / 8Pro
- Pixel Fold
5 changes: 5 additions & 0 deletions module.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id=pixel_ims_module
name=Pixel IMS Module
version=0.1
author=cxOrz
description=Enable VoLTE, VoNR, Wifi Calling and some enhanced features for Pixel devices.
27 changes: 27 additions & 0 deletions service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
file_path="/data/user_de/0/com.android.phone/files/"
insert_string=\
"<!--PIXEL_IMS_MODULE_START-->\n"\
"<boolean name=\"enhanced_4g_lte_on_by_default_bool\" value=\"true\" />\n"\
"<boolean name=\"carrier_volte_available_bool\" value=\"true\" />\n"\
"<boolean name=\"vendor_hide_volte_settng_ui\" value=\"false\" />\n"\
"<boolean name=\"hide_lte_plus_data_icon_bool\" value=\"false\" />\n"\
"<boolean name=\"vonr_enabled_bool\" value=\"true\" />\n"\
"<boolean name=\"vonr_setting_visibility_bool\" value=\"true\" />\n"\
"<boolean name=\"show_4g_for_lte_data_icon_bool\" value=\"true\" />\n"\
"<!--PIXEL_IMS_MODULE_END-->"

find $file_path -maxdepth 1 -type f -name "carrierconfig-com.google.android.carrier*.xml" ! -name "*nosim*" | while read -r file; do
if grep -q '</bundle>' "$file"; then
if grep -q 'PIXEL_IMS_MODULE' "$file"; then
echo "Config already inserted, skip now."
else
sed -i "/<\/bundle>/i $insert_string" "$file"
echo "Inserted test string into $file."
fi
else
echo "No </bundle> tag found in $file. Skipping."
fi
done


echo "Procedure complete."
Empty file added skip_mount
Empty file.
9 changes: 9 additions & 0 deletions uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
file_path="/data/user_de/0/com.android.phone/files/"
find $file_path -maxdepth 1 -type f -name "carrierconfig-com.google.android.carrier*.xml" ! -name "*nosim*" | while read -r file; do
if grep -q '</bundle>' "$file"; then
sed -i '/<!--PIXEL_IMS_MODULE_START-->/,/<!--PIXEL_IMS_MODULE_END-->/d' "$file"
echo "Deleted config items in $file"
else
echo "No </bundle> tag found in $file. Skipping."
fi
done

0 comments on commit b2fc163

Please sign in to comment.