[Q] [SOLVED] Disabling "Device Status - Custom" Scanning

Aou

Senior Member
Aug 4, 2008
794
777
0
Arizona
This question is mostly aimed at the Devs, but if there's already a thread out there, please simply point me in the correct direction - thanks.

The question: How do we disable the scan that checks /system for modifications and marks the phone as "custom" ?

Disclaimer: I'm not interested in warranty fraud - that's just silly. I just want to be able to run custom kernels or delete bloatware (instead of freezing) and still retain the nice Galaxy S4 logo on startup... not the ugly "Custom" padlock/logo.

As mentioned by @scott14719 in this post, disabling the scan altogether may cause other problems (won't know until we try?). However, it seems clear to us that this scan, upon determining that the /system is indeed customized, throws a red flag that is read by the bootloader upon next startup. My goal here would be to either disable the scan altogether, or somehow permanently disable this red flag.

Not knowing much about the scan itself, here's some more observations that might help:
  • Most critically, the padlock/"custom" boot screen is NOT triggered until this scan is run and the system is flagged.
  • The scan runs immediately upon startup and finishes within about 38 seconds of uptime. Might take longer if more files have been added to /system or if more apps are running on startup (and slowing it down).
  • If you quickly go look at the Device Status in About Phone within the first 38 seconds of startup, you can see that it is "scanning" at this time.
  • It seems that the scan does not run again until the next system startup.
  • A custom recovery does not trigger "custom".
  • A custom kernel triggers the "custom".
  • Freezing bloatware does not trigger the "custom".
  • I once uninstalled a lot of bloatware, and this triggered "custom". I haven't checked to see if it's any system apps that trigger it, or if only certain apps are monitored.
  • Having busybox and/or Superuser properly in-place will trigger "custom".

All this being said, can anyone offer some more insight into this scan, and more ideally: has anyone found a way to disable it?


EDIT:

Thank you everyone for your replies. I've finished a working solution here: http://forum.xda-developers.com/showthread.php?t=2333700
 
Last edited:

C13v3r0n3

Senior Member
May 13, 2013
263
244
0
I think that splash screen is compiled into the kernel or aboot on these phones but im not 100% sure, there are a few threads in the s3 area about changing the splash but it requires an unlocked boot loader.

Sent from my GT-I9505 using xda app-developers app

---------- Post added at 10:52 PM ---------- Previous post was at 10:48 PM ----------

http://forum.xda-developers.com/showthread.php?t=2257058
Sent from my GT-I9505 using xda app-developers app

Try this also.
 

Aou

Senior Member
Aug 4, 2008
794
777
0
Arizona
I think that splash screen is compiled into the kernel or aboot on these phones but im not 100% sure, there are a few threads in the s3 area about changing the splash but it requires an unlocked boot loader.

Sent from my GT-I9505 using xda app-developers app

---------- Post added at 10:52 PM ---------- Previous post was at 10:48 PM ----------

http://forum.xda-developers.com/showthread.php?t=2257058
Sent from my GT-I9505 using xda app-developers app

Try this also.
I believe you are correct in that the only way to remove or modify the boot screen itself would be to have an unlocked bootloader. However, I believe that we should be able to keep it from ever showing the "custom" screen, simply because it's clear that the system doesn't check for "custom" during the time that this screen is shown. Rather, it's fed by a variable or tidbit of code somewhere.

Also, regarding the thread you linked: this of course works fine... until you make any modifications to /system. I've used this method a few times myself, even. But once I uninstall masses of bloatware or install a custom kernel, this method won't work anymore until the changes are restored.


If code can be located and then changed to report "official" no matter what the scan returns, it would be a huge hurdle.
Without an unlocked bootloader, I believe this is the only way we can accomplish this... apart from preventing the scan to begin with, of course.
 
  • Like
Reactions: acc49ers

scott14719

Senior Member
Dec 24, 2011
2,223
830
0
Aou, here is an interesting read that I think may, at least partly, apply to our device...

http://forum.xda-developers.com/showthread.php?p=38934760

I haven't had a chance to check the entire thread or the links within that thread but it seems like some people have already put some thought into this. Maybe something can be built on top of this.


**Edit**

It seems that we are definitely thinking about this the correct way. This is a post about the Verizon S3 bootloader unlock but the custom screen is discussed heavily between pages 7 and 12.

http://forum.xda-developers.com/showthread.php?t=1769411&page=7

post 68 seems to show exactly the point where the code for custom or official exists on that phone. I am willing to bet it is very similar on the AT&T S4. However, reading these threads shows me that some very smart guys (including Adam Outler) are way deeper into understanding this than I could ever be. Though, maybe it shows that there is hope for this after all.
 
Last edited:
  • Like
Reactions: Aou

C13v3r0n3

Senior Member
May 13, 2013
263
244
0
Im am sure the local android badasses will figure it out, we have some beast devs around here.

Sent from my GT-I9505 using xda app-developers app
 

Aou

Senior Member
Aug 4, 2008
794
777
0
Arizona
That is interesting - I jumped straight from the S2 to the S4, so I had no idea about SysScope. Out of curiosity, I froze the following two apps and restarted:
EdmSysScopeService.apk
SysScope.apk

Upon restart, I had the "Custom" status. Also, it took a lot longer for the "Device status" to finish Scanning. but now shows custom.

I'll play with this a bit more...
 

scott14719

Senior Member
Dec 24, 2011
2,223
830
0
That is interesting - I jumped straight from the S2 to the S4, so I had no idea about SysScope. Out of curiosity, I froze the following two apps and restarted:
EdmSysScopeService.apk
SysScope.apk

Upon restart, I had the "Custom" status. Also, it took a lot longer for the "Device status" to finish Scanning. but now shows custom.

I'll play with this a bit more...
Another interesting post...

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

and

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

Again, this is not from our phone but it seems pretty damn close. This post is from the second link I posted above.
 
Last edited:

Aou

Senior Member
Aug 4, 2008
794
777
0
Arizona
Another interesting post...

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

and

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

Again, this is not from our phone but it seems pretty damn close. This post is from the second link I posted above.
It might still be applicable. Going to bed for now, but it sounds like the devs in this thread you linked to have managed to accomplish exactly what I'm after here. I wonder if any of them have posted more details elsewhere...
 

scott14719

Senior Member
Dec 24, 2011
2,223
830
0
Again from the Verizon S3 thread...

http://forum.xda-developers.com/showthread.php?t=1781471

This has more to do with the counter, but the areas of code are the same.

Of course, that is if the Verizon S3 has a similar code as the AT&T S4.



**EDIT**

Some more information about Sysscope from the Note II forum. This just helps to show what it scans and why it returns "custom". The code will still need to be located and modified for the S4 (similar as described in one of the links I posted in one of my above posts about the S3) in order to keep the phone as "official".

http://forum.xda-developers.com/showthread.php?t=2285894

This post also helps to show why just freezing, deleting, or modifying syscope will still return a "custom" status. Other processes are at work to make sure syscope is authentic. That is why the code which decides what is returned (after the scan) needs to be modified.
 
Last edited:

nacos

Senior Member
Sep 27, 2007
461
207
73
Here & Now
This question is mostly aimed at the Devs, but if there's already a thread out there, please simply point me in the correct direction - thanks.

The question: How do we disable the scan that checks /system for modifications and marks the phone as "custom" ?

Disclaimer: I'm not interested in warranty fraud - that's just silly. I just want to be able to run custom kernels or delete bloatware (instead of freezing) and still retain the nice Galaxy S4 logo on startup... not the ugly "Custom" padlock/logo.

As mentioned by @scott14719 in this post, disabling the scan altogether may cause other problems (won't know until we try?). However, it seems clear to us that this scan, upon determining that the /system is indeed customized, throws a red flag that is read by the bootloader upon next startup. My goal here would be to either disable the scan altogether, or somehow permanently disable this red flag.

Not knowing much about the scan itself, here's some more observations that might help:
  • Most critically, the padlock/"custom" boot screen is NOT triggered until this scan is run and the system is flagged.
  • The scan runs immediately upon startup and finishes within about 38 seconds of uptime. Might take longer if more files have been added to /system or if more apps are running on startup (and slowing it down).
  • If you quickly go look at the Device Status in About Phone within the first 38 seconds of startup, you can see that it is "scanning" at this time.
  • It seems that the scan does not run again until the next system startup.
  • A custom recovery does not trigger "custom".
  • A custom kernel triggers the "custom".
  • Freezing bloatware does not trigger the "custom".
  • I once uninstalled a lot of bloatware, and this triggered "custom". I haven't checked to see if it's any system apps that trigger it, or if only certain apps are monitored.
  • Having busybox and/or Superuser properly in-place will trigger "custom".

All this being said, can anyone offer some more insight into this scan, and more ideally: has anyone found a way to disable it?
As others pointed out throughout the thread, the file responsible for checking the system status at boot is SysScope. There are various ways of trying to "full" the system into believing that it was NOT modified when in fact it was but one that has been working fine on my Note 2 as well as the S4, uses an XPosed Framework module called...yeah, you guessed it, SysScope.

Furthermore, if you're not familiar with XPosed Framework you'll be in for a NICE surprise as, once the framework installed it gives you the possibility of installing many other modules - real goodies, and I mean real goodies!!! :D

A word of caution: DO NOT INSTALL any version of XPosed Framework prior to 2.1.4- it'll soft brick your S4.

Take a look at the attached screenshot. Needless to say that my phone is heavily customized/modified.
 

Attachments

Last edited:

scott14719

Senior Member
Dec 24, 2011
2,223
830
0
Awesome! I would still like to know how to modify the code manually ( incase people don't want to use XPosed for whatever reason), but this is getting pretty close to the objective and I think will work for most. Thank you.
 

romracer

Senior Member
Apr 4, 2010
717
4,323
133
Kansas City
Awesome! I would still like to know how to modify the code manually ( incase people don't want to use XPosed for whatever reason), but this is getting pretty close to the objective and I think will work for most. Thank you.
This SysScope Xposed module says its re-enables logcat'ing for SysScope. Maybe with this enabled, you can tell what functions need modifications. But if something else is monitoring SysScope's integrity, the rabbit hole may get pretty deep. The advantage of something like Xposed is that the apps are not modified so something checksum'ing them won't notice anything different.

For what its worth, I restored my device using Odin and rooted it. Followed the common steps to replace SuperSU with Superuser and rebooted a couple of times until the "custom" message was gone. I booted into recovery, installed CM10.1 and never looked back. My phone boots with the standard logo now each time because CM doesn't have SysScope.
 
  • Like
Reactions: Aou

Aou

Senior Member
Aug 4, 2008
794
777
0
Arizona
This SysScope Xposed module says its re-enables logcat'ing for SysScope. Maybe with this enabled, you can tell what functions need modifications. But if something else is monitoring SysScope's integrity, the rabbit hole may get pretty deep. The advantage of something like Xposed is that the apps are not modified so something checksum'ing them won't notice anything different.

For what its worth, I restored my device using Odin and rooted it. Followed the common steps to replace SuperSU with Superuser and rebooted a couple of times until the "custom" message was gone. I booted into recovery, installed CM10.1 and never looked back. My phone boots with the standard logo now each time because CM doesn't have SysScope.
The Xposed module for SysScope does appear to work well. I agree that it would be nice to know how to modify a stock (or TW-based) ROM such that SysScope is removed without the other apps noticing.

I'm thinking that in your case, romracer, the bootloader last knew your status to be "official" - and because SysScope (and other related checks for it) are completely gone, the bootloader has no way of knowing otherwise. Interesting. I wonder if there's something we can do to these handful of apps to "neuter" them, keeping them from reporting to the bootloader that the status is Custom.
 

highaltitude

Senior Member
Nov 4, 2010
2,041
255
163
NC
Has anyone been able to automate this procedure to make it more simple? Seems like quite a bit involved to get it done. Would like to see the Custom status gone for good but wouldn't mind a simpler solution

Sent from my GT-I9505 using XDA Premium 4 mobile app