i made a small script which is able to root ICS/JB phones. It uses a remount timing issue in Androids "adb restore" service.
So normally it should work on nearly all ICS/JB devices, for some it won't but the idea may work in a slightly modded version

There is a case for Xperia T and Xperia S,P etc. phones, this phones run ICS but don't have android's native restore with adb, Sony has added a own custom "Backup&Restore" app, the script handles this cases too, just choose the correct option!

Updates:
Updated to v2 windows&linux! (thanks kamistral for the Unix port )
Updated to v3 (no unix script included yet, sorry no time!) - Included Sony Tablet S mode thanks WonderEkin for helping me out there!
Updated to v4 - On many requests i added a unroot option
Updated to v5 - Other renamed to Normal, Xperia T integrated to Normal-Mode, adjusted wait-for-device time to atleast 10 seconds etc...
Updated to v6 - Made it even more simple Checks itself for Xperia S, P etc etc and switches modes automatically. So only 3 modes left: Normal, Tablet S and unroot.
Updated to v7 - Fixed some scripting errors & added some more output!
Updated to v8 - Fixed very very stupid scripting error!
Updated to v9 - Fixed another bug (thanks maxrfon) & Added automatic stat for Backup&Restore on special Sony devices like LT26,LT22 ...
Updated to v10 - Just updated Superuser app and su binary
Updated to v11 - Added sync to Special mode, thanks to smokey_joe
Updated to v12 - Added ric for Xperia T, device will not reboot anymore on system remount + Full Unix script (thanks codeworkx for port)
Updated to v13 - Fixed selfmade bugs -.-
Updated to v14 - Fixed several Unix bugs, added support for more devices with RIC, no more reboot issues on this devices after remounting system partition to RW
Updated to v14_2 - Just a fix for Unix SH script (thanks to shadyabhi)
Updated to v15 - Fixed "lagging devices", just re-root a lagging device and it will be fine
Updated to v16 - Added a 10 second delay before reboot (needed for some devices!)
Updated to v17 - Added more settings to local.prop, hopefully it will work on some more phones now!
Updated to v18 - Fixed "unroot" Option, fixed Linux Version, added a notice for usb-drivers in Windows Version
Updated to v20 - New method by Goroh_kun for Xperia Z/ZL added, maybe also it works for other new Xperia Firmwares! All credits for this belongs to him!
Updated to v21 - Fixed NFC Bug on Xperia Z after rooting !
Updated to v22 - Fixed ServiceMenu Status of Rooting Allowed & Added choice if Superuser or SuperSu should be installed & install other RIC to prevent phones from rebooting @ System RW remount
Updated to v23 - Fixed stupid script error.
Updated to v24 - More robust NFC fix & unrooting improved
Updated to v25 - Fixed Problems with SuperSU (SuperSU reported NOT rooted before) & updated to newest ADB version (be sure to have actual drivers installed!!)
Updated to v26 - Fixed Problem with last step of mode 3. (Now rm -rf of busybox is used instead android one which misses -f flag)
Updated to v27 - Fixed little script error and added a Linux version (chmod +x it yourself) [thanks to jamcswain for the unix script]
Updated to v28 - Reboot issue fixed, NFC more stable fix (Mode 3)
Updated to v29 - Small fixes
Updated to v30 - Updated Busybox version, Added Rooting for Google Glass Explorer Edition (thx Saurik for the ab file)
Updated to v31 - Added a improved Root-Method by Ariel Berkman (see here for details: http://seclists.org/fulldisclosure/2013/Jun/115)
Updated to v32 - Added new Z1 14.1.G.1.534 Root method by cubeandcube
Updated to v33 - More devices
Updated to v34 - Z2 Tablet root
Updated to v35 - removed the pwn binary on request!
Notice:
Normal Mode will not wipe any other data, dont worry! (only maybe your backgroud vanishes )
Special Mode CAN wipe your data, Rollback SHOULD restore, but to be sure backup you data somehow!
New Mode SHOULD be able to root all new Sony Firmwares like 2.55 and higher where Normal mode was failing [thanks Goroh]

XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.Are you a developer?