[Sony Cross-Device General] SamadiPour:
In The Name of GOD​

Hi EveryOne :cool:​

Here's a Tutorial on How to Customize Ultra Stamina Mode!

​

Requirements:

1.USMHome.apk

2.SuperStamina.apk

3.Notepad++ or any Editor

4.Apktool to Decompile apk

5.A Brain!

Introduction:

in order to change and customize ultra stamina mode you need two main apk: "USMHome.apk" & "SuperStamina.apk"

USMHome.apk is launcher and setting page but SuperStamina.apk control apps in ultra stamina mode

you can find both of them in System/app

Add & Remove app From Launcher:

1.Decompile "SuperStamina.apk"

2.Open res/xml/usm_packages.xml

you can see lots of code but i will explane each one them:

<package name="com.android.wallpaper" />

this code means you can't access Wallpaper App in Ultra Stamina

<package name="com.sonymobile.moviecreator" authorizedActivitiesByDefault="true"

this code means you can't see Movie Creator icon app in launcher but you can run it

<package name="com.android.calendar" authorizedActivitiesByDefault="true">
<launchable-activity name=".LaunchActivity" priority="50" />
</package>

this code means you can see Calendar icon app in launcher and you can run it

<package name="com.sonyericsson.music">
<authorized-activity name=".picker.MusicPickerActivity" />
</package>

this code means you can run Walkman app but just you can play music with it and other Activities are disable

<package name="com.android.systemui" authorizedActivitiesByDefault="true">
<unauthorized-activity name=".recent.RecentsActivity" />
</package>

this code means SystemUI is lunchable but you can't access Recent Button

so all you need to do is follow these patterns and you can do want you want!!!

3. i will show you some examples

for example the main code of Movies app is

<package name="com.sonyericsson.video" />

it means the app is disabled in Ultra Stamina mode but we are going to Change it

how about adding it to launcher?

all you need to do is replace this code with previews one

<package name="com.sonyericsson.video" authorizedActivitiesByDefault="true">
<launchable-activity name=".browser.BrowserActivity" priority="110" />
</package>

I'm going to explane these codes but first lets add another app

4. lets add MXPlayer to ultra Stamina Launcher

first of all add these codes

<package name="com.mxtech.videoplayer.ad" authorizedActivitiesByDefault="true">
<launchable-activity name=".ActivityMediaList" priority="120" />
</package>

name="com.mxtech.videoplayer.ad" it's package name of application

name=".ActivityMediaList" it's main Activity (main page of MXPlayer)

authorizedActivitiesByDefault="true" it means that your application can run in Ultra Stamina

<launchable-activity it means that this activity can run but if you use <unlaunchable-activity it won't let that Activity run

priority="110" i didn't understand it well but stock numbers are till 100 and you have to add it 10------so next number is 110 and then 120 and so on....!!! (if "X" app is 110 and "Y" app is 120 so in launcher first show "X" and then "Y")

5. i told you how to add app in launcher but if you want to add lots of app i recommend you to add them n Setting

first of all you need to introduce app to Ultra stamina with step 3 and 4 but like this pattern

<package name="[B]com.sonyericsson.advancedwidget.clock[/B]" authorizedActivitiesByDefault="true" />

so all you need is app package name that you can find it with MOD EDIT Rule 6 [MENTION=3843529]gregbradley[/MENTION]

after you introduce app you need to add app in setting menu

follow this ------------------>TUT<---------------------

6. now you should know how to remove app from launcher or don't let app to run in ultra stamina mode

first of all read step 2 again. you can see the patterns but i show you with some examples!!!

here I'm going to remove camera from launcher:

the main code is:

<package name="com.sonyericsson.android.camera" authorizedActivitiesByDefault="true">
<launchable-activity name=".CameraActivity" priority="30" />
</package>

you just need to change the code like this:

<package name="com.sonyericsson.android.camera" authorizedActivitiesByDefault="true" />

but if you want to kill any Activity you must change it to:

<package name="com.sonyericsson.android.camera" />

Hit Thanks if you find it helpful :good:​