adb working with a twist - OnePlus 5T Questions & Answers

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?

Related

Wireless ADB - Help! - Needs fixing

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...

[Q] No connection

my phone doe not register on my computer htc sync is installed but adb doesn't work when i connect my phone it charges but that's all it doesn't ask me about usb debugging or anything....
I gone in the settings and activated but it still doesn't work..
Is then and adb file i have to install to the phone to get this to work.
settings - connect to pc - 'ask me' and appliactions - development - 'usb debugging' - is there a tick?
also reinstall usb drivers.
xvicedice said:
my phone doe not register on my computer htc sync is installed but adb doesn't work when i connect my phone it charges but that's all it doesn't ask me about usb debugging or anything....
I gone in the settings and activated but it still doesn't work..
Is then and adb file i have to install to the phone to get this to work.
Click to expand...
Click to collapse

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.

[Q] adb on Mac OSX

Anyone got adb on latest Mac OSX working? I can connect in MTP mode but adb devices never shows my phone. Tried the Unified Driver v4.5 and v4.7 to no avail.
rickythefox said:
Anyone got adb on latest Mac OSX working? I can connect in MTP mode but adb devices never shows my phone. Tried the Unified Driver v4.5 and v4.7 to no avail.
Click to expand...
Click to collapse
http://www.mylgphones.com/tag/usb-drivers try these drivers
That's the ones that didn't work.
Same problem here... Any luck?
Change the USB mode to PTP and you should get the RSA prompt.
anod said:
Same problem here... Any luck?
Click to expand...
Click to collapse
Yes I have install Google universal usb drivers worked for me search on Google for them
PTP worked for me, no LG driver installed.
Just got my G3 on Verizon, cannot see the device over ADB either on Mac OSX
I tried MTP, PTP, and Charge only both with and without LG drivers installed. Since it's OSX, there are no Google Universal USB drivers.
Android File Transfer opens up fine, but ADB doesn't show the device. Quite fishy indeed.
rickythefox said:
Anyone got adb on latest Mac OSX working? I can connect in MTP mode but adb devices never shows my phone. Tried the Unified Driver v4.5 and v4.7 to no avail.
Click to expand...
Click to collapse
May I ask how you managed to connect your phone to your mac via MTP? I am unable to get any kind of connection to my mac.
On windows it works finde, I can open the internal and external sd card and copy files from and to the device, I would be more than happy to achive the same on my mac.
rickythefox said:
Anyone got adb on latest Mac OSX working? I can connect in MTP mode but adb devices never shows my phone. Tried the Unified Driver v4.5 and v4.7 to no avail.
Click to expand...
Click to collapse
Hi there, you will first need to enable USB Debugging. Head over to Settings > General > About Phone > Software Information. Tap Build Number 5 times, and you'll unlock the Developer options.
Go to Settings > Developer options, and check USB Debugging. From there, ADB should work. Good luck!
OK, so I installed the new drivers, rebooted, and got ADB to recognize my LG, and was able to debug successfully. Now Android File Transfer doesn't see it, nor does Finder show the device. What am I missing?
It's broken, I saw a tweet from jcase regarding the issue. I have the same problem. I just adb push/pull when necessary for now.
Sent from my LGLS990 using XDA Free mobile app
EDIT - It wasn't jcase, it was @utoprime
Mine works fine on my Mac
faded03cobra said:
Mine works fine on my Mac
Click to expand...
Click to collapse
You have adb and MTP works? What OSX version?
Sent from my LGLS990 using XDA Free mobile app
Solution
rickythefox said:
Anyone got adb on latest Mac OSX working? I can connect in MTP mode but adb devices never shows my phone. Tried the Unified Driver v4.5 and v4.7 to no avail.
Click to expand...
Click to collapse
I know this is a seriously old thread, but for future reference - if your device is NEVER recognised by adb from the start, no matter how much you add the vendor etc, open up Terminal.app and type this in:
cd ~/.android/
rm adbkey adbkey.pub
This will navigate to android's folder and remove the RSA keys your computer uses to identify with the phone. If the address of the folder is wrong you can alter the first line to whatever is appropriate.
KAR0SH1 said:
I know this is a seriously old thread, but for future reference - if your device is NEVER recognised by adb from the start, no matter how much you add the vendor etc, open up Terminal.app and type this in:
cd ~/.android/
rm adbkey adbkey.pub
This will navigate to android's folder and remove the RSA keys your computer uses to identify with the phone. If the address of the folder is wrong you can alter the first line to whatever is appropriate.
Click to expand...
Click to collapse
Seriously old, and seriously unresolved (for me and a few people on reddit, at least). Still have not succeeded at getting ADB to detect G3 on USB, tried running the -usb flag on the cli and everything. Is there a working process yet? Verizon seems to be the outlier here as well...
Just worked for me on OSX Yosemite with a D855 on V10l:
- Update ADB (android platform tools)
- Install LG Driver (link is in this thread)
- Reboot
- run "rm ~/.android/adbkey" and "rm ~/.android/adbkey.pub"
- run "adb devices" (you should now see your G3)
- run "adb kill-server" (just to make sure there is no interference)
- quit all applications on your phone and go to home screen
- run "purpledrake_osx.command" which should now work
Inbetween (guess it was directly after running "purpledrake_osx.command") you should get a permission request on your phone which you should allow
Thanks
_ranch said:
Change the USB mode to PTP and you should get the RSA prompt.
Click to expand...
Click to collapse
Thanks, this works for me on El Captain
Also on El Capitan:
After enabling developer settings + USB debugging on phone (see earlier in thread),
Removing the adbkey + pub from the users .android folder (see earlier in thread),
and connecting with PTP,
It finally works

HiSuite Mounting

Is there a way to stop the HiSuite image from mounting when connecting via USB? Mate SE, Android 8.0 (ota), rooted, macOS.
If you change the developer settings to usb debugging, usb allow adb debugging in charge only, and usb connection to charge only, that will avoid the hi Suite stuff.
If you change the settings and then connect, keep the settings app open, for some reason you have to go back and reset them again after connecting. At least that's what I have to do, they don't seem to stick.
AsItLies said:
If you change the developer settings to usb debugging, usb allow adb debugging in charge only, and usb connection to charge only, that will avoid the hi Suite stuff.
If you change the settings and then connect, keep the settings app open, for some reason you have to go back and reset them again after connecting. At least that's what I have to do, they don't seem to stick.
Click to expand...
Click to collapse
Thanks!
Just to follow up, I discovered a more permanent solution, if you're rooted:
Rename (or delete) the file autorun.iso located at /data/hw_init/version/region_comm/oversea/cdrom
Can't mount it if it's not there

Categories

Resources