[Galaxy Y GT-S5360 General] halnovemila:
Hi all,

this is been published already as post #293 on this thread [GUIDE]How to add lidroid 14 statusbar toggle buttons for Galaxy Y but I thought it should deserve its own thread as for its quite unique contents.

Wi-fi Hotspot is a very useful feature especially for those who have to travel often and want to share the smartphone Internet connection with their laptop.

That's also my case and as I was using this feature many times a day on-off I installed an app (Tethering Widget) that provides a widget button that conveniently toggle the Wi-fi Hotspot just by a single tap instead of having to navigate through the system settings to reach each time the related option.

Beside that the widget worked properly I wasn't happy of the way it looked within the small Galaxy Y screen... like a big black spot :rolleyes:

Though I managed to restyle the widget making it less big and and giving a sort of "aqua" look...

... my wish was to have, for the Wi-fi hotspot, a status bar toggle same as it is for the Wi-fi.

I then found the guide to install the Lildroid 14 statusbar toggle buttons that I successfully followed, but unfortunately no Wi-fi AP button there :(

But I wondered if there was a way to add the Wi-fi AP button to the Lildroid toggles because I've found other Lildroid version ([MOD] SYSTEMUI [Touchwiz Style] [25 lidroid toggles]) that has the Wi-fi AP toggle, but comes with the two tabs layout which requires to switch between notification and toggles and I don't like that.

So I tried myself to add the Wi-fi AP to the Lildroid 14 toggles and here below I explain what I did.

The SystemUI.apk is been deodexed (with xUltimate-v2.3.3) and decompiled (with Apktool) then the StatusBarService.smali file edited as described here:

[GUIDE]How to add lidroid 14 statusbar toggle buttons for Galaxy Y

http://xdaforums.com/showthread.php?t=1511307

Note:The androidmanfest.xml is not been edited (so a Force Close will be triggered when pressing Flashlight button)

Then got the apk files from here:

[MOD] SYSTEMUI [Touchwiz Style] [25 lidroid toggles]

http://xdaforums.com/showthread.php?t=2775728

Decompiled and replaced airplaneButton.smali in the working SystemUI folder with the wifiap*.smali from the apk modded by rio, doing all the required substitutions to make consistent the calls and the data in the smali code (see the attached file ModdedFiles.zip for comparison between the original and the modified smali files).

- Recompiled

- Replaced the classes.dex in the original deodexed SystemUI.apk with the new recompiled classes.dex

- copied the SystemUI.apk with updated classes.dex to the smartphone SDcard via BlueTooth (I don't have JDK installed on my PC system),

- Used Root Explorer app on the phone to do all the following steps:

- moved SystemUI.apk to /data folder so that was possible to set permission to 644 and owner.group to root.root

- deleted SystemUI.odex in /system/app

- brute force replaced the running SystemUI.apk in /system/app folder with the new version with WifiAP toggle (that will trigger a Force Close of the Status bar application)

- Reboot the phone and enjoy the Airplane button that toggle the Wifi Hot Spot service

:D

I made my own installer via CWM recovery (

manually MOUNT SYSTEM

before installing the zip!)... much better than a rude replacement of the SystemUI.apk while in use.

As I did few other small modifications as the following:

- Brightness toggle: removed the Auto brightness mode, as Galaxy Y doesn't have light sensor, and increased the Dim brightness (for more info see here: http://xdaforums.com/showpost.php?p=55598522&postcount=295)

- little "fix" to the status bar silent mode icon (added a missing pixel)

- better toggle buttons background (actually a nicely smooth gradient of the original)

- replaced the Airplane mode toggle icon with a proper icon for the WifiAP toggle

- replaced the Airplane string with WiFi Hotspot in the QuickPanel Settings "Widget buttons" chooser

then in my SystemUI_WiFiAP_CWM_installer.zip I included all the three required apk (that have been zipaligned), not just the SystemUI.apk

ALL THE CREDITS GOES TO THE AUTHORS OF THE ORIGINAL APKs

DISCLAIMER:

This is been a "mod" I did starting from scratch (zero knowledge about deodexing, decompiling, and smali code) in about 30 hours of study, Internet searches, and many trial&errors attempts (though I have some basic programming knowledge).

I made my modded SystemUI.apk available here as attachment to this post (that I'm using already for more than two months), but if you will decide to try it PLEASE KEEP IN MIND THAT IT MIGHT BE BUGGY, there might be some error in the modded code that I'm not aware of and that might eventually affect the smartphone in which it will be installed.

Therefore I DO NOT TAKE RESPONSABILITY for anything that might happen after the modded SystemUI.apk is installed on any smartphone.

Zip for restore stock SystemUI

I made my CWM recovery Zip and I just share it here as attached file Restore_Stock_SystemUI.zip

It copies in system/app folder the original stock SystemUI.apk along with its odex file and delete QuickPanelSettings.apk and lidroid-res.apk.

System partition MUST BE MANUALLY MOUNTED before to start the zip installation (I been too lazy to insert the mount command in the updater-script )

SystemUI.apk and SystemUI.odex are from Galaxy Y stock ROM - Android 2.3.6 build GINGERBREAD.DXMJ1