FORUMS
Remove All Ads from XDA

Galaxy S5 with broken screen, need help controlling it from PC

3 posts
Thanks Meter: 1
 
By _sepiroth, Junior Member on 12th May 2019, 05:47 PM
Post Reply Email Thread
Hi, I've got an old S5 with a broken screen. There's no image going on and there's no indication that the touchscreen is working.
I'm not looking to recover data, I'm looking to play around with it by controlling it from my PC. Last I remember, the phone is running a Cyanogenmod OS (I don't think LineageOS was around at that time) with either TWRP or CWM recovery, but I'd bet on TWRP.

Now: the device reaches the OS properly, I can tell because if I try to turn the ringing sound up it gives me an audio feedback.
If I connect it to a PC from the OS:
- the phone shows up in Windows Explorer as "SM-G900F"
- Device Manager shows me a "SAMSUNG Mobile USB Composite Device" under Universal Serial Bus controllers
However I cannot access any files (Windows Explorer shows the device as empty), and if I attempt to 'adb devices' in the console it shows me an empty devices list.

Now, I suspect that USB debugging might be off. So I also tried connecting it to a PC from recovery and the exact same thing as above can be observed, PLUS:
- Device manager also shows me a "SAMSUNG Android Phone" list which can be expanded to show me one entry called "SAMSUNG Android ADB Interface"
However it's the same as before, no files available and 'adb devices' shows an empty list.

Now I heard that I can theoretically enable USB debugging through ADB, by writing to a config file. That would allow me to enable USB debugging and try something like Vysor in order to control the phone from my PC.
However that's a moot point until I can figure out why the ADB service on my PC isn't seeing the device. Any help would be greatly appreciated, and if you need more info I can provide it.

Extra info:
- I installed Samsung USB drivers at some point while trying to make it work
- Windows Explorer shows a phone icon for this device, and if I recall correctly that's what happens when it's connected through MTP (Mass Storage should show it like a memory card)
 
 
13th May 2019, 03:35 AM |#2  
Ibuprophen's Avatar
Recognized Contributor
Flag Upstate New York
Thanks Meter: 6,323
 
Donate to Me
More
Quote:
Originally Posted by _sepiroth

Hi, I've got an old S5 with a broken screen..........

I've never experienced this situation myself but, I've seen that the following thread has worked for many individuals.

https://forum.xda-developers.com/sho....php?t=2786395

Good Luck!


~~~~~~~~~~~~~~~
Unless asked to do so, PLEASE don't PM me regarding support. Sent using The ClaRetoX Forum App on my Apple Macintosh.
The Following User Says Thank You to Ibuprophen For This Useful Post: [ View ] Gift Ibuprophen Ad-Free
13th May 2019, 07:10 PM |#3  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by Ibuprophen

I've never experienced this situation myself but, I've seen that the following thread has worked for many individuals.

https://forum.xda-developers.com/sho....php?t=2786395

Good Luck!


~~~~~~~~~~~~~~~
Unless asked to do so, PLEASE don't PM me regarding support. Sent using The ClaRetoX Forum App on my Apple Macintosh.

Thanks a bunch, that pointed me in the right direction with my research! I solved my issue, I can now control my phone from my PC.
By doing this I ran into a couple of problems, I'm going to describe them and their solutions:

Problem 1: couldn't ADB into the device when in Recovery Mode. That is because after a long head scratching session I came to the conclusion that I didn't have TWRP Recovery installed (I had Philz Touch CWM Recovery and LineageOS 14.1 instead).
Solution 1: ADB mode is enabled in TWRP by default. So I flashed the latest TWRP through Odin, ADB instantly started working afterwards in Recovery Mode.

Problem 2: USB Debugging was disabled inside the OS.
Solution 2: from the thread that Ibuprophen posted, you can enable USB debugging in your OS by opening an ADB shell into your device and modify the build.prop like so
Code:
Adb shell
echo "persist.service.adb.enable=1" >>/system/build.prop
echo "persist.service.debuggable=1" >>/system/build.prop
echo "persist.sys.usb.config=mass_storage,adb" >>/system/build.prop
reboot´╗┐
Problem 3: /system was empty so there was no build.prop. If I attempted to create a build.prop file it wouldn't be saved after a device reboot, so USB debugging still didn't work.
Solution 3: it seems like TWRP doesn't mount /system by default, only /data. You can mount it manually through ADB like this:
Code:
mount -o rw /dev/block/bootdevice/by-name/system /system
I found this out from this stackexchange question: https://android.stackexchange.com/qu...e-in-adb-shell

Problem 4: When an app tries to use USB Debugging you need to allow it to do so from the phone. Since the screen was broken, I couldn't do this.
Solution 4: You'll need to push a public key to your device with ADB. Boot into Recovery Mode and make sure your device is recognized by your PC and type
Code:
adb push <path to adbkey.pub on your PC> /data/misc/adb/adb_keys
This solution is from: https://stackoverflow.com/questions/...een-on-android
This will make sure that you won't need to confirm debugging permissions for apps coming from your machine.

So for anyone who has a broken phone screen (my screen is dead and touchscreen/touch buttons are kaput too) and wishes to control their phone from their PC but USB debugging is disabled:
1. Boot device in TWRP Recovery (flash it if you don't have it)
2. ADB into the device
3. Make sure /system is mounted (if it's empty it means it's not mounted), else mount it manually like in Solution 3
4. Configure build.prop to have USB Debugging enabled like in Solution 2
5. Push your public key to the device like in Solution 4
6. Restart the phone (into its OS)
7. Download the Chrome extension called Vysor and launch it
8. Connect your phone through a USB cable
9. The device should appear in Vysor, connect to it and have fun controlling it

Note that if you just want to backup your files, steps 1 + 2 are sufficient. After making sure ADB works you can just 'adb pull' all your files which should be located in /sdcard. Google it, it's easy to find.
The same goes for backups, you can do them directly through ADB.

Again, thanks Ibuprophen!
The Following User Says Thank You to _sepiroth For This Useful Post: [ View ] Gift _sepiroth Ad-Free
14th May 2019, 12:42 PM |#4  
Senior Member
Thanks Meter: 107
 
More
Vysor does not work on all graphic cards. a good free alternative is scrcpy
btw instead of flashing twrp, you can flash a modified system partition with proper entries in build.prop (for those with no custom recovery available)
The Following 2 Users Say Thank You to aIecxs For This Useful Post: [ View ] Gift aIecxs Ad-Free
14th May 2019, 05:22 PM |#5  
OP Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by aIecxs

Vysor does not work on all graphic cards. a good free alternative is scrcpy
btw instead of flashing twrp, you can flash a modified system partition with proper entries in build.prop (for those with no custom recovery available)

Very well pointed out, thanks for this.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes