diff --git a/README.en.md b/README.en.md index ddb6f32..550db4a 100644 --- a/README.en.md +++ b/README.en.md @@ -1,5 +1,8 @@ # Pixel IMS: Enable VoLTE on Tensor Pixel devices +## **Notice:** Changes may not persist across reboot on devices with Android 16 QPR2 Beta 3 or newer +Due to security measures applied on Android on behalf of Google, you may have to reapply the patch across every reboot. Check FAQ section at the very bottom for more. + ## Troubleshooting Refer [here](https://github.com/kyujin-cho/pixel-volte-patch/blob/main/docs/troubleshooting.en.md). @@ -110,7 +113,8 @@ For more information, you can make use of Pixel's internal application. To open ### Do I have to do this every time I reboot the phone? -No. +- Devices running **Android 16 QPR2 Beta 3** or newer: [Yes](https://github.com/kyujin-cho/pixel-volte-patch/issues/398). +- Others: No. ### Do I have to do this after updating my Pixel? diff --git a/README.md b/README.md index 86dd72a..6463079 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ # Pixel IMS: Tensor Pixel VoLTE 활성화 + English version available [here](https://github.com/kyujin-cho/pixel-volte-patch/blob/main/README.en.md). +## 주의: Android 16 QPR2 Beta 3 이상의 버전을 사용 중인 경우 +구글 보안 패치의 도입으로 인해 Android 16 QPR2 Beta 3 이상의 버전에서는 해당 애플리케이션을 이용한 패치가 재부팅 시 초기화 될 수 있습니다. 자세한 사항은 아래의 "자주 묻는 질문" 을 참고하세요. + ## 트러블슈팅 [이곳](https://github.com/kyujin-cho/pixel-volte-patch/blob/main/docs/troubleshooting.md)을 참조하세요. @@ -108,7 +112,8 @@ English version available [here](https://github.com/kyujin-cho/pixel-volte-patch ### 해당 패치는 재부팅 시마다 다시 실행하여야 하나요? -아니오. +- 장치가 Android 16 QPR2 Beta 3 이상의 소프트웨어 버전에서 작동할 경우: [네](https://github.com/kyujin-cho/pixel-volte-patch/issues/398). +- 그렇지 않을 경우: 아니오. ### 해당 패치는 시스템 업데이트 시마다 다시 실행하여야 하나요? diff --git a/app/src/main/java/dev/bluehouse/enablevolte/BrokerInstrumentation.kt b/app/src/main/java/dev/bluehouse/enablevolte/BrokerInstrumentation.kt index 870c1aa..d0e62a2 100644 --- a/app/src/main/java/dev/bluehouse/enablevolte/BrokerInstrumentation.kt +++ b/app/src/main/java/dev/bluehouse/enablevolte/BrokerInstrumentation.kt @@ -26,7 +26,15 @@ class BrokerInstrumentation : Instrumentation() { val configurationManager = this.context.getSystemService(CarrierConfigManager::class.java) val overrideValues = toPersistableBundle(arguments) - configurationManager.overrideConfig(subId, overrideValues, true) + try { + configurationManager.overrideConfig(subId, overrideValues, true) + } catch (e: SecurityException) { + if (e.message?.contains("overrideConfig with persistent=true only can be invoked by system app") == true) { + configurationManager.overrideConfig(subId, overrideValues, false) + } else { + throw e + } + } } finally { Log.i(TAG, "applyConfig done") am.stopDelegateShellPermissionIdentity() @@ -41,7 +49,15 @@ class BrokerInstrumentation : Instrumentation() { try { val configurationManager = this.context.getSystemService(CarrierConfigManager::class.java) - configurationManager.overrideConfig(subId, null, true) + try { + configurationManager.overrideConfig(subId, null, true) + } catch (e: SecurityException) { + if (e.message?.contains("overrideConfig with persistent=true only can be invoked by system app") == true) { + configurationManager.overrideConfig(subId, null, false) + } else { + throw e + } + } } finally { Log.i(TAG, "clearConfig done") am.stopDelegateShellPermissionIdentity()