android.os.storage.StorageManager

Here are the examples of the java api class android.os.storage.StorageManager taken from open source projects.

1. ZergRush#isVulnerable()

Project: android-vts
File: ZergRush.java
@Override
public boolean isVulnerable(Context context) throws Exception {
    int pid = SystemUtils.ProcfindPidFor("/system/bin/vold");
    StorageManager sm = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
    Method getObbPath = sm.getClass().getMethod("getMountedObbPath", String.class);
    getObbPath.invoke(sm, "AAAA AAAA AAAA AAAA " + "AAAA AAAA AAAA AAAA " + "AAAA AAAA AAAA AAAA " + "AAAA AAAA AAAA AAAA" + "AAAA AAAA AAAA AAAA" + "AAAA AAAA AAAA AAAA" + "AAAA AAAA AAAA AAAA" + "AAAA AAAA AAAA AAAA" + "AAAA AAAA AAAA AAAA" + "AAAA AAAA AAAA AAAA" + "AAAA AAAA AAAA AAAA");
    // give vold some time to crash
    Thread.sleep(2000);
    return false;
}