-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add setup guidance & request permission action
- Loading branch information
Showing
14 changed files
with
226 additions
and
131 deletions.
There are no files selected for viewing
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,22 @@ | ||
echo 设置存储 Setup storage | ||
termux-setup-storage | ||
DATA=package:com.termux | ||
echo -n 设置悬浮窗权限 Setup draw over apps \(请按回车 Press Enter\);read _ | ||
am start -a android.settings.action.MANAGE_OVERLAY_PERMISSION -d $DATA>/dev/null | ||
echo -n 设置禁用电池优化 Setup ignore battery optimizations \(请按回车 Press Enter\);read _ | ||
am start -a android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS>/dev/null | ||
echo -n 设置关联启动与后台弹出权限 Setup Startup \& Background pop-ups permissions \(请按回车 Press Enter\);read _ | ||
am start -a android.settings.APPLICATION_DETAILS_SETTINGS -d $DATA>/dev/null | ||
echo 设置allow-external-app为\`true' Setup allow-external-app to \`true\' | ||
fl=/data/data/com.termux/files/home/.termux/termux.properties | ||
if [ -f $fl ];then | ||
awk '/^#/{print;next }/^\s*allow-external-apps/{gsub(/allow-external-apps.*/,"allow-external-apps=true");found=1}{print $0}END{if(!found)print "allow-external-apps=true"}' $fl>$TMPDIR/a.tmp && mv $TMPDIR/a.tmp $fl | ||
else | ||
mkdir -p `dirname $fl` | ||
echo 'allow-external-apps=true'>$fl | ||
fi | ||
echo 安装Clang Install Clang | ||
pkg i clang -y | ||
apt autoremove --purge | ||
apt clean | ||
echo ok |
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
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
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
Oops, something went wrong.