Guides Android 7 modding with main emphasis on S7edge this time

Search This thread

asc1977

Senior Member
Apr 15, 2012
5,330
6,989
Schwetzingen
Adaption of Gear device info in notification panel

Go to this post and follow guide with the followed changes

Step 3
look for the ID of the carrier label. its changed on nougat. Change it in lines like it is on nougat and do rest same like in step3

Step5 part2 you can ignore, fix since beta 6 find here

Have fun and thx to @daxgirl
 
Last edited:

Umair Ahmad

Senior Member
May 14, 2014
2,365
3,715
London
How to Make Data Usage Center From Right in Notification Panel.. Credit @asc1977 Bro

First of all Add Following Csc line in your Other.xml or Feature.xml
Code:
<CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>TRUE</CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>

Now Decompiling and Recompiling

1 : Decompile SystemUI.apk
2 : Navigate to res\layout
3 : Search for data_usage_view_layout.xml and Open it Notepad ++

Now Find the Red

Code:
<com.android.systemui.qs.DataUsageView android:textAppearance="@style/TextAppearance.DataUsageView" [COLOR="Red"]android:gravity="end"[/COLOR] android:id="@id/data_usage_view" android:paddingBottom="@dimen/data_usage_view_padding_bottom" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="@dimen/data_usage_view_height" android:includeFontPadding="false" android:paddingEnd="@dimen/data_usage_view_padding_end"

Replace with Blue

Code:
<com.android.systemui.qs.DataUsageView android:textAppearance="@style/TextAppearance.DataUsageView" [COLOR="Blue"]android:gravity="center"[/COLOR] android:id="@id/data_usage_view" android:paddingBottom="@dimen/data_usage_view_padding_bottom" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="@dimen/data_usage_view_height" android:includeFontPadding="false" android:paddingEnd="@dimen/data_usage_view_padding_end"

Save and Recompile... Enjoy.... :laugh:

I only Tried it On Android Nougat 7.0...
 
Last edited:

daxgirl

Senior Member
Jun 30, 2012
4,047
9,165
Jerusalem
How to Make Data Usage Center From Right in Notification Panel.. Credit @asc1977 Bro

First of all Add Following Csc line in your Other.xml or Feature.xml
Code:
<CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>TRUE</CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>

Now Decompiling and Recompiling

1 : Decompile SystemUI.apk
2 : Navigate to res\layout
3 : Search for data_usage_view_layout.xml and Open it Notepad ++

Now Find the Red

Code:
<com.android.systemui.qs.DataUsageView android:textAppearance="@style/TextAppearance.DataUsageView" [COLOR="Red"]android:gravity="end"[/COLOR] android:id="@id/data_usage_view" android:paddingBottom="@dimen/data_usage_view_padding_bottom" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="@dimen/data_usage_view_height" android:includeFontPadding="false" android:paddingEnd="@dimen/data_usage_view_padding_end"

Replace with Blue

Code:
<com.android.systemui.qs.DataUsageView android:textAppearance="@style/TextAppearance.DataUsageView" [COLOR="Blue"]android:gravity="center"[/COLOR] android:id="@id/data_usage_view" android:paddingBottom="@dimen/data_usage_view_padding_bottom" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="@dimen/data_usage_view_height" android:includeFontPadding="false" android:paddingEnd="@dimen/data_usage_view_padding_end"

Save and Recompile... Enjoy.... [emoji23]

I only Tried it On Android Nougat 7.0...
I believe the correct gravity for this matter is center_horizontal. Also we have an extensive mod allowing to change appearance and position of data usage on the fly. I believe it was even adopted to nougat on this thread.
https://youtu.be/vulJsim6dIs

Sent from my SM-N920C using Tapatalk
 

grzegorz354

Senior Member
Feb 21, 2014
228
251
Bukowno
How to hide (Power Menu) Power Off Button with a Toggle

Services.jar

open smali/com/android/server/policy/GlobalActions$PowerAction.smali

Replace method with below
Code:
.method public showConditional()Z
    .locals 4

    const/4 v0, 0x0

    const/4 v1, 0x1

    iget-object v2, p0, Lcom/android/server/policy/GlobalActions$PowerAction;->this$0:Lcom/android/server/policy/GlobalActions;

    # getter for: Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
    invoke-static {v2}, Lcom/android/server/policy/GlobalActions;->access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string/jumbo v3, "power_menu_power"

    invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v2

    if-ne v2, v0, :cond_0

    :goto_0
    return v0

    :cond_0
    move v0, v1

    goto :goto_0
.end method

Add method with below GlobalActions.smali

Code:
.method static synthetic access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;

    return-object v0
.end method

RomControl

Code:
 <com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Power off" android:key="power_menu_power" android:defaultValue="true" android:summaryOn="on" android:summaryOff="off" />

thx. @asc1977
 
Last edited:
  • Like
Reactions: asc1977

asc1977

Senior Member
Apr 15, 2012
5,330
6,989
Schwetzingen
How to hide (Power Menu) Power Off Button with a Toggle

Services.jar

open smali/com/android/server/policy/GlobalActions$PowerAction.smali

Replace method with below
Code:
.method public showConditional()Z
    .locals 4

    const/4 v0, 0x0

    const/4 v1, 0x1

    iget-object v2, p0, Lcom/android/server/policy/GlobalActions$PowerAction;->this$0:Lcom/android/server/policy/GlobalActions;

    # getter for: Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
    invoke-static {v2}, Lcom/android/server/policy/GlobalActions;->access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const-string/jumbo v3, "power_menu_power"

    invoke-static {v2, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v2

    if-ne v2, v0, :cond_0

    :goto_0
    return v0

    :cond_0
    move v0, v1

    goto :goto_0
.end method

RomControl

Code:
 <com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Power off" android:key="power_menu_power" android:defaultValue="true" android:summaryOn="on" android:summaryOff="off" />

thx for your guide, but one thing is missing. if you do this guide you have to readd the method in GlobalActions.smali if its not done at any mod before. please add it to your guide

Code:
.method static synthetic access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;

    return-object v0
.end method
 
  • Like
Reactions: grzegorz354

Grouxho

Senior Member
Dec 1, 2012
88
346
Madrid
www.esp-desarrolladores.com
Guide - Long Press Skip Tracks (selectable long press timeout) & Double click for pause/play music (Reference - S7 Edge Nougat Beta 4)

Features

- Long Press Skip tracks when screen off.
- Selectable TimeOut in mSec
- Option for play / pause music if we double click a volume key.
- more to come..

Quick Guide

(The code is a bit long, so, see attached files, read my comments and compare original to modded files for easier implementation. )

1.- Extract classes.dex from services.jar and dissasemble it.

Using latest baksmali.jar:

java -jar baksmali.jar d classes.dex --debug-info false -o output_ser/

(output_ser or whatever, of course. Optional --debug-info false, but it is easier to see the code without debug info..)

2.- Download the attached zip and extract it. Go to xda-mod folder and copy

PhoneWindowManager$GrxDobleTapVol.smali and PhoneWindowManager$GrxLongVol.smali

to smali/com/android/server/policy in your dissasembled classes.dex

3.- Now, compare the provided PhoneWindowManager$SettingsObserver.smali and PhoneWindowManager.smali. I provide original (ori folder in attached zip) and modded (xda-mod folder).

4.- Implement changes in your PhoneWindowManager.smali

Basically:

. Look for # instance fields tag, and just below declare the vars used in the mod

. Look for .method public constructor <init>()V and just before the return-void instruction add the provided block of code in the attached modded smali file.

. Look for # virtual methods and add the 9 provided methods.

. Look for .method public interceptKeyBeforeQueueing(Landroid/view/KeyEvent;I)I and:

Add the goto tag as shown in the provide mod code. Don´t forget this!.
Add the provided block of code just before the ....>getTelecommService()Landroid/telecom/TelecomManager instruction, under the corresponding to 0x18 and 0x19 keycodes sswitch tag, as shown in my code.

- Now let´s modify the existing SettingsObserver, in order to update the preferences values when one of them is changed.

. Compare modded PhoneWindowManager$SettingsObserver.smali to original PhoneWindowManager$SettingsObserver.smali. Changes to be made are:

. Declare the three uris as shown in my code
. Add both the provided block of code (to get observed uris) and the call instruction (to update vars storing the preference values after booting) in method observer()V, as shown in the code
. Add the method .method public onChange(ZLandroid/net/Uri;)V (if existing in your rom, you will need to adapt the code, of course)

5.- Assemble the new classes.dex, put it into services.jar and flash it.

6.- Rom Control/Other prefs app

Default values are:

- Use skip tracks - > true
- Use Double click to play/pause -> true
- Long press timeout -> 600 mSec.

Finally, although I do not use Rom Control but my own preferences application, I think the following (or something like this..) preferences setting will work with Rom Control:

Code:
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Use Skip Tracks Mod" android:key="b_skip_tracks" android:defaultValue="true" android:summaryOn="Enabled" android:summaryOff="Disabled" />
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:title="Kill app checkbox" android:key="b_doble_click_skip_tracks" android:defaultValue="true" android:summaryOn="Enabled" android:summaryOff="Disabled" android:dependency="b_skip_tracks"  />
<com.wubydax.romcontrol.v2.prefs.MySeekBarPreference android:title="Long Press TimeOut" android:key="b_timeout_skip_tracks" android:dependency="b_skip_tracks" android:defaultValue="600" app:minValue="300" app:maxValue="1300" app:unitsValue="mSec" />

Basically you need two checkboxes or two switches (or one checkbox and one switch) to control "b_skip_tracks" (main checkbox, if false no mod it is applied) and "b_doble_click_skip_tracks" (for double click to play-pause music).
For long press time out use a seekbar or similar (key -> "b_timeout_skip_tracks"

If you get "Unsigned short value out of range.." while assembling the new classes.dex (for those not knowing why and how..)

smali.jar is able to manage up to 65535 methods per dex file. That is the reason why we get two or three dex files in some jars (services.jar, framework.jar) after deodexing them.

If you get an error similar to:

..Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65593

that was the problem.

To solve this, we will create a new classes3.dex extracting some code from the original classes.dex.

- Dissasemble classes.dex (i.e. to output_ser folder)
- Create a new folder for our new classes3.dex, i.e. output_ser3 and create the com/android/server directory structure.
- Now cut from the dissasembled classes.dex the policy (com-android-server) folder and copy to the output_ser3 dir, taking care of maintaining the original folder structure

Now, output_ser contains the original code except our policy folder and output_ser3 contains our policy folder.

Let´s create new classes.dex and classes3.dex

-> java -Xmx512M -jar smali.jar a otuput_ser -o classes.dex
-> java -Xmx512M -jar smali.jar a otuput_ser3 -o classes3.dex

Put both the new classes.dex and classes3.dex into your services.jar and flash it. IMPORTANT: First time you do this, you need to wipe dalvik and art and cache.

Greetings from Spain.


--->Added attachment with fix in phonewindowmanager settingsobserver (method onchange)
 

Attachments

  • SMALIS_ORI_MOD_GRX_SKIP_TRACKS.zip
    184.7 KB · Views: 157
  • FixPhoneWindowManager$SettingsObserver.zip
    1.4 KB · Views: 101
Last edited:

necrosauron

Senior Member
Aug 9, 2013
121
51
Rancagua
Guide - Long Press Skip Tracks (selectable long press timeout) & Double click for pause/play music (Reference - S7 Edge Nougat Beta 4)

Features

- Long Press Skip tracks when screen off.
- Selectable TimeOut in mSec
- Option for play / pause music if we double click a volume key.
- more to come..

Quick Guide

(The code is a bit long, so, see attached files, read my comments and compare original to modded files for easier implementation. )

1.- Extract classes.dex from services.jar and dissasemble it.

Using latest baksmali.jar:

java -jar baksmali.jar d classes.dex --debug-info false -o output_ser/

(output_ser or whatever, of course. Optional --debug-info false, but it is easier to see the code without debug info..)

2.- Download the attached zip and extract it. Go to xda-mod folder and copy

PhoneWindowManager$GrxDobleTapVol.smali and PhoneWindowManager$GrxLongVol.smali

to smali/com/android/server/policy in your dissasembled classes.dex

3.- Now, compare the provided PhoneWindowManager$SettingsObserver.smali and PhoneWindowManager.smali. I provide original (ori folder in attached zip) and modded (xda-mod folder).

4.- Implement changes in your PhoneWindowManager.smali

Basically:

. Look for # instance fields tag, and just below declare the vars used in the mod

. Look for .method public constructor <init>()V and just before the return-void instruction add the provided block of code in the attached modded smali file.

. Look for # virtual methods and add the 9 provided methods.

. Look for .method public interceptKeyBeforeQueueing(Landroid/view/KeyEvent;I)I and:

Add the goto tag as shown in the provide mod code. Don´t forget this!.
Add the provided block of code just before the ....>getTelecommService()Landroid/telecom/TelecomManager instruction, under the corresponding to 0x18 and 0x19 keycodes sswitch tag, as shown in my code.

- Now let´s modify the existing SettingsObserver, in order to update the preferences values when one of them is changed.

. Compare modded PhoneWindowManager$SettingsObserver.smali to original PhoneWindowManager$SettingsObserver.smali. Changes to be made are:

. Declare the three uris as shown in my code
. Add both the provided block of code (to get observed uris) and the call instruction (to update vars storing the preference values after booting) in method observer()V, as shown in the code
. Add the method .method public onChange(ZLandroid/net/Uri;)V (if existing in your rom, you will need to adapt the code, of course)

5.- Assemble the new classes.dex, put it into services.jar and flash it.

6.- Rom Control/Other prefs app

Default values are:

- Use skip tracks - > true
- Use Double click to play/pause -> true
- Long press timeout -> 600 mSec.

Finally, although I do not use Rom Control but my own preferences application, I think the following (or something like this..) preferences setting will work with Rom Control:

Code:
<com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Use Skip Tracks Mod" android:key="b_skip_tracks" android:defaultValue="true" android:summaryOn="Enabled" android:summaryOff="Disabled" />
<com.wubydax.romcontrol.v2.prefs.MyCheckBoxPreference android:title="Kill app checkbox" android:key="b_doble_click_skip_tracks" android:defaultValue="true" android:summaryOn="Enabled" android:summaryOff="Disabled" android:dependency="b_skip_tracks"  />
<com.wubydax.romcontrol.v2.prefs.MySeekBarPreference android:title="Long Press TimeOut" android:key="b_timeout_skip_tracks" android:dependency="b_skip_tracks" android:defaultValue="600" app:minValue="300" app:maxValue="1300" app:unitsValue="mSec" />

Basically you need two checkboxes or two switches (or one checkbox and one switch) to control "b_skip_tracks" (main checkbox, if false no mod it is applied) and "b_doble_click_skip_tracks" (for double click to play-pause music).
For long press time out use a seekbar or similar (key -> "b_timeout_skip_tracks"

If you get "Unsigned short value out of range.." while assembling the new classes.dex (for those not knowing why and how..)

smali.jar is able to manage up to 65535 methods per dex file. That is the reason why we get two or three dex files in some jars (services.jar, framework.jar) after deodexing them.

If you get an error similar to:

..Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65593

that was the problem.

To solve this, we will create a new classes3.dex extracting some code from the original classes.dex.

- Dissasemble classes.dex (i.e. to output_ser folder)
- Create a new folder for our new classes3.dex, i.e. output_ser3 and create the com/android/server directory structure.
- Now cut from the dissasembled classes.dex the policy (com-android-server) folder and copy to the output_ser3 dir, taking care of maintaining the original folder structure

Now, output_ser contains the original code except our policy folder and output_ser3 contains our policy folder.

Let´s create new classes.dex and classes3.dex

-> java -Xmx512M -jar smali.jar a otuput_ser -o classes.dex
-> java -Xmx512M -jar smali.jar a otuput_ser3 -o classes3.dex

Put both the new classes.dex and classes3.dex into your services.jar and flash it. IMPORTANT: First time you do this, you need to wipe dalvik and art and cache.

Greetings from Spain.
master!!!!! it's awesome to see your work here ...
now things will be fun....
best regard

Enviado desde mi SM-G935F mediante Tapatalk
 
  • Like
Reactions: gvmiguez

fivanbe

Member
Oct 22, 2013
24
85
Valencia
espdroids.com
Perfect @Grouxho.
Thank you very much.
57315939d0f6b75b7536afddd5d38b12.jpg


Enviado desde mi SM-G935F mediante Tapatalk
 

asc1977

Senior Member
Apr 15, 2012
5,330
6,989
Schwetzingen
How to make a option to choose between Stock and 3Minit battery

1. First of all be sure you added Global context for android application from @daxgirl in your SystemUI.apk
If its didnt done follow guide here

2. Add 3Minit Battery to your rom like guided here

So now after i thought many days and hour about how to hide the stock battery icon because a normal method like on MM or Lollipop never work after a reboot on Nougat i had a great idea. Why we dont do it like we do it in System_icons.xml ??? We set the width and high of icon to 0.0dip. So we come to next step

3. Look in system_icons.xml for that line
Code:
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="@dimen/status_bar_battery_icon_width" android:layout_height="@dimen/status_bar_battery_icon_height" android:layout_marginBottom="@dimen/battery_margin_bottom" />

It must be look like that. So we see the high and width is in dimens.xml. Now we can search the ids for that in public.xml. in my case its like that
Code:
<public type="dimen" name="status_bar_battery_icon_height" id="0x7f0d01b1" />
    <public type="dimen" name="status_bar_battery_icon_width" id="0x7f0d01b2" />

Now go to com/android/systemui/statusbar/phone/StatusBarIconController and search for one of this ids and you found position where both ids are and looks like that
Code:
const v7, 0x7f0d01b1

    invoke-virtual {v4, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    const v7, 0x7f0d01b2

    invoke-virtual {v4, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
	
	move-result v1

So replace that lines with followed lines. There you see blue IDs. This IDs are any ID of a dimens with 0.0dip. In my case i took
Code:
<dimen name="status_bar_clock_end_padding">0.0dip</dimen>
<public type="dimen" name="status_bar_clock_end_padding" id="0x7f0d01b5" />
Code:
const/4 v10, 0x0

    const-string v11, "stock_battery_visibility"

    invoke-static {v11, v10}, Lcom/android/wubydax/GearUtils;->getDbIntForKey(Ljava/lang/String;I)I

    move-result v11

    if-nez v11, :cond_7

    const v7, [COLOR="Blue"]0x7f0d01b5[/COLOR]  

    invoke-virtual {v4, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    const v7, [COLOR="blue"]0x7f0d01b5[/COLOR]

    invoke-virtual {v4, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

	move-result v1

    goto :goto_25

    :cond_7
	
	const v7, 0x7f0d01b1

    invoke-virtual {v4, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    const v7, 0x7f0d01b2

    invoke-virtual {v4, v7}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
	
	move-result v1

    :goto_25

this edits work with daxgirls mod for global context. now you see i took for this lines at begin two new locals. V10 and V11 because they not used before in that method. Now go to begin of method and increase locals from V10 to V12.

4. Recompile and push to phone

5. RomControl preferences
Code:
<com.wubydax.romcontrol.v2.prefs.OpenAppPreference android:title="3Minit Battery Mod" android:summary="Custom battery chooser" app:componentName="com.three.minit.minitbatterysettings.free/com.three.minit.minitbatterysettings.MainActivity"/>
            <com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="3Minit battery show/hide" android:key="minit_battery_visible" android:defaultValue="true" android:summaryOn="shown" android:summaryOff="hidden" />
            <com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Stock battery show/hide" android:key="stock_battery_visibility" android:defaultValue="false" android:summaryOn="shown" android:summaryOff="hidden" app:packageNameToKill="com.android.systemui" app:isSilent="false"/>
First line is the OpenAppPreference to launch 3Minit apk
Second line is to show/hide 3MinitBattery on the fly
Third line is to show/hide stock battery with Systemui reboot

The stock battery is now default hidden in this mod so if users only see one battery at clean install

HAVE FUN WITH THAT MOD !!!

Thx to @gharrington for 3Minit and @daxgirl for global context
 
Last edited:

boostermbkking

Senior Member
May 2, 2011
1,725
3,372
Iron Bridge
sites.google.com
Adaption for 6thGear Data Usage Preferences on the fly without observer and without CSC changes

First of all thy @daxgirl for her great mod here and press the thanks button

For Nougat we need some adaptions. To get it to work i needed a additional step which need GearUtils. Also on/off is not on the fly anymore but all other settings. So follow guide but replace followed steps:

1. navigate to here because feature.smali now SystemUIRuine.smali:
Code:
smali/com/android/systemui/SystemUIRune.smali

2. search for that boolean because is also changed:
Code:
sput-boolean v0, Lcom/android/systemui/SystemUIRune;->SUPPORT_QUICKPANEL_DATAUSAGE:Z

...
...
...

I have this error when recompile:
Code:
SystemUI.apk\smali\com\android\systemui\SystemUIRune.smali[2367,4] There is already a label with that name.
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: com/android/systemui/SystemUIRune.smali

where is my mistake?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    Guides Android 7
    I decided after a long thinking about to open a new thread for modding guides for Android 7 because i see that there are much differences to older Android versions. So we keep up to date to make life easier. I hope all agree with me in that and share like me guides here. If you didnt agree with me keep your mind by yourself please and dont make my life harder ;)

    Thanks




    Framework-res.apk and services.jar
    How to add Reboot Recovery Android 7 Style with toggle

    Services.jar
    Howto remove confirm buttons in Reboot menue for shutoff and reboot
    USB Plug/Unplug disable wake up with toggle in RomControl
    How to hide (Power Menu) Emergency Button with a Toggle
    How to hide (Power Menu) Power Off Button with a Toggle
    How to Disable Signature Check
    Remove Volume Safe Warning with checkbox

    GooglePackageInstaller.apk
    Granting permissions dialog - Ok button always available with window (or alert) overlays

    SamsungCamera6.apk
    Another way of using Camera Flash on low battery

    SystemUI.apk
    Guide - SysScope - Status = Official

    SystemUI.apk
    How to enable Lockscreen rotation with toggle in RomControl V2
    How to unlock after reboot with fingerprint without pin or pattern
    Network traffic indicator in status bar
    GearUtils
    How to open app if click on statusbar clock
    Adaption for 6thGear Data Usage Preferences on the fly without observer and without CSC changes
    Adaption of Gear device info in notification panel
    Adaption of 6htGear Carrier label preferences - as ADDITION to 6thGear device info mod
    How to Make Data Usage Center From Right in Notification Panelwithout RomControl
    How to add virtual lock, recent and home button to statusbar with RomControl
    Add Battery Bar to ROM
    How to make a option to choose between Stock and 3Minit battery
    Volume safe warning to be permanently disabled (at bottom of post)

    SecSettings2.apk
    Activate duration keys lighting in the setting
    How to build 0.25x anmimation scale in developer options

    Different mods
    Nougat compatible -=V6=- 1060 FONTS
    Whitepages /identify unsaved numbers

    24
    Guide - SysScope - Status = Official

    Decompile SysScope.apk

    1.- Edit com/sec/android/app/sysscope/engine/SystemDiagnosisManager.smali

    Look for the line that calls to the method storeresult (inside .method public b()V ) and just above we will force a const 0x1 as calling parameter value (see next code in blue)

    Code:
    ...
    
       move-result-object v4
    
        invoke-static {v1, v4}, Lcom/sec/android/app/sysscope/engine/i;->c(Ljava/lang/String;Ljava/lang/String;)I
    
       [B][COLOR="#0000FF"] const v0, 0x1[/COLOR][/B]
    
        invoke-virtual {p0, v0}, Lcom/sec/android/app/sysscope/engine/SystemDiagnosisManager;->storeResult(I)I
    
        move-result v1
    
    ....


    2.- Edit com/sec/android/app/sysscope/job/KernelStatusChecker.smali

    Replace the following method

    Code:
    .method private b(Ljava/lang/String;)Z
        .locals 2
    
        const/4 v0, 0x1
    
        return v0
    .end method


    3.- Edit com/sec/android/app/sysscope/job/RootProcessScanner.smali

    Replace

    Code:
    .method public native checkIsApprivedProcess(Ljava/lang/String;)I
    .end method


    by

    Code:
    .method public checkIsApprivedProcess(Ljava/lang/String;)I
        .locals 2
    
        const v0, 0x1
    
        return v0
    .end method


    4.- Edit com/sec/android/app/sysscope/service/SysScopeResultInfo.smali

    - Replace this method

    Code:
    .method public a()I
        .locals 2
    
        const v0, 0x1
    
        return v0
    .end method

    - Look for the following strings,

    Code:
    Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    and delete the lines containing them. There are two: in .method public a(Landroid/os/Parcel;)V and in .method public a(Lcom/sec/android/app/sysscope/service/g;)V

    Thats all.


    NOTE:

    I leave in the attached file the original and modified code, as well as the original and modified apks (modified apk keeps the original signature).
    If you are having problems with resulting apk, please follow these steps:

    - Decompile your deodexed SysScope.apk and implement this guide (this is for last beta, i will update just if it is necessary with oficcial releases).
    - Compile the apk
    - Configure winrar to use no compression
    - Open the original apk and the compiled one with winrar
    - move classes.dex from compiled to the original apk.
    - Flash this modified original apk containing the new classes.dex

    5e030d312e8c6b953d2142aa3d404308.jpg
    16
    Guide how add more Button Grid in SystemUI for Nougat

    Decompile SystemUI
    After go to strings.xml (res/value/strings.xml)
    delete this:
    Code:
        <string name="qs_screen_grid_3_2">3X2</string>
        <string name="qs_screen_grid_4_2">4X2</string>
        <string name="qs_screen_grid_5_2">5X2</string>

    Now add this:
    Code:
    Add this :
        <string name="qs_screen_grid_3_4">3X4</string>
        <string name="qs_screen_grid_4_4">4X4</string>
        <string name="qs_screen_grid_5_4">5X4</string>
        <string name="qs_screen_grid_3_5">3X5</string>
        <string name="qs_screen_grid_4_5">4X5</string>
        <string name="qs_screen_grid_5_5">5X5</string>

    go to ids.xml (res/value/ids.xml)
    Add this:
    Code:
        <item type="id" name="gid_save_position">false</item>

    go to public.xml (res/value/public.xml) and removed this one:
    Code:
    qs_screen_grid_3_2
    qs_screen_grid_4_2
    qs_screen_grid_5_2

    Download files and merge (if you have some files replace one)

    Now Compile and enjoy
    thx to @josete_1976 for files for grid mod
    15
    How to add Reboot Recovery to power menu with toggle

    Credits goes to @sagitt67 and @daxgirl .
    Credits for toggle goes to @tdunham

    Now after some fc and logcats of old guides i finished sucessfull the mod and share what i have done

    We work in framework-res.apk and services.jar

    Framework-res.apk

    Download framework.zip
    Paste files in same folders of decompiles freamework-res.apk
    now open res/values/arrays.xml
    find <string-array name="config_globalActionsList"> and add blue
    Code:
    <string-array name="config_globalActionsList">
            <item>power</item>
            <item>datamode</item>
            <item>airplane</item>
            <item>restart</item>
            <item>lockdown</item>
            <item>bugreport</item>
            <item>users</item>
            [COLOR="Blue"]<item>rebootrecovery</item>[/COLOR]
            <item>emergencymode</item>
            <item>subscreen</item>
            <item>screenrec</item>
        </string-array>

    now go to res/values/strings.xml and add blue

    Code:
        <string name="charging_connected_via_usb">Charging connected device via USB...</string>
        <string name="config_tspstate_threshold">10,32,768,10,60</string>
        [COLOR="Blue"]<string name="tw_ic_do_rebootrecovery">Reboot Recovery</string>[/COLOR]
    </resources>

    done with framework-res.apk
    recompile and push to phone

    Services.jar

    download services.zip and paste files in same folders of decompiles services.jar
    open smali/com/android/server/policy/GlobalActions.smali
    add blue line in # instance fields
    Code:
    .field mEmergencyStringId:I
    
    [COLOR="Blue"].field private mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;[/COLOR]
    
    .field private mGlobalActionsFrameLayout:Landroid/app/GlobalActionsFrameLayout

    find .method private createDialog()Lcom/android/server/policy/GlobalActions$GlobalActionsDialog;
    add blue
    Code:
    if-eqz v4, :cond_8
    
        const v4, 0x10809f4
    
        :goto_4
        const v6, 0x10406e2
    
        move-object/from16 v0, p0
    
        invoke-direct {v5, v0, v4, v6}, Lcom/android/server/policy/GlobalActions$20;-><init>(Lcom/android/server/policy/GlobalActions;II)V
    
        move-object/from16 v0, p0
    
        iput-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRestart:Lcom/android/server/policy/GlobalActions$SinglePressAction;
    	
        [COLOR="blue"]new-instance v4, Lcom/android/server/policy/GlobalActions$47;
    
        move-object/from16 v0, p0
    
        iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
    
        invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
    
        move-result-object v0
    
        const-string v1, "tw_ic_do_rebootrecovery" 
    
        const-string v2, "drawable" 
    
        const-string v3, "android"
    
        invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
    
        move-result v5 
    
        move-object/from16 v0, p0
    
        iget-object v0, v0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
    
        invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
    
        move-result-object v0
    
        const-string v1, "tw_ic_do_rebootrecovery"
    
        const-string v2, "string"
    
        const-string v3, "android"
    
        invoke-virtual {v0, v1, v2, v3}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
    
        move-result v6
    
        move-object/from16 v0, p0
    
        invoke-direct {v4, v0, v5, v6}, Lcom/android/server/policy/GlobalActions$47;-><init>(Lcom/android/server/policy/GlobalActions;II)V
    
        move-object/from16 v0, p0
    
        iput-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;[/COLOR] 
    
        invoke-static {}, Lcom/samsung/android/feature/SemCscFeature;->getInstance()Lcom/samsung/android/feature/SemCscFeature;
    
        move-result-object v4
    
        const-string/jumbo v5, "CscFeature_Common_ConfigBikeMode"

    Now next part is tricky, add lines in blue and changes in green

    Code:
    const/16 v6, 0x80
    
        const/4 v7, 0x1
    
        move-object/from16 v0, p0
    
        invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z
    
        new-instance v4, Lcom/android/server/policy/GlobalActions$BugReportAction;
    
        move-object/from16 v0, p0
    
        invoke-direct {v4, v0}, Lcom/android/server/policy/GlobalActions$BugReportAction;-><init>(Lcom/android/server/policy/GlobalActions;)V
    
        move-object/from16 v0, p0
    
        iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
    	
    	[COLOR="Blue"]const/16 v6, 0x100
    
        move-object/from16 v0, p0
    
        iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
    
        move-object/from16 v0, p0
    
        iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
    
        const/4 v7, 0x1
    
        move-object/from16 v0, p0
    
        invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z [/COLOR]
    
        const/16 v6, 0x200 [COLOR="Magenta"]#before was 0x100[/COLOR]
    
        const/4 v7, 0x1
    
        move-object/from16 v0, p0
    
        invoke-direct {v0, v6, v4, v5, v7}, Lcom/android/server/policy/GlobalActions;->addDialogItemsIfEnabled(ILcom/android/server/policy/GlobalActions$Action;Ljava/util/ArrayList;Z)Z

    now search for const-string/jumbo v4, "silent" and add blue line above it and delete red ones
    green parts must match yellow part
    Code:
    const-string/jumbo v4, "emergencymode"
    
        invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    
        move-result v4
    
        if-eqz v4, :cond_15
    
        move-object/from16 v0, p0
    
        iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
    
        move-object/from16 v0, p0
    
        iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mEmergency:Lcom/android/server/policy/GlobalActions$ToggleAction;
    
        invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    
        goto/16 :[COLOR="Yellow"]goto_7[/COLOR]   #look that green part match this
    
        :cond_15
        [COLOR="Blue"]const-string/jumbo v4, "rebootrecovery"
    
        invoke-virtual {v4, v11}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    
        move-result v4
    
        if-eqz v4, :cond_asc1
    
        move-object/from16 v0, p0
    
        iget-object v4, v0, Lcom/android/server/policy/GlobalActions;->mItems:Ljava/util/ArrayList;
    
        move-object/from16 v0, p0
    
        iget-object v5, v0, Lcom/android/server/policy/GlobalActions;->mRebootRecovery:Lcom/android/server/policy/GlobalActions$SinglePressAction;
    
        invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    
        goto/16 :[COLOR="Green"]goto_7 [/COLOR]
    
        :cond_asc1[/COLOR]
        const-string/jumbo v4, "silent"

    next part is missing in Android 7 services.jar so we need to readd it for mod
    find .method private addCustomDialogItems(Landroid/graphics/drawable/BitmapDrawable;Ljava/lang/String;Landroid/content/Intent;ILjava/util/ArrayList;)Z

    add this above method

    Code:
    .method static synthetic access$500(Lcom/android/server/policy/GlobalActions;)Landroid/content/Context;
        .locals 1
    
        iget-object v0, p0, Lcom/android/server/policy/GlobalActions;->mContext:Landroid/content/Context;
    
        return-object v0
    .end method

    thats it, recompile and push to phone

    Note: For me one time i get after reboot a loop of phone restarts, only one time happens. If it happen i solved it with wipe dalvik-cache and cache

    RomControl V2
    Code:
    <com.wubydax.romcontrol.v2.prefs.MySwitchPreference android:title="Reboot Recovery Button" android:key="reboot_recovery" android:defaultValue="false" android:summaryOn="Reboot Recovery will be shown" android:summaryOff="Currently removed" />
    13
    Guide - Another way of using Camera Flash on low battery.

    On S7 Edge Nougat the low battery level is defined in framework-res -> values - > integers.xml -> config_lowBatteryWarningLevel . With a battery level lower than the value defined here, the camera doesn´t allow the use of flash light.

    With this little mod, flash light will be available always.

    - Decompile SamsungCamera6.apk

    - Edit com/sec/android/app/camera/Camera.smali

    - Find .method protected onCreate(Landroid/os/Bundle;)V and look for the string "config_lowBatteryWarningLevel" ...

    - Add the line in blue.

    Code:
    ...
       const-string v21, [B]"config_lowBatteryWarningLevel"[/B]
    
        const-string v22, "integer"
    
        const-string v23, "android"
    
        invoke-virtual/range {v20 .. v23}, Landroid/content/res/Resources;->getIdentifier(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
    
        move-result v20
    
        invoke-virtual/range {v19 .. v20}, Landroid/content/res/Resources;->getInteger(I)I
    
        move-result v19
    
        move/from16 v0, v19
    
        move-object/from16 v1, p0
    	
    	[COLOR="blue"][B]const v0, 0x0[/B][/COLOR] # 0 = flash always available, 0x5 = Flash available while the battery level is greater than 5% ... select your desired value...or make a custom prefernce and read here its value (camara app should be restarted or .. .)
    
        iput v0, v1, Lcom/sec/android/app/camera/Camera;->[B]mLowBatteryWarningLevel:I[/B]
    
    ...

    Done.
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