Skip to content

Commit 529e1bb

Browse files
authored
Android 11: Fix crash on getContentProvider
SecurityException on call getContentProvider, wrong packageName.
1 parent c0dc3d6 commit 529e1bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

VirtualApp/lib/src/main/java/com/lody/virtual/client/hook/proxies/am/MethodProxies.java

+5
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,11 @@ public Object call(Object who, Method method, Object... args) throws Throwable {
13911391
return null;
13921392
}
13931393
args[nameIdx] = VASettings.getStubAuthority(targetVPid);
1394+
1395+
if (Build.VERSION.SDK_INT >= 30) {
1396+
args[1] = VirtualCore.get().getContext().getPackageName();
1397+
}
1398+
13941399
Object holder = method.invoke(who, args);
13951400
if (holder == null) {
13961401
return null;

0 commit comments

Comments
 (0)