I know this will sound painful, but maybe you can attempt to restore the libraries that are having trouble. since terminal is failing, you may need another terminal app to just help get you through the restore.
Or setup another sd card instance of 16 and hand copy what you need off.
Sorry I couldn't tell you the libraries but they may be mentioned in a system log, or Google may know where they are stored as a whole.