[Q&A] [DEV][19NOV] Native Mount DataOnEXT with DalvikOnNAND (Test #2) - HD2 Android Q&A, Help & Troubleshooting and Genera

Q&A for [DEV][19NOV] Native Mount DataOnEXT with DalvikOnNAND (Test #2)
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [DEV][19NOV] Native Mount DataOnEXT with DalvikOnNAND (Test #2). If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!

Hi, ph03n!x
I am using your DataOnExt in my htc vivo with vivokat 4.4.4 by Szezso and it works fine. However I have an unidentified problem with DalvikOnNand - nothing appeared in the logcat but mount was not done.
could you tell me what could be wrong with these commands (which are a part of my init.rc):
Code:
# create dalvik-cache and double-check the perms, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
mount ext4 /dev/block/platform/msm-sdcc.2/by-num/p26 /data/dalvik-cache noatime nosuid nodev barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic,wait,check,encryptable=footer,length=-16384

MarsBlessed said:
Hi, ph03n!x
I am using your DataOnExt in my htc vivo with vivokat 4.4.4 by Szezso and it works fine. However I have an unidentified problem with DalvikOnNand - nothing appeared in the logcat but mount was not done.
could you tell me what could be wrong with these commands (which are a part of my init.rc):
Code:
# create dalvik-cache and double-check the perms, so as to enforce our permissions
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
mount ext4 /dev/block/platform/msm-sdcc.2/by-num/p26 /data/dalvik-cache noatime nosuid nodev barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic,wait,check,encryptable=footer,length=-16384
Click to expand...
Click to collapse
Can you post the output of mount command with this configuration? And all the mount command from init.rc?
While I'm not familiar with your device, have you tried using by-name/the_name_of_userdata instead of by-num in the mount command? You have check what it's name is.
I suspect that Dalvik mount is happening alright, otherwise your device will not boot. You can verify that by mounting data (the actual userdata partition) in recovery and seeing what it contains.

ph03n!x said:
Can you post the output of mount command with this configuration? And all the mount command from init.rc?
Click to expand...
Click to collapse
well, that's one of the problem - I can't see any output from these command at all. As far as I understand, it could be seen in kernel log, but I have no idea of how to enable it or where it is put by the kernel. As I mentioned, logcat has nothing of that.
the whole script is here (it's a boot.img-ramdisk.cpio.gz from the kernel) - I don't have the right for foreign links yet, but it should have been attached to this message
ph03n!x said:
While I'm not familiar with your device, have you tried using by-name/the_name_of_userdata instead of by-num in the mount command? You have check what it's name is.
Click to expand...
Click to collapse
I have used "by-num" because it was done this way in fstab. I guess my problem is in the mount-params, though, it would be nice to see the output.
ph03n!x said:
I suspect that Dalvik mount is happening alright, otherwise your device will not boot. You can verify that by mounting data (the actual userdata partition) in recovery and seeing what it contains.
Click to expand...
Click to collapse
I have checked this by mount-command after boot - It's not there and that is the reason for my concern. However, the boot works fine - dalvik is on the sd-ext (and I see it in the standard partition info)

MarsBlessed said:
well, that's one of the problem - I can't see any output from these command at all. As far as I understand, it could be seen in kernel log, but I have no idea of how to enable it or where it is put by the kernel. As I mentioned, logcat has nothing of that.
the whole script is here (it's a boot.img-ramdisk.cpio.gz from the kernel) - I don't have the right for foreign links yet, but it should have been attached to this message
I have used "by-num" because it was done this way in fstab. I guess my problem is in the mount-params, though, it would be nice to see the output.
I have checked this by mount-command after boot - It's not there and that is the reason for my concern. However, the boot works fine - dalvik is on the sd-ext (and I see it in the standard partition info)
Click to expand...
Click to collapse
The mount errors/ or anything related to mount will not show up in logcat, that is normal. Logcat is in the user space (after Android boots up), and all the mounts you do in init.rc happens in kernel space (When linux kernel boots, before it loads Android). DMESG or KMESG may have the mount commands (I haven't checked either in a long long time though).
I will look at the ramdisk later, but it will be helpful if you attach only the init.rc (rename it to init.rc.txt). I want to make sure you got the mount commands right, and you are mounting /data/dalvik-cache to /dev/block/platform/msm-sdcc.2/by-num/p26 AFTER mounting DataOnEXT is completed (otherwise /data/dalvik-cache will not be there for the Dalvik Cache to be mounted on /dev/block/platform/msm-sdcc.2/by-num/p26)
When you are in Android with the current configuration, connect it to your computer, do a go in to adb shell, do su if required (to get # prompt), and then type mount. Copy-paste what comes as output here.

ph03n!x said:
The mount errors/ or anything related to mount will not show up in logcat, that is normal. Logcat is in the user space (after Android boots up), and all the mounts you do in init.rc happens in kernel space (When linux kernel boots, before it loads Android). DMESG or KMESG may have the mount commands (I haven't checked either in a long long time though).
I will look at the ramdisk later, but it will be helpful if you attach only the init.rc (rename it to init.rc.txt). I want to make sure you got the mount commands right, and you are mounting /data/dalvik-cache to /dev/block/platform/msm-sdcc.2/by-num/p26 AFTER mounting DataOnEXT is completed (otherwise /data/dalvik-cache will not be there for the Dalvik Cache to be mounted on /dev/block/platform/msm-sdcc.2/by-num/p26)
When you are in Android with the current configuration, connect it to your computer, do a go in to adb shell, do su if required (to get # prompt), and then type mount. Copy-paste what comes as output here.
Click to expand...
Click to collapse
Thank you for the hint about dmesg - I've got the log finally but it doesn't have any error for the mount command either.
Even though the syntax of the mount command in the console is quite different, I will try it (a little later).
I have attached pure init.rc, although, it would be too simple to have a problem with the place of the mount-command in my case - the mkdir-command is not mine, it was there in the first place. I have also attached the dmesg dump file.

MarsBlessed said:
Thank you for the hint about dmesg - I've got the log finally but it doesn't have any error for the mount command either.
Even though the syntax of the mount command in the console is quite different, I will try it (a little later).
I have attached pure init.rc, although, it would be too simple to have a problem with the place of the mount-command in my case - the mkdir-command is not mine, it was there in the first place. I have also attached the dmesg dump file.
Click to expand...
Click to collapse
Ok, I think understand the issue now. fstab is mounting all your partitions AFTER init.rc is executed. So when you are mounting Dalvik on NAND from init.rc, it is probably being overridden by fstab when it mounts /data. Try the Dalvik on NAND mount in fstab...

ph03n!x said:
Ok, I think understand the issue now. fstab is mounting all your partitions AFTER init.rc is executed. So when you are mounting Dalvik on NAND from init.rc, it is probably being overridden by fstab when it mounts /data. Try the Dalvik on NAND mount in fstab...
Click to expand...
Click to collapse
Well, it turns out that it's not that simple at all. It's even simpler! In fact, I have misinterpreted the file-system manager's options - I misused them as the mount options which should have been shown in the log as an invalid argument error but never even appear there (at least in the kernel log). So, as far as I can understand the kitkat source code, it would be wrong to use another mount_all command in the post-fs-data section, which means that I can't use the fs_mgr-options at all.
The options I mean are these: wait,check,encryptable=footer,length=-16384
There is only one equivalent in the mount command for all of these options - the wait-flag.
I will check it later and post the result here.

The results of the check were not very helpful. The only thing that has changed was 5 seconds of wait_for_file timeout. Moreover, even when I rise the log-level up to 8, the only new thing was this couple of lines in the kernel-log:
Code:
<6>[ 8.995849] init: command 'loglevel' r=0
<6>[ 13.963317] init: command 'mount' r=-1
after which I checked the source and found that there was nothing more to expect. Thus, there is no way I could identify the problem in the kernel-log, though, the problem itself has been confirmed - it's an issue of the mount-command params.
ph03n!x said:
Try the Dalvik on NAND mount in fstab...
Click to expand...
Click to collapse
It seems to me that this is the only option left for me, but to implement it I'll have to create something like /dalvik directory in the root and after the mount_all, simlink it to the /data/dalvik-cache. This is going to be the next test.

Related

BusyBox Error

Im working with Andrizoid atm at seeing if we can get some progress on his Ubuntu project. Heres the issue.
Code:
busybox mount -o --bind ./dev/pts /data/local/ubuntu/dev/pts
mount: cannot read /etc/fstab: No such file or directory
In doing a little research I came across this
If there is no entry for /dev/fd0 in my fstab when I issue the command above, mount gets very confused because it doesn't know where to mount the floppy.
Click to expand...
Click to collapse
This come from http://www.tuxfiles.org/linuxhelp/fstab.html which gives a quick breakdown of what the etc/fstab file is. When i went exploring I couldnt find an etc/fstab
Code:
[B]
mount: cannot read /etc/fstab: No such file or directory
[/B]
The thing about Android though...there IS NO /ETC/FSTAB file because its become obsolete.
The init program directly mounts all filesystems and devices using either hard-coded file names or device names generated by probing the sysfs filesystem (thereby eliminating the need for a /etc/fstab file in Android). After device/system files are mounted, init reads /etc/init.rc and invokes the programs listed there (one of the first of which is the console shell).
Click to expand...
Click to collapse
EDIT: Conclusion
After bouncing some ideas around, I've come to the conclusion that it HAS to be a Busybox issue.
An Android specific variation of Busybox should take into account the fact that there isnt an etc/fstab file. The fact that these commands work on other phones leads me to think that its an Eris specific issue. If anyone remembers there were issues when using the Busybox available on the market on the Eris.
Looks like we need a Busybox update
es0tericcha0s said:
Or is there something else I can do?
Click to expand...
Click to collapse
Modify the mount command.
If the version of BusyBox is the Android version, report this issue (as a bug?). If it's the standard Linux BusyBox, the devs may not be interested. Or, if BusyBox is just calling the standard mount command, then it's not a BusyBox issue for them to worry about.
hallstevenson said:
Modify the mount command.
If the version of BusyBox is the Android version, report this issue (as a bug?). If it's the standard Linux BusyBox, the devs may not be interested. Or, if BusyBox is just calling the standard mount command, then it's not a BusyBox issue for them to worry about.
Click to expand...
Click to collapse
I'm using the Android Busybox, and those commands are being executed in an adb shell so I doubt that its calling the standard mount command-it should be calling the (hopefully) Android specific mount command. The things thats confusing me is that those same commands worked just fine for other phones. I dont see why I would get an error and others would have no issue with it?
EDIT:
And if you ave any recommendations for what I should modify the mount command to, let me know.
You mention a reference to /dev/fd0 but I'm 99.9% that's referring to the *nix mount command. The Android/BusyBox version should know better than to look for a floppy drive.
Where is BusyBox maintained ?
I did find a page about an Android ROM from Nov 2008 that mentions
- changed the "mount" symlink to be busybox's mount instead of toolbox's mount
- added an /etc/fstab file that busybox's mount can use, that lists the standard system partitions.
Click to expand...
Click to collapse
Is "mount" in fact an internal adb command ?
hallstevenson said:
You mention a reference to /dev/fd0 but I'm 99.9% that's referring to the *nix mount command. The Android/BusyBox version should know better than to look for a floppy drive.
Where is BusyBox maintained ?
I did find a page about an Android ROM from Nov 2008 that mentions Is "mount" in fact an internal adb command ?
Click to expand...
Click to collapse
The floppy drive reference was just from some background info I pulled on the etc/fstab file. I wasnt actually trying to mount a floppy disk
I have no idea where I would put in a bug report or anything. I know Stericson was the publisher of the BusyBox app thats avaiable on the market, but the one for the Eris is different anyways so idk if he could help.
Im not sure what you mean by your last statement, but mount is not a command that you can use in a shell on its own. You have to use busybox mount ...
If you can show me where you found that rom from I may be able to finish this. I was just talking to a buddy of mine about making my own /etc/fstab and slipping it in just so that the mount command would work. If theres already one put together then thats way less work for me
What I meant by referring to that info you found was that person couldn't have been talking about the Android version. I didn't think you were trying to mount a floppy.
You sure that there's no "adb mount" ? Look here, http://forum.xda-developers.com/showthread.php?t=517874. They refer to "adb shell mount".
Personally, I would just create an /etc/fstab file (I believe it can be empty) and see what happens.
hallstevenson said:
What I meant by referring to that info you found was that person couldn't have been talking about the Android version. I didn't think you were trying to mount a floppy.
You sure that there's no "adb mount" ? Look here, http://forum.xda-developers.com/showthread.php?t=517874. They refer to "adb shell mount".
Personally, I would just create an /etc/fstab file (I believe it can be empty) and see what happens.
Click to expand...
Click to collapse
well ive got an /ect/fstab file that i took from here http://www.android-devs.com/?p=152
Code:
# /etc/fstab: static file system information
#
# file system mount point type options dump pass
/dev/block/mmcblk0p2 / ext2 defaults 1 1
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /media/sdcard vfat defaults 0 0
But thats from a guide about debian on the N1 and the way they are doing it is much different from the method I'm using.
adb shell mount give the error that mount isnt found. it has to be called through busybox-at least in the instance that im using it in
Code:
busybox mount -o --bind /dev/pts /data/local/ubuntu/dev/pts

How do I convert rfs to ext2 or ext4 MANUALLY?

How do I convert partitions manually? What are the commands or procedures without using software?
If you have fugumod or g3mod kernel you can put a fs.convert in their respective folders.
Just make a file with notepad and write for example:
stl6 ext4
And save it without .txt extension and put in /sdcard/Android/data/fugumod (if you use fugumod) or sdcard/Android/g3mod (if you use fugumod)
Remember:
stl6 is system
stl7 is data
stl8 is cache
ale_bot from xda app
I said I wanted to know the manual method But thanks for you willing to help!
Because I have another Android phone as well and I want to make a universal file system conversion application... To make life easier for every Android owner.
I was hoping someone could tell me everything I needed...
djjonastybe said:
I said I wanted to know the manual method But thanks for you willing to help!
Because I have another Android phone as well and I want to make a universal file system conversion application... To make life easier for every Android owner.
I was hoping someone could tell me everything I needed...
Click to expand...
Click to collapse
For that u'll need the kernel to support the fs so it cant be universal
also the manual way is different in different devices
P.S. : This ain't development, ask your questions in general or q/a
Please notice that even if you do convert manually, kernel is still supposed to support ext2/4 file system. Stock kernel does not support it, so in some way you have always to take in consideration which kernel you are running.
My kernel supports ext2
All I need is now some scripts...
for example /dev/stl12 is /system
djjonastybe said:
My kernel supports ext2
All I need is now some scripts...
for example /dev/stl12 is /system
Click to expand...
Click to collapse
I think "universal" is not so easy possible as you would like. Every device has another hardware and so the OS (although it's android) is not the same...
On Galaxy 3 the /system parition is /dev/stl6... not stl12
There is the app G3mod by Dympy / Dharam.
The "manual" way is advised here for you (convert.fs - file)
both ways only work on G3 with fugmod or G3mod-kernel...
If you wanna make your own "universal" app you need to do it the linux-way with mkfs -t ext?? /dev/stl??
with manual commands or within a script (maybe with cases --> "universal") in adb shell during CWM or script at booting, as the filesystems must not be mounted while converting!
However you won't be coming around learning to handle linux!
So I can do this?
su
mount -o remount,rw /dev/stl12 /system
busybox cp /system/* /sdcard/system_backup/
reboot recovery
Click to expand...
Click to collapse
# Now we are in CWM and we unmount /system manually (unless someone gives me the command I can replace this with the command to unmount /system???)
mkfs -t ext2 /dev/stl12
mount -o remount,rw /dev/stl12 /system
busybox cp /sdcard/system_backup/* /system/*
chmod 644 /system/*
sync
reboot
Click to expand...
Click to collapse
Do you think this process would work??? OR do I need to do something more? I believe ALL my commands are correct. Can I proceed or do I have to declare something somewhere so Android knows it's ext2 or is this fine ?
I hope this is ok ? I am going to try it out in two hours...
I tried it to convert it to ext2...
The conversion went succesfull
But after reboot it detects any partition I convert to ext2 as ext4... But ext4 is not supported :/ WTF?
Should I try mke2fs instead?

Linux chroot mount scripts

The actual creation of an arm linux chroot image is probably out here on teh internetz somewhere, but I can assist with my mounting shell script (which works).
My image is of a debian arm chroot, and the image filesystem is ext2 (a good idea for fewer writes. ie innately non-journaling), has been used extensively on fw DE .17 and I'm currently trying it out on WW .29 (thank you, miloj).
I would upload my debian img somewhere, but I've actually broken it somewhat (it works for my needs, but it's nonetheless a bit too hacked up to be reliable).
I've modified it somewhat for generalization, some of it is probably wrong and/or redundant, and it IS hackish and ugly, but it works for me (tm).
* the chroot image only need a root account (and probably bash installed, but it usually is)
* You need busybox installed.
* You need to upload your chroot image named linux.img to the internal sdcard in a folder named linux
A shell script to set things up is attached.
What you need to do:
push the install script and run it:
Code:
adb push installlinuxstuff.sh /data/local/
adb shell sh /data/local/installlinuxstuff.sh
Now you can (from adb shell or terminal emulator on device):
Code:
su -
/data/local/mnt/linux.sh
/data/local/mnt/notlinux.sh
Feel free to remove the install script at
/data/local/installlinuxstuff.sh
when you've got it up and running.
Alternative way to run the scripts from adb shell:
Code:
adb shell su -c /data/local/mnt/linux.sh
adb shell su -c /data/local/mnt/notlinux.sh
I usually symlink start and stop (in my case deb and undeb) shell scripts placed in /data/local/mnt in /system/bin (ie shell scripts with 'su -c /data/local/mnt/whatever.sh' in them) for easy start an stop from terminal emulator, and if you've gotten this far you may welcome the small advice. (in other words - don't do this unless you _really_ know what you're doing)
Debian ARMHF or ARMEL?
If you would uploaded it (good place is google drive , sharing as public, as there are no ads or bull**** and the download is extremely fast) I would love to try your image - after modifying your script so it can work on a UHS-1 class MicroSD I want to try running this off of (should give it a little more speed).
zamaditix said:
Debian ARMHF or ARMEL?
If you would uploaded it (good place is google drive , sharing as public, as there are no ads or bull**** and the download is extremely fast) I would love to try your image - after modifying your script so it can work on a UHS-1 class MicroSD I want to try running this off of (should give it a little more speed).
Click to expand...
Click to collapse
Armel (I use the same chroot installation on my phone in a smaller image file (with less stuff installed)). I've got loads of personal stuff all over it and besides - it's somewhat broken. I really don't want to try to fix it.
So I'm working on retracing my steps, creating a clean armhf ext2 image (debian wheezy base installation for now) and redo the mount script, but I can't make any promises on a release date.
Anyhu - there are loads of images (armel, at least) on teh internetz (BT5 and too many ubuntu, for instance).
Just check so our kernel can mount the filesystem.
Edit: if not you can just create a new image file with a filsystem that's mountable and copy the chroot files to it.
So the ideal image for this tablet is armhf? If I wanted to create a Gentoo image, I would go with armv7? I'm just not sure exactly which ARM architecture this tablet is.
EndlessDissent said:
So the ideal image for this tablet is armhf? If I wanted to create a Gentoo image, I would go with armv7? I'm just not sure exactly which ARM architecture this tablet is.
Click to expand...
Click to collapse
The CPU is the Tegra 3 if you want to google it and it is an ARMv7 w/ NEON extensions chip. ARMv7 specification requires hardware fp so naturally it is ARMhf.
Nice to hear, keep us updated on your progress. I'm currently running an armel copy of Ubuntu 12.04 but it has problems with some packages and others are armhf only.
When I run linux.sh, I get an error that /sdcard can't be mounted because it doesn't exist.
Code:
mount: mounting /sdcard on /data/local/mnt/linux/sdcard failed: No such file or directory
I also tried changing the script to mount /mnt/sdcard, but that didn't work either.
EndlessDissent said:
When I run linux.sh, I get an error that /sdcard can't be mounted because it doesn't exist.
Code:
mount: mounting /sdcard on /data/local/mnt/linux/sdcard failed: No such file or directory
I also tried changing the script to mount /mnt/sdcard, but that didn't work either.
Click to expand...
Click to collapse
Yes, it is somewhat hackish, like I wrote. My image has got an sdcard folder (/sdcard) inside of it where I mount /sdcard from android. (Ie chroot and mkdir /sdcard)
followed this:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-rooted-transformer-prime/
make sure you have busybox installed der. Or at least the cp command in /system/bin
works well on my TF300T, Yea its not native but im currently configuring it for kernel building ;-D
FlyingPoo said:
followed this:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-rooted-transformer-prime/
make sure you have busybox installed der. Or at least the cp command in /system/bin
works well on my TF300T, Yea its not native but im currently configuring it for kernel building ;-D
Click to expand...
Click to collapse
Why does the mount script remount a non-existing block device with an ancient (according to android) filesystem?
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Edit: I read all the scripts, and they all mount that crap. It's not made for transformers, and on the android device it's made for it leaves /system mounted rw after you've run it, and WHEN run (installed) it modifies too much in /system/bin
Code:
# At first it copies loads of crap to /system/bin, and then:
cd /system/bin/
chmod 4777 *
It's not even "hackish" - it's just... wrong...
Will loop1 work every mount?
Code:
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1
I'm almost only asking, since this thread was supposed to be about scripts?
gasingvar said:
Yes, it is somewhat hackish, like I wrote. My image has got an sdcard folder (/sdcard) inside of it where I mount /sdcard from android. (Ie chroot and mkdir /sdcard)
Click to expand...
Click to collapse
Thanks. I created /sdcard, and it works almost perfectly now. However, mounting devpts at /dev/pts doesn't seem to work. I replaced that line with
Code:
mount --bind /dev $mnt/dev
and it seems to work fine. Is there anything wrong with my method?
/dev/void said:
Why does the mount script remount a non-existing block device with an ancient (according to android) filesystem?
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Edit: I read all the scripts, and they all mount that crap. It's not made for transformers, and on the android device it's made for it leaves /system mounted rw after you've run it, and WHEN run (installed) it modifies too much in /system/bin
Code:
# At first it copies loads of crap to /system/bin, and then:
cd /system/bin/
chmod 4777 *
It's not even "hackish" - it's just... wrong...
Will loop1 work every mount?
Code:
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1
I'm almost only asking, since this thread was supposed to be about scripts?
Click to expand...
Click to collapse
I'm assuming you're talking about the link in the post you quoted, even though you seem to be referencing the OP's use of the word "hackish". The script in the OP doesn't do any of that stuff. It just creates a few directories in /data/local/mnt/ and writes the mount/unmount scripts, which themselves only un/mount appropriate directories for the tablet. As for your question, I'm not nearly experienced enough to answer it. Sorry.
EndlessDissent said:
Thanks. I created /sdcard, and it works almost perfectly now. However, mounting devpts at /dev/pts doesn't seem to work. I replaced that line with
Code:
mount --bind /dev $mnt/dev
and it seems to work fine. Is there anything wrong with my method?
Click to expand...
Click to collapse
AFAIK your mount seems to be more complete, ie more android hardware goodies accessable from the chroot environment. However - that means more things possibly going wrong (like writing to a device who's critical to the android environment).
Personally I'd try to find what "hardware goodies" and whatnot I'd need to get the chroot environment working optimally, and not mount ALL of /dev.
EndlessDissent said:
I'm assuming you're talking about the link in the post you quoted, even though you seem to be referencing the OP's use of the word "hackish". The script in the OP doesn't do any of that stuff. It just creates a few directories in /data/local/mnt/ and writes the mount/unmount scripts, which themselves only un/mount appropriate directories for the tablet. As for your question, I'm not nearly experienced enough to answer it. Sorry.
Click to expand...
Click to collapse
Yes, and the OP is very honest about his script(s) being "hackish", which I interpret to mean 'not optimal, possibly redundant but working', all of which it is (and I applaud the early release, since for instance I could get things rolling), but the ubuntu image installation and mounting scripts from the other poster ( whom I was addressing ) are plain faulty.
I am looking for a armhf build of ubuntu or debian that I can chroot (newer the better), if anyone knows of such a build that would be fantastic but if not does anyone know of an easy to follow guide to compile such a thing?
I found two pretty good guides. I mostly followed THIS ONE, but I found that it doesn't mount enough before "first boot", so what I did was follow the guide until the point where you move the image to the tablet. Then I ran the OP's installlinux.sh script, and then the mount script. However, the mount/unmount scripts need to be edited before using them. Comment out the sdcard line and probably the devpts line (mounting devpts didn't work; Bash complained that devpts didn't exist; I had to replace it with the line I mentioned a few posts above, but as /dev/void says, it could be problematic, so be careful). Mount the image, make the /sdcard directory, exit, unmount, and edit the scripts again to mount/unmount /sdcard.
Next time you enter the chroot, feel free to run the
Code:
sh /debootstrap/debootstrap --second-stage
command to build the image, and follow the linked guide until the next time it tells you to exit the session (NOTE: The second echo "whatever" > sources.list command is wrong; it should be echo "whatever" >> sources.list; Also, remember to replace "squeeze" with the appropriate Debian version, in my case, "testing"). Instead of exiting right after the apt-get update, I'd recommend playing around with the chroot and configuring whatever apps you install. You can just use the OP's scripts now and ignore the script in the linked guide.
When the guide I linked above gets to this line:
Code:
sudo debootstrap --verbose --arch armel --foreign squeeze /mnt/squeeze/ http://ftp.debian.org/debian
just replace armel with armhf, and if you want a testing image, replace squeeze with testing.
Sorry I'm not attaching my image. I made it gigantic (5GB), so I don't really have anywhere to store it, and you probably wouldn't want to download a file that big. Plus, it already has Openbox and a bunch of other things you probably don't want installed. I'm assuming you'd want GNOME or KDE instead.

[Q] FUSE (Filesystem in Userspace) module for Nook Color? Compatibility, injection?

I'm surprised I couldn't find any real information or discussion on the FUSE module/fuse.ko module injection for the Nook Color.
It's a required component of programs, such as Cryptonite, to do on-the-fly mounting of file systems within an Android system, and also to be able to mount NTFS volumes additionally in a USB OTG scenario..
I've searched google, searched through the XDA threads and posts, and the only thing I found with any pertinent information regarding FUSE and the Nook Color was here-- and actually includes the fuse module in it, zipped and contains within the fuse.ko module to inject.
[14 Apr 2012][USER/DEV] USB Host Support & Development [CM7/CM9]
http://forum.xda-developers.com/showthread.php?t=1459892
(second post, attachment at bottom)
So can someone please give me the run down on the current status of FUSE within the kernels and roms currently existing on the Nook Color, must it be manually injected, are kernels set-up to properly use the module?
It seems easy enough to implement, but I'm no real developer, am I just missing something?
With regards to the fuse.ko module attachment in the above thread, I've downloaded the 'fuse.ko' module and placed it on the root of my sdcard, and attempted to load it in on my CM7 rom.
Just SU'd in terminal emulator, output was
# insmod /sdcard/fuse.ko
#
Click to expand...
Click to collapse
and also tried copy and pasting 'fuse.ko' from my sdcard to /system/lib/modules and doing an 'insmod /system/lib/modules/fuse.ko', and it just simply enters it in with a '#' after.
But that doesn't seem to be working. 'lsmod' doesn't output anything, the mount feature is still not working after testing, so it seems it wasn't actually injected properly.
Any suggestions, information someone can provide, would love to get the module inserted and mounting working properly.
Thanks!
Some more digging and experimenting I came across this post which explains similarities (with another android phone) not being able to do the same thing I'm doing, except within the replies there seems to be some basis for support for getting this up, as the terminal commands to check on the fuse module is outputting some commands.
http://code.google.com/p/cryptonite/issues/detail?id=17&can=1&q=fuse.ko
A member trying to provide support for the issue told the poster to input the following commands to get a more in-depth overview of why FUSE support was not working.
Thanks for the bug report. On a root terminal or adb root shell, what's the output of the following commands:
gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
losetup -f
ls -l -a /dev/fuse
ls -l -a /system/lib/modules
Click to expand...
Click to collapse
Now, when I attempt the above commands in my CM7.2, this is my output
$ su
# gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
gunzip: : No such file or directory​# CONFIG_FUSE_FS is not set​# losetup -f
/dev/block/loop1​# ls -l -a /dev/fuse
crw------- 1 root root 10, 229 Apr 7 22:53 /dev/fuse​# ls -l -a /system/lib/modules
drwxr-xr-x 2 root root 4096 Apr 7 22:18 .
drwxr-xr-x 2 root root 8192 Apr 7 07:52 ..
---xrwxr-x 1 system sdcard_rw 75046 Apr 7 22:18 fuse.ko​
Click to expand...
Click to collapse
So there seems to be SOMETHING there..
Hope this helps, any suggestions/input would be greatly appreciated!
echoedge said:
Some more digging and experimenting I came across this post which explains similarities (with another android phone) not being able to do the same thing I'm doing, except within the replies there seems to be some basis for support for getting this up, as the terminal commands to check on the fuse module is outputting some commands.
http://code.google.com/p/cryptonite/issues/detail?id=17&can=1&q=fuse.ko
A member trying to provide support for the issue told the poster to input the following commands to get a more in-depth overview of why FUSE support was not working.
Now, when I attempt the above commands in my CM7.2, this is my output
So there seems to be SOMETHING there..
Hope this helps, any suggestions/input would be greatly appreciated!
Click to expand...
Click to collapse
I don't know about fuse in the kernel, but CM10 /CM10.1 uses the fuse command to mount the embedded sdcards in emmc. Some devices like the HD/HD+ have the internal sdcard as just a part of /data so they need fuse to mount the internal SD. It is a command at /bin/sdcard. If you look at init.xxx.rc (where xxx is your device) in CM10 you will see how it is used. Then look at mount after boot and you will see the /dev/fuse mount. I'm not sure if it is actually used in encore.
Sent from my Nook HD+ running CM10 on Hybrid SD
leapinlar said:
I don't know about fuse in the kernel, but CM10 /CM10.1 uses the fuse command to mount the embedded sdcards in emmc. Some devices like the HD/HD+ have the internal sdcard as just a part of /data so they need fuse to mount the internal SD. It is a command at /bin/sdcard. If you look at init.xxx.rc (where xxx is your device) in CM10 you will see how it is used. Then look at mount after boot and you will see the /dev/fuse mount. I'm not sure if it is actually used in encore.
Sent from my Nook HD+ running CM10 on Hybrid SD
Click to expand...
Click to collapse
That's interesting, because the next thing I was wondering about was how to do this on CM10. I don't have enough technical knowledge of the deep file system and module system/actions to make clear judgment on this issue, if the above is the case (which I'm sure it is since I've been around long enough to know that you know your stuff), then I don't know why it's not working by default to mount file systems. Same program.. was going to try to inject it somehow, or at least check the command line feedback on it to perhaps get a clue. If I get a chance I'll post the response, unless someone has some knowledge on it that can help?
But yeah, backing up, apparently what I did WAS succesful. The fuse module was injected (CM7.2).
But it's not a default start-up module. I have to manually do a terminal emulation and input
modprobe fuse
Click to expand...
Click to collapse
And it is working fine :good:
So good deal, let's see what's up with this in CM10
OK, CM10 is a bit different, here's the run-down.
Again, these commands
gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
losetup -f
ls -l -a /dev/fuse
ls -l -a /system/lib/modules
Click to expand...
Click to collapse
The output (BEFORE doing an manual insmod)
$ su
# gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
# CONFIG_FUSE_FS is not set​# losetup -f
/dev/block/loop0​# ls -l -a /dev/fuse
/dev/fuse: No such file or directory​
Click to expand...
Click to collapse
also "modprobe fuse" outputs "module 'fuse' not found"
now downloading the fuse.ko file from the USB OTG thread and putting it on the sdcard and doing a
# insmod /sdcard/fuse.ko
insmod: init module 'sdcard/fuse.ko' failed (Exec format error)​
Click to expand...
Click to collapse
and then trying to place the 'fuse.ko' in the system/lib/modules, a "modprobe fuse" command now doesn't output 'modprobe: module 'fuse' not found', but
modprobe: 'fuse.ko': invalid module format
Click to expand...
Click to collapse
so it appears the 'fuse.ko' isn't compatible with CM10, only CM7/9 possibly?
But then again it looks like there is a version of the module FUSE already embedded in CM10, but it's of a specific variant which doesn't support the userbase filesystems?? There is no /dev/fuse, but doesn't
# gunzip -c /proc/config.gz | grep CONFIG_FUSE_FS
# CONFIG_FUSE_FS is not set​
Click to expand...
Click to collapse
imply that it is there-- just not configured to mount the file system with a program like cryptonite?
I've tried all I know to do right now, any direction in this? Would like to get this working on both roms for cross-compatibility purposes. Am hoping getting it to work in CM10 is just a small tweak away, but maybe not? Anyone with more knowledge than I can share advice on the workings of this within the CM10 system?
Thanks ​
leapinlar said:
I don't know about fuse in the kernel, but CM10 /CM10.1 uses the fuse command to mount the embedded sdcards in emmc. Some devices like the HD/HD+ have the internal sdcard as just a part of /data so they need fuse to mount the internal SD. It is a command at /bin/sdcard. If you look at init.xxx.rc (where xxx is your device) in CM10 you will see how it is used. Then look at mount after boot and you will see the /dev/fuse mount. I'm not sure if it is actually used in encore.
Sent from my Nook HD+ running CM10 on Hybrid SD
Click to expand...
Click to collapse
Yeah, I'm at a loss for what needs to be/could be done.
I don't understand the technicalities of what you're saying leapinlar, sorry, do you care to reiterate?
I'm not sure what you mean by "look at the mount after boot" and you will see /dev/fuse mount, what action is needed to do this?
Is there a fuse.ko in the CM10/CM10.1 file system? If so, where?
The one for CM7/CM9 is just incompatible I'm guessing, so it's saying invalid module format.
What needs to be done is to "modprobe fuse" to activate the module, or something like you were saying above to get it to recognize and make a pathway for /dev/fuse (can you explain again how to enable this?)
Thanks
echoedge said:
Yeah, I'm at a loss for what needs to be/could be done.
I don't understand the technicalities of what you're saying leapinlar, sorry, do you care to reiterate?
I'm not sure what you mean by "look at the mount after boot" and you will see /dev/fuse mount, what action is needed to do this?
Is there a fuse.ko in the CM10/CM10.1 file system? If so, where?
The one for CM7/CM9 is just incompatible I'm guessing, so it's saying invalid module format.
What needs to be done is to "modprobe fuse" to activate the module, or something like you were saying above to get it to recognize and make a pathway for /dev/fuse (can you explain again how to enable this?)
Thanks
Click to expand...
Click to collapse
Go to terminal emulator and type mount. It will display all of the devices mounted. Sometimes on some devices it shows a device /dev/fuse and its properties.
There is no fuse.ko as far as I know. What I was saying is there is a binary file (/system/bin/sdcard) that is invoked during startup to mount the internal sd card via fuse.
I have no clue whether that helps you with your problem or not, I was just telling you that fuse is sometimes used in CM10.
Sent from my Nook HD+ running CM10 on Hybrid SD

F2FS implementation possible?

Is it possible to fully implement f2fs file system? Any details in forums/sites regarding f2fs implementation are pretty outdated.. So with the new nougat and twrp 3.0 is it safe and advisable to take the step? Trivial matter yeah but still thank you for the time!
Gulbuddin said:
Is it possible to fully implement f2fs file system? Any details in forums/sites regarding f2fs implementation are pretty outdated.. So with the new nougat and twrp 3.0 is it safe and advisable to take the step? Trivial matter yeah but still thank you for the time!
Click to expand...
Click to collapse
F2FS /system might not be worthy, as /system should be read-only. What you can do is trying to convert /data and /cache, as there is more read on those partitions.
casual_kikoo said:
F2FS /system might not be worthy, as /system should be read-only. What you can do is trying to convert /data and /cache, as there is more read on those partitions.
Click to expand...
Click to collapse
Then i assume i can safely convert /data and /cache? Any specific tutorial for the op2 or can i refer general ones (other device tutorial available on the web)? If you happen to know any can you please provide the link.. It'll be much helpful!
Gulbuddin said:
Then i assume i can safely convert /data and /cache? Any specific tutorial for the op2 or can i refer general ones (other device tutorial available on the web)? If you happen to know any can you please provide the link.. It'll be much helpful!
Click to expand...
Click to collapse
/!\ Everything will be erase on your phone ! /!\
Please before you do anything, read the full post. Please.​
Code:
#include "disclaimer.h"
#include <stdio.h>
int main()
{
char *disclaimer="Don't take me responsible if your phone explodes. Or if your phone became a banal sheet of paper. Or if this your parents\' phone and they lost everything.\nYou understood me, I take no responsibilities.";
printf("%s", disclaimer);
return(0);
}
Alright, so, let's go.
/!\ All kernel doesn't support F2FS file format /!\
For example, Boeffla's one doesn't not. Do it, and you WILL NOT be able to mount your data partition.
I assume you already have backup your sdcard?
If not:
Code:
adb pull /sdcard /path/to/backup/on/your/pc
This is for Linux, if you're on Windows, replace "/" with " \ " , so:
Code:
adb pull /sdcard C:\path\to\backup\on\your\pc
This operation might be long, it took me around 30-40 minutes to complete.
Next, reboot into recovery. I assume you have latest version installed, which, currently, is 3.0.2-2.
So, you are now in recovery.
Go to "Wipe", "Advanced Wipe", select "Cache" partition, "Change File System", and select "F2FS", and finally "Swipe to change".
/!\ Be aware next step will erase EVERYTHING on your phone /!\
Do same steps for "Data" partition.
OMG, casual_kikoo I don't have anything on my phone. You screwed me up
Click to expand...
Click to collapse
Calm down. we format everything, so normal.
Connect your phone to your PC, and either push a ROM (LineageOS from Grarak for example) with adb to your phone
Code:
adb push lineage-14.1-20170108-UNOFFICIAL-oneplus2.zip /sdcard
or re-push all your /sdcard content
Code:
adb push /path/to/your/sdcard/backup/on/your/pc/ /sdcard
Same thing as backup, change "/" with " \ " if you are on Windows.
OMG casual_kikoo you screwed me twice, WhatsApp can't send or receive pictures after I pushed all my sdcard folder
Click to expand...
Click to collapse
Relax bis, this is a permissions problem. Easily fixable.
Reboot into recovery and plug your phone to your PC;
Code:
chown -R media_rw:media_rw /data/media/
find /data/media/ -type d -exec chmod 775 {} ';'
find /data/media/ -type f -exec chmod 664 {} ';'
restorecon -FR /data/media/
this will restore rights permissions.
Should be enough for you, enjoy.
Edit: Try to install a new ROM instead of restoring a previous backup from TWRP after you did all steps.
If you really want to restore a ext4 backup, go to "Settings", and check "use rm -rf instead of formatting", or while restoring, TWRP will re-format all your partition into ext4 format.
But go for clean flash, always better and will avoid you many problems.
Thank you sooo much!
Does this method also convert the system to f2fs @casual_kikoo
vignesh95 said:
Does this method also convert the system to f2fs @casual_kikoo
Click to expand...
Click to collapse
No, as said it only converts /data and /cache. You can convert /system if you want, just do same steps as above, but select /system instead of /data or /cache. But as I told previously, I think IO operations shouldn't be noticeable as /system is (normally) read-only.
/system can't ne concerted tout F2FS, as ROM you flash after converted will convert it back to EXT4
Actually f2fs works on boeffla kernel. Ive used it personally.
Now Andi doesnt support f2fs and thats a different thing
suraj.das said:
Actually f2fs works on boeffla kernel. Ive used it personally.
Now Andi doesnt support f2fs and thats a different thing
Click to expand...
Click to collapse
On which partition ? 'cause I remembered try it once and /data wasn't mountable on my file explorer (Solid Explorer). Good to know, however, Andi doesn't support F2FS, so if his kernel is flashed on F2FS partition, the person who flashed it is on it own.
casual_kikoo said:
You can convert /system if you want, just do same steps as above, but select /system instead of /data or /cache.
Click to expand...
Click to collapse
No, you can't. Flashing a ROM will format System back to EXT4.
casual_kikoo said:
On which partition ? 'cause I remembered try it once and /data wasn't mountable on my file explorer (Solid Explorer)
Click to expand...
Click to collapse
Works fine for me.
F2FS on data and cache.
I'm on Dirty Unicorns with the latest Boeffla kernel.
casual_kikoo said:
On which partition ? 'cause I remembered try it once and /data wasn't mountable on my file explorer (Solid Explorer). Good to know, however, Andi doesn't support F2FS, so if his kernel is flashed on F2FS partition, the person who flashed it is on it own.
Click to expand...
Click to collapse
/data and /cache
I turned /data and /cache to F2FS like month ago and I didn't have any problems with any ROM I tried. It worked well even with SuperSU.
iCapa said:
No, you can't. Flashing a ROM will format System back to EXT4.
Works fine for me.
F2FS on data and cache.
I'm on Dirty Unicorns with the latest Boeffla kernel
.
Click to expand...
Click to collapse
Oh yes, didn't remembered that, sorry!
iCapa said:
Works fine for me.
F2FS on data and cache.
I'm on Dirty Unicorns with the latest Boeffla kernel.
Click to expand...
Click to collapse
I have tried it too. But boeffla config app doesnt seem to recognized the kernel very well. In fact, says that the app is not compatible (something like that) and then closes. Not option can be configure through the boeffla's app. Do you have the same problem?
seems that F2FS is not working only on OOS 3.x, and it works with boeffla kernel well
xarisCY said:
I have tried it too. But boeffla config app doesnt seem to recognized the kernel very well. In fact, says that the app is not compatible (something like that) and then closes. Not option can be configure through the boeffla's app. Do you have the same problem?
Click to expand...
Click to collapse
Boeffla app on Dirty Unicorns? Yeah, it has SELinux issues caused by Dirty Unicorns, you'd need your SElinux on permissive, right after booting, not while running.
Is there any difference in converting to f2fs via TWRP vs Terminal (ubuntu/windows 10) method ?
I usually go to TWRP > Format Data and start checking all partitions from top to bottom and see if they can be converted to F2FS.
i cant understand the permission part
casual_kikoo said:
/!\ Everything will be erase on your phone ! /!\
Please before you do anything, read the full post. Please.​
Code:
#include "disclaimer.h"
#include <stdio.h>
int main()
{
char *disclaimer="Don't take me responsible if your phone explodes. Or if your phone became a banal sheet of paper. Or if this your parents\' phone and they lost everything.\nYou understood me, I take no responsibilities.";
printf("%s", disclaimer);
return(0);
}
Alright, so, let's go.
/!\ All kernel doesn't support F2FS file format /!\
For example, Boeffla's one doesn't not. Do it, and you WILL NOT be able to mount your data partition.
I assume you already have backup your sdcard?
If not:
Code:
adb pull /sdcard /path/to/backup/on/your/pc
This is for Linux, if you're on Windows, replace "/" with " \ " , so:
Code:
adb pull /sdcard C:\path\to\backup\on\your\pc
This operation might be long, it took me around 30-40 minutes to complete.
Next, reboot into recovery. I assume you have latest version installed, which, currently, is 3.0.2-2.
So, you are now in recovery.
Go to "Wipe", "Advanced Wipe", select "Cache" partition, "Change File System", and select "F2FS", and finally "Swipe to change".
/!\ Be aware next step will erase EVERYTHING on your phone /!\
Do same steps for "Data" partition.
Calm down. we format everything, so normal.
Connect your phone to your PC, and either push a ROM (LineageOS from Grarak for example) with adb to your phone
Code:
adb push lineage-14.1-20170108-UNOFFICIAL-oneplus2.zip /sdcard
or re-push all your /sdcard content
Code:
adb push /path/to/your/sdcard/backup/on/your/pc/ /sdcard
Same thing as backup, change "/" with " \ " if you are on Windows.
Relax bis, this is a permissions problem. Easily fixable.
Reboot into recovery and plug your phone to your PC;
Code:
chown -R media_rw:media_rw /data/media/
find /data/media/ -type d -exec chmod 775 {} ';'
find /data/media/ -type f -exec chmod 664 {} ';'
restorecon -FR /data/media/
this will restore rights permissions.
Should be enough for you, enjoy.
Edit: Try to install a new ROM instead of restoring a previous backup from TWRP after you did all steps.
If you really want to restore a ext4 backup, go to "Settings", and check "use rm -rf instead of formatting", or while restoring, TWRP will re-format all your partition into ext4 format.
But go for clean flash, always better and will avoid you many problems.
Click to expand...
Click to collapse
whether it just needed to be copy paste in the command window
i am a windows user
vignesh95 said:
whether it just needed to be copy paste in the command window
i am a windows user
Click to expand...
Click to collapse
Well, first hello.
Because you know, be polite is one of the first step when talking to someone.
Because you know I right this guide so you could be polite.
Anyway,
Reboot into recovery and plug your phone to your PC, Edit: then in a CMD, launch
Code:
[B]adb shell[/B]
chown -R media_rw:media_rw /data/media/
find /data/media/ -type d -exec chmod 775 {} ';'
find /data/media/ -type f -exec chmod 664 {} ';'
restorecon -FR /data/media/
this will restore rights permissions.
Should be enough for you, enjoy.
Click to expand...
Click to collapse
You are welcome.
sry bro if my reply was rude plzz forgive
casual_kikoo said:
Well, first hello.
Because you know, be polite is one of the first step when talking to someone.
Because you know I right this guide so you could be polite.
Anyway,
You are welcome.
Click to expand...
Click to collapse
i was not in an intention to be rude may be my english could .
whether i can apply the code in the terminal of twrp?

Categories

Resources