text:
How to disable dm-verity on `Treble` , `system-as-root` device?
Background: Please check following links

How to disable dm-verity on Android with “user” build type ROM?
Stuck in boot-loop when unpack and pack system.img?

Update: So, I am trying to disable dm-verity on my Samsung S10 5G device to successfully flash an unpack, unmodified and then packed system.img.ext4.lz4 file(with another ROM files) using Odin.
I have tried the following things:

Removed avb flag from boot.img with following commands:

# magiskboot dtb boot.img print -f
> #345900: fstab
│  [compatible]: [android,fstab]
├── #345940: vendor
│      [compatible]: [android,vendor]
│      [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│      [type]: [ext4]
│      [mnt_flags]: [ro,barrier=1,discard]
│      [fsmgr_flags]: [wait,slotselect,avb]
│      [status]: [ok]
└── #346156: vm-linux
       [compatible]: [android,vm-linux]
       [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
       [type]: [emmc]
       [mnt_flags]: [ro]
       [fsmgr_flags]: [wait,slotselect]
       [status]: []
#343692: fstab
│  [compatible]: [android,fstab]
├── #343732: vendor
│      [compatible]: [android,vendor]
│      [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│      [type]: [ext4]
│      [mnt_flags]: [ro,barrier=1,discard]
│      [fsmgr_flags]: [wait,slotselect,avb]
│      [status]: [ok]
└── #343948: vm-linux
       [compatible]: [android,vm-linux]
       [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
       [type]: [emmc]
       [mnt_flags]: [ro]
       [fsmgr_flags]: [wait,slotselect]
       [status]: []

# magiskboot dtb boot.img patch

# magiskboot dtb boot.img print -f
> #345900: fstab
│  [compatible]: [android,fstab]
├── #345940: vendor
│      [compatible]: [android,vendor]
│      [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│      [type]: [ext4]
│      [mnt_flags]: [ro,barrier=1,discard]
│      [fsmgr_flags]: [wait,slotselect]
│      [status]: [ok]
└── #346152: vm-linux
       [compatible]: [android,vm-linux]
       [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
       [type]: [emmc]
       [mnt_flags]: [ro]
       [fsmgr_flags]: [wait,slotselect]
       [status]: []
#343692: fstab
│  [compatible]: [android,fstab]
├── #343732: vendor
│      [compatible]: [android,vendor]
│      [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vendor]
│      [type]: [ext4]
│      [mnt_flags]: [ro,barrier=1,discard]
│      [fsmgr_flags]: [wait,slotselect]
│      [status]: [ok]
└── #343944: vm-linux
       [compatible]: [android,vm-linux]
       [dev]: [/dev/block/platform/soc/8804000.sdhci/by-name/vm-linux]
       [type]: [emmc]
       [mnt_flags]: [ro]
       [fsmgr_flags]: [wait,slotselect]
       [status]: []

Removed avb and verify flags from dtbo.img with following commands:

# magiskboot dtb dtbo.img print -f
> #126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,verify,avb]
#126596: fstab
├── #126608: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]# magiskboot dtb dtbo.img print -f
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126796: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,verify,avb]
#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,verify,avb]
└── #126800: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,verify,avb]

# magiskboot dtb dtbo.img patch

# magiskboot dtb dtbo.img print -f
> #126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,]
#126596: fstab
├── #126608: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126788: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,]
#126600: fstab
├── #126612: product
│      [compatible]: [android,product]
│      [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/product]
│      [type]: [ext4]
│      [mnt_flags]: [ro,errors=panic]
│      [fsmgr_flags]: [wait,]
└── #126792: vendor
       [compatible]: [android,vendor]
       [dev]: [/dev/block/platform/soc/1d84000.ufshc/by-name/vendor]
       [type]: [ext4]
       [mnt_flags]: [ro,barrier=1,discard]
       [fsmgr_flags]: [wait,]

Patched ramdisk.cpio with following commands:

# magiskboot cpio ./initrd 'patch false true'
Loading cpio: [./initrd]
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[false]
Found fstab file [etc/recovery.fstab]
Dump cpio: [./initrd]

# magiskboot cpio ./initrd extract
# cat etc/recovery.fstab
> # Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#     * Redistributions of source code must retain the above copyright
#       notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
#       copyright notice, this list of conditions and the following
#       disclaimer in the documentation and/or other materials provided
#       with the distribution.
#     * Neither the name of The Linux Foundation nor the names of its
#       contributors may be used to endorse or promote products derived
#       from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#<src>                                    <mnt_point>    <type>    <mnt_flags and options>    <fs_mgr_flags>
/dev/block/bootdevice/by-name/boot        /boot           emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/recovery    /recovery       emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/system      /               ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/userdata    /data           ext4        defaults                  wait,length=-16384
/dev/block/bootdevice/by-name/cache       /cache          ext4        defaults                  recoveryonly
/dev/block/mmcblk0p1                      /sdcard         vfat        defaults                  recoveryonly
/dev/block/bootdevice/by-name/sec_efs     /efs            ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/sec_efs     /sec_efs        ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/carrier     /carrier        ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/hidden      /preload        ext4        defaults                  recoveryonly

# FOTA
/dev/block/bootdevice/by-name/apnhlos     /modem          emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/modem       /mdm            emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/dsp         /dsp            emmc        defaults                  recoveryonly
/dev/block/bootdevice/by-name/vendor      /vendor         ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/product     /product        ext4        defaults                  recoveryonly

# Add misc for GOTA
/dev/block/bootdevice/by-name/misc        /misc           emmc        defaults                  recoveryonly

# Samsung ODE
/dev/block/bootdevice/by-name/keydata     /keydata        ext4        defaults                  recoveryonly
/dev/block/bootdevice/by-name/keyrefuge   /keyrefuge      ext4        defaults                  recoveryonly

#Auto-generated code by FOTA Portal
/dev/block/bootdevice/by-name/dtbo  /dtbo   emmc    default recoveryonly

After patching, I have converted dtbo.img to dtbo.img.lz4 using lz4 compression tool and created new recovery.img image with patched initrd file.
After that. I have tried to flash magisk_patched.tar file with AP contents as one of the following:

Overwritten all three patched file in points 1, 2 and 3 above.
-> Stuck at splash screen when trying to go to recovery after successfully flash with Odin. Download mode is appearing on splash screen.
Overwritten 1.boot.img and 2.dtbo.img.lz4 above.
-> Successfully rooted but when trying to edit the system_root partition then I am facing the following problem:

D:\>adb shell
beyondxq:/ $ su
beyondxq:/ # mount -o rw,remount /system
beyondxq:/ # cd system
beyondxq:/system # echo "Test /system mounting" > temp.txt
beyondxq:/system # cat temp.txt
Test /system mounting
beyondxq:/system # cd ..
beyondxq:/ # mount -o rw,remount /system_root
beyondxq:/ # echo "Test /system_root mounting" > temp.txt
/system/bin/sh: can't create temp.txt: Read-only file system           ---> Error here
1|beyondxq:/ # cat system/temp.txt
Test /system mounting
beyondxq:/ # cat system_root/temp.txt
cat: system_root/temp.txt: No such file or directory              ---> Verify: File not created
1|beyondxq:/ # exit
1|beyondxq:/ $ exit

D:\>adb remount
Not running as root. Try "adb root" first.

D:\>adb root              ---> It didn't work as the next command is not working

D:\>adb remount
Not running as root. Try "adb root" first.

D:\>adb shell
beyondxq:/ $ su
beyondxq:/ # ls sdcard
Alarms Android DCIM Download Movies Music Notifications Pictures Podcasts Ringtones Samsung selinux_policy_modified
beyondxq:/ # mount -o rw,remount /system_root
beyondxq:/ # cp sdcard/selinux_policy_modified /system_root/sepolicy
cp: /system_root/sepolicy: Permission denied      ---> Permission Denied here
1|beyondxq:/ #

Overwritten 1.boot.img and 2.dtbo.img.lz4 above with unpack and packed system.img.ext4.lz4
-> The result is boot-loop after successful flashing.

Please suggest what went wrong or am I missing any step.

check if kernel allows context switching https://github.com/MrBIMC/SELinuxModeChanger/releases

Debug the app and verified that the kernel is not allowing the context switching. Also tried to run beyondxq:/ # setenforce permissive but beyondxq:/ # getenforce is always Enforcing.

Also Tried beyondxq:/ # su --context u:r:magisk:s0 -c "/system/bin/setenforce 0" and beyondxq:/ # su --context u:r:magisk:s0 -c "echo 0 > /sys/fs/selinux/enforce" i.e. with magisk context but the mode is still Enforcing.

if you can read code you might have a look in one of these shell scripts https://forum.xda-developers.com/showthread.php?t=3919714
https://forum.xda-developers.com/showthread.php?t=3817389

The target file has a zip format but I have only option to flash through Odin and Odin doesn't support this format.

The zip file contains only update-binary file under /META-INF/com/google/android/. So, this is made to be flashed using CWM or TWRP and both are out of options. Another reason for not using this zip file is that it doesn't support the Qualcomm model of Samsung S10 5G(SM-G977U).

look inside update-binary it is a shell script (qualcomm is supported too, based on magisk) https://github.com/Zackptg5/Disable_Dm-Verity_ForceEncrypt/blob/master/META-INF/com/google/android/update-binary

Shall I run it with su adb shell?

not recommended. besides you have to replace ui_print with echo the script propably won't work because the tools and mount points differ between system mode and recovery mode

not sure if related https://chainfire.eu/articles/885/On_LPX13D_SELinux_and_root

there is official TWRP for Qualcomm you could try to boot from fastboot or at least try to port for your device
https://forum.xda-developers.com/showthread.php?t=3980463
then flash the multi-disabler-zip which now also supports qualcomm
https://forum.xda-developers.com/showthread.php?t=3919714

@alecxs This TWRP doesn't support SM-G977U. I have tried it anyway but it's not working.

I use a simple script put into my su.d folder, named 'permissive.sh' (0755).  It would merely "echo '0' >> sys.fs.selinux.enforce" after boot-up, much like init.d; allowing my V4A and other 'dangerous' software to function w/o hassle while letting me pass Google's & Magisk's  tests even after i installed /systemless SuperSU into my /system.
Seems easier that way, w/o repacking img's & such, especially with the treble/system as root builds.


text:
Open links to particular domain with particular app
I use a browser as my default, but wish that links to certain domains be opened by default with another browser. For example if an app has a button that opens a website it normally opens it in the default browser. For most situations this is fine, but there a few exceptions I would like to change the browser the site opens in.
Is it possible to set "rules" for default app per domain?

Strictly speaking this is not an answer but a good workaround. My take on the issue is NOT to set a default browser in Settings. Whenever I click on a link I get the pop-up asking me to choose the browser/app to use. Like that, I can choose to open the links with the browser more appropriate for my needs.

AFAIK stock Android itself doesn't have any such feature. But it totally depends on the app you are using to open other links. Apps can open certain links with other apps/browsers. For instance browsers (like Firefox) can open facebook and youtube links in their respective apps if installed. Also it depends on the app which you want to open for a certain domain (if it accepts URL forwarded by other apps). It depends on intent-filters an app declares in its AndroidManifest.xml file. For little more details on this see this answer.

source: Stack Exchange

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

sort: votes


text:
integrate Google Photos with android system
I use ios for long time recently switched to android. my whole photo library in google photos but when i need to upload somewhere  i need to download it first to device and proceed to upload its irritating is there any way to link google photos to gallery like ios icloud photos when i use ios i can select icloud photo directly and it download & upload automatically. why google can't do that?

Google Drive was the integrating factor till July this year. It was possible to sync photos with Drive. Drive also works with ios.
Now that it is discontinued, there is no automatic way to upload but from Photos settings you  enable sync to drive (tap on the cloud icon) or using the share option upload to third party cloud/messaging/mail options.

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


text:
Install PIT File on Samsung S8 SM-G950F
I try to root my phone but now I get the error Failed to mount '/preload' (Invalid argument) on practially every operation in TWRP, so I read that I should replace the PIT-file with ODIN.
Is this source trustworthy:
https://zfirmware.com/download-samsung-galaxy-s8-g950f-pit-file/

if your device is functional in system mode, i recommend to just ignore this error in recovery mode. preload is not important partition, maybe your device don't have it


text:
What could be the cause of my phone going into safe mode?
I have a Huawei phone and I have been using it for several years but recently it sometimes ( very rarely) goes into safe mode. The android version is 6.
I do not have any external cover so no buttons are being accidentally pressed.


text:
Why are superuser permissions needed to acess /data partition?
The default account is normal user, and I used it to install Google Play Store APK (to /data). Then Google Play Store was opened using my current user's permissions, and it is used to download and install other APKs to /data. That means I have full access to the /data partition.
Why are file manager apps unable to view that partition without root permissions?

First to clarify only root (UID 0) isn't enough to get access to /data at least since Android 5. Discretionary Access Control  based on traditional UNIX UIDs/GIDs alone doesn't fulfill the needs of modern complex OSes like Android. DAC is supplemented by Mandatory Access Control (MAC); SELinux in case of Android. So to access /data your process/user must have an allowed policy explicitly defined.

Google Play Store was opened under my current user permission

This isn't correct. Concept of “users” is different on Android than on normal Linuxes. On Android every app is assigned a unique UID (from range 10000 to 19999) and it runs under its own user. Privileges are then controlled through Android's permission framework. At filesystem level every app is bound to a few directories (private and shared), that too subject to some permissions. For details see Where Android apps store data?
So there is no human user which could run its all programs under current user/UID.

it downloaded and installed other APKs to /data. That means I have full access to the /data partition.

Play Store doesn't install apk files, it just performs a few verifications and downloads the file using Download Manager (com.android.providers.downloads) which runs under its own UID. App installation to /data/app and other relevant directories is mainly handled by Package Manager service running under UID 1000 (system_server process) in Java stack and installd running under UID 0 in native stack. Package Installer (com.android.packageinstaller) is the system app - running under its own UID - which provides user interface to (un)install apps manually. See more details here. Similarly all apps and processes have their own SELinux contexts to allow access to required processes and files. There are a number of APIs and IPCs involved in this whole process.

Why superuser permission is needed for accessing /data partition?

Simply put, it's protection. As you need root access to change /etc directory on Linux OSes and as you need Administrator rights to open Registry Editor on Windows. This restriction is to isolate and protect every app's process in a confined environment. Other than DAC and MAC, other phenomena like Linux capabilities, namespaces, cgroups and seccomp filters are also used for this sandboxing. It also enforces apps' limited access to resources and makes auditing easy.
A few common reasons from my answer to How do I access $HOME/storage outside of Termux?:
/data partition also contains system settings including sensitive data like password databases (though not saved as plain text), contacts, call logs and apps statistics. So /data isn't accessible without root in order to:

Protect apps' private data from other apps
Protect system data and settings from bad apps and malware
Isolate users/profiles from other users/profiles
Not let apps access shared storage without Storage permission granted
Enforce APIs by Android framework so that apps can't use system resources and read/manipulate device information and settings without proper permissions

And possibly there are other reasons. For more details see Are multiple-users protected from each other differently than apps?

MAC is not needed to "fulfill the needs of modern complex OSes". It's a gratuitously more complex model for things that DAC/conventional unix permissions model could handle just fine. The purpose of MAC is impedance match with TLAs' mental model of access control, not any technical need.

@R.. my statement gives that impression? I said old traditional UNIX permission model used in 80's/90's isn't enough, that was designed to isolate human users, not processes. Some innovation is needed, whether that's capabilities or ACL's or MAC. I'm not an expert in security models but with my limited knowledge I don't have a strong reason to disagree with you. However it's an opinion and the opponents have strong arguments too.

@R @Ifran Latif.  So why the does  one app disappear after reboot after its linked to /data/sdext2 partition  & another app similarly linked with Exact same DAC Octals & Selinux  will survive a reboot. The disappearing app's ./app-lib  & ./data  folders are there but their folders in apk have vanished in  /data/sdext2 partition . This is besides ... /data/app/<disappeared app folder deleted here>. When I link everything short of  the apk  it will remain & everything is fine. Why this behavior ( magisk rooted android Q project Treble ROM  )  ?

seLinux is permissive

because sdext2 is mounted too late


text:
Fastboot stuck on sending system
I feel my old mobile with android 2 or 3 got bricked as it get stuck on boot logo each time but I can easily got into fastboot mode but in fastboot mode I can complete following commands like:
fastboot devices
fastboot flash recovery recovery.img
fastboot flash splash splash.img
fastboot flash userdata userdata.img

But each time I run the following command
fastboot flash system system.img

The fastboot command stuck on

Sending 'system' (124183 KB)

I can easily erase the system but cannot flash it.

Have you updated adb to latest version on your laptop. Older versions cannot handle big files

Yes to the latest released version i.eAndroid Debug Bridge version 1.0.41
Version 29.0.5-5949299
Installed as /usr/bin/adb

Boot in recovery and write system.img using dd.

Can you elaborate

@jkp https://duckduckgo.com/?q=%22dd%22+%22system.img%22

no /system mounted how to do so

boot in recovery from fastboot, once in twrp enter adb shell, or use -> Advanced -> Terminal
fastboot boot recovery.img
adb shell

be careful with dd especially double check partition name and partition size.
in your /etc/recovery.fstab there might be just a symlink but no worry you can use it dd will targeting the real partition.
cat /etc/recovery.fstab
ls -l /dev/block/bootdevice/by-name/system
dd if=/external_sd/system.img of=/dev/block/mmcblk0p99

 if the file size is bigger than partition size it is strongly recommended to add parameters block size and count to limit the write process to maximum partition size, otherwise your cache and userdata partition may be destroyed.

beware files bigger than 4 GiB can not copied to MicroSD Card, so instead adb push
adb push system.img /dev/block/mmcblk0p99

How can I view the Android internal partition table?
if you are not sure about your system.img is sparsed image or LZ compressed, you can check the header for file system type / partition magic
ext4: 0xEF53 at offset 0x438
f2fs: 0xF2F52010 at offset 0x400
hexdump -C -n1088 system.img | grep 53.ef
hexdump -C -n1032 system.img | grep 10.20.f5.f2

if one of these magic is found the image can be loop mounted for testing, otherwise you need to convert file with simg2img or sdat2img first

Using 1024 bytes as block size is a bad choice for flash storage. The internal size of flash chips is usually larger (in the range of 4-8K). Writing with a lower block size can result in flash blocks that need to be written multiple times. Therefore a block size of 8192 and a reduced count will preserve flash and also may increase writing speed.

thx, didn't know that. i was just always using 1k because it is easy to compare with output block size of /proc/partitions and df

Are you sure about this: otherwise your cache and userdata partition may be destroyed?

never tried, but once i dumped a 200 MiB "recovery.img" because dd was not detecting end of partition (lucky it was just copy not writing) i believe there are factores like dd version/build partition table layout or something that have influence. same for adb push, be careful

Storage devices and partitions are exposed by Linux kernel as block devices. One can't jump to adjacent block device by crossing boundary when writing to one block device - either in filesystem or as raw. That's the whole purpose of partitioning. // Btw system partition isn't necessarily always adjacent to cache and userdata partitions, there could be others.

By the way device is not recognized by adb only by fastboot

twrp recovery has adb


text:
Is there a definite way to know if my phone supports USB-OTG or not?
I have a Samsung Galaxy Win phone, rooted and with adbd insecure installed (using the link here).
This is the information shown by the USB OTG Checker app:

I have added the android.hardware.usb.host.xml file into /system/etc/permissions folder and the USB-OTG app says that my phone is now OTG capable (before, it showed that OTG is not supported only due to the missing xml file).
When I connect OTG cable and a USB drive, nothing happens at all. Same with a USB mouse. The USB Device Info app says nothing is connected. It's possible USB OTG hardware itself is missing from this phone, but it is very difficult to find any information about this model at all (it was really difficult to get this phone rooted in the first place).
Is there a definitive way to know whether the phone supports OTG or not? Is there a Java function that I could call which would confirm OTG, or is there any function that would crash if OTG is not present at the hardware level?
EDIT 1:
Output after doing the procedure mentioned in the comment:
"Do with root privileges: cd /sdcard && find /sys | sort >1. Connect USB. Then: find /sys | sort >2 && diff 1 2. This will let you know how kernel treats USB hardware."
--- 1
+++ 2
@@ -17357,10 +17357,15 @@
 /sys/kernel/debug/binder/failed_transaction_log
 /sys/kernel/debug/binder/proc
 /sys/kernel/debug/binder/proc/19015
-/sys/kernel/debug/binder/proc/19034
 /sys/kernel/debug/binder/proc/21683
 /sys/kernel/debug/binder/proc/22063
 /sys/kernel/debug/binder/proc/22112
+/sys/kernel/debug/binder/proc/22152
+/sys/kernel/debug/binder/proc/22166
+/sys/kernel/debug/binder/proc/22185
+/sys/kernel/debug/binder/proc/22197
+/sys/kernel/debug/binder/proc/22212
+/sys/kernel/debug/binder/proc/22224
 /sys/kernel/debug/binder/proc/2788
 /sys/kernel/debug/binder/proc/2796
 /sys/kernel/debug/binder/proc/2797
@@ -17402,12 +17407,7 @@
 /sys/kernel/debug/binder/proc/5383
 /sys/kernel/debug/binder/proc/5972
 /sys/kernel/debug/binder/proc/6076
-/sys/kernel/debug/binder/proc/6343
 /sys/kernel/debug/binder/proc/6358
-/sys/kernel/debug/binder/proc/6370
-/sys/kernel/debug/binder/proc/6382
-/sys/kernel/debug/binder/proc/6397
-/sys/kernel/debug/binder/proc/6410
 /sys/kernel/debug/binder/proc/6423
 /sys/kernel/debug/binder/proc/6439
 /sys/kernel/debug/binder/proc/6479

Check the kernel log via dmesg before and after connecting an USB OTG device. Usually you should see something in the kernel log if a new USB device is detected. Another potential reason why OTG does not work is if the USB port does not supply power. Try to use an active powered hub in between.

@Robert do I run that on the phone? How do I run this? Typing this in a terminal app says /system/bin/sh: dmseg: not found

Execute it via adb, and type it correctly then it will work.

Duplicate: How can I determine if my device has USB Host Mode (OTG) support?

USB OTG is a hardware capability. Software can't tell if the hardware has this capability or not if it's not configured to do so. The app you show is just confirming the presence of host.xml file that you have put yourself. Also you can confirm that form adb shell:
~$ pm list features | grep usb.host
# OR
~$ dumpsys package features | grep usb.host

For USB OTG to work, first your kernel should create a hardware entry in /sys as per device-tree mapping when you connect USB drive.
Secondly a device should be populated in /dev/bus/usb/... (and /dev/block/... if it's a storage device). It depends on uevent configuration on your ROM. Or you may also manually create device using mknod.
Thirdly you need to place host.xml file so that OS and apps can know that USB OTG support is present on device. Now apps can access USB device directly (provided that proper permissions are set on device path and node) by making use of host mode APIs.
Lastly if your ROM supports auto-mounting USB Storage devices (available on Android 6+), you should have an entry for vold in fstab. See How to disable USB OTG on Android 8.1?
As suggested, your Edit 1 shows that the changes in sysfs after attaching USB are only in debugfs, no hardware is detected by kernel.
One last thing you can do is to use a powered USB hub as suggested by @Robert in comment. Also check dmesg log for kernel messages and logcat for USBManager and USBHost messages in Java stack. If no hardware is detected then your hardware or at least kernel doesn't support USB.


text:
Apps showing up as blank white screens in recent apps list when in landscape orientation
I've noticed some odd behavior on the recent apps screen on Android that I can't find an explanation for anywhere. When I open apps on a phone while in landscape view and switch to the recent apps screen all I see is a white square for that app, no preview thumbnail.
This is how it looks on a OnePlus 6 when I open Chrome in portrait mode and open the recent apps screen, and when I open Chrome while in landscape and then go to the recent apps screen

And similar behavior on a Pixel 3:
Opening Chrome in portrait and in landscape, then switching to recent apps

If I give the Pixel 3 some time it will eventually generate a thumbnail for the landscape app though about half the time it looks squished and the other half it isn't up to date with what was actually being shown on the screen.

My question is why does Android seem to struggle with generating landscape preview thumbnails for the recent apps screen? Has anyone else experienced this behavior or know of a fix for it?

As an Android developer, the only thing I can be sure of is that configuration changes force the activity to be restarted. This includes screen orientation (portrait, landscape), so Chrome has to be destroyed and recreated, returning a blank/stale landscape content instead.
From Android Developers - Handle configuration changes

Handle configuration changes
Some device configurations can change during runtime (such as screen orientation, keyboard availability, and when the user enables multi-window mode). When such a change occurs, Android restarts the running Activity ( onDestroy() is called, followed by onCreate()). The restart behavior is designed to help your application adapt to new configurations by automatically reloading your application with alternative resources that match the new device configuration.
To properly handle a restart, it is important that your activity restores its previous state. [...]

(Also, list of configuration changes)
I cannot reproduce this issue on my device*, but from the screenshots, the recent list is always shown in portrait mode, so there is a change from landscape to portrait between triggering the "recent apps list" event and showing it. I'm not sure about the order of the events for screen rotated, app destroyed, and app recreated, but most possibly it is destroyed-rotated-recreated, thus the app is not ready yet to re-render the activity (since an activity also cannot run while on the background), returning a blank white screen or use its previous state (the stale landscape content) instead.
The "fix" ― if it is possible ― is to allow showing "recent apps list" in landscape mode.

*The reason I cannot reproduce this issue is that my device allows showing "recent apps list" in landscape mode, so the thumbnail is shown correctly. However, when I rotate to portrait while on the list, the thumbnail will be shown squished as the screenshot.
Also, the restart may be observed more easily by rotating the screen while Chrome is active: after the rotation, Chrome will re-render the content to current available space.
Lastly, I do not know why the recent apps list is forced on portrait mode, but that is out of the question's scope.


text:
Apps are crashing endlessly even after a factory reset, preventing me from doing anything
Some apps are crashing endlessly, and I can't do anything because they just keep giving me the same errors.

I've even done a wipe-out/factory reset, but the problem still persists.
This problem was first started long time ago when my battery had problem and my phone just shut down in the middle of work. When I replaced my battery and reset my phone all of my problems were solved. But recently, I mean 5-6 months after replacement, my contact and dialer app started to give me that error. I installed another dialer and contact app and I thought that if I do a reset it will fix it, and when finally I did a factory reset my setup wizard and social plugin and contact and some other apps just have this error.
My Android version is 6.0 and is stock official.

It seems like your firmware are broken, you can try to reflash the firmware, or Install a custom rom. Have also a look in xda in your phone thread maybe this problem has anyone before you.

this problem was first started long time ago when my battery had problem and my phone just shut down in the middle of work but when i replaced my battery and reset my phone all of my problems was solved but recently i mean 5-6 month after replacement my contact and dialer app start to gave me that error and i installed another dialer and cantact app and i thought that if i do a reset factory it will fix it and when finally i did a factory reset my setup wizard and social plugin and contact and some other app just have this error and i did all (FYI my android is 6 and is stock official)

Did you tried to reflash stock firmware?


text:
How can I switch out of "Internal Beta" version in Android App Store?
I'd like to install the most recent public version of an app I'm working on. I also happen to be a beta tester.
The page for the app in the Android Play Store has many tells that it is for the internal beta:

You're an internal tester. This app may be insecure or unstable.

How do I switch out of this without removing myself from the beta tester list?

If you want to go back to the public version, you just have to leave the beta program. Leaving the beta program is done using the page for the application in the Google Play Store. Open the page of the app in the Google Play Store, and scroll down till you something like "You're a beta tester". Just below that title, there should be a button "Leave". Pressing that button will bring you back to the general public version.
Watch out, because some apps don't work that good if you want to go back in version numbers. Could be you have to reinstall the app afterwards.

"without removing myself from the beta tester list".  I suppose it is not yet possible then.

The only way is by removing yourself from the beta tester list as far as I know. You can probably go back to the beta if you want after going to the public version?

One other thing that could prevent getting out of Beta is if you enabled Developer Options on your phone. You have to go to Settings -> System -> Developer Options -> Use developer options (turn off). After that if you already left beta testing group, the app should now show up as non-Beta in Play Store.

Based on my experience, Developer Options isn't really related to the Google Play Beta program, but this answer might tell a different story.

I used to have a "leave" option for internal testing in the GP store app, but can no-longer find it.
The only way for me to get back to the prod version was by following the above suggestion (disable developer options on my Samsung Galaxy A7 tablet).
I'd tried removing myself from our internal test list, and restarted device, but that alone didn't pull me out of the internal test track.  After disabling developer options, and app-switching back to the GP store w/our app open, it auto-refreshed w/o the internal test verbiage, and was able to install the prod version w/o issue.

Neither work for me - I have no Leave option, and turning of Developer options didn't affect which version of the app I had installed. Even after uninstalling, it still comes with the warning "You're an internal tester. This app may be unsecure or unstable". And when I install it installs an internal beta version that isn't compatible with the production environment.

If you have access to the developer console, you can download the most recent public version's APK and install it on your device manually. Type in "App Bundle Explorer" in the search bar at the top of the developer console and you will be able to pick the version to download the APK for. Once you install it on your device, you can test it and then also test upgrading to the version available to the internal testers.

Uninstall the app from the Play Store.
Then browse the beta tester invitation web page you have received by email when you apply to be a beta internal-tester. There is a blue button link to leave the beta.
The page url looks like https://play.google.com/apps/internaltest/[some-numeric-id]
You can find the page link at Google Play Console > Your app > Tests > Internal tests > Testers tab > "Copy link" at the bottom.
Then install the app again.

In my case, I just delete myself from the list of users for the internal test from the Play Console.
Then I uninstall the app and delete the cache only.
Then I get (Internal Beta)" removed.


text:
How to share the file names of all the files in a folder in Android?
It is being surprisingly hard to achieve. I've tried so far:

Download file manager apps from Google Play. Unfortunately, "share" shares the files, not the file names. None of them had a option like copy file names
Download backup apps. Unfortunately, none of them backup the file names of a folder.

Any idea to copy to the clipboard or share the file names of all the files of a folder?

Use ls or find command on any terminal emulator app or adb shell.

@IrfanLatif actually I'm searching for an easy way to do it as it's to tell a friend to share the name of the music files of 3 different folders.

In my opinion it's the easy way. See my answer.

Install Termux
Grant Storage permission
Do:

~$ find /sdcard/Music/ -type f >/sdcard/list_of_files.txt

Replace Music directory with whatever you want.

Thanks! I think this answer will be useful for a lot of people! For my case though, it has to be a solution that works for my "grandmother"

@chelder if you want app recommendation https://softwarerecs.stackexchange.com/ is the right place.

Thanks! I did not know softwarerecs. I asked here: https://softwarerecs.stackexchange.com/questions/71427/how-to-share-the-file-names-of-all-the-files-in-a-folder-in-android


text:
RTT/TDD/TTY keyboard not showing in dialer app, for those of us with disabilities

There is an option to enable TTY in LineageOS 16, but it seems to do nothing. Phone -> menu -> Settings -> Accessibility -> TTY Mode -> TTY Full
Full documentation of functionality for users: https://support.google.com/accessibility/android/answer/9042284?hl=en

This step never shows:

While the phone rings, the other person's screen displays an RTT indicator Real-time text.

Is this also supposed to enable TDD? Does the phone automatically detect TDD tones then fallback to TTY tones?

Edit:

Here is a page showing the desired functionality, but on iOS 10. https://support.apple.com/en-us/HT207033

It looks like iOS also  has more options which I think would be very useful  in LineageOS/Android, for example placing the call directly or automatically dialing into a relay.

Looks like there's a prerequisite from the linked Google Support: "To find out if you can use RTT with your device and service plan, check with your carrier.". Perhaps that's what you need to confirm first?

I am unsure which carriers don't support it, but mine says they do. Mine is an MVNO that operates off of AT&T towers in the US. Good catch though. Edit: Quote from FCC https://www.fcc.gov/consumers/guides/use-tty-devices-digital-wireless-phones: "Wireless service providers have upgraded their digital networks to be compatible with TTYs. Consumers are now generally able to use TTYs to complete calls with their digital wireless phones, including 911 calls, if the phone itself is TTY-compatible."


text:
Using mobile data on sim card 1 and sim card 2 for calls and messages?
Can I use both sim cards in order to use internet and handling calls? For example, while browsing on the internet on sim card 1, can I get calls to sim card 2 and also call to somebody else?

while browsing on the internet on sim card 1, can I get calls to sim card 2 and also call to somebody else?

You can call someone/receive calls in SIM 2, but you won't be able to use the internet from SIM 1 during the call. But if you call someone/receive a call on SIM 1, you can still use the internet from SIM 1 during the call.

Thanks, it's really disadvantage that I can't use internet during calls.


text:
Adroid phone refuse to connect via WAN interface while all other devices on the LAN or WiFi can connect to internet
In short, my phone cannot connect to the internet via 2 WiFi access points in my house. 4G mobile data works fine. Connecting to other WiFi and hot-spots away from my own WAN works fine.
All other devices, around 14 which includes phones, laptops, PC's, servers, VM's and 2 chromecast devices, all work without any issues.
My mobile phone worked fine until sometime late Friday afternoon. I did not install any new software or fiddled with the settings in days. Phone works well no issues with anything.
Mobile Phone - Doogee N10 - about 1 year old on Android 8.1.0
Router WiFi AP 1 - TP-Link Archer VR1600v IP 192.168.1.1 WAN connection
WiFi AP 2 - Netgear R6020 IP 192.168.1.178 (reserved)
LAN to LAN connection between the TP-Link and the Netgear Routers.
Netgear Router WAN port is disabled.
DHCP runs on the TP-Link Router LAN IP Range via DHCP 192.168.1.100 - 192.168.1.200 /24
Test 1 : 4G mobile data enabled / WiFi disabled - internet access OK from all apps.
Test 2 : Switch WiFi on for AP 1 (TP-Link) - establish link, gets IP does not report internet access problem. - But all apps don't connect to internet, browser times out.
Test 3 : Switch WiFi on for AP 2 (Netgear) - Result same as test 2 - No internet connection.
Test 4 : Get another member of the household to switch on WiFi hotspot on their mobile phone - Connects and internet works fine on all browsers and apps.
Things I have done to check out possible issues:

Assigned a reserved IP of 192.168.1.177 on the DHCP in case of aduplicate IP from another device.
Checked firewalls and black lists and filters on both routers, nothing. I can see the connected Doogee mobile phone in the WiFi connected listings same as all other devices.
Rebooted, powered down and deleted all the WiFi networks settings one by one made no difference.
On the Doogee Android admin menus, there is an option to completely reset all the networking configuration settings to factory. Done, re-entered all the settings and made no difference.

On my PC (Linux), I have 2 terminal sessions open. On the 1st one I ping a random ftp site somewhere on another continent. Ping is stable at about 500ms. This is my confirmation that there are no issues with the WAN connection. On the seconds terminal, I ping the Doogee Mobile phone on the 192.168.1.177 IP.

Phone connected to AP 1, it often stops randomly with no ping
activity, and then just carries on normally after some time.
Phone connected to AP 2 pings seems better without long ping pauses.
Switching between AP 1 and AP 2:
3.1 AP 1 - When switching to AP, it can take up to a minute before the ping responds.
3.2 AP 2 - Ping resumes as soon as a connection to AP 2 is established.
Pinging the Doogee is all over the place. Ping times vary anywhere from 2ms to around 700ms.

I don't have any side loaded apps installed. Everything is from Google Play. I installed Trend Micro mobile AV briefly just to make sure it is not something that the Play store didn't pickup.
I can from the browser on my phone connect to any other server / router on my LAN. I can connect to both the routers management interfaces. I can use my "Fing" app to browse all the devices on the network, port scan them and ping them from my phone. Fing however sometimes reports that I do not have internet access, but not all the time.
It seems like my phone refuses to connect to the internet via my WAN port. All other devices have no issues via the same WAN port. My phone connects to the internet via all other means except the WAN port on my network. No firewall or blacklist preventing it. No duplicate IP's.
I am completely baffled, any ideas or pointer welcome please :)

Installed various tools to analyze the the network and DNS changers. The DNS changers tries to establish some sort of a VPN but none makes an difference to the connection status via WiFi. I did pick up that the network analyzers all report my WiFi DNS as 192.168.1.1 (my gateway IP)  and 0.0.0.0??? I don't think that is right? I tried twice now to reset all network setting, but this does not change or reset the DNS. Last thing I want to do is a factory setup.... So the DNS does not come from the router either, which points to my ISP's default DNS. Now how do I fix the DNS or reset it?

So by editing the advanced setting of each WiFi connection and changing it from DHCP to Static, I can set my static IP the same as the reserved IP of 192.168.1.177 and the the DNS to anything I like. So I tried 8.8.8.8 and 1.1.1.1 and my local ISP's DNS setting, all with the same new outcome. When I use the static settings, the problem reverse. I can now see the interwebs, but my local LAN via WiFi is missing.... I can now browse and ping and traceroute and port scan  any website, but the local LAN including my 2 chromecast devices are missing.

Fing tells me that I don't have a WiFi connection, but I have, minus my local LAN. The IP Tools app now tells me that the DNS is what I set it and not 192.168.1.1.  Aaaargh!!!


text:
History of unlock patterns
I have a Samsung Galaxy J3 (2016) on Android 5.1 Lollipop unlocked (with ADB and TWRP). I want to see an unlock pattern that I used a few months ago.
Is there a way to see the previous unlock patterns that I've been using before?

A few months ago, I broke my phone with a pattern lock. Until that, I had been using another phone and I used the same password. But months later, I changed the pattern and I forgot the previous one, which I used on my broken phone.
A few days ago, I have my phone, but when I try to put my pattern, it was incorrect. Now I'm trying different methods, like bugs or tricks, doing backup, and more, but none of them works.
Also, do you know a way to unlock the phone? Normally, I use the fingerprint, but anyways, you restart your device and it asks you for the password. It's a Xiaomi Redmi Note 5 and I think the USB debugging is on.

Hello. What problem are you trying to solve with this? Also, it is unlikely system would store this thing even in memory, let alone the persistent storage.

A few months ago, i brake my phone, with a pattern lock, until that, i been use another phone, and I use the same password, but months later I change my pattern and i forgoted the previous, which i use to my broked phone,a few days ago,i have my phone, but when i try to put mi pattern, it was incorrect , now im trying different methods,like bugs or tricks,do backup and more, but any of them works. Also, you know a way to unlock the phone? Normally i use the fingerprint but anyways you restart your device its lend you the password.. Its a Xiaomi Redmi Note 5 and I think the usb debugging is on.

Even I have the same problem. I have forgot my pattern on Motorola One Power(having stock android) when I switched to my new Samsung phone. Now I want to access some files on my old phone but I cannot unlock it. I have already entered 32 wrong patterns.


text:
How to "fastboot flashing unlock" when device has no volume rocker?
I have a android tablet that has no volume buttons, but has an unlocked OEM bootloader. I'm trying to flash a new rom, and after I run fastboot flashing unlock I am presented with a prompt that asks for me to press volume up.
Is there anyway to override this prompt? like -y or something?
I'm asking for a general solution as this problem happens to a lot of people from time-to-time. Whether it be from a broken rocker or from a device that has no volume buttons.
Edit: I didn't think to add the type of tablet, since none of you all would have heard of it. It is an eewrite e-pad pro by Wisky (sold by novadealshop) running Android 7.1.1. Any additional information about its specs can be found here: https://www.reddit.com/r/e_pad/comments/drmi5s/full_device_info_for_eewriter_epad_by_wisky/

fastboot oem unlock-go

Does this answer your question? What is the difference between fastboot oem unlock and fastboot oem unlock-go?

When a device has no volume rocker it is usually flashed using an external tool and not via traditional fastboot methods.
In this case, the device is a MediaTek Android smartphone (MTK based), and nearly every smartphone with this chipset can be flashed not using fastboot, but with the SP Flash Tool.
The latest version SPFlash Tool v5.1924 can be downloaded at:
spflashtool.com or androidmtk.com
This tool allows the flashing of Scatter Based Stock Firmware on devices powered by Mediatek Chipsets. All you need is the correct Scatter based Stock Firmware of your Device.

your question is about unlocking bootloader. your answer is about flashing stock ROM. i don't think your answer is solution for headline


text:
How to install SuperSU using adb while the phone is in TWRP recovery with a broken screen
I have a Samsung Galaxy S4 SHV-E330S with a broken screen (cannot see or touch anything). Please see this and it's comments for more context
I have managed to flash TWRP on this phone (https://twrp.me/samsung/samsunggalaxys4ltea.html) and now I can boot the phone into recovery mode and during this time I can use adb to get a root shell on the phone
I would like to find a way to stream it's screen to the laptop monitor and control it using adb, but I suppose I will need to root the android OS first to this more easily
I cannot use the phone screen so I am not sure how I can install SuperSu.apk from the phone itself. Is there a way to install it through adb? I think the adb shell I get while the phone is in recovery is not the android OS if I understand it correctly, so I don't know adb pm install while in recovery will install the apk correctly. Using adb to control the phone while in recovery is the only I can do anything at all with this phone at the moment so as far as possible I don't want to do anything wrong which might make me loose control of adb during recovery. What is the best way to go about this?
Or is there any way to get adb authorization for android OS, without root and completely through adb while in recovery?

See if my answer helps you in bypassing adb authorisation issue. https://android.stackexchange.com/a/120453/96277 // As for rooting the device you need to flash a SuperSU zip. It would install all the necessary files including the SuperSU apk. However,  it is best you find solution for adb authorisation and streaming display to external sources because SuperSU needs to be configured too and you can't as of now due to non-functional screen.

@Firelord I'll have a look at the authorisation issue using your answer thanks. If this part is solved, then for at least streaming the display and controlling the phone through adb, I can do it without having root? And even if I am able to view the android OS screen on PC and control it through adb, will it make it any easier to root in later on? because I am guessing I can't stream the screen contents while in recovery, and I thought that was the point where I have to do the rooting process

I don't think there are much choices to stream screen content for Kitkat devices without root access, but you are free to search into. You have the twrp access which actually is the easiest thing to root a device. My suggestion is  that you prioritize adb access first, than find solution to stream, and if all good solutions need root access than only root your device.

@Firelord I found the adbkey.pub file in my .android folder and pushed it to /data/misc/adb/adb_keys like it says in your answer while the phone was in recovery mode. I rebooted the phone and I still get unauthorized when I type adb devices. trying to adb shell into the phone while it it running android OS  (not in recovery) I get this error: error: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set Try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device. Is there anything else I can try?

@Firelord the other rooted phone does not have an adb_keys folder inside  /data/misc/adb/ and to be honest I don't exactly remember if I ever authorised this phone on my PC or not, I think it has always "just worked" after I connected the USB cable. Is there anything else I can try?

@Firelord with the adbkey.pub still in place, I added the lines mentioned in this answer (https://stackoverflow.com/a/36507415/1693203) and the phone is still unauthorised

Sorry, I don't know what else to recommend now. :(

@Firelord it's working now https://android.stackexchange.com/questions/218640/how-do-i-bypass-the-rsa-authentication-dialog-box-to-enable-controlling-phone-fr


text:
How can I change the rate at which Gmail checks for new emails?
How can I change the rate at which Gmail checks for new emails?
I've noticed that when I receive a new email on my Gmail account, it sometimes take up to 15 minutes for the notification to show up on my phone (Samsung Galaxy s9, Android 9).

AFAIK does not periodically checks for mail. Instead it uses Google push notification  for "instant" notifications. On modern Android system the push notifications are no longer instant for battery saving. Therefore the system enters a deep sleep mode and wakes up only every 10-15 minutes. I don't know if you can configure this behavior. May be disabling the battery optimization for Gmail has an effect but I am not sure.

@Robert thanks this is great information, I was wondering why notifications were faster on my old phone. Definitely very interested in a fix, as I want to be able to reply to emails promptly.

The new mail system does not use the classical POP/IMAP wherein there was a scheduled check on the server for new messages. Now, the notifications are directly pushed to the device by using the Google Play Services infrastructure.
Most Android phones use Doze to preserve battery life. That is if the device is not being used for some time, it will enter a battery saving mode wherein it will not actively listen to incoming push notifications, instead it will wait for some time to do a routine check. As soon as you move the phone, it should wake up and do an instant check.
Most phones will have a way to partially allow the apps to continue to work normally under the lockscreen. The settings will depend on your device, but you can try looking into: Settings > Apps & notifications > Special app access > Battery Optimization. In there, disable the battery optimization for Gmail app.
Screenshot:

Thanks, disabling the battery optimization for Gmail solved the issue: I now receive notifications almost instantaneously (a few seconds).


text:
Does playing a 1080x1440 (16:9 aspect ratio) video in a 720x1600 phone decreases the quality a bit?
If I play a youtube video in 1080p quality, that's actually 1080x1440 (16:9 aspect ratio) resolution, right?
Realme 5 vs Redmi note 7 comparison:
720x1600 | 1080x2340
I'm wondering if realme 5 only supports up to 720px (in height), but it supports up to 1600px (in width).
Will that decreases the quality of the video a bit compared to playing it on a Redmi Note 7 that supports up to 1080x2340?
Or I will get the same 'Full HD' quality of a 1080x1440 video on both resolution in my naked eye?

1080p = 1920×1080


text:
Where is a file actually located in case of bind mounts
I have a rooted phone with Magisk 20.1 running on it. Inspired by this answer on Unix SE, I successfully created a bind mount using Termux. It was between a folder on external SD card and one in the internal storage. The commands executed are as below:
>su
>mount -o bind /storage/6333-6461/Books /storage/emulated/0/Books

The original folder in SD card is about 9GB, and my phone memory had only 1.2GB free. Needless to say, thanks to the Linux architecture, there was no problem because the folder in internal storage was just pointing to the one in SD card.
Now, I placed a test file in /storage/emulated/0/Books, and it was instantly visible in the original folder in SD card.
Then I removed the bind mount using the command >umount /storage/emulated/0/Books. I found that the test file was still there in the original folder in SD card.
My question is: When I placed the test file in the bind mount before unmounting, where was it actually located: in internal storage or external SD card? If I place a large file in the bind mount (i.e. in /storage/emulated/0/Books), where will the file take up space: in the internal storage or the SD card?

I had used similar Magisk modules earlier (don't recall which one) but to answer your question, file is on external SD. To verify place a really large file >10 GB. It can't fit into your internal storage but it will allow because it is stored on external. I don't understand the how

Thanks @beeshyams. 10GB would have been to much; I tried with a 300MB file. You are right. Maybe post this as an answer that I can accept?

Thanks but no because the answer should also explain the how,not just the end result. I am sure someone else can explain.//BTW 300 Mb file is not a good test case because it is smaller than internal free space. Try something larger than internal free space.

Obviously your file would be written to external SD card, that's the whole purpose of bind mounts. Your actual question is How bind mounts work? and it's generally about any Linux-based OS, not Android specifically. However bind-mounting inside storage/emulated/0 may cause you trouble in some situations. You may want to read details here: https://android.stackexchange.com/a/217936/218526


text:
How do I bypass the RSA authentication dialog box to enable controlling phone from adb?
My phone is Samsung Galaxy S4 SHV-E330S with a broken screen (cannot see or touch anything)
For more context please see my old questions here and here.
I have already tried these:
Can I enable USB debugging using adb?
https://stackoverflow.com/questions/26213954/how-to-solve-adb-device-unauthorized-in-android-adb-host-device
Nothing seems to work. I have pushed the adbkey.pub file in .android folder in the PC to /data/misc/adb/adb_keys in the phone while in recovery. On rebooting to android it was still unauthorized. I am pretty sure that before the screen c\broke AI had developer mode and USB debugging enabled on this phone. regardless, I executed the commands shown here
adb shell mount /system
abd shell

echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop

since I found out that the above lines of text were not in the original default.prop and /system/build.prop (even though I am pretty sure I had enabled USB debugging before the screen broke). Even after adding these lines, the phone is still unauthorized when I reboot to android. Since then I have recovered the original default.prop and /system/build.prop into the phone.
What else can I try now to bypass the RSA authentication dialog box? I have another rooted android phone (different model and OS version) which I have full access to through adb, but it does not even have an adb_keys folder inside /data/misc/adb/adb_keys, so I can't just copy over from that phone to this phone either.
What else can I do to bypass the RSA authentication dialog box on this phone?

This was solved using clues from this post

If you only need to authorize one computer:
   Simply copy the adbkey.pub
  onto the device location:
    /data/misc/adb/ and rename it from
  adbkey.pub to adb_keys
   chmod 0644 and then reboot.

I forgot to do the chmod but still works.

So you passed the RSA Authentication this way, not bypassed.

more safe method is 'adb push adbkey.pub /data/local/tmp; adb shell cat /data/local/tmp/adbkey.pub >> /data/misc/adb/adb_keys' that won't erase existing RSA keys or change file permissions

The question is how to bypass this prompt for all devices. Just connect without authorization at all.


text:
WhatsApp issue on Android
We have a WhatsApp number dedicated to providing training to students all over the world. We have 13191 contacts saved in phone and there are 19103 chats in WhatsApp. We also have 50 broadcast list. We are facing the following issues in WhatsApp,

When we set status in WhatsApp, it gets hanged. We need to force stop the app and then restart to use it again. It keeps happening when setting Whatsapp status.

When we reply to any chat message, it takes around 5 mins to get reached.

When sending any message in a broadcast list, it takes around 10 mins to reach the contacts.

We are using an Android Samsung tablet with a storage of 64GB and 4GB of RAM.
What to do to resolve the above issues?

Well, the answer may be not in android, but in the web service, you should maybe use this. There are some limmitations but you should try. In my actual phone, a Galaxy S5, Whatsapp freezes when I receive several notifications in a short time.

Have you tried using web.whatsapp.com ? I find that using this method helps sometimes. Maybe also consider deleting the app's cache, and reinstalling the app from the google play store. Sometimes the app's cache gets fragmented.

If you are using regular WhatsApp, try to use WhatsApp for business app, as it's mainly designed for businesses, hope it will be more stable for more number of chats.


text:
Using a keyboard to send Volume Up signal to confirm flash on device without volume rocker?
Background
I have a tablet that I am trying to fastboot flash a custom ROM on. The problem is this tablet has no volume rocker. In order to flash, fastboot requires you to press volume on the device up to confirm the flash. My question to bypass this is in a different post.
Device is very obscure: An Eewrite (manufactured by Alps) e-pad pro by Wisky (sold by novadealshop) bought from Hong Kong, running Android 7.1.1 with a Type-C adapter, a physical home and power button.
Question
Would it be possible to send the volume up signal using a usb-c splitter/hub and a keyboard that has a volume up button?
I want to ask before I buy the keyboard and thunderbolt-3 hub. I am also worried that many of these hubs might not be recognized by the lowlevel stock recovery environment.

I see now how my thinking and wording of the problem limited my ability to describe and troubleshoot it. Thank you for the clarifications

Fastboot is implemented in bootloader (like aboot or LK) i.e. in boot chain it loads even before the first process (kernel) of main OS. It has its own very minimal kernel which doesn't recognize any hardware components (even on device) except those necessarily required at this stage (processor, memory, display, flash storage etc.). Communication with PC over USB is only acceptable through fastboot protocol which doesn't have support to accept keystrokes or other input events (at least I never heard of such functionality). So it won't receive your


text:
Disable Call Waiting
Is there a way on Android to disable call waiting?
Quite often I'll be in a conference call and suddenly one of my friends tries to call me when I'm in the middle of discussing something quite complicated.
The phone will start blipping at me to indicate the second call is coming in.
I'm really not great at multi-tasking and this completely throws me from the discussion I'm already in.
Is there a way to set the phone to redirect the secondary caller straight to voicemail?
I'm using a Motorola One Vision.

This is usually a configuration of the cell phone network. Check your mobile network provider for the necessary number codes for configuring what should happen to incoming calls if your line is busy.

I've discovered there is a setting for it in Android as my network provider didn't provide any instructions for this.  I've added it as an answer below.

So I've discovered there is a way of doing this.
I found this answer on Quora:
https://www.quora.com/Where-is-the-call-waiting-option-on-Android-7
There's a video there and the answer is essentially :

Open the phone app Press the Menu button (3 dots top right)
Press   Settings
Press Calling Accounts
Press on your call Operator (Was EE in my case)
Press Additional Settings
Slide Call   Waiting to disabled

Have you tested if this results in the redirection to voicemail what you had asked for or do the caller no get the busy signal?


text:
How to capture kernel panic logs when ROM failed to flash?
Background: Stuck in boot-loop when unpack and pack system.img?
Short Description: I am trying to modify the system partition of my Samsung S10 5G system-as-root treble device. I have successfully rooted it with patching the AP file and flashed it on the device. It works fine but if I will just unpack and then pack the system.img.ext4.lz4(or vendor.img.ext4.lz4) and put it in the AP file, then the flashing succeeds but the device stuck in a boot loop. So, I am interested to see the logs that cause the boot loop.
Try 1: I have read about pstore and using adb I have noted the following things:

Run find . | grep pstore and the result is as following:

./sys/fs/pstore
./sys/module/pstore
./sys/module/pstore/uevent
./sys/module/pstore/parameters
./sys/module/pstore/parameters/update_ms
./sys/module/pstore/parameters/backend

Check the kernel config by pulling the file from /proc/config.gz and it has all the flag available that are listed in Reading kernel logs article.

$ cat config | grep PSTORE
CONFIG_PSTORE=y
CONFIG_PSTORE_ZLIB_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_PMSG_SSPLOG=y
CONFIG_PSTORE_RAM=y

With the above information, I should be able to read logs from /sys/fs/pstore/ after following the following steps:

Flash the ROM that makes the kernel panic. Followed all steps to root the system-as-root device until the step to boot in recovery mode after factory data reset. Because the device didn't boot properly and stuck in a boot loop.
Open the download mode and flashed the working ROM with following the root instructions.
After setup the device, I have installed MagiskManager and let it do its work.
Then, I have opened the adb shell with su user. I have tried to check logs but there were no logs:

1|beyondxq:/ # ls -l /sys/fs/pstore/
total 0

Try 2: Read this article and tried to do the same step as above but with mounting /dev/pstore as following:
// Just flashed rooted ROM
// Install MagiskManager and allow it to do required setup
// Run adb shell:
D:\SamsungS105G\VZW-G977UVRU2ASH7-20190827135903>adb shell
beyondxq:/ $ su
beyondxq:/ # ls -l /dev/pstore
ls: /dev/pstore: No such file or directory
1|beyondxq:/ # ls -l /sys/fs/pstore/
total 0
beyondxq:/ # mkdir /dev/pstore
beyondxq:/ # mount -t pstore - /dev/pstore
beyondxq:/ # ls -l /dev/pstore
total 0
beyondxq:/ #

// switching off
// Opening Download mode
// Flashing Panic ROM
// Reboot into recovery
// Done Wipe data/factory reset and then Reboot system now
// Pressed Recovery ket combination till Splash Screen
// Instead of starting setup, the device rebooted, display Splash, black screen, and then again device rebooted...[3 times]

// Open download mode
// Flashing rooted ROM
// Reboot into recovery
// Done Wipe data/factory reset and then Reboot system now
// Pressed Recovery key combination till Splash Screen
// Device opened with root enable
// Install MagiskManager and allow it to do required setup
// Run adb shell:
D:\SamsungS105G\VZW-G977UVRU2ASH7-20190827135903>adb shell
beyondxq:/ $ su
beyondxq:/ # ls -l /dev/pstore
ls: /dev/pstore: No such file or directory
1|beyondxq:/ # ls -l /sys/fs/pstore/
total 0
beyondxq:/ # mkdir /dev/pstore
beyondxq:/ # mount -t pstore - /dev/pstore
beyondxq:/ # ls -l /dev/pstore
total 0
beyondxq:/ # ls -l /sys/fs/pstore/
total 0

The above is the 6th try. While scrolling the command prompt above, I have noticed that in the very first try I have following logs:
1|beyondxq:/ # mkdir /dev/pstore
beyondxq:/ # ls /dev/pstore/
beyondxq:/ # mount -t pstore - /dev/pstore
beyondxq:/ # ls /dev/pstore/
beyondxq:/ #

-- Probably switch off or reboot

D:\SamsungS105G\VZW-G977UVRU2ASH7-20190827135903>adb shell
beyondxq:/ $ su
beyondxq:/ # ls /dev/pstore
ls: /dev/pstore: No such file or directory
1|beyondxq:/ # mount -t pstore - /dev/pstore
mount: '-'->'/dev/pstore': No such file or directory
1|beyondxq:/ # mkdir /dev/pstore
beyondxq:/ # mount -t pstore - /dev/pstore
beyondxq:/ # ls -l /dev/pstore/
total 0
-r--r----- 1 system log 262004 2018-01-11 09:32 console-ramoops-0
beyondxq:/ # exit
beyondxq:/ $ exit

So, I did a mistake :( and missed to read the console-ramoops-0 file. But the problem is I am not able to get it back.
Is it like:

if you don't remove the console-ramoops-0 file when its generated first then no more logs will be written by kernel?
Or the memory is full?

Please suggest what I did wrong in my later tries?
Update: Tried to crash manually using the instructions given here but no logs recorded.
Update 2: Grep the pstore using find . | grep '\.rc' | xargs cat | grep pstore -n -i and get following result:
314:    # pstore/ramoops previous console log
315:    mount pstore pstore /sys/fs/pstore nodev noexec nosuid
316:    chown system log /sys/fs/pstore/console-ramoops
317:    chmod 0440 /sys/fs/pstore/console-ramoops
318:    chown system log /sys/fs/pstore/console-ramoops-0
319:    chmod 0440 /sys/fs/pstore/console-ramoops-0
320:    chown system log /sys/fs/pstore/pmsg-ramoops-0
321:    chmod 0440 /sys/fs/pstore/pmsg-ramoops-0
13623:    # pstore/ramoops previous console log
13624:    mount pstore pstore /sys/fs/pstore nodev noexec nosuid
13625:    chown system log /sys/fs/pstore/console-ramoops
13626:    chmod 0440 /sys/fs/pstore/console-ramoops
13627:    chown system log /sys/fs/pstore/console-ramoops-0
13628:    chmod 0440 /sys/fs/pstore/console-ramoops-0
13629:    chown system log /sys/fs/pstore/pmsg-ramoops-0
13630:    chmod 0440 /sys/fs/pstore/pmsg-ramoops-0
27725:    # pstore/ramoops previous console log
27726:    mount pstore pstore /sys/fs/pstore nodev noexec nosuid
27727:    chown system log /sys/fs/pstore/console-ramoops
27728:    chmod 0440 /sys/fs/pstore/console-ramoops
27729:    chown system log /sys/fs/pstore/console-ramoops-0
27730:    chmod 0440 /sys/fs/pstore/console-ramoops-0
27731:    chown system log /sys/fs/pstore/pmsg-ramoops-0
27732:    chmod 0440 /sys/fs/pstore/pmsg-ramoops-0

Update 3 The configuration of ramoops is as following:
./sys/module/ramoops/parameters/console_size            262144
./sys/module/ramoops/parameters/dump_oops               1
./sys/module/ramoops/parameters/ecc                     0
./sys/module/ramoops/parameters/ftrace_size             262144
./sys/module/ramoops/parameters/mem_address             3241148416
./sys/module/ramoops/parameters/mem_size                1048576
./sys/module/ramoops/parameters/mem_type                0
./sys/module/ramoops/parameters/pmsg_size               262144
./sys/module/ramoops/parameters/record_size             262144

Checked in rc files that it is mounted by the script(check Update 2 in question). There is no need to mount it as you said. When flashing the ROM the device reboots many times like when opening Download mode, when ROM flashed successfully, after wiping data/cache from recovery, etc.. Is it can be the reason for clearing of logs?

I have tried the same step as in http://docs.halium.org/en/latest/porting/debug-build/dmesg.html on another device(OnePlus 6T) and I can see the logs but on this(Samsung S10 5G) device there are no logs. Although, I can see last_kmesg on Samsung device but I didn't find any "Kernel Panic" logs. Any suggestion?

I have Linux version 4.14.83-16633035 (dpi@SWDH2517) (clang version 6.0.10 for Android NDK) #2 SMP PREEMPT Wed Aug 14 16:23:48 KST 2019

Let us continue this discussion in chat.


text:
Disable xposed from TWRP
An xposed module screwed my interface. It's all black.
I can't access /data/data from within TWRP due to some stupid encription problem.
Is there another way to disable xposed ?
Losing data is out of the question.
Can't access data through ADB either: debugging is disabled

Update:
Too late.
Did something on TWRP and lost everything. Even the ROM got corrupted. Had to reflash EVERYTHING
Chaos was going on: the screen was not only black, but completely irresponsible. The only dialog available was the Turn Off/Reboot. Safe mode useless.
TWRP showed Internal and External storages as 0MB. Couldn't mount either. Not even system could be mounted. Written... even less.
Maybe all this had something to do with encryption. I could never disable encryption on this phone (apparently it is impossible)
If it still has some use:
XT1925-5 (Moto G6)
TWRP 3.3.1.0
Boot, Xposed and Magisc were all flashed by either fastboot or TWRP
I can't remember the exposed version. The module was something like P-fy (change appearance of Oreo to look like Pie. Stay away from this crap)

Update 2:
There seems to be a way to disable xposed by machine gunning any hardware button after logo during boot. Can't test now.
I was trying to cripple xposed by modding something at data/data/. Hard way it seems.

Finally: For the reasons above, I can't evaluate the answers of those who attempted to help. Hope it helps the next guy. By me, the thread can be deleted.

How did you root your device? Is root systemless? dm-verity status? If enabled are you willing to disable (OTA updates won't work)? SELinux status? How did you flash Xposed? In /system partition or systemless? Through Magisk? Which Xposed version and module exactly? Which device and Android version? Is it system-as-root or A/B device? Encryption is FDE or FBE? None of the available custom recoveries for your device can decrypt /data? Only screwed interface is inaccessible or any other problem?

There is an Xposed disabler zip file that can be found on this thread from Xda-developers. In case you installed the systemless Xposed, I am not sure if it will be disable. You need to install the zip from TWRP as you would for other zip files.

That will not work for systemless

If it is systemless root (most likely) , a couple of methods mentioned in the last part of my answer How to install EdXposed on Android 10 without triggering safety net. It's a repetition but it may help those seeking a specific answer for this :

Magisk Manager for Recovery Mode (mm). This module can be installed directly from Magisk but it will not work because it hasn't been updated to support Magisk versions beyond 19. You need to boot into TWRP (if TWRP is not permanently installed) and sideload the module. Next,from the recovery terminal run mm or sh /sdcard/mm and disable all modules or the offending module and reboot.
(Tip: double click for enter)
Grant shell privileges to Magisk (this would have security implications, I guess) . Source

The best way is to grant shell su privileges with magisk in advanced by doing adb shell then su . Magisk will then ask to grant root to shell and you can use it even while bootlooping.
  If you were to bootloop you'd then run adb shell then touch /data/adb/modules/riru_edxposed_sandhook/disable (or YAHFA ).


text:
Potentially Malicious APKs
In theory, should it be possible to root your device with an APK file? Or possibly create a potential harmful application?
I know that APKs can be used as apps you can install offline, but I'm assuming it could be used to be malicious. But what all could it do? How destructive could it be? And is there even a limit; a system to protect you from stuff like this?

Rooting a device with an APK file is definitely possible.
In reality it depends on two factors:

The age of the device software
The amount of money you are willing to pay to for exploit software

The device software age is important as usually you can say the older the device the more security vulnerabilities it has and therefore there is a higher chance to get a combination that allows you to root the device.
For example the very old devices can all be rooted using the TowelRoot app (which uses AFAIR an kernel exploit).
The price you are willing to pay for an exploit is important as you can buy exploits (even zero day exploits that are not known to Google or the device manufacturer).
Once a malicious APK has been installed it can use the incorporated exploits to attack your system. Once it managed to find a working exploit to get root it can do anything you could do with root permissions, too. This includes installing code persistently into your system, redirecting traffic, extract passwords and other secrets, ...


text:
Why does Speedo On app does not show on Galaxy Store?
I have a Samsung Galaxy Gear Fit2 Pro and a Samsung Galaxy Note9. I installed the Speedo On app on the phone, which requires a companion Speedo On app from the Galaxy Store for the watch.

Samsung - If you have a Samsung Gear Fit2 Pro watch or a Samsung Gear watch, please ensure that the Speedo On app is installed on both your smartphone and your watch. To download the watch app: Select “Settings”, Select “Samsung Galaxy apps”, Search “Speedo On”, Select “Install”

However, when I search for this app in the Galaxy Store, it does not show up in the results.
I called Speedo and they assured that the device is supported and I saw reviews in the App Store with people saying they are using it the Fit2 Pro.
Does anyone have this issue? Is there a way to side-load the app to the watch?

Hi Gabriel, I added the description from the Play Store since I assume that's what you did but failed, or perhaps I misunderstood that you did a different thing? (Not from "Settings" but from "Galaxy Store"?) If my edit made this question nonsensical, feel free to rollback!

@AndrewT. Yes, that's what I did. Thanks for the clarification.

I contacted Samsung and they said this app is not supported on the Gear Fit2 Pro.


text:
Does Airplane Mode allow GPS location to pass through?
This is what I saw when my plane was taxing to the runway at CDG:

Airplane mode was on and all other transmissions (except Location), including WiFi, mobile data, NFC and Bluetooth were off.
Location was not manually turned on by me, after I enabled Airplane Mode. It remained turned on.
What am I missing? Is GPS now so widely accepted on-board planes that Android changed its configuration to let this kind of signal/communication to pass through Airplane mode "block"?
I believe that this three year old answer isn't a duplicate, because at that time (2016) Location was generally "included" in Airplane mode and was turned off by enabling it.

I'm curious, on what device and Android version did you observe this? Airplane mode did not disable GPS on Android 4.x. At some point before Android 6.x, airplane mode was changed to disable GPS. (At least on my devices. It's possible that the device manufacturer or mobile carrier made that change.)

@NoU Motorola Moto Z2 Play with Android 7.1.1! :>

My device is Android 6.0.1 and when I turn on Airplane Mode the GPS is still enabled (and even WiFi if you turn it on yourself). It's fun to follow your plane path in Google Maps :P

I've done it all the time, even before 2016, because GPS is never turned off even in airplane mode. See GPS when flying over the ocean

GPS is disabled in airplane mode on my Samsung Galaxy S10, Android 11.

GPS is a receive-only technology. There are satellites in orbit around the planet and these satellites transmit. Your device receives these signals, but does not communicate back to the satellites. Using your device with GPS is no more dangerous than using it without GPS.
Airplane mode is basically equivalent to "turn off transmitters", though you can also reenable WiFi and Bluetooth. Using GPS is completely consistent with transmitters being disabled.
Assisted GPS is a way of improving the time to first fix. Your device communicates to local non-satellite infrastructure (a cell tower) and receives information about what satellites are currently in view for the local area and orbit corrections. Satellites also communicate this information, but it is much faster to receive this from a local data connection. Without assisted GPS, your time to first fix may be ~12.5 minutes (obviously longer if you cannot receive a good signal). With assisted GPS, this can be reduced to seconds. Once you have a fix, assisted GPS is equivalent to unassisted GPS.
With airplane mode enabled, your device will not use assisted GPS because it cannot communicate with the assisted GPS infrastructure. It will use the standalone mode. This is why people may suggest to acquire a GPS fix on the ground before you start your flight; it's easier for your device to acquire a fix with a data connection and preserve a state where you get location updates than it is to cold start in-flight.

Comments are not for extended discussion; this conversation has been moved to chat.


text:
Can disabled application influence / modify system and UI
This is somewhat a follow up to my 1,5 year old question (still not answered).
I already know that applications displayed as disabled may still be running in background in certain scenarios (mostly, when Google says they must run). But is it a normal situation that such disabled application is modifying / interfering with the system or user interface?
I have Duo (another Google monster) disabled in my device:

Yet it clearly interfere with my system / user experience and it adds some new items to my contacts:

Is this a normal situation. And if so -- then what is "disabling an application" really mean? It seems to be a total fake, making Android users a pure idiots.

This is most likely the handiwork of your Contacts app working closely with data received from Google services. In my Contacts app the Duo call option appear only for contacts who have registered for that service. If you can, take backup of all of your contacts into a VCF file, remove all the  Google accounts from Settings > Accounts, clear data for Contacts and Contacts Provider/Storage, than add a number manually (not by loading VCF) and see if Duo option still appears (provided it appeared earlier to cross-check). Make sure you do all of this with all internet connectivities turned off.

Thank you for your detailed comment. The thing is that neither me nor any of my friends (and specially not the contact in the screenshot) are using Duo, because it is very unpopular here, where I live (Poland). I have never used it, run it or registered within it on any device. None of my friends are using Duo, as far as I am aware of. Above depicted contact is 99.99% not using Duo as well.


text:
Can't boot into TWRP recovery after flashing custom ROM?
I flashed the latest pixel experience Android Q build for Redmi note 7 pro using the TWRP recovery after unlocking the bootloader. The ROM seems to be working fine and the phone boots into it without any issues however when I try to boot into the TWRP recovery, it doesn't boot into it and instead I get a Redmi logo on the screen that doesn't go away. What should I do to boot my phone into recovery? I haven't rooted my device yet, just unlocked the bootloader.
Could it have something to do with the fact that I forgot to flash the TWRP image from the TWRP recovery?

Remember that the custom ROM package will include the boot image too. And on A/B partition devices, the recovery rests is in the boot image. So, if the custom ROM has written your boot image, then your TWRP should be gone. What will load will depend on the recovery included in the boot image. It could be stock, something else or nothing.


text:
keep needing to reset wifi
The network at my office works when I first connect to it, but every few minutes it becomes very slow. When this happens, I need to quickly turn the Wifi off and on, then it gets fast again. As you can expect, this gets really annoying.
Is there anything I can do on the phone side to help with this? Maybe it can automatically reset the wifi connection every few minutes? That would be ideal. Or any idea on what I can ask of our IT guy? I mentioned it to him, and he sort of blew me off.
I am using a Moto z4 with the current Android OS

There are automation apps like Automate. Have you tried using those?

@WrichikBasu I haven't. That is a good idea though. Thanks

Helpful for you https://android.stackexchange.com/a/169593/131553. You just need to add another action (3) Enable wifi and save the macro


text:
Samsung 7 active, #*#*4636#*#*?
Hello when putting this code into the phone dialer ,under the usage time ,is that total time used or just that time?anyone know,thanks in advance

The usage time is the total time when the app is/was in the foreground; meaning the total time when you are/were interacting with an app. When the app is in the background, although in use (for example, a music app), that time is not included in the total time under "usage time".

Thanks that was a important  question, but how do I know the time frame for this time used ?instead of total

@TinaHopkins Can you re-frame the question? I don't understand this part "the time frame for this time used" because time is used many times :)

Hello thanks for responding ,but honest I am not gonna waste my time or yours on something I know is true  .my other is hiding shit ,I have been a fool long enough ,making excuses for stuff on his phone that he doesn't know how lol,so thanks again ,wish me luck .regardless the pain of a break up was my last choice

I tried to upload a pic to further explain but it want load

This should explain why I choose to let it go but if it helps I was referring  to the second pic on the time used


text:
Missing Cast icon in the Notification Center
I mean to cast my Android screen to my Windows 10 PC.
I pull down from the top, but I do not find the Cast icon, even if I pull a second time.
Can I fix this?
Using Android 8.1.0 (Oreo) in a J7 Prime.
Note 1:

Accroding to this, "Some of these steps work only on Android 10 and up."
There isn't any further specification.
According to this, without explicitly telling it, but shown in the images, I should have Cast available.
According to this, availability of Cast is "largely dependent on your phone's OEM skin... the Google Cast button... has been exclusive to Nexus and Pixel devices, even though other phones have the requisite software to use it."
One should install Quick Settings to be able to add the icon.
This opposes the implicit description above.

Note 2:
I am not certain about the relation between this Cast icon, Quick connect, Smart view, Windows 10 Connect, and the following 2 icons.

Note 3:
I actually mean to cast from Android to PC without a WiFi router, but that is a separate story.

Related on XDA Devs

@AndrewT. - Didn't find much help there. Moreover, it started on June 2016, prior to Nougat.

Tried reboot?

Sorry, I should clarify that there's a very high possibility that Samsung doesn't have Cast on their quick settings since manufacturers are free to customize their devices. Instead, they provide "Quick Connect" or "Smart View" which is too specific for Samsung-related devices


text:
Samsung Note 5: Heimdall recovery flash completes, but device stuck "Downloading..."
I downloaded TWRP from twrp.me, and ran
heimdall flash --RECOVERY recovery.img --no-reboot
On my Samsung S5 that was in Download Mode. heimdall seems to have completed successfully:
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading RECOVERY
100%
RECOVERY upload successful

Ending session...
Releasing device interface...

But the phone remains in this state:

Notice the download bar is about 99% of the way there. Forcing a reboot to the phone from this state makes it stuck on the "Samsung" loading screen.
Edit:
Product name is SM-N920C, CA_ type is CA_2.
How might I fix this?

This seems to happen if you download the wrong twrp - I had downloaded the S5 twrp. The only other thing to note is when in the stuck Downloading... screen, you can hold Power + Volume Down button to turn off the device.


text:
How to bind mount libunionfs?
Samsung has introduced a feature in its stock ROM that moves content of social media aps (like WhatsApp) to SD card, and then links the two folders.
I ran the following command in Termux:
$su
#mount | grep -i "whatsapp"

The following output was returned:
libunionfs /mnt/runtime/default/emulated/0/WhatsApp fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
libunionfs /storage/emulated/0/WhatsApp fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
libunionfs /mnt/runtime/read/emulated/0/WhatsApp fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
libunionfs /mnt/runtime/write/emulated/0/WhatsApp fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

I learnt from the net that libunionfs is a virtual file system. How did Samsung create bind mounts to this system? Normal #mount -o bind didn't work.

I don't know enough about this to post a complete answer, but what I can say is that you don't bind mount to a unionfs, the unionfs is what does the bind. And unlike a regular bind, unionfs layers the underlying filesystems, so you can still access files that would be shadowed by a regular bind mount.

Okay @Irfan Latif I was reading about UnionFS from here (got it from the link you gave). The problem is, Termux says "no such device" if i use the option none in the mount command. How do i mention my phone as the device where mount should be done?

UnionFS does not bind-mounts, it's an independent in-kernel filesystem itself (though there is also unionfs-fuse). Bind-mount and UnionFS have different uses but can be considered alternative to each other in certain situations. So is OverlayFS and other similar implementations. These are stackable unification filesystems which unify the contents of two different directories. Files in lower directory are overlapped by files of same names in upper directory. All other files in lower directory are visible as normal files. A bind mount on the other hand completely overlays the contents of lower directory. Also see How does UnionFS work?
From your comment:

The problem is, Termux says "no such device" if i use the option none in the mount command. How do i mention my phone as the device where mount should be done?

Yours seems to be FUSE based UnionFS (just the name, not related to actual in-kernel UnionFS). Android's storage framework works by dynamically changing file permissions depending on the privileges of apps accessing the files, which requires a phenomenon like FUSE or sdcardfs to set pseudo permission modes. FUSE mounts don't work by simply using mount command. You need a specific program which communicates to kernel through /dev/fuse and mounts the Filesystem in UserSpacE (FUSE). Mount is tied to that program.
I don't know exactly what's the executable name Samsung is using for FUSE mounts, you can see your running processes to find the executable binary. Then use that specific program by passing the required arguments, ownership, mode, SELinux context, source and destination directories.
However most probably the implementation would only be in a shared library to be accessed from Android framework. In that case you have to use some third party programs like unionfs-fuse. If you only want bind mount with correct permissions bindfs can also be used. For details see How to bind mount a folder inside /sdcard with correct permissions?
If you want real UnionFS, you'll have to rebuild kernel (probably with some patches). OverlayFS is a better choice, it's a part of mainliene Linux kernel (should've been built with CONFIG_OVERLAY_FS). You may ask a question if details required on a specific use case on Android. But that would be far more complicated to set up than a FUSE-based solution.