Back out "Automatically set Android devices into the permissive mode"
Summary: Original commit changeset: 471470c5ca91 Original Phabricator Diff: D35356211 (501abc6b55) Recently, bloks users reported that android emulators lost connection upon launching Flipper. (S270689) Manual bisecting indicates that remote emulators won't crash on v0.142.362128844 (4/6) but crash on 0.143.365099607 (4/21). Looking at https://www.internalfb.com/code/fbsource/[history]/xplat/scripts/.flipperversion.v2, and backing out D35356211 (501abc6b55) fixes the issue. It's still unclear why setting `setIntoPermissiveMode` would crash/disconnect the android emulators, I'd defer Flipper team to investigate this further but this diff should unblock all the android bloks emulator + Flipper use case. Reviewed By: lblasa Differential Revision: D36263724 fbshipit-source-id: e8674730c0185457f6eda347ce7d9a41f9e1a2a4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
57e3253bb0
commit
0ee8f09fe5
@@ -120,37 +120,6 @@ export default class AndroidDevice extends ServerDevice {
|
||||
});
|
||||
}
|
||||
|
||||
async setIntoPermissiveMode(): Promise<void> {
|
||||
console.debug('AndroidDevice.setIntoPermissiveMode', this.serial);
|
||||
try {
|
||||
try {
|
||||
await this.adb.root(this.serial);
|
||||
} catch (e) {
|
||||
if (
|
||||
!(e instanceof Error) ||
|
||||
e.message !== 'adbd is already running as root'
|
||||
) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
console.debug(
|
||||
'AndroidDevice.setIntoPermissiveMode -> enabled root',
|
||||
this.serial,
|
||||
);
|
||||
await this.executeShellOrDie('setenforce 0');
|
||||
console.info(
|
||||
'AndroidDevice.setIntoPermissiveMode -> success',
|
||||
this.serial,
|
||||
);
|
||||
} catch (e) {
|
||||
console.info(
|
||||
'AndroidDevice.setIntoPermissiveMode -> failed',
|
||||
this.serial,
|
||||
e,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async screenRecordAvailable(): Promise<boolean> {
|
||||
try {
|
||||
await this.executeShellOrDie(
|
||||
|
||||
@@ -90,8 +90,6 @@ export class AndroidDeviceManager {
|
||||
// The default way of capturing screenshots through adb does not seem to work
|
||||
// There is a way of getting a screenshot through KaiOS dev tools though
|
||||
if (androidLikeDevice instanceof AndroidDevice) {
|
||||
await androidLikeDevice.setIntoPermissiveMode();
|
||||
|
||||
const screenRecordAvailable =
|
||||
await androidLikeDevice.screenRecordAvailable();
|
||||
androidLikeDevice.info.features.screenCaptureAvailable =
|
||||
|
||||
1
desktop/types/adbkit.d.ts
vendored
1
desktop/types/adbkit.d.ts
vendored
@@ -57,7 +57,6 @@ declare module 'adbkit' {
|
||||
serial: string,
|
||||
command: string | string[],
|
||||
) => Promise<NodeJS.ReadStream>;
|
||||
root: (serial: string) => Promise<true>;
|
||||
screencap: (serial: string) => Promise<NodeJS.WriteStream>;
|
||||
pull: (serial: string, path: string) => Promise<PullTransfer>;
|
||||
openLogcat: (
|
||||
|
||||
Reference in New Issue
Block a user