After looking at the file system of the X10 and noticing lots of empty space on the /system partition and the fact I wanted more space for apps but didn't want to use my class 2 SD card (that is already pretty full!), I decided to try moving some of my larger apps and pointing to the new location using symlinks (like what apps2sd does). Got over 70mb extra space and no probs no far. New apps will just be installed in /data/app/ as before.
Goes without saying that you do this at your own risk and to make a backup first!
This hack of course requires root! And busybox installed.
First copy the apk file to /system/app2/ say (/system/app/ is already used for some system apps so I decided not to copy their so I could keep them separate.)
Check this is done correctly (I used root explorer) but if the command completed with no errors it should be ok. May need to mount /system as read/write.
Then delete the original file and create a symlink to the new file. (If the first step was done incorrectly this step will remove the app!)
I used an app called Scripter to read QR codes I generated from http://qrcode.kaywa.com/ (use text mode) with the code I wrote on my PC, just scan your comp screen with phone camera and it gives you the option to execute the text. (Or you could spend hours typing it in by hand.) adb didn't work for step 2 when I tried it (access denied).
If step 1 says access denied use root explorer to mount /system as read write and try again or use adb to copy the apps ("adb shell" then use the "busybox cp /data/app/com.rovio.angrybirds.apk /system/app2/com.rovio.angrybirds.apk" command)
Example with angrybirds:
First find the name of the .apk file (I used root explorer and navagated to /data/app/ and ordered by size) in this case "com.rovio.angrybirds.apk"
Copy it:
busybox cp /data/app/com.rovio.angrybirds.apk /system/app2/com.rovio.angrybirds.apk
Delete old file and create symlink:
busybox rm /data/app/com.rovio.angrybirds.apk
busybox ln -s /system/app2/com.rovio.angrybirds.apk /data/app/com.rovio.angrybirds.apk
I used notepad "find and replace" to change "com.rovio.angrybirds.apk" to the name of a different app and repeated.
Here are the names of the apps I moved (to save you typing out the names, all near the top of the list in terms of size).
com.polarbit.krazyracers.apk
com.rovio.angrybirds.apk
com.skype.raider.apk
com.fring.apk
com.qype.radar.apk
com.galcon.igalcon.apk
Hope this helps people who like me want more space for apps without using their SD card. Any probs ask here and hopefully I or someone else can help.
Shaun
i wonder if this really works
not calling into question what you say but I think in the long run is able to consume more resources (or at least the same) due to the fact that they also use a folder within the system...
just a thought
but hey, if it works ... WOW
I'd like to see it implemented in a sh script, accepting app name to move as a command line argument.
Or, even better - an apk, which lists all apps installed, and does moving selected ones. Should not be difficult to implement.
thanks for this, but can i do it on HTC Wildfire where it could actually matter?
and btw, currently my system folder has 175MB free space, how low do you think would be too low? how much free space really has to be free?
If by more resources you mean phone memory? Then yes it consumes the same amount of memory but as /system is on a different partition it consumes the memory in a different place (kind of like a different hard drive in your comp, google partitioning).
I'd love to make this into an app but have no idea where to start, prob wouldn't be too hard though, just a gui that passes busybox commands to the shell, with maybe some safe guards, say leave 50meg free, check its copied correctly ect, wonder if other phones have free space in /system as well? No idea with the script either or how to build a safeguard if command 1 fails don't do 2 and 3, but if someone can run a script they can prob do this.
Yeah should work on other phones if /system is mounted on a different partition and has free space. Run "df" (without quotes) in terminal or using adb run "adb shell" after you've connected to your phone and then "df" and post your output here and I'll let you know. My phone starts to complain (memory low message in status bar) and drop sms messages (really bad bug/feature!) when I get below 50meg, hence the reason for me doing this.
I tried to do the same thing but use /nand (internal storage) and link is created in /data/app but doesnt appear in drawer
It looks permission are the problem
have you tried Link2SD?
This is the only thing that is simple enough for everyone
Adolf1994 said:
have you tried Link2SD?
This is the only thing that is simple enough for everyone
Click to expand...
Click to collapse
Tried and couldnt have my SD recognize by my tablet after making the second partition.
I really like to make link2sd work but as soon I create the secont FAT32 or ext2 or ext3 card disapear
enotar said:
Tried and couldnt have my SD recognize by my tablet after making the second partition.
I really like to make link2sd work but as soon I create the secont FAT32 or ext2 or ext3 card disapear
Click to expand...
Click to collapse
tablet? what kind of tablet? if you partitioned the card wrong, it could cause unexpected things. I prefer to do it with SuperOS(formerly Super Ubuntu) distro or any kind of Ubuntu.
if that tablet is 2.1 then this should work, but if it's 2.2+ then app2sd is exactly you need.
Adolf1994 said:
tablet? what kind of tablet? if you partitioned the card wrong, it could cause unexpected things. I prefer to do it with SuperOS(formerly Super Ubuntu) distro or any kind of Ubuntu.
if that tablet is 2.1 then this should work, but if it's 2.2+ then app2sd is exactly you need.
Click to expand...
Click to collapse
Tablet: HSG-X5A-G 2.1
I format with a PC with Ubuntu and not recognize I even try with minitool on another PC
I did on ubuntu with 8gb SD Card X6 and gparted:
delete all partition on SD card apply
create a partition (1) of 8gb primary FAT32 apply
resize to 7.5gb this partition apply
create 0.5gb partition (2) with the free space after resize primary FAT32 apply.
set partition (1) active
put the card in tablet
and no detection of the card.
If I delete the 500 meg (2) partition the sdcard is imediately recognize after putting back in the tablet.
I even try second partition with ext2 or ext3 try too formating with clockwork recovery menu.I try too to copy to the new formated SD the dir Android, Android-secure and Lost.Dir...... Nothing work.
The second partition make my SD unrecognizable.
I even try to create a linux swap file of 32 meg and no chance too.
If someone can explain me why?
did you use cwm to format things? for now avoid things like this
if you have root(have you?), then please download irssi connectbot from market, open it, set the pulldown list to 'local' at the bottom and give it a name, enter.
then open the newly created connection, issue these commands and post the results here(with the sd card working):
Code:
$ su <- after this allow superuser access
# mount
Adolf1994 said:
did you use cwm to format things? YES
if you have root(have you?), YES
Click to expand...
Click to collapse
Result with my working 16gb card:
rootfs / rootfs ro 0 0tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
tmpfs /broadcasting tmpfs rw,size=1024k 0 0
/dev/block/mtdblock2 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/ndda1 /nand vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fma
sk=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
if you put in the partitioned card, does Android notifies you to format it or doesn't even do that?
if it notifies you, please try to issue this command as superuser:
Code:
mount /dev/block//vold/179:1 /sdcard -t vfat -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro
Adolf1994 said:
if you put in the partitioned card, does Android notifies you to format it or doesn't even do that?
Click to expand...
Click to collapse
Dont even do that, no message at all
then issue the command anyway, and see if it works, if not, then post the results here
I create the second partition on the card (space was free) as primary and FAT32 put back the card in the tablet.
As the card was not recognize i use PC with adb:
adb remount
adb shell
su
mount /dev/block//vold/179:1 /sdcard -t vfat -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro
I get :
mount /dev/block//vold/179:1 /sdcard -t vfat -o rw,dirsync,nosuid,nodev,noexec,u
id=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset
=iso8859-1,shortname=mixed,utf8,errors=remount-ro
Usage: mount [-r] [-w] [-o options] [-t type] device directory
oh, the sequence that matters!
then type this:
Code:
mount -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro -t vfat /dev/block//vold/179:1 /sdcard
Adolf1994 said:
oh, the sequence that matters!
then type this:
Code:
mount -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro -t vfat /dev/block//vold/179:1 /sdcard
Click to expand...
Click to collapse
Result:
Usage: mount [-r] [-w] [-o options] [-t type] device directorymount -o rw,dirsyn
c,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,c
odepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro -t vfat
/dev/block//vold/179:1 /sdcard
Usage:: not found
Re runing give me this now:
mount -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,
allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=
remount-ro -t vfat /dev/block//vold/179:1 /sdcard
[1] + Stopped (signal) mount -o rw,dirsync,nosuid,nodev,noexec,uid=1000,g
id=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-
1,shortname=mixed,utf8,errors=remount-ro -t vfat /dev/block//vold/...
well, it looks like it's too high for me.
try to find the tablet's subforum and/or another senior member with the same tablet.
hope you can solve it
and please post here the things you found
Thank you very much to try....
Related
If I were to create a 1.5gb fakesd.img ext2 file
done once, on computer
dd if=/dev/zero of=fakesd.img bs=1048576 count=1536
mke2fs -F fakesd.img
--------
done in rootfs-init
losetup /dev/block/loop2 /sdcard/fakesd.img
mount -t ext2 -o noatime,nodiratime /dev/block/loop2 /fakesd
change " symlink /mnt/sdcard /sdcard/ " in rootfs-init.rc
symlink /mnt/sdcard /fakesd/
probably want to avoid changing the external path from /mnt/sdcard/ to anything.. for compatibility sake..
I have my windows stuff on my card. I want android to index as little as possible yet still be able to access my sd card at /sdcard.. Will this work?
I have a feeling that someone is just going to tell me to partition card. I don't feel like it right now..
Partition the card Just kidding, but I like your thinking.
Trying to test it out post boot.. My router has more command line functionality, thanks Google.
Got AdFree installed, but it says it can't find space to write the hosts file.
Using CM7 final on SD card installed with verygreen's method.
Same here
Sent from my PC36100 using XDA App
danbutter said:
Using CM7 final on SD card installed
Click to expand...
Click to collapse
There's your problem.
AdFree probably freaks out when it sees how you have Android setup on your sd card.
It runs flawlessly for me with CM7 emmc.
Paul22000 said:
There's your problem.
AdFree probably freaks out when it sees how you have Android setup on your sd card.
It runs flawlessly for me with CM7 emmc.
Click to expand...
Click to collapse
+1
Agreed, works perfect on emmc
Works fine on my uSD. It just copy the host file to /system/etc/ so running on SD or emmc makes no different.
Confirmed Functional
I used adfree on nightlies in the SD card...decided to install final release on emmc and also didn't have problems.
I'm running CM7 off SD card. Adfree can't find the right mount point to remount.
1) I pulled the Adfree hosts file off another Android device (I attached it in a zip).
2) I then made the NC system partition writeable by using 'adb remount'
3) I pushed the hosts file to the NC: 'adb push hosts /system/etc/hosts'
if step 2) doesn't work, here are manual instructions. You need adb or terminal emulator with root permissions (hence the # that precedes each command):
# alias mount="busybox mount"
# mount
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /mnt/asec type tmpfs (rw,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,mode=755,gid=1000)
/dev/block/mmcblk0p2 on /rom type vfat (rw,noatime,nodiratime,uid=1000,gid=1000,fmask=0117,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,errors=remount-ro)
/dev/block/mmcblk1p2 on /system type ext4 (ro,barrier=1,data=ordered)
/dev/block/mmcblk1p3 on /data type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,nosuid,nodev,noatime,barrier=1,data=ordered)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw)
/dev/block/vold/179:20 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:20 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,size=0k,mode=000)
/dev/block/vold/179:8 on /mnt/emmc type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/dm-0 on /mnt/asec/dk.logisoft.aircontrol-1 type vfat (ro,dirsync,nosuid,nodev,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
The red line is the one we care about. DO NOT PROCEED IF YOURS IS DIFFERENT.
To make it read-write:
# mount -o rw,remount -t ext4 /dev/block/mmcblk1p2 /system
To make it read-only:
# mount -o ro,remount -t ext4 /dev/block/mmcblk1p2 /system
joobu said:
I'm running CM7 off SD card. Adfree can't find the right mount point to remount.
1) I pulled the Adfree hosts file off another Android device (I attached it in a zip).
2) I then made the NC system partition writeable by using 'adb remount'
3) I pushed the hosts file to the NC: 'adb push hosts /system/etc/hosts'
Click to expand...
Click to collapse
Yep, this should work... I still see ads all over though. Same places I don't see them on my Nexus One.
Did this actually work for you? Although really I can't imagine why it wouldn't.
I replaced my hosts file the harder manual way.
Maybe check to see if the hosts file was actually replaced. The hosts file should be around 700 kB
I'm encountering a problem with adfree and the nook color running cm7. I see others have it installed and running fine. First time using this app.
I have downloaded adfree and when i try and download and install hosts by clicking the button it gives me an error stating" unable to locate a partition to remount to write the host files to"
Anybody know whats wrong and how to solve?
Look at my post with the manual instructions.
don't need to, its on my evo that I tether from and I see no ads on the nook or my pc
Fix Permisions
I ran "Fix Permissions" from TWRP touch recovery and that did the trick for me.
Chrooting Linux on Android is a very popular topic, and you can find many tutorials online. I am not going to post a detailed how to here.. but, I will explain the generalized steps for the process! If anyone have any questions or need help, feel free to ask!
Get Root Access on your phone
There are many ways to get root access; Easiest will be using z4root or SuperOneClick ! Rooting is mandatory because: You need to install Busybox; Need to mount file system, etc..
Install SuperUser App from the Market
This application allows you to grant Root access to other applications (when needed). Depending on how you rooted your phone, superuser.apk may be already installed on your phone.
Install Busybox App from the Market
Depending on how you rooted your phone, Busybox may be already installed on your phone. In any case install this app from the market and update your busybox to the latest version. Busybox is a set of commonly used linux commands, which are not available in android by default. Eg: cp, chroot, etc.
Install Connectbot from Android market
Connect bot is a terminal client application for android. There are other alternatives but, I recommend Connectbot! Also Connectbot has SSH support, so if you are installing an SSH server on your Ubuntu, you can connect to it using connectbot and you may totally skip the VNC for GUI. Anyway, note that you need a terminal app to start the chroot daemon!
Install AndroidVNCViewer from Android market
With androidVNCViewer we can get GUI access to our ubuntu! This App works so fine in my Milestone 2 with Ubuntu; It even supports mouse pointer!
Download/build a Linux rootfs for your flavour of linux
Now, you need the Ubuntu/Debian/Other linux file system for your Phone's processor. Like most of the Android phones, Milestone 2 uses an ARM processor. And Ubuntu offers full support for ARM processors. It is so easy to build ubuntu for ARM(OMAP) platform using rootstock/bootstrap method. I used rootstock method for Ubuntu as explained here.
PS: For your first time, make sure you build, "Ubuntu Lucid" (just use the --seed/-s parameter of rootstock command. I was not able to use 11.04(Natty). Once you get Lucid to work, you can surely try yourself for the other versions! )
Create a mountable .img file with a size suited for you
From rootstock, you will get a .tgz file! You will need to convert this to a mountable .img file.
In order to create an empty ubuntu.img file, use the followed command in your ubuntu-desktop's terminal; the last arguement (2048) specifies size of the Ubuntu rootfs (If you need much disk space when you are in ubuntu, use a large value here. Normally 2GB will be sufficient for you; even with GUI/VNC).
Code:
dd if=/dev/zero of=ubuntu.img bs=1MB count=0 seek=2048
Next, format our empty ubuntu.img with a suitable ext2/ext3/ext4 file system!
For Milestone 2, you should use ext3 (I think it does not support ext2). ext4 is supported only in Gingerbird+. So, you should use the appropriate command based on your mobile
Code:
mkfs.ext2 -F ubuntu.img
mkfs.ext3 -F ubuntu.img
mkfs.ext4 -F ubuntu.img
You can find out the suitable file system by opening Connectbot in your mobile and entering the followed command. In the output, look for words ext2/ext3/ext4!
Code:
su
mount
Once you format ubuntu.img with appropriate file system. We should temporarily mount the ubuntu.img in a somewhere and we should extract the armel-rootfs-xx.tgz to it. You can use these commands
Code:
sudo mount -o loop ubuntu.img /mnt
sudo tar -C /mnt -zxf armel-rootfs--xx.tgz
sudo umount /mnt
Download(and modify) or create a Shell script for automatically mounting your Chroot image
This is the most important part, we have to run a set of commands in our android shell to get into the ubuntu. To make things easier, we will write these command-sequence in a shell script, and whenever we need we simple call this script. Cool isn't it?. Basically this is what this script should do:
Code:
1. Check if there exists an ubuntu.img file as we specify in command line
2. Create a loop device with the ubuntu.img - ie. Make android(linux) believe that ubuntu.img is a mountable device.
3. Mount the newly created loop device to a folder. My script mounts the image to /data/local/chrootos
4. Set some environment variables in the shell
5. Mount the [I]devpts, proc, sysfs[/I] for the ubuntu!
6. Run the Chroot command. This command actually changes the root of file system to a new directory we specify. ie. we fake [B]/data/local/chrootos[/B] as the rootfs![B]/[/B]
Create a folder in your Phone's SD Card and copy one or more(If you want to choose between: Debian/Ubuntu/Puppy/etc) .img files and your shell script for booting linux into it.
Create a folder named .chroot in your SD Card. If you have a "." as the first character, this folder will be hidden in the Android File Browser. And will avoid you accidentally modifying these files.
Get into your Phone's Shell through ConnectBot / USB-ADB / Terminal Emulator
Enter su in the terminal to get root access
Remount your Android filesystem to get write access to your phones
By default, the android file system is read only. So in order to write to the files sytem, we have to remount it with the following command.
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Copy your bootscript to /system/bin so that you can easily start your LinuxIf you have downloaded my bootscript, the file name will be bl - short for boot linux. So, once you copied you will have your shell script at /system/bin/bl. Once we copy the shell script to the bin directory, it will work as a shell command.
Start your linux and customize it
If you have done everything correctly so far, you can now boot into your ubuntu.img with the following command. Note that you do not need to specify the full file name "ubuntu.img".
Code:
bl ubuntu
Start your linux and customize it
If Chroot was a success, you will see the ubuntu shell prompt. And then you can start installing more stuff, etc. [email protected]:
Downloads & Screenshots
Screenshots: http://goo.gl/PzVI0
My Shell Script for starting linux: http://goo.gl/il3nJ
My ubuntu.img: Coming SoonPassword
Code:
arunraj.in
Common Errors
The most common error will be when we are dealing with the "loop device". Because, according to the apps installed in your device, there may not be a free loop device available. If you are facing errors, feel free to ask me and I will try and help!
Thanks, man! When I have time I'm gonna try it out.
Sent from my Milestone 2 XDA App
thanks for tutorial. will try this soon
Script didn't work :/
Gongui20 said:
Script didn't work :/
Click to expand...
Click to collapse
Do you get any error message?
Thanks !
It's very interesting.I will try it when I have some free time.
echo "Linux Chrooter: Chroot!"
chroot $mnt /bin/bash
Click to expand...
Click to collapse
/bin/bash didnt exist or something like that.
Gongui20 said:
/bin/bash didnt exist or something like that.
Click to expand...
Click to collapse
I think there was no free loop device available for mounting the image.
could run these commands as root and send me the output(the txt files created)?
Code:
mount > mount-list.txt
losetup -f > losetup1.txt
losetup /dev/block/loop1 /sdcard/.chroot/ubuntu.img > losetup2.txt
losetup1.txt
/dev/loop0
Click to expand...
Click to collapse
mount-list.txt
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk1p21 /system ext3 ro,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/userdata /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/cache /cache ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
tmpfs /tmp tmpfs rw,relatime,size=2048k 0 0
/dev/block/pds /pds ext3 rw,nosuid,nodev,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/preinstall /preinstall ext3 rw,nosuid,nodev,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/com.rovio.angrybirdsrio-1 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-1 /mnt/asec/com.rovio.angrybirds-1 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-2 /mnt/asec/org.xbmc.android.remote-2 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Click to expand...
Click to collapse
losetup2.txt is empty.
Yeap, I faced the same error when I was doing it. If you notice the mount-list.txt, you can see that AngryBirds application is using /dev/block/dm-0 and /dev/block/dm-1. /dev/block/dm-2 is also in use.
You could try this:
Edit the script bl and replace /dev/block/loop1 in the script with /dev/block/dm-3. It might just do the trick.
Hey check this out:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
Works on Asus TF101
Hi
Thanks for the guide. I got it running on my Asus TF101. I had to modify your script slightly :
The /system filesystem is mounted as ext4 (not yaffs)
The /system fs is mounted from /dev/block/mmcblk0p1
/dev/block/mmcblk0p1 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
Apart from that no other changes were necessary.
Need Help!!!!
hi ~ I just put the img file in /sdcard/.chroot/.linux/ ,named ubuntu.img and edited the Script
but when I run the script ,there is a problem in line:
mount -t ext3 /dev/block/loop1 $mnt
it said:
Device or resourc busy
I have tried thousand ways and cost 5 days,but I can't solve it.....
can you help me?
sorry for my poor english...
losetup1.txt
/dev/loop0
I also replace /dev/block/loop1 in the script with /dev/block/dm-5,but I need use command :"mknod /dev/block/dm-5 b 7 0" first.
the error Screenshots and mount
echoeye said:
the error Screenshots and mount
Click to expand...
Click to collapse
Hi,
Which is your Mobile ?
Also -- Did you see reply #7, #8 on page 1 of this thread ?
There is another way to mount it without using the option -oloop
If you look into /dev/block you are going to find 8 loop devices, from loop0 to loop7. As android doesn't use that many loop devices it should be enough. You can mount it like this:
Code:
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop7 /mnt/ubuntu
If your phone doesn't have a free loop device, you can create a new one, like this:
Code:
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop99 /mnt/ubuntu
The problem is you have apps installed to the sd card (and getting mount points busy), when it happens here I just open Titanium Backup and move External apps to internal.
No matter what I tried here, this script wouldn't work... So I used DebOnDroid app from defy forum, and when updated to GB. The app stopped working also, so I moved the ubuntu.img to /data/local/ and mounted from there, works like a charm!
This is the script I'm using /system/bin/buntu:
Code:
export mnt=/data/local/debian
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin
export TERM=linux
export HOME=/root
export USER=root
echo "Linux Chrooter: Setup Networking"
sysctl -w net.ipv4.ip_forward=1
#necessary mount points
busybox mount -o loop $mnt/../debian.img $mnt
busybox mount -t devpts devpts $mnt/dev/pts
busybox mount -t sysfs sysfs $mnt/sys
busybox mount -t proc proc $mnt/proc
#extra mount points
busybox mount -o rw /system $mnt/mnt/s
busybox mount /data $mnt/mnt/d
busybox mount /sdcard $mnt/mnt/sd
echo "Linux Chrooter: Chroot!"
chroot $mnt /bin/bash
umount $mnt/sys
umount $mnt/proc
umount $mnt/dev/pts
umount $mnt/mnt/*
#somehow the commented lines didn't work...
#umount $mnt/mnt/d
#umount $mnt/mnt/s
umount $mnt
PS: when I copy a binary from ubuntu to /system/bin and chmod, it won't exec, why?
Sent from my Milestone 2 XDA App
r2beta0 said:
There is another way to mount it without using the option -oloop
If you look into /dev/block you are going to find 8 loop devices, from loop0 to loop7. As android doesn't use that many loop devices it should be enough. You can mount it like this:
Code:
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop7 /mnt/ubuntu
If your phone doesn't have a free loop device, you can create a new one, like this:
Code:
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop99 /mnt/ubuntu
Click to expand...
Click to collapse
thank you very very very very very very very very very very very very very very very much!!!!
I made it!!!
oh yeah!~~~~
How is this different from using an app like linuxinstaller? Well, apart from doing it manually and the nerdy way of course?
Is it safer? I am intrigued by the possibility of having a working ubuntu in my pocket, but am wondering if I should go this way or try the app.
great guide though... i think this is the push i needed to finally try this.
Nice job! but i got this..
Nice job!
I got this
#bl ubuntu
bl: permission denied
#
;/
I've been looking off and on and having little luck finding the answer. My ultimate goal is to not have the EMMC partitions mounted at all when booting from my CM7 SD card as I have a 32GB card and have plenty of space on it so do not need the 5GB or so that's mounted as /media. I know I can go into the fstab.vold file and change the mounts there that CM7 uses, but what controls which partitions are mounted when connecting it to windows? I either want to alter the EMMC /media partition that's mounted to something else on the SD card (boot maybe? dunno if this is a good idea or not) or remove it from the USB mounting altogether.
- Aerlock
You can remove emmc from vold.fstab and create your own startup script in /data/local/userinit.sh.
Something like: mount /dev/block/mmcblk... /mnt/emmc -t ... -o .........
Note: I am using CM7 and it executes /data/local/userinit.sh at boot. (Look at /etc/init.d/20userinit)
bigsheep123 said:
You can remove emmc from vold.fstab and create your own startup script in /data/local/userinit.sh.
Something like: mount /dev/block/mmcblk... /mnt/emmc -t ... -o .........
Note: I am using CM7 and it executes /data/local/userinit.sh at boot. (Look at /etc/init.d/20userinit)
Click to expand...
Click to collapse
Thanks, I already had that in mind for changing the actual partitions mounted in Android, but what I would like to figure out (and am having absolutely zero luck with) is how to change what shows in Windows/OSX/Linux when I plug it into a USB port. Currently when I connect my Nook I have the sdcard partition show up and the internal media partition show up in windows. I want to change those so that I can get a different partition to who instead of the emmc partition.
- Aerlock
Aerlock said:
Thanks, I already had that in mind for changing the actual partitions mounted in Android, but what I would like to figure out (and am having absolutely zero luck with) is how to change what shows in Windows/OSX/Linux when I plug it into a USB port. Currently when I connect my Nook I have the sdcard partition show up and the internal media partition show up in windows. I want to change those so that I can get a different partition to who instead of the emmc partition.
- Aerlock
Click to expand...
Click to collapse
You can use the samuelhalff Nook Color UMS app to select mapping of partitions to USB
http://forum.xda-developers.com/showthread.php?t=952456
Windows is normally only going to show results for partitions which are formatted as FAT(32) and won't show the ext3/4 partitions used for system and data.
bobtidey said:
You can use the samuelhalff Nook Color UMS app to select mapping of partitions to USB
http://forum.xda-developers.com/showthread.php?t=952456
Windows is normally only going to show results for partitions which are formatted as FAT(32) and won't show the ext3/4 partitions used for system and data.
Click to expand...
Click to collapse
Hrmmm...this works temporarily. I can use this app to change whats mounted but I need to re-run and remount at every disconnect and reconnect. What I really would like to find is the files/config that determines which partitions to mount at the time the Nook is connected to the computer. If I could find that info I'd be a happy Nooker.
- Aerlock
Anybody got an idea where I can look this info up? Or what files I should start poking around in to make these changes? I tried PMing samuelhalff last week and haven't gotten a reply yet.
- Aerlock
Aerlock said:
Anybody got an idea where I can look this info up? Or what files I should start poking around in to make these changes? I tried PMing samuelhalff last week and haven't gotten a reply yet.
- Aerlock
Click to expand...
Click to collapse
I can tell you what you need to change. The partition to mount is stored in /sys/devices/platform/usb_mass_storage/lun0/file. The 'file' is a text file with the partition number in it. For instance, if you wanted to mount the boot partition in emmc you would add "/dev/block/mmcblk0p1" (without the quotes) to the file. Then you could do the same with lun1 to mount something else. After you put the value in the file and save it, just plug in the cable. It will show up as a drive letter. (Do not select the 'turn on USB storage' button that pops up in android, that changes the files to point to /media (emmc) and /sdcard, and when you exit the mode, it clears them to null.)
I leave it to you to figure which partitions to mount and how to change the file when you need it. Remember, Windows can only read fat partitions, which on emmc is /rom (2?), /boot (1) and media (8). /system (5), /data (6), and /cache (7) are all ext and Windows cannot read ext without third party software help.
Not sure why you want to do this. If you are wanting to mount the SD boot partition on an SD installed system, it is ...mmcblk1p1.
leapinlar said:
I can tell you what you need to change. The partition to mount is stored in /sys/devices/platform/usb_mass_storage/lun0/file. The 'file' is a text file with the partition number in it. For instance, if you wanted to mount the boot partition in emmc you would add "/dev/block/mmcblk0p1" (without the quotes) to the file. Then you could do the same with lun1 to mount something else. After you put the value in the file and save it, just plug in the cable. It will show up as a drive letter. (Do not select the 'turn on USB storage' button that pops up in android, that changes the files to point to /media (emmc) and /sdcard, and when you exit the mode, it clears them to null.)
Click to expand...
Click to collapse
Thank you! Thank you! Thank you! I've been trying to find this info off and on for a few months now. I wasn't able to get it to go away with fiddling with the vold.fstab so I knew it was somewhere else but I didn't know where exactly.
So if I were to leave that file blank would it have nothing show up when I connect the NC to windows? Or do I need to do something else to disable the second lun?
leapinlar said:
I leave it to you to figure which partitions to mount and how to change the file when you need it. Remember, Windows can only read fat partitions, which on emmc is /rom (2?), /boot (1) and media (8). /system (5), /data (6), and /cache (7) are all ext and Windows cannot read ext without third party software help.
Click to expand...
Click to collapse
Thanks again, I'd found this out on my own while playing with mounting the various partitions in the vold.fstab but it's helpful to get someone else to confirm my findings.
leapinlar said:
Not sure why you want to do this. If you are wanting to mount the SD boot partition on an SD installed system, it is ...mmcblk1p1.
Click to expand...
Click to collapse
My ultimate goal is to disable the second partition mount in Windows. I only want to have the SD card data partition show up, I want to completely separate the emmc boot from the SD boot. I may also want to add the boot partition from the SD card at a later time so I can do upgrades when I have a computer but no SD card adapter/reader.
Also (just theoretically, for my understanding) would it be possible to add more luns by creating the dirs and files in the /sys/devices/platform/usb_mass_storage/ directory?
- Aerlock
Aerlock said:
So if I were to leave that file blank would it have nothing show up when I connect the NC to windows? Or do I need to do something else to disable the second lun?
Also (just theoretically, for my understanding) would it be possible to add more luns by creating the dirs and files in the /sys/devices/platform/usb_mass_storage/ directory?
Click to expand...
Click to collapse
There are always going to be two drives show up when you plug it in (lun0 and lun1). They are non functional until you press the button to turn on (because the two files are empty). When you press the button the software populates the files with the emmc and sdcard partition locations and the drives become functional.
I'm not sure how to prevent emmc from showing if you want just sdcard. Maybe you can set permissions on one to be all boxes unchecked. But two drives will always show, just one may be non functional. Another option would be to set the two luns to be what you want and set permissions to be read only. Then maybe pushing the button will have no effect.
But two drive letters will always show.
No, there can only be two lun files. It is built into the operating system.
Edit: I am going to experiment and get back to you.
Edit 2: I've got it all fixed for you. I attached a rar file to the board. Just unrar and you will find two files
The first, 55mountsingleSD, will cause just the SD card to mount. The second drive letter should disappear.
The second, 56mount2customdrives, will mount the boot partition of emmc and the SD card. You can edit the file to change which two partitions you want Windows to see.
Place one (only one) of these files in the /system/etc/init.d folder and change its permissions to match the other files in that folder.
When you reboot with one of these files in that folder, the drive(s) are ready for mounting in Windows. All you have to do is plug in your USB cable. The drive(s) should show in Windows automatically. Do NOT select the "Turn on USB storage" button (just hit the back button). If you do, it will unmount emmc and the SD card in CM7 and you will have to go to settings to re-mount them. Also, be sure to "eject" the drives in Windows before disconnecting the cable.
NookColorUMS will not work anymore because I accomplished this by locking the lun files. If you want to use it, just remove the file from init.d or rename it with .bak and reboot and everything will return to normal.
Enjoy
Have you tried this? I'm looking for feedback. BTW, for others interested, this will not work on CM9 since it does not currently support UMS mounting.
leapinlar said:
Have you tried this? I'm looking for feedback. BTW, for others interested, this will not work on CM9 since it does not currently support UMS mounting.
Click to expand...
Click to collapse
Sadly I haven't had a chance to try it. I've got a 2 year old and a sick wife at home so my time has been limited. Good news is the wife is almost back to normal now and I should be able to play with these tomorrow or this weekend.
- Aerlock
P.S. Thanks for the scripts. They'll save me lots of trial and error making my own.
leapinlar said:
Have you tried this? I'm looking for feedback. BTW, for others interested, this will not work on CM9 since it does not currently support UMS mounting.
Click to expand...
Click to collapse
Finally got a chance to try these out between projects at work today.
Here's what I get when I run the 55mountsingleSD script in gscript:
Code:
stderr:
stderr:
stderr:
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun0/file: permission denied
stderr:
stderr:
stderr:
stderr:
stderr:
stderr:
The first time I ran it I got all 'stderr:' lines. I do have a Boot partition mounted in windows after running this script. I haven't checked to determine if its the SD card or the emmc but it appears to be the SD card at first glance.
Here's what I get when I run the 56mount2customdrives script in gscript:
Code:
stderr:
stderr:
stderr:
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun0/file: permission denied
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun1/file: permission denied
stderr:
stderr:
stderr:
stderr:
stderr:
stderr:
Again the first time I ran it I got all 'stderr:' lines. This time I have 2 boot partitions mounted in windows, 1 appears to be the emmc and the other the SDcard.
I also took a look at the /sys/devices/platform/usb_mass_storage/lun(x)/file files and heres what I found in them when I had the USB storage turned on:
Code:
lun0 - /dev/block/vold/179:20
lun1 - /dev/block/vold/179:8
Since you've been so helpful with these scripts I've got some more questions for you.
Where are the settings for the USB storage stored? For example what do I change if I want the 'Turn on USB storage' button to mount the sdcard and boot partitions of my SD card instead of the sdcard and emmc media partitions?
Or how do I disable the USB storage screen from popping up when I connect the USB cable so I can just use the script.
Also how do I unmount the partitions when I'm done in windows? Just delete the contents of those two files?
- Aerlock
Aerlock said:
Finally got a chance to try these out between projects at work today.
Here's what I get when I run the 55mountsingleSD script in gscript:
Code:
stderr:
stderr:
stderr:
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun0/file: permission denied
stderr:
stderr:
stderr:
stderr:
stderr:
stderr:
The first time I ran it I got all 'stderr:' lines. I do have a Boot partition mounted in windows after running this script. I haven't checked to determine if its the SD card or the emmc but it appears to be the SD card at first glance.
Here's what I get when I run the 56mount2customdrives script in gscript:
Code:
stderr:
stderr:
stderr:
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun0/file: permission denied
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun1/file: permission denied
stderr:
stderr:
stderr:
stderr:
stderr:
stderr:
Again the first time I ran it I got all 'stderr:' lines. This time I have 2 boot partitions mounted in windows, 1 appears to be the emmc and the other the SDcard.
I also took a look at the /sys/devices/platform/usb_mass_storage/lun(x)/file files and heres what I found in them when I had the USB storage turned on:
Code:
lun0 - /dev/block/vold/179:20
lun1 - /dev/block/vold/179:8
Since you've been so helpful with these scripts I've got some more questions for you.
Where are the settings for the USB storage stored? For example what do I change if I want the 'Turn on USB storage' button to mount the sdcard and boot partitions of my SD card instead of the sdcard and emmc media partitions?
Or how do I disable the USB storage screen from popping up when I connect the USB cable so I can just use the script.
Also how do I unmount the partitions when I'm done in windows? Just delete the contents of those two files?
- Aerlock
Click to expand...
Click to collapse
Did you read my post? Those scripts were not meant to run in gscript. Thats why you are getting those error messages. They were meant to put in /etc/init.d. They have to be run at boot time to have the right permissions to do things.
The settings for 'turn on' are stored in the operating system program code. You will not be able to change that.
Again, the scripts are not to be run after booting. They run at boot time and are there waiting for you to plug in the cable. When the cable is plugged in, they automatically show up in windows (depending on which script you put in init.d). Just hit the back button when the pop-up comes up to get rid of it. To disconnect the drives in Windows, use the eject command by right clicking on the drive in Windows Explorer. Then unplug the cable and it is ready for next time you plug in. Don't do anything with the files. Just never press the 'Turn on' button, ever. Just hit back to get rid of it.
If you want different partitions to show, edit the script file before you re-boot.
leapinlar said:
Did you read my post? Those scripts were not meant to run in gscript. Thats why you are getting those error messages. They were meant to put in /etc/init.d. They have to be run at boot time to have the right permissions to do things.
The settings for 'turn on' are stored in the operating system program code. You will not be able to change that.
Again, the scripts are not to be run after booting. They run at boot time and are there waiting for you to plug in the cable. When the cable is plugged in, they automatically show up in windows (depending on which script you put in init.d). Just hit the back button when the pop-up comes up to get rid of it. To disconnect the drives in Windows, use the eject command by right clicking on the drive in Windows Explorer. Then unplug the cable and it is ready for next time you plug in. Don't do anything with the files. Just never press the 'Turn on' button, ever. Just hit back to get rid of it.
If you want different partitions to show, edit the script file before you re-boot.
Click to expand...
Click to collapse
I feel stupid now. I did read that the first time. When I went back and got the files to test I just skimmed your post and thought I knew what I was doing. Let me try these again and I'll post the results.
- Aerlock
where are these files in cm 10.1
Hi there,
I'm running CM 10.1 aka 4.2 on a Samsung I9000..I'm wondering if you can point me in the wright direction where these files are stored....
And what to change...
As said in the private message i would like to make my second SDCARD or a folder from it visible on the first sdcard even when I connect to Windows.
Vold.fstap doesn't help me in this case..
Already a big thank you for pointing in the right direction
Is there a posibility to repost the scripts I understand they'll have to be in init.d...
Kind Regards
Guy Forssman
How on Samsung I9000 CM 10.1
With putty as the tool and SSHDroid running as app
I do a "ls /dev/block/vold"
results in 179.0 179.1 179.2 179.8 179.9
"ls /dev/block/platform" results in s3c-sdchi.0 s3c-sdchi.2 s5pc110-onenand
"mount" learns me
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/secure type tmpfs (rw,relatime,mode=700)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
/dev/block/mtdblock3 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock5 on /radio type yaffs2 (rw,relatime)
/dev/block/mtdblock2 on /datadata type yaffs2 (rw,relatime)
/dev/lvpool/system on /system type ext4 (ro,relatime,barrier=1,data=ordered)
/dev/lvpool/userdata on /data type ext4 (rw,nosuid,nodev,noatime,errors=panic,barrier=1,nomblk_io_submit,data=ordered)
/dev/block/mtdblock4 on /efs type yaffs2 (rw,relatime)
]/dev/block/vold/179:9 on /storage/sdcard1 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:1 on /storage/sdcard0 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /storage/sdcard0/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
/dev/block/dm-2 on /mnt/asec/me.shkschneider.dropbearserver-1 type ext4 (ro,dirsync,nosuid,nodev,noatime,barrier=1)
and indeed windows 7 shows me a walkman icon with 2 entrys
SD card
USB storage
The content of the external micro sd card is on the SD card which Windows8 shows
The content of the internal memory is shown on windows8 in the USB storage
The phone itself doesn't shown the usb mount icon
It seems that even after a reboot the settings stay
I did a "setprop persist.sys.usb.config mtp,adb"
"echo /dev/block/vold/179:1 > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file"
"echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file"
Forssound said:
With putty as the tool and SSHDroid running as app
I do a "ls /dev/block/vold"
results in 179.0 179.1 179.2 179.8 179.9
"ls /dev/block/platform" results in s3c-sdchi.0 s3c-sdchi.2 s5pc110-onenand
"mount" learns me
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/secure type tmpfs (rw,relatime,mode=700)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
/dev/block/mtdblock3 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock5 on /radio type yaffs2 (rw,relatime)
/dev/block/mtdblock2 on /datadata type yaffs2 (rw,relatime)
/dev/lvpool/system on /system type ext4 (ro,relatime,barrier=1,data=ordered)
/dev/lvpool/userdata on /data type ext4 (rw,nosuid,nodev,noatime,errors=panic,barrier=1,nomblk_io_submit,data=ordered)
/dev/block/mtdblock4 on /efs type yaffs2 (rw,relatime)
]/dev/block/vold/179:9 on /storage/sdcard1 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/179:1 on /storage/sdcard0 type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /storage/sdcard0/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
/dev/block/dm-2 on /mnt/asec/me.shkschneider.dropbearserver-1 type ext4 (ro,dirsync,nosuid,nodev,noatime,barrier=1)
and indeed windows 7 shows me a walkman icon with 2 entrys
SD card
USB storage
The content of the external micro sd card is on the SD card which Windows8 shows
The content of the internal memory is shown on windows8 in the USB storage
The phone itself doesn't shown the usb mount icon
It seems that even after a reboot the settings stay
I did a "setprop persist.sys.usb.config mtp,adb"
"echo /dev/block/vold/179:1 > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file"
"echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file"
Click to expand...
Click to collapse
If you want those luns to be different, you echo a different /dev/block... to the file instead of the vold locations. Looks like it uses /dev/block/mtdblock with a partition number after it for the interior partitions. Look in /dev/block/platform and those sc3-h... folders and see if it lists partition numbers either for interior or sdcards.
Sent from my HD+ running CM10 on SD with XDA Premium
rest the question
how do i make these commands flash proof?
Already the commands I did made the car find my phone and played the music..
It also played system sounds, my movies etc etc
I just did a
/dev/block/platform # ls
s3c-sdhci.0 s3c-sdhci.2 s5pc110-onenand
/dev/block/platform # cd s5pc110-onenand
/dev/block/platform/s5pc110-onenand # ls
mtdblock0 mtdblock1 mtdblock2 mtdblock3 mtdblock4 mtdblock5 mtdblock6
"cd /dev/block/platform/s3c-sdhc1.0"
"ls"
result by-num mmcblk0 mmcblk0p1 mmcblk0p2
cd /dev/block/platform/s3c-sdhci.2
/dev/block/platform/s3c-sdhci.2 # ls
by-num mmcblk1 mmcblk1p1
So if I only would mount the music folder from my external folder onto a folder on the internal folder?
Or is it easyer to just mount the whole extenal sd card ?
Forssound said:
how do i make these commands flash proof?
Click to expand...
Click to collapse
I'm not sure what you mean flash proof. Do you mean so they stick after flashing a new rom? To do that you need to put the commands in /data. And for that to work, your rom has to support userinit.d or bootcompletehook.sh in /data. Each device is different. Look in your init.d folder and see if it has a script that calls userinit.d. You said you had CM10.1 and usually CM supports userinit.d. Create a folder in /data/local named userinit.d and put your scripts there. They get run right after init.d scripts are run. Be sure to set the script file permissions to execute.
Sent from my HD+ running CM10 on SD with XDA Premium
leapinlar said:
I'm not sure what you mean flash proof. Do you mean so they stick after flashing a new rom? To do that you need to put the commands in /data. And for that to work, your rom has to support userinit.d or bootcompletehook.sh in /data. Each device is different. Look in your init.d folder and see if it has a script that calls userinit.d. You said you had CM10.1 and usually CM supports userinit.d. Create a folder in /data/local named userinit.d and put your scripts there. They get run right after init.d scripts are run. Be sure to set the script file permissions to execute.
Sent from my HD+ running CM10 on SD with XDA Premium
Click to expand...
Click to collapse
I found a init.rc on /data/local/tmp
it's huge
in /system/etc/init.d I found 2 files 00banner and 90userinit
vi 90userinit is this
#!/system/bin/sh
# call userinit.sh and/or userinit.d/* scripts if present in /data/local
if [ -e /data/local/userinit.sh ];
then
log -p i -t userinit "Executing /data/local/userinit.sh";
logwrapper /system/bin/sh /data/local/userinit.sh;
setprop cm.userinit.active 1;
fi;
if [ -d /data/local/userinit.d ];
then
logwrapper busybox run-parts /data/local/userinit.d;
setprop cm.userinit.active 1;
fi;
so it seems that I can make a
/data/local/userinit.d
this file should be executable and what do you advise I put in it?
---------- Post added at 11:01 PM ---------- Previous post was at 10:51 PM ----------
Is it better to use
setprop persist.sys.usb.config mass_storage,adb
or
setprop persist.sys.usb.config mtp,adb
further you talk about the /dev/block/platform and those sc3-h... folders
I found the following
echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file"
Is there a reason to choose to use one above the other?
[How-To] [Link2SD] Solve "mount: No such file or directory" error on stock ROM
I rooted my Galaxy S3 Mini (GT-i8190) (following seedrom193's tutorial), but I'm still on the stock Android ROM.
I was trying to use Link2SD with a correctly partitioned SD card (10GB primary FAT32 + 4GB primary ext2), but got the following error, which showed every time I tried to recreate mount scripts:
"Mount script cannot be created. mount: No such file or directory"
Also, on every reboot, I would get a "Mount warning" from Link2SD, requiring me to "quick reboot" my phone. After that (second) reboot, Link2SD would work correctly, but shortcuts on my home screen to linked apps were missing.
After much googling I figured that maybe the problem was caused by my (stock) ROM not having init.d support. So I used this method to add init.d:
http://forum.xda-developers.com/showthread.php?t=1933849
Init.d worked properly, but I still got the same error in Link2SD. Then, I used Root Explorer to look at my file system (any other root browser would work too I guess) and found the cause. Here's the contents of /data/data/com.buak.Link2SD/files/init-link2sd.sh, which I *guess* is a copy of the script Link2SD is trying to get to run at boot:
Code:
set +e
echo "$(date) mounting..." > $LOG
sleep 4
mount -t ext2 -o rw [COLOR="Red"][B]/dev/block/vold/179:98[/B][/COLOR] /data/sdext2 1>>$LOG 2>>$LOG
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
Apparently, the device node /dev/block/vold/179:98 does not exist, because Android's vold mounting system doesn't automatically mount the second partition of the SD card. This causes the "mount: No such file or directory" error on the first mount command. However, the second mount command (from /dev/block/mmcblk1p2) should work. For some reason, this error seems to keep Link2SD from installing the boot script.
So, I decided to create an init.d script of my own. Using Root Explorer, I created and edited a file named "11link2sd" in /system/etc/init.d/ and inserted the following text:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
This solved the problem for me, and I can now use Link2SD without needing the extra quick reboot. I figured I'd share my solution in case anybody else had the same problem. I do suggest that anybody who tries to do the same thing first check the init-link2sd.sh file for that /dev/block/mmcblk1p2 bit, to make sure it''s the same.
Link2SD 2nd Partition getting full
Hi,
I saw that you are using Link2SD and seems to have a good understanding of the subject. I am new to using Android!
Maybe you could help. I think I properly installed Link2SD and that it is working correctly (I don't know of any way to check that).
When I go into the menu and ask for storage, I get the following: it is in french, but "libres" means "free".
Interne (85% Libres)
/data
Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go
Carte SD (85% Libres)
/storage/emulated/legacy
Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go
Externe SD (98% Libres)
/storage/external_SD
Total: 27,42 Go Utilisés: 516 Mo Libres: 26,92 Go
Carte SD 2nde Partition (9% Libres)
/data/sdext2
Total: 2,34 Go Utilisés: 2,12 Go Libres: 230 Mo
Système (23% Libres)
/system
Total: 1,67 Go Utilisés: 1,28 Go Libres: 407 Mo
Cache (98% Libres)
/cache
Total: 787 Mo Utilisés: 12,58 Mo Libres: 774 Mo
As you can see the 2nd partition is almost full.
Is it possible to remove the SD card, resize the 2nd partition and put it back in the phone without loosing everything?
I am not sure if that can be done with link2sd installed.
Thanks for your help.
Jacques
Hello Jacques,
Your Link2SD seems to be working just fine. Here's how I can tell:
jacques_xda said:
Carte SD (85% Libres)
/storage/emulated/legacy
Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go
Click to expand...
Click to collapse
This is your internal memory, and plenty of it is now empty, probably thanks to Link2SD.
jacques_xda said:
Carte SD 2nde Partition (9% Libres)
/data/sdext2
Total: 2,34 Go Utilisés: 2,12 Go Libres: 230 Mo
Click to expand...
Click to collapse
This is the second partition which you created and which is indeed almost full. Unless you intentionally put other files there (which I assume you didn't, or you'd have known about it ), this partition was filled by Link2SD, with over 2 Gb of data. So Link2SD is working as it should, freeing your internal memory by moving stuff to that second partition.
Now, as for your second question:
jacques_xda said:
Is it possible to remove the SD card, resize the 2nd partition and put it back in the phone without loosing everything?
I am not sure if that can be done with link2sd installed.
Click to expand...
Click to collapse
Yes, but I recommend taking a backup of your SD card first, just to be safe. If your power fails or your card reader is disconnected during re-partitioning, you might lose data.
Assuming you're using Windows, you will need to make sure that MiniTool Partition Wizard is installed first (link can be found here). Also, you will need to have a way to back up the second SD card partition (which I assume contains an ext file system) over to Windows. You can copy over the files using Ext2Fsd, DiskInternals Linux Reader or Ext2explore, or find some program for creating an image of an ext partition in windows.
Then, take these steps:
1. Turn off your phone (and do not turn it on again!)
2. Take your SD card out of your phone and connect it to your computer using a card reader
3. To make a backup, copy everything on both partitions of your SD card to your computer
4. Use Partition Wizard to shrink the first partition on your SD card, and use the resulting unallocated space to expand the second partition (don't forget to press the "Apply" button!)
5. Safe-remove your SD card and put it back in your phone
6. Turn your phone on again
This should enlarge your extra partition without causing any problems with Link2SD. If you really want to be safe, you could use Link2SD to unlink all of your apps before step 1, and re-link them after step 6. Based on the information you provided, you should have just enough internal memory to do so.
Bonne chance!
link2SD resize ext partition
Warre101 said:
Hello Jacques,
Your Link2SD seems to be working just fine. Here's how I can tell:
This is your internal memory, and plenty of it is now empty, probably thanks to Link2SD.
This is the second partition which you created and which is indeed almost full. Unless you intentionally put other files there (which I assume you didn't, or you'd have known about it ), this partition was filled by Link2SD, with over 2 Gb of data. So Link2SD is working as it should, freeing your internal memory by moving stuff to that second partition.
Now, as for your second question:
Yes, but I recommend taking a backup of your SD card first, just to be safe. If your power fails or your card reader is disconnected during re-partitioning, you might lose data.
Assuming you're using Windows, you will need to make sure that MiniTool Partition Wizard is installed first (link can be found here). Also, you will need to have a way to back up the second SD card partition (which I assume contains an ext file system) over to Windows. You can copy over the files using Ext2Fsd, DiskInternals Linux Reader or Ext2explore, or find some program for creating an image of an ext partition in windows.
Then, take these steps:
1. Turn off your phone (and do not turn it on again!)
2. Take your SD card out of your phone and connect it to your computer using a card reader
3. To make a backup, copy everything on both partitions of your SD card to your computer
4. Use Partition Wizard to shrink the first partition on your SD card, and use the resulting unallocated space to expand the second partition (don't forget to press the "Apply" button!)
5. Safe-remove your SD card and put it back in your phone
6. Turn your phone on again
This should enlarge your extra partition without causing any problems with Link2SD. If you really want to be safe, you could use Link2SD to unlink all of your apps before step 1, and re-link them after step 6. Based on the information you provided, you should have just enough internal memory to do so.
Bonne chance!
Click to expand...
Click to collapse
Hi,
Thanks for your response. I have a question: do I need to unmount the SD card before closing the phone and pulling it out?
If the answer is yes, when I put it back and open the phone, will it mount automatically?
Jacques
Hello Jacques,
I think it will re-mount automatically, but don't have any similar experience with my own phone. With my own device, the micro-SD expansion slot is underneath the battery, so I have no choice but to turn off the phone before removing the SD. By consequence, the OS offers no option to unmount the SD card (that I know of at least).
However, once you turn your phone on again, your SD card should be mounted automatically. Have you rebooted (or turned your phone off and then on again) since using Link2SD? If yes, then it's probably fine. I would recommend that you don't unmount your SD card while the phone is running and apps are still linked; your linked apps would probably stop working.
Warre101 said:
Hello Jacques,
I think it will re-mount automatically, but don't have any similar experience with my own phone. With my own device, the micro-SD expansion slot is underneath the battery, so I have no choice but to turn off the phone before removing the SD. By consequence, the OS offers no option to unmount the SD card (that I know of at least).
However, once you turn your phone on again, your SD card should be mounted automatically. Have you rebooted (or turned your phone off and then on again) since using Link2SD? If yes, then it's probably fine. I would recommend that you don't unmount your SD card while the phone is running and apps are still linked; your linked apps would probably stop working.
Click to expand...
Click to collapse
Hi,
I closed the phone and took off the SD card without any problem.
I made an image of the content with ext2explore.
I then use MiniTool Partiton to try to extend the ext4 partition. The problem is there: MiniTool Partition cannot handle the job!
On the SD card, I have one FAT32 Partition and one ext4 linux patition. MiniTool can resize the FAT32 partition, leaving an unallocated space between the FAT32 and the ext4 partition, but it cannot resize the ext4 partition to take advantage of the unallocated space! I can move the ext4 partition closer to the FAT32, leaving the unallocated space at the end; that is all I can do with MiniTool.
Of course I could delete the ext4 partition and create a new one, using all the unallocated space. But then , will I be able to load the ext4 image I created before in that new partition, since it is not the same size? When ext2explore create an image, does it make a clone of the partition (content, size, etc...) there is no explanation or help on that product!
I will try with Gparted to see what it does and try to simply copy the content of the ext4 partition instead of creating an image.
Thank again for helping.
Jacques
Hello Jacques,
That's odd. I did almost exactly the same thing you described here (except for using ext2 rather than ext4) and was able to resize my ext2 partition using Partition Wizard. I first shrunk the FAT32 partition, then moved and resized the ext2 to use all the unallocated space. Have you tried first pressing apply after you shrink the fat32 and move the ext4? In any case, GParted should also work.
I can't help you with ext2explore as I have no direct experience with that program. You might be able to get some help in other parts of this forum.
If you want to try deleting that ext4 partition and creating a new one, you may be able to do this by first unlinking your apps back to your internal memory in Link2SD (as I suggested in an earlier post), re-partitioning and then re-linking with Link2SD.
Warre101 said:
Hello Jacques,
That's odd. I did almost exactly the same thing you described here (except for using ext2 rather than ext4) and was able to resize my ext2 partition using Partition Wizard. I first shrunk the FAT32 partition, then moved and resized the ext2 to use all the unallocated space. Have you tried first pressing apply after you shrink the fat32 and move the ext4? In any case, GParted should also work.
I can't help you with ext2explore as I have no direct experience with that program. You might be able to get some help in other parts of this forum.
If you want to try deleting that ext4 partition and creating a new one, you may be able to do this by first unlinking your apps back to your internal memory in Link2SD (as I suggested in an earlier post), re-partitioning and then re-linking with Link2SD.
Click to expand...
Click to collapse
Hi,
It is realy odd! I created that ext partition with the same tool! Now I can move it, but not resize it....I will try with Gparted with my old computer running Linux (Ubuntu)...later on, expecting it will work fine.
Thanks again,
Jacques
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
ankit gaur said:
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
Click to expand...
Click to collapse
Hi,
Try to mount with ext2 instead of ext4. I had the same problem trying to mount with ext2; I then try with ext4 and it worked|
Regards,
Jacques
ankit gaur said:
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
Click to expand...
Click to collapse
jacques_xda said:
Hi,
Try to mount with ext2 instead of ext4. I had the same problem trying to mount with ext2; I then try with ext4 and it worked|
Regards,
Jacques
Click to expand...
Click to collapse
That looks exactly like the problem I had. I suggest you first try Jacques' idea (changing ext2 into ext4 or vice versa) and if that doesn't work, use the method I put in the very first post. Let us know if you have any problems with that...
Been trying to get link2sd to work for awhile now
My init-link2sd.sh file looks a bit different though. For me, it looks like:
set +e
echo "$(date) mounting..." >$LOG
sleep4
mount-t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>
$LOG
mount -t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/mmcblk1p2 /data/ sdext2 1>>$LOG 2>>
$LOG
Mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
Whenever I try to use Link2SD, it gies me the "mount: No such file or directory error," would you be able to help me?
A couple of things stand out to me; I'll go through the script you posted step by step:
FinalFreeze said:
set +e
echo "$(date) mounting..." >$LOG
sleep4
Click to expand...
Click to collapse
A space is missing between "sleep" and "4". Was it lost in copy-pasting?
FinalFreeze said:
mount-t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>
$LOG
Click to expand...
Click to collapse
I expected this to be on a single line like this:
Code:
mount-t [B]vfat[/B]-o rw,uid=1000,gid=1000,unmask=133,dmask=0002 /dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>$LOG
Is it like that in your file?
Anyway, I notice the second argument in the mount command is "vfat". If you use the "recreate mount scripts" in Link2SD, which option do you use for the file system? Does it correspond to the way your SD card is partitioned? I used EXT2.
FinalFreeze said:
mount -t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/mmcblk1p2 /data/ sdext2 1>>$LOG 2>>
$LOG
Click to expand...
Click to collapse
This is the information you would need to follow the tutorial that I posted. You could try putting the following in an init.d script:
Code:
#!/system/bin/sh
sleep 4
mount -t [B]ext2[/B] -o rw,uid=1000,gid=1000,unmask=133,dmask=0002 /dev/block/mmcblk1p2 /data/sdext2
Note that I'm assuming here that your SD card uses an EXT2 partition, as shown in bold.
FinalFreeze said:
Mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
Click to expand...
Click to collapse
The last line (starting with chmod) is something I haven't seen before. If you create your own init.d script, you may need to add the same line.
Warre101 said:
I rooted my Galaxy S3 Mini (GT-i8190) (following seedrom193's tutorial), but I'm still on the stock Android ROM.
I was trying to use Link2SD with a correctly partitioned SD card (10GB primary FAT32 + 4GB primary ext2), but got the following error, which showed every time I tried to recreate mount scripts:
"Mount script cannot be created. mount: No such file or directory"
Also, on every reboot, I would get a "Mount warning" from Link2SD, requiring me to "quick reboot" my phone. After that (second) reboot, Link2SD would work correctly, but shortcuts on my home screen to linked apps were missing.
After much googling I figured that maybe the problem was caused by my (stock) ROM not having init.d support. So I used this method to add init.d:
http://forum.xda-developers.com/showthread.php?t=1933849
Init.d worked properly, but I still got the same error in Link2SD. Then, I used Root Explorer to look at my file system (any other root browser would work too I guess) and found the cause. Here's the contents of /data/data/com.buak.Link2SD/files/init-link2sd.sh, which I *guess* is a copy of the script Link2SD is trying to get to run at boot:
Code:
set +e
echo "$(date) mounting..." > $LOG
sleep 4
mount -t ext2 -o rw [COLOR="Red"][B]/dev/block/vold/179:98[/B][/COLOR] /data/sdext2 1>>$LOG 2>>$LOG
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
Apparently, the device node /dev/block/vold/179:98 does not exist, because Android's vold mounting system doesn't automatically mount the second partition of the SD card. This causes the "mount: No such file or directory" error on the first mount command. However, the second mount command (from /dev/block/mmcblk1p2) should work. For some reason, this error seems to keep Link2SD from installing the boot script.
So, I decided to create an init.d script of my own. Using Root Explorer, I created and edited a file named "11link2sd" in /system/etc/init.d/ and inserted the following text:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
This solved the problem for me, and I can now use Link2SD without needing the extra quick reboot. I figured I'd share my solution in case anybody else had the same problem. I do suggest that anybody who tries to do the same thing first check the init-link2sd.sh file for that /dev/block/mmcblk1p2 bit, to make sure it''s the same.
Click to expand...
Click to collapse
Mount script error
Mount Script cannot be created
Moun Invalid arguement
I've been at this every day for a week i inserted the txt file with ur script rebooted and nothing same old bs script error. PLEASE tell me som1 knows A REAL WORKING FIX.
I've tried fat32/ext2 fat32/ext4 fat32/fat32 The mount DOES NOT EXIST. i have int.d support How do I create the mount? Not just a file directory?
Hi, I have tried the script, but at restart seems not to run because no mount is done, so no partition.
I use CM13. Any ideas? Thank you.
mikeroku said:
Hi, I have tried the script, but at restart seems not to run because no mount is done, so no partition.
I use CM13. Any ideas? Thank you.
Click to expand...
Click to collapse
That's difficult to tell based on the information you provided. Can you look for this file:
Code:
/data/data/com.buak.Link2SD/files/init-link2sd.sh
and post the contents please?
Hey...my problem is mounting the second partition...I've been literally trying since yesterday....no luck using the mini tool to format any of the ext's and lost a lot of time trying different fixes....typing in "cannot mount 2nd partition" on google leaves me with so many results that don't have actual fixes...any help?
Stabbey said:
Mount script error
Mount Script cannot be created
Moun Invalid arguement
Click to expand...
Click to collapse
psantos1091 said:
Hey...my problem is mounting the second partition...I've been literally trying since yesterday....no luck using the mini tool to format any of the ext's and lost a lot of time trying different fixes....typing in "cannot mount 2nd partition" on google leaves me with so many results that don't have actual fixes...any help?
Click to expand...
Click to collapse
Hey guys,
Some time ago my phone started having the exact same problem that Stabbey describes: mounting the second partition no longer works, manually mounting the second partition results in the "Invalid argument" error when running this command in a terminal emulator:
Code:
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
This started happening after I installed an update for busybox and some other apps and then rebooted. Something might have changed in the mount applet of busybox with that update, and that might have broken the mount command. Right now I don't know for sure if this is the case; I haven't figured out how to roll back the busybox update yet. In any case, if I can't manually mount, it certainly won't work on startup with init.d, so I'm stuck for now.
I'm sorry I can't give any of you a solution right now. If anyone else wants to take a crack at it, my problems started after installing busybox 1.25.1, so a version *before* that might work.
大神你好:
这是个非常厉害的好办法!您帮我解决了这个疑难杂症!让我手机重新获得新生,而且问题分析得非常准确。
致敬!
机油
Hi Warre101
thank you so much for your solution!
However, I still have a small issue:
When I created a file in the init.d folder, I ended with a .txt file while the others in that folder have no extension. I wrote the code you mentioned. Then with Universal init.d app, I executed the file, and it worked -> the partition get mounted. But, when I reboot my phone, it is not done automatically: I have the error message on Link2sd, then I have to come back to Universal init.d, execute the script, and come back to Link2sd to see it is mounted. Do you have an idea to have it done automatically?
the init-link2sd.sh file is like this (when the partition in mounted) :
Code:
set +e
echo "$(date)mounting..." > $LOG
sleep 2
mount -t ext4 -o rw /dev/block/vold/public:179_130 /data/sdext2 1>>$LOG 2>>$LOG
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
The partition I created using minitool is in ext4
The 11link2sd.txt file is:
Code:
#!/system/bin/sh
sleep 2
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2
Then in /data I got a new file link2sd-boot-receiver-mount.log:
Code:
Tue Oct 24 09:47:50 CEST 2017 mounting...
mount: No such file or directory
rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resuid=10010,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/protect1 /protect_f ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/protect2 /protect_s ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/nvdata /nvdata ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/block/loop1 /su ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/fuse /mnt/runtime/default/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/public:179,129 /mnt/media_rw/319C-76D0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /mnt/runtime/default/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/mmcblk1p2 /data/sdext2 ext4 rw,seclabel,relatime,data=ordered 0 0
Tue Oct 24 09:47:50 CEST 2017 mount finished
I used MiXplorer that I found on thi forum as a file explorer and to create the script file.
I am on Android 6.0, stock ROM but not original (eg when I bought the phone the stock ROM was on Android 5, then I discovered they changed to Android 6 so I downloaded the new stock ROM from the official website and flashed it).
Thank you for your help !