mrh929 / magisk-wifiadb

A magisk module to enable WiFi ADB automatically.
102 stars 16 forks source link

How do i download and install this module on magisk ? #1

Closed aiamuzz closed 1 year ago

aiamuzz commented 1 year ago

Hi,

Now that magisk modules are no longer searchable from inside the magisk manager, could you please help me with the procedure to download and install this module on magisk manually ?

thanks.

mrh929 commented 1 year ago

Hi,

Now that magisk modules are no longer searchable from inside the magisk manager, could you please help me with the procedure to download and install this module on magisk manually ?

thanks.

You can compress these source codes into a zip file, and install it manually in magisk manager.

aiamuzz commented 1 year ago

Hi, Now that magisk modules are no longer searchable from inside the magisk manager, could you please help me with the procedure to download and install this module on magisk manually ? thanks.

You can compress these source codes into a zip file, and install it manually in magisk manager.

you mean i download this repo as zip file and install it from within the magisk module ?

My intentions and purposes are to have adbwifi on at all times ... will this module help me achieve that ?

thanks.

mrh929 commented 1 year ago

You can compress these source codes into a zip file, and install it manually in magisk manager.

you mean i download this repo as zip file and install it from within the magisk module ?

My intentions and purposes are to have adbwifi on at all times ... will this module help me achieve that ?

thanks.

Oh, I know...

The zip file you downloaded from github contains a parent folder, which is not recognized by magisk manager.

You can compress the sources by yourself.

mrh929 commented 1 year ago

This module just executes a simple shell command and enables wifiadb. If you have any requirement, you can modify whatever you want.

aiamuzz commented 1 year ago

You can compress these source codes into a zip file, and install it manually in magisk manager.

you mean i download this repo as zip file and install it from within the magisk module ? My intentions and purposes are to have adbwifi on at all times ... will this module help me achieve that ? thanks.

Oh, I know...

The zip file you downloaded from github contains a parent folder, which is not recognized by magisk manager.

You can compress the sources by yourself.

i figured that out ... i was able to install it successfully after ...

thanks for this module.

It would be nice to have found your modules here ... https://www.androidacy.com/magisk-modules-repository/

you must consider submitting it to the above repo ... that way we can download and install directly from the alternate magisk repo.

thanks once again.

PS : after reboot i've been able to connect adb wireless'ly ... I just wanted to know if the Wireless ADB will be ON always, i mean it wouldn't time-out and turn off/Disable ?

mrh929 commented 1 year ago

It would be nice to have found your modules here ... https://www.androidacy.com/magisk-modules-repository/ you must consider submitting it to the above repo ... that way we can download and install directly from the alternate magisk repo.

Thanks for the suggestion, but I think this module is too simple to be submitted to that repository. 😂 I will consider it then.

PS : after reboot i've been able to connect adb wireless'ly ... I just wanted to know if the Wireless ADB will be ON always, i mean it wouldn't time-out and turn off/Disable ?

Without external process monitoring, WiFiadb should not be able to maintain its status. If the Android system shuts down the WiFi adb feature, it will not restart. I am considering writing a process to monitor the system’s WiFi adb status and restart it when necessary.

And when this module is turned off by magisk manager, I think I can also shut down WiFi adb feature, just like https://github.com/taamarin/ClashforMagisk 😂.

aiamuzz commented 1 year ago

I am considering writing a process to monitor the system’s WiFi adb status and restart it when necessary.

Hey, that would really be great ... look forward to this development.

Thanks for the suggestion, but I think this module is too simple to be submitted to that repository. I will consider it then.

Please don't shy away even if its few lines of code, it is really a nifty feature to have, your module is certainly better than having to install a separate app to gain the same functionality.

mrh929 commented 1 year ago

Added feature in #3

aiamuzz commented 1 year ago

Added feature in #3

@mrh929 ... Wow ... thanks ... that was quick ... i just need to re-install the zip file as before ? I had to reattach the cable and fire a adb reboot just so your wifiadb is running ... this feature means i need not connect the cable right ?

this feature (restart wifiadb), how frequently will it check for the wifiadb's 'running' status and initiate a restart command ?

mrh929 commented 1 year ago

Added feature in #3

@mrh929 ... Wow ... thanks ... that was quick ... i just need to re-install the zip file as before ? I had to reattach the cable and fire a adb reboot just so your wifiadb is running ... this feature means i need not connect the cable right ?

this feature (restart wifiadb), how frequently will it check for the wifiadb's 'running' status and initiate a restart command ?

5 secs. If you are curious about it, just go through the source file in https://github.com/mrh929/magisk-wifiadb/blob/507269e03d921f3d202dabeeff208aa523477e15/common/service.sh.

aiamuzz commented 1 year ago

Added feature in #3

@mrh929 ... Wow ... thanks ... that was quick ... i just need to re-install the zip file as before ? I had to reattach the cable and fire a adb reboot just so your wifiadb is running ... this feature means i need not connect the cable right ? this feature (restart wifiadb), how frequently will it check for the wifiadb's 'running' status and initiate a restart command ?

5 secs. If you are curious about it, just go through the source file in https://github.com/mrh929/magisk-wifiadb/blob/507269e03d921f3d202dabeeff208aa523477e15/common/service.sh.

ya, ... i did read the source code and saw sleep 5 and assumed that must've been the frequency ... but i wanted to be sure hence the question ... Is there no burden on the resources to be checking the status every 5 secs ?

mrh929 commented 1 year ago

ya, ... i did read the source code and saw sleep 5 and assumed that must've been the frequency ... but i wanted to be sure hence the question ... Is there no burden on the resources to be checking the status every 5 secs ?

Don't worry about that... An APK will consume much more resources if it checks the status of WiFi ADB frequently...

aiamuzz commented 1 year ago

ok let me share the reason ...

My yearning for a feature as provided by your module/script was because my device has a blacked out(cracked) screen, as i was aware of wireless debugging from having used custom ROMS(right from my first set of android's ... i started looking for the same in a stock ROM(Oneplus's Oxygen OS) ... my only unmodded(ROM wise) device I've ever used.

the lack of Wireless Debugging in the stock Oxygen ROM prompted me to hunt for a solution that was inherent to a custom ROM is when i happen to land at your doorsteps ... and have been using it since ... thanks to you now with the always ON wifiadb you've recently added ... my life has all the more become easier ...

With the latest feature addition this always-ON wifiadb is equivalent to the wireless debugging option(with this now any stock ROM with Magisk can enjoy the feature of wireless debugging) found on the custom ROMS's

mrh929 commented 1 year ago

ok let me share the reason ...

My yearning for a feature as provided by your module/script was because my device has a blacked out(cracked) screen, as i was aware of wireless debugging from having used custom ROMS(right from my first set of android's ... i started looking for the same in a stock ROM(Oneplus's Oxygen OS) ... my only unmodded(ROM wise) device I've ever used.

the lack of Wireless Debugging in the stock Oxygen ROM prompted me to hunt for a solution that was inherent to a custom ROM is when i happen to land at your doorsteps ... and have been using it since ... thanks to you now with the always ON wifiadb you've recently added ... my life has all the more become easier ...

With the latest feature addition this always-ON wifiadb is equivalent to the wireless debugging option(with this now any stock ROM with Magisk can enjoy the feature of wireless debugging) found on the custom ROMS's

I'm glad that the script I wrote provides you with such a great convenience 😄 .

And I am curious when will WiFi ADB be turned off? I have a pixel 2, but WiFi ADB is always on. Now this module is monitoring the environment variable "service.adb.tcp.port". Once it changes to null, WiFi ADB have to get restarted. Is there any corner case?