yashsingh1/xdaforums huggingface dataset:
[Android General] chrhei:
Stop crying, read post #6 and get used to learn a little about Linux. Or fallback to VFAT.
[Android General] laotzy:
Dear chrchei, thank you for pointing me to where I could find detailed info about the S2. My problem is that I am not of Linux, so many things are not clear to me. I did read a lot about Linux recently, I did even manage to install Virtual Machine and thus I am able to play with Ubuntu but still, it's rather difficult for me to use all those terminal commands. I am an amateur, not a professional :)

P.S. OK, I am on the last Nightly on my Galaxy S2. After having been fighting with my Linux trying to format Internal memory into ext4 and receiving errors constantly, I tried to use the CWM's resources on board and, oh wonder(!!!), the memory was formatted into ext4 without any problem! Tomorrow will do the same with the external memory. (SD card)
[Android General] philippe734:
Sorry, you are right. I didn't not understood. Please, could you tell me how to do the same modif using linux (as parted magic) ? Thanks in advance.
[Android General] Acid0057:
I'm in the same boat. Great idea but I don't know enough.

Question though if you format ext4 in Recovery and flash to CM11 M10 from M9 would you loose permission to the SD card?
[Android General] Giobio:
I think yes...

I made it, and it changed only with a simple factory reset from device's tools(including sdcard reset).

And from a CM11 to another version too.
[Android General] Acid0057:
Wow seems like it's more trouble then it's worth to format into ext4
[Android General] gpkumaran:
I also have the same problem.... wondering what goes wrong where??? anyway, are you using a modified pit file??
[Android General] Giobio:
Yes, I use 4GB one

I don't think that is a problem. If u read previous post, someone told me that it has to work so...
[Android General] Acid0057:
No pit file in use here and I have the same problem as Giobio. Can't change permissions after formatting to ext4

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] Giobio:
Take a look to post #175. It seems to be normal. Anyway I think pit file is not useful in that case
[Android General] j1gga84:
Maybe it is a CyanogenMod or CustomROM problem. It would be interesting to know if it works on stock ROM or AOSP ROMs and/or stock kernel.. Maybe then we can find the problem why it does not work for everybody..

Regards
[Android General] jnetode:
I tried reading a bunch of forums and tried a file for addon.d. It seems to have worked, but I cannot see ie happening (it should really be silent).

I made a rom update and the permission is intact.

Could someone else try it?

Jus put the file in the /system/addon.d/ folder and give rights like the other files there. Install your rom and test your permissions.

https://drive.google.com/file/d/0B4M0p5uvyF-KeUhueUsyQXFDX0E/edit?usp=sharing
[Android General] chrhei:
Pls check your script, the lines with the "find" commands needs to end with "\;"

See post#7

For files you cam change the permissions to 644 if you like.
[Android General] Giobio:
Hi men,

could you be more exactly? What are you talking of? Maybe I lost some posts?
[Android General] chrhei:
And here is exactly the point: If you / someone don't know what the Linux commands chown, chmod and find do, if you do not know how to install and run ADB, if you don't know how to become root under any Linux distribution or you have no clue what a block device is this thread isn't for you.
[Android General] Giobio:
Yes you're right, I don't know so much about that stuff.

What I considered an error, reality it wasn't. That is the reason why I asked so much helps.

Make the procedure is simple I think, so the problems I found wasn't on procedure itself but in a system unpossibility to take on it if e.i. you install a new rom. A few posts ago, explained it zile995 to me...

I would love your knowedge early, I should waste less posts to the forum space...
[Android General] jnetode:
Hi. I followed some other guides using those commands on a addon.d script and that is why I took it out.

Could someone please try it? Someone who was having problem, please put this file in addon.d and try reproducing the problem.

Thanks.
[Android General] jnetode:
Maybe some very knoledeged guy like you could solve this in an instant, and then you help the whole community (noobs, seniors and devs) instead of just criticizing. We could use your constructive help.
[Android General] chrhei:
But I'm to lazy to repeat what is written many times here or somewhere else. I can expect that people start reading manuals since all guidance is already given in this thread. And it works perfectly. Again, I'm to lazy to write a dummy guide trying to cover every exemption. It's not my intention to offend somebody. But my experience is that especially Windows users are lazy too, in terms of reading.... Regards.
[Android General] philippe734:
In my opinion, flash another rom don't impact permissions of internal sdcard. But no proof.
[Android General] j1gga84:
And what about another kernel? It must have a reason that [MENTION=5845001]Giobio[/MENTION] has this massive problems..

I changed file system to exFAT now and have no more problems with music bug for now ;)

Regards
[Android General] ilmoro93:
So the music problem on AOSP with Galaxy SII i9100 is due only to the filesystem? Or also the lack of Exynos drivers?
[Android General] JavaScout:
Formatted to ext4. So far I have no issues. I've got a question though: is block size variable under ext4? I did format the storage with Twrp, and the default is 4kB. So, should I manipulate this value, if yes - how [emoji52] ?
[Android General] Facuu:
How did you do it? Did you follow any instructions? How do you feel it in terms of performance and battery?
[Android General] JavaScout:
[MENTION=4133749]Facuu[/MENTION] Well, at first I was trying to follow the guide. I booted with Ubuntu live cd, tried Gparted, but it gave me an error and screwed the partition table. I ended up with unallocated storage. Then I went to Twrp Repair/Change fs, and it worked well. Then, linux failed to copy files to my new fs. So, I booted back the windows, connected via MTP and resrored the data. Although a couple of folders weren't writable it didn't hurt the overall result. Then I've performed "fix permissions" procedure. In terms of battery, during the night I've lost 3% in Airplane mode, while, before changing fs, it was 0-1%. No performance issues so far.
[Android General] Facuu:
So, what's the advantage of doing this then?
[Android General] JavaScout:
[MENTION=4133749]Facuu[/MENTION] I don't know, man. I just hope there are some hidden benefits I don't know yet.
[Android General] philippe734:
Read the first post
[Android General] JavaScout:
[MENTION=4133749]Facuu[/MENTION] Battery drain back to normal 0% during the night. I've disabled notifocations of Uninstall Master. It has some weird stuff going on lately. So, ext4 has no impact on battery [emoji41]
[Android General] Facuu:
Thanks for the reply, but at least for you it looks the same as with stock file system right? Any improvements in something?
[Android General] philippe734:
No improvements, no better performance. Everything is same. The main advantage is to say good bye to music bug. If some users check better performance, it's not real, just a feeling.
[Android General] JavaScout:
Well, technically it should have a difference in performance. But I cannot feel any.
[Android General] Treefrawg:
My expert way!

Like a few others, I ran into problems using the PartedMagic method. I had an error during the format, so formatted as FAT32, then ext4, copied my data back inside PartedMagic, but ran into more problems with error messages when trying to change the permissions (maybe because the cards were both unmounted and unreadable by my file manager).

So, I followed the 'Expert Way' in the link that the OP provided ('Why ext4...') to format the External SD card. The guide is strictly for the SGS3, but worked fine on my SGS2 (i9100). I then used the fdisk command to confirm which partition of the internal memory corresponded to the i9100's 11.5GB Internal SD storage, and after exiting fdisk without making any changes, formatted that in ext4 as well. Make sure you don't get the wrong partition and certainly DON'T change the partition table in fdisk! The DiskInfo App. should also confirm the partition (Partition NAME, not Number). The permission commands then ran without errors, and I have had no problems since.

To read the new ext4 volumes in Windows (i.e. as USB Mass Storage, rather than MTP), I use ext2fsd, whether I'm mounting from within CWM Recovery or booted normally. Writable access is not enabled my default for ext4 volumes in ext2fsd, as it may be buggy, so check the options for each volume.
[Android General] philippe734:
I didn't know this tool. I just tried under win7 and work fine. Great, thanks.
[Android General] Giobio:
Does anybody know how to delete, erase, disintegrate lost+found folder ,created after a no good ended partition?

It won't give up!!!
[Android General] Acid0057:
Maybe boot into Recovery mount USB storage and erase from your PC?

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] Giobio:
I did it but it come out when am wronging something. And more, getting root access to the file manager, I find a few folders around the whole internal storage....
[Android General] Acid0057:
Maybe it might help to backup what you want and format the cards in system settings then storage

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] Giobio:
Already did too. The folder appear, I think, when I loose the fix permission after formatting filesystem in ext4...
[Android General] Acid0057:
Yes you're right that's exactly when they appear. Lost+Found is a standard folder on any drive with ext file system. Personally I've given up trying to format to ext

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] Giobio:
Time ago I gave up too, but my S2 can't win with me, its owner!!! :)

But now even if I'm not able to format by gparted live cd (only through recovery) I can keep on fixing for a long time even after some kind of format and anyway fixing does not sacrify so much time..

And now I have discovered a file to clean the device which contains a few scripts that run a fix so, sometime, I don't need to do that step. But I'm testing that now, I'm not sure if is true...
[Android General] Acid0057:
I finally got this to work! Cwm recovery included with cm11 m11 build can successfully format ext4 for both my Internal and external sd cards. Now I've fixed permissions but every once and a while the phone looses those permission and I loose write access to the cards till I reboot. Not sure why this is happening. Also I can't mount and read the cards in Ubuntu. Thinking of going to vFAT if I can't figure out what's happening.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] Giobio:
Could it depend from the M11? It has, for a few users, issues and you could try to flash latest nightlies and see....
[Android General] Acid0057:
Can't flash latest nighties. I'm on a kernel that uses only snapshots. Might have to wait till the next nightly. Any jira bug reports?

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] Naudiz:
I formated both my internal and external sdcards to ext4, thanks to this great guide.

I'm just wondering one thing now: When I try to create symlinks on any of both sdcards, using Root-Explorer, I still get the error "link failed Function not implemented". Does anybody know, why this happens? I thought that ext4 always supports symlinks.
[Android General] philippe734:
There are two stuff to check at the end, did you check it ?
[Android General] Naudiz:
Yes of course I checked them. Permissions are okay and I can write files. Also Diskinfo App shows partitions as ext4.

Only symlinks don't work.

I already have an idea why. Android mounts SD-Cards in a strange way - there are several mount points: First there's /mnt/media_rw/sdcard0/ which can only be accessed as root. Here the owner and group of all files and dolders is media_rw.

Secondly there's the "regular" mountpoint /sorage/sdcard0/ (can vary of different phones), which can be accessed normally. Here the owner of all files is root and the group is sdcard_r.

I think this has to do with the fact that most SD-Cards don't use filesystems with permission-support. And I think it's the reason why you can't do symlinks so easily on the SD-Cards.
[Android General] philippe734:
Here my feedback. Formated to ext4 since 5 months. No more music bug. I listen an album every day. I'm really happy :)
[Android General] k__k:
Same for me, still works great, though I encountered a little inconvenience that wasn't there before changing filesystem to ext4, so I thought i would share it.

When trying to debug apps over USB on my SGS2 adb didn't recognize it, that is when chosing running device it displayed '??????' as is its serial number, target "unknown " etc.

Anyways, stopping adb (adb kill-server) and starting it again as root(sudo adb start-server) did the work!
[Android General] gauravlnx:
How to change permission for a single file/folder?

I have recently formatted my external sdcard to ext4. After formatting I was not able open any file on external sdcard due to permission issue. I fixed the permission using the commands provided in this thread. Everything is working fine except sometimes I still face permission issues on files that I copy from mtp.

doesn't work. Also permission doesn't change from Root explorer app. Fixing permissions on /mnt/media_rw/sdcard1 works using the commands provided on first post of this thread.

Is there any way I can fix permissions for these files separately ?
[Android General] flipeicl:
I ran all that commands in my i9192 with CM12 5.0.2, I can now create files in the root directory of my external SD card but not directorys, any tip about how to solve it?

I can't write too if I mount it as mass storage, just work with MTP.
[Android General] el_Salmon:
The bug CYAN-332 is still open in JIRA: https://jira.cyanogenmod.org/browse/CYAN-332
[Android General] teraßyte:
We must be looking at different pages then, in the link you posted I see the bug marked as closed and fixed :rolleyes:
[Android General] felix_w:
Post before last says that he used the workaround described here

Last port asks why it is marked as fixed and says that he used another workaround described here

None of them did work for me for SlimLP, maybe i had some other isuue.
[Android General] el_Salmon:
Yes, the bug is set to "Fixed", but you can see comments about that's not true. I have CM11 but the bug is still here.
[Android General] Souf0:
Hi,

I resized partitions (pit file) and format as ext4 sdcard0 and sdcard1. Now, I can't write in this partitions from the pc.

I checked permissions and owner have full permissions, and group and others haven't write permissions. I changed it (chmod as root), but when I connect to the pc, the permissions are restored (not write permissions to group and other). Owner and group of sdcard0 and sdcard1 are correct (media_rw).

I followed too all the steps in this guide, and I had the same issue.

Regards
[Android General] Acid0057:
Is you're PC Linux based? If it isn't you won't be able to write to the SD card. If it is then there are some commands you can do to make it work. But it's much easier to use es file explorers WiFi transfer mode either way

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] Souf0:
Yes, I only work with GNU/Linux. I can use Airdroid to write in this partitions, but I need to write directly via usb.
[Android General] Acid0057:
I can remember the exact commands but in a nut shell you're plugging in the phone USB then changing the permissions in the Linux PC terminal so you can have access then changing them back to media_rw when you're done.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] Souf0:
Yes, I changed owner and group to media_rw, and then, change permissions, but after unplug the phone, this changes are automatically reverted.
[Android General] Acid0057:
Are you able to write to the phone before unplugging? I think the Auto change back is by design. Try es file Explorers WiFi transfer mode. I found it way more reliable than Airdroid.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] Souf0:
I change file permissions using a console terminal in the phone (as root), and I try too via ssh. When I connect the usb wire to the pc, I've not write permissions. Obviously, I changed owner and group, and change permissions.
[Android General] Acid0057:
Ah when I really need to write via usb to my phone I change permissions on my Linux PC in terminal then change them back before disconnecting. This gets me write permission on my Linux Mint PC setup.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Android General] leftfooted:
Even though this is an old thread I'll try my luck.

I formatted a micro sd to ext4. but it is not recognised by my Cube T8 (Android 5.1). Adb logcat spits out the following:

D/StorageManagerEx( 5390): getExternalStoragePath path=/storage/sdcard1

D/MemorySettings( 5390): externalStoragePath = /storage/sdcard1

I/FSCK (13122): Invalid signature in boot block: 0000

I/fsck_msdos( 231): Invalid signature in boot block: 0000

I/fsck_msdos( 231): Total fsck time took 4832 usecs

E/Vold ( 231): Filesystem check failed (unknown exit code 8)

I/fsck_msdos( 231): === FSCK Time Usage ===

I/Vold ( 231): persist.vold.auto_format_intsd=0

I/fsck_msdos( 231): Phase#1 tooks 0 usecs.

W/Vold ( 231): /dev/block/vold/179:129 failed FS checks, move on to next partition

I/fsck_msdos( 231): Phase#2 tooks 0 usecs.

E/Vold ( 231): Volume sdcard1 found no suitable devices for mounting :(

I/fsck_msdos( 231): Phase#3 tooks 0 usecs.

D/Vold ( 231): Volume sdcard1 state changing 3 (Checking) -> 1 (Idle-Unmounted), isFat32(0)

SO it only looks for fat partitions. Am I right?

How to make it scan for ext4 partitions (instead)?
[Android General] philippe734:
It's not only for fat partition. This for any kind of partition. In order to get ext4 partition.

Do you are able to read your content of these partition?

With the app DiskInfo, what is the results?
[Android General] dangleberry_44:
Hi, nice guide, I really want to get ext4 on my microSD card, but before I start, could you please help answer some questions I have..

1. Are all the steps explained in the first post still required for Marshmallow? (MM formats as exfat for Portable and Ext4 for Internal/Adopted)

2. If I use the partition program on a PC, to format a small, say 1 GB exfat primary partition and then make the remaining space a primary ext4 partition, then is it easier for the device to read/write to the SDcard or are the steps you mentioned still required?

3. I skimmed through some posts, and it seems like some have mentioned that having root is necessary for certain steps, could you please confirm that the process in the first post works on a standard/carrier branded ROM with a Locked BL and Non-rooted?

Thank you in advance :)
[Android General] Acid0057:
1. Not sure about Marshmallow but if your going to use this microSD card only with your phone, why not make it adopted storage. It'll be ext4 then.

2. This is possible and can be done with parted magic. Note that you need a recovery that supports connecting over USB. Or you can plug the SD card directly into your PC to bypass using recovery.

3. This is where you'll get stuck. The first command is su to put you in rooted mode in the terminal. The commands need to be done on the phone/tablet too so no other way around it. You need root to finish the mod.
[Android General] dangleberry_44:
1. Because I don't want to lose visibility of internal storage. :(

2. Yep I can easily do this on my pc... So this wat wouldn't need root? or would the permissions need fixing when I put it back into the phone?

3. Damn.

- Thank you for answering my questions. :)
[Android General] Acid0057:
1. Completely understand.

2. Nope permissions need fixing on the phone booted into the Android OS.

3. Yep
[Android General] clauer82:
Can i mount the storage also with twrp? I use TWRP 3.0.2-1 and android 6.0.1 but the storage isn't visible
[Android General] @rahul:
yu yunique yu4711

naugat 7.1.1

my internal memory is 8gb and sd card 32gb. when i choose adopted storage for sd card ,after moving data to adopted storage ,i see my internal storage is hidden i can't use it

and also very imp. in twrp recovery 3.0.3.0 the files are not showing in both storage both shows empty. so i can't access my files for flashing.

so is there any other way to use ext4 sdcard ,without any ****...!
[Android General] tenmay47:
hi,

i tried to boot parted magic via pen drive but got error

could not find pmagic_2013_08_01.sqfs

please help.....
[Android General] S3rgi0:
Can i fix permisions with some recovery or app like this?
[Android General] S3rgi0:
I cant acces to my internal sd card from live cd, only see my external sd card (i tried with parted magic and knopix), and I use CWM 6.0.5.1 to mount usb storage :confused:
[Android General] asliaral:
Hello.

My phone memory is 8GB.

So İ sperated part on my sdcard (it is 32Gb)

My ext4 memory is 1.5 Gb and enough for my apps

( İ am sending app's data to ext4)

But İ want to know something. İt is better to have more space on ext4? Or is it better my 1.5 gb ext4part at the moment?

My English is not good so İ hope you to understand.

İf my data for ext4 is 1.5 Gb; can İ seperate 1.5 or will it be better more capacity and space? Like 10 Gb for ext4

Thank you

---------- Post added at 11:31 PM ---------- Previous post was at 11:29 PM ----------

İf the phone will work faster; i will increase ext4 part.
[Android General] chrhei:
Thr problem and the trick is the owner and the group IDs. If you execute the above commands from the phone environment via ADB, user and group >media_rw< is automatically assigned to the ID >1023<. If you use any other Linux you have manually to ensure the UID and GID match. So there is no way around dealing with learning how users and groups added, modified and assigned within a Linux environment.
[Android General] philippe734:
OK. And what about with terminal in Android ? I suppose it will not work, but please could you tell me how to do the same thing with a terminal ? Thanks
[Android General] chrhei:
I'm not sure if I understand you correct, but the commands from post#6 will work from within a Android terminal (use the stock one coming with CM11).

---------- Post added at 01:38 PM ---------- Previous post was at 01:34 PM ----------

Because I used some tips from the OP of this thread on my SGS-II (I9100) here is some feedback.

http://xdaforums.com/showpost.php?p=55079743&postcount=2281

Regards, ... .
[Android General] jnetode:
Can't I just fix permissions on recovery? Do I really nerd adb?
[Android General] chrhei:
I don't know what people complain about ADB. It's in my opinion the safest way. But fixing from CWM is also possible with your favorite Linux and mounted SD cards. Just set correct GID and UID to all files and folders. Or use MTP for restore.
[Android General] philippe734:
I tried to fix permissions exactly as post 6 with terminal in Android : done with success !

I will modify my guide with this add. Your contribution was excellent and essential, bravo !
[Android General] Giobio:
Hi,

I have had problem at the end. I followed step by step the guide but now I get ext4 but I can't access to the disk using the file manager(it says I need to be the administrator) and plugging the phone to the pc, this one don't recognize sd0 even if i set MTP.

I can't restore nandroid backup.

If in file manager i set root preference then I can see the sd0 but empty (using gparted for installing i restored the files).

What can I do to back to an efficent system? Or where did I wrong?