Status Update
Comments
am...@google.com <am...@google.com>
ya...@google.com <ya...@google.com>
ws...@gmail.com <ws...@gmail.com> #3
Branch: androidx-main
commit a735aaa4d06c90454de772fae5a02f6cbde210b3
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Feb 28 22:58:23 2023
Ensure FragmentNavigator destroys intermediate entries on popUpTo
We need to make sure that when Fragment are destroyed their entries are
also always destroyed.
RelNote: "Fixes a regressions in previous release that caused the wrong
BottomNav menu item to be highlighted when using system back to go
between tabs."
Test: Added FragmentNavigatorTest
Bug: 270447657
Change-Id: I634f6047b7016bcb8b690047605a6f66b2dc1438
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/FragmentNavigatorTest.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.kt
bo...@google.com <bo...@google.com> #4
This has been fixed internally and will be available in the Navigation 2.6.0-alpha07
release.
ws...@gmail.com <ws...@gmail.com> #5
Branch: androidx-main
commit 96cee05bdb8f61a92e4be00a52b991cfc1ed2f4e
Author: Clara Fok <clarafok@google.com>
Date: Wed Mar 01 12:28:09 2023
Add FragmentNavigator test to assert entry destroyed
Add test to assert that NavBackStackEntry is destroyed after being restored upon recreation/configuration change.
Asserts that the fix on this bug also fixes
Test: ./gradlew navigation:navigation-fragment
Bug: 270447657
Change-Id: I8874d2dfaa17e560dd2f6d9da54e435494c187d2
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/FragmentNavigatorTest.kt
ws...@gmail.com <ws...@gmail.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-fragment:2.6.0-alpha07
bo...@google.com <bo...@google.com> #7
Branch: androidx-main
commit 7cf55857f0db6bd1a1e1f95be7374ed5cf3eca58
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Mar 15 16:59:50 2023
Fix system back after popUpTo
After you do a popUpTo inclusive while using Navigation with Fragments,
if you attempt to do a system back call, the Navigation back stack is
never updated.
The reason for this is that when fragment views are DESTROYED, we need
for the observer in the FragmentNavigator to update the state so we know
that the entry was already popped.
RelNote: "When using system back after doing a navigate with popUpTo,
the state of the NavController will pop to the correct entry."
Test: Added OnBackPressedTest
Bug: 270447657
Change-Id: I3a8ec072ba6d1655ab054cc081961825909088e6
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/OnBackPressedTest.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.kt
bo...@google.com <bo...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-fragment:2.6.0-alpha08
ws...@gmail.com <ws...@gmail.com> #9
$ pwd
/export/workspace/our-app/build/emulators/30-atd
$ ls -p
cache.img config.ini emulator-user.ini encryptionkey.img hardware-qemu.ini read-snapshot.txt sdcard.img.qcow2 system/ userdata-qemu.img.qcow2
cache.img.qcow2 emulator-avd.ini emu-launch-params.txt encryptionkey.img.qcow2 multiinstance.lock sdcard.img snapshots/ userdata-qemu.img version_num.cache
(yes, we have both config.ini
and emulator-avd.ini
in the same folder... ANDROID_AVD_HOME points directly to the AVD directory, /export/workspace/our-app/build/emulators/30-atd)
emulator-avd.ini
avd.ini.encoding=UTF-8
path.rel=.
path=/export/workspace/our-app/build/emulators/30-atd
target=android-30
config.ini
abi.type = x86
avd.ini.encoding = UTF-8
disk.dataPartition.size = 6442450944
hw.accelerometer = yes
hw.audioInput = yes
hw.battery = yes
hw.camera.back = none
hw.camera.front = none
hw.cpu.arch = x86
hw.cpu.ncore = 1
hw.dPad = no
hw.device.manufacturer = Google
hw.device.name = Nexus 5
hw.gps = yes
hw.gpu.enabled = no
hw.keyboard = yes
hw.lcd.backlight = no
hw.lcd.density = 160
hw.lcd.vsync = 488
hw.mainKeys = no
hw.ramSize = 2048
hw.sdCard = yes
hw.sensors.orientation = yes
hw.sensors.proximity = yes
hw.trackBall = no
image.sysdir.1 = /export/workspace/our-app/build/emulators/30-atd/system/x86
runtime.network.latency = none
runtime.network.speed = full
runtime.scalefactor = auto
sdcard.size = 128M
snapshot.present = no
tag.display = Default
tag.id = default
vm.heapSize = 512
Emulator 31.3.10:
$ ANDROID_SDK_ROOT=/android-emulator-sdk ANDROID_AVD_HOME="$(pwd)" /android-emulator-sdk/emulator/emulator -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
INFO | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
WARNING | Failed to process .ini file /home/coder/.android/./config.ini for reading.
WARNING | Found AVD target architecture: arm
INFO | Found AVD target architecture: arm
INFO | argv[0]: '/android-emulator-sdk/emulator/emulator'; program directory: '/android-emulator-sdk/emulator'
emulator: INFO: Use user provided system path ./system/x86
INFO | emuDirName: '/android-emulator-sdk/emulator'
emulator: INFO: Use user provided system path ./system/x86
INFO | Probing for ./system/x86/kernel-ranchu-64: file exists
INFO | try dir /android-emulator-sdk/emulator
INFO | Trying emulator path '/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless'
INFO | Found target-specific 64-bit emulator binary: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/gles_swiftshader'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/libstdc++'
VERBOSE | emulator: Running :/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless
VERBOSE | qemu backend: argv[00] = "/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless"
VERBOSE | qemu backend: argv[01] = "-avd"
VERBOSE | qemu backend: argv[02] = "emulator-avd"
VERBOSE | qemu backend: argv[03] = "-no-boot-anim"
VERBOSE | qemu backend: argv[04] = "-read-only"
VERBOSE | qemu backend: argv[05] = "-no-window"
VERBOSE | qemu backend: argv[06] = "-verbose"
VERBOSE | qemu backend: argv[07] = "-skin"
VERBOSE | qemu backend: argv[08] = "320x640"
VERBOSE | qemu backend: argv[09] = "-port"
VERBOSE | qemu backend: argv[10] = "5554"
VERBOSE | qemu backend: argv[11] = "-partition-size"
VERBOSE | qemu backend: argv[12] = "2048"
VERBOSE | qemu backend: argv[13] = "-memory"
VERBOSE | qemu backend: argv[14] = "1024"
VERBOSE | qemu backend: argv[15] = "-gpu"
VERBOSE | qemu backend: argv[16] = "swiftshader_indirect"
VERBOSE | qemu backend: argv[17] = "-sysdir"
VERBOSE | qemu backend: argv[18] = "./system/x86"
VERBOSE | qemu backend: argv[19] = "-system"
VERBOSE | qemu backend: argv[20] = "./system/x86/system.img"
VERBOSE | qemu backend: argv[21] = "-ramdisk"
VERBOSE | qemu backend: argv[22] = "./system/x86/ramdisk.img"
VERBOSE | qemu backend: argv[23] = "-qemu"
VERBOSE | qemu backend: argv[24] = "-enable-kvm"
VERBOSE | Concatenated backend parameters: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
INFO | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
VERBOSE | autoconfig: -skindir (null)
ERROR | This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
ERROR | ANDROID_SDK_ROOT is defined (/android-emulator-sdk) but cannot find kernel file in /android-emulator-sdk/system-images/ sub directories
Emulator 31.2.10:
$ ANDROID_SDK_ROOT=/android-emulator-sdk ANDROID_AVD_HOME="$(pwd)" /android-emulator-sdk/emulator/emulator -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
INFO | Android emulator version 31.2.10.0 (build_id 8420304) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
INFO | Found AVD target architecture: x86
INFO | argv[0]: '/android-emulator-sdk/emulator/emulator'; program directory: '/android-emulator-sdk/emulator'
INFO | emuDirName: '/android-emulator-sdk/emulator'
INFO | Probing for ./system/x86/kernel-ranchu-64: file exists
INFO | try dir /android-emulator-sdk/emulator
INFO | Trying emulator path '/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless'
INFO | Found target-specific 64-bit emulator binary: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/gles_swiftshader'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/libstdc++'
VERBOSE | emulator: Running :/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless
VERBOSE | qemu backend: argv[00] = "/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless"
VERBOSE | qemu backend: argv[01] = "-avd"
VERBOSE | qemu backend: argv[02] = "emulator-avd"
VERBOSE | qemu backend: argv[03] = "-no-boot-anim"
VERBOSE | qemu backend: argv[04] = "-read-only"
VERBOSE | qemu backend: argv[05] = "-no-window"
VERBOSE | qemu backend: argv[06] = "-verbose"
VERBOSE | qemu backend: argv[07] = "-skin"
VERBOSE | qemu backend: argv[08] = "320x640"
VERBOSE | qemu backend: argv[09] = "-port"
VERBOSE | qemu backend: argv[10] = "5554"
VERBOSE | qemu backend: argv[11] = "-partition-size"
VERBOSE | qemu backend: argv[12] = "2048"
VERBOSE | qemu backend: argv[13] = "-memory"
VERBOSE | qemu backend: argv[14] = "1024"
VERBOSE | qemu backend: argv[15] = "-gpu"
VERBOSE | qemu backend: argv[16] = "swiftshader_indirect"
VERBOSE | qemu backend: argv[17] = "-sysdir"
VERBOSE | qemu backend: argv[18] = "./system/x86"
VERBOSE | qemu backend: argv[19] = "-system"
VERBOSE | qemu backend: argv[20] = "./system/x86/system.img"
VERBOSE | qemu backend: argv[21] = "-ramdisk"
VERBOSE | qemu backend: argv[22] = "./system/x86/ramdisk.img"
VERBOSE | qemu backend: argv[23] = "-qemu"
VERBOSE | qemu backend: argv[24] = "-enable-kvm"
VERBOSE | Concatenated backend parameters: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
VERBOSE | autoconfig: -skindir (null)
VERBOSE | autoconfig: -kernel ./system/x86/kernel-ranchu-64
VERBOSE | Target arch = 'x86'
VERBOSE | Auto-config: -qemu -cpu qemu32
VERBOSE | Auto-detect: Kernel image requires new device naming scheme.
VERBOSE | Auto-detect: Kernel does not support YAFFS2 partitions.
VERBOSE | Using initial system image: ./system/x86/system.img
VERBOSE | Using initial vendor image: ./system/x86/vendor.img
VERBOSE | autoconfig: -data /export/workspace/our-app/build/emulators/30-atd/userdata-qemu.img
VERBOSE | autoconfig: -initdata (null)
VERBOSE | autoconfig: -cache /export/workspace/our-app/build/emulators/30-atd/cache.img
VERBOSE | autoconfig: -sdcard /export/workspace/our-app/build/emulators/30-atd/sdcard.img
VERBOSE | Increasing RAM size to 2048MB
VERBOSE | System image is read only
...
<continues to boot from here, let me know if you need more...>
You can see the differences in the logs in the first few lines, so I'm not sure why all these verbose logs are necessary...
INFO | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
WARNING | Failed to process .ini file /home/coder/.android/./config.ini for reading.
WARNING | Found AVD target architecture: arm
vs
INFO | Android emulator version 31.2.10.0 (build_id 8420304) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
INFO | Found AVD target architecture: x86
Not sure what's happening in 31.3.10 to pick up /home/coder/.android/./config.ini
. It seems like the path lookup from emulator-avd.ini
is broken.
bo...@google.com <bo...@google.com> #10
that is why it was trying (unsuccessfully) to read $HOME/.android/./config.ini
ws...@gmail.com <ws...@gmail.com> #11
ANDROID_HOME is set to the same thing as ANDROID_SDK_ROOT. Doesn't help.
bo...@google.com <bo...@google.com> #12
could you remove the path.rel=. and try again?
ws...@gmail.com <ws...@gmail.com> #13
Yes, that worked. Thanks! Any idea why this changed? This is still a bug, right?
bo...@google.com <bo...@google.com> #14
explanation:
emulator 31.2 takes absolute path first, and 31.3 take relative path first.
it turned out relative path code path ignores the ANDROID_AVD_HOME (both 31.2 and 31.3 ignore), and that only
works for default ANDROID_HOME setup (/home/user/.android)
will fix this
sorry for the inconvenience and thanks for reporting the bug to us.
ws...@gmail.com <ws...@gmail.com> #15
That makes sense. Thank you!
ws...@gmail.com <ws...@gmail.com> #17
Yes, this artifact works fine. Any idea when this could be released?
de...@google.com <de...@google.com> #19
to...@gmail.com <to...@gmail.com> #20
tonyvg2013@gmail.com
Tony if you want to contact me for some questions or related topic it would be great.
I have been a whitness for the activity of my friends and others over 35 individual cases of the same MO.
Description
We're running the
emulator
CLI, using the latestAPI 30 AOSP ATD x86
image, on an x86_64 host, like this:/android-emulator-sdk/emulator/emulator -avd emulator-avd -no-boot-anim -read-only -verbose -no-window -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
On emulator 31.2.10:
and the emulator starts successfully.
On emulator 31.3.10:
Eventually failing with this:
(Note: we pass the
-sysdir
arg explicitly, since our system images are not stored in the SDK directory.)Found AVD target architecture: arm, thus trying to run qemu-system-aarch64-headless, seems likely to be the root cause?