I know there are a ton of these topics here, Still having problems.
I'm trying to push a apk to /system/app
First I used adb shell and used su to remount /system/app
example:
Code:
adb shell
su
mount -o rw,remount -t ext4 /dev/block/mmcblk0p9 /system
I did this part successfully.
Here is my proof:
/dev/block/mmcblk0p9 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
The problem is I don't know how to push a *.apk thur a "adb shell". If I try, I get "push not found"
They only way I know how to push is using a regular linux terminal.
example:
Code:
linux_user:$ adb push /path/to/apk /system/app
however this only works on my Evo 4G (custom rom). On my Samsung Epic 4G (stock rom) I get a permission denied.
I tried adding a su like:
Code:
linux_user:$ adb [color=red]su[/color] push /path/to/apk /system/app
however, that does not seem to be a valid command.
I think I know what my problem is but I don't know how to solve it.
I think the problem is the default user is not #. For example in "adb shell" the default user is
$
and after su
it becomes
#
how do I fix this without switching to custom rom?
I hope I explained this in a way someone can understand.
Searched all over these forums and could not find a solution.
As a work around I installed an Android Terminal Emulator
then from the Android Emulator,
su
cd /sdcard
install name.apk /system/app
Click to expand...
Click to collapse
Best work around I could think of. Did I use the correct syntax? the emulator did not have adb or push.
Use Root Explorer
Try To put Your APK in system/app
change ro to rw
Then set the permission as same as other app in the system
then reboot...
I hope it will help your problem....
Related
going through the entire 1.5 to 2.1 root tutorial to a tee, but once i get to the recovery image, this happens (following is an entire copy/paste of what I went through, incase i did something wrong before i hit the point)
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Lemcott>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>adb shell mount -o rw,remount /dev/block/mtdblock3
/system
adb server is out of date. killing...
* daemon started successfully *
C:\android-sdk-windows\tools>adb shell mount -o rw,remount /dev/block/mtdblock3
/system
C:\android-sdk-windows\tools>adb push recovery.img /sdcard
1192 KB/s (3926016 bytes in 3.215s)
C:\android-sdk-windows\tools>adb push flash_image /system/bin/flash_image
448 KB/s (9640 bytes in 0.021s)
C:\android-sdk-windows\tools>adb shell flash_image recovery /sdcard/recovery.img
flash_image: permission denied
C:\android-sdk-windows\tools>
EDIT: I am a complete ass hat. nothing to see here, move a long. mods delete this if you please.
P.S. Everyone else: ALWAYS DOUBLE CHECK BEFORE POSTING FOR HELP. *ahem* now be on your way.
try programming thru fastboot. press call + vol down and select the fastboot option and use this command from the pc
fastboot flash recovery recovery.ing
Sent from my Evil Eris v1.1 using the XDA mobile application powered by Tapatalk
It looks like you forgot the step where you modify the flash_image's permissions
Code:
adb shell chmod 755 /system/bin/flash_image
I had the same thing but I just kept reentering
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
and after maybe 4 iterations it worked.
I have a very simular problem:
(moto droid with android 2.1)
$su
su
Permission denied
Click to expand...
Click to collapse
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
>adb shell chmod 755 /system
unable to chmod /system: Read-only file system
>
Click to expand...
Click to collapse
penthoy said:
I have a very simular problem:
(moto droid with android 2.1)
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
Click to expand...
Click to collapse
make it read/write
penthoy said:
I have a very simular problem:
(moto droid with android 2.1)
I have try to use chmod the file but it said permission denied on chmod... please help T_T
note this is rooted, of course, when i'm in the phone type su, it'll pop up ask for me to allow or not, allowed, everything seems fine, but when i try to modify files in /system/etc/wifi (trying to make it work for ad hoc) it said permission denied....(even in su???) I tried in adb and it's the same, very very frustrating, any help is appreciated, Thanks.
edit: here's what it looks like using chmod...
Click to expand...
Click to collapse
I wouldn't try to flash anything you find here to a Moto Droid.
This is for the HTC Droid Eris.
Otherwise, and if I'm misunderstanding you, good luck with your problem.
archmagus said:
It looks like you forgot the step where you modify the flash_image's permissions
Code:
adb shell chmod 755 /system/bin/flash_image
Click to expand...
Click to collapse
I've been bashing my head in ALL day trying to get past this and finally found this thread! This worked perfectly!
theboo7 said:
make it read/write
Click to expand...
Click to collapse
How should i make is read/write?????
i cant get it to work at all.. need help plz.
Hello Guys
why cant i mount that **** together, i have the root permission, but also i dont..somehow
Code:
Microsoft Windows [version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. Alle rettigheder forbeholdes.
C:\Users\Rasmus H. G. Johnsen>d:
D:\>cd android\tools
D:\android\tools>adb devices
List of devices attached
HT9B7LG00092 device
D:\android\tools>adb shell mount -o rw,remount /dev/block/mtdbloc3 /system
mount: Operation not permitted
D:\android\tools>adb shell
$ ls
ls
sqlite_stmt_journals
cache
sdcard
etc
system
sys
sbin
proc
logo.rle
init.rc
init.goldfish.rc
init.bahamas.rc
init
default.prop
data
root
dev
$ exit
exit
Also if I go on and try to do this:
Code:
D:\android\tools>adb push flash_image /system/bin
failed to copy 'flash_image' to '/system/bin/flash_image': Read-only file system
I know that the flash_image fil and my recovery.img file is in this library and also on my sdcard, but I cant push the gotdamn flas_image file in the /system/bin catalog.
Can some one please help me ?
PS. I have the USB-debugging turned ON.
How do you know that you have root? Or, how did you gain root?
doogald said:
How do you know that you have root? Or, how did you gain root?
Click to expand...
Click to collapse
I have the app called androot from google market, ang i have run it to get root.
wfdi said:
I have the app called androot from google market, ang i have run it to get root.
Click to expand...
Click to collapse
I'm not aware of that app, and cannot find it in the market myself (do you have a link?)
However, one way to check for sure if you truly have root is run the adb command adb shell and, when you get a prompt, type the command "su". If it returns with a "#" prompt (rather than the "$" prompt that you are seeing), then you have root on the phone.
Most people these days root with either jcase's 1click root for eris: https://market.android.com/details?id=net.andirc.erisrooter or they use the procedure here: http://androidforums.com/eris-all-things-root/127861-universal-eris-root-dummies.html
You may be able to use the steps here as well, since you seem pretty comfortable with adb and have that working already: http://androidforums.com/eris-all-things-root/125436-detailed-leak-root-tutorial.html
Guys new I found another solution (tested on u8150)
First make sure that you are rooted first.
Open adb shell
Type in su.
Remount the system partition as read write.
Change the owner of system from root to system via chown root system
the exit the shell and push flash_image to system/
also push clockworkmodrecover.img into the system partion dont forget the last /.
then exit.
use a file manager, I used rootbrowser.apk without a memory card and installed recovery.
with rootbrowser copy flash_image to the bin directory.
don't forget to change the owner back to root to the system partition after you finish with rootexplorer or whatever u use even adb can work.
then the rest follows.
The above works only if your'e rooted and have adb.
Goodluck
haha am a genius Installing ROM +Recover without sdcard on u8150
all you have to do is:-
1. Make sure u have installed clockwork mode recovery on your device and have su binary.
2. Open adb with the device normally on.
3. Remount the data partition as read write using mount remount in adb .
4. use adb and push the cynogenmode.zip or any rom that fits into the data partition using
adb push romname.zip /data/
5. Reboot into clockworkmod recovery using the various options available.
6. This is what to do if you don't have a sdcard.
open adb with phone connected and run
adb shell
mount /data /sdcard
then go back to the main recovery menu and wipe dalvik cache only
then choose update from sdcard
flash your rom and tadaaa.
your'e done.
NB:CAUTION MAKE SURE TO FLASH A ROM THAT DOES NOT WRITE INTO THE DATA PARTION
THIS CAN BE DONE BY LOOKING FOR A FILE CALL UPDATE SCRIPT IN THE zip OF THE ROM U WANT TO INSTALL
Am going to make a post about this later.
Goodluck
Lol, 3 and a half year break between responses.
The problem with flash_image & dump_image is that it doesn't work on devices devices which use emmc (recent phones)and have
mmcblk0
and cat /proc/mtd won't work here either.
This means that you have to use dd to write to this devices.
I wonder how guys determine the partitions to use on such devices, and someone should hint as to what is going on since it seems manufacturers seriously don't want people to exploit their devices.
How can I do this in terminal emulator
iloveandroid said:
How can I do this in terminal emulator
Click to expand...
Click to collapse
adb remount
http://www.pocketmagic.net/?p=757
^tells you how
you pretty much just type "mount -o rw,remount -t yaffs2 /dev/block/mtdblock3", then "chmod 777 /system".
iloveandroid said:
How can I do this in terminal emulator
Click to expand...
Click to collapse
I attached a file called sys. push this file to the bin directory and give it permissions then you can just mount the system by typing "sys -rw" to mount read and write and to mount read only you type "sys -ro"
to push the file and give it permissions :
Code:
adb push sys /system/xbin
adb shell chmod 775 /system/xbin/sys
I like the script because its easier to remember than the long command.
If you want to edit the script just open it in notepad and change what you like.
I got that script from Bugless Beast By Pete and modified it to display my rom info.
Remove the ".txt" from the script I had to put that to be able to upload it.
tinysu: Compatible "su" command for Root Explorer / for HC images and what not?
So, I just installed HoneyComb to my NC's eMMC. Works well!
Unfortunately apps such as Root Explorer are not too happy because the "su" command provided with these ROMs is too chatty and that confuses them.
So, here is a very quiet, working "su" command. With it, Root Explorer will happily remount partitions, etc.
Note that, like the ROM's "su" command, SuperUser is out of the picture so use with care.
To install, using adb:
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
exit
adb push su /system/
adb shell
busybox cp /system/su /system/bin/
mount -o remount,ro /dev/block/mmcblk0p5 /system
All done. Note that the "busybox cp" should preserve the application's suid bit.
been there done that... lol
http://forum.xda-developers.com/showpost.php?p=11304464&postcount=46
no worries.
Even the Superuser application works now: http://forum.xda-developers.com/showthread.php?t=953110\
cyansmoker said:
So, I just installed HoneyComb to my NC's eMMC. Works well!
Unfortunately apps such as Root Explorer are not too happy because the "su" command provided with these ROMs is too chatty and that confuses them.
So, here is a very quiet, working "su" command. With it, Root Explorer will happily remount partitions, etc.
Note that, like the ROM's "su" command, SuperUser is out of the picture so use with care.
To install, using adb:
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
exit
adb push su /system/
adb shell
busybox cp /system/su /system/bin/
mount -o remount,ro /dev/block/mmcblk0p5 /system
All done. Note that the "busybox cp" should preserve the application's suid bit.
Click to expand...
Click to collapse
LOL.
I actually love that our community is so hard at work that this sort of thing happens
Hi guys,
So I'm in a spot of bother with my Android Tablet (Sony Tablet S) - I deleted the default launcher from the /system/app folder and when I power my device on I get a constant stream of force closes. It can't be used, all I can access is the settings menu.
I'm trying to push a launcher across into the system/app folder - it's rooted, and ADB is working.
Now here's the trouble.
I start CMD from platform-tools folder > adb devices > my device is listed.
adb shell > adb devices > no longer listed.
Any commands I enter in the shell, I "su" and its granted permissions, then adb push 1.apk /system/app > error: device not found. If I try the same without adb shell, then it's permission denied.
I'm pretty desperate to get this working, but any ideas please? I've contacted Sony, I hope that they will repair this, at a cost or not.
Thanks.
When you are in the shell, you don't need to type "adb" anymore, maybe that's it. "push" must be used with adb though, but not in adb shell.
For the permission problem, is /system/ mounted writeable? You could try running this line (not in shell):
Code:
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
This should mount /system/ writeable. Then, try again with adb push. This might differ from device to device though, I don't know if it will work for you.
Other than that, I recommend you pose your question again in the subforum specific to your Android device: http://forum.xda-developers.com/forumdisplay.php?f=1294
Thanks for the response.
I've just run that, and got mount: operation not permitted.
Ok, try it again as follows:
Code:
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Ok, when I run that it works, but as soon as I push, I get device not found?
Anymore suggestions please?
what exactly do you type in when you push? Do you push after entering "adb shell"?
I've made some progress!
I've mounted the /data partition with busybox and now have GoLauncherX.apk in there. But I'm still getting all of the force closes and I pressing the home button, I can't get to the home, it's almost likes it's not installed....
I'll keep trying but it could be something else at fault.
You might need to reflash the ROM. To find out how that is done, check the subforum appropriate to your device.
If you deleted the stock launcher from the system partition, I would suggest you try to get it back there first.
hi
i need to push a file with adb
but adb push give me permision deny
how can fix this?
my device is rooted but adb show me device not rooted!
Is USB Debugging on?
yes it's on
amir_n71 said:
yes it's on
Click to expand...
Click to collapse
In some rom adb permission isn't root by default. I think it's a line in default.prop that enable root in adb. Something like
ro.adb.secure = 0
if you don't want to edit that file just push file to sdcard or temporary folder then use adb shell (with root) to copy that file to proper location.
but 2 days ago adb work like acharm in this rom!
amir_n71 said:
but 2 days ago adb work like acharm in this rom!
Click to expand...
Click to collapse
That's strange. Maybe in your rom adb push works only when file doesn't exist.
no. i push framework-res.apk 5 days ago & it work! framework-res.apk is exist already
but i test this file again & permision deny!
How about su before the command? Or adb remount, to get write access?
Sent from my LG-P760 using xda app-developers app
I have the same problem too and remounting the adb doesn't solve it.
I'm still searching for a fix. I can only pull but not push.
If y'all are on a stock rom, then you can't push anything directly into the system (unless your bootloader is unlocked & you modify the boot.img). I use the following mount command
mount -o remount /system
First push the file to the sdcard
adb push blablabla /sdcard
then adb shell it to the correct location.
It's a lot of bs but it's the only way I got it to work with stock.
Here's an example of a batch script I made
Code:
adb push LGSystemUI.apk /sdcard/
adb shell su -c "mount -o remount /system"
adb shell su -c "cp /sdcard/LGSystemUI.apk /system/app/"
adb shell su -c "chmod 644 /system/app/LGSystemUI.apk"
adb shell su -c "killall com.android.systemui"
Sent from my LGMS769 using XDA Premium 4 mobile app