yashsingh1/xdaforums huggingface dataset:
[Sony Xperia T, TL, TX, V] Antiga Prime:
In spite of this being asked so many times, here it goes again. Default user/group for Sony devices is 2800, so unless you're using a modified Kernel/ramdisk specifying a different user/group, nothing will have access of the permissions are set to 755. 777 means that every user/group can have access, but once you reboot, and the ramdisk is loaded, it'll mount with default permissions again (755).

So either you correct the ownership:

su
chown -R 2800:2800 /mnt/media_rw/sdcard0

Or modify your kernel ramdisk so that it has this line in the corresponding init file:

service fuse_sdcard0 /system/bin/sdcard -u [B]1023 [/B]-g [B]1023 [/B]-d /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
disabled

But if the user/group doesn't match what's in the ramdisk, you'll always have that error.
[Sony Xperia T, TL, TX, V] romcio47:
A few things were missing in my knowledge. I didn't think about the kernel ramdisk loading a group.

Modifying a kernel might be a good idea but first, I don't know how to do it and second, flashing new nightly build would obviously flash a new kernel again...

Well it seems we'll just have to wait for the correct patches to be made to the kernel, it was ok about week ago.
[Sony Xperia T, TL, TX, V] Antiga Prime:
Or you could just as easily use a root explorer and check the init files at / (root directory) to see what user/group it's using. On my TX on CM12 it's in the "init.sony.rc" file. On a Stock ROM it's in the "init.qcom.rc" file.

Once you find it just run a recursive chown command on /mnt/media_rw/sdcard0, as stated above, to match what's in the file.
[Sony Xperia T, TL, TX, V] bloot:
As the mate said, this will reproduce again when flashing new nightlies, unless the root cause is fully fixed. My fix and yours, is just a temporary solution. Yours is more correct thought.
[Sony Xperia T, TL, TX, V] Antiga Prime:
I wouldn't know, but I seriously doubt CM is changing the user/group on every nightly. Just run the chown command to whatever is in the kernel and it will be a permanent solution. If they are, then you just run the command once after flashing and end of story, it won't change after reboot.
[Sony Xperia T, TL, TX, V] bloot:
I ran the chown command as you suggested, and it worked fine until I rebooted the device, once again no write permission to sdcard0 on boot, so I guess it's something to be adressed by the Cyanogenmod team. Or maybe it's my fault and has nothing to do with the rom, I just flashed cyano boot.img then booted to recovery and flashed the nightly (wiped factory reset and cache), coming from a 4.3 stock Sony ROM.

Tried several times and this bug is always present (have not tried older nightlies, but another user says it didn't happen before).

This is what I get on every full boot:

root@mint:/ # ls -lia /mnt/media_rw/
2 drwxr-xr-x media_rw media_rw 2015-02-22 23:26 sdcard0
1 drwxrwx--- media_rw media_rw 1970-01-01 01:00 sdcard1
6669 drwx------ media_rw media_rw 1970-04-20 11:21 usbdisk

After chowning it:

root@mint:/ # chown -R 2800:2800 /mnt/media_rw/sdcard0
root@mint:/ # ls -lia /mnt/media_rw/
2 drwxr-xr-x 2800 2800 2015-02-22 23:26 sdcard0
1 drwxrwx--- media_rw media_rw 1970-01-01 01:00 sdcard1
6669 drwx------ media_rw media_rw 1970-04-20 11:21 usbdisk
[Sony Xperia T, TL, TX, V] Antiga Prime:
Well, if I were you I'd check the init files with a root explorer like I said earlier; also, permissions should be 770, not 755:

su
chmod 0770 /mnt/media_rw/sdcard0
[Sony Xperia T, TL, TX, V] bloot:
Persmissions are 755 inside my init.sony.rc (attached)

There's also a line

service fuse_sdcard0 /system/bin/sdcard -u 2800 -g 2800 -w 2800 /mnt/media_rw/sdcard0 /storage/sdcard0

That obviously isn't doing what it should. Maybe the problem comes from the fuse service after all, but frankly I am lost. There's no problem with the sdcard1 though.
[Sony Xperia T, TL, TX, V] Antiga Prime:
Well maybe you should check permissions on /storage/sdcard0 too; maybe you changed them accidentally. On mine it belongs to root/sdcard_rw, and permissions are 0775.

Then you could also try flashing again, but wiping /system before flashing (I highly recommend this), since I don't see anything in the ROM that might cause your problem. When you reboot the phone, do the permissions change back to 1023 (media_rw)?
[Sony Xperia T, TL, TX, V] bloot:
Yes, If I chown the sdcard to the 2800 group it changes back to 1023 media_rw after rebooting. I've even flashed the rom with other custom recoverys like philz and twrp (cyano's one doesn't have the option to wipe system alone), same results. Should I format factory reset and wipe sdcard too when in a Sony stock rom? I did resized the sdcard following this howto http://xdaforums.com/showthread.php?t=2712253, but the permissions problem already happened before I did it.

If I was the only one with this problem it would be practically for sure it was my fault but I see other people does have this problem too, that's weird. I think I'll wait for new releases or try other compilations or even my own's.
[Sony Xperia T, TL, TX, V] bloot:
OK I seem to have found the root cause, it's cyano's boot.img the culprit. I compiled my own nightly and had the same problem, tried to flash neo's hombebuild boot.img after flashing the nightly and works like a charm. I guess permissions are not correct in the original kernel supplied by CM. Will see if I can find how to fix it
[Sony Xperia T, TL, TX, V] Antiga Prime:
You don't have to format your sdcard when changing ROMs, and technically you don't have to wipe /system either, since most updater-scripts do that for you, but I've found that it's always best to wipe the /system partition and start fresh, and you know that there is nothing left behind.

But clearly something is changing your ownership on boot, so it's either an app you've installed, or some script you might be running, or some type of mod, because I can't find anything in the ramdisk or ROM that would do that, so it's clearly not a kernel/ROM problem. It's a piece of cake to fix that on boot with an init.d script or Smanager, so you don't have to do it manually each time you reboot, but that wouldn't solve the problem because you don't know what is causing it.
[Sony Xperia T, TL, TX, V] bloot:
FIrstly, many thanks for your time and help. I have verified it's stock cyano boot.img what causes the permissions problem, because it doesn't happen with neo's one. As a workaraound, I am flashing neo's boot.img after flashing a nightly and the problem is now gone.

I'd like to keep cyano's stock kernel and will try to find how to fix it though.
[Sony Xperia T, TL, TX, V] bloot:
I think neo's boot.img is a workaraound I cannot keep using anymore because I didn't notice it breaks my wi-fi on cyano offical nightlies (and I preffer to use official CM Kernel by the way). I've found a recent commit that i've reverted and am compilng right now, will tell how it goes.

https://github.com/CyanogenMod/android_system_vold/commit/f9efab5efd6dffd58eeef09c6ddcb57dafb3b0a2
[Sony Xperia T, TL, TX, V] bloot:
Reverting the commit didn't do the trick, surprisingly enough what did work was changing the fuse_sdcard0 service from

service fuse_sdcard0 /system/bin/sdcard -u 2800 -g 2800 -w 2800 /mnt/media_rw/sdcard0 /storage/sdcard0

to

service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sdcard0 /storage/sdcard0

I made the changes permament by editing the file located in /device/sony/blue-common/rootdir/init.sony.rc in the build environment, so I can forget about it forever, just compile the rom myself.

I decided to try to copy the sdcard1 line because it didn't cause writing problems with the microsd. I don't know if this will cause any other unexpected problems, maybe apps unable to write to sdcard0, I will find out but for now I think It's finally solved. It's strange why Sony decided to mess around with permissions creating an unstandard permission group like the 2800.
[Sony Xperia T, TL, TX, V] Antiga Prime:
What you did is fine and never caused issues for me at least; I did that with every kernel a few months back to use FolderMount before Smanager was updated. Don't know why Sony did that, but it's easier to just unpack and modify the kernel ramdisk, then to compile the entire ROM, IMO anyway; doesn't take more than 10 minutes.
[Sony Xperia T, TL, TX, V] bloot:
You're right it's easier that way but once I downloaded cyano repo I couldn't help introducing my own changes, it reminds me the i9300 times (where codeworks also was the maintainer), although the permissions thing was my fix priority of course.

I've been testing a lot and couldn't find any problem with my apps, I can forget about the permissions nightmare at last. Thanks again mate.
[Sony Xperia T, TL, TX, V] codeworkx:
I've merged the changes a few minutes ago.

We've used 2800 to be compatible to stock sony rom and to make it as easy as possible for users to jump from stock to cm and back.

But since https://github.com/CyanogenMod/android_system_vold/commit/f9efab5efd6dffd58eeef09c6ddcb57dafb3b0a2 got merged, vold fixes the ownership of ext4 formated sdcards which hardly conflicts with our stuff.
[Sony Xperia T, TL, TX, V] rg1994:
Guys on the last nightly (20150224) you cant't install or unninstall apps. How can i solve this problem?
[Sony Xperia T, TL, TX, V] codeworkx:
Wait for 20150225.
[Sony Xperia T, TL, TX, V] rg1994:
I installed it (wiping only cache and dalvik) and nothing seems to change. I cannot yet install/unninstall/download/etc to sdcard0.
[Sony Xperia T, TL, TX, V] codeworkx:
adb root

adb shell

ls -la -r /storage/sdcard0

Copy output to pastebin.com and post link here.
[Sony Xperia T, TL, TX, V] rg1994:
I'm so sorry to tell you that, because of that problem, i couldn't wait so i had to wipe data/chache/dalvik and install the cm12 version of 2015/02/08. If you have some upgrades about this issue i would be pleased if you could post them :). Thank you so much for your replies.
[Sony Xperia T, TL, TX, V] romcio47:
I can report such problem too but it's getting more interesting when Chrome shows "no SD card" while I'm trying to download anything. The sdcard0 problems are getting more complex, I see...

I'm not able to use adb on my computer and also I tried executing codeworkx's command in Terminal Emulator but it fails, showing that -r is unknown command...
[Sony Xperia T, TL, TX, V] codeworkx:
ls -la -R /storage/sdcard0
[Sony Xperia T, TL, TX, V] romcio47:
Here you go:

http://pastebin.com/SeEhdmM2
[Sony Xperia T, TL, TX, V] codeworkx:
Owner of all folders is root. Seems to be wrong.

chown -R 1023 /storage/sdcard0

chgrp -R 1023 /storage/sdcard0
[Sony Xperia T, TL, TX, V] codeworkx:
I'll upload little update.zip's later today for fixing owner/groups.

One for: Stock -> CM

And one for: CM -> Stock
[Sony Xperia T, TL, TX, V] Antiga Prime:
I've previously checked two Ts and my TX; they all have root/sdcard_rw as user/group for /storage/sdcard0, and work fine. Are you sure those permissions are wrong? Or did CM do any changed that would affect that?

Correct me if I'm wrong, but AFAIK, shouldn't those permissions be applied to /mnt/media_rw/sdcard0 where the actual sdcard is mounted?
[Sony Xperia T, TL, TX, V] romcio47:
You're right!

I've applied both commands not to /storage/sdcard0/ but to /mnt/media_rw/sdcard0/ instead and I can download files, do screenshots again, the card is fully accessible again!
[Sony Xperia T, TL, TX, V] codeworkx:
Found the issue: https://github.com/CyanogenMod/andr...mmit/d13a54b7ec4d4f45a5733db943e4b6dd293607e4

Next nightly should work fine if you're using the builtin Cyanogen Recovery.

Dunno about other recoveries.

Manual way for Cyanogen Recovery:

From stock rom to CM:

Connect device via usb to computer

Select "Apply Update" on device

Select "Choose from sdcard0" on device

Run "adb shell" on computer

Run following commands on terminal:

chown root:1023 /storage/sdcard0
find /storage/sdcard0 -user 2800 -exec chown 1023:1023 {} \;

Select "../" on device

From CM to stock rom:

Connect device via usb to computer

Select "Apply Update" on device

Select "Choose from sdcard0" on device

Run "adb shell" on computer

Run following commands on terminal:

chown root:2800 /storage/sdcard0
find /storage/sdcard0 -user 1023 -exec chown 2800:2800 {} \;

Select "../" on device
[Sony Xperia T, TL, TX, V] Antiga Prime:
That has been there for a while, but I didn't mention that because I was under the impression that it was only run once when flashing the ROM:

package_extract_file("system/bin/fix_storage_permissions.sh", "/tmp/fix_storage_permissions.sh");
set_metadata("/tmp/fix_storage_permissions.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/fix_storage_permissions.sh");

So once the user corrects ownership after a flashing, how does the ownership get reverted again (as in this case)?

Or do shell scripts placed in /system/bin run automatically on boot?
[Sony Xperia T, TL, TX, V] codeworkx:
1st problem:

The script never did something on cm12 because of the wrong path.

2nd issue:

Vold changes permissions of your sdcard root to 1023 on every boot since 12 days.
[Sony Xperia T, TL, TX, V] bloot:
That's the key of it all, that's why I couldn't write to my sdcard from day 0, becasue the first nightly I tried already included it (have the lt30p for a week) and also needed to change the fuse mount to 1023.

And that's why some users couldn't write since some past nightlies too (the ones who updated).

Thanks codeworkx for fixing it up.
[Sony Xperia T, TL, TX, V] Antiga Prime:
Yes, because once you do that, the user/group matches the user/group being set on boot, whatever it is that is causing that, given that in the kernel it clearly specifies user/group 2800.

Still trying to figure out what it is, since on other builds/ROMs you can use your SDcard perfectly while it's owned by user/group 2800, and only have to change ownership on a modified kernel.

Nevermind the above
[Sony Xperia T, TL, TX, V] pornoeule:
the problem is every version after 23.02 cant save pictures on lt30
[Sony Xperia T, TL, TX, V] romcio47:
26.02 - finally the problem is solved!
[Sony Xperia T, TL, TX, V] pornoeule:
No.i have tested last night but the same.only when i go back to 23.02 i have no problems
[Sony Xperia T, TL, TX, V] codeworkx:
0227 should be fine
[Sony Xperia T, TL, TX, V] pornoeule:
0227 same Problem :(
[Sony Xperia T, TL, TX, V] nikolaprikola:
Xperia TX

Does anyone know if this rom will work on Xperia Tx as well? They are basically the same.Thanks :)
[Sony Xperia T, TL, TX, V] deywid12345:
It won't. Xperia TX =/= Xperia T.
[Sony Xperia T, TL, TX, V] codeworkx:
Noticed.

Found another problem introduced with cm12.

Currently testing a patch: http://review.cyanogenmod.org/#/c/90032/

If it works i'll upload a build for you.
[Sony Xperia T, TL, TX, V] pornoeule:
Thanks
[Sony Xperia T, TL, TX, V] codeworkx:
- Download fix_storage_permissions.sh - 498 bytes

- Boot into recovery

- Connect phone to computer via usb

- Run following commands on computer:

adb push fix_storage_permissions.sh /tmp
adb shell

- Then run the following commands on shell:

chmod +x /tmp/fix_storage_permissions.sh
/tmp/fix_storage_permissions.sh
reboot

Or wait for next nightly build. ;)

EDIT: I HATE THAT DAMN CYANOGEN RECOVERY!
[Sony Xperia T, TL, TX, V] LawLawL:
Or try this ( it worked fine for me):

-boot your phone

-connect it to your pc

-use adb on your pc:

-adb root

-adb shell

-chown -R 1023 /mnt/media_rw/sdcard0

-chgrp -R 1023 /mnt/media_rw/sdcard0

-reboot

-tadaaaaaaaaaaaaaaaaaaam

Hope I help :D

---------- Post added at 11:33 PM ---------- Previous post was at 11:06 PM ----------

I also have tried to modify the codeworkx's .sh but I cannot post it x)

I just changed "/storage/sdcard0" to "/mnt/media_rw/sdcard0"
[Sony Xperia T, TL, TX, V] deywid12345:
If you guys are having issues with internal memory (no permissions) then you should study this, I had this problem too.

http://xdaforums.com/showthread.php?t=2794704
[Sony Xperia T, TL, TX, V] tkr_X10:
With the nightly build 20150227 i also had no access to the internal storage. I tried the solution from the link above but without success. Then i connect the phone to my computer and tried to write a file on the internal storage of the phone and to my surprise it worked. So i download the 20150282 nightly build and copied it to my phone. After that i reboot into recovery and install this build. But still no access to the internal storage of the phone.

---------- Post added at 03:59 PM ---------- Previous post was at 03:40 PM ----------

I followed the instructions from LawLawL and now it works. Have i to do this after every update? What about if i want to go back to CM11 or stock?
[Kindle Fire HDX 7" & 8.9" Q&A, Help & Troubleshoot] :
Q&A for [KERNEL] CM11 OC KERNEL (Thor)

Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.

Before posting, please use the forum search and read through the discussion thread for [KERNEL] CM11 OC KERNEL (Thor). If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.

Thanks for understanding and for helping to keep XDA neat and tidy! :)
[Kindle Fire HDX 7" & 8.9" Q&A, Help & Troubleshoot] dr3yec:
Love it , just waiting for BT to work and then this ROM stays on permanent. :)
[Kindle Fire HDX 7" & 8.9" Q&A, Help & Troubleshoot] openWeb74:
I would really like undervolting etc. more than overclocking as i dont need a gaming device... Instead it would be great to have something that lasts very long in battery...
[Streak 5 General] hunderteins:
Hello,

this is openssl-1.0.1l for DSC like ROMs because of http://openssl.org/news/secadv_20150108.txt

Again with a patch against core.jar to support SSL_MODE_HANDSHAKE_CUTTHROUGH, because TLS_FALLBACK_SCSV took it's number.

Have fun,

hunderteins
[LG G Watch R] QA Bot:
Q&A for [Root] Root and TWRP for R

Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.

Before posting, please use the forum search and read through the discussion thread for [Root] Root and TWRP for R. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.

Thanks for understanding and for helping to keep XDA neat and tidy! :)
[LG G Watch R] deadwood83:
I couldn't get TWRP to stick even with a custom kernel. When I executed a fastboot command to boot from the TWRP image it said that the image is corrupted and not bootable. Tried redownloading ~4 times all with the same error. On latest OTA update for LGGWR.
[LG G Watch R] Erendal:
Hi,

when launch SuperSU appear this error:

"about"
[LG G Watch R] Laucien:
Ok this might sound like a stupid question but I just had some problems installing TWRP + rooting and now that everything seems to be working fine I want to check that root is actually working so... is there any way to do that? How can I check that su access is available?.
[LG G Watch R] Dito13:
good question.

I have another problem: I unlocked the bootloader, flashed TWRP but then I can't push Supersu to the watch in the bootloader mode, because the device can't be found (adb devices).

When I try to check if TWRP is on the watch and I say "adb reboot recovery" I only see the original recovery although the flashing of TWRP ran smoothly.

Can anyone help me?

Thanks in advance!!

---------- Post added at 09:57 AM ---------- Previous post was at 09:18 AM ----------

OK, sorry - It's me again.

I made the mistake that I didn't put the twrp.img into the fastboot folder

although adb always replied that the flashing was successfull.

Anyway - twrp is now installed but I had the same issue as mentioned above: Supersu can't be pushed because there is no device to be found. Then I went into twrp which prompted me that the device doesn't seem to be rooted and I affirmed to install supersu. Now when I am back into the normal mode of the watch supersu pops up but can't be installed because it crashes everytime.

---------- Post added at 10:26 AM ---------- Previous post was at 09:57 AM ----------

I flashed Supersu 2.46 by the way
[LG G Watch R] qubin:
Hey Kreiger1981,

I had also a lot of problems with rooting the watch., but finally it's working now using the steps described in this thread and WinDroid.

But I had to disconnect the usb wire multiple times in some steps. Than WinDroid received the signal from the watch and triggered e.g. the installation of TWRP.

Hope this helps a bit.
[LG G Watch R] ejl2002:
I also have the same issue with su not installing with the wintool (no adb drivers). Also getting the force close of su after restarting watch like the others have mentioned here. I wanted to install the wifi mod also, can't figure that out either. not to familure with adb, and was hoping the wintool would install it to the phone. No luck so far. Any suggestions would be appreciated.

Thanks.
[LG G Watch R] qubin:
I've done this multiple times and sometimes the behaviour is a little bit strange but in the end these are my steps to flash the watch

(I'm flashing everything, so be aware that every data from the watch will be deleted ;)

1. Watch is on and home screen is visible

1. a) adb push supersu.zip /sdcard/

1.b) adb push lenok_wifi_zip-02.zip /sdcard/

2. adb reboot-bootloader

3. Check "fastboot devices" if device is available, if not, unplug cable and reconnect it (I have to do it everytime for fastboot!)

4. fastboot flash boot boot_gwr_5.1.1.img

5. fastboot flash system system_gwr_5.1.1.img

6.a) fastboot flash recovery recovery.img

6.b) fastboot flash recovery twrp-2.8.6.0-lenok.img

-> this is strange for me: If I only flash twrp, then twrp will not be started. If the original recovery.img is flashed before, then it's working!

7.) In twrp install supersu.zip

8) in twrp install lenok_wifi_zip-02.zip

Hope this helps a bit :)
[LG G Watch R] ejl2002:
Thanks for your help, I finally figured out how to use adb, and I was able to push the superuser file and wifi zip. All is working well, thanks again.
[LG G Watch R] zombie_ste:
fastboot not finding my watch

hi all, i am trying to unlock my g watch r and install twrp the problem i have is after i reboot into fastboot, fast boot cannot find my device, it still shows in my computers device manager list as a android bootloader interface but fast boot commands all just say waiting for device, i have tried every driver i can find and have made no progress, i have also tried a factory reset and still nothing.

any ideas ?
[LG G Watch R] Kenjari:
I DL the twrp on post 1 and I got the twrp...but it has ext img.dmg. .... Not sure how to convert to img only? I tried flashing it and it gave me an error.

---------- Post added at 03:11 PM ---------- Previous post was at 02:31 PM ----------

I managed to get the right img. file....however I can't get this flashed at all. Tried changing the name...I made sure the "img" wasnt duplicated. But I keep getting and "error cannot load". BY THE WAY...I'M USING A MAC!!!DONT KNOW IF THAT MAKES A DIFFERENCE

Please help....TIA

---------- Post added at 03:28 PM ---------- Previous post was at 03:11 PM ----------

I'm curious...since I can't get Twrp to flash..... do i have to use a custom recovery to flash the su? I can get into stock recovery....can i install the su via adb in stock recovery?

Okay...with a little surfing on the information highway and making some connections....I figured out how to do use this method on Mac. If anyone has any questions about the method i used... hit reply.

Thanks to the og post.
[LG G Watch R] suviralu:
Rooted!

Using posts #1 and #130 I successfully rooted my LG Watch R! Thanks clicked, of course!