Wireless ADB - Help! - Needs fixing - Hero, G2 Touch Android Development

Not working properly.
Temporary fix:
Connect the phone to your computer and type:
adb tcpip 5555
then:
adb connect ipaddressdevice:5555
If someone could help me out with pointing me out how to execute a script properly on boot, I would be very happy!
The script that has to boot is:
Code:
#!/system/bin/sh
setprop service.adb.tcp.port 5555;
stop adbd;
start adbd;
Hello all, I'd like to share the following with you.
Ever got tired of the need to connect your phone to your computer in order to use adb?
Well, I did, and so I googled a little and found out that you can access your phone through tcp/ip, but... In order to get that working, you still needed to connect the phone and run a command to be able to do that.
But not anymore! Just flash the update.zip attached to this post, reboot your phone, and type in your shell:
Code:
adb connect your.ip.address:5555
So with my phone it would be like:
Code:
adb connect 192.168.2.115:5555
Now when you type "adb devices" it should wirelessly list your phone and you can execute all commands just if your phone were physically connected to your PC.
Tested on FroydVillain1.2.2. Please report back when tested on other ROMs. But as far as I know, this should work on all roms/android devices.
To make things easier, you could set up a static IP address.
Credits to "k0rner" for anwsering my question about running commands on boot.
Devs: it would be great to add this to ROMs by default. It really is just 1 single command on boot to enable this!
Edit: you could make a batch script to execute the previously mentioned command on windows. Just paste the command in notepad, and save as name.bat. Just makes things easier! When you wanna do this you really should set up a static IP in your phone though.
Edit2: Repacked&Resigned.

Nice! 10 char

Erm... wouldn't this potentially open your phone up to some cheeky monkeys

got an error when try to flash this. cant be veryfied, 9 files.
would be great if this works.
but like mikecoffe asked: "wouldn't this potentially open your phone up to some cheeky monkeys" ?

floomat said:
got an error when try to flash this. cant be veryfied, 9 files.
would be great if this works.
but like mikecoffe asked: "wouldn't this potentially open your phone up to some cheeky monkeys" ?
Click to expand...
Click to collapse
It was a self answering question
Sent from my HTC Desire using Tapatalk

I have to agree i'm not sure this should be included in every rom for security reasons. But this could be a very handy tool.

Nice! But I'd prefer to implement dropbear with ssh in 2.2 (More secure). In 2.1 works perfectly with Kendon's patch for villainroms.

floomat said:
got an error when try to flash this. cant be veryfied, 9 files.
would be great if this works.
but like mikecoffe asked: "wouldn't this potentially open your phone up to some cheeky monkeys" ?
Click to expand...
Click to collapse
Which ROM & Recovery are you using? Its strange, because it's working here!
@ the rest; in my situation this is harmless because you have to be connected to wifi before you can ADB your phone. And since my wifi is password protected is it only accessible for computers in my network. Correct me if im wrong!
Also: im working on a widget for enabling/disabling this tweak.

Unable to connect. Using the IP address assigned to my Hero and just to make sure used every other IP in the range but same message.

Goose247 said:
Unable to connect. Using the IP address assigned to my Hero and just to make sure used every other IP in the range but same message.
Click to expand...
Click to collapse
Please, try 5555. Should work! Sorry for any inconvenience

hennymugge said:
Please, try 5555. Should work! Sorry for any inconvenience
Click to expand...
Click to collapse
Still can't connect
Incidentally, I had to re-sign the update zip as I had the same problem with trying to install

Omg, I made such a stupid mistake.
I'm fixing it right now! Sorry for my stupidity all.

Can't connect to my phone "unable to connect to ...".
Guess everything isn't sorted out?

Got it working. Here's what to do
1) Connect phone to PC with USB cable
2) In Shell type "adb tcpip 5555" (You should get a message "Restarting in TCP mode port : 5555"
3) Unplug USB cable
4) Type "adb connect <phones ip address>:5555"
To go back to USB mode type ""adb usb"

Goose247 said:
Got it working. Here's what to do
1) Connect phone to PC with USB cable
2) In Shell type "adb tcpip 55555" (You should get a message "Restarting in TCP mode port : 5555"
3) Unplug USB cable
4) Type "adb connect <phones ip address>:5555"
To go back to USB mode type ""adb usb"
Click to expand...
Click to collapse
how i find my phones ip address

Goose247 said:
Got it working. Here's what to do
1) Connect phone to PC with USB cable
2) In Shell type "adb tcpip 55555" (You should get a message "Restarting in TCP mode port : 5555"
3) Unplug USB cable
4) Type "adb connect <phones ip address>:5555"
To go back to USB mode type ""adb usb"
Click to expand...
Click to collapse
how i find my phones ip address

Goose247 said:
Got it working. Here's what to do
1) Connect phone to PC with USB cable
2) In Shell type "adb tcpip 55555" (You should get a message "Restarting in TCP mode port : 5555"
3) Unplug USB cable
4) Type "adb connect <phones ip address>:5555"
To go back to USB mode type ""adb usb"
Click to expand...
Click to collapse
Thats a temporary fix indeed, but after rebooting your phone, you'll need to do it again.
Thats why I made a startup script for it, but I just cant get the script executed on boot.
If someone has a solution, dont hestitate!
The command that has to be executed on boot is:
Code:
#!/system/bin/sh
setprop service.adb.tcp.port 5555;
stop adbd;
start adbd;

isn350 said:
how i find my phones ip address
Click to expand...
Click to collapse
Settings -> Wireless and Networks -> Wifi Settings -> Advanced

LOL
Biggest securety hole ever!
Anyone in the office could rape my phone if i enabled that..... And belive me they would.

thank you guys,
with goose247s "fix", i got it working too.
it sure is a "security hole", but who would know...

Related

Can no longer connect via ADB

I had it all set up correctly and it worked fine both by USB and TCPIP. At some point in the last day or two this stopped working. I've done a complete reinstall of the SDK on my desktop and followed the instructions here https://devs.ouya.tv/developers/docs/setup
When I do adb devices I just get nothing. adb connect xx.xx.xx.xx gives nothing as well.
When I try to run adb from a terminal emulator on the unit I can start or stop the server but any other adb command results in a 'device not found' message. This message is preceded by some two or three digit word but since my TV crops the image I cannot tell what it says. so it is something like '##r: device not found'
Does anyone have any idea on what I need to do to get ADB working again?
Look in your system settings and make sure the ouya is still being recognized. I haven't used adb since the recent updates, but perhaps something changed causing your computer to no longer see it or caused the drivers to fail.
Sent from my SCH-I535 using Tapatalk 2
TadeoNYC said:
Look in your system settings and make sure the ouya is still being recognized. I haven't used adb since the recent updates, but perhaps something changed causing your computer to no longer see it or caused the drivers to fail.
Sent from my SCH-I535 using Tapatalk 2
Click to expand...
Click to collapse
There aren't any drivers involved here yet. Nothing happens at all when I plug the system in. No devices are detected, correctly or otherwise.
I'm starting to think the micro usb port is just physically broken. I've tried multiple cables, restarting. Connecting other android devices to my desktop which work fine.
could be the port. I have a heck of a time plugging mine in sometimes. it's like the hole in the casing is just a bit bigger than the actual plug, and I have to fumble around for it. I mostly leave the microusb connected all the time now.
Oh!lol.
That happened to me as well. The micro usb port is deeper than normal. My Samsung plugs did not work,I was able to use one from my Kodak pocket video cam.
Sent from my SCH-I535 using Tapatalk 2
Ok, so I'm trying to just adb tcpip working now to bypass the usb issue. I installed an SSH server and I'm getting this
[email protected]:/ $ adb kill-server
[email protected]:/ $ adb tcpip 5555
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ $
Found this
setprop service.adb.tcp.port 5555
stop adbd
start adbd
no luck, still can't connect.
beowolfschaefer said:
Found this
setprop service.adb.tcp.port 5555
stop adbd
start adbd
no luck, still can't connect.
Click to expand...
Click to collapse
If you have wireless adb enabled the way to control it so it does not shut down the micro usb port debugging , find the wireless adb .Apk here on xda in the nook color general section and install it then you will beable to open the app and toggle it back and forth to get micro usb debugging back.
My Ouya has done the same thing. Its not hardware but factory reset does not seem to do anything. I have tried several cables , 2 pcs and its the same story all across. MTP connection works fine. ADB , the Ouya thinks its in ADB but nothing is recognized by the pc. Not failed driver install. As soon as you turn debugging on, the Ouya effectively vanishes from the pc.
Alas I did not get as far as putting a file manager on so can not side load anything. Without ADB as well. Well i'm screwed. Not keen on trying to send it back as already got hit for an extra £16.64 by customs, and with the launch the teams are going to be swamped.
I'm convinced its a file permission issue of some sort. But no CWM, ADB , File Manager or Recovery that I have manged to find yet. Well for now at least im stumpped.
Any ideas?
Broomfundel said:
My Ouya has done the same thing. Its not hardware but factory reset does not seem to do anything. I have tried several cables , 2 pcs and its the same story all across. MTP connection works fine. ADB , the Ouya thinks its in ADB but nothing is recognized by the pc. Not failed driver install. As soon as you turn debugging on, the Ouya effectively vanishes from the pc.
Alas I did not get as far as putting a file manager on so can not side load anything. Without ADB as well. Well i'm screwed. Not keen on trying to send it back as already got hit for an extra £16.64 by customs, and with the launch the teams are going to be swamped.
I'm convinced its a file permission issue of some sort. But no CWM, ADB , File Manager or Recovery that I have manged to find yet. Well for now at least im stumpped.
Any ideas?
Click to expand...
Click to collapse
Did you set up adb over wireless?
tcollum said:
Did you set up adb over wireless?
Click to expand...
Click to collapse
I had done but. But it stopped working some time after, and I have not managed to get it going since. Would it stop wired at the same time? Even so would it not have been reset by the factory reset?
Either way, Ill set it with an ethernet cable and see if the flaky wifi was why adb over wifi did not work.
I'm sure a workable solution will turn up. Just disappointed.
Ill report back.
Thanks
Update: Thanks for your help. I tried over wifi and no joy. But ethernet is working. So just got to sort out the flakey wifi now.
Thanks again.
Some people report having better luck connecting Wi-Fi with the native android settings found in the manage area.
Sent from my GT-P3113 using Tapatalk 4 Beta
For anyone who committed to wireless ADB method, and currently stuck without ADB access or su priveledge, the Play Store has a wireless ADB app called "ADB Wireless (no-root)" by Sherdle. Sideload this puppy and you'll be able to toggle the wireless/wired ADB connection!
HaYNigloo said:
For anyone who committed to wireless ADB method, and currently stuck without ADB access or su priveledge, the Play Store has a wireless ADB app called "ADB Wireless (no-root)" by Sherdle. Sideload this puppy and you'll be able to toggle the wireless/wired ADB connection!
Click to expand...
Click to collapse
It's also available through the f-droid app.
Sent from my GT-P3113 using Tapatalk 4 Beta
TadeoNYC said:
Some people report having better luck connecting Wi-Fi with the native android settings found in the manage area.
Sent from my GT-P3113 using Tapatalk 4 Beta
Click to expand...
Click to collapse
My wifi works great. unless i try to login to google.
Look here: https://devs.ouya.tv/developers/docs/setup
They changed the device ID, you need to do step 5-6.
More info here: http://www.ouya.tv/devnews.html

no micro-usb connection after tcpip setup

I have a KS ouya. i have rooted it before, but the stupid auto updates got the best of me a couple times.
i've done it the same thing every time-
connect to micro-usb, turn it on, install the drivers, get adb working, set up the tcpip, install superuser, lucky patcher, etc.
this time though, after I set up the tcpip, it will NOT connect via usb again. windows xp no longer recognizes it.
no luck even after tcpip disconnect, adb usb.
any insight?
ArdDarvis said:
I have a KS ouya. i have rooted it before, but the stupid auto updates got the best of me a couple times.
i've done it the same thing every time-
connect to micro-usb, turn it on, install the drivers, get adb working, set up the tcpip, install superuser, lucky patcher, etc.
this time though, after I set up the tcpip, it will NOT connect via usb again. windows xp no longer recognizes it.
no luck even after tcpip disconnect, adb usb.
any insight?
Click to expand...
Click to collapse
You could try flashing a new rom or maybe a factory reset (amusing you are backed up).
i tried a couple things. I pulled the build.prop again and removed the tcpip entry, then pushed it back on. even after that I can still connect tcpip.
i also tried a factory reset. everything LOOKS factory, but i can still connect through tcpip and NOT through usb at all.
I have no idea wtf i'm going to do, but i'm going to figure it out and do it.
Install the app Wireless adb. It has resolved this issue for most people.
Sent from my GT-P3113 using Tapatalk 4 Beta
TadeoNYC said:
Wireless adb.
Click to expand...
Click to collapse
thank you very very much. my problem was that I enabled wireless adb, then rooted. when it didn't connect via wire, I factory reset it. this unrooted it, but left me with only wireless adb. I can't do shell things through wireless adb.
SO, I found adbwireless by Sherdle, which is no-root. I haven't dedicated to using it, but it looks promising. I'll post updates. thank you again for your help. I kinda feel like Stevie Wonder in an obstacle course.
ArdDarvis said:
thank you very very much. my problem was that I enabled wireless adb, then rooted. when it didn't connect via wire, I factory reset it. this unrooted it, but left me with only wireless adb. I can't do shell things through wireless adb.
SO, I found adbwireless by Sherdle, which is no-root. I haven't dedicated to using it, but it looks promising. I'll post updates. thank you again for your help. I kinda feel like Stevie Wonder in an obstacle course.
Click to expand...
Click to collapse
I hope it works out. After seeing all of the headaches people have had with wireless adb the tuts should have a warning added.
Sent from my GT-P3113 using Tapatalk 4 Beta
well, no bueno.
its totally my fault, but i think the factory reset didn't touch the build.prop, but it DID unroot me. so now i'm stuck without root and only wireless adb.
when I wireless adb shell, su. it says I don't have permission. is this because I'm using wireless? I've used the su command to root the device, why no permission now?
Download the wireless adb apk onto your ouya , it can be found here on xda . Then open the wireless adb app on your Ouya and use the trackpad on the controller to toggle wireless adb on and off.
27scoob said:
Download the wireless adb apk onto your ouya , it can be found here on xda . Then open the wireless adb app on your Ouya and use the trackpad on the controller to toggle wireless adb on and off.
Click to expand...
Click to collapse
thank you for the help. i downloaded the apk, (its called adbWireless?) and installed it, but it says "kernel does not have all the necessary features for running this app. you need rooted phone". bummer.
I'm sure i sound like a complete newb; this is the first time i've ever joined a tech forum and had to write down what is happening. talking about it is easy, typing it is a little different.
i can pull the build.prop and at the bottom is the wireless code i put in. BUT, i can't push it back on because I need to change the permissions first. BUT to change permissions, i need su to work. to push su to /system/xbin, i need to change permissions.
I think I have the same problem :s
My computer don't recognize via USB, and I think is after enable tcpip ...( for wireless connection adb )
I update my ouya, lost my root and can't connect it ...
Do you find the solution ?
Thx
Edit : If I look the build.prop, I don't see the line for adb by tcp, so not sure it's my problem
Ok, i got it. and i feel great about it.
when setting up the drivers, we edited the android_winusb.inf to say
;OUYA Console
%SingleAdbInterface% = USB_Install, USB\VID_2836&PID_0010
%CompositeAdbInterface% = USB_Install, USB\VID_2836&PID_0010&MI_01
(that underlined part is the Hardware ID for the ouya in normal operation)
then we point the new hardware to the driver, then in terminal
adb kill-server
echo 0x2836 >> "%USERPROFILE%\.android\adb_usb.ini"
adb start-server
and thats all well and good, but **** hits the fan sometimes.
and when it does, recovery mode is your friend.
if you lost wired adb due to enabling wireless adb then lost su, RECOVERY ENABLES WIRED ADB! so plug it in! it'll connect in recovery
2 ways-
1) "adb reboot recovery" (over wired or wireless connection), then use a USB keyboard and press the home key, and boom, theres recovery
2) plug in a USB keyboard, restart the ouya, when its booting up, push "Alt + PrntScrn + i" a lot, that'll eventually put you in recovery.
from recovery, we can sideload the most current OTA again via adb, BUT! the ouya changes hardware ID's when it is in recovery mode!
so, you have to go into the device manager, right click the device without the driver, go to details, then to hardware ID. you'll see that it is changed. so in the android_usb.inf, change it to say %CompositeAdbInterface% = USB_Install, USB\WHATEVER_HARDWARE_ID_IS (not REV)
once its changed, go into the device manager, right click the device, point it to the driver, then
adb kill-server
echo 0x2836 >> "%USERPROFILE%\.android\adb_usb.ini"
adb start-server
and, there it is, wired adb capabilities in recovery so you can sideload in a OTA.
CWM recovery also changes the Hardware ID, so, after you do THAT, you gotta get the new hardware id again.
idk if its right, but it works- i just put the Hardware IDs for the different modes in the android_winusb.inf separated by commas. adb connects in ALL modes, which is WAY better than having to copy the IDs everytime and reload them.
hope it helps. i kinda feel like i know what i'm talking about a little, so, i'll try to help as much as i can.
billouetaudrey said:
I think I have the same problem :s
My computer don't recognize via USB, and I think is after enable tcpip ...( for wireless connection adb )
I update my ouya, lost my root and can't connect it ...
Do you find the solution ?
Thx
Edit : If I look the build.prop, I don't see the line for adb by tcp, so not sure it's my problem
Click to expand...
Click to collapse
yeah, it seems enabling tcpip disables wired connection.
idk about your build.prop, but i would suggest sideloading the most current OTA over in recovery. really thats all i can suggest. it overwrites the build.prop.
wireless adb seems to destroy all my dreams at once.

ADB Device Unauthorized

Hey fellow members,
Since a few days my ADB is not working with my phone. Every time I try to connect it as an ADB device I get an error (See attachment) that my device is unauthorized.
I've read a dozen threads about this problem and I think it is the RSA Fingerprint. I don't get that pop-up anymore, when connecting my device to authorize the PC.
Here's what I've tried already
1.
Code:
adb kill-server
Code:
adb start-server
2. disable and enable USB-Debugging-Mode
3. Copy the adb key from C://user/me/.android. to the phone's directory /data/misc/adb
4. reinstall drivers on PC
5. Reboot PC and Phone
None of that worked. None. I'm desperate. Been looking for 6 hours yesterday and couldn't fix it.
If anybody has had these kinda problems I would be totally grateful for an answer.
I have the intl version of H815, bootloader unlocked, TWRP and SuperUser working fine. I'm currently on V20C (6.0 Marshmallow)
Any help would be extremely nice.
Best regards
Hi,
Did you solves this as I am having the same problem after doing a factory reset?
Cheers
Follow_and_Feel said:
Hey fellow members,
Since a few days my ADB is not working with my phone. Every time I try to connect it as an ADB device I get an error (See attachment) that my device is unauthorized.
I've read a dozen threads about this problem and I think it is the RSA Fingerprint. I don't get that pop-up anymore, when connecting my device to authorize the PC.
Here's what I've tried already
1.
Code:
adb kill-server
Code:
adb start-server
2. disable and enable USB-Debugging-Mode
3. Copy the adb key from C://user/me/.android. to the phone's directory /data/misc/adb
4. reinstall drivers on PC
5. Reboot PC and Phone
None of that worked. None. I'm desperate. Been looking for 6 hours yesterday and couldn't fix it.
If anybody has had these kinda problems I would be totally grateful for an answer.
I have the intl version of H815, bootloader unlocked, TWRP and SuperUser working fine. I'm currently on V20C (6.0 Marshmallow)
Any help would be extremely nice.
Best regards
Click to expand...
Click to collapse
pinn___________ said:
Hi,
Did you solves this as I am having the same problem after doing a factory reset?
Cheers
Click to expand...
Click to collapse
Unfortunately no. I've really tried everything. I even flashed a complete new kdz (at least upgraded to one), to no avail.
And this thread doesn't get enough recognition or any advice from a pro, so I'm heading dead ends.
I'll let you know, when I found a possible solution and post it in this thread.
Cheers
Hi,not a solution as such but I wanted adb to get into the bootloader. Instead I installed a terminal emu and got into it that way. Not sure what you are trying to achieve but this may be of some help.
Same problem for me... Device unauthorized, no rsa prompt... Tried it factory fresh, no success.
pinn___________ said:
Hi,not a solution as such but I wanted adb to get into the bootloader. Instead I installed a terminal emu and got into it that way. Not sure what you are trying to achieve but this may be of some help.
Click to expand...
Click to collapse
I want to access my device via ADB, e.g. pushing files to my phone, installing, wiping, etc.
Which I can't, since my computer, or my device is unauthorized to do so.
I just can't enter ADB commands, which is pretty annoying, since I often use it to push files to my phone or print out a logcat.
Well nothing's working so I gotta be patient until anybody comes up with a solution :good:
The strange thing is, i do also own an oneplus 2. It doesn't get authorized too, but is asking for fingerprint. Do you have win10, like me?
Trinaaa said:
The strange thing is, i do also own an oneplus 2. It doesn't get authorized too, but is asking for fingerprint. Do you have win10, like me?
Click to expand...
Click to collapse
Yes I have win 10. You're one step further than me. I don't even get an RSA prompt. Don't know why yet
Follow_and_Feel said:
Yes I have win 10. You're one step further than me. I don't even get an RSA prompt. Don't know why yet
Click to expand...
Click to collapse
Refer the below thread, hope this helps
http://stackoverflow.com/questions/23081263/adb-android-device-unauthorized/25546300#25546300
EXPERT FROM THE ABOVE LINK:-
I was not getting the RSA fingerprint pop up on my phone.
I had to go into the C:\Users\.android\adbkey and adbkey.pub
files, delete those and then do kill and restart of adb server. I had to stop and restart the debugger and connecting as USB in PTP mode.
Because the RSA authorisation key was getting stored in this path, killing and restarting the adb server didn't help.
Just wanted to reiterate the person above me as it helped me with my problem. So in case anyone out there on the internets runs into the same issues try these instructions.
1. boot your phone into recovery
2. now try doing adb devices in your command prompt - it should show up as LGH815xxxxxx recovery
3. type adb shell
4. type cd /data/misc/adb
5. type rm adb_keys -- this will delete any existing adb key from your device **
6. type exit to leave the shell and then reboot your device as normal
7. in windows find C:\Users\<your username>\.android
8. delete the existing adbkey.pub file
now you can proceed as normal with running adb devices, and you phone will prompt you to confirm.
** note you can also delete the adb key from android from within your android OS. go to settings > developer options > revoke USB debugging authorizations. i guess you can do it from recovery just to make sure.

adb working with a twist

Hi all
I run a gentoo linux box and I have adb 'USB debugging' enabled on 1+5T.
When I plug in the cable I can choose
- Charge only <- choosen automatically
- Transfer files (MTP)
- Transfer photos (PTP)
- Use device as MIDI
But nevertheless I see an ISO mounted with files
- AndroidFileTransfer(OSX).dmg
- adb_config_Linux_OSX.sh
- OnePlus_USB_Drivers_Setup.exe
- OnePlus_setup.exe
If I choose MIDI the directory is unmounted and I can use adb.
But this choice is not remembered, ...
So it sounds a bit odd:
- why would anything mount if Charge only is chosen as default?
- why is there no choice to just ADB?
Also 'Wireless ADB debugging' does not connect (when enabled, that is) to port 5555
unable to connect to 192.168.168.151:5555
And indeed no ports are open on device when scanned with nmap from linux box.
Does this ring a bell? Is there a way to save USB adb as default and make Wireless ADB work?
Other than that : great device I am very happy and impressed.
ABD should work no matter what option you choose. (Assuming USB debugging is enabled)
Are you rooted? Wireless ADB needs root.
Heisenberg420 said:
ABD should work no matter what option you choose. (Assuming USB debugging is enabled)
Are you rooted? Wireless ADB needs root.
Click to expand...
Click to collapse
I would think so. But what should be is not always.
Dior DNA said:
I would think so. But what should be is not always.
Click to expand...
Click to collapse
Wise words.
IDK what to tell ya. I'm able to access ADB no matter what option is selected and I'm able to see port 5555 open with nmap (adb wireless, no cable). Maybe a firewall is interfering?
Heisenberg420 said:
Wise words.
IDK what to tell ya. I'm able to access ADB no matter what option is selected and I'm able to see port 5555 open with nmap (adb wireless, no cable). Maybe a firewall is interfering?
Click to expand...
Click to collapse
Hi I am able to do so from Ubuntu as well. Not so from gentoo even if I delete udev entries.
My point is, why is there, under any circumstances, a mount if charge only is configured.
Can linux host overrule phone setting?

How To Guide [FAQ] ADB use issues for OnePlus 11

1. ADB doesn't see/detect your phone
- Make sure you're using the latest version of ADB. Download links are posted here.
- The phone is finicky in terms of USB cables. Try the one which came with the phone or a brand new good one.
2. You get a permission error trying to run adb grant com.developer.app android.permission.PERMISSION commands, e.g.
Code:
adb -d shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS
Exception occurred while executing 'grant':
java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
at android.app.ContextImpl.enforce(ContextImpl.java:2253)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2281)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1364)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1346)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:553)
at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:597)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2591)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:302)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6351)
at android.os.Binder.shellCommand(Binder.java:1073)
at android.os.Binder.onTransact(Binder.java:901)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4313)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6335)
at android.os.Binder.execTransactInternal(Binder.java:1331)
at android.os.Binder.execTransact(Binder.java:1268)
What you need to do is:
Go to development settings and enable "Disable Permission Monitoring". You'll have to reboot your device afterwards.
3. BetterBatteryStats complains about a lack of access to PrivateAPI
Run this:
Code:
adb -d shell settings put global hidden_api_policy 1
Unfortunately it enables Hidden APIs globally for all apps which could be considered a security risk, so after using BBS you could revert it by:
Code:
adb -d shell settings delete global hidden_api_policy
I still cannot connect with ADB after updating drivers, ADB and using the factory cable.
biggiesmalls657 said:
I still cannot connect with ADB after updating drivers, ADB and using the factory cable.
Click to expand...
Click to collapse
Try rebooting. If it still doesn't help, try to change USB mode: e.g. switch from charging to "File transfer".
birdie said:
Try rebooting. If it still doesn't help, try to change USB mode: e.g. switch from charging to "File transfer".
Click to expand...
Click to collapse
Yes I tried that multiple times and every time I do it says USB malfunction like Windows can't understand it
biggiesmalls657 said:
Yes I tried that multiple times and every time I do it says USB malfunction like Windows can't understand it
Click to expand...
Click to collapse
Share a pic of device manager when device is connected.
biggiesmalls657 said:
Yes I tried that multiple times and every time I do it says USB malfunction like Windows can't understand it
Click to expand...
Click to collapse
That usually indicates you've got a bad cable or/and broken usb port on either of devices (your PC/smartphone).
birdie said:
That usually indicates you've got a bad cable or/and broken usb port on either of devices (your PC/smartphone).
Click to expand...
Click to collapse
Well it does it on all ports on my PC, I've used multiple cables
biggiesmalls657 said:
Well it does it on all ports on my PC, I've used multiple cables
Click to expand...
Click to collapse
Try a different PC, if it's still happening your phone USB port could be faulty.
birdie said:
Try a different PC, if it's still happening your phone USB port could be faulty.
Click to expand...
Click to collapse
I couldn't even get wireless ADB to work but it used to work on my Pixel

Categories

Resources