adb push, adb remount and adb shell - Android Software Development

So i am modding my own widgetlocker for the first time and would like to push it back into my device.
See screenshot first.
and i am using clockworkmod recovery 2.5.0.1.
Problem, as you can see, i think i've successfully push it right? but when i reboot why i still cant see the app?
and for adb shell, when i entered that, yes it passed, then when i entered "su" , it says not found. why is it?
i tried installing but got the error as you see in screens.
adb remount, failed? why?

You are using adb wrong!
For pushing you have to use this template:
"adb push *file* *directory*"
e.g.: (without quotes)
"adb push com.teslacoilsw.widgetlocker-1.apk system/app/"
not:
"adb push com.teslacoilsw.widgetlocker-1.apk /system/app/com.teslacoilsw.widgetlocker-1.apk"
Also make sure, that your SDK is installed correctly, because you used "adb install" correctly, but it gives you an error.
I hope it can help you, had got the same issues..

Hi mate, thanks for the reply. I got it working just before you posted.
this is what i did.
1) adb remount (i did it first and it succeeded! yay!)
2) adb push (still using the same template as i did)
but still very much thanks for replying. will keep your info in mind!
yay my first adb!

cool that you figured it out!

Related

[Q] Rooted but adb says I am not?

I searched around several threads and saw a few people with the same issue but no fixes.
I rooted my phone using this and it worked great.
I then installed clockwork manager from here and then installed the clockwork recovery and made my nandroid.
So far so good.
I booted up and then checked the terminal emulator app i had installed and did:
Code:
$su
and got
Code:
#
So, all good.
I then went to remove some of the bloatware by using adb.
When I do adb shell I get the $ prompt.
I type in "su" without quotes and after a few seconds i get "Permission denied".
Seems like i fudged something somewhere but I am not sure what.
Anyone able to offer some constructive help?
Make sure your phone is unlocked when you type su in adb shell, and a superuser permission should pop up.
many thanks for that!
i have been on a rooted G1 with CM for so long that i forgot to even look at my phone when i "adb shell...su" into it =)
did it just now and looked at the phone and the superuser permissions window came up. all set.
thanks again!

[Q]

Ok, following the instrucions of Darkonions Easier 1-2-3 Droid Root, I am finding it a little compicated at step 6a, I entered ./data/local/tmp/rageagainstthecage-arm5.bin just like it says, it starts it's process, installed my drivers, and then it booted me out, I waited for awhile, but nothing happened, It says to "To check if rageagainstthecage worked it's magic, enter the shell with adb shell. You should see a # sign. If you don't, you need to run rageagainstthecage again by entering the command from step six.
how do I check the adb shell? .. I apologize for the noob questions, but coming from an iPhone, this is all greek to me.
hi,
to enter adb shell first make sure you are in your tools directory ex (cd c:\android-sdk-windows\tools) once your in the directory just enter adb shell on a command line. if your get the # you have root. I would also suggest looking at doroot the droid2 one click rooting method which works perfectly for me. Its a quick script install that basically runs all the commands for you. hope that helps.
If you get a "$" prompt, type in "su" and hit enter to see if you have root. You will see SU permission popup on your dx which you should allow. If prompt changes to "#" then you have root.

[Q] ADB remount issue

First off, I'm fairly new to the Droid X and this is my second android phone(the first was an Eris which should be kinda obvious). I am rooted but, for whatever reason, I cannot run the adb remount command from the prompt. I can run other commands like adb shell bootanimation which runs my boot animation and when i enter in adb shell it returns a $. $ does mean rooted, correct?
Also, when i try to run the sdk manager i get the "java not found in your your path" The weird thing is that it is in the path. So i'm getting frustrated now and I know it is probably something simple that i am overlooking.
If anyone can help out, I would greatly appreciate the help.
DroidEris1981 said:
First off, I'm fairly new to the Droid X and this is my second android phone(the first was an Eris which should be kinda obvious). I am rooted but, for whatever reason, I cannot run the adb remount command from the prompt. I can run other commands like adb shell bootanimation which runs my boot animation and when i enter in adb shell it returns a $. $ does mean rooted, correct?
Also, when i try to run the sdk manager i get the "java not found in your your path" The weird thing is that it is in the path. So i'm getting frustrated now and I know it is probably something simple that i am overlooking.
If anyone can help out, I would greatly appreciate the help.
Click to expand...
Click to collapse
$ does not mean rooted. from that prompt you can enter 'su' and you should get an '#' and then you are using root.
However, by default, the ADB daemon is not running with root privileges. Thus when you try to ADB remount it gets denied.
You need to run a 'Root Elevated' adb daemon. Or you can manually remount the /system partition from adb shell.
Why does the Droid X Recovery Bootstrap start on boot?
As mentioned above, it needs to log that your phone booted successfully and recovery mode is not necessary. It also replaces your "adb daemon" with one that has root permissions, allowing for easier usage of the adb command.
Click to expand...
Click to collapse
I know that if you install/run DroidX Bootstrapper (which installs the ClockworkMod Recovery) it also sets up a root elevated ADB daemon. You will need to reboot after installing before this takes effect.

[Q] ADB "Permission Denied"

hey guys need help so my Mytouch 4G updated and perm rooted, and i keeep gettin gthe permission denied everytime i try and execute a command thru adb thru my pc or on the Terminal Emulator. Did something not go thru on root or am i missing something simple? any help would be greatly appreciated. Thanks
mrpanic7 said:
hey guys need help so my Mytouch 4G updated and perm rooted, and i keeep gettin gthe permission denied everytime i try and execute a command thru adb thru my pc or on the Terminal Emulator. Did something not go thru on root or am i missing something simple? any help would be greatly appreciated. Thanks
Click to expand...
Click to collapse
You may have to run visionary and reboot a few more times to make root privileges stick.
My MyGlacier 4G MINE!!!
Try this:
: adb shell (this should give $)
:$ su (next line type su, this should give you prompt on Super user to allow permission)
:# ( once you get this your good)
Sent from my HTC Glacier using Tapatalk
Try to install visionary and then re install open click temp root then permoot super user should ask to approve click yes. After that restart
Sent from my HTC Glacier using XDA App
Please post questions in Q&A forum. Thank you
ok everytime i try adb shell in terminal emulator it says the permission denied, im gonna try the first reply again and then see....any other ideas?
also guys, when i try and run visionary again it says your device is already rooted, along with when i type su in TE, it gives # with superuser permissions quote showing on bottom of screen, but i was trying to run adb commands from pc or from te and they still show permission denied. SetCPU works.
mrpanic7 said:
also guys, when i try and run visionary again it says your device is already rooted, along with when i type su in TE, it gives # with superuser permissions quote showing on bottom of screen, but i was trying to run adb commands from pc or from te and they still show permission denied. SetCPU works.
Click to expand...
Click to collapse
Ok, go into adb shell and type su + enter. Watch your phone when you do this. Superuser should ask if you want to allow "unknown" root privileges. "unknown" is adb. Click allow and your problems should go away.
My MyGlacier 4G MINE!!!
So typing su works and the message terminal emulator is granted permissions, but then any other commands dont work
Sent via MyTouch 4G
Whats a test command I could try?
Sent via MyTouch 4G
mrpanic7 said:
So typing su works and the message terminal emulator is granted permissions, but then any other commands dont work
Sent via MyTouch 4G
Click to expand...
Click to collapse
I ran into this same issue and it drove me crazy. I would not get prompted by the phone to allow su permissions when going through ADB- kept getting "permission denied"
I did finally get SU permissions through ADB, but I dont recall exactly what I did to get prompted to allow access.
I will try to retrace what I did... believe I had ADB shell running (without su permissions "$"), but I also had terminal emulator running on my phone. I entered the su command on my phone, then I did the same from ADB shell.
Finally the phone prompted me to allow access - accepted - and no problems from that point.
Basically, I just had to keep f'n with it.
Yeah thats my problem exactly. Yeah I appreciate any assistance you can provide. I mean my pc reads my device when I adb devices command, but it wont allow nothing past that. Please keep me informed on anything I can try, also im not thag most fluent with using sdk/adb stuff so any additional info with using that is much appreciated thanks again fellow enthusiasts!
Sent via MyTouch 4G
Have you tried to bacup su, then uninstall su. Reinstall su, Then try it again. MIGHT work
Sent from my HTC Glacier using XDA App
yeah i re-installed su and didnt help, @dbiggs-what can i do thru adb to initiate the su permissions to the device like you did?
I wish I could help more specifically, but I dont remember exactly what I did that allowed me access- just kept trying
Maybe try this...(dont be offended if any of these steps are ones that you already know or have tried, I am just trying to be as thorough as I can from memory)
Open up super user, then go back to the terminal emulator and enter the "su" command to gain superuser permissions.
Plug the phone into the computer, select charge only, enter ADB through tools (probably "C:\Android\tools" if your Android folder is in the root of your harddrive).
from the prompt C:\Android\Tools, enter:
adb shell
then you will get the "$" that you mentioned.
enter the "su" command, and hopefully you will get prompted to allow superuser permissions for ADB.
I am pretty sure these are the steps that I took, just had to keep trying.
Lemme know how it works out.
I see some people here asking about getting su privileges in adb, however I do have SU and I can run su in adb shell. My problem is that I am trying to push some files and use Android Commander. I can't run "adb remount" (remount failed: Operation not permitted), I can't copy files in Android Commander (it's says that I do not have ROOT)
How can I get Read-Write in ADB ??
Edit: Oh, now I got it, I don't have root in ADB, when i type "adb root" it says "adbd cannot run as root in production builds"
Did anyone figure this out? I'm being denied on TE and PC also.
I have managed to be able to get around this issue by going into recovery mode on my phone.
If the end result that you are looking for is to adb push files, then the easier way to do this is to flash clockwork recovery to your phone, then start your phone into recovery mode, mount system and you should be able to push files no problem.
Lemke know if this helps.
Sent from my HTC Glacier using XDA App
mrpanic7 said:
hey guys need help so my Mytouch 4G updated and perm rooted, and i keeep gettin gthe permission denied everytime i try and execute a command thru adb thru my pc or on the Terminal Emulator. Did something not go thru on root or am i missing something simple? any help would be greatly appreciated. Thanks
Click to expand...
Click to collapse
I'm pretty sure your issue has nothing to do with SU access. Most likely, your phone is simply mounting as r/o (read only) when it boots up, so ADB is unable to change anything to the system folder. The easiest way to mount as r/w (Read/Write) is to go into Root Explorer and click the r/w button in the top right corner, and then go to ADB and see if it will allow you to do the same commands that it previously denied.
I have the same issue with my phone mounting as r/o by default, but I haven't been able to figure out how to automount as r/w on the MT4G. If anyone knows how, please share.
I had this same issue, on several android phones including MT4G. Here is how I fixed it.
1. Connect phone via usb (I was in "charge only" mode, not disk drive mode)
2. Open command prompt and navigate to the android tools folder
3. type "adb shell"
4. MAKE SURE YOUR PHONE SCREEN IS ON AND UNLOCKED
- The above step is very important otherwise you will not get the SU prompt
5. At the "$" prompt type "su"
6. Your phone should now display the SU screen asking you to allow the connection root access.
7. Once you allow it, you are golden.
I did this on a windows pc. Hope it helps.

Issues With Even Running Root? :(

Running with instructions here:
http://wiki.cyanogenmod.org/wiki/HTC_Glacier:_Full_Update_Guide#Rooting_the_HTC_Glacier
but after going into adb shell and running:
adb push busybox /data/local/tmp/
I'm getting a "permission denied" error for any adb for that or any adb command I throw at it.
I do notice that my adb shell starts with $ instead of # but not sure what step I'm missing. Any help would be greatly appreciated. Trying to breath new life in this thing and don't have any account/market setup on it - so if I can do the rooting through this it'll be easier for me otherwise I'll go ahead and setup another G-account to do it that way if I have to :\
Try executing "adb shell mkdir /data/local/tmp" and try again.
If doesn't work - try changing all /data/local/tmp references to /data/local
thanks for the feedback Jack_R1
Unfortunately that's a no go... same error even with that
Then you're doing something wrong. Follow the guides EXACTLY. Don't do stuff that's not written, do the stuff that's written EXACTLY as it's written, verify that you're starting where the guides expect you to and have all the prerequisites, and it'll work. Your phone isn't different from any other phone, and if something that works for million others doesn't work for you - then you're doing something wrong.
For example, nobody asked you to get into ADB shell to run these commands you're running. You can't run "adb" while being inside ADB shell. Read the guide PROPERLY.
Jack_R1 said:
Then you're doing something wrong. Follow the guides EXACTLY. Don't do stuff that's not written, do the stuff that's written EXACTLY as it's written, verify that you're starting where the guides expect you to and have all the prerequisites, and it'll work. Your phone isn't different from any other phone, and if something that works for million others doesn't work for you - then you're doing something wrong.
For example, nobody asked you to get into ADB shell to run these commands you're running. You can't run "adb" while being inside ADB shell. Read the guide PROPERLY.
Click to expand...
Click to collapse
Thanks,
I did try to follow things to the T but diverted away from doing things -exactly- since starting with "adb push busybox /data/local/tmp/" command I keep getting a "cannot stat 'busybox': No such file or directory"
So in reality.. .THAT was my main issue which is leading to me trying other stuff such as the "adb shell" and not getting # (since I'm pushing files to gain root)
Turns out I'm now able to get "adb push" working on my files since.. I hate myself for it being this simple... I just had to "CD" into my /platform-tools folder since command prompt started in my documents folder by default thus it was looking there for my files
Welp, thanks for the help anyway. Seen this question lingering around in Google Search and hope this helps out someone else :good:

Categories

Resources