how do i move a file to /system/bin ? - Android Software/Hacking General [Developers Only]

i rooted my verizon galaxy tab and i can run Root apps, but i cant move a wpa_supplicant file to my /system/root using Astro.
Is this a root issue or do i need something better than Astro? I also tried OI file manager but it just says "cannot move file here".

By default, /system is (usually) mounted read-only. You probably need to remount it read-write.

Code:
adb remount /system
adb push [path-to-file] /system/bin
If remount doesn't work, try
Code:
adb shell mount -t yaffs2 -o rw,remount /dev/block/mtdblock3 /system

Related

[Q] How do I get RW in the /system/app?

I'm trying to push an apk there but I can't get permission. I tried using this:
Code:
adb shell mount -t rfs -o remount,rw /dev/block/stl9 /system
but it told me "operation not permitted". I got that code from the one click root.
What am I doing wrong?
When in the sdk tools directory but not in adb do;
adb push C:\file.apk /sdcard/file.apk
then open shell
adb shell
su
mount -t rfs -o remount,rw /dev/block/stl9 /system
now you are mounted. Just move the file
mv /sdcard/file.apk /system/app/file.apk
Thanks
Sent from my SPH-D700 using XDA App

[Q] Problem pushing files to phone

I tried copying files to the system folder but I keep getting "failed to copy, out of memory". Any idea why? I also tried using Root Explorer but despite the pasting animation being displayed, the files were not copied.
I've tried both the terminal emulator
Code:
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cp /sdcard/libt9.so /system/lib
and adb
Code:
adb remount
adb push lib/libt9.so /system/lib/libt9.so
It seems the file has been moved successfully through recovery mode, but I still can't see the file when the phone is booted.

Trouble mounting /system through ADB

I'm having trouble mounting the /system directory on my Captivate. When I try an "adb remount" I get
Code:
remount failed: no such file or directory
When I try to push my framework, I get
Code:
failed to copy 'framework-res.apk' to '/system/framework/framework-res.apk': Read-only file system
I've tried
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock4 /system
and this and get "Permission Denied."
It is confusing, because before when I had this problem, the fix I linked to worked for me. Now I can't get it. Also, I can pull from the /system just fine, but can't push.
I'm definitely rooted, and have Busybox installed.
Thanks in advance!
Bump?
I have read throug tons of guides, but nothing seems to be working. I went back to stock and flashed my rom again, but no luck. Any ideas would be appreciated.
Did you type su first? It acts as if you're not root. /system is readable by everyone so you can pull, but it's only writeable by root so you can't push to it unless you're logged in as root.
I've only used adb once to root my phone so I'm not entirely sure how it should be typed in, but in a terminal you'd just type su and hit enter, then type in your remount command.
Also, for what it's worth, you can shorten it to just: mount -o rw,remount /system
Your method is fine, it's just not necessary to type it all out.
fubaya said:
Did you type su first? It acts as if you're not root. /system is readable by everyone so you can pull, but it's only writeable by root so you can't push to it unless you're logged in as root.
I've only used adb once to root my phone so I'm not entirely sure how it should be typed in, but in a terminal you'd just type su and hit enter, then type in your remount command.
Also, for what it's worth, you can shorten it to just: mount -o rw,remount /system
Your method is fine, it's just not necessary to type it all out.
Click to expand...
Click to collapse
Thanks for the reply.
If I type su in the terminal, this is what I get.
Code:
C:\Android\tools>su
'su' is not recognized as an internal or external command,
operable program or batch file. C:\Android\tools>
However, when in shell, I can get it to recognize su, but it still doesn't like to mount.
Code:
C:\Android\tools>adb shell
$ su
su
# mount -o rw,remount /system
mount -o rw,remount /system
Usage: mount [-r] [-w] [-o options] [-t type] device directory
#

[a510] /system as rw

i am trying to mount /system as rw, but keep running into errors. my tab is rooted and i have superuser elite installed. i have tried from a terminal app from the su prompt (#mount -o remount,rw /system and variations of), from adb shell, and using adb remount, but always get an error. (permission denied, are you root?)
any suggestions?
secondly, i messed up my permissions on both /system and /etc, as i had a similar issue with permissions when i was trying to get root, but forgot to note what they were previous so that i could set them back. i set them both to 755 for now, but if someone could tell me what they are suppose to be that would be appreciated.
Rusty_Gunn said:
i am trying to mount /system as rw, but keep running into errors. my tab is rooted and i have superuser elite installed. i have tried from a terminal app from the su prompt (#mount -o remount,rw /system and variations of), from adb shell, and using adb remount, but always get an error. (permission denied, are you root?)
any suggestions?
secondly, i messed up my permissions on both /system and /etc, as i had a similar issue with permissions when i was trying to get root, but forgot to note what they were previous so that i could set them back. i set them both to 755 for now, but if someone could tell me what they are suppose to be that would be appreciated.
Click to expand...
Click to collapse
Hi,
Try :
adb shell
su
mount -o rw, remount /system
It work fine for me on adb shell and terminal emulator
The command adb shell remount doesn't mount /system as rw
thanks, that put me on the write track. turns out i was getting rw the whole time, but i didnt have write permissions. did chmod 777 /system and it worked, and when i was done i put it back to chmod 755 /system
if anyone has a similar problem, the command 'mount | grep /system' is a great way to check to see if you actually have it mount as rw or not.
before this i tried a couple of the remount apps, as well as the mount as 'rw' option in es file explorer and they always fail to mount, presumably they aren't failing to mount but are running into the same permission issue and can't write

INT2EXT

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 ???

Categories

Resources