[GUIDE][MOD]Add Safe Mode to 4way reboot menu S5 All Variants 4.4.2[MOD][GUIDE] - Samsung Galaxy S 5 Unified Development

Add Safe Mode to 4way reboot menu S5 All Variants 4.4.2​
Code:
[U][B]Pre-Requisites[/B][/U]
1. Must have existing 4way MOD
2. Must have basic smali/baksmali skills
3. UTF-8 compatible text editor (Notepad++)
4. Android ADB tools installed (to pull/push to device)
Instructions
1. Pull /system/framework/android.policy.jar either from ROM.zip file or from your device.
2. Decompile .jar file using either apktool or Virtuous Ten Studio (I recomend VTS).
3. Make all changes listed below. Blue means add Red means delete
and Green means change. pay attention to the values to change and all variables these may be
different depending on your specific build.
Open "/smali/com/android/internal/policy/impl/GlobalActions$99$1.smali"
Search for the following method .method public onClick(Landroid/content/DialogInterface;I)V
In that method search for if-eq v0, v1, :cond_4
Make the changes listed below
Code:
[COLOR="Blue"]const/4 v1, 0x4[/COLOR]
[COLOR="Blue"]if-eq v0, v1, :cond_5[/COLOR]
const/4 v1, 0x[COLOR="Green"]5[/COLOR]
Now we need to add our new :cond_5 referenced in the above code.
Still in the same Method search for .end method
Add the code below directly above it.
Code:
[COLOR="Blue"] :cond_5
const-string v1, "su -c /system/bin/sfmode.sh"
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/Runtime;->exec(Ljava/lang/String;)Ljava/lang/Process;
goto :goto_1[/COLOR]
.end method
Save and close this file.
Open "/smali/com/android/internal/policy/impl/GlobalActions$SinglePressAction.smali"
Search for .method static constructor <clinit>()V
Make the changes listed below. (NOTE: you may not see .locals depending on how you decompiled the jar file
NOTE: we are increasing the array values here by 1
Code:
.method static constructor <clinit>()V
.locals [COLOR="Green"]4[/COLOR]
const/4 v0, 0x[COLOR="Green"]5[/COLOR]
Still in the same method search for sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String; and add the following lines directly above it.
Code:
[COLOR="Blue"] const/4 v1, 0x4
const-string v2, "Safe Mode"
aput-object v2, v0, v1[/COLOR]
Save and close this file, now recompile android.policy.jar and push to your device
Set permissions rw-r-r (chmod 0644)
extract the sfmode.sh from the attached zip file push to /system/bin/sfmode.sh set execute permission (chmod 0755)
reboot and profit.
NOTICE: If you use this MOD you must provide proper recognition in your ROMS thread and also provide a direct link back to my thread. Other than that you are free to use and abuse any way you see fit.

@cstayton
Another Amazing Work Bud.
{
"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"
}

Sweet !!
Thank you !!...g

@cstayton sorry but '' the sfmode.sh from the attached zip file push to /system/bin/sfmode.sh set execute permission (chmod 0755)
reboot and profit.'' why does we have to do that ? Thanks +

androidrouen said:
@cstayton sorry but '' the sfmode.sh from the attached zip file push to /system/bin/sfmode.sh set execute permission (chmod 0755)
reboot and profit.'' why does we have to do that ? Thanks +
Click to expand...
Click to collapse
it is required, if you dont do it you wont reboot to safemode.

cstayton said:
Add Safe Mode to 4way reboot menu S5 All Variants 4.4.2​
Code:
[U][B]Pre-Requisites[/B][/U]
1. Must have existing 4way MOD
2. Must have basic smali/baksmali skills
3. UTF-8 compatible text editor (Notepad++)
4. Android ADB tools installed (to pull/push to device)
Click to expand...
Click to collapse
You told Must have existing 4way MOD. But where is the 4way MOD tutorial ?

Related

[miniGUIDE] Disable flipclock for Sense HD

Haven't seen this mod in the Desire HD threads or even in the HD2 Nand DHD threads so i hope i am the first that found out this mod. If not correct me then... Figured the way to hack this flipclock so here we go!
I assume that if u want to do this you know how it works so i'm not going into details too much.
- smali backsmali classes.dex in HtcClockWidget.apk or decompile with dependencies...
- look up for the file HtcDigitalClock42View.smali in \com\htc\WeatherClockWidget
- search for these lines:
Code:
const-string v5, "clockwidget_flip"
const/4 v6, 0x1
- and change it to:
Code:
const-string v5, "clockwidget_flip"
const/4 v6, 0x0
That's it.... Happy theming peeps...
this is what i have done so far... a nice transparent clock... without the flip
{
"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"
}
Hello!
Can you please post a guide on how to get a clock like yours for someone who doesn't know how to customize themes and smali/backsmali etc.
If possible, can you also provide with files that anyone can use to install or replace the original files with, to get exactly the look like your clock?
Thanks.
Does this disable the minutes and hours flip, or just the flip the clock does everytime the home screen refreshes. As one is annoying, and the minutes flip is actually nice, it is important to get it right.
And as for extracting the files, not a clue on how to do it. So it's less of a mod, and more of a guide I would say.
Alright changed the title to miniGUIDE then. If you like to know how to mod the apk i would like to refer you to ApkTool or much easier ApkManager. If u want to pull out the apk from your phone use ADB or Droidexplorer. I'm not that guy that explains everything for these tools, if u read it u might understand why. I'm just explaining which lines u need to modify to get the flipclock disabled. This way the flipclock is fully disabled, no way to have other options...
Do you really expect people to know how to decompile stuff and then sign them? Really? This guide is beyond poor...it needs a proper tutorial or just delete this thread, useless.
I don't have the slightest idea how to do this and I'm not even going to try, when I've seen the GUI of apk manager I freaked out.

[ROM][02 FEB] ICS 4.0.4 IMM26 for GSM Nexus S (port from Nexus S 4G) [mms fixed]

{
"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"
}
this is basic port of leaked stock IMM26(4.0.4) rom for crespo4g.
this works well on my phone(i9020) but maybe there are some bugs. use at your own risk
-----------------------------------------------------------------------------
*include superuser and busybox*
*deodexed*
*FULL WIPE RECOMMENDED*
*FIRST BOOT TAKES SOME TIME*
-----------------------------------------------------------------------------
Download v1.1 : http://www.mediafire.com/?pyrxdypwpdd07gu
(mms and other minor bug fixed)
fix for previous version users : http://www.mediafire.com/?5nzv5w7yez46618
Thanks!
D/l'ing, shall test it out
Any new features/changes over 4.0.3?
Sent from my Nexus S using XDA App
Yes! I was hoping that someone would do this.
Sent from my Nexus S using Tapatalk
new kernel and new baseband.
HAKA:
LOL, same kernel and baseband like stock 4.0.3, where u see difference?
What bug that you might encounter so far???
Sent from my Nexus S using Tapatalk
Will try! Thanks!!
sent while eating an ice cream sandwich in the matr1x
Will this work on i9023?
Sent from my Nexus S using XDA App
HAKA said:
new kernel and new baseband.
Click to expand...
Click to collapse
The kernel and the baseband that came with the update wouldnt work on the nexus s 3g...
Maybe some battery drainige got fixed?
sent while eating an ice cream sandwich in the matr1x
challl88 said:
HAKA:
LOL, same kernel and baseband like stock 4.0.3, where u see difference?
Click to expand...
Click to collapse
the difference is for NS4G, but for NS3G, well, i can see the same kernel and baseband. maybe few internal changes as well.
..........
Just flashed it, I see no visual changes. Anyways this is pretty flawless. I haven't seen any bugs yet. Planning to run this for few days to check if Android OS battery bug is fixed or not.
Sent from my Nexus S using Tapatalk
launcher still has micro stutter
also SD data transfer is still extremely slow
it looks like this version have some new code related screen off(lock) so no more lockscreen flicker..
Code:
method public lockNow()V
.locals 3
.prologue
.line 3498
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mContext:Landroid/content/Context;
const-string v1, "android.permission.DEVICE_POWER"
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->enforceCallingOrSelfPermission(Ljava/lang/String;Ljava/lang/String;)V
.line 3499
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
.line 3500
iget-object v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHandler:Landroid/os/Handler;
iget-object v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mScreenLockTimeout:Ljava/lang/Runnable;
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 3501
return-void
.end method
and thanks to that, some screen lock widgets don't work properly on this verison lol
Hopefully the androidos bug is disabled in this version..
HGhertel1 said:
Hopefully the androidos bug is disabled in this version..
Click to expand...
Click to collapse
It is Check this thread. http://forum.xda-developers.com/showthread.php?t=1475280
Sent from my Nexus S using Tapatalk
Thank you!
Will this work on i9023?
Nexus S i9023 _ICS
Android OS really only rears its head when you aren't doing much with the phone. If you've been using it the entire 4 1/2 hours, then of course it'll show less consumption than everything else. I wouldn't call the bug ironed out just because of this use case.
Any feedbacks on the Android OS battery drain issue with this version?

[MOD] Change date string format in extended notification

Changing the date format
I own the VZW variant of the phone, but it seems this file is the same with all variants.
This mod will achieve 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"
}
Method 1
1. Locate DateView.smali in smali\com\android\systemui\statusbar\policy
2. On line 262 delete
Code:
invoke-static {v0}, Landroid/text/format/DateFormat;->getLongDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;
3. Add
Code:
const-string v4, "EEEE, MMM d, yyyy"
invoke-static {v4, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;Ljava/util/Date;)Ljava/lang/CharSequence;
4. I prefer the "Day of week, Month (short), Day (w/o leading 0), Year" format, but you may choose to format it how you wish. Use this to help you with formatting.
Method 2
If you already like the way I've formatted the date. You can simply replace your DateView.smali with mine and compile your SystemUI.
rehpyc said:
Changing the date format
I own the VZW variant of the phone, but it seems this file is the same with all variants.
This mod will achieve this:
Method 1
1. Locate DateView.smali in smali\com\android\systemui\statusbar\policy
2. On line 262 delete
Code:
invoke-static {v0}, Landroid/text/format/DateFormat;->getLongDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;
3. Add
Code:
const-string v4, "EEEE, MMM d, yyyy"
invoke-static {v4, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;Ljava/util/Date;)Ljava/lang/CharSequence;
4. I prefer the "Day of week, Month (short), Day (w/o leading 0), Year" format, but you may choose to format it how you wish. Use this to help you with formatting.
Method 2
If you already like the way I've formatted the date. You can simply replace your DateView.smali with mine and compile your SystemUI.
Click to expand...
Click to collapse
Hi,
I'm not a programmer/developer - so how would the 'ordinary' person make this type of change? Is there a tool that I can download to my device or a tool to download to my desktop and copy the file over to my device?
I'm interested in this because I like a longer date view in my notification bar. Also - is there a mod for performing the same type of modification for the lock screen date format?

[GUIDE][15 AUG] How To Colorize Lock Screen Clock in Jellybean

Here is a guide how to colorize lock screen clock in JellyBean.
1. Download attached apktools.zip and unpack it on your computer (make sure there are NO spaces in folder names!)
2. Copie framework-res.apk to same folder.
3. Navigate to this folder in your work station, press SHIFT ang right click and in contex menu -> "open command from here".
4. Now we have to install fist the framework-res (U have to do this only once for each rom!) by typing following command:
Code:
java -jar apktool.jar if framework-res.apk
5. For decompiling framework-res.apk:
Code:
java -jar apktool.jar d framework-res.apk
6. Now there should be a folder named "framework-res".
7. Navigate to framework-res\res\values\ and open colors.xml with a text editor and search for:
Code:
<color name="lockscreen_clock_background">#ff33b5e5</color>
<color name="lockscreen_clock_foreground">#ff33b5e5</color>
<color name="lockscreen_clock_am_pm">#ff33b5e5</color>
8. Now you can edit color with what ever U want. In my case it is ICS blue.
9. Save changes and navigate back to apktools root folder.
10. Now for compiling framework-res again open command as mentioned in 3. and type:
Code:
java -jar apktool.jar b framework-res
11. Compiled framework-res.apk should now be in \framework-res\dist\ (be patient...could take a few minutes)
12. Last but not least you have to sign framework-res.apk. I always sign apk's with Android Commander and never had any issues.
There are also two .zip's attached which can be used to flash framework-res via CWM. One for patched and one for original file (in the case there went something wrong).
Tested on Win7 64bit!
{
"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"
}
Very Nice! Which property changes the color of the date and "charging" text?
I believe I am supposed to get framework-res.apk from my ROM but I don't see it. Where do I find it?
Idyar said:
I believe I am supposed to get framework-res.apk from my ROM but I don't see it. Where do I find it?
Click to expand...
Click to collapse
/system/framework/...
Sent from my paranoid phone's mind

[Guide]Theming Settings Heavily »Update^1/3/14«[GB]

Presenting a full guide on theming and understanding conceps of Settings.apk
Theming it white with changeable background
Check 2nd Post
Note.
I am not responsible if you make any damage to your phone
Click to expand...
Click to collapse
This simple editing requires.
# STEP 1
Patience
[For that use my method of spreading cold water over your head.}
# STEP 2
Notepad ++
{A very handy tool}
google it if you dont have for editing xml files.
# STEP 3
My provided files for changing backgrounds.
Click to expand...
Click to collapse
Lets start our work.
# STEP 4
Decompile your Settings.apk
# STEP 5
Open Androidmanifest.xml
# STEP 6
In
Code:
<application android:label="@string/settings_label"
# STEP 7
Add this
Code:
android:theme="@*android:style/Theme.Light"
# STEP 8
So it will look like thisafter editing
Code:
<application android:theme="@*android:style/Theme.Holo" android:label="@string/settings_label"
# STEP 9
Now find
Code:
Theme.NoTitleBar
And replace each with
Code:
Theme.Light.NoTitleBar
# STEP 10
Now open ManageApplications$ApplicationsAdapter.smali in
Code:
smali/com/android/settings/applications/ManageApplications$ApplicationsAdapter.smali
# STEP 11
Find
Code:
getColorStateList
# STEP 12
Above it you will see public id linked to framework
i.e.
Code:
0x1060001
# STEP 15
Change it to
Code:
0x1060004
This is to fix white colour problem in manage aplications tab items.
# STEP 14
Recompile your apk back.
Click to expand...
Click to collapse
{
"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"
}
EXTRA TIPS.​
#
Changing the backgroung from white to grey or set your image
# STEP 15
Download Zip Package from here and merge with your settings.
# STEP 16
Open styles.xml
Paste this in the last above
Code:
</resources>
Code:
<style name="Settings" parent="@*android:style/Theme.Light">
<item name="android:windowBackground">@drawable/background</item>
</style>
# STEP 17
Open Androidmanifest.xml
# STEP 18
In
Code:
<application android:label="@string/settings_label"
# STEP 19
Add this
Code:
android:theme="@style/Settings"
# STEP 20
So it will look like this after editing
Code:
<application android:theme="@style/Settings" android:label="@string/settings_label"
# STEP 21
And background will be changed.
Click to expand...
Click to collapse
#
To change separators
# STEP 22
Open styles.xml
Paste this in the last above
Code:
</resources>
Code:
<style name="Widget.TextView.ListSeparator.White" parent="@*android:style/Widget.TextView.ListSeparator">
<item name="android:textColor">#ff000000</item>
<item name="android:background">@drawable/light_header</item>
</style>
# STEP 23
Change
Code:
<style name="Settings" parent="@*android:style/Theme.Light">
<item name="android:windowBackground">@drawable/background</item>
</style>
to
Code:
<style name="Settings" parent="@*android:style/Theme.Light">
<item name="android:windowBackground">@drawable/background</item>
<item name="android:listSeparatorTextViewStyle">@style/Widget.TextView.ListSeparator.White</item>
</style>
# STEP 24
Recompile back your apk file.
# STEP 25
Sign it.
# STEP 26
Push to system/app with permissions rw-r-r
# YOUR STEP
And Work Completed.
Click to expand...
Click to collapse
san122 said:
Click to expand...
Click to collapse
used white bg can consumes more battery, black should be better
Sent from my GT-S5570 using Tapatalk
Work on stuck rom???
farzadone said:
Work on stuck rom???
Click to expand...
Click to collapse
Yup
Sent from my GT-S5360 using Tapatalk 2

Categories

Resources