# can i get data off a Pixel 4a phone with FreeBSD?



## chessguy64 (Jul 29, 2022)

Recently my google pixel 4a phone got some water in it through the speaker, at which point the sound would blip every 2 seconds when playing audio. The sound wasn't muffled at all, it would just "pause" on playing audio for a split second then keep playing normally. This would keep happening for as long as I played any music. Still not sure why this happened. Since I figured this wouldn't be optimal for making calls and I figured the phone was ruined anyway, I took it apart to see how it was assembled and if I could dry out any water trapped in it. Well there was really no water inside it, and in the process I put a little too much pressure on the paper thin screen while cutting the adhesive and now the screen is totally unresponsive. There's some data (video) I want to get off the phone, but in Windows you either have to tap an option on the screen when you plug it into your PC or if you have no screen, you can directly transfer files if you had USB debugging enabled (I didn't.) So.. if I plug the phone in via USB (USB-C -> male to male usb cable -> front usb port on computer) will FreeBSD recognize the device and is there a way to mount it and copy files directly?


----------



## VladiBG (Jul 29, 2022)

The phone will not report itself as usb memory until you change it via the phone menu. Your best option is to give this phone on service so they can replace your screen via temporary spare one and then fetch the data from the phone.


----------



## zirias@ (Jul 29, 2022)

Without knowing that exact model, you _might_ be lucky:

many models allow booting into recovery just using the hardware buttons (or at least into the bootloader from where you can use the `fastboot` utility to boot into recovery)
some recovery systems configure USB different by default (e.g. with MTP or USB debugging enabled)
Admittedly, it's a small chance...


----------



## eternal_noob (Jul 29, 2022)

Install adb, reboot into recovery (caution! Only step 1, 2 and 3 from that tutorial!) and  `adb pull` all your files.

See








						Solved - Problem with ADB - Android Debugging Bridge
					

I used to do a lot of adb pull and adb push to transfer file between my PC and my Android. After migrating to FreeBSD, I've a problem with ADB tool. I can do adb start-server and I can see my device in adb devices. But when I try to push a file to my Android, I receive some errors and the...




					forums.freebsd.org
				



for more info.

If stock recovery doesn't let you connect with adb, you might have to temporarily boot another recovery like TWRP using fastboot.









						How to install TWRP recovery on Android smartphones
					

Installing TWRP on an Android device is the first step towards custom development.




					www.xda-developers.com
				




Disclaimer: I am not responsible for any data loss or worse (bricked device). Think twice (trice) before issuing any command with adb or fastboot.


----------



## chessguy64 (Jul 30, 2022)

VladiBG said:


> The phone will not report itself as usb memory until you change it via the phone menu. Your best option is to give this phone on service so they can replace your screen via temporary spare one and then fetch the data from the phone.



No way. Not the best option at all. It would cost way less to buy a USB hub and connect it to my TV than it would to pay someone to replace the screen. I could just buy the screen and connect it, but again that would cost way more than just buying a USB hub, and then i'd still have a broken phone. Unnecessary. I was just wondering if there was a way to copy the files directly in FreeBSD without screen access.


----------



## eternal_noob (Jul 30, 2022)

Use `adb pull /sdcard` to copy all files.









						How do I adb pull ALL files of a folder present in SD Card
					

I have a folder in my SD Card as: /mnt/sdcard/Folder1/Folder2/Folder3/*.jpg  The name of Folder1 and Folder2 remains constant and inside Folder2 I have Folder3, 4, 5 and so on.. I want to pull all ...




					stackoverflow.com


----------



## kpedersen (Jul 30, 2022)

eternal_noob said:


> Use `adb pull /sdcard` to copy all files.


Doesn't adb need confirmation (as well as enablement in the settings)? This will be difficult with a broken screen.

Perhaps the OP can plug in a keyboard and hammer the enter button, hoping it will allow it to usb mount? May need a usb->micro adapter. And unfortunately it probably only has one USB making it hard to also plug into the PC... hmm, phones suck.


----------



## eternal_noob (Jul 30, 2022)

Iirc TWRP lets you pull files without confirmation. But i could be wrong, though.

I think it's worth a try.

Edit:
Mmm. I fear this won't work either since you need a working touch screen for TWRP.


----------



## ralphbsz (Aug 2, 2022)

Think through the security implications. Imagine that anyone who has found the phone would be able to read all the data from it, by just plugging in a USB cable. That's so insecure, it can not be true.

So in reality, the phone needs an authentication mechanism. For most phones, that's either a fingerprint reader, or facial recognition, or typing a PIN number or alpha password on the screen. Now imagine how this could work over USB: Not well, and not securely. One could in theory connect an external keyboard for the PIN/password, but that implies that the phone is a USB host at boot, looking for a keyboard-type USB peripheral, which precludes the phone being a USB peripheral (a storage device) that a computer can read.

If you already had installed something like ADB or similar "access over USB for debugging" software beforehand, that would make it easier, although I by no means know that it would work.


----------



## eternal_noob (Aug 2, 2022)

ralphbsz said:


> That's so insecure, it can not be true.


You can mount the internal storage via TWRP unless it's encrypted.

You are right, this will not work on phones not tampered with (encryption removed) first, since they are encrypted per default.


----------

