Full NTFS Read Write support for Android (ARM) - Android Software/Hacking General [Developers Only]

I had a hard time searching for full NTFS read-write support for android. This thread is the fruit of that search..
I am posting it here with the hope that it will be useful for many more users of android.
Warning: I will take no responsibility for data loss or corruption that may occur on NTFS drives, though ntfs-3g has been known to be safe.
Q. Why would someone need this?
1. To support NTFS formatted partition(s) of USB-OTG mounted drives
2. To support NTFS partition(s) in microSD card
Q. What are requirements?
1. Fuse driver fuse.ko (compiled for the ROM kernel sources)
2. Latest ntfs-3g binary (see download below)
3. arm powered rooted android device (including SONY, Samsung, Motorola, HTC etc devices)
Q. Steps to get it working?
1. Push fuse.ko to /system or /data, chmod 644, and insmod
2. Push ntfs-3g to /system/xbin/, chmod 755
3. Mount USB OTG device (See script below)
For sdcard, only minor changes required!
4. Unmount as usual with "busybox umount /path/to/mount/"
Download
ntfs-3g
mount script
Update: My USB OTG Helper app has been updated to include this and more. Check it out!!
All-in-one for Sony Xperia 2011 devices -> Here
All-in-one for Samsung Galaxy SII -> Here
Reported working on Samsung Galaxy Note - link - thanks globalthrasher
Touble-shooting!:
For debugging..
1. Download this script and extract to sdcard
2. Connect your drive (pen drive, flash disk, powered HDD)
3. Run the script with script manager
4. Copy the output file from /sdcard/usb_otg_debug.txt and post here
Technical details
---------------------------------------------------------------------------------------------
As the ntfs driver in linux 2.6 kernel does not have write support, the only feasible way was ntfs-3g
Steps:
1. Fuse support (fuse.ko) to be compiled for the respective device from kernel source.
2. The ntfs-3g module was compiled with codesourcery toolchain (arm-none-linux-gnueabi)
Code:
./configure --enable-really-static -host=arm-none-linux-gnueabi
make
ntfs-3g: Main site | More details | Release History

NTFS Utils
NTFS Utils reference:
NTFS UTILITIES
==============
The ntfsprogs includes utilities for doing all required tasks to NTFS
partitions. In general, just run a utility without any command line
options to display the version number and usage syntax.
ntfsfix - Attempt to fix an NTFS partition and force Windows to check NTFS.
mkntfs - Format a partition with the NTFS filesystem.
ntfslabel - Display/change the label of an NTFS partition.
ntfsundelete - Recover deleted files from an NTFS volume.
ntfsresize - Resize NTFS volumes.
ntfsclone - Efficiently create/restore an image of an NTFS partition.
ntfscluster - Locate the owner of any given sector or cluster on an NTFS partition.
ntfsinfo - Show some information about an NTFS partition or one of the files or directories within it.
ntfsls - List information about files in a directory residing on an NTFS partition.
ntfscat - Concatenate files and print their contents on the standard output.
ntfscp - Overwrite files on an NTFS partition.
Click to expand...
Click to collapse

This is great. The fat32 4 GB size limit suck. Hope to get some exFAT support in the future also since exFAT is currently supported by both Mac and Windows 7,8.
Sent from my EVO 4G LTE

david279 said:
This is great. The fat32 4 GB size limit suck. Hope to get some exFAT support in the future also since exFAT is currently supported by both Mac and Windows 7,8.
Sent from my EVO 4G LTE
Click to expand...
Click to collapse
exFAT is working just fine on my SGS III (XXALE9)

Thnx Shardul,
This is great.

This is great news, imma give it some time before trying it though !

Will try it tomorrow

Great news. I was able to make ntfs work with my SG2 and now i hope to do the same with my sg3. Thanks!

This is indeed awesome news. Thanks for the head's-up.
Ciao

Great news....
Gonna try it soon...my galaxy fit would have external hardisk from now
Is it posible to include it when i compile with my own kernel rather than push the fuse.ko directly to the system?
Sorry for my bad english...
Sent from my GT-S5670 using xda premium

dodoik said:
Great news....
Gonna try it soon...my galaxy fit would have external hardisk from now
Is it posible to include it when i compile with my own kernel rather than push the fuse.ko directly to the system?
Sorry for my bad english...
Sent from my GT-S5670 using xda premium
Click to expand...
Click to collapse
Ofcourse you can compile it as built-in rather than a module

anything for Transformer Prime?

working on galaxy nexus?

Great!
Anyone tried it on Samsung Galaxy Tab 10.1 (P7500)?!?
HERE the way to use it on SGS2 (I9100), I didn't try it.
I'll try on SGT10.1, but there is a way to auto-mount devices on connect?

See update in OP.. Easier to use with my updated app!
Edit: and auto start also!

shardul_seth said:
See update in OP.. Easier to use with my updated app!
Edit: and auto start also!
Click to expand...
Click to collapse
Thank you! I'll try tomorrow on both devices!

A couple of quick question, as I'm not sure about this, although "microSD" is mentioned in the first post...
1. Will this work for 64GB microSDXC expansion cards to be formatted as NTFS, usable and fully recognized? Or this is only for USB-OTG support for NTFS storage?
2. Does updated app (Helper) in the other thread take care of all the steps mentioned in original post when it comes to enabling microSDXC support mentioned above?
3. Has anyone successfully done this for Samsung Galaxy Note yet?
Sorry, if those are questions for obvious answers...
Thx.

globaltrasher said:
A couple of quick question, as I'm not sure about this, although "microSD" is mentioned in the first post...
1. Will this work for 64GB microSDXC expansion cards to be formatted as NTFS, usable and fully recognized? Or this is only for USB-OTG support for NTFS storage?
2. Does updated app (Helper) in the other thread take care of all the steps mentioned in original post when it comes to enabling microSDXC support mentioned above?
3. Has anyone successfully done this for Samsung Galaxy Note yet?
Sorry, if those are questions for obvious answers...
Thx.
Click to expand...
Click to collapse
1. Yes, just issue the commands on terminal
2. No
3. Not tried, but possible if kernel support

How can I obtain a working fuse.ko for my Samsung Galaxy Tab 10.1 (P7500) with pershoot kernel?

maxwarp79 said:
How can I obtain a working fuse.ko for my Samsung Galaxy Tab 10.1 (P7500) with pershoot kernel?
Click to expand...
Click to collapse
Just ask pershoot and I am sure he will oblige..
Edit: I think it is already enabled. See here

Related

[DEV] data2"XYZ" general filesystem discussion (Updated Dec 20 - Benchmarking)

[DEV] data2"XYZ" general filesystem discussion (Updated Dec 20 - Benchmarking)
I will rewrite this posting soon. As for now please check the scheduler Benchmark:
http://forum.xda-developers.com/showpost.php?p=9959265&postcount=257
================================================================
data2btrfs (this is DEV status so don't ask how to install - there is (little) linux expirience required)
Update about btrfs dec 15: Still testing btrfs and im REALLY amazed. Battery life has no difference to ext4 but performance is FAR better then ext4. I do still get lags in some cases (like fast! downloads) but this is simply a hardware issue which can not be addressed. Im using a class 2 sd only and i dont think that this can get ANY better. I think btrfs should run like HELL on a class 6+ card.
Update dec 14: Atm i'm using btrfs with "ssd_spread" (for ssd harddisk with older controllers. The controllers in SD should suck compared to some modern SSD so this will effect SD-Cards even more than "ssd" optimization (more info). And im amazed. It is even more smooth than nilfs (maybe less cpu) and so far the smoothest expirence i had with data2sd/data2ext. Even compared to EXT4 without journaling.
Why btrfs?
1. Btrfs is "copy-on-write" filesystem and i think that "copy-on-write" or logbased (like nilfs) will be the future.
2. Btrfs and nilfs are both better for "old" or "cheap" SSD-Drives because they are optimized for it. While this will decrease the performance of a modern SSD-Harddisk (since they are getting better and better in emulating a rotating device like a classic HD) it will INCREASE the general performance on ssd like an sd-card because their controllers is a lot worse than one of a state-of-the art SSD-Harddisk. So these optimization.
3. MeGoo (a linux made for smartphones) already has chosen it as default even though its still beta and i think they have some good reasons for this.
4. Btrfs has the same (and theoratically it should be even less - tiny) battery consumption. Other then nilfs wich had horrible battery (over 1%/h on its own even when phone was idle). Thats why i moved to btrfs from nilfs.
EDIT: Removed something really stupid xD
Safety concerns about data2btrfs
script: Considering the script i addressed ALL safety conserns that there are at present. This is based on the findings of the SGS devs and mounting directly on /data is even more save then cyanogen's app2sd+ (at least for the desire which unmounts /data - SGS doesn't). Only dalvik-cache is symlinked and a data corruption there is unimportant and can be helped by a simple wipe of the cache. So no concerns about this. (But note: the script is still "young" and there might be still errors - thats why i also don't provide a zip for ext4 yet)
btrfs is indeed still in an experimental state. But speaking FOR MYSELF ONLY (everyone should estimate this on its own) i don't have any concerns. The reasons are:
-experimental state is almost over and i doubt that there are any major bugs present.
-many Linux already use it and its default for MeGoo
-I have backups for all sensible data on my computer (like license keys - this can be lost if you backup already corrupted data with titanium/etc)
How to use it
(experienced linux users who know what they do ONLY)
- (recommended for ~ +20% speed) Delete your old ext partition create a new primary partition if it is not aligned yet. Gparted has a "align to mb" option wich makes alignement increadibly easy. Since 1024kb alignement is enough for sd there isn't anything else you need to care about.
- Make a btrfs partition with your favorite linux distribution (im still a ubuntu noob ) with btrfs utils.
- Make sure you flash a Rom that doesn't need sd-ext for installation (check the META-INF/../update-script for "copy_package XYZ SD-EXT:XYZ" - delete or format sd-ext there isn't a problem you will get an error (like on leedroid) on install but this doesn't matter)
-make sure you have Kernel with btrfs support (see below for this)
Kernels with btrfs support (SENSE ONLY for now)
-NeoPhyTe.x360 's (ext2, ext3, ext4, reiserfs, xfs, jfs, btrfs, nilfs2)
-Coutts99 Kernels (chose the btrfs-test-kernel ofc ;-) )
Known Issues
no btrfs support in recovery this means:
-no backup of the sd-ext partition (it isn't ext anymore ;-) )
-wont work with ROMs that need sd-ext for installation (some HD roms)
Thanks
- cyanogen who made app2sd+ in the first place.
- sibere and ownhere who started all the data2sd.
- supercurio and Unhelpful of SGS' Voodoolagfix (#Project-Voodoo on freenode) for their helpfull script tipps.
- Coutts99 and Neophyte for their Kernels.
- woti23 for all those test's in this thread.
- All devs of XDA in generall for all this nice stuff that is done here
Further Plans for the script
- Changing scheduler settings depending on results in the btrfs thread to get the last out of your SD while assuring safety (thanks woti23 for all the testing).
- Trying to add support to delete the ext partition and create it new with an 1024k alignement (~ +20% more speed)
- Mounting /app-cache to /cache or internal data partition (8 MB more RAM since its mounted on RAM)
- Changes for the mount options of the internal YAFFS2 Partition to optimize the speed of the "dalvik-cache" (have to look into YAFFS2 what can be done)
- Adding some lines of code to clear up any present symlinks on first boot to make it ROM upgrade compatible
- Adding e2fsck with check on every boot (script is quick edit of my script for btrfs - no e2fsck yet)
- Other changes based on the results in this or other threads about data2ext/data2sd
- Remove the errors i made ^^
---------------------------------------------------------------------------------------
Remark: i moved the data2ext4 script to my other script and set the dev tag again. I also added UBIFS discussion to the title. I also removed the nilfs utils and the data2ext4. The data2ext script can be found here. If someone wants to test nilfs you can PM me (but battery SUCKS incredibly )
---------------------------------------------------------------------------------------
Changelog: :
(dec 15): One minor change in assigning a variable. Doesn't change ANYTHING in actual behavior but code it's more "logical" (assigning the output of "busybox ls" to the variable instead of the command ^^ d'oh)
(dec 15) Fixed a stupid error that could lead to exit code (2) ....... and uploaded the proper file for btrfs (not the ext one). Sorry.... -.-
(dec 16) Fixed the fix ....
(dec 16) the scripts create now the folder it needs if it is not present yet (sorry i also forgot this in required ... was only there in the ext4 thread ^^)
=========================================================================
DISCLAIMER: BTRFS is still under development and thus an EXPERIMENTAL filesystem. Please refer to the btrfs wiki for more information.
melethron said:
Quick Info: NILFS2 - data2nilf2 will be much faster then data2ext and won't have Lags.
Long info:
After some thought's how to make things better for data2ext i started to think about how a flash based memory actually works.
Your Sd-card isn't a HDD (as you may have noticed ^^). It is actually a NAND based flash memory wich is divided into pages of 2-4kb and they are grouped to blocks of 128kb-512kb (!). But you will never see these. And you cant never change these (mkfs -b as much as you like ^^). This is done in hardware by a controller. All you will see is - you may call it an emulation - the LBA provided by the "flash translation Layer" (FTL). While the FTL can read/and write per page (2-4kb) it can't overwrite it. It needs to delete the data first AND THIS CAN ONLY BE DONE PER BLOCK !!! (Thats why read mb/s is higher then write mb/s).
What this means. Your filessystem should be aligned on the Blocks and should also avoid the need to erase blocks.
So forget every filesystem that my rock on your HDD (it may prefer e rewriteble sector if it's close f/e. If you "emulate" a filesystem through the controller it should respect the "true nature" of the hardware. A logbased filesystem would be far better since it will more likely take advantage of erased blocks. Also you may want that the blocks of the FS fit on the blocks of the NAND (alignement - but this mathes for every fs).
... Well long story short ... you need NILFS2
Links
http://www.usenix.org/event/lsf08/tech/shin_SSD.pdf
and this:
http://forum.xda-developers.com/showpost.php?p=7647224&postcount=21
(For germans: http://www.hardwareluxx.de/community/f227/os-optimierungen-fuer-flash-ssds-543445.html#post10373042)
Btw: In the XDA thread linked use it for the internal sd in samsung galaxy S for a LAGFIX. Wasn't lag the reason data2ext sucks atm.
My 2nd partition would already use this by now but there are 2 things needed:
-Kernel Support
-mount binary
Im to noobish to provide both ... so .... help ... anyone .... pls ?!
Click to expand...
Click to collapse
Ill try and sort a kernel
http://mirror.couttstech.com/android/bravo/kernel/nilfs_test_kernel.zip
Usual [email protected] kernel with NILFS built-in
As for mount binary. busybox mount might work. I've just been playing with aufs and normal mount worked for that.
coutts99 said:
Ill try and sort a kernel
Click to expand...
Click to collapse
NICE! looks far more promissing than btrfs (at least for flash memory)
melethron said:
NICE! looks far more promissing than btrfs (at least for flash memory)
Click to expand...
Click to collapse
I was going to have a play with this but forgot to bring home my spare sd card and my sd card adaptor
Sent from my HTC Desire using XDA App
Another One Nilfs2+Reiserfs
http://neophyte.vipme.com/ftp/_Extras/NeoPhyTe-2.6.32.26_Nilfs2_Reiserfs_v70.zip
coutts99 said:
http://mirror.couttstech.com/android/bravo/kernel/nilfs_test_kernel.zip
Usual [email protected] kernel with NILFS built-in
As for mount binary. busybox mount might work. I've just been playing with aufs and normal mount worked for that.
Click to expand...
Click to collapse
Thanks x 3 times.
About binary
"Mount -t auto" didn't work with nilfs2 with ubuntu. "Mount -t nilfs2" calls mount.nilfs2 i think.
EDIT: Did you add nilfs or nilfs2?
melethron said:
Thanks x 3 times.
About binary
"Mount -t auto" didn't work with nilfs2 with ubuntu. "Mount -t nilfs2" calls mount.nilfs2 i think.
EDIT: Did you add nilfs or nilfs2?
Click to expand...
Click to collapse
Nilfs2
Sent from my HTC Desire using XDA App
NeoPhyTe.x360 said:
Another One Nilfs2+Reiserfs
http://neophyte.vipme.com/ftp/_Extras/NeoPhyTe-2.6.32.26_Nilfs2_Reiserfs_v70.zip
Click to expand...
Click to collapse
Neo, have you got mount binary cross compiled for arm?
Sent from my HTC Desire using XDA App
coutts99 said:
Neo, have you got mount binary cross compiled for arm?
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
Not, we need this, but I havent got source of this.
need mkfs.reiserfs, and mkfs.nilfs2
http://forum.samdroid.net/f55/i-o-p...e-your-spica-ext2-2218/index44.html#post44349
NeoPhyTe.x360 said:
Not, we need this, but I havent got source of this.
need mkfs.reiserfs, and nilfs2
Click to expand...
Click to collapse
OK, if no one makes any progress tonight ill get on this tomorrow.
Thanks Neo!
Sent from my HTC Desire using XDA App
NeoPhyTe.x360 said:
http://forum.samdroid.net/f55/i-o-p...e-your-spica-ext2-2218/index44.html#post44349
Click to expand...
Click to collapse
Ah good link!
Sent from my HTC Desire using XDA App
I would just like to mention here that I made a special note about bloc alignment on sd card on my thread. I provided a link for that and FAT32 can be aligned to the actual bloc 128kb/512kb size of an sd/usb flash memory. This is the reason why I use 2 fat32 (aligned) partitons.
Sent from my HTC Desire using XDA App
melethron said:
Thanks x 3 times.
About binary
"Mount -t auto" didn't work with nilfs2 with ubuntu. "Mount -t nilfs2" calls mount.nilfs2 i think.
EDIT: Did you add nilfs or nilfs2?
Click to expand...
Click to collapse
ubuntu:
you maybe want to install nilfs2-tools first
then it mounts without -t option
am i the only one who is a little scared about this:
#> mount /dev/sdb1 /mnt/nilfs2
mount.nilfs2: WARNING! - The NILFS on-disk format may change at any time.
mount.nilfs2: WARNING! - Do not place critical data on a NILFS filesystem.
sibere said:
I would just like to mention here that I made a special note about bloc alignment on sd card on my thread. I provided a link for that and FAT32 can be aligned to the actual bloc 128kb/512kb size of an sd/usb flash memory. This is thefbreason why I use 2 fat32 (aligned) partitons.
Sent from my HTC Desire using XDA App
Click to expand...
Click to collapse
I still don't get the point using FAT for the 2nd partition. Also did you see what ownhere posted here:
Why create a small loopback device? the reason is item 3. But I found some bug with this case, any data write to loopback device need twice kernel IO command, one virtual one real, so the cpu usage will be high
Click to expand...
Click to collapse
About the 512kb. Are sure this is the max size "erase block" size for microsd?
melethron said:
I still don't get the point using FAT for the 2nd partition. Also did you see what ownhere posted here:
About the 512kb. Are sure this is the max size "erase block" size for microsd?
Click to expand...
Click to collapse
I have used loop so far because I have run some I/O test on my phone (not quadrant) and I always had a better result with loop than with direct format.
ownhere post is great but he's not always 100% right. For instance, the fact that ext2 partition when mounted on /data is not unmounted properly by the system in wrong. You can read my post here http://forum.xda-developers.com/showpost.php?p=9704670&postcount=9 to see the tests I did. I do confirm that the FS is unmounted by the system on shutdown.
About ext4 4K block size, you can do the same with EXT2 (my actual bloc size is 4096).
But I'm reading with great interest the thread about alternatives FS for NAND data storage. The erase block size is different for different devices and manufacturers. But at least if you align blocks to a multiple of 128kb, you will get a noticeable improvement in I/O than no alignment at all.
woti23 said:
ubuntu:
you maybe want to install nilfs2-tools first
then it mounts without -t option
am i the only one who is a little scared about this:
#> mount /dev/sdb1 /mnt/nilfs2
mount.nilfs2: WARNING! - The NILFS on-disk format may change at any time.
mount.nilfs2: WARNING! - Do not place critical data on a NILFS filesystem.
Click to expand...
Click to collapse
y i have nilfs2-tools. I only meant that -t auto doesn't work. -t nilfs2 works fine.
I also got scared by the warning and googled the warning: http://www.spinics.net/lists/linux-nilfs/msg00595.html
Quoting a dev:
NILFS2 is almost stable. We have a record of nine months operation on in-house samba servers and a webDAV server.
> There is still still warning when mounting verbosely though:
> mount.nilfs2: WARNING! - The NILFS on-disk format may change at any time.
> mount.nilfs2: WARNING! - Do not place critical data on a NILFS filesystem.
>
> As per the first message, Is the on disk format expected to change any
> time soon?
Well, I don't want to change disk format in a way that breaks
compatibility. I'm considering to remove the above message at the
next utility release.
Click to expand...
Click to collapse
Reading this im willing to use it.
sibere said:
ownhere post is great but he's not always 100% right. For instance, the fact that ext2 partition when mounted on /data is not unmounted properly by the system in wrong. You can read my post here http://forum.xda-developers.com/showpost.php?p=9704670&postcount=9 to see the tests I did. I do confirm that the FS is unmounted by the system on shutdown.
Click to expand...
Click to collapse
ownhere got this (wrong) information from me don't blame him...
You proofed me wrong on this and i admit that i was only guessing ....
After reading cyanogens post i thought that he tried to mount on /data before or tried to create an init.d/rc0.d to make a clean unmount. I didn't dare to think that any good dev would just say "... give a **** about a proper umount and use a journling fs". I mean wtf ....
melethron said:
ownhere got this (wrong) information from me don't blame him...
You proofed me wrong on this and i admit that i was only guessing ....
After reading cyanogens post i thought that he tried to mount on /data before or tried to create an init.d/rc0.d to make a clean unmount. I didn't dare to think that any good dev would just say "... give a **** about a proper umount and use a journling fs". I mean wtf ....
Click to expand...
Click to collapse
Do you mean that you/he/they stated without trying ?
I never take a guess for granted

[DEV] Trying a new direction for unlocking bootloader

target:
loading kernel from SD card
papers:
http://processors.wiki.ti.com/index.php/Optimize_Linux_Boot_Time#Use-case_1:_Boot_from_SDHC_Card
sources:
http://arago-project.org/git/projec...;h=refs/heads/qb_v2010.06_OMAPPSP_04.02.00.07
how - general idea:
finding a way to change U-boot config to load kernel from SDHC and not from NAND.
relevant commits:
1.
omap3evm: quickboot: Config file for boot from MMC
This patch adds the minimal config to boot from MMC only.
http://arago-project.org/git/projec...it;h=20d00835c403857268feacbd23339226b834aeae
2.
ti816x: Support for boot script for setting ENV
This patch enables support for executing a script stored in MMC/SD card
to set ENV variables.This is necessary for systems which have no flash storage
and ENV needs to be set without rebuilding U-Boot binary with hardcoded values.
To generate the script named boot.scr create a file boot.txt with the normal
U-Boot commands for setting ENV. Eg: setenv bootcmd 'dhcp; tftp; bootm'
Then use mkimage utility (./u-boot/tools/mkimage) in the following manner:
mkimage -A arm -O linux -C none -name script -d boot.txt boot.scr
Copy this file to the FAT partition on the MMC/SD card and let the system boot.
Note: The script will be executed automatically in case there is no flash storage
or if nothing has been saved to the ENV section of the flash.
http://arago-project.org/git/projec...it;h=0befaf9511ec2908161c634172a0061fb8547c82
Wow! Developers are seriously taking unlocking motorola defy
So you are trying to do this or is this a guide for developers?
we need to know how to make a 2nd boot. I've asked a few times, but nobody seems to know how to configure 2nd boot in BootMenu. Also, the prototype board "BeagleBoard" has the same processor, and its a good start because a lot of software and info is available for that.
Jefgenowitsch said:
So you are trying to do this or is this a guide for developers?
Click to expand...
Click to collapse
Both
Yet I don't have much knowledge about defy boot process as top defy devs like Quarx EP3 & maniac & Koreans
Contact tom3q https://github.com/tom3q he developes new kernel for spica and loads dev kernels with kexec i am sure he will gladly help.
Sent from my MB525 using XDA App
As far as I know if you try to boot kernel from sdcard it still needs to be signed, and about 2ndboot, although it's possible to boot another kernel the devs haven't been successful to boot baseband kernel, and I don't know if they have done any more progress so far...
good idea but...
I'm thinking about a bootable mini-sd card for a while now, but not only for motorala (and I don't own one).
The idea is a universal bootable mini-sd to rescue brick tablets or phone. When you start device, it automatically force to boot from the mini-sd.
For this, we have to get on the mini-sd card:
- u-boot bootlaoder on mini-sd based on generic arm
- generic arm kernel
- busybox
- tool to flash any NAND or intenral mini-sd hdd form the rescue mini-sd to the device memory.
- a tty to use tools.
I know it's possible, but I'm not so far familiar in crosstools to build kernel and u-boot. Ask me anything about linux or grub... that's OK, but for u-boot....
I'm the happy owner of an Aishuo and a Dreambook tablets, the first boot from mini-sd internal card, the second from NAND, both with u-boot, both are bricked (mea cilpa, mea culpa, mea culpa), you see know why I explore tis idea....
people it's really better than waiting for moto to unlock it.
i think the whole xda members will be so thankfull if anyone can do it.
vick33 said:
Contact tom3q https://github.com/tom3q he developes new kernel for spica and loads dev kernels with kexec i am sure he will gladly help.
Sent from my MB525 using XDA App
Click to expand...
Click to collapse
Vick33 tom3q developed a 3d driver for the Spica I don't think he can help in this
Nice to see another Spica user
Sent from my MB525 using XDA App
Now he is developing a new kernel. There is a video on youtube when he is loading a new 2.6.38 kernel with kexec
Sent from my MB525 using XDA App
mk67 said:
I'm thinking about a bootable mini-sd card for a while now, but not only for motorala (and I don't own one).
The idea is a universal bootable mini-sd to rescue brick tablets or phone. When you start device, it automatically force to boot from the mini-sd.
For this, we have to get on the mini-sd card:
- u-boot bootlaoder on mini-sd based on generic arm
- generic arm kernel
- busybox
- tool to flash any NAND or intenral mini-sd hdd form the rescue mini-sd to the device memory.
- a tty to use tools.
I know it's possible, but I'm not so far familiar in crosstools to build kernel and u-boot. Ask me anything about linux or grub... that's OK, but for u-boot....
I'm the happy owner of an Aishuo and a Dreambook tablets, the first boot from mini-sd internal card, the second from NAND, both with u-boot, both are bricked (mea cilpa, mea culpa, mea culpa), you see know why I explore tis idea....
Click to expand...
Click to collapse
Hi!
Have you already seen this?
https://www.droid-developers.org/wiki/How_to_load_mbmloader_from_SD_card
No, I wasn't. But I did now.
This is effectively interesting, alas, the matter is that this is a motorola signed ko. Need to find other 2ndboot_mmc_usb.ko from other kernel. Generally, most of china tablets or else can already boot from external sdcard for their updates, there may be a way to explore.
I don't usually hack, but many know here.
I don't want to polute motoral dedicated threads, so I'm going to open a new one in general devel one.
I have to meditate seriously the exact goal of the idea before that, but I continue to think this is a serious interesting way for a king of universal boot system, at least, for boot device to finally root them.
bumpty bumpty bump
yes, any news?

[Q&A] Ubuntu on the Transformer (eMMC install)

This thread is for help and support related to ubuntu on the eeepad transformer, all questions not related to development should be asked here, please be friendly and do not flame each other or I will request the thread be closed.
Download links are in the third post.
There is a wiki entry here that has a bit more detailed explanation. Please note though that as it is a wiki information
quoted in there may or may not be entirely accurite.
you will need to download an nvflashable rom, like prime.
Please read the README before attempting this. The readme is below as well as in the kit, YOU WILL LOSE DATA.
Download links are in the second post.
OLiFE for the ASUS transformer
------------------------------------------------------------------
(c) 2011 Steven Barker <[email protected]>
This package should have only been linked to from xda-developers
or rootzwiki if you got the links to this package from anywhere
but those sites please send an email to the above email
address with the subject: "unauthorised posts"
DISCLAIMER
------------------------------------------------------------------
Steven Barker (lilstevie) nor anybody will take any responsibility
for any damage, data loss, fire, death of a loved one, or loss of
data resulting from using this mod for your device. Using this mod
may void your warranty.
NVFLASH
------------------------------------------------------------------
nvflash is the intellectual property of nvidia, and remains the
property of nvidia. Any questions or queries regarding the usage
and licence of nvflash should be directed to nvidia.
abootimg
------------------------------------------------------------------
abootimg is by Gilles Grandou <[email protected]> and is
unmodified. The source is available from online at
http://gitorious.org/ac100/abootimg
usage
------------------------------------------------------------------
Usage has changed since the release of the last kit, please read
these instructions carefully, as the install method is a little
more complex, (but easier once you use it).
If you downloaded OLiFE.tar.gz you will need to inject the android
rom and ubuntu image. You can use any nvflashable rom with this.
I recommend that you use prime as that is the configuration that
I have tested myself, and the ROM that I support for use with this
device. You can download the ubuntu image from
http://lilstevie.geek.nz/ports/ubuntu.img.gz.
If you downloaded OLiFE-Prime-Edition.tar.gz you will not need to
download the ubuntu image or an nvflash rom as they are seeded into
the image.
Install instructions:
1) Download the specific flavour of OLiFE that you want to use, and
extract it with "tar xvf <filename>".
2) If needed inject android rom and ubuntu image.
3) From the directory that OLiFE was extracted in run the main script
with the command ./OLiFE.sh.
4) Read the text that comes up and answer the question it asks.
5) Follow the menu to the option you want (below is a breakdown of
what each menu item is) and follow the instructions prompted. (also below
is instructions on how to get into the modes requested).
Menu items:
1) Backup Menu:
1) Full Backup (stock)
- Full backup (stock) takes a full backup of a stock
android system. This gives you an option to also back
up your user data(this will take a while).
2) Full Backup (ubuntu)
- Full backup (ubuntu) takes a full backup of a system
that dualboots android and ubuntu, this backs up your
system, and the ubuntu image. This gives you an option
to also back up your user data(this will take a while).
3) User data only
- This backs up the user data partition on your device.
(This option takes a while)
4) Android ROM
- This option backs up the android system only. This
option generates all the files (minus bootloader, and BCT)
required to flash a rom via nvflash.
5) Ubuntu Install
- This option backs up the ubuntu install on your device.
2) Flash Device:
1) Dualboot:
- This option will install ubuntu to your device in a
dualbooting configuration with android. During the
installation process it asks you which OS you would like
to boot by default.
2) uboot (linux only):
- This option will install ubuntu with u-boot and the
ChromeOS kernel that supports acceleration. This option
is currently unavailable, but should be available soon.
3) asus boot (linux only):
- This option will install ubuntu with the asus bootloader
with this configuration you will use all the eMMC for ubuntu
and there will be no android system installed on your device.
4) stock:
- This option will partition the device in a stock way and
install the android system that is in ./images. Use this
option if you no longer want ubuntu on your device.
3) Update Device:
1) Android Kernel:
- This option will update the android kernel on your device
with the boot.img from ./images/. This allows you to install
your own kernel on the device for android rather than the one
that comes with your chosen rom.
2) Ubuntu/Linux Kernel:
- This will update the ubuntu kernel on your device to the version
included in this flashkit. This option is for updating just the
kernel with nvflash rather than using the blob method. This method
is also good for if you flash a bad ubuntu kernel to the device.
3) Android ROM:
- This option will update the android rom on the device with the
one from ./images/. This is good for if the ROM you use is updated
or you would like to change ROMs and there is an nvflash image for it.
This option does not destroy your data.
4) Ubuntu Rootfs:
- This will update your ubuntu image on the device. This is destructive
to data stored in the ubuntu image.
5) Advanced (Unsupported):
- Any option in this menu is not supported and should be considered
unstable. There may be bugs in these options and they are not maintained
at this point in time.
1) Flash ChromeOS Kernel (Primary Boot):
- This option will flash the ChromeOS kernel to the primary boot
partition. This option may not currently work in it's current
configuration.
2) Flash ChromeOS Kernel (Secondary Boot):
- This option will flash the ChromeOS kernel to the secondary boot
partition. This option may not currently work in it's current
configuration.
3) Update Uboot Partition:
- This option will update the u-boot boot partition that u-boot
reads the kernel and boot script from. This option does work if
you have installed u-boot by compiling it from source and installed
it yourself.
4) Flash ClockworkRecoveryMod:
- This option allows you to temperarily flash CWR to the device so
you can update the installed rom. It backs up the current kernel in
the recovery kernel position and then flashes CWR. When you have finished
using CWR you then push any key and put the device back in APX mode and
it will restore the kernel that was in that position. (This only works if
android is your primary boot option at this time).
4) Inject Firmware:
1) Bluetooth firmware (default install):
- This option will inject the Bluetooth firmware from the
android ROM located at ./images/ in to the ubuntu of your
currently running system.
2) Bluetooth firmware (CrOS Kernel):
- This option will inject the Bluetooth firmware from the
android ROM located at ./images/ in to the ubuntu of your
currently running system and flashes the proper u-boot kernel
if you no longer need adb support.
5) Onscreen Keyboard:
- This runs OnBoard so that you can run through oem-config properly
you only need to use this option if you do not have a keyboard dock
and on the first boot.
1) Standard Kernel:
- This will invoke oem-config on the standard kernel installed
on the device.
2) ChromeOS Kernel:
- This will invoke oem-config on the u-boot kernel that is
installed on the device and flashes the proper u-boot kernel
if you no longer need adb support.
Device Modes:
APX Mode:
-This mode is used by nvflash to write files to the eMMC device.
To boot in this mode you press Power and Vol-Up.
Recovery Mode:
- This mode is where CWR or Asus recovery normally lives, but is
replaced by the secondary OS in the dualboot configuration.
To boot in this mode you press Power and Vol-Down, then Vol-Up when prompted.
Normal Boot:
-This mode is where android normally lives.
To boot in this mode you press the Power button until the screen turns on.
Changelog
------------------------------------------------------------------
1.2a - Release name: Odyssey
* New name for kit: OLiFE
* New menu system
* Updated README
* Better handling of platform detection
* Bluetooth support in ubuntu.img
* Preliminary support for ChromeOS kernel
* Preliminary support for uboot
* Fixed touchpad
* Fixed network manager
* Updated to ubuntu oneiric
* More options for flashing and updating
* OTB Wireless support (No more injecting)
* Smaller ubuntu.img for faster upload to device
* Auto resizing of rootfs on first boot
* Larger partition size (6GB) for ubuntu
* Refactored to more easily between devices
* Maybe something else I have missed
1.1 - Release name: Daedalus
* Firmware injector for BT and wifi firmwares
1.0 and silent updates - Release name: Prometheus
* Support for x86_64 linux distributions
* Updated README for release on xda-developers
* Fixes to install scripts
* Initial Release
Downloads:
RootFS md5sum(1a9fa8a698e4a96245a3c08511841eb4)
OLiFE md5sum(c30263fd8271a23bb211fd9fdd69fa45)
OLiFE Prime Edition md5sum(767779ccfa200e5e00b2f1e33a3d73a9)
Sources:
http://gitweb.lilstevie.geek.nz
To clone the repos "git clone git://lilstevie.geek.nz/$(name of repo).git"
lilstevie said:
This is running natively and from the eMMC so no µSD card required,
The video is a class2 µSD card and speeds are not an example of speeds from this kit.
Click to expand...
Click to collapse
Thanks for your hard work, but I'm a bit confused by those 2 statements, contradicting each other :/
Also, if I understood properly, there is no CWM after selecting dual boot
Finally, is this a final release, or for testing purpose only ?
If final, a step by step guide would be very welcome
Edit : Just saw there is the tag [DEV] so forget about my last question (guide)
Wow, amazing work here. Haven't been able to do much to my Transformer as of late (due to uni starting up again, and been seeing how the TF goes as a substitute for my usual netbook), but absolutely can't wait to try this out when I got some time.
And yeah, I'm a tad confused here as well. I'm assuming that you mean the video was of Ubuntu running of your microSD drive using Jhinta's scripts but now this allows us to run it off the internal drive... am I right?
And how is the speed difference so far, running off internal vs class 2 microSD?
EDIT: Also, I'm assuming the same things that didn't work on Jhinta's aren't working on this (network-manager gui, touchpad etc)? Or have you changed things up a bit? And the tegra ppa you talk about; that contain the proprietary 3D drivers you were talking about having a lack of in the video?
Nice to see the post in XDA Good work !
bud77 said:
Thanks for your hard work, but I'm a bit confused by those 2 statements, contradicting each other :/
Also, if I understood properly, there is no CWM after selecting dual boot
Click to expand...
Click to collapse
The video was taken before I was stable enough to even think about using internal memory, where as this kit is not using the µSD
and yeah you lose recovery after selecting dual boot, not much we can do about that for the time being.
poltak11 said:
Wow, amazing work here. Haven't been able to do much to my Transformer as of late (due to uni starting up again, and been seeing how the TF goes as a substitute for my usual netbook), but absolutely can't wait to try this out when I got some time.
And yeah, I'm a tad confused here as well. I'm assuming that you mean the video was of Ubuntu running of your microSD drive using Jhinta's scripts but now this allows us to run it off the internal drive... am I right?
And how is the speed difference so far, running off internal vs class 2 microSD?
EDIT: Also, I'm assuming the same things that didn't work on Jhinta's aren't working on this (network-manager gui, touchpad etc)? Or have you changed things up a bit? And the tegra ppa you talk about; that contain the proprietary 3D drivers you were talking about having a lack of in the video?
Click to expand...
Click to collapse
I started back at uni this week myself, and have been using my transformer as a netbook replacement with ubuntu. The video is using my stuff but before I had it running on the internal memory.
speed diference is massive between the class2 and internal. It was so great of a difference that I forget that it is arm now that it is on internal
the PPA will have things such as kernel updates, bluetooth enabler and all that. as for what is working in the release, things are pretty similar to Jhintas release, touchpad does not work correctly network manager gui doesn't work, I have something to enable bluetooth, that works nicely, but it isn't in the fs or up on the ppa yet. 3D drivers are a work in progress, still no EGL and the likes with the L4T releases, so it is really just acceleration for normal use, I have been working on them but as of yet no dice.
So using the PPA, in theory we won't have to flash the device again (at least for the ubuntu part), it will be able to auto-update itself ?
ErGo_404 said:
So using the PPA, in theory we won't have to flash the device again (at least for the ubuntu part), it will be able to auto-update itself ?
Click to expand...
Click to collapse
yes, that is the plan anyway
lilstevie said:
the PPA will have things such as kernel updates, bluetooth enabler and all that. as for what is working in the release, things are pretty similar to Jhintas release, touchpad does not work correctly network manager gui doesn't work, I have something to enable bluetooth, that works nicely, but it isn't in the fs or up on the ppa yet. 3D drivers are a work in progress, still no EGL and the likes with the L4T releases, so it is really just acceleration for normal use, I have been working on them but as of yet no dice.
Click to expand...
Click to collapse
Ah lovely idea with the PPA. When new 3.2 based Prime gets released, I'll try to get a few hours to myself to get this all working together.
Just a few quick questions first:
How do your scripts change the eMMC layout? Does eMMC work the same as a standard HDD/SSD partitioned with a GPT? As in, have you made separate partitions for Android and Ubuntu, or is it somehow shared?
And also related, how much room will it take up on the eMMC (as I've only got a 16GB TF)?
And finally, since you've been using yours at uni running Ubuntu, have you got any idea of the battery life running Ubuntu? I'm assuming it'd be pretty similar to stock, but yeah the battery indicator wasn't working last time I was playing around with Ubuntu from the microSD. Also, does the second keyboard battery work?
poltak11 said:
Ah lovely idea with the PPA. When new 3.2 based Prime gets released, I'll try to get a few hours to myself to get this all working together.
Just a few quick questions first:
How do your scripts change the eMMC layout? Does eMMC work the same as a standard HDD/SSD partitioned with a GPT? As in, have you made separate partitions for Android and Ubuntu, or is it somehow shared?
And also related, how much room will it take up on the eMMC (as I've only got a 16GB TF)?
And finally, since you've been using yours at uni running Ubuntu, have you got any idea of the battery life running Ubuntu? I'm assuming it'd be pretty similar to stock, but yeah the battery indicator wasn't working last time I was playing around with Ubuntu from the microSD. Also, does the second keyboard battery work?
Click to expand...
Click to collapse
The second battery does work, unless you get one of those dodged ones that just randomly stops charging which happened to me, with the dock connected and the battery in it refusing to charge my battery lasted 6 hours.
the layout is different to standard, UDA(User DAta partition) is 4.2GB smaller than what it was, so you have 9.99gb for android and 4.2 for ubuntu, the kernel and recovery kernels are moved up to the end of the flash as well so that they are accessible through /dev
Just finished installing it. Yea, from internal memory it's working much faster. ~20 second boot time!(I didn't have timer with me, so I counted in the head) That's like my laptop with SSD + 10 second bios booting. With a dock it feels like a true netbook. I think I'll even dare to test c/c++ IDE on this thing. Good job!
Used online timer. It's 21 seconds.
Hmm how do I start wifi? eth0 is not even showing in the list of devices.
aligatro2010 said:
Just finished installing it. Yea, from internal memory it's working much faster. ~20 second boot time!(I didn't have timer with me, so I counted in the head) That's like my laptop with SSD + 10 second bios booting. With a dock it feels like a true netbook. I think I'll even dare to test c/c++ IDE on this thing.
Used online timer. It's 21 seconds.
Hmm how do I start wifi? eth0 is not even showing in the list of devices.
Click to expand...
Click to collapse
Sorry forgot to mention in the first post, firmwares are not included in this release due to potential licensing issues, you can push the wifi firmware via adb to /lib/firmware and also the nvram, they are located in /system/vendor/fw_bcm4329.bin and /system/etc/nvram.txt on your android system, the module will autoload on boot once you have the firmware in place, and the interface will be named wlan0
lilstevie said:
Sorry forgot to mention in the first post, firmwares are not included in this release due to potential licensing issues, you can push the wifi firmware via adb to /lib/firmware and also the nvram, they are located in /system/vendor/fw_bcm4329.bin and /system/etc/nvram.txt on your android system, the module will autoload on boot once you have the firmware in place, and the interface will be named wlan0
Click to expand...
Click to collapse
nvram.txt to /etc right? I copied them straight from android partition, but it still doesn't load. Could it be because of the bcm4329_sta.bin or nvram should be placed in /lib/firmware ?
It works now.
So basically we will be able to dual boot Windows 7 and Android?
liorry said:
So basically we will be able to dual boot Windows 7 and Android?
Click to expand...
Click to collapse
No, Windows 7 doesn't have arm version. Windows 8 maybe in future, long future ....
aligatro2010 said:
nvram.txt to /etc right? I copied them straight from android partition, but it still doesn't load. Could it be because of the bcm4329_sta.bin or nvram should be placed in /lib/firmware ?
It works now.
Click to expand...
Click to collapse
the wifi firmware should be called fw_bcm4329.bin and nvram.txt should be in /lib/firmware, I probably should have been a little clearer, but I posted that just before going to bed, and was a little tired
lilstevie said:
the wifi firmware should be called fw_bcm4329.bin and nvram.txt should be in /lib/firmware, I probably should have been a little clearer, but I posted that just before going to bed, and was a little tired
Click to expand...
Click to collapse
"bcm4329_sta.bin" was already there before I even copied 2 modules and it was also loaded as module when I did modprobe. (not 100% sure about the second)That's why I thought it was conflicting with android's modules.
Wow, great work! Can't wait to try it.
Sent from my Transformer TF101 using XDA Premium App
I've probably missed something obvious.. But I get this.
file not found: linux.img
failed executing command 2147483647 NvError 0x4
command failure: create failed
rm: cannot remove `linux.img': No such file or directory
Click to expand...
Click to collapse
After like 5 minutes of NvFlash installing stuff.

[PATCH] Enable native USB-OTG access on Nexus 7 (grouper) (02/12/12)

Hello,
i found a description for enable the native USB-OTG access on this Website. You don't need any app, e.g. StickMount, for the USB access. This is a flashable patch for your Nexus 7 (grouper) device.
Requirements:
- customize recovery
- root access
- USB-OTG cable
Note:
Use Kernel 3.1.10-g830e42f from CM10-Stable (Only changed entries in boot.img-ramdisk.gz).
Tested with:
JB 4.1.2: CM10-ROM, SmoothROM v4.1 and Stock-ROM
JB 4.2.1: CleanROM v3.0 and StockROM.
Thanks:
- CyanogenMod-Team
- Google for Android
MD5:
for JB 4.1.2: f6adbf30518e7d7985430ef277ac5519
for JB 4.2.1: 7a16565c9034ad32920b3466fb81834f
Don't work on my nexus7
@nikdevil
Wich ROM and android version use you?
Cleanrom 2.5, JB 4.2
michaelm_007 said:
Hello,
i found a description for enable the native USB-OTG access on the AOSP-Developer-Website. You don't need any app, e.g. StickMount, for the USB access. This is a flashable patch for your Nexus 7 device.
Requirements:
- customize recovery
- root access
- USB-OTG cable
Tested on Nexus 7 (grouper) with JB 4.1.2 CM10- and Stock-ROM.
MD5: c10d57a8d00072ba29bcb7b33daf6061
Click to expand...
Click to collapse
Can you provide link to where you found this? What versions will it work with 4.2.1, 4.2 or 4.1.2, all versions?
michaelm_007 said:
Hello,
i found a description for enable the native USB-OTG access on the AOSP-Developer-Website. You don't need any app, e.g. StickMount, for the USB access. This is a flashable patch for your Nexus 7 device.
Requirements:
- customize recovery
- root access
- USB-OTG cable
Tested on Nexus 7 (grouper) with JB 4.1.2 CM10- and Stock-ROM.
MD5: c10d57a8d00072ba29bcb7b33daf6061
Click to expand...
Click to collapse
I have to try the patch. It is an elegant solution!
The MODE = 600, I might be wrong but, why not using 666 instead, so that every users can access the data ... might help for >= 4.2.
Interestingly, I have almost the same file in my Ubuntu (with only one line and MODE=666).
alfeuss said:
Can you provide link to where you found this? What versions will it work with 4.2.1, 4.2 or 4.1.2, all versions?
Click to expand...
Click to collapse
link here: http://source.android.com/source/initializing.html under "Configuring USB Access" (i don't know if this is true, because i think it is for the pc, not the nexus. This is the same reason why i think it will not work on the nexus. The zip includes the same code)
@all
Updated ZIP-file
is this work for 4.2.1 ?
michaelm_007 said:
@all
Updated ZIP-file
Click to expand...
Click to collapse
Does not seem to work on my 4.2.1 stock rooted (stickmount is uninstalled).
I have rebooted, patched the v3 in CWM. When back in android, nothing appends when I plug a usb memory stick: it should be mounted automatically in /storage/usbdisk when the usb stick is pluged ? does /storage/usbdisk have to be manally created ?
Doesnt work on AOKP ROM Milestone 1 JB 4.2.
@all
Sorry, i have it tested on JB 4.2.1 and it will not work at the moment. The kernel is the problem and at the moment i can it only offer for JB 4.1.2 :crying:
michaelm_007 said:
@all
Sorry, i have it tested on JB 4.2.1 and it will not work at the moment. The kernel is the problem and at the moment i can it only offer for JB 4.1.2 :crying:
Click to expand...
Click to collapse
Ah too bad! Too nice and simple to be true!
How to remove the patch: just deleting /system/etc/vold.fstab and /system/etc/udev ?
i got to looking into making this work for 4.2 now im no dev or anything and this is just fumbling around with files in a texteditor and or looking at the system files but could it be as easy a fix for 4.2 as this
Code:
## Vold 2.0 fstab for cardhu
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
# Mounts the first usable partition of the specified device
dev_mount usbdisk /storage/usbdisk auto /devices/platform/tegra-otg
NicoGa said:
Ah too bad! Too nice and simple to be true!
How to remove the patch: just deleting /system/etc/vold.fstab and /system/etc/udev ?
Click to expand...
Click to collapse
Yes, it should be that. I was bored, so i edited the zip so it will remove the files for you: http://ubuntuone.com/40OkIet0BHFnUhbkMx4Dwf
mid-kid said:
Yes, it should be that. I was bored, so i edited the zip so it will remove the files for you: http://ubuntuone.com/40OkIet0BHFnUhbkMx4Dwf
Click to expand...
Click to collapse
Thanks!
but in fact there may be a typo in your files:
In the zip used to flash the patch the file is named : vold.fstab
While in the zip to remove the patch it is named: void.fstab
Shouldn't it be void.fstab everywhere ?
Also I wonder why you have included a patch with the boot ? (curiosity of a newby)
Finally, where could it be possible to find more information on the mounting process in JB >=4.2 ?
@all
Updated files, now it is compatible with JB 4.1.2 and JB 4.3.1 :laugh:
Will it work on paranoid 2.54 (jb 4.1.2) and M- Kernel a11 ?
@doublin
I think: yes, but my patch use the kernel of CM10 and not the M-Kernel.
Well,I'll do a nandroid and try it myself.
I'll be back in few minutes with feedback.
EDIT:
OK,I just flashed it and plugged in flash drive with some the walking dead episodes.
I can see what's on the flash drive using ES Explorer and Nexus Media Importer.
Problem is i can't open the files. I tried playing the movies using stock movie player and MX Player with no success. Something opens and right after closed back without seeing anything.
Any idea?
EDIT 2:
After a few tests with 2 flash drives ( one NTFS and one FAT16 ) and an external HDD NTFS I noticed that:
The HDD works just fine
The NTFS flash plays only two out of nine episodes.
The FAT16 flash plays two out of four episodes.
Streaming this videos was possible only trough MX Player. Stock video player and ES Explorer's integrated video player didn't work.
I'll keep trying to see what's going on, but anyway this is better than nothing. I was with no USB OTG support with my from and kernel.

[KERNEL] [15/04/10][5.1/3G+WIFI][Fix for empty directories after mount] [V18]

Hey Guys,
mkasick released in his thread a fix for the mounting problems in Android >= 4.2.
Description of the issue:
mkasick said:
Android >= 4.2 breaks Dalvik-apps that mount file systems to be shared with other apps. This includes CifsManager, Mount Manager, essentially anything that mounts cifs shares, FUSE file sytems, etc. The symptom is that the mounted contents appear fine to app that peforms the mount operation (assuming the app itself provides the ability to browse the contents), but every other app only sees an empty directory at the mount point.
Click to expand...
Click to collapse
As I said - mkasick released a solution - so I compiled my own kernel. Now we can again easy mount cifs and others! All old apps should work. Only limitation: the mount point needs to be outside of /storage (and also /mnt/sdcard/). Fix for this: Mount within /data/media/0 -- android will redirect the mount so you can access the mounted-files from this folders.
The kernel is a "stock kernel" and also includes:
mkasick Patch
Built-In cifs, md4, utf8, nfs, f2fs (Since V17)
kexec hardboot patch (The full patch, allows boot as host and as guest)
As Modules: .ko: snd-usb-audio and all of its devices (Installed, but not modprobe'd since V17)
[Since V16/Android 5.0.2] Fix for baseband_xmm_power wakelock on tilapia (see Hints and Bugs since V16 / Android 5.0 / Lollipop ; for Android 4.4.4 see this post)
mkasick recommends in his thread to patch dalavik, but for the stock-roms it is easier to patch the kernel.
Known Bugs:
Since Android 5.0.X/V16: SELinux is now blocking the access of cifs/nfs even in read. Also nfs isn't loaded at boot time anymore. For more information look below.
Since Android 4.4.X: There is a known bug with mounting cifs (you can't write). The solution is (try at your own risk) here. If you want to do this workaround at boot-time, you can flash the zip linked here.
With SuperSU >= 1.50 && < 1.65 the mounted folders are empty. Please update! (For more Info see hide-box "SuperSU Information" below)
Hints and Bugs since V16 / Android 5.0 / Lollipop:
SELinux, cifs and nfs
SELinux is since Android 5.0 "more" enforced. Because of that, even the read on nfs / cifs isn't working anymore without disabling selinux by "setenforce permissive" as root. Be careful, disabling selinux is an security hole. USB is still working with selinux at enforcing.
Because of the same reason the nfs and sound modules are not loaded at boot anymore. Because I don't want to mess around with selinux at boot time, you can modprobe them yourself, if you need it. Run the following commands as root to use nfs / sound modules (a installed busybox is required):
Activate sound modules:
Code:
busybox modprobe snd-usb-audio
Activate NFS File System:
Code:
busybox modprobe nfs
Workaround for baseband_xmm_power wakelock
Some people have massive issues with tegra3 + cellular devices with the baseband_xmm_power wakelock. The wakelock drains all the battery. With V16 I included a possible fix for this. The fix is based on the work of jfmcbrayer and Sgt. Meow. By default, the fix isn't active and the kernel uses the stock behaviour.
If you want to disable the wakelock entirely, you can flash this zip: CWM_activate_baseband_xmm_power_wakelock_workaround_vorcers_rev2.zip
I used this this workaround for some time with Android 4.4.4 and I had no issues. Well, I did not test the mobile data... Please tell me, if something isn't working (And the workaround is active). I just wanted to get rid of that battery drain. I was on flight mode all time.
Technical:
The workaround is enabled by echoing a number into a baseband_xmm_power module parameters:
Code:
echo 0 > /sys/module/baseband_xmm_power/parameters/bb_timeout
Possible Values:
< 0 - disable workaround, stock behaviour [Default (-1)]
= 0 - disable the baseband_xmm_power wakelock completely
> 0 - how long the wakelock can stay active, every time the wakelock is triggered, in 10ths of a second. Meaning: Value 5 = 500 ms, 10 = 1 second, 20 = 2 seconds....
You find the patch I used in the actual Patchset. (Included since Android 5.0.2)
Downloads
(Kernels since v8 are only tested by me for the 3G version (tilapia) - but should also work with wifi (grouper).)
The flash of the kernel shouldn't break anything, but I recommend to backup your system.
Download-Links for grouper and tilapia:
Android 5.1: Kernel: Grouper: boot-grouper-vorcers-gf5d7b8b-v18.zip ; Tilapia: boot-tilapia-vorcers-gf5d7b8b-v18.zip
Android 5.0.2: Kernel: Grouper: boot-grouper-vorcers-g6ff7a51-v16.zip ; Tilapia: boot-tilapia-vorcers-g6ff7a51-v16.zip
Android 4.4.4: Kernel: Grouper: boot-grouper-vorcers-g1e42d16-v13.zip ; Tilapia: boot-tilapia-vorcers-g1e42d16-v13.zip
In V11 the kernel modules are placed in /data instead of /system. If you are upgrade from < V11 and you want to delete the modules in /system, you can delete the folder "/system/vorcers_kernelmodules" manually, or you use this CWM-Zip to delete.
Download-Links only for grouper: (try on tilapia at your own risk)
Android 4.3: Kernel: boot-grouper-vorcers-g1e8b3d8-v7.zip Kernelmodules: integrated
Android 4.2.2: Kernel: boot-grouper-vorcers-g05b777c-v4.zip Kernelmodules: kernelmodules-vorcers-g05b777c-v2.zip
Extra-Links:
My Repository for this Kernel (also contains old versions): https://www.mediafire.com/folder/j9iocde4l20c7/Kernel
Stock-Kernels: https://www.mediafire.com/folder/d3mj3k3v61jzu/Stock Kernels
A zip which contains the Patches and modifications I made: https://www.mediafire.com/folder/kvdmcsl16x0ox/Sources
Integration wishes for new kernelmodules to support new hardware are always welcome (you will get .ko's for my kernel)
Have a lot of fun!
Sources:
http://forum.xda-developers.com/showthread.php?t=2106480 (Mount fix)
http://forum.xda-developers.com/showthread.php?t=2104706 (Hardboot patch)
http://source.android.com/source/building-kernels.html
http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
http://nek0s.blogspot.de/2012/12/nexus-7-ramdisk.html
Changelog:
Android 5.1: gf5d7b8b-v18 (2015/04/10)
- Switched to gf5d7b8b / android-tegra3-grouper-3.1-lollipop-mr1
- Build-In nfs
- Disabled Module auto loading for snd-usb modules -- are still installed
- Added f2fs Filesystem, untested, standard is ext4
Android 5.0.2: g6ff7a51-v16 (2015/01/31)
- Switched to g1e42d16 / android-tegra3-grouper-3.1-lollipop-release
- Added Workaround for the baseband_xmm_power wakelock on tilapia (Please see "Hints and Bugs since V16 / Android 5.0 / Lollipop" for more information)
- NFS and Sound Modules are not loaded anymore by default but can loaded manual via "busybox modprobe nfs" / "busybox modprobe snd-usb-audio".
Android 4.4.4: g1e42d16-v13 (2014/06/06)
- Switched to g1e42d16 / android-tegra3-grouper-3.1-kitkat-mr2
Android 4.4.3: g4776c68-v12 (2014/06/03)
- Updated Grouper and Tilapia ramdisks for Android 4.4.3.
Android 4.4.2: g4776c68-v11 (2014/01/11)
- To save space in /system, the kernel-modules had been moved from /system/vorcers_kernelmodules to /data/vorcers_kernelmodules.
If you want to delete the modules in /system, you can use this zip: CWM_delete_system_vorcers_kernelmodules.zip
- Nothing else is new
Android 4.4.2: g4776c68-v10 (2013/12/11)
- Updated Kernel Config and Ramdisks. (Both changed in Android 4.4.2/KOT49H)
Android 4.4: g4776c68-v9 (2013/12/10)
- Created separate files for grouper and tilapia (their ramdisk differ, kernel not)
Android 4.4: g4776c68-v8 (2013/12/07)
- Switched to Android 4.4: g4776c68 ; KRT16O (?) ; android-tegra3-grouper-3.1-kitkat-mr1 KRT16S is gee1a0b2 / (?)(?) android-tegra3-grouper-3.1-kitkat-mr0 (?)(?)
Android 4.3: g1e8b3d8-v7 (2013/09/01)
- Modules Support for Android 4.3
- Packed all modules inside zip...
- I go back to the old version scheme and only count up the numbers...
Android 4.3: g1e8b3d8-v6 (2013/07/29)
- Forgot somehow UTF8
- Really added /proc/config.gz
Android 4.3: g1e8b3d8-v5-km-v4 (2013/07/25)
- Switched to Android 4.3: g1e8b3d8 ; jwr66v ; android-tegra3-grouper-3.1-jb-mr2
- This kernel has also: /proc/config.gz and an loadable module support (Stock has not)
- I also provided the patchset I used for Android 4.3
Android 4.2.2: g05b777c-v4-km-v2 (2013/02/19)
v4-Kernel (boot-grouper-vorcers-g05b777c-v4.zip):
- Switched to different version schema: boot-grouper-vorcers-<android-kernel-hash>-v<count of changes of kernel (overall)> ; For the kernelmodules it is: kernelmodules-vorcers-<android-kernel-hash>-v<count of changes of kernel-modules (overall)>. This means for you: if the number is higher, there is something new Version-Number at Changelog: <android-kernel-hash>-v<count of changes of kernel (overall)> -km-v<count of changes of kernel-modules (overall)>
- Added init.d (/system/etc/init.d/) support to the kernel/init.rc. If the directory exists, the scripts inside the directory get run via "run-parts" from busybox. This means: The script need to be runable (+x) and mustn't have an file-extension.
- Removed the mount of /mounts out of init.rc (is now in an script called by init.rc)
v2-Kernelmodules (kernelmodules-vorcers-g05b777c-v2.zip):
- Made a CWM flashable package which autoloads the modules in my kernel.
Android 4.2.1: v3 - boot-grouper-4.2.2-vorcers-v3.zip : (2013/02/15)
- Switched to Android 4.2.2 - Kernel, jdq39, g05b777c, android-tegra3-grouper-3.1-jb-mr1.1
- Added Modules for OTG-USB-Sound (see kernelmodules*.zip)
Android 4.2.0: v2 (2013/01/19)
- I added a tmpfs mount for /mounts, so you don't need to do "mount -o remount rw /" and create your inital-mountpoint yourself. /mounts is writeable by all apps. (done in init.rc)
Android 4.2.0: v1 (2013/01/19)
- inital release
SuperSU Information:
Information for SuperSU Users
It seemed that SuperSU >= 1.50 && < 1.65 doesn't work correctly with this kernel. Well, the Version 1.65 seems to work again (The folders where empty after mount). The SuperSU Version 1.45 worked the best. If you want to use 1.45, you can download the old Flashable-Version here: http://download.chainfire.eu/343/SuperSU/UPDATE-SuperSU-v1.45.zip.
As I said, the version 1.65 seems to work again. It maybe can happen, that the folders gets empty, after some time. This has been noticed with Version 1.60. But 1.65 not (yet).
If you still have problems with the empty folders on my kernel, you should try superuser by koush.
koush's superuser is opensource and is the same as in cyanogenmod. And with that, the mount-technique is working without bugs: https://play.google.com/store/apps/details?id=com.koushikdutta.superuser
Some gimmick: One"click"mount-Shell-Script
Because I want to get rid of stickmount, I written a little shell-script to mount all connected devices. It is very similar to stickmount, but it supports: ext, fat32, ntfs. Well, ntfs only, if you provide the path to an ntfs-3g binary. (In the variable NTFS_BINARY) I used in the script the paragon-ntfs binary. Just install the Paragon-App.
Download V2.2: http://www.mediafire.com/download/rjmsdt06cf0cp6b/oneclickmountv22.sh.gz
Download V3: http://www.mediafire.com/download/xppx2m3awcf3oq3/oneclickmount-v3-20130221172223.tar.gz
glimmling created a tasker apk for this script. I but it still bases on v11 of the script.
from v3 on, ocm needs -m parameter. If you want the old behavior, use "-m auto"
from v3 on, ocm also mounts /dev/block/sdX partitons (e.g. /dev/block/sda), but only if my script can use a busybox with blkid with TYPE output. (I provided one)
I added in v3 an fstab-like future usable with -f <file> see my example.
Please be careful with the new v3. I works, but I would call it "beta"...
You can't run ocm >= v3 inside /mnt/sdcard. All files (except for ocm.fstab and ocm-library) need the x right. Copy the files too /data/local/, "chmod 777 *" them and run ocm from /data/local.
example for ocm.fstab.
syntax:
Code:
<device> <mountpoint> <fs-type> <options>
example:
It is is very importent that the options seperated by one space!
Code:
//192.168.100.1/username username cifs username=<username>,password=password,ro
192.168.100.1:/home/username nfs nfs nolock,ro
/dev/sda1 sda1 ntfs
Thanks to:
mkasick - for the patch
farhanito - for the basic code in the .zip
glimmling - for the tasker apk's running the One"click"mount-Shell-Script
jfmcbrayer / Sgt. Meow - for the baseband_xmm_power wakelock workaround
Hi and thanks for this!
I'm a Linux noob and have some questions.
If I understand it correctly, I don't need Stickmount anymore with your kernel. Do I need to mount an usb stick in the terminal or is there a way to automate this with tasker for example?
What is the correct mount command syntax?
The old way to mount a network share with cifs manager in 4.1.2 I used this guide with external modules:
http://forum.xda-developers.com/showpost.php?p=29055478&postcount=10
Can you please show an example configuration for Cifs Manager, when I use your kernel?
Many thanks!
You still can use stickmount. You will see no difference, because stickmount uses the old "debuggerd" method. (Well, I did not test stickmount with the new fix, but it should work...)
For cifs:
I already included cifs in my kernel. You don't need to load them anymore. You can now easy use cifs manager, if you are mounting under /mounts (with the v2 of my kernel)
Here an screenshot of an configuration I use with CifsManager:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
It is only important, to use a path in /mounts/. As I tested, CifsManager automatically creates the mount-point inside /mounts/.
It is possible, that applications which doesn't support browsing in file system, can't access /mounts. But some provide an option to the start directory or something like that (OfficeSuite for example) the directory just need to be set to /mounts. This is the reason, why stickmount uses an mountpoint inside /mnt/sdcard ... I am using OI Filemanager. It is a quite nice application. It also supports starting apps with the selected file.
I hope, I could help you.
AW: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
Thank you.
Cifs is working for me now, but I want to get rid of stickmount.
Since android 4.2.x I always get empty folders with stickmount, even with the latest version. I want to replace it with a new method. But I don't know the mount command and the device name to mount a standard usb-stick.
mount [devicename?] /mounts/usb ???
EDIT: I replaced stickmount with usb otg helper http://forum.xda-developers.com/showthread.php?t=1588940. Now I can see the files of a mounted usb-stick in every app, no more empty folders.
Gesendet von meinem Nexus 7 mit Tapatalk 2
Ah. I forgot USB-OTG helper. Well, with this app, the mounting of devices already worked without the fix. It also uses the "debuggerd" workaround like stickmount. You will need the kernel-fix only for mounting cifs.
I stay at my new oneclickmount-shellscript, because I want to know what the applications do ^^ I don't trust stickmount and usb-otg-helper...
AW: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
Can you please share your script?
Gesendet von meinem Nexus 7 mit Tapatalk 2
Look in the first post, I attached it there
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
Thanks vorcers,
Here is flashable zip of v2
http://www.mediafire.com/download.php?gnn4n5p8plhdkv8
Md5= 0394f49ae911ec7a2d7cf845c5916fb6
Hope you can figure out the /storage problem
Every other kernel should implement this fix
Sent from my Nexus 7 using Tapatalk 2
This is a great! Question, since the mount point needs to be outside of /storage and /mnt/sdcard does that mean I can not use this to mount app data? ex. gameloft, etc (using Directory Bind)
It would be really awesome if a fix or hack to this issue (empty directories if app is not launched before mounting) could be found without requiring a kernel patch.
I tried the debuggerd method supposedly used by StickMount and found that it didn't work: app still sees empty mount if its process is started after mount.
Btw, app sees mounts if its process is started before because mounts are propagated in that case. They are just not inherited on process creation due to how zygote spawn app processes and initializes their mounts.
I never understood how hacking debuggerd could work to fix this issue as this is not much different to me than running a shell script invoking adb shell in loopback mode (requires root), since debuggerd and adbd run with identical priviledges:
Code:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb connect localhost
adb shell mount ....
I've found a workaround that involves hijaking the obb directory by mounting whatever you want over /mnt/shell/emulated/obb. This directory is systematically bind mounted by the Zygote process in <external storage root>/Android/obb (see source code) when it spawns an app's process
Unfortunately this hack is not very usable because it has the side effect that any app expecting its data in the obb directory will not find it. And you can only mount one filesystem here.
Conclusion: with the new 4.2 multiuser support, Google made miserable all apps dealing with mounting.
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
I havent tried this kernel yet, but it might appear by simply set the mount point to /data/media/0/MOUNTNAME
Might appear in storage that way.
worked for me using sshfsandroid mounting the pc harddrive over the wifi.
EDIT: I just flashed this kernel and its working the way I said. THANKS A BUNCH.:thumbup:
Sent from my Transformer TF101 using Tapatalk HD
Half-OT: Did someone tested with the new fix the superuser-function in non-primary accounts?
----------------------------------
farhanito said:
Thanks vorcers,
Here is flashable zip of v2
http://www.mediafire.com/download.php?gnn4n5p8plhdkv8
Md5= 0394f49ae911ec7a2d7cf845c5916fb6
Hope you can figure out the /storage problem
Every other kernel should implement this fix
Sent from my Nexus 7 using Tapatalk 2
Click to expand...
Click to collapse
Very nice, If you don't object, I would use your zip in the future as base and would only offer .zip's.
Doncabezon said:
This is a great! Question, since the mount point needs to be outside of /storage and /mnt/sdcard does that mean I can not use this to mount app data? ex. gameloft, etc (using Directory Bind)
Click to expand...
Click to collapse
As mkasick said in his patch, also fixing the /storage/ folder, can cause other problems:
mkasick in his patch said:
Unfortunately bind mounts from outside /storage may retain the recursive-shared property (bug?). This means any additional namespace-specific bind mounts (e.g., /storage/emulated/0/Android/obb) will also appear, shared in all namespaces, at their respective source paths (e.g., /mnt/shell/emulated/0/Android/obb), possibly leading to hundreds of /proc/mounts-visible bind mounts. As a workaround, mark /mnt/shell/emulated also as recursive-slave so that subsequent bind mounts are confined to their namespaces.
Click to expand...
Click to collapse
To "fix" the /storage problem, only 6 lines of the patch need to be removed. But it also can break the multiuser-feature. I will test it in the next days.
bubbleguuum said:
It would be really awesome if a fix or hack to this issue (empty directories if app is not launched before mounting) could be found without requiring a kernel patch.
Click to expand...
Click to collapse
As an alternative (which is not really an alternative...) is to use the dalavik patch. But I think the Kernel-Patch is easy for stock.
Anyway, I think there will never be a 100% solution without patching. Only Google can solve this problem, by changing their multiuser architecture... (Or they mark by stock the root folder as non-slave, but that wouldn't fix the /storage problem...)
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
What if I don't need multiuser support. Don't care much if it becomes broke, since my son has a kindle and my wife dare not touch my tablet save for playing Temple Run Brave
Sent from my Nexus 7 using xda premium
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
vorcers said:
----------------------------------
Very nice, If you don't object, I would use your zip in the future as base and would only offer .zip's.
Click to expand...
Click to collapse
Of course, no problem
Sent from my Nexus 7 using Tapatalk 2
Thank you so much for that kernel! That is exactly what I have been looking for!
I added .zip's and released a new oneclickmount.sh version. :highfive:
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
YayYouFixedIt said:
I havent tried this kernel yet, but it might appear by simply set the mount point to /data/media/0/MOUNTNAME
Might appear in storage that way.
worked for me using sshfsandroid mounting the pc harddrive over the wifi.
EDIT: I just flashed this kernel and its working the way I said. THANKS A BUNCH.:thumbup:
Sent from my Transformer TF101 using Tapatalk HD
Click to expand...
Click to collapse
So using this method, directory bind works?
Sent from my Nexus 7 using xda premium
Re: [KERNEL][WIFI][4.2.X] Included "Fix for empty app-mounted directories"
Actually it did seem too. No idea why. Both on the n7 and tf101 for sshfsandroid only.
But eventully I just made it mount to /Removable/pcharddrivefoldermountpointnamelong examplee and that was OK for me too. Ssomone mentioned it can be mounted anywhere outside storageed
EDIT: only using this kernel and I am using dirty aokp2.8 ATM.
I just checked again and the bind works as /data/media/0/PC which wouldnbe good if you want to download directly from dolphin into the PC.
vorcers said:
I added .zip's and released a new oneclickmount.sh version. :highfive:
Click to expand...
Click to collapse
Just wanted to give a HUGE THANKS for compiling your kernel and making it available, to farhanito for the flashable zip, and of course to mkasick for the concept
CIFS Manager works like a charm, and DeaDBeeF Player can see my shares, so me=HAPPY!
Nice to be on 4.2.1 now.
Y'all rule :highfive:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'll just add that Mount Manager also works like a charm, automounting under /mounts whatever shares you define.
I created a new oneclickmount version, with some bug-fixes.
http://forum.xda-developers.com/attachment.php?attachmentid=1690089&d=1359582536
They appeared if you use more then one device at the nexus parallel. It simply only mounted one device.
I also set the standard-mountpoint to /data/media/0/mounts. With that, we can use our files also in /mnt/sdcard. :highfive: (Android re-directs it...)
This also works for bind's. I could bind /mounts/ to /data/media/0/mounts . It also works... Maybe someone helps that for using some games.

Categories

Resources