USB Debugging Xtrons 8.0 BMW E39 - Android Head-Units

Hello guys,
I have a PX5 HeadUnit for my E39, and right now im developing an app for it.
The problem: i can't find a way to connect the HeadUnit with my Notebook to directly debug it.
I have already tried it with an USB to USB-c cable, as i don't have any USB male to male cables here, but it was with no success.

Why not using adb over WiFi?

Actually, I didn't know that was an option...
I'll test it and report later.

Apparently adb over WiFi doesn't work without an USB connection first, so that one was not helpfull at all.
Edit: OK! I found the solution, WiFi over ADB DOES work without an USB connection first.
Simply follow these steps:
install an terminal app on your unit and type in the following lines:
setprop persist.adb.tcp.port 5555
setprop sys.rkadb.root 1
reboot
(install adb drivers on your pc, kinda obvious)
type in "adb connect [your device ip]:5555
done.

Mumbira said:
Apparently adb over WiFi doesn't work without an USB connection first, so that one was not helpfull at all.
Edit: OK! I found the solution, WiFi over ADB DOES work without an USB connection first.
Simply follow these steps:
install an terminal app on your unit and type in the following lines:
setprop persist.adb.tcp.port 5555
setprop sys.rkadb.root 1
reboot
(install adb drivers on your pc, kinda obvious)
type in "adb connect [your device ip]:5555
done.
Click to expand...
Click to collapse
How do you connect via adb if you are not rooted?

The same steps should also work without root.
I'm sure that my device wasn't even rooted back then.

Related

[Q] adb Issue

hello
ummm .... seemed to be new at using adb tool ...so i am practice on my nook .... anyway ....i enable usb debugging in nook color tools .... then execute this command:
C:\Documents and Settings\XXXXXXX>cd c:\
C:\>cd Android
C:\Android>cd android-sdk
C:\Android\android-sdk>cd platform-tools
C:\Android\android-sdk\platform-tools>adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
C:\Android\android-sdk\platform-tools>adb connect usb
unable to connect to usb:5555
C:\Android\android-sdk\platform-tools>
Click to expand...
Click to collapse
any suggestion
best regards
Hi:
Code:
adb connect usb
Tries to connect to a host named "usb" over TCP (WiFi) port 5555.
Code:
adb usb
Starts the adb server in USB mode.
Note: You can connect to one device over USB at the same time that you are connected to another over TCP (WiFi).
I do that all the time.
You just have to specify which device you want to talk to when using push/pull/shell.
Code:
adb -s nook:5555 shell
My adbsync also works with multiple devices, but that's a separate issue.
Renate NST said:
Hi:
Code:
adb connect usb
Tries to connect to a host named "usb" over TCP (WiFi) port 5555.
Code:
adb usb
Starts the adb server in USB mode.
Note: You can connect to one device over USB at the same time that you are connected to another over TCP (WiFi).
I do that all the time.
You just have to specify which device you want to talk to when using push/pull/shell.
Code:
adb -s nook:5555 shell
My adbsync also works with multiple devices, but that's a separate issue.
Click to expand...
Click to collapse
thx renate so much ....... how about if i hve a dead device or an android device that i didint enable usb debugging mode but my computer can identify it via usb ...... ????
thx
Sent from my NOOK using xda app-developers app

[Partialy Solved] G5 plus rooted, and now cannt use ADB.

Phone is rooted, TWRP installed, (almost) everything is OK.
What is not OK is that now I cannt ADB connect. The "Allow USB debugging" window with the RSA key does not open at all.
Another thing I've noted - the "Revoke USB debugging authorizations" option in the Developer options - does not exist.
Any ideas as to how to solve this ?
I'm using linux (Arch, 64 bit). Another phone (an older, stock Moto G2) connect with ADB without any problem - so this is not a problem on the computer side, nor a USB cable problem.
Thanks.
Ben
Solved (almost).
After more googling I've found a solution on stackoverflow (as a new user I cannt insert a link) :
Code:
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
All done! Just adb shell reboot and feel the power!
Now the G5+ is recognized as a "device" with adb.
It's a partial solution because the "Revoke USB debugging authorizations" option is still missing.
Hope this helps future generations
ben-moto said:
After more googling I've found a solution on stackoverflow (as a new user I cannt insert a link) :
Code:
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
All done! Just adb shell reboot and feel the power!
Now the G5+ is recognized as a "device" with adb.
It's a partial solution because the "Revoke USB debugging authorizations" option is still missing.
Hope this helps future generations
Click to expand...
Click to collapse
+1 to this solution. I have a very similar problem on my HTC One M8. No prompt, also missing the "Revoke USB debugging authorizations" option.
Between this thread, a few others, and that same stackoverflow answer, I was able to come up with a couple of solutions:
[SOLVED] ADB 'unauthorized', no RSA prompt, and no 'Revoke USB debugging' option
I'm experiencing this now, except I still have my "revoke USB auth" option under Dev Options.
I'll try the adb push method now...

Azottu Head Unit - ADB trouble

Hello,
I bought few month ago a Azottu (allwinner T8 core) head unit and I'm trying to link it with my laptop using ADB.
The problem is the HU is USB Host, as well as the Laptop. So using USB for ADB is not possible.
I tried to make the link using Wifi; the HU is connected to the wifi and via the laptop I try to connect (using the ip of HU)
But that's not working.
Does someone manage to connect to a HU using ADB and Wifi ?
Of course the HU is on development mode (7890) and the USB debug is activated ([email protected])
Hope to your light and help. Thank you
install a terminal app on your unit and type in the following line:
setprop persist.adb.tcp.port 5555
Then reboot the device and you should be able to connect via adb over WiFi
realzoulou said:
install a terminal app on your unit and type in the following line:
setprop persist.adb.tcp.port 5555
Then reboot the device and you should be able to connect via adb over WiFi
Click to expand...
Click to collapse
Thank you, works better.
Now with
adb devices -l
List of devices attached
192.168.1.118:5555 unauthorized transport_id:2
But the device is unauthorized
So I tried to remove all the keys generated by adb on my laptop, and revoke the authorization on the HU (with a reboot for both) to resynchronize the pairing without success...
I tried to generate a new key with the adb keygen command, and then copy the public key (.pub) on the HU (adb push or cp from sdcard to /data/misc/adb/adb_keys) without success as well
Do you have any other idea ?
Thank you
To see "unauthorized" when using adb over WiFi with a head unit never happened to me so far. So I have no advice, sorry

Question for Surfer or any other Android guru.

Is adb not able to connect over even see these Joying FYT Airmont units with Oreo on it?
The head unit has a switch to allow debug over usb but when I connect a usb to my laptop I don't get the dialogue screen on the head unit asking if I want to connect to this device and the laptop cannot see the unit at all.
I figured maybe it needed device specific drivers in Windows so figuring Joying hasn't made any I found universal usb drivers for it. Nothing.
I got an app called Naptime or something that's supposed to be able to put the unit in full doze. It's designed to work on rooted devices but also says that can be worked around by using adb to give certain permissions. I can't do that if I can't even connect adb to the damn thing.
Also, is rooting these using that Magisk method result in the same type of full root the normal way on other devices? It isn't limited compared to the normal way is it?
You can't use adb over tcpip on these units.
You can use adb over usb. You have to enable the developer options (tapping it 7 times). Go out, go in, and you have the adb over usb (OTG) option which does require an OTG cable.
@rigattoni posted in one of the SC9853i threads a step-by-step approach if my one-liner doesn't give you enough info.
rooted = rooted.
It doesn't make a difference in functionality whether the boot.img is rooted (called systemless rooting) or /system.
You always need an apk to "hand out" root rights, be it SuperSU, Superuser, Magisk or another.
In general the current systemless boot.img rooting is preferred. One of the big advantages is that it allows for OTA updates. But... we know that our units do not support that.
If you want to know more, just google for "systemless root" (sometimes "system-less root").
And I don't consider myself a guru. I read a lot and I have a good memory
surfer63 said:
You can't use adb over tcpip on these units.
You can use adb over usb. You have to enable the developer options (tapping it 7 times). Go out, go in, and you have the adb over usb (OTG) option which does require an OTG cable.
@rigattoni posted in one of the SC9853i threads a step-by-step approach if my one-liner doesn't give you enough info.
rooted = rooted.
It doesn't make a difference in functionality whether the boot.img is rooted (called systemless rooting) or /system.
You always need an apk to "hand out" root rights, be it SuperSU, Superuser, Magisk or another.
In general the current systemless boot.img rooting is preferred. One of the big advantages is that it allows for OTA updates. But... we know that our units do not support that.
If you want to know more, just google for "systemless root" (sometimes "system-less root").
And I don't consider myself a guru. I read a lot and I have a good memory
Click to expand...
Click to collapse
If the USB connection does not work for any reason, you could try the following:
Some units (as mine SC9853i) ADB can be used by WiFi, if you first run some commands on the unit.
You need a shell app and run these commands:
Code:
setprop persist.adb.tcp.port 5555
setprop sys.rkadb.root 1
reboot
After that you can connect via ADB from your laptop if both are in the same network.
Unfortunately that doesn´t work with all units.
rigattoni said:
If the USB connection does not work for any reason, you could try the following:
Some units (as mine SC9853i) ADB can be used by WiFi, if you first run some commands on the unit.
You need a shell app and run these commands:
Code:
setprop persist.adb.tcp.port 5555
setprop sys.rkadb.root 1
reboot
After that you can connect via ADB from your laptop if both are in the same network.
Unfortunately that doesn´t work with all units.
Click to expand...
Click to collapse
These commands require root
surfer63 said:
You can't use adb over tcpip on these units.
You can use adb over usb. You have to enable the developer options (tapping it 7 times). Go out, go in, and you have the adb over usb (OTG) option which does require an OTG cable.
@rigattoni posted in one of the SC9853i threads a step-by-step approach if my one-liner doesn't give you enough info.
Click to expand...
Click to collapse
Maybe I'm doing something wrong then. The developer options are enabled and I have it set for unlocked bootloader but my laptop can't see it whether I'm connected through the OTG usb port or the standard one and the HU doesn't give the popup dialogue asking if I want to allow the connection like my tablet and phone did. Maybe they changed something with these particular units with the new UI?
I did notice on another thread someone that had a FYT Joying Airmont with 8.1 and they said something about the 3 dot menu on the top right for "USB Connection" that brings up two options both in Chinese an his only worked on the lower option. I did try that too but still nothing. IDK. Maybe I had something else set wrong when I tried that lower option that made it not work in all my effort yesterday to get adb to see it and connect.

ADB commands from mobile phone to head unit

If you want to execute ADB commands you can use a USB male to USB male cable but you can also do it wireless:
1. Activate USB debugging on your head unit
2. Install Remote ADB Shell from Google Play Store on your mobile phone: https://play.google.com/store/apps/details?id=com.cgutman.androidremotedebugger
3. Connect your head unit to the wifi hotspot of your mobile phone.
4. Start Remote ADB Shell and connect to the IP of your head unit.
5. Execute ADB shell command.
Here are some samples for the Junsun V1 headunit:
Get su rights:
Code:
su @#zxcvbnmasdfghjklqwertyuiop1234567890,.
Disable duraspeed:
Code:
setprop persist.vendor.duraspeed.app.on 0
Give authorizations to an app:
Code:
pm grant com.llamalab.automate android.permission.WRITE_SECURE_SETTINGS
Would this work on Joying head unit?
CCJ22 said:
Would this work on Joying head unit?
Click to expand...
Click to collapse
Just give it a try. I expect the su command with the "password" will not work but remote adb may be possible.

Categories

Resources