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

Seperated iOS and macOS #68

Merged
merged 1 commit into from
May 17, 2021
Merged

Seperated iOS and macOS #68

merged 1 commit into from
May 17, 2021

Conversation

Torrekie
Copy link
Contributor

iOS and macOS both returns "Darwin" when reading uname, so when running on iOS it outputs like that:

iPhone:~/proj/afetch mobile$ ./afetch 
ls: cannot access '/usr/local/Cellar/*': No such file or directory
          .:'          USER mobile
      __ :'__            OS macOS 14.2
   .'`__`-'__``.     KERNEL 20.1.0
  :__________.-'     UPTIME 1h 3m
  :_________:         SHELL sh
   :_________`-;       PKGS 0
    `.__.-.__.' 

For a jailbroken iOS device, APT is the default package manager, so I replaced getPkgCont to the same one that Debian/Ubuntu uses.
This pr fixes the issue and it will work properly on iOS devices.

iPhone:~/proj/afetch mobile$ ./afetch
          .:'          USER mobile
      __ :'__            OS iOS 14.2
   .'`__`-'__``.     KERNEL 20.1.0
  :__________.-'     UPTIME 1h 47m
  :_________:         SHELL sh
   :_________`-;       PKGS 675
    `.__.-.__.' 

@13-CF
Copy link
Owner

13-CF commented May 17, 2021

This looks quite interesting, I tried compiling it when I my iPhone was jailbroken but I couldn't get it to work.

Did you have to install a package that includes the header files (and the C compiler)?

@Torrekie
Copy link
Contributor Author

Torrekie commented May 17, 2021

This looks quite interesting, I tried compiling it when I my iPhone was jailbroken but I couldn't get it to work.

Did you have to install a package that includes the header files (and the C compiler)?

I poured all the contents from an iPhoneOS sdk to the corresponding path in /usr so I could compile C/Cpp/ObjC codes on my device.
And yes, C compilers can be found in Elucubratus or Procursus depending on which jailbreak tool are using

@13-CF
Copy link
Owner

13-CF commented May 17, 2021

This looks quite interesting, I tried compiling it when I my iPhone was jailbroken but I couldn't get it to work.

Did you have to install a package that includes the header files (and the C compiler)?

I poured all the contents from an iPhoneOS sdk to the corresponding path in /usr so I could compile C/Cpp/ObjC codes on my device.

And yes, C compilers can be found in Elucubratus or Procursus depending on which jailbreak tool are using

Cool, that's good to know for if I ever jailbreak my phone again. Thanks!

@13-CF 13-CF merged commit 1c12283 into 13-CF:master May 17, 2021
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

Successfully merging this pull request may close these issues.

2 participants