I'm attempting to write a script to test out a camera for long periods of time, and one of the issues right now is the fact that it runs out of space when pictures are taken. My initial approach is to remove the picture using adb after its taken. The issue is, even after I remove it from the location it is saved in, it remains visible in the gallery, and I assume it's taking up space somewhere. The properties associated with it (such as width, height, flash info, etc) all get deleted as well, except for the size.
What I'm currently doing is deleting all files in the DCIM directory (where the camera saves the pictures) after every time a picture is taken, using adb. Additionally, when I search throughout the phone using adb, I cannot find anything similar to the pictures anywhere in the file structure.
Is it possible to fully delete the pictures using adb? Is there a cache where the images are stored somewhere? The only way I can get the pictures to fully be removed from the phone are to either reboot, or use monkey runner to delete the pictures through simulated touches in gallery (which is tedious for a large # of photos).