Use ifunbox to copy /var/mobile/Library/AddressBook/* and /var/mobile/Library/SMS/* to PC and then from PC to the other iPhone. Now you get the SMS and contacts on the other iPhone. But you can't send SMS or add new contacts. Why? SSH into the iPhone, you'll find the owner of the files you just copied is root. Change the owner to mobile and reboot and you'll be all set.
The above works for 3.1.3.
There's an article for newer iOS: http://blog.lincomatic.com/?p=384