[MOD][GUIDE]25 Easy Grid Toggles (COPY PASTE WORK!)(NoobFriendly)(2.3+)(Update)

Search This thread

SpaceCaker

Senior Member
Mar 26, 2011
13,545
10,904
netherlands
www.youtube.com
HOW TO PORT 25 GRID TOGGLES!
With ease!


togglesssssssssss.png

As many people know porting the lidroid toggles to you're stock device is a lot of work especially when u port the grid toggles.
why ?
because these toggles all needs you to add all ids and such and then in all smali you need to fix 0x730254 etc values.
BUT NOW!!! that time is over i have been working on these toggles for a few days now and its set so it will get all values etc with only packagename
so you only need to copy paste the stuff i say you to :)

SCREENS:
screen2.jpg
screens.jpg

REQUIREMENT:
- BRAIN
- Patient
- Know how to decompile/recompiling Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ etc,

1. Decomple SystemUI.apk
/res/values/ids.xml
Add the following values to ids.xml
Code:
    <item type="id" name="spomc_toggle_toggle_button">false</item>
    <item type="id" name="spomc_toggle_icon_button">false</item>
    <item type="id" name="spomc_toggle_text_button">false</item>
2. SystemUI/res/values/strings.xml
Add the following strings to strings.xml
Code:
      <string name="spomc_always_use_accessory">Use by default for this USB accessory</string>
    <string name="spomc_bt">BT</string>
    <string name="spomc_data">Data</string>
    <string name="spomc_rotate">Rotate</string>
    <string name="spomc_wifi">Wi-Fi</string>
    <string name="spomc_gps">GPS</string>
    <string name="spomc_wifiap">Wi-Fi AP</string>
    <string name="spomc_airplane">Airplane</string>
    <string name="spomc_vibrate">Vibrate</string>
    <string name="spomc_silent">Silent</string>
    <string name="spomc_torch">Torch</string>
    <string name="spomc_sync">Sync</string>
        <string name="spomc_settings">Settings</string>
        <string name="spomc_control">Controller</string>
        <string name="spomc_ram">Clear RAM</string>
        <string name="spomc_brightness">Brightness</string>
        <string name="spomc_weather">Weather</string>
        <string name="spomc_volumes">Volume</string>
        <string name="spomc_widgets">Widget</string>
        <string name="spomc_reboot">Reboot</string>
        <string name="spomc_battery">Battery</string>
        <string name="spomc_troll">Troll</string>
        <string name="spomc_flash">Flash</string>
        <string name="spomc_prev">Previous</string>
        <string name="spomc_next">Next</string>
        <string name="spomc_play">Play/Pause</string>
        <string name="spomc_sleep">Sleep</string>      
        <string name="spomc_default_wifi">WIFI</string>
    <string name="spomc_default_bt">BT</string>
    <string name="spomc_default_gps">GPS</string>
    <string name="spomc_default_rotate">ROTATE</string>
    <string name="spomc_default_vibrate">VIBRATE</string>
        <string name="spomc_default_control">CONTROL</string>
    <string name="spomc_default_sync">SYNC</string>
        <string name="spomc_default_data">DATA</string>
    <string name="spomc_default_silent">SILENT</string>
        <string name="spomc_default_settings">SETTINGS</string>
        <string name="spomc_default_airplane">AIRPLANE_MODE</string>
        <string name="spomc_default_ram">CLEAR_RAM</string>
        <string name="spomc_default_brightness">BRIGHTNESS</string>
        <string name="spomc_default_weather">WEATHER</string>
        <string name="spomc_default_volumes">VOLUMES</string>
        <string name="spomc_default_widgets">WIDGETS</string>
        <string name="spomc_default_reboot">REBOOT</string>
        <string name="spomc_default_battery">BATTERY</string>
        <string name="spomc_default_troll">TROLL</string>
        <string name="spomc_default_flash">FLASH</string>
        <string name="spomc_default_prev">PREV</string>
        <string name="spomc_default_next">NEXT</string>
        <string name="spomc_default_play">PLAY</string>
        <string name="spomc_default_sleep">SLEEP</string>
        <string name="spomc_default_profile">PROFILE</string>
        <string name="spomc_default_cpu">CPU</string>
3. SystemUI/res/values/styles.xml
Add the following strings to styles.xml
Code:
    <style name="brucekey_icon">
        <item name="android:disabledAlpha">?android:disabledAlpha</item>
        <item name="android:background">@drawable/togglebtn_bg</item>
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">wrap_content</item>
    </style>
3. Copy paste the Attached Content.zip to ur systemui/
This will add the resources,arrays.xml,layout and toggle smali's
4. SystemUI/res/layout/**** any layout you want.
add the following in it to load the toggles.
Code:
<com.spacey.xperiatabs.toggles.TogglesView android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" />
5. Now compile the systemui.apk and it should be working ;)
6. Add the ToggleSettings.apk to system/app

BUGS:
  1. Data toggle Possibly working not sure yet
  2. DONT! change any png names or string names etc it wont work ;)
  3. Profile Picture and Name are set blank if u select it pres sthe toggle and edit it to ur name and a picture. the picture will appear if you reboot.

CREDITS:
  • AuliaYF
  • AOKP
  • CM
  • TentenPonce
  • TuxKids
  • Aryne
  • Potato Bro's
  • MOSP team
  • SonyXperiaZ2 for toggle pngs :p
  • Dedy Prayetno
  • SpaceCaker ofcourse!

Attachements:
Content.zip dl link https://dl.dropboxusercontent.com/u/56034188/toggles/sp/ContentV9.zip
or see bottom of post for attached zip

ToggleSettings dl link https://dl.dropboxusercontent.com/u/56034188/toggles/sp/ToggleSettings.apk
or see bottom of post for attached apk
 

Attachments

  • ContentV9.zip
    150.1 KB · Views: 2,525
  • ToggleSettings.apk
    764.9 KB · Views: 2,491
Last edited:

SpaceCaker

Senior Member
Mar 26, 2011
13,545
10,904
netherlands
www.youtube.com
CHANGELOG:
  • V9 Ninth release:
  • 10 new toggles! Yeah you heard it right !!! 10 NEW TOGGLES!
  • Play/Pause, Previous, Next Music buttons.
  • Cpu Toggle ( shows current cpu speed, update on press)
  • Profile Toggle ( Change name and Picture)
  • Reboot toggle
  • Battery toggle
  • Troll toggle
  • Flash Toggle
  • Sleep Toggle
  • Scrollview fixation.
  • Some bugfixes
  • More ??
  • V8 Eight release:
  • Private release this was for testers.
  • Unreleased on XDA
  • V7 Seventh release:
  • Add New Weather Toggle ( Need Google News And Weather app installed Also known as GenieWidget.apk)
  • Add Volumes Toggle ( Work In Progress ;P )
  • Brightness Popup Touch outside dialog will close it
  • Small Bug Fix
  • V6 Sixth release:
  • Possible Data on/off fix ( hope it works properly :p )
  • Fix Single time open Settings,Control and Brightness only.
  • Small Bugfixes in toggle code.
  • V5 Fifth release:
  • Add Brightness Toggle.
  • Layout fix for 2row toggles
  • Brightness Slider PopUp (MUAHHAHAHA Tricky way of doing it but works lol)
  • FC fix
  • V4 Fourth release:
  • Toggle Layout
  • Toggles JB switch look feel or 4 Row normal toggles
  • V3 Third release:
  • Added Reorder method. special thanks to Dedy :)
  • V2 Second release:
  • Added JB api version for collapsestatusbar
  • now on 4.1+ it will close statusbar onlongclick and settings/control toggle click aswell
  • V1 Initial Release:
  • firstbuild

FAQ:
  • Weather widget not working???:
  • This is possible cause of you not having set up ur location in Google News and Weather app.
  • You also might not have GenieWidget.apk installed. Try the attached apk ;)
  • Profile Picture not working or updating???:
  • This is being worked on as of now reboot device or restart systemui to apply change.
 

Attachments

  • GenieWidget.apk
    746.5 KB · Views: 492
Last edited:

SpaceCaker

Senior Member
Mar 26, 2011
13,545
10,904
netherlands
www.youtube.com
sorry bro, i mean vibration toggle dont work for me

maybe you need some of these permissions in ur systemui androidmanifest.xml
Code:
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
    <uses-permission android:name="android.permission.DEVICE_POWER" />
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
 

the_vanya1

Senior Member
Oct 13, 2013
225
30
Kiev
maybe you need some of these permissions in ur systemui androidmanifest.xml
Code:
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.MANAGE_NETWORK_POLICY" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
    <uses-permission android:name="android.permission.DEVICE_POWER" />
    <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
I think, android 4.1.2 already have it, but all lidroid toggles are work
 

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    HOW TO PORT 25 GRID TOGGLES!
    With ease!


    togglesssssssssss.png

    As many people know porting the lidroid toggles to you're stock device is a lot of work especially when u port the grid toggles.
    why ?
    because these toggles all needs you to add all ids and such and then in all smali you need to fix 0x730254 etc values.
    BUT NOW!!! that time is over i have been working on these toggles for a few days now and its set so it will get all values etc with only packagename
    so you only need to copy paste the stuff i say you to :)

    SCREENS:
    screen2.jpg
    screens.jpg

    REQUIREMENT:
    - BRAIN
    - Patient
    - Know how to decompile/recompiling Apk file
    - notepad++
    - Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ etc,

    1. Decomple SystemUI.apk
    /res/values/ids.xml
    Add the following values to ids.xml
    Code:
        <item type="id" name="spomc_toggle_toggle_button">false</item>
        <item type="id" name="spomc_toggle_icon_button">false</item>
        <item type="id" name="spomc_toggle_text_button">false</item>
    2. SystemUI/res/values/strings.xml
    Add the following strings to strings.xml
    Code:
          <string name="spomc_always_use_accessory">Use by default for this USB accessory</string>
        <string name="spomc_bt">BT</string>
        <string name="spomc_data">Data</string>
        <string name="spomc_rotate">Rotate</string>
        <string name="spomc_wifi">Wi-Fi</string>
        <string name="spomc_gps">GPS</string>
        <string name="spomc_wifiap">Wi-Fi AP</string>
        <string name="spomc_airplane">Airplane</string>
        <string name="spomc_vibrate">Vibrate</string>
        <string name="spomc_silent">Silent</string>
        <string name="spomc_torch">Torch</string>
        <string name="spomc_sync">Sync</string>
            <string name="spomc_settings">Settings</string>
            <string name="spomc_control">Controller</string>
            <string name="spomc_ram">Clear RAM</string>
            <string name="spomc_brightness">Brightness</string>
            <string name="spomc_weather">Weather</string>
            <string name="spomc_volumes">Volume</string>
            <string name="spomc_widgets">Widget</string>
            <string name="spomc_reboot">Reboot</string>
            <string name="spomc_battery">Battery</string>
            <string name="spomc_troll">Troll</string>
            <string name="spomc_flash">Flash</string>
            <string name="spomc_prev">Previous</string>
            <string name="spomc_next">Next</string>
            <string name="spomc_play">Play/Pause</string>
            <string name="spomc_sleep">Sleep</string>      
            <string name="spomc_default_wifi">WIFI</string>
        <string name="spomc_default_bt">BT</string>
        <string name="spomc_default_gps">GPS</string>
        <string name="spomc_default_rotate">ROTATE</string>
        <string name="spomc_default_vibrate">VIBRATE</string>
            <string name="spomc_default_control">CONTROL</string>
        <string name="spomc_default_sync">SYNC</string>
            <string name="spomc_default_data">DATA</string>
        <string name="spomc_default_silent">SILENT</string>
            <string name="spomc_default_settings">SETTINGS</string>
            <string name="spomc_default_airplane">AIRPLANE_MODE</string>
            <string name="spomc_default_ram">CLEAR_RAM</string>
            <string name="spomc_default_brightness">BRIGHTNESS</string>
            <string name="spomc_default_weather">WEATHER</string>
            <string name="spomc_default_volumes">VOLUMES</string>
            <string name="spomc_default_widgets">WIDGETS</string>
            <string name="spomc_default_reboot">REBOOT</string>
            <string name="spomc_default_battery">BATTERY</string>
            <string name="spomc_default_troll">TROLL</string>
            <string name="spomc_default_flash">FLASH</string>
            <string name="spomc_default_prev">PREV</string>
            <string name="spomc_default_next">NEXT</string>
            <string name="spomc_default_play">PLAY</string>
            <string name="spomc_default_sleep">SLEEP</string>
            <string name="spomc_default_profile">PROFILE</string>
            <string name="spomc_default_cpu">CPU</string>
    3. SystemUI/res/values/styles.xml
    Add the following strings to styles.xml
    Code:
        <style name="brucekey_icon">
            <item name="android:disabledAlpha">?android:disabledAlpha</item>
            <item name="android:background">@drawable/togglebtn_bg</item>
            <item name="android:layout_width">wrap_content</item>
            <item name="android:layout_height">wrap_content</item>
        </style>
    3. Copy paste the Attached Content.zip to ur systemui/
    This will add the resources,arrays.xml,layout and toggle smali's
    4. SystemUI/res/layout/**** any layout you want.
    add the following in it to load the toggles.
    Code:
    <com.spacey.xperiatabs.toggles.TogglesView android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" />
    5. Now compile the systemui.apk and it should be working ;)
    6. Add the ToggleSettings.apk to system/app

    BUGS:
    1. Data toggle Possibly working not sure yet
    2. DONT! change any png names or string names etc it wont work ;)
    3. Profile Picture and Name are set blank if u select it pres sthe toggle and edit it to ur name and a picture. the picture will appear if you reboot.

    CREDITS:
    • AuliaYF
    • AOKP
    • CM
    • TentenPonce
    • TuxKids
    • Aryne
    • Potato Bro's
    • MOSP team
    • SonyXperiaZ2 for toggle pngs :p
    • Dedy Prayetno
    • SpaceCaker ofcourse!

    Attachements:
    Content.zip dl link https://dl.dropboxusercontent.com/u/56034188/toggles/sp/ContentV9.zip
    or see bottom of post for attached zip

    ToggleSettings dl link https://dl.dropboxusercontent.com/u/56034188/toggles/sp/ToggleSettings.apk
    or see bottom of post for attached apk
    14
    CHANGELOG:
    • V9 Ninth release:
    • 10 new toggles! Yeah you heard it right !!! 10 NEW TOGGLES!
    • Play/Pause, Previous, Next Music buttons.
    • Cpu Toggle ( shows current cpu speed, update on press)
    • Profile Toggle ( Change name and Picture)
    • Reboot toggle
    • Battery toggle
    • Troll toggle
    • Flash Toggle
    • Sleep Toggle
    • Scrollview fixation.
    • Some bugfixes
    • More ??
    • V8 Eight release:
    • Private release this was for testers.
    • Unreleased on XDA
    • V7 Seventh release:
    • Add New Weather Toggle ( Need Google News And Weather app installed Also known as GenieWidget.apk)
    • Add Volumes Toggle ( Work In Progress ;P )
    • Brightness Popup Touch outside dialog will close it
    • Small Bug Fix
    • V6 Sixth release:
    • Possible Data on/off fix ( hope it works properly :p )
    • Fix Single time open Settings,Control and Brightness only.
    • Small Bugfixes in toggle code.
    • V5 Fifth release:
    • Add Brightness Toggle.
    • Layout fix for 2row toggles
    • Brightness Slider PopUp (MUAHHAHAHA Tricky way of doing it but works lol)
    • FC fix
    • V4 Fourth release:
    • Toggle Layout
    • Toggles JB switch look feel or 4 Row normal toggles
    • V3 Third release:
    • Added Reorder method. special thanks to Dedy :)
    • V2 Second release:
    • Added JB api version for collapsestatusbar
    • now on 4.1+ it will close statusbar onlongclick and settings/control toggle click aswell
    • V1 Initial Release:
    • firstbuild

    FAQ:
    • Weather widget not working???:
    • This is possible cause of you not having set up ur location in Google News and Weather app.
    • You also might not have GenieWidget.apk installed. Try the attached apk ;)
    • Profile Picture not working or updating???:
    • This is being worked on as of now reboot device or restart systemui to apply change.
    2
    Reserved for some crazy modification if ever I have :D
    2
    sir..When I opened the brightness, adjust the button has been in the center of the progress bar...

    Thats fiz for next update

    I added on accident android:progress 50 so it will be in center
    But you can adjust brightness
    So it works fine

    Its all still being worked on so dont worry ;)

    Sent from my C5303 using XDA Free mobile app
    2
    Is this workin on galaxy. Y ? Cause i see in first page it work for 4.1+

    2.3+
    Its tested on 2.3/4.1.2/4.3/4.4
    So its working for all 2.3+ versions ;)

    Sent from my C5303 using XDA Free mobile app