I'm versx, I like to code.
versx / iphonecontroller Goto Github PK
View Code? Open in Web Editor NEWControl connected iPhone(s) running on macOS via Discord.
Control connected iPhone(s) running on macOS via Discord.
may want to adjust instructions to say ./dotnet-install.sh --channel 2.1 otherwise you get latest and it likely won't work with 3.x or future versions
Pulled latest master & built, upon launch it does this over and over. Reverted to last tag for now.
0|iPhoneController | 10:39 [TRACE] [HTTP] Initialize
0|iPhoneController | 10:39 [TRACE] [BOT] Start
0|iPhoneController | 10:39 [INFO] [BOT] Connecting to Discord...
0|iPhoneController | [2021-04-13 10:39:43 -07:00] [DSharpPlus] [Info] DSharpPlus, version 3.2.3
0|iPhoneController | [DSharpPlus] DSharpPlus, version 3.2.3: DSharpPlus, version 3.2.3
0|iPhoneController | 10:39 [TRACE] [HTTP] Start
0|iPhoneController | 10:39 [INFO] [HTTP] Starting...
0|iPhoneController | 10:39 [INFO] [HTTP] Started
0|iPhoneController | 10:39 [DEBUG] [HTTP] Listening on port 6542...
0|iPhoneController | 10:39 [INFO] [HTTP] Starting HttpServer request handler...
0|iPhoneController | 10:39 [INFO] [BOT] [DISCORD] Connected.
0|iPhoneController | 10:39 [INFO] [BOT] [DISCORD] Current Application:
0|iPhoneController | 10:39 [INFO] [BOT] [DISCORD] Name: iPhoneController
0|iPhoneController | 10:39 [INFO] [BOT] [DISCORD] Description:
0|iPhoneController | 10:39 [INFO] [BOT] [DISCORD] Owner: SenorKarlos#9419
0|iPhoneController | 10:39 [INFO] [BOT] [DISCORD] Current User:
0|iPhoneController | 10:39 [INFO] [BOT] [DISCORD] Id: redacted
0|iPhoneController | 10:39 [INFO] [BOT] [DISCORD] Name: redacted
0|iPhoneController | 10:39 [INFO] [BOT] [DISCORD] Email:
0|iPhoneController | 10:39 [INFO] [BOT] Machine Name: MacOS
0|iPhoneController | 10:40 [INFO] [HTTP] Handling restart request for device A11-SE-a89b...
0|iPhoneController | 10:40 [DEBUG] [BOT] Unhandled exception caught.
0|iPhoneController | 10:40 [ERROR] [BOT] System.NullReferenceException: Object reference not set to an instance of an object.
0|iPhoneController | at CallSite.Target(Closure , CallSite , Dictionary`2 , Object )
0|iPhoneController | at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
0|iPhoneController | at iPhoneController.Net.HttpServer.HandleDeviceRequest(WebhookPayload payload) in /Users/senorkarlos/iPhoneController/src/Net/HttpServer.cs:line 198
0|iPhoneController | at iPhoneController.Net.HttpServer.RequestHandler() in /Users/senorkarlos/iPhoneController/src/Net/HttpServer.cs:line 161
0|iPhoneController | at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
0|iPhoneController | --- End of stack trace from previous location where exception was thrown ---
0|iPhoneController | at System.Threading.ThreadPoolWorkQueue.Dispatch()
0|iPhoneController | Unhandled Exception:
0|iPhoneController | System.NullReferenceException: Object reference not set to an instance of an object.
0|iPhoneController | at CallSite.Target(Closure , CallSite , Dictionary`2 , Object )
0|iPhoneController | at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
0|iPhoneController | at iPhoneController.Net.HttpServer.HandleDeviceRequest(WebhookPayload payload) in /Users/senorkarlos/iPhoneController/src/Net/HttpServer.cs:line 198
0|iPhoneController | at iPhoneController.Net.HttpServer.RequestHandler() in /Users/senorkarlos/iPhoneController/src/Net/HttpServer.cs:line 161
0|iPhoneController | at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
0|iPhoneController | --- End of stack trace from previous location where exception was thrown ---
0|iPhoneController | at System.Threading.ThreadPoolWorkQueue.Dispatch()
0|iPhoneController | 10:40 [TRACE] [BOT] WhConfig [OwnerId=2redacted, GuildId=redacted, ChannelIds=redacted]
When RDMmonitor encounters a device that is stuck, it sents a reboot command to a remote listener, in my case iphonecontroller.
However it never gets accepted, even though the 2 programs are local and port 6542 is open.
There is no error in rdmmonitor just that it sents the reboot command and also no error in the logs of iphonecontroller, it just doestn receive it it seem.
Config for rdmmonitor
"allowWarnReboots": true,
"rebootMonitorURL": ["http://127.0.0.1:6542"],
"sendRebootAlerts": true,
"excludeFromReboots": ["Device01","Device02"],
config part of iphonecontroler
Use events for when device is finished deploying/fails to deploy: https://github.com/versx/iPhoneController/blob/master/src/Commands/AppDeployment.cs#L101
Use AppDeployer.Deploy
method: https://github.com/versx/iPhoneController/blob/master/src/Commands/AppDeployment.cs#L103
Looks like it's not possible to sideload apps to devices with ios 15 ๐ฌ
Since the usbmuxd
process is ran by the _usbmuxd
user account the readme example for kill usbmuxd
won't work.
Three routes I can see:
YOUR_COMPUTER_USERNAME ALL=(ALL) /sbin/reboot,/usr/bin/killall
kill usbmuxd
example from the readme (my personal favorite)touch /private/tmp/.restart_usbmuxd
. Also users would need to script or cp the launch daemon to the correct location and start the service with launchctl
I can provide more details if you are interested in option 3. I have no real stake in this since I don't use this feature.
sam option always seems to fail with Failed to get ECID for device XXX (uuid does display here) to reapply SAM profile
this is with useIosDeploy = true
Add the ability to use across multiple guilds
As part of #4 @kamieniarz thinks it would be cool for if you supported starting/stopping SAM. If you install Apple Configurator there is a separate ID that is used to target specific devices. This isn't the uuid used with other tools so you'll have to parse the output from cfgutil list(?)
Can upload the profile when not on mobile or you can search for the following text in one of our mutual servers.
cfgutil -v remove-profile com.apple.configurator.singleappmode
cfgutil -v install-profile ~/Desktop/sam_pogo.mobileconfig
This requires Apple Configurator 2 to be installed
If anyone wants to wrap that into their internal tooling. Might make setup for new iphones easier. Could also be used as a potential fix for the "Guided access not available" popup shit that doesn't require a reboot.Provided as is. I'm not support. Just sharing to help the community
Install results in exit code 1 and a dumb message about touching the device but it still works. Apple bugs ๐คทโโ๏ธ
Still doesn't help with system pop ups but those are mostly triggered due to a reboot over here ๐คทโโ๏ธ
Fresh clean install, iPhoneController runs but upon missing any command I get an error
[iPhoneController] Magik tried executing 'screen' but it errored: System.ComponentModel.Win32Exception: No such file or directory: Magik tried executing 'screen' but it errored: System.ComponentModel.Win32Exception: No such file or directory
7:37 PM [ERROR] [BOT] User Magik tried executing command screen and unknown error occurred.
: System.ComponentModel.Win32Exception (2): No such file or directory
at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at iPhoneController.Utils.Shell.Execute(String cmd, String args, Int32& exitCode, Boolean includeErrorOutput) in /Users/pokemon/iPhoneController2/src/Utils/Shell.cs:line 50
at iPhoneController.Models.Device.GetDevicesCfgUtil() in /Users/pokemon/iPhoneController2/src/Models/Device.cs:line 240
at iPhoneController.Models.Device.GetAll() in /Users/pokemon/iPhoneController2/src/Models/Device.cs:line 102
at iPhoneController.Commands.PhoneControl.ScreenshotAsync(CommandContext ctx, String phoneNames) in /Users/pokemon/iPhoneController2/src/Commands/PhoneControl.cs:line 100
at DSharpPlus.CommandsNext.Command.ExecuteAsync(CommandContext ctx)```
When issuing the command screen
or reboot
if you do not add a device ID at the end, it currently assumes "all"
A change request to force the use of "all" to screen or reboot all rather than assume If there is no device stated.
Currently reboot
will reboot all devices
Change too reboot all
to reboot all devices
If no device ID is added it is ignored
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.