[Sony Xperia T, TL, TX, V] serajr:
New Patch!!

First thanks for all support!!!! ;)

I´d like to know if you can test the new patch process before I release it on OP as v1.1. If so, here are the instructions (unfortunately a bit more work):

framework-res.apk

1. Decompile your framework-res.apk

2. Edit AndroidManifest.xml (with notepad++)

3. Add red lines, save and close it:

<?xml version="1.0" encoding="utf-8"?>
<manifest android:sharedUserId="android.uid.system" android:versionCode="16" android:versionName="4.1.2-Gv5_tw" android:sharedUserLabel="@string/android_system_label" package="android" coreApp="true"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16" />
.
.
.
.
<application android:theme="@style/Theme.DeviceDefault" android:label="@string/android_system_label" android:icon="@drawable/ic_launcher_android" android:allowClearUserData="false" android:hasCode="false" android:persistent="true" android:process="system" android:backupAgent="com.android.server.SystemBackupAgent" android:killAfterRestore="false">
<activity android:theme="@style/BidiDialogAlert" android:name="com.android.internal.app.ChooserActivity" android:multiprocess="true" android:excludeFromRecents="true" android:finishOnCloseSystemDialogs="true">
<intent-filter>
<action android:name="android.intent.action.CHOOSER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@style/Theme.DeviceDefault.Dialog" android:label="@string/heavy_weight_switcher_title" android:name="com.android.internal.app.HeavyWeightSwitcherActivity" android:process=":ui" android:excludeFromRecents="true" android:finishOnCloseSystemDialogs="true" />
<activity android:theme="@style/Theme.Wallpaper.NoTitleBar.Fullscreen" android:name="com.android.internal.app.PlatLogoActivity" android:process=":ui" />
<activity android:theme="@style/Theme.NoDisplay" android:name="com.android.internal.app.DisableCarModeActivity" android:exported="true" android:process=":ui" android:excludeFromRecents="true" />
<activity android:theme="@style/Theme.DeviceDefault.Dialog" android:label="@string/choose_account_label" android:name="android.accounts.ChooseAccountActivity" android:exported="true" android:process=":ui" android:excludeFromRecents="true" />
<activity android:theme="@style/Theme.DeviceDefault.Dialog" android:label="@string/choose_account_label" android:name="android.accounts.ChooseTypeAndAccountActivity" android:exported="true" android:process=":ui" android:excludeFromRecents="true" />
<activity android:theme="@style/Theme.DeviceDefault.DialogWhenLarge.NoActionBar" android:label="@string/choose_account_label" android:name="android.accounts.ChooseAccountTypeActivity" android:process=":ui" android:excludeFromRecents="true" />
<activity android:theme="@style/Theme.DeviceDefault.DialogWhenLarge" android:name="android.accounts.GrantCredentialsPermissionActivity" android:exported="true" android:process=":ui" android:excludeFromRecents="true" />
<activity android:theme="@style/Theme.DeviceDefault.Dialog" android:label="@string/sync_too_many_deletes" android:name="android.content.SyncActivityTooManyDeletes" android:process=":ui" />
<activity android:theme="@style/Theme.DeviceDefault" android:name="com.android.server.ShutdownActivity" android:permission="android.permission.SHUTDOWN" android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.ACTION_REQUEST_SHUTDOWN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.REBOOT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@style/BidiDialogAlert" android:name="com.android.internal.app.NetInitiatedActivity" android:process=":ui" android:excludeFromRecents="true" />
<receiver android:name="com.android.server.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver android:name="com.android.server.MasterClearReceiver" android:permission="android.permission.MASTER_CLEAR" android:priority="100">
<intent-filter>
<action android:name="android.intent.action.MASTER_CLEAR" />
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="android.intent.category.MASTER_CLEAR" />
</intent-filter>
</receiver>
<service android:name="com.android.internal.os.storage.ExternalStorageFormatter" android:permission="android.permission.MASTER_CLEAR" android:exported="true" />

[COLOR="red"]<receiver android:name="com.serajr.powertoggles.receivers.NetworkModeButtonReceiver" android:process="com.android.phone">
<intent-filter>
<action android:name="com.serajr.powertoggles.SMALLAPP_CHANGE_NETWORK_MODE" />
<action android:name="com.serajr.powertoggles.SMALLAPP_NEW_NETWORK_MODE" />
</intent-filter>
</receiver>
<receiver android:name="com.serajr.powertoggles.receivers.BrightnessButtonReceiver">
<intent-filter>
<action android:name="com.serajr.powertoggles.SMALLAPP_CHANGE_BRIGHTNESS_MODE" />
<action android:name="com.serajr.powertoggles.SMALLAPP_NEW_BRIGHTNESS_MODE" />
</intent-filter>
</receiver>
<receiver android:name="com.serajr.powertoggles.receivers.GPSButtonReceiver">
<intent-filter>
<action android:name="com.serajr.powertoggles.SMALLAPP_CHANGE_GPS_STATE" />
<action android:name="com.serajr.powertoggles.SMALLAPP_NEW_GPS_STATE" />
</intent-filter>
</receiver>
<receiver android:name="com.serajr.powertoggles.receivers.RebootButtonReceiver">
<intent-filter>
<action android:name="com.serajr.powertoggles.SMALLAPP_REQUEST_REBOOT" />
<action android:name="com.serajr.powertoggles.SMALLAPP_REBOOT_MODE" />
</intent-filter>
</receiver>
<receiver android:name="com.serajr.powertoggles.receivers.ShutdownButtonReceiver">
<intent-filter>
<action android:name="com.serajr.powertoggles.SMALLAPP_REQUEST_SHUTDOWN" />
</intent-filter>
</receiver>
<receiver android:name="com.serajr.powertoggles.receivers.USBConnectionModeButtonReceiver">
<intent-filter>
<action android:name="com.serajr.powertoggles.SMALLAPP_CHANGE_USB_CONNECTION_MODE" />
<action android:name="com.serajr.powertoggles.SMALLAPP_NEW_USB_CONNECTION_MODE" />
</intent-filter>
</receiver>
<receiver android:name="com.serajr.powertoggles.receivers.USBDebuggingButtonReceiver">
<intent-filter>
<action android:name="com.serajr.powertoggles.SMALLAPP_CHANGE_USB_DEBUGGING_STATE" />
<action android:name="com.serajr.powertoggles.SMALLAPP_NEW_USB_DEBUGGING_STATE" />
</intent-filter>
</receiver>[/COLOR]

</application>
</manifest>

4. Compile it (don´t re-sign it)!!

5. Done!

services.jar

1. Decompile your services.jar (optionally use attached Jar_Decompile_Compile tool)

2. Download attached smali.zip file to your computer and unzip it

3. Copy unziped contents with all folders structure into decompiled services.jar project

4. You´ll get: ...\com\serajr\powertoggles\receivers\ (here are 8 smali files)

5. Compile project to get a new classes.dex

6. Replace classes.dex inside services.jar (open it with 7-Zip)

7. Done!

- Download attached framework_and_services_replacer.zip to your computer

- Open it with 7-Zip and go to \system\framework\ empty folder

- Drag and drop both modded framework-res.apk and services.jar inside \system\framework\ empty folder and close it

- Flash framework_and_services_replacer.zip

- Done!

Tell me if you success!!! Thanks in advance my friends!!!!!!!!!!!! ;)

.

.