Pocket-size gadget can detect counterfeit Viagra

The tricky bit(in the mid-long term, if we assume that the sensors themselves are a doable engineering problem that will be refined and cost optimized) is how to deal with pills where structure is important(most commonly various delayed-release ones that depend on the inactive ingredients breaking down at a predictable rate to deliver the active ingredients over time; or to protect the active ingredients until they make it through the stomach acid, or what have you); without making the test destructive or too easy to game.

A good destructive test is better than no test at all; but the people with the lousiest access to well controlled supply chains are also the people who will feel the cost of each sample destructively tested most acutely, and greater confidence in a given batch that may be a mixture of real and fake requires more samples.

One might have a specially designed ‘test channel’ that you could drill/laser through to get a cross section of the pill without destroying it; but then the classier counterfeiters would presumably start filling the test channel with real product while bulking/faking the rest.

I know that crushing/splitting and similar crude mechanical operations tend to screw up delayed release capsule designs(leading to the occasional tragic incident when some patient can’t swallow pills and their well-meaning caregivers crush and mix with applesause or yogurt; and then learn that drug levels have been spiking and plummeting multiple times per day); but I wonder if they would tolerate a single narrow test-channel that is cut to obtain a representative sample and then filled with a food-grade wax or similar inert ingredient?

That would make it impossible for the counterfeiter to know where the test-channel sample will come from; but, if the channel is narrow enough, might also damage little enough of the active ingredient for it to be an effectively nondestructive test.