It worked, no more errors! I got scared for a moment
Very intricate episodeit might be helpful for users stumbling across this thread (and a couple others relating to the same issue) that the problems are due to the latest sdk from google. if you haven't installed the latest sdk, you're ok.
the link given above enables you to retrieve the previous sdk (which is the one most of us have: sdk-tools-4333796.zip. note: when i downloaded the evil sdk yesterday, it had a name that was similar, although the numeric part was different. i just went to the regular download link to get that number so i could mention it here, but not only has it been changed since yesterday, but the name itself is different, and there is a disclaimer you have to agree to before you can download. i'm pretty sure this was not the case previously. so something is up with google and the sdk.
Ok! Thanks. Let’s wait the big fix from googleI tested the latest version of the command line tools and was able to fix the "could not write settings" error. However there was a different error with avd manager (command line tool) that just hanged forever. It looks to me like a problem in the SDK itself. For now we should stay with the previous version - 4333796 .