Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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.

Thanks.

share|improve this question
add comment

1 Answer

In Android, the DNS Cache is not on the OS level (Linux), but on the Java level (managed by java.net.InetAddress). 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
add comment

Your Answer

 
discard

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.