Benjamin-Loison / android_frameworks_base

Other
0 stars 0 forks source link

Unable to wireless `adb connect` without first having adb shell specifying wireless adb parameters #2

Open Benjamin-Loison opened 10 months ago

Benjamin-Loison commented 10 months ago

https://github.com/LineageOS/android_frameworks_base/blob/56a6587c4ef2f34d7290752b16bb1ee50931978e/packages/SettingsLib/res/values-en-rAU/strings.xml#L246

Unclear if adb tcpip 5555 requires the phone to be connected.

Source: stackoverflow.com/a/3623727

It seems to need to:

adb connect `host fairphone-4-5g | head -n 1 | cut -d ' ' -f 4`:5555
failed to connect to '192.168.1.15:5555': Connection refused
adb tcpip 5555
error: no devices/emulators found

Can only execute adb tcpip 5555 when the phone is connected and then it is fine. If adb disconnect and then try to reconnect, it succeeds (I verified multiple times in a row). Is it still the same after a phone reboot? After a reboot reconnecting does not work anymore.

When phone running as usually /default.prop does not exist from adb root and /system/build.prop is read-only, w! does not work.

ls -lh /system/build.prop
-rw------- 1 root root 5.9K 2009-01-01 01:00 /system/build.prop

To reboot to recovery I used Advanced restart from Settings.

I tried Recovery > Advanced > Enable ADB, then adb pull /prop.default, edit, then adb push prop.default / and finally reboot but it does not work and after rebooting to recovery /prop.default is as before the edit.

I tried manipulating /system/build.prop from recovery but the file does not exist even after Recovery > Advanced > Mount/unmount system. Fastbootd does not look interesting as adb does not work and the possibilities are not interesting.

Related to #4.

Benjamin-Loison commented 7 months ago

See Android-Docs/blob/f89b5a310ce21a9aa97245f5ca0ccd5d1e46bcc4/en/docs/apps/processes/phantom-cached-and-empty-processes.md#commands-to-disable-phantom-process-killing-and-tldr.

Benjamin-Loison commented 3 months ago

It seems that Wireless debugging turns off on its own after a few seconds to tens of seconds. Well maybe it is due to wifi lost. Maybe related to Benjamin-Loison/android/issues/46.

Benjamin-Loison commented 2 months ago

https://adbshell.com/commands/adb-connect https://adbshell.com/commands/adb-usb https://adbshell.com/commands/adb-tcpip https://adbshell.com/commands/adb-pair

Benjamin-Loison commented 2 months ago

image

adb pair 192.168.1.XXX:XXXXX XXXXXX
Successfully paired to 192.168.1.XXX:XXXXX [guid=adb-XXXXXXXX-XXXXXX]

Source: the Android Stack Exchange answer 247618

with my Fairphone 4 LineageOS just restarted.

However, then:

adb devices
List of devices attached
Benjamin-Loison commented 3 weeks ago

benigumocom/a6a87fc1cb690c3c4e3a7642ebf2be6f

Output: ``` █████████████████████████████████ █████████████████████████████████ ████ ▄▄▄▄▄ █ ██▀▀ █ ▀█ ▄▄▄▄▄ ████ ████ █ █ █ ▀█▄█▄▀▄█ █ █ ████ ████ █▄▄▄█ █▀ █ ▄ ▄▄█ █▄▄▄█ ████ ████▄▄▄▄▄▄▄█▄█ ▀▄▀ █▄█▄▄▄▄▄▄▄████ ████ ▄██ ▄▄▀██▄▀▀▀ █ ▀█ █▄ ▄▄████ ████▄▄▄▄▀▀▄▄▀ ▄█▄▄▀▄███▄▄████████ ████ ▄▄ ▄█▄▀▀▀▀▀▀ ▄▀█▀▄▀▀ ▄▄▄████ ██████▄█▀█▄▄ ▄██▄▄▀▄▄▄▀▄█▄▀▄▀████ ████▄▄██▄█▄▄ ▄▀▀▄▀ ▀ ▄▄▄ ▀▀████ ████ ▄▄▄▄▄ █▀▄█▄▄▄▀▄ █▄█ ▀██████ ████ █ █ █▄ ███▀▄█ ▄▄ ▄▄▄ ████ ████ █▄▄▄█ █▀▄█▄▄▄▀▀ ▄▄▄█▄▀ ▀████ ████▄▄▄▄▄▄▄█▄█▄█▄▄█▄████▄▄██▄████ █████████████████████████████████ █████████████████████████████████ Scan QR code to pair new devices. [Developer options]-[Wireless debugging]-[Pair device with QR code] /home/benjamin_loison/a.py:50: FutureWarning: <__main__.MyListener object at 0x7f9935cfc850> has no update_service method. Provide one (it can be empty if you don't care about the updates), it'll become mandatory. browser = ServiceBrowser(zeroconf, TYPE, listener) Press enter to exit... List of devices attached ```

Source: the Android Stack Exchange answer 249230

On Debian 12 GNOME Pegasus.