Hack: Process.myUid(): provide wrong Uid

Some applications like Whatsapp don't accept files with their own Uid for security reasons
This commit is contained in:
Julian Winkler
2024-08-29 13:55:19 +02:00
parent f3092fd4bd
commit 80013bc2d8

View File

@@ -413,7 +413,9 @@ public class Process {
* a uid identifies a specific app sandbox in a specific user.
*/
public static final int myUid() {
return Libcore.os.getuid();
// HACK: provide wrong Uid, as some applications like Whatsapp don't accept files with their own Uid for security reasons
return -1;
// return Libcore.os.getuid();
}
/**