yashsingh1/xdaforums huggingface dataset:
[Sony Xperia T, TL, TX, V] maystar:
Resize data partition

Wow, so much data space on the device is a real improvement. I also switched to f2fs.

I used the latest recovery. One time the adb connection was not possible, but after replugging the USB cable everything works well. I logged the steps I've done. Perhaps you can use it.

- Copy all important files from internal storage to the external sdcard.
# rsync -P -a /sdcard /ext_card/sdcard0/
- Do a backup in TWRP, with external storage set as backup location.
- Disable MTP from mount menu to avoid error messages.
- Then follow steps 8-14 from the guide http://xdaforums.com/showthread.php?t=2712253. These are the commands I fired in the adb shell:

# mount # just to see what's mounted where
# umount /sdcard
# umount /and-sec
# umount /data
# parted /dev/block/mmcblk0
(parted) print
Model: MMC M8G2FB (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 131kB 2228kB 2097kB TA
2 2228kB 3801kB 1573kB Boot
3 3801kB 5374kB 1573kB Boot2
4 6291kB 27.3MB 21.0MB Kernel
5 27.3MB 28.3MB 1049kB TZ
6 29.4MB 32.5MB 3146kB modemst1
7 33.6MB 36.7MB 3146kB modemst2
8 37.7MB 40.9MB 3146kB fsg
9 40.9MB 46.1MB 5243kB ramdump
10 46.1MB 54.5MB 8389kB ext4 apps_log
11 54.5MB 71.3MB 16.8MB FOTAKernel
12 71.3MB 1359MB 1288MB ext4 System
13 1359MB 1621MB 262MB Cache
14 1621MB 3769MB 2147MB ext4 Userdata
15 3769MB 7818MB 4050MB ext4 SDCard

(parted) rm 14
(parted) rm 15
(parted) mkpartfs logical ext2 1621 4419 ## 2798MB data partition, change value 4419 here and in next step for different sizes
(parted) name 14 Userdata
(parted) mkpartfs logical ext2 4419 7818 ## 3399MB internal storage
(parted) name 15 SDCard
(parted) quit

- Enter the storage menu in recovery and check data partition.
- Tap "FS Options" and "Change FS" to whatever file system you've been using before or want to use now. (F2FS)
- Disable MTP from mount menu.
- Do the same for SDCARD (it's not called internal storage here)

Just to switch to f2fs the other partitions
-- In wipe menu: "System", then tap "FS Options" and "Change FS"
-- Select "F2FS", then swipe to apply the change
-- Do the same for the "Cache" partition
-- Navigate to TWRP Settings and check "Use rm -rf instead of formatting"

- Restore your backup
- Restore backed-up files.
# cp -a /external_sd/sdcard0/* /sdcard/
- Reboot
- Fixing internal storage permissions (this can probably skipped if tar is used for backing up sdcard content instead of rsync/cp)
# chmod 777 /mnt/media_rw/sdcard0
# chown 1023:1023 /mnt/media_rw/sdcard0
# chown -R 1023:1023 /mnt/media_rw/sdcard0

Just another question: Is F2FS supported as file system for the external card, too?
[Sony Xperia T, TL, TX, V] WhiteNeo:
Wow, thanks a lot for this useful log! :)

Maybe we can create a simple (perhaps even flashable) shell script for recovery to apply these steps automatically. I will surely look into this! :good:

And yeah, the ext card is supported, too. Been using this setup for half a year now, no issues so far. :)
[Sony Xperia T, TL, TX, V] mirhl:
You may want to check this, which is the same thing with parted for galaxy s2
[Sony Xperia T, TL, TX, V] mjoyshuvo:
flashing boot.img

I didn't understand ,

Do I have to flash boot.img

if I want to switch to CM12 neo's Homebuilds or Pacman Rom from CM12 nightly ?

Sorry for posting same type of post because it seems to be complex for me :/
[Sony Xperia T, TL, TX, V] WhiteNeo:
Looks good! I'll have a look this weekend. :good:

The recovery included in your current ROM will not allow you to install my CM12.1 due to signature issues, so yes, so flash the boot.img before installation. :)

To so so, use the "Fastboot" mode in Flashtool and plug your phone to pc with volume up key pressed. :)
[Sony Xperia T, TL, TX, V] stanley321:
Yes please! I have been waiting for an easy way for repartitioning!
[Sony Xperia T, TL, TX, V] mirhl:
If any, that will just be a one-tool-has-to-fit-everyone solution (inb4 people asking for every shadow of gray from -1GB to +10GB)

I mean, it's not like current procedure is rocket science.
[Sony Xperia T, TL, TX, V] Pitagoras2000:
[MENTION=5122093]WhiteNeo[/MENTION], can you create a kernel with the edited ramdisk so that the system has seen a memory card as an internal memory? Or you know any other way to replace them? :)
[Sony Xperia T, TL, TX, V] WhiteNeo:
framework-res would also have to be edited on every ROM update. But yeah, should be possible in theory. :)
[Sony Xperia T, TL, TX, V] Pitagoras2000:
The perfect combination would be 5 GB partition DATA, micro sd as internal memory and 1GB SDCard partition (physical internal memory, but seen as a system as external) over the SWAP file.

The creation of relevant partitions do not have a problem only with the swap internal-external memory. I was looking at XDA, but I have not found how to do it in Lollipop. Editing framework-res on every update is no problem for me :)
[Sony Xperia T, TL, TX, V] WhiteNeo:
Actually I could probably also teach you how to unpack the kernel and edit the necessary file yourself. :)

Just don't have my computer around right now. :D
[Sony Xperia T, TL, TX, V] Pitagoras2000:
Very willingly. :D I tried to extract your kernel yourself, but every time I received the error "Android Magic is not found"
[Sony Xperia T, TL, TX, V] bonatus:
blackscreen Error

Hi,

i have installed the ROM. Its my first custom rom for the Xperia V. In the whole it works fine. Thanks for your work white neo.

I have one problem: Sometimes there is a blackscreen - nothing woks. Only a hard reset (remove and insert battery) can fix this problem.

I think there is a problem with the alarm clock function. No alarm = no problem. I have define an alarm i get a blackscreen after some hours.

Can someone help me?
[Sony Xperia T, TL, TX, V] draganz:
Wipe system/data/dalvic-cache/cache and reflash this ROM again. We haven't faced any blackscreen problem in latest build. I mean CM12.1 not CM12.
[Sony Xperia T, TL, TX, V] WhiteNeo:
My method requires a linux virtual machine and some advanced know-how to work properly. However, I think I remember [MENTION=2328357]colonel_lp[/MENTION] has a nice script that un- and repacks the boot.img automatically. Maybe he's willing to share it if you ask him.

Until then, have a look at this link: http://xdaforums.com/showthread.php?t=1477845

To enable reverse mount, you'd have to change fstab.qcom to make it look like this:

/devices/platform/msm_sdcc.3/mmc_host/mmc* auto auto defaults voldmanaged=sdcard0:auto,nonremovable,noemulatedsd
/devices/platform/msm_sdcc.1/mmc_host/mmc* auto ext4 defaults voldmanaged=sdcard1:15,nonremovable,noemulatedsd
/devices/platform/msm_sdcc.1/mmc_host/mmc* auto f2fs defaults voldmanaged=sdcard1:15,nonremovable,noemulatedsd

That should do.

Then edit storage_list.xml in framework-res/res/xml folder accordingly after decompiling, and you should be good to go.

Never tried this modification myself yet, but the worst thing that could happen is a bootloop, so try and report here! :)
[Sony Xperia T, TL, TX, V] mjoyshuvo:
Can't find Cyanogenmod Update in about phone section. Any Idea where is it ?

Photos of contacts are kind of blurry plus sudden shutdown problem still going on
[Sony Xperia T, TL, TX, V] Pitagoras2000:
Sure! :D I'll call you when I can achieve something.
[Sony Xperia T, TL, TX, V] WhiteNeo:
It is deleted because people kept switching to official builds accidently before. :D

And give me a log of the shutdowns and I'll see what I can do. :)
[Sony Xperia T, TL, TX, V] bonatus:
I have CM12.1 installed - for info.

I tested with new flashed ROM. It does not help. I get a blackscreen. Then i put in the battery the phone starts automaticlly after the blackscreen?

Edit: I restored apps and user data via titanium backup.
[Sony Xperia T, TL, TX, V] MESA:
[MENTION=5122093]WhiteNeo[/MENTION] how is your theme progress going on? Do you have success :)
[Sony Xperia T, TL, TX, V] draganz:
Fresh install means not restore any backups. Do everything from the beginning. Because some data, apps cause malfunction your ROM. :)
[Sony Xperia T, TL, TX, V] bonatus:
Thanks for advice. :o
[Sony Xperia T, TL, TX, V] WhiteNeo:
4 system apps to go and no time left because of my studies. :D

Will aim for a release till christmas. And release a beta someday. :)
[Sony Xperia T, TL, TX, V] mjoyshuvo:
Well , today in the morning the battery was like 50% .

When I was browsing and the battery was like 38% then the screen got black and mobile (tried!) to restart itself few times till I plugged it with my charger.

Then I charged my mobile fully. When the battery was like 70% , I was taking picture then the 2nd shutdown happened while I just finished talking.

When it was at 52% battery level then again the 3rd shutdown happened while I was taking a pic and I could not make my phone ON till I plugged it with charger.

(Don't know if I made the incidents clear or not :( )

Can u help me out here :(
[Sony Xperia T, TL, TX, V] mEh91:
Could someone provide/make a guide how to port the Z4 camera app for this ROM, I did try the guide but all I got was a bootloop.
[Sony Xperia T, TL, TX, V] SSVsSunSt:
CM12.1 has much better battery condition so my guess is that your battery is dying.
[Sony Xperia T, TL, TX, V] mjoyshuvo:
I think battery is fine, and battery life isn't causing the shutdown.

don't know what should I do. I really love this rom but if it goes like this then I may have to switch back to stock rom :(
[Sony Xperia T, TL, TX, V] SSVsSunSt:
And what's the age of your phone?
[Sony Xperia T, TL, TX, V] mjoyshuvo:
1.5 years :rolleyes: and I will definitely try to test with new battery . :)
[Sony Xperia T, TL, TX, V] WhiteNeo:
Been ordering a new battery myself some days ago. Went for an alternative brand instead of getting an "original" one that is actually a cheap copy. :good:

Going to keep you guys updated on the improvements in battery life. :)

My phone's more than two years old, by the way. It was a hard decision to grab a battery instead of a whole new device. :D
[Sony Xperia T, TL, TX, V] SSVsSunSt:
I'm going to get whole new chasis+battery.
[Sony Xperia T, TL, TX, V] mjoyshuvo:
Changed the battery :( But problem is same :(
[Sony Xperia T, TL, TX, V] maystar:
In my opinion there is something broken with the battery calibration in this rom. The average battery life is similar to that on the official cm 11 with my device. But there are sometimes unpredictable situations where the phone shuts down at 15 to 20 % and sometimes I can use it one hour with 1%. There has been some discussion about battery calibration in this thread a while ago. I haven't tried any calibration procedure yet because I have to charge my phone about every 24 hours. So I plug it in the evening when the battery level is mostly more than 20%. And I've always a second emergency battery in my wallet ;).
[Sony Xperia T, TL, TX, V] SSVsSunSt:
[MENTION=5122093]WhiteNeo[/MENTION], the weather in Moscow is finally getting cooler, so it's time to film elevators.... But I don't want to take my camcoder to school, any suggestions, again?
[Sony Xperia T, TL, TX, V] WhiteNeo:
I've had the same shutdowns when on low battery and thought it might be related to my battery getting old. Will dio some testing with my new battery. If the issue persists, it's ROM related and I probably have to rewrite the battery configuration file in framework from scratch.

Hmm. No ideas except for trying a few different camera apps.. :/

You might also decompile the camera app and check for a line in bools.xml that shows disabling video stabilization.
[Sony Xperia T, TL, TX, V] ifilgud:
I wrote some weeks ago about having the same issue with the battery. Mine shuts down between 35-25% usually because suddenly drops to 0%, and android shutdowns itself, and if you connect the charger, it starts charging at 0% up to 100%, but too quickly (it is impossible to charge the battery to 50 or 60% in a few minutes).

It started to happen the day before unlocking the bootloader (I had to send the phone for free to Sony because it came not unlockable), with official ROM, and I've also bought another battery and does exactly the same, and as it doesn't happen with the majority of the users, I blame the phone itself. Somehow the battery reader is faulty.

For that reason (and the lack of Data space) I'm about the buy the new Z5 and leave this one in a drawer just in case we need it, because it works nice :)
[Sony Xperia T, TL, TX, V] SSVsSunSt:
I can't even find bools.XML in it's normal location :/
[Sony Xperia T, TL, TX, V] WhiteNeo:
Third post updated with some instructions on resizing internal storage and data partitions... Could anyone test the steps and verify that they indeed work? :)
[Sony Xperia T, TL, TX, V] ifilgud:
Hi! The steps works correctly, but at some point I had to reboot to recovery in order to proceed. After step 5 I coudn't continue because I had errors with Data partition (it didn't exist or something similar).

You can add that using the "print" command in parted, you can check if you are doing it correctly :), because the command line doesn't output anything and the partition creation takes time.

A couple of improvements to the guide:

You can backup and recover the internal sd with the TWRP integrated File Manager. I didn't have rsync or adb installed in my Windows and I made the backup using the integrated File Manager, and works :)

I already resized the partitions several months ago using the linked guide and this time I wanted to give Data more space, because 3 gb was not enough for me (almost the size you suggested), and I have increased it to 4.5GB, making XXXX value equals 6229. Be careful because this leaves 1.5GB for internal storage and WhatsApp eats a lot xD (I had to clean it up, including hidden DCIM/.thumbnails folder which was eating 1GB).

Thanks for simplifying the steps and customize them for this phone :)
[Sony Xperia T, TL, TX, V] maystar:
I also recommend to use the print command before deleting the partitions in order to check that the actual partitioning is as the expected one. I don't know if there are roms out there which change the partitioning on installation for this phone. I have seen this on my Neo V. In this case you would break the system or at least waste memory. It's better for people to understand what they are doing, too.

I would recommend to be minimal familiar with adb if you are play around with an unofficial custom rom. It's much easier and less error prone to fire the necessary commands with keyboard and and a big screen. Rsync is executed on your device, there is no need for an installation in your PC. As I mentioned before I think it is easier to use tar for backup and restore. This way the ownerships and access permissions of the files are preserved. The FAT filesystem of the external card does not support such unix features.

Backup (Use like this inside android. In the recovery pathes have to be changed):

cd /sdcard
tar -cf /ext_card/sdcard0.tar *

Restore:

cd /sdcard/
tar -xf /external_sd/sdcard0.tar

(Both untested!)

It's possible to use data compression, too, if you have not enough space on your external card.

I think its much more complicated to use a file manager for that instead of typing a single command. Especially if you have to use the command line anyway.
[Sony Xperia T, TL, TX, V] WhiteNeo:
Very helpful, as always. :)

I don't think that it's important to restore the original permissions, because in the last step we're running a recursive "chown" to fix creating new folders on sdcard. However, tar might be useful for people with low space on their external storage. I'll keep it in mind for sure :)

And you're right about the "print" command. Should definitely include it, even if I'm pretty sure that all of our phones have the same partition layout. :)

It's simply important to understand the following steps. :good:
[Sony Xperia T, TL, TX, V] ifilgud:
Yes I also forgot about the permissions, but it is true that you are forcing them at the end.

I tried to run rsync from the terminal console and it didn't exist, that is the reason for my comment about that. For sure the best option is the tar instead of copying. And for anyone without Android SDK, it is good to know that they can do everything from recovery.
[Sony Xperia T, TL, TX, V] WhiteNeo:
Then we gotta figure out how to rewrite the tar commands to be used from recovery. I don't really want to force people to quit terminal and select a different starting folder for backup/restore. :D
[Sony Xperia T, TL, TX, V] maystar:
Is it impossible that the system or any app uses different file permission and ownerchips than the ones which are set in set last step? I'm not so familiar with the android file system. For a Linux user this looks like a really dirty hack ;).

And btw: Why do you use this two command?

chown 1023:1023 /mnt/media_rw/sdcard0
chown -R 1023:1023 /mnt/media_rw/sdcard0

The second should include also the the first? ! And is there also any reason why not the path /sdcard is used? It's the same for recovery and android.

I did the rsync backup while running android because it took so long and I don't want my phone be so long offline ;). But of course you could also use a cp -a command inside the recovery. Tar commands should look like this (still untested):

tar cf /external_sd/sdcard.tar /sdcard

and

tar xf /external_sd/sdcard.tar C /
[Sony Xperia T, TL, TX, V] WhiteNeo:
It's not too dirty, because owner has to be 1023 or the files are not readable, and the chmod is not recursive. :)

The first command is mentioned because the second one failed with "permission denied" when I tried it while being victim of the dreaded "sd issue" :D

/sdcard is just a symlink managed by the Android system. The real mount point is /mnt/media_rw/sdcard0 :)

These commands look nice. Gonna add those to the guide. If anyone has issues, I'm sure we'll hear about that within a few weeks :D
[Sony Xperia T, TL, TX, V] rakeen07:
Hi there Neo. Thanks for this awesome Rom paired with your Kernel... I have just one kinda big issue. The Rom works fine except for the fact that my power button stops working suddenly from a few days. Initially I thought this was a hardawre issue but I reinstalled the kernel and it was fixed. Everything was smooth for the next 3 or 4 days but now the same problem has occurred. Please suggest me something. Furthermore I cant turn my phone on. Thanks in advance.
[Sony Xperia T, TL, TX, V] WhiteNeo:
Hmm. I need a log when pressing the power button while it doesnt work. :o
[Sony Xperia T, TL, TX, V] rakeen07:
I used 'adb shell logcat> log.txt' command to produe a log file... The last few lines are as follows:

I/sysmon-cpu_frequency( 282): execute_action - cpu frequency mitigation requester = xo_therm freq = 1512000

I/sysmon-cpu_frequency( 282): Setting CPU[0] to 1512000 kHz

I/sysmon-cpu_frequency( 282): CPU[0] frequency limited to 1512000 kHz

I/sysmon-cpu_frequency( 282): Setting CPU[1] to 1512000 kHz

I/sysmon-cpu_frequency( 282): CPU[1] frequency limited to 1512000 kHz

I/sysmon-cpu_frequency( 282): log_idd - Thermal mitigation:sensor = xo_therm from level = 7 to 8

E/idd-api ( 282): idd_add_event: send failed, socket 29, errcode -2 (No such file or directory)

I/sysmon-charge_current_limit( 282): set_charge_current_level - Set OK Charge Current limit:level 0

I/sysmon-charge_current_limit( 282): log_idd - Thermal mitigation:sensor = xo_therm from level = 7 to 8

E/idd-api ( 282): idd_add_event: send failed, socket 29, errcode -2 (No such file or directory)

I/sysmon-usb_current_limit( 282): set_usb_current_level - Set OK USB Current limit: 900mA

I/sysmon-usb_current_limit( 282): log_idd - Thermal mitigation:sensor = xo_therm from level = 7 to 8

E/idd-api ( 282): idd_add_event: send failed, socket 29, errcode -2 (No such file or directory)

I/sysmon-modem( 282): execute_action - modem mitigation requester = xo_therm

I/sysmon-modem( 282): Modem already at mitigation state 0

I/sysmon-modem( 282): log_idd - Thermal mitigation:sensor = xo_therm from level = 7 to 8

E/idd-api ( 282): idd_add_event: send failed, socket 29, errcode -2 (No such file or directory)
[Sony Xperia T, TL, TX, V] ksuuk:
Can someone provide me the original gps.conf, as I may have messed it up. GPS signal is fine according to the inViu GPS, but when driving Waze hangs and looses even speedometer.
[Sony Xperia T, TL, TX, V] joelfloresa:
Here you go!!

I hope this file can help you
[Sony Xperia T, TL, TX, V] mjoyshuvo:
Marshmallow

Will Xperia V get Marshmallow Update from CyanogenMod .
[Sony Xperia T, TL, TX, V] WhiteNeo:
Trying my best, but there's plenty of work to dio and my time is very limited. :)

By the way, CyanogenMod already stopped supporting our phones. So I am pretty alone with all the development work. :o
[Sony Xperia T, TL, TX, V] Sagenut:
I think that Your Lollipop Rom is pretty stable and mature for daily use. Every improvement and bug fix is welcome but I could understand if You, like CyanogenMod, would consider this project near to be defined complete.

A Marshmallow ROM of the same quality would be Wonderful.............Hoping that slowly You will find the time and the help needed to do the Thing.
[Sony Xperia T, TL, TX, V] Aria.A97:
[MENTION=5122093]WhiteNeo[/MENTION] well, Lollipop is beautiful, but it's nowhere as snappy as KitKat.

However every feature of Marshmallow can be achived in Lollipop/Kitkat with Xposed and some apps. Even something like Doze! I lose 1% per night with your homebuild.

If you can't build any stable Marshmallow ROM, my suggestion is building a KitKat MIUI ROM based on optimized CM 11 :) (If you have free time of course :D )

With that we can still have a beautiful device with better performance.

By the way, forget about MIUI beauty, if there was an updated optimized CM 11 ROM with latest security patches (stagefright,etc) and your kernel features (latest CAF sources, Faux Sound, underclock) I could easily farewell Lollipop and go for KitKat.
[Sony Xperia T, TL, TX, V] mjoyshuvo:
Hmm. Sony stopped supporting, CyanogenMod stopped supporting .

At least you are trying. Best of luck . :good:
[Sony Xperia T, TL, TX, V] armanote:
Cansome one give me a working twrp recovery for rom
[Sony Xperia T, TL, TX, V] colonel_lp:
Oh yeah! Thanks.. Tried cm file explorer and its fine. Es file explorer with root privileges doesn't... Strange...
[Sony Xperia T, TL, TX, V] TodorSRB:
I haven't had this issue before, so maybe it takes some calibration for Lollipop or maybe I somehow messed it up with my own build of CM12 :D
[Sony Xperia T, TL, TX, V] WhiteNeo:
Just a little information on the next build. :)

I have managed to compile the whole rom with O3 flags - the highest optimization level for Android. That means, it will be even smoother than previous versions.

Also, I have added overclocking up to 1620MHz, as well as a nice user-customizable undervolting interface (but didn't touch the default voltages, so people don't run into issues)

In addition, AOSP has been updated to 5.0.2, an update that is said to be a "performance update" ..

Well, I'll keep testing, but if the rom runs smooth for the next one or two days, I'll release a new build. :good:
[Sony Xperia T, TL, TX, V] Shady_BlackSn0w:
Any overheat ??
[Sony Xperia T, TL, TX, V] WhiteNeo:
Maybe while gaming with with default voltages and overclock, but if you take the time and configure the voltage levels for your device, there shouldn't be a problem. :good:
[Sony Xperia T, TL, TX, V] Aria.A97:
Very impressive news. Can't wait.

Then you're one of lucky guys. I have this problem since early KitKat releases :D
[Sony Xperia T, TL, TX, V] colonel_lp:
It's def not battery, I have a brand new sony one and it jumps down % wise on reboot, then takes ages to drain. My new and old battery did it on kk.
[Sony Xperia T, TL, TX, V] finac94:
Does that mean that the next update you give us is also gonna be 5.0.2?? :fingers-crossed:
[Sony Xperia T, TL, TX, V] WhiteNeo:
Exactly. :)