├── src ├── plugins │ └── element.js ├── i18n │ ├── index.js │ ├── zh_cn.js │ └── en.js ├── main.js └── App.vue ├── babel.config.js ├── .gitignore ├── README.md ├── public └── index.html ├── LICENSE └── package.json /src/plugins/element.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import ElementUI from 'element-ui'; 3 | 4 | Vue.use(ElementUI); 5 | -------------------------------------------------------------------------------- /src/i18n/index.js: -------------------------------------------------------------------------------- 1 | import en from './en'; 2 | import zh_cn from './zh_cn'; 3 | 4 | export default { 5 | 'en': en, 6 | 'zh-CN': zh_cn, 7 | }; 8 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "presets": [ 3 | "@vue/cli-plugin-babel/preset" 4 | ], 5 | "plugins": [ 6 | [ 7 | "component", 8 | { 9 | "libraryName": "element-ui", 10 | "styleLibraryName": "theme-chalk" 11 | } 12 | ] 13 | ] 14 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import VueI18n from 'vue-i18n'; 3 | import App from './App.vue'; 4 | import './plugins/element.js'; 5 | import messages from './i18n'; 6 | 7 | Vue.config.productionTip = false; 8 | 9 | Vue.use(VueI18n); 10 | 11 | const i18n = new VueI18n({ 12 | locale: navigator.language, 13 | fallbackLocale: 'en', 14 | messages, 15 | }); 16 | 17 | new Vue({ 18 | i18n, 19 | render: h => h(App), 20 | }).$mount('#app'); 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [FRP Unlock](https://frp.xingrz.me) 2 | =========== 3 | 4 | [![license][license-img]][license-url] [![issues][issues-img]][issues-url] [![commits][commits-img]][commits-url] 5 | 6 | 纯 Web 端的 FRP 解锁工具。 7 | 8 | ## 相关技术参考 9 | 10 | * [FRP 分区格式](https://github.com/aosp-mirror/platform_frameworks_base/blob/android10-release/services/core/java/com/android/server/PersistentDataBlockService.java#L69) 11 | * [FileReader API](https://developer.mozilla.org/zh-CN/docs/Web/API/FileReader) 12 | * [SubtleCrypto API](https://developer.mozilla.org/zh-CN/docs/Web/API/SubtleCrypto) 13 | 14 | [license-img]: https://img.shields.io/github/license/xingrz/frp?style=flat-square 15 | [license-url]: LICENSE 16 | [issues-img]: https://img.shields.io/github/issues/xingrz/frp?style=flat-square 17 | [issues-url]: https://github.com/xingrz/frp/issues 18 | [commits-img]: https://img.shields.io/github/last-commit/xingrz/frp?style=flat-square 19 | [commits-url]: https://github.com/xingrz/frp/commits/master 20 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | FRP Unlock 8 | 9 | 10 | 17 | 18 | 19 | 22 |
23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2015-2021 XiNGRZ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frp-2", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^3.6.4", 12 | "element-ui": "^2.4.5", 13 | "vue": "^2.6.11", 14 | "vue-i18n": "^8.15.3" 15 | }, 16 | "devDependencies": { 17 | "@vue/cli-plugin-babel": "~4.5.13", 18 | "@vue/cli-plugin-eslint": "~4.5.13", 19 | "@vue/cli-service": "~4.5.13", 20 | "babel-eslint": "^10.0.3", 21 | "babel-plugin-component": "^1.1.1", 22 | "eslint": "^6.7.2", 23 | "eslint-plugin-vue": "^6.1.2", 24 | "vue-cli-plugin-element": "^1.0.1", 25 | "vue-template-compiler": "^2.6.11" 26 | }, 27 | "eslintConfig": { 28 | "root": true, 29 | "env": { 30 | "node": true 31 | }, 32 | "extends": [ 33 | "plugin:vue/essential", 34 | "eslint:recommended" 35 | ], 36 | "parserOptions": { 37 | "parser": "babel-eslint" 38 | }, 39 | "rules": {} 40 | }, 41 | "browserslist": [ 42 | "> 1%", 43 | "last 2 versions" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /src/i18n/zh_cn.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: '中文', 3 | step1: { 4 | title: '用前必读', 5 | leading: '请仔细阅读下列文字:', 6 | term_1: '不是所有手机都适用', 7 | term_2: '解锁可能会使你丧失保修', 8 | term_3: '本页面是纯 HTML5 编写,没有后台,不会存储你所上传的数据', 9 | term_4: '本页面肆无忌惮地使用了很多尖端的 HTML5 技术,如果它不正常,请换一个新的浏览器', 10 | term_5: '谨慎决定,使用即表明你愿意自行承担风险', 11 | next: '明白,下一步', 12 | }, 13 | step2: { 14 | title: '读取分区', 15 | instruction_1: '读出你的 FRP 分区,存为 frp.bin。', 16 | instruction_2: '至于怎么读取,不在本工具的解释范畴内。如果不清楚,建议询问有经验的用户。', 17 | previous: '上一步', 18 | next: '下一步', 19 | }, 20 | step3: { 21 | title: '选择文件', 22 | upload: '将 frp.bin 拖到此处,或点击选取', 23 | previous: '上一步', 24 | next: '下一步', 25 | }, 26 | step4: { 27 | title: '下载并刷入', 28 | success_1: '恭喜,文件已生成完毕。', 29 | success_2: '接下来请点击下面的按钮把文件下载回来,然后刷回 FRP 分区里。', 30 | success_3: '同样地,怎么刷入,不在本工具的解释范畴内。
如果不清楚,建议询问有经验的开发人员。', 31 | download: '点此下载', 32 | reset: '重新开始', 33 | }, 34 | error: { 35 | too_small: '文件大小不足 1KB,看起来不像是个 frp.bin', 36 | too_large: '文件大小超过 1MB,看起来不像是个 frp.bin', 37 | invalid: '这看起来不是一个正常的 frp.bin', 38 | }, 39 | }; 40 | -------------------------------------------------------------------------------- /src/i18n/en.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'English', 3 | step1: { 4 | title: 'README', 5 | leading: 'Please read this carefully before use:', 6 | term_1: 'May not work for all phones.', 7 | term_2: 'You may lost your warranty once unlocked.', 8 | term_3: 'This page was developed in pure HTML5. No backend. No data will be uploaded or saved.', 9 | term_4: 'This page, brazenly, utilized many cutting-edge HTML5 features. If it doesn\'t work properly, try another browser.', 10 | term_5: 'Think again carefully before you make this decision. You\'re willing to continue at your own risk.', 11 | next: 'Okay, continue', 12 | }, 13 | step2: { 14 | title: 'Dump', 15 | instruction_1: 'Dump your FRP partition and save it as frp.bin.', 16 | instruction_2: 'Ask an experienced user if you don\'t know how to do.', 17 | previous: 'Previous', 18 | next: 'Next', 19 | }, 20 | step3: { 21 | title: 'Select', 22 | upload: 'Drop frp.bin here, or click to select', 23 | previous: 'Previous', 24 | next: 'Next', 25 | }, 26 | step4: { 27 | title: 'Save & Flash', 28 | success_1: 'File generated.', 29 | success_2: 'Now, click the following button to download the file,
and flash it back to your FRP partition.', 30 | success_3: 'Again: ask an experienced user if you don\'t know how to do.', 31 | download: 'Click to download', 32 | reset: 'Return', 33 | }, 34 | error: { 35 | too_small: 'File length less then 1KB, seems not an frp.bin', 36 | too_large: 'File length larger then 1MB, seems not an frp.bin', 37 | invalid: 'File not a valid frp.bin', 38 | }, 39 | }; 40 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 82 | 83 | 180 | 181 | 218 | --------------------------------------------------------------------------------