Article View: misc.phone.mobile.iphone
Article #636Re: Is it possible, with macOS/iOS to do what Windows/Android does?
From: Maria Sophia
Date: Sun, 22 Nov 2026 19:16
Date: Sun, 22 Nov 2026 19:16
122 lines
6987 bytes
6987 bytes
Chris wrote: > Maria Sophia <mariasophia@comprehension.com> wrote: >> Maria Sophia wrote: >>> For the record, here is the python script I wrote today based on the >>> Windows batch script I had written yesterday that is an example of >>> what we'd like to accomplish with iOS over Wi-Fi/USB to any common desktop. >> >> Actually, that was the batch script. This is the X-platform python script. > > It demonstrably isn't x-platform. You've specified paths which assume > Windows and only work on your own idiosyncratic system setup. > > And *yet again * you've posted useless python code that is guaranteed to > fail. Why will you never learn? > >> I tested them side by side (found some bugs) and now they work the same. >> >> #!/usr/bin/env python3 >> # ------------------------------------------------------------------------- >> # adbfolder.py >> # Usage: python adbfolder.py > > By setting the environment above this usage is superfluous. You can run the > script directly. Hi Chris, Thanks for your useful input, as I'm taking all the suggestions into consideration, as you can see I already included some of Lawrence's suggestions (some of which were the same as yours, in fact). I've been testing software and writing code on Usenet for decades. However, I have NOT been using Python for more than, oh, a year or so. I wrote it in batch first, so it was posted first to the Windows 10 ng. But then I ported it to allow those on other platforms to benefit. That's a lot of work for something that is already working, and for which nobody is paying me to do for them. One thing I try to do more than most people do it seems, is SHARE the actual work rather than simply discuss what somebody else ought to do. I have both iOS and Android devices, but I don't have macOS or Linux machines. Consequently, I can develop and test the Windows implementation, but I cannot personally verify the macOS/Linux implementations. However, there's a distinction in effort:value you may be overlooking. I wrote it in my "native" language of Windows batch, and the code worked. So I didn't need to port it to Python so that others could benefit. Keep that in mind. I already had working Windows batch code. I did the Python port for people like you. Because the Python code itself is largely platform-independent. I'm using Python's built-in sqlite3, pathlib, zipfile, subprocess and other standard modules. The database queries, enumeration logic, comparisons, archive handling and output generation aren't inherently Windows-specific. Yes, I've specified some Windows-specific executable and working-directory paths. Those need to be adjusted for other environments. That's configuration, not a wholesale rewrite of the program. And I've already included PATH-based executable discovery using shutil.which (which Lawrence had kindly suggested), so the groundwork for accommodating different installations is there in the latest revision (thanks to Lawrence!). What matters is the thought and energy put into the algorithms, Chris. My thinking is that it's considerably easier for a macOS or Linux user to take an existing working implementation, adjust the environment-specific paths and test it, than to start from scratch and independently recreate all the functionality. All the real effort is in the algorithm. Not the formatting. I can't disagree Usenet isn't exactly an ideal medium for distributing source code which is why I opened the XDA Developer's thread. On Usenet, line wrapping, quoting and newsreader formatting can sometimes damage the presentation of posted code. I understand that someone might have to unwrap lines, restore indentation or make minor formatting corrections before running it. But let's put that 'effort' in perspective. Correcting wrapped lines and adjusting indentation is trivial compared with writing the underlying program. We're talking about an enormous difference in effort. The hard part is developing the logic, figuring out the database structure, writing the SQL, handling the ADB communication, designing the enumeration and comparison routines, and making all the pieces work together. Then porting it. In other words, even if someone has to spend a little time cleaning up the code, they're starting with the benefit of all that algorithmic work already having been done, and proven to be working. All they need to do is tweak the paths. Bear in mind I never claimed to have tested it on operating systems I don't own. I said it should work on macOS/Linux, and I made the code available so that others could try it, identify the necessary adjustments and improve it. That's the point of sharing code on Usenet. If you see something specifically that will fail on macOS or Linux beyond the obvious Windows-specific configuration, by all means identify it. That's constructive technical criticism, and I'd welcome it. But saying the entire contribution is useless because a few paths need changing, or because posted source code might need some formatting cleanup, seems rather disproportionate to the amount of work already done. I'd rather share a working starting point and invite improvements than withhold the code until I can personally test every possible environment. That's what contributing to a technical community means to me.
Technical Details
Message-ID:
<11dvf2a$2mu5$1@nnrp.usenet.blueworldhosting.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.public-nat-02.vpngate.v4.open.ad.jp!not-for-mailReferences:
<11dratg$b4h$1@nnrp.usenet.blueworldhosting.com> <11dtief$dcg$1@nnrp.usenet.blueworldhosting.com> <11dtjqh$1sko$1@nnrp.usenet.blueworldhosting.com> <11dutii$10q29$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.public-nat-02.vpngate.v4.open.ad.jp!not-for-mail From: Maria Sophia <mariasophia@comprehension.com> Newsgroups: misc.phone.mobile.iphone,comp.sys.mac.apps,comp.sys.mac.advocacy Subject: Re: Is it possible, with macOS/iOS to do what Windows/Android does? Date: Sun, 22 Nov 2026 15:16:27 -0400 Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com) Message-ID: <11dvf2a$2mu5$1@nnrp.usenet.blueworldhosting.com> References: <11dratg$b4h$1@nnrp.usenet.blueworldhosting.com> <11dtief$dcg$1@nnrp.usenet.blueworldhosting.com> <11dtjqh$1sko$1@nnrp.usenet.blueworldhosting.com> <11dutii$10q29$1@dont-email.me> Reply-To: pusvul@getTjewytR4so+mqe2.invalid Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 22 Nov 2026 19:16:27 -0000 (UTC) Injection-Info: nnrp.usenet.blueworldhosting.com; posting-account="l//KxG3Ge2LojWvwJg0Igv8F0ChK8RUC9RtOxMPUo3U"; posting-host="IfCZz72xNNlHXBkfV9B6WJEa9xVhaehMJfhAC6fCwnM"; logging-data="89029"; mail-complaints-to="usenet@blueworldhosting.com" User-Agent: Mojibake v24p7 Cancel-Lock: sha1:Dm7iAfLLZ/tHuB/pcPCogtFX358= sha256:3BCh8Ozrf0q7JlPK/29STvl5V+Wlx4o14C/j7RoKFKo= sha1:mgJHg9S9IdL5djCGZLdRLlAS3t4= sha256:zEgtsZMhi4/FyMyZVCn0T2BSyGFjMb/au2a5oRLyzr0= Content-Language: en-GB