While renewable energy technology is a promising solution toward achieving self-sustainable low power devices, the efficient energy storage is still a challenge because of high self-leakage (e.g., supercapacitors) and limited life cycles (e.g., batteries). In this work, we propose an adaptive quality-aware energy management middleware framework for energy harvesting embedded systems. Our hybrid energy storage model takes into consideration the battery life cycle, supercapacitor self-leakage, and power loss in the harvesting circuit. The framework has an offline planning phase and a runtime adaptation phase. By incorporating abstract models for battery state of health (SoH) and supercapacitor self-leakage, the offline stage determines the budget for charging and discharging distribution of each storage components and accordingly adapts the application quality of service (QoS). The online adaptation phase dynamically adjusts the charging and discharging distribution to the dynamic changes in energy harvesting profile. In comparison with related work, our proposed framework is able to capture the lifetime and characteristics of the energy storage components more accurately during adapting quality of applications and hence, results in a more realistic QoS under which system is more sustainable.