Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No argument supplied" when running main.py in rewrite #24

Closed
pixlxip opened this issue Oct 21, 2023 · 14 comments
Closed

"No argument supplied" when running main.py in rewrite #24

pixlxip opened this issue Oct 21, 2023 · 14 comments

Comments

@pixlxip
Copy link

pixlxip commented Oct 21, 2023

> python3 main.py
Fetching version ...
Done
Enter sudo password : 


#####################################
#  Welcome to the AltServer script  #
#####################################

ScriptUsage: [OPTION]

OPTIONS
    i, --Install AltStore or ipa files
        Install AltStore or ipa files to your device
    w, --Switch to wifi Daemode mode (Default using it after launch)
        Switch and restart to wifi Daemode mode to refresh apps or AltStore
    t, --Switch to usb tethered Daemode mode
        Switch and restart to usb tethered Daemode mode to refresh apps or AltStore
    e, --Exit
        Exit script
    h, --Help
        Show this message
    p, --Pair
        Show paired devices
    u, --Update
        Update this script
        
For more information: 
https://github.com/powenn/AltServer-Linux-PyScript


Enter OPTION to continue : No argument supplied, if you want for help, please use -h or --help
Not supplying ipa, running in server mode!
Running python3 command to advertise AltServer: from ctypes import *; dll = CDLL('libdns_sd.so'); sdRef = c_int(); flags = 0; interfaceIndex = 0; name = None; regtype = br'_altserver._tcp'; domain = None; host = None; port = 23527; txtLen = 17; txtRecord = b'\x10\x73\x65\x72\x76\x65\x72\x49\x44\x3D\x31\x32\x33\x34\x35\x36\x37'; ret = dll.DNSServiceRegister(byref(sdRef), flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, None, None); print('DNSServiceRegister result: %d' % ret); from threading import Event; Event().wait(); 
*** WARNING *** The program 'python3.11' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
DNSServiceRegister result: 0
Starting netmuxd
Starting mDNS discovery for _apple-mobdev2._tcp.local with mdns
Listening on /var/run/usbmuxd
i
No devices found
Enter OPTION to continue : ^C
Ctrl+C pressed, aborting

when i run the script, it asks for a sudo password, i put it in, and it gives warnings. when i enter i, it just says no device found, even though my iphone is plugged in and trusted

@pixlxip
Copy link
Author

pixlxip commented Oct 21, 2023

im using Python 3.11.5 and arcolinux (arch linux based)

@powenn
Copy link
Owner

powenn commented Oct 22, 2023

T for switching to tether mode before plugging in device

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

Thank you, I'll try this later today. :)

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

Update: I tried the t option, this it the new output:

> python3 main.py
Fetching version ...
Done
Enter sudo password : 


#####################################
#  Welcome to the AltServer script  #
#####################################

ScriptUsage: [OPTION]

OPTIONS
    i, --Install AltStore or ipa files
        Install AltStore or ipa files to your device
    w, --Switch to wifi Daemode mode (Default using it after launch)
        Switch and restart to wifi Daemode mode to refresh apps or AltStore
    t, --Switch to usb tethered Daemode mode
        Switch and restart to usb tethered Daemode mode to refresh apps or AltStore
    e, --Exit
        Exit script
    h, --Help
        Show this message
    p, --Pair
        Show paired devices
    u, --Update
        Update this script
        
For more information: 
https://github.com/powenn/AltServer-Linux-PyScript


Enter OPTION to continue : No argument supplied, if you want for help, please use -h or --help
Not supplying ipa, running in server mode!
Running python3 command to advertise AltServer: from ctypes import *; dll = CDLL('libdns_sd.so'); sdRef = c_int(); flags = 0; interfaceIndex = 0; name = None; regtype = br'_altserver._tcp'; domain = None; host = None; port = 15850; txtLen = 17; txtRecord = b'\x10\x73\x65\x72\x76\x65\x72\x49\x44\x3D\x31\x32\x33\x34\x35\x36\x37'; ret = dll.DNSServiceRegister(byref(sdRef), flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, None, None); print('DNSServiceRegister result: %d' % ret); from threading import Event; Event().wait(); 
*** WARNING *** The program 'python3.11' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
DNSServiceRegister result: 0
Starting netmuxd
Starting mDNS discovery for _apple-mobdev2._tcp.local with mdns
Listening on /var/run/usbmuxd
t



Enter OPTION to continue : No argument supplied, if you want for help, please use -h or --help
Not supplying ipa, running in server mode!
Running python3 command to advertise AltServer: from ctypes import *; dll = CDLL('libdns_sd.so'); sdRef = c_int(); flags = 0; interfaceIndex = 0; name = None; regtype = br'_altserver._tcp'; domain = None; host = None; port = 49046; txtLen = 17; txtRecord = b'\x10\x73\x65\x72\x76\x65\x72\x49\x44\x3D\x31\x32\x33\x34\x35\x36\x37'; ret = dll.DNSServiceRegister(byref(sdRef), flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, None, None); print('DNSServiceRegister result: %d' % ret); from threading import Event; Event().wait(); 
*** WARNING *** The program 'python3.11' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
DNSServiceRegister result: 0
Detected device:iPhone
Starting notification connection to device: iPhone

Invalid option
Enter OPTION to continue : i
[0] : iPhone , c178cee343fb11e6390c7147b7db8d296a2711b6
Enter the index of the device for installation : 0
Enter your Apple ID : [Apple ID]
Enter password of the Apple ID : 
Do you want to install AltStore ? (y/n) [n for select your own iPA] : y
Installing app...
parse anisette data ret
Alert: Could not install AltStore.ipa to unknown.
    Failed to connect to any resolved endpoint
Press any key to continue...

Exception: Failed to connect to any resolved endpoint
 0# 0x00000000005CF298
 1# 0x000000000099EC2C

Finished!

@powenn
Copy link
Owner

powenn commented Oct 22, 2023

Enable debugging in script for figuring out problem

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

Ok, I'll try that, too today. 🙂

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

How do I use debug mode? It isn't in the help section of the script, but I'll look at the python quickly to check.

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

[DEBUG] 2023-10-22 07:38:43
== Script Start ==
[DEBUG] 2023-10-22 07:38:43
== RUNNING AT /home/pixl_xip/Git/AltServer-Linux-PyScript , RESOURCE_DIR : /home/pixl_xip/Git/AltServer-Linux-PyScript/resource ==
[DEBUG] 2023-10-22 07:38:43
== ARCH : x86_64 , NETMUXD_AVAILABLE : True ==
[DEBUG] 2023-10-22 07:38:43
== RESOURCE_MISSED : False ==
[DEBUG] 2023-10-22 07:38:43
== total 79164
drwxr-xr-x 2 pixl_xip pixl_xip     4096 Oct 21 14:52 .
drwxr-xr-x 7 pixl_xip pixl_xip     4096 Oct 22 07:38 ..
-rwxr-xr-x 1 pixl_xip pixl_xip 52415952 Oct 21 14:52 AltServer
-rw-r--r-- 1 pixl_xip pixl_xip  5809750 Oct 21 14:52 AltStore.ipa
-rwxr-xr-x 1 pixl_xip pixl_xip 11337296 Oct 21 14:52 anisette-server
-rwxr-xr-x 1 pixl_xip pixl_xip 11484640 Oct 21 14:52 netmuxd ==
Fetching version ...
Done
[DEBUG] 2023-10-22 07:38:46
== {'AltServer': 'v0.0.5', 'AltStore': '1.7', 'Netmuxd': 'v0.1.4', 'Anisette-Server': '2.2.0', 'Script': '1.0'} ==
Enter sudo password : 
[DEBUG] 2023-10-22 07:38:49
== 0000 ==
[DEBUG] 2023-10-22 07:38:49
== http://127.0.0.1:6969 ==
[DEBUG] 2023-10-22 07:38:49
== /home/pixl_xip/Git/AltServer-Linux-PyScript/resource/anisette-server -n 127.0.0.1 -p 6969 ==

#####################################
#  Welcome to the AltServer script  #
#####################################

ScriptUsage: [OPTION]

OPTIONS
    i, --Install AltStore or ipa files
        Install AltStore or ipa files to your device
    w, --Switch to wifi Daemode mode (Default using it after launch)
        Switch and restart to wifi Daemode mode to refresh apps or AltStore
    t, --Switch to usb tethered Daemode mode
        Switch and restart to usb tethered Daemode mode to refresh apps or AltStore
    e, --Exit
        Exit script
    h, --Help
        Show this message
    p, --Pair
        Show paired devices
    u, --Update
        Update this script
        
For more information: 
https://github.com/powenn/AltServer-Linux-PyScript


Enter OPTION to continue : No argument supplied, if you want for help, please use -h or --help
Not supplying ipa, running in server mode!
Running python3 command to advertise AltServer: from ctypes import *; dll = CDLL('libdns_sd.so'); sdRef = c_int(); flags = 0; interfaceIndex = 0; name = None; regtype = br'_altserver._tcp'; domain = None; host = None; port = 56277; txtLen = 17; txtRecord = b'\x10\x73\x65\x72\x76\x65\x72\x49\x44\x3D\x31\x32\x33\x34\x35\x36\x37'; ret = dll.DNSServiceRegister(byref(sdRef), flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, None, None); print('DNSServiceRegister result: %d' % ret); from threading import Event; Event().wait(); 
Starting netmuxd
Starting mDNS discovery for _apple-mobdev2._tcp.local with mdns
Listening on /var/run/usbmuxd
*** WARNING *** The program 'python3.11' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
DNSServiceRegister result: 0
t
[DEBUG] 2023-10-22 07:39:08
== NETMUXD : False ==



Enter OPTION to continue : No argument supplied, if you want for help, please use -h or --help
Not supplying ipa, running in server mode!
Running python3 command to advertise AltServer: from ctypes import *; dll = CDLL('libdns_sd.so'); sdRef = c_int(); flags = 0; interfaceIndex = 0; name = None; regtype = br'_altserver._tcp'; domain = None; host = None; port = 5540; txtLen = 17; txtRecord = b'\x10\x73\x65\x72\x76\x65\x72\x49\x44\x3D\x31\x32\x33\x34\x35\x36\x37'; ret = dll.DNSServiceRegister(byref(sdRef), flags, interfaceIndex, name, regtype, domain, host, port, txtLen, txtRecord, None, None); print('DNSServiceRegister result: %d' % ret); from threading import Event; Event().wait(); 
*** WARNING *** The program 'python3.11' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
DNSServiceRegister result: 0
Detected device:iPhone
Starting notification connection to device: iPhone
i
[DEBUG] 2023-10-22 07:39:19
== NETMUXD : False ==
[DEBUG] 2023-10-22 07:39:19
== ['[id?]'] ==
[0] : iPhone , [id?]
Enter the index of the device for installation : 0
Enter your Apple ID : [APPLEID]
Enter password of the Apple ID : 
Do you want to install AltStore ? (y/n) [n for select your own iPA] : y
[DEBUG] 2023-10-22 07:39:43
== ['iPhone', '[APPLEID]', '[PASSWORD]', '/home/pixl_xip/Git/AltServer-Linux-PyScript/resource/AltStore.ipa'] ==
Installing app...
parse anisette data ret
Alert: Could not install AltStore.ipa to unknown.
    Failed to connect to any resolved endpoint
Press any key to continue...

Exception: Failed to connect to any resolved endpoint
 0# 0x00000000005CF298
 1# 0x000000000099EC2C

Finished!

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

I changed DEBUGGING in the script to True

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

also, is the string that I labelled as [id?] the UDID of the device?

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

I tried to run altserver using that as the UDID, and got this error. Not sure if I should report over there.

Alert: Could not install AltStore.ipa to unknown.
    filesystem error: directory iterator cannot open directory: No such file or directory [C:\ProgramData\Apple Computer\iTunes\adi]
    ```

@powenn
Copy link
Owner

powenn commented Oct 22, 2023

What's your AltStore version and iOS version ?

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

I'm on iOS 16 on an iPhone 8, and I'm trying to install altstore right now. I just found an issue on the AltServer-Linux repo that seems relevant. NyaMisty/AltServer-Linux#104

@pixlxip
Copy link
Author

pixlxip commented Oct 22, 2023

I tried the solution there, and, it worked!

@powenn powenn closed this as completed Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants