[OnePlus 5 Questions & Answers] Bakuryu91:
Hi,

My touchscreen stopped working all of a sudden, in a very similar way as these users reported:

> https://xdaforums.com/oneplus-5/help/oneplus-5-touch-screen-stop-t3757724

> https://xdaforums.com/oneplus-5/help/touchscreen-responding-how-access-t3844693

The phone boots up to the "Enter pattern for all data and features" screen, and I'm not able to enter the pattern since my touchscreen doesn't respond. For what it's worth, my phone is rooted and has the latest TWRP installed. However, the phone is encrypted, USB debugging is disabled and I have an anti-theft app (Cerberus Anti-Theft) that can act on settings like "Prevent USB debugging" or "Disable Wi-Fi". I have three users on my phone, and I have been able to recover the data of the first user only so far (see below).

Idea 1: use an USB OTG mouse

I did try this solution, but nothing happens when I plug the USB mouse. The blue LED on the mouse doesn't turn on, and it seems that no power is output at all.

Idea 2: use an USB OTG mouse in recovery

I tried to boot into recovery and plug my USB-C mouse in... but nothing, no pointer, no power drawn from the mouse.

Idea 3: boot into recovery and use TWRP adb commands

The phone boots TWRP and prompts me to enter my pattern, but is not able to communicate with the PC. 'adb devices' shows nothing.

Idea 4: load a temporary TWRP from fastboot

The phone boots fastboot without any problem. I'm able to 'fasboot boot C:\twrp-cheeseburger.img', and TWRP boots just fine. I then try to plug my USB-C mouse, and it works! I can see the pointer, and the mouse's blue LED turns on. I can enter my pattern, decipher my Data partition and backup everyhting to my PC.

HOWEVER, I am not able to access other users' data, and I have a work profile that contains data I would really like to recover. Is there any way to decrypt data from secondary users without booting Android system?

On a side note, I was also able to permanently flash the TWRP I booted from, which means I'm able to use the mouse without having to 'fastboot boot'.

I now have full, untethered recovery access, with full mouse support. I'm still not able to swipe to confirm some adb commands though, as I have to disconnect the PC cable to plug the mouse.

Idea 5: enable USB debugging from temporary TWRP in order to use adb from Android system

I would gladly accept any help on that matter.

From what I've read, I have to edit two files, '/data/property/persist.sys.usb.config' &'/system/build.prop', and then push RSA keys on the device in the '/data/misc/adb/adb_keys' folder.

The pulling / editing / pushing part is OK, but the RSA part seems trickier. I've never connected my phone via adb to my computer (just recently bought it), but I do have the adbkey files in my home folder. I would try and give my results back here, but like I said, I have data that I would like to recover and I can't risk messing with the keys.

Idea 6: find what's causing the USB ports to be disabled

Easier said than done! What could possibly prevent the USB port to be completely disabled (except for charging)? Any ideas? I'm guessing Cerberus Anti-Theft might have to do something with it, but I couldn't find anything specific on that matter.

Idea 7: nandroid backup the phone, wait for quantum computers to become commercially available and bruteforce the private keys

Hmmm...

I'm really running out of ideas here.

EDIT: Solution

> The only way to get to secondary users' files is to boot Android system and enter the pattern.

> The only way to enter a pattern with a broken touchscreen is to use an USB mouse.

> USB OTG wasnt enabled on my phone for some reason, so I had to find a way to enable it from recovery. I booted in fastboot mode, then flashed the latest version of TWRP so I was able to use the mouse in TWRP (OTG mouse is enabled by default in TWRP).

> USB OTG was still disabled in Android system. Luckily, I had Magisk installed so I was able to flash the zip that Axelguitt suggested, which is a Magisk module that enables USB OTG at boot.

Here's a link to the module (by simonsmh): https://xdaforums.com/apps/magisk/module-oxygenos-otg-enabler-t3735922. Simply install the provided zip from recovery.

> This permanently enabled USB OTG in Android system, so I was able to enter the pattern and backup data for all users.