adb from smartphone to android wear with just bluetooth (no cables needed) - Wear OS General

Hey folks,
Just wanted to share something I found that might be useful from time to time: how to send adb commands to android wear directly from your phone without any cables nor an extra PC.
This is a combination from different tutorials, made for different goals, so almost all credit goes to them
This worked from my Nexus 5 (4.4.4 stock, rooted) to a LG G Watch R (5.0.1)... but it should work with any combination as long as, your smartphone is rooted (but this is XDA so it has to be rooted )
First thing first, start bluetooth debugging in your android wear device (from the developer menu)
Now from your smartphone, start USB debugging (developer menu too)
At the bottom of the settings in the android wear app you should see a new option "Debugging over bluetooth", turn it on. You should get a message just below:
Host: disconnected
Target: connected
You will also get a permanent notification to remind you that debugging over bluetooth is active.
Disclaimer: su commands are powerful and with great powers comes great responsibility... so pay attention to what you do. In any case, I'm not responsable for any damage incurred to your phone, your android wear device, your cat, your home, your neighborhood, etc...
Open a terminal emulator in the smartphone paired to your wear device, where you can do "su" stuff, and run the following commands:
> su
> export HOME=/sdcard
> setprop service.adb.tcp.port 5555
> stop adbd
> start adbd
> adb devices <--- this should show you your own smartphone (with a emulator-5554, in my case)... you can actually shell into it if you like recursions .
SECURITY NOTE: This will allow the adb daemon to listen for tcp/ip connections from other machines connected to your wifi hotspot... I guess it will also allow machines sharing the same 4G cellular network you are using to connect, but what are the odds... In any case, and if I'm not wrong, any android version since 4.3 should give you a message telling you to accept the connection or not.... maybe in airplane mode with just bluetooth activated it would work and it would also be safer.
Continuing in terminal (the typical stuff we know already):
> adb forward tcp:4444 localabstract:/adb-hub
> adb connect localhost:4444
At this point your smartphone should buzz and ask you to allow a connection from your own phone. This time is the real deal, but just in case read carefully the message. It should say "Allow Wear Debugging?", so accept the connection and optionally mark the always accept option.
You will now have two emulated devices:
> adb devices
emulator-5554 device <--- the smartphone
localhost:4444 device <--- the android wear device
you need to specify for now on the target of your adb commands. For instance if you want to have a shell in the android wear device:
> adb -s localhost:4444 shell
That's it. Hope it works for everyone.
Ah! just one thing the value service.adb.tcp.port we set before disappears with a reboot (you can replace the word service with persist if you prefer to have it surviving the reboot... but I do not recommend it).
If you do not want to reboot but you want to disable it, run, as root:
> setprop service.adb.tcp.port -1
> stop adbd
> start adbd
to clean-up, from the terminal and as root:
> adb kill-server
You can also disable the adb debugging from the developer menu.
N.B. 1 . I guess the easiest thing to do would be to put all those commands in a script file and then just run as root:
> sh script_to_adb_wear.sh
N.B.2. I have not tried with fastboot... but that would surprise me if it works.... In any case, and IMHO, fastboot should only be used with the device connected to a computer via usb.

This isnt working for me on my OPO running CM12 unofficial... Running the commands gives me a blank adb devices window, any advice?

Hi,
I guess you get the empty device list after the "start adbd" command, right?
Just to be sure, before running the adb devices commad do "adb kill-server"
If adb devices still gives you an empty list of devices try with:
> adb connect localhost:5555
And check again. Usually, what should happen, the adb server detects a adbd listening in the port 5555 and it considers it is an android emulator and it connects to it automatically. Maybe in your case it is not connecting, so the connect command might help. Once you hace at least your phone showing you can run the other commands to access the watch.
Let me know if this helps

gusano38 said:
Hi,
I guess you get the empty device list after the "start adbd" command, right?
Just to be sure, before running the adb devices commad do "adb kill-server"
If adb devices still gives you an empty list of devices try with:
> adb connect localhost:5555
And check again. Usually, what should happen, the adb server detects a adbd listening in the port 5555 and it considers it is an android emulator and it connects to it automatically. Maybe in your case it is not connecting, so the connect command might help. Once you hace at least your phone showing you can run the other commands to access the watch.
Let me know if this helps
Click to expand...
Click to collapse
Works like a charm thanks for the help

Where is the adb binary? Adb isn't a recognized command

My binary is in /system/bin/adb

Sideloading...
Really great, all works... until I try to sideload an APK. I keep getting invalid apk file. I'm doing it by:
adb -s _____ install ____.apk
but it's not working. Any suggestions?
gusano38 said:
Hey folks,
Just wanted to share something I found that might be useful from time to time: how to send adb commands to android wear directly from your phone without any cables nor an extra PC.
This is a combination from different tutorials, made for different goals, so almost all credit goes to them
This worked from my Nexus 5 (4.4.4 stock, rooted) to a LG G Watch R (5.0.1)... but it should work with any combination as long as, your smartphone is rooted (but this is XDA so it has to be rooted )
First thing first, start bluetooth debugging in your android wear device (from the developer menu)
Now from your smartphone, start USB debugging (developer menu too)
At the bottom of the settings in the android wear app you should see a new option "Debugging over bluetooth", turn it on. You should get a message just below:
Host: disconnected
Target: connected
You will also get a permanent notification to remind you that debugging over bluetooth is active.
Disclaimer: su commands are powerful and with great powers comes great responsibility... so pay attention to what you do. In any case, I'm not responsable for any damage incurred to your phone, your android wear device, your cat, your home, your neighborhood, etc...
Open a terminal emulator in the smartphone paired to your wear device, where you can do "su" stuff, and run the following commands:
> su
> export HOME=/sdcard
> setprop service.adb.tcp.port 5555
> stop adbd
> start adbd
> adb devices <--- this should show you your own smartphone (with a emulator-5554, in my case)... you can actually shell into it if you like recursions .
SECURITY NOTE: This will allow the adb daemon to listen for tcp/ip connections from other machines connected to your wifi hotspot... I guess it will also allow machines sharing the same 4G cellular network you are using to connect, but what are the odds... In any case, and if I'm not wrong, any android version since 4.3 should give you a message telling you to accept the connection or not.... maybe in airplane mode with just bluetooth activated it would work and it would also be safer.
Continuing in terminal (the typical stuff we know already):
> adb forward tcp:4444 localabstract:/adb-hub
> adb connect localhost:4444
At this point your smartphone should buzz and ask you to allow a connection from your own phone. This time is the real deal, but just in case read carefully the message. It should say "Allow Wear Debugging?", so accept the connection and optionally mark the always accept option.
You will now have two emulated devices:
> adb devices
emulator-5554 device <--- the smartphone
localhost:4444 device <--- the android wear device
you need to specify for now on the target of your adb commands. For instance if you want to have a shell in the android wear device:
> adb -s localhost:4444 shell
That's it. Hope it works for everyone.
Ah! just one thing the value service.adb.tcp.port we set before disappears with a reboot (you can replace the word service with persist if you prefer to have it surviving the reboot... but I do not recommend it).
If you do not want to reboot but you want to disable it, run, as root:
> setprop service.adb.tcp.port -1
> stop adbd
> start adbd
to clean-up, from the terminal and as root:
> adb kill-server
You can also disable the adb debugging from the developer menu.
N.B. 1 . I guess the easiest thing to do would be to put all those commands in a script file and then just run as root:
> sh script_to_adb_wear.sh
N.B.2. I have not tried with fastboot... but that would surprise me if it works.... In any case, and IMHO, fastboot should only be used with the device connected to a computer via usb.
Click to expand...
Click to collapse

AJWizkid said:
Really great, all works... until I try to sideload an APK. I keep getting invalid apk file. I'm doing it by:
adb -s _____ install ____.apk
but it's not working. Any suggestions?
Click to expand...
Click to collapse
Adb -s localhost:4444 install my.apk

Where can I download the script?
¯\_(ツ)_/¯

thegrim11 said:
Where can I download the script?
¯\_(ツ)_/¯
Click to expand...
Click to collapse
Here's the script.
Using Root Explorer:
Create a folder under /system and copy adbgwrbt.sh there
Set permissions to 100 (execute for owner)
Tap script and hit execute
Profit
No credit. Just copied and pasted from OP. Thank you so much for this gusano!! Always find myself needing this . Now if you could just figure out fastboot [emoji57]

Oh my, thank you very much, I've been trying to do this ever since I got my watch but just didn't have the skills (still managed to fins an other way to send files from the phone to the watch and even install apk's), you're great man!

hatefuel19 said:
Now if you could just figure out fastboot [emoji57]
Click to expand...
Click to collapse
I'm pretty sure that in fastboot mode (bootloader) the bluetooth driver is not loaded, so I guess having fastboot with bluetooth is not possible. Furthermore, I would not trust a bluetooth connection to do things that could brick your watch... of course, the pogo pins is not what I call a super trustable connection either

The sarcasm was lost apparently ?

Grr. Got a replacement phone from insurance and the binary isn't there. Can someone please pm me the adb from system/bin?
Sent from my XT1060 using Tapatalk

gusano38 said:
Hey folks,
Just wanted to share something I found that might be useful from time to time: how to send adb commands to android wear directly from your phone without any cables nor an extra PC.
This is a combination from different tutorials, made for different goals, so almost all credit goes to them
This worked from my Nexus 5 (4.4.4 stock, rooted) to a LG G Watch R (5.0.1)... but it should work with any combination as long as, your smartphone is rooted (but this is XDA so it has to be rooted )
First thing first, start bluetooth debugging in your android wear device (from the developer menu)
Now from your smartphone, start USB debugging (developer menu too)
At the bottom of the settings in the android wear app you should see a new option "Debugging over bluetooth", turn it on. You should get a message just below:
Host: disconnected
Target: connected
You will also get a permanent notification to remind you that debugging over bluetooth is active.
Disclaimer: su commands are powerful and with great powers comes great responsibility... so pay attention to what you do. In any case, I'm not responsable for any damage incurred to your phone, your android wear device, your cat, your home, your neighborhood, etc...
Open a terminal emulator in the smartphone paired to your wear device, where you can do "su" stuff, and run the following commands:
> su
> export HOME=/sdcard
> setprop service.adb.tcp.port 5555
> stop adbd
> start adbd
> adb devices <--- this should show you your own smartphone (with a emulator-5554, in my case)... you can actually shell into it if you like recursions .
SECURITY NOTE: This will allow the adb daemon to listen for tcp/ip connections from other machines connected to your wifi hotspot... I guess it will also allow machines sharing the same 4G cellular network you are using to connect, but what are the odds... In any case, and if I'm not wrong, any android version since 4.3 should give you a message telling you to accept the connection or not.... maybe in airplane mode with just bluetooth activated it would work and it would also be safer.
Continuing in terminal (the typical stuff we know already):
> adb forward tcp:4444 localabstract:/adb-hub
> adb connect localhost:4444
At this point your smartphone should buzz and ask you to allow a connection from your own phone. This time is the real deal, but just in case read carefully the message. It should say "Allow Wear Debugging?", so accept the connection and optionally mark the always accept option.
You will now have two emulated devices:
> adb devices
emulator-5554 device <--- the smartphone
localhost:4444 device <--- the android wear device
you need to specify for now on the target of your adb commands. For instance if you want to have a shell in the android wear device:
> adb -s localhost:4444 shell
That's it. Hope it works for everyone.
Ah! just one thing the value service.adb.tcp.port we set before disappears with a reboot (you can replace the word service with persist if you prefer to have it surviving the reboot... but I do not recommend it).
If you do not want to reboot but you want to disable it, run, as root:
> setprop service.adb.tcp.port -1
> stop adbd
> start adbd
to clean-up, from the terminal and as root:
> adb kill-server
You can also disable the adb debugging from the developer menu.
N.B. 1 . I guess the easiest thing to do would be to put all those commands in a script file and then just run as root:
> sh script_to_adb_wear.sh
N.B.2. I have not tried with fastboot... but that would surprise me if it works.... In any case, and IMHO, fastboot should only be used with the device connected to a computer via usb.
Click to expand...
Click to collapse
Loved your post!
Thing is I get an error each time I try the script.
I own a rooted LG G3 ChupaChups 4.2 ROM and a LG G Watch R
Thanx in advance to your help.

setprop service.adb.tcp.port 5555
Sent from my HTC One_M8 using Tapatalk

Unauthorized
ADB tells me that my device has not authorized itself as an adb connection. The problem is since it's not actually a standard USB debugging connection I don't get a popup to mark my device as trusted. Is there anyway to work around this?

I always get the error from the pictures
N4 Android 6.0 Frank rooted xposed
LG g watch wear 5.1.1 rooted (no idea what adventages)
Gesendet von meinem Nexus 4 mit Tapatalk
---------- Post added at 07:10 AM ---------- Previous post was at 07:09 AM ----------
J0SH1X said:
I always get the error from the pictures
N4 Android 6.0 Frank rooted xposed
LG g watch wear 5.1.1 rooted (no idea what adventages)
Gesendet von meinem Nexus 4 mit Tapatalk
Click to expand...
Click to collapse
And yes I did enable all debugging setting in companion app on phone on wear
Gesendet von meinem Nexus 4 mit Tapatalk

i have this problem not connect to localhost 4444. i have cm13

adb commands won't work for me.

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^)

[Tutorial] use Android Wear with 2 phones (iOS and Android)

I have found this in another thread, but couldn't resist to also tell it here.
Thanks to @kakocr2000 for the tutorial
Original post here : http://forum.xda-developers.com/android-wear/development/tutorial-android-wear-2-phones-ios-t3263546
Hi,
I uploaded this tutorial for you guys. And yes, it's supposed to work with iOS and Android! So, before I start I want to credit @moneytoo for his tutorial to Reset Wear Client and to the creator of Beelink. Let's start!
1) Install ADB on your computer
2) Enable USB Debugging on both, the watch and the phone
3) Download on your computer this APK: http://www.mediafire.com/download/dc...ps.beelink.apk
4) Install the APK of BeeLink on your watch through ADB. It's done using the following tutorial: http://corbindavenport.com/?p=167
5) Now you should have the app on your phone. The following steps are easy:
Watch is connected with phone A so turn off Bluetooth on this phone.
Execute following command (with Wear connected and ADB enabled - doesn't require root). Code:
adb shell "pm clear com.google.android.gms && reboot"
7) Power on Bluetooth on phone B.
Depending whatever devices were paired previously, confirm pairing code or initiate new pairing using following command (thanks @matejdro) or also use the wear app for that. Code:
adb shell "am start -a android.bluetooth.adapter.action.REQUEST_DISCOVERA BLE"
Click to expand...
Click to collapse

100+ Phone model extraction + others.

Hi.
First time making a post here, but have been using stuff here for quite a while. Thanks so much to the community for all the amazing stuff being developed, ect, here.
To the question:
My father's girlfriend recently came into 100's of phones. All various sources, mostly OBF's (Out of box failures) from the stores under their management.
I need a way to retrieve the models of each phone as quickly as possible. Other things aren't necessarily a necessity, but things like IMEI numbers, ect, would be a big bonus.
I then need to sort this data in a spreadsheet, but I can do that manually if exporting the data from the phones is possible.
These are obviously not rooted, as they were maybe turned on, or used once or twice if that much, and rooting them definitely would be longer than just doing the first time setup and then looking in settings.
Thanks to everyone for reading!
Greetings from South Africa.
You can retrieve a phone's brand / model and IMEI by means of ADB:
Get brand
Code:
adb shell "getprop 'ro.product.brand'"
Get model
Code:
adb shell "getprop 'ro.product.model'"
Get IMEI
Code:
adb shell "service call iphonesubinfo 4 | cut -c 52-66 | tr -d '.[:space:]'"
jwoegerbauer said:
You can retrieve a phone's brand / model and IMEI by means of ADB:
Get brand
Code:
adb shell "getprop 'ro.product.brand'"
Get model
Code:
adb shell "getprop 'ro.product.model'"
Get IMEI
Code:
adb shell "service call iphonesubinfo 4 | cut -c 52-66 | tr -d '.[:space:]'"
Click to expand...
Click to collapse
Is USB debugging not necessary for Adb? Or is fastboot all that you require? Do all android devices have a fastboot or similar? As I said, it's a lot of phones and they aren't all the same, all kinds of brands from Samsung to techno sparks.
Think I clearly spoke of ADB and not of Fastboot.
Yes, USB-debugging must be enabled on a phone to run ADB commands.
jwoegerbauer said:
Think I clearly spoke of ADB and not of Fastboot.
Yes, USB-debugging must be enabled on a phone to run ADB commands.
Click to expand...
Click to collapse
My apologies. I’m a computer technician. Don’t usually play with phones, except for the normal rooting devices from time to time (following guides ect.) So I’m not all that clued up yet.
Enabling usb debugging still means turning the device on, first time setup, enable usb debugging, use adb to get data.
Might as well just write down the model from “about” at that point and leaving the other less necessary data completely.
Any other ideas or is that the best we can do? In which case, thank you for the suggestion.
Is there perhaps a faster way to enable usb debugging?
AFAIK to access a phone's "About" screen it's not required that USB-debugging is got enabled on phone.

Broke the display of my phone :(

So, My Redmi 5A fell from hands and ended up with completely black display. I could call and hear my ringtone and upon connecting to SCRCPY could see the lock screen. I could not unlock it as I had not allowed the input stimulation permission. So, I took it to service center and they a tried a couple of displays and told me that data will have to be wiped in order for the new display to work. The phone contains crucial amount of data that I cannot afford to lose. So, I brought is back and tried the following steps:
1. The lock is pattern style and I tried usb mouse over OTG but could not perform the correct swipes due to no display.
2. I found an app that can make one android act as mouse for another android. I could connect my phone through SCRCPY and unlock it with that app but the problem is I need to approve the bluetooth pairing prompt for the first time.
3. I looked around google to pair a bluetooth device using ADB but all methods require the device to be rooted.
4. Despite knowing the pattern, I can't find anyway to use a keyboard over OTG as it will be more precise than mouse.
Is there a way that I can solve this problem? Can I unlock my phone using ADB as I know the pattern? Can I connect my phone through usb to my PC in order to run SCRCPY and use a mouse at the same time to unlock it? Or is there anyway of display replacement without data wipe? Help a troubled fellow
you can't simulate touch events via adb shell input keyevent/ tap? is that some miui permission?
can you adb pull -a /sdcard?
surely there is a way maybe something with
adb shell settings put secure ...
https://developer.android.com/reference/android/provider/Settings.Secure
edit: I think it's somehow related to miui security center. at least I can't find it in settings tables
if you are not afraid about more invasive methods you could enable adb root shell in boot.img, root with magisk or flash twrp.img from EDL mode. this requires hacked splash.img and some bytes appended to magisk_patched.img
Note: In any case do a full raw dump of all partitions first, kinda failsafe backup.
aIecxs said:
if you are not afraid about more invasive methods you could enable adb root shell in boot.img, root with magisk or flash twrp.img from EDL mode. this requires hacked splash.img and some bytes appended to magisk_patched.img
Note: In any case do a full raw dump of all partitions first, kinda failsafe backup.
Click to expand...
Click to collapse
I'm not much familiar with all this. I don't think that I'll be able to do it safely. I'm trying blind swipes using OTG mouse but that too is now appearing to be futile. Is there a way that I can connect my Redmi 5A to a monitor using some sort of HDMI adapter and then use a mouse at the same time via OTG? Will that work? Please help me. I am really troubled by the thought of losing my data.
aIecxs said:
you can't simulate touch events via adb shell input keyevent/ tap? is that some miui permission?
can you adb pull -a /sdcard?
surely there is a way maybe something with
adb shell settings put secure ...
https://developer.android.com/reference/android/provider/Settings.Secure
edit: I think it's somehow related to miui security center. at least I can't find it in settings tables
Click to expand...
Click to collapse
Yes there is setting in MIUI security center. I have pulled data like my photos and videos but could not pull my texts, call logs, contacts and other app data which I need the most such as my Signal chat data.
unfortunately app data is not accessable via adb. you can read contacts and sms in plain text
Code:
adb shell content query --uri content://sms
adb shell content query --uri content://com.android.contacts/data
you could try MyPhoneExplorer it uses adb
you could try adb over wifi
Code:
adb tcpip 5555
adb connect 192.168.1.222:5555
adb -s 192.168.1.222:5555 shell
don't panic. your data is still there, just don't do anything stupid.
but consider risk of losing adb authorization. this can happen if you run different adb.exe from either platform-tools or from scrcpy directory. backup your adbkey.pub from .android directory now (although still could expire)
@helpwithabrokendisplay Don't try too much wrong pattern you will locked out from gatekeeper!
aIecxs said:
unfortunately app data is not accessable via adb. you can read contacts and sms in plain text
Code:
adb shell content query --uri content://sms
adb shell content query --uri content://com.android.contacts/data
you could try MyPhoneExplorer it uses adb
you could try adb over wifi
Code:
adb tcpip 5555
adb connect 192.168.1.222:5555
adb -s 192.168.1.222:5555 shell
don't panic. your data is still there, just don't do anything stupid.
but consider risk of losing adb authorization. this can happen if you run different adb.exe from either platform-tools or from scrcpy directory. backup your adbkey.pub from .android directory now (although still could expire)
@helpwithabrokendisplay Don't try too much wrong pattern you will locked out from gatekeeper
Click to expand...
Click to collapse
aIecxs said:
unfortunately app data is not accessable via adb. you can read contacts and sms in plain text
Code:
adb shell content query --uri content://sms
adb shell content query --uri content://com.android.contacts/data
you could try MyPhoneExplorer it uses adb
you could try adb over wifi
Code:
adb tcpip 5555
adb connect 192.168.1.222:5555
adb -s 192.168.1.222:5555 shell
don't panic. your data is still there, just don't do anything stupid.
but consider risk of losing adb authorization. this can happen if you run different adb.exe from either platform-tools or from scrcpy directory. backup your adbkey.pub from .android directory now (although still could expire)
@helpwithabrokendisplay Don't try too much wrong pattern you will locked out from gatekeeper!
Click to expand...
Click to collapse
Hi! This ADB over WiFi looks promising. I can use SCRCPY over WiFi and then connect mouse via OTG. The problem is how do I connect my Redmi 5A to the same wifi network that my PC is connected to. I was able to turn on WiFi using "adb shell svc wifi enable". Could not really find much on Google about it. Can you please tell me how can I connect to a specific wifi network usinf ADB? Anxiously waiting for your reply.
you can try this app adb-join-wifi.apk to join new wifi. but why not spoof any formerly known SSID in residential gateway wifi settings, so phone can connect automatically?
Connecting to WiFi using adb shell
I have all the details to connect to a particular access point. I have to use that access point only, so all I require is the command to do it.
stackoverflow.com
Hi! I was able to connect SCRCPY over WiFi and turned on the setting that had stopped me from entering inputs through scrcpy. So, I backed up all my appdata. Thanks a lot. Is there a way to donate to this website or more specifically to you?
although I wonder how you could backup without root, glad you solved. don't thank me, consider donation to scrcpy or MyPhoneExplorer if you find it useful
aIecxs said:
although I wonder how you could backup without root, glad you solved. don't thank me, consider donation to scrcpy or MyPhoneExplorer if you find it useful
Click to expand...
Click to collapse
MyPhoneExplorer didn't work. I donated to SCRCPY. Actually I opened all my apps and backup up data to Google Drive or created an offline copy which I restored on my other device. Thanks a lot to you. Hope you have a great time
helpwithabrokendisplay said:
So, My Redmi 5A fell from hands and ended up with completely black display. I could call and hear my ringtone and upon connecting to SCRCPY could see the lock screen. I could not unlock it as I had not allowed the input stimulation permission. So, I took it to service center and they a tried a couple of displays and told me that data will have to be wiped in order for the new display to work. The phone contains crucial amount of data that I cannot afford to lose. So, I brought is back and tried the following steps:
1. The lock is pattern style and I tried usb mouse over OTG but could not perform the correct swipes due to no display.
2. I found an app that can make one android act as mouse for another android. I could connect my phone through SCRCPY and unlock it with that app but the problem is I need to approve the bluetooth pairing prompt for the first time.
3. I looked around google to pair a bluetooth device using ADB but all methods require the device to be rooted.
4. Despite knowing the pattern, I can't find anyway to use a keyboard over OTG as it will be more precise than mouse.
Is there a way that I can solve this problem? Can I unlock my phone using ADB as I know the pattern? Can I connect my phone through usb to my PC in order to run SCRCPY and use a mouse at the same time to unlock it? Or is there anyway of display replacement without data wipe? Help a troubled fellow
Click to expand...
Click to collapse
What app are you talking about in #2, I know my pattern but my screen is broken, so if I could simulate a mouse that would make the pattern, with another device, I could get back into my phone, thanks!
solution here. thx @ zgfg
https://forum.xda-developers.com/t/how-to-rescue-data-from-my-9t-pro.4581901/post-88497057

Looking for an app to block file transfers over usb android 11 Kruger&Matz device.

Good morning,
This is my first post so please be gentle. This forum was recommended to me by a friend.
I am looking for an application, or someone who could create an application that would block the ability to transfer files from Kruger&Matz tablets via a usb cable. Tablets are used for training purposes and we don't want participants to be able to download files to their computers.
If anyone knows of such an application and could recommend it (it may be paid), I would be grateful. If it doesn't exist, and someone here can create it, we'll pay for it.
If you need any specific details, I'll try to provide them. Unfortunately, I'm not an IT specialist, so it's hard for me to present all the data that may be needed at once.
If tablets are rooted and USB Debugging enabled you simply disable USB services like MTP and ADB by means of ADB:
Code:
adb devices
adb shell "su -c 'setprop sys.usb.config ""'"
xXx yYy said:
If tablets are rooted and USB Debugging enabled you simply disable USB services like MTP and ADB by means of ADB:
Code:
adb devices
adb shell "su -c 'setprop sys.usb.config ""'"
Click to expand...
Click to collapse
We can't root them, have you ever rooted this model?
Of course not because I'm using Google Pixel phones.

Categories

Resources