The Shulhan Aruch (Orah Haim 206:2) rules that if one mistakenly recited the Beracha of "Ha’adama" over a fruit that requires the Beracha of "Ha’etz," he has fulfilled his obligation. Thus, for example, if a person recited "Ha’adama" over an apple, he has fulfilled his obligation and does not then need to recite "Ha’etz," because after the fact, the recitation of "Ha’adama" suffices for a fruit requiring "Ha’etz."
The Shulhan Aruch then proceeds to rule that because of this Halacha, if a person eats an item over which he is uncertain whether to recite "Ha’etz" or "Ha’adama," he should recite "Ha’adama," since this Beracha covers both kinds of foods. This situation can arise regarding those fruits whose Halachic status vis-ŕ-vis Berachot is uncertain, as the tree’s properties are atypical, or in a case where a person simply does not know the status of the fruit he eats, and is unable to determine which Beracha to recite. In such a case, the Shulhan Aruch writes, the individual should recite "Ha’adama," since this Beracha suffices even for fruits requiring "Ha’etz."
Although the Shulhan Aruch’s ruling is straightforward, a number of later Poskim ruled differently on this subject. Hacham Bension Abba Shaul (Israel, 1924-1998), in his work Or Le’sion (2:46), writes that in such a case, one should recite the generic Beracha of "She’ha’kol," instead of "Ha’adama." He notes that the Bet Yosef (commentary to the Tur by Maran, author of the Shulhan Aruch) famously brings a version of the text of the Rambam’s ruling, according to which one does not fulfill his obligation if he recites "Ha’adama" over a fruit requiring "Ha’etz." In light of this position, it is preferable in a situation of uncertainty to recite the generic Beracha of "She’ha’kol," which covers all foods, rather than recite "Ha’adama," which would not satisfy the requirement for the fruit being eaten according to the view of the Rambam. This was also the view of the Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909), in his work Rab Pe’alim, and of Rav Haim Ben-Attar (1696-1743), in his work Rishon Le’sion.
Likewise, Rav Yosef Mesas (1892-1974) ruled that one who eats a banana should recite "She’ha’kol," and not "Ha’adama." Although the Shulhan Aruch ruled that one recites "Ha’adama" over bananas, Rav Mesas claimed that the Shulhan Aruch here followed his position that one recites "Ha’adama" over a fruit whose status is in question, as the status of a banana is uncertain due to the fact that the banana tree is unusual (in that it collapses each year). In light of the Rambam’s position mentioned earlier, Rav Mesas noted, it would be preferable to recite "She’ha’kol" over bananas, in order to satisfy all opinions.
Hacham Ovadia Yosef cites Rav Mesas’ ruling in his Yehaveh Da’at (6:13, in a footnote), and disagrees, noting the widespread, accepted practice to recite "Ha’adama" over bananas. The majority of Halachic authorities, Hacham Ovadia noted, disputed the Rambam’s ruling regarding the recitation of "Ha’adama" over a fruit requiring "Ha’etz," and, there are editions of the Rambam’s work according to which he concurs with the majority opinion. Hacham Ovadia thus concluded that we should follow the Shulhan Aruch’s ruling, and recite "Ha’adama" – not "She’ha’kol" – in situations where there is a question whether a food requires "Ha’adama" or "Ha’etz."
Summary: In situations where one is uncertain whether a fruit requires "Ha’etz" or "Ha’adama," one should recite "Ha’adama." This applies both when a person does not know the correct Beracha and does not have access to this information, and when a fruit grows on a tree with unusual properties – such as a banana – such that its status is uncertain. In both cases, one recites "Ha’adama."