-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
添加导出文件的支持;
- Loading branch information
Showing
11 changed files
with
214 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
@echo off | ||
title 一键禁用斐讯全家桶常开蓝牙 by 小叶同学 | ||
color 0a | ||
echo. | ||
|
||
|
||
echo 一键禁用斐讯全家桶常开蓝牙+DLNA | ||
echo. | ||
echo. | ||
echo. by:小叶同学 | ||
echo. | ||
echo. !!!使用前请先配对一次蓝牙!!! | ||
echo. | ||
echo. | ||
echo 没有氛围灯、没有氛围灯、没有氛围灯 | ||
echo. | ||
echo. 只适合不想折腾只想当蓝牙音响的 | ||
echo. | ||
echo 如果后续需要恢复小讯,请恢复出厂设置 | ||
echo. | ||
echo --------------------- | ||
set /p ip=请输入音箱IP: | ||
|
||
adb kill-server | ||
adb start-server | ||
|
||
echo 开始通过ADB连接 | ||
|
||
adb connect %ip% | ||
|
||
|
||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.airskill | ||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.player | ||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.exceptionreporter | ||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.ijetty | ||
adb shell /system/bin/pm uninstall --user 0 com.android.keychain | ||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.netctl | ||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.otaservice | ||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.systemtool | ||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.device | ||
adb shell /system/bin/pm uninstall --user 0 com.android.providers.downloads | ||
adb shell /system/bin/pm uninstall --user 0 com.android.location.fused | ||
adb shell /system/bin/pm uninstall --user 0 com.android.inputdevices | ||
adb shell /system/bin/pm uninstall --user 0 com.android.server.telecom | ||
adb shell /system/bin/pm uninstall --user 0 com.android.providers.telephony | ||
adb shell /system/bin/pm uninstall --user 0 com.android.vpndialogs | ||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.productiontest | ||
adb shell /system/bin/pm uninstall --user 0 com.phicomm.speaker.bugreport | ||
adb shell /system/bin/pm uninstall com.droidlogic.mediacenter | ||
|
||
adb shell settings put secure install_non_market_apps 1 | ||
|
||
adb push dlna.apk /mnt/internal_sd/ | ||
|
||
echo 安装DLNA | ||
|
||
adb shell /system/bin/pm install -r /mnt/internal_sd/dlna.apk | ||
|
||
adb shell rm /mnt/internal_sd/dlna.apk | ||
|
||
adb shell am start -n com.droidlogic.mediacenter/.MediaCenterActivity | ||
|
||
adb shell input tap 100 150 | ||
adb shell input tap 100 150 | ||
adb shell input tap 500 100 | ||
adb shell input tap 500 150 | ||
|
||
adb shell input tap 100 200 | ||
adb shell input tap 500 100 | ||
adb shell input tap 500 150 | ||
adb reboot | ||
|
||
:end | ||
|
||
echo 按任意键退出... | ||
pause > nul |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package utils | ||
|
||
import ( | ||
"io/ioutil" | ||
"path/filepath" | ||
) | ||
|
||
func ExportFiles(frompath, topath string) (err error) { | ||
data, err := Asset(frompath) | ||
if err != nil { | ||
return | ||
} | ||
return ioutil.WriteFile(topath, data, 0777) | ||
} | ||
|
||
// scripts/bindata/host/adb/AdbWinApi.dll | ||
// scripts/bindata/host/adb/AdbWinUsbApi.dll | ||
// scripts/bindata/host/adb/adb.exe | ||
func ExportAdb(topath string) (err error) { | ||
filename := "adb.exe" | ||
frompath := "scripts/bindata/host/adb/" | ||
err = ExportFiles(filepath.Join(frompath, filename), filepath.Join(topath, filename)) | ||
if err != nil { | ||
return | ||
} | ||
filename = "AdbWinApi.dll" | ||
err = ExportFiles(filepath.Join(frompath, filename), filepath.Join(topath, filename)) | ||
if err != nil { | ||
return | ||
} | ||
filename = "AdbWinUsbApi.dll" | ||
err = ExportFiles(filepath.Join(frompath, filename), filepath.Join(topath, filename)) | ||
if err != nil { | ||
return | ||
} | ||
return | ||
} | ||
|
||
// scripts/bindata/mobile/DLNA/dlna.apk | ||
// scripts/bindata/mobile/DLNA/一键常开蓝牙DLNA.bat | ||
func ExportDLNA(topath string) (err error) { | ||
filename := "dlna.apk" | ||
frompath := "scripts/bindata/mobile/DLNA/" | ||
err = ExportFiles(filepath.Join(frompath, filename), filepath.Join(topath, filename)) | ||
if err != nil { | ||
return | ||
} | ||
return | ||
} | ||
|
||
// scripts/bindata/mobile/ROOT/TheSELinuxSwitch7.0.0.apk | ||
func ExportSELinuxSwitch(topath string) (err error) { | ||
filename := "TheSELinuxSwitch7.0.0.apk" | ||
frompath := "scripts/bindata/mobile/ROOT/" | ||
err = ExportFiles(filepath.Join(frompath, filename), filepath.Join(topath, filename)) | ||
if err != nil { | ||
return | ||
} | ||
return | ||
} | ||
|
||
// scripts/bindata/scrcpy/scrcpy-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package utils | ||
|
||
import ( | ||
"log" | ||
"testing" | ||
) | ||
|
||
func TestExportAdb(t *testing.T) { | ||
err := ExportAdb("./") | ||
if err != nil { | ||
log.Println(err) | ||
return | ||
} | ||
} | ||
|
||
func TestExportDLNA(t *testing.T) { | ||
err := ExportDLNA("./") | ||
if err != nil { | ||
log.Println(err) | ||
return | ||
} | ||
} | ||
|
||
func TestExportSELinuxSwitch(t *testing.T) { | ||
err := ExportSELinuxSwitch("./") | ||
if err != nil { | ||
log.Println(err) | ||
return | ||
} | ||
} |