device not available, only in adb shell - Android Q&A, Help & Troubleshooting

C:\ADBTOOLS>adb devices
List of devices attached
da4d4717 device
C:\ADBTOOLS>adb shell
[email protected]:/ $ su
su
[email protected]:/ # adb devices
adb devices
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
List of devices attached
[email protected]:/ #
my device connects to adb,
however as soon as I go into adb shell, the device is no longer found.
What is going on here?

mdelaney1986 said:
C:\ADBTOOLS>adb devices
List of devices attached
da4d4717 device
C:\ADBTOOLS>adb shell
[email protected]:/ $ su
su
[email protected]:/ # adb devices
adb devices
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
List of devices attached
[email protected]:/ #
my device connects to adb,
however as soon as I go into adb shell, the device is no longer found.
What is going on here?
Click to expand...
Click to collapse
Of course that happens when you run adb shell you are entering in your phone using the debbuging shell. You are in your phone. This happens to me also when i am using adb shell no devices will be shown. If you can run any command from adb shell then your device is there. Nothing to worry about. It is normal.
If you disconnect your device when in adb shell you will see it will automatically exit the shell!
Hit Thanks if i helped you!

Related

Starting adb ?!

Hi all!
I was using Modaco 2.9 before and it was amazing stable.
Later on I tryied [email protected] worked well, but not as stable as the modaco, so I thought lets change to the 3.0. Since that I have al lot system crashes, so I thought I need to do "deldalv and/or ext_wipe" with the RA-recovery-1.2.3
Figured out that it didnt work, it says I should use "adb deldalv"
I couldnt get the adb to run on my ubuntu linux, so I tried to find an update for the RA-recovery.
And there is RA-recovery-1.5.1 and I can just install it (cause I have a previous version) via adb.
Now My Question:
How does it work?!?
Code:
[email protected]:~$ adb usb
error: insufficient permissions for device
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
[email protected]:~$ adb kill-server
[email protected]:~$ adb start-server
* daemon not running. starting it now *
* daemon started successfully *
[email protected]:~$ adb usb
error: insufficient permissions for device
[email protected]:~$ adb devices
List of devices attached
???????????? no permissions
Code:
[email protected]:~$ cat /etc/udev/rules.d/50-android.rules
#Bus 001 Device 005: ID 0bb4:0c02
SUBSYSTEM=="usb", SYSFS(idVendor)=="0bb4",MODE="0666"
How do I connect the device then, if not like that?
How can I test if everything works?
Thanks in advance
Unicate said:
How do I connect the device then, if not like that?
How can I test if everything works?
Thanks in advance
Click to expand...
Click to collapse
afaik this looks good, try starting adb as root. this is what adb devices says for me:
Code:
[email protected]:~$ adb devices
List of devices attached
HT98XXXX427 device
Code:
./adb start-server
./adb shell
works for me (with root ofcourse )
I set up my system so that the adb deamon starts at boot.
Created a script in the /etc/init.d directory called adb:
Code:
#! /bin/sh
case "$1" in
start)
/home/joeblow/AndroidSDK/tools/adb start-server
;;
stop)
/home/joeblow/AndroidSDK/tools/adb kill-server
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
Created a link to it in /etc/rc2.d:
Code:
lrwxrwxrwx 1 root root 13 2010-01-09 19:17 S10adb -> ../init.d/adb
Off Topic...
Am sorry to be a little off topic.. I just got my Hero and was trying to figure out all the stuff about it here on XDA.. Can anybody tell me what is ADB ??.. Whats it used for ??.. As far as I have understood, I think its some sorta software to connect hero to the computer to transfer files and stuff.. Is it right ??.. If yes.. Then what is the difference between this and HTC SYNC ??.. Thanks in advance.. Cheers !!!
if You want only transfer files, You don't need ADB.
htc sync is for synchronizing phone (contacts, calendar, etc) with PC (i guess, i don't use it ) and for upgrading SW.

[Q] restart services

whats the android command to restart sevices from terminal or adb shell? i want to stop and start adbd from the phone. ive tried the linux service adbd restart to no avail.... also would like to start /stop / restart networking etc...
toy4x4xda said:
whats the android command to restart sevices from terminal or adb shell? i want to stop and start adbd from the phone. ive tried the linux service adbd restart to no avail.... also would like to start /start networking...
Click to expand...
Click to collapse
$ adb kill-server
$ adb start-server
Click to expand...
Click to collapse
Requires you've got the adb binary on you device, though.
Well that's not quite what I am looking for...
That only kills/starts the adb binary not the adb daemon that runs on my phone. I would like to be able to restart services / daemons like on other distros of linux. As seen here: http://theos.in/desktop-linux/tip-that-matters/how-do-i-restart-linux-network-service/
[email protected]_targa:/# ps |grep adb
ps |grep adb
root 280 1 3452 188 ffffffff 00008294 S /sbin/adbd
[email protected]_targa:/# adb start-server
adb start-server
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
[email protected]_targa:/# ps |grep adb
ps |grep adb
root 280 1 3452 188 ffffffff 00008294 S /sbin/adbd
root 22683 1 3936 396 ffffffff afd0b8d4 S adb
[email protected]_targa:/# adb kill-server
adb kill-server
[email protected]_targa:/# ps |grep adb
ps |grep adb
root 280 1 3452 188 ffffffff 00008294 S /sbin/adbd **********Daemon still running as same pid and adb connection never reset.
[email protected]_targa:/#
Wow I couldn't find this anywhere for some reason but I tried start / stop commands and they worked ...
stop adbd
start adbd
restart adbd - otoh fails with: -- as does restart with other services such as restart mboxd
restart: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

Pulling build.prop with ADB

Hi,
Finally I can enter recovery mode after messing up with build.prop on Xperia Tablet S
tablet is visible in ADB as
C:\Users\Amiga\Desktop\adb>adb devices
List of devices attached
0123456789ABCDEF recovery
but rest of the commands doesn't work
C:\Users\Amiga\Desktop\adb>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: closed
So I don't know how to pull out build.prop from Tablet
Amiga4ever123 said:
Hi,
Finally I can enter recovery mode after messing up with build.prop on Xperia Tablet S
tablet is visible in ADB as
C:\Users\Amiga\Desktop\adb>adb devices
List of devices attached
0123456789ABCDEF recovery
but rest of the commands doesn't work
C:\Users\Amiga\Desktop\adb>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: closed
So I don't know how to pull out build.prop from Tablet
Click to expand...
Click to collapse
The reason you are getting the "error: closed" message is because the version of System Recovery installed on your tablet inhibits ADB from accessing the tablet's file system. You are not going to be able to pull or push the build.prop file.
Ok I can't use ADb so how can I replace faulty build.prop file or make recovery? Any ZIP file that I can put on SD card?
Amiga4ever123 said:
Ok I can't use ADb so how can I replace faulty build.prop file or make recovery? Any ZIP file that I can put on SD card?
Click to expand...
Click to collapse
You can try copying an OTA update file to an SD card and using System Recovery to install it, but I do not believe doing that will work. I believe you have bricked your tablet to the point where you have to send your tablet to Sony for repair.
Cat McGowan said:
You can try copying an OTA update file to an SD card and using System Recovery to install it, but I do not believe doing that will work. I believe you have bricked your tablet to the point where you have to send your tablet to Sony for repair.
Click to expand...
Click to collapse
So its very easy to brick this amazing sony device
Cat McGowan said:
The reason you are getting the "error: closed" message is because the version of System Recovery installed on your tablet inhibits ADB from accessing the tablet's file system. You are not going to be able to pull or push the build.prop file.
Click to expand...
Click to collapse
Hi cat tried to PM you but can?t do it...
Can you teach me how to copy/restore (pull and or push) the original build.prop in my cell (now bricked) i had the original file (buil.prop) inside it... i am learning about adb commands. thanksss. The main problem I have: An issue with ADB VCOM drivers (in windows) (tried in a couple of PCS, the device manager "see" the vcom preloader only a little moment (when connect the cell with usb cable) and then dissapear... then with command adb devices: no devices found... can you help me?
federimau said:
Hi cat tried to PM you but can?t do it...
Can you teach me how to copy/restore (pull and or push) the original build.prop in my cell (now bricked) i had the original file (buil.prop) inside it... i am learning about adb commands. thanksss. The main problem I have: An issue with ADB VCOM drivers (in windows) (tried in a couple of PCS, the device manager "see" the vcom preloader only a little moment (when connect the cell with usb cable) and then dissapear... then with command adb devices: no devices found... can you help me?
Click to expand...
Click to collapse
The reason ADB is reporting no devices are found may be because (1) your device is bricked, which probably means you are not going to be able to pull/push files from/to your device, (2) you do not have ADB drivers for your device properly installed on your PC, and/or (3) you do not have USB debugging enabled in your tablet's Developer options settings.
It's good you are learning how to use ADB and there are plenty of ADB tutorials to be found via Google, etc.; e.g., HERE.
Here is what you specifically ask for.
Pulling the build.prop file from your tablet to your PC is easy, just use these commands.
Code:
adb wait-for-device
adb pull /system/build.prop
adb kill-server
Pushing the build.prop file from your PC to your tablet is more complicated.
(1) Your tablet must have root access. If it doesn't, attempts at pushing the file to your tablet's /system directory will fail.
(2) Along with having root access, you must have SuperSU or Superuser, and Busybox installed on the tablet.
(3) You have to temporarily set your tablet's /system directory's properties from RO to RW, which must be done quickly because your tablet's OS monitors the /system directory's properties and will reboot the tablet if it detects the directory's properties have been changed from RO.
(4) To issue the ADB commands as quickly as possible, the commands must be put into a DOS batch command script file. For example, create and run a batch file named doit.bat containing the following commands.
Code:
adb wait-for-device
adb push build.prop /build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
Good luck.
Cat McGowan said:
The reason ADB is reporting no devices are found may be because (1) your device is bricked, which probably means you are not going to be able to pull/push files from/to your device, (2) you do not have ADB drivers for your device properly installed on your PC, and/or (3) you do not have USB debugging enabled in your tablet's Developer options settings.
It's good you are learning how to use ADB and there are plenty of ADB tutorials to be found via Google, etc.; e.g., HERE.
Here is what you specifically ask for.
Pulling the build.prop file from your tablet to your PC is easy, just use these commands.
Code:
adb wait-for-device
adb pull /system/build.prop
adb kill-server
Pushing the build.prop file from your PC to your tablet is more complicated.
(1) Your tablet must have root access. If it doesn't, attempts at pushing the file to your tablet's /system directory will fail.
(2) Along with having root access, you must have SuperSU or Superuser, and Busybox installed on the tablet.
(3) You have to temporarily set your tablet's /system directory's properties from RO to RW, which must be done quickly because your tablet's OS monitors the /system directory's properties and will reboot the tablet if it detects the directory's properties have been changed from RO.
(4) To issue the ADB commands as quickly as possible, the commands must be put into a DOS batch command script file. For example, create and run a batch file named doit.bat containing the following commands.
Code:
adb wait-for-device
adb push build.prop /build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
Good luck.
Click to expand...
Click to collapse
Wowww Cat, you are the one!! Thanks in Advance
The main problem I have: An issue with device recognition in windows PC... driver ADB VCOM MTK 6592 (tried in different PCS windows Xp and 8) (the device manager "see" the vcom preloader but only a little moment (in the first instant when connect the cell (cell off) with usb cable) and then dissapear (disconnect) the vcom preloader... I think If I can reach the way to get this connection running ok I can progress with this... will fight hard...
When I type the command adb devices, result: no devices found...
Tried to upgrade the vcom drivers (when i can catch it in the active state in device manager)... nothing
Tried to "on" the phone... nothing
Tried to flash a new ROM from Recovery (MIUI or Feelingme 078)... ERROR installation aborted
I can see this effect (with usbview): the usb is recognized in the PC (but just for a little moment at the instant when plug it), then disconnect...
I need to recover the original build.prop.bak from coolpad memory, rename it to build.prop and send it to coolpad again...
I think i can flash (from recovery) an original build. prop (packed as update.zip) doing the wipes and apply update from sdcard)... anyone can assist me on this?
This new 9976A item comes to me with 048 version, custom buid version 265 and rooted from factory...
Anyone can please help me?
Cat McGowan said:
The reason ADB is reporting no devices are found may be because (1) your device is bricked, which probably means you are not going to be able to pull/push files from/to your device, (2) you do not have ADB drivers for your device properly installed on your PC, and/or (3) you do not have USB debugging enabled in your tablet's Developer options settings.
It's good you are learning how to use ADB and there are plenty of ADB tutorials to be found via Google, etc.; e.g., HERE.
Here is what you specifically ask for.
Pulling the build.prop file from your tablet to your PC is easy, just use these commands.
Code:
adb wait-for-device
adb pull /system/build.prop
adb kill-server
Pushing the build.prop file from your PC to your tablet is more complicated.
(1) Your tablet must have root access. If it doesn't, attempts at pushing the file to your tablet's /system directory will fail.
(2) Along with having root access, you must have SuperSU or Superuser, and Busybox installed on the tablet.
(3) You have to temporarily set your tablet's /system directory's properties from RO to RW, which must be done quickly because your tablet's OS monitors the /system directory's properties and will reboot the tablet if it detects the directory's properties have been changed from RO.
(4) To issue the ADB commands as quickly as possible, the commands must be put into a DOS batch command script file. For example, create and run a batch file named doit.bat containing the following commands.
Code:
adb wait-for-device
adb push build.prop /build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
Good luck.
Click to expand...
Click to collapse
Cat i will need to pull the backup file... then the code i need is... (please monitor it for me)
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
and... when you push the correct and original file
adb wait-for-device
adb push build.prop /build.prop
is it ok? or the path is this?
adb push build.prop /system/build.prop
(if there are a build.prop in the device this will overwrite it?
federimau said:
Cat i will need to pull the backup file... then the code i need is... (please monitor it for me)
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
and... when you push the correct and original file
adb wait-for-device
adb push build.prop /build.prop
is it ok? or the path is this?
adb push build.prop /system/build.prop
(if there are a build.prop in the device this will overwrite it?
Click to expand...
Click to collapse
adb push build.prop /system/build.prop
Cat McGowan said:
adb push build.prop /system/build.prop
Click to expand...
Click to collapse
Thanks cat, as i say, the main problem in this case is: i have a short window of time when the windows PC see the driver in the device manager... then disconnects... do you have any idea what can i do to establish this connection betweeen the android device and the computer without interruption?
---------- Post added at 05:22 PM ---------- Previous post was at 05:12 PM ----------
Cat McGowan said:
adb push build.prop /system/build.prop
Click to expand...
Click to collapse
cat, i´m doing 2 bat files (edited with notepad, is this correct?)
one file: pull.bat
with code
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
another file: push.bat
with code
adb wait-for-device
adb push build.prop /system/build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
what do you think?
---------- Post added at 05:51 PM ---------- Previous post was at 05:22 PM ----------
federimau said:
Thanks cat, as i say, the main problem in this case is: i have a short window of time when the windows PC see the driver in the device manager... then disconnects... do you have any idea what can i do to establish this connection betweeen the android device and the computer without interruption?
---------- Post added at 05:22 PM ---------- Previous post was at 05:12 PM ----------
cat, i´m doing 2 bat files (edited with notepad, is this correct?)
one file: pull.bat
with code
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
another file: push.bat
with code
adb wait-for-device
adb push build.prop /system/build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
what do you think?
Click to expand...
Click to collapse
I think need to remove the first line?
adb wait-for-device
federimau said:
Thanks cat, as i say, the main problem in this case is: i have a short window of time when the windows PC see the driver in the device manager... then disconnects... do you have any idea what can i do to establish this connection betweeen the android device and the computer without interruption?
Click to expand...
Click to collapse
You need to solve that problem before you can do anything else. Find an xda-developers forum that deals with your device and look there for fixes for your device's drivers. I am confident I can help you with Sony tablet drivers, but not your device's drivers. I don't even know the model of your device.
Create and use the following CheckDriver.bat file to help you troubleshoot the drivers. The script simply opens a DOS command window, starts the adb server, then lists the devices the adb server finds. The DOS command window will stay open until you press any key. If the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Code:
@echo off
echo Starting ADB server and waiting for device.
echo.
adb wait-for-device
adb devices
pause
adb kill-server
federimau said:
cat, i´m doing 2 bat files (edited with notepad, is this correct?)
one file: pull.bat
with code
adb wait-for-device
adb pull /system/build.prop.bak
adb kill-server
another file: push.bat
with code
adb wait-for-device
adb push build.prop /system/build.prop
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /'"
adb shell "su -c 'chmod 0440 /sbin/ric'"
adb shell "su -c 'stop ric'"
adb shell "su -c 'busybox pkill -f /sbin/ric'"
adb shell "su -c 'mount -ro remount,rw /system'"
adb shell "su -c 'busybox cp -af /build.prop /system/build.prop'"
adb shell "su -c 'chmod 0744 /system/build.prop'"
adb shell "su -c 'rm /build.prop'"
adb shell "exit"
adb kill-server
what do you think?
Click to expand...
Click to collapse
Looks okay. Just keep in mind that the scripts are based on what is required for Sony tablets. Your device may require something a little different.
federimau said:
I think need to remove the first line?
adb wait-for-device
Click to expand...
Click to collapse
No. The "adb wait-for-device" command is what starts the adb server and causes the script to wait until the adb server detects a device before the next command in the script is issued.
Similar to the CheckDevice.bat file, you can insert the "@echo off" command at the beginning of your .bat files and the "pause" command just before the "adb kill-server" to cause the DOS command window stay open so you can see what is going on and the DOS command window will stay open until you press any key. Again, if the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Cat McGowan said:
You need to solve that problem before you can do anything else. Find an xda-developers forum that deals with your device and look there for fixes for your device's drivers. I am confident I can help you with Sony tablet drivers, but not your device's drivers. I don't even know the model of your device.
Create and use the following CheckDriver.bat file to help you troubleshoot the drivers. The script simply opens a DOS command window, starts the adb server, then lists the devices the adb server finds. The DOS command window will stay open until you press any key. If the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Code:
@echo off
echo Starting ADB server and waiting for device.
echo.
adb wait-for-device
adb devices
pause
adb kill-server
Looks okay. Just keep in mind that the scripts are based on what is required for Sony tablets. Your device may require something a little different.
No. The "adb wait-for-device" command is what starts the adb server and causes the script to wait until the adb server detects a device before the next command in the script is issued.
Similar to the CheckDevice.bat file, you can insert the "@echo off" command at the beginning of your .bat files and the "pause" command just before the "adb kill-server" to cause the DOS command window stay open so you can see what is going on and the DOS command window will stay open until you press any key. Again, if the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Click to expand...
Click to collapse
I am working with all of you advices... i owe you a drink (if you agree!!!) Thanks
Cat McGowan said:
You need to solve that problem before you can do anything else. Find an xda-developers forum that deals with your device and look there for fixes for your device's drivers. I am confident I can help you with Sony tablet drivers, but not your device's drivers. I don't even know the model of your device.
Create and use the following CheckDriver.bat file to help you troubleshoot the drivers. The script simply opens a DOS command window, starts the adb server, then lists the devices the adb server finds. The DOS command window will stay open until you press any key. If the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Code:
@echo off
echo Starting ADB server and waiting for device.
echo.
adb wait-for-device
adb devices
pause
adb kill-server
Looks okay. Just keep in mind that the scripts are based on what is required for Sony tablets. Your device may require something a little different.
No. The "adb wait-for-device" command is what starts the adb server and causes the script to wait until the adb server detects a device before the next command in the script is issued.
Similar to the CheckDevice.bat file, you can insert the "@echo off" command at the beginning of your .bat files and the "pause" command just before the "adb kill-server" to cause the DOS command window stay open so you can see what is going on and the DOS command window will stay open until you press any key. Again, if the script hangs, press ctrl+c to abort the script and close the DOS command window, then open another DOS command window and issue the "adb kill-server" command to stop the adb server.
Click to expand...
Click to collapse
Cat, i can not establish a stable and in-time connection between cell and PC...
type
adb wait-for-device
and never "see" the cell
i have the drivers upgraded
with usbview software i see the PC "see" the cell a short amount of time, then disconnects...
any advice??
federimau said:
Cat, i can not establish a stable and in-time connection between cell and PC...
type
adb wait-for-device
and never "see" the cell
i have the drivers upgraded
with usbview software i see the PC "see" the cell a short amount of time, then disconnects...
any advice??
Click to expand...
Click to collapse
Sounds to me your device simply is not responding to the adb server's attempt to connect. Again, my advice is for you to find an xda-developers forum that deals specifically with your device and look there for fixes for your device.
@Cat McGowan
Thank you for the info,
but it's not working on Recovery mode!
I try to backup and restore the build.prop file on cmd in recovery & in bootloop case.
working:
adb wait-for-device
adb pull /system/build.prop.bak or adb pull /system/build.prop
adb kill-server
not working push to the system: (even the cmd showing the opposite)
adb wait-for-device
adb push build.prop /system/build.prop
adb kill-server
I'm tring to resotre from PC or SD card...
(after changing the permission to system folder (instead only build.prop file) to 00644 the device keep get to Recovery mode! (with root browser app)
only flashing again the rom fix it.)
I got an error too:
- exec '/system/bin/sh' failed: Permission denied (13) -
by the way what Should to be on?
SuperSU or Superuser (ADB shell allow ?)
Developer Mode (Enable ADB ) +USB Debugging on
i'm worng what else?
I want to add some info:
I know the best way to edit this file only by : Notepad++ or EditPlus editor to preserve UNIX encoding
or Turbo Editor ( File Editor ) app.
read here:
http://forum.xda-developers.com/showpost.php?p=54970011&postcount=171
http://forum.xda-developers.com/showpost.php?p=55094822&postcount=203
and great script from user.
http://forum.xda-developers.com/showpost.php?p=55113422&postcount=208
will this work too on recovery or bootloops mode?
backup:
adb shell
su
mount -o remount,rw /system
cp /system/build.prop /system/build.prop.bak
mount -o ro,remount /system/ /system
----
restore:
adb shell
su
mount -o remount,rw /system
cp system/build.prop system/build.prop.bootloop
cp system/build.prop.bak system/build.prop
chmod 00644 system/build.prop
reboot

Can I recover my personal files (audio and photo) by usiing ADB?

Hello,
my phone (I think it is not rooted because adb shows the dollar character) is stuck into the recovery for an unknown reason. Is there a way to access the phone folders through ADB / shell commands?
I'm a newbie and I tried to do by myself but unfortunately I cannot reach my objective.
for example, I (think) I successfully reached the sdcard (is this the android folder name where all the personal data si saved?) but when I try the command adb pull -p It doesn't work. Here what it happens:
1|[email protected]:/ $ cd sdcard
[email protected]:/sdcard $ adb pull -p
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/sdcard $
Any Idea? Thanks
Howl55 said:
Hello,
my phone (i think it is not rooted because adb shows the dollar character) is stuck into the recovery for an unknown reason. Is there a way to access to phone folders through ADB / shell commands?
I'm a neewbie and I tried to do by myself. Unfortunately I cannot reach my objective.
for example, I (think) I successfully reached the sdcard (is this the android folder name where all the personal data si saved?)
but when I try the command adb pull -p It doesn't work. Here what it happens:
1|[email protected]:/ $ cd sdcard
[email protected]:/sdcard $ adb pull -p
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/sdcard $
Any Idea? Thanks
Click to expand...
Click to collapse
Is there someone who could help me???

How to turn on and off the WiFi through ADB (no root)?

I found I can use these ADB commands to turn on and of the WiFi of a rooted phone:
Code:
adb shell su -c 'svc wifi enable'
adb shell su -c 'svc wifi disable'
However, I'm interested in doing it without having to root the phone for an automatic testing I'm doing. Do you guys know if this is possible?
I found this project which allows me to connect to a WiFi through ADB commands not being a root user. I was wondering if anyone knows how to disconnect also from ADB and not being a root user.
UPDATE:
I've been recently trying:
Code:
C:\adb>adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
adb server is out of date. killing...
* daemon started successfully *
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.wifi.WifiSettings }
Warning: Activity not started, its current task has been brought to the front
and
Code:
C:\adb>adb -s serial_number shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.wifi.WifiSettings }
Warning: Activity not started, its current task has been brought to the front
I also found doing this type of command:
Code:
adb shell input keyevent 20 & adb shell input keyevent 23
I can navigate and click. The problem seems to be that I always finish in a different state so the next time I input the command
Code:
adb -s serial_number shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
I start in a different place and start clicking elsewhere. I've tried returning home, but that doesn't fix the issue. Is there any way to start always from the same point inside the WiFi settings?
Thanks!
natiya said:
I found I can use these ADB commands to turn on and of the WiFi of a rooted phone:
Code:
adb shell su -c 'svc wifi enable'
adb shell su -c 'svc wifi disable'
However, I'm interested in doing it without having to root the phone for an automatic testing I'm doing. Do you guys know if this is possible?
Click to expand...
Click to collapse
Turn WiFi off
Code:
adb shell settings put global airplane_mode_on 1
adb shell settings put global wifi_on 0
adb shell settings put global wifi_scan_always_enabled 0
Afterwards you've to re-boot the device.
Turn WiFi on
Code:
adb shell settings put global airplane_mode 0
adb shell settings put global wifi_on 1
adb shell settings put global wifi_scan_always_enabled 1
jwoegerbauer said:
Turn WiFi off
Code:
adb shell settings put global airplane_mode_on 1
adb shell settings put global wifi_on 0
adb shell settings put global wifi_scan_always_enabled 0
Afterwards you've to re-boot the device.
Turn WiFi on
Code:
adb shell settings put global airplane_mode 0
adb shell settings put global wifi_on 1
adb shell settings put global wifi_scan_always_enabled 1
Click to expand...
Click to collapse
Thank you, but those don't produce any change on my device. Actually, if I put the first two commands without doing "adb kill-server" in between, I get this message:
error: more than one device/emulator
Click to expand...
Click to collapse
But the output when they work is:
adb server is out of date. killing...
* daemon started successfully *
Click to expand...
Click to collapse
and nothing happens.
I've been recently trying:
Code:
C:\adb>adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
adb server is out of date. killing...
* daemon started successfully *
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.wifi.WifiSettings }
Warning: Activity not started, its current task has been brought to the front
and
Code:
C:\adb>adb -s serial_number shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.wifi.WifiSettings }
Warning: Activity not started, its current task has been brought to the front
This opens the screen where you can turn on and off the WiFi but it doesn't do it...not sure if I'm missing something!
Just to be shure, make shure your using the latest version of ADB offered by google here:
https://developer.android.com/studio/releases/platform-tools
You could use adb wifi
After activating when using usb it and connecting through the same wifi:
svc wifi enable
works without root
I'm a little late to this thread, but if it still helps the OP, non-rooted Android 10 and below allowed wireless adb connections AFTER a USB connection was first established (adb start-server && adb tcpip 5555 && adb connect [IP]:5555), but that changed (for the better) in Android 11 and above with the new new Developer options Wireless debugging random port assignments (adb connect [IP]:[PORT] or adb pair [IP]:[PORT] [PIN]) such that the adb wireless connection never needs USB cable ever again.
Given Android 11 allows Developer options Wireless debugging via a random port, and Android 12 new Developer options Wireless debugging allows that to be accessed even easier with a new Developer options Wireless debugging tile, the only thing missing is a way to turn the non-rooted Android Wi-Fi on or off via adb (which was the OP's original question after all).
Maybe this will work if we can figure out how to tap the buttons?
adb shell "am start -a android.settings.WIFI_SETTINGS"
Click to expand...
Click to collapse
For swiping on the phone from adb this works...
C:\> adb shell input swipe 500 1000 500 100
This will instantly swipe from center to the top of the screen.
You can add a time period, e.g., take 3 seconds to swipe that.
C:\> adb shell input swipe 500 1000 500 100 3000
Click to expand...
Click to collapse
But you want to tap the buttons, right?
If we can figure out the positions, maybe this would work?
C:\> adb shell am start -n com.google.android.gms/.ads.settings.AdsSettingsActivity
That should pop up an Android "Reset Advertising ID" settings page.
C:\> adb shell input tap 500 400
If run after the command above, that will tap the button to
asking to "Opt out of Ads Personalization" in that Activity
if that button is like mine, at the X=500 & Y=400 location.
On my phone, this is the "Reset advertising ID" button location:
adb shell input tap 500 200
On my phone, this is the "OK" button on that GUI above.
adb shell input tap 700 1000
C:\> adb shell am force-stop com.google.android.gms
If run after bringing up the advertising-id reset Activity,
it will close the activity without doing anything else.
Click to expand...
Click to collapse
Here is a somewhat related post...
[adb,scrcpy,vysor] What ports does Android 12 randomly set when Wi-Fi connecting via Wireless debugging adb "pair" or "connect" commands?
Type adb tcpip 5555 in the command line or Terminal and press Enter.
Find your phone's IP address in Settings > About Phone > Status > IP Address.
Back in the command line or Terminal, type adb connect [your Android's IP address].
Finally, press Enter again.
Regards,
J Wick

Categories

Resources