Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,034 Members 47,068 Now Online
XDA Developers Android and Mobile Development Forum

[SMALL APP] [JB / ICS] Serajr Power Toggles - 23 Toggles Set - v1.1 - 10/06/13

Tip us?
 
serajr
Old
(Last edited by serajr; 10th June 2013 at 01:20 PM.) Reason: v1.1 (new patch)
#1  
serajr's Avatar
Recognized Developer / Recognized Themer - OP
Thanks Meter 8913
Posts: 2,310
Join Date: Apr 2011
Location: Rafard - SP
Phone [SMALL APP] [JB / ICS] Serajr Power Toggles - 23 Toggles Set - v1.1 - 10/06/13

Here´s my Serajr Power Toggles small application for all Sony JB/ICS Small App ready devices. It was built from scratch by me using lastest Sony Add-on SDK.

For now, all 23 toggles will be available and enable/disable and reorder buttons is not allowed!
I´ve tested it only on my fat ST15i, but it should work on all patched Framework and SystemUI stock roms, and here are the proofs:












Here's a little warning: Unfortunately Sony does not provide it´s platform key pairs to sign third-party applications, and some toggles only the system can manage, so in order to get all toggles working, a very simple framework-res.apk and services.jar patch is needed. But don´t worry, the patch process does not edit any smali file, just creates new ones (provided on attachments)!!!

Patching framework-res.apk process:

If you have installed previous patch, the one with SystemUI,apk, revert it back to its original state!!

1. Decompile your framework-res.apk (pay attention, yours can be a little different from mine)
2. Edit AndroidManifest.xml (with notepad++)
3. Add red lines, save and close it:
Code:
<?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" />
		
	<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>
		
    </application>
</manifest>
4. Compile it (don´t re-sign it)!!
5. Done!



Patching services.jar process:

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!


Install process:

1. Download it from original thread, here


PLEASE... DO NOT MIRROR OR RE-MOD IT WITHOUT MY PERMISSION!!!



if you like it... Press Thanks!!!!
.
.
The Following 46 Users Say Thank You to serajr For This Useful Post: [ Click to Expand ]
 
serajr
Old
#2  
serajr's Avatar
Recognized Developer / Recognized Themer - OP
Thanks Meter 8913
Posts: 2,310
Join Date: Apr 2011
Location: Rafard - SP
Post Changelog

v1.0 - 15/05/13
- Initial release
The Following 5 Users Say Thank You to serajr For This Useful Post: [ Click to Expand ]
 
alvizu
Old
(Last edited by alvizu; 16th May 2013 at 06:32 PM.)
#3  
alvizu's Avatar
Senior Member
Thanks Meter 40
Posts: 266
Join Date: Jun 2012
Location: México
deleted

Sent from my C6603 using xda premium
 
broke23
Old
#4  
Member
Thanks Meter 12
Posts: 99
Join Date: Feb 2013
nice! a network mode switcher, so we can use it to switch between 2g/3g ???

still weary about this one, no easy installation (yet?)
 
serajr
Old
#5  
serajr's Avatar
Recognized Developer / Recognized Themer - OP
Thanks Meter 8913
Posts: 2,310
Join Date: Apr 2011
Location: Rafard - SP
Quote:
Originally Posted by broke23 View Post
nice! a network mode switcher, so we can use it to switch between 2g/3g ???

still weary about this one, no easy installation (yet?)
That´s it buddy!!!
"no easy installation (yet?)"... Unfortunately, due Sony not share your platform key pairs to sign third-party applications!!
The Following User Says Thank You to serajr For This Useful Post: [ Click to Expand ]
 
Linshart
Old
#6  
Member
Thanks Meter 22
Posts: 88
Join Date: Jul 2012
cool thing, is there any chance, that your whole system ui V8 and forth will be ported to the Z someday soon, serajr?
 
serajr
Old
#7  
serajr's Avatar
Recognized Developer / Recognized Themer - OP
Thanks Meter 8913
Posts: 2,310
Join Date: Apr 2011
Location: Rafard - SP
Quote:
Originally Posted by Linshart View Post
cool thing, is there any chance, that your whole system ui V8 and forth will be ported to the Z someday soon, serajr?
Yep bro... v10 is about to be released with a lot of new features.
Just follow my SystemUI thread, and after v10 I´m gonna try that port, ok!!!
The Following 3 Users Say Thank You to serajr For This Useful Post: [ Click to Expand ]
 
the.ka
Old
#8  
Junior Member
Thanks Meter 3
Posts: 21
Join Date: Oct 2012
Location: Huế
I tried adding smali SystemUI.apk changed. but things do not work 2G\3G
 
rskyline
Old
#9  
rskyline's Avatar
Senior Member
Thanks Meter 699
Posts: 3,329
Join Date: Jan 2012
Location: Barquisimeto

 
DONATE TO ME
Would like to use it on my Nexus 4, it works there?
 
Dzol Cp
Old
#10  
Dzol Cp's Avatar
Recognized Contributor / Themer
Thanks Meter 3905
Posts: 1,460
Join Date: Jan 2012
Location: TB/BF Penang
Looks great!! , working great!!
Brilliant Jobs Brother..

The Following User Says Thank You to Dzol Cp For This Useful Post: [ Click to Expand ]
Tags
jelly bean, serajr, smallapp, sony, toggles
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes