Guides Android 7 modding with main emphasis on S7edge this time

Search This thread

Grouxho

Senior Member
Dec 1, 2012
88
346
0
Madrid
www.esp-desarrolladores.com
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
 

Attachments

  • SysScope_Mod_Source_apks.zip
    214.5 KB · Views: 1,453
Last edited:

Grouxho

Senior Member
Dec 1, 2012
88
346
0
Madrid
www.esp-desarrolladores.com
Guide - Granting permissions dialog - Ok button always available with window (or alert) overlays.

If you are running an app or mod using screen overlay you will have problems with the confirmation button in the grant permission dialogs. This button is disabled and only the reject button is available.
This little mod makes the Ok button to be enabled when an overlay windows (or alerts) are running (f.e. omniswitch or similar app or mod).


- Decompile GooglePackageInstaller.apk

- Edit com/android/packageinstaller/permission/ui/SecureButtonView.smali

- find the method onFilterTouchEventForSecurity(Landroid/view/MotionEventZ

- make this change (in blue)

Code:
.method public onFilterTouchEventForSecurity(Landroid/view/MotionEvent;)Z
    .locals 2

    const/4 v1, 0x0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getFlags()I

    move-result v0

    and-int/lit8 v0, v0, 0x1 

    if-nez v0, :cond_0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getFlags()I

    move-result v0
[B][COLOR="RoyalBlue"]
    and-int/lit8 v0, v0, 0x1 #original value = 0x2, just change it to 0x1[/COLOR][/B]

    if-eqz v0, :cond_1

    :cond_0
    return v1

    :cond_1
    const/4 v0, 0x1

    return v0
.end method
 

Grouxho

Senior Member
Dec 1, 2012
88
346
0
Madrid
www.esp-desarrolladores.com
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.
 
Last edited:

Grouxho

Senior Member
Dec 1, 2012
88
346
0
Madrid
www.esp-desarrolladores.com
Last edited:

Umair Ahmad

Senior Member
May 14, 2014
2,365
3,715
0
London
Open all toggles in the Quickpanel swipe from the right side of the screen (without double swipe).

Orginal guide here, all credits goes to @S0bes, @Golv, @lyapota, @knski.

I just Make it a little corrected for S7/S7E (Nougat 7.0).Thanks @kep2008

Note : i Don't use Rc Maybe on Nougat Rc Guide will be different .. hope someone may try with Rc and tell if it need to be edited or not..

Go to SystemUI\smali\com\android\systemui\statusbar\phone\NotificationPanelView.smali

Find and add a lines highlighted in blue:
Code:
.method private handleQsTouch(Landroid/view/MotionEvent;)Z
.....
.....
.....
    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->isFullyCollapsed()Z

    move-result v1

    if-eqz v1, :cond_6

    iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mQsExpansionEnabled:Z

    if-eqz v1, :cond_6

    iput-boolean v3, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mTwoFingerQsExpandPossible:Z

    :cond_6
    iget-boolean v1, p0, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->mTwoFingerQsExpandPossible:Z

    if-eqz v1, :cond_7

    [COLOR="Blue"]invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->twoFingersInjection(Landroid/view/MotionEvent;)Z

    move-result v1

    if-nez v1, :cond_bqs[/COLOR]

    invoke-direct {p0, p1}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->isOpenQsEvent(Landroid/view/MotionEvent;)Z

    move-result v1

    if-eqz v1, :cond_7

    [COLOR="Blue"]:cond_bqs[/COLOR]
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getActionIndex()I

    move-result v1

    invoke-virtual {p1, v1}, Landroid/view/MotionEvent;->getY(I)F

Add this method to the end of smali file
Code:
.method private twoFingersInjection(Landroid/view/MotionEvent;)Z
    .locals 5

    const/4 v1, 0x1

    const/16 v3, 0x120

    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getContext()Landroid/content/Context;

    move-result-object v0

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

    move-result-object v0

    const-string v2, "tweaks_qs_pulldown"

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

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getActionMasked()I

    move-result v0

    const/4 v2, 0x0

    if-ne v0, v2, :cond_0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getPointerCount()I

    move-result v0

    const/4 v2, 0x1

    if-ne v0, v2, :cond_0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getActionIndex()I

    move-result v0

    invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getX(I)F

    move-result v0

    invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NotificationPanelView;->getWidth()I

    move-result v2

    sub-int v2, v2, v3

    int-to-float v2, v2

    cmpg-float v0, v0, v2

    if-lez v0, :cond_0

    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method
Where const / 16 v3, 0x120 - the value of indent from the right edge.

Rom Control toggle here. Thx @tdunham

Video here.
 
Last edited:

MisterEvo

Senior Member
Mar 13, 2015
121
42
0
Are there any mods to enable CarrierLabel in status bar with RC?
When trying to use the s6 method, the carrier label is shown in a pretty wrong way and not in the wanted location :/
 

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