Code Monkey home page Code Monkey logo

Comments (8)

macaujack avatar macaujack commented on June 9, 2024 1

Sorry for clicking "Close with comment" accidentally

from knoxpatch.

macaujack avatar macaujack commented on June 9, 2024 1

Thanks a lot! I'll try building a custom kernel, though I think it's beyond my ability. Anyway, really thanks for helping! 😃

from knoxpatch.

XDABlackMesa123 avatar XDABlackMesa123 commented on June 9, 2024

You really shouldn't add any other app than the ones marked as recommended in the module settings. Do you have Shamiko installed? You can get device logs via the LSPosed Manager app, I need to check what's going on under the hood, it's very strange that Secure Folder works while Work profile doesn't.

from knoxpatch.

macaujack avatar macaujack commented on June 9, 2024

Thanks for quick reply!

Now I only enable KnoxPatch for the recommended Apps. Still, I can use secure folder but cannot create work profile.

You mentioned Shamiko. No, I haven't installed Shamiko. Should I install it? I rooted my device with kernelsu instead of Magisk, so I think I'm doing well enough to hide my root. After all, even secure folder (which focuses on security) is available now. And other bank Apps cannot detect my root.

I attach the modules logs and verbose logs here. Thanks again!!

ModulesLogs.zip
VerboseLogs.zip

from knoxpatch.

XDABlackMesa123 avatar XDABlackMesa123 commented on June 9, 2024

You mentioned Shamiko. No, I haven't installed Shamiko. Should I install it? I rooted my device with kernelsu instead of Magisk, so I think I'm doing well enough to hide my root.

Installing ZygiskOnKernelSU will leave some traces of the presence of Zygisk in your device even though you're using KSU, installing Shamiko will make sure to hide those as well.

Anyway, by checking your device's logs I can see why it is failing to create the work profile user:

08-08 17:54:31.592   968  8023 I epmd    : Set sdp policy for user 12
08-08 17:54:31.592   968  8023 I epmd    : Set sdp policy to /data/user/12
08-08 17:54:31.592   968  8023 E epmd    : Failed to set policy to /data/user/12: Inappropriate ioctl for device
08-08 17:54:31.592   968  8023 E epmd    : Failed to set sdp policy for user 12
08-08 17:54:31.592   968  8023 E VoldNativeService: failed: Inappropriate ioctl for device
08-08 17:54:31.597  2453  5825 E StorageManagerService: failed
08-08 17:54:31.597  2453  5825 E StorageManagerService: android.os.ServiceSpecificException: failed (code 25)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3037)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.os.Parcel.createException(Parcel.java:3007)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.os.Parcel.readException(Parcel.java:2990)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.os.Parcel.readException(Parcel.java:2932)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.os.IVold$Stub$Proxy.setSdpPolicyCmd(IVold.java:3298)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.StorageManagerService.setSdpPolicyCmd(StorageManagerService.java:6786)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.os.storage.StorageManager.setSdpPolicy(StorageManager.java:3463)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.knox.dar.EnterprisePartitionManager.setSdpPolicy(EnterprisePartitionManager.java:271)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.knox.dar.sdp.SdpManagerImpl$SdpLocalService.setSdpPolicy(SdpManagerImpl.java:4668)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.pm.UserManagerService.lambda$setSdpPolicy$6(UserManagerService.java:7832)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.pm.UserManagerService.$r8$lambda$uXE6Sg8Q0O-7SCcp-tFgXzEIKN0(Unknown Source:0)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.pm.UserManagerService$$ExternalSyntheticLambda4.apply(Unknown Source:4)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at java.util.Optional.map(Optional.java:261)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.pm.UserManagerService.setSdpPolicy(UserManagerService.java:7831)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.pm.UserManagerService.createUserInternalUncheckedNoTracing(UserManagerService.java:4531)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.pm.UserManagerService.createUserInternalUnchecked(UserManagerService.java:4237)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.pm.UserManagerService.createProfileForUserEvenWhenDisallowedWithThrow(UserManagerService.java:4109)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.os.UserManager.createProfileForUserEvenWhenDisallowed(UserManager.java:3645)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at com.android.server.devicepolicy.DevicePolicyManagerService.createAndProvisionManagedProfile(DevicePolicyManagerService.java:19543)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:6383)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.os.Binder.execTransactInternal(Binder.java:1316)
08-08 17:54:31.597  2453  5825 E StorageManagerService: 	at android.os.Binder.execTransact(Binder.java:1280)
08-08 17:54:31.598  2453  5825 E SdpManagerImpl: setSdpPolicy failed!
08-08 17:54:31.598  2453  2497 I am_wtf  : [0,2453,system_server,-1,StorageManagerService,failed]
08-08 17:54:31.598  2453  5825 E UserManagerService: Failed to set sdp policy
08-08 17:54:31.598  2453  5825 D SystemServerTiming: createUser-64 took to complete: 531ms
08-08 17:54:31.598  2453  5825 D SystemServerTiming: !@Boot_SystemServer: 531ms : createUser-64
08-08 17:54:31.599  2453  5825 I SystemServerTiming: !@Boot_EBS:   Took 531ms by 'createUser-64'

The KSU img you flashed is built from Samsung's kernel sources or did you download it from their releases?

from knoxpatch.

XDABlackMesa123 avatar XDABlackMesa123 commented on June 9, 2024

I also see there are some issues with one of the hooks in the module:

[ 2023-08-08T17:51:30.235     5009:  6922:  6922 I/LSPosed-Bridge  ] Loading module io.mesalabs.knoxpatch from /data/app/~~e1v-C_fAb1UgahjH7pTYZA==/io.mesalabs.knoxpatch-efqa1actOBecmQcdMsREMg==/base.apk
[ 2023-08-08T17:51:30.266     5009:  6922:  6922 I/LSPosed-Bridge  ]   Loading class io.mesalabs.knoxpatch.MainHook_YukiHookXposedInit
[ 2023-08-08T17:51:30.745     5009:  6922:  6922 I/LSPosed-Bridge  ] [KnoxPatch][D][com.samsung.android.scloud]--> SamsungKeystoreHooks: onHook: loaded.
[ 2023-08-08T17:51:30.990     5009:  6922:  7090 I/LSPosed-Bridge  ] [KnoxPatch][E][com.samsung.android.scloud]--> HookClass [com.samsung.android.security.keystore.AttestParameterSpec] not found
[ 2023-08-08T17:51:30.991     5009:  6922:  7090 E/LSPosed-Bridge  ] java.lang.NoClassDefFoundError: Can't find this Class in [dalvik.system.PathClassLoader[DexPathList[[zip file "/system/priv-app/SamsungCloudClient/SamsungCloudClient.apk"],nativeLibraryDirectories=[/system/priv-app/SamsungCloudClient/lib/arm64, /system/priv-app/SamsungCloudClient/SamsungCloudClient.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64, /system/lib64, /system_ext/lib64]]]]:
                                -> name:[com.samsung.android.security.keystore.AttestParameterSpec]
Generated by YukiHookAPI#ReflectionTool

Would you mind telling me which version of the Samsung Cloud app have you installed? This isn't really important but I'd like to know what's causing this issue to happen. I also really suggest you updating to the latest canary build of LSPosed available if possible:

https://github.com/LSPosed/LSPosed/suites/14840453246/artifacts/845055367

from knoxpatch.

macaujack avatar macaujack commented on June 9, 2024

I downloaded from their releases. The one I downloaded was prefixed with "AnyKernel" and it's a zip file.

For convenience, I first rooted my device with Magisk and installed an app that can flash kernel (namely "EX Kernel Manager" on Google Play store). Then I flash the AnyKernel*.zip using that App. And then I remove Magisk completely.

My samsung cloud version is 5.2.06.18

from knoxpatch.

XDABlackMesa123 avatar XDABlackMesa123 commented on June 9, 2024

I downloaded from their releases. The one I downloaded was prefixed with "AnyKernel" and it's a zip file.

Looks like a kernel issue to me, nothing directly related to KnoxPatch. Unfortunately you really can't use the KSU prebuilt img's in their releases on Samsung devices, since Samsung shipped kernels have a lot of proprietary drivers/code which is missing in Google's kernel tree (the one where KSU prebuilt img's are based off), in your case I assume the missing SDP drivers in kernel are causing this issue. The only solution is to go back using Magisk or build a KSU enabled custom kernel from Samsung's kernel sources, I personally built KSU kernels for A52s (Snapdragon 778G) and A54 (Exynos 1380), you can check my kernel sources here:

My samsung cloud version is 5.2.06.18

Thank you for reporting, looks like Samsung added SAK code since 5.4.xx.xx and above, will adjust the code in the module to avoid throwing that error when the hook won't work.

from knoxpatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.