[Galaxy Y GT-S5360 General] SpaceCaker:
HOW TO PORT 25 GRID TOGGLES!

With ease!

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:

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

<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

<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

<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.

<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:

Data toggle Possibly working not sure yet

DONT! change any png names or string names etc it wont work ;)

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