A friend of mine called me in a panic because his Samsung tablet wouldn't upgrade to Windows 8.1.
Every visit to the Windows Store he was offered the Upgrade, but each attempt to upgraded ended in the error below:
Sometimes this error will read "Something happened and the Windows 8.1 could’nt be installed. Please try again. Error code 0×80240031"
Fortunately, this was a relatively simple fix.
First open up the Command Prompt as an Administrator:
At the Command Prompt type the following commands one at a time:
'net stop wuauserv' hit enter
'net stop bits' hit enter
Now browse to the C:\Windows\Software Distribution folder and delete all the files and folders inside.
You may be told files are in use, if so, restart your device, and run the commands above again,
but this time make sure the Windows Store app isn't open.
Now back to the Command Prompt and type the following commands one at a time:
'net start wuauserv' hit enter
'net start bits' hit enter
Now open the Windows Store. It should look like this:
Try the Upgrade again... It should start downloading like the below:
Enjoy Windows 8.1!
UPDATE #2 - If you are still having issues after trying these steps, please check out my article Windows 8.1 and the Nuclear Option for additional steps.