[GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]

Search This thread

cstayton

Inactive Recognized Developer
Mar 5, 2011
2,591
4,087
Waite Park, MN.
[GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]

How to permenantly remove SysScope from your Samsung Touchwiz ROM


Tired of the constant custom padlock on startup? Want permenant device status "Official"?


Team Blackout and KoolKit ROMs are not responsible if you blow up your house, your dog eats your homework,
the zombie apacolypse, your wife/husband divorcing you or if your device turns into an unrecognizable
smoldering pile of plastic. by reading this you agree to take all responsibility for any damage you do to the
universe, your device, your marriage or your failing grades in school or college.

This guide and mod originated in the Galaxy S4 threads and was created by @Aou who has since left the AT&T world so development
stopped at that point, I have taken the code and modded it slightly to work for our S5 devices (All variants even the Active)

All devs are free to use this MOD with proper recognition in your OP make sure you provide a mention to "Aou" for the
original code found here Removing SysScope - Permanent "Official" Device Status
and myself for the re-write of the instructions and changes to make this work for our devices.

NOTICE:
This MOD is not for the squeamish or novice modder it requires patience and a good amount of time to complete.

Prerequisites:

You need java installed and working at the command prompt.
You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
Basic ADB skills
A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
7zip or some other compressing/deompressing tool that can add a file into an .apk file.
Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.

Main Instructions:


1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
you need have these available locally for your chosen method to decompile (I'm not going to describe how
to decompile in this thread, If you don't know how then this MOD is not for you)

2. Pull a copy of the SecSettings.apk

adb pull /system/priv-app/SecSettings.apk

3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)


4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
"Remove:" means to delete a line or remove a section entirely.
"Change:" means to look at the original code, and make it look like the "to" part.
NOTE depending on your ethod of decompiling you may not see the line numbers
however, if you do delete from the appropriate code section as well.

REMOVE:

Code:
.field private isSysScopeStatus:I

REMOVE:

Code:
.field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;

REMOVE:

Code:
    .line 264
    new-instance v0, Lcom/android/settings/deviceinfo/Status$2;

    invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V

    iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;

REMOVE:

Code:
    .line 216
    const/4 v0, -0x1

    iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

REMOVE:

Code:
.method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
    .registers 2
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 102
    iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    return p1
.end method

.method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
    .registers 1
    .parameter "x0"

    .prologue
    .line 102
    invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V

    return-void
.end method

REMOVE:

Code:
   .line 687
    iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

REMOVE:

Code:
   .line 657
    iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
"<public type="string" name="sysscope_status" id="0x7f0901a5" />"
note the IDs you will need these values in the next section. (This is official NCE release your release
may have a different value.) Make sure you change the bolded values to match your own.

Code:
    .line 952
    const v1, 0x7f0901a7

TO:

Code:
    .line 952
    const v1, [B]0x7f0901a5[/B]

CHANGE:

Code:
.method private changeSysScopeStatus()V
    .registers 8

    .prologue
    const-wide/16 v3, 0x3e8

    const v6, 0x7f0901a7

    const/4 v5, -0x1

    .line 956
    const-string v0, "sysscope_status"

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v2

    .line 958
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v0

    div-long/2addr v0, v3

    .line 959
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v0

    div-long/2addr v0, v3

    .line 961
    const-wide/16 v3, 0x0

    cmp-long v3, v0, v3

    if-nez v3, :cond_1e

    .line 962
    const-wide/16 v0, 0x1

    .line 965
    :cond_1e
    iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    if-ne v3, v5, :cond_30

    const-wide/16 v3, 0x78

    cmp-long v0, v0, v3

    if-lez v0, :cond_30

    .line 966
    invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 977
    :goto_2c
    invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 978
    return-void

    .line 968
    :cond_30
    iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_3a

    .line 969
    invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2c

    .line 970
    :cond_3a
    iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    if-ne v0, v5, :cond_46

    .line 971
   const v0, 0x7f09013f

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2c

    .line 973
    :cond_46
    const v0, 0x7f09013d

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2c
.end method

TO:

Code:
.method private changeSysScopeStatus()V
    .registers 4

    .prologue
    [B]const v1, 0x7f0901a6[/B]

    .line 956
    const-string v0, "sysscope_status"

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v2

    .line 966
    invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 977
    invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 978
    return-void
.end method

Delete: /smali/com/android/settings/deviceinfo/status$2.smali

re-compile SecSettings.apk

INSTALL:

Install! Use "adb shell" to begin, and use the following commands, one at a time:


rm /system/app/SysScope.apk
rm -r /data/dalvik-cache/*
push SecSettings.apk /system/priv-app/SecSettings.apk
chmod 0644 /system/priv-app/SecSettings.apk
reboot
 
Last edited:

GDofWR420

Senior Member
May 3, 2011
1,249
218
Nice. People with o.c.d. are gonna love this. Nice work.

The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
 

GDofWR420

Senior Member
May 3, 2011
1,249
218
LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?

Lol. Yea no coffee this morning :( but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.

Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:

The Gods Approve This Post, From The Ghost Of Sparta's S5 active.
 
Last edited:

eric-filth

Senior Member
Nov 18, 2011
1,510
1,013
38
Ponta Grossa - PR
Here is not working :(

The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?

or change this

Code:
.method private changeSysScopeStatus()V
    .registers 8

    .prologue
    const-wide/16 v3, 0x3e8

    const v6, 0x7f0901a7

    const/4 v5, -0x1

    .line 956
    const-string v0, "sysscope_status"

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v2

    .line 958
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v0

    div-long/2addr v0, v3

    .line 959
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v0

    div-long/2addr v0, v3

    .line 961
    const-wide/16 v3, 0x0

    cmp-long v3, v0, v3

    if-nez v3, :cond_1e

    .line 962
    const-wide/16 v0, 0x1

    .line 965
    :cond_1e
    iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    if-ne v3, v5, :cond_30

    const-wide/16 v3, 0x78

    cmp-long v0, v0, v3

    if-lez v0, :cond_30

    .line 966
    invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 977
    :goto_2c
    invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 978
    return-void

    .line 968
    :cond_30
    iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_3a

    .line 969
    invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2c

    .line 970
    :cond_3a
    iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    if-ne v0, v5, :cond_46

    .line 971
   const v0, 0x7f09013f

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2c

    .line 973
    :cond_46
    const v0, 0x7f09013d

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2c
.end method

for this

Code:
.method private changeSysScopeStatus()V
    .registers 4

    .prologue
    const v1, 0x7f0901a6

    .line 956
    const-string v0, "sysscope_status"

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v2

    .line 966
    invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 977
    invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 978
    return-void
.end method
?
 
Last edited:

cstayton

Inactive Recognized Developer
Mar 5, 2011
2,591
4,087
Waite Park, MN.
Here is not working :(

The last step are only to change the
Code:
const v6, 0x7f0901a7
for
Code:
const v1, 0x7f0901a6
?

or change this

Code:
.method private changeSysScopeStatus()V
    .registers 8

    .prologue
    const-wide/16 v3, 0x3e8

    const v6, 0x7f0901a7

    const/4 v5, -0x1

    .line 956
    const-string v0, "sysscope_status"

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v2

    .line 958
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v0

    div-long/2addr v0, v3

    .line 959
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v0

    div-long/2addr v0, v3

    .line 961
    const-wide/16 v3, 0x0

    cmp-long v3, v0, v3

    if-nez v3, :cond_1e

    .line 962
    const-wide/16 v0, 0x1

    .line 965
    :cond_1e
    iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    if-ne v3, v5, :cond_30

    const-wide/16 v3, 0x78

    cmp-long v0, v0, v3

    if-lez v0, :cond_30

    .line 966
    invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 977
    :goto_2c
    invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 978
    return-void

    .line 968
    :cond_30
    iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_3a

    .line 969
    invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2c

    .line 970
    :cond_3a
    iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    if-ne v0, v5, :cond_46

    .line 971
   const v0, 0x7f09013f

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2c

    .line 973
    :cond_46
    const v0, 0x7f09013d

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_2c
.end method

for this

Code:
.method private changeSysScopeStatus()V
    .registers 4

    .prologue
    const v1, 0x7f0901a6

    .line 956
    const-string v0, "sysscope_status"

    invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

    move-result-object v2

    .line 966
    invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;

    move-result-object v0

    .line 977
    invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 978
    return-void
.end method
?

you need to change the whole method out the lines with the ID are what you need to look up in your build to match to the appropriate status response.
 

cstayton

Inactive Recognized Developer
Mar 5, 2011
2,591
4,087
Waite Park, MN.
Lol. Yea no coffee this morning :( but I found an ice cold Sunkist that will do in a pinch. Country living make you to lazy to go to the store. OCD here to.

Would it be possible to get a tutorial on changing over scroll glowing or maybe you have a link you know of.:sly:

The Gods Approve This Post, From The Ghost Of Sparta's S5 active.

I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7
 

GDofWR420

Senior Member
May 3, 2011
1,249
218
I'll see if i can find one for overscroll, its a pretty common mod i used to use it in the days of CM7

Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.

Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app
 

cstayton

Inactive Recognized Developer
Mar 5, 2011
2,591
4,087
Waite Park, MN.
Actually I found a module for xposed called xuimodule it allows for over scroll color change. Works OK on stock but with the koolkit.xml it's a little funky as I believe it was causing some lag so I removed it and lag is gone.

Sent from my SAMSUNG-SM-G870A using XDA Premium 4 mobile app

hmmmm, i wonder if it has an entry in csc that it couldnt handle because its locked down? I might have to re-think the whole "xPosed-Proof" feature mod.
 

deduction

Senior Member
Oct 7, 2010
106
45
Phoenix Metro
Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.

However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?

EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.

EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?

EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.

Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.

lHBVoaE.png
 
Last edited:

elliwigy

Forum Moderator / Recognized Developer
Staff member
XDA App Taskforce
  • Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.

    However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?

    EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.

    EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?

    EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.

    Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.

    lHBVoaE.png

    try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling

    Sent from my SM-G900V using XDA Free mobile app

    ---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------

    How to permenantly remove SysScope from your Samsung Touchwiz ROM


    Tired of the constant custom padlock on startup? Want permenant device status "Official"?








    NOTICE:


    Prerequisites:

    You need java installed and working at the command prompt.
    You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
    Basic ADB skills
    A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
    Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
    7zip or some other compressing/deompressing tool that can add a file into an .apk file.
    Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
    Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.

    Main Instructions:


    1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
    you need have these available locally for your chosen method to decompile (I'm not going to describe how
    to decompile in this thread, If you don't know how then this MOD is not for you)

    2. Pull a copy of the SecSettings.apk

    adb pull /system/app/SecSettings.apk

    3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)


    4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
    "Remove:" means to delete a line or remove a section entirely.
    "Change:" means to look at the original code, and make it look like the "to" part.
    NOTE depending on your ethod of decompiling you may not see the line numbers
    however, if you do delete from the appropriate code section as well.

    REMOVE:

    Code:
    .field private isSysScopeStatus:I

    REMOVE:

    Code:
    .field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;

    REMOVE:

    Code:
        .line 264
        new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
    
        invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
    
        iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;

    REMOVE:

    Code:
        .line 216
        const/4 v0, -0x1
    
        iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

    REMOVE:

    Code:
    .method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
        .registers 2
        .parameter "x0"
        .parameter "x1"
    
        .prologue
        .line 102
        iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
    
        return p1
    .end method
    
    .method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
        .registers 1
        .parameter "x0"
    
        .prologue
        .line 102
        invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
    
        return-void
    .end method

    REMOVE:

    Code:
       .line 687
        iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
    
        invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    REMOVE:

    Code:
       .line 657
        iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
    
        new-instance v2, Landroid/content/IntentFilter;
    
        const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
    
        invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
    
        invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
    Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
    and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
    "<public type="string" name="sysscope_status" id="0x7f0901a5" />"
    note the IDs you will need these values in the next section. (This is official NCE release your release
    may have a different value.) Make sure you change the bolded values to match your own.

    Code:
        .line 952
        const v1, 0x7f0901a7

    TO:

    Code:
        .line 952
        const v1, [B]0x7f0901a5[/B]

    CHANGE:

    Code:
    .method private changeSysScopeStatus()V
        .registers 8
    
        .prologue
        const-wide/16 v3, 0x3e8
    
        const v6, 0x7f0901a7
    
        const/4 v5, -0x1
    
        .line 956
        const-string v0, "sysscope_status"
    
        invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v2
    
        .line 958
        invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
    
        move-result-wide v0
    
        div-long/2addr v0, v3
    
        .line 959
        invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
    
        move-result-wide v0
    
        div-long/2addr v0, v3
    
        .line 961
        const-wide/16 v3, 0x0
    
        cmp-long v3, v0, v3
    
        if-nez v3, :cond_1e
    
        .line 962
        const-wide/16 v0, 0x1
    
        .line 965
        :cond_1e
        iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
    
        if-ne v3, v5, :cond_30
    
        const-wide/16 v3, 0x78
    
        cmp-long v0, v0, v3
    
        if-lez v0, :cond_30
    
        .line 966
        invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
    
        move-result-object v0
    
        .line 977
        :goto_2c
        invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
    
        .line 978
        return-void
    
        .line 968
        :cond_30
        iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
    
        const/4 v1, 0x2
    
        if-ne v0, v1, :cond_3a
    
        .line 969
        invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
    
        move-result-object v0
    
        goto :goto_2c
    
        .line 970
        :cond_3a
        iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
    
        if-ne v0, v5, :cond_46
    
        .line 971
       const v0, 0x7f09013f
    
        invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
    
        move-result-object v0
    
        goto :goto_2c
    
        .line 973
        :cond_46
        const v0, 0x7f09013d
    
        invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
    
        move-result-object v0
    
        goto :goto_2c
    .end method

    TO:

    Code:
    .method private changeSysScopeStatus()V
        .registers 4
    
        .prologue
        [B]const v1, 0x7f0901a6[/B]
    
        .line 956
        const-string v0, "sysscope_status"
    
        invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
    
        move-result-object v2
    
        .line 966
        invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
    
        move-result-object v0
    
        .line 977
        invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
    
        .line 978
        return-void
    .end method

    INSTALL:

    hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?

    Sent from my SM-G900V using XDA Free mobile app
     

    cstayton

    Inactive Recognized Developer
    Mar 5, 2011
    2,591
    4,087
    Waite Park, MN.
    try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling

    Sent from my SM-G900V using XDA Free mobile app

    ---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------



    hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?

    Sent from my SM-G900V using XDA Free mobile app

    from the error looks as if you are trying to decompile with the wrong frameworks youll need to make sure the framework-res.apk and twframework-res.apk are the ones unmodded stock ones from your rom base
     
    • Like
    Reactions: micky387 and ALLDAT

    cstayton

    Inactive Recognized Developer
    Mar 5, 2011
    2,591
    4,087
    Waite Park, MN.
    try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling

    Sent from my SM-G900V using XDA Free mobile app

    ---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------



    hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?

    Sent from my SM-G900V using XDA Free mobile app

    once you have the mod completed yes, remove sysscope.apk and place modded secsettings in rom base and flash
     
    • Like
    Reactions: ALLDAT

    Nickovtyme

    Senior Member
    Jan 19, 2011
    836
    235
    ok...can you take a look at these? I get about half way through your guide and then it gets lost. I don't know if the info just isnt there or what?

    Thanks!
     

    Attachments

    • Codes.zip
      116 KB · Views: 26

    cstayton

    Inactive Recognized Developer
    Mar 5, 2011
    2,591
    4,087
    Waite Park, MN.
    Hey, followed your CIQ removal guide and everything went perfectly. I've checked for any CIQ threads or network traffic and there is none. Job very well done.

    However, with this guide, I am finding I have /system/app/SysScope.apk but no SecSettings.apk. I have a bunch of other APKs that begin with the Sec prefix but no SecSettings.apk. Any ideas?

    EDIT: Found it under /system/priv-app/SecSettings.apk. You should update the pull command in the guide.

    EDIT2: Can't find /res/values/public.xml file that contains any mention of sysscope, checked framework-res.apk and twframework-res.apk as well as SecSettings.apk. No luck. Is the definition somewhere else perhaps?

    EDIT3: Perhaps this is tied to the fact that I can only open SecSettings.apk for editing if I chose "basic editing" in the import. If I try for advanced editing, I get a slew of decompilation errors, regardless of which FrameworkTag I pick.

    Decompilation errors that occur if I try to decomp with aapt are the same as the ones I see if I try to do "advanced editing". I've tried both framework tags when importing and I always get these errors during unpack. I have a feeling that "basic editing" doesn't fully unpack the res directory as needed and advanced is having trouble with the XML parse.

    lHBVoaE.png

    your not looking sysscope your actually looking for " <public type="string" name="sysscope_normal" you have to be specific in the search
     
    • Like
    Reactions: ALLDAT

    Nickovtyme

    Senior Member
    Jan 19, 2011
    836
    235
    am having trouble getting dropbox or anywhere to work. Here is the untouched status.smali.

    Thanks very much...I keep getting stumped because the edits I need to make just don't seem to be there when I decompile the apk. Not sure why.
     

    Attachments

    • Untouchedsmali.zip
      13.7 KB · Views: 18

    parkerj7uc

    Senior Member
    Dec 27, 2011
    1,221
    1,782
    Cincinnati
    @cstayton

    "<public type="string" name="sysscope_tampered" id="0x7f0a01be" />"
    and also for "<public type="string" name="sysscope_normal" id="0x7f0a01bd" />" and also for
    "<public type="string" name="sysscope_status" id="0x7f0a01bc" />"
    Those are my public values.
    Im having trouble with the last Change. I have changed and removed everything else, could you help me with the last step? Im not sure what needs to be changed. My smali.status should be attached. any help is appreciated. thank you
     

    Attachments

    • Status.zip
      17.1 KB · Views: 15
    Last edited:

    Top Liked Posts

    • There are no posts matching your filters.
    • 8
      [GUIDE][DEVS][SMALI]Enable "Device Status Official" - Remove SysScope[GUIDE][DEVS]

      How to permenantly remove SysScope from your Samsung Touchwiz ROM


      Tired of the constant custom padlock on startup? Want permenant device status "Official"?


      Team Blackout and KoolKit ROMs are not responsible if you blow up your house, your dog eats your homework,
      the zombie apacolypse, your wife/husband divorcing you or if your device turns into an unrecognizable
      smoldering pile of plastic. by reading this you agree to take all responsibility for any damage you do to the
      universe, your device, your marriage or your failing grades in school or college.

      This guide and mod originated in the Galaxy S4 threads and was created by @Aou who has since left the AT&T world so development
      stopped at that point, I have taken the code and modded it slightly to work for our S5 devices (All variants even the Active)

      All devs are free to use this MOD with proper recognition in your OP make sure you provide a mention to "Aou" for the
      original code found here Removing SysScope - Permanent "Official" Device Status
      and myself for the re-write of the instructions and changes to make this work for our devices.

      NOTICE:
      This MOD is not for the squeamish or novice modder it requires patience and a good amount of time to complete.

      Prerequisites:

      You need java installed and working at the command prompt.
      You need smali and baksmali in your working directory. I used v1.4.2 of each. Here's some links: baksmali and smali.
      Basic ADB skills
      A good text editor, such as Notepad++. Even better, and good text comparison tool would be great to check your work (get a trial of Beyond Compare 3 maybe?).
      Originally, I used a comparison tool, but in the end found myself just making the edits in Notepad++.
      7zip or some other compressing/deompressing tool that can add a file into an .apk file.
      Zip-Align (available in the SDK tools and other places around XDA) - technically optional, but probably a good idea
      Get all these things into a working folder, open your command prompt in that folder, test ADB, and then begin.

      Main Instructions:


      1. Make sure you have an unmodded copy of your framework files (twframework-res.apk and framework-res.apk)
      you need have these available locally for your chosen method to decompile (I'm not going to describe how
      to decompile in this thread, If you don't know how then this MOD is not for you)

      2. Pull a copy of the SecSettings.apk

      adb pull /system/priv-app/SecSettings.apk

      3. Decompile SecSettings.apk (using your favorite tools I recomend Virtuous Ten Studio)


      4. Edit classes_out\com\android\settings\deviceinfo\Status .smali manually (using Notepad++).
      "Remove:" means to delete a line or remove a section entirely.
      "Change:" means to look at the original code, and make it look like the "to" part.
      NOTE depending on your ethod of decompiling you may not see the line numbers
      however, if you do delete from the appropriate code section as well.

      REMOVE:

      Code:
      .field private isSysScopeStatus:I

      REMOVE:

      Code:
      .field private mSysScopeReceiver:Landroid/content/BroadcastReceiver;

      REMOVE:

      Code:
          .line 264
          new-instance v0, Lcom/android/settings/deviceinfo/Status$2;
      
          invoke-direct {v0, p0}, Lcom/android/settings/deviceinfo/Status$2;-><init>(Lcom/android/settings/deviceinfo/Status;)V
      
          iput-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;

      REMOVE:

      Code:
          .line 216
          const/4 v0, -0x1
      
          iput v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I

      REMOVE:

      Code:
      .method static synthetic access$402(Lcom/android/settings/deviceinfo/Status;I)I
          .registers 2
          .parameter "x0"
          .parameter "x1"
      
          .prologue
          .line 102
          iput p1, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
      
          return p1
      .end method
      
      .method static synthetic access$500(Lcom/android/settings/deviceinfo/Status;)V
          .registers 1
          .parameter "x0"
      
          .prologue
          .line 102
          invoke-direct {p0}, Lcom/android/settings/deviceinfo/Status;->changeSysScopeStatus()V
      
          return-void
      .end method

      REMOVE:

      Code:
         .line 687
          iget-object v0, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
      
          invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

      REMOVE:

      Code:
         .line 657
          iget-object v1, p0, Lcom/android/settings/deviceinfo/Status;->mSysScopeReceiver:Landroid/content/BroadcastReceiver;
      
          new-instance v2, Landroid/content/IntentFilter;
      
          const-string v3, "com.sec.intent.action.SYSSCOPESTATUS"
      
          invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
      
          invoke-virtual {p0, v1, v2}, Lcom/android/settings/deviceinfo/Status;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

      CHANGE: Take note at this part you will need to locate some specific values from within /res/values/public.xml
      Open /res/values/public.xml and search for "<public type="string" name="sysscope_tampered" id="0x7f0901a7" />"
      and also for "<public type="string" name="sysscope_normal" id="0x7f0901a6" />" and also for
      "<public type="string" name="sysscope_status" id="0x7f0901a5" />"
      note the IDs you will need these values in the next section. (This is official NCE release your release
      may have a different value.) Make sure you change the bolded values to match your own.

      Code:
          .line 952
          const v1, 0x7f0901a7

      TO:

      Code:
          .line 952
          const v1, [B]0x7f0901a5[/B]

      CHANGE:

      Code:
      .method private changeSysScopeStatus()V
          .registers 8
      
          .prologue
          const-wide/16 v3, 0x3e8
      
          const v6, 0x7f0901a7
      
          const/4 v5, -0x1
      
          .line 956
          const-string v0, "sysscope_status"
      
          invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
      
          move-result-object v2
      
          .line 958
          invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J
      
          move-result-wide v0
      
          div-long/2addr v0, v3
      
          .line 959
          invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J
      
          move-result-wide v0
      
          div-long/2addr v0, v3
      
          .line 961
          const-wide/16 v3, 0x0
      
          cmp-long v3, v0, v3
      
          if-nez v3, :cond_1e
      
          .line 962
          const-wide/16 v0, 0x1
      
          .line 965
          :cond_1e
          iget v3, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
      
          if-ne v3, v5, :cond_30
      
          const-wide/16 v3, 0x78
      
          cmp-long v0, v0, v3
      
          if-lez v0, :cond_30
      
          .line 966
          invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
      
          move-result-object v0
      
          .line 977
          :goto_2c
          invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
      
          .line 978
          return-void
      
          .line 968
          :cond_30
          iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
      
          const/4 v1, 0x2
      
          if-ne v0, v1, :cond_3a
      
          .line 969
          invoke-virtual {p0, v6}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
      
          move-result-object v0
      
          goto :goto_2c
      
          .line 970
          :cond_3a
          iget v0, p0, Lcom/android/settings/deviceinfo/Status;->isSysScopeStatus:I
      
          if-ne v0, v5, :cond_46
      
          .line 971
         const v0, 0x7f09013f
      
          invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
      
          move-result-object v0
      
          goto :goto_2c
      
          .line 973
          :cond_46
          const v0, 0x7f09013d
      
          invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
      
          move-result-object v0
      
          goto :goto_2c
      .end method

      TO:

      Code:
      .method private changeSysScopeStatus()V
          .registers 4
      
          .prologue
          [B]const v1, 0x7f0901a6[/B]
      
          .line 956
          const-string v0, "sysscope_status"
      
          invoke-virtual {p0, v0}, Lcom/android/settings/deviceinfo/Status;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
      
          move-result-object v2
      
          .line 966
          invoke-virtual {p0, v1}, Lcom/android/settings/deviceinfo/Status;->getString(I)Ljava/lang/String;
      
          move-result-object v0
      
          .line 977
          invoke-virtual {v2, v0}, Landroid/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V
      
          .line 978
          return-void
      .end method

      Delete: /smali/com/android/settings/deviceinfo/status$2.smali

      re-compile SecSettings.apk

      INSTALL:

      Install! Use "adb shell" to begin, and use the following commands, one at a time:


      rm /system/app/SysScope.apk
      rm -r /data/dalvik-cache/*
      push SecSettings.apk /system/priv-app/SecSettings.apk
      chmod 0644 /system/priv-app/SecSettings.apk
      reboot
      3
      small change in OP

      small change in OP

      Delete: /smali/com/android/settings/deviceinfo/status$2.smali

      re-compile SecSettings.apk
      2
      @cstayton

      "<public type="string" name="sysscope_tampered" id="0x7f0a01be" />"
      and also for "<public type="string" name="sysscope_normal" id="0x7f0a01bd" />" and also for
      "<public type="string" name="sysscope_status" id="0x7f0a01bc" />"
      Those are my public values.
      Im having trouble with the last Change. I have changed and removed everything else, could you help me with the last step? Im not sure what needs to be changed. My smali.status should be attached. any help is appreciated. thank you

      try the attached remove the txt extension, this should work. i am flying blind tho i dont have a development environment anymore to test with
      2
      Nice. People with o.c.d. are gonna love this. Nice work.

      The Gods Approve This Post, From The Ghost Of Sparta's S5 active.

      LOL. Yea it was my OCD that drove me to make Aou's mod work for us, of course now I'm half blind and hyped up on starbucks doubleshots but what the heck right?
      2
      try tickle my android on here.. its mainly for theming but i had success with de/recompiling apks and you can edit the files needed for any mod before recompiling

      Sent from my SM-G900V using XDA Free mobile app

      ---------- Post added at 10:08 AM ---------- Previous post was at 10:04 AM ----------



      hey.. had question bout install method.. i assume it to be ok to just remove syscope.apk from rom and then add modded secsettings.apk to priv-app folder in rom base and flashing rom will work?

      Sent from my SM-G900V using XDA Free mobile app

      from the error looks as if you are trying to decompile with the wrong frameworks youll need to make sure the framework-res.apk and twframework-res.apk are the ones unmodded stock ones from your rom base
    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