4.5 KiB
Philips/TPVision patch submission – TPM191E
Target: Philips 43PUS7394/12, TPM191E_R.211.000.103.000, Android TV 12/API
31. This submission contains functional reliability bugs only. Confidential
security material is deliberately excluded.
BUG-001 – EPG stale cleanup is a no-op
| Field | Detail |
|---|---|
| Affected binary | /system/priv-app/channels/channels.apk, SHA-256 3a44bc648624f0cc9cd9feb4cfc3fd33f41323597718e4fccfc25fe35504d34f |
| Exact target | classes4.dex, org.droidtv.channels.epg.bcepg.EpgProvider$deleteStaleDataRunnable.run()V, code_off=0xe298c |
| Root cause | Runnable computes/logs now-1800 (and optional -604800) but performs no delete/applyBatch/execSQL or call to existing time-delete routines |
| Proposed fix | normalize milliseconds to epoch seconds once; delete scheduletable entries older than 7 days using indexed predicates in transactions of at most 2,000 rows; schedule bounded periodic cleanup |
| Patch specification | patches/epg-stale-cleanup/PATCH.diff, IMPLEMENTATION.md, SMALI-PATCH.md |
| Full snapshot test | 1,742,053,376-byte DB; 3,063,863 stale rows deleted, 7,387 retained, 1,532 bounded transactions; result 4,059,136 bytes; integrity_check=ok |
| Idempotency | second run deletes zero rows and leaves identical counts/size |
| Real repair evidence | prior repair reclaimed 1,701,400 KiB on /data, 73%→39%; subsequent live EPG 59 Now/48 Next/1,041 Schedule and normal Guide/recording/timer/favorite behavior |
Required regression tests: 0/7/30-day boundaries, seconds/milliseconds inputs, clock change, duplicate run, concurrent EPG ingest/lock retry, abrupt power loss, channel rescan, standby wake, all tuner sources, favorites, recordings, reminders and no mutations outside EPG schedule rows.
BUG-002 – GEL WorkManager dependency history is unbounded
| Field | Detail |
|---|---|
| Affected binary | /system/app/gel/gel.apk, SHA-256 29a68e6b09700ed4ccdf312c0b99eee0c3f67e329a537fe87ed4341a71d383d7 |
| Exact target | classes.dex, GatheringService.onStartCommand, code_off=0x50bf0 |
| Root cause | unique name GEL_WORK uses policy integer 4 = APPEND_OR_REPLACE; each event extends a serial dependency history |
| Observed effect | WorkManager DB 229,453,824 bytes plus WAL/SHM; dependency traversal delays |
| Proposed fix | bounded persistent FIFO/outbox, coalesce only proven state events, one KEEP drain worker plus watchdog, acknowledge after dispatch; do not blindly switch to KEEP and lose intents |
| Patch specification | patches/gel-workmanager/PATCH.diff, ROOT-CAUSE.md, TEST-PLAN.md |
| Test evidence | 10,000 coalescible and 10,000 FIFO events pass with bounded queue, O(1) active WorkSpec and crash retry |
Required regression tests: ordering/loss/duplication across crash and reboot, network offline/online, queue cap/backpressure, WorkManager prune/upgrade, all intent classes and telemetry privacy/consent semantics.
BUG-003 – USB free capacity incorrectly reported as zero
| Field | Detail |
|---|---|
| Affected binary | /system/framework/tvfw.jar, SHA-256 a0061795d87cf76c9b739e32022ab3d8c29f47ed01ddc1eee189dd815a8d11ad |
| Exact target | classes.dex, UsbVolumeListerImpl.getVolumes(String), code_off=0x17b5e0, property branch PC 0x0133 |
| Root cause | size is assigned only when sys.mtk.dmremoteservice.ready == "1"; live property is empty while vendor.mtk.dmremoteservice.ready=0, so constructor default zero is returned as a real measurement |
| Proposed fix | accept DeviceManager KiB only when service-ready and total>0, 0<=free<=total; otherwise use StatFs(VolumeInfo.path).getAvailableBytes()/1048576 with long; keep inaccessible/racy path UNKNOWN, not zero |
| Patch specification | patches/usb-freesize/PATCH.diff, IMPLEMENTATION.md, SMALI-PATCH.md |
| Test evidence | ready/unready, valid/invalid DeviceManager, StatFs fallback, >2 TiB, genuine zero and unknown all pass offline |
Required device tests: public FAT/exFAT and adopted private ext4, mount/unmount/ reinsertion, permission denial/removal race, truly full media, >2 TiB arithmetic, UI/service consumers and class-loader/preopt compatibility.
Integration/signing request
All three APK targets share the Philips Platform signer and UID1000; tvfw.jar
requires a coherent system image and ART preopt. Please build these changes from
the matching TPM191E_R source tree, sign with the existing approved keys, run
the tests above, and ship as an official A/B update or supply a separately
Platform-signed Channels test APK plus full model-specific rollback procedure.