[AOSP KRT16M] [v3.2] [5. Nov] 4.4 STABLE / Android 4.3.1 STABLE [Kernel 3.4.67]

Status
Not open for further replies.
Search This thread

jervine

Member
Jul 22, 2010
49
16
exFAT support?

Just flashed this, and noticed there is no exFAT support compiled into the kernel. Is this something that can be added easily? The email app is quite useful for some people - for the Exchange ActiveSync support for corporate email accounts.

Other than the above - really nice job on the ROM though. Feels like a Nexus device.
 

pabx

Senior Member
Apr 5, 2011
598
1,801
Zurich
Just flashed this, and noticed there is no exFAT support compiled into the kernel. Is this something that can be added easily? The email app is quite useful for some people - for the Exchange ActiveSync support for corporate email accounts.

Other than the above - really nice job on the ROM though. Feels like a Nexus device.

You can cross compile https://github.com/rxrz/exfat-nofuse with this patch:

Code:
diff --git a/exfat_super.c b/exfat_super.c
index 5175473..9eccc55 100644
--- a/exfat_super.c
+++ b/exfat_super.c
@@ -1543,7 +1543,7 @@ static void exfat_evict_inode(struct inode *inode)
                //mark_inode_dirty(inode);
        }
        invalidate_inode_buffers(inode);
-       clear_inode(inode);
+       end_writeback(inode);
        exfat_detach(inode);
 /*
        struct exfat_sb_info *sbi = EXFAT_SB(inode->i_sb);

But IMO there is no real reason to use exFAT on any android device: If you are using a large sd-card just use ext4: Android will share the filesystem via MTP anyway. Also note that the legal status of reverse engineered exFAT implementations is 'unknown'.
 
  • Like
Reactions: gm007

jervine

Member
Jul 22, 2010
49
16
You can cross compile https://github.com/rxrz/exfat-nofuse with this patch:

Code:
diff --git a/exfat_super.c b/exfat_super.c
index 5175473..9eccc55 100644
--- a/exfat_super.c
+++ b/exfat_super.c
@@ -1543,7 +1543,7 @@ static void exfat_evict_inode(struct inode *inode)
                //mark_inode_dirty(inode);
        }
        invalidate_inode_buffers(inode);
-       clear_inode(inode);
+       end_writeback(inode);
        exfat_detach(inode);
 /*
        struct exfat_sb_info *sbi = EXFAT_SB(inode->i_sb);

But IMO there is no real reason to use exFAT on any android device: If you are using a large sd-card just use ext4: Android will share the filesystem via MTP anyway. Also note that the legal status of reverse engineered exFAT implementations is 'unknown'.

Fair point - decided to go with your suggestion of formatting with ext4 (once I've backed up the data on the sdcard). The reason I'd chosen exfat was that the stock ROMs had a module available for exfat, and that 4.2.2 seems to support it natively, whereas ext4 has not been supported on the sdcard. (I'll admit I'm lazy)

Thanks for making the sources available too.
 

pabx

Senior Member
Apr 5, 2011
598
1,801
Zurich
Fair point - decided to go with your suggestion of formatting with ext4 (once I've backed up the data on the sdcard). The reason I'd chosen exfat was that the stock ROMs had a module available for exfat, and that 4.2.2 seems to support it natively, whereas ext4 has not been supported on the sdcard. (I'll admit I'm lazy)

Thanks for making the sources available too.

Sony ships with the 'Tuxera exFat' kernel driver. Tuxera has a contract with Microsoft so they are allowed to ship their own exFat implementation.
The code linked in my previous post on github is in a grey-area as Microsoft *requires* you to pay them in order to distribute exFat implementations.

The vanilla linux kernel (and AOSP) never included exFat support and probably never will.
 

jervine

Member
Jul 22, 2010
49
16
Sony ships with the 'Tuxera exFat' kernel driver. Tuxera has a contract with Microsoft so they are allowed to ship their own exFat implementation.
The code linked in my previous post on github is in a grey-area as Microsoft *requires* you to pay them in order to distribute exFat implementations.

The vanilla linux kernel (and AOSP) never included exFat support and probably never will.

Yeah, I"m happier to use ext4 (or other native Linux filesystem) as my desktop and laptop are Linux systems anyway, but as most (all?) stock ROMs don't support ext4 and I wanted support for file sizes greater than 4GB, exFAT was my original (in retrospect unwise) choice.

With a 64GB ext4 formatted SD card, it's not automatically mounted - listed as blank or has unsupported filesystem. I can mount the filesystem manually when connected via adb - although it seems that 'correct' way to do this in Android is to mount it somewhere and then use sdcard to 'remount' it in the location that the OS will actually use (sdcard seems to be similar to a bind mount but mounts via fuse in a way to remove permissions and case sensitivity).

The source for sdcard suggests this should work, so I guess I'm missing something somewhere else...
 

pabx

Senior Member
Apr 5, 2011
598
1,801
Zurich
With a 64GB ext4 formatted SD card, it's not automatically mounted - listed as blank or has unsupported filesystem. I can mount the filesystem manually when connected via adb - although it seems that 'correct' way to do this in Android is to mount it somewhere and then use sdcard to 'remount' it in the location that the OS will actually use (sdcard seems to be similar to a bind mount but mounts via fuse in a way to remove permissions and case sensitivity).

The source for sdcard suggests this should work, so I guess I'm missing something somewhere else...

It doesn't get mounted because vold only expects fat32 sdcards. I hacked up a small patch and this makes the automount work:

http://pastebin.com/yM2aHhcG

However: You'll run into permission issues - setting a default ACL doesn't work as android apps will just override it with their 'more secure' umask.
So i guess yeah: The only real solution would be to launch the sdcard-daemon for the external sdcard.
CM has a patch for this: http://review.cyanogenmod.org/#/c/31215/ - but i wonder if it wouldn't be simpler to solve this in the kernel. (the sdcard daemon is just a big hack of google to simulate the old there-are-no-permissions-on-/sdcard behaviour)
 
  • Like
Reactions: gm007

jervine

Member
Jul 22, 2010
49
16
It doesn't get mounted because vold only expects fat32 sdcards. I hacked up a small patch and this makes the automount work:

http://pastebin.com/yM2aHhcG

However: You'll run into permission issues - setting a default ACL doesn't work as android apps will just override it with their 'more secure' umask.
So i guess yeah: The only real solution would be to launch the sdcard-daemon for the external sdcard.
CM has a patch for this: http://review.cyanogenmod.org/#/c/31215/ - but i wonder if it wouldn't be simpler to solve this in the kernel. (the sdcard daemon is just a big hack of google to simulate the old there-are-no-permissions-on-/sdcard behaviour)

:( Yeah, I've spent today going round in circles to discover this as well. Android expects the sdcard to have no permissions and no case sensitivity. As a result, it's really not happy with an ext4 filesystem on the sdcard. The filesystem can be mounted within adb (and init.d support can be added to ensure this mounts during system boot). However, your'e right, the various applications don't like seeing the ext4 filesystem attributes. I've not figured out the syntax to pass to the sdcard binary to 'correct' this.

I was mounting /dev/block/mmcblk1p1 to a 'temporary' location, and then trying to use sdcard to mount this to /storage/sdcard1 via:
sdcard <temporary location> /storage/sdcard1 1023 1023 (where 1023 1023 are the uid and gid expected). But the sdcard binary just 'hangs', and although Ctrl+C would show the /storage/sdcard1 directory as mounted when 'mount' was ran - you couldn't actually browse the filesystem. so that was a no-go.

As a last resort I tried the ezymount app on the Play Store - and this really didn't work ... It could see the ext4 partition, but every attempt to mount it would fail, and to add insult to injury, a factory reset seemed to occur when I next rebooted my phone. Not fun. This is all caused by the ubiquity of FAT :(
 

pabx

Senior Member
Apr 5, 2011
598
1,801
Zurich
I had a look at the ext4 support today:

The CyanogenMod patch is a big mess, would require a significant amount of work to merge it into AOSP (CM10.1 is missing many 4.2 features in vold) and i simply do not like the sdcard-daemon-fiddeling.

IMO, a much better solution would be to add a new mount-option to the kernel that tells the VFS layer to represent all files with hardcoded uid:gid. This would be easy to do, but we still would need to fork vold() and we still would have to add support for each non-fat filesystem manually (fsck / mount calls).

But this still results in a complicated setup where the only benefit is to have support for files >4GB on an sdcard - and i do not think that this justifies the patch-mess.

Btw: UDF woulb be a VERY nice option (supported by all major operating systems) but unfortunately the linux implementation doesn't allow you to force the uid:gid for newly created files (you can tell it to 'forget' the UIDs on remount, but that doesn't help)
 
  • Like
Reactions: gm007

DesertHawk

Senior Member
Nov 19, 2012
4,403
5,179
Dubai, United Arab Emirates
Anyone running this ROM please give me Settings.apk and SystemUI like ASAP. Even if you aren't flash it and give it to me. In return I'll give you a 4.3 Google Play Edition ROM. But I need these for cross checking.

How do you do that? Flash the ROM. Get any root file explorer. Go to System/App. Copy the two APKS to your internal memory. Upload it to DropBox or equivalent and PM me the link

Sent from my Sony Xperia Z using XDA Premium HD
 
Last edited:
  • Like
Reactions: BoneMo

pabx

Senior Member
Apr 5, 2011
598
1,801
Zurich
  • Like
Reactions: gm007

Stony-D

Senior Member
Oct 25, 2012
218
47
Anyone running this ROM please give me Settings.apk and SystemUI like ASAP. Even if you aren't flash it and give it to me. In return I'll give you a 4.3 Google Play Edition ROM. But I need these for cross checking.

How do you do that? Flash the ROM. Get any root file explorer. Go to System/App. Copy the two APKS to your internal memory. Upload it to DropBox or equivalent and PM me the link

Sent from my Sony Xperia Z using XDA Premium HD
You will give us the google play edition Rom from the Xperia Z?
I am dreaming? :fingers-crossed:
 

DesertHawk

Senior Member
Nov 19, 2012
4,403
5,179
Dubai, United Arab Emirates
And what are you planning to do with them? There is nothing special about Settings and SystemUI in this ROM:

System-UI is compiled from the unmodified 4.2.2 sources and my changes for Settings are here: https://github.com/adrian-bl-yuga/android_packages_apps_Settings (and 100% useless if you are not using qc-fqd)

For now im just playing around... Where ever it leads me too i guess. I ported 4.3 and it booted with FXP's 4.2 kernel so im surprised so im just going with the flow. Thanks bro
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 117
    banner44_xperia.png

    Curren Status

    Working in 3.x
    • Wifi
    • Audio
    • Camera + Movie recording
    • Telephone calls / SMS
    • GSM Data
    • GPS
    • NFC
    • Encrypted /data
    • OMX video (HW accelerated playback)
    • Automatic display brightness
    • No screen on delay
    • A Video of the 4.4 Port can be seen at http://www.youtube.com/watch?v=zrc89NJfF0o (thanks to mestanr)

    Known issues
    • Selecting a Mobile network manually will cause the 'Please wait...' dialog to stay even after the phone registered to the network. Just hit the 'home' button to make the dialog vanish.
    • Syncing the Calendar with google may not work on a fresh 4.4 installation. Reboot your phone 2 times and it should be fine. (Seems to be a gapps issue, there is nothing i can do about it :( )

    Notes

    Download Android 4.4 for Yuga

    NOTE: DEVELOPMENT ON XDA STOPPED - FOR UP-TO-DATE BUILDS PLEASE GO TO http://www.blinkenlights.ch/ccms/android/yuga.html[/COLOR]

    Version 3.2 from 5. Nov. 2013 (download)
    • Again - New gapps package: http://android.eqmx.net/android/xperia/gapps_44_yuga_3.tgz. (Place it on /sdcard/ before flashing the update)
    • Nexus5-Style lockscreen
    • Include Launcher3 (AOSP Version of the new KitKat launcher)
    • Fixed fused location provider (for google-now and other stuff. Note that this will only work after google maps has been installed)

    Version 3.1 from 3. Nov. 2013 (download)
    • New gapps package: http://android.eqmx.net/android/xperia/gapps_44_yuga_2.tgz. (Place it on /sdcard/ before flashing the update)
    • Fixed sensors (Orientation, Proximity, etc)
    • Stock gallery can now set the Wallpaper (Cropping is still broken, blame google)
    • Upgraded Kernel to 3.4.67, also includes fix for CVE-2013-2597
    • Support for USB-Mass storage / USB-OTG

    Version 3.0 from 2. Nov. 2013 (download)
    • First release based on Android 4.4 - note that you must wipe your phone (eg: flashing userdata.img) before upgrading!
    • All Hardware (camera, audio, etc) seems to work OK, but there are still a few quirks (eg: shaky gapps package, sdcard issus). You should wait for 3.1 (and stay with 2.7) if you need a stable phone



    Download Android 4.3 for Yuga

    Version 2.7 from 12. Oct. 2013 (download)
    • Kernel upgraded to Version 3.4.65
    • Upgraded to Android 4.3.1 (JLS36I)
    • Grant write permission to external sd-card to applications

    Changelog for older releases:
    Version 2.6 from 21. Sept. 2013 (download)
    • Kernel upgraded to Version 3.4.62
    • Upgraded to Android 4.3_r3.1 (JLS36G)

    Version 2.5 from 30. Aug. 2013 (download)
    • Kernel upgraded to Version 3.4.59
    • Fixed 'H-Icon-Missing' bug
    • Updated builtin APN list
    • Increased the max tab count in the stock browser to 64 (from 16)

    Version 2.4 from 24. Aug. 2013 (download)
    • Upgraded to Android 4.3_r2.2 (JSS15Q)
    • New 'auto install' gapps package
    • Use pool.ntp.org by default
    • Keep screen off during USB Unplug

    Version 2.3 from 7. Aug. 2013 (download)
    • Enabled 4G/LTE by default
    • Fixed compass and gyro sensor
    • Backported PR_{SET,GET}_NO_NEW_PRIVS feature to Linux 3.4

    Version 2.2 from 1. Aug. 2013 (download)
    • Enabled additional scene modes + exposure in stock camera
    • Fixed AOSP Voice dialer
    • Enabled SE-Linux in kernel config
    • Builtin CWM recovery (press a volume button while the white LED is fading out)

    Version 2.1 from 27. Jul. 2013 (download)
    • Enabled Bluetooth tethering
    • Added Nexus boot animation
    • Enabled UINPUT in kernel config (support for bt keyboards/mice)

    Version 2.0 from 26. Jul. 2013 (download)
    • First build based on Android 4.3. Everything seems to work OK so far, but you should probably stick with 1.5 (4.2.2) for now if you really depend on your phone (the release only had a few hours of testing so far)
    • You are STRONGLY advised to do a full wipe if you are coming from 4.2.2 (fastboot flash userdata userdata.img)
    • You also need to update your gapps package to 'gapps.yuga43_shaky.tgz'. This gapps build is still based on 4.2.2 but was patched to not crash on 4.3

    Version 1.5 from 18. Jul. 2013 (download)
    • This is the last (and most stable) release based on 4.2.2
    • Security: Fixed the 2 'master key' bugs
    • Option to finetune the screen brightness in Settings -> Xperia Z Settings


    Installation / Upgrade

    • Extract the archive (unzip pabx_aosp_yuga*.zip)
    • adb reboot-bootloader
    • fastboot flash boot boot.img ; fastboot flash system system.img
    • If this is an initial installation, also run: fastboot flash userdata userdata.img # NOTE: THIS WILL WIPE YOUR /data - only do this on first-install
    • fastboot reboot


    Please note that the system.img file does NOT include gapps - you can either install them manually or use my handy .tgz file to do it automatically:


    Your phone will now reboot twice: 1x to install gapps and 1x to finish the installation.
    The gapps package is based on the 20130813 release from goo.im. And no: There is no need to upgrade the .tgz after a new gapps release as all included applications will update themselfes via google play.

    Building from source

    Everything you need is on github at: https://github.com/adrian-bl-yuga/device-sony-c6603

    Code:
    $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.3_r2.x
    # copy-n-paste the local-manifest from: https://github.com/adrian-bl-yuga/device-sony-c6603
    $ repo sync
    # Download the v3 blobs from sony and extract them
    $ ( cd kernel/sony/k253 && ./_build.sh )
    $ lunch full_c6603-userdebug
    $ make -j 8
    32
    Ok, i got 4.4 booting.

    Current status:

    • Wifi and Radio are working
    • Camera and OMX seems to be OK
    • Sound is broken (need to re-port my patch)
    • BT and NFC are probably also fine
    • Fails to mount the sdcard (probably google changed this AGAIN)
    • 4.3 gapps is horribly broken (keyboard crashes, setup wizard fails (missing permission))
    • My source tree is currently a mess and oh - hexediting binary-blobs to get them working on 4.4 isn't fun (but it works ;) )

    g7VsKdP.png
    23
    @pabx, @M_T_M. I have requested for my ROM thread to be deleted (not closed) as I don't want to cause trouble. I will send my fixes to PABX tomorrow and upload my HTC Sense build with permission from PABX as I used his 4.3 kernel. I hope I have made the right decision.

    Edit - Thread Deleted : All fixes will be here to help PABX make an awesome rom

    Sent from my Asus Transformer Infinity TF700 using XDA Premium HD
    19
    I uploaded the first build based on Android 4.4 (v3.0):

    FOOR0W1l.png


    It seems to be running OK, but there are a few quirks:

    • The Calendar sync seems to have issues with my gapps package. Looks like deleting the AOSP (!) Calendar package & rebooting makes things work OK. (Note: This issue also causes 'Sync Error' messages in the account view)
    • I'm not sure if the sdcard works 100% stable - getting it to work required quite some time but it seems to be OK in my latest build.
    18
    For the people asking if i would continue the development on XDA: The answer just changed from 'maybe' to 'no' a few minutes ago.

    As we can see: Nothing changes on XDA: The same sh*it happens again and again and again:
    http://xdaforums.com/showthread.php?t=2518294

    Just to make myself clear: I'm not against people using my work as a base for their own ROM - but i do not want my work to show up in hacked-up ROMs because:

    * They violate the GPL (where is the link to the kernel sources?!)
    * The ROM was not built from source - so there is NO DEVELOPMENT going an. Slapping APKs into an existing ROM is *not* development.



    I may (or may not) continue to post new Builds on my personal homepage:
    http://www.blinkenlights.ch/ccms/android/yuga.html

    You can also try to follow me on Twitter (https://twitter.com/adrian_blx) or G+ (https://plus.google.com/115564237657785223556/posts)