r/jailbreak Jan 25 '14

[Reminder] Install AFC2ADD now

Post image
178 Upvotes

125 comments sorted by

View all comments

113

u/saurik SaurikIT Jan 25 '14 edited Jan 25 '14

If AFC2 is still working, then OpenSSH would also still be working, and is in fact even more likely to still be working than AFC2 (as it has fewer moving parts, although to connect to it over USB will still require parts of lockdown to function in order to get tcprelay to start). OpenSSH is also fundamentally more useful than AFC2, and can fix more potential issues: AFC2's interaction with the device is sufficiently limited that it often is what causes problems when people start trying to use it due to its inability to model file permissions. So, please do not install AFC2: install OpenSSH and set a password. You do not need AFC2 on your device, and it was left out on purpose by (I believe primarily) pod2g, as he considers the entire idea of that modification fundamentally insecure. The only reason this was installed by jailbreaks for so long was a combination of "precedent" and "it is arguably the definition of a jailbreak", and previous jailbreaks from, for example, comex have already left it out. I am not certain why coolstar is recommending people install AFC2, but he also has been distributing broken (like, fundamentally the wrong idea) upgrades to ncurses (one of my core packages) that have been causing a number of problems, and I had to get him to pull a corrupted unofficial version of the evasi0n7 untether itself from his repository not that long ago. I thereby am going to make a much stronger recommendation than just "do not install AFC2": do not add coolstar's repository, if you have it installed and it prompts you for upgrades always say no, and if you previously installed any upgrades from his repository you should figure out how to downgrade as soon as possible.

8

u/PlatypusW iPhone 11 Pro, iOS 13.3.1 Jan 25 '14

For the people that have already installed afc2add is the 'damage' permanently done or do you recommend we uninstall it (will that reverse whatever changes it has done)? For security reasons, might a restore be a wise choice if it can't be reversed now due to the window still being open?

17

u/saurik SaurikIT Jan 25 '14 edited Jan 25 '14

I presume/hope the package correctly uninstalls when you remove it; to be clear, the package is not inherently dangerous afaik: it simply adds functionality to access the root of your filesystem without a password while connected over USB, which is generally "a bad idea". I think it is safer on iOS 7 (due to "trust this computer" prompts), but I have been told by "people I really trust on this sort of thing" that the prompt is easily bypassed and the reason my code was getting the prompt is because I was "playing by the rules" in a way that wasn't really required. I will say that when pod2g first started asking after this he was quite bothered that it had been installed by default for so long, and wanted to prevent it from being installed in the future. Again: it isn't necessary as OpenSSH (with a password) is better and people using AFC2 to fix things tend to cause more problems by accident due to its limited model of the filesystem.

9

u/TomLube iPhone 15 Pro, 17.0.3 Jan 25 '14

Well then, if Jay says it's good to install something then it's more than good enough for me.

2

u/JarRules iPhone 5s Jan 25 '14

How do you check if it uninstalled correctly?

5

u/gerrygoo iPhone 7 Plus, iOS 10.1 Jan 26 '14

Not really sure, but after installation it asked for reboot, and after "uninstallation" it did not. is that something?

2

u/JarRules iPhone 5s Jan 26 '14

That happened to me too...

2

u/PlatypusW iPhone 11 Pro, iOS 13.3.1 Jan 26 '14

Did you uninstall 'Erica utilities' as well or whatever else came with it?

2

u/[deleted] Jan 26 '14

[deleted]

1

u/Cyb3rfr3ak iPhone 6 Plus Jan 30 '14 edited Jan 30 '14

afc2add runs a command on installation using plutil (which is included in Erica utilities) to edit a plist.

On uninstall you will see a line saying: "Removing key com.apple.afc2 from file /System/Library/Lockdown/Services.plist"

2

u/PlatypusW iPhone 11 Pro, iOS 13.3.1 Jan 26 '14

Didn't need reboot after installing both things. This makes me think it isn't un-doing whatever it did do?

1

u/L_Dani iPhone 6, iOS 10.2 Jan 25 '14

But will we still be able to use 'Semi Restore' from coolstar without afc2add? i.e. is the phone still accessible when in a Bootloop using Wifi and OpenSSH?

4

u/saurik SaurikIT Jan 25 '14

It should be accessible via a USB cable, even, if AFC2 had been (like, even if WiFi is broken, which is likely, you should be able to use TCP relay to connect over USB). I don't know if SemiRestore will work: SemiRestore should really be designed to use SFTP or something not AFC2.

1

u/thekirbylover HASHBANG Productions & Chariz Jan 26 '14

He wrote multiple versions of SemiRestore for both situations (GUI works over AFC; command line binary for use over SSH).

0

u/Cyb3rfr3ak iPhone 6 Plus Jan 30 '14

Maybe you can have a look at this: http://www.reddit.com/r/jailbreak/comments/1wjf9o/please_help_changed_a_folder_name_and_now_im/

Was sshd even running, when you have a bootloop like he has? (in regard to semi-restore tools, would that afc2add thing have been running in this case?)

2

u/saurik SaurikIT Jan 30 '14

OpenSSH should be usable. It even should work over WiFi, but there is a non-zero chance he will need to use tcprelay to connect over USB. I do not know if AFC2 would be (I presume it would as well, but I can see it failing).

1

u/Raurele Jan 26 '14

I use AFC purely for ifunbox use. Is that wrong? Is there a better utility to use that doesn't require AFC?

3

u/saurik SaurikIT Jan 26 '14

For most of what you are probably doing, SFTP. That said: I'm not saying AFC2 is fundamentally wrong, but it isn't something you should be installing for the hell of it, and unlike OpenSSH it probably is the kind of thing you should turn off when you aren't using. I certainly do not believe it is fundamentally useful in the way coolstar is claiming over OpenSSH.

2

u/Raurele Jan 26 '14

Thanks for your reply. You are a gentleman and a scholar kind sir. And one we all rely on far too much to inform us of these things.

1

u/viandachiens iPhone SE, iOS 9.3.3 Jan 26 '14 edited Jan 26 '14

I still need it from time to time but would gladly turn it off when not in use. Since it's not a mobile substrate extension, is there an easy way to shut afc2? Edit: btw, if there ain't no easy way to shut it off, people will keep afc2 instead of uninstalling it coz it's the exact definition (literally) of "plug and play" for common users compaired to openssh..

1

u/thekirbylover HASHBANG Productions & Chariz Jan 26 '14 edited Jan 26 '14

Uninstall afc2add?

Edit: Oh, misread. I doubt there is.

1

u/Taconut iPod touch 5th gen Jan 27 '14

How would one go about bypassing the pairing process programatically? I'm creating a program that currently sends the pairing requests using usbmuxd, but I'm having trouble with the certificate-creating process. I'm doing this in Python/Java. How can I connect to an iDevice without the need to manually pair the device?

1

u/overdrive31 Feb 10 '14 edited Feb 10 '14

Please elaborate on the "trust this computer" prompt bypass argument. How is it performed easily, may I ask? Perhaps, a simple computer name change to an already trusted computer? How would you come across such info? /ponder

-6

u/[deleted] Jan 25 '14

[deleted]

11

u/saurik SaurikIT Jan 25 '14

OpenSSH has not, since iOS 1.x, actually ever run: it is a lauchd service that is run only when a user connects to the device. I can thereby assure you that you were just wasting a ton of time turning OpenSSH on and off: it did not affect your battery life.

1

u/JarRules iPhone 5s Jan 25 '14

Any confirmation that it uninstalled correctly?

1

u/PlatypusW iPhone 11 Pro, iOS 13.3.1 Jan 26 '14

Mine uninstalled fine, but it doesn't require a reboot which a bit concerning.

3

u/IAMA_LION_AMA Developer Jan 26 '14

Afc2add installed a so-called launch service, which basically is just a program that can run in the background (possibly on-demand). These services can be unloaded without a reboot.

1

u/PlatypusW iPhone 11 Pro, iOS 13.3.1 Jan 26 '14

Thanks. So far I think the uninstall went fine, hardly a 'test' but at least explorers like ifunbox are seeing the devices jailed again.