yashsingh1/xdaforums huggingface dataset:
[Sony Xperia S, Acro S, Ion] Karthi Redbull:
Xperia L Increase in partition

I saw a thread (http://xdaforums.com/xperia-s/s-development/tutorial-increase-data-partition-t2821058) on how to increase the partition of Xperia L to one big 8GB, but can I get the clear steps on how to do it since I am not able to understand it completely.

Thanks in advance,

Karthi
[Sony Xperia S, Acro S, Ion] Mirhawk:
It is Xperia S, not Xperia L. What problems are You facing?
[Sony Xperia S, Acro S, Ion] shamsul007:
To anyone like me who are having issues getting ADB to work whilst in Recovery.

1.Connect USB.

2.Open cmd promp in Platform tools. Just check you have ADB working in the first place.

adb devices then

adb reboot recovery

3.Once in Recovery, open Device Manager in Windows.

4.Navigate to Xperia S (where you may have a warning symbol)

5.Right click, and choose to Update Driver Software.

Browse my computer for driver software

Let me pick from a list of device drivers on my computer

Scroll down and select adb driver

Click Next and Install.

6.Now back to cmd prompt

adb devices

7.It should show your Device ID, and next to it Recovery.

Done.
[Sony Xperia S, Acro S, Ion] kingoffire:
Regarding Data partition increase

Hi all,

In order to increase data partition does anybody just tried to replace the volumes in the fstab ?

For exaplme here is the df from the phone:

root@nozomi:/ # df

df

Filesystem Size Used Free Blksize

/dev 434.2M 48.0K 434.2M 4096

/sys/fs/cgroup 434.2M 0.0K 434.2M 4096

/mnt/asec 434.2M 0.0K 434.2M 4096

/mnt/obb 434.2M 0.0K 434.2M 4096

/system 1006.7M 413.2M 593.4M 4096

/cache 245.9M 127.3M 118.7M 4096

/data 2.0G 1.7G 259.6M 4096

/data/idd 7.5M 1.0M 6.4M 1024

/mnt/media_rw/sdcard0 25.8G 6.1G 19.7G 32768

/mnt/secure/asec 25.8G 6.1G 19.7G 32768

/storage/sdcard0 25.8G 6.1G 19.7G 32768

/mnt/asec/bg.sportal.android-2 5.0M 3.6M 1.3M 4096

/mnt/asec/com.facebook.katana-2 24.1M 22.3M 1.7M 4096

root@nozomi:/ #

What if we just replace and keep the current partition table ?

#data-ext4

/dev/block/platform/msm_sdcc.1/by-num/p14 /sdcard0 ext4 nosuid,node

v,noatime,barrier=1,data=ordered,noauto_da_alloc wait,check,encryptable=footer

#sdcard0-vfat

/devices/platform/msm_sdcc.1/mmc_host/mmc0 auto vfat defaults

voldmanaged=data:15,nonremovable,noemulatedsd

One more is it the right file fstab.semc ?

Thank you in advance!
[Sony Xperia S, Acro S, Ion] Mirhawk:
So essentially You are swapping internal storage with data partition. But won't You have just 2GB for internal storage?
[Sony Xperia S, Acro S, Ion] kingoffire:
Yes just to swap them. That is my aim to have 25GB of /data and 2GB of sdcard0. In this case it is also data partition increase but with less steps.

The questions are does anybody tried it,is it work and is it the correct syntax for the fstab ?

Cheers
[Sony Xperia S, Acro S, Ion] Mirhawk:
I don't think anyone has tried it and, no offence meant, but no one will. Not only will Your internal storage be just 2 gb, but also You don't need more than 8 GB for apps and their data at all, even on Lollipop!
[Sony Xperia S, Acro S, Ion] kingoffire:
Ok seems, there is point, yesterday I increased the /data partition successfully with little issues via the procedure.

But it seems to me there is some point also in swapping the sdcard with data, no worries if sdcard is only 2GB, everything can be stored on /data like nexuses for example.

Cheers
[Sony Xperia S, Acro S, Ion] Mirhawk:
The storage of Nexus and Xperia devices is not similar. The Nexus like devices us same partition to store apps and their data and as user internal storage, but Xperia devices don't. Also, if You store the stuff in data partition, apps won't be able to access the music, photos, videos etc since they don't have permission to access folders other than their own and the system related folder in the data partitions.
[Sony Xperia S, Acro S, Ion] killer1991:
@mirhl method

Please Help me

here what i have done

1.did not copy romzip to tmp folder.

2.booted into twrp then from mount menu unmounted everything.

3.on terminal command clicked on select then executed all the commands.

4.yyyyM means amount of data partition right that is bydefault 2gb? i used 6144M.

5.after executing all commands i went back to wipe and wiped everything except sdcard then install and flashed rom saved on my sdcard but ater installation my partition still 2gb for applications please help me

---------- Post added at 09:25 AM ---------- Previous post was at 08:43 AM ----------

/sbin/sh: adb: not found

booted into twrp then on ubuntu typed adb shell

got shell working then was testing adb push command (sudo adb push rom.zip /sdcard) then i got this error /sbin/sh: adb: not found. on dekstop i have saved this rom.zip please help i am trying to do partition but before testing push and pull commands using ubuntu 14.04
[Sony Xperia S, Acro S, Ion] mirhl:
You don't insert adb commands into shell, and viceversa.
[Sony Xperia S, Acro S, Ion] zakaria12:
please help

error executing updater binary in zip ' /sdcard/xx.zip'
[Sony Xperia S, Acro S, Ion] Mirhawk:
Ask Your question here and explain which ROM You are trying to flash.
[Sony Xperia S, Acro S, Ion] Leehm0123:
Dont know how to start....

Can anyone post the turorial video?Please...

I really need help as my xperia s only can install a few apps...
[Sony Xperia S, Acro S, Ion] BLu-RaymOn:
i'll do it. work ^^

mke2fs -T ext4 /dev/block/mmcblk0p14
mke2fs -T fat32 /dev/block/mmcblk0p15
[Sony Xperia S, Acro S, Ion] zakaria12:
can sameone help me ???

fdisk: warning: re reading partition table failed, kernel still uses old table: device or resource busy
[Sony Xperia S, Acro S, Ion] mirhl:
You have to unmount partitions.
[Sony Xperia S, Acro S, Ion] Leehm0123:
Need help..

Please,I need a video tutorial to avoid any errors...

I'm not clearly understand the guide...
[Sony Xperia S, Acro S, Ion] BLu-RaymOn:
Are you understand what step ?
[Sony Xperia S, Acro S, Ion] Leehm0123:
Can you explain what should I do in the very first step@@?

I am using Xperia S with Lollipop installed,TWRP 2.8.0.1
[Sony Xperia S, Acro S, Ion] BLu-RaymOn:
recommend use TWRP 2.8.4.1 (im use 2.8.5.0 work too)

and start step from flash stock rom.tft (example read in this thread) for clean partition table.

edit : step 3 : umount all partition in TWRP and go step 4
[Sony Xperia S, Acro S, Ion] Leehm0123:
Can I start without flash the stock rom?

and where should I type the code in the step 3?
[Sony Xperia S, Acro S, Ion] BLu-RaymOn:
im not sure. but i tested dont work for solution on step 10 msg show this.

The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy
~ # ←[6n

in TWRP > Mount manu > uncheck all partition
[Sony Xperia S, Acro S, Ion] Leehm0123:
The code in step 4 type in pc adb or where?
[Sony Xperia S, Acro S, Ion] Leehm0123:
That is only for mount and unmount only...

I say the code==In step 4
[Sony Xperia S, Acro S, Ion] BLu-RaymOn:
step 4 : in cmd with ADB AndroidSDK NOT From Flashtool.
[Sony Xperia S, Acro S, Ion] Leehm0123:
[IMG="cmd"]http://i.imgur.com/bqm8VaT.jpg[/IMG]

ERROR...?
[Sony Xperia S, Acro S, Ion] Sandeep Ganesh:
I cant use adb command

When I tried the command "adb shell" its showing the error "error: device '(null)' not found".I am in twrp recovery.

Please help.sorry for may bad english.
[Sony Xperia S, Acro S, Ion] BLu-RaymOn:
installed androidSDK ?
[Sony Xperia S, Acro S, Ion] Himanshu. 1993:
ADB not showing in recovery

The device is working on adb when booted normally and its also entering shell but when i boot in recovery its not found by adb. Pls help.
[Sony Xperia S, Acro S, Ion] mirhl:
Your computer may recognize the phone differently there. Check in device manager for adb driver (not composite one)
[Sony Xperia S, Acro S, Ion] Leehm0123:
Do I need to reflash recovery after I format and increase data partition?

---------- Post added at 06:41 AM ---------- Previous post was at 06:23 AM ----------

[IMG="Error"]http://i.imgur.com/azWD2R6.jpg[/IMG]

I still cannot do anything after I installed the android SDK
[Sony Xperia S, Acro S, Ion] mpulock:
You don't have to write (PC) or (ADB shell) or any other codes in the bracket. Just copy and paste like this :

adb shell

fdisk /dev/block/mmcblk0

p

.............

Then, Go to TWRP, and go to TWRP's mount and uncheck EVERYTHING

and, proceed from step 3. and go on. Best of luck. Don't worry. If anything goes wrong, there is always stock FTF and flashtool. :fingers-crossed:

P.S. : 'Step 7' may become tricky. Let me know, if you find any difficulties.
[Sony Xperia S, Acro S, Ion] Leehm0123:
Never mind

I have done this thing

what i need to type if I want 10gb?
[Sony Xperia S, Acro S, Ion] mpulock:
Just convert yourr desired GB to MBs and write it like Step 7

In your case it would be:

+10240M

I don't know why you need 10GBs for phone storage, 8GB is more than enough for apps.
[Sony Xperia S, Acro S, Ion] Leehm0123:
Can I use the whole memory for my phone storage? hahahah
[Sony Xperia S, Acro S, Ion] mpulock:
Sure, why not, let's give it a try. You know the procedure. Do it. Let me know the update. :good:
[Sony Xperia S, Acro S, Ion] Leehm0123:
I will do it if I am still not enough storage with 8GB
[Sony Xperia S, Acro S, Ion] resudiordna:
I tried to increase my system partition using the method described by [MENTION=4900593]mirhl[/MENTION] , but now I can't mount my sdcard anymore and Android won't start correctly: it's booting up, then I get a "Encryption unsuccessful" message.

I followed those steps:

start recovery mode

unmount Cache / SDcard

advanced -> terminal

print the partition table:

echo p | fdisk /dev/block/mmcblk0

note the start sector of partition14:

/dev/block/mmcblk0p14: 42945 - 108480 (2097152 83)

/dev/block/mmcblk0p15: 108481 - 954240 (27064320 c)

use it in this command and note the end sector of partition14:

echo -e "d\n15\nd\n14\nn\n42945\n+5120M\np\nq" | fdisk /dev/block/mmcblk0

(increase that partion (42945) by 5120M = 5GB)

end partition 14: 199195 -> start partition 15: 199196

echo -e "d\n15\nd\n14\nn\n42945\n+5120M\nn\n199196\n\nt\n15\nc\nw" | fdisk /dev/block/mmcblk0

mount Cache / Sdcard

When I could not start any more, I tried to revert those changes with:

echo -e "d\n15\nd\n14\nn\n42945\n+65535\np\nq" | fdisk /dev/block/mmcblk0

echo -e "d\n15\nd\n14\nn\n42945\n+65535\nn\n108481\n\nt\n15\nc\nw" | fdisk /dev/block/mmcblk0

But it's still not working :(

Any ideas?
[Sony Xperia S, Acro S, Ion] mirhl:
Technically you should have better to unmount everything

Then I hope you are using at least TWRP 2.8.4.1
[Sony Xperia S, Acro S, Ion] resudiordna:
Hi mirhl!

There were no other mounted partitions, so yes, I unmounted everything.

I am using TWRP 2.8.7.0
[Sony Xperia S, Acro S, Ion] PunchUp:
Where are you guys getting 2.8.7.0 from??
[Sony Xperia S, Acro S, Ion] resudiordna:
It was included in nAOSProm b25rc1
[Sony Xperia S, Acro S, Ion] haiviet:
For Sony Ion ?
[Sony Xperia S, Acro S, Ion] Mokorus:
I keep trying and I kepp failing.

I'm going to enumarete my mistakes.

I have the TWRP installed on FOTA and CM 12.1.

1. adb shell: device not found. I reinstalled the drivers on the corret way, thanks to the comments of this thread.

2. I think I did good adn flashed nAOSP 5.1 but the phone was stucked on the initial animation, try reboot and I get stucked on SONY screen.

- Flashed the ftp -

I lost TWRP on FOTA when I flashed (I dont know if its normal) but I tried reinstalled again (I had root and Terminal app) but no success , I couldnt not go on reboot on recovery mode. I jus flashed a old version of TWRP (.elf) with adb.

3. I forget press "w" and I couldnt install the rom because no /sdcard/ detected. -flashed the ftp again-

4. I did it again and flashed the rom, but the sdcard was not detected by the phone, I restarted and I got a soft brick (I dont know why). -flashed-

5. I did it again, when I was installing the rom, "sdcard was unmount" but it wasnt, checked on TWRP. -flash-

6. After that "/system was unmount" but it wasnt -flash

After that, I flashed the last version of TWRP (.img) with adb.

7. Everything was OK, but I cant install the new rom.

I dont know if it is REALLY neccesary had the TWRP on FOTA for do this, because I did it only once with the twrp flashed. And I dont where my problems are
[Sony Xperia S, Acro S, Ion] vikas_877:
Yes, you can try with windows also.

I recently tried all these step by step and its 100% works for me.

I really appreciate the developers work on this.
[Sony Xperia S, Acro S, Ion] jsbhullar96:
Xperia L Bricked

i was trying to partition disk spaces in xperia l and might have done something wrong and now the phone is not starting at all

not showing any sign at all

Any help will be appreciated!

i am still in the learning face
[Sony Xperia S, Acro S, Ion] bojz:
I lost my sdcard memory but i got 8gb in internal

my sdcard maybe didnot read after i did this

I cannot check internal sdcard in twrp mount

any solutions to came back my sdcard????
[Sony Xperia S, Acro S, Ion] millosr:
Have you mounted your sdcard?

(adb shell) mount /sdcard

If it fails check your partitions again in fdisk (p) command. Check if partition 15 is there and check if <p15 Start> is <p14 End> + 1.

If it's not delete partition 15 (d) (15) and than repeat steps 9 - 15 from tutorial.
[Sony Xperia S, Acro S, Ion] Diverti:
Did you format sdcard? Try this, after you created the partitions:

adb shell
make_ext4fs /dev/block/mmcblk0p14
mkdosfs /dev/block/mmcblk0p15
[Sony Xperia S, Acro S, Ion] biliterror:
Drivers install?

How do I install the drivers manually? PLS help me :c
[Sony Xperia S, Acro S, Ion] Mirhawk:
Can You post a screen shot of Your device manager with all options expanded and Your phone connected?
[Sony Xperia S, Acro S, Ion] fasterworks:
Question

Hey, thanks for the tutorial, it is what i've been looking for. But unfortunelly I only have Windows on my PC. Is there any way to do this whit windows?
[Sony Xperia S, Acro S, Ion] x1alpha:
Hope there is :)
[Sony Xperia S, Acro S, Ion] berda77:
Xperia S soft brick

After unsuccessful Data/SDcard resizing I got a soft brick, i.e I lost both partitions and I had to flash Stock Rom via Flashtool. So now I have Flashtool mode only, I can flash any Stock Rom (2.3.7/4.0.4/4.1.2) but no Fastboot mode (*#*#7378423#*#* says my bootloader unlock allowed:No). Currently the main issue (besides somehow locked bootloader) is my phone doesnt detect any simcard though it finds mobile networks. Tried several Stock Roms (LT26i_6.1.A.2.55_R6G_1257-8629_PCT, LT26i_6.2.B.1.96_World, Xperia S_1257-8629_R1H_6.2.B.1.96, SO-03D_6.0.A.5.12_Docomo and LT26i_6.2.B.1.96 Deo-Zipa-Root-Busy through recovery) but still no network connection.

Is there a way somehow to make my phone detect simcards (register with network)?
[Sony Xperia S, Acro S, Ion] biliterror:
HELP!

Ok... I managed to increase my data partition but my device still works as if it had no space on storage. What can I do? Photo of my device storage: imgur.com/b6bktZW Thanks in advance!s
[Sony Xperia S, Acro S, Ion] mirhl:
Did you wipe/format partition after adjustments?
[Sony Xperia S, Acro S, Ion] biliterror:
Thanks for the response, I am not sure... Did the process some time ago. Anyway I'm gonna do it again but... I want my phone to be backed up EXACTLY as it is... Any advice on that?
[Sony Xperia S, Acro S, Ion] mirhl:
Backup programs with titanium and then all the files on an external disk perhaps?
[Sony Xperia S, Acro S, Ion] Masha91:
Thank you for making this tutorial, I am so frustrated with the fact that my Xperia S has so little memory for apps and they just keep on updating.

My problem is that I am a total noob when it comes to phones. I managed to root my Xperia with Kingo Root, but when reading your instructions, I am pretty clueless as to how to do this. Is there a chance you could make a youtube video so I can see how each step is done?
[Sony Xperia S, Acro S, Ion] ebbano:
At which step you stopped?
[Sony Xperia S, Acro S, Ion] Masha91:
I haven't even started, cause I have no idea what to do or how to do this, like I said, I'm pretty clueless.
[Sony Xperia S, Acro S, Ion] nageswarswain:
Have you unlocked your boot loader?
[Sony Xperia S, Acro S, Ion] ebbano:
Start!

When you read something without understanding search it on xda forum, try to do and if don't work ask here [emoji57]

The first time ma be difficult but if never start it become impossible.
[Sony Xperia S, Acro S, Ion] Tnitro21:
Successfully re-partitioned but now no sim detected

Hey man

I successfully re-partitioned the phone (Great tutorial btw). The only problem I'm having now is that my sim is not being detected. I suspect it may have something to do with the fact that I wiped the system partition but then it wouldn't explain why it has work with no mishaps on other peoples devices. When I dial *#*#4636#*#* I cannot access the phone information tab as it crashes "com.android.phone" whenever I do. Everything else is working fine including WiFi and location. Have tried the following

1: Clear cache on phone, Phone/messaging storage and sim toolkit in the apps menu. (Restarted Phone after doing so).

2: Reflashed my Rom (Oneofakind) and Open gapps. (Wiped everything except sdcard).

3: Removing sim. Putting the phone into airplane mode. Restarting phone. reinserting sim.

4: And of course removing the sim and restarting the phone.

Wondering if there is a way to maybe reset the cell radio? Maybe by means of flashing the stock kernel back?

I know the last option is of course to reload the stock software but Oneofakind runs so damn well :D

Thanks in advance for the help.
[Sony Xperia S, Acro S, Ion] C0D3FR34K:
Guys ! Thanks a lot I have increased the data partition on my Xperia S. But can someone please explain if I install a 5.1.1. ROM ( like oneofakind ) will I have a write access to /sdcard ?

The reason for me asking this is because I had done this process earlier (successfully) but I somehow didn't get the write access to /sdcard with oneofakind ROM of-course. Apps like WhatsApp constantly failed to load images and take backups of the chat.

Was this a ROM installation issue or kernel issue or this incorrect repartitioning issue?

I just needs a heads up. ( Meanwhile I am repartitioning the emmc card again and doing a fresh flashing of the oneofakind ROM )

TIA !
[Sony Xperia S, Acro S, Ion] mirhl:
[MENTION=5538593]C0D3FR34K[/MENTION]

There shouldn't be any difference between roms. Sdcard partition is still sdcard partition.

If it doesn't work, this usually does the trick

chown -R 1023.1023 /sdcard

chmod -R 770 /sdcard
[Sony Xperia S, Acro S, Ion] dmj2626:
Hi, I had just the same problem. Something went bad to increase the partition (the same busy error to write changes) but I followed flashing of uCyan and Gaaps so I thought of error was only a warning. In the first boot I have got an error of uCyan an reboot and brick.

Following the tutorial I flashed ftf with Flastool in flash mode... But now sim is detected but cannot make call nor data communications and now service test says allow unlock not allowed, when before increasing partitions the XperiaS was unlocked.

I was flashing severals roms including ics 4 and the same problem.

I can't go into FastBoot mode and although I can root device and install twrp I can't start it neither vol+ nor from menu by some root privileges program like link2sd.

I believe of problem was to try recover the device flashing with flash mode instead of FastBoot mode. This locked the boot and something of kernel of uCyan is now imposible to rewrite with flash mode so sim doesn't work.

The only solution I can think is to send the XperiaS to sat to unlock again and flash the original rom again.

Any idea guys?

Enviado desde mi C6903 mediante Tapatalk
[Sony Xperia S, Acro S, Ion] asjackson03:
You could fix the problem? :confused:
[Sony Xperia S, Acro S, Ion] PunchUp:
Unmount all the partitions from TWRP. Cache, data, system, SD card.
[Sony Xperia S, Acro S, Ion] asjackson03:
Thanks !, I have a problem with my phone, can you help me? follow the steps in the tutorial, now, by removing partitions does not arise any mistake TWRP but the phone still can not mount the data partition (mmcblk0p14) and sdcard (mmcblk0p15) or by adb shell or by TWRP, help I fix it? my phone died?
[Sony Xperia S, Acro S, Ion] PunchUp:
Did you format the new partitions? It should be able to mount after that
[Sony Xperia S, Acro S, Ion] dmj2626:
Try to use resize option in advanced wipe inside repair /Change system option. After that wipe and you will be able to mount

Enviado desde mi C6903 mediante Tapatalk
[Sony Xperia S, Acro S, Ion] asjackson03:
I try to wipe format in TWRP but I get the error / data and / sdcard can not be mounted, so you can not format, I format it by adb? You know how to format it with adb?
[Sony Xperia S, Acro S, Ion] PunchUp:
I'm not sure which version of TWRP you are using. In the newer version, TWRP shows a "format partition" button. If you're using older TWRP version, you just need to go inside advanced wipe and do as the guy said earlier
[Sony Xperia S, Acro S, Ion] ahasan07:
how can i rollback into stock partition.
[Sony Xperia S, Acro S, Ion] nageswarswain:
Flash official stock ftf by flashtool
[Sony Xperia S, Acro S, Ion] PunchUp:
No you don't need any extra drivers. When are you getting that message? After booting into TWRP?
[Sony Xperia S, Acro S, Ion] vishals16:
You have a problem with adb drivers. Go to Device Manager and check whether the device shows up in there. Install the adb drivers.

If you are facing a problem installing them, there are innumerable tutorials on youtube. You will have to download some files or you can get them by updating packages in sdk. Follow the tutorial on youtube. Once they are installed, when you type adb devices in command prompt, your device will show up. Then proceed with the process :)
[Sony Xperia S, Acro S, Ion] kandangwa:
yes.

after booting into TWRP and going to C:\adt-bundle-windows-x86-20140702\sdk\platform-tools and typing "adb shell" in cmd it says "device not found"

:(
[Sony Xperia S, Acro S, Ion] kandangwa:
computer even recognizes my device in device manager when it is connected with phone switched on
[Sony Xperia S, Acro S, Ion] PunchUp:
I was facing the same issue with Windows. Don't know why. Linux did it without any problems.
[Sony Xperia S, Acro S, Ion] PunchUp:
[MENTION=5584911]kandangwa[/MENTION] which version of TWRP are you using?
[Sony Xperia S, Acro S, Ion] kandangwa:
i extracted the boot.img from Carbon-KK-nozomi-Beta10 which is TWRP v2.7.1.0
[Sony Xperia S, Acro S, Ion] PunchUp:
Ok I just tried 2.8.0.1 and it's still not working. Must be some problem with mounting and drivers on Windows.
[Sony Xperia S, Acro S, Ion] kandangwa:
i read something about installing java jdk along with sdk

can you have a look at this?

http://www.howtogeek.com/125769/
[Sony Xperia S, Acro S, Ion] PunchUp:
I already have JDK but it still doesn't work :p
[Sony Xperia S, Acro S, Ion] kandangwa:
sad. me too. it's just sooo annoying. arghhh!!!!!!!! i already want to partition my XS sooo bad.

:(:(:(
[Sony Xperia S, Acro S, Ion] PunchUp:
If nothing works, download a live image of any Linux distro and boot into it using a pen drive.
[Sony Xperia S, Acro S, Ion] vishals16:
I faced the same problem. Instead of umount/sdcard in step 3, try unmounting everything except sdcard in twrp. Then give it a try again. It will work I think :)
[Sony Xperia S, Acro S, Ion] zhackary:
It's work. Thnx you are life saver :)
[Sony Xperia S, Acro S, Ion] vishals16:
This is when the phone is on. When you connect the phone in twrp, it will show as android adb interface like in the picture. If it doesn't, adb drivers are creating problem. As soon as you connect the phone in twrp, an unknown device will pop up in device manager. Download the usb driver from this link http://developer.android.com/sdk/win-usb.html#download

Extract this zip and install that driver manually selecting have disc and providing this folder's location. Then connect the phone while in twrp. Check if it shows in adb devices. Hope this helps. Good Luck :)
[Sony Xperia S, Acro S, Ion] PunchUp:
He didn't get “unknown device”... That's the problem