私はファイル マネージャーに取り組んでおり、/data フォルダーへのルート アクセスを取得できるようにしたいと考えています。そのディレクトリから File オブジェクトを作成して維持したいと考えています。どうすればこれを達成できますか? これが私がこれまでに試したことです..
if (RootTools.isRootAvailable()) {
File file = new File("/data");
//here is where the app crashed, and I got a null pointer exception.
} else {
// do something else
}