OED says that the noun shake-down is from the verbal phrase to shake down and links to this definition of the verb shake (sense 12a):
With adv. or phrase: To reduce by shaking (sense 7) to a specified condition. to shake down: to cause to settle or subside by shaking.
There is also an obsolete definition of the verb shake related to corn and it links to sense 12a:
simply. To cast down, scatter (fruit, blossom, corn, etc.) by shaking; = to shake down at sense 12a above. Also, to turn out (a fox) from a bag (cf. [to shake out 1 at Phrasal verbs][2]).
The earliest citation is from 1557 and includes a proverbial phrase:
All this wynde shoke no corne, all this moued him not.
R. Edgeworth Serm. very Fruitfull ccxxx. C 1
And a non-obsolete and dialectal definition:
intr. Of fruit, blossom, corn: To fall, scatter. Now dial.
Here is a 1788 citation from the book The rural economy of Yorkshire (by William Marshall) where the verb shake is mentioned in the provincialism of East York:
To Shack (that is, to shake), to shed, as corn at harvest.
I've checked Google Books also and found this excerpt in the Report from the Select Committee on the Sale of Corn: With the Minutes of Evidence, Appendix and Index (ordered, by The House of Commons, to be printed, 25 July 1834):
In measuring corn in England, the system is to measure lightly as it is termed, by pouring it gently into the bushel measure, or by entering the measure itself into a loose heap of corn so as partially to fill it, and then completing the filling of it by the hands ; and afterwards by passing the strike, or wooden ruler, along the top of the measure, when a little more than full, in order to scrape off the superfluous parts. By our ancient laws, it was illegal not only to require more than eight bushels to the quarter of corn, which appears to have been a common practice, but even to shake the bushel in measuring corn, which process compresses it into a smaller space, and therefore requires a greater quantity to fill the same measure. These statutes were enacted in the feudal ages, when rents were paid partly in kind, to protect the vassals, who were obliged to deliver a certain number of bushels of corn to their lords at stated times, from being harshly dealt with, by having compressed instead of loose measure exacted from them.
As a side note, bushel is a measure of capacity used for corn, fruit, etc., containing four pecks or eight gallons. The imperial bushel, legally established in Great Britain in 1826, contains 2218.192 cubic inches, or 80 pounds of distilled water weighed in air at 62° Fah. The Winchester bushel, much used from the time of Henry VIII, was somewhat smaller, containing 2150.42 cubic inches or 77.627413 pounds of distilled water; it is still generally used in United States and Canada.[OED]
Conclusion:
The noun shake-down meaning "a thorough search of a person or place" seems like an analogy to the act of shaking the corn down till it settles and there is no space left to fill in order to get a good measure. So in criminal slang, it is searching someone or somewhere till there is nothing left to search.
Note: In physics, the shakedown mechanism is explained with granular convection.