Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
Fix YTM not using architecture from device
Browse files Browse the repository at this point in the history
  • Loading branch information
GramingFoxTeam committed Sep 4, 2022
1 parent 7f8c917 commit ba44d5e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions wsEvents/selectAppVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { EOL } = require('node:os');
const exec = require('../utils/promisifiedExec.js');

const downloadApp = require('../utils/downloadApp.js');
const getDeviceArch = require('../utils/getDeviceArch.js');

/**
* @param {Record<string, any>} message
Expand All @@ -12,15 +13,10 @@ module.exports = async function selectAppVersion(message, ws) {
let arch = message.arch;

if (
(global.jarNames.selectedApp === 'music' && global.jarNames.deviceID) ||
(global.jarNames.selectedApp === 'music' && global.jarNames.devices[0]) ||
process.platform === 'android'
) {
const deviceArch = await exec(
global.jarNames.deviceID
? 'adb shell getprop ro.product.cpu.abi'
: 'getprop ro.product.cpu.abi'
);
arch = deviceArch.stdout.replace(EOL, '');
arch = await getDeviceArch(ws);
}

global.apkInfo = {
Expand Down

0 comments on commit ba44d5e

Please sign in to comment.