diff --git a/docs/adb_dump.md b/docs/adb_dump.md new file mode 100644 index 0000000..0b8a1aa --- /dev/null +++ b/docs/adb_dump.md @@ -0,0 +1,9 @@ +# 利用 ADB 访问安卓私有数据 + +```sh +APP_ID="com.tencent.qqmusic" # QQ 音乐 +APP_ID="cn.kuwo.player" # 酷我 + +adb shell su -c "tar c '/data/data/${APP_ID}/' | base64" \ + | base64 -d | pv | tar -x --strip-components 2 +``` diff --git a/src/features/settings/panels/PanelQMCv2Key.tsx b/src/features/settings/panels/PanelQMCv2Key.tsx index e485d4b..52856f2 100644 --- a/src/features/settings/panels/PanelQMCv2Key.tsx +++ b/src/features/settings/panels/PanelQMCv2Key.tsx @@ -2,43 +2,42 @@ import { Box, Button, ButtonGroup, + Checkbox, Flex, HStack, Heading, Icon, IconButton, - Input, - InputGroup, - InputLeftElement, - InputRightElement, List, - ListItem, Menu, MenuButton, MenuDivider, MenuItem, MenuList, Text, - VStack, + Tooltip, } from '@chakra-ui/react'; import { useDispatch, useSelector } from 'react-redux'; -import { qmc2AddKey, qmc2ClearKeys, qmc2DeleteKey, qmc2UpdateKey } from '../settingsSlice'; +import { qmc2AddKey, qmc2AllowFuzzyNameSearch, qmc2ClearKeys } from '../settingsSlice'; import { selectStagingQMCv2Settings } from '../settingsSelector'; import React, { useState } from 'react'; -import { MdAdd, MdDelete, MdDeleteForever, MdExpandMore, MdFileUpload, MdVpnKey } from 'react-icons/md'; +import { MdAdd, MdDeleteForever, MdExpandMore, MdFileUpload } from 'react-icons/md'; import { ImportFileModal } from './QMCv2/ImportFileModal'; +import { KeyInput } from './QMCv2/KeyInput'; +import { InfoOutlineIcon } from '@chakra-ui/icons'; export function PanelQMCv2Key() { const dispatch = useDispatch(); - const qmc2Keys = useSelector(selectStagingQMCv2Settings).keys; + const { keys: qmc2Keys, allowFuzzyNameSearch } = useSelector(selectStagingQMCv2Settings); const [showImportModal, setShowImportModal] = useState(false); const addKey = () => dispatch(qmc2AddKey()); - const updateKey = (prop: 'name' | 'key', id: string, e: React.ChangeEvent) => - dispatch(qmc2UpdateKey({ id, field: prop, value: e.target.value })); - const deleteKey = (id: string) => dispatch(qmc2DeleteKey({ id })); const clearAll = () => dispatch(qmc2ClearKeys()); + const handleAllowFuzzyNameSearchCheckbox = (e: React.ChangeEvent) => { + dispatch(qmc2AllowFuzzyNameSearch({ enable: e.target.checked })); + }; + return ( @@ -50,7 +49,7 @@ export function PanelQMCv2Key() { 客户端的情况下,其「离线加密文件」对应的「密钥」储存在独立的数据库文件内。 - +