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

vman10

Senior Member
Nov 4, 2011
156
90
58
I am getting bootloop after I replace services.jar
I set correct permissions, rebooted and now I get bootloop right after lockscreen appears
 

vman10

Senior Member
Nov 4, 2011
156
90
58
I am getting bootloop after I replace services.jar
I set correct permissions, rebooted and now I get bootloop right after lockscreen appears
Nevermind. I ended up replacing original services.jar using recovery file manager. Boots up fine now.
 

mrTGF

Member
Mar 23, 2015
40
19
0
that is the main problem...
delete system\framework\arm\service.odex

and also system\priv-app\SecSettings\arm folder

thankx
Hi im having an issue following these instructions, whenever I delete these I just get a bootloop, also whenever I extract the services.jar I cannot find the classes.dex file I only have one text file. Is there another workaround maybe? Thnx
 
Last edited:

antugoogly

Member
Jul 30, 2014
18
2
0
Hi im having an issue following these instructions, whenever I delete these I just get a bootloop, also whenever I extract the services.jar I cannot find the classes.dex file I only have one text file. Is there another workaround maybe? Thnx
is your rom fully deodex?? yes or not
if no put it system/framework/
thankx

and
go to system/etc/
and find <SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTINGS_UI>FALSE</SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTINGS_UI>

make it
<SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTINGS_UI>TRUE</SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTINGS_UI>


thankx
 

Attachments

mrTGF

Member
Mar 23, 2015
40
19
0
is your rom fully deodex?? yes or not
if no put it system/framework/
thankx

and
go to system/etc/
and find <SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTINGS_UI>FALSE</SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTINGS_UI>

make it
<SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTINGS_UI>TRUE</SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTINGS_UI>


thankx
Thanks for responding, my phone is odexed, I have tried the way you have suggested it but I continue to get a boot loop, also I probably should have added this before but im running on a m919V variant (M919VVLUGOD1)

some other things I tried was taking your classes.dex file and making another services.jar using the services.jar from my phone the results being that while the phone does bootup I only get a few seconds off screen on time before it reboots, Thanks for your help.
 

antugoogly

Member
Jul 30, 2014
18
2
0
Thanks for responding, my phone is odexed, I have tried the way you have suggested it but I continue to get a boot loop, also I probably should have added this before but im running on a m919V variant (M919VVLUGOD1)

some other things I tried was taking your classes.dex file and making another services.jar using the services.jar from my phone the results being that while the phone does bootup I only get a few seconds off screen on time before it reboots, Thanks for your help.
sry this is not your variant... if you send me services.jar from deoxed rom. I will try to do something for you thank you.... :)

Sent from my GT-I9505
 

antugoogly

Member
Jul 30, 2014
18
2
0
Thanks very much, you have been great help sofar, i've attached a deodexed services.jar from my phone.
sry for late ............ :)

follow some step

delete system\framework\arm\service.odex
go to system/etc/
and find <SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTIN GS_UI>FALSE</SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTING S_UI>

make it
<SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTIN GS_UI>TRUE</SEC_FLOATING_FEATURE_SETTINGS_SUPPORT_2013_SETTING S_UI>


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 attached to /system/framework/ 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;
\


thank you
 

Attachments

  • Like
Reactions: mrTGF

mrTGF

Member
Mar 23, 2015
40
19
0
Sorry for the late response, I have been trying to get this to work but to no avail yet, I've tried everything you had suggested, but I can't seem to get it to work, do you perhaps know a way I can re-odex the file?, I just don't understand what could be wrong honestly
 
May 18, 2015
12
0
0
Worked in my i9500...but black squre box...and lots of bugs...
when i restore my original Secsetting....it always stopped working...Now i can't recover my setting... :'( :'(
 

dedichthui

Senior Member
Oct 31, 2010
930
231
0
It works fine on my stock rom. I have integrated functions such as turn on UPSM and black & gray screen mode in the settings (stock settings S4). This is my rom. I just Deodex systemUi, Secsettings, Service.jar. UPSM real action right with its functions. (All of these applications and the user's system will be used in this mode turned off. you can keep track of them in the application running in the Settings menu(I have replaced the set of upsm by the factory settings. It does not drain your battery). This is my mod. I added Emergency mode, UPSM, PSM ( have Black&gray function), Zoom magnifier (Hover zoom)...In stock settings s4.
 

Attachments

Last edited:

stang5litre

Senior Member
Sep 11, 2012
4,299
2,886
253
Columbus
help please

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 :)
Any way i can get some help here? I did everything as per instructions but the when you try to compile the jar file back you get errors for the - classout
Thanks
 
  • Like
Reactions: prulka and same-xx

stang5litre

Senior Member
Sep 11, 2012
4,299
2,886
253
Columbus
Can u tell is this your new instructions compatible with gt-i9506? Or should I just try?
I found the coding was different. As soon as I changed it to the correct code compiled like a charm and fully functional. Sch-i545 s4
You can try that code, if you find it won't compile PM me and I'll gibe you the coding I used that works perfectly. :cool::D
 
  • Like
Reactions: same-xx