How To: Open diag COM port on any ROM; Improve Bluetooth coverage - ZTE Z7, Z7 Max, Z7 Mini

Usually, there are some files in the root of your phone containing the scripts to initialize all possible USB configs. Those files are named like init.[something].usb.rc or, maybe, there also are some .sh scripts with "usb" in the name.
In case of my Z7 mini, there are init.nubia.usb.rc and init.qcom.usb.sh. Looking into the latter, it appears the engineering mode is enabled with the 'nubia' key, which meaning is defined in the former .rc file.
So opening the diag COM port is done with a simple terminal script (you may also make yourself a simple .sh if you like) -
Code:
su
setprop persist.sys.usb.config nubia,adb
(or the same without adb)
Then to close the port, run -
Code:
su
setprop persist.sys.usb.config none
and then set your preferred USB config in the regular settings of your ROM.
In principle, it should work on any ROM, including CM, Mokee etc. And with the due adjustments to keys' names, it should work with most ROMs/devices in general

Found a simple way to improve BT coverage, in fact it's the way to restore it to normal.
Adding a prop -
Code:
qcom.bt.dev_power_class=2
in the build.prop restores normal coverage range for bluetooth, that normally is way too poor with our phones.
Now my BT A2DP streaming coverage is at normal 10m or better. No stutters, no breaks.
Found the necessary prop in the etc\init.qcom.bt.sh
There's also a prop for the low-energy BT, but it's already set for higher power.

Found another way to open diag COM port that doesn't depend on the firmware installed, it even works without any firmware at all. Seems to be hard-coded.
What happens is that the diag COM port is open and also all the partitions of internal flash memory are mounted over USB connection to PC. And those partitions may be read and written if the PC recognises the filesystems there.
Moreover it all works both with the battery connected as well as with battery disconnected.
To get it all, switch the phone off, press and hold only the both ends of the volume rocker and then connect the USB cable. As devices start to get recognised, release the rocker.

Related

HOWTO: tethering with USB/bluetooth DUN

(tl;dr, experienced modders: skip to the steps section below)
I've spent several days trying to set up sharing of my mobile phone's Internet connection with my tf201. The phone (Nokia 6120 classic, running Symbian S60) has neither WIFI, nor bluetooth PAN (don't worry, the terminology is explained below), and there's no PDANet version available for it, which left me with two ways to tether with it: wired USB connection or bluetooth DUN. I show here how to configure both. You might want to do this if you're in a similar position as myself, but also if you want to replace wifi tethering with bluetooth DUN (bluetooth is said to be less power-hungry).
While I'd like the howto to be accessible to novices (such as myself), I can't cover basic/trivial parts and in general will assume a reader capable of googling and with a basic Linux familiarity.
This post does NOT relate to the issue of enabling bluetooth DUN on your Android phone or changing the server side of the connection in other ways. Please don't comment about that in this thread.
My primary source is this outstanding article in Russian, which solves the same problem for a different tablet: notioninkinfo.ru/telefon_kak_3g_edge_modem_dlya_adama/
The process turned out to be much simpler for Prime, since it has most of the necessary software in place.
Background
Sharing internet connection from your mobile phone to another device is called "tethering". Obviously, tethering has great importance when mobile devices are involved, thus a naive soul could hope that it works perfectly in Android. Surprisingly, the opposite is the truth: Android hates tethering with passion; so much that (stupidity being inapplicable) I have no choice but to suspect malice on Google's/ASUS's part. It's not that they lack the resources to implement it; or that the feature requires some kind of special know-how they don't have. No: all these features are present and work in vanilla Linux; the appropriate kernel drivers exist and work; in some cases, the features worked in earlier versions of Android, but have been disabled in later ones. Some bugtracker issues related to this have not received any attention, despite having tens to hundreds of comments from angry users. code.google.com/p/android/issues/detail?id=16717&q=dun&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
/rant
About tethering
There are multiple ways to do tethering that I know of (and probably then a few more). Most of them, unfortunately, are not enabled out of the box or even implemented in Prime at all.
1. Wifi hotspot: this works well *if* your phone supports it. "Hotspot" means that the device acts as a kind of router that is "meant" to accept connections from other devices and not just "happens" to have wifi. AFAIK, from the practical perspective, the only distinction is that the devices present themselves differently.
2. Adhoc wifi: this is the opposite of "hotspot wifi". Transformer Prime with Ice Cream Sandwich (ICS) does not currently support connecting to an adhoc wifi network directly. The feature was present and worked fine in some previous Android versions, but thanks to an offending kernel commit, no longer works in ICS. The only known workarounds are PDANet (see below) or making a custom ROM with a patched kernel. I don't recommend trying the latter at this time, as very few brave souls have already done it, and that was the last anyone heard of them I don't know if all the issues have been ironed out.
3. Bluetooth. There are two ways of connecting through Bluetooth (that I know of). In order to work, both require certain capabilities, or profiles, to be enabled on your phone. It is quite possible none of the two profiles are enabled or even implemented, in which case you're screwed.
3.1. PAN (Personal Area Network): treats the phone as an intelligent device. When connecting to the Internet, the client "asks" the server to establish the link and only forward data from and to the client. This is one of the best ways to do tethering, and fully supported by Prime's user interface out of the box.
3.2. DUN (Dial-Up Networking): treats the phone as a "dumb" device: the client takes over the phone's modem and uses it directly by sending it both commands and data through an emulated serial (RS232) link. This has several disadvantages, among them it requires the client to be aware of the line provider's dial-up config, such as service number, service name, user and password. Prime does not support it out of the box, despite (as we will see) having adequate hardware and software for it.
4. PDANet: this is an application (accessible from the market) that somehow circumvents Prime's and Android's restrictions on wifi and BT connectivity. You install it on both devices, configure it, and it should work. This method is only applicable to a few platforms that PDANet supports, including Android, but not Symbian.
5. USB: if your Prime has the dock, you've got a full-size USB port on it, which can act as a USB host. You can use this port to connect to your mobile phone (if your phone supports it). In some cases, connecting the phone will cause the Prime to discover the phone's modem, and once it is discovered, you can use it just like DUN.
Methods available out of the box: (1), (3.1). Methods this howto is concerned with: (3.2) and (5).
Prerequisites
1. Ice Cream Sandwich (ICS). It is possible the guide will work with earlier versions, but I didn't try it.
2. The tablet is rooted.
3. adb is installed.
There are plenty of other topics that explain how to get these.
Steps
(Note that I'm writing this from memory, so some inaccuracies are inevitable.)
1. connect the tablet to your PC with adb and execute:
Code:
adb shell
2. become superuser:
Code:
su
3. make /system writable:
Code:
mount -o rw,remount /system
4. download the attached ppp scripts
5. download a pre-compiled rfcomm binary here: omappedia.org/wiki/Android:_Working_with_pre-built_binaries
... or build it yourself. Or, if you're stupid enough to trust a random person on the internet, you can use the rfcomm binary included in the attachment.
6. gather the necessary info:
6.1. for USB:
6.1.1. connect your phone to the tablet by USB cable and try to make the tablet recognize it as a modem. This could vary from phone to phone. My 6120c Nokia needs to be connected in "Nokia PC Suite" mode.
6.1.2.
Code:
ls /dev/tty*
. If it worked, you should see new device(s) in the list. In my case, I got /dev/ttyACM0 and /dev/ttyACM1. I'm not sure why it creates two devices instead of one, but using /dev/ttyACM0 seems to work fine.
6.2. for DUN:
6.2.1. enable bluetooth both in the tablet and in the phone and pair them
6.2.2.
Code:
sdptool search DUN
The output should look like this:
Code:
Searching for DUN on [B]00:1E:A4:66:94:2E[/B] ...
Service Name: Dial-Up Networking
Service RecHandle: 0x10019
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: [B]2[/B]
7. Using the above information, fill the placeholders in the scripts you downloaded. In particular, the following must be replaced with real settings:
7.1. the device on line 8 in 3g_usb. Replace "/dev/ttyACM0" with the device you got in step 6.1.2
7.2. MAC and channel in 3g_bt_up. Use the values you got in step 6.2.2.
7.3. username and password in 3g_usb and 3g_bt. If you can use mobile internet from your phone, these values are already stored in the phone, so you just need to find them in the settings. Failing that, search for the correct values for your operator on the net (they are often the same for all users of the operator) or inquire the operator.
7.4. host name in 3gchat. Again, this varies from operator to operator. Note that the host name need not end with "com" or another valid root domain, and can thus sound nonsensical, e.g. "internet.internet". In my case (Israeli operator called Rami Levi), it was "internet.rl".
7.5. There are more operator-specific settings you might need to change in 3gchat, e.g. the dial-up number. In case the current value (*99***1# in my script) doesn't work, you can most likely find those on the net. If it doesn't work, search the net with query like "pppd chat <MY OPERATOR>" (without the quotes).
8.
Code:
adb push 3gchat /etc/ppp/
adb push 3g_bt_pdown /system/bin/
8.1. for usb connectivity:
Code:
adb push 3g_usb /etc/ppp/peers/
adb push 3g_usb_pup /system/bin/
6.2. for DUN connectivity (mind the trailing slashes):
Code:
adb push 3g_bt /etc/ppp/peers/
adb push 3g_bt_pup /system/bin/
adb push rfcomm /system/xbin/
7.
Code:
adb shell
chmod 0755 /etc/ppp/3gchat /system/bin/3g_usb_pup /system/bin/3g_usb_pdown /system/bin/3g_bt_pup /system/bin/3g_bt_pdown /system/xbin/rfcomm
8. try running 3g_bt_pup and 3g_usb_pup in adb
9. if it works, find a way to run these scripts directly on the Prime. E.g., you might want to make a GUI launcher for every one of 3g_bt_pup, 3g_usb_pup, 3g_pdown. The author of the original article recommends an app called GScript. I personally never tried it, as I just use Terminal Emulator from the market.
10. (Don't forget to remount /system in ro mode.)
Known issues
1. DNS refuses to work when you connect through the scripts. A workaround that I found is to connect to a wifi, then disconnect, then connect using the scripts. DNS will continue working until the next reboot. (I didn't have enough time to play with it yet, so not sure this is consistent.)
2. I consistently get 2-3 times slower download speed through DUN than through USB. Perhaps this has something to do with my phone, OTOH could be a problem in the scripts.
Enjoy! Corrections, tweaks, fixes are welcome.
Thank you very much!
I was trying to bring the tablet into the internet using bluetooth DUN for days. Your rfcomm, skripts and complete explanations did the trick: Archos G9 10.1 with Android 4.0.4 (Archos: 4.0.25) connects to Nokia N79 and dials into the internet.
neatfires said:
Known issues
1. DNS refuses to work when you connect through the scripts. A workaround that I found is to connect to a wifi, then disconnect, then connect using the scripts. DNS will continue working until the next reboot. (I didn't have enough time to play with it yet, so not sure this is consistent
Click to expand...
Click to collapse
Do you already have a solution for this problem?
I see strange behavior:
What I tried:
I had a look into syslog (using logcat) which reveals the DNS servers of the 3g provider.
Then I entered this IP-address in /etc/resolv.conf
Result:
* traceroot resolves the names but
* ping does not,
* ICS Browser+ does not and
* K9 does not resolve the DNS names
Do you have any idea how this problem could be solved?
Best regards,
Pfeffer2de.
Hi pfeffer2de,
Unfortunately, I don't have any other solution to this problem than the workaround I mentioned (connecting to the wifi before using DUN). I haven't used DUN at all since late spring, so I have no new input on this. If you find a solution, please post it here for other people to learn about it.
Hi neatfires!
neatfires said:
Unfortunately, I don't have any other solution to this problem than the workaround I mentioned (connecting to the wifi before using DUN). I haven't used DUN at all since late spring, so I have no new input on this. If you find a solution, please post it here for other people to learn about it.
Click to expand...
Click to collapse
I have to admit that I do not really understand what do you mean: Of couse the tablet has been connected to an Wifi access point some time before.
I rooted the device, connected to a wifi hotspot, made your steps and connected bluetooth DUN finally. Ok, I had some tries to succeed in connecting DUN. Anyway I had the DNS problems. So what is the difference to your work a round, at what point in time the wifi should be connected?
BTW: I switched wifi off before connecting bluetooth DUN.
Best regards,
Pfeffer2de.
pfeffer2de said:
Hi neatfires!
I have to admit that I do not really understand what do you mean: Of couse the tablet has been connected to an Wifi access point some time before.
I rooted the device, connected to a wifi hotspot, made your steps and connected bluetooth DUN finally. Ok, I had some tries to succeed in connecting DUN. Anyway I had the DNS problems. So what is the difference to your work a round, at what point in time the wifi should be connected?
BTW: I switched wifi off before connecting bluetooth DUN.
Best regards,
Pfeffer2de.
Click to expand...
Click to collapse
I can't remember all the details now, but the post says that you need to connect to a wifi, and then DNS works until the reboot, so it must be true . Anyway, try this:
1. fill in a valid DNS host in resolv.conf
2. connect to a wifi network, make sure you can reach internet
3. disconnect from the wifi network, but don't turn off the wifi
4. connect through the DUN
If it works, try doing the same but turn off the wifi. I can't remember currently if I had to have wifi on or off (I think I didn't), but this is the only thing I can think of.
Almost working, bit missing on
neatfires said:
I can't remember all the details now, but the post says that you need to connect to a wifi, and then DNS works until the reboot, so it must be true . Anyway, try this:
1. fill in a valid DNS host in resolv.conf
2. connect to a wifi network, make sure you can reach internet
3. disconnect from the wifi network, but don't turn off the wifi
4. connect through the DUN
If it works, try doing the same but turn off the wifi. I can't remember currently if I had to have wifi on or off (I think I didn't), but this is the only thing I can think of.
Click to expand...
Click to collapse
I tried it on my Motorola Atrix 4G which doesn't support 'reverse DUN' as such and I had to use my GPRS phone due to data plans reaching limits on Atrix 4G.
OK, here is original '3gchat' file, I just filled in releavant APN
--------------------------------------------------------------------------
#!/system/bin/sh
exec /system/bin/chat \
TIMEOUT 5 \
ECHO ON \
ABORT '\nBUSY\r' \
ABORT '\nERROR\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO DIALTONE\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' AT \
OK ATH \
OK ATE1 \
OK 'AT+CGDCONT=1,"IP","<APN>","0.0.0.0",0,0' \
OK ATDT*99***1# \
TIMEOUT 22 \
CONNECT ""
----------------------------------------------------------------------------
It hangs at $ exec /system/bin/chat \ 'Permission Denied'
If i delete above line (exec /system/bin/chat \ ) from 3gchat, it connects and remain conencted to BTDUN to my GPRS phone until I diconenct it, however there is no data. Following is after deleting line "exec /system/bin/chat \ "
-----------------------------------------------------------------------------
#!/system/bin/sh
TIMEOUT 5 \
ECHO ON \
ABORT '\nBUSY\r' \
ABORT '\nERROR\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO DIALTONE\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' AT \
OK ATH \
OK ATE1 \
OK 'AT+CGDCONT=1,"IP","<APN>","0.0.0.0",0,0' \
OK ATDT*99***1# \
TIMEOUT 22 \
CONNECT ""
---------------------------------------------------------------------------------
Infact, there wasn't any /system/bin/chat directory so I created one to comply with 3gchat sript. Yet above permission denied issue remained, until I deleted the "exec...." line.
I found someone adding follwing line in the shell script file connecting his chat file to /usr/sbin/chat :
connect '/usr/sbin/chat -v -f /etc/ppp/<chatfile name>'
Above quotes /usr/sbin/chat while '3gchat' script uses /system/bin/chat.
I am missing something here.
One a side note, I tried BlueVPN from the marked which worked.
UPDATEver
OK I installed BlueDUN on my Xolo X900 (which doesn't support reverseDUN, i.e. it doesn't natively support Bluetooth Dial-Up Modem profile, butr it can dial-up other Bluetooth Dial-Up Modems, i.e. other phones). This software enabled Xolo X900 to become a software Bluetooth Dial-Up Modem (as it natively doesn't have this feature like most android devices)
On another anrdoid device (Atrix 4G) I installed BlueVPN (please note this becomes almost mandatory somehow as until target phone natively supports reverseDUN, other btDial-Up softwares will not be able to detect (via sdptool) target phone until it has native reverseDUN (Bluetooth SPP per say). Then removed old pairing and repaired both devices again. After that, the most importatnt is to swicth on WiFi Tethering on target phone (in my case Xolo X900) and connect host phone (Atrix 4G in my case) to the WiFi Tether of Xolo X900. Whie WiFiTether is active, start BlueDUN on target phone (Xolo X900) and then start BlueVPN on host android device (Atrix 4G). This will make a working internet connection and you will be able to connect it via VPN setup. After net is connected you can turn off WiFi tethering and switch off wifi on both devices. WiFi thethering is required initially till internet starts working as it sorts out DNS issues.
As long as target phone is 3G or 4G, speed is not a problem. I am usining this BlueDUN + BlueVPN combo to post this.
I am resolved that BT tethering method of OP will not work in my setup wihout setting up VPN because I have been able to establish connection but still couldn't get any net traffic.
For the record, its not android that "hates tethering" - its the carriers that block, disable, or remove those capabilities, because they want to charge you more for the same service based on what device (eg your laptop) you use it with.

[Q] Mobile to pc connectivity problem

Hey guys.
I have Samsung galaxy ace 5839i (stock for 5830i) and I am using it for a few years, but this problem came for the first time.
Always, when I try to connect my mobile to pc using cable, it just won't connect, it won't even show me the notification of connecting.
Before this problem, I connected it to fedora linux and it was succesful, but now? It won't show me that USB sign even in windows.
Any help?
Thanks in advance
@LiQuDiAk, basically s5839i and s5830 i are identical in many areas ,, few questions though,, did you root your device or you are on android 2.3.6 stock version / kernel 2.6.35.7 ?
when you are in your windows device manager ( while you are connected , do you see any exclamation / question marks in front of the corresponding driver), you can always uninstall your old driver, reboot , then try compiled driver in attachment , and reboot to take proper effect in your registry (tested on win xp/7 -32bit) . Also check your device settings>Application>Development > USB Debugging and make sure the option is checked. now lets check your debugging mode through ADB command and see if your device is being recognized. download platform zip attachment, unzip it and put the folder someplace like your desktop. Now open your command prompt (cmd) through whatever means you are comfortable and change directory (cd) to the unzip folder or simply open your folder and drag/drop adb.exe into your CMD to be in the right place very fast. Then type "adb devices" without quotation marks and report for more troubleshooting .Assuming your Samsung cable is not faulty of course.
@ehsanotaku Yes i did root my phone on pheonix fire rom. No i do not see any. And debugging is checked, that was my first guess why it was causing this. I was checking, whether my device is recognized in linux (only available OS in present) and it was NOT, but the cable is not faulty, because it was charging my phone... but i will do recognize process on windows, hope it will get better. But thanks so far!
so, the driver didnt help, but the adb devices got me something long which i do not completely understand (i am a girl and not IT) so...
LiQuDiAk said:
so, the driver didnt help, but the adb devices got me something long which i do not completely understand (i am a girl and not IT) so...
Click to expand...
Click to collapse
off topic though, gender discrimination is prejudice,, sorry if you are offended . Learning from each other despite your gender,does not undermine your knowledge EVER mate You might find it hard to believe, but I am quite novice in android stuff myself ( learning a great deal from some female members though ).
Back to topic at hand now,,,So let Perfectly Clear take away the time-consuming tasks and fix some stuff ..1. so you can not access your sdcard's content from either systems,, even if you try some live bootable Ubuntu disk/flash into your system and boot it up,, you can't access the mount drive content , right?
2. screenshot of your device manger while you are connected always help mate
3. those long streams of numbers and words is supposed to be your device name , it means your device is communicating with your pc ( /sdcard/ should not be corrupted). You can push (copy ) some vital files to your device with following command :
again same path >> put some file into your desktop (drag/drop to cmd)
i.e: "adb push C:\Users\ehsanotaku\Desktop\test.txt /sdcard/"
back to your device and check root of your files with whatever file explorer you got to approve the theory
4. forgot to ask , just to be on the safe side your device is not in boot loop process, stuck on samsung splash screen or something like that, right?
okay, thanks!
1. I cannot access it trough USB to mobile way, but from SD card adapter, yeah I can (it is just the weird feeling, when you always have to put out your sd and do it that way, i would like to sort this out)
2. http://s1.postimg.org/nkta50u3x/Untitleddas.png I suppose the unknown device is my phone.
3. Just a question, my phone is not connected, i cannot access it and this doesn't help
4. Nope, it is working, i can access everything, just this connecting problem i have. anything else is running smoothly.
Let's say any of this will work, do you think flashing a stock rom will help? I am not sure, if this is problem of rom or not, so...
And maybe i wasn't clear (my bad if not) but when i plug the cable in my device and pc, pc will make this sound of new device found, but it wont show me anything, so my phone. It will charge, but it wont connect, it is behaving like it is on a charger and not connected to the phone.
@LiQuDiAk, Hasty actions are done in a hurry, sometimes without the necessary care or thought. Now let's not leap to any conclusion about your Android custom Rom and flashing back to stock. lets focus on your first most obvious problems,which is driver related.
You didn't declare your flavor of windows: i.e: Windows x86 based-PC;professional 7
Not so sure of your OS Name/Version and System Type, search "system information" in your search box.
Your task manger depicted ACPI x64 ( 64-bit system, no wonder previous 32-bit compatible didn't work out for you ).
Symptoms observed so far:
1. USB cable only charges ( remember your USB cable data line might be the culprit. Just in case of only charging,checking with another set recommended. Your USB port might be problem, some dirt or faulty data line, checking with another USP port doesn't heart though.
2. Windows recognizes something more (like in your case, struggling to find proper corresponding driver), but cannot see it as a Samsung android device (cannot allocate the installed USB drivers to the device).
-If you got Kies (Samsung proprietary software) installed on your PC, delete it with a descent uninstaller program such as CCleaner free version .Kies might cause driver conflict , use it as only last resort , if all drivers failed to communicate with s5830i device.
-Also Uninstall your previous given driver same way, now restart , back to system and grab set of universal Samsung Drivers from attachment .
3.Can't see your "USB connected" in Android notification bar, so you cant click on it and mount your storage data part while you are connected to your PC.
-Normally, when you plug in your Android device, Windows will recognize it as an MTP (Media Transfer Protocol) device and quietly mount it.
However, if you’ve ever attempted to unlock your device such as to install a new ROM or root it, then such miss behaviors might be expected occasionally .
Before i go for more troubleshooting , please provide a full screenshot from your "About Phone" page in your settings . I am quite curious about this phoenix Rom you have mentioned though . I am quite familiar with at least dozen of discontinued/ported projects, but never heard of such ported Rom from other models into s5830i .
Couple of solutions :
Navigate to your settings,Storage and touch the upper-right corner for the “USB computer connection” options, if you have this part available.
make sure “Media device (MTP)” is selected. ( if you have USB Utilities section or whatever added section in your custom settings go there . Selecting that will do the trick. If it does not, then you likely have a driver problem.
Open your device manager, Right click on your unrecognized device in question,choose update driver software, choose Browse my computer,find it through given x64 drivers in your package ,Restart. ( After a successful installation, restart your PC, you must have something like the picture in attachment ) .
Problem was not resolved, Uncheck your debugging option,power off your phone. Now hold Volume(+) + Home + Power for a couple of seconds simultaneously to get to your Samsung Recovery or your Clockwork Recovery, choose Reboot( might be some process/service in your background, which interfere with your Auto USB connected feature of your device. See if the problem is being resolved .
Problems have been persisting, we might need to format your SD card, but before that, insert it into your card reader, in your file explorer window choose Tools>Folder options>select view tab> tick your select hidden file.folders. Now copy all of your SD card's contents into some folder, safe inside your PC.
We can format your card through your clockwork mod recovery console, or some partition tools such as free mini partition wizard,,
problem still persist? let me know
Hey
After some rest with this, my mobile got it solved (dunno why, just once tried to do it and it works.)
So, thank you very much with your answers!!!!
And about that screenshots, I will PM you
But, really, thanks a lot, mate!!!!

how to use USB Wifi Dongle in

I have an M8S Pro but have had nothing but problems with the WIFI strength (see my other post)
I ran another test this morning with the device sitting right next to wifi router,
transferred 532mb file from samba share (router has usb drive attached)
it took over 26 minutes and crashed around 510mb
side notes:
transferring the same file to my laptop transfers at 20-30MB/s
the m8s pro had stock firmware originally and the issue was the same
i have installed nexus tv build (found here but of course the issue is still happening) - Ver 7.1.2 - Kernal Verion: 3.14.29
In hopes of fixing this i recently purchased a: Leelbox 600M AC dual-band Wireless USB adapter
However i cannot figure out how to use this adapter and disable the internal one?
with the stock firmware there was a build.prop file, and i had tried wlan1 (instead of wlan0) however this just resulted in no wifi at all. with this new firmware (7.1) the build.props file doesnt list the wlan adapter like the stock does so Im not sure what to try.
bloodstains said:
However i cannot figure out how to use this adapter and disable the internal one?
with the stock firmware there was a build.prop file, and i had tried wlan1 (instead of wlan0) however this just resulted in no wifi at all. with this new firmware (7.1) the build.props file doesnt list the wlan adapter like the stock does so Im not sure what to try.
Click to expand...
Click to collapse
That's because the property Wlan0 does not exist.
You can modify the Wlan1 property(not the actual property itself)
For disabling inbuilt wifi requires more low level code and driver removal, as a temporary solution there are wifi drivers inside the lib and vendor folders, there may also be some relavent files in /system/etc
As for getting your dongle to work, wouldn't that be more like USB tethering to an android device? Maybe check out USB tethering settings or apps
Ricky Divjakovski said:
That's because the property Wlan0 does not exist.
You can modify the Wlan1 property(not the actual property itself)
For disabling inbuilt wifi requires more low level code and driver removal, as a temporary solution there are wifi drivers inside the lib and vendor folders, there may also be some relavent files in /system/etc
As for getting your dongle to work, wouldn't that be more like USB tethering to an android device? Maybe check out USB tethering settings or apps
Click to expand...
Click to collapse
with this nexus tv build though the build.props file doesnt reference either wlans. can i add some key/value pair in there (build.props) for it?
bloodstains said:
with this nexus tv build though the build.props file doesnt reference either wlans. can i add some key/value pair in there (build.props) for it?
Click to expand...
Click to collapse
could be set within the kernel or elsewhere, check if the property exists first with adb shell getprop blahblahblah

mtp/data transfer disabled in android Pie. Charging still works

So i thought my usb port was damaged, replaced it, still no data connection. charging just fine. all usb settings are greyed out.
I thought it may have been rom related, flashed a new rom, it replaced my recovery as well unfortunately, on first boot it installed an OTA to the 2nd slot, which also replaced my recovery, I cannot access ADB except over wifi which is pretty helpful but cant sideload over wifi, cannot access fastboot to flash any of the good stuff. I can use root but only through adb shell on computer which is a godsend.
I managed to manually install busybox, so i have that. cant figure out how to flash firmware without usb access. cant figure out how to pull patch and push my boot image with magisk without fastboot.
checked my init script as well as the init.usb scripts and compared them with a generic one online, they seem ok as far as i can tell. getprop shows usb is ok. But:
jasmine_sprout:/ # echo 1 > sys/devices/virtual/android_usb/android0/enable
/system/bin/sh: can't create sys/devices/virtual/android_usb/android0/enable: Permission denied
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2|jasmine_sprout:/sys/devices/virtual/android_usb/android1 # cat state
DISCONNECTED
jasmine_sprout:/sys/devices/virtual/android_usb/android1 # cd ..
jasmine_sprout:/sys/devices/virtual/android_usb # cd android0
jasmine_sprout:/sys/devices/virtual/android_usb/android0 # ls
f_audio_source f_midi power state subsystem uevent
jasmine_sprout:/sys/devices/virtual/android_usb/android0 # cat state
DISCONNECTED
I dont understand why it is attemtpting to create that instead of changing the value in it. and the second figure shows usb is disconnected but it is not
I am getting much better at linux but still have alot to learn, so i can understand most instruction just need a point in the proper direction.
Xiaomi Mi A2 type C
I will attach my init scripts i dunno how helpful that is. also trying to record a trace while connecting and enabling USB features. All USB options are greyed out
https://drive.google.com/drive/folders/18gKDQBjQ6wORyHncdcBBfHvOAZZkh44L?usp=sharing
google drive folder with all init files inside. im going to make them txt files and attach to xda actually
I attached all init files to original post.. I am growing desperate for regular functionality of my phone. I shouldve submitted a warranty claim instead of changing the USB of the device
Bump

Question Wrong vendor:product IDs presented to USB host

Hi All,
I need to set up a reliable way to access this phone remotely via USB. Looks like whenever the phone is connected to a USB host (a server in my case) via USB it presents itself with wrong vendor/product IDs as follows from the lsusb output on the host:
Bus 002 Device 006: ID 18d1:4ee8 Google Inc. Nexus/Pixel Device (MIDI)
, which only changes to the right ones when I select "Transfer Files" (MTP) mode in the pop-up menu on the phone:
Bus 002 Device 007: ID 22d9:2765 OPPO Electronics Corp. Oppo N1
Is there a way to memorize my "Transfer Files" (MTP) mode selection for this particular host, so there's no need to select it every time? (it has Default USB Mode set to MTP in Dev Options, which it seems to be ignoring) The problem is that the phone isn't accessible remotely at that early stage yet, probably because of those wrong vendor/product IDs, hence catch 22. IIRC when connecting some other phone (probably a Samsung one) to my Windows laptop in the past I'd normally make my mode selection for it once and was never prompted to select it again and again for that phone, so if it's actually the Windows that remembered my selection back then how do I achieve the same with Linux on my current host? (CentOS 7).
Many thanks in anticipation!
The selection of which interfaces to present (ADB, MTP, Midi...) and which VID/PID to use is decided on the Android, the host plays no role.
There is a lot of OEM customization and stupidity on USB mode selection.
You can try:
Code:
$ setprop persist.sys.usb.config mtp,adb
It may say that you can't.
Me? I just set it to ADB and do everything through that.
@Renate: thanks for your reply.
> $ setprop persist.sys.usb.config mtp,adb
I suppose it requires rooting the phone first, right?
Code:
127|OP5552L1:/ $ setprop persist.sys.usb.config mtp,adb
Failed to set property 'persist.sys.usb.config' to 'mtp,adb'.
See dmesg for error reason.
1|OP5552L1:/ $
1|OP5552L1:/ $ dmesg
dmesg: klogctl: Permission denied
1|OP5552L1:/ $
Yeah, you need root for that on yours.
You can set it Settings to "No transfer" and leave the ADB on.
That will probably stick.
Copy individual files with adb push.
I use my adbsync.exe to keep all my devices synced with content and the photos pulled to desktop.
Renate said:
Yeah, you need root for that on yours.
You can set it Settings to "No transfer" and leave the ADB on.
That will probably stick.
Click to expand...
Click to collapse
Just tested it and still getting that mode selection prompt on it upon plugging USB cable into it, and the wrong vendor/product IDs presented again... Unsure I'll be allowed to root this phone because of the warranty but I'll ask.
It's not really "wrong" VID/PID.
There are the stock Android VID/PID that are 18d1/4ee?
Then there are the Oppo ones like 22d9/2765
It's the stupid UsbManager that's doing that popup silliness.
In point of fact, when it's plugged in it's already in some mode.
Renate said:
It's not really "wrong" VID/PID.
There are the stock Android VID/PID that are 18d1/4ee?
Click to expand...
Click to collapse
I understand they're some vendor-independent Google/Android ones at that early stage: looks like it's not the only phone behaving this way.
Renate said:
It's the stupid UsbManager that's doing that popup silliness.
In point of fact, when it's plugged in it's already in some mode.
Click to expand...
Click to collapse
Yeah, just not in the right one for my remote mgmt application Unfortunately there doesn't seem to be a way to force desired VID/PID onto it in all its modes from the USB host side... unless the phone can be instructed to always use them somehow (like using that CLI you advised).
It would certainly annoy me if every time I plugged in an Android it asked me what to do!
If you were rooted you could easily patch something in services.jar to get around this.
Renate said:
It would certainly annoy me if every time I plugged in an Android it asked me what to do!
If you were rooted you could easily patch something in services.jar to get around this.
Click to expand...
Click to collapse
Yeah, fortunately it's my customer's phone and not mine I'll inquire about the possibility of rooting it then, as it seems to be the last hopeful thing left by now.

Categories

Resources