@@ -9,14 +9,19 @@ apply_settings() {
99 COMPLETED=$( adb shell getprop sys.boot_completed | tr -d ' \r' )
1010 sleep 5
1111 done
12+ adb root
1213 adb shell settings put global window_animation_scale 0
1314 adb shell settings put global transition_animation_scale 0
1415 adb shell settings put global animator_duration_scale 0
1516 adb shell settings put global stay_on_while_plugged_in 0
1617 adb shell settings put system screen_off_timeout 15000
18+ adb shell settings put system accelerometer_rotation 0
1719 adb shell settings put global private_dns_mode hostname
18- adb shell settings put global private_dns_specifier dns2024.haroun.dev
19- # adb shell svc wifi disable
20+ adb shell settings put global private_dns_specifier ${DNS:- one.one.one.one}
21+ adb shell settings put global airplane_mode_on 1
22+ adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true
23+ adb shell svc data disable
24+ adb shell svc wifi enable
2025}
2126
2227# Detect ip and forward ADB ports from the container's network
3439
3540echo " Init ADV ..."
3641
37- echo " no" | avdmanager create avd -n test -k " system-images;android-29 ;default;x86_64"
42+ echo " no" | avdmanager create avd -n android -k " system-images;android-30 ;default;x86_64"
3843
3944echo " Preparation ..."
4045
5257
5358echo " Installing GAPPS ..."
5459
55- wget https://deac-fra .dl.sourceforge.net/project/opengapps/x86_64/20220503/open_gapps-x86_64-10 .0-pico-20220503.zip? viasf=1 -O gapps-10 .zip
56- unzip gapps-10 .zip ' Core/*' -d gapps-10 && rm gapps-10 .zip
57- rm gapps-10 /Core/setup*
58- lzip -d gapps-10 /Core/* .lz
59- for f in $( ls gapps-10 /Core/* .tar) ; do
60- tar -x --strip-components 2 -f $f -C gapps-10
60+ wget https://netcologne .dl.sourceforge.net/project/opengapps/x86_64/20220503/open_gapps-x86_64-11 .0-pico-20220503.zip? viasf=1 -O gapps-11 .zip
61+ unzip gapps-11 .zip ' Core/*' -d gapps-11 && rm gapps-11 .zip
62+ rm gapps-11 /Core/setup*
63+ lzip -d gapps-11 /Core/* .lz
64+ for f in $( ls gapps-11 /Core/* .tar) ; do
65+ tar -x --strip-components 2 -f $f -C gapps-11
6166done
6267
63- adb push gapps-10 /etc /system
64- adb push gapps-10 /framework /system
65- adb push gapps-10 /app /system
66- adb push gapps-10 /priv-app /system
68+ adb push gapps-11 /etc /system
69+ adb push gapps-11 /framework /system
70+ adb push gapps-11 /app /system
71+ adb push gapps-11 /priv-app /system
6772
6873echo " Root Script Starting..."
6974
7075# Root the VM
7176git clone https://gitlab.com/newbit/rootAVD.git
7277pushd rootAVD
7378sed -i ' s/read -t 10 choice/choice=2/' rootAVD.sh
74- ./rootAVD.sh system-images/android-29/default/x86_64/ramdisk.img
79+ ./rootAVD.sh system-images/android-30/default/x86_64/ramdisk.img
80+ cp /opt/android-sdk/system-images/android-30/default/x86_64/ramdisk.img /data/android.avd/ramdisk.img
7581popd
7682echo " Root Done"
7783sleep 15
7884echo " Cleanup ..."
7985# done
80- rm -r gapps-10
86+ rm -r gapps-11
8187rm -r rootAVD
8288apply_settings
8389touch /data/.first-boot-done
0 commit comments