text:
init: cannot execve('/system/bin/custom.sh'): Permission denied
I have a rooted system-as-root Samsung Device and I am trying to run an init service which runs custom.sh script using u:r:su:s0 SELinux context.
# define service, use executable here if script not needed
service custom /system/bin/custom.sh

    # don't start unless explicitly asked to
    disabled

    # Use `seclabel u:r:magisk:s0` to run with unrestricted SELinux context to avoid avc denials
    # can also use "u:r:su:s0" on userdebug / eng builds if no Magisk.
    # It's required if SELinux is enforcing and service needs access
    # to some system resources not allowed by default sepolicy
    seclabel u:r:su:s0

# start the service when boot is completed
on property:sys.boot_completed=1
    # Use it to start the service
    start custom

As per my understanding, the rules for transition from init context to su context is not defined so, I should get avc: denial error.
But, I am getting permission denied error as following:

init: cannot execve('/system/bin/custom.sh'): Permission denied

I have checked the permission of custom.sh file and it is as following:

-r-xr-xr-- 1 root root 153 2019-11-04 13:25 /system/custom.sh

Please suggest what is happening here and how can I fix it?

As evident from init source code:
...
static bool ExpandArgsAndExecv(const std::vector<std::string>& args) {
    ...
    return execv(c_strings[0], c_strings.data()) == 0;
}
...
        if (!ExpandArgsAndExecv(args_)) {
            PLOG(ERROR) << "cannot execve('" << args_[0] << "')";
        }

For whatever reason if init fails to execute the script custom.sh (i.e. syscall execve returns non-zero exit code), you will get cannot execve error. Permission denied (EACCES) is returned by execve in multiple situations e.g. unable to read file path, no +x permission on binary or filesystem mounted with noexec. Inability to read|open|execute script or make context transition is returned as EACCES.
Also cannot execve is logged by init but avc: denied is logged by SELinux subsystem through audit subsystem or kernel logging. You should get both errors in dmesg or logcat -b events or logcat -b kernel. If you don't, may be there is a dontaudit rule defined for source or target or both contexts.

Please suggest what is happening here and how can I fix it?

As explained in my answer to your previous question: How to run an Android init service with superuser SELinux context? define SELinux rules to allow init read / execute custom.sh script and make transition to u:r:su:s0.

I didn't find any avc: denied error for custom.sh. The only error I can see with dmesg | grep avc: is avc:  denied  { find } .. but I get your point and my understanding is: It should be fixed by injecting the required SELinux permission. Thanks.


text:
How to port forward minecraft PE Server on android
I have set up a minecraft bedrock edition server on my android phone by setting up nukkit in an ubuntu for ARM being emulated in termux terminal emulator for android and it runs pretty well and I can connect to it from my own device. But now I want to port forward it so that it is accessible from anywhere in the world, but guides online say that you need your router ip...blah,blah,blah but I dont have a router, I am using the 4g network provided by jio. How can I get my server running online?

Use the ifconfig command baked into basically every android version. You can access it by installing a terminal emulator.
However, you might not be able to access the Server running on your Device due to your provider blocking incoming connections to all mobile devices for "security reasons", or at least that is what my provider told me when I was trying to host a http web server on my android device.

Can you explain it about how to use ifconfig

On 4G network you don't get a public IP (mostly) from your MNO. So your phone won't be accessible from internet. Related: How to connect to Android through SSH over 3G/4G public IP?.
However if your device is accessible from internet, you don't need to do port forwarding. It's required only when you are behind NAT (router), but you are directly connected to internet. In case you create hotspot on Android and run server on some connected host, then you can forward port this way: How to port-forward internet using android Hotspot?

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Google pay wont work unless phone is unlocked even for small payments
I have a Samsung Note 9 (Android version 9) and Google Pay installed and configured. It works on stores like Costa for payments under £35 only when phone is unlocked
As per https://support.google.com/pay/answer/7644132?hl=en "No unlock needed for smaller payments"
Does anyone know why this is the case? I'd like that no unlocking is required for small payments.

Based on the linked help center, It seems the maximum limit for the United Kingdom is GBP 30?

Exactly! My point is that even for purchases below 30gbp I seem to have to unlock my phone

It turns out this may be a problem with the official Samsung phone clear view folding cover explained in https://www.samsung.com/uk/smartphones/galaxy-note9/accessories/
When the fold is closed I cannot use it. If I open the fold then even if the phone is locked I can use Google Pay. Removing the foldable cover altogether also works!

Not sure if they've recently updated the support answer on your link or not but it's clear you can't always pay with a locked phone even for smaller payments.

To make most purchases in stores, you need to unlock your phone. You won't need to unlock it for certain small payments.
Important: You can only make a limited amount of locked transactions before your phone will ask you to unlock it.

Personally, I have to unlock my Pixel 3A even when the payment is as small as £2.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to use "/etc/hosts" file as only DNS on Android?
On my Android-based device I need to block access to all websites except ones are in a whitelist. I know that on desktop Windows I can list allowed hosts in the hosts file and then switch the DNS in the network adapter from automatically obtained to 127.0.0.1. And now I can access only websites from the hosts file.
I've tried the same thing by adding allowed hosts in the system/etc/hosts file  on Android and then I've added the line
new_domain_name_servers="127.0.0.1 $new_domain_name_servers"

to the beggining of the file /etc/dhcpcd/dhcpcd-hooks/20-dns.conf as described by the link.
And then I've restarted my device.
But I still can access all websites, so the solution doesn't work. And even if I just add a website to be resolved as 127.0.0.1 in the hosts file and clear browser cache, the website is still opened.
PS: I'm interested only in a solution which could be done on rooted device only (Android 4.0.4)

Add allowed hosts to /etc/hosts and define these firewall rules to block any outgoing DNS queries on standard UDP port 53:
~# iptables -I OUTPUT -p udp --dport 53 -j REJECT

* May also use less rude DROP target in place of REJECT
To be on safe side also block TCP port:
~# iptables -I OUTPUT -p tcp --dport 53 -j REJECT

iptables is part of stock Android releases. You need to add these rules on every boot. Use init.d script or define init service: How to run an executable on boot?

Do you mean if I turn my device off and then turn on back, the blocking rules would not work?

@stckvrw iptables rules are not saved anywhere. You need to apply the rule(s) on every boot. Then blocking will definitely work.

Is there a way how to block all hosts except those are in the hosts permanently? For example by changing some file(s) on rooted device?

@stckvrw Is there a way how to block all hosts except those are in the hosts permanently? That's what the original question is and that's what I answered. For example by changing some file(s) on rooted device? See the link in answer. That explains how to create a file in /etc/init to execute some commands on every boot.

Sorry, maybe I understood you incorrectly. Do you mean if I add your rules to a file in /etc/init and then reboot my device, the file automatically will run the rules again without any manual actions?


text:
I set a 20 character password using Find My Device, but the lock screen only accepts 16
I used Find My Device to set a 20-character password for my phone (it accepted the password without any error messages as shown in the picture below). After I got my phone back, I went to type in the password on the lock screen, but I could only type in 16 characters.

I saw on Password too long to type in android device.Locked out from android device manager that mentioned the lock screen would accept the truncated password, but my phone does not unlock with the truncated, 16-character password.
I don't want to resort to a data erase, since I have important texts and memos, and also some contacts I don't want to lose. Is there any solution to this?

For other people with this problem - I found out that sometimes the manufacturer of the phone can unlock it or even back-up your data before a factory reset, if you go to one of their service centers.
In my case, my phone is a Samsung, but my local service center still couldn't do anything because my specific model number wasn't supported. They said they support the "popular" models like the Galaxy S series or the Note series.
So the first step would be to contact the manufacturer and see if they provide repair services for your phone. Otherwise, after this past week of research, it seems the only solution is to factory reset and wipe your data.

I would try using Find My Device again for setting a new 16-character password.

Or preferably something much shorter... like 6-8 simple characters now that it is back in the owner's possession. Remember that it could take 24-72 hours for this to actually propagate to the device.

I already tried this. Unfortunately, Find My Device only sets a password once, to lock a phone while it's lost. You can't use it to keep resetting a password.


text:
How to patch `system.img` using MagiskManager patch feature to root the device?
I have a treble and system-as-root but it is not an A/B device. I have rooted it with the help of the MagiskManager patch feature. My understanding is: MagiskManager has modified the following three files for rooting:

boot.img to remove the signatures.
vbmeta.img to remove the AVB checks(to stop flashing unauthorized binaries).
recovery.img to actually root the device by patching init and adding some files like .backup/.magisk, .backup/.init(original init) etc..

Magisk has patched the recovery.img to boot the device into root mode if you release the recovery mode key combination at a splash screen.
But my requirement is to always boot as root without needing any key combinations.
I know Magisk needs to patch the SE-Policies and init file before the init process is actually started(as it will turn ON the enforcing mode). From treble device, my understanding is that the system partition is mounted before running the init script.
I think Magisk developers have patched the recover.img because they want to follow the systemless-root approach and support for the OTA updates.
So, I want to know if MagiskManager is capable of patching my system.img file to root the device?
I know the root will be lost if any OTA will come or maybe my device will fail to update the system but this is ok with me as long as I can root it again with the same method :)
This is also fine if instead of rooting on system.img, I will be able to patch the zImage to always boot in recovery as root mode.
Please suggest if it is feasible or not. If yes then how?

It doesn't need to modify the system image – that's the idea behind it. Magisk uses "overlay file systems" to achieve that goal. And it comes with its own SuperUser, which you can configure from inside MagiskManager.

I understand that Magisk doesn't need to modify the system.img and is not recommended but my requirement is different: I can not go with recovery boot and don't need OTA updates. I just need a device that always reboots as root.

That's what Magisk already does. No change needed.

@Izzy you need to press key combo for recovery mode to boot with magisk root for some newer devices

@VatishSharma interesting question, maybe you can request this as feature in magisk support. how about other (older) classic root methods with SuperSU or KingRoot they can be installed in /system

Just a stupid idea, what happens if you swap boot and recovery partitions (flash patched recovery.img to boot)? Shouldn't it then boot into magisk by default?

@alecxs interesting. On non-A/B SAR devices boot.img doesn't have a ramdisk, kernel mounts system.img as rootfs / and then executes /init. Recovery kernel executes /init from recovery ramdisk. So both partitions have different headers and bootloader passes different command-lines to both kernels. If recovery.img is flashed to boot partition, I think bootloader won't extract recovery ramdisk since key combination isn't applied. But it depends on bootloader implementation, may work on some devices.

related/background https://android.stackexchange.com/questions/218222

@alecxs yeah I answered that. Actually it's possible to patch system.img for permanent root in normal boot without booting to recovery. But that requires some hassle (unnecessary in my opinion).

... it was easier the days before selinux, just pushing /system/bin/su and /system/app/supersu.apk and chmod 6755 or something

how about 'reboot recovery' as init.d script (kinda stupid hack)?

feel inspired by the "bootless root" method (suboot script) maybe this will give you idea https://forum.xda-developers.com/android/development/amazing-temp-root-mediatek-armv8-t3922213/post79626434

@alecxs Apps can't reboot device, so reboot recovery needs to be done from adb (which isn't a less hassle than keeping keys pressed on reboot). Or init.rc (and hence system.img) needs to be modified to run some reboot script. If system.img is to be modified then it's better to run magiskd from there, rather rebooting to recovery. // su with 6755 (even with permissive SELinux) doesn't work because zygote starts apps with PR_SET_NO_NEW_PRIVS and PR_CAPBSET_DROP. set-uid is of no use.

Stuck here: https://android.stackexchange.com/questions/218371/stuck-in-boot-loop-when-unpack-and-pack-system-img

https://forum.xda-developers.com/galaxy-s10/samsung-galaxy-s10--s10--s10-5g-cross-device-development-exynos/g97xf-multi-disabler-encryption-t3919714

I am out of my work place; will try it later. Thanks for your help.

seems it is a classic chicken-and-egg situation. the cat bites its own tail


text:
How does update_engine validate a differential update-image with dm-verity enabled?
I am working with Android 8, Android verified boot with dm-verity, and block-based differential seamless A/B updates. To my understanding, the Android update_engine performs some validations of the received update image before it proceeds to write the target partitions. AFAIK, update_engine checks if the differential update can be installed atop the current partitions. How is this check performed?
I can imagine two possibilities, but I haven't found authoritative documentation of either hypothesis:

The differential update package contains a linear hash of the source partition. On the device, update_enigne computes a SHA-256 hash of the entire partition on top of which the differential update is to be applied. It compares this value with the one provided as part of the update package and proceeds only if the two values agree.
The differential update package contains the dm-verity root hash of the Merkle-Tree used for block-wise validation with dm-verity. The update_engine compares this target root-hash with the one provided on the device in the vbmeta structure. Only if the two match, it proceeds to install the update.

Is either one of these hypotheses correct, or am I missing something? Similarly, how does the update_engine validate the target partitions once they have been written? Via a linear hash, or using the root hash? Or otherwise?

Is either one of these hypotheses correct?

I haven't experimented with A/B device so far but what I understand from official documentation and source code is that it's both. SHA-256 hash of target partition is checked against the one received from update server. And after reboot dm-verity check is performed.
From Life of an A/B update:

"5. The whole partitions are re-read and verified against the expected hash."

Additionally implementer can put extra post-installation checks. And:

"After rebooting, update_verifier triggers the integrity check using dm-verity".
  ...
"After the check completes, update_verifier marks the boot successful."

.

Android update_engine performs some validations of the received update image before it proceeds to write the target partitions

A/B updates differ from old non-A/B recovery-based updates. In latter case update package is verified twice against public keys in /system/etc/security/otacerts.zip (normal boot) and /res/keys (recovery boot). In case of Block-Based OTAs dm-verity is an additional check. But A/B updates have support for streaming updates:

"Updates can be streamed to A/B devices, removing the need to download the package before installing it. Streaming means it's not necessary for the user to have enough free space to store the update package on /data or /cache
  ...
update_engine will update the raw blocks on the currently unused partition as it streams the update package."

So it's not always possible to verify the integrity of whole update package (payload) before flashing. Instead integrity of update package is verified after updating. If something goes wrong, the older partition slot is still intact as a fallback while the updated slot is marked unbootable until next update.
.

Does that mean that update_engine computes a complete linear SHA-256 hash of all source-partitions that it is supposed to update?

"During incremental or delta updates, the binary data from the current slot is used to generate the data in the new slot". But update_engine computes hashes of all target partitions after those are updated. From source code:

"This action will hash all the partitions of the target slot involved in the update. The hashes are then verified against the ones in the InstallPlan. If the target hash does not match, the action will fail."

.

dm-verity does not perform an exhaustive check on every boot, because that would take way too long. That's why I assume that update_verifier, in contrast, does the exhaustive verification upon a reboot after a successful installation

From the details found in Implementing dm-verity, hash of every 4k block is pre-calculated and appended at the end of system.img (or vendor.img) in dm-verity table (metablock; slightly different details in case of AVB) which is signed by OEM's private key. Public key is saved to kernel's system keyring (on A/B devices) which kernel uses to verify the integrity of verity table on every boot.

"One way of verifying a block device is to directly hash its contents and compare them to a stored value. However, attempting to verify an entire block device can take an extended period and consume much of a device's power.
  ...
  Instead, dm-verity verifies blocks individually and only when each one is accessed. When read into memory, the block is hashed in parallel. The hash is then verified up the tree. And since reading the block is such an expensive operation, the latency introduced by this block-level verification is comparatively nominal.
  ...
  If verification fails, the device generates an I/O error indicating the block cannot be read."

update_verifier reads a list of blocks on next reboot. No I/O error means new system.img is signed by genuine key and the updated slot is marked successful.

for a very small differential update, only the blocks that have changed are checked. For a full update, all blocks are re-read. Is this assumption correct?

Documentation says:

"update_verifier will read only the blocks listed in /data/ota_package/care_map.txt, which is included in an A/B OTA package"

It won't read other blocks whether updated or not.

Is vbmeta image also updated with new root hashes when OTA is applied?


text:
Why bowsers cannot download files to storage (path looks /dev/null/Download)?
The phone is Samsung Galaxy Note N7000. For the last few years I use NightOwl custom rom (Android 7). I do not remember when I faced with this problem, maybe after repartitioning with REPIT (but author says that probably not), but now I cannot make photos - photo app says that I need to insert SD card, but I can make photos through the Evernote app. Also in WhatsUp I cannot see photos because my phone cannot download them, and web browsers cannot download any file. But I can install most of the programs, and for example Evernote cache my notes.
Inside recovery mode, in TWRP, I found that I have partition sdcard1 that is 0 bytes in size. Maybe if I remove this partition it will fix my storage problem?

I tried to flash the same ROM again.
I asked in thread about this ROM, but nobody answered. The phone is without external SD card. When in Settings I open Storage - it crash.
logcat -b all | grep -iE 'vold|storage': log.
/proc/last_kmsg and dmesg: log.
mount returned:
rootfs on / type rootfs (ro,seclabel,relatime)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,mode=755,gid=1000)
none on /dev/memcg type cgroup (rw,relatime,memory)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mmcblk0p9 on /system type ext4 (ro,seclabel,noatime,user_xattr,barrier=1,data=ordered)
/dev/block/mmcblk0p7 on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,data=ordered)
/dev/block/mmcblk0p1 on /efs type ext4 (rw,seclabel,nosuid,nodev,noatime,user_xattr,barrier=1,journal_async_commit,data=ordered)
/dev/block/mmcblk0p10 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,errors=panic,user_xattr,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=755,gid=1000)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
/dev/block/vold/public:179_11 on /mnt/media_rw/S}M-^^M-~4M-9^DK $t type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/block/vold/public:179_11 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/fuse on /mnt/runtime/default/S}M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /storage/S}M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/S}M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/S}M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)

blkid:
/dev/block/zram0: UUID="da191bea-c7ca-4b27-af09-ce87c7f99943" TYPE="swap"
/dev/block/mmcblk0p1: UUID="57f8f4bc-abf4-0000-675f-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p7: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p9: LABEL="system" UUID="da594c53-9beb-f85c-85c5-cedf76546f7a" TYPE="ext4"
/dev/block/mmcblk0p10: UUID="57f8f4bc-abf4-655f-bf67-946fc0f9f25b" TYPE="ext4"
/dev/block/mmcblk0p11: LABEL="S}M-^^M-~4M-9^DK $t" UUID="7F73-0B1A" TYPE="vfat"
/dev/block/mmcblk0p12: UUID="49f005e2-2f62-448b-9ba1-3e4da2ee1b41" TYPE="ext4"

# cat fstab.smdk4210:
# Android fstab file.
#<src>                                      <mnt_point>             <type>    <mnt_flags and options>                                   <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
# data partition must be located at the bottom for supporting device encryption

/dev/block/mmcblk0p9                        /system                 ext4      ro,noatime                                                wait
/dev/block/mmcblk0p7                        /cache                  ext4      noatime,nosuid,nodev,journal_async_commit,errors=panic    wait,check,formattable
/dev/block/mmcblk0p7                        /cache                  f2fs      noatime,nosuid,nodev,inline_data,inline_xattr,discard     wait,check,formattable
/dev/block/mmcblk0p1                        /efs                    ext4      noatime,nosuid,nodev,journal_async_commit,errors=panic    wait,check,notrim
/dev/block/mmcblk0p10                       /data                   ext4      noatime,nosuid,nodev,noauto_da_alloc,journal_async_commit,errors=panic    wait,check,formattable,encryptable=/efs/metadata
/dev/block/mmcblk0p10                       /data                   f2fs      noatime,nosuid,nodev,inline_data,inline_xattr,discard     wait,check,formattable,encryptable=/efs/metadata
# /dev/block/mmcblk0p12                       /preload                ext4      noatime,nosuid,nodev,journal_async_commit                 wait

# vold-managed volumes ("block device" is actually a sysfs devpath)
/devices/platform/dw_mmc/mmc_host/mmc0/mmc0*     auto    auto    defaults        voldmanaged=sdcard0:11,nonremovable,noemulatedsd
/devices/platform/s3c-sdhci.2/mmc_host/mmc1*     auto    auto    defaults        voldmanaged=sdcard1:auto,encryptable=userdata
/devices/platform/s3c_otghcd/usb*                auto    auto    defaults        voldmanaged=usb:auto

# recovery
/dev/block/mmcblk0p5                        /boot                   emmc      defaults      recoveryonly
/dev/block/mmcblk0p6                        /recovery               emmc      defaults      recoveryonly

# zRAM
/dev/block/zram0

Inside recovery mode, in TWRP, I found that I have partition sdcard1 that is 0 bytes in size. Maybe if I remove this partition it will fix my storage problem?

In TWRP there's also USB OTG which would also be 0 bytes in size. Both are just mount points where external SD card and USB OTG are mounted (if available). This isn't relevant to your problem, neither you can remove this partition (because it's not a partition).
The root cause of problem seems to be the bad filesystem label you set on mmcblk0p11 partition. vold includes filesystem label (or UUID or serial number) in mount path, which the processes are unable to read.
blkid:
dev/block/mmcblk0p11: LABEL="S}M-^^M-~4M-9^DK $t" UUID="7F73-0B1A" TYPE="vfat"

mount:
/dev/block/vold/public:179_11 on /mnt/media_rw/S}M-^^M-~4M-9^DK $t type vfat (rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/fuse on /storage/S}M-^^M-~4M-9^DK $t type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)

vold:
11-06 02:25:53.173  2901  2968 D VoldConnector: RCV <- {654 public:179_11 S}M-^^M-~4M-9^DK $t}
11-06 02:25:53.173  2901  2968 D VoldConnector: RCV <- {656 public:179_11 /mnt/media_rw/S}M-^^M-~4M-9^DK $t}
11-06 02:25:53.174  2901  2968 D VoldConnector: RCV <- {655 public:179_11 /storage/S}M-^^M-~4M-9^DK $t}

Characters in string: S}M-^^M-~4M-9^DK $t} seem to be non-printable. E.g. ^M denotes Carriage Return which is used with Line Feed to print new line character (next line) on Windows (CR LF).
You can fix the filesystem label using fatlabel from dosfstools or mlabel from mtools. Boot in recovery, un-mount all partitions and do:
~# fatlabel -r /dev/block/mmcblk0p11

Or set label manually:
~# fatlabel /dev/block/mmcblk0p11 sdcard

Or you can format the partition, but it's not clear from your provided information what filesystem it is. I suppose it's FAT32. So either go to Advanced Wipe --> Repair or Change Filesystem, select the partition, select FAT32 (if supported by TWRP) and format. Or from commandline do:
~# mkfs.fat -F32 /dev/block/mmcblk0p11

Or with label:
~# mkfs.fat -n sdcard -F32 /dev/block/mmcblk0p11

Use -F16 option or mkfs.vfat for FAT16 or vFAT filesystems. Generally all use vfat driver.
In all cases make sure to select right partition otherwise YOU MAY GET YOUR DEVICE PERMANENTLY BRICKED.
Or flash factory firmware if available. Note that all data will be erased.

Thank you, formatted through the TWRP and now I am happy :)

In my case it was mkfs.vfat.


text:
How to I undo deleted shortcut from chrome new tab in android?
Currently my android google chrome new tab looks as follows,

It used to show twitter as well. I made the mistake of long pressing twitter icon and removing it. Since then I'm seeing times of India shortcut, as seen in the above image. I've visited twitter multiple times after that, but looks like chrome is brining it back. On desktop, I can use Edit shortcut and change the url. But how do I do similar thing in android?
Note: I'm on Android 10 (Oxygen OS v10.0.1). I don't have root access.

If you have root access, open the file /data/data/com.android.chrome/app_chrome/Default/Top Sites in an Sqlite editor. In the table top_sites, you would find many columns. The relevant colums are url and rank. Rank starts from 0. Chrome for Android show only top 8 ranks as top sites on new tab page.
If your twitter row/entry is not there already, than add it and make sure to give it a rank between 0-7. Further make sure that no other row conflicts with your specified rank. At last, make sure you do all of this when Chrome is force-stopped using Settings app.
This, however, does not guarantee that the changes would persist for long. As you would interact with Twitter and other sites in the future, Chrome would tweak the ranks again per the interaction it analyses and processes.
Tested on Chrome for Android v76.0.3809.132.

By any chance do you know, how to do it for non-root device? Edited the post accordingly.
Yes, I understand google can change the ranking, that is fine with me :)

No. A known way to tweak Chrome is to use its flags, but I don't see a relevant flag either, so I don't think non-rooted device users can do anything in here.

Ok. Thanks. Looks like I'm stuck then :(

Regarding preventing Chrome's automatic rank tweaking, perhaps is it possible to freeze the database by making it read-only? Not sure if it may break any since I can't test it currently...


text:
Can I flash Android on device with overwritten mmcblk0?
Can Android device with fully overwritten /dev/mmcblk0 (without /dev/mmcblk0p* partitions) be still flashed using fastboot? Is it true that overwriting /dev/mmcblk0 does not remove /dev/mmcblk0boot* partitions?

/dev/mmcblk0 is whole MMC storage chip which includes GUID partition table (GPT) and all partitions. On Android devices some of these eMMC partitions hold bootloaders (like sbl, aboot on Qualcomm devices) which have hard-coded paths in SoC firmware. Fully overwriting (erasing) such partitions means the SoC won't be able to boot device. Since fastboot and other service modes like odin are hosted by bootloaders, so those won't be available and the device is considered hard-bricked.
Exceptions are if the device does have BIOS/OpenBIOS/UEFI/ACPI support and is able to discover hardware without DTB and boot initially without depending on bootloaders.
Or if there is a way to re-create partitions and re-write bootloaders (see MTK example in edit section below). Something at even lower level which can communicate directly to SoC e.g. JTAG protocol can be possibly used to bring device back to life. However that requires special hardware and software and sometimes desoldering/resoldering or even chipping off flash chip. Still after recovering the device that way, you will have to restore device-specific partitions e.g. the one which contains IMEI.
/dev/mmcblk0boot* naming convention is usually used to represent boot area partitions from internal MMC on Linux while /dev/mmcblk0p* represents user area partitions or partitions on external SD card. Android init enumerates eMMC partitions as /dev/block/mmcblk0p* and external SD card partitions as /dev/block/mmcblk1p* (as far as I have seen). But the nomenclature may differ for different vendors. Whatever the case is, overwriting a whole flash memory raw block device would erase all partitions on that.

EDIT:
I just realized you are talking about eMMCs used with development boards, not on Android phones. Latter is somewhat different, it can have 50+ partitions on recent devices. Many of those are vendor-specific closed source signed binary blobs. But the eMMCs used with Linux have a few partitions (not more than 8 per block device by default).
If that's the case, /dev/mmcblk0boot* are most probably separate block devices as per eMMC v4.41 standard. So those might have not been erased with user area partitions. Boot partitions are also write-protected by default (1, 2), while Android devices mostly use user area for booting (though vendors can go other way) which is easily erasable. eMMC v4.41 also defines RPMB partition which is also a separate block device (in fact not a block device and not a partition) and shouldn't be deletable.

On an Android device with Qualcomm SoC (MSM8953) and Samsung eMMC (RX1BMB) and without boot area partitions:
~# mmc extcsd read /dev/block/mmcblk0
  Extended CSD rev 1.8 (MMC 5.1)
...
Boot configuration bytes [PARTITION_CONFIG: 0x38]
 User Area Enabled for boot
 No access to boot partition
...
RPMB Size [RPMB_SIZE_MULT]: 0x20

Another device with MediaTek SoC (MT8127) and Hynix eMMC (H8G1e) does have two boot area partitions and an RPMB. It reports "Boot Partition 1 enabled", so mmcblk0boot0 contains first stage bootloader (preloader or SPL) while actual UBOOT is on user area (mmcblk0p4). mmcblk0boot1 contains device specific information available through idme print like MAC address, serial number, unlock code etc. However another SoC (MSM8610) with same eMMC reports "User area is enabled for boot". So this seems to be a vendor-specific thing.

Again, since fastboot is implemented in U-Boot, it won't be available after erasing mmcblk0. On MTK devices, though, Preloader Download Mode (SP Flash Tool) or the even earlier EDL mode ("On-chip boot ROM for factory flash programming") should still work (if implemented). EDL mode on some MTK (Meta Mode) and Qcom (QDL/9008 mode; implemented in PBL/BootROM) devices requires shortening test points on motherboard (3, 4).
Otherwise the only way to flash partitions is by directly communicating with SoC. i.MX SoCs, for instance, provide SDP protocol over USB or UART which can be used to load U-Boot and use fastboot.
NOTE: Don't confuse Android's fastboot with eMMC Fast Boot.

RELATED:

Bootloader/BIOS, flashing ROM and correlated risks. Why Android devices are more brickable than PCs?
Boot Process: Android vs. Linux

The naming convention is usually same on all Linux-based devices with eMMC. Internal “mmcblk” (eMMC) is the first mmcblk (mmcblk0) and external card is second mmcblk (mmcblk1).

@jiwopene I was talking about ...boot* vs ...p*.

So no mmcblk0boot* partitions are present on android devices?

There can be. See updated answer.

EDL mode also works on some qualcomm phones (although you may need to disasemble it, and short some test points). Then you might be able to restore the system. See for example 34C3 - eMMC hacking, or: how I fixed long-dead Galaxy S3 phones for an interesting talk about reviving phones without eMMC access.

@JonasCz-ReinstateMonica that's what I wrote: "EDL mode on some MTK (Meta Mode) and Qcom (QDL/9008 mode; implemented in PBL/BootROM) devices requires shortening test points on motherboard". Probably you missed that :) Also on some devices it works without shortening e.g. Xiaomi Redmi Note 4

Some chipsets will also boot off external storage if it detects one with a proper partition table. The table can be copied/recreated from what was on the device eMMC to a SD card then write the critical partitions like sbl, aboot, etc. This will get you fastboot or download mode loaded off the SD card.

Referring to the first part on android phones, I think it depends on what mmcblk0 has been overwritten with. You say, "overwriting a whole flash memory raw block device would erase all partitions on that". True, but if you've overwritten mmcblk0 with say a previous backup of the device, then you'll be overwriting with a new GPT layout, ie creating partitions. I think the answer could be more clear by stating that fastboot should work if a proper boot partition is part of what mmcblk0 is overwritten with, even though the first part is not an answer to what was asked.


text:
Google just EOLed the original Pixel. How long until it's a brick?
Google has declared EOL for the original Pixel. I got my Pixel for a Google Fi account I use just for travelling, and I'm not really interested in replacing it.  Realistically, how much longer can I use my original-release Pixel before it stops functioning?

Just a side note: A large number of devices (especially the cheap non-name devices) are EOL at the same day they are announced - meaning they never get any update. And still a lot of people are buying and using such devices. It just depends on your personal attitude what device is "usable".

Just to note that as a developer of Android apps, we track what models of devices are used and around three quarters of then are EOLed devices, some which ended support 4+ years ago.

Kat: it needs to allow me to connect to Google Fi, make calls, use the internet, and install apps from the Google Store.  Apps I need to work include Maps, K9Mail, WeChat, and WhatsApp. Google Pay is negotiable.

Theoretically, the OG Pixel will work indefinitely until there's an irreparable software/hardware issue. Realistically? Depends on how the user takes care of it ;)
"End of Life (EOL)" doesn't mean that the device will end its life. It is just that the manufacturer (in this case, Google) will stop its support; no more security & OS updates, and the like.
If the user is adventurous enough, they can unlock the bootloader (warning: will delete all the storage) and flash custom ROM which at least extends the life a little further. (In addition, seems it's also compatible with Project Fi).

Anecdotal evidence: I'm using Nexus 5 which was released in 2013 (Android 4.0 Ice Cream Sandwich) and EOL in 2016 (Android 6.0 Marshmallow). I flashed Lineage OS after that until it's not maintained (Android 7.1.1 Nougat). As of 2019, the phone is still usable in daily life.

Custom ROMs often don't get support for much longer than the official ones. Often the limiting factor is hardware support (hardware manufacturers no longer port their drivers to support newer Android versions), and this affects both official and custom ROMs.

@James_pic Vendor drivers used to be the limiting factor. Nowadays, in theory, any device that supports Project Treble will never require HW driver updates just to support a newer Android OS, because the drivers pass a Vendor Test Suite to ensure forward-compatibility. https://android-developers.googleblog.com/2017/05/here-comes-treble-modular-base-for.html The original Pixel supports Treble. https://www.androidpolice.com/2017/05/18/current-google-pixelpixel-xl-will-support-project-treble-possibly-meaning-longer-support/

I've been using a Nexus 5 with its official Android 6.x ROM until last month. Although somewhat low on resources, all apps and the store worked perfectly fine (until the display or the GPU finally died, thus practically bricking it).

I still have a Nexus 6 with LineageOS 16.0 (Android 9.0). I only stopped using it because its battery no longer holds a charge for more than a few hours. My replacement Nexus 6P is still going strong on 15.1.

I continued using my Nexus 6P for a few months after EOL. The reason why I switched is because I dropped it and broke the screen.

If Google declares a device to be "EOL" this simply means that you no longer receive device and security updates.
Therefore your Android devices will not stop working, however after the point of EOL the chance of a security vulnerability that allows to attack you and your data will continuously raise.
However as Google devices can be unlocked easily you don't have to accept this. Unlocking the bootloader allows you to install an OS that does not come from Google, like LineageOS (warning: unlocking will erase all user data).
The first Pixel (code name "sailfish") is a supported device by LineageOS.
Therefore you can download and install LineageOS on your device and again receive updates until LineageOS also drops support for your device.
But there are also some draw backs of unlocking and installing LinegeOS: Some device assume that LineageOS devices are rooted and therefore insecure (they just assume that in general, independendently of the reality). Therefore apps like GooglePay may refuse to work.

How long does Lineage OS tend to support devices?  Historically speaking, since I know its open source.

@FuzzyChef That depends on the people maintaining the software for each device. The more popular a device (and long-living it is) the longer it stays in support. The Pixel seems to be still popular, as it has two maintainers. The Nexus 5x (which AFAIK was also very popular) on the other hand is no longer supported for quite a while.

@FuzzyChef The 5x probably lost support because the awful hardware has killed everyone's phone. The Samsung s5 has had incredible support because it is indestructible.

A modern rooting method such as Magisk will generally re-enable apps that require SafetyNet, such as Google Pay or your bank's app. This is how I use Google Pay on my rooted LineageOS.

@Michael: SafetyNet bases on comparing the system fingerprint with those from Google database, hence the SafetyNet check will fail by definition. Please note that my answer was on custom ROMS without root. Therefore Magisk is not an option. The apps detect a custom ROM and assume it is rooted even if it is not.

Oh, wait, I was mistaken. It was a Magisk module (MagiskHide) that resets the system fingerprint so that SafetyNet works, not Magisk itself.

In reality, i'd say a few years until it loses his usefulness. I have a 2 old phones that still work if plugged in, but a lot of the apps now fail because the API endpoints changed. Google maps won't load any maps or autocomplete searches, and only shows me a dot on a grey screen if GPS is turned on. YouTube videos wont play anymore, neither with the official app nor via browser. I think the webbrowser has some issues with SSL certificates that are now required everywhere. In the best case you get a message to update your software, but then the google PlayStore tells you that the latest app version is not supported by your android version.
The hardware, phone and text messages might still be working in 10 years, but eventually your apps wont be supported anymore.

In one respect it became a potential brick the day after your warranty ended, as it'd doubtless be uneconomical to repair.   But it's not going to get 'turned off'.   It'll work until it breaks.
I have a Pixel C with unresponsive screen.  Effectively a brick.   Pity.  It was a nice machine.


text:
What is the file path of a sd card when it is formatted as internal?
I know that sd cards formatted as "portable" will be located in /storage/sdcard<1,0>/ but where would a sd card be mounted or located when it is formatted as internal?

It would be located in the /mnt partition under the expand folder.
For example mine is located:

/mnt/expand/ee031623-1634-40d1-9f9f-902d68eceaee/


text:
What private data can apps access without any specified permissions?
Let's say an app doesn't require any permissions at all. What could that app access that could be a potential privacy risk? Other app usage? List of installed apps? Check is my screen unlocked? Google Analytics?

Nothing prevents a seemingly an innocent app to exploit a privilege-escalation vulnerability to take control of your precious and private data. Learn about QuadRoot to know more. https://blog.checkpoint.com/2016/08/07/quadrooter/ // Related question: https://android.stackexchange.com/q/208508/96277

Closely related: Are multiple-users protected from each other differently than apps?.

Permissions change with practically with every Android version , so without specifying the Android version, it is difficult to answer. Notwithstanding that, for a primer on permissions and to see how how crazy, it actually is, see The Android authorization model: a perfidious construct

Sourced from Izzy's blog (thanks)
*Permissions do not define what all an app can access, which is covered in Irfan's answer. Also see Izzy's primer on permissions

App description of XPrivacy Lua, which is an Xposed module, to protect privacy. Information below can be accessed without permissions (readers are welcome to add)

Use analytics (Fabric/Crashlytics, Facebook
  app events, Firebase Analytics, Google Analytic, Mixpanel, Segment)
Usetracking ( user agent for WebView only, Build properties,
  network/SIM country/operator)


text:
Access chats from old deactivated phone number
My sim card with my old number has been deactivated. A new user uses my old number. Does the user  have access to my old chats if he or she chooses Yes to back up old chats or storage?

Whatsapp backups are either stored locally (on you device), on your own Google Drive account if you are using Android or on iCloud if you're using an iPhone.
In order to restore a backup you must be using the same phone number and the same Google/Apple login, so you can rest assured that the new owner of your old number does not have access to your old backups.
If you want to be doubly sure and you use Android, you can log on to Google drive and find your Backups folder. In there you should see a file named "WhatsApp YourOldNumber backup", you can delete this if you want.
I don't own an iPhone but I imagine the iCloud backup would be stored in a similar fashion.


text:
Does /dev/block/mmcblk0 include an external sd card that has been formatted as internal?
I am performing a backup using the following command with a su shell:
dd if=/dev/block/mmcblk0 of=/mnt/expand/ee131623-1634-25d1-9f9f-902b68eceaee/mmcblk0.img"
And I was wondering if this would fail to complete as it would include the backup in the backup?
Is Internally formatted external sd cards included in mmcblk0?

from my understanding this should work and there is no way to include something at block layer

No. Internally formatted external sd card is not included in mmcblk0. dd dumps files, in your case the block device file mmcblk0 which includes all partitions, GUID partition table (GPT) and any free space in between partitions.
External SD card is a separate flash memory chip, so exposed by a different block device available at path something like /dev/block/mmcblk1 or /dev/block/sda.

except for some very old devices (Samsung/Nexus?) they have separate so called "sdcard" partition on mmcblk0 (and additional external MicroSd Card mmcblk1)

Right. Actually mmcblk1 is a convention for external SD card and sda for USB OTG etc. Yes a separate partition mmcblk0p* was used for external storage before /data/media was started being emulated.


text:
Disable Alt+Tab physical keyboard shortcut
Is there any way to disable the Alt+Tab shortcut when using physical keyboard on android phone ,I'm using xiaomi
Mi a2 phone.


text:
Sign in to Google in Chrome without signing in on Android
On desktop, you can sign in to multiple google accounts by clicking on your picture and selecting "add account".
You used to be able to do this on Android. Chrome would automatically sign you in if you were signed in to a google account in Android, but you could sign in to as many google accounts as you wanted.
That feature seems to be broken/gone now.
Now I can only "manage device accounts" which takes me to the Android screen for adding a Google account to Android.  I don't want to add a Google account to Android, I just want to sign in to some Google accounts in Chrome. I don't want the Google account device policies or mixing their contacts with mine or accidentally being in the wrong Google Play account when downloading an app or any of that.
Is there a way to force Chrome to let me sign in to multiple Google accounts without adding the account to Android itself?
I've tested this on a factory-reset Pixel 1 with all the updates and a Pixel 4.

Perhaps using another browser will also help you to achieve this.

Firefox on Android supports logging in to multiple google accounts but there are several drawbacks to this which prevent me from using it as my default browser.


text:
Group SMS in Android by similar Sender Id
In my country, SMS from different services usually come with a sender id. It mostly look like XXYYYYYY where YYYYYY is 6 digit service name, and XX is kind of a 2 digit random value.
What I want to do is to remove the XX part from the sender id so I can group SMS from same provider YYYYYY in a single conversation.
Is it possible to achieve this in Android somehow?

Every time you receive a service SMS, you can edit the number manually, or you can try to automate the process. This assumes that you are able to edit the number.

@ReddyLutonadio No. I don't know how to edit the number.

what happens if you assign all these numbers to a single contact? I can far remember on some older sms app it did group by name not by number - if so, you could automatize the contact saving process for incoming messages with Tasker/Macrodroid/etc

@alecxs These are alphabetical sender id, not phone numbers.


text:
Do wireless charging adapters interfere with NFC?
I've just got a Huawei P30 (standard, not Pro or Lite) and realised it doesn't feature NFC - with no less than 4 wireless chargers in my house and 2 in my office. But I use Google Pay all the time - in many ways I rely on it.
I've done some Googling and I can't find much info about this - the closest I came was an article about wireless charging slowly damaging the NFC controller chip over time in a Nexus 7 due to a circuitry flaw.
Would adding a Qi adapter pad inside a case affect the data-only NFC on the device? With it not being a native feature, I can imagine there may be some safety drawbacks to the internal antenna and circuitry.
But at the same time, Huawei had an official wireless charging case available. So, maybe it's not a problem for the P30?

TLDR;
Qi wireless charging can damage NFC tags and readers.
I don't have any experience with using Qi adapters and NFC in conjunction but I would imagine there would be some interference.
Depending on the position of your NFC chip, the Qi adapter may partially or completely cover the chip. Whilst this would only be a very thin layer of metal obstructing the chip, the interference would largely depend on the quality of the NFC chip.
I do have a wireless charging mount in my car that I have previously placed an NFC tag on. I was able to charge my phone (Samsung Galaxy S7 Edge and Note 9) perfectly, however, my phone struggled to consistently read the NFC tag. It would often either not read the tag at all or would repeatedly read it, which was very frustrating as the routine I had set up would send multiple messages to my wife.
So, it would seem that wireless charging and NFC can interfere with each other if not implemented correctly. If this is a risk you can not afford to take, then I would suggest sticking with a charger cable or perhaps a magnetic charger cable for more convenience.

Following OP's comment I have done some more research regarding NFC degradation caused by Qi wireless charging and have come across this article from RFID Journal.
The article details an NFC-enabled wireless charging system for cars and, although it doesn't specify any sort of statistics, it does state that NFC tags can be damaged by wireless charging.

NFC devices are also commonly stored in the wallets, purses and pockets of individuals for payments, access control and more. NFC tags, however, can be damaged or destroyed by the magnetic fields of wireless chargers, creating a potential conflict for a variety of NFC technology products

I wasn't completely satisfied with this.
I changed my search criteria to specifically look for details on NFC readers and it wasn't long before I cam across a post on the Nordic Semiconductor DevZone forum regarding Qi wireless charging damaging an NFC reader.
In the thread one of Nordic Semiconductor's support staff responds with the following

Yes, QI currents can damage NFC readers/tags, and what you're describing does not seem reversible. Sorry about that. Although we can't guarantee anything, adding the extra capacitor seems to protect the NFC tag sufficiently, so I suggest you give it a go. Additionally, it wouldn't hurt disabling the NFC while you're charging either, but I don't believe it to be crucial.

So, given this information and OP stating that NFC doesn't work with wireless chargers (at least that's my understanding of OP), I would be inclined to believe Huawei disables the NFC reader while charging wirelessly in order to protect the NFC reader from damage.

Thanks for answering. I'm not so worried about interference as such, I'm worried about whether the native data-only NFC can handle the field that the Qi adapter accepts, or whether the charging will cause damage to the native circuitry.

@BrandonPowell I have extended my answer to include some extra Googling. I fear I might still have not answered your question properly though. Please could you clarify a couple of points for me. Are you saying that NFC doesn't work whilst you are charging your phone wirelessly or that NFC no longer functions after using wireless chargers? Also, are you using the official Huawei wireless charging case or a 3rd party adapter?


text:
How to resize the width of several frozen columns in Google Sheets app?
I am using Google Sheets on Android and have several columns frozen on the left, but the app seems to have a fixed width for the frozen columns. Is it possible to change this width?

Unfortunately, you can't with the current version (1.19.432.04.34) of Google Sheet. Maybe it will be possible to do it with future version. For a once off (or maybe permanently), WPS allows to increase the width of frozen columns.

Thank you for your reply. Unfortunately this changes the columns themselves, but not the width of the frozen area, which is what I am looking for.

@aronisstav I understand better now and have edited my answer.


text:
Root to set a battery limit and unroot again?
I dont have any practical experience with rooting my phone. There is one thing that's been bugging me for a very long time: I need to be able to set a charging limit on my Pixel 2 since I dont feel like replacing the battery soon and destroying the water resistance.
My question is: if I root and set a charging limit and unroot again, will this setting be erased? As I said, I am not too familiar with the risks of having my OS more vulnerable towards viruses, thus the only thing I want to do is to set the battery charging limit and then just go back to unroot.
Thanks,
Alex

I can help you (hopefully) retain the things you achieve with root after un-rooting. Do you know the steps to set charging limit and root, unroot your device?

Setting a charging limit is not persistent. Therefore the call has to be made (with root permissions) at least once after every reboot.
Rooting/unrooting requires at least a reboot. Therefore you can't "temporarily root" your device and set a charging limit.
If your device does not provide something like an intelligent battery charging optimization the only alternative is to use a battery charging notification app.
There are a lot if battery charging notification apps on Play Store. One example is Battery Full Charge Alarm  which can be configured to notify at a specific charging level.

I know, AccuBattery also has that feature. I wish it was something you could set to happen automatically without having to root your device. My other idea was to use Tasker and get a smart plug but the sheer thought of having to buy additional devices is kind of frustrating.


text:
How to screencap the smaller display of Samsung Galaxy Fold using ADB 'screencap' command?
I'm trying to take a screenshot of Samsung Galaxy Fold's smaller display.
I use
shell screencap -p /sdcard/testss1.png

but it only captures the main display ― which is off ― and gets a black image.
How to change the display used for capturing?

The screencap command can be configured to capture a specific display using the option -d.

-d: specify the physical display ID to capture.
  See dumpsys SurfaceFlinger --display-id for valid display IDs.

The output of dumpsys SurfaceFlinger --display-id is a bit longer, therefore you can filter out the display ids:
dumpsys SurfaceFlinger --display-id | grep display_id

On my device I only have one display with display_id=0.
Therefore the final command looks like this (just replace display_id):
shell screencap -d <display_id> -p /sdcard/testss1.png

It worked. If anyone will face same problem - the Fold's smaller display ID is 5


text:
Fingerprint lost phone unlocking ability – where to troubleshoot?
Recently, fingerprint sensor on my Note8 lost phone unlocking ability. How can I troubleshoot this?
Once the phone is unlocked, it still works normally: it...

identifies already registered fingers (in fingerprint setup section)
unlocks Samsung Pass
pulls down and retracts the status bar (this works even in locked mode)

So far I...

uninstalled all apps which were installed last week
de-registered all fingerprints (what in turn disabled unlocking via reader) and registered them again
checked the list of assistance apps, but all items are currently switched off

there were numerous device restarts during all these experiments – still no success

What else can I try?

The problem was that in Knox Workspace, fingerprint reader got disabled by an event similar to a device security policy change which are issued by Knox Workspace administrator. This in turn disabled fingerprint unlock for the entire phone.
The solution was to detach Knox Workspace unlock procedure from phone unlock procedure by switching off the setting Settings > Work Profile > Use one Lock and by removal and re-adding fingerprints. Then the reader became available again for unlocking the phone although it is no more available for unlocking Knox Workspace.


text:
Any way to increase sync period on Calendar?
Is there any way to get my Galaxy S10 calendar to sync with entries that are more than 1 year in advance?
I have a calendar dedicated to keeping track of SSL certificate expiry (over 50 individual sites) so I have an entry for each site.
The problem is that some of my clients send me SSL certificates which have expiry dates 2 or 3 years in the future... so I update the existing entries with the new expiry date.
The result is that my phone leaves existing entries at their previous date, because they're now outside of the sync period.
Is there any way to increase the sync period... or is the simple answer to delete the old item and create a new one (instead of changing the date)?

What calendar data provider is used (local, Google, Exchange account, ...)? Have you tested a different calendar app to identify if this is an issue of the calendar app or the calendar data provider?

Yep, fair questions @Robert... it's Google calendar... not sure why I failed to highlight that originally.  And no, I haven't tried any different yet... I will do and get back to you


text:
Cloning Android Devices
I would like to know if it is possible to clone a physical Android device with all settings, apps and configuration to inject it on other Android devices such as an image of the device. And if it is possible, how can I do this ? My Android device is an Android 7.1 and I'm connecting it to an Ubuntu 18.04 LTS.
We are professional and don't want to reinstall each devices, so I ask for a simple way with ADB or other, to clone what is legal to clone, the setup.
I have one device, with his app and settings, I need to clone it on 15 devices...
Simple ADB backup won't do it, it just backup files pictures but no apps.
Thx

cloning wifi/ bluetooth mac addresses may confuse dhcp router, cloning imei may illegal in your country. please be more specific about what is your intent

I would like to clone an android device, apps and settings.
We are professional and don't want to reinstall each devices, so I ask for a simple way with ADB or other, to clone what is legal to clone, the setup.
I have one device, with his app and settings, I need to clone it on 15 devices... What can I do.
Simple ADB backup won't do it, it just backup files pictures but no apps. Thx

I suspected that. not cloning but batch setup of individual devices each with it's own phone number google/whatsapp/email account. just app settings should be same. adb backup can include apk, but not phone settings. is a solution for rooted devices also accepted?

What you describe is not cloning of a device but cloning of user data. Anyway totally cloning the data is a bad idea as this would also include the ANDROID_ID - an ID with should be unique. Check this url for a typical enrollment via e.g. NFC or QR-code: https://developers.google.com/android/management/provision-device

https://play.google.com/store/apps/details?id=balti.migrate

Do you think it is possible to clone a setup as :

Copy all applications
Settings and user data (simply basic settings on application like the background image or restarting an app at the startup of the device)

you need custom recovery then you can create a flashable zip with all necessary settings. the above app is a helper for creating such a zip. It includes also phone settings not just app settings. but i am not aware about a fully hands free setup solution for adb. the closed non-root solution i can imagine is android-backup-toolkit


text:
How to install Google Services on a Garmin Fleet 790 Navigation Tablet?
I tried different approaches.
Installing the APKs: Login, Framework, Service and last but not at least Playstore wont work. (I tried it successfully on fire tablet)
In factory mode the menu Point: install from Sd Card wont be Displayed. To install Gapps from there.
Is there any other method to make Google Play Services run on the device?
the navigation tablet is  based on Android 6.0.1
i tried to follow the describtion from @izzy, but if I use the adb sideload i get:

"adb : sideload connection: closed .. trying pre kitkat sideload
  method..'

and than the connection fails again and is closed too.   starting the device in factory mode and try to install it says:

"failed to open driver control no such file"

underwards it says that i could use adb sideload, but when i try my computer says

"no connected device"

Please see: How can I install the Google Apps Package (Play Store, …) on my Android device? – this includes GServices. Best approach is OpenGApps (mentioned in an answer there). And you can probably use adb sideload if "install from SD card" isn't available.

@Izzy thanks. i tried to follow the describtion, but if I use the adb sideload i get: "adb : sideload connection: closed .. trying pre kitkat sideload method and there connection fails again and is closed'
starting the device in factory mode and try to install it says: "failed to open driver control no such file"

OK, that seem to be device-specific issues. I'll reopen this question so you get a chance to solve those. Good luck!

@Izzy thank you


text:
Tracking push notifications that I receive on my android phone
I'm trying to set up a tracker that stores text messages and push notification that I receive on my phone in a google sheets spreadsheet. I have already found a way to forward each SMS that I receive to a spreadsheet using IFTTT. Unfortunately, it seems that IFTTT does not allow you to track push notifications as well.
Question: (If it's possible) How do I set up tracking push notifications on an android phone?

everything is in a sqlite database somewhere, just find the file and export content? not sure maybe it is included in notifications? https://play.google.com/store/apps/details?id=com.evanhe.nhfree

@alecxs thanks for the tip! I might actually do that, but I was hoping to build a more automated process, so that whenever I receive a push notification it gets forwarded to another location

Google push notifications are handled differently than SMS. AFAIK only Google Play Services app has access to all push notifications (as it receives them). Therefore getting those push notifications would require to inject code into Google Play Services, e.g. in form of an XPosed module (requires rooted device + (ed)Xposed installed).
BTW: The push notification often does not contain the actual data. It can be used to "poke" an app so that the app connects to it's backend and loads the actual data (e.g. a messenger message).

Thank you Robert for your reply! How much time would it take to write such code? Isn't there a service that does this? All I want is to track push notifications that I receive from sports websites, and delivery apps.

@titusAdam That depends on how familiar you are with app development, XPosed module development and reverse engineering of Android apps. However there is one problem: the Google Play Services app is a "moving target" it is frequently updated and if it obfuscates it's class names (have not checked it) most likely you would have to adapt the Xposed module after every update.

Sorry that I haven't accepted your answer yet. Do you think that this is an option? https://www.twilio.com/docs/notify/send-notifications?code-sample=code-receiving-a-notification-in-android-1&code-language=Android%20-%20Java&code-sdk-version=default

@titusAdam This article describes how to receive any push notification sent to the app that is being developed in the article, not to all apps system wide.

so this will only work for push notifications that are received on your own app? :)


text:
Google services don't work on apps but work on browser after changing SIM card
I changed the SIM card in my cell phone and Google apps such as Google Maps, YouTube, etc. no longer works, saying I was offline. Yet they still work if accessed from a web browser.
How to get the Google apps work instead of accessing from the browser?

If the new sim card belongs to a different mobile network provider you need to apply the new settings. Usually you are getting those settings via a special SMS. Some times the SMS may got lost or arrives with several hours delay. Try to reboot the device and remove + reinsert the sim card.


text:
Inaccurate Battery Consumption Metrics: Is This Behavior Normal?
I own a OnePlus6 running OxygenOS 9.0.9. I noticed that lately my battery doesn't last as long as it used to. I used the Battery Monitor app to check if there's anything suspicious. This is what I noticed:

In this screenshot my battery is at 88% (12% consumed), yet, the app consumption sums up to 8% as opposed to the 12% that is actually consumed.
Is this behavior normal? Is the remaining 4% being consumed by the OS or is there some rogue app that's consuming my battery?

You may have dozens of apps that have usage of below 1% -> rounded down to 0% and therefore not displayed. Anyway the usage stats are always just an estimation.

Tap on that three dots line > show full device usage. Then see how much difference is there.


text:
Swiftkey backup & sync not working
I am using Swiftkey 7.4.0.18 on Android 9 (before that, on Android 7). I got a new phone and installed Swiftkey on it, logged in and enabled backup & sync. My personal dictionary had been correctly backed up before, I can see that in the "View and manage your data" section. The dictionary contains several hundred or thousand words (I speak a special German dialect, that's why). However, these learned words do not show up on my new phone, even though sync appears to "work" as there is no error message. I have contacted Swiftkey support a while ago but haven't heard anything.
Anybody here who can tell me how I can debug / solve this?

I am also a SwiftKey user and this feature has never worked for me. The problem is same as yours.

This is so dumb. Is there no way to get support?

I would say that SwiftKey Support is not 'exceptional'.

This is a problem voiced by many users but ignored - see https://support.swiftkey.com/hc/en-us/community/posts/115002929809/comments/360008235792.


text:
Home screen icons vanishing, and unable to restore some of them
My Alcatel Onetouch idol 3 currently runs Android 6.0.1, since Alcatel doesn't launches updates, as of this version. At the opposite, it often updates its own "over-layer", and I suspect this part to be responsible of my problem, as follows.
From about a couple of months, I noted that some of my home screen icons had suddenly vanished. Then it continued later, some other icons vanishing at successive random times.
Note: not only alone icons but folders vanish as well.
So my first question:
What may cause icons to vanish, and how to prevent it?
Beyond that, I obviously wanted to recover them, and sure it was pretty simple, selecting them from the Apps drawer.
But... two apps (Gmail and Notes) doesn't appear any longer in Apps drawer, although they keep showing through Params|Applications!
So I can't restore this ones.
So my second question:
How to make these icon go back to Apps drawer?

Have you tried another launcher to check if it is affected by both problems (icons disappearing from home screen and drawer? If it is not, then the issue will be with the launcher. Clearing its cache and/or data might help; or simply using another launcher.

@ReddyLutonadio Thanks for the idea, i'll do it, then wait and see... But in any case, how to recover missing apps in Apps drawer?


text:
How do you install a KDZ that doesn't match an LG phone's model?
LGUP checks the current phone to see what specific model it is. In my case it's an LG v20 F800L. I'd like to install the H990 kdz on it instead because I don't want a bunch of Korean language apps that I can't read and I can't uninstall. When I try to load a kdz file using LGUP I get an error that says roughly

invalid kdz F800L->H990

Can LGUP be tricked about what model the phone is or the kdz file is? Otherwise, what other ways are there to install a stock kdz when it doesn't necessarily match the phone's specific model?
What I tried so far:
I ran grep on the kdz
grep -an "F800L" H990N20d_00_OPEN_HK_DS_OP_0920.kdz | less  #-a for binary n to show the line number. Piped to LESS because otherwise the output might do some funky stuff to your computer.

The search for the string "H990" showed 3 instances. Next I ran
sed -i 's+H990+F800L+g'

to change instances of H990 to F800L. The new file size was 3 bytes larger, which was expected because F800L is one character longer and there were three instances. When I tried loading the new file to the phone using LGUP it just gives an error Error: KDZ file is invalid. so there's some kind of checksum.
recommended tags:
KDZ
LGUP

Firmware images are usually cryptographically signed (I assume this is also true for LGs KDZ files). Therefore even a changed single bit will make the file invalid.

If I can't change the KDZ, any chance I can change the phone?

You can try to root the phone and make any modifications you want. Anyway the two variants F800L and H990 seem to incorporate different LTE hardware (according to https://www.phonemore.com/specs/lg/v20/h990t/ they support diferent LTE bands), therefore your approach using a different firmware will never work.

Thank you for saving me from wasting anymore time in that direction.


text:
Disable app autoupdate in Samsung Galaxy S7
I have a Samsung Galaxy S7 with Android 8.0.0 and I don't have much experience with it's user interface yet
I disabled app autoupdate feature by going to Google Play Store -> Settings and I can see that it is set to "Do not autoupdate" in the menu
When I did this about 16 preinstalled apps had already been auto updated and 6 were on the queue. After disabling the auto update, I updated 1 app manually and a few minutes later the next one on the queue got updated by itself.I ignored this because I thought perhaps the update command had already been issued and before I changed the Playstore Settings and may be it cannot be changed or something similar happened. However after 24 hours another app on the queue got updated again.
How do I permanently stop the phone from auto-updating any apps installed on it (but still retain the ability to manually update individual ones)? I especially don't want the pre-installed samsung apps (+ other bloatware) from getting updated because I never use them.
Also, it looks like a some of the preinstalled basic apps are connected to the internet (for example, in the clock app there was a World clock tab, which showed weather information on the side and turns out it was continuously getting information from the internet). Is there a list of such built in apps for this phone that are always connected to the internet, and is there a method of turning this option off, either as a group or individually?

I don't own Samsung Galaxy devices, but isn't it that Samsung has another app store called Galaxy Store?

@Andrew Samsung mainly uses google play store by default, the samsung one is optional. These updates are happening from google's play store


text:
Installing Android 10 with a Device Specific Binary
So I got my hands on a Android 10 binary that was designed for a Samsung Galaxy 10. Can I install it on a different phone? I have a Motorola g7 Power, so it should be compatible with the OS but I am not sure if the device specific version would cause any issues.

Probably not. Built in to the AOSP image is device specific settings, drivers, essentially, that are necessary to support the hardware on that phone. Android has to be compiled for each phone model and submodel specifically.

That depends which libraries are used by the executable file. If only non-Samsung specific libraries and services are used it may work. Anyway when asking such questions you should be more specific what binary you are trying to execute and what it is supposed to do.


text:
Is the battery cycle count stored on the battery or the device?
I downloaded an app Phone INFO which shows a number of stats, particularly "Battery Discharge Cycles". I want to know if this number is being retrieved from the battery (i.e. it's just the number of cycles for the current battery) or the phone (i.e. it's the sum of the cycles across all batteries the phone has contained). In other words, if I insert a brand new battery, should I expect the count to drop to zero?
Context: I have a Samsung S6, which doesn't allow easily changing the battery. I went to a phone repair shop to have the battery replaced. I left it there for the day and did not observe the process of replacement. Now I suspect that I was scammed and the battery has not been changed. I want to confront the shop and use the cycle count (which is still very high) as evidence, so I'm checking my understanding first.

After replacing a new battery, you must calibrate it. This link helps you.

I cannot quote official documentation but I believe that you have not been scammed.
As per the discussion I had with developer of 3C Tool box pro here and the preceeding posts, it is clear that the charge cycle info is stored in the kernel and requires root to access it.

After investigating on a couple of devices, I found some kernel files that can provide the charge counter. On Samsung it is root-only, whereas on Pixel it seems open-bar
On Samsung it could probably load the existing charge counter (if rooted or access allowed) (Post 971)

There is no reason to believe they have modified the kernel files, especially on a Samsung device where rooting trips knox and the customer would be aware of root since some Samsung specific apps wouldn't work. Not worth the cost of a battery replacement.

The phone has definitely not been rooted. It was switched off before I left and is encrypted with password protection. I'm accepting this because it seems like you know best regarding my actual question. I'm still skeptical about whether my phone contains a new battery because it still discharges very quickly.

Thanks for accepting. Regarding quick discharge of new battery , it is entirely possible! Reason: It depends on the date of manufacture of battery . Batteries lose life by just storage. Figure in this answer explains. If the "new" battery is say 2 years old , it is as good as the one you have. That's why it is always better to replace early on

It seems the issue is that when the battery is replaced, most mom and pop places don’t have the skill or equipment to go in the “root” to reset the counter. It’s akin to not resetting the change oil light on your car. The issue is that some cars use oil life to make other decisions on engine operation, so without resetting the light, performance isn’t fully restored because the computer thinks it’s still old oil and making its decisions based on that. Your battery life, auto shutdown, and battery life remaining display are kind of the same. I bet your phone goes to zero faster than you expect and shuts off, but after leaving it off for a while, you can cut it back on and it’ll show 20-30% or more battery. If so, the thing to do is to keep draining the battery without plugging it in, until after sitting the phone doesn’t even have the juice to try to start, then charge it up to 100, preferably on regular vs fast charge. The life monitor will adjust to the new high and low, and you should have better battery life performance. What’s happened is your phone is basing the full charge and dead capacity off your old battery still, and this process should force it to adapt to your new one.


text:
How to get rid of SeLinux Denials in Permissive mode?
Need some help with 3 issues:

In Permissive mode I get denials, why does this happen and how do I fix that?
If I am enforced, how  do I give access to my  Partitions to various processes. Right now I am permissive but in case I want to switch over as enforced what do I do in enforced mode to ensure that Apps and processes have full access to all my partitions on micro SD card?
How do I ensure that I have permissive mode at the time after boot? I am using seLinux changer app which changes the mode to permissive after boot, I am assuming.

Backdrop
I am on Android 9 Pie. Rooted with a Custom ROM via Magisk (v20 which is the latest).
I have 3 partitions on my MicroSD card, all ext4. First partition is to store the external data. Second partition is for app2sd or application data linking. And third partition is for WhatsApp.
But I have a problem which mysteriously keeps popping up; for a very brief time it disappears and then it is again back.
The issue is when I link the WhatsApp folder in my internal storage to the third partition, it stops working and I am not able to download any images. When I try and access internal folders that are linked to my external partition on micro SD card through ADB and non-rooted prompt, it says Access denied. If after linking I have to access any file on my internal storage or external storage through a non root user, I have to copy it in /data/local/tmp and chmod it.
So after running a dmesg via su prompt, I keep getting this kind of information and I am totally confused as to how I keep getting rejects even when I am in permissive mode:
[64108.645494] type=1400 audit(1571547099.201:11658): avc: denied { call } for pid=1301 comm="pool-1-thread-1" scontext=u:r:untrusted_app:s0:c2,c257,c512,c768 tcontext=u:r:hal_memtrack_default:s0 tclass=binder permissive=1
[64108.645560] type=1400 audit(1571547144.071:11659): avc: denied { open } for pid=23335 comm="om.mobikwik_new" path="/proc/vmstat" dev="proc" ino=4026532137 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:proc_vmstat:s0 tclass=file permissive=1
[62276.620621] type=1400 audit(1571545312.043:11584): avc: denied { read } for pid=8534 comm="webview_zygote" name="fonts.xml" dev="mmcblk0p66" ino=1968042 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:theme_data_file:s0 tclass=file permissive=1
[61774.878054] type=1400 audit(1571544810.294:11570): avc: denied { call } for pid=1301 comm="pool-1-thread-1" scontext=u:r:untrusted_app:s0:c2,c257,c512,c768 tcontext=u:r:hal_memtrack_default:s0 tclass=binder permissive=1
[61770.686186] type=1400 audit(1571544806.104:11569): avc: denied { getattr } for pid=12417 comm=4173796E635461736B202334 path="/data/sdext2/data/com.google.android.googlequicksearchbox/cache" dev="mmcblk1p2" ino=413617 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=dir permissive=1
[59854.882802] type=1400 audit(1571542825.956:11523): avc: denied { call } for pid=13288 comm="GoogleLocationS" scontext=u:r:priv_app:s0:c512,c768 tcontext=u:r:hal_memtrack_default:s0 tclass=binder permissive=1
[58684.872549] type=1400 audit(1571541715.916:11505): avc: denied { getattr } for pid=4379 comm="Binder:4379_3" path="/storage/6226b27a-ebc1-4fdd-b54c-096abc40c2b9" dev="tmpfs" ino=52150 scontext=u:r:untrusted_app:s0:c241,c256,c512,c768 tcontext=u:object_r:storage_stub_file:s0 tclass=dir permissive=1
[58416.978554] type=1400 audit(1571541430.215:11458): avc: denied { open } for pid=31520 comm="CallMonitors-1" path="/proc/stat" dev="proc" ino=4026532088 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=1

What I did:

Tried to use the script approach with  setenforce 0 under init.d  dir. Hopelessly works only in <5.0.
Tried to  remount partitions as R/W.

permissive=1 is just a warning, it doesn't restricts you from doing anything. 2. You need to modify SELinux policy. 3. You need to define an init service. // For mounting a SD card partition to be used by apps for storing data, you need to consider 1. Ownership 2. Permission mode 3. SELinux context 4. Mount namespace. If any of the four isn't configured properly, you'll be in trouble.

Thank You Irfan but if I'm in permissive there shouldn't be any pern issues. why the denials after i dm in permissive mode

I mentioned 4 factors, SELinux is only one of those.

ok thx very useful framework to think long but I need some more meat between those points any idea where I can read up & how these are customised and configured

ownership will vary depending on who is writing to the card it should be made available to all users magisk is running in in global namespace .selinux is permissive

To understand ownership, must read: https://android.stackexchange.com/a/210159/218526. Other helpful sources: https://en.wikipedia.org/wiki/File_system_permissions#Traditional_Unix_permissions and https://android.stackexchange.com/a/208982/218526 and https://source.android.com/devices/tech/config/filesystem. If you state clearly, step by step, how you mounted the partition, what are the ownership and permission modes and SELinux context of the mount point and inside files, I can try to answer your question directly.

heyya thx gain... specifically I was asking about AvC denied errors that I put up in the above log snippet. if I have Selinux  running in permissive mode then what are these errors coming from ? i guess that was one of the things I was trying to figure out and still haven't gotten  a a faint clue 'bout....

avc denied  cannot be just an f y i m message.  there is some actual denial going on and I was asking,  if it's  in permissive mode.... then what is causing so many denials when nothing in my phone has changed and this is intermittent...it ll  stay on  for a good amount of time and then goes away on its own to , reappear again

sure it is permissive? selinux changer app only work for kernel which supports that. btw WhatsApp should be bind mounted, sdcardfs does ignore symlinks

@user1874594 that's how SELinux works. Android's official documentation says: “SELinux can operate in two global modes: Permissive mode, in which permission denials are logged but not enforced. Enforcing mode, in which permissions denials are both logged and enforced. ” And you can read SELinux documentation where ever you want, the principle remains same. I can't say much if SELinux is enforcing in permissive mode only on your device. You can modify sepolicy to get rid of denial messages but that won't solve your problem for sure.

127|root@android:(unreachable) # getenforce Permissive root@android:(unreachable) #

yes of course it is bind mounted  all the folders that I am linking somewhere else from internal storage our bind mounted  only for the WhatsApp folder I am not able to download the images when I have the linking on and as soon as it refuses to download the image I go look at dmesg this avc denied message which makes me think this is connected with selinux it is a assumption based on on this strong correlation. 1 thing WhatsApp partition's mounted under /storage there are 3 partitions under storage the log message tells me that it mounted    SDcardFs on so and so partition

is there a concept that at boot time there are certain rules that are enforced and even after it changes  post boot from enforcing to permissive the rules previously en forced are still applicable

As I mentioned in previous comment: If you state clearly, step by step, how you mounted the partition, what are the 1. ownership 2. permission modes and 3. SELinux context of the mount point and inside files, I can try to answer your question directly. If you keep on repeating the same thing, not listening to what others say, no one will be able to help you. Sorry.

heyya ok ... fine sure  wasnt clear what exactly you are getting at now you articulated it very well I will revert back to you with all the info. Thank You


text:
Amazon notifications are silent
So I'm looking out for an Amazon delivery I don't want to miss, and the Amazon Shopping app puts up the message in my phone's notification area saying my package is 6 stops away, view it on a map.
But the notification makes no sound, so chances are I don't notice.
Similar to this question about Google Calendar notifications misbehaving in the same way. There are no answers to that one to date, and the person fixed it eventually by reinstalling the app. But I've already tried installing the Amazon Shopping app on three different Android devices (Samsung phone, Motorola phone and Amazon Fire tablet). On all three devices the issue is the same.
I've checked all the related settings I can find, both general Android settings and those within the app.
How is it possible the Android operating system can let the user configure audible notifications and it all works fine except for one app?

If it behaves the same on every device & Android version and independent of the user account, then there's a possibility that the developer didn't let the notification play the notification sound. Weird, but possible, since notification by default doesn't play any sound, and the developer must set the code for it. Some more things to check: how about the Amazon's app "Notification" setting from "App Info", and do you use "Do Not Disturb" mode?

@AndrewT. interesting to know the developer could do that. I agree it would be a weird thing to do, at least for a notification like this one which by its nature is meant to get your attention and not just hang around unnoticed till you next happen to look. (Maybe I'll just have to write an app myself, to monitor Amazon alerts and alert me!) To reply, the app's Notification settings are Allow, and Show Silently is turned off. DND I use sometimes yes, but not at the times in question.
Could folks reading this please comment as to whether or not they get audible Amazon Delivery notifications?


text:
Running older Android apps on Android Pie
I have Samsung Galaxy J9 running on Android 9 Pie. I bought Grapher Pro from the Play Store and installed it. When I tried to run it, a message was shown:

This apk was built for an older version of Android.

Because of this, I refunded it.
Is there any way to run such apps?
The free version doesn't show the issue though.

Thanks for the error message. While I couldn't find the quoted error message, I found a similar error message on Android Pie: This app was built for an older version of Android and may not work properly. Try checking for updates, or contact the developer, though AFAIK the app is not blocked and you're still allowed to use it?

You may try to change the target Android version of the app using APK Editor and change the API version. But it most likely won't work for paid apps.
 Instead, you can try to run the app in a virtual machine in which an older version of Android is installed. See VMOS Virtual Root Android on Android-Double System.


text:
Are Android App Permissions Placebos (Android Pie)?
I'm looking at every app that has 'Microphone' permissions on my Android Pie Galaxy Note phone, accessed through:
Settings > Apps > Hamburger Menu > App Permissions > Microphone

Five apps have microphone permissions enabled, which I'll list below:

Camera
Duo
Google Play services
Messages
YouTube

Note that Bixby (and associated Bixby apps) do NOT have microphone permissions. Yet, I can press the Bixby button on my phone and speak commands that Bixby will understand, and act upon. How is Bixby accessing my microphone without permission?
Furthermore, if I look at Bixby permissions, the list simply says "No permissions required".
Does Bixby indirectly obtain any permissions it needs through Google Play services? If any app can indirectly get the permissions it wants through Google Play services, what's the point of even having the any permission toggle switches, other than to decieve the end user?

Bixby is a Samsung app, therefore I assume you are also using a Samsung device?

@Robert Yes it is a Samsung device. Never the less, I didn't grant the Bixby app permission to use my microphone, and it is using the microphone. Isn't that the point of permissions? The only items on the phone that have access to the microphone are the items I explicitly grant permission to?

While there's some truth in using Google Play Services to "bypass" permission, I don't think Google Play Services' microphone can be used by other apps directly. On the other hand, looks like Samsung is implementing their custom permissions, which Bixby uses. Custom permission won't be listed under Android's standard permissions though.

I would assume that the Bixby app is only the front end of the Bixby service embedded into your system. Therefore the microphone access is implemented in this system service which don't need any permissions because system apps can do anything they want. Therefore the answer to your question could be "Permissions are only relevant for third party apps. Apps from the phone manufacturer (if they are system apps) just ignore these permissions."


text:
How to check IMSI/ICCID on MIUI10?
Is there any way to view IMSI and ICCID numbers of my SIM-cards? I didn't find such menu neither in About-Status nor anywhere else.

There are APIs available which apps (like this) use to read SIM information. Looking for CLI solution (refer to this, this and this), we can get IMSI and ICCID with following commands respectively (up to Android 9):
~$ service call iphonesubinfo 7

~$ service call iphonesubinfo 10

* Codes depend on order of methods defined here, which may differ on different Android versions.
* For dual SIM device use code 8 and 11 instead and append i32 2 to command to get second SIM information.
Pass the output through following pipes to convert hexadecimal output to a good looking string:
... | grep -oE '[0-9a-f]{8} ' | while read hex; do echo -ne "\u${hex:4:4}\u${hex:0:4}"; done; echo

Terminal emulator apps usually don't have permission READ_PHONE_STATE (though you can grant manually with root) which is required by both functions. So commands need to be executed from adb shell.
Codes 7/8 correspond to getSubscriberId and 10/11 to getSimSerialNumber. However both methods have been removed for normal apps usage in Android 10. Only system apps with READ_PRIVILEGED_PHONE_STATE will be able to get this information. iphonesubinfo service can't be dumped with dumpsys either. So root is the only solution on Android 10+.
RIL may also log the operator/SIM related information to logcat when SIM state changes. With root access it's possible to read telephony database (the component of application framework which interfaces RIL) and also RIL database itself (which interfaces modem). On my Qualcomm device RILD stores information to /data/vendor/radio/qcril.db including ICCID and MCC/MNC.
~# sqlite3 -line /data/user_de/0/com.android.providers.telephony/databases/telephony.db 'select icc_id,card_id,carrier_name,display_name,mcc,mnc from siminfo'

~# sqlite3 /data/vendor/radio/qcril.db 'select ICCID from qcril_manual_prov_table'

As of Android 9 IMSI is also stored in /data/system/netpolicy.xml to set mobile data limits for MNOs separately.
~# grep -o 'subscriberId=[^ ]*' /data/system/netpolicy.xml

RELATED:

How to get 2nd IMEI number using adb?

Thanks, finally tried this exceptional answer, it works!

One more question: I have 2-SIM phone, but putting the i32 2 after 8 or 11 doesn't do the job, it gives me the same numbers as w/o this append. Is my command correct?

service call iphonesubinfo 11 i32 2 | grep -oE '[0-9a-f]{8} ' | while read hex; do echo -ne "\u${hex:4:4}\u${hex:0:4}"; done; echo

@Suncatcher you may try i32 1 or i32 0. For all Android 9 sub-releases order of getSubscriberIdForSubscriber and getIccSerialNumberForSubscriber methods is 8 and 11. If it doesn't work then possibly Xiaomi changed the source code. You have to do hit and trial.

Well, for IMSI 8 i32 3 works, and for ICCID 11 i32 3 gives 8938001120308300159F instead of 8938001120308300159. Probably we should correct regex for extraction of ICCID but I have no idea how. I've never dealt with hex-extract in regex

@Suncatcher in raw output I get 00000000 in last row. Do you get 00000046 (which becomes F)? You can ignore last character using head or tail.

in raw output I get 00000000 in last row the same. Interesting why it is so different for 2nd SIM. Tried to append | head -c -1 and | sed -e 's/;$//' after echo but that didn't work. How to cut the last sign correctly?

@Suncatcher 00000000 itself turns to two Unicode null characters. So you need to do head -c -3.

it says head: -c < 0 (see "head --help") seems to be the wrong syntax

@Suncatcher use busybox head. Android's toybox is limited.


text:
Will Samsung galaxy s10 works in my country?
You may know that samsung galaxy s10 have two different versions, one with Qualcomm chipset and one with Exynos chipset. From reviews in the youtube and sites like bgr and anandtech, I'm more biased to buy an Qualcomm version, even though it''s not the International version.
My question is, would it work in my country? I live in sri lanka and is there any way for me to know that unlocked galaxy s10 Qualcomm version will work in my country?
can someone help me with this please?

By "work in my country" and [tag:connection-issues] & [tag:signal] tags, do you mean the telephony aspect (phone call, SMS, MMS, mobile data)?

Usually the biggest difference is the supported frequencies (LTE bands). Check the LTE bands used by your local mobile network provider and compare them with the different versions: https://www.techwalls.com/samsung-galaxy-s10-model-number-sm-g973-differences/

@AndrewT. yes, mobile carrier functions. will it be compatible to use in my country etc...

@Robert thank you. what will happen if some frequencies are not listed in carriers from my country? is it mean that I can't use it here?

@wydyq You can only use frequencies used by carrier in your country. But carriers may use other frequencies in future (depends on your government), therefore having more supported frequencies than used by carriers is better than the other way round.

@Robert I agree on having more supported frequencies, but I just want to know that do I get minimum requirements to use the qualcomm version in my country. (for 2G, 3G and 4G, cellular connectivity). Is there any connectivity band difference on Exynos version and Qualcomm version?

@wydyq Use the link in my first comment, there you see all versions and all frequencies/bands. Based on this information you can compare it yourself.


text:
Can't print or stop print job
I use a Huawei Mate 10 Pro. I am unable to print, so I tried to cancel the printing
job, but it just stays there forever and nothing happens.
I was unable to print a single page since I own this smartphone which I bought a year ago. The only way to remove it is by restarting the smartphone.
I am using a Canon MG 3200 printer.
PS: "notepad print wird gelöscht" means "notepad print is getting deleted" in english

The question does not focus on both the router/printer and rather on your phone. Can you try printing with another phone?

@CaldeiraG, ok thx, I flagged it. Yes I tried with Huawei P20 Pro, but it failed too.


text:
aCalendar does not show all my events
I am using aCalendar, with google accounts.
Recently, one of my calendars started showing only a few events. None in the past, only a few in the future.
The stock calendar app works fine.
I've tried emptying cache, reinstalling the app, still not working.
I need help to find where I should look next. No obvious setting to be found in my Google Calendar.

Please edit your question and add the link to the app on Goole PlayStore. Otherwise it is not clear which app you are talking about.

For questions or problems see our new help system at https://acalendar.tapirapps.de or contact our support at support@tapirapps.de


text:
Clicking on the Google Assistant icon of the google search widget doesn't activate google assisant
You know that Google Search bar widget that comes with the Google app? It has a Google assistant button click on which opens Google Voice Search instead of Google Assistant. How do I fix it? It used to work well but then I cleared Google web and app activity and that messed it all up.

Have you tried updating your Google app?

@daniel shakeel yes I have. It's on the latest version.

Please provide the complete android details.