Many species are omnivorous, eating primarily small insects and all kinds of plant material and fungi; some are scavengers, feeding upon dead organisms, bird dung, and other fecal material.
To deal with predators such as birds, mammals, amphibians, and spiders, some species glue debris onto their bodies, while many play dead when disturbed.