Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to get a list of my current cache on my phone, what is the command to issue in order to retrieve that list ?

I would like to get a command and not an app that does that, since i want to incorporate that command into a script that i am write.


share|improve this question

In Android, the DNS Cache is not on the OS level (Linux), but on the Java level (managed by Therefore, it is not possible to list the cache contents from the shell, however you can access it from the Java code.

Please see Java DNS cache viewer question on StackOverflow, one of the answers has a sample Java code that prints the positive and negative DNS cache. You can incorporate that code into whatever solution you're building.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.