Tried rooting my phone, can't push SU file - Android Software/Hacking General [Developers Only]

ok so I'm trying to root my G2 phone from T-mobile, I have followed the steps in this forum:
http://forum.xda-developers.com/wik..._Root_.2F_.22Permaroot.22.29_using_gfree_v0.7
all of the steps, I downgraded my firmware, I got permroot but when I get to step 2: copy files to phone it does not let me push the Superuser files onto my phone, it says permission denied. I have USB debuggin on and i have the screen on stay awake, I have superuser app on my phone but I don't know what i am doing wrong.
adb push su /sdcard/
adb push Superuser.apk /sdcard/ <---these 2 are the ones it doesn't let me push. i have them installed on my platform-tools directory and everything too.

Look here
Http://forum.xda-developers.com/showthread.php?t=879701
Sent from my T-Mobile_G2 using xda premium

What is this??
this is for ADB I already have adb

Instead of pushing to /sdcard, try pushing to /mnt/sdcard (/sdcard is just a symlink and I am not sure every system has it by default).
Example:
adb push Superuser.apk /mnt/sdcard/
Also, are you sure your sdcard is working properly? You could also just copy those files manually to your sdcard from your OS as well as you would any other file like music or videos. It would make no difference.

That totally worked!!!
Thanks man, I was stuck on that thing for like a week, ohh man thanks again.

Related

how do you change folder permissions???

hi
how does one change folder permissions? i have read that you cam do it with the root explorer app but is there a way to do it on the pc using the sdk? i connected my phone to the pc and issued the adb shell command and then attempted to use the chmod command but got a read only file system message.
dsMA said:
hi
how does one change folder permissions? i have read that you cam do it with the root explorer app but is there a way to do it on the pc using the sdk? i connected my phone to the pc and issued the adb shell command and then attempted to use the chmod command but got a read only file system message.
Click to expand...
Click to collapse
1) If you have ADB setup on your computer, hook your phone into the computer and connect into it via ADB.
2) Once in, "chmod" the directory or file(s) you wish to change permissions for.
IF you don't have ADB:
1) Download a terminal
2) su - to root
3) Change your directory
4) "chmod" to whatever pemissions you want
it means that folder/file you're chmod'ing was mounted ro. you cant change anything if its mounted as ro. to check just enter "mount" and you can see what are mounted as rw, ro etc
yantz
I would also suggest changing it back when you're done. This helps prevent you from accidently overwriting or deleting something and have to reflash if you're rooted.

How do I install an apk to the /system/app folder?

Can someone please take the time to explain how to install apps in the system/app folder? I'm trying to install the superuser.apk app but I just dont want to install it where it can be deleted easily from the menu/settings/applications/manage applications. I want to install it the same way sprint installs their programs where root is required to remove. Thanks/
rose1 said:
Can someone please take the time to explain how to install apps in the system/app folder? I'm trying to install the superuser.apk app but I just dont want to install it where it can be deleted easily from the menu/settings/applications/manage applications. I want to install it the same way sprint installs their programs where root is required to remove. Thanks/
Click to expand...
Click to collapse
Place the superuser.apk in the tools folder of your sdk
Open up command prompt
Cd c:\android-sdk-windows\tools
Abd push superuser.apk /system/app/
That's it, you're done. If you get a write permissions error, then you'll have to mount the /system folder. If you have remount installed, add adb remount before pushing the file. If not, then you'll have to add
adb shell
Yaffs2....mtdblock don't remember the entire phrase... or most of it. I just copy and past it from some of the write-ups... its in the manual root thread
Then:
Exit
Adb push...
Sent from my SPH-D700 using XDA App
Okay, I tried it and getting the following error. "failed to copy 'superuser.apk' : read-only file system. Then I did adb shell and it showed a $ then I typed in su and it showed a # then I did:
mount -t rfs -o remount,rw /dev/block/stl9 /system/app
Then that line repeated itself. So I tried Adb push superuser.apk /system/app/ again and now it says:
failed to copy 'superuser.apk' to '/system/app//superuser.apk' : Permission denied.
What am I missing?
I also tried adb remount /system/app/ and it says remount failed. No such file or directory.
http://forum.xda-developers.com/showthread.php?t=780759
Last post of mine
Aridon said:
http://forum.xda-developers.com/showthread.php?t=780759
Last post of mine
Click to expand...
Click to collapse
Cool. Thanks. I haven't rooted my epic yet, so I haven't done any pushing. Pushing it to the hero as I described always works fine, then again, it may have to do with remount being on all the roms I used.
Sent from my SPH-D700 using XDA App
Aridon said:
http://forum.xda-developers.com/showthread.php?t=780759
Last post of mine
Click to expand...
Click to collapse
Thanks Aridon but I tried that and now I get the error when trying mv /sdcard/Superuser.apk /system/app/Superuser.apk The error says Failed on '/sdcard/Superuser.apk' -Cross-Device link
Change mv to cp
You need busy box installed
Aridon said:
Change mv to cp
You need busy box installed
Click to expand...
Click to collapse
Thanks. I'll try that
rose1 said:
Thanks. I'll try that
Click to expand...
Click to collapse
Also once you get busy box installed you can do:
busybox cp /sdcard/File.apk /system/app/File.apk
and that will work fine.
okay I am a little lost, I need to re-install sprint tv and sprint zone in order to preform new update. I am really new to this process, I have the .apk's I need to put back on phone but not sure what your talking about. I have sdk and adb on computer but not sure what to do with them. Please help a tard.

[Q] Im so lost with the fascinate...

Please bare with me because i am a complete noob at this... but not stupid.
i have been trying to adb push .apk files to the phone, and the adb devices command shows that it is connected correctly, i get this error when i attempt to push: Permission denied
does anyone know what to do? ive tried seaching google and these forums and couldnt find anything. but that might be just because im a noob.
self-bump....
does anyone know what to do???
thefunkbot said:
self-bump....
does anyone know what to do???
Click to expand...
Click to collapse
Try not pushing it to read only memory and see if that works for you.
adb push FILE.apk /sdcard/
If that works
adb shell
su
mv /sdcard/FILE.apk /system/app/
I don't think my Vibrant will let me push to /system & that's what I did to work around (or just put the file on the sd card in mass storage mode & root explorer it over to where I want it to go).
tjhart85 said:
adb push FILE.apk /sdcard/
If that works
adb shell
su
mv /sdcard/FILE.apk /system/app/
Click to expand...
Click to collapse
i tried to push to the sd card and still got the same error.... : Permission denied
Mounted and added the apk to the sd card normally and then tried to move it with adb shell, and gives this error:
Failed on /sdcard/FILE.apk - cross-device link
I tried using the rm and mv command to remove the coresponding app from the system/app/ folder and I get an error that the file/directory does not exist.
Sent from my SCH-I500 using XDA App

[Q] Is there any way to reinstall a system app?

Hi,
I was having trouble with my app YouTubeTablet.apk, it stopped working while I was using it. thinking I was starting to get the hang of this OS, I found the apk in system/app/ and, thinking I could just reinstall it, I deleted it. It wont let me reinstall it. it trys to install, then just gives an error saying "app did not install"
I have been reading and searching all night, I have tried the chmod 644 and a few other things but nothing I have done has seemed to work to get this reinstalled.
Does anyone know a way to get this app back?
thanks,
John
Hello I'm not 100% certain as I'm also pretty new to this scene, but couldn't you just copy the apk back to /system/app ?
Sent from my ADR6300 using XDA App
Use a root explorer and copy the new app to /system/app. Restart and it should work.
I use ES File Explorer, but you have to check mount as read/write in the settings before you copy to system/
Install in /system/app and make sure your permissions are correct. Read: User, Group and Others checked and Write: User checked. Reboot
BTW Youtube crashed last night for everyone. Was a thread about it.
Thanks for the reply's,
I have tried most of this stuff, I tried the rest (changing the permissions) and it still doesn't show up in apps or install
not sure what else to try??
John
Try pushing it via adb then fixing permissions.
Beamed from my TF101 using Tapatalk HD
Xerravon said:
Thanks for the reply's,
I have tried most of this stuff, I tried the rest (changing the permissions) and it still doesn't show up in apps or install
not sure what else to try??
John
Click to expand...
Click to collapse
What ROM are you running? Just flash that ROM again without wiping.
infazzdar said:
Try pushing it via adb then fixing permissions.
Beamed from my TF101 using Tapatalk HD
Click to expand...
Click to collapse
Hi,
I have been trying to do this, I cant seem to do it
after installing sdk I am
1. booting into apx vol up + power while plugged into the pc (plus I tried pluging nto the pc after going into apx mode)
2. adb devices (none show) If I boot normally the devices do show
3. in apx mode, apx shows under devices and printers in my pc
so I tried to do adb remount with the TF booted normally it says not permitted, if I try in apx mode it says no device
I dont know, I am lost, I hope this is all my fault, it has to be, I am reading and reading, nothing I find, or stuff people tell me to try works. I am really starting to wonder about this OS
John
Xerravon said:
Hi,
I have been trying to do this, I cant seem to do it
after installing sdk I am
1. booting into apx vol up + power while plugged into the pc (plus I tried pluging nto the pc after going into apx mode)
2. adb devices (none show) If I boot normally the devices do show
3. in apx mode, apx shows under devices and printers in my pc
so I tried to do adb remount with the TF booted normally it says not permitted, if I try in apx mode it says no device
I dont know, I am lost, I hope this is all my fault, it has to be, I am reading and reading, nothing I find, or stuff people tell me to try works. I am really starting to wonder about this OS
John
Click to expand...
Click to collapse
It's ADB, you do NOT put it in APX mode. Just turn USB Debugging on.
Open the command window and type in ADB devices to see if your device come up.
This thread help with driver's and such for ADB
http://forum.xda-developers.com/showthread.php?t=1071584
baseballfanz said:
What ROM are you running? Just flash that ROM again without wiping.
Click to expand...
Click to collapse
I think I am running the stock rom, rooted. I dont have anyidea how to flash
Is there a way for me to reflash the same stock rom? If you can point me to same directions or info where I can try to learn this?
thanks
baseballfanz said:
It's ADB, you do NOT put it in APX mode. Just turn USB Debugging on.
Open the command window and type in ADB devices to see if your device come up.
This thread help with driver's and such for ADB
http://forum.xda-developers.com/showthread.php?t=1071584
Click to expand...
Click to collapse
thank you, I just read somewhere it had to be in apx for adb
Ok the devices do show in the list
I read to type
adb remount
adb push youtubetablet.apk /system/app/
adb push youtubetablet.odex /system/app/
to push these into system/app
when I type adb remount I get the error
"remount failed operation not permitted"
any idea what I am doing wrong
thanks
John
try
Code:
adb shell remount rw
baseballfanz said:
try
Code:
adb shell remount rw
Click to expand...
Click to collapse
It gives me
remount: permission denied
I just read I will quote below
"If it shows a $ sign when u type adb shell then u got no root son"
Ok, when I type adb shell I do get the $ does this mean I am not rooted? I do have su and can get su permissions in root explorer. heck that is what got me in this trouble, I was able to delete the youtubetablet apk from system/app/
adb
Xerravon said:
It gives me
remount: permission denied
I just read I will quote below
"If it shows a $ sign when u type adb shell then u got no root son"
Ok, when I type adb shell I do get the $ does this mean I am not rooted? I do have su and can get su permissions in root explorer. heck that is what got me in this trouble, I was able to delete the youtubetablet apk from system/app/
adb
Click to expand...
Click to collapse
What method did you use to root?
baseballfanz said:
What method did you use to root?
Click to expand...
Click to collapse
I used this one to root back on (8.6.5.9)
ASUS Transformer Root ToolKit V7.1 Universal (Windows) | 2011-09-22 (brk's)
http://forum.xda-developers.com/showthread.php?t=1185104
and I updated with these
[UPDATE] CWM - Stock + Root - 8.6.5.21 US 8.6.5.21-WW 8.6.6.23-WW Updated 12/29/2011 (daoist )
http://forum.xda-developers.com/showthread.php?t=1334673
I was able to do this in terminal emulator
mount -o rw,remount /system
cp sdcard/download/youtubetablet.apk /system/app/
cp sdcard/download/youtubetablet.apk /system/app/
mount -o ro,remount /system
this did seem to work, i mean It did copy the files into the system/app dir however I still dont see the app in my apps and still cannot install
One difference this time, if I copied the files into the system/app dir using root explorer then changed the permissions with root explorer I could, I mean it would allow me to check the box's and save the change
this time In root explorer I cannot keep or save the changes to the permissions, it gives some error about "not being able to change permissions on some file formats such as sdcard etc..." something like that
thanks
John
I was able to push the files over using this method found here (pushing it via adb with my TF in recovery (CWM)
http://androidforums.com/optimus-m-...anyone-who-has-rooted-deleted-lghome-apk.html
it did push the files but still doesnt show up as an app
The may seems simple and don't get mad at me for saying this, but did you reboot after you pushed it to /system /app? It should show up then. At least that is the way I push them and usually when it doesn't work, it is because I forgot that part.
Xerravon said:
[UPDATE] CWM - Stock + Root - 8.6.5.21 US 8.6.5.21-WW 8.6.6.23-WW Updated 12/29/2011 (daoist )
http://forum.xda-developers.com/showthread.php?t=1334673
John
Click to expand...
Click to collapse
Have you tried flashing that ROM again?
baseballfanz said:
Have you tried flashing that ROM again?
Click to expand...
Click to collapse
No I havent, is it ok to just reflash like that? I ask cause it says (in the thread) it wont work unless you have the update before that one installed.
Hi, Yes, I did reboot, actually tried the whole thing a few times/
thanks guys

help with adb commands for s-off and perm root

Well let me first off say i'm feeling really dumb atm.
Just bought my wife the new m8 , I've already s-offd and perm rooted mine but for some reason im having trouble getting the commands to work for hers .
im using a mac btw but like ive said i did successfully do this on this exact setup
adb reboot <–important!!!!
adb wait-for-device push firewater /data/local/tmp <<<<<<<<
adb shell
su
chmod 755 /data/local/tmp/firewater
/data/local/tmp/firewater
do i actually put the data local tmp part in or am i supposed to be putting in my local directory where i have the file on my computer
when i adb devices , i can see my device, so it is connected
in adb when i " adb reboot" it does reboot my phone
but when i try to push the firewater file it does not push , i get this
cannot stat 'firewater': No such file or directory
firewater file is in my adb folder on my desktop and its the right size etc etc .
thanks in advance if anyone can tell me what im doing wrong!!!!
commandocon said:
Well let me first off say i'm feeling really dumb atm.
Just bought my wife the new m8 , I've already s-offd and perm rooted mine but for some reason im having trouble getting the commands to work for hers .
im using a mac btw but like ive said i did successfully do this on this exact setup
adb reboot <–important!!!!
adb wait-for-device push firewater /data/local/tmp <<<<<<<<
adb shell
su
chmod 755 /data/local/tmp/firewater
/data/local/tmp/firewater
do i actually put the data local tmp part in or am i supposed to be putting in my local directory where i have the file on my computer
when i adb devices , i can see my device, so it is connected
in adb when i " adb reboot" it does reboot my phone
but when i try to push the firewater file it does not push , i get this
cannot stat 'firewater': No such file or directory
firewater file is in my adb folder on my desktop and its the right size etc etc .
thanks in advance if anyone can tell me what im doing wrong!!!!
Click to expand...
Click to collapse
Have you already temp rooted her phone with weak sauce?
Sent from my HTC6525LVW using Tapatalk
wtoj34 said:
Have you already temp rooted her phone with weak sauce?
Sent from my HTC6525LVW using Tapatalk
Click to expand...
Click to collapse
yes i have temp root and su installed
commandocon said:
yes i have temp root and su installed
Click to expand...
Click to collapse
Hmm. Are you copy pasting the messages? Make sure you don't have any spaces in wrong places. Maybe try a factory reset on said device. Just confirming firewater and adb are in the same directory?
Sent from my HTC6525LVW using Tapatalk
yeah theyre in the same folder
commandocon said:
yeah theyre in the same folder
Click to expand...
Click to collapse
Click on weaksauce to make sure it is still working and you may have to click on a prompt and then try ADB again after that.
Figured out what it was at about 12 midnight, I had to add in the directory then put the data/local/ tmp/ etc after that.
So problem is all solved thank god was justa long night of trying commands
where you add the directory?

Categories

Resources