[Q] adb push file to /system -> no change [solved] - Desire Q&A, Help & Troubleshooting

Hi,
I have a problem pushing a file to my Desire. ('file' is a placeholder)
Code:
$ adb remount
$ adb push file /system/etc/permissions/file
failed to copy 'file' to '/system/etc/permissions/file': Out of memory
My next thoght: oh, yeah - s-on... switching to recovery.
Code:
$ adb push file /system/etc/permissions/file
166 KB/s (1026 bytes in 0.006s)
Ok, seems to be fine. Rebooting, ls /system/etc/permissions/... what?! no 'file'.
So my problem is: when I push a file to /system/etc all seems to be fine until reboot, then the file isn't there. It's the same for overwriting and adding files.

You didn't mount the system partition the second time.

Code:
$ adb shell mount -w /system
Ok, thank you for your help. Why isn't there an error when I push a file to an unmounted filesystem?

Same situation here.
Can you make steps for me as a reference?
PLEASE HELP ME!!! /___\
ps. sorry for my bad english

Related

[Q] Install busybox

Anyone knows how to install busybox?
I've tried to follow some guides but ends up with:
Code:
215:Desktop ricardo$ adb push busybox /data/local
580 KB/s (1083568 bytes in 1.823s)
215:Desktop ricardo$ adb shell
$ su
# cd /system/xbin
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cat /data/local/busybox > busybox
cannot create busybox: not enough memory
or
$ su
# cd /data/local
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# dd if=/data/local/busybox of=/system/xbin/busybox
/system/xbin/busybox: cannot open for write: Out of memory
or
$ su
# cd /data/local
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# ./busybox cp /data/local/busybox /system/xbin
cp: can't create '/system/xbin/busybox': Cannot allocate memory
same here. cannot write to rw-mounted /system.
sucks
Try my zip file. Woked for me
The only thing that I want to change and I can't is the init.rc file. I tried to mount the / (rootfs) with rw, but every time I restart my device the file is copied, again, from the ramdisk image.
I have the same problem
ricardoft said:
Try my zip file. Woked for me
The only thing that I want to change and I can't is the init.rc file. I tried to mount the / (rootfs) with rw, but every time I restart my device the file is copied, again, from the ramdisk image.
Click to expand...
Click to collapse
What should I do with your files?
Nobody has a solution to this?
I don't think this is a memory issue though, .. added 512mb swap and still it claimed to be out of memory, ..
also I figured maybe hd space .. however when i ln /data/local/tmp/busybox to /system/xbin it had the same error.
I both tried ln from the system and ln from busybox both had same result.
It's not a memory problem! In order to install it you have to be in recovery mode.
Try:
While in recovery mode use adb to connect to our phone. Now transfer the zip file (busybox.zip) to your phone and install it via clockwork recovery -> install zip file -> select my zip file.
can anyone post the proper busybox file cause for some reason the file signature verification failed.
adb push busybox-signed.zip /sdcard/busybox-signed.zip
rebooted phone held down volume button while booting ..
choose recovery, ..
choose install zip from sdcard..
then i see a lot of no and one yes .. so i choose yes but the installation is aborted.
Just install titanium backup and click on 'problems?' at the bottom. It will install BusyBox for you.
it has error during installation at line 4 with your busybox.zip
somethinf like can not chmod
(rooted buzz with stock rom)
Elibongo said:
Just install titanium backup and click on 'problems?' at the bottom. It will install BusyBox for you.
Click to expand...
Click to collapse
Do what this guy said.
titanium install in /sdcard busybox, not in /system/bin (xbin) , so it is not usuable by other apps
i have installed it in during recovery mode in /system/xbin
how now to specify PATH for using commands from it?
kevin2516 said:
Do what this guy said.
Click to expand...
Click to collapse
you have read my mind especially since that isn't free software.
hellysmile said:
i have installed it in during recovery mode in /system/xbin
how now to specify PATH for using commands from it?
Click to expand...
Click to collapse
i think you need to create aliases however why install it in xbin anyways then, .. if you need to create aliases or links in bin.. ?
example
$ ln -s /data/local/tmp/busybox ls
$ ./ls
if it is in a path that is included in PATH executing a command will auto look for it in all directories defined in PATH env so basicly you could just create all the directories under /data/local/tmp/bin
and just then append that to PATH env echo $PATH then append :/data/local/tmp/bin to it and busybox should work as well.
Ofloo said:
you have read my mind especially since that isn't free software.
Click to expand...
Click to collapse
titanium backup is free software... look on the market, there's a free version and a donate version.
i have aliases in /system/xbin
they was created after busybox --instal -s
but in system allready exists some commands like ls => i want to use ls from busbox, not from system
and terminal emulator dont anderstand ^[ likes bindings
is there a definitive way to do this. There seems to be no clear way of doing it.
matpol said:
is there a definitive way to do this. There seems to be no clear way of doing it.
Click to expand...
Click to collapse
Maybe this helps:
fang0654 said:
To install:
1) extract and push busybox to your sdcard, reboot into recovery
2) mount /system
3) if you don't have /system/xbin (you should), create it
adb shell:
# mkdir /system/xbin (if necessary)
dd if=/sdcard/busybox of=/system/xbin/busybox
cd /system/xbin
chmod 755 busybox
./busybox --install .
4) reboot and done
OPTIONAL - before rebooting replace the busybox installed by the root process in /system/bin
1) mv /system/bin/busybox /system/bin/busybox.bak
2) cp /system/xbin/busybox /system/bin/busybox
Click to expand...
Click to collapse
from this site: http://forum.xda-developers.com/showthread.php?t=702634
The above is pretty straightforward. The only thing is you need to download the zip in the other thread and 'busybox' refers to the binary in the zip rather than the whole directory - as I understand it. Correct me if I am wrong but trying the dd command on the dir will not work.
matpol said:
The above is pretty straightforward. The only thing is you need to download the zip in the other thread and 'busybox' refers to the binary in the zip rather than the whole directory - as I understand it. Correct me if I am wrong but trying the dd command on the dir will not work.
Click to expand...
Click to collapse
You dont have to extract the binary into a folder, just extract the busybox file direct on your sdcard. Than the dd command should work, on my phone it works fine.
But if not, does the command cat in the adb shell work?
If so, try istead of the dd comand:
Code:
mount /sdcard
cat /sdcard/busybox > /system/xbin/busybox
And remember to start your wildfire in the recovery mode, that was the mistake I had done...

[Q] Rooting G2 - Failed to copy : Read-only file system

Hey,
I'm following the tutorial over at G2 Hacks:
g2hacks.co m/g2-hacks/how-to-root-g2-phone
(omit the space between 'co' and 'm/')
I came across a problem at the beginning of the cmd portion.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
EDIT: Go to 3rd post.
kpaekn said:
Hey,
I'm following the tutorial over at G2 Hacks:
g2hacks.co m/g2-hacks/how-to-root-g2-phone
(omit the space between 'co' and 'm/')
I came across a problem at the beginning of the cmd portion.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
Click to expand...
Click to collapse
If you're wanting to root, go straight to the source; the guide in the Wiki here is based on the work the devs who actually found the means to root the device.
http://forum.xda-developers.com/wik...sion#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
Sent from my T-Mobile G2 using XDA App
I was following the tutorial from the Wiki Guide:
ht tp://forum.xda-developers.co m/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
(omit the space between 'ht' and 'tp' , 'co' and 'm/')
I came across a problem under the TEMP ROOT section.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
kpaekn said:
I was following the tutorial from the Wiki Guide:
ht tp://forum.xda-developers.co m/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
(omit the space between 'ht' and 'tp' , 'co' and 'm/')
I came across a problem under the TEMP ROOT section.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
Click to expand...
Click to collapse
Is USB debugging turned on and is the SDcard not mounted?
Sent from my T-Mobile G2 using XDA App
Sounds like the SD card is mounted on your PC and not the phone ? It needs to be mounted on the phone or this won't work.
Sent from my HTC Desire Z
All that command does is copy that file from your computer to the sdcard. You could accomplish the same thing by dragging and dropping that file to the sdcard.
The 'push' command just means "copy from location A to location B"
Sent from my HTC Vision using XDA App
You could always just mount the SDcard... but anyway, to solve this type in "adb remount" and enter the command before pushing the file
Sent from my HTC Vision using XDA App
USB debugging is on and SD is not mounted to my computer.
I tried directly copying the files onto the sdcard, but when I need to push rage, busybox, etc. I cannot access the data folder graphically from the computer.
So I'll still need to use cmd.
I tried the remount, but this is what I get:
Code:
C:\AndroidSDK\tools>adb remount
remount failed: Operation not permitted
kpaekn said:
USB debugging is on and SD is not mounted to my computer.
I tried directly copying the files onto the sdcard, but when I need to push rage, busybox, etc. I cannot access the data folder graphically from the computer.
So I'll still need to use cmd.
I tried the remount, but this is what I get:
Code:
C:\AndroidSDK\tools>adb remount
remount failed: Operation not permitted
Click to expand...
Click to collapse
The adb remount error is expected (the command requires your ro.secure prop to be set to 0, which you can't do until you have rooted).
So you were able to copy files to the SD card? Just to verify again, you should try mounting the SD card to you computer (so it shows up as a device on your computer's file explorer), copy over a file, unmount the card from your computer (and remember to also hit the button on phone to do so), and then try the ADB push commands again.
Ok, with the phone on plug it into your computer and mount USB storage. Drag and drop 'su' and superuser.apk into the sdcard then unmount USB storage. Make sure USB debugging is on at this point (you'll see it in the notification task bar). Do these commands:
Code:
adb push rage /data/local/tmp/rage
adb push busybox /data/local/tmp/busybox
adb push root /data/local/tmp/root
adb shell chmod 0755 /data/local/tmp/*
Then in the terminal app type:
Code:
/data/local/tmp/rage
You'll see some message pop up saying something about 'forked #### childs' and that's temp root. Then follow the instructions on running gfree to gain full root. Btw, you can just copy and paste all those commands if you think you'll make a mistake.
You may also be able to run the '/data/local/tmp/rage' command with the 'adb shell' command, never tried it myself though.
kpaekn said:
I was following the tutorial from the Wiki Guide:
ht tp://forum.xda-developers.co m/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
(omit the space between 'ht' and 'tp' , 'co' and 'm/')
I came across a problem under the TEMP ROOT section.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
Click to expand...
Click to collapse
Oh come on !!!
the path separator in linux (and the phone is a linux computer) is / and not \ !!!
So the command is:
Code:
C:\AndroidSDK\tools>adb push su /sdcard/su
Just to tell you something about the unix shell:
The \ char is a so called escape character that you use to tell the shell that it should not ignore the next character even if it is a white space (i.e. space)
You would use it if you have to specify a path that contains spaces:
i.e.:
Code:
mkdir dir\ with\ 3\ spaces
will create a directory with the name "dir with 3 spaces". This would not work without the \ characters.
have fun - Guhl
Haha... it's funny how simple the answer was.
Thanks for your guys' help.

[Q] adb - OUYA stuck as read-only, why?

Hello beautiful people.
Keep in mind that I'm using Ubuntu 13.10 to do this. I'm trying to transfer my own bootanimation.zip to the OUYA but I can't because the system is set as read-only. adb recognizes my OUYA, if I use "adb devices" it shows the device, but I can't do anything else with it besides that. I read online that if I use "adb remount", it would mount as read/write. I tried that and I got "remount failed: Operation not permitted". I also read something about "adb root", I can't remember what exactly I had to do with that, but I got this "adbd cannot run as root in production builds".
If any more information is needed, please do ask for it. Help is appreciated. Thanks.
try something like
Code:
adb shell
su
mount -o remount /system
gianptune said:
try something like
Code:
adb shell
su
mount -o remount /system
Click to expand...
Click to collapse
After I used that, I tried to push the bootanimation.zip to the OUYA with:
Code:
adb push bootanimation.zip system/media/
And I got this:
Code:
[email protected]:/ # adb push bootanimation.zip system/media/
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ #
It doesn't recognize it...
Hyd- said:
After I used that, I tried to push the bootanimation.zip to the OUYA with:
Code:
adb push bootanimation.zip system/media/
And I got this:
Code:
[email protected]:/ # adb push bootanimation.zip system/media/
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ #
It doesn't recognize it...
Click to expand...
Click to collapse
Try adb insecure http://forum.xda-developers.com/showthread.php?t=1687590
djden said:
Try adb insecure http://forum.xda-developers.com/showthread.php?t=1687590
Click to expand...
Click to collapse
I think that worked. I installed that, pushed it to the OUYA while on adb shell and got this:
Code:
1319 KB/s (2971409 bytes in 2.199s)
[email protected]:~$
I couldn't see my bootanimation though, the screen was pitch-black until the "OUYA" voice and logo popped out. I suppose it was an error on my end, I'll have to try with another bootanimation and see. Thanks.
Edit: I tried to push another bootanimation but now it won't recognize it again...
Edit 2: It worked again but without adb shell... I downloaded another bootanimation, and got the same results. Odd...
I'm having the same problem. The above commands presumably changed the filesystem to RW, but now when I try to push my file it says:
cannot stat 'OuyaCWMrecovery6.0.3.2flashable.zip': No such file or directory
I've tried everything I can think of. Restarting everything. Using the entire system path. Trying to leave shell and then run the command (which seems to send it back to r-o filesystem)
trying to rename the zip to make sure I'm typing the full thing correctly.
Any help?
Try doing adb shell as as super user and doing chmod 777 to any relevant directories on your Ouya (like /sdcard/ etc).

Problem accessing internal sdcard in adb shell in LG D722

Hello,
I'm trying to install TWRP on my LG D722, but I get the following error in adb shell
Code:
[email protected]:/ $ su
[email protected]:/ # dd if=/sdcard/twrp-jagnm.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery <
dd: /sdcard/twrp-jagnm.img: No such file or directory
even tho the path is correct. Through some experimenting I've found that i get the same error just by doing
Code:
[email protected]:/ # cd /sdcard
tmp-mksh: cd: /sdcard: No such file or directory
On the other hand i can do
Code:
[email protected]:/ $ cd sdcard
[email protected]:/sdcard $
which doesn't help me because i need the su permissions.
I would appreciate any help you can provide.
Same here...
A hint would be appreciated indeed
abmaar said:
Same here...
A hint would be appreciated indeed
Click to expand...
Click to collapse
Hi,
I, unfortunately, don't remember how I solved this issue exactly, but I think the problem was something with a broken symlink ( tbh I'm not sure whether it was broken or I was just doing something wrong). I am not able to reproduce the error now so I cant be more specific but try typing
Code:
ls -la
and you might be able to change directory to the target of the symlink.

Bootanimations for Suzuran

Hi there,
here comes my collection of bootanimations for Suzuran. Maybe they are useful for other devices?
Klick
bootanimation_Berni.zip: My used one
bootanimation_google.zip: From Google inspired, minimal and playful one
bootanimation_lineage.zip: The one from LineageOS team
bootanimation_stock.zip: The original one from Stock ROM 7.x
How to change the current bootanimation?
Enter these commands line by line:
Code:
adb root
adb shell
mount -o remount,rw /
exit
adb push <name_of_bootanimation_file> /system/media/bootanimation.zip
exit
Reboot.
If you want to save your current bootanimation file, you should perform this command FIRST:
Code:
adb pull /system/media/bootanimation.zip
Berni-0815 said:
Hi there,
here comes my collection of bootanimations for Suzuran. Maybe they are useful for other devices?
Klick
bootanimation_Berni.zip: My used one
bootanimation_google.zip: From Google inspired, minimal and playful one
bootanimation_lineage.zip: The one from LineageOS team
bootanimation_stock.zip: The original one from Stock ROM 7.x
How to change the current bootanimation?
Enter these commands line by line:
Code:
adb root
adb shell
mount -o remount,rw /
exit
adb push <name_of_bootanimation_file> /system/media/bootanimation.zip
exit
Reboot.
If you want to save your current bootanimation file, you should perform this command FIRST:
Code:
adb pull /system/media/bootanimation.zip
Click to expand...
Click to collapse
bootanimation.zip: 1 file pushed, 0 skipped. 436.3 MB/s (1496312 bytes in 0.003s)
but it still the same animation as before. renamed it to bootanimation
tarukanav said:
1496312 bytes
Click to expand...
Click to collapse
That's the file size of the bootanimation file from LineageOS team (see attached picture). I've tested every one of those four files and everytime after reboot I've gotten the wanted result.
You're doing something wrong!
Berni-0815 said:
That's the file size of the bootanimation file from LineageOS team (see attached picture). I've tested every one of those four files and everytime after reboot I've gotten the wanted result.
You're doing something wrong!
Click to expand...
Click to collapse
yea that am doing something wrong is the thing i cant figure out
Is every command executed successfully?
Code:
adb root
adb shell
mount -o remount,rw /
exit
adb push bootanimation_google.zip /system/media/bootanimation.zip
exit
There should be not one single error message:
Code:
[email protected]:~/Tmp$ adb root
restarting adbd as root
[email protected]:~/Tmp$ adb shell
suzuran:/ # mount -o remount,rw /
suzuran:/ # exit
[email protected]:~/Tmp$ adb push bootanimation_google.zip /system/media/bootanimation.zip
bootanimation_google.zip: 1 file pushed. 18.4 MB/s (1858574 bytes in 0.097s)
[email protected]:~/Tmp$
And after a reboot I can see this Google inspired animation.
Edit: Have you executed the "exit" command after the "mount" command?
Berni-0815 said:
Is every command executed successfully?
Code:
adb root
adb shell
mount -o remount,rw /
exit
adb push bootanimation_google.zip /system/media/bootanimation.zip
exit
There should be not one single error message:
Code:
[email protected]:~/Tmp$ adb root
restarting adbd as root
[email protected]:~/Tmp$ adb shell
suzuran:/ # mount -o remount,rw /
suzuran:/ # exit
[email protected]:~/Tmp$ adb push bootanimation_google.zip /system/media/bootanimation.zip
bootanimation_google.zip: 1 file pushed. 18.4 MB/s (1858574 bytes in 0.097s)
[email protected]:~/Tmp$
And after a reboot I can see this Google inspired animation.
Edit: Have you executed the "exit" command after the "mount" command?
Click to expand...
Click to collapse
yes , had no error messages, had same thing once before cant rememeber how i fixxed it .Also tried to just copy it with rootexplorer and same thing copies fine , but animation stays same
Which OS are you using at your device?
Berni-0815 said:
Which OS are you using at your device?
Click to expand...
Click to collapse
win10 ,but i know there was something else am doing wrong, had same situation a while ago but cant remember how i fixed it , tried to use different apps to change bootanimation and nothing worked , at the end it was something simple just cant remember what it was
No. Not the OS of your computer, the OS of your z5c.
I'm using los18. Maybe with other OS's this is not working?
hhe android is also 10, so los 17
I've flashed los17.1 yesterday and the changing of the bootanimation works flawlessly; as expected.
ook soo am just stupid as hell ,copied bootanimation.zip to just bootanimation.

Categories

Resources