Merge pull request #636 from alexbakker/libsu-mount-ns

Run libsu commands inside the global mount namespace
This commit is contained in:
Michael Schättgen 2020-12-26 15:18:28 +01:00 committed by GitHub
commit 39f18b79cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,7 @@ import com.beemdevelopment.aegis.vault.VaultManager;
import com.beemdevelopment.aegis.vault.VaultManagerException;
import com.mikepenz.iconics.Iconics;
import com.mikepenz.material_design_iconic_typeface_library.MaterialDesignIconic;
import com.topjohnwu.superuser.Shell;
import java.util.ArrayList;
import java.util.Collections;
@ -43,6 +44,11 @@ public class AegisApplication extends Application {
private static final String CODE_LOCK_STATUS_ID = "lock_status_channel";
private static final String CODE_LOCK_VAULT_ACTION = "lock_vault";
static {
// to access other app's internal storage directory, run libsu commands inside the global mount namespace
Shell.Config.setFlags(Shell.FLAG_MOUNT_MASTER);
}
@Override
public void onCreate() {
super.onCreate();