jakeajames / rootlessJB3

hahh
362 stars 135 forks source link

Shared data for installed apps... #35

Open WeedyWeedSmoker opened 5 years ago

WeedyWeedSmoker commented 5 years ago

All the apps installed to "/var/containers/Bundle/tweaksupport/Applications/" share rootlessJB's Bundle Identifier for their data, so all the installed apps store data in the same place, rootlessJB's Data folder...

Is it expected ?

jakeajames commented 5 years ago

How did you test this?

WeedyWeedSmoker commented 5 years ago

I couldn't manage to open Filza consistently on my iPad Pro 2 (12.1.1, GeoFilza didn't open on it, Tigi Software's fork of rootlessJB breaks their own Filza and App Manager (maybe because of this very bug), and AppleDry05's version of Filza works 1 time out of 30 restarts on the iPad Pro 2 (A11X CPU)...

SFTP would be great, too, for this situation without Filza...

So I modified rootlessJB3 with these modifs for installing emulators on it after adding correct entitlements to their binaries, dylib's and Frameworks, and putting them in "rootlessJB/apps" :

ViewController.m :

if ([self.installiSuperSU isOn]) {
            LOG("[*] Installing iSuperSU + Emus");

            removeFile("/var/containers/Bundle/tweaksupport/Applications/iSuperSU.app");
            copyFile(in_bundle("apps/iSuperSU.app"), "/var/containers/Bundle/tweaksupport/Applications/iSuperSU.app");
            removeFile("/var/containers/Bundle/tweaksupport/Applications/BasiliskII.app");
            copyFile(in_bundle("apps/BasiliskII.app"), "/var/containers/Bundle/tweaksupport/Applications/BasiliskII.app");
            removeFile("/var/containers/Bundle/tweaksupport/Applications/iDOS.app");
            copyFile(in_bundle("apps/iDOS.app"), "/var/containers/Bundle/tweaksupport/Applications/iDOS.app");
            removeFile("/var/containers/Bundle/tweaksupport/Applications/MinivMac.app");
            copyFile(in_bundle("apps/MinivMac.app"), "/var/containers/Bundle/tweaksupport/Applications/MinivMac.app");
            removeFile("/var/containers/Bundle/tweaksupport/Applications/PPSSPP.app");
            copyFile(in_bundle("apps/PPSSPP.app"), "/var/containers/Bundle/tweaksupport/Applications/PPSSPP.app");
            removeFile("/var/containers/Bundle/tweaksupport/Applications/Provenance.app");
            copyFile(in_bundle("apps/Provenance.app"), "/var/containers/Bundle/tweaksupport/Applications/Provenance.app");
            removeFile("/var/containers/Bundle/tweaksupport/Applications/RetroArch.app");
            copyFile(in_bundle("apps/RetroArch.app"), "/var/containers/Bundle/tweaksupport/Applications/RetroArch.app");
            removeFile("/var/containers/Bundle/tweaksupport/Applications/ScummVM.app");
            copyFile(in_bundle("apps/ScummVM.app"), "/var/containers/Bundle/tweaksupport/Applications/ScummVM.app");
            removeFile("/var/containers/Bundle/tweaksupport/Applications/YabaSanshiro.app");
            copyFile(in_bundle("apps/YabaSanshiro.app"), "/var/containers/Bundle/tweaksupport/Applications/YabaSanshiro.app");

            failIf(system_("/var/containers/Bundle/tweaksupport/usr/local/bin/jtool --sign --inplace --ent /var/containers/Bundle/tweaksupport/Applications/iSuperSU.app/ent.xml /var/containers/Bundle/tweaksupport/Applications/iSuperSU.app/iSuperSU && /var/containers/Bundle/tweaksupport/usr/bin/inject /var/containers/Bundle/tweaksupport/Applications/iSuperSU.app/iSuperSU"), "[-] Failed to sign iSuperSU");

I know this is ugly and I should totally had better been compressing those to avoid corruption by Cydia Impactor (as everything was already signed, and had correct entitlements added...), or just including the entitlements for jtool and a command to add them on-device after, but the executable, dylibs, and Frameworks often had different entitlements, and I should have made a separate switch, but hey, I'm no dev here...

It works great this way though, but all the emulators share the same data (accessed via iExplorer, as I couldn't manage to get Filza working without going crazy after 20 restarts), stored in rootlessJB's App data...

Apps still launch in non jailbroken state, which is great, but I have yet to try removing rootlessJB app, as all their data is stored inside...

Edit : I removed the rootlessJB app, and upon launching an emulator, it re-creates a new shared data folder for all of them, still being detected as a rootlessJB data folder, even if rootlessJB itself is uninstalled...

I installed my modified rootlessJB by using Cydia Impactor with a free dev account, if that changes anything...

WeedyWeedSmoker commented 5 years ago

On a side note, I had to change the name of "Mini vMac.app" to "MinivMac.app" (removing the space), as /var/containers/Bundle/tweaksupport/usr/bin/uicache didn't want to install it otherwise (even if inside the bundle, the executable is still "Mini vMac" anyway (with a space)...

WeedyWeedSmoker commented 5 years ago

I guess it would be less relevant now that a remount has been implemented at least in unc0ver, but with the more stable new GeoFilza, I tried to install separately the exact same apps I've been injecting at jailbreak time, /var/containers/Bundle/tweaksupport/usr/bin/uicache installs them fine, but none of them launch...

(I extracted them from device from inside the Cydia Impactor installed rootlessJB, and put them in /var/containers/Bundle/tweaksupport/Applications/ as is, and tried with the versions I bundled with rootlessJB before Cydia Impactor too, in both cases they won't launch, or even leave a log upon trying to launch them...)