Hey Galaxy S4 Community! Thought I would post some How-To guides on some features found in my roms and how to enable some features in your rom or on your phone.These would probably benefit rom developers the most, but hopefully they will help everyone to learn a bit! These mods are written for the Galaxy s4 on Android 4.2.2 but most will probably work on other Samsung Galaxy Devices as Samsungs has pretty similar software.
For these Mods you will need basic knowledge about the following tools and skills, i won't go over the processes.
notepad++
apktool
smali/baksmali
How to Enable Camera Shutter Sound Menu
Navigate to system/csc/feature.xml
Find this line:
Code:
<CscFeature_Camera_ShutterSoundMenu>false</CscFeature_Camera_ShutterSoundMenu>
Change false to true
Done!
How to Disable the Backup Assitant Popup in Contacts
Navigate to system/csc/feature.xml
Find this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_EnableBackupAssistance>true</CscFeature_Contact_EnableBackupAssistance>
Change True to false
Done!
Enable (Almost) Unlimited Contact Linking
Navigate to system/csc/feature.xml
Find or add this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_SetLinkCountMaxAs>10</CscFeature_Contact_SetLinkCountMaxAs>
Change 10 value to whatever you want (like 100000 or whatever) that value is the number of linkable contacts
Done!
Enable (Almost) Unlimited Contact Name Length
Navigate to system/csc/feature.xml
Find or add this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_LimitNameLength>1</CscFeature_Contact_LimitNameLength>
Change 1 value to whatever you want (like 100000 or whatever) that value is the max name length
Done!
How to Enable the Exit an Terminate Options in Browser
Navigate to system/csc/feature.xml
Add these lines to the <!-- WEB --> Section:
Code:
<CscFeature_Web_AddOptionToTerminate>true</CscFeature_Web_AddOptionToTerminate>
<CscFeature_Web_EnablePromptToExit>true</CscFeature_Web_EnablePromptToExit>
Done!
How to Enable Almost Unlimited Tabs in Browser
Navigate to system/csc/feature.xml
Add this line to the <!-- WEB --> Section:
Code:
<CscFeature_Web_EnableMaxTabs>10000</CscFeature_Web_EnableMaxTabs>
Done!
How to Enable Full Page Looping in launcher
Navigate to system/csc/feature.xml
Find this line :
Code:
<CscFeature_Launcher_DisablePageRotation>true</CscFeature_Launcher_DisablePageRotation>
Change True to false
Done!
How to Hide an App from the App Drawer
Decompile your apk you want to hide
Navigate to AndroidManifest.xml
Find this line:
Code:
<category android:name="android.intent.category.LAUNCHER" />
Change to:
Code:
<category android:name="android.intent.category.GADGET" />
Now recompile your app, and you have to do one other thing. Whenever editing the AndroidManifest you must resign your app or it will force close. You can use a program like APK-Multi Tool to do this if you want!
How to Enable Full 4 Way (360) Device Rotation
Decompile framework-res.apk with apktool
Navigate to res/values/bools.xml
Find:
Code:
<bool name="config_allowAllRotations">false</bool>
Change To:
Code:
Code:
<bool name="config_allowAllRotations">true</bool>
Save, Compile and You're done
How to make your Rom/Phone Multilanguage
This will enabled about 20-30 extra languages to choose from in settings
Add in the lines so your file looks like this:
Navigae to system/csc/language.xml
Code:
<SamsungMobileLanguage>
<Country>USA</Country>
<CountryISO>en</CountryISO>
<SalesCode>VZW</SalesCode>
<LanguageSet>
<Display>
en_US;en_GB;en_AU;en_IE;en_NZ;en_ZA;ko_KR;de_AT;de_DE;de_CH;fr_FR;fr_CH;
bg_BG;cs_CZ;da_DK;el_GR;es_ES;et_EE;fi_FI;ga_IE;hr_HR;hu_HU;is_IS;it_IT;
lt_LT;lv_LV;mk_MK;nb_NO;nl_NL;nl_BE;pl_PL;pt_PT;ro_RO;sr_RS;sv_SE;tr_TR;
ca_ES;eu_ES;gl_ES;kk_KZ;ru_RU; sk_SK; sl_SI; uk_UA;
az_AZ;hy_AM; ka_GE;
ja_JP;en_PH;in_ID;ms_MY;th_TH;vi_VN;
es_US;pt_BR;
en_CA;fr_CA;zh_CN;
</Display>
<Input>
<SupportList>
en_US;en_GB;az;ca;cs;da;de;et;es;eu;el;fr;gl;ka;hr;it;is;kk;lv;lt;hu;nb;nl;pl;pt;ru;ro;fi;sr;sk;sl;sv;tr;uk;ko;hy;bg;ja;in;ms;th;vi;zh_CN;
</SupportList>
<EnableList>
</EnableList>
</Input>
</LanguageSet>
</SamsungMobileLanguage>
And you're done
How to disable Signature Check
This will disable Signature checking on System Apps
Decompile Services.jar with smali/baksmali
Navigate to: /smali/com/android/server/pm/PackageManagerService.smali
Search For:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
Replace the whole method with this:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const-string p0, "SBreen:"
const-string p1, "Skip signature check"
invoke-static {p0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
const/4 v6, 0x0
return v6
.end method
Save, Recompile and You're done!
How to disable Unplug from USB Turns on Screen
Decompile framework-res.apk
Navigate to res/values/bools.xml
Find
Code:
<bool name="config_unplugTurnsOnScreen">true</bool>
Change to:
Code:
<bool name="config_unplugTurnsOnScreen">false</bool>
Save, Recompile and you're done
Permantly Disable Help Text on Lockscreen
Decompile framework-res.apk
Navigate to res/values/bools.xml
Find
Code:
<bool name="config_isHelpOverlayEnabled">true</bool>
Change to:
Code:
<bool name="config_isHelpOverlayEnabled">false</bool>
Save, Recompile and you're done
Change Low Battery Values
Decompile framework-res.apk
Navigate to res/values/integers.xml
Find:
Code:
<integer name="config_criticalBatteryWarningLevel">5</integer>
<integer name="config_lowBatteryWarningLevel">15</integer>
<integer name="config_lowBatteryCloseWarningLevel">20</integer>
Change To:
Code:
<integer name="config_criticalBatteryWarningLevel">1</integer>
<integer name="config_lowBatteryWarningLevel">5</integer>
<integer name="config_lowBatteryCloseWarningLevel">10</integer>
You can change these to whatever you want but this is what i have.
Save, Recompile and you're done
Add a Custom Help Text to the Lockscreen
Navigate to res/values/strings.xml
Find:
Code:
<string name="lockscreen_unlock_guide_text">Swipe Screen to Unlock.</string>
Change To:
Code:
<string name="lockscreen_unlock_guide_text">HYPERDRIVE</string>
You can change this text to have it say whatever you want on the lockscreen
Save, Recompile and you're done
Hit Thanks if you like these Guides!
Credits/Thanks
DSA
How to Hack Touchwiz Launcher for Insane Speed
This Will greatly increase the Speed of the page swiping and animations on the Stock Samsung Launcher
Decompile SecLauncher3.apk
Navigate to res/values-sw359dp-xxhdpi/integers.xml
Find
Code:
<integer name="page_snap_animation_duration">550</integer>
Change to:
Code:
<integer name="page_snap_animation_duration">320</integer>
The Value in the the integer here refers to the speed that the launcher animates at. The value above is what i use and is very good in my opinion. Feel free to decide what value you like best. You have to be careful not to go to low as it will get very jerky and not smooth. Enjoy!
Save, Recompile and you're done. Enjoy the Super Snappy Launcher
Hopefully More mods to come!
This Post is for Science! Enjoy people
Thank you very much, :good:
sbreen94 said:
This Post is for Science! Enjoy people
Click to expand...
Click to collapse
All in ONE place
Thanx a Lot !!!
Love seeing great devs like sbreen94 sharing and educating devs and new devs alike
Awesome job.
Thanks
sbreen94 said:
Hopefully More mods to come!
Click to expand...
Click to collapse
Dude.......you rock. Pure and simple.
sbreen94 said:
Hey Galaxy S4 Community! Thought I would post some How-To guides on some features found in my roms and how to enable some features in your rom or on your phone.These would probably benefit rom developers the most, but hopefully they will help everyone to learn a bit!
For these Mods you will need basic knowledge about the following tools and skills, i won't go over the processes.
notepad++
apktool
smali/baksmali
How to Enable Camera Shutter Sound Menu
Navigate to system/csc/feature.xml
Find this line:
Code:
<CscFeature_Camera_ShutterSoundMenu>false</CscFeature_Camera_ShutterSoundMenu>
Change false to true
Done!
How to Disable the Backup Assitant Popup in Contacts
Navigate to system/csc/feature.xml
Find this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_EnableBackupAssistance>true</CscFeature_Contact_EnableBackupAssistance>
Change True to false
Done!
Enable (Almost) Unlimited Contact Linking
Navigate to system/csc/feature.xml
Find or add this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_SetLinkCountMaxAs>10</CscFeature_Contact_SetLinkCountMaxAs>
Change 10 value to whatever you want (like 100000 or whatever) that value is the number of linkable contacts
Done!
Enable (Almost) Unlimited Contact Name Length
Navigate to system/csc/feature.xml
Find or add this line under <!-- Contacts -->:
Code:
<CscFeature_Contact_LimitNameLength>1</CscFeature_Contact_LimitNameLength>
Change 1 value to whatever you want (like 100000 or whatever) that value is the max name length
Done!
How to Enable the Exit an Terminate Options in Browser
Navigate to system/csc/feature.xml
Add these lines to the <!-- WEB --> Section:
Code:
<CscFeature_Web_AddOptionToTerminate>true</CscFeature_Web_AddOptionToTerminate>
<CscFeature_Web_EnablePromptToExit>true</CscFeature_Web_EnablePromptToExit>
Done!
How to Enable Almost Unlimited Tabs in Browser
Navigate to system/csc/feature.xml
Add this line to the <!-- WEB --> Section:
Code:
<CscFeature_Web_EnableMaxTabs>10000</CscFeature_Web_EnableMaxTabs>
Done!
How to Enable Full Page Looping in launcher
Navigate to system/csc/feature.xml
Find this line :
Code:
<CscFeature_Launcher_DisablePageRotation>true</CscFeature_Launcher_DisablePageRotation>
Change True to false
Done!
How to Hide an App from the App Drawer
Decompile your apk you want to hide
Navigate to AndroidManifest.xml
Find this line:
Code:
<category android:name="android.intent.category.LAUNCHER" />
Change to:
Code:
<category android:name="android.intent.category.GADGET" />
Now recompile your app, and you have to do one other thing. Whenever editing the AndroidManifest you must resign your app or it will force close. You can use a program like APK-Multi Tool to do this if you want!
How to Enable Full 360 Degree Rotation
Decompile framework-res.apk with apktool
Navigate to res/values/bools.xml
Find:
Code:
<bool name="config_allowAllRotations">false</bool>
Change To:
Code:
Code:
<bool name="config_allowAllRotations">true</bool>
Save, Compile and You're done
How to make your Rom/Phone Multilanguage
This will enabled about 20-30 extra languages to choose from in settings
Add in the lines so your file looks like this:
Navigae to system/csc/language.xml
Code:
<SamsungMobileLanguage>
<Country>USA</Country>
<CountryISO>en</CountryISO>
<SalesCode>VZW</SalesCode>
<LanguageSet>
<Display>
en_US;en_GB;en_AU;en_IE;en_NZ;en_ZA;ko_KR;de_AT;de_DE;de_CH;fr_FR;fr_CH;
bg_BG;cs_CZ;da_DK;el_GR;es_ES;et_EE;fi_FI;ga_IE;hr_HR;hu_HU;is_IS;it_IT;
lt_LT;lv_LV;mk_MK;nb_NO;nl_NL;nl_BE;pl_PL;pt_PT;ro_RO;sr_RS;sv_SE;tr_TR;
ca_ES;eu_ES;gl_ES;kk_KZ;ru_RU; sk_SK; sl_SI; uk_UA;
az_AZ;hy_AM; ka_GE;
ja_JP;en_PH;in_ID;ms_MY;th_TH;vi_VN;
es_US;pt_BR;
en_CA;fr_CA;zh_CN;
</Display>
<Input>
<SupportList>
en_US;en_GB;az;ca;cs;da;de;et;es;eu;el;fr;gl;ka;hr;it;is;kk;lv;lt;hu;nb;nl;pl;pt;ru;ro;fi;sr;sk;sl;sv;tr;uk;ko;hy;bg;ja;in;ms;th;vi;zh_CN;
</SupportList>
<EnableList>
</EnableList>
</Input>
</LanguageSet>
</SamsungMobileLanguage>
And you're done
How to disable Signature Check
This will disable Signature checking on System Apps
Decompile Services.jar with smali/baksmali
Navigate to: /smali/com/android/server/pm/PackageManagerService.smali
Search For:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
Replace the whole method with this:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const-string p0, "SBreen:"
const-string p1, "Skip signature check"
invoke-static {p0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
const/4 v6, 0x0
return v6
.end method
Save, Recompile and You're done!
How to disable Unplug from USB Turns on Screen
Decompile framework-res.apk
Navigate to res/values/bools.xml
Find
Code:
<bool name="config_unplugTurnsOnScreen">true</bool>
Change to:
Code:
<bool name="config_unplugTurnsOnScreen">false</bool>
Save, Recompile and you're done
Credits/Thanks
DSA
Click to expand...
Click to collapse
You might want to warn people that disabling signature checks may create a major security flaw. Maybe a security pro like @jcase can comment.
Also, most if not all of these mods have been posted elsewhere.
References:
http://forum.xda-developers.com/showthread.php?t=2280950
http://forum.xda-developers.com/showthread.php?t=2187730
http://forum.xda-developers.com/showthread.php?t=2121686
http://forum.xda-developers.com/showthread.php?t=2102651
http://blog.simonsickle.com/diy-smali-mod-remove-signature-checking/
upndwn4par said:
[/HIDE]
You might want to warn people that disabling signature checks may create a major security flaw. Maybe a security pro like @jcase can comment.
Also, most if not all of these mods have been posted elsewhere.
References:
http://forum.xda-developers.com/showthread.php?t=2280950
http://forum.xda-developers.com/showthread.php?t=2187730
http://forum.xda-developers.com/showthread.php?t=2121686
http://forum.xda-developers.com/showthread.php?t=2102651
http://blog.simonsickle.com/diy-smali-mod-remove-signature-checking/
Click to expand...
Click to collapse
Great! Doesn't mean that i didn't figure them out myself or that others would find them. I posted this thread as something that up and coming s4 developers could find easily, use and know would work
Disabling signature checks is pretty foolish, and completely negates Android's security model
upndwn4par said:
[/HIDE]
You might want to warn people that disabling signature checks may create a major security flaw. Maybe a security pro like @jcase can comment.
Also, most if not all of these mods have been posted elsewhere.
References:
http://forum.xda-developers.com/showthread.php?t=2280950
http://forum.xda-developers.com/showthread.php?t=2187730
http://forum.xda-developers.com/showthread.php?t=2121686
http://forum.xda-developers.com/showthread.php?t=2102651
http://blog.simonsickle.com/diy-smali-mod-remove-signature-checking/
Click to expand...
Click to collapse
Thanks man this is great
Awesome as usual. Request, anyway to mod an apk to break its market link to avoid updates showing up?? Thanks again
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Shaftamle said:
Awesome as usual. Request, anyway to mod an apk to break its market link to avoid updates showing up?? Thanks again
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Click to expand...
Click to collapse
Yes just resign it with a different signature and you wont get any updates
Awesome, thank you sir!
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Shaftamle said:
Awesome, thank you sir!
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Click to expand...
Click to collapse
You're welcome, thats what this thread is for!
I got one more question. Slightly off topic. Once an apk is decompiled and you have editied your xmls, do they have to be recompiled or can you use 7 zip to drop them into a copy of the original built apk? Similar to what you can do with png's. Drag an drop.
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Shaftamle said:
I got one more question. Slightly off topic. Once an apk is decompiled and you have editied your xmls, do they have to be recompiled or can you use 7 zip to drop them into a copy of the original built apk? Similar to what you can do with png's. Drag an drop.
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Click to expand...
Click to collapse
It depends which xml you are talking about. Certain ones can and certain ones cant
sbreen94 said:
It depends which xml you are talking about. Certain ones can and certain ones cant
Click to expand...
Click to collapse
Styles/Colors.XML is the one I think. basically the xmls pertaining to changing color.
I'll probly just try it both ways.
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Shaftamle said:
Styles/Colors.XML is the one I think. basically the xmls pertaining to changing color.
I'll probly just try it both ways.
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
http://mycolorscreen.com/Shaftamle/
Click to expand...
Click to collapse
You probably need to compile. theres only a few xmls you can do without compiling. The xml file at the bottom and the layout folder come to mind off hand. Anything in a values folder you have to compile
I hope this is the correct forum
I am doing this to Cyanogenmod 11.
I want to add an option to Settings > Interface > Status Bar > Signal Status Style. I am so close to having it done, but there is one thing I am missing, and that is actually getting the radio button to switch the Icon to the correct .java. Here is what I have done so far:
Added to Setting/res/values/cm_strings.xml;
Code:
<string name="status_bar_signal_style_always">Always show type</string>
Added two lines to Settings/res/values/cm_arrays.xml;(marked with *'s)
Code:
<string-array name="entries_status_bar_signal" translatable="false">
<item>@string/status_bar_signal_style_icon</item>
<item>@string/status_bar_signal_style_text</item>
*<item>@string/status_bar_signal_style_always</item>
<item>@string/status_bar_style_hidden</item>
</string-array>
<string-array name="values_status_bar_signal" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
*<item>3</item>
</string-array>
Created a new java file named SignalClusterAlwaysView.java in SystemUI/src/com/android/systemui/statusbar and signal_cluster_always_view.xml in SystemUI/res/layout, respectively;
Added to SystemUI/res/layout/status_bar.xml;
Code:
<include layout="@layout/signal_cluster_always_view"
android:id="@+id/signal_cluster_always"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
Added (changed STYLE_HIDDEN to 3) in SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java.
Code:
public static final int STYLE_ALWAYS = 2;
Really all I am trying to do is create a setting to show network type even while WiFi is connected. This is accomplished by simply clearing this line from SignalClusterView.java,
Code:
mMobileType.setVisibility(
!mWifiVisible ? View.VISIBLE : View.GONE);
and changing android:layout_marginEnd to 3dip in signal_cluster_view.xml.
I can't seem to figure out how the existing setting for a text only network icon sends that to SystemUI. I've explored StatusBar.java in the Settings.apk source, and I think the issue may be in this line,
Code:
int signalStyle = Settings.System.getInt(resolver, Settings.System.STATUS_BAR_SIGNAL_TEXT, 0);
where it is setting the value of the option selected to Settings.System.STATUS_BAR_SIGNAL_TEXT. I think it is properly setting the value to 2, like I want, but it still sees 2 as HIDDEN instead of ALWAYS; or that it does see I want ALWAYS, but doesn't know to refer to SignalClusterAlwaysView.java in SystemUI.
What am I missing? Is there an easier way to do this?
Sorry if this is in the wrong thread.
I just checked, and yes, the value of STATUS_BAR_SIGNAL is changing to my intended values. My one missing link is defining what those values do.
Where is the file that contains the value assignments? i.e. STATUS_BAR_SIGNAL = 1 starts StatusBarTextView.java in systemui, while 2 and 3 don't do anything. I don't care about 3, just need to make 2 start StatusBarAlwaysView.java (or that process, obviously it isn't .java once compiled).
I answered my own question here: http://stackoverflow.com/questions/21869758/adding-a-setting-option-in-android-settings-apk/21881423#21881423
If you are theming or modding a custom rom you probably thinking to use multiple ui and a switch between them. You can use this app. You can put 3 different UI in your rom and a switcher for those.
How to use:
1) Put it in System/app folder of your rom.
2) Make 3 different themed or modded SystemUI.apk.
3) Name those ui1.pack,ui2.pack and ui3.pack and put those in System/data/uichanger/ folder of your rom.
4) Now decompile the app and open res/values/strings.xml in text editor .
5) Now look for
Code:
<string name="ui1">Xperia UI</string>
<string name="ui2">Touchwiz UI</string>
<string name="ui3">AOSP UI</string>
Change the names as you want. This means if you check Xperia Ui it will set ui1.pack .
6) Now we need your SystemUI.apk path. In strings.xml find
Code:
<string name="systemuipath">YOur SystemUIpath</string>
For lollipop the path is /system/priv-app/SystemUI/SystemUI.apk
FOr kk the path is /system/priv-app/SystemUI.apk
Now just use that.
Any question in comments
App link :
Code:
https://docs.google.com/uc?authuser=0&id=0BySRffw4ufYxcEVoMWVITTVhY1E&export=download
Okay so I choose "yes" when the location settings asked for access to network info. I would like to revoke that choice so it does not access my network and I can ignore the prompt. I prefer to just use the GPS (Device Only) setting but instead it goes to High Accuracy (GPS and Network) and I can't change force the location button to change back to default when it prompted me. Is it possible to get it back so that when I enable location it's not High Accuracy? Android OS: 5.1.1
Grabbing the anwser from the following topic : http://forum.xda-developers.com/android/help/reset-google-network-location-consent-t2890971 . You will need root:
smelllllllllll said:
So for anyone else who's interested I edited the nlp-prefs.xml file contained in Data > Data > com.google.android.gms > shared_prefs
Changing From:
<boolean name="confirmNlp" value="false" />
Changing To:
<boolean name="confirmNlp" value="true" />
Click to expand...
Click to collapse
I tried it myself and it really works... After doing this change , reboot your device
In the meantime the (mis)behaviour of Play Services changed a bit. I.e. in v12.x there's, instead of changing the value of
<boolean name="confirmNlp" value="false" /> to "true",
the complete line to be deleted.
Reboot. Then the confirmation dialog appears again.
Tested on MM 6.01.
in the name of God
My name is Ali i am going to show you how to enable 4G only
needed:
root access
root browser for example root explorer
instruction:
1.go to
/cust/hw/meafnaf/xml/hw_defaults.xml
2.find this code
<string hw_networkmode_preference="9,3,12,11,1"/>
(may be a bit different in some devices)
3.change it to
<string hw_networkmode_preference="9,3,12,11,1,2,4"/>
4.add this code
<string hw_add_4g_only="432"/>
<integer hw_global_networkmode_settings_enable="1"/>
pay attention:if your device doesnt support Volte
when a person trys to call or send message to you can't
so be careful
I tested it in my honor 8 emui 5