Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
渡されたコマンドのstdoutをエコーしない「su」バイナリのバリエーションを持つAndroidデバイスがあります。そのため、「su-cdf」が何を示しているのかわかりません。dfを使用せずにデバイスにマウントされたUSBフラッシュのサイズを取得する方法はありますか?
次の標準的な方法を使用して、SDカードのサイズを検出できます。
StatFs stat = new StatFs(Environment.getExternalStorageDirectory().getPath()); long size = (long)stat.getBlockSize() * (long)stat.getBlockCount();
したがって、必要なのはマウントポイントへのパスだけであることがわかります。