Related
Can somebody please explain the difference between these two commands.
1) mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
2) mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
In adb I'm using the latter to mount my system dir as rw. I perform what I have to then issue the next command:
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
But it tells me the device is busy and to try again later. Well it never lets me remount as ro so I just exit, perform a reboot of the phone, and it is back to ro. I can't help think this is not a good way of doing it though. So I was gonna try this other command but don't know what exactly either is or the difference between the two. Anyway some help would be greatly appreciated.
***EDIT***
OK I finally got it to work. Seems you can not enter adb, root, exit adb, then enter adb again, attempt to unroot. The unroot takes and all works until I try to remount as ro, then I get above problem. Now when I root, exit adb, reboot phone, re-enter adb, and attempt to unroot everthing goes as expected with remounting as ro.
So thanks for anybody that at least took a look at the thread. Seems I have it squashed though. If you are wondering I'm testing some things out that is why I'm rooting, and unrooting back to back.
I don't even bother remounting. I just type #reboot. It will remount, by default, when the system starts up.
Str0ntium said:
I don't even bother remounting. I just type #reboot. It will remount, by default, when the system starts up.
Click to expand...
Click to collapse
Yeah that's what I had to resort to, but as I stated. I just can't help think that's not a good practice to get into.
Anyway I found what was causing my trouble and remounting as ro with the previous command works fine.
Sent from my DROIDX using Tapatalk
To answer your question about the difference in the two commands... The yaffs2 or ext3 is the specifying the you're off file system you are mounting as.
overfiendx2 said:
Can somebody please explain the difference between these two commands.
1) mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
2) mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
In adb I'm using the latter to mount my system dir as rw. I perform what I have to then issue the next command:
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
But it tells me the device is busy and to try again later. Well it never lets me remount as ro so I just exit, perform a reboot of the phone, and it is back to ro. I can't help think this is not a good way of doing it though. So I was gonna try this other command but don't know what exactly either is or the difference between the two. Anyway some help would be greatly appreciated.
***EDIT***
OK I finally got it to work. Seems you can not enter adb, root, exit adb, then enter adb again, attempt to unroot. The unroot takes and all works until I try to remount as ro, then I get above problem. Now when I root, exit adb, reboot phone, re-enter adb, and attempt to unroot everthing goes as expected with remounting as ro.
So thanks for anybody that at least took a look at the thread. Seems I have it squashed though. If you are wondering I'm testing some things out that is why I'm rooting, and unrooting back to back.
Click to expand...
Click to collapse
Sent from my DROIDX using XDA App
SysAdmin-X said:
To answer your question about the difference in the two commands... The yaffs2 or ext3 is the specifying the you're off file system you are mounting as.
Click to expand...
Click to collapse
Thanks for the response. Could you explain in more detail. I don't understand what you mean. Again thank you for taking time with such a noob thing.
Sent from my DROIDX using Tapatalk
mount command line options...
"-t <option>"
"t" stands for "type" and <option> = the linux filesystem type. Linux supports many. "yaffs" = "yet another flash file system" (lot's of tongue-in-cheek developers work on linux). "yaffs2" is v2 of this type of file system.
ext3 is a widely used linux file system.
essentially, the filesystem type tells linux how the data is actually organized on the disk.
the /dev/... that follows is the raw device to associate the filesystem type with.
So I take it that the phone or more directly adb can handle either file system? What of the mtdblock4 and mmcblk1p21 entries? I guess i just don't understand how two so different commands can mount/unmount the same folder. Again thank you very much for your time.
Sent from my DROIDX using Tapatalk
well, adb is just a way to open a terminal session on your phone. Think of it like opening a command prompt on windows. So it is the linux OS on your DX that is processing (handling) the command.
The two commands mount different raw devices (that actually are formatted with different filesystems) to the same "/system" mountpoint. In linux, a mountpoint is kind of like a drive letter would be in dos. What's cool about linux is that you can mount a raw device anywhere in the filesystem tree (where the root is specifiied as "/"). Windows provides that same functionality now with it's ability to map devices to folders.
I believe I'm beginning to wrap my head around it. Been fool'n w/ computer for awhile. I really have no excuse to be so illiterate on linux. I really need to just dig in. Any suggested starting points? I really loved dos and miss it so. lol. So I'm thinking I will probably enjoy linux more.
Sent from my DROIDX using Tapatalk
+5 to sleuth's response! I forgot to kinda expand on the rest of the command. Thnx sleuth for filling in the rest.
Sent from my DROIDX using XDA App
Due to a number of requests I have built a flashable .zip that will install a simple cache2cache script for CyanogenMod 6.x and 7.x ROMs.
NAND backup BEFORE you try this!
From user feedback it seems that if you are ALREADY running Apps2sd this causes issues with apps that where installed to the SD card and you will have to remove and re download them. There have been no reports of issues if you flash PRIOR to enabling Apps2sd ...
Per dingermtb: check out post http://forum.xda-developers.com/showpost.php?p=11487856&postcount=58 for an easy fix for Apps2sd.
By using this script the dalvik-cache has been relocated from the internal /data/dalvik-cache/ directory to the internal /cache/dalvik-cache directory. The Eris comes with an internal /cache/ file block of 130mb that is not used much (CyanogenMod does store the cache of system apps in the /cache file block but NOT any apps that are downloaded from the market)! So by moving the dalvik-cache to this free area you now have more space on internal /data/ for apps and over 75mb in internal /cache/ for dalvik-cache. This means that you can probably install close to 75-100 apps WITHOUT having to worry about apps2sd!
This IS NOT a Custom MTD script as I wanted to keep it simple. This solution is not as "ideal" as a Custom MTD scripts work but it is a bit easier, safer, and simpler... Plus it works
How do I know it worked?
So why does my Settings>SD card & phone storage>Internal phone storage only show 150mb or less? This is because this number ONLY reflects the /data/ file block on your phone and does not "see" the /cache/ block that is now being used for dalvik-cache storage.
From adb or Terminal Emulator (you can get it free from the market if your ROM does not already have it) run the follow command:
Code:
df -h
You will see that your /cache partition now is more used and that your /data partition is less used.
Also you can browse to the /cache/dalvik-cache/ folder using your favorite file explorer and see that you now have files starting with "[email protected]" and not just "[email protected]"
What does it do?
Since CyanogenMod already uses an init.d framework that runs during boot on his ROMs it was easy to add a new shell script that would automatically run with the other boot scripts in the /system/etc/init.d/ folder.
This simply adds the following 07cache2cache file to /system/etc/init.d/
Code:
# !/system/bin/sh
#
# Author: zach.xtr Jan 2011
# Moves the /data/dalvik-cache files to largely unused /cache/dalvik-cache location and symlinks
# This code is intended for the ERIS, use on other phones may not work due to predefined file block sizes...
log -p i -t cache2cache "Running cache2cache to move data/dalvik-cache to cache/dalvik-cache...";
# Mount filesystem
/system/xbin/busybox mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# Make sure final /cache/ location is setup correctly
if [ ! -d /cache/dalvik-cache ];
then
log -p i -t cache2cache "/cache/dalvik-cache directory not found, creating and adding permissions...";
/system/xbin/busybox mkdir /cache/dalvik-cache;
/system/xbin/busybox chown 1000:1000 /cache/dalvik-cache;
/system/xbin/busybox chmod 777 /cache/dalvik-cache
fi;
if [ -d /data/dalvik-cache ] && [ ! -h /data/dalvik-cache ];
then
log -p i -t cache2cache "Moving files from /data/dalvik-cache to /cache/dalvik-cache";
/system/xbin/busybox cp -fp /data/dalvik-cache/* /cache/dalvik-cache;
/system/xbin/busybox rm -r /data/dalvik-cache;
log -p i -t cache2cache "Creating Symbolic Link of /cache/dalvik-cache as /data/dalvik-cache";
/system/xbin/busybox ln -s /cache/dalvik-cache /data/dalvik-cache;
/system/xbin/busybox chown 1000:1000 /data/dalvik-cache
/system/xbin/busybox chmod 0771 /data/dalvik-cache
fi;
# Clean up
/system/xbin/busybox mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
How do I remove it?
Since it only adds 1 file all you need to do is delete the /system/etc/init.d/07cache2cache file and reboot your phone. One could use adb or RootExplorer (or similar) file manager.
NOTE: if you have been using this for a while and have installed enough apps and THEN remove it I am not sure what will happen when you reboot... Basically you may not have enough space in the /data file block alone.
awesome i will try this now
Oh my gosh, bless you! This is great.
Downloading and installing onto CELB 4.3 right now...
[edit - Reported phone storage remaining went from 28 MB to 70 MB free. It did restart my phone on the first restart; I'm not sure if that's normal, but things seem to be working fine.]
korben dallas said:
awesome i will try this now
Click to expand...
Click to collapse
Success?
Sent from my ERIS using XDA App
Flash success on floyo 5.0. Gave e another 25 or so MB. Great work!!
Sent from my Floyo using XDA App
Thank you! Works great on my CELB4.2 . Gained an extra 25MB.
Sent from my ERIS using XDA App
Nicely done. Nonsensikal 16.1 went from 17 or 18 megs free to 67 megs. Working fine so far..
Pretty cool. I'm never low on space so I won't need this, but thanks for creating it.
Is it possible for this to cause apps to slow down, since when they try to access the cache it'll be on the (slower) SD card?
However, app2sd is now a little confused, and the apps it thinks are on the sd card cannot be found when I try to move them back to the phone. However, they are operable.
Hungry Man said:
Pretty cool. I'm never low on space so I won't need this, but thanks for creating it.
Is it possible for this to cause apps to slow down, since when they try to access the cache it'll be on the (slower) SD card?
Click to expand...
Click to collapse
No
This does not use the SD card in any way; it only redistributes from the INTERNAL /data file block to the INTERNAL /cache file block...
If anything you may gaine a minor permormance improvement as you will have more "working" space...
galbro said:
However, app2sd is now a little confused, and the apps it thinks are on the sd card cannot be found when I try to move them back to the phone. However, they are operable.
Click to expand...
Click to collapse
Hmm...
Are you using the built in Froyo style Apps2sd or the flashable?
Thanks Zach!
I have it on CELBFroyo 4.3. Will this will survive a flash to a later version of the ROM if no wiping happens?
strongergravity said:
Thanks Zach!
I have it on CELBFroyo 4.3. Will this will survive a flash to a later version of the ROM if no wiping happens?
Click to expand...
Click to collapse
No you will have to reflash the .zip even with a no wipe update as it is a /system file
Thank you! When I get some free time I'll flash CELB, test, and report back.
Sent from my Eris using XDA App
I installed onto my phone running Vanilla FroShedyo. It is running like a champ so far and all the apps seems to work as usual. I went from 59.07MB free to 83.14MB! I know I am a minimalist when it comes to apps on my phone but man does it fly now. Thank you for this script and keep up the good work!
44mb to 74mb on nonsensikal v12.5. thanks and gotta love this place called XDA!
58mb to 77mb FroShedYo Vanilla
Linpack pre-script 4.8-5.1
Linpack post-script 4.8
Quadrant pre 380-420
Quadrant post 376
Thanks for the extra space and sharing
Flashed on CELB and lost access to all of my apps on the sdcard. I'm using the built in Froyo apps2sd. Also broke my widgets on the home screens.
magnethart said:
Flashed on CELB and lost access to all of my apps on the sdcard. I'm using the built in Froyo apps2sd. Also broke my widgets on the home screens.
Click to expand...
Click to collapse
Can you try clearing dalvik-cache and rebooting?
zach.xtr said:
Can you try clearing dalvik-cache and rebooting?
Click to expand...
Click to collapse
dalvick wipe did not change anything. still have broken widgets and no access to apps installed on sd.
Hi guys,
I'm really new here, I can't post in this thread: http://forum.xda-developers.com/showthread.php?t=836022
I created a working ubuntu11.04 .img, with unity-2d. I don't know if anybody cares, it was funny to make.
It is just a minimal install with unity-2d and tightvncserver. Really minimal. Firefox, office applications, anything else DOES NOT installed.
However, you can install anything using apt-get install.
I installed wget and nano, because it was needed to configure the vnc. I plan to make a bigger one with all the programs and stuff installed. Maybe tomorrow. Or next week.
How to use: Unzip, rename to ubuntu.img and simply replace the original ubuntu.img with this one. Use root as user/nickname and ubuntu as password, as usual.
Download link to .img:
Download link to the other files needed:
Links tomorrow. "New" .img too.
If you are a mod and you're reading this, please move this post it the thread I linked in the beginning, or anywhere where this post is in its place.
-Sorry for my english.
Please help! Give me additional space by using my referral: http://db.tt/W0knUea
edit1: So, now I've got 10 comments, I don't have to write everything in separate comments. What I've done yet: make some simple script to automatically turn on/off the vncserver (1024x600, tab native res, I found it enough), and get tired of the resource hungriness of unity-2d. I mean it needs about the same CPU power (I guess) as the galaxy tab has, and it needs about 200MB RAM. But this is to run native. The VNC version is far from native, so it's slow as f..., I mean, very slow. Then I looked for a little less resource-hungry desktop environment, and I found lxde. I made an image with that. It's slow too, but much faster than unity-2d. I need to configure it a little more, to be more touch-friendly. And I want to do a few other thing, and write a how to make your own .img file thing. If you want to do it now, here some links, I will write about it sometimes.
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
https://wiki.ubuntu.com/ARM/RootfsFromScratch
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
http://androlinux.com/android-ubuntu-development/how-to-build-chroot-arm-ubuntu-images-for-android/
I also suggest reading mount, umount and rootstock man pages.
This image works quite well. As with every VNC build, its a bit slow and Unity doesn't help that (even in its nice Unity-2d form), but if you want Ubuntu on your Tab this is a pretty sweet image. Ultra-lightweight, too. Nice work, OP!
Firstly, thankyou for not making 10 spam posts just to get this posted in the Development section, shouldnt take you long to get 10 posts under your belt in this thread then I'll move it into the dev section for you
Good job by the way..
how to run this?
http://forum.xda-developers.com/showthread.php?t=836022
It's writen down here.
The link to the files is in the first post.
Do I write 'bootubuntu' in command line instead of 'bootlinux' or do I have to change the filename of 'bootubuntu' file? I guess first of the two is correct, but it's better to ask than to brick
Oh and is the AndroidSDK really needed? I don't see anything about usage of it in instruction....
maslak666 said:
Do I write 'bootubuntu' in command line instead of 'bootlinux' or do I have to change the filename of 'bootubuntu' file? I guess first of the two is correct, but it's better to ask than to brick
Oh and is the AndroidSDK really needed? I don't see anything about usage of it in instruction....
Click to expand...
Click to collapse
Hi!
The SDK is not strictly necessary since you could use a Terminal Emulator to run the necessary commands but using an ADB shell is just bit easier sometimes. That being said, you should install the SDK if you ever want to do much with an Android. It's easy to install and very powerful.
And yes, write bootubuntu instead of bootlinux when prompted. I know what you mean
Allright, I went through it and now got it installed . But I can't see firefox nor any office application... How to access them? Also can't get into terminal to write 'apt-install' there.....
maslak666 said:
But I can't see firefox nor any office application... How to access them?
Click to expand...
Click to collapse
sisa7 said:
Really minimal. Firefox, office applications, anything else DOES NOT installed.
However, you can install anything using apt-get install.
Click to expand...
Click to collapse
I'll write a howto tonight or next day or I don't know. I need to study to university too. You need adb or android terminal emulator (from the market) to use apt. Short version: when your prompt is "[email protected]:/#" simply do this command: "apt-get install firefox"
Just poked around a little. Now I know (or at least I think I now) what else I have to do.
http://dl.dropbox.com/u/41806444/bootubuntu2
Cleaned up version of bootubuntu. Copy it to /sdcard/ubuntu and simply run it. You need to use the sh command, so type "sh bootubuntu2" in android terminal emulator or adb shell in /sdcard/ubuntu foler.
Oh, sorry I forgot to mention, this script only works with overcome kernel and rom. You shold modify the
mount -o remount,rw -t ext4 /dev/block/stl9 /system
and the
mount -o remount,ro -t ext4 /dev/block/stl9 /system
rows. Enter "mount" to android terminal to see your /system dir type and path.
Synaptic looks like to work, software-center doesn't even start.
To really enjoy full linux distros like this, one should have a swap-enabled kernel. Instead, kernel on the Tab has no swap, and if you dare open some large app, the lack of ram makes it slow and unresponsive.
This is the main problem imho.
Ernesto de Bernardis
N900 - Galaxy Tab 7"
sisa7 said:
Oh, sorry I forgot to mention, this script only works with overcome kernel and rom. You shold modify the
mount -o remount,rw -t ext4 /dev/block/stl9 /system
and the
mount -o remount,ro -t ext4 /dev/block/stl9 /system
rows. Enter "mount" to android terminal to see your /system dir type and path.
Click to expand...
Click to collapse
Or keep it simple silly
mount -o remount,rw /dev/block/stl9 /system
mount -o remount,ro /dev/block/stl9 /system
cdesai said:
Or keep it simple silly
mount -o remount,rw /dev/block/stl9 /system
mount -o remount,ro /dev/block/stl9 /system
Click to expand...
Click to collapse
The /dev/block/stl9 part is changing too.
debernardis said:
one should have a swap-enabled kernel. Instead, kernel on the Tab has no swap
Click to expand...
Click to collapse
Thanks. I didn't know this is the problem. I will try out http://forum.xda-developers.com/showthread.php?t=483110 this and see what happens.
@sisa7 do you have any update?
debernardis said:
@sisa7 do you have any update?
Click to expand...
Click to collapse
Yep.
This email is an automated notification from Dropbox that your Public links have been temporarily suspended for generating excessive traffic. Your Dropbox will continue to function normally with the exception of Public links.
This suspension is temporary (3 days for the first time).
Sorry guys. Anybody know a decent upload site?
Also, I'm working on LXDE desktop. But the university makes me busy, so I haven't got too much time. Sorry.
Minus.com
Box.net
Multiupload.com
Is this still alive?
I tried installing the one in the other [MOD] Forum but when I try to install apps to Ubuntu I get a conection "404" error
Do you guys think this image will work?
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.
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?