Commit Graph

25 Commits

Author SHA1 Message Date
SGCMarkus 501943ad18
carriersettings-extractor: ignore threshold arrays with size > 4
These cause com.android.phone to crash:
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.android.phone, PID: 4429
E AndroidRuntime: java.lang.IllegalArgumentException: thresholds length must between 1 and 4
E AndroidRuntime: 	at android.telephony.SignalThresholdInfo$Builder.setThresholds(SignalThresholdInfo.java:422)

Change-Id: I1a2721063bc7dae0d3415a59883a5470518c47a1
2023-10-24 03:57:24 +03:00
Michael Bestas d54e25ff89 carriersettings-extractor: Ignore motorola specific configs
Change-Id: Ib44ccb252c4e0e2743bf6d9b926f536daff19f6b
2023-08-30 22:34:29 +00:00
Michael Bestas bd4009682a
carriersettings-extractor: Make APNs extract optional
Change-Id: Ic7701d660146a400b5e7ee4ee41a940f6d56c455
2023-06-17 12:55:22 +03:00
Michael Bestas 1e832cc204
pixel: CarrierSettings extract integration changes
Change-Id: I1af213801e0bb911e0656f5eea304ea49a1203b0
2023-06-17 12:54:51 +03:00
Michael Bestas b9d3003904 carriersettings: Only include gps elements in vendor_no_sim.xml
Change-Id: Ia40c7f2b69ddfbb8e7f2fce6993ff6471c4ee6ff
2023-05-24 15:49:11 +00:00
Michael Bestas 37e06f1e94 carriersettings: Generate vendor_no_sim.xml
Change-Id: I87513a6ab8387f55ff7892dcee6f71ad945fec73
2023-05-24 15:49:11 +00:00
Chirayu Desai 8554363a9a carriersettings: Write mcc=0 mnc=0 config as just carrier_config
Change-Id: Ie4325c03c3406cb5c056188c3044f870c9190088
2023-05-24 15:49:11 +00:00
Michael Bestas fe56597ae0 carriersettings-extractor: Add missing name element in pbundle_as_map
Change-Id: I7346b5cca0fde6fc1957649fe7f463eaffac8c5e
2022-10-11 14:51:28 -04:00
Chirayu Desai c0fc4d0d1e carriersettings-extractor: Sync tag name
* If you look at the CarrierConfigV2 converter, it reads
  'pbundle_as_map' and not 'bundle' - which isn't handled at all
* All others match parseCarrierConfigToMap

Ref: 2093949: Add support for "double" and "bundle" in pb generating script | https://android-review.googlesource.com/c/platform/tools/carrier_settings/+/2093949
TODO: Figure out how to run the converter as a test somehow
Change-Id: I2197766590625e9f4cd12d30a65204a2ec750515
2022-10-11 14:51:28 -04:00
Chirayu Desai 9f42b84e55 carriersettings-extractor: Handle failure gracefully
* Google forgot to add ice_no.pb to Pixel 6 October release

Change-Id: Ie7bad259b9bc818a87279bec836d83107dee93f3
2022-10-11 13:40:50 -04:00
Michael Bestas 030d36eed3
carriersettings-extractor: Update README
Change-Id: Ia341eb2a61a75d7dbd54a90225078ed05a79b0fe
2022-10-11 17:35:25 +03:00
Michael Bestas f9e44898fd
carriersettings-extractor: Workaround for skip_464xlat field extraction
TelephonyProvider expects an int, not a string.
One would think bypassing the enum_type check and using the numbers
directly would be enough, but google stores the values in protobuf
different than what TelephonyProvider expects (0,1,2 vs -1,0,1).

References:
https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/refs/tags/android-13.0.0_r3/src/com/android/providers/telephony/TelephonyProvider.java#2473
https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-13.0.0_r3/core/java/android/provider/Telephony.java#3399
https://android.googlesource.com/platform/tools/carrier_settings/+/refs/tags/android-13.0.0_r3/proto/carrier_settings.proto#138
https://android.googlesource.com/platform/tools/carrier_settings/+/refs/tags/android-13.0.0_r3/python/update_apn.py#169

Change-Id: I920f8b9cd2638f40f90e22638b8cb67e11b898a8
2022-08-25 03:40:13 +03:00
Michael Bestas 570dc1db81
carriersettings-extractor: Update for 13
Import proto files from
tools/carrier_settings 1edea9efa652f3022f1804061f4aebca58ca47ff

Change-Id: I496c11e9a631c6709a15a4e64b354683019150fc
2022-08-19 15:20:58 +03:00
Michael Bestas 3381f74e7f
carriersettings-extractor: Move element extraction to separate function
Prepare for bundle support.

Change-Id: I2f9fe500beee1130b95e526ebd4a84d6fd3f4766
2022-08-19 15:20:54 +03:00
Chirayu Desai dc0e2a3ea7 carriersettings-extractor: Read CarrierSettings protobufs in stages
* Trying to load them all at once resulted in a game of chicken due
  to 'telenor_se' existing in both generic 'others.pb', and it's own
  'telenor_se.pb'
* We tried to work around that in multiple ways, and that did work,
  but let's just re-write this to be more deterministic, and generic.

Change-Id: Iac046b98d4c23667eff306861c902913785e6ca8
2022-01-12 02:34:40 +05:30
Luca Stefani d7c19b9074 carriersettings-extractor Update to 12
Import proto files from
tools/carrier_settings 0a2c3b9ec4337283b67391971613cd06690a2d34
packages/providers/TelephonyProvider e9b03419e34ed174e239453f958aac0f042bf072

Change-Id: Ied7c51623dc6d14352fbc30db4632311ba455a0e
2022-01-11 22:00:26 +05:30
Chirayu Desai 2db4321c92 Revert "carriersettings-extractor: "Fix" for 12"
This reverts commit 05f1aaadb2.

* This was never a real fix

Change-Id: I9c40e8a9fcfda2498f17f77b094051f35c53799b
2022-01-11 22:00:24 +05:30
Chirayu Desai b9d4d0c651 carriersettings-extractor: Always allow modifying APNs
* Users have reported that in some cases they were able to edit
  APNs on stock, but aren't able to do so here.
* We can just allow editing APNs always

Reference:
https: //cs.android.com/android/platform/superproject/+/master:frameworks/base/telephony/java/android/telephony/CarrierConfigManager.java

Issue: calyxos#599
Issue: calyxos#266
Issue: calyxos#636
Change-Id: I967069a7631e7b26ad9970704dfda5583e0b0fbf
2021-12-23 02:12:12 +05:30
Chirayu Desai 9968120cba carriersettings-extractor: Exclude some values from vendor.xml
* This will make it work with the naked config
* We can have two different XMLs if needed, where one
  could include this config
* Looked for any 'com.google.android.' or Sprint/Verizon
  packages and removed those

Change-Id: I3d68c995f855c13231946a5796091936479906e9
2021-12-23 02:12:12 +05:30
Chirayu Desai 2fbb434b42 carriersettings: Add rro_overlay template for vendor.xml
Change-Id: Ia31270b697f8588038150d3b32ddacf224d762ee
2021-12-23 02:12:12 +05:30
Chirayu Desai 05f1aaadb2 carriersettings-extractor: "Fix" for 12
* "Fixes" AssertionError assert setting.canonicalName not in all_settings
* The culprit is 'telenor_se'

Change-Id: I9d8c61f2400ecc89f560333ecaba84a739a0bef8
2021-12-23 02:12:12 +05:30
Chirayu Desai 08996b971d carriersettings-extractor: Implement argparse, extract files into separate folders
Co-Authored-By: Michael Bestas <mkbestas@gmail.com>
Change-Id: If8d93d832bbd586ae0e06067a4e335aa5a0398c4
2021-12-23 02:12:12 +05:30
Chirayu Desai 052b596895 carriersettings-extractor: Modify for usage in AOSP
* We already have all the needed protos, just symlink them

Change-Id: Iebdebcad0cecf3a8baf6a9fcc5590e707aacd585
2021-12-23 02:12:12 +05:30
Chirayu Desai 1805c001a7 carriersettings-extractor: Remove unnecessary files, update README
Change-Id: I4d0fe81dda9fb81a72e4e6149aed6a7882f0a17f
2021-12-23 02:12:12 +05:30
Chirayu Desai 5257dc3e45 Import carriersettings-extractor
Repo: https://github.com/daradib/carriersettings-extractor
Commit: 6e6217b5fc74129b8d1ba6671a48388f5f55e009 "Add license"
Change-Id: Ibbbccedd5e118e66f7e681dd2f8c8d69e6484a87
2021-12-23 02:12:12 +05:30