[Guides & Links] TOUCHWIZ UNIFIED MODS THREAD

Search This thread

Iman87

Senior Member
Feb 23, 2015
461
140
63
31
Shiraz
It is along side this mod. The mod for bg is done in systemui, the mod for text colors is done in framework. So you will need to do both mods.

Sent from my SM-G920F using Tapatalk

why Recompiling gives error?
on your post


Recompiling "SystemUI.apk" With Original Signature,
in work area "_WorkArea5", using "apktool_2.1.1.jar"

----------------

I: Using Apktool 2.1.1
I: Smaling smali folder into classes.dex...
Exception in thread "main" java.lang.IllegalStateException: Cannot get the location of a label that hasn't been placed yet.
at org.jf.dexlib2.builder.Label.getLocation(Label.java:54)
at org.jf.dexlib2.builder.Label.getCodeAddress(Label.java:48)
at org.jf.dexlib2.builder.BuilderOffsetInstruction.internalGetCodeOffset(BuilderOffsetInstruction.java:60)
at org.jf.dexlib2.builder.BuilderOffsetInstruction.getCodeOffset(BuilderOffsetInstruction.java:50)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:206)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:988)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:53)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:364)
at brut.androlib.Androlib.buildSources(Androlib.java:295)
at brut.androlib.Androlib.build(Androlib.java:278)
at brut.androlib.Androlib.build(Androlib.java:254)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)

----------------

Recompile Not Successful!
 

tdunham

Recognized Contributor
Jun 21, 2008
13,686
36,462
0
TampaBay
why Recompiling gives error?
on your post


Recompiling "SystemUI.apk" With Original Signature,
in work area "_WorkArea5", using "apktool_2.1.1.jar"

----------------

I: Using Apktool 2.1.1
I: Smaling smali folder into classes.dex...
Exception in thread "main" java.lang.IllegalStateException: Cannot get the location of a label that hasn't been placed yet.
You have a condition in smali that is missing it's mate.
 

daxgirl

Senior Member
Jun 30, 2012
4,047
9,165
0
Jerusalem
why Recompiling gives error?
on your post


Recompiling "SystemUI.apk" With Original Signature,
in work area "_WorkArea5", using "apktool_2.1.1.jar"

----------------

I: Using Apktool 2.1.1
I: Smaling smali folder into classes.dex...
Exception in thread "main" java.lang.IllegalStateException: Cannot get the location of a label that hasn't been placed yet.
at org.jf.dexlib2.builder.Label.getLocation(Label.java:54)
at org.jf.dexlib2.builder.Label.getCodeAddress(Label.java:48)
at org.jf.dexlib2.builder.BuilderOffsetInstruction.internalGetCodeOffset(BuilderOffsetInstruction.java:60)
at org.jf.dexlib2.builder.BuilderOffsetInstruction.getCodeOffset(BuilderOffsetInstruction.java:50)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:206)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:988)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:53)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:364)
at brut.androlib.Androlib.buildSources(Androlib.java:295)
at brut.androlib.Androlib.build(Androlib.java:278)
at brut.androlib.Androlib.build(Androlib.java:254)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)

----------------

Recompile Not Successful!
I guess there is a method you invoke but don't have.

You will need to recheck your work. This is not a mod. It's a theoretical guide. It comes with no warranty. Although many people made it work on their devices no problem. So you better start tackling it yourself.

On a further note, I am in the middle of many things right now. And so is Wuby. So there will be no support for a while now. Probably for a long while. In general we don't give support on making our guides work. We have put enough work into writing and explaining them. We cant be responsible if something doesn't work. Its your turn to read the explanations and use your own logic to adapt if needed. We hope you all understand. Especially now, that we are both professionally preoccupied.

For many distractions (becasue asking people to not tag, send pm or quote is apparently asking too much) I am now disabling Tapatalk and all notifications from both this and rc thread. Hoping everyone understands. We have put alot of work into teaching and promoting original development lately on xda. We showed many guides and how they are done with in depth explanations, to provide you with knowledge and tools to keep making mods on your own. Time to get back to real work for us. We will pop up for a visit I guess here and there.

Cheers to all and see you from time to time ???

Sent from my SM-N920C using Tapatalk
 

Iman87

Senior Member
Feb 23, 2015
461
140
63
31
Shiraz
I guess there is a method you invoke but don't have.

You will need to recheck your work. This is not a mod. It's a theoretical guide. It comes with no warranty. Although many people made it work on their devices no problem. So you better start tackling it yourself.

On a further note, I am in the middle of many things right now. And so is Wuby. So there will be no support for a while now. Probably for a long while. In general we don't give support on making our guides work. We have put enough work into writing and explaining them. We cant be responsible if something doesn't work. Its your turn to read the explanations and use your own logic to adapt if needed. We hope you all understand. Especially now, that we are both professionally preoccupied.

For many distractions (becasue asking people to not tag, send pm or quote is apparently asking too much) I am now disabling Tapatalk and all notifications from both this and rc thread. Hoping everyone understands. We have put alot of work into teaching and promoting original development lately on xda. We showed many guides and how they are done with in depth explanations, to provide you with knowledge and tools to keep making mods on your own. Time to get back to real work for us. We will pop up for a visit I guess here and there.

Cheers to all and see you from time to time

Sent from my SM-N920C using Tapatalk

We r all appreciate your works n efforts!

Look first i copied attachment files to res/drawer
then opened NotificationBackgroundView.smali and find .method public setCustomBackground(I)V and .method public setTint(I)V so, replaced them with provided ones, saved it and CLOSED!
then opened ActivatableNotificationView.smali and added .method private setNotificationBackgrounds()V under # Direct Methods and cut those green lines from .method protected onFinishInflate()V (add that blue line instead of those greens).
then added .method public onWindowFocusChanged(Z)V under # Virual Methods in ActivatableNotificationView.smali
Whats the prob?
 
Last edited:

edzamber

Senior Member
Feb 21, 2012
3,880
3,670
253
Sorry, instead of invoke-virtual it would be:

Code:
    [B]invoke-direct [/B]{p0}, Lcom/android/keyguard/status/SecKeyguardClockSingleView;->setClockStyle()V
Edit:
And you cant call that directly from the observer you are using. Why don't you just add 6th gear observer instead so you don't have to call another method? It is easy enough to add.

Thanks my friend but no luck.

I have look into res/layout/SecKeyguardClockSingleView.xml and i have this for Clock and date color related to android:fontFamilly (see blue text), maybe that's why font dosen't change... How can i replace value from android:fontFamilly ? I i delete , only define font in settings working.

Code:
<com.android.keyguard.status.KeyguardTextClock android:textSize="@dimen/kg_singleclock_time_text_size_normal" android:textColor="@color/theme_textclock_color" android:gravity="center" android:id="@id/keyguard_single_clock_time" android:focusable="false" android:visibility="gone" android:clickable="false" android:layout_width="300.0dip" android:layout_height="wrap_content" [color=""blue"]android:fontFamily="samsung-neo-num3T"[/color]android:format12Hour="@string/status_view_12_hours_format" android:format24Hour="@string/status_view_24_hours_format" style="@style/keyguard_clock_weather_text_shadow" />
        <com.android.keyguard.status.KeyguardTextClock android:textSize="82.0dip" android:textStyle="bold" android:textColor="@color/theme_textclock_color" android:gravity="center" android:id="@id/custom_clock_hour" android:focusable="false" android:clickable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" [COLOR=blue]android:fontFamily="samsung-neo-num3L"[/COLOR] android:format12Hour="h" android:format24Hour="kk" style="@style/keyguard_clock_weather_text_shadow" />
        <com.android.keyguard.status.KeyguardTextClock android:textSize="82.0dip" android:textStyle="bold" android:textColor="@color/theme_textclock_color" android:gravity="center" android:id="@id/custom_clock_min" android:focusable="false" android:clickable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" [COLOR=blue]android:fontFamily="samsung-neo-num3T"[/COLOR] android:format12Hour=":mm" android:format24Hour=":mm" style="@style/keyguard_clock_weather_text_shadow" />
        <LinearLayout android:gravity="center_horizontal" android:orientation="vertical" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <com.android.keyguard.status.KeyguardTextClock android:textSize="37.0dip" android:textStyle="bold" android:textColor="@color/theme_textclock_color" android:id="@id/custom_clock" android:focusable="false" android:clickable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" [color="blue]android:fontFamily="samsung-neo-num3L"[/color] android:layout_marginStart="1.0dip" android:format12Hour=":ss" android:format24Hour=":ss" style="@style/keyguard_clock_weather_text_shadow" />
 

renzetti.s

Senior Member
Jun 15, 2012
2,205
2,327
203
why Recompiling gives error?
on your post


Recompiling "SystemUI.apk" With Original Signature,
in work area "_WorkArea5", using "apktool_2.1.1.jar"

----------------

I: Using Apktool 2.1.1
I: Smaling smali folder into classes.dex...
Exception in thread "main" java.lang.IllegalStateException: Cannot get the location of a label that hasn't been placed yet.
at org.jf.dexlib2.builder.Label.getLocation(Label.java:54)
at org.jf.dexlib2.builder.Label.getCodeAddress(Label.java:48)
at org.jf.dexlib2.builder.BuilderOffsetInstruction.internalGetCodeOffset(BuilderOffsetInstruction.java:60)
at org.jf.dexlib2.builder.BuilderOffsetInstruction.getCodeOffset(BuilderOffsetInstruction.java:50)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:206)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:988)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:53)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:364)
at brut.androlib.Androlib.buildSources(Androlib.java:295)
at brut.androlib.Androlib.build(Androlib.java:278)
at brut.androlib.Androlib.build(Androlib.java:254)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)

----------------

Recompile Not Successful!
Label missing. (ex :cond_0 is label)....

Inviato dal mio LG-D802 utilizzando Tapatalk
 
  • Like
Reactions: Iman87 and tdunham

tdunham

Recognized Contributor
Jun 21, 2008
13,686
36,462
0
TampaBay
Thanks my friend but no luck.

I have look into res/layout/SecKeyguardClockSingleView.xml and i have this for Clock and date color related to android:fontFamilly (see blue text), maybe that's why font dosen't change... How can i replace value from android:fontFamilly ? I i delete , only define font in settings working.

Code:
<com.android.keyguard.status.KeyguardTextClock android:textSize="@dimen/kg_singleclock_time_text_size_normal" android:textColor="@color/theme_textclock_color" android:gravity="center" android:id="@id/keyguard_single_clock_time" android:focusable="false" android:visibility="gone" android:clickable="false" android:layout_width="300.0dip" android:layout_height="wrap_content" [color=""blue"]android:fontFamily="samsung-neo-num3T"[/color]android:format12Hour="@string/status_view_12_hours_format" android:format24Hour="@string/status_view_24_hours_format" style="@style/keyguard_clock_weather_text_shadow" />
        <com.android.keyguard.status.KeyguardTextClock android:textSize="82.0dip" android:textStyle="bold" android:textColor="@color/theme_textclock_color" android:gravity="center" android:id="@id/custom_clock_hour" android:focusable="false" android:clickable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" [COLOR=blue]android:fontFamily="samsung-neo-num3L"[/COLOR] android:format12Hour="h" android:format24Hour="kk" style="@style/keyguard_clock_weather_text_shadow" />
        <com.android.keyguard.status.KeyguardTextClock android:textSize="82.0dip" android:textStyle="bold" android:textColor="@color/theme_textclock_color" android:gravity="center" android:id="@id/custom_clock_min" android:focusable="false" android:clickable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" [COLOR=blue]android:fontFamily="samsung-neo-num3T"[/COLOR] android:format12Hour=":mm" android:format24Hour=":mm" style="@style/keyguard_clock_weather_text_shadow" />
        <LinearLayout android:gravity="center_horizontal" android:orientation="vertical" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <com.android.keyguard.status.KeyguardTextClock android:textSize="37.0dip" android:textStyle="bold" android:textColor="@color/theme_textclock_color" android:id="@id/custom_clock" android:focusable="false" android:clickable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" [color="blue]android:fontFamily="samsung-neo-num3L"[/color] android:layout_marginStart="1.0dip" android:format12Hour=":ss" android:format24Hour=":ss" style="@style/keyguard_clock_weather_text_shadow" />
This I don't know for sure. My original guide is only for stock clock which does not have any layout changes as far as I know. I have fonts defined in layout with all mods done there with no problems. But then you add seconds and other modifications to it and layout changes are necessary.
I think start over and just do the basic modification for font because adding too much is just going to be confusing. Put modified smali aside for compare later.
 
  • Like
Reactions: edzamber

bunnys7679

Senior Member
Jun 6, 2014
860
341
0
Have someone a link to this guide. I do not found this.
setting custom text color to all notification.

Gesendet von meinem SM-G925F mit Tapatalk
 

koko115

Senior Member
Jul 1, 2012
1,821
334
113
@daxgirl You are a master of moding. So maybe You know how turn off class/string in MessagingNotification.smali for stop deliviered sms buck. @MohammadAG committed fantastic module for xposed, but this module no working on new phone Samsung lollipop and MM. And dev stop update this module.
Screenshot_20160826-014016.png


In sec.mms app i found MessagingNotification.smali I think this is a class/string for delivered sms buck. 2x class name is :
Code:
const-string/jumbo v2, "updateReportNotification(),type="
Code:
    const-string/jumbo v0, "Mms/MessagingNotification"

    new-instance v1, Ljava/lang/StringBuilder;

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

      [COLOR="red"]const-string/jumbo v2, "updateReportNotification isMuteThread :"[/COLOR]

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

    move-result-object v1

    sget-boolean v2, Lcom/android/mms/transaction/MessagingNotification;->am:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

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

    move-result-object v1

    invoke-static {v0, v1}, Lcom/android/mms/j;->b(Ljava/lang/String;Ljava/lang/String;)V

    :cond_2
    new-instance v0, Ljava/lang/StringBuffer;

    const/16 v1, 0x64

    invoke-direct {v0, v1}, Ljava/lang/StringBuffer;-><init>(I)V

    const-string/jumbo v1, "Mms/MessagingNotification"

     [COLOR="red"]const-string/jumbo v2, "updateReportNotification(),type="[/COLOR] 
    
    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/lang/StringBuffer;->append(I)Ljava/lang/StringBuffer;

    move-result-object v0

    const-string/jumbo v2, ",status="

    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/StringBuffer;->append(I)Ljava/lang/StringBuffer;

    move-result-object v0

    const-string/jumbo v2, ",threadId="

    invoke-virtual {v0, v2}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/android/mms/j;->b(Ljava/lang/String;Ljava/lang/String;)V

    new-instance v3, Landroid/app/Notification$Builder;

    invoke-direct {v3, p0}, Landroid/app/Notification$Builder;-><init>(Landroid/content/Context;)V

    invoke-static {p0}, Landroid/support/v4/app/cy;->a(Landroid/content/Context;)Landroid/support/v4/app/cy;

    move-result-object v4

    packed-switch p1, :pswitch_data_0

    const-string/jumbo v0, ""

    goto :goto_0

In sources module from @MohammadAG i see block this class/string and exchange on tost.

Code:
package com.mohammadag.deliverytoastnotification;

import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.provider.ContactsContract;
import android.text.TextUtils;
import android.widget.Toast;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XSharedPreferences;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.XposedHelpers.ClassNotFoundError;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;

public class XposedMod implements IXposedHookLoadPackage {

private XSharedPreferences mPreferences;

@Override
public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
if (!lpparam.packageName.equals(Constants.MMS_PACKAGE_NAME))
return;

mPreferences = new XSharedPreferences(XposedMod.class.getPackage().getName());

try {
XposedHelpers.findAndHookMethod("com.android.mms.transaction.MessagingNotification",
lpparam.classLoader, "updateReportNotification", Context.class, int.class,
int.class, long.class, String.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
Context context = (Context) param.args[0];
int type = (Integer) param.args[1];
int status = (Integer) param.args[2];
String address = (String) param.args[4];

mPreferences.reload();

// Only handle message delivered notifications
if (type == 0 && status == 0) {
int toastLength = Toast.LENGTH_SHORT;

if (mPreferences.getBoolean(Constants.SETTINGS_LONG_TOAST_KEY, false))
toastLength = Toast.LENGTH_LONG;

Toast.makeText(context, makeToastText(context, address),
toastLength).show();
param.setResult(null);
}
}
});
} catch (ClassNotFoundError e) {
e.printStackTrace();
} catch (NoSuchMethodError e) {
e.printStackTrace();
}
}

private String makeToastText(Context context, String address) {
String str = context.getString(
context.getResources().getIdentifier("delivery_toast_body",
"string", Constants.MMS_PACKAGE_NAME));
return String.format(str, getContactDisplayNameForAddress(context, address));
}

private String getContactDisplayNameForAddress(Context context, String address) {
Cursor cursor = context.getContentResolver().query(
Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(address)),
new String[] { ContactsContract.PhoneLookup.DISPLAY_NAME }, null, null, null);
if (cursor.moveToFirst()) {
address = cursor.getString(cursor.getColumnIndex(ContactsContract.PhoneLookup.DISPLAY_NAME));
if (mPreferences.getBoolean(Constants.SETTINGS_SHOW_NUMBER_KEY, true)
|| address == null || TextUtils.isEmpty(address)) {
address += " (" + address + ")";
}
}
return address;
}
}

So i think when i off this class/string, i dont receive sound and sms on statusbar when report is deliviered. I try add const/4 v0, 0x0 on button or top const-string/jumbo v2, "updateReportNotification(),type=" but after recompile app FC, or open without FC but when report sms buck app get FC. Lot of people want mod like this, because like report, but dont like exactly some sound and sms buck when deliviered. Samsung in this is verry stupid.
I dont want toast, only disable sms report buck, and turn off sound for this sms report.

So i please help me with this mod.
Thx

Sources for module
https://github.com/MohammadAG/Xposed-Message-Delivered-Toast-Notifications
And .smali in attach file.
No idea for this ?
 

lucadalba

Senior Member
Dec 4, 2015
435
487
0
[GUIDE] How to add ITEMS to OPEN EVERY APP in ABOUT DEVICE settings

Hello to all.
As always hope this guide will be useful :)

This guide will allow you to ADD ITEMS IN ABOUT DEVICE SETTINGS TO OPEN EVERY APP YOU WANT clicking these items.

THANKS TO @ambasadii and @edzamber FOR ORIGINAL GUIDES here and here .
This guide has been created merging parts of their two guides.


So let's start!

Decompile SecSettings.apk and go into /res/xml/device_info_settings.xml

ADD the highlihted BLUE and GREEN code anywhere you want to locate your item but you MUST put the code BETWEEN FIRST <PreferenceScreen ... > OPEN TAG and LAST </PreferenceScreen> CLOSE TAG.

In this example we will add an item that opens RomControl app.

Code:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/about_settings" android:key="about_device"
  xmlns:android="http://schemas.android.com/apk/res/android">
    
    .
    .
    .
    .
    
    <PreferenceScreen android:title="@string/plmn_update_settings_list_item_title" android:key="plmn_update_settings" android:fragment="com.android.settings.PublicLandMobileNetwork" />
    [COLOR=blue]<PreferenceScreen 
        android:title="@string/my_title_yeah" 
        android:key="my_keyyeah" >
          <intent 
              android:targetPackage="[/COLOR][COLOR=green]com.wubydax.romcontrol.v2[/COLOR][COLOR=blue]" 
              android:action="android.intent.action.MAIN" 
              android:targetClass="[/COLOR][COLOR=green]com.wubydax.romcontrol.v2.MainActivity[/COLOR][COLOR=blue]" />
    </PreferenceScreen>[/COLOR]
    <PreferenceScreen android:title="@string/device_status" android:key="status_info" android:summary="@string/device_status_summary">
        <intent android:targetPackage="com.android.settings" android:action="android.intent.action.MAIN" android:targetClass="com.android.settings.deviceinfo.Status" />
    </PreferenceScreen>
    
    .
    .
    .
    .
    
</PreferenceScreen>
Observations:
- android:title will contain the resource TEXT of the item. In this case it will be the string called my_title_yeah (we will add it after)
- android:key will contain a value useless for us, but it is REALLY IMPORTANT to do NOT USE other already EXISTING android:key .. so it's better to include a strange word into it (as my_keyyeah)
- android:targetPackage is REALLY IMPORTANT because it will contain the PACKAGE NAME of the app we want to open
for example if we would to open SuperSU app we will use SUPERSU PACKAGE NAME: android:targetPackage="eu.chainfire.supersu"
- android:targetClass is REALLY IMPORTANT because it will contain the PACKAGE NAME + the MAIN ACTIVITY of the app we want to open
for example if we would to open SuperSU app we will use SUPERSU PACKAGE NAME + SUPERSU MAIN ACTIVITY: android:targetClass="eu.chainfire.supersu.MainActivity"

Now go into /res/values/strings.xml and ADD the highlihted BLUE code and the END of the file before </resources> close tag

Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    
    .
    .
    .
    .
    
    [COLOR=blue]<string name="[I]my_title_yeah[/I]">[B]ROM Control[/B]</string>[/COLOR]
</resources>

The BOLD code is the TEXT of our item.
Note that the ITALIC highlighted string name MUST BE IDENTICAL TO android:title="@string/my_title_yeah" that we used before.

Now save changes, recompile the app and put it into /system/priv-app/SecSettings (and give rwxr-xr-x permissions to the folder and rw-r--r-- permissions to the apk) and reboot.

Screenshot:

7ec4dba13791c27961a4db6db1241284.jpg


My item TEXT is different of one that I've wrotten in guide..


Enjoy! ;)
 
Last edited:

edzamber

Senior Member
Feb 21, 2012
3,880
3,670
253
Hi @tdunham


I try to add a global setting observer and apply it to phoneStatusBar/phoneStatusBar$2 for this mod

http://forum.xda-developers.com/showpost.php?p=67980049&postcount=8441

I block at the end, to set .method public onContentChanged(Ljava/lang/String;)V

See blue colored code :

Code:
:cond_0

    const-string v0, "heads_up_notifications_enabled"

    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    move-object/from16 v0, p0

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->[color="blue"]set.........[/color]

    :cond_1
    return-void
.end method

Can you help me please ?
 

tdunham

Recognized Contributor
Jun 21, 2008
13,686
36,462
0
TampaBay
Hi @tdunham


I try to add a global setting observer and apply it to phoneStatusBar/phoneStatusBar$2 for this mod

http://forum.xda-developers.com/showpost.php?p=67980049&postcount=8441

I block at the end, to set .method public onContentChanged(Ljava/lang/String;)V

See blue colored code :

Code:
:cond_0

    const-string v0, "heads_up_notifications_enabled"

    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    move-object/from16 v0, p0

    invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->[color="blue"]set.........[/color]

    :cond_1
    return-void
.end method

Can you help me please ?
Yours is very different, let me see your two smali.
 

edzamber

Senior Member
Feb 21, 2012
3,880
3,670
253
Yours is very different, let me see your two smali.

Here you go.

Look line 16946 from PhoneStatusBar.smali, thats where i try to add observer
Look line 21089 from PhoneStatusBar.smali, thats where i mod for Head-Up notification
Look line 69 from PhoneStatusBar$2.smali, thats where i mod for Head-Up notification

Thanks my friend :)
 

Attachments

  • Ed_Smalis.zip
    69.6 KB · Views: 19

tdunham

Recognized Contributor
Jun 21, 2008
13,686
36,462
0
TampaBay
Here you go.

Look line 16946 from PhoneStatusBar.smali, thats where i try to add observer
Look line 21089 from PhoneStatusBar.smali, thats where i mod for Head-Up notification
Look line 69 from PhoneStatusBar$2.smali, thats where i mod for Head-Up notification

Thanks my friend :)
Ahh, ok I see what you mean. You shouldn't need to set observer I think just adding the key heads_up_notifications_enabled for on/off toggle is enough. Have you tried it?
The only app I notice headsup notifications is Hangouts but maybe there are more. That is the primary reason I use it.
 

edzamber

Senior Member
Feb 21, 2012
3,880
3,670
253
Ahh, ok I see what you mean. You shouldn't need to set observer I think just adding the key heads_up_notifications_enabled for on/off toggle is enough. Have you tried it?
The only app I notice headsup notifications is Hangouts but maybe there are more. That is the primary reason I use it.

I found how to make it working : i add the key and Called method for Head-up in observer line 16946 from PhoneStatusBar.smali
Method is .method public start () V

So i have write

->setPublicStart () V

50d3baa72bf53d01b66a79983453a41b.jpg


[emoji3] [emoji3] [emoji3] [emoji3]

Yes Head-up notifications are Called for more apps as Facebook, Telegram...

Now working on the fly [emoji3] [emoji3] [emoji3] [emoji3]
 
  • Like
Reactions: tdunham

tdunham

Recognized Contributor
Jun 21, 2008
13,686
36,462
0
TampaBay
I found how to make it working : i add the key and Called method for Head-up in observer line 16946 from PhoneStatusBar.smali
Method is .method public start () V

So i have write

->setPublicStart () V

50d3baa72bf53d01b66a79983453a41b.jpg


[emoji3] [emoji3] [emoji3] [emoji3]

Yes Head-up notifications are Called for more apps as Facebook, Telegram...

Now working on the fly [emoji3] [emoji3] [emoji3] [emoji3]
Great job. I added a link to this one at the end of my guide for reference.
 
  • Like
Reactions: edzamber

tdunham

Recognized Contributor
Jun 21, 2008
13,686
36,462
0
TampaBay
I found how to make it working : i add the key and Called method for Head-up in observer line 16946 from PhoneStatusBar.smali
Method is .method public start () V

So i have write

->setPublicStart () V
Can you show this method too? I do not see it in your PhoneStatusBar.smali.
 

Top Liked Posts

Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone