(OK) init_in_android-x86_64.sh


#!/system/bin/sh
# execute "sed -i '460a init_in_android-x86_64.sh' /system/etc/init.sh" in android-x86_64-6.0-rc1-0.vdi

# Note: /system/xbin/quagga/sbin/init_in_android-x86_64.sh will be called 4 times in /system/etc/init.sh [init, bootcomplete, hci, hci]

#--------------------------------------------------------------------
# Note: vi /etc/preloaded-classes, #android.net.NetworkPolicyManager
# otherwise, can't forward packages
#--------------------------------------------------------------------

# waiting a while, push init_in_android-x86_64.sh in create_vm(),
# due to that init_in_android-x86_64.sh may be exist in android-x86_64-6.0-rc1-[1-252].vdi
# if create android-x86_64-6.0-rc1-[1-252].vdi from scratch create, then can delete the following line. 

#sleep 15 

#stop netd

ipadd=`ifconfig eth0 |awk -F '[ :]+' 'NR==2 {print $4}'`
#echo ${ipadd}

if [ "${ipadd}" != "112.26.2.5" ]; then

	#sleep 30

	#log.sh 1

	# Note: 112.26.2.[1-254] for android, 112.26.1.[1-254] for docker(centos)
	# must to change the IP address for every Android
	# ifconfig eth0 down
	ifconfig eth0 112.26.2.5 netmask 255.255.0.0 up

	mount -o remount,rw /system
	mount -o remount,rw /
	mkdir -p /opt/android-on-linux/quagga/out/etc
	cp /system/xbin/quagga/etc/zebra.conf /opt/android-on-linux/quagga/out/etc/
	cp /system/xbin/quagga/etc/ospf6d.conf /opt/android-on-linux/quagga/out/etc/
	sed -i '21a \ router-id 10.1.0.5' /opt/android-on-linux/quagga/out/etc/ospf6d.conf

	#pkill zebra
	#pkill ospf6d
	#echo 1 > /proc/sys/net/ipv4/ip_forward

	#sleep 1
	/system/xbin/quagga/sbin/zebra -d
	/system/xbin/quagga/sbin/ospf6d -d
fi

iptables -F
iptables -X

#iptables -F -t nat
#iptables -X -t nat

#iptables -F -t mangle
#iptables -X -t mangle

#svc wifi disable
#svc data disable

#log.sh 2

echo 1 > /proc/sys/net/ipv4/ip_forward



(base) [root@localhost py3.8]# pip install PyGObject==3.44.0 -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting PyGObject==3.44.0 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/07/73/a034fc1bcd6d402d6f72ff618c093f91ac6921f968cc19806b6a1b1b19c8/PyGObject-3.44.0.tar.gz (720 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting pycairo>=1.16.0 (from PyGObject==3.44.0) Using cached pycairo-1.26.1-cp38-cp38-linux_x86_64.whl Building wheels for collected packages: PyGObject Building wheel for PyGObject (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for PyGObject (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [44 lines of output] running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-38/pygtkcompat copying pygtkcompat/__init__.py -> build/lib.linux-x86_64-cpython-38/pygtkcompat copying pygtkcompat/generictreemodel.py -> build/lib.linux-x86_64-cpython-38/pygtkcompat copying pygtkcompat/pygtkcompat.py -> build/lib.linux-x86_64-cpython-38/pygtkcompat creating build/lib.linux-x86_64-cpython-38/gi copying gi/__init__.py -> build/lib.linux-x86_64-cpython-38/gi copying gi/_constants.py -> build/lib.linux-x86_64-cpython-38/gi copying gi/_error.py -> build/lib.linux-x86_64-cpython-38/gi copying gi/_gtktemplate.py -> build/lib.linux-x86_64-cpython-38/gi copying gi/_option.py -> build/lib.linux-x86_64-cpython-38/gi copying gi/_ossighelper.py -> build/lib.linux-x86_64-cpython-38/gi copying gi/_propertyhelper.py -> build/lib.linux-x86_64-cpython-38/gi copying gi/_signalhelper.py -> build/lib.linux-x86_64-cpython-38/gi copying gi/docstring.py -> build/lib.linux-x86_64-cpython-38/gi copying gi/importer.py -> build/lib
最新发布
04-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值