All this talk about legality.
This question is you purchased the phone, now do you own Apple's code or are you using Apple code with their permission?
My say is that you do not own the OSX code or the firmware code.
So when you hack into the code and make changes your are doing so without Apples permission.
Did Apple give you permission to alter its code.
I do not think it is open sourced.
So, yes the phone is yours, you can rip the battery out and sell it someone else, but taking the code and selling it is illegal
This question is you purchased the phone, now do you own Apple's code or are you using Apple code with their permission?
My say is that you do not own the OSX code or the firmware code.
So when you hack into the code and make changes your are doing so without Apples permission.
Did Apple give you permission to alter its code.
I do not think it is open sourced.
So, yes the phone is yours, you can rip the battery out and sell it someone else, but taking the code and selling it is illegal