Skip to content

Commit 99adac6

Browse files
authored
Revert "Populate Native Apps' Jailer on Install"
1 parent d7c0f96 commit 99adac6

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

services/better-jail.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

services/service.ts

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import Service, { Message } from 'webos-service';
1313

1414
import { asyncStat, asyncExecFile, asyncPipeline, asyncUnlink, asyncWriteFile, asyncReadFile, asyncChmod, asyncMkdir } from './adapter';
1515
import { fetchWrapper } from './fetch-wrapper';
16-
import { buildBetterJail } from './better-jail';
1716

1817
import rootAppInfo from '../appinfo.json';
1918
import serviceInfo from './services.json';
@@ -407,17 +406,12 @@ function runService(): void {
407406
return serviceRemote as Service;
408407
}
409408

410-
interface AppInfo {
411-
id: string;
412-
title: string;
413-
type: string;
414-
folderPath: string;
415-
}
416-
interface AppsList {
417-
apps: AppInfo[];
418-
}
419-
async function getAppInfo(appId: string): Promise<AppInfo> {
420-
const appList = await asyncCall<AppsList>(getInstallerService(), 'luna://com.webos.applicationManager/dev/listApps', {});
409+
async function getAppInfo(appId: string): Promise<Record<string, any>> {
410+
const appList = await asyncCall<{ apps: { id: string }[] }>(
411+
getInstallerService(),
412+
'luna://com.webos.applicationManager/dev/listApps',
413+
{},
414+
);
421415
const appInfo = appList.apps.find((app) => app.id === appId);
422416
if (!appInfo) throw new Error(`Invalid appId, or unsupported application type: ${appId}`);
423417
return appInfo;
@@ -497,13 +491,7 @@ function runService(): void {
497491

498492
try {
499493
const appInfo = await getAppInfo(installedPackageId);
500-
if (appInfo.type === 'native' && runningAsRoot) {
501-
await createToast(`Updating jailer config for ${appInfo.title}…`, service);
502-
await buildBetterJail(appInfo.id, appInfo.folderPath).catch((err) => {
503-
console.warn('jailer execution failed:', err);
504-
});
505-
}
506-
await createToast(`Application installed: ${appInfo.title}`, service);
494+
await createToast(`Application installed: ${appInfo['title']}`, service);
507495
} catch (err: unknown) {
508496
console.warn('appinfo fetch failed:', err);
509497
await createToast(`Application installed: ${installedPackageId}`, service);

0 commit comments

Comments
 (0)