• XDA Forums have been migrated to XenForo. We are aware of several issues including missing threads, logins not working, and more. To discuss, use this thread.

[PORT][GUIDE] Xperia XZs Conversation/Messaging Port

wolfmannight

New member
Mar 30, 2017
36
18
0
Xperia XZs Conversation/Messaging Port​

I'm wolfmannight back again to XDA.
Earlier i deleted my account cause i stop working on port...
Now I have bit of time to give you some cool xperia port...

Love and thanks to Sony Dev Team...

Pull out TelephonyProvider.apk from system/priv-app folder
Decompile TelephonyProvider.apk


  1. Add lines in AndroidManifest.xml
    PHP:
        <uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS"/>
        <application android:allowClearUserData="false" android:backupAgent="TelephonyBackupAgent" android:backupInForeground="true" android:defaultToDeviceProtectedStorage="true" android:directBootAware="true" android:fullBackupOnly="true" android:icon="@mipmap/ic_launcher_phone" android:label="@string/app_label" android:process="com.android.phone" android:restoreAnyVersion="true" android:usesCleartextTraffic="true">
            <provider android:authorities="telephony" android:exported="true" android:multiprocess="false" android:name="TelephonyProvider" android:singleUser="true"/>
            <provider android:authorities="sms" android:exported="true" android:multiprocess="false" android:name="SemcSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
            <provider android:authorities="mms" android:exported="true" android:multiprocess="false" android:name="SemcMmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true">
                <grant-uri-permission android:pathPrefix="/part/"/>
                <grant-uri-permission android:pathPrefix="/drm/"/>
            </provider>
            <provider android:authorities="smsc" android:exported="true" android:name="SomcSmscProvider" android:singleUser="true" android:writePermission="com.somc.permissions.WRITE_SMSC"/>
            <provider android:authorities="mms-sms" android:exported="true" android:multiprocess="false" android:name="SemcMmsSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
            <provider android:authorities="mms-sms-capability" android:exported="true" android:multiprocess="true" android:name="SomcMmsSmsCapabilityProvider" android:readPermission="com.somc.permissions.READ_MMS_SMS_CAPABILITY" android:singleUser="true"/>
            <provider android:authorities="hbpcd_lookup" android:exported="true" android:multiprocess="false" android:name="HbpcdLookupProvider" android:singleUser="true" android:writePermission="android.permission.MODIFY_PHONE_STATE"/>
            <service android:exported="false" android:name=".TelephonyBackupAgent$DeferredSmsMmsRestoreService"/>
        </application>
  2. Unzip attachment smali.zip.
  3. Merge files in smali folder.
  4. Recompile apk, sign it with system keys, push back apk to system....

    Install Messaging apk from apkmirror if install fails download it and put it in system manually...

Keep in touch and give feedback...
AOSP Builds Tested >>> working...
LineageOS Build >>> Panding..



MY STORY.... its funny...
well I Hard bricked my Xperia Z3c for experimenting with TA keys and restoration... i learned lot ....
But never Flash TA manually if its not of your phone or corrupted TA backup... it really can **** your phone.

Phone has no connection via USB, adb and fastboot mode both not working...
If you have any idea or way to get my phone back please PM me..
If you really donate something please PM me...


Working on Settings app port.. soon i post it
 

Attachments

Last edited:

wolfmannight

New member
Mar 30, 2017
36
18
0
No i have added those lines:(
LOL
dont add new... just replace it
PHP:
    <application android:allowClearUserData="false" android:backupAgent="TelephonyBackupAgent" android:backupInForeground="true" android:defaultToDeviceProtectedStorage="true" android:directBootAware="true" android:fullBackupOnly="true" android:icon="@mipmap/ic_launcher_phone" android:label="@string/app_label" android:process="com.android.phone" android:restoreAnyVersion="true" android:usesCleartextTraffic="true">
        <provider android:authorities="telephony" android:exported="true" android:multiprocess="false" android:name="TelephonyProvider" android:singleUser="true"/>
        <provider android:authorities="sms" android:exported="true" android:multiprocess="false" android:name="SemcSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
        <provider android:authorities="mms" android:exported="true" android:multiprocess="false" android:name="SemcMmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true">
            <grant-uri-permission android:pathPrefix="/part/"/>
            <grant-uri-permission android:pathPrefix="/drm/"/>
        </provider>
        <provider android:authorities="smsc" android:exported="true" android:name="SomcSmscProvider" android:singleUser="true" android:writePermission="com.somc.permissions.WRITE_SMSC"/>
        <provider android:authorities="mms-sms" android:exported="true" android:multiprocess="false" android:name="SemcMmsSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
        <provider android:authorities="mms-sms-capability" android:exported="true" android:multiprocess="true" android:name="SomcMmsSmsCapabilityProvider" android:readPermission="com.somc.permissions.READ_MMS_SMS_CAPABILITY" android:singleUser="true"/>
        <provider android:authorities="hbpcd_lookup" android:exported="true" android:multiprocess="false" android:name="HbpcdLookupProvider" android:singleUser="true" android:writePermission="android.permission.MODIFY_PHONE_STATE"/>
        <service android:exported="false" android:name=".TelephonyBackupAgent$DeferredSmsMmsRestoreService"/>
    </application>
 
  • Like
Reactions: vikash1994b

vikash1994b

Senior Member
Dec 7, 2012
970
570
93
26
New Delhi
LOL
dont add new... just replace it
i tried bt still FC. here is my androidmanifest plz have a look
PHP:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android.uid.phone" coreApp="true" package="com.android.providers.telephony" platformBuildVersionCode="25" platformBuildVersionName="7.1.2">
    <uses-permission android:name="android.permission.RECEIVE_SMS"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"/>
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
    <protected-broadcast android:name="android.provider.action.EXTERNAL_PROVIDER_CHANGE"/>
    <protected-broadcast android:name="android.intent.action.CONTENT_CHANGED"/>
    <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
    <application android:allowClearUserData="false" android:backupAgent="TelephonyBackupAgent" android:backupInForeground="true" android:defaultToDeviceProtectedStorage="true" android:directBootAware="true" android:fullBackupOnly="true" android:icon="@mipmap/ic_launcher_phone" android:label="@string/app_label" android:process="com.android.phone" android:restoreAnyVersion="true" android:usesCleartextTraffic="true">
        <provider android:authorities="telephony" android:exported="true" android:multiprocess="false" android:name="TelephonyProvider" android:singleUser="true"/>
        <provider android:authorities="sms" android:exported="true" android:multiprocess="false" android:name="SemcSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
        <provider android:authorities="mms" android:exported="true" android:multiprocess="false" android:name="SemcMmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true">
            <grant-uri-permission android:pathPrefix="/part/"/>
            <grant-uri-permission android:pathPrefix="/drm/"/>
        </provider>
        <provider android:authorities="smsc" android:exported="true" android:name="SomcSmscProvider" android:singleUser="true" android:writePermission="com.somc.permissions.WRITE_SMSC"/>
        <provider android:authorities="mms-sms" android:exported="true" android:multiprocess="false" android:name="SemcMmsSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
        <provider android:authorities="mms-sms-capability" android:exported="true" android:multiprocess="true" android:name="SomcMmsSmsCapabilityProvider" android:readPermission="com.somc.permissions.READ_MMS_SMS_CAPABILITY" android:singleUser="true"/>
        <provider android:authorities="hbpcd_lookup" android:exported="true" android:multiprocess="false" android:name="HbpcdLookupProvider" android:singleUser="true" android:writePermission="android.permission.MODIFY_PHONE_STATE"/>
        <service android:exported="false" android:name=".TelephonyBackupAgent$DeferredSmsMmsRestoreService"/>
    </application>
</manifest>
 

wolfmannight

New member
Mar 30, 2017
36
18
0
Try this code replace whole code with this

PHP:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android.uid.phone" coreApp="true" package="com.android.providers.telephony" platformBuildVersionCode="25" platformBuildVersionName="7.1.2">
    <uses-permission android:name="android.permission.RECEIVE_SMS"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"/>
    <uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS"/>
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
    <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
    <protected-broadcast android:name="android.provider.action.EXTERNAL_PROVIDER_CHANGE"/>
    <protected-broadcast android:name="android.intent.action.CONTENT_CHANGED"/>
    <permission android:name="com.somc.permissions.WRITE_SMSC" android:protectionLevel="signatureOrSystem"/>
    <permission android:name="com.somc.permissions.READ_MMS_SMS_CAPABILITY" android:protectionLevel="signatureOrSystem"/>
    <application android:allowClearUserData="false" android:backupAgent="TelephonyBackupAgent" android:backupInForeground="true" android:defaultToDeviceProtectedStorage="true" android:directBootAware="true" android:fullBackupOnly="true" android:icon="@mipmap/ic_launcher_phone" android:label="@string/app_label" android:process="com.android.phone" android:restoreAnyVersion="true" android:usesCleartextTraffic="true">
        <provider android:authorities="telephony" android:exported="true" android:multiprocess="false" android:name="TelephonyProvider" android:singleUser="true"/>
        <provider android:authorities="sms" android:exported="true" android:multiprocess="false" android:name="SemcSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
        <provider android:authorities="mms" android:exported="true" android:multiprocess="false" android:name="SemcMmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true">
            <grant-uri-permission android:pathPrefix="/part/"/>
            <grant-uri-permission android:pathPrefix="/drm/"/>
        </provider>
        <provider android:authorities="smsc" android:exported="true" android:name="SomcSmscProvider" android:singleUser="true" android:writePermission="com.somc.permissions.WRITE_SMSC"/>
        <provider android:authorities="mms-sms" android:exported="true" android:multiprocess="false" android:name="SemcMmsSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
        <provider android:authorities="mms-sms-capability" android:exported="true" android:multiprocess="true" android:name="SomcMmsSmsCapabilityProvider" android:readPermission="com.somc.permissions.READ_MMS_SMS_CAPABILITY" android:singleUser="true"/>
        <provider android:authorities="hbpcd_lookup" android:exported="true" android:multiprocess="false" android:name="HbpcdLookupProvider" android:singleUser="true" android:writePermission="android.permission.MODIFY_PHONE_STATE"/>
        <service android:exported="false" android:name=".TelephonyBackupAgent$DeferredSmsMmsRestoreService"/>
    </application>
</manifest>
and if FC send log
 
  • Like
Reactions: vikash1994b

vikash1994b

Senior Member
Dec 7, 2012
970
570
93
26
New Delhi
Try this code replace whole code with this

PHP:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="[url]http://schemas.android.com/apk/res/android"[/url] android:sharedUserId="android.uid.phone" coreApp="true" package="com.android.providers.telephony" platformBuildVersionCode="25" platformBuildVersionName="7.1.2">
 <uses-permission android:name="android.permission.RECEIVE_SMS"/>
 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
 <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"/>
 <uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS"/>
 <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
 <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
 <protected-broadcast android:name="android.provider.action.EXTERNAL_PROVIDER_CHANGE"/>
 <protected-broadcast android:name="android.intent.action.CONTENT_CHANGED"/>
 <permission android:name="com.somc.permissions.WRITE_SMSC" android:protectionLevel="signatureOrSystem"/>
 <permission android:name="com.somc.permissions.READ_MMS_SMS_CAPABILITY" android:protectionLevel="signatureOrSystem"/>
 <application android:allowClearUserData="false" android:backupAgent="TelephonyBackupAgent" android:backupInForeground="true" android:defaultToDeviceProtectedStorage="true" android:directBootAware="true" android:fullBackupOnly="true" android:icon="@mipmap/ic_launcher_phone" android:label="@string/app_label" android:process="com.android.phone" android:restoreAnyVersion="true" android:usesCleartextTraffic="true">
 <provider android:authorities="telephony" android:exported="true" android:multiprocess="false" android:name="TelephonyProvider" android:singleUser="true"/>
 <provider android:authorities="sms" android:exported="true" android:multiprocess="false" android:name="SemcSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
 <provider android:authorities="mms" android:exported="true" android:multiprocess="false" android:name="SemcMmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true">
 <grant-uri-permission android:pathPrefix="/part/"/>
 <grant-uri-permission android:pathPrefix="/drm/"/>
 </provider>
 <provider android:authorities="smsc" android:exported="true" android:name="SomcSmscProvider" android:singleUser="true" android:writePermission="com.somc.permissions.WRITE_SMSC"/>
 <provider android:authorities="mms-sms" android:exported="true" android:multiprocess="false" android:name="SemcMmsSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
 <provider android:authorities="mms-sms-capability" android:exported="true" android:multiprocess="true" android:name="SomcMmsSmsCapabilityProvider" android:readPermission="com.somc.permissions.READ_MMS_SMS_CAPABILITY" android:singleUser="true"/>
 <provider android:authorities="hbpcd_lookup" android:exported="true" android:multiprocess="false" android:name="HbpcdLookupProvider" android:singleUser="true" android:writePermission="android.permission.MODIFY_PHONE_STATE"/>
 <service android:exported="false" android:name=".TelephonyBackupAgent$DeferredSmsMmsRestoreService"/>
 </application>
</manifest>
and if FC send log
K iwl try nd tell result
 

vikash1994b

Senior Member
Dec 7, 2012
970
570
93
26
New Delhi
Try this code replace whole code with this

PHP:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="[url]http://schemas.android.com/apk/res/android"[/url] android:sharedUserId="android.uid.phone" coreApp="true" package="com.android.providers.telephony" platformBuildVersionCode="25" platformBuildVersionName="7.1.2">
 <uses-permission android:name="android.permission.RECEIVE_SMS"/>
 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
 <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS"/>
 <uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS"/>
 <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
 <uses-permission android:name="android.permission.MODIFY_PHONE_STATE"/>
 <protected-broadcast android:name="android.provider.action.EXTERNAL_PROVIDER_CHANGE"/>
 <protected-broadcast android:name="android.intent.action.CONTENT_CHANGED"/>
 <permission android:name="com.somc.permissions.WRITE_SMSC" android:protectionLevel="signatureOrSystem"/>
 <permission android:name="com.somc.permissions.READ_MMS_SMS_CAPABILITY" android:protectionLevel="signatureOrSystem"/>
 <application android:allowClearUserData="false" android:backupAgent="TelephonyBackupAgent" android:backupInForeground="true" android:defaultToDeviceProtectedStorage="true" android:directBootAware="true" android:fullBackupOnly="true" android:icon="@mipmap/ic_launcher_phone" android:label="@string/app_label" android:process="com.android.phone" android:restoreAnyVersion="true" android:usesCleartextTraffic="true">
 <provider android:authorities="telephony" android:exported="true" android:multiprocess="false" android:name="TelephonyProvider" android:singleUser="true"/>
 <provider android:authorities="sms" android:exported="true" android:multiprocess="false" android:name="SemcSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
 <provider android:authorities="mms" android:exported="true" android:multiprocess="false" android:name="SemcMmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true">
 <grant-uri-permission android:pathPrefix="/part/"/>
 <grant-uri-permission android:pathPrefix="/drm/"/>
 </provider>
 <provider android:authorities="smsc" android:exported="true" android:name="SomcSmscProvider" android:singleUser="true" android:writePermission="com.somc.permissions.WRITE_SMSC"/>
 <provider android:authorities="mms-sms" android:exported="true" android:multiprocess="false" android:name="SemcMmsSmsProvider" android:readPermission="android.permission.READ_SMS" android:singleUser="true"/>
 <provider android:authorities="mms-sms-capability" android:exported="true" android:multiprocess="true" android:name="SomcMmsSmsCapabilityProvider" android:readPermission="com.somc.permissions.READ_MMS_SMS_CAPABILITY" android:singleUser="true"/>
 <provider android:authorities="hbpcd_lookup" android:exported="true" android:multiprocess="false" android:name="HbpcdLookupProvider" android:singleUser="true" android:writePermission="android.permission.MODIFY_PHONE_STATE"/>
 <service android:exported="false" android:name=".TelephonyBackupAgent$DeferredSmsMmsRestoreService"/>
 </application>
</manifest>
and if FC send log
Still fc
Logs attached
 

Attachments

Our Apps
Get our official app! (coming soon)
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone