简体   繁体   中英

How to list all folders on android?

I want to make an app that scans my phone's memory. I know about Environment.getExternalStorageDirectory(). But there are also other folders on my phone, such as folders used by other applications. When I try to use the linux "du /" command, I get a permission denied error. It will work with root, but there are applications on GooglePlay like Total Commander or Termux that have the ability to scan almost all folders on the device whithout root. So how they do this? 😅

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM