Fixed
Status Update
Comments
di...@google.com <di...@google.com> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
Please provide source code or sample project to reproduce the issue.
Also kindly mention the steps to be followed for reproducing the issue with the given sample application.
Expected output
What is the expected output?
Current output
What is the current output?
Attach the complete bugreport.
Please provide source code or sample project to reproduce the issue.
Also kindly mention the steps to be followed for reproducing the issue with the given sample application.
Expected output
What is the expected output?
Current output
What is the current output?
Attach the complete bugreport.
di...@google.com <di...@google.com> #3
Ok, I've attached a sample project.
Reproducing the issue:
- deploy app using Android Studio
- click the FAB at the bottom right
- a Snackbar should show up with the text "Is running: false"
- click the "Enable" button and enable the Notification Service for the app
- go back and click the FAB again.
- the text "Is running: true" should show up
- deploy the app again using Android Studio.
- click the FAB at the bottom right
- Most of the times (not always) this shows "Is running: false".If it shows that it's running try deploying again
- if you go to enable it you'll see that the service is already enabled
- If you disabled and re-enable it, most of the times it will still not work. Android simply doesn't enable the service. Sometimes it works though, so try this multiple times
Expected output:
The service should be automatically restarted after the app stops (due to a re-deploy, an app crash or any other circumstance)
Current output:
The service is not automatically restarted and cannot be restarted even if the user toggles it off and on again. The only thing that restarts it is rebooting the device
Reproducing the issue:
- deploy app using Android Studio
- click the FAB at the bottom right
- a Snackbar should show up with the text "Is running: false"
- click the "Enable" button and enable the Notification Service for the app
- go back and click the FAB again.
- the text "Is running: true" should show up
- deploy the app again using Android Studio.
- click the FAB at the bottom right
- Most of the times (not always) this shows "Is running: false".If it shows that it's running try deploying again
- if you go to enable it you'll see that the service is already enabled
- If you disabled and re-enable it, most of the times it will still not work. Android simply doesn't enable the service. Sometimes it works though, so try this multiple times
Expected output:
The service should be automatically restarted after the app stops (due to a re-deploy, an app crash or any other circumstance)
Current output:
The service is not automatically restarted and cannot be restarted even if the user toggles it off and on again. The only thing that restarts it is rebooting the device
[Deleted User] <[Deleted User]> #4
Thanks for your feedback
We are not able to reproduce the issue as mentioned steps in comment #3 with latest Android Oreo build.
Attached the video for more information.
Please let us know if we need take any precondition to reproduce the issue.
if you are still facing the issue in latest android Oreo build please attach that bugreport
We are not able to reproduce the issue as mentioned steps in
Attached the video for more information.
Please let us know if we need take any precondition to reproduce the issue.
if you are still facing the issue in latest android Oreo build please attach that bugreport
en...@google.com <en...@google.com> #5
Hi again. You didn't deploy the app again with Android Studio like the steps mentioned.
I've now updated the project (attached) with a button to crash the app to make the steps easier for you.
- Crash the app
- Choose to "Close the app" in the Android dialog that follows.
The service should not restart automatically in that situation.
Check the attached video if you need clarification.
Thanks again.
I've now updated the project (attached) with a button to crash the app to make the steps easier for you.
- Crash the app
- Choose to "Close the app" in the Android dialog that follows.
The service should not restart automatically in that situation.
Check the attached video if you need clarification.
Thanks again.
[Deleted User] <[Deleted User]> #6
We have shared this with our engineering team and will update this issue with more information as it becomes available.
rp...@google.com <rp...@google.com> #7
I was directed here by a comment on my review of the app in the store:
Developer response:
That's an Android bug actually. You can fix it by rebooting your device. I've reported it here:https://issuetracker.google.com/issues/75414169 Hope this clarifies it!
Restarting has not fixed this issue, as I have restarted plenty of times since this started occurring. My problem is that Tasker stopped working, basically. I only have two profile set up: one to silence my phone when bluetooth is connected, and one to turn back on the sound when wifi is connected. Both of these worked fine and now they have stopped. When I connect to wifi, I see a message appear near the bottom of my screen and it tells me permission is still needed. When I check app permissions for Tasker, all of them are enabled. This seems like a pretty basic thing for Tasker to do, and yet it just doesn't work anymore making this app useless to me.
Developer response:
That's an Android bug actually. You can fix it by rebooting your device. I've reported it here:
Restarting has not fixed this issue, as I have restarted plenty of times since this started occurring. My problem is that Tasker stopped working, basically. I only have two profile set up: one to silence my phone when bluetooth is connected, and one to turn back on the sound when wifi is connected. Both of these worked fine and now they have stopped. When I connect to wifi, I see a message appear near the bottom of my screen and it tells me permission is still needed. When I check app permissions for Tasker, all of them are enabled. This seems like a pretty basic thing for Tasker to do, and yet it just doesn't work anymore making this app useless to me.
rp...@google.com <rp...@google.com>
ap...@google.com <ap...@google.com> #8
I second that: restarting doesn't fix the issue. In Tasker, I have a task that blocks Telegram messages by title while playing Boom Beach and that needs the AutoNotification Intercept notification access permission enabled to do so. After enabling the access permission, I start Boom Beach - but, it tells me that the AutoNotification Intercept notification access permission is disabled when it actually is enabled.
rp...@google.com <rp...@google.com> #9
We will be closing this bug as Obsolete. If you still think this issue is reproducible and relevant in the latest Android release (Android Q), please attach a new bug report along with reproduction details. If a reply is not received within the next 14 days, this issue will be closed. Thank you for your understanding.
Description
I'm reporting this just to highlight the dependency of the method used to determine the address is dependent on an implementation detail that it isn't clear from the documentation or source code. This might help people doing similar investigations in the future.
I will be raising a PR on LLD to see if I can get the behaviour changed to match, potentially under the --[no-]apply-dynamic-relocs (which was added to ld.gold and ld.bfd to account for
This is done in linker_main.cpp
extern "C" ElfW(Addr) __linker_init(void* raw_args) {
KernelArgumentBlock args(raw_args);
// AT_BASE is set to 0 in the case when linker is run by iself
// so in order to link the linker it needs to calcuate AT_BASE
// using information at hand. The trick below takes advantage
// of the fact that the value of linktime_addr before relocations
// are run is an offset and this can be used to calculate AT_BASE.
static uintptr_t linktime_addr = reinterpret_cast<uintptr_t>(&linktime_addr);
ElfW(Addr) linker_addr = reinterpret_cast<uintptr_t>(&linktime_addr) - linktime_addr;
The key part in the comment above is: "The trick below takes advantage of the fact that the value of linktime_addr before relocations are run is an offset and this can be used to calculate AT_BASE".
On AArch64 this property only holds for ld.gold, and not for ld.lld or for older versions of ld.bfd. On AArch64 RELA relocations are used, these have the property that the addend is encoded in the relocation directive, the dynamic loader ignores the value in the place of the relocation. This means that the value linktime_addr must be in the addend of the RELA relocation, the value of linktime_addr in the data section is not used. As the value of linktime_addr is not used in the relocation calculation both ld.lld and ld.bfd do not write the value into the data section. As a result linktime_addr will always be 0 prior to relocation which obviously causes the linker_addr calculation to give an incorrect result.
This effect can be observed on AArch64 with a small example that extracts the code sequence above:
#include <stdint.h>
int _start(void) {
static uintptr_t linktime_addr = reinterpret_cast<uintptr_t>(&linktime_addr);
uintptr_t linker_addr = reinterpret_cast<uintptr_t>(&linktime_addr) - linktime_addr;
return linker_addr;
}
Using an older ld.bfd from binutils 2.25 or earlier:
When compiled and linked --target=aarch64-linux-gnu --shared -fpic with -fuse-ld=bfd -O2 and disassembled with objdump -s -R -t , I get the following:
SYMBOL TABLE:
0000000000011018 l O .data 0000000000000008 _ZZ6_startvE13linktime_addr
DYNAMIC RELOCATION RECORDS
0000000000011018 R_AARCH64_RELATIVE *ABS*+0x0000000000011018
Contents of section .data:
11010 00000000 00000000 00000000 00000000 ................
Note that the relocation addend has the address of _ZZ6_startvE13linktime_addr but the .data entry does not.
The ld.bfd behaviour was changed in
I note that glibc for AArch64 uses the _DYNAMIC symbol that is also written into _GLOBAL_OFFSET_TABLE_[0]. This is a SVr4 convention that might be a possible alternative, however it seems like there is no single convention used on all platforms so I'm hesitant to promote it as a universal solution. Ideally we can find a convention that all the static linkers can support.