Upgrade to the latest SDK and 3rd-party libs and fix API breakages