Why is it that I cannot copy a file from my sdcard to /sys and its subfolders?
I have change permissions for every directory to 0777 and I remounted the file system using
mount -o remount,rw /dev/block/mtdblock3 /
What am I missing?
Stericson said:
Why is it that I cannot copy a file from my sdcard to /sys and its subfolders?
I have change permissions for every directory to 0777 and I remounted the file system using
mount -o remount,rw /dev/block/mtdblock3 /
What am I missing?
Click to expand...
Click to collapse
A brain
/sys is a virtual directory built/populated by the kernel. You can only write to existing files in it (and only selected ones).
You probably want to work on /system but then your command is wrong on the mount point which must be /system, not /.
I am not sure the block device is the right one, I can't check my Dream right now.
Sent from my HTC Vision using xda app-developers app
Wait a second... WTF resurrecting a 2008 thread?!?
I'll report it to a mod asking to delete it.
Sent from my HTC Vision using xda app-developers app
Related
Have an HTC hero with CM7 stable. Been trying to modify sysctl.conf to increase the speed a little (if thats possible, CM7 is fast). I've used the command in ./adb shell and terminal emulator:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
When I type mount it displays /system as a r/w partition but I still can't edit the sysctl.conf file. When I do try to edit, the shell says that the directory doesn't exist (/ect/sysctl.conf).
Even with simpler commands like "adb pull /system/ect/sysctl.conf /" still come back as directory doesn't exist.
What am I doing wrong? Ultimately if I can want to get the sysctl file to my PC to edit and place back on the phone.
Have you tried using something like Root Explorer? While learning & knowing ADB comes in handy, I find most things are easier through Root Explorer. You can just copy the file to your SD card, then to your computer.
EDIT: On second look, you have /system/ect... instead of /system/etc...
I also believe it should be mtdblock4 instead of mtdblock3, but I could be wrong. I'm not good with this kind of stuff.
Type in mount to see what device is currently mounted as /system...I would just double check
Sent from my Droid using XDA App
This command should also work:
Code:
mount -w -o remount /system /system
I typed mount in cmd. Says that /system is in mtdblock3. I will try root explorer and see if it fixes my woes. Thanks.
Hey guys,as somebody had already run ubuntu on g1 and n1 etc. I wonder if we can run it on SG3 or not.
I got nexus one's ubuntu.img and the scripts to boot it.But now I got some trouble.
The way to boot it is to mount the image file into a block device.Such as:
su
mount -o rw,remount /dev/block/stl6 /system
mount -o rw,remount /dev/block/stl7 /data
mknod /dev/block/ubu b 7 0
losetup /dev/block/ubu /sdcard/ubuntu/ubuntu.img
But when I mount ubu to a folder like:"/data/local/ubuntu" as ext2 filesystem it shows no such device.
I thought the kernel didn't support the ext2 fs.I even tried ext4 and rfs.rfs fs shows busy.
Anyone can help me?
I'm in kyrillos' 3.3.
Sent from my GT-I5800 using XDA Premium App
ask this Question in the Q & A thread CLOSED
Hey guys,
Loaded BAMF 1.5 yesterday and have been enjoying the ROM thus far. However, I've been trying to push my custom widget.txt to the \system\customize\ folder so I can have my own power controls in the notifcation bar. I have tried the Mount rw/ro app from the Market, and have also tried mounting rw using adb (mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system).
Each time, when I use the command: adb push widget.txt /system/customize/ I get the error: failed to copy 'widget.txt' to '\system\customize\': Read-only file system
Where am I going wrong?
Seth
sethschmautz said:
Hey guys,
Loaded BAMF 1.5 yesterday and have been enjoying the ROM thus far. However, I've been trying to push my custom widget.txt to the \system\customize\ folder so I can have my own power controls in the notifcation bar. I have tried the Mount rw/ro app from the Market, and have also tried mounting rw using adb (mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system).
Each time, when I use the command: adb push widget.txt /system/customize/ I get the error: failed to copy 'widget.txt' to '\system\customize\': Read-only file system
Where am I going wrong?
Seth
Click to expand...
Click to collapse
I'm pretty sure the TB is using EXT3, not YAFFS2.
Try
Code:
mount -o remount,rw -t ext3 /dev/block/mtdblock3 /system
Even easier, assuming you have busybox. busybox mount isn't as lame as the standard mount which is provided, so you don't have to tell it as much, it can figure things out on its own:
busybox mount -o remount,rw /system
busybox mount -o remount,ro /system
Click to expand...
Click to collapse
even easier.
sysrw
sysro
Doesn't anyone ever read the first post of my rom?
I'm an idiot. Thanks for the ext3 vs yaffs2 reminder.
I'll try busybox at some point also to check
And to Adrynalyne, apparently I didn't read the first post...my bad. Thanks for reading mine, though. I'll pay closer attention in the future.
Seth
My HTC Sensation has a broken SD card reader, and I have been reading about mounting an .img file stored on /data to /sdcard/storage but I've tried with no success. What options are there for having something at /sdcard so I can use apps like the camera? It can't be that hard, right?
If you knew something about android partitions, I would love to hear your advice!
Thanks
ketchup539 said:
My HTC Sensation has a broken SD card reader, and I have been reading about mounting an .img file stored on /data to /sdcard/storage but I've tried with no success. What options are there for having something at /sdcard so I can use apps like the camera? It can't be that hard, right?
If you knew something about android partitions, I would love to hear your advice!
Thanks
Click to expand...
Click to collapse
We can use /data partition space for the sdcard.. But we need to setup.. A loop back device..
I'll try to do it on my phone first.. And when I got it working ill give you the steps to do it.. Stay tuned
Sent from my HTC Sensation 4G using xda premium
ganeshp said:
We can use /data partition space for the sdcard.. But we need to setup.. A loop back device..
I'll try to do it on my phone first.. And when I got it working ill give you the steps to do it.. Stay tuned
Sent from my HTC Sensation 4G using xda premium
Click to expand...
Click to collapse
That would be so amazing of you - thanks.
This is what I've done so far without success on CM10:
Code:
mkdir /sdcard/storage
su
dd if=/dev/zero of=/data/storage.img bs=1024 count=5242880 (1024x1024x5 --> 5Gb)
busybox mkfs.vfat /data.storage.img
losetup -d /dev/block/loop0 (this command prevents the "resource busy" error)
mount -o loop -t vfat /data/storage.img /sdcard/storage
This doesn't work because you need an SD card to link a partition to it. If you try it, make sure you remove your sd card.
ohh you are there almost
couple of pointers here
1. dont delete the existing loop devices (-d is to delete)
2. you need to link the loop device to the file you have created
losetup /dev/block/loopx /data/storage.img (x being the available loop number)
busybox mkfs.vfat /dev/block/loopx
3. reduce the size a bit for the storage.img to around 500MB
4. mount the created loop device to the sdcrad mnt point (/mnt/storage.img)
mount /dev/block/loop0 /mnt/sdcard
5. also if loop0 is busy you can try the other loop devices
like loop1,loop2 etc etc
to check the binding type losetup /dev/block/loopx (x being the loop number)
it should give you details of it
Awesome, I'll try this soon. I'm really glad you've come to my help! What is a phone without external storage
Sent from my HTC Sensation using xda app-developers app
Okay, I get this error when I try to mount the image to /mnt/sdcard.
255|[email protected]:/ # mount -o loop4 -t vfat /data/storage.img /mnt/sdcard
mount: Block device required
Sent from my HTC Sensation using xda app-developers app
ketchup539 said:
Okay, I get this error when I try to mount the image to /mnt/sdcard.
255|[email protected]:/ # mount -o loop4 -t vfat /data/storage.img /mnt/sdcard
mount: Block device required
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
You should use -o loop only not -o loop4
Check my previous post again.. I've re edited it
Sent from my HTC Sensation 4G using xda premium
I'm still getting various errors.
[email protected]:/ # losetup /dev/block/loop4 /data/storage.img
[email protected]:/ # mount -o loop -t vfat /dev/block/loop4 /mnt/sdcard
ioctl LOOP_SET_FD failed: Device or resource busy
I don't think I quite understand what a loop is, and I don't know what I'm doing wrong. Could you give me some clear steps so I can start from scratch? Thanks
Sent from my HTC Sensation using xda app-developers app
ketchup539 said:
I'm still getting various errors.
[email protected]:/ # losetup /dev/block/loop4 /data/storage.img
[email protected]:/ # mount -o loop -t vfat /dev/block/loop4 /mnt/sdcard
ioctl LOOP_SET_FD failed: Device or resource busy
I don't think I quite understand what a loop is, and I don't know what I'm doing wrong. Could you give me some clear steps so I can start from scratch? Thanks
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
You did everything correct except the last step
These are the steps
1. Do dd command as you mentioned initially
2. Give the image a Filesystem... The second command you did initially
3.setup a loop device to it...
losetup /dev/block/loopx /data/storage.img
4.then do a simple mount (this is where you did a mistake earlier)
mount /dev/block/loopx /mnt/sdcard
That's all
Note: you should not mention loop and file system type in the mount command again.. That's what causing the issue
Sent from my HTC Sensation 4G using xda premium
For some strange reason, I can't do a simple mount.
[email protected]:/ # mount /dev/block/loop4 /mnt/sdcard
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Sent from my HTC Sensation using xda app-developers app
ketchup539 said:
For some strange reason, I can't do a simple mount.
[email protected]:/ # mount /dev/block/loop4 /mnt/sdcard
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
Mention the type. And options too
-t vfat -o rw
Sent from my HTC Sensation 4G using xda premium
Okay, so technically it should be mounted at /mnt/sdcard, but the system still can't access it. When I navigate to it with a file explorer it says 'an unknown error has occurred' and no other apps can see it either.
Sent from my HTC Sensation using xda app-developers app
Or else we ditch the complete loop device concept
Do this
1. Using dd make the storage.img
2. Give the files system
3 . Then mount
mount -t vfat -o rw, loop /data/storage.img /mnt/sdcard
Sent from my HTC Sensation 4G using xda premium
---------- Post added at 11:57 AM ---------- Previous post was at 11:09 AM ----------
ketchup539 said:
Okay, so technically it should be mounted at /mnt/sdcard, but the system still can't access it. When I navigate to it with a file explorer it says 'an unknown error has occurred' and no other apps can see it either.
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
Ohh the mount point is the same?
Damn im on sense rom.. I'm not sure how the mount points are defined in cm10
We can find the mount point easily though
Do this
do ll /sdcard
It will give you to what mount point it got linked to
Sent from my HTC Sensation 4G using xda premium
Okay, I suppose you meant 'du’ instead of 'do', because the shell doesnt recognise 'do'. Here is the result:
1|[email protected]:/ # du /sdcard
0 /sdcard
I am very very grateful of your help. If you accept donations I would be more than inclined to give you something for your time.
Sent from my HTC Sensation using xda app-developers app
ketchup539 said:
Okay, I suppose you meant 'du’ instead of 'do', because the shell doesnt recognise 'do'. Here is the result:
1|[email protected]:/ # du /sdcard
0 /sdcard
I am very very grateful of your help. If you accept donations I would be more than inclined to give you something for your time.
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
the command is not do lol
the command is
ll /sdcard
it will give me the mount path
first we'll get this setup and running ..then we'll think of donations
Haha okay.
[email protected]:/ # ll /sdcard
lrwxrwxrwx root root 2012-09-24 17:54 sdcard -> /storage/sdcard0
Sent from my HTC Sensation using xda app-developers app
ketchup539 said:
Haha okay.
[email protected]:/ # ll /sdcard
lrwxrwxrwx root root 2012-09-24 17:54 sdcard -> /storage/sdcard0
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
see the mount point is different
so the final mount command
is
mount -o remount,rw -t vfat /dev/block/loop4 /storage/sdcard0
if the above not working try simpel mount
mount /dev/block/loop4 /storage/sdcard0
if its still not working then we will try another approach ..let me know
EDIT: check your PM
---------- Post added at 01:08 PM ---------- Previous post was at 12:38 PM ----------
Any Update ?
Another thing to add maybe......
Hi guys,
So before I found your attempts, about 3 weeks ago i attempted much the same, however didnt do the whole dd route.
I just did:
mkdir /data/sdcard and then a
mount -o bind /data/sdcard /sdcard
the only issue with that , that i could pick up was
1. filesystem was not vfat (as data is ext)
2. You have more flexible space to play around with, however that too could interfere with /data requirements
3. Even editing the /etc/fstab didnt allow for persistance between reboots. (just a remount required)
Now for questions:
So i have now gone the dd route, mount works , blah blah... BUT - loop dev gets lost after a reboot. anyway of keeping this setting somehow?
That aside - Bonus Material !!
(havent tested this between reboots yet - but
ln -s /dev/block/loop0 /dev/block/mmcblk1p1
and the phone is overjoyed at seeing the SD card where it expects to find it.
k, well my 2c worth, And thanks for the great insight.
J
So you actually got this working? That's amazing! I'd love to help you keep this between reboots, I have some decent ideas on what to do. Let me just get up and try that last command of yours.
Sent from my HTC Sensation using xda app-developers app
Jim.Morrisby said:
Hi guys,
So before I found your attempts, about 3 weeks ago i attempted much the same, however didnt do the whole dd route.
I just did:
mkdir /data/sdcard and then a
mount -o bind /data/sdcard /sdcard
the only issue with that , that i could pick up was
1. filesystem was not vfat (as data is ext)
2. You have more flexible space to play around with, however that too could interfere with /data requirements
3. Even editing the /etc/fstab didnt allow for persistance between reboots. (just a remount required)
Now for questions:
So i have now gone the dd route, mount works , blah blah... BUT - loop dev gets lost after a reboot. anyway of keeping this setting somehow?
That aside - Bonus Material !!
(havent tested this between reboots yet - but
ln -s /dev/block/loop0 /dev/block/mmcblk1p1
and the phone is overjoyed at seeing the SD card where it expects to find it.
k, well my 2c worth, And thanks for the great insight.
J
Click to expand...
Click to collapse
Okay, as for remounting at boot, add a basic script with the commands to remount the card in /etc/init.d, and call it something like 91sdcard. It should look something like this:
Code:
#!/system/bin/sh
commands and whatever
So first off I tried your basic mounting method, and it actually somewhat worked! I could open the camera app, and it thought I had an sd card, but it still couldn't save photos. I guess this is because of the fie system? I could also create files in it through a file explorer. This is the most success I have got since I started to try make a virtual sd card.
I tried to use ln -s /dev/block/loop0 /dev/block/mmcblk1p1 along with my image file and loop devices, but I couldn't get it working for the life of me. Could you elaborate on how you made it work? Thanks
i want to use INT2EXT in cm9 i followed this tutorial
xpmode said:
INT2EXT+ INSTALLATION TUTORIAL
IF YOU ALREADY HAVE S2E, LINK2SD OR SIMILAR, YOU MUST REPARTITION SD CARD AND FACTORY WIPE
int2ext+ is a relatively new script that instead of making symbolic links(Link2SD) or moving certain partitions(S2E) to sd, extends your internal storage into your ext partition in sd, which means S2E's potential space saving and Link2SD's stability combined together and gives you something to brag about.
PREPARATIONS
Download the latest build of CyanogenMod 9.
Download the latest version of CronMod INT2EXT+ here.
Open CyanogenMod 9 zip.
Navigate to /system/etc/init.d
Open INT2EXT+ zip.
Navigate to /system/etc/init.d
Add the file called 40int2ext in the /system/etc/init.d directory in CM9 zip.
INSTALLATION
Go to recovery, do factory reset and advanced > partition sd card.
Select 1024M for ext(for some reason, I selected 4096 and it only read the first 1GB-ish) and 0M for swap.
Wait until it says Done and goes to menu.
Go to Mounts and Storage.
Select USB storage and connect your phone to your computer.
Copy your modified CM9 zip file to the root of your sd.
Select unmount.
Reflash ROM.
Reboot.
After reboot, go to settings > developer settings > root access and select Apps and ADB.
Go to your adb directory and do adb shell.
Type su.
Then do:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
Reboot.
After reboot, reboot into recovery and flash gapps.zip normally.
Then go to Applications and enjoy your new, extended internal storage.
Click to expand...
Click to collapse
can someone help me how to do adb shell and go to adb directory
Use the directory that you used to root your device.
Hpsgill said:
can someone help me how to do adb shell and go to adb directory
Click to expand...
Click to collapse
Err, now that's funny. To do adb shell, all you have to do is put in the command adb shell
Isn't that funny? xD
What the guide meant for adb directory is the place where the adb.exe file is kept.
So all you have to do is put in cmd:
adb shell
and while you're in shell you just put in those commands:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
After that to close the terminal, type in:
exit
then adb reboot
Hope that helps =)
Chaosgod27 said:
Err, now that's funny. To do adb shell, all you have to do is put in the command adb shell
Isn't that funny? xD
What the guide meant for adb directory is the place where the adb.exe file is kept.
So all you have to do is put in cmd:
adb shell
and while you're in shell you just put in those commands:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
After that to close the terminal, type in:
exit
then adb reboot
Hope that helps =)
Click to expand...
Click to collapse
Thanks
No worries =)
Chaosgod27 said:
No worries =)
Click to expand...
Click to collapse
can u tell me how to use other scripts eg apps2sd,link2sd and their works
Hmm, if you want. Right now I'm a bit busy with work...
Chaosgod27 said:
Hmm, if you want. Right now I'm a bit busy with work...
Click to expand...
Click to collapse
Anytime ,when u r free or pm me
Sent from my HTC Explorer A310 using xda premium
What did you want to know about them? You want to know how to install them or?
Chaosgod27 said:
What did you want to know about them? You want to know how to install them or?
Click to expand...
Click to collapse
Every thing about there scripts I never partation my memory card
Sent from my HTC Explorer A310 using xda premium
Chaosgod27 said:
Err, now that's funny. To do adb shell, all you have to do is put in the command adb shell
Isn't that funny? xD
What the guide meant for adb directory is the place where the adb.exe file is kept.
So all you have to do is put in cmd:
adb shell
and while you're in shell you just put in those commands:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
After that to close the terminal, type in:
exit
then adb reboot
Hope that helps =)
Click to expand...
Click to collapse
Hmmm, you don't need adb for this. Just use terminal emulator on your phone. It comes installed by default on CM9 roms. Or you can search play store for android terminal emulator. The app is by Jack Palevich
Code:
su
mount -rwo remount /system
cd /system/etc/init.d
chmod 644 00banner
chmod 644 90userinit
mount -ro remount /system
Then again, I don't really see why it is necessary to deny execute permissions to these scripts in first place. They are just empty shells - unless they have been modified.
I'm using int2ext4 right now and never really had to...
EDIT: If you want to reverse these changes then
Code:
su
mount -rwo remount /system
chmod -R 755 /system/etc/init.d
mount -ro remount /system
Hpsgill said:
can u tell me how to use other scripts eg apps2sd,link2sd and their works
Click to expand...
Click to collapse
Script details:
a2sd,a2sd+,a2sd++,d2ext,d2ext+,int2ext,int2ext+,int2ext4,int2ext4+ --- forum.xda-developers.com/showthread.php?t=1716124
mount2sd --- forum.xda-developers.com/showthread.php?t=1342387
As of link2sd it uses installrecovery.sh file in /system/etc to mount sd-ext partition. It then moves apps/data/dalvik-cache to sd-ext and places symlinks at the original locations.
Take a look here where i've explained why symlink based apps/scripts should not be used on HTC explorer.
Hit thanks if i helped!:good::good:
sabaatworld said:
Script details:
a2sd,a2sd+,a2sd++,d2ext,d2ext+,int2ext,int2ext+,int2ext4,int2ext4+ --- forum.xda-developers.com/showthread.php?t=1716124
mount2sd --- forum.xda-developers.com/showthread.php?t=1342387
As of link2sd it uses installrecovery.sh file in /system/etc to mount sd-ext partition. It then moves apps/data/dalvik-cache to sd-ext and places symlinks at the original locations.
Take a look here where i've explained why symlink based apps/scripts should not be used on HTC explorer.
Hit thanks if i helped!:good::good:
Click to expand...
Click to collapse
thanks maaaaaan!!!
where is the adb directory?? do we have to install it in our pc or its there in our explorer?
Sent from my HTC Explorer A310e using xda premium
everything i did went well and i checked the internal memory its shows 850mb ... now the problem is when i type adb shell in terminal its say error:device not found ... so what should i do ???