liuyq / android-issues

place to write notes about investigation on android issues
0 stars 0 forks source link

AOSP Virtualization #18

Open liuyq opened 1 year ago

liuyq commented 1 year ago

https://android.googlesource.com/platform/packages/modules/Virtualization/+/refs/heads/master/docs/getting_started/index.md record the log here, maybe we need it someday to install with arm64 host

=====================================================================================================
 [Install cuttlefish-common packages on the host] 
 This step will walk you through the cuttlefish-common packages installation for your host.
=====================================================================================================

Start to install cuttlefish-common :
git clone https://github.com/google/android-cuttlefish.git /tmp/tmpczmi9tiy/cf-common
cd /tmp/tmpczmi9tiy/cf-common/base
debuild -i -us -uc -b
cd ../frontend
debuild -i -us -uc -b
sudo dpkg -i ../cuttlefish-base_*_*64.deb || sudo apt-get install -f
sudo dpkg -i ../cuttlefish-user_*_*64.deb || sudo apt-get install -f
sudo dpkg -i ../cuttlefish-common_*_*64.deb || sudo apt-get install -f
Enter 'y' to continue, otherwise N or enter to exit: y
Run command: git clone https://github.com/google/android-cuttlefish.git /tmp/tmpczmi9tiy/cf-common
cd /tmp/tmpczmi9tiy/cf-common/base
debuild -i -us -uc -b
cd ../frontend
debuild -i -us -uc -b
sudo dpkg -i ../cuttlefish-base_*_*64.deb || sudo apt-get install -f
sudo dpkg -i ../cuttlefish-user_*_*64.deb || sudo apt-get install -f
sudo dpkg -i ../cuttlefish-common_*_*64.deb || sudo apt-get install -f
Cloning into '/tmp/tmpczmi9tiy/cf-common'...
remote: Enumerating objects: 4659, done.
remote: Counting objects: 100% (4659/4659), done.
remote: Compressing objects: 100% (1706/1706), done.
remote: Total 4659 (delta 2785), reused 4595 (delta 2750), pack-reused 0
Receiving objects: 100% (4659/4659), 1.66 MiB | 726.00 KiB/s, done.
Resolving deltas: 100% (2785/2785), done.
dpkg: dependency problems prevent configuration of cuttlefish-base:
 cuttlefish-base depends on bridge-utils; however:
  Package bridge-utils is not installed.
 cuttlefish-base depends on grub-efi-ia32-bin; however:
  Package grub-efi-ia32-bin is not installed.
 cuttlefish-base depends on libarchive-tools | bsdtar; however:
  Package libarchive-tools is not installed.
  Package bsdtar is not installed.

dpkg: error processing package cuttlefish-base (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 cuttlefish-base

=====================================================================================================
 [Host Environment Setup] 
 This step will help you to setup environment for running Android cuttlefish devices on your host.
 That includes adding user to kvm related groups and checking required linux modules.
=====================================================================================================

Below commands will be run:
sudo rmmod kvm_intel || true
sudo rmmod kvm || true
sudo modprobe kvm
sudo modprobe kvm_intel
sudo usermod -aG kvm liuyq
sudo usermod -aG cvdnetwork liuyq
sudo usermod -aG render liuyq

Enter 'y' to continue, otherwise N or enter to exit: y
Run command: sudo rmmod kvm_intel || true
Run command: sudo rmmod kvm || true
Run command: sudo modprobe kvm
Run command: sudo modprobe kvm_intel
Run command: sudo usermod -aG kvm liuyq
Run command: sudo usermod -aG cvdnetwork liuyq
Run command: sudo usermod -aG render liuyq
Host environment setup has done!

=====================================================================================================
 [Local CA Host Environment Setup] 
 This step will walk you through the local CA setup to your host for assuring a secure localhost
 url connection when launching an AVD over webrtc.
=====================================================================================================

Start to setup the local CA:

Enter 'y' to continue, otherwise N or enter to exit: y
Traceback (most recent call last):
  File "/tmp/Soong.python_y595m9fr/__soong_entrypoint_redirector__.py", line 6, in <module>
    runpy._run_module_as_main("acloud.public.acloud_main", alter_argv=False)
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/Soong.python_y595m9fr/acloud/public/acloud_main.py", line 461, in <module>
    EXIT_CODE, EXCEPTION_STACKTRACE = main(sys.argv[1:])
  File "/tmp/Soong.python_y595m9fr/acloud/public/acloud_main.py", line 401, in main
    reporter = create.Run(args)
  File "/tmp/Soong.python_y595m9fr/acloud/create/create.py", line 250, in Run
    PreRunCheck(args)
  File "/tmp/Soong.python_y595m9fr/acloud/create/create.py", line 236, in PreRunCheck
    _CheckForSetup(args)
  File "/tmp/Soong.python_y595m9fr/acloud/create/create.py", line 224, in _CheckForSetup
    setup.Run(args)
  File "/tmp/Soong.python_y595m9fr/acloud/setup/setup.py", line 77, in Run
    subtask.Run(force_setup=args.force)
  File "/tmp/Soong.python_y595m9fr/acloud/setup/base_task_runner.py", line 99, in Run
    self._Run()
  File "/tmp/Soong.python_y595m9fr/acloud/setup/host_setup_runner.py", line 196, in _Run
    mkcert.Install()
  File "/tmp/Soong.python_y595m9fr/acloud/setup/mkcert.py", line 99, in Install
    utils.Popen(_TRUST_CHROME_CMD, shell=True)
  File "/tmp/Soong.python_y595m9fr/acloud/internal/lib/utils.py", line 1562, in Popen
    raise errors.SubprocessFail("%s returned %d." %
acloud.errors.Subproces
[acloud-create.log.gz](https://github.com/liuyq/android-issues/files/10257032/acloud-create.log.gz)
liuyq commented 1 year ago
15:58:17 P15v:master$ acloud  create --local-instance --local-image
aosp_cf_arm64_phone is not a cf_x86 target (Try lunching a proper cuttlefish target and running 'm')
Creating local AVD instance with the following details:
Image (local):
  /home/liuyq/data/android/master/out/target/product/vsoc_arm64
hw config:
  cpu - 4
  ram - 2GB
  display - 720x1280 (320 DPI)

Traceback (most recent call last):
  File "/tmp/Soong.python_a5ffq8jc/__soong_entrypoint_redirector__.py", line 6, in <module>
    runpy._run_module_as_main("acloud.public.acloud_main", alter_argv=False)
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/Soong.python_a5ffq8jc/acloud/public/acloud_main.py", line 461, in <module>
    EXIT_CODE, EXCEPTION_STACKTRACE = main(sys.argv[1:])
  File "/tmp/Soong.python_a5ffq8jc/acloud/public/acloud_main.py", line 401, in main
    reporter = create.Run(args)
  File "/tmp/Soong.python_a5ffq8jc/acloud/create/create.py", line 256, in Run
    report = avd_creator.Create(spec, args.no_prompt)
  File "/tmp/Soong.python_a5ffq8jc/acloud/create/base_avd_create.py", line 45, in Create
    results = self._CreateAVD(avd_spec, no_prompts)
  File "/tmp/Soong.python_a5ffq8jc/acloud/internal/lib/utils.py", line 750, in DecoratorFunction
    result = func(*args, **kargs)
  File "/tmp/Soong.python_a5ffq8jc/acloud/create/local_image_local_instance.py", line 174, in _CreateAVD
    result_report = self._CreateInstance(ins_ids, artifact_paths,
  File "/tmp/Soong.python_a5ffq8jc/acloud/create/local_image_local_instance.py", line 287, in _CreateInstance
    self._TrustCertificatesForWebRTC(artifact_paths.host_artifacts)
  File "/tmp/Soong.python_a5ffq8jc/acloud/create/local_image_local_instance.py", line 711, in _TrustCertificatesForWebRTC
    if mkcert.AllocateLocalHostCert():
  File "/tmp/Soong.python_a5ffq8jc/acloud/setup/mkcert.py", line 121, in AllocateLocalHostCert
    utils.Popen(_CERT_CRT_CMD, shell=True)
  File "/tmp/Soong.python_a5ffq8jc/acloud/internal/lib/utils.py", line 1562, in Popen
    raise errors.SubprocessFail("%s returned %d." %
acloud.errors.SubprocessFail: openssl x509 -req -days 9999 -in "/home/liuyq/.config/acloud/mkcert/server.csr" -CA "/home/liuyq/.config/acloud/mkcert/ACloud-webRTC-CA.pem" -CAkey "/home/liuyq/.config/acloud/mkcert/ACloud-webRTC-CA.key" -CAcreateserial -out "/home/liuyq/.config/acloud/mkcert/server.crt" -extfile <(echo "keyUsage = critical, digitalSignature, keyEncipherment";echo "extendedKeyUsage = serverAuth";echo "subjectAltName = DNS.1:localhost, IP.1:0.0.0.0, IP.2:::1";) returned 2.
liuyq commented 1 year ago
18:20:17 P15v:master$ acloud create --local-instance --local-image
Creating local AVD instance with the following details:
Image (local):
  /home/liuyq/data/android/master/out/target/product/vsoc_x86_64
hw config:
  cpu - 4
  ram - 2GB
  display - 720x1280 (320 DPI)

Traceback (most recent call last):
  File "/tmp/Soong.python_s847r80t/__soong_entrypoint_redirector__.py", line 6, in <module>
    runpy._run_module_as_main("acloud.public.acloud_main", alter_argv=False)
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/Soong.python_s847r80t/acloud/public/acloud_main.py", line 461, in <module>
    EXIT_CODE, EXCEPTION_STACKTRACE = main(sys.argv[1:])
  File "/tmp/Soong.python_s847r80t/acloud/public/acloud_main.py", line 401, in main
    reporter = create.Run(args)
  File "/tmp/Soong.python_s847r80t/acloud/create/create.py", line 256, in Run
    report = avd_creator.Create(spec, args.no_prompt)
  File "/tmp/Soong.python_s847r80t/acloud/create/base_avd_create.py", line 45, in Create
    results = self._CreateAVD(avd_spec, no_prompts)
  File "/tmp/Soong.python_s847r80t/acloud/internal/lib/utils.py", line 750, in DecoratorFunction
    result = func(*args, **kargs)
  File "/tmp/Soong.python_s847r80t/acloud/create/local_image_local_instance.py", line 174, in _CreateAVD
    result_report = self._CreateInstance(ins_ids, artifact_paths,
  File "/tmp/Soong.python_s847r80t/acloud/create/local_image_local_instance.py", line 287, in _CreateInstance
    self._TrustCertificatesForWebRTC(artifact_paths.host_artifacts)
  File "/tmp/Soong.python_s847r80t/acloud/create/local_image_local_instance.py", line 711, in _TrustCertificatesForWebRTC
    if mkcert.AllocateLocalHostCert():
  File "/tmp/Soong.python_s847r80t/acloud/setup/mkcert.py", line 121, in AllocateLocalHostCert
    utils.Popen(_CERT_CRT_CMD, shell=True)
  File "/tmp/Soong.python_s847r80t/acloud/internal/lib/utils.py", line 1562, in Popen
    raise errors.SubprocessFail("%s returned %d." %
acloud.errors.SubprocessFail: openssl x509 -req -days 9999 -in "/home/liuyq/.config/acloud/mkcert/server.csr" -CA "/home/liuyq/.config/acloud/mkcert/ACloud-webRTC-CA.pem" -CAkey "/home/liuyq/.config/acloud/mkcert/ACloud-webRTC-CA.key" -CAcreateserial -out "/home/liuyq/.config/acloud/mkcert/server.crt" -extfile <(echo "keyUsage = critical, digitalSignature, keyEncipherment";echo "extendedKeyUsage = serverAuth";echo "subjectAltName = DNS.1:localhost, IP.1:0.0.0.0, IP.2:::1";) returned 2.
18:45:23 P15v:master$ acloud create --local-instance --local-image
Creating local AVD instance with the following details:
Image (local):
  /home/liuyq/data/android/master/out/target/product/vsoc_x86_64
hw config:
  cpu - 4
  ram - 2GB
  display - 720x1280 (320 DPI)

Traceback (most recent call last):
  File "/tmp/Soong.python_kw9nqoav/__soong_entrypoint_redirector__.py", line 6, in <module>
    runpy._run_module_as_main("acloud.public.acloud_main", alter_argv=False)
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/Soong.python_kw9nqoav/acloud/public/acloud_main.py", line 461, in <module>
    EXIT_CODE, EXCEPTION_STACKTRACE = main(sys.argv[1:])
  File "/tmp/Soong.python_kw9nqoav/acloud/public/acloud_main.py", line 401, in main
    reporter = create.Run(args)
  File "/tmp/Soong.python_kw9nqoav/acloud/create/create.py", line 256, in Run
    report = avd_creator.Create(spec, args.no_prompt)
  File "/tmp/Soong.python_kw9nqoav/acloud/create/base_avd_create.py", line 45, in Create
    results = self._CreateAVD(avd_spec, no_prompts)
  File "/tmp/Soong.python_kw9nqoav/acloud/internal/lib/utils.py", line 750, in DecoratorFunction
    result = func(*args, **kargs)
  File "/tmp/Soong.python_kw9nqoav/acloud/create/local_image_local_instance.py", line 174, in _CreateAVD
    result_report = self._CreateInstance(ins_ids, artifact_paths,
  File "/tmp/Soong.python_kw9nqoav/acloud/create/local_image_local_instance.py", line 287, in _CreateInstance
    self._TrustCertificatesForWebRTC(artifact_paths.host_artifacts)
  File "/tmp/Soong.python_kw9nqoav/acloud/create/local_image_local_instance.py", line 711, in _TrustCertificatesForWebRTC
    if mkcert.AllocateLocalHostCert():
  File "/tmp/Soong.python_kw9nqoav/acloud/setup/mkcert.py", line 121, in AllocateLocalHostCert
    utils.Popen(_CERT_CRT_CMD, shell=True)
  File "/tmp/Soong.python_kw9nqoav/acloud/internal/lib/utils.py", line 1562, in Popen
    raise errors.SubprocessFail("%s returned %d." %
acloud.errors.SubprocessFail: openssl x509 -req -days 9999 -in "/home/liuyq/.config/acloud/mkcert/server.csr" -CA "/home/liuyq/.config/acloud/mkcert/ACloud-webRTC-CA.pem" -CAkey "/home/liuyq/.config/acloud/mkcert/ACloud-webRTC-CA.key" -CAcreateserial -out "/home/liuyq/.config/acloud/mkcert/server.crt" -extfile <(echo "keyUsage = critical, digitalSignature, keyEncipherment";echo "extendedKeyUsage = serverAuth";echo "subjectAltName = DNS.1:localhost, IP.1:0.0.0.0, IP.2:::1";) returned 2.
18:46:19 P15v:master$ openssl x509 -req -days 9999 \
>     -in "/home/liuyq/.config/acloud/mkcert/server.csr" \
>     -CA "/home/liuyq/.config/acloud/mkcert/ACloud-webRTC-CA.pem" \
>     -CAkey "/home/liuyq/.config/acloud/mkcert/ACloud-webRTC-CA.key" \
>     -CAcreateserial -out "/home/liuyq/.config/acloud/mkcert/server.crt" \
>     -extfile <(echo "keyUsage = critical, digitalSignature, keyEncipherment";echo "extendedKeyUsage = serverAuth";echo "subjectAltName = DNS.1:localhost, IP.1:0.0.0.0, IP.2:::1";)
Signature ok
subject=OU = P15v, O = acloud development CA
Getting CA Private Key
18:48:12 P15v:master$ acloud create --local-instance --local-image
Creating local AVD instance with the following details:
Image (local):
  /home/liuyq/data/android/master/out/target/product/vsoc_x86_64
hw config:
  cpu - 4
  ram - 2GB
  display - 720x1280 (320 DPI)

Waiting for AVD(s) to boot up ...Fail! (5s)
Total time:  (5s)

Device summary:
Fail in:
Cannot create cuttlefish instance: launch_cvd returned 255. Stderr:
  Kernel log: /tmp/acloud_cvd_temp/local-instance-1/cuttlefish_runtime/instances/cvd-1/kernel.log
  Point your browser to https://localhost:8443 to interact with the device.
  Launcher log: /tmp/acloud_cvd_temp/local-instance-1/cuttlefish_runtime/instances/cvd-1/logs/launcher.log
  Instance configuration: /tmp/acloud_cvd_temp/local-instance-1/cuttlefish_runtime/instances/cvd-1/cuttlefish_config.json
User must be a member of cvdnetwork
User must be a member of kvm
Validation of user configuration failed
Setup failed for ValidateHostConfiguration
launch_cvd E 12-19 18:48:32 1293780 1293780 subprocess.cpp:162] Subprocess 1294361 was interrupted by a signal: 6
launch_cvd E 12-19 18:48:32 1293780 1293780 main.cc:408] run_cvd returned -1
For more detail: /tmp/acloud_cvd_temp/local-instance-1/cuttlefish_runtime/launcher.log

Encountered the following errors:
Cannot create cuttlefish instance: launch_cvd returned 255. Stderr:
  Kernel log: /tmp/acloud_cvd_temp/local-instance-1/cuttlefish_runtime/instances/cvd-1/kernel.log
  Point your browser to https://localhost:8443 to interact with the device.
  Launcher log: /tmp/acloud_cvd_temp/local-instance-1/cuttlefish_runtime/instances/cvd-1/logs/launcher.log
  Instance configuration: /tmp/acloud_cvd_temp/local-instance-1/cuttlefish_runtime/instances/cvd-1/cuttlefish_config.json
User must be a member of cvdnetwork
User must be a member of kvm
Validation of user configuration failed
Setup failed for ValidateHostConfiguration
launch_cvd E 12-19 18:48:32 1293780 1293780 subprocess.cpp:162] Subprocess 1294361 was interrupted by a signal: 6
launch_cvd E 12-19 18:48:32 1293780 1293780 main.cc:408] run_cvd returned -1
For more detail: /tmp/acloud_cvd_temp/local-instance-1/cuttlefish_runtime/launcher.log

If you have any question or need acloud team support, please feel free to contact us by email at buganizer-system+419709@google.com.
18:48:32 P15v:master$ 
liuyq commented 1 year ago

https://android.googlesource.com/device/google/cuttlefish/

18:48:32 P15v:master$ grep -c -w "vmx\|svm" /proc/cpuinfo
32
19:28:18 P15v:master$ sudo apt install -y git devscripts config-package-dev debhelper-compat golang curl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'debhelper' instead of 'debhelper-compat'
debhelper is already the newest version (12.10ubuntu1).
debhelper set to manually installed.
devscripts is already the newest version (2.20.2ubuntu2).
golang is already the newest version (2:1.13~1ubuntu2).
config-package-dev is already the newest version (5.5).
curl is already the newest version (7.68.0-1ubuntu2.14).
git is already the newest version (1:2.25.1-1ubuntu3.6).
The following packages were automatically installed and are no longer required:
  libfwupdplugin1 libxmlb1
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
19:29:36 P15v:master$ git clone https://github.com/google/android-cuttlefish
Cloning into 'android-cuttlefish'...
remote: Enumerating objects: 4659, done.
remote: Counting objects: 100% (4659/4659), done.
remote: Compressing objects: 100% (1704/1704), done.
remote: Total 4659 (delta 2783), reused 4599 (delta 2752), pack-reused 0
Receiving objects: 100% (4659/4659), 1.63 MiB | 1.26 MiB/s, done.
Resolving deltas: 100% (2783/2783), done.
19:29:46 P15v:master$ mv android-cuttlefish/ ../
19:29:53 P15v:master$ cd android-c
bash: cd: android-c: No such file or directory
19:29:55 P15v:master$ cd ../android-cuttlefish/
19:30:02 P15v:android-cuttlefish$ ll
total 52
drwxrwxr-x  7 liuyq liuyq  4096 12月 19 19:29 ./
drwxrwxr-x 11 liuyq liuyq  4096 12月 19 19:29 ../
drwxrwxr-x  4 liuyq liuyq  4096 12月 19 19:29 base/
-rw-rw-r--  1 liuyq liuyq   969 12月 19 19:29 CONTRIBUTING.md
drwxrwxr-x  6 liuyq liuyq  4096 12月 19 19:29 docker/
drwxrwxr-x  5 liuyq liuyq  4096 12月 19 19:29 frontend/
drwxrwxr-x  8 liuyq liuyq  4096 12月 19 19:29 .git/
drwxrwxr-x  3 liuyq liuyq  4096 12月 19 19:29 .github/
-rw-rw-r--  1 liuyq liuyq   218 12月 19 19:29 .gitignore
-rw-rw-r--  1 liuyq liuyq 11358 12月 19 19:29 LICENSE
-rw-rw-r--  1 liuyq liuyq  2509 12月 19 19:29 README.md
19:30:03 P15v:android-cuttlefish$ for dir in base frontend; do
>   cd $dir
>   debuild -i -us -uc -b -d
>   cd ..
> done
 dpkg-buildpackage -us -uc -ui -i -b -d
dpkg-buildpackage: info: source package cuttlefish-common
dpkg-buildpackage: info: source version 0.9.25
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Jorge Moreira Broche <jemoreira@google.com>
 dpkg-source -i --before-build .
dpkg-buildpackage: info: host architecture amd64
 fakeroot debian/rules clean
dh clean --with=config-package
   dh_clean
 debian/rules build
dh build --with=config-package
   dh_update_autotools_config
   dh_autoreconf
   create-stamp debian/debhelper-build-stamp
 fakeroot debian/rules binary
dh binary --with=config-package
   dh_testroot
   dh_prep
   dh_install
   dh_installdocs
   dh_installchangelogs
   debian/rules override_dh_installinit
make[1]: Entering directory '/home/liuyq/data/android/android-cuttlefish/base'
dh_installinit --name=cuttlefish-host-resources
dh_installinit
make[1]: Leaving directory '/home/liuyq/data/android/android-cuttlefish/base'
   dh_installudev
   dh_perl
   dh_configpackage
   dh_link
   dh_strip_nondeterminism
   dh_compress
   dh_fixperms
   dh_missing
   dh_dwz
   dh_strip
   dh_makeshlibs
   dh_shlibdeps
   dh_installdeb
   dh_gencontrol
dpkg-gencontrol: warning: Depends field of package cuttlefish-integration: substitution variable ${shlibs:Depends} used, but is not defined
dpkg-gencontrol: warning: Depends field of package cuttlefish-base: substitution variable ${shlibs:Depends} used, but is not defined
   dh_md5sums
   dh_builddeb
dpkg-deb: building package 'cuttlefish-common' in '../cuttlefish-common_0.9.25_amd64.deb'.
dpkg-deb: building package 'cuttlefish-integration' in '../cuttlefish-integration_0.9.25_amd64.deb'.
dpkg-deb: building package 'cuttlefish-base' in '../cuttlefish-base_0.9.25_amd64.deb'.
 dpkg-genbuildinfo --build=binary
 dpkg-genchanges --build=binary >../cuttlefish-common_0.9.25_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source -i --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)
Now running lintian cuttlefish-common_0.9.25_amd64.changes ...
E: cuttlefish-base: maintainer-address-missing Cuttlefish Team
E: cuttlefish-common: maintainer-address-missing Cuttlefish Team
E: cuttlefish-integration: maintainer-address-missing Cuttlefish Team
W: cuttlefish-base: binary-without-manpage usr/bin/install_zip.sh
W: cuttlefish-base: missing-systemd-service-for-init.d-script cuttlefish-host-resources
W: cuttlefish-base: script-with-language-extension usr/bin/install_zip.sh
Finished running lintian.
 dpkg-buildpackage -us -uc -ui -i -b -d
dpkg-buildpackage: info: source package cuttlefish-frontend
dpkg-buildpackage: info: source version 0.9.25
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Jorge Moreira Broche <jemoreira@google.com>
 dpkg-source -i --before-build .
dpkg-buildpackage: info: host architecture amd64
 fakeroot debian/rules clean
dh clean --with=config-package
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/liuyq/data/android/android-cuttlefish/frontend'
rm -f src/host_orchestrator/host_orchestrator
dh_auto_clean
make[1]: Leaving directory '/home/liuyq/data/android/android-cuttlefish/frontend'
   dh_clean
 debian/rules build
dh build --with=config-package
   dh_update_autotools_config
   dh_autoreconf
   debian/rules override_dh_auto_build
make[1]: Entering directory '/home/liuyq/data/android/android-cuttlefish/frontend'
src/goutil src/host_orchestrator build -v -ldflags="-w"
+ cd src/host_orchestrator
+ shift
+ mkdir -p /tmp/go
+ export GOPATH=/tmp/go
+ GOPATH=/tmp/go
+ export GOCACHE=/tmp/go/go-build
+ GOCACHE=/tmp/go/go-build
+ GOBIN=go
+ command -v go
+ go build -v -ldflags=-w
github.com/google/android-cuttlefish/frontend/src/liboperator/api/v1
github.com/google/android-cuttlefish/frontend/src/liboperator/operator
github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator
github.com/google/android-cuttlefish/frontend/src/host_orchestrator
src/goutil src/operator build -v -ldflags="-w"
+ cd src/operator
+ shift
+ mkdir -p /tmp/go
+ export GOPATH=/tmp/go
+ GOPATH=/tmp/go
+ export GOCACHE=/tmp/go/go-build
+ GOCACHE=/tmp/go/go-build
+ GOBIN=go
+ command -v go
+ go build -v -ldflags=-w
github.com/google/android-cuttlefish/frontend/src/operator
./build-webui.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21.3M  100 21.3M    0     0  3822k      0  0:00:05  0:00:05 --:--:-- 5175k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3153    0  3153    0     0    522      0 --:--:--  0:00:06 --:--:--   731
node-v16.17.0-linux-x64.tar.xz: OK
npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated

added 1086 packages, and audited 1087 packages in 5s

150 packages are looking for funding
  run `npm fund` for details

2 high severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
- Generating browser application bundles (phase: setup)...
✔ Browser application bundle generation complete.
✔ Browser application bundle generation complete.
- Copying assets...
✔ Copying assets complete.
- Generating index html...
✔ Index html generation complete.

Initial Chunk Files           | Names         |  Raw Size | Estimated Transfer Size
main.e292cdce26945fb6.js      | main          | 336.91 kB |                85.91 kB
styles.c662a49d7df8afc1.css   | styles        |  73.99 kB |                 7.63 kB
polyfills.e49f37584f4b95c6.js | polyfills     |  33.06 kB |                10.65 kB
runtime.83f0d7206eaccafc.js   | runtime       |   1.04 kB |               598 bytes

| Initial Total | 445.00 kB |               104.78 kB

Build at: 2022-12-19T11:30:50.204Z - Hash: 99bfac39935fde29 - Time: 12228ms
make[1]: Leaving directory '/home/liuyq/data/android/android-cuttlefish/frontend'
   debian/rules override_dh_auto_test
make[1]: Entering directory '/home/liuyq/data/android/android-cuttlefish/frontend'
src/goutil src/liboperator test ./...
+ cd src/liboperator
+ shift
+ mkdir -p /tmp/go
+ export GOPATH=/tmp/go
+ GOPATH=/tmp/go
+ export GOCACHE=/tmp/go/go-build
+ GOCACHE=/tmp/go/go-build
+ GOBIN=go
+ command -v go
+ go test ./...
?       github.com/google/android-cuttlefish/frontend/src/liboperator/api/v1    [no test files]
ok      github.com/google/android-cuttlefish/frontend/src/liboperator/operator  0.002s
src/goutil src/host_orchestrator test ./...
+ cd src/host_orchestrator
+ shift
+ mkdir -p /tmp/go
+ export GOPATH=/tmp/go
+ GOPATH=/tmp/go
+ export GOCACHE=/tmp/go/go-build
+ GOCACHE=/tmp/go/go-build
+ GOBIN=go
+ command -v go
+ go test ./...
?       github.com/google/android-cuttlefish/frontend/src/host_orchestrator [no test files]
ok      github.com/google/android-cuttlefish/frontend/src/host_orchestrator/orchestrator    1.154s
src/goutil src/operator test ./...
+ cd src/operator
+ shift
+ mkdir -p /tmp/go
+ export GOPATH=/tmp/go
+ GOPATH=/tmp/go
+ export GOCACHE=/tmp/go/go-build
+ GOCACHE=/tmp/go/go-build
+ GOBIN=go
+ command -v go
+ go test ./...
?       github.com/google/android-cuttlefish/frontend/src/operator  [no test files]
dh_auto_test
make[1]: Leaving directory '/home/liuyq/data/android/android-cuttlefish/frontend'
   create-stamp debian/debhelper-build-stamp
 fakeroot debian/rules binary
dh binary --with=config-package
   dh_testroot
   dh_prep
   dh_install
   dh_installdocs
   dh_installchangelogs
   debian/rules override_dh_installinit
make[1]: Entering directory '/home/liuyq/data/android/android-cuttlefish/frontend'
dh_installinit --name=cuttlefish-operator
dh_installinit --name=cuttlefish-host_orchestrator
dh_installinit
make[1]: Leaving directory '/home/liuyq/data/android/android-cuttlefish/frontend'
   dh_perl
   dh_configpackage
   dh_link
   dh_strip_nondeterminism
   dh_compress
   dh_fixperms
   dh_missing
   dh_dwz
dwz: debian/cuttlefish-orchestration/usr/lib/cuttlefish-common/bin/host_orchestrator: .debug_info section not present
dwz: debian/cuttlefish-user/usr/lib/cuttlefish-common/bin/operator: .debug_info section not present
   dh_strip
dh_strip: warning: Could not find the BuildID in debian/cuttlefish-user/usr/lib/cuttlefish-common/bin/operator
dh_strip: warning: Could not find the BuildID in debian/cuttlefish-orchestration/usr/lib/cuttlefish-common/bin/host_orchestrator
   dh_makeshlibs
   dh_shlibdeps
   dh_installdeb
   dh_gencontrol
   dh_md5sums
   dh_builddeb
dpkg-deb: building package 'cuttlefish-user' in '../cuttlefish-user_0.9.25_amd64.deb'.
dpkg-deb: building package 'cuttlefish-orchestration' in '../cuttlefish-orchestration_0.9.25_amd64.deb'.
 dpkg-genbuildinfo --build=binary
 dpkg-genchanges --build=binary >../cuttlefish-frontend_0.9.25_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source -i --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)
Now running lintian cuttlefish-frontend_0.9.25_amd64.changes ...
E: cuttlefish-orchestration: init.d-script-needs-depends-on-lsb-base etc/init.d/cuttlefish-host_orchestrator (line 32)
E: cuttlefish-user: init.d-script-needs-depends-on-lsb-base etc/init.d/cuttlefish-operator (line 32)
E: cuttlefish-orchestration: maintainer-address-missing Cuttlefish Team
E: cuttlefish-user: maintainer-address-missing Cuttlefish Team
W: cuttlefish-orchestration: breaks-without-version cuttlefish-user
W: cuttlefish-user: breaks-without-version cuttlefish-orchestration
W: cuttlefish-orchestration: hardening-no-pie usr/lib/cuttlefish-common/bin/host_orchestrator
W: cuttlefish-user: hardening-no-pie usr/lib/cuttlefish-common/bin/operator
W: cuttlefish-orchestration: hardening-no-relro usr/lib/cuttlefish-common/bin/host_orchestrator
W: cuttlefish-user: hardening-no-relro usr/lib/cuttlefish-common/bin/operator
W: cuttlefish-orchestration: missing-systemd-service-for-init.d-script cuttlefish-host_orchestrator
W: cuttlefish-user: missing-systemd-service-for-init.d-script cuttlefish-operator
W: cuttlefish-orchestration: privacy-breach-generic usr/share/cuttlefish-common/host_orchestrator/static/index.html [<link rel="preconnect" href="https://fonts.gstatic.com">] (https://fonts.gstatic.com)
W: cuttlefish-user: privacy-breach-generic usr/share/cuttlefish-common/operator/static/index.html [<link rel="preconnect" href="https://fonts.gstatic.com">] (https://fonts.gstatic.com)
Finished running lintian.
19:30:57 P15v:android-cuttlefish$ sudo dpkg -i ./cuttlefish-base_*_*64.deb || sudo apt-get install -f
(Reading database ... 266611 files and directories currently installed.)
Preparing to unpack .../cuttlefish-base_0.9.25_amd64.deb ...
Unpacking cuttlefish-base (0.9.25) over (0.9.25) ...
Setting up cuttlefish-base (0.9.25) ...
Processing triggers for systemd (245.4-4ubuntu3.19) ...
19:31:18 P15v:android-cuttlefish$ sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f
(Reading database ... 266611 files and directories currently installed.)
Preparing to unpack .../cuttlefish-user_0.9.25_amd64.deb ...
Unpacking cuttlefish-user (0.9.25) over (0.9.25) ...
Setting up cuttlefish-user (0.9.25) ...
Processing triggers for systemd (245.4-4ubuntu3.19) ...
19:31:19 P15v:android-cuttlefish$ sudo usermod -aG kvm,cvdnetwork,render $USER
19:31:22 P15v:android-cuttlefish$ sudo reboot
liuyq commented 1 year ago

using chrome to access https://localhost:8443/ firefox might not work.

19:43:52 P15v:master$ acloud create --local-instance --local-image
exe I 12-19 19:44:07  7950  7950 server.cc:422] Starting server
Creating local AVD instance with the following details:
Image (local):
  /home/liuyq/data/android/master/out/target/product/vsoc_x86_64
hw config:
  cpu - 4
  ram - 2GB
  display - 720x1280 (320 DPI)

Waiting for AVD(s) to boot up ...OK! (24s)
* daemon not running; starting now at tcp:5037
* daemon started successfully
Total time:  (26s)

Device summary:
 - device serial: 0.0.0.0:6520 (local-instance-1[0.0.0.0:6520])

Note: To ensure Tradefed uses this AVD, please run:
    export ANDROID_SERIAL=0.0.0.0:6520
19:44:34 P15v:master$