Comments (1)
This behaviour is normal. The module hooks the constructor of the KnoxGuardService class and throws a UnsupportedOperationException on purpose to avoid starting the system service, this will completely disable KnoxGuard in system.
And this is the KnoxGuardService constructor code:
public KnoxGuardSeService(Context context) {
if (!Utils.isSupportKGOnSEC()) {
throw new UnsupportedOperationException("KnoxGuard is unsupported");
}
setContext(context);
int tAState = getTAState();
registerReceiver(mContext);
registerReceiver(mContext, tAState);
IntegritySeUtil.setInitialState(mContext, tAState);
}
As you can see the module simply replicates the original system behaviour when isSupportKGOnSEC()
return false, hooking directly isSupportKGOnSEC()
doesn't works since the method is inlined. Of course the exception is catched in SystemServer to prevent the system from bootlooping:
if (!FactoryTest.isFactoryBinary()) { // SystemProperties.get("ro.factory.factory_binary", "Unknown").equalsIgnoreCase("factory");
timingsTraceAndSlog.traceBegin("StartKnoxGuard");
try {
if (SystemProperties.getInt("ro.product.first_api_level", 0) >= 30) {
ServiceManager.addService("knoxguard_service", new KnoxGuardSeService(context));
} else {
ServiceManager.addService("knoxguard_service", new KnoxGuardService(context));
}
} catch (Throwable e) {
Slog.e(TAG, "Failed to add KnoxGuardService.");
e.printStackTrace();
}
timingsTraceAndSlog.traceEnd();
}
from knoxpatch.
Related Issues (20)
- Samsung health HOT 5
- Samsung Pass and Samsung Pay support HOT 13
- Samsung Health Activity Details HOT 2
- why pass and pay is don't working HOT 1
- [REQUEST] Possible to restore work profile apps in app switcher/recents? HOT 8
- OneUI 5.1 HOT 1
- Samsung Pay Watch plug in HOT 10
- (question) any way to patch knox on oreo rom?
- [Feature request] Extend support to banking apps using Zimperium HOT 9
- Support active cameras after BL HOT 52
- error code -66 Error::Km(ErrorCode(-66))) (public error code: 8 internal Keystore code: -66)
- [ISSUE] Unable to use new Private Share feature built-in HOT 3
- [ISSUE] Samsung Cloud Enhanced data protection not working HOT 7
- [ISSUE] Latest SCPM update broke Enhanced Data protection HOT 3
- secure folder is working while samsung health is not working HOT 7
- [ISSUE] Enhanced data protection detects modifications HOT 3
- [ISSUE] Data enhanced protection not working HOT 3
- SmartView Does Not Work HOT 2
- Question: If I root a cell phone with Knox and use this application, will the fingerprint and NFC work again? HOT 3
- On Samsung z flip 5 on Android 14 and ui 6.1 it doesn't work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knoxpatch.