[Guide] Recover MTP setting when connect via usb cable - Xiaomi Redmi 4 Prime Guides, News, & Discussion

In this post I will describe a simple method that I followed to recover the option of choose MTP connection when using a usb cable to the PC.
After root with SuperSU I noticed that when I plugged my phone to the PC using the usb cable, I did not have the option to "mount" as MTP anymore.
Therefore I could not transfer files from my PC to the phone in a easy way. If you want to continue with latest SuperSU you have to do that:
1. Edit your build.prop file adding those 2 lines at the end:
persist.service.adb.enable=1
persist.sys.usb.config=mtp,adb
Click to expand...
Click to collapse
2. Close and save it
3. Enable USB debugging in developer options
4. Select MTP in USB Configuration
5. Profit
All the information got from the MIUI Official Forum

Related

[Guide] USB OTG (USB host mode)

I got my usb otg wotking a year ago and then totally forgot about it. I tried it again after some time and it didn't work for me. Now I rediscovered it and made this little guide.
1. You need to power your usb port. Either Y-cable or USB hub with uplink power supply. link
2. Latest PATCHED KERNEL and supported rom link
3. Download and extract otg_scripts.zip attachment to your SD card.
4. To run scripts you will need SManager from play store.
5. Run SManager. Grant Super user permissions. Open otg_host.sh in SManager. Check SU. RUN it.
6. Your phone will now disconnect from computer and you can attach devices to your Desire S.
If otg_host.sh throws errors then run otg_mount_fs.sh and then otg_host.sh.
When you want to connect your phone to computer run otg_peripheral.sh. This disable otg host.
As a bonus you don't need a special usb cable with a shortened pin.

How to make then USB menu option - connect_to_pc value=true on bootup

My TV box is 100% rooted, but does not have a Developer Option, seems this was disable or removed by the vendor!
But it does have a USB Menu Section that has the option = "connect_to_pc" that has to be turn on manually, and then I am able to see it when i connect it via a OTG Cable > USB to a PC using ADB,
but the issue is: If the box is rebooted then the USB option "connect_to_pc" is then return to the default state = false and I would like to know when i can find and edit the boot up settings config file
to make it = true on boot up, so when I do any ADB commands that might and/or will make it reboot that it will pick up the "connect_to_pc" and still be able to connect to the box while it is still
connect and using the OTG USB cable after any reboot.
If any one know where the boot up setting config file is located so i can then review and/or edit the setting value=true?.
2nd option: is there a way to run a .sh script while it booting up to be able to make the USB turn on in the connect_to_pc mode?
Thanks in advance to all the forum moderators and members!
AVBestDeals

Usb debugging automatically turn of when not in use

I have problem while doing development an application. For this case i develop with android studio.
I need the option of usb debuggin is always on, just because i dont need to recongfigure of the network.
I need usb
And i always debug / compile with through wireless connection , usb just for trait the connecting.
For example
adb tcpip 5555
adb connect 192.168.43.1:5555
At this moment my device ( realme 5 pro ) has connect. Then i have doing something on coding after 10 minute , my device auto disconnected. This make me bad on development apps with this phone.
I NEED KNOW , HOW TO ALWAYS ON USB DEBUGGING WHAT EVER I DIDNT DEBUG/COMPILE ABOVE 10 MINUTE.
thanks in advance.
Copy file /system/build_default.prop and /system/build.prop to internal or external and edit, just add this on bottom line.
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
Click to expand...
Click to collapse
Better using twrp to replace thats file, path on /system-root/system/

Android file transfer using a USB cable

Hi,
For some reason I can no longer transfer files from my Android device to my Linux PC using Android File Transfer.
I can list the device:
sudo adb devices -l
List of devices attached
????????? device usb:1-4 product:OnePlus5T model:ONEPLUS_A5010 device:OnePlus5T transport_id:2
Click to expand...
Click to collapse
but Andorid File Transfer (version 4.2) wouldn't start with this phone. When I attach an older phone (Nexus 4) all is fine and I can transfer files without problem.
USB Debugging is enabled on the device.
On USB Preferences File Transfer is selected. Other options are USB tethering, MIDI, PTP, No data transfer.
Any help will be appreciated.
Update: problem solved - had to use root privilidges
Try another cable. Cliché but it's often the culprit. When you get the USB mode popup just cancel it and it'll decide on its own. Disable USB debugging as it doesn't need to be on. Try other USB ports, or the last one it was known working on. Failing that see if there's a proprietary software. Microsoft Your Phone Companion might help..

Updated to OO13, now can't connect to PC

Hey guys,
As the title suggests I've updated my 8T from OO11 to OO13 and now my phone isn't recognised in my computer at all
Nothing comes up in device manager when I plug the phone into the computer
I've tried
- 3 different usb ports
- 2 different usb a to c cables
- USB debugging is enabled
- Installed oneplus drivers
- Installed google usb drivers
- Switching default USB configuration to MTP
- Using MTP, PTP, No data transfer
Still nothing is showing up in device manager
The phone charges when connects to the computer, it doesn't prompt me to allow USB debugging on my phone, despite revoking old usb debugging authorizations
I need to use adb commands to enable volte using the Shizuku method but I can't do that as the phone isn't recognised at all
If anyone could help that'd be great, otherwise I'll have to rollback to OO11 and use the pdc method
Thanks in advanced!

Categories

Resources