phhusson / ims

GNU General Public License v2.0
116 stars 12 forks source link

Question about intergrating into other ROMs #22

Open ethical-haquer opened 3 months ago

ethical-haquer commented 3 months ago

Is there a guide somewhere on how to add support for this to LOS-based ROMs? Or is it currently not possible? TIA.

phhusson commented 3 months ago

Here are the instructions that I've given to other device-specific ROM devs: Overlay in frameworks/res:

com.google.android.iwlan
<string name="config_wlan_network_service_package">com.google.android.iwlan</string> 
com.android.telephony.qns

Overlay in packages/services/telephony

me.phh.ims

Added packages: Iwlan QualifiedNetworksService

References: https://github.com/TrebleDroid/device_phh_treble/commit/0126152f68f9148d1759949367f74c1b68f29e0a https://github.com/TrebleDroid/vendor_hardware_overlay/blob/pie/Telephony/FLOSS-IMS/res/values/config.xml

I think that's all. And then you'll need to install the floss ims apk, https://treble.phh.me/floss-ims-16.apk (source at https://github.com/phhusson/ims ). After that it's a tiny bit fuzzy since my Treble App does some things, so let's try this: Set persist.dbg.volte_avail_ovr persist.dbg.wfc_avail_ovr and persist.dbg.allow_ims_off to 1. This should probably enable "Wifi calling" and "4g calling" in the settings. Tick them. See what happens from there. Notably in ip address you should see an ipsec interface. If you don't, create a new APN called "ims" and type "ims", reboot, reinstall the floss ims apk, and check again `ip address". If there is still no ipsec interface, something's up. If you do see an ipsec interface, well try to send a sms and see what happens

ethical-haquer commented 2 months ago

@phhusson Thanks for the reply! I've never built a ROM before, but I thought I'd ask how you'd go about implementing this into a ROM, as it would be nice if more ROMs used this for Samsungs. I really appreciate your work on this!

vindicatorr commented 1 month ago

I'm working through this as well, and something I've encountered is the need for the package to be signed: No APK Signature Scheme v2 signature in package /system/system_ext/priv-app/ims/ims.apk

I see build.sh signs with the keys provided in this repo, and just to be thorough, I signed it with those, but that isn't accepted either: Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE: Reconciliation failed...: Reconcile failed: Package me.phh.ims has no signatures that match those in shared user android.uid.system; ignoring!]

So that got me to finding about the ability to resign everything in the GSI (key is framework-res.apk). I'm not done yet, to see if that does it. It's the "de-odex"ing that I'm exploring first: https://stackoverflow.com/questions/9475576/resigning-system-img-on-a-device

phhusson commented 1 month ago

You're trying to install it in a ROM you're building yourself, or in someone else's ROM? You would need to resign full system.img only in the later case

vindicatorr commented 4 weeks ago

Yeah, it's the latter (Google's AOSP w/GMS GSI).