ADB shell responds differently in terminal emulator - General Topics

I tried to execute the following through adb on windows, and it works fine.
.\adb.exe shell cmd overlay enable com.android.internal.systemui.navbar.gestural
However, when I tried this:
cmd overlay enable com.android.internal.systemui.navbar.gestural
, via terminal emulator, it throws an error saying:
cmd: Can't find service: overlay
Click to expand...
Click to collapse
Why is it that it works, through adb from windows, and not through terminal emulator?
Don't both of them interact with the same shell environment?
Are there some sort of permission differences between the two, causing such discrepancies?

manish_s said:
...
cmd overlay enable com.android.internal.systemui.navbar.gestural
, via terminal emulator, it throws an error ...
Click to expand...
Click to collapse
If you are rooted (Magisk su#), you can launch any shell command, on-the-fly, with ADBungFu https://forum.xda-developers.com/t/...pops-manager-adb-simulator-su-magisk.4104149/

oF2pks said:
If you are rooted (Magisk su#), you can launch any shell command, on-the-fly, with ADBungFu https://forum.xda-developers.com/t/...pops-manager-adb-simulator-su-magisk.4104149/
Click to expand...
Click to collapse
Not rooted. Is it expected to work otherwise too, right?

Related

ADB Terminal Emulator

When I open up my terminal emulator it says:
export PATH=/data/local/bin:$PATH
and no commands work anymore
I then tried to use adb through cmd in windows and I can't get anything to work that way. Everything was working fine yesterday, but now I can't get any commands to work. Any ideas?
bigupurself7 said:
When I open up my terminal emulator it says:
export PATH=/data/local/bin:$PATH
and no commands work anymore
I then tried to use adb through cmd in windows and I can't get anything to work that way. Everything was working fine yesterday, but now I can't get any commands to work. Any ideas?
Click to expand...
Click to collapse
When you say, terminal emulator... you mean on your phone, right?
When you try running adb commands in windows -- what's the exact error message you're getting?

Root and ADB

My Xoom is rooted and running tiamat 1.41.
I'm trying to push a file onto the xoom and having trouble with it.
I have the Android SDK installed.
When I type ADB DEVICES, it shows my xoom listed as a long string of letters and numbers.
I figured out I could get into the shell by using ADB -s ###### shell (where #### is the numbers/letters shown as the device).
If I type remount, i get permission denied.
If I try to push a file onto the Xoom, I get permission denied.
What am I missing here and how do I mount the Xoom so that I can push files onto the it?
Anyone know where the libflashplayer.so goes? I have the official flash installed and don't see it in /system/lib
you have to cd into the directory where adb is. most people put it right on the root of there C drive so in terminal type "cd c:\android-sdk-windows\platform-tools" without quotes then type "adb remount" and you should be mounted
if you need more help with adb check out this guide http://androidsamurai.com/forum/viewtopic.php?f=12&t=4&sid=b8c229b771793d03bb84efbcf562e55b
I have tools and platform-tools directories in my PATH so I can run them from any directory. Even running it from the directory containing the executable fails with 'remount failed - operation not permitted'
you could try uninstalling and reinstalling android sdk
shobirama said:
If I type remount, i get permission denied.
If I try to push a file onto the Xoom, I get permission denied.
Click to expand...
Click to collapse
What does running "getprop ro.secure" say? (in adb shell/terminal on the tablet)
ydaraishy said:
What does running "getprop ro.secure" say? (in adb shell/terminal on the tablet)
Click to expand...
Click to collapse
Running getprop ro.secure in both adb shell and in terminal emulator on the tablet returns 1
shobirama said:
Running getprop ro.secure in both adb shell and in terminal emulator on the tablet returns 1
Click to expand...
Click to collapse
You're not in insecure mode. I thought flashing that kernel would put you into insecure mode? Maybe you need to reflash?
If you still actually have a working su binary, copy the file somewhere writeable, then su to root, then copy it from there again to the location.

[Q] How to unroot phone Atrix 2

I used the eacy one click to root phone. I would like to unroot it now. I am having touch screen freezing problem. I need to start removing applications to see which one is causing the problem or if it is a hardware issue or software.
I downloaded the zip file 1-click_exploit. I expanded the files and ran the application. I have read that there is an option to uninstall with in that file but I don't see one. Where do I find it. If I just do a factory reset will it remove it? If I do a reset do I have to repurchase all of my apps?
Thank you in advance!
A factory data reset will not remove root.
Also, a reset does not delete your purchases. They are all stored in your google account. So, if they do get deleted, just reinstall them.
As far as unrooting, I do not know. Someone else may chime in here...probably going to tell you to post in the Q&A section as well.
Doesn't the one-click have an un-root feature?
Sent from my bootloader-locked MB865.
The one click method also has an un root option in the folder.
Sent from my MB865 using xda app-developers app
Generally the only trace rooting leaves is a setuid binary "su" in /system/bin. And Superuser.apk to manage permission which apps get to invoke the binary. So unrooting involves uninstalling Superuser application and removing the su binary. If you want to do it by hand: (1) adb remount (2) adb shell (3) su (4) rm /system/bin/su
kousik said:
Generally the only trace rooting leaves is a setuid binary "su" in /system/bin. And Superuser.apk to manage permission which apps get to invoke the binary. So unrooting involves uninstalling Superuser application and removing the su binary. If you want to do it by hand: (1) adb remount (2) adb shell (3) su (4) rm /system/bin/su
Click to expand...
Click to collapse
I have no idea what the above manual steps are for. I can uninstall the application but where and how do I remove the su binary. On the phone? Please send directions for a non technical type of user.
Thank you!
MaTrixJ said:
The one click method also has an un root option in the folder.
Sent from my MB865 using xda app-developers app
Click to expand...
Click to collapse
Not sure where in the the following files in 1-click_exploit is the unroot option.I have attached a list of the files in the download.
bushbaum said:
Not sure where in the the following files in 1-click_exploit is the unroot option.I have attached a list of the files in the download.
Click to expand...
Click to collapse
Out of these files, adb.exe and .dll files are left in your windows PC. Not sure if they are deleted afterwards, if not, you can always unzip the above into a directory. You'll need the adb and the dll files.
The su and superuser.apk are two files that are pushed to your phone that provides the root functionality.
The zerg file is the exploit payload temporarily used to root your phone, and removed later by the script.
So if you have unzipped these into a directory, connect your phone via USB (make sure usb debugging is on), and run the commands
Code:
adb.exe remount
adb.exe shell
su // superuser may pop a permission request on phone screen
rm /system/bin/su
rm /system/app/Superuser.apk
exit
kousik said:
Out of these files, adb.exe and .dll files are left in your windows PC. Not sure if they are deleted afterwards, if not, you can always unzip the above into a directory. You'll need the adb and the dll files.
The su and superuser.apk are two files that are pushed to your phone that provides the root functionality.
The zerg file is the exploit payload temporarily used to root your phone, and removed later by the script.
So if you have unzipped these into a directory, connect your phone via USB (make sure usb debugging is on), and run the commands
Code:
adb.exe remount
adb.exe shell
su // superuser may pop a permission request on phone screen
rm /system/bin/wu
rm /system/app/Superuser.apk
exit
Click to expand...
Click to collapse
What mode is my usb connection? charge only? I have the phone setting usb setting on. I run the commands (using the run command in windows accessories). When I go run "adb.exe remount" the black command screen blinks on screen so then under I go to run again and entered "adb.exe shell" the run command screen opens up with [email protected]:/$ I put in "su" After I entered the command rm system/bin/wu I get a "read only error" how do I change from read only?
Sorry for all these questions but I warned you that I was not a technical user. Thanks
bushbaum said:
What mode is my usb connection? charge only? I have the phone setting usb setting on. I run the commands (using the run command in windows accessories). When I go run "adb.exe remount" the black command screen blinks on screen so then under I go to run again and entered "adb.exe shell" the run command screen opens up with [email protected]:/$ I put in "su" After I entered the command rm system/bin/wu I get a "read only error" how do I change from read only?
Sorry for all these questions but I warned you that I was not a technical user. Thanks
Click to expand...
Click to collapse
I was wondering do I have to have the elite version superuser installed to grant permission to system? I just have the free version.
bushbaum said:
What mode is my usb connection? charge only? I have the phone setting usb setting on. I run the commands (using the run command in windows accessories). When I go run "adb.exe remount" the black command screen blinks on screen so then under I go to run again and entered "adb.exe shell" the run command screen opens up with [email protected]:/$ I put in "su" After I entered the command rm system/bin/wu I get a "read only error" how do I change from read only?
Click to expand...
Click to collapse
1. yes -- charge only
2. it is better to open a command prompt -- in run commands type in "cmd" which'll give you a shell, easy to track command outputs
3. in that shell cd to the directory you unzipped and run "adb.exe remount"
4. Unless it says "remount succeeded" further operations won't succeed
5. After you execute "su" your prompt will change from $ to # ... is this happening?
6. Only on # prompt, you can do "rm /system/bin/su" ... that too only if remount succeeded
Let us know at which step it fails.
kousik said:
1. yes -- charge only
2. it is better to open a command prompt -- in run commands type in "cmd" which'll give you a shell, easy to track command outputs
3. in that shell cd to the directory you unzipped and run "adb.exe remount"
4. Unless it says "remount succeeded" further operations won't succeed
5. After you execute "su" your prompt will change from $ to # ... is this happening?
6. Only on # prompt, you can do "rm /system/bin/su" ... that too only if remount succeeded
Let us know at which step it fails.
Click to expand...
Click to collapse
I get the following error after entering the run "adb.exe remount"
*daemon not running starting it now*
*daemon started successfully*
remount failed: operation not permitted
bushbaum said:
I get the following error after entering the run "adb.exe remount"
*daemon not running starting it now*
*daemon started successfully*
remount failed: operation not permitted
Click to expand...
Click to collapse
Then try remounting manually:
Code:
C:\> adb.exe shell
edison$/ su
edison#/ mount -o remount,rw /dev/block/system /system
Afterwards proceed with rest of the script.

[Q] .bat file to open adb shell?

I thought it would be nice to have a quick way to open adb shell, so I tried to make a .bat file to do so.
This is the code I put in the .bat file.
cd..
cd..
cd..
cd adt-bundle-windows-x86_64
cd sdk
cd platform-tools
adb
When I run the program, it runs through and closes.
Does anyone know what I did wrong?
moose392 said:
I thought it would be nice to have a quick way to open adb shell, so I tried to make a .bat file to do so.
This is the code I put in the .bat file.
cd..
cd..
cd..
cd adt-bundle-windows-x86_64
cd sdk
cd platform-tools
adb
When I run the program, it runs through and closes.
Does anyone know what I did wrong?
Click to expand...
Click to collapse
to open a adb shell the command is "adb shell"
EDIT
Oh and why not put all your cd commands into one command? ie.
cd ..................\adt-bundle-windows-x86_64\sdk\platform-tools
zacthespack said:
to open a adb shell the command is "adb shell"
EDIT
Oh and why not put all your cd commands into one command? ie.
cd ..................\adt-bundle-windows-x86_64\sdk\platform-tools
Click to expand...
Click to collapse
Sorry, I think I asked the wrong question. Im not trying to open adb shell but just adb.exe from the sdk.
The program I made seems to do the same thing as just double clicking on the adb.exe, but it is supposed to work correctly through cmd.
Maybe it is not running through cmd correctly?
moose392 said:
Sorry, I think I asked the wrong question. Im not trying to open adb shell but just adb.exe from the sdk.
The program I made seems to do the same thing as just double clicking on the adb.exe, but it is supposed to work correctly through cmd.
Maybe it is not running through cmd correctly?
Click to expand...
Click to collapse
When running via the command line you have to issue an argument to adb, e.g adb shell or adb devices etc etc
zacthespack said:
When running via the command line you have to issue an argument to adb, e.g adb shell or adb devices etc etc
Click to expand...
Click to collapse
Ok I replaced adb with adb devices, but cmd still closes itself.
moose392 said:
Ok I replaced adb with adb devices, but cmd still closes itself.
Click to expand...
Click to collapse
Yep, that's right. It would stay if you enter something like adb shell. A simple adb devices lists all the recognized devices via adb and the command is done.
Why are you trying to start adb? The cd to your adb folder should be enough to type commands or open the adb shell.
-star- said:
Yep, that's right. It would stay if you enter something like adb shell. A simple adb devices lists all the recognized devices via adb and the command is done.
Why are you trying to start adb? The cd to your adb folder should be enough to type commands or open the adb shell.
Click to expand...
Click to collapse
Ok thanks I figured things out.

Terminal Emulator isnt working :/

Hi, i have ICS for HTC Desire (Bravo), Android 4.0.4 and my problem when i start Terminal Emulator, i type "su" and i get # (superuser permissions) and when i type "adb uninstall package" i get message from terminal "waiting for device" and i dont know what to do
I need to uninstal com.android.vending
Thx for help
t0msk said:
Hi, i have ICS for HTC Desire (Bravo), Android 4.0.4 and my problem when i start Terminal Emulator, i type "su" and i get # (superuser permissions) and when i type "adb uninstall package" i get message from terminal "waiting for device" and i dont know what to do
I need to uninstal com.android.vending
Thx for help
Click to expand...
Click to collapse
This has nothing to do with Terminal Emulator, it's working fine ->
adb stands for android debug bridge, it's meant to be a way to do stuff with your android device from your computer over the "bridge" that is USB. It says "waiting for device" because it needs a USB android device to be connected. As far as I know, even with OTG you can't use adb actually on an android device itself with Terminal Emulator. If all you want to do is uninstall an app, you shouldn't need adb anyway.
Read here.
HTCDreamOn said:
This has nothing to do with Terminal Emulator, it's working fine ->
adb stands for android debug bridge, it's meant to be a way to do stuff with your android device from your computer over the "bridge" that is USB. It says "waiting for device" because it needs a USB android device to be connected. As far as I know, even with OTG you can't use adb actually on an android device itself with Terminal Emulator. If all you want to do is uninstall an app, you shouldn't need adb anyway.
Read here.
Click to expand...
Click to collapse
I tried use adb through cmd in windows but its waiting too (adb through cmd is working only in recovery)
So how can i uninstall system app?
Screenshot is in attachments, i can disable it, but i need to uninstall it, because here is thread: http://forum.xda-developers.com/showthread.php?t=1355660&page=1662
Originally Posted by rfandango View Post
Download: Vending-3.8.15.noupdate.norestrictions.apk - google it - rename to Vending.apk, with root explorer move it to system app and set perm to rw r r...reboot...work like a charm
Unfortunately, this isn't working for me - still no play store, but there's an entry for com.android.vending in Manage Apps with a grey icon (generic app icon with a little SD card in the bottom right corner) and a size of 0.00b. Anyone know what I missed?
Click to expand...
Click to collapse
Edit: Fixed it! Needed to do "adb uninstall com.android.vending" and then reboot. The store is back now.
Click to expand...
Click to collapse
Any idea?
Because i dont have Play Store so i cant do anything
t0msk said:
Any idea?
Because i dont have Play Store so i cant do anything
Click to expand...
Click to collapse
Try run the following in Terminal Emulator:
Code:
pm uninstall com.android.vending
* You must find out the vending apk and delete it first (If the apk exists and is a system app).
codelover said:
Try run the following in Terminal Emulator:
Code:
pm uninstall com.android.vending
* You must find out the vending apk and delete it first (If the apk exists and is a system app).
Click to expand...
Click to collapse
i got "Failure"
I made new screenshot and i found that when i type "adb devices" in Terminal Emulator i get blank page, you can see it in the screenshot
t0msk said:
I made new screenshot and i found that when i type "adb devices" in Terminal Emulator i get blank page, you can see it in the screenshot
Click to expand...
Click to collapse
As mentioned by @HTCDreamOn, adb is for you to run commands from Windows and since you are working with Terminal Emulator you do not need to deal with adb related command.
Also mentioned earlier that you MUST manually delete the apk first before you can uninstall the app if it is a system app.
To do that first find out where the vending apk located. assumed that you have busybox/grep installed, run the following in Terminal Emulator:
pm list packages -f | grep vending
You should get something like this:
package:/system/app/vending.apk=com.android.vending
Click to expand...
Click to collapse
* Actual filename & path may vary depending on device
Now that you know where the apk is, eg: /system, mount the /system rw and delete the vending.apk manually.
Then you can proceed to uninstall using the following command:
pm uninstall com.android.vending
Success :laugh:
Thx!
I dont want to make new thread so my another question is why i cant go to ini.d folder when its exists?
Look at my screenshot
//EDIT: SOLVED

Categories

Resources