Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
4b5e83e
Create mandatory LC+ host Increased Memory Limit request for signed i…
CORBENDALLAS111 Nov 18, 2026
84373b9
Request Increased Memory Limit for LC+ itself in integrated IPA packa…
CORBENDALLAS111 Nov 18, 2026
d837d55
Rebind host memory request to final signed bundle ID and preserve cap…
CORBENDALLAS111 Nov 18, 2026
849b290
Show actual installed LC+ process Increased Memory Limit entitlement …
CORBENDALLAS111 Nov 18, 2026
4c18d25
Localize actual LC+ host Extra Memory signing status and reinstall gu…
CORBENDALLAS111 Nov 18, 2026
c6def20
Expose verified LC+ Extra Memory status directly in Settings with sig…
CORBENDALLAS111 Nov 18, 2026
1a06581
Test real LC+ host memory request, signed-entitlement declaration and…
CORBENDALLAS111 Nov 18, 2026
90c4c51
Fail integrated IPA verification if LC+ host Extra Memory request is …
CORBENDALLAS111 Nov 18, 2026
d38ca9b
Test that integrated LC+ IPA contains correctly bound host memory req…
CORBENDALLAS111 Nov 18, 2026
cb0c1dd
Run host Extra Memory build-marker and SideStore signing tests on eve…
CORBENDALLAS111 Nov 18, 2026
37b33de
Document host-only Extra Memory request, real installed status and sa…
CORBENDALLAS111 Nov 18, 2026
0468073
Produce separate host Extra Memory IPA while keeping standard LC+ int…
CORBENDALLAS111 Nov 18, 2026
dba00f9
Verify distinct standard and Extra Memory IPA variants without confus…
CORBENDALLAS111 Nov 18, 2026
eddc089
Build and separately verify standard LC+ IPA and host Extra Memory LC…
CORBENDALLAS111 Nov 18, 2026
b5ce14c
Document separate LC+ Extra Memory IPA instead of altering standard i…
CORBENDALLAS111 Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/build_github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,13 @@ find Payload -type d -name "_CodeSignature" -exec rm -r {} +

ldid -S.github/sidelc/LiveWidgetExtension_adhoc.xml ./Payload/LiveContainer.app/PlugIns/LiveWidgetExtension.appex/LiveWidgetExtension

# package
# Preserve the usual integrated build for Apple accounts that cannot
# obtain the Increased Memory Limit entitlement.
zip -r "$scheme+SideStore.ipa" "Payload" -x "._*" -x ".DS_Store" -x "__MACOSX"

# A separate *host* Extra Memory variant. SideStore must use its Apple
# Developer Portal session to enable the capability, verify the downloaded
# profile, and sign the LC+ main process with the granted entitlement.
# This marker is in the extra variant ONLY, not the normal integrated IPA.
python3 scripts/prepare_host_memory_request.py ./Payload/LiveContainer.app --entitlements entitlements.xml
zip -r "$scheme+SideStore-ExtraMemory.ipa" "Payload" -x "._*" -x ".DS_Store" -x "__MACOSX"
13 changes: 10 additions & 3 deletions .github/workflows/increased-memory-preflight.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Increased Memory Limit - Signing Preflight
on:
push:
branches: ['feature/sidestore-advanced-increased-memory']
branches: ['feature/sidestore-advanced-increased-memory', 'feature/lcplus-host-extra-memory']
pull_request:
paths:
- 'scripts/prepare_sidestore_source.py'
Expand All @@ -21,7 +21,9 @@ jobs:
- name: Test fail-closed signer overlay
run: |
python3 -m unittest discover -s Tests -p 'test_increased_memory_signer.py' -v
python3 -m py_compile scripts/prepare_sidestore_source.py scripts/patch_sidestore_memory_signer.py scripts/verify_sidestore_source.py
python3 -m unittest discover -s Tests -p 'test_host_memory_request.py' -v
python3 -m unittest discover -s Tests -p 'test_verify_ipa.py' -v
python3 -m py_compile scripts/prepare_host_memory_request.py scripts/verify_ipa.py scripts/prepare_sidestore_source.py scripts/patch_sidestore_memory_signer.py scripts/verify_sidestore_source.py
- uses: actions/checkout@v4
with:
repository: LiveContainer/SideStore
Expand All @@ -44,5 +46,10 @@ jobs:
assert '!(key == memoryKey && increasedMemoryRequested)' in sign
assert 'profile.entitlements[.increasedMemoryLimit] as? Bool == true' in profile
assert 'targetFeatures[.increasedMemoryLimit] = "true"' in profile
print('Pinned signer and Apple portal preflight are wired; no Apple account used.')
assert 'entitlements[ALTEntitlement.increasedMemoryLimit.rawValue] as? Bool == true' in profile
resign=(root/'SideStore/Core/Operations/PipelineOperations/ResignAppOperation.swift').read_text()
assert 'lcosMemoryRequested' in resign
assert 'SigningIncreasedMemory.writeRequest' in resign
assert 'prepared.bundleIdentifier' in resign
print('Host memory request is rebound to final app ID and retained across refreshes. No Apple account used.')
PY
6 changes: 5 additions & 1 deletion .github/workflows/livecontainer-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ jobs:
- name: Verify integrated IPA and record provenance
run: |
mv LiveContainer+SideStore.ipa LifeContainer+SideStore.ipa
mv LiveContainer+SideStore-ExtraMemory.ipa LifeContainer+SideStore-ExtraMemory.ipa
mv LiveContainer.ipa LifeContainer+-Standalone.ipa
python3 scripts/verify_ipa.py LifeContainer+SideStore.ipa --integrated --signing-injection --automations --builtin-jit --source-commit "$GITHUB_SHA" --output build-evidence.json
shasum -a 256 LifeContainer+SideStore.ipa LifeContainer+-Standalone.ipa > SHA256SUMS
python3 scripts/verify_ipa.py LifeContainer+SideStore-ExtraMemory.ipa --integrated --signing-injection --automations --builtin-jit --host-memory-request --source-commit "$GITHUB_SHA" --output build-evidence-extra-memory.json
shasum -a 256 LifeContainer+SideStore.ipa LifeContainer+SideStore-ExtraMemory.ipa LifeContainer+-Standalone.ipa > SHA256SUMS
git rev-parse HEAD > SOURCE_COMMIT
git submodule status > SUBMODULES
printenv SIDESTORE_BUILD_RUN > SIDESTORE_BUILD_RUN
Expand All @@ -89,11 +91,13 @@ jobs:
name: LifeContainer+SideStore.ipa
path: |
LifeContainer+SideStore.ipa
LifeContainer+SideStore-ExtraMemory.ipa
SHA256SUMS
SOURCE_COMMIT
SUBMODULES
SIDESTORE_BUILD_RUN
build-evidence.json
build-evidence-extra-memory.json
artifacts/signing-bridge/signing-bridge-evidence.json
artifacts/sidestore-source/SIDESTORE_SOURCE.json
artifacts/device-probe/LCOSProbe.ipa
Expand Down
32 changes: 32 additions & 0 deletions Integrations/SideStore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,35 @@ App Groups entitlement even when a profile contains it. The result is the purple
not start” screen. Both the source IPA and final integrated IPA now reject a missing declaration.
This check does not grant entitlements: the final device installation still needs a valid provisioning
profile granting the shared app group.


## Extra Memory for the LC+ host (not just guest IPA installs)

The dedicated **`LifeContainer+SideStore-ExtraMemory.ipa`** now carries a
validated `LCOSIncreasedMemoryRequest.plist` for the **main
`LiveContainer.app`**. The ordinary `LifeContainer+SideStore.ipa` and
standalone build remain unchanged and do not request the capability, so
Apple accounts without Increased Memory permission can still install LC+.

This marker is **not an entitlement**. When LC+ itself is signed through the
updated embedded SideStore/SideSign pipeline (PR #9 and the host follow-up),
SideStore requests the Increased Memory Limit capability on the actual Apple
App ID, verifies the returned provisioning profile, and SideSign signs
`com.apple.developer.kernel.increased-memory-limit` only if Apple granted it.
The request is rebound to the final signed bundle identifier and consumed
before signing. Later refreshes preserve an already authorized capability.

To verify an installed device: open **LC+ → Settings → Extra Memory · LC+**.
This reads the real `SecTaskCopyValueForEntitlement` value of LC+'s running
process. `Yes` means the installed host has the entitlement; `No` means it
does not. This does **not** guarantee a specific amount of memory on a device.

Important: existing installed copies cannot gain extra memory by updating an
IPA setting or installing a guest app. Re-sign/reinstall **the host itself**
with the appropriate authorized Apple account and a profile granting the
capability. Preserve the existing bundle identity where possible and **back
up LC+ user containers before any replacement**, especially if the installer
proposes deleting the previous app. Apple's portal can refuse the capability;
then the signing flow must fail visibly rather than silently install LC+
without the entitlement. Other sideloading services that ignore the marker
cannot be treated as supporting this automatic request.
22 changes: 22 additions & 0 deletions LiveContainerSwiftUI/Views/Settings/LCJITLessDiagnoseView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ struct LCEntitlementView : View {
@State var isLiveProcess: Bool
@State var loaded = false
@State var entitlementReadSuccess = false
@State private var hostIncreasedMemory: Bool? = nil

@State var teamId : String?
@State var getTaskAllow = false
Expand Down Expand Up @@ -54,6 +55,17 @@ struct LCEntitlementView : View {
Text(getTaskAllow ? "lc.common.yes".loc : "lc.common.no".loc)
.foregroundStyle(getTaskAllow ? .green : .red)
}
if !isLiveProcess {
HStack {
Text("lcos.memory.hostStatus".loc)
Spacer()
Text(hostIncreasedMemory == true ? "lc.common.yes".loc : "lc.common.no".loc)
.foregroundStyle(hostIncreasedMemory == true ? .green : .red)
}
Text("lcos.memory.hostStatusHelp".loc)
.font(.footnote)
.foregroundStyle(.secondary)
}
HStack {
Text("com.apple.security.application-groups \("lc.common.correct".loc)")
Spacer()
Expand Down Expand Up @@ -154,6 +166,16 @@ struct LCEntitlementView : View {
}

getTaskAllow = entitlementDict["get-task-allow"] as? Bool ?? false
if !isLiveProcess {
// Read the *running LC+ process*, not a build-time XML declaration
// or a guest IPA. Only Apple's installed code signature can grant
// the kernel entitlement used by apps executing in this process.
let task = SecTaskCreateFromSelf(nil)
hostIncreasedMemory =
(SecTaskCopyValueForEntitlement(task,
"com.apple.developer.kernel.increased-memory-limit" as CFString,
nil)?.takeRetainedValue() as? Bool) == true
}

}

Expand Down
23 changes: 23 additions & 0 deletions LiveContainerSwiftUI/Views/Settings/LCSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ struct LCSettingsView: View {
@State private var isViewAppeared = false

let storeName = LCUtils.getStoreName()

private var hostExtraMemoryEntitled: Bool {
let task = SecTaskCreateFromSelf(nil)
return (SecTaskCopyValueForEntitlement(task,
"com.apple.developer.kernel.increased-memory-limit" as CFString,
nil)?.takeRetainedValue() as? Bool) == true
}

init() {
_certificateDataFound = State(initialValue: LCSharedUtils.certificatePassword() != nil)
Expand All @@ -92,6 +99,22 @@ struct LCSettingsView: View {
Label("lcos.logs.title".loc, systemImage: "waveform.path.ecg")
}
}
Section {
NavigationLink {
LCEntitlementView(isLiveProcess: false)
} label: {
HStack(spacing: 12) {
Label("lcos.memory.title".loc, systemImage: "memorychip")
Spacer()
Text(hostExtraMemoryEntitled
? "lc.common.yes".loc : "lc.common.no".loc)
.font(.subheadline)
.foregroundStyle(hostExtraMemoryEntitled ? Color.green : Color.secondary)
}
}
} footer: {
Text("lcos.memory.signingHelp".loc)
}
if sharedModel.multiLCStatus != 2 {
Section{
if !certificateDataFound {
Expand Down
4 changes: 4 additions & 0 deletions Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"sourceLanguage" : "en",
"strings" : {
"lcos.memory.hostStatus" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"LC+ Extra Memory"}},"ru":{"stringUnit":{"state":"translated","value":"Extra Memory для LC+"}}}},
"lcos.memory.hostStatusHelp" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"This status reads the entitlement in the installed LC+ process, not the IPA or Developer Portal. Signing LC+ with an Apple-granted profile and reinstalling it are required."}},"ru":{"stringUnit":{"state":"translated","value":"Статус проверяет право запущенного процесса LC+, а не IPA или Apple Developer Portal. Нужно подписать LC+ профилем с разрешением Apple и переустановить."}}}},
"lcos.memory.title" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"Extra Memory · LC+"}},"ru":{"stringUnit":{"state":"translated","value":"Extra Memory · LC+"}}}},
"lcos.memory.signingHelp" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"For guest apps inside LC+, Extra Memory must be granted to the LC+ host. If the status is No, sign and reinstall LC+ with Increased Memory Limit enabled for its App ID."}},"ru":{"stringUnit":{"state":"translated","value":"Для гостевых приложений внутри LC+ право Extra Memory должно быть у основного приложения LC+. Если статус «Нет», подпишите и переустановите LC+ с Increased Memory Limit для его App ID."}}}},
"lcos.install.increasedMemory" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"Increased Memory Limit"}},"ru":{"stringUnit":{"state":"translated","value":"Увеличенный лимит памяти"}}}},
"lcos.install.increasedMemorySubtitle" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"Request additional app memory from Apple when signing"}},"ru":{"stringUnit":{"state":"translated","value":"Запросить дополнительную память через Apple при подписи"}}}},
"lcos.install.increasedMemoryHelp" : {"extractionState":"manual","localizations":{"en":{"stringUnit":{"state":"translated","value":"Requires an Apple-granted capability and a provisioning profile that contains the entitlement. Only applies after SideStore signs and reinstalls the app. Not all Apple accounts or devices are supported."}},"ru":{"stringUnit":{"state":"translated","value":"Нужны разрешённая Apple возможность App ID и профиль подписи с соответствующим правом. Действует только после подписи и переустановки через SideStore. Поддерживается не всеми аккаунтами и устройствами."}}}},
Expand Down
64 changes: 64 additions & 0 deletions Tests/test_host_memory_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
"""LC+ host-only Extra Memory preparation: no Apple login or signing in these tests."""
import pathlib
import plistlib
import sys
import tempfile
import unittest

sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1] / "scripts"))
from prepare_host_memory_request import prepare_host, MARKER, ENTITLEMENT


class HostExtraMemoryRequestTests(unittest.TestCase):
def setUp(self):
self.temporary = tempfile.TemporaryDirectory()
self.addCleanup(self.temporary.cleanup)
root = pathlib.Path(self.temporary.name)
self.app = root / "Payload" / "LiveContainer.app"
self.app.mkdir(parents=True)
self.app.joinpath("LiveContainer").write_bytes(b"test executable")
self.app.joinpath("Info.plist").write_bytes(plistlib.dumps({
"CFBundleIdentifier": "com.kdt.livecontainer",
"CFBundleExecutable": "LiveContainer",
}))
self.entitlements = root / "entitlements.xml"
self.entitlements.write_bytes(plistlib.dumps({ENTITLEMENT: True}))

def test_host_request_matches_real_bundle(self):
evidence = prepare_host(self.app, self.entitlements)
payload = plistlib.loads((self.app / MARKER).read_bytes())
self.assertEqual(payload, {
"schema": 1, "requested": True,
"bundleIdentifier": "com.kdt.livecontainer",
})
self.assertEqual(evidence["bundle"], payload["bundleIdentifier"])
self.assertFalse(evidence["apple_profile_granted"])
self.assertFalse(evidence["installed_signature_verified"])

def test_declared_entitlement_is_required(self):
self.entitlements.write_bytes(plistlib.dumps({}))
with self.assertRaisesRegex(ValueError, "host entitlement"):
prepare_host(self.app, self.entitlements)
self.assertFalse((self.app / MARKER).exists())

def test_does_not_write_to_wrong_host(self):
self.app.joinpath("Info.plist").write_bytes(plistlib.dumps({
"CFBundleIdentifier": "com.example.other",
"CFBundleExecutable": "OtherApp",
}))
with self.assertRaisesRegex(ValueError, "real LC"):
prepare_host(self.app, self.entitlements)
self.assertFalse((self.app / MARKER).exists())

def test_rejects_malformed_bundle_identifier(self):
self.app.joinpath("Info.plist").write_bytes(plistlib.dumps({
"CFBundleIdentifier": "../escape",
"CFBundleExecutable": "LiveContainer",
}))
with self.assertRaisesRegex(ValueError, "bundle identifier"):
prepare_host(self.app, self.entitlements)
self.assertFalse((self.app / MARKER).exists())


if __name__ == "__main__":
unittest.main()
23 changes: 22 additions & 1 deletion Tests/test_verify_ipa.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import zipfile

sys.path.insert(0, str(pathlib.Path(__file__).parents[1] / 'scripts'))
from verify_ipa import verify_frameworks
from verify_ipa import verify_frameworks, verify_host_memory_request


class EmbeddedFrameworkTests(unittest.TestCase):
Expand All @@ -26,6 +26,27 @@ def framework(self, folder, **overrides):
return {folder + 'Info.plist': plistlib.dumps(info),
folder + 'Runtime': bytes.fromhex('cffaedfe')}

def test_integrated_host_request_is_real_lc_app_not_guest(self):
root = 'Payload/LiveContainer.app/'
info = {'CFBundleIdentifier': 'com.kdt.livecontainer'}
marker = root + 'LCOSIncreasedMemoryRequest.plist'
payload = {'schema': 1, 'requested': True,
'bundleIdentifier': 'com.kdt.livecontainer'}
with self.archive({marker: plistlib.dumps(payload)}) as archive:
report = verify_host_memory_request(archive, root, info)
self.assertTrue(report['host_requested'])
self.assertFalse(report['apple_profile_granted'])
self.assertFalse(report['installed_memory_entitlement_verified'])

with self.archive({}) as archive:
with self.assertRaisesRegex(ValueError, 'host lacks Increased'):
verify_host_memory_request(archive, root, info)

payload['bundleIdentifier'] = 'com.example.guest'
with self.archive({marker: plistlib.dumps(payload)}) as archive:
with self.assertRaisesRegex(ValueError, 'does not match'):
verify_host_memory_request(archive, root, info)

def test_missing_stikjit_plist_reproduces_install_failure(self):
folder = 'Payload/App.app/Frameworks/StikJIT.framework/'
with self.archive({folder + 'StikJIT': bytes.fromhex('cffaedfe')}) as archive:
Expand Down
Loading
Loading