[HOW-TO]{GUIDE}Get Ultra Power Saving Mode and Settings menu of S5 to S4![5.0.1]

nikosdd

Senior Member
Dec 7, 2009
259
157
0
chania
EDIT : Guide how to port UPSM on S4 on Post #10

First of all IM not responsible if anything happens to your phone, first back it up!
This mod is tested ONLY on i9506, but you can test it on other S4 mobiles and then tell me if it works
And it works only on Stock rooted official Lollipop build

1. Download the zip file Here
2. Extract the file SecSettings.apk.
3. Use a root explorer from your mobile to move the existing Secsettings file to your sd(for backup purposes)
4. Go to /system/priv-app/SecSettings/ and move the file SecSettings.apk to /storage/extSdCard/oldsec.apk
5. Copy the new SecSettings.apk file to your sd.
6. Navigate to /storage/extSdCard and move the new SecSettings.apk to /system/priv-app/SecSettings
7. Give permissions rw--r---r---
8. Reboot device

What you get
Advanced Power saving mode with grayscale mode
All the new lockscreen settings with popping colors
And more..

What is not working
Ultra power saving mode, but i will try to port it.
Random fc on sound settings and data settings. Trying to fix them

If it fails after reboot, or want to revert back restore the original SecSettings.apk
 
Last edited:

faouz

Senior Member
Apr 11, 2012
104
24
0
First of all IM not responsible if anything happens to your phone, first back it up!
This mod is tested ONLY on i9506, but you can test it on other S4 mobiles and then tell me if it works
And it works only on Stock rooted official Lollipop build

1. Download the zip file Here
2. Extract the file SecSettings.apk.
3. Use a root explorer from your mobile to move the existing Secsettings file to your sd(for backup purposes)
4. Go to /system/priv-app/SecSettings/ and move the file SecSettings.apk to /storage/extSdCard/oldsec.apk
5. Copy the new SecSettings.apk file to your sd.
6. Navigate to /storage/extSdCard and move the new SecSettings.apk to /system/priv-app/SecSettings
7. Give permissions rw--r---r---
8. Reboot device

What you get
Advanced Power saving mode with grayscale mode
All the new lockscreen settings with popping colors
And more..

What is not working
Ultra power saving mode, but i will try to port it.

If it fails after reboot, restore the original SecSettings.apk


Thank you very much!:)

I am waiting for the Ultra power saving mode:good: Really awesomme if it will work.

Thank You

---------- Post added at 03:43 PM ---------- Previous post was at 02:58 PM ----------

Thank you very much!:)

I am waiting for the Ultra power saving mode:good: Really awesomme if it will work.

Thank You
 
Last edited:

faouz

Senior Member
Apr 11, 2012
104
24
0
Thank you very much!:)

I am waiting for the Ultra power saving mode:good: Really awesomme if it will work.

Thank You

---------- Post added at 03:43 PM ---------- Previous post was at 02:58 PM ----------

Everything is working except for the sound it is force closing:eek:
 

superpulosu

Senior Member
Jul 19, 2012
293
108
73
madrid
FC

Thanks, but I have 4-5 FC... on some icons in settings. And the sound its doesnt work.
If you wipe cache and change in build.prop "ro.product.name=SM-N9000" you have the settings app working after reboot.
Tried on i9506 stock.
 

nikosdd

Senior Member
Dec 7, 2009
259
157
0
chania
Thanks, but I have 4-5 FC... on some icons in settings. And the sound its doesnt work.
If you wipe cache and change in build.prop "ro.product.name=SM-N9000" you have the settings app working after reboot.
Tried on i9506 stock.
I saw the fc later and I'm trying to fix them. Superpulosu changing product name does nothing to the fc
 
  • Like
Reactions: bilgerryan

superpulosu

Senior Member
Jul 19, 2012
293
108
73
madrid
Ok, sorry. You right it does not change nothing if you change build.prop
I had another settings mod and its not working with your settings app.
I have FC on battery, data usage and the sound bug... Maybe you can make it work.
Thanks for your work.
 

nikosdd

Senior Member
Dec 7, 2009
259
157
0
chania
Right now i've managed to port Ultra Power Saving Mode, but when i find time,i will write the procedure right here, or if anyone wants to send me his services.jar file(Please only from deodexed roms, otherwise first deodex rom and then send me the jar file otherwise it will not work), and to give you the short details how to install it. First before you send me this file, open it with winrar or 7zip and see if inside is a file named classes.dex. If not,deodex your rom, if yes send me this file and the model of the phone of course
 

nikosdd

Senior Member
Dec 7, 2009
259
157
0
chania
Ultra Power Saving Mode port

Alright here is the details of how to port UPSM on lollipop rom
First, be sure that you are on a deodexed rom, otherwise search to the XDA about how to deodex your rom(its easy)

Download ApkTool (attached zip file)
Download Emergency apps(attached zip file)
Pull from your phone the services.jar located in /system/frameworks
Open the file services.jar with 7zip or winrar and extract the file classes.dex to the root of apktool
Drag and drop the classes.dex to the cmd file Quick-Baksmali.cmd
Wait for it to finish
Open the newly created folder Classout and go to classout\com\android\server
Open with notepad++ or other text editor the file SystemServer.smali
Search with the keyword "emergency" and you will find 1 result.
Delete the following result starting from - and ending to ...
Code:
.method static final startEmergencyModeService(Landroid/content/Context;)V
.
.
.
.end method
Now add right here this code
Code:
.method static final startEmergencyModeService(Landroid/content/Context;)V
    .registers 6
    .parameter "context"

    .prologue
    .line 2194
    :try_start_0
    invoke-static {p0}, Lcom/sec/android/emergencymode/EmergencyManager;->getInstance(Landroid/content/Context;)Lcom/sec/android/emergencymode/EmergencyManager;

    move-result-object v1

    .line 2195
    .local v1, emMgr:Lcom/sec/android/emergencymode/EmergencyManager;
    invoke-virtual {v1}, Lcom/sec/android/emergencymode/EmergencyManager;->readyEmergencyMode()V
    :try_end_7
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_7} :catch_8

    .line 2200
    .end local v1           #emMgr:Lcom/sec/android/emergencymode/EmergencyManager;
    :goto_7
    return-void

    .line 2196
    :catch_8
    move-exception v0

    .line 2197
    .local v0, e:Ljava/lang/Exception;
    const-string v2, "SystemServer"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "Starting emergency service failed: "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_7
.end method
Save this file, and drag n drop the hole folder Classout to the cmd file Quick-Smali.cmd
It will generate a new file named new-classes.dex
Open again services.jar with 7zip or winrar, delete the classes.dex file and insert this newly created dex file, rename it classes.dex and push this file to the device, overwriting the stock services.jar file
DO NOT forget to set permissions rw-r--r--
Copy all the files in the 1st attached zip to /system/apps/ and set the appropriate permissions
After this, you will be able to enable UPSM from the settings mod in post #1 and you can also add it to notification bar with SQLite editor

To do this you must go to settings storage,settings.DB,system and search for notification
Edit the following "notification_panel_active_app_list_for_reset" ,and after the last semicolon(;) add this
Code:
UltraPowerSaving;
Go to notification settings and restore the buttons and the U.Power saving button will appear
Reboot and everything will work if you followed the whole procedure right :)

What is not working
While in UPSM, you may not hear voice during a call. Trying to fix it. Stay on for an update :)
 

Attachments

Last edited:

Y3dx

Senior Member
Jan 14, 2015
189
170
0
26
Bangkok
EDIT : Guide how to port UPSM on S4 on Post #10

First of all IM not responsible if anything happens to your phone, first back it up!
This mod is tested ONLY on i9506, but you can test it on other S4 mobiles and then tell me if it works
And it works only on Stock rooted official Lollipop build

1. Download the zip file Here
2. Extract the file SecSettings.apk.
3. Use a root explorer from your mobile to move the existing Secsettings file to your sd(for backup purposes)
4. Go to /system/priv-app/SecSettings/ and move the file SecSettings.apk to /storage/extSdCard/oldsec.apk
5. Copy the new SecSettings.apk file to your sd.
6. Navigate to /storage/extSdCard and move the new SecSettings.apk to /system/priv-app/SecSettings
7. Give permissions rw--r---r---
8. Reboot device

What you get
Advanced Power saving mode with grayscale mode
All the new lockscreen settings with popping colors
And more..

What is not working
Ultra power saving mode, but i will try to port it.

If it fails after reboot, restore the original SecSettings.apk
Please create how to mod SecSettings.apk
 

nikosdd

Senior Member
Dec 7, 2009
259
157
0
chania
Please create how to mod SecSettings.apk
Hello
You don't mod the secsettings file, you just change it with the file I give you to download. First remember to take a backup at your SD, or even better a nandroid backup. As I've mentioned it has some bugs and due to exams I don't have the required time to fix them in short time but I'm trying :)
 
  • Like
Reactions: Y3dx

nikosdd

Senior Member
Dec 7, 2009
259
157
0
chania
I solve some problem..
download UPSM_fix form link.
and install new shealth.apk..................
Use this post for service.jar
http://forum.xda-developers.com/showpost.php?p=60192294&postcount=10
every problem solve...............
sorry I am new here............
thankx
UPSM_fix.zip
New_shealth.apk

setting fc fixed...........
Upsm_fix_v2
flash with cwm......
what problem you actually fixed? Because S health is irrelevant to Settings ui and Ultra power saving mode(i guess so)
 

vankd

Senior Member
Jan 7, 2012
65
1
0
I solve some problem..
download UPSM_fix form link.
and install new shealth.apk..................
Use this post for service.jar
http://forum.xda-developers.com/showpost.php?p=60192294&postcount=10
every problem solve...............
sorry I am new here............
thankx
UPSM_fix.zip
New_shealth.apk

setting fc fixed...........
Upsm_fix_v2
flash with cwm......
I solve some problem..
download UPSM_fix form link.
and install new shealth.apk..................
Use this post for service.jar
http://forum.xda-developers.com/showpost.php?p=60192294&postcount=10
every problem solve...............
sorry I am new here............
thankx
UPSM_fix.zip
New_shealth.apk

setting fc fixed...........
Upsm_fix_v2
flash with cwm......
UPSM fix 2 is perfect but...
It's force close in lock screen widgets
uploadfromtaptalk1429605117774.png
 
Last edited: