[Galaxy S6 General] HazemSayad:
Hello folks :D, so i was seeking for a way to add more apps in my UPSM (Ultra Power Saving Mode), since my daily driver is Samsung Galaxy S6, and I discovered this method using my S6 so I posted this thread in S6 forum, but it should work on

all Samsung devices with Ultra Power Saving Mode

and root. this should go easy and smooth. :) press the thanks button if i helped:highfive:

Tools

"I"

used:

•Lucky Patcher (LP is an app with a specific capabilities that might be helpful for developers, but it should NOT and NEVER be used in a wrong way or to violate anyone in any way, so INSTEAD i will provide this

LINK

to follow along instead of LP, we just need 2 infos that can be determined in Method 2: Using APK Info app)

•Root explorer(Play store) or any similar apps to edit an XML file with root permissions.

Now we start,

go to

/system/csc

back up the

allowed_apps_upsm.xml

, copy and paste the file in the same directory and rename it to

allowed_apps_upsm.xml.bak1

since the explorer you are using might overwrite your backup if it just ends with ".bak" and you end up with losing your original backup if more than one edit went through the file, better safe than sorry:good:

photo

now open the allowed_apps_upsm.xml file and have a look inside, it looks like this: photo

target an app of your mind, I'll be targeting Synapse, and search for the app you want to add

photo

tap the info tab to access more info about the app we'll be needing to complete the setup

photo

the 2 info we need are, Package name and Launch Activity

Package name: com.af.synapse ; Launch Activity: com.af.synapse.MainActivity

now understanding the code in the XML file:

<!--Synapse-->
<appshortcut
launcher:className="com.af.synapse.MainActivity"
launcher:packageName="com.af.synapse"
launcher:permission="0000" />

that's the code i created to add Synapse app to my UPSM. all codes will look the same but with different parameters only.

className="xxxxxxxxxxx"

replace the xxx with the Launch Activity name that you got from Lucky Patcher's info about app

packageName="xxxxxxxxxxx"

replace the xxx with the Package name

permission="0000"

the "0000" value can be either 0 (off) or 1 (on), as switches

instead of "0000", their placeholders are "wxyz"

w: Always enabled

x: Use AlarmManager

y: Use mobile data when screen off

z: Use default App permission, Don't kill if turn off screen

so it is

permission="wxyz"

use "0000" if you're not sure which to choose, it will save battery as it's intended in UPSM.

make sure the

allowed_apps_upsm.xml

file has the permissions rw-r--r-- as in this photo

we're almost done, now back to lucky patcher app, search for the word "emergency", there should be left out 3 system apps

emergency manager service, emergency provider, and launcher

. The launcher app should be disabled as everything in this photo is showing.

NOTICE: this can be done manually in settings > application manager, just search for those 3 apps and clear their data manually

now clear these 3 apps data by tapping on each app Clear Data button as in the above photo.

reboot, and test:D:D:D:D

BONUS:

this code can be repeated more than once but in a logical way, as you should place every new code block below the closing of an above code block:fingers-crossed::good:

notes:

place your code blocks all before the closing tag/code

</home>

I tested this method on ALEXIS ROM THE END based on android version MM 6.0.1, great ROM btw. BUT for samsung stock/close to stock/TW nougat 7.x the "UPSM" was ditched for a seemingly better way for conserving battery and easier experience than originally UPSM.

I moved to LOS 14.1 and this guide should be sufficient to its purpose, but i'm willing to answer questions

***this thread was edited to comply with the rules, and i feel ashamed that i cooked the guide with LP, but please just use the app in the ONLY WAY I JUST PROVIDED***