Root On Redmi 4 Pro Interferes With Usb Mtp Connection


I just flashed the 7.1.5 latest xiaomi.eu rom with SuperSu 2.79 -> problem still exist. 4A
 
Last edited:
******************************************************
4A Logcat for kentaur:

01-06 23:07:34.090 25908 25908 D HighTemperatureReceiver: Receive action: android.intent.action.BATTERY_CHANGED
01-06 23:07:34.090 2305 2423 I InfoCollectManager: ACTION:android.intent.action.BATTERY_CHANGED
01-06 23:07:34.584 28400 28400 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
01-06 23:07:34.603 28400 28400 D wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=11 sndbuf=229376 outq=0 send_len=48
01-06 23:07:34.906 25743 25743 V BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@dbfc675
01-06 23:07:34.906 25743 25743 V BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@c9d560a
01-06 23:07:34.953 25743 27934 E HAL : Dawei load: module=/system/lib64/hw/gralloc.msm8937.so
01-06 23:07:35.000 416 416 E HAL : Dawei load: module=/system/lib64/hw/gralloc.msm8937.so
01-06 23:07:35.017 416 416 E HAL : Dawei load: module=/system/lib64/hw/gralloc.msm8937.so
01-06 23:07:35.665 718 718 W cnss_diag: type=1400 audit(0.0:40242): avc: denied { search } for name="user" dev="tmpfs" ino=10904 scontext=u:r:wcnss_service:s0 tcontext=u:eek:bject_r:mnt_user_file:s0 tclass=dir permissive=0
01-06 23:07:35.665 718 718 W cnss_diag: type=1400 audit(0.0:40243): avc: denied { search } for name="user" dev="tmpfs" ino=10904 scontext=u:r:wcnss_service:s0 tcontext=u:eek:bject_r:mnt_user_file:s0 tclass=dir permissive=0
01-06 23:07:36.159 416 416 E HAL : Dawei load: module=/system/lib64/hw/gralloc.msm8937.so
01-06 23:07:36.296 25743 25743 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
01-06 23:07:36.299 1359 1376 I UsbDeviceManager: Setting USB config to mtp,adb
01-06 23:07:36.295 29416 29416 W adbd : type=1400 audit(0.0:40244): avc: denied { setcurrent } for scontext=u:r:adbd:s0 tcontext=u:r:adbd:s0 tclass=process permissive=0
01-06 23:07:36.345 29417 29417 W adbd : type=1400 audit(0.0:40245): avc: denied { setcurrent } for scontext=u:r:adbd:s0 tcontext=u:r:adbd:s0 tclass=process permissive=0
01-06 23:07:36.406 1359 1376 I UsbDeviceManager: Setting USB config to mtp,adb

01-06 23:07:36.446 25743 25743 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:-1 android.content.ContextWrapper.startService:-1 android.content.ContextWrapper.startService:-1 com.android.settings.AnalyticsReceiver.onReceive:-1 android.app.ActivityThread.handleReceiver:-1
01-06 23:07:36.460 25743 29418 I Analytics: start session(com.android.settings)
01-06 23:07:36.460 25743 29418 I Analytics: end session(com.android.settings)
01-06 23:07:36.461 25743 29418 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:-1 android.content.ContextWrapper.bindService:-1 miui.analytics.Analytics.endSession:-1 com.android.settings.analytics.AnalyticService.onHandleIntent:-1 android.app.IntentService$ServiceHandler.handleMessage:-1
01-06 23:07:36.455 29419 29419 W adbd : type=1400 audit(0.0:40246): avc: denied { setcurrent } for scontext=u:r:adbd:s0 tcontext=u:r:adbd:s0 tclass=process permissive=0
 
Same here, latest weekly does not solve it, neither does SR2-SuperSU-v2.79-SR2-20170103215521.

The buildprop changes do not work for me either, and I can't install the PHH Superuser app from playstore (just keeps " Installing")...
 
Here is my solution for my Redmi 4A, it works till I don't try adb communication:

/system/build.prop with root explorer

Change this:
#Set composition for USB,add xuchao,solve bug204352
persist.sys.usb.config=diag,serial_smd,rmnet_qti_bam,adb

TO:
#Set composition for USB,add xuchao,solve bug204352
#persist.sys.usb.config=diag,serial_smd,rmnet_qti_bam,adb

Plus add these lines:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb

Let's try it guys... maybe helps you.

*************** Although
there is bug in the settings.apk "Select USB Configuration" when I change the modes, the actual will not the same as I selected.
 
Last edited:
I ended up wiping and installing the latest ROM from scratch, installed SuperSU 2.79 + Xposed, restored my apps using TB and it works for now.
 
Last edited:
I ended up wiping and installing the latest ROM from scratch, installed SuperSU 2.79 + Xposed, restored my apps using TB and it works for now.

Can I ask which Xposed you installed? I've just updated to the latest weekly now but I had a lot of trouble with Xposed. "Installed but not activated"

Just want to make sure I'm using the correct one.
 
Thanks driver_sl (slovenija?), this worked for me.
But I also had to add the two upper lines since they didn't exist in my build.prop .
I just wrote the 5 lines at the end of the file.

On the other hand installing Superuser didn't help.
 
It's pretty weird. No matter to which numbers I change the two upper lines, it fixes the issue for me, but only temporary.
 
What do you mean with temporary? It doesn't work after the reboot?
I changed the build.prop and rebooted the phone. Now it works (I connected the PC about 5 times since).

Update:
I just rebooted the phone again just for the test... And you are right, I cannot connect the phone.

Just for the info, I'm on the official international rom (not on xiaomi.eu). Sorry to tell, the slovenian language is not included.
 
Last edited:
Yup, it's weird. As soon as I change the build prop, it fixes the problem, after 1 reboot it's still working and after 2-3 it stops.
 
For my works with added line:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
 
Lucainnno, please report if it still works after few reboots.

Two days after I added those lines I left the phone to run out of the battery. But I was not able to start it again.
Luckily I could enter recovery. But wiping data, cache and other didn't help.
I had to reinstall the rom... I made a twrp backup after that at once ;) .

I am searching in different forums, but I couldn't find any fix until now. Maybe our russian friends at 4pda have something, but I am not so strong with that language...
 
Last edited:
Unfortunately the new SuperSU doesn't solve the problem on the global official rom. I've heard that the new eu roms (like yours giouncino) should solve the problems. But I will probably stick to the official.
Maybe there is a developer who will be able to compare the both bootloaders and see the difference that cause problems on the older eu and official miui roms - and prepare a patch that would solve it.
 
Yes the developer options were enabled all of the time (with USB debuging on). Do you have a specific setting in mind?
 
No, nothing special, just usb debugging on.
So probably the solution is a combination of rom 7.1.19 + supersu 2.79 sr3.

Did you try to disable usb debug and re-enable again, all done when the phone is connected to the PC?