[KERNEL][Test] KitKat [Fixed Internal SD][TWRP flash from Internal SD]

Search This thread

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,660
Hello.

I will be short.
This is test kernel with my work from here:
http://xdaforums.com/showpost.php?p=51236354&postcount=41

Kernel is purely stock with fix for deep sleep,TWRP recovery with working flash from internal SD and my internal SDcard fix.

Instructions for flash:
1.Flash kernel with Flashtool or fastboot.
2.Flash modules.zip from recovery

Instructions to fix your SD files location:(to see them in /sdcard and /storage/sdcard0) (you need to have root)
First way is with root explorer:
1.Go to /data/media and move all the files and folders without "legacy,obb,0" to /data/media/0

Second way is with terminal:
1.Just tipe:
Code:
su
cd /data/media
mv !(0|legacy|obb) 0
You need to do this once.




If all went well,you will have your 4gb sd back on place.



Download:
Boot.img -> http://www.mediafire.com/download/emg35kqh8sqj0d1/boot-kk-twrp.img
Modules.zip -> http://www.mediafire.com/download/335zedpjks9i2g6/KitKat+modules.zip

Test and report,please.

Kernel is tested on CM11,but should work on other KitKat roms too.


I am not responsible for bricked devices.Do it at your own risk.

Аll can use my method or ramdisk, just mention me in your thread.

Credits:
@KillerKink - For DeepSleep issue fix
@vishal_android freak - For the great TWRP recovery,link here -> http://xdaforums.com/xperia-l/orig-development/kernel-stock-kernel-twrp-integrated-t2667370
 
Last edited:

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,660
The fix lies in ramdisk only or you've done some changes while compiling kernel also?
BTW thanks for one more way fixing storage.

Just ramdisk changes.

Will the sd internal fix work without flashing the kernel
or should the kernel be there for the commands to work ? :)
Anyways thanx for your help :)

You need to flash it and if you flash other kernel after that you will lose your storage again.

Sent from my C2105 using xda app-developers app
 
Last edited:

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,660
Any drawbacks of this method noticed so far?

No.All apps and games working fine for me.Only settings>storage dont show correct space,but this is OS bug i think.I will update this kernel today to use /mnt/media_rw/sdcard0 as mount point and fuse,because with this recovery(for stock rom) we dont need to use /data/media.This way i think there will be no problems to wipe data or format sd at all :)
 

Shivam Kuchhal

Senior Member
Dec 1, 2012
941
1,704
New Delhi
No.All apps and games working fine for me.Only settings>storage dont show correct space,but this is OS bug i think.I will update this kernel today to use /mnt/media_rw/sdcard0 as mount point and fuse,because with this recovery(for stock rom) we dont need to use /data/media.This way i think there will be no problems to wipe data or format sd at all :)

It looks like I'll wait for your update to merge the fix into my kernel as waiting for 1 day isn't a big deal. :p
 
Last edited:

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,660
You've made changes in recovery also? :confused:
And it looks like I'll wait for your update to merge the fix into my kernel as waiting for 1 day isn't a big deal. :p

Im done with update i think :D Now i formated /data and /sdcard survive it :D Will test sdcard format and will upload it.

For recovery: Im using vishal_android recovery for stock rom.Nothing changed there.
 

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,660
Test kernel 2. Changed mount point and fuse to /mnt/media_rw/sdcard0 ,so now you need to move files from there to /mnt/media_rw/sdcard0/0
If you moved them on the previous kernel you dont need to do that again.This needs to be done once on the first use of my fix.

Download here:
http://www.mediafire.com/download/5ck8z6or1b0r8jg/boot-kk-twrp-2.img

P.S.- Terminal command is same,just use "cd /mnt/media_rw/sdcard0"

I forgot to say that you can wipe /data without problems now.
 
Last edited:

Me_Shazzy

Senior Member
Feb 13, 2013
89
32
26
Somewhere in Hell
Thanks bro Great work!
But isnt there a way to mount the internal storage as the 'REAL' internal storage
i mean make it the storage where we install apps and games and place game data etc !
 

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,660
Thanks bro Great work!
But isnt there a way to mount the internal storage as the 'REAL' internal storage
i mean make it the storage where we install apps and games and place game data etc !

It is mounted as the real sdcard.I'm using it since one week for apps and games without problems.

But don't use this kernel, I got permissions from varun to add my fix to ThunderZap kernel.Go to official TZ kernel thread and you will find link.

Sent from my C2105 using xda app-developers app
 

Attachments

  • uploadfromtaptalk1395559560618.jpg
    uploadfromtaptalk1395559560618.jpg
    51.3 KB · Views: 311
  • Like
Reactions: Navneet Suresh

Shivam Kuchhal

Senior Member
Dec 1, 2012
941
1,704
New Delhi
Test kernel 2. Changed mount point and fuse to /mnt/media_rw/sdcard0 ,so now you need to move files from there to /mnt/media_rw/sdcard0/0
If you moved them on the previous kernel you dont need to do that again.This needs to be done once on the first use of my fix.

Download here:
http://www.mediafire.com/download/5ck8z6or1b0r8jg/boot-kk-twrp-2.img

P.S.- Terminal command is same,just use "cd /mnt/media_rw/sdcard0"

I forgot to say that you can wipe /data without problems now.

Can you update first post with updated commands now please? I am trying out this fix in my kernel right now. Thanks.

EDIT:
@siankatabg
I typed these commands, are they correct?
Code:
su
cd /mnt/media_rw/sdcard0
mv !(0|legacy|obb) 0
 
Last edited:

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,660
Can you update first post with updated commands now please? I am trying out this fix in my kernel right now. Thanks.

I updated this fix in thunderzap kernel again.Moved mount from fstab to init.sony.rc.Here is what you need to add:

on init add this:
mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
on fs,after mount_all fstab.sony add this:
# Mount internal SDcard partition.
wait /dev/block/mmcblk0p32
mount vfat /dev/block/mmcblk0p32 /mnt/media_rw/sdcard0 rw wait
and on sdcard service,change them to this:
service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /mnt/media_rw/sdcard0 /mnt/shell/emulated
class late_start
disabled

service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled


Im adding init.sony.rc here,so you can compare it with stock one and see whats changed in better way.

And the commands for terminal are:
su
cd /mnt/media_rw/sdcard0
mv !(0|legacy|obb) 0

P.S.- Just rename the file.


EDIT:
@siankatabg
I typed these commands, are they correct?
Code:
su
cd /mnt/media_rw/sdcard0
mv !(0|legacy|obb) 0

Yes.If you see all your SD files in /sdcard,all is good.

P.S.2- One more thing.You can swap internal and external SD with simple edit on sdcard service:

service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /mnt/media_rw/sdcard1 /mnt/shell/emulated
class late_start
disabled

service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard1
class late_start
disabled
 

Attachments

  • init.sony.rc.c
    22.5 KB · Views: 37
Last edited:

siankatabg

Recognized Developer
Sep 9, 2012
1,614
7,660
I don't want to swap :p
And I must say you've done an awesome job in this method. Can you tell me for what is the 1.5gb partition is used now? I mean the partition which was previously mounted as sdcard0

For nothing i think./data/media is part of /data,so when now its empty this space will be used for your installed apps,libs and so on in /data.
 

Shivam Kuchhal

Senior Member
Dec 1, 2012
941
1,704
New Delhi
For nothing i think./data/media is part of /data,so when now its empty this space will be used for your installed apps,libs and so on in /data.

I need bit of your help here bro.
I'm using this method and I can see my files under sdcard0/0 but the problem is that I copied some data under Android/obb folder for paying a game. After I went to sdcard0 through es file explorer shortcuts, I failed to delete obb folder but when I went to sdcard0 by navigating to mnt/media_rw/sdcard0/0. It deleted successfully. Is there any reason? The game for which I copied the data for also kept force closing. Also when I type those commands that you gave for moving data, they keep giving me errors like TWRP isn't empty and no such file or directory. :(
 

ZN6

Senior Member
Oct 29, 2011
994
1,305
N/A
I need bit of your help here bro.
I'm using this method and I can see my files under sdcard0/0 but the problem is that I copied some data under Android/obb folder for paying a game. After I went to sdcard0 through es file explorer shortcuts, I failed to delete obb folder but when I went to sdcard0 by navigating to mnt/media_rw/sdcard0/0. It deleted successfully. Is there any reason? The game for which I copied the data for also kept force closing. Also when I type those commands that you gave for moving data, they keep giving me errors like TWRP isn't empty and no such file or directory. :(

I already stated on how to mount obb directory correctly in TZ kernel thread. Take a look at this post.
http://xdaforums.com/showpost.php?p=51310631&postcount=724

Sent from my Xperia SP using Tapatalk 2
 
  • Like
Reactions: siankatabg

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    Hello.

    I will be short.
    This is test kernel with my work from here:
    http://xdaforums.com/showpost.php?p=51236354&postcount=41

    Kernel is purely stock with fix for deep sleep,TWRP recovery with working flash from internal SD and my internal SDcard fix.

    Instructions for flash:
    1.Flash kernel with Flashtool or fastboot.
    2.Flash modules.zip from recovery

    Instructions to fix your SD files location:(to see them in /sdcard and /storage/sdcard0) (you need to have root)
    First way is with root explorer:
    1.Go to /data/media and move all the files and folders without "legacy,obb,0" to /data/media/0

    Second way is with terminal:
    1.Just tipe:
    Code:
    su
    cd /data/media
    mv !(0|legacy|obb) 0
    You need to do this once.




    If all went well,you will have your 4gb sd back on place.



    Download:
    Boot.img -> http://www.mediafire.com/download/emg35kqh8sqj0d1/boot-kk-twrp.img
    Modules.zip -> http://www.mediafire.com/download/335zedpjks9i2g6/KitKat+modules.zip

    Test and report,please.

    Kernel is tested on CM11,but should work on other KitKat roms too.


    I am not responsible for bricked devices.Do it at your own risk.

    Аll can use my method or ramdisk, just mention me in your thread.

    Credits:
    @KillerKink - For DeepSleep issue fix
    @vishal_android freak - For the great TWRP recovery,link here -> http://xdaforums.com/xperia-l/orig-development/kernel-stock-kernel-twrp-integrated-t2667370
    7
    Test kernel 2. Changed mount point and fuse to /mnt/media_rw/sdcard0 ,so now you need to move files from there to /mnt/media_rw/sdcard0/0
    If you moved them on the previous kernel you dont need to do that again.This needs to be done once on the first use of my fix.

    Download here:
    http://www.mediafire.com/download/5ck8z6or1b0r8jg/boot-kk-twrp-2.img

    P.S.- Terminal command is same,just use "cd /mnt/media_rw/sdcard0"

    I forgot to say that you can wipe /data without problems now.
    2
    Can you update first post with updated commands now please? I am trying out this fix in my kernel right now. Thanks.

    I updated this fix in thunderzap kernel again.Moved mount from fstab to init.sony.rc.Here is what you need to add:

    on init add this:
    mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
    on fs,after mount_all fstab.sony add this:
    # Mount internal SDcard partition.
    wait /dev/block/mmcblk0p32
    mount vfat /dev/block/mmcblk0p32 /mnt/media_rw/sdcard0 rw wait
    and on sdcard service,change them to this:
    service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /mnt/media_rw/sdcard0 /mnt/shell/emulated
    class late_start
    disabled

    service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
    class late_start
    disabled


    Im adding init.sony.rc here,so you can compare it with stock one and see whats changed in better way.

    And the commands for terminal are:
    su
    cd /mnt/media_rw/sdcard0
    mv !(0|legacy|obb) 0

    P.S.- Just rename the file.


    EDIT:
    @siankatabg
    I typed these commands, are they correct?
    Code:
    su
    cd /mnt/media_rw/sdcard0
    mv !(0|legacy|obb) 0

    Yes.If you see all your SD files in /sdcard,all is good.

    P.S.2- One more thing.You can swap internal and external SD with simple edit on sdcard service:

    service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /mnt/media_rw/sdcard1 /mnt/shell/emulated
    class late_start
    disabled

    service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard1
    class late_start
    disabled
    1
    Thanks bro Great work!
    But isnt there a way to mount the internal storage as the 'REAL' internal storage
    i mean make it the storage where we install apps and games and place game data etc !

    It is mounted as the real sdcard.I'm using it since one week for apps and games without problems.

    But don't use this kernel, I got permissions from varun to add my fix to ThunderZap kernel.Go to official TZ kernel thread and you will find link.

    Sent from my C2105 using xda app-developers app
    1
    I updated this fix in thunderzap kernel again.Moved mount from fstab to init.sony.rc.

    I don't want to swap :p
    And I must say you've done an awesome job in this method. Can you tell me for what is the 1.5gb partition is used now? I mean the partition which was previously mounted as sdcard0