similar to or similarly to
Using the example "to obtain similar to or similarly to," the latter sounds very strange even though similarly is definitely being used as an adverb. The sentence: "The fragments were obtained similar to / similarly to the sticks." This would be much less wordy than "The fragments were obtained using a procedure similar to that used to obtain the sticks," (or: with the same procedure as that used to obtain - still wordy), but which is correct, "x" was obtained similar to or similarly to "y"?
To this point, the original poster and a commenter have suggested three options for expressing the intended idea:
The fragments were obtained similar to the sticks.
The fragments were obtained similarly to the sticks.
The fragments were obtained in a way similar to the sticks.
To my mind, none of these options is entirely satisfactory. As the poster notes, the similarity under consideration isn't between the fragments and the sticks, but between the procedure for obtaining the fragments and the procedure for obtaining the sticks. This is particularly problematic for option 1, which doesn't explicitly mention procedures (or methods or processes or ways) at all and which introduces the comparison by means of "similar to" (rather than "similarly to")—a phrase that normally introduces comparisons of nouns rather than of verbs. Presented with the sentence in option 1, I would wonder whether the intended meaning involved a similarity between processes of acquisition (the procedure for obtaining the fragments and the procedure for obtaining the sticks) or a similarity between the things ultimately obtained (the fragments and the sticks). Either way, the wording does not clearly express the underlying idea.
Although option 3 has the advantage of explicitly indicating (via the phrase "in a way") that a procedure is of interest, it still has the problem that it literally compares the way that the fragments were obtained with the sticks themselves (not with the way the sticks were obtained). Therefore, the comparison, as expressed, is not in parallel. To make it whole, the reader must supply the missing part of the comparison (the procedure by which the sticks were obtained). The problem is somewhat similar to comparing "apples to picking oranges," except that here the form is closer to comparing "picking apples to oranges." With a bit of effort, the reader can fill out the parallel structure that option 3 implies:
The fragments were obtained in a way similar to the way in which the sticks were obtained.
But it seems to me that the writer in this case is expecting the reader to do an awful lot of grunt work to reach the intended meaning.
I skipped over option 2 earlier because it has a different problem from options 1 and 3. Syntactically, the construction "The fragments were obtained similarly to the sticks" is correct; but it sounds unnatural, perhaps because people are much more accustomed to making and hearing noun-to-noun comparisons than verb-to-implied-verb comparisons. As a result, filling in the blanks in this shortened form is trickier than you might suppose from looking at it. The simplest long form that I could construct from the skeleton of option 3 is
The fragments were obtained similarly to how the sticks were obtained.
The simplest way to express the idea underlying the sentence might be this:
The fragments and the sticks were obtained similarly.
But that wording may not be an option if you've already described the method by which the sticks were obtained and now you want to turn your attention to the question of how the fragments were obtained. In that case, I would be inclined to return to a truly parallel noun-to-noun comparison and accept that the result will be a bit long-winded:
The process for obtaining the fragments resembled [or 'was much like'] the process for obtaining the sticks.