I have many working android cellphones with broken touchscreen but with a working screen and I would like to use them as computing device and/or additional screen. Is there a way to do that?
Provided your device has an unlockable bootloader and a custom recovery (I strongly advice against buying devices which are artificially destined to become useless, that should be prohibited by law), you should.
In any case I advice anyone worrying their device could break anytime to already have unlocked bootloader and activated wifi and adb (through network, if worrying about usb port breaking) at boot. Remember that if you are unlocking your bootloader for the first time doing so WILL DELETE all userdata and if you are not in Europe it could void your warranty.
First of all, proceed to install
adb on your pc, connect the device to the pc and then
- unlock fastboot (the bootloader) on the device and flash the TWRP custom recovery (if no custom recovery is available you could somehow extract your base recovery image and enable adb and root access editing its
- boot recovery and open a shell with
boot) partitions with
fdisk -l /dev/block/mmcblk0;
mount -t ext4 <system_partition_file> <mountpoint>);
enabling debug is unnecessary cumbersome if you didn't have already enabled it.
First try adding the following into
ro.secure=0 ro.debuggable=1 persist.service.adb.enable=1
If that didn't work, you could try switching to
If even that didn't work, then you have to rebuild your
bootimage, properly editing the
default.propfile to enable adb and then switching the
adb_enabledsetting like above.
You can find information on how to do that here (keep in mind that it will probably require device-specific information like
tags_offsetso you have to find those somewhere first).
- add your adb server public key (placed into
/misc/adb/adb_keys(with a text editor or any other means) to skip device confirmation;
userdataand reboot the device;
Now that you can connect through adb, install
scrcpy on your operating system and use the device remotely from your computer.
And if like me you forgot your pin code, you can disable it by moving the files starting with
Remember that if you are using file-based encryption, moving or directly changing the pin in the sqlite3 database with
UPDATE locksettings SET value = '1' WHERE name = 'lockscreen.disabled';
will make your encrypted file inaccessible.
- Obtaining root by modifying default.prop(ro.… | Android Development and Hacking
- How to authorize and accept ADB RSA key with broken touch screen on Android - Stack Overflow
- android - 'adb devices' says unauthorized in TWRP - Stack Overflow
- Remove /Bypass Lockscreen With Recovery | Android Development and Hacking
- java - Set lockscreen to "None" programmatically? - Stack Overflow