6LightningDock 0.4.0
By Olsro <olsroparadise@proton.me>
Enjoy this project? Support Olsro on Patreon: https://patreon.com/Olsro

A standalone Cydia package enabling audio and charging through the Apple A1717
Lightning dock on qualified ARM32 iOS 6 and iOS 7 builds. An active jailbreak
that grants kernel access is required. No computer, MobileSubstrate, companion
tweak or olsn0w dependency is required for normal operation.

This stable release preserves the exact helper and activation/removal scripts
from 0.4.0~beta2. Only release metadata and documentation have changed in the
package. Stability refers to the tested scope below, not every iOS 6/7 device.

Hardware validation (performed with the identical beta2 runtime):
- iPod touch 5 (iPod5,1), iOS 6.1.3 / 10B329: audio and charging on the first
  dock attachment after reboot; automatic activation independently verified.
- iPhone 5 (iPhone5,2), iOS 6.1.4 / 10B350: audio and charging on the first
  dock attachment after reboot; automatic activation independently verified.
- iPhone 5 (iPhone5,2), iOS 7.1.2 / 11D257: audio and charging on the first
  dock attachment after reboot; automatic activation independently verified.
- iPad mini 1 (iPad2,5), iOS 7.1.2 / 11D257: audio and charging confirmed by
  the user, including after reboot. Installation and activation were checked;
  no independent post-reboot audio/power capture was taken on this iPad.

The profile catalog covers 137 exact ARM32 machine/build pairs and ten driver
families. Other profiles have code/layout matching and emulation evidence,
not physical validation. ARM64 and unknown builds are refused. This package
does not support every device capable of running iOS 6 or 7.

Package identifier: fr.olsro.6lightningdock
This package conflicts with and replaces fr.lightningdocklegacy.routebridge.
Keep the device undocked during the transition: the old package must stop its
service and restore the patch before removal. Internal helper names and the
launch daemon label remain unchanged.

Installation and use:
1. Remove the device from the dock before installing or upgrading the package.
2. Install the .deb through your package manager and let configuration finish.
3. Allow startup preparation to complete, then attach the powered dock with
   headphones or speakers connected to its jack.

The installed service preloads Apple's driver and prepares the patch before
the first dock attachment after reboot. If the device boots already docked,
or attaches before preparation finishes, activation waits for detachment.
Remove and reconnect it in that case. Kernel access must be available from
the jailbreak at startup. Failed service runs retry with a 30-second throttle.

Known limitations:
- EarPods remote buttons through the dock are not supported by this release.
  They failed in the iPhone/iOS 7 test while working directly in its jack.
  This does not prevent the confirmed dock audio playback.
- Microphone, sleep/wake and long-duration endurance remain unverified.
- Jack reconnection was tested on the iPod/iOS 6 and iPhone/iOS 7 paths.
  It has not been separately validated on every tested device/build.
- Booting already docked does not guarantee immediate activation.
- Other physical accessories have not been tested.

If installation reports "service not registered" or a launchctl socket error,
keep the device undocked, reboot and retry package configuration in Cydia.
As root, the equivalent recovery command is:
  dpkg --configure fr.olsro.6lightningdock
This recovery was required on the tested iOS 6 installations. The package
reports the failure rather than treating an unregistered service as success.

Removal and maintenance:
Detach the device before removal or upgrade. The package stops its daemon,
restores the selected patch and verifies memory protections before deleting
the helper. If restoration fails, removal is refused; detach and retry.
After reboot, an unloaded driver needs no restoration. Removing the package
prevents activation at subsequent boots. Never restore using an old prototype.

Optional root commands:
  6ld-routebridge --check
  6ld-service stop
  6ld-routebridge --restore
  6ld-service start
Stop a waiting daemon before manual diagnostics because it owns the lock.
Check counts depend on the profile: 140/140 for the tested iPod, 135/135 for
its tested iOS 6 iPhone counterpart, and 63/63 for the tested iOS 7 devices.
Zero modified instructions means original code. Do not reuse kernel addresses
from another boot. Logs: /var/log/6ld-routebridge.log.

The helper verifies the exact machine/build, kernel and driver UUIDs, complete
driver code, instruction contexts and page mappings before writing. Only the
tested dock's full 16-byte OTP selects the compatibility path. Other signatures
follow Apple's paths. The patch is memory-only: no kernelcache or jailbreak
files are changed. Preloading uses a temporary, non-instantiable personality;
its removal must succeed before patching. Apple's personalities are preserved.
