scrcpy access problem with Linux - Redmi 9C Questions & Answers

I have 2 Android devices: a tablet from Denver and a cell phone from Xiaomi (Redmi 9C), I installed scrcpy on my MX Linux pc, I have no problem to access tablet through
Code:
scrcpy
, but when I tried with Redmi 9C, I can only see it, the mouse does not work, did I miss some settings? The developer option is enabled (is there any other options inside developer options that I need to change? I only enabled developer options).
note:
1) I've tried enable file transfer when plugin the USB cable, seems to make no difference and
Code:
adb device
command can see this device.

Related

[SOLVED] problem WiFi hotspot

Finally found the solution with my z3c. Problem started with Lollipop. When I was using my phone as portable AP there was no Internet access on any device connected. There were many descriptions of solutions (manual settings, soft reset, deleting all APNs) but none of them worked for me.
My service provider suggested changing APN settings:
Use whatever APN you find working for you, and change "APN type" field from "default,supl" to "default,dun".
Now everything works just like it's supposed to.
Sorry if someone posted this already or if it's under wrong subject. This is my first thread. Thanks.
I use this solution and it works for me:
http://forum.xda-developers.com/z3/general/lollipop-tethering-t3058923
------------------------------------------------------------
This can be fixed permanently using the following procedure (UPDATE: no root required):
Enable developer mode (Go to Settings -> About phone, and click on the build number until the developer mode is enabled).
Enable USB debugging under Settings -> Developer options
Connect the device with a USB cable to a computer with the Android SDK platform tools installed (any modern adb.exe works, the one included with FlashTool, for example)
Start an adb shell: adb shell
In the adb shell, run this command: settings put global tether_dun_required 0
------------------------------------------------------------
BarajaVLC said:
I use this solution and it works for me:
http://forum.xda-developers.com/z3/general/lollipop-tethering-t3058923
------------------------------------------------------------
This can be fixed permanently using the following procedure (UPDATE: no root required):
Enable developer mode (Go to Settings -> About phone, and click on the build number until the developer mode is enabled).
Enable USB debugging under Settings -> Developer options
Connect the device with a USB cable to a computer with the Android SDK platform tools installed (any modern adb.exe works, the one included with FlashTool, for example)
Start an adb shell: adb shell
In the adb shell, run this command: settings put global tether_dun_required 0
------------------------------------------------------------
Click to expand...
Click to collapse
My post is about portable hot spot, not USB tethering. I'm not sure if your post is about the same thing
If yes, then I'm very glad that we have multiple solutions for the same problem
Whoa! My girlfriend had this same problem on a moto g 2014 she bought a year ago, so yesterday I changed her APN type as you said and now everything's working. Thanks a lot.
Sent from my D5833 using Tapatalk
dgaspa75 said:
My post is about portable hot spot, not USB tethering. I'm not sure if your post is about the same thing
If yes, then I'm very glad that we have multiple solutions for the same problem
Click to expand...
Click to collapse
Yes, the solution I provided makes portable WiFi hotspot work
APN Type change to "default,dun" worked like a charm for me.
'settings' is not recognized
i have same problem hotspot is not working i installed android studio 3.0.1 and ran command
settings put global tether_dun_required 0
i get error
C:\Users\log\AndroidStudioProjects\MyApplication>settings put global tether_dun_required 0
'settings' is not recognized as an internal or external command,
operable program or batch file.
any help please
APN Type change to "default,dun" worked like a charm for me...thanks brother
Thanks so much for this! Genius!!

Mi A2 mtp doesn't work in Linux

As the title suggests, I can not connect mtp to Linux, but it works in Windows. Other phones of mine do not have this problem under Linux. Does anyone have a solution or the same problem? I've already tried several versions of the stock rom and it also doesn't work in the pie beta either.
My A2 connected with mtp under Linux all the time. No issues.
I'd suggest turn on adb, keep the developer selections open, make the connection, then if no mtp, bring settings back up and in the usb settings section, select mtp.
It seems Linux has some built in detection's for devices, product ID's etc. Many times it results in a 'default' setting of 'charge only'. So you have to change it back after the connection.
What Linux distribution are you using? I have no problems whatsoever using Arch Linux + Nautilus inside i3wm Window manager.
AsItLies said:
My A2 connected with mtp under Linux all the time. No issues.
I'd suggest turn on adb, keep the developer selections open, make the connection, then if no mtp, bring settings back up and in the usb settings section, select mtp.
It seems Linux has some built in detection's for devices, product ID's etc. Many times it results in a 'default' setting of 'charge only'. So you have to change it back after the connection.
Click to expand...
Click to collapse
I already tried this. What I personally find the strangest thing is the file transfer via adb push / pull works but when I try in the file manager to open the phone comes the error that the device could not be mounted because of a udev error.
I tried it on 2 PC's one with Cinnamon and the other with xubuntu and it doesn't work.
My other phones (Xiaomi Mi5s and Mi A1) are working flawless on both PC's.
jigs4wkiller said:
I already tried this. What I personally find the strangest thing is the file transfer via adb push / pull works but when I try in the file manager to open the phone comes the error that the device could not be mounted because of a udev error.
I tried it on 2 PC's one with Cinnamon and the other with xubuntu and it doesn't work.
My other phones (Xiaomi Mi5s and Mi A1) are working flawless on both PC's.
Click to expand...
Click to collapse
Well, now you have a north to go.
Take a look at the DebuggingUdev wiki from Ubuntu.
Maybe it's just a missing udev rule. Execute
Code:
sudo udevadm monitor -e
After, connect your device and you should get better logs.
Ironmaniaco said:
Well, now you have a north to go.
Take a look at the DebuggingUdev wiki from Ubuntu.
Maybe it's just a missing udev rule. Execute After, connect your device and you should get better logs.
Click to expand...
Click to collapse
If I understand the log correctly, it tries the device instead of mtp with ptp to mount. But to be honest, I do not really understand what's there stand.
Here the output from the command:
UDEV [388.551499] bind /devices/pci0000:00/0000:00:15.0/usb1/1-2 (usb)
ACTION=bind
BUSNUM=001
COLORD_DEVICE=1
COLORD_KIND=camera
DEVNAME=/dev/bus/usb/001/011
DEVNUM=011
DEVPATH=/devices/pci0000:00/0000:00:15.0/usb1/1-2
DEVTYPE=usb_device
DRIVER=usb
GPHOTO2_DRIVER=PTP
ID_BUS=usb
ID_FOR_SEAT=usb-pci-0000_00_15_0-usb-0_2
ID_GPHOTO2=1
ID_MEDIA_PLAYER=1
ID_MODEL=SDM660-MTP__SN:07081BDD
ID_MODEL_ENC=SDM660-MTP\x20_SN:07081BDD
ID_MODEL_ID=ff48
ID_PATH=pci-0000:00:15.0-usb-0:2
ID_PATH_TAG=pci-0000_00_15_0-usb-0_2
ID_REVISION=0404
ID_SERIAL=Xiaomi_SDM660-MTP__SN:07081BDD_10fa792
ID_SERIAL_SHORT=10fa792
ID_USB_INTERFACES=:ffff00:ff4201:
ID_VENDOR=Xiaomi
ID_VENDOR_ENC=Xiaomi
ID_VENDOR_ID=2717
MAJOR=189
MINOR=10
PRODUCT=2717/ff48/404
SEQNUM=5817
SUBSYSTEM=usb
TAGS=:uaccess:seat:
TYPE=0/0/0
USEC_INITIALIZED=388518849
adb_user=yes

Mi 5 Pro (128 GB) USB Connection/ADB Problem

Hello,
I want to talk about a problem that I have experienced for a long time on my Mi5 Pro (128GB) device.
Since I bought the device from my friend (knowing the problem), I don't know when USB last worked.
Problem:
* The device is only charging when I connect the device to the PC.
* There is no notification about USB connection.
* PC doesn't recognize the device.
* In bootloader mode, the PC can see the device as a fastboot device. I can do operations on fastboot such as flashing a rom.
So far I have:
* flashed different Marshmallow, Nougat, Oreo Global Stable Rom, Developer Rom, Custom Roms.
* flashed different original and custom kernels.
* tried 3 different PCs with 4 different data cables.
* done editing in the build.prop file related to adb connections etc.
* deleted and reinstalled adb / fastboot drivers on PC.
* tried using USB 2-3 ports, PC's direct motherboard usb ports etc.
* turned on and off USB Debugging on the developer options
* changed the setting of USB Mode to ptp,mtp etc. on developer options.
* locked and unlocked device etc.
My own solution to temporarily access ADB / Phone memory:
Step 1: I get into fastboot mode when device is not connected to PC.
Step 2: In Fastboot mode, connect the device to the PC. PC sees the device as a fastboot device.
Step 3: I reboot into Recovery manually when the device is connected to the PC.
Step 4: In TWRP (MTP Enabled) PC can detect the phone and I can access the files.
Step 5: I start the device normally with the function "Reboot to System" via TWRP when the device is connected to the PC.
Step 6: When the device is turned on, the USB connection notification is coming up and I can use it as an adb device and access the memory.
Step 7: After disconnecting the device from the PC, the PC never sees the device again when I reconnect the device.
I don't have access to the device memory/adb unless I repeat these steps.
PS: I wrote the steps individually because, for example; This method doesn't work if I open fastboot while the device is already connected to the PC (Step 1).
Hopefully, a solution proposal comes up. This is a really weird problem for me.
Thanks in advance for your suggestions.

Mtp OTG doesn't work

Hi ! I don't know why but I want to connect my Pixel 4a 5G Yesterday on my mac and today on Pc the pixel is not recognized.
I have uncheck usb debuging and check it again but not working.
My Pixel are on last Android 12 and root with magisk. it is possible that a mode can create a problem with the OTG ?
I have test on Safe mod doesn't work too
I have connect an usb type c usb key it recognize.
I have test connect on plateform tools and on terminal ./adb devices, have message on pixel to allow my computer and it recognize but not Android File transfert ?
I think stay the new update and see if I can update it !?
I don't understand why ?
Thanks
Hi ! I post again because when I connect usb key mtp works and if I connect to my mac and go to settings usb parameters and choose transfert files/Android auto that work but never had notification pop-up for choose it
USB is a master/slave protocol. When you plug in an otg cable, your phone's USB controller switches into host mode. Your computer's USB is always in host mode. So your effectively trying to get two master devices to communicate which USB does not support.

How to rescue data from my 9T Pro

So while walking it slipped out from my hand and hit the lower left corner.. The screen didnt even work anymore (after removing the glas, it was clear why, as the connector is lower left corner).
Good thing is, I have adb debugging enabled and my keys are known.. So I can access adb shell and various commands..
My problem is: It rebooted and now, the important stuff is NOT mounted.. Also via scrcpy or MonkeyRemote, I cannot send any touch event... Its not reacting at all.. Honestly, I dont know what it is doing, but its quite busy writing for ever logs in logcat, that the sensors have errors (which is no wonder).
So I tried various "adb shell input XXX", but its not working at all..
Tried to connect a mouse via normal usb-c hub, but I dont know if I would need an OTG cable or if it would even work.
DrFone and some other software, already wants the money, before unlocking anything.. And I would be Ok, if it would be 5-10€.. But buying the whole thing for 1 test, is a big no.
So my status:
adb shell working.
scrcpy at least showing a screen
phone is not reacting on anything else, besides the lockscreen to wake it up.. volume keys are also kinda ignored.
I tried the adb shell input stuff from stackoverflow, but nope.
Can I boot in any recovery thing and mount sdcard there? Does scrcpy work there?
What he heck is my phone even doing?? If I connect another phone in lockscreen and use scrcpy, I can also wake it up normaly.. So probably not only the screen got dmg while flying :/
Most annoying things: It has alarms going off all the time, as I can only snooze them -.-
Is there no command, to unlock it from adb/terminal? I know the damn pin
When I run top, the top most things are sufaceflinger and logd (between 2-15). So its not like sth is always at 100% cpu load..
So little status update:
all adb shell input XXX are simple not working, as Xiaomi needs another setting for that.. Which I cannot activate, without screen.
I will try a manual keyboard at home..
Is there a way, to root it with adb only? Would help me alot..
MIUI security center requires you bonded MI account to enable adb input commands in developer options. scrcpy has OTG mode and can emulate HID device.
scrcpy also didnt work, without that stupid setting set to be true/1.
Tested with my old Mi6. When I enabled the option in dev-settings, it worked fine.
But I was able to unlock it with a keyboard plugged in (+ mouse). Looks like the CPU also has some issues, as everything is slow-motion..
So I just tried, what do I need to press on the Mi6 -> then did it on the Mi9.
"hitting space -> pin -> enter", "hitting space -> pin -> enter".
But was able to rescue all my data + turn off the alarms.
PS.: I then tried to enable this setting, for inputs, but you need to have a SIM cart inserted, to activate it
PPS.: Oh.. Now I got you.. I have to enable this option in scrcpy.. OMG Will test that now
PPPS.: Yeah, with that otg mode, the keyboard and mouse would have also worked.. Well, for the next time I know it
alecxs said:
MIUI security center requires you bonded MI account to enable adb input commands in developer options. scrcpy has OTG mode and can emulate HID device.
Click to expand...
Click to collapse
Ok, thanks - that was missing
If you figure out the command line to enable it from adb settings put global I am very grateful
alecxs said:
If you figure out the command line to enable it from adb settings put global I am very grateful
Click to expand...
Click to collapse
Ok, so I dumped all settings and props to files:
Code:
adb shell settings list global > global.txt
adb shell settings list secure > secure.txt
adb shell settings list system > system.txt
adb shell getprop > props.txt
then searched for adb, usb and similar butfound only the following:
SETTINGS GLOBAL:
adb_enabled=1
adb_wifi_enabled=0
verifier_verify_adb_installs=1
GETPROP:
persist.security.adbinput=1
persist.security.adbinstall=1
(My phone: Mi 11 Lite 5G NE, MIUI 13)
That is, eg ADB can be enabled/disabled as settings global adb_enabled
However, ADB Input is not in settings but as persistent prop persist.security.adbinput and it can be only manipulated by Magisk - and by TWRP but on the old devices where System is not read-only
IMO, it would be theoretically possible on the Mi 9T Pro, but not if display is broken where TWRP cannot be used (I doubt there is anything like scrpy that works for TWRP)
zgfg said:
Ok, so I dumped all settings and props to files:
Code:
adb shell settings list global > global.txt
adb shell settings list secure > secure.txt
adb shell settings list system > system.txt
adb shell getprop > props.txt
then searched for adb, usb and similar butfound only the following:
SETTINGS GLOBAL:
adb_enabled=1
adb_wifi_enabled=0
verifier_verify_adb_installs=1
GETPROP:
persist.security.adbinput=1
persist.security.adbinstall=1
(My phone: Mi 11 Lite 5G NE, MIUI 13)
That is, eg ADB can be enabled/disabled as settings global adb_enabled
However, ADB Input is not in settings but as persistent prop persist.security.adbinput and it can be only manipulated by Magisk - and by TWRP but on the old devices where System is not read-only
IMO, it would be theoretically possible on the Mi 9T Pro, but not if display is broken where TWRP cannot be used (I doubt there is anything like scrpy that works for TWRP)
Click to expand...
Click to collapse
Btw (sorry, OT for the originally reported problem), Netflix cannot be fooled (DRM) to display over scrcpy, only subtitles are displayed on the PC
YT works fine (although without sound - I will try with sndcpy), and strcpy properly recognizes landscape orientation, hence window on the PC can be stretched over the whole monitor
Edit: On the other PC I tried, audio works fine with scrcpy
zgfg said:
However, ADB Input is not in settings but as persistent prop persist.security.adbinput and it can be only manipulated by Magisk - and by TWRP but on the old devices where System is not read-only
Click to expand...
Click to collapse
Nice! I was curious because I don't have Mi account. Although I didn't have this property, just set it from resetprop anyway and it worked!
We can set it from magisk patched boot.img ramdisk/overlay.d/custom.rc systemless. or just add it in init.rc directly.
Code:
on boot
setprop persist.security.adbinput 1

Categories

Resources