-
Couldn't load subscription status.
- Fork 28
Description
Describe the bug
Freerasp causes error with SharedPreferences at startup and application does not detect root / hook etc.. Even If if the error is not coming sometimes the detection does not work and the user is able to log in to app on rooted device. There is always a delay in triggering the callback after await Talsec.instance.start(config);
To Reproduce
Similar to what is described in #112
Expected behavior
Freerasp is supposed to detect root / hooks etc. but since the issue is happening the user is able to run the app on rooted device. But the is not coming every time sometimes when app is removed from memory and opened again Freerasp sometimes detects root sometimes this error comes. ALso when app is hot restarted while in debug mode then this issue is not there.
Screenshots
W/SharedPreferencesImpl(19382): Cannot read /data/user/0/com.myapp.org/shared_prefs/LPt63jFXmgP2hitXSjTyIScRrUsA7cK8RSCVk26.xml
W/SharedPreferencesImpl(19382): org.xmlpull.v1.XmlPullParserException: Unexpected end of document
W/SharedPreferencesImpl(19382): at com.android.internal.util.XmlUtils.readValueXml(XmlUtils.java:1550)
W/SharedPreferencesImpl(19382): at com.android.internal.util.XmlUtils.readMapXml(XmlUtils.java:971)
W/SharedPreferencesImpl(19382): at android.app.SharedPreferencesImpl.loadFromDisk(SharedPreferencesImpl.java:179)
W/SharedPreferencesImpl(19382): at android.app.SharedPreferencesImpl.lambda$startLoadFromDisk$0(SharedPreferencesImpl.java:149)
W/SharedPreferencesImpl(19382): at android.app.SharedPreferencesImpl.$r8$lambda$gCIQI__z13DI5jNIqnAnYLWLcMc(Unknown Source:0)
W/SharedPreferencesImpl(19382): at android.app.SharedPreferencesImpl$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
W/SharedPreferencesImpl(19382): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
W/SharedPreferencesImpl(19382): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
W/SharedPreferencesImpl(19382): at java.lang.Thread.run(Thread.java:1012)
W/Sensors (19382): Cannot get virtualdevice_native service
D/nativeloader(19382): Load /data/app/~~PdqQLLHtN6sj7pn7zDNTBg==/com.myapp.org-BURVz3QSxsk6rEYBNw8ZkQ==/base.apk!/lib/arm64-v8a/libsecurity.so using ns clns-5 from class loader (caller=): ok
Please complete the following information:
- Device: Samsung Galaxy S10 on Lineage OS and rooted using Magisk Module + LSPosed installed
- OS version: Android 14 (Lineage OS)
- Version of freeRASP: 6.6.0
- Running in debug mode with isProd value set to true.
Additional context
- This error only occurs at the execution of this line "await Talsec.instance.start(config);"
- I don't use SharedPreferences in my project
- Sample of callback implemented:
onAppIntegrity: () {
isSecure = false;
secureText =
'Tamper detected!!';
}, - When i browse this location
"/data/user/0/com.myapp.org/shared_prefs/LPt63jFXmgP2hitXSjTyIScRrUsA7cK8RSCVk26.xml" there is no such folder as com.myapp.org and hence no xml file as well. - We are not sure how the callbacks are getting triggered. Sometimes it gets triggered immediately sometimes its not getting triggered at all. I am not sure how to test this anymore.
Any help would be greatly helpful. This is happening in Production build as well.