coolstar / electra

Electra iOS 11.0 - 11.1.2 jailbreak toolkit based on async_awake
GNU General Public License v3.0
655 stars 163 forks source link

Injected Tweaks don't have permissions to Injected App's Sandbox directory ie. /Documents #264

Open ghost opened 6 years ago

ghost commented 6 years ago

Yalu works. Electra doesn't due to sandbox restrictions however injected tweaks should have access to the containerid of the app it is injected into.

Coolstar should be able to fix in like 5 minutes because he is a superstar.

jakeajames commented 6 years ago

Injected tweaks run with the same permissions as the app itself so they can

ghost commented 6 years ago

This is not true. Attempt to write a file to the root Data folder where Documents folders exists, regular app can write here, Tweak cannot.

jakeajames commented 6 years ago

As long as the tweak is injected to that specific app, the code will be ran by that app so yea it will work.

Il lunedì 3 settembre 2018, ElliotRobot notifications@github.com ha scritto:

This is not true. Attempt to write a file to the root Data folder where Documents folders exists, regular app can write here, Tweak cannot.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/coolstar/electra/issues/264#issuecomment-418109659, or mute the thread https://github.com/notifications/unsubscribe-auth/ATtX-SZlFrtik8DMO_93M0usSUsKGQ16ks5uXSjzgaJpZM4WND9B .

lubbo commented 5 years ago

I can confirm that Tweaks cannot write files neither in the App sandbox. From iOS11. In iOS 10 works. I've tried writing in Document and ApplicationSupport directories. I definitely need a way to write files... I've tried all my bullets...

jakeajames commented 5 years ago

@lubbo i'm sure you're doing it wrong. Tweaks can do whatever the process they're injected to can do. Period.

lubbo commented 5 years ago

@ElliotRobot20 have you fixed the problem or are you still unable to write on Documents dir?

jakeajames commented 5 years ago

@lubbo @ElliotRobot20 bruh i wrote this in 5 minutes and it works fine. Stop saying it doesn't work. You're doing it wrong.

[@"TEST" writeToFile:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/TESTFILE.txt"] atomically:YES];

ghost commented 5 years ago

write to ROOT NSHomeDirectory() not within the documents folder.... It's the same problem I have if i enable mobile permissions on the Info.plist in App bundle root, you still cannot modify the file from the tweak as your restricted by initial read-only sandbox. @jakeajames

jakeajames commented 5 years ago

If a normal app can't do it, a tweak can't do it either. Electra does not have big sandbox patches like previous jailbreaks

Il giorno lunedì 10 dicembre 2018, ElliotRobot notifications@github.com ha scritto:

write to ROOT NSHomeDirectory() not within the documents folder.... It's the same problem I have if i enable mobile permissions on the Info.plist in App bundle root, you still cannot modify the file from the tweak as your restricted by initial read-only sandbox.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/coolstar/electra/issues/264#issuecomment-445935282, or mute the thread https://github.com/notifications/unsubscribe-auth/ATtX-Zi0vp-hkY4xljLvsHuTuvL3DcYWks5u3rH5gaJpZM4WND9B .