[MOD][HOW-TO] Add Flashlight quick toggle [4.3|4.4] - Sprint Samsung Galaxy S III

Hey guys! Today I'll be showing you how to add the Flashlight toggle to your quick toggles:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
UPDATE: Once you have completed the mod below, you (and your users) can enable the flashlight toggle by flashing the zip HERE. It uses busybox and an included binary to add the toggle to notification_panel_active_app_list, so it will work with all devices that this mod applies to. Again, feel free to share this but give credits where due!
Items you will need
SystemUI.apk from the rom you are modding
SecSettings.apk from the rom you are modding
Notepad++ or another text editor of your choice (NOT regular Notepad, it messes up the encoding)
apktool or baksmali+smali or VTS, etc
Click to expand...
Click to collapse
Items you will need
Step 1: Modding SystemUI.apk
Step 2: Modding SecSettings.apk
Click to expand...
Click to collapse
Now before we get started, download the attachment with the files you will need for this mod (attached to this post...make sure you grab the right version for the system you are modifying)
Now lets get started!
[size=+1]Step 1: Modding SystemUI.apk[/size]
Decompile SystemUI.apk and navigate to com/android/systemui/statusbar/policy/quicksetting in your file browser
Copy and paste FlashlightQuickSettingButton.smali from inside the zip you downloaded (flashlight_files.zip/SystemUI/FlashlightQuickSettingButton.smali) into this folder
Navigate to SystemUI/res/drawable-xhdpi (or SystemUI/res/drawable-xxhdpi depending on your device)
Copy and paste the two pngs (tw_quick_panel_icon_flashlight_off.png and tw_quick_panel_icon_flashlight_on.png) from the SystemUI folder of the attachment into the decompiled drawable folder you opened above
Now navigate to SystemUI/res/values and open the strings.xml with your text editor
Search for "quickpanel_flashlight_text". If it does not exist anywhere in the file, add this to the bottom of your strings.xml file:
PHP:
<string name="quickpanel_flashlight_text">Flashlight</string>
That's it or SystemUI! Now recompile SystemUI.apk and move on to step 2. At this point, the toggle will show up in the full toggles view (when you add ";Flashlight" to the CscFeature... or to the notification_panel_active_app_list in /data/data/com.android.providers.settings/settings.db) in the status bar, but Settings will FC if you try to go into edit mode/rearrange toggles mode
Click to expand...
Click to collapse

[SIZE=+1]Step 2: Modding SecSettings.apk[/SIZE]
Decompile SecSettings and navigate to com/android/settings
Open NotificationPanelMenu.smali and search for the method ".method private makeConvertPanelName"
Make sure that the following lines are present somewhere in the makeConvertPanelName method. Notice that they are NOT the same, but indeed very similar.
Code:
iget-object v0, p0, Lcom/android/settings/NotificationPanelMenu;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string v1, "Flashlight"
const-string v2, "notification_panel_flashlight"
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
[B]AND[/B]
iget-object v0, p0, Lcom/android/settings/NotificationPanelMenu;->mConvertPanelItemstring:Ljava/util/HashMap;
const-string v1, "notification_panel_flashlight"
const-string v2, "Flashlight"
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
If the 8 lines above are not anywhere in the
Code:
makeConvertPanelName
method, then add them to the end of the method before the
Code:
return-void
Now save the file and close it and navigate to SecSettings/res/values/strings.xml
Add the following line to your strings.xml if it does not already exist (yes, it has the same name as the image. That's supposed to happen so don't worry)
PHP:
<string name="notification_panel_flashlight">Flashlight</string>
Save and close strings.xml and navigate to SecSettings/res/drawable-xhdpi or drawable-xxhdpi depending on your device
Extract the notification_panel_flashlight.png from attachment.zip/SecSettings and copy it into the drawable folder from above
Finally, recompile SecSettings with your modifications
Click to expand...
Click to collapse
Now for the final step, take your modified SecSettings.apk, SystemUI.apk and add them to the /system/app folder of your rom and you are good to go!
Congratulations, you just added the Flashlight toggle to your rom. Enjoy
Note: Devs are free to use this mod in their rom. Just make sure you give credits where they are due
If you have any issues, I'd be more than happy to help :good:
Thanks to:
Samsung for the AT&T base code this was pulled from!
Rompnit for finding the at&t code and the first part of the mod!
Google for the wonderful logcat tool built into Android that allowed me to figure out the second part of the mod!!

Nice! Thanks so much for spelling it out. I'll be running through this tomorrow. Cheers. :thumbup:
Sent from my SPH-L710 using xda premium

Thanks man you are awesome! !!!!!
Sent from my SPH-L900 using Xparent Green Tapatalk 2

Very nice man. I'll get this added next weekend.

Thanks CNexus, great tutorial.

Thanks dude, I will be trying this tomorrow. Greatly appreciated
Sent from my SPH-L900 using XDA Premium 4 mobile app

Thank you bro! Just wish we had a simple flashable mod or xposed mod but since these are based off unique res, it is not possible (well somewhat, but it can be too buggy). Sucks we have to go through this. Lazy ass me lol.
Sent from my SGH-M919 using XDA Premium 4 mobile app

Nice work.. Thanks
Sent from my SCH-I535 using Tapatalk

CNexus said:
Hey guys! Today I'll be showing you how to add the Flashlight toggle to your quick toggles:
[SIZE=+1]Now before we get started, download the attachment with the files you will need for this mod (attached to this post...scroll down)[/size]
Now lets get started!
Click to expand...
Click to collapse
Great Job OP...
Sent from my SM-N900P using XDA Premium 4 mobile app

I've gotten as far as step 10
Code:
Now navigate to com/android/systemui/statusbar/policy/quicksetting and open FlashlightQuickSettingButton.smali with your text editor
but can't find FlashlightQuickSettingButton.smali there. Using AndroidMultitool. Will try again with different decompiled app.:good:

baseballfanz said:
I've gotten as far as step 10
Code:
Now navigate to com/android/systemui/statusbar/policy/quicksetting and open FlashlightQuickSettingButton.smali with your text editor
but can't find FlashlightQuickSettingButton.smali there. Using AndroidMultitool. Will try again with different decompiled app.:good:
Click to expand...
Click to collapse
You added that file into that folder in step 2.

baseballfanz said:
I've gotten as far as step 10
Code:
Now navigate to com/android/systemui/statusbar/policy/quicksetting and open FlashlightQuickSettingButton.smali with your text editor
but can't find FlashlightQuickSettingButton.smali there. Using AndroidMultitool. Will try again with different decompiled app.:good:
Click to expand...
Click to collapse
See below. You either skipped a step or misread it or something
MetalMan2 said:
You added that file into that folder in step 2.
Click to expand...
Click to collapse

I did add the two files but might have added them to the wrong folder. I'll try it again with the other folder.
Thanks guys.

baseballfanz said:
I did add the two files but might have added them to the wrong folder. I'll try it again with the other folder.
Thanks guys.
Click to expand...
Click to collapse
It's 3 files you need to add. The flashlight smali file into the quicksettings folder in SystemUI/smali/... and the two pngs into res/drawable.

Can you make a flash zip?
Sent from my SPH-L710 using xda app-developers app

Small question Cnexus..
I believe this sceenshot to be the incorrect way.
Or do i just replace the "0x0" the the id# of 0x........ ?
Thanks for the tut and the Help
https://www.dropbox.com/s/3nl68ro9cmfucgu/Screenshot 2014-01-20 19.16.36.png

jlyle said:
Small question Cnexus..
I believe this sceenshot to be the incorrect way.
Or do i just replace the "0x0" the the id# of 0x........ ?
Thanks for the tut and the Help
https://www.dropbox.com/s/3nl68ro9cmfucgu/Screenshot 2014-01-20 19.16.36.png
Click to expand...
Click to collapse
Don't know if you figured it out yet, but the screenshot is wrong. I just got this working on the synergy rom. Just the "0x0" with whatever corresponds to it, like 0x154whatever

jlyle said:
Small question Cnexus..
I believe this sceenshot to be the incorrect way.
Or do i just replace the "0x0" the the id# of 0x........ ?
Thanks for the tut and the Help
https://www.dropbox.com/s/3nl68ro9cmfucgu/Screenshot 2014-01-20 19.16.36.png
Click to expand...
Click to collapse
You replace each 0x0 with the corresponding id

jorv976 said:
Can you make a flash zip?
Sent from my SPH-L710 using xda app-developers app
Click to expand...
Click to collapse
I made this one for the synergy rom, I think you'll still have to use this guide to do the rest, but that's all on the phone and real simple
http://d-h.st/Zqx

Related

[MOD] Stock Messaging with increased maximum size and recipients.

500 RECIPIENTS AND 500 MAXIMUM CHAINED SMS!
Click to expand...
Click to collapse
Just made a small mod for mms.apk that allows you to:
-write longer sms without converting to mms, 500 chained sms up from the 4 of stock application!
-add up to 500 recipients, from 10 of the stock application!
Click to expand...
Click to collapse
Installing is very simple, and you have 2 ways of doing it:
-Flash provided update zip with cwm or rzrecovery;
-Copy provided mms.apk into /system/app and give it permissions like in this screenshot:
it will work on all roms, but they must be deodexed!
Click to expand...
Click to collapse
SCREENSHOTS:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
LINKS:
-Update Zip
-Mms.apk
Click to expand...
Click to collapse
As always, I'm not responsible if you brick your phone, and a Thanks is always appreciated
ENJOY!
Click to expand...
Click to collapse
Nice! I have done this mod on my custom rom, still in wip...Have u tried the mod to have sent time instead of the recevied time?
bagux said:
Nice! I have done this mod on my custom rom, still in wip...Have u tried the mod to have sent time instead of the recevied time?
Click to expand...
Click to collapse
I read about it, probably I'll add it in the near future (as soon as I have time to look into it!)
Great! I did one myself, with infinite contact limit and infinite max sms ), just a suggestion : write the tutorial/howto/guide to help the other beginners, or if you can't, I'll write one in the near future.
Oh and is this mod for a deodexed/odexed rom?
reidzeibel said:
Great! I did one myself, with infinite contact limit and infinite max sms ), just a suggestion : write the tutorial/howto/guide to help the other beginners, or if you can't, I'll write one in the near future.
Oh and is this mod for a deodexed/odexed rom?
Click to expand...
Click to collapse
I am a beginner myself and followed a guide around XDA
It will work only on deodexed I think
reidzeibel said:
Great! I did one myself, with infinite contact limit and infinite max sms ), just a suggestion : write the tutorial/howto/guide to help the other beginners, or if you can't, I'll write one in the near future.
Oh and is this mod for a deodexed/odexed rom?
Click to expand...
Click to collapse
HOW TO - For Developers
Change the AutoConverting (500)
In /res/xml/mms_config.xml change the following values at line 19:
Code:
<int name="smsToMmsTextThreshold">4</int>
to:
Code:
<int name="smsToMmsTextThreshold">500</int>
Increase Contacts adding for the message (500)
In /res/xml/mms_config.xml change the following values at line 19:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">500</int>
Display Sent Time instead of the Received Time
In /smali/com/android/mms/transaction/SMSReceiverService.smali change the following values at line 589:
Code:
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
to:
Code:
invoke-virtual {p1}, Landroid/telephony/SmsMessage;->getTimestampMillis()J
And change the following values at line 2383:
Code:
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
to:
Code:
invoke-virtual {v0}, Landroid/telephony/gsm/CbMessage;->getTimestampMillis()J
For deodexted only
I hope it clear
Regards
The tutorial has already posted by rio, you can use it on a non-deodexed (odexed) ROM, but you won't be able to change the sent time to received time. I did on my Stock DXLA2 ROM, odexed, no smali editing.
Here's what I did (after doing a nandroid backup) :
-decompile the mms.apk using apktool, (you will need twframework-res.apk as the Framework file for apktool -> "apktool -if twframework-res.apk")
-Edit the values, save
-recompile the mms.apk
-the tricky part : open the recompiled mms.apk with 7 zip and original mms.apk, drag the modified mms_config.xml file from recompiled apk to original apk, push the modified original apk to your phone, reboot.
-If it's still doesn't work, clear data and clear cache from Settings->Manage Applications, don't worry your messages won't be deleted, but do create a backup beforehand.
And I think you can use the mod on every ROM, either odexed or deodexed, but for the odexed rom, you have to install it manually :
- rename/delete (don't forget to backup) the mms.apk and mms.odex file,
- and replace it with the mms.apk to the system/app folder.
Correct me if I'm wrong
This is what I really was looking for This options should be configurable by default, other Samsung non-Android I had were the same...
Oh god, thanks!
The apk provided force closes on my DXLM3. Any updated mms.apk?
Rio Saputro said:
HOW TO - For Developers
Change the AutoConverting (500)
In /res/xml/mms_config.xml change the following values at line 19:
Code:
<int name="smsToMmsTextThreshold">4</int>
to:
Code:
<int name="smsToMmsTextThreshold">500</int>
Increase Contacts adding for the message (500)
In /res/xml/mms_config.xml change the following values at line 19:
Code:
<int name="recipientLimit">10</int>
to:
Code:
<int name="recipientLimit">500</int>
Display Sent Time instead of the Received Time
In /smali/com/android/mms/transaction/SMSReceiverService.smali change the following values at line 589:
Code:
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
to:
Code:
invoke-virtual {p1}, Landroid/telephony/SmsMessage;->getTimestampMillis()J
And change the following values at line 2383:
Code:
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
to:
Code:
invoke-virtual {v0}, Landroid/telephony/gsm/CbMessage;->getTimestampMillis()J
For deodexted only
I hope it clear
Regards
Click to expand...
Click to collapse
Great work indeed....
Is cm9 deodexed?
Sent from my GT-I8150 using xda app-developers app
Hi all,
First, I have original samsung rom and have a root access on my galaxy s3.
I couldn't open the update zip via cwm. How can I open the zip file via cwm.
And also couldn't install mms.apk under /system/apk it gives error.
Sent from my GT-I9300 using xda app-developers app
billypostman said:
Hi all,
First, I have original samsung rom and have a root access on my galaxy s3.
I couldn't open the update zip via cwm. How can I open the zip file via cwm.
And also couldn't install mms.apk under /system/apk it gives error.
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
Well of course, this is for the Galaxy Wonder!
So do you have any idea for Samsung Galaxy SIII ?
How can i remove the 10 recipient limit?
Thanks.
Edit:
Allright, I found the right topic.
http://forum.xda-developers.com/showthread.php?t=1113854
Any way to uninstall?

[Mod][ICS] How to add Sense Recent App "Multitasking" !

Hello all,
This is only for ICS Samsung ROMs.
"-" means Delete.
"+" means Add
Decompile framework-res.apk and modify res/values/dimen.xml
Code:
- <dimen name="thumbnail_height">120.0dip</dimen>
+ <dimen name="thumbnail_height">229.0dip</dimen>
- <dimen name="thumbnail_width">120.0dip</dimen>
+ <dimen name="thumbnail_width">144.0dip</dimen>
and that's it for framework-res.apk, you can compile it now.
Decompile SystemUI.apk and modify:
Code:
res/values/drawables.xml
- <item type="drawable" name="status_bar_recents_background_solid">#b3000000</item>
+ <item type="drawable" name="status_bar_recents_background_solid">#00000000</item>
- <item type="drawable" name="status_bar_recents_app_thumbnail_background">#88000000</item>
+ <item type="drawable" name="status_bar_recents_app_thumbnail_background">#00000000</item>
Code:
res/values/strings.xml <<------(Adding only)
+ <string name="recent_apps_title">Recent apps</string>
smali/com/android/systemui/recent/RecentsPanelView.smali <<------(Adding only)
Search for:
Code:
invoke-virtual {v2, v1}, Landroid/widget/ImageView;->setImageMatrix(Landroid/graphics/Matrix;)V
and add after the line mentioned above
Code:
+ iget-object v2, p1, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
+ const/high16 v3, 0x41a0
+ invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setRotationY(F)V
Now download the attachment file "GanGs_Kid_res.zip" and unzip it
then copy the the content of "res" folder into "res" folder inside the decompiled SystemUI file
click yes for replacement.
and that's it for SystemUI.apk, you can compile it now.
BTW my Kitchen "GanGs_KiD_Kitchen" can do it for you automatically.
credit to:
BigShix
If you liked my work encourage me by small donation HERE .... and if you will not...please click Thanks button.
The xml files in the attachment seem to be compiled versions. Dont you need the uncompiled ones to add to SystemUI before compiling again?
Sent from my GT-I9100 using Tapatalk 2
finch.****break said:
The xml files in the attachment seem to be compiled versions. Dont you need the uncompiled ones to add to SystemUI before compiling again?
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
Thank you.
In fact they are "decompiled versions" because you will decompile SystemUI.apk and copy them back to it hope you get it.
GanGs_KiD said:
Thank you.
In fact they are "decompiled versions" because you will decompile SystemUI.apk and copy them back to it hope you get it.
Click to expand...
Click to collapse
I didnt find decompiled versions in the attachment, thats why my previous post. I found only compiled xml files.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I dont have my laptop to check. Screenshots are using my phone.
Sent from my GT-I9100 using Tapatalk 2
finch.****break said:
I didnt find decompiled versions in the attachment, thats why my previous post. I found only compiled xml files.
I dont have my laptop to check. Screenshots are using my phone.
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
Please check it with your laptop even when I opend it with my phone it showed as decompiled !!
I think there is smoe error at your phone or at the app you'r trying to use.
Does it work with odex rom ?
Envoyé depuis mon GT-I9100 avec Tapatalk
Thanx alot man
I will try it
by the way .. the name looks familiar to me
are you the same person on ce4a.......
anyway THANX
Hi and thank you for your job
I tried with success to modify my systemui and framework-res
I have only some fc when I press right botton to exit from the multitasking without cancell recents app.
It's only for me?
Thanks again and excuse me for bad english
kollyns said:
Does it work with odex rom ?
Envoyé depuis mon GT-I9100 avec Tapatalk
Click to expand...
Click to collapse
No , because you need to modify the smali file
252gt said:
Thanx alot man
I will try it
by the way .. the name looks familiar to me
are you the same person on ce4a.......
anyway THANX
Click to expand...
Click to collapse
U R welcome hope it works fine with you
There is only one GanGs_KiD here and there I am a former cooker and a new teacher....Just kidding
.malo2000 said:
Hi and thank you for your job
I tried with success to modify my systemui and framework-res
I have only some fc when I press right botton to exit from the multitasking without cancell recents app.
It's only for me?
Thanks again and excuse me for bad english
Click to expand...
Click to collapse
I think it's only happened with you...but can you tell me which Rom did you modify?
Tnx , and BTW me 2 I have a bad english
GanGs_KiD said:
I think it's only happened with you...but can you tell me which Rom did you modify?
Tnx , and BTW me 2 I have a bad english
Click to expand...
Click to collapse
I'm on a costum rom based on wanam lp9...After the mod I have lost lidroid bar Can I implement it again?
Thank you again for your job
.malo2000 said:
I'm on a costum rom based on wanam lp9...After the mod I have lost lidroid bar Can I implement it again?
Thank you again for your job
Click to expand...
Click to collapse
It should not effect lidroid bar ! but I think it's better if you asked wanam about this situation because he is the one that modified lidroid Mod for ICS so he will be the expert.
GanGs_KiD said:
It should not effect lidroid bar ! but I think it's better if you asked wanam about this situation because he is the one that modified lidroid Mod for ICS so he will be the expert.
Click to expand...
Click to collapse
Ok, I try with an other rom and it's perfect thank you again
Inviato dal mio GT-I9100 usando Tapatalk
Im a noob, can some one make it as an flashable zip,so i can install it on remix.ics ROM, thanks in advance
from raj's s2
sanghaviraj said:
Im a noob, can some one make it as an flashable zip,so i can install it on remix.ics ROM, thanks in advance
from raj's s2
Click to expand...
Click to collapse
framework-res.apk + SystemUI.apk required.
finch.****break said:
framework-res.apk + SystemUI.apk required.
Click to expand...
Click to collapse
I have requested this on the remix ROM thread
from raj's s2
It's not possible one zip for all rom any rom has a different framework-res and systemui from each other. You can do it by yourself or ask to someone to do it for you, but you have to give him your framework-res and systemui
Very useful
Enviado desde mi GT-I9100 usando Tapatalk 2
can this be done for framwork in cyanogenmod roms?
bluefa1con said:
can this be done for framwork in cyanogenmod roms?
Click to expand...
Click to collapse
In fact it can be done....with the same steps....but you need different "res" folder.
I never used CM before so I can not provide to you the "res" folder...sorry
Excuse me again....any fix for the landscape mode? it doesn't work :'(

[GUIDE] Font size in touchwiz ICS roms

So I've had some requests to recreate the edit to re-enable user selection of font size in the touchwiz Ice Cream Sandwich builds. I am not on touchwiz that much so I thought I would share it with the rest of the community in hopes that those who do put more time into touchwiz could incorporate it into their roms for everyone to use.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The edit is actually quite easy, as the preference is simply being hidden in java. With that said, you need Settings.apk, smali/baksmali, adb knowledge, and some text editor
Instructions:
Pull Settings.apk from your phone. If you're cooking this into a ROM then obviously just grab Settings.apk from /system/app
Code:
adb pull /system/app/Settings.apk
Note: This assumes you are editing from a deodexed build. If you have an odexed ROM you can deodex your apk, make your changes, and then reodex.
Next you'll want to open the apk and pull out classes.dex. You can ultimately use apktool as well if it will work for you. I've been having some problems with classes and apktool on occasion and find baksmali to be a sure way to get it right. One you have classes.dex decompile it.
Code:
java -jar baksmali-x.xx.jar -o <[B]output directory[/B]> classes.dex
This will give you a decompiled smali output in the directory you used in bold above.
Navigate without the out folder to /com/android/settings/DisplaySettings.smali and open it with a text editor.
Look for the following, and remove the line in red from DisplaySettings.smali:
Code:
iget-object v0, v0, Lcom/android/settings/DisplaySettings;->mFontSizePref:Landroid/preference/ListPreference;
move-object/from16 v21, v0
[COLOR="Red"]invoke-virtual/range {v20 .. v21}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z[/COLOR]
And that's the hard part. =P Now recompile the classes for your Settings.apk.
Code:
java -Xmx512M -jar smali-x.xx.jar <output from above> -o newclasses.dex
Rename newclasses.dex to classes.dex,you'll have to delete your original if you're in the same folder, and move the new compiled classes.dex back into Settings.apk.
Push Settings.apk back to your phone.
Code:
adb push Settings.apk /system/app
Change your font size in menu>settings>display
Hope this helps some of you and I look forward to seeing more ROMs with font sizes! =P
Great find and thanks for posting the guide! Did you ever find the edit to remove the AM/PM from the status bar?
dtm_stretch said:
Great find and thanks for posting the guide! Did you ever find the edit to remove the AM/PM from the status bar?
Click to expand...
Click to collapse
Haven't looked much on ICS TouchWiz yet.
whenever i try to use your method or apktool i get error when decompling. I'm able to decompile other apks like SystemUI.apk just fine. Any ideas?
graphic1982 said:
whenever i try to use your method or apktool i get error when decompling. I'm able to decompile other apks like SystemUI.apk just fine. Any ideas?
Click to expand...
Click to collapse
Yeah, some samsung apps don't recompile correctly with apktool. This is why I used baksmali to decompile instead.
still getting error when using baksmali
graphic1982 said:
still getting error when using baksmali
Click to expand...
Click to collapse
Have you tried the newest baksmali?
Sent from my SPH-D710 using xda premium
newest baksmali solved the issue. Also you may want to edit instructions to say delete every instance of the line in Displaysettings.smali. I only deleted it one time the first time i tried and the font size option didn't show up in settings>display. After I went back and deleted every instance of that line from the file it worked. Awesome job on showing how to do this mod and thanks for the help with my troubleshooting.
graphic1982 said:
newest baksmali solved the issue. Also you may want to edit instructions to say delete every instance of the line in Displaysettings.smali. I only deleted it one time the first time i tried and the font size option didn't show up in settings>display. After I went back and deleted every instance of that line from the file it worked. Awesome job on showing how to do this mod and thanks for the help with my troubleshooting.
Click to expand...
Click to collapse
Interesting. I'll look into it, thanks. All the ones I've posted for people here I've just re enabled the first list preference. Worked for me too when I tested it on fe16 and haven't heard otherwise for the few people that have downloaded the apk. But I'll double check just to be sure.
Sent from my SPH-D710 using xda premium
Anyone willing to provide a modified Settings.apk for download?
Dint even realize it was missing.
Thanks for showing everybody and creating a how to.
I will do this later this week.
i717 running Seraphim Stratosphere Collective ICS with tapatalk2
Default ICS Launcher ?
Does this work with the Default ICS Launcher ? Or can someone tell me where to find the settings in the ICS Launcher
Thank you
Curtisp said:
Does this work with the Default ICS Launcher ? Or can someone tell me where to find the settings in the ICS Launcher
Thank you
Click to expand...
Click to collapse
It should. However it doesn't seem to resize touchwiz launcher font. Never tried the ics launcher though.
Sent from my SPH-D710 using xda premium
Works as advertised. Excellent how-to, excellent post. For anyone not wanting to mess around with smali/baksmali, here's a modded Settings.apk from Calkulin's most recent FE22 ROM.
Will it work on sfhub's fe22 stock
Sent from my SPH-D710 using xda premium
Kchitown1977 said:
Will it work on sfhub's fe22 stock
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
It should, I don's see why not. There's only one way to find out. Copy this file to the /system/app directory using Root Explorer or something similar. Back up your own Settings.apk prior to that. If it doesn't work, replace it with the original file.
Kchitown1977 said:
Will it work on sfhub's fe22 stock
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
If you use a deodexed apk on an odex rom, it will work, however, youll want to remove the odex file as well.
S2 OK
Also work on Galaxy S2. Thk.

[NEW][GUIDE][MOD]Team Rejectz Extended Power Menu FI03

I originally didn't post the "how to" on this mod because there are a few ways to accomplish it and I didn't wan't to step anyone's toes or debate about it. But since its been requested to post the guide,here we go...
Firstly there are a few resources you need to download for this MOD. You could just create three new smali's but since they are already done that seems pointless not to mention all of the coding involved. So download the smali resources here;
Extended Power Menu resources-DOWNLOAD HERE
Once you've downloaded those resource smali's , unzip the zip file to your desktop and follow the tree directory till you get to 3 files:
1.GlobalActions$99$1.smali
2.GlobalActions$99$2.smali
3.GlobalActions$99.smali
Now believe it or not all we need to edit (in ICS anyway) is the Android Policy Jar.
1. Open the android.policy.jar (archive) with 7zip and drag out the "classes.dex" to your desktop.
2. Open apktool1.43 or Team RejecZ Quick Fix and baksmali the classes.dex - you should get a classout folder.
3. Go to \com\android\internal\policy\impl and paste the three resource files; (GlobalActions$99$1.smali, GlobalActions$99$2.smali and GlobalActions$99) there with the rest of the smali's.
4.With notepad++ open the GlobalActions.smali. (Note: Don't confuse it with GlobalAction$Action.smali)
**In GlobalActions.smali, go to lines 853 and 859...and change GlobalActions$5 to GlobalActions$99 on both lines, and save it.
**The Code should look like this:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
const v1, 0x108064b
const v2, 0x1040169
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
Click to expand...
Click to collapse
5. Save that smali. Now Open GlobalActions$SinglePressAction.smali with Notepad++. Just above line "# instance fields" lines 17 and 18 place your cursor and hit enter 2 times to make room to paste THIS code;
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
Click to expand...
Click to collapse
6.Still in GlobalActions$SinglePressAction.smali, Go to line 32 (about) and look for the code "direct methods". Place your curser directly behind "direct methods" and hit enter to bring your curser down to the next line. Then paste THIS code:
.method static constructor <clinit>()V
.registers 3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Quick Reboot"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
const/4 v1, 0x3
const-string v2, "Recovery"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
Click to expand...
Click to collapse
(*****Note: If you want to customize your menu , this is where you change the lines to say whatever you want, Just remember to change the boolean name value in your framework-res.apk/values/layout to reflect whatever name you put, or it won't work*****)
7.Recompile (smali) your jar. If you're Using Team RejectZ Quick Fix to edit your Android policy.jar, (which I highly suggest) and if you did everything right, you will get a "new-classes.dex". Rename it to classes.dex and with 7zip, open the archive of the original Android Policy.jar. Then drag and drop the classes.dex you just compiled into the jar. Push the jar to /system/framework using a root explorer, or just use 7 zip to drag and drop it into a flashable zip.
This is exactly how I made this..Send Thanks to this thread that made it possible for me to port it HERE. Make sure that you've made a NANDROID BACKUP prior to flashing this. Also remember to make sure that your spaces are in line and that there are no typos. Please don't ask me to help you with this mod if you are having trouble, this guide is the best help I can give. Below I have compiled an FI03 version for you to use and/or compare with the mod you're trying to make. I also added CRT off with my mod when I compiled (smali'd) it. Good Luck and Enjoy!!
FI03 Team RejectZ Extended Power Menu/CRT off
Team RejectZ Extended Power Menu FI03
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Team RejectZ Extended Power Menu FI03​
Thanks to mengpo from the Galaxy Tab 7 forum for the guide I used to help me port this MOD** Check out his link and thank him http://forum.xda-developers.com/showthread.php?t=1900424
Warning: This was made from Stock FI03 android policy jar. I recommend using this mod with FI03
This will replace your android.policy.jar. A nandroid back up is always recommended prior to flashing anything.
Directions:
1. Download Team RejectZ Extended Power Menu zip to your SD card.
2. Boot into Recovery. Wipe Cashe, Wipe Dalvik Cashe
3. Navigate to where you saved the zip on your sd card and flash. Reboot, enjoy!
What? No one likes the extended power menu???
timmetal6669 said:
What? No one likes the extended power menu???
Click to expand...
Click to collapse
Thank you!!! I was gonna post in q&a asking how to get CRT on a stock Rom. Good thing I looked in here first. Very much appreciated
Sent from my PG86100 using Tapatalk 2
---------- Post added at 08:42 PM ---------- Previous post was at 07:55 PM ----------
Just reporting back. It seems it doesn't work. It booted up fine after the flash but no crt no extended power menu either. I'm running stock rooted fi03 odexed
Sent from my SPH-D710 using Tapatalk 2
dr.chucky said:
Thank you!!! I was gonna post in q&a asking how to get CRT on a stock Rom. Good thing I looked in here first. Very much appreciated
Sent from my PG86100 using Tapatalk 2
---------- Post added at 08:42 PM ---------- Previous post was at 07:55 PM ----------
Just reporting back. It seems it doesn't work. It booted up fine after the flash but no crt no extended power menu either. I'm running stock rooted fi03 odexed
Sent from my SPH-D710 using Tapatalk 2
Click to expand...
Click to collapse
This isn't the crt mod. That is in framework res. I could post it, but I've already got it on my.rom. If you would like to.make the crt mod yourself, workload the latest version of java. Download the team rejects quick fix, and the java jdk ,,7 zip, NotePad ++, and Android sdk. Pull your framework res from your stock rom with root explorer. Put it on your desktop. Load the framework in the apktool-if.cmd. Decompile it with quick fix quick decompile. It will make a framework res folder. Go to framework res/res/values/bools.xml. Find the line that says animate screen lights. Change the value to false. Recompile . Go back to the framework res folder. Inside you'll see a folder named dist. In there is your new apk. Open the new framework res apk archive with 7 zip. Now open the original framework res apk with 7 zip and drag the meta-inf folder from the old apk to your new one. Close the archives and push your new framework-res to your /system/ framework folder on your phone. Set the permissions and reboot. You now have crt mod.
Ps, i have crt mod, 360degree rotation /rotating lockscreen, centered lockscreen clock, aosp lockscreen and many more mods in the fi03 black rom thread in the dev section... Or just click Here.
Yep, I just downloaded the mod in the black rom thread. Btw in the title it also says crt off which is why I came to this thread. But thanks foe your help. Finally got everything working.
Sent from my SPH-D710 using Tapatalk 2
dr.chucky said:
Yep, I just downloaded the mod in the black rom thread. Btw in the title it also says crt off which is why I came to this thread. But thanks foe your help. Finally got everything working.
Sent from my SPH-D710 using Tapatalk 2
Click to expand...
Click to collapse
You're right, I was getting confused with some framework res mods i was making at the same time. I edited three OP, Thanks. So which mod did you end up using?
Looking awesome. I missed the extended power options.
Sent from my SPH-D710 using XDA
Nice to see some actual mods/themes etc in this section again. Seemed to turn into a second Q&A kinda for a while. Good work.
Sent from my SPH-D710 using xda premium
Nice job. I'm using it on a beta I'm testing out.
timmetal6669 said:
What? No one likes the extended power menu???
Click to expand...
Click to collapse
Dont pay no attention..... This is the ****!
Sent from my SPH-D710 using xda premium
---------- Post added at 02:53 AM ---------- Previous post was at 02:44 AM ----------
sleshepic said:
Nice to see some actual mods/themes etc in this section again. Seemed to turn into a second Q&A kinda for a while. Good work.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Agreed. Thinking maybe I might just start theming again. I mean, Im no sleshepic, but......who knows. Need to find the time, and an apktool worth a damn.
Sent from my SPH-D710 using xda premium
timmetal6669 said:
You're right, I was getting confused with some framework res mods i was making at the same time. I edited three OP, Thanks. So which mod did you end up using?
Click to expand...
Click to collapse
I'm using the "framework tweaks/camera fix" zip. It's working very well.
Sent from my SPH-D710 using Tapatalk 2
noobtoob said:
Dont pay no attention..... This is the ****!
Sent from my SPH-D710 using xda premium
---------- Post added at 02:53 AM ---------- Previous post was at 02:44 AM ----------
Agreed. Thinking maybe I might just start theming again. I mean, Im no sleshepic, but......who knows. Need to find the time, and an apktool worth a damn.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Hint, Hint.. I keep bumping the Team Rejectz Quick Fix threads for reason.. Honestly the easiest and most reliable way to decompile and recompile. Its all I use really, I can baksmali, smali, decompile and recompile, gb, ics, jb. Try it out for real, totally easy if you follow the instructions
sleshepic said:
Nice to see some actual mods/themes etc in this section again. Seemed to turn into a second Q&A kinda for a while. Good work.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Thanks Sleshepic. That means a lot coming from you bro. This mod wasn't too bad, but it took a bit more effort than say a CRT mod lol. Oh btw, I'm working on another mod that I think you might be interested in that hasn't been ported to this device before. I'm still only somewhat familiar with the specific code for the e4gt and was thinking if you would like to go in on this port with me, that we prolly could get it working... Hit me up on gtalk for more details if you're [email protected]
noobtoob said:
Dont pay no attention..... This is the ****!
Sent from my SPH-D710 using xda premium
---------- Post added at 02:53 AM ---------- Previous post was at 02:44 AM ----------
Agreed. Thinking maybe I might just start theming again. I mean, Im no sleshepic, but......who knows. Need to find the time, and an apktool worth a damn.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Thank you, being I've of the more technical mods, i really v worked hard on it. .i hope everyone can use it and enjoys ..
Just thought Id mention that I've updated this mod to FI27 on the "black" rom thread in the DEV section.
g_ding84 said:
Looking awesome. I missed the extended power options.
Sent from my SPH-D710 using XDA
Click to expand...
Click to collapse
Shoot, I can't live without them.. I'm flashing all the time lol
A how to would make this mod a lot more appealing...
Sent from my SPH-D710 using xda premium
Mattix724 said:
A how to would make this mod a lot more appealing...
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
I was just waiting for someone to ask. Gimme an hour to get the kids down to bed and its coming right up!
EDIT: Guide has been posted!
Thanks. I'll definitely be giving this a try now.
Sent from my SPH-D710 using xda premium
Mattix724 said:
Thanks. I'll definitely be giving this a try now.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
Awesome

(Guide)How to Make Hidden DateView like CM10 on stock GB 2.3+

spacecaker said:
Hello guys
after trying this for a long time i finally managed it
this modification will hide the dateview tag in statusbar so it will be fullscreen on expanded
it will look something like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
First Step :
1. you must know how to decompiling/compiling apk
2. knowledge about editing smali/xml
3. you must have apktool/apkmanager
Second Step :
1. Pull your SystemUI.apk and Framework-res.apk
2. Do if framework on apktool/apkmanager
3. Decompile your SystemUI.apk and open statusbarservice.smali​
1. Find this line :
Code:
.method getExpandedHeight
and delete
Code:
iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/StatusBarView;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/StatusBarView;->getHeight()I
move-result v1
sub-int/2addr v0, v1
Now Find this line.
Code:
const v4, 0x20300
above it u will see
Code:
const/16 v3, 0x7de
change it to:
Code:
const/16 v3, 0x7d3
now find
Code:
method onTrackingViewAttached
then find
Code:
const/16 v1, 0x7de
change it to this:
Code:
const/16 v1, 0x7d3
now find these
Code:
.line 1388
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/StatusBarView;
invoke-virtual {v8}, Lcom/android/systemui/statusbar/StatusBarView;->getHeight()I
move-result v3
and delete them.​
now find
Code:
.line 1410
:cond_2
and under it paste
Code:
const/4 v3, 0x0
now compile the apk and it should work
also if this guide isnt clear enough
check this https://github.com/spacecaker/git_status_xp/commit/59a39cd9181cf5241960c105e3d3fb607ce9a59a
Special Thanks to:
JMKL SIX
Rizaleon
Petrukgrinder​
Click to expand...
Click to collapse
Epic right ?
Very usefull
Such a big task just for a small thing, but worth it!
Nice work bro..:thumbup:
So this remove the notification text. Thanks
Send from Batman's Bat- Phone
Good job space! This will make those jb stock roms get more and more to the original!
Sent from my GT-S5830 using xda app-developers app
You get me it guide from GitHub, is it?
Thanks for post it on xda
Sent from my GT-S5830i using xda app-developers app
misha1996 said:
You get me it guide from GitHub, is it?
Thanks for post it on xda
Sent from my GT-S5830i using xda app-developers app
Click to expand...
Click to collapse
i modded my files and after i git diffed the changes
Sent from my S500 using xda app-developers app
It causes a bug on s5830i ROMs of having to pull notification tab in order to see the window when we click on the reboot menu in lidroid toggles.
Do you know any way to fix that?
iamareebjamal said:
It causes a bug on s5830i ROMs of having to pull notification tab in order to see the window when we click on the reboot menu in lidroid toggles.
Do you know any way to fix that?
Click to expand...
Click to collapse
screenshoot or video ?
Sent from my S500 using xda app-developers app
SpaceCaker said:
screenshoot or video ?
Sent from my S500 using xda app-developers app
Click to expand...
Click to collapse
This is what I was talking about :
If we click on Reboot Menu, it should come as a popup above expanded status bar, instead it comes below the expanded status bar
So we have to pull up the status bar to view the reboot menu
When we click on reboot menu:
We have to pull it up to see the menu
iamareebjamal said:
This is what I was talking about :
If we click on Reboot Menu, it should come as a popup above expanded status bar, instead it comes below the expanded status bar
So we have to pull up the status bar to view the reboot menu
When we click on reboot menu:
We have to pull it up to see the menu
Click to expand...
Click to collapse
either modify the lidroid toggle to onclick collapse systemui
otherway i not know atm
you can also use pwoermenu instead of powrbutton in statusbar
remmove it can be a option
spacecaker your the man.... I'm waiting for this mod for a long time. but now the wait is over. thanks mate. i will try it asap
Need A Help =)
Hello Space Why My Statusbar Like This ?:crying:
YawningCat said:
Hello Space Why My Statusbar Like This ?:crying:
Click to expand...
Click to collapse
u added lines at wrong place or forgot some
Sent from my S500 using xda app-developers app
Space, I figured out what was going on. Instead of aptly hiding the date view (status bar), Petruk Grinder had written the code for just changing the layer of popup. First, status bar remained on top of all activities, but with this it is pushed back than notification drawer. So, the windows popup remain behind it.
However I am not a bit good in coding, if you want to fix that bug, you can try editing some code
Thought of just telling you this
Sent from my GT-S5830i using xda app-developers app
Code:
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/StatusBarView;
invoke-virtual {v8}, Lcom/android/systemui/statusbar/StatusBarView;->getHeight()I
move-result v3
I Can't find these?? in Cm7
Instead I found these
Code:
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;
invoke-virtual {v8}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I
move-result v8
How do I proceed?
Edit: Solved by petrukgrinder's Code
Good tutorial, thanks
SpaceCaker said:
u added lines at wrong place or forgot some
Sent from my S500 using xda app-developers app
Click to expand...
Click to collapse
Try to compare your StatusBarService.smali with this
https://github.com/spacecaker/git_status_xp/commit/59a39cd9181cf5241960c105e3d3fb607ce9a59a
just in case you put the codes in wrong line:good:
iamareebjamal said:
Space, I figured out what was going on. Instead of aptly hiding the date view (status bar), Petruk Grinder had written the code for just changing the layer of popup. First, status bar remained on top of all activities, but with this it is pushed back than notification drawer. So, the windows popup remain behind it.
However I am not a bit good in coding, if you want to fix that bug, you can try editing some code
Thought of just telling you this
Sent from my GT-S5830i using xda app-developers app
Click to expand...
Click to collapse
hey bro, can you tell me how to fix that?
chutanh7 said:
hey bro, can you tell me how to fix that?
Click to expand...
Click to collapse
Sorry, I am as bad in smali as bad is Justin Bieber in singing
I only know what's happening in a code and what's happened so I just told here if any of the great minds would be able to think over it and produce some yielding results.
Good work dude, i've waiting so much time for that.

Categories

Resources