execute "adb tcpip <port_no>" command without using usb - General Questions and Answers

NON ROOTED PHONE
I am trying to create to backup of all application in android but I don't want the users to connect to USB even for the first time.
okay let me first explain what happens when we connect our phone with USB to ADB client
0. USB Debugging mode is enabled in the phone.
1. The phone is connected to PC using a USB cord.
2. We run
Code:
adb tcpip 9999
command from cmd with ADB already installed.
The above command helps now switched the abd demon (adbd) inside the android phone to listen through TCP-IP protocol
3. now we can disconnect the phone from the PC
4. using a terminal emulator application we can now fire the commands
a)
Code:
adb connect localhost:999
b)
Code:
backup -all -f /sdcard/dev/bck.ab
now a backup pop-up will open up, you can simply click backup button.
Now we can anytime execute the command in 4.a and 4.b util the user restarts the phone or
but the problem is I wish to execute
Code:
adb tcpip 9999
without PC. Can someone suggest me how to approach this problem. From where should I start reading or there is some existing application that can do this on a non-root phone.

Related

[Q] LG Thrill 4G new ROM Help

I have a LG Thrill 4G. I rooted the phone using superonelick, root checker says it is rooted. Downloaded ROM Manger and flashed clockworkmod. I cannot click boot into recovery, it just restarts the phone. I have tried to reboot into recovery by pressing 3d button, down volume, and power and it boots me into the android recovery but not clockworkmod, so I can not find anyway in to download the new rom from the zip file. Has had any other people had trouble with this? I have spent over 2 days searching the internet but I cannot find any similar problems, is there anyway to get into the recovery mode to install the new ROM without it just restarting the phone?
LG Thrill 4G ClockworkMod Installation (correct method)
1) You need to have ROOT access at the least (see link below)
It will also be good to have ADB (and hence LG Thrill drivers) installed properly
http://forum.pandaapp.com/thread/2/11/20110919/4e77f603d22632913-1.html
2) Get the recovery image from here and keep it on your PC in a folder accessible by ADB.
OR (if no ADB then) directly put it on your LG Thrill SDCard root
http://forum.xda-developers.com/showthread.php?t=1257588
4) If you have ADB then follow the instructions in the first link above to push the recovery image to your phone.
OR
if no ADB then open Terminal Emulator (install it from Market) and type su and click allow if the prompt comes up
5) Now you can follow instructions in the first link (far above) again, starting from the 'dd if=...' step. But instead of rebooting you could just power off
6) Clockwork recovery should now be flashed. To enter recovery, keep the 3D button, Vol-down and Power button pressed until you see the LG logo
Thank you for getting back with me. I tried to follow these steps and when I am in the Terminal Emulator and type adb push recovery.img /data it comes back with adb: not found. I have redownloaded the recovery file that you have attached to the SD card, same error, and then I tried to copy to the phone itself and same error. I can do any of the other prompts for the emulator but nothing that has to do with the recovery file it will not work. I am guessing maybe this is the problem because if it cannot find the recovery file, I cant do much of anything else. Do you have any suggestions of why the file still cannot be found on my phone?
connect adb through tcp
Try this:
1. If you are using terminal emulator to access adb then try downloading the app called remote adb. This tool will allow you to connect your device via tcp. Take note of the ip adress and port number. Usually the default port is fine.
2. Now open sshdroid, connectbot, terminal emulator and start an ssh session with the adb shell. You must have the correct public ip and port entered in to access the adb via tcp.
3. Once you have made the ssh connection between what ever emulator you are using and remote adb, start a shell as su.
4. Type the commands mentioned earlier.
This should let you run the whole thing from within your phone.
Alternatively...
1. start remote adb on your device.
2. start a terminal or cmd prompt on your cpu.
3. cd to androidSDK\platform-tools
4. type ---> adb start-server
The server then sets up connections to all running emulator/device instances. It locates emulator/device instances by scanning odd-numbered ports in the range 5555 to 5585, the range used by emulators/devices. Where the server finds an adb daemon, it sets up a connection to that port.
Note that each emulator/device instance acquires a pair of sequential ports — an even-numbered port for console connections and an odd-numbered port for adb connections. For example:
Emulator 1, console: 5554
Emulator 1, adb: 5555
Emulator 2, console: 5556
Emulator 2, adb: 5557 ...
As shown, the emulator instance connected to adb on port 5555 is the same as the instance whose console listens on port 5554.
Once the server has set up connections to all emulator instances, you can use adb commands to control and access those instances. Because the server manages connections to emulator/device instances and handles commands from multiple adb clients, you can control any emulator/device instance from any client (or from a script).
5. type --> adb forward tcp:5554 tcp:5555
5. type ---> adb devices. In response, adb prints this status information for your device. If there is no emulator/device running, adb returns no device, and you have not made a tcp connection.
6. Take note of the serial number listed. You will use it later to direct commands to device.
7. Type --> adb shell
8. Type --> su
9. Use commands from other post to achieve whatever you need.
10. once finished with shell, type --> exit twice to leave the shell
11. Finally, type --> adb server-kill
Hope that helps. Seems like you were having issues making the connection from device to adb, so that is what I focused on. If I can help anymore, just ask. We are all continually learning and the only stupid question is the one never asked.
B^)

[GUIDE] MTP doesn't work for you on GNU/Linux? Use adb.

In this guide I will show you how to use adb to move files to or from your device. Especially helpful if your device has MTP and you can't get it to work with mtpfs on GNU/Linux.
What do you need?
Computer with GNU/Linux.
Connection to the Internet.
The 32bit adb binary or the 64bit adb binary, they are added as attachment to this post. (1)
An Android phone with USB debugging on.
Steps:
Connect your phone with a USB cable to your computer. Make sure you have USB debugging on! (2) Put the adb binary in a folder where you can open a terminal. With the terminal open type:
Code:
./adb devices
Make sure it says something like this:
Code:
List of devices attached
XXXXXXXXXXXXXdevice
Now you know you properly connected your device type:
Code:
./adb pull /sdcard/
or
Code:
./adb push /sdcard/
More info on adb commands you can find here:
http://developer.android.com/tools/help/adb.html
(1): If you are using the Debian or Ubuntu distro (or another wich allows you to install *.deb files) you can install the 32- or 64 bit adb packages and use adb from every folder. Download them from the attachments. If you use this type adb instead of ./adb.
(2): Don't know how to turn on USB debugging? Go to settings, scroll down to the About phone menu item. Tap it and scroll down again to Build number and tap it many times! Then go to settings, and tap developer options and find the USB debugging option.
I hope this was helpful, but I think not, because I get no replies...
AW: [GUIDE] MTP doesn't work for you on GNU/Linux? Use adb.
http://www.webupd8.org/2012/12/how-to-mount-android-40-ubuntu-go-mtpfs.html
I usually use sftp to transfer files. No cable and shell access included.
Sent from my GT-I9100 using xda app-developers app
If you want to copy lots of files, like your music collection or movies, wireless is not fast enough. That's why I use adb, because it's very fast.

Samsung SM?T230NU 5.0- ADB Shows Unauthorized Device

adb shows Unauthorized device on custom ROM for SM-231
I successfully rooted my SM-230NU and installed the custom ROM provided in this post
http://forum.xda-developers.com/tab-4/development/rom-android-5-0-lollipop-material-t3061873
However, when I connect the device using USB to my Mac and try "adb devices" I get "unauthorized" beside the device ID. I have already tried the following:
a. on the Mac: adb kill-server followed by adb start-server
b. on the Mac: Deleted the ~/.android/adbkey and ~/.android/adbkey.pub
c. on Device: Revoked the USB debugging access to all computers (on the device) and also via terminal emulator app verified that on the device /data/misc/adb/ directory is empty
d. on PC: Repeated all the above on a Windows 7 machine (still shows "unauthorized" beside the device ID)
e. Changed multiple cables and tried the same cable with other devices and they are all detected as valid devices.
Unless I get the device to be recognized I am not able to install some apks using adb install. Any help will be highly appreciated.

How to enable USB debuggin with broken touchscreen?

Hi
I have a old nexus with broken touchscreen . I want to use it via mirror on pc.
unfortunatly USB debuggin wasn't enable so i can't install any app.
any tips?
thanks
PS: i saw many use usb adapter to connect a mouse but i don't have it
EDIT: right now i just need a rom/kernel with USB debugging mode enabled by default
the screen still works , only the touch screen is broken
power , and volume bottons still work
the device is rooted
If it's only installing apps you could install them via recovery. (as zip)
Or you could check for a cheap replacement touchscreen.
nonameleft4me said:
If it's only installing apps you could install them via recovery. (as zip)
Or you could check for a cheap replacement touchscreen.
Click to expand...
Click to collapse
thanks for the answer!
sorry i forgot to mention that i need USB debuggin for make the app works correctly.
I'm trying now to find out what rom i have installed and maybe then find a kernel with OTG support . (yes i found a otg cable )
i'm not a expert of rooting
I think google has an app called voice control. Not sure how operational it is though. Supposedly you can control the entire system via voice.
nonameleft4me said:
I think google has an app called voice control. Not sure how operational it is though. Supposedly you can control the entire system via voice.
Click to expand...
Click to collapse
i need to unlock the phone and tap on the widget "search" to start voice command .
I think the best way is to find a way to enable OTG and then use a usb mouse
Boot into Recovery and mount*Data*partition.
Open a shell on PC and type:
adb pull /data/property/persist.sys.usb.config ~/
Repace*~/*with home directory of your OS.
Open that file in a text editor and you would possibly see*mtp*written there. Change it to*mtp,adb.
Note that sometimes Android doesn't understand the text file changes if the line terminator is "DOS Terminators" which Notepad would probably do on Windows (mine is Linux so no issue here).
In that case, I would suggest not using*adb pullbut doing:
adb shell echo 'mtp,adb' > /data/property/persist.sys.usb.config
You may verify that the*echo*command overwrote the file by using:
adb pull /data/property/persist.sys.usb.config ~/
and seeing the file's content in some text editor.
Unmount*Data*and reboot into Android OS. USB Debugging would probably be enabled.
Sent from my Aqua Trend using Tapatalk
Itzabhaysingj said:
Boot into Recovery and mount*Data*partition.
Open a shell on PC and type:
adb pull /data/property/persist.sys.usb.config ~/
Repace*~/*with home directory of your OS.
Open that file in a text editor and you would possibly see*mtp*written there. Change it to*mtp,adb.
Note that sometimes Android doesn't understand the text file changes if the line terminator is "DOS Terminators" which Notepad would probably do on Windows (mine is Linux so no issue here).
In that case, I would suggest not using*adb pullbut doing:
adb shell echo 'mtp,adb' > /data/property/persist.sys.usb.config
You may verify that the*echo*command overwrote the file by using:
adb pull /data/property/persist.sys.usb.config ~/
and seeing the file's content in some text editor.
Unmount*Data*and reboot into Android OS. USB Debugging would probably be enabled.
Sent from my Aqua Trend using Tapatalk
Click to expand...
Click to collapse
thanks!
i tryed
1) i went in recovery mode
2) i connect via usb the nexus4 to my pc
3)went in "mounts and storage"
4)then "mount /data"
5)in cmd i tryed your command "adb pull /data/property/persist.sys.usb.config" but i says i'm unauthorized
i checked via command "adb devices" and it return a alphanumerica string plus "unauthorized"
i tryed then to
Reboot your phone into recovery mode.
Connect it to your computer.
Open the terminal and type:
cd ~/.android
adb push adbkey.pub /data/misc/adb/adb_keys
adb shell reboot
but it still says error : device unauthorizated . please check the confirmation dialog on your device
i tryed also with a different version of adb and now gives me after "adb devices" an "offline" response
NB: if i connect the phone (not in recovery mode) via usb i can copy files in and out (i can explore onlyfew folders) , maybe this could help.
hartman11 said:
i tryed also with a different version of adb and now gives me after "adb devices" an "offline" response
NB: if i connect the phone (not in recovery mode) via usb i can copy files in and out (i can explore onlyfew folders) , maybe this could help.
Click to expand...
Click to collapse
Sorry but this could not help... Now only thing you can do is connect any USB mouse to your phone via otg cable (as it is not costly also), and you can also try USB gamepad. I also have used USB gamepad before when my touchscreen was not working.
Second thing you can do is download any android device manager for your PC like mobogenie or mobilego they directly install any app from play store to you android device, through USB.And I don't think they need USB debugging option to be enabled.
Sent from my Aqua Trend using Tapatalk
my problem is not installing an app (i could do it in recovery mode with a .zip) but enabling the USB debuggin
I have a otg cable but not the "Y" type ( the one with power source ) , also i don't know if OTG is supported by my kernel . I would like to install maybe another kernel which has OTG support and usb debuggin mode enable by default but i don't know what kind of rom i have D:
right now i just need a rom/kernel with USB debugging mode enabled by default
up

Help with using ADB commands wirelessly?

I have a phone (Samsung A10E) that will not connect to the PC via USB (It's not the PC, I have a second of the same phone which connects fine, so SDK install and phone drivers are good). It is not rooted.
Is there anyway to perform ADB TCPIP 5555 on the phone itself or otherwise set the phone to accept wireless ADB commands with only the phone? (also no wireless debugging option available under Dev Options).
Thx for any suggestions!
NO.
A working ADB USB-connection is required to run
Code:
adb tcpip 5555
command

Categories

Resources