INNER CODE UNIT · TypeScript

TangoNodeStorage

yume-chan/ya-webadb · libraries/adb-credential-nodejs/src/index.ts:68

export class TangoNodeStorage implements TangoKeyStorage {
    static readonly KeyError = KeyError;
    static readonly InvalidKeyError = InvalidKeyError;
    static readonly VendorKeyError = VendorKeyError;

    async #getAndroidDirPath() {
        const dir = resolve(homedir(), ".android");
        await mkdir(dir, { mode: 0o750, recursive: true });
        return dir;
    }

    async #getUserKeyPath() {
        return resolve(await this.#getAndroidDirPath(), "adbkey");
    }

    #getDefaultName() {
        return userInfo().username + "@" + hostname();
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…