@eduardo So what finally happened was I went and did a complete restore using an Android image. Even then, and this may have been the problem all along, There was a problem mounting the Data partition and I had to repair that. After Android was installed I ran UBports again and now it is fine. Thank you for your help.