text:
Why isn't the unlock pattern working anymore?
A few days ago my unlock pattern was not recognized anymore. I'm guessing the cause is memory corruption or some bug.
I haven't restarted the device yet, hoping to "find" the new pattern or somehow bypass the screen lock.
The device is not rooted and "require PIN when device powers on" is disabled. Firmware is G950FXXS5DSJ1 build date Sep 30 2019.
It is encrypted:
> adb shell getprop | find "crypto"

[ro.crypto.fde_algorithm]: [AES-256-XTS-DISK]
[ro.crypto.fs_crypto_blkdev]: [/dev/block/dm-1]
[ro.crypto.fuse_sdcard]: [true]
[ro.crypto.state]: [encrypted]
[ro.crypto.type]: [block]

What I've tried
Google device manager - can only reset the device for non-enterprise accounts.
Samsung FindMyDevice - can change the PIN if enabled in the settings - disabled it for security reasons.
"Guessing" the PIN - I've tried feeding all the possible combinations to
adb.exe shell locksettings verify --old xxxxxx

The response is always "Old password 'xxxxxx' didn't match". Strangely, it's not throttling (tested the same method with an Android 10 device and immediately got "Request throttled"). Might be related to missing files (more below).
Looking at logs  - since ADB is working, I've tried looking at adb.exe logcat -b system, but have no idea what to look for.
Some  suspicious messages:
LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/fmmpassword.key: open failed: ENOENT (No such file or directory)
LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system_de/0/spblob/xxxxxxxxxxxx.weaver: open failed: ENOENT (No such file or directory)

I understand /data/system_de/0/spblob/xxxxxxxxxxxx.weaver is used in the password verification.
Looking at /data/system/ some files might be missing (I've read that unlock data is stored in gatekeeper* files which I can't find, maybe because of insufficient permissions):
1|dreamlte:/ $ ls /data/system/
ls: /data/system//hdcp2_5386: Permission denied
ls: /data/system//users: Permission denied
ls: /data/system//container: Permission denied
ls: /data/system//ndebugsocket: Permission denied
ls: /data/system//secure_storage: Permission denied
ls: /data/system//.aasa: Permission denied
ls: /data/system//heapdump: Permission denied
HWParamTime.bin                 dropbox                       locksettings.db-shm         screen_on_time
SimCard.dat                     enterprise                    locksettings.db-wal         sensor_big_data.txt
WifiHistory.db                  enterprise.conf               log-files.xml               sensor_big_data_usage.txt
WifiHistory.db-journal          enterprise.db                 mobeam_big_data_usage.txt   sensor_service
analytics.db                    enterprise.db-journal         netpolicy.xml               shared_prefs
analytics.db-journal            enterprise.db-shm             netstats                    shortcut_service.xml
appops.xml                      enterprise.db-wal             notification_log.db         slice
audioservice_sec.db             enterprise_cacerts.bks        notification_log.db-journal slocation.db
audioservice_sec.db-journal     enterprise_nativecerts.bks    notification_policy.xml     slocation.db-journal
battery-saver                   enterprise_untrustedcerts.bks overlays.xml                slocation.db-se
batterystats-checkin.bin        enterprise_usercerts.bks      package-cstats.list         sound_model.db
batterystats-daily.xml          entropy.dat                   package-dex-usage.list      sound_model.db-journal
batterystats.bin                friends                       package-usage.list          startingwindow
big_data_sensor_usage_pkg.txt   gamemanager.db                package_cache               storage.xml
big_data_usage_call_gesture.txt gamemanager.db-journal        packages-warnings.xml       sync
cachequota.xml                  graphicsstats                 packages.list               timezone
clipboardimage.db               harmony_third_party_apps.xml  packages.xml                ucm_ca_cert
clipboardimage.db-journal       hcm_info                      packages.xml.mbak           uiderrors.txt
conventionalmode                hcm_info-journal              pda.db                      urigrants.xml
device_policies.xml             ifw                           pda.db-journal              usagestats
deviceidle.xml                  inputmethod                   pre_boot_csc.dat            watchlist_report.db
diskstats_cache.json            install_sessions              procstats                   watchlist_report.db-journal
display-manager-state.xml       install_sessions.xml          recoverablekeystore         watchlist_settings.xml
displaysolution.db              job                           recoverablekeystore.db      wifigeofence.db
displaysolution.db-journal      last-fstrim                   recoverablekeystore.db-shm  wifigeofence.db-journal
dmappmgr.db                     last-header.txt               recoverablekeystore.db-wal
dmappmgr.db-journal             locksettings.db               registered_ucm_services

What can I do to understand what happened?
Will restarting restore the pattern or cause even more problems?

Is there any possibility of this being a prank from a friend that was able to unlock your phone? That would be my first guess...

A Galaxy S8 on Android 9 should always be encrypted (by default). Why do you think it is not encrypted?

Some pointers on how to get around that can be found in Can not unlock my Android device as have no internet connection? – not sure which ones are still working, though.

@LeonardoAlvesMachado no way, as it worked the evening before, then when I woke up I got "Incorrect pattern drawn". The device was with me all the time.

@Robert I might be confusing internal storage encryption with something else. The phone was on Android 8 (encryption definitely not activated) and then I upgraded OTA to Android 9. On reboot, the phone starts without me having to enter the unlock pattern.

Hi @alecxs, I meant to say "internal storage is not encrypted" - edited the post to clarify. If it's incompatible with rooting, I wouldn't know.

@Izzy thanks for the suggestion, it's a really old post, mostly out of date or requiring root. Some suggestions I've already tried (updated the post accordingly).

@Robert I had activated internal data encryption manually years ago on a different S8 that was on Android 7 (I think), it was a lengthy process. On this device I didn't notice the encryption process when upgrading to Android 9. I remember though having an option in settings - "require PIN when device powers on" which is disabled.

Does this answer your question? Data recovery from encrypted phone based on glitches in the encryption?

I've restarted and /data/system/fmmpassword.key magically reappeared. I guess this is why unlock broke.
I'll post an answer with some info that if I had known at the beginning would have made this less of a pain and a time drain.
I've spent about a day only to figure out downloading from /storage/emulated/0 with adb. Thanks @Robert, @Izzy for sharing your expertise. @alecxs very informative and to the point   the shared presentation Android encryption vs Samsung's "I did it my way" was very interesting (and hilarious - SD card decryption key readable by the world facepalm).


text:
How to find PID of test runner
I have my app and my tests saved as following:
App package name: com.my.app
Test runner: com.my.app.test

When I run the app by itself, I can use adb to see the pid of my app: adb shell ps | grep com.my.app
u0_a839      14710  1044 41927360 714352 0                  0 S com.my.app

When I run my app with automation, I tried calling the same adb command while the tests were running: adb shell ps | grep com.my.app.test
But nothing shows up.

I would try to use frida-ps from Python frida-tools. You don't need a rooted device or install anything on device for frida-ps. Just execute frida-ps -Ua and it will list you all running apps by packageName and their pid.

source: Stack Exchange

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

sort: votes


text:
Is it possible to install Android Gingerbread on a Galaxy Nexus?
I have an old Samsung Galaxy Nexus from years ago and I was wondering whether it's possible to flash an older Android version like Gingerbread on it using a custom ROM. Since it was originally launched with ICS, I'm not sure if there are any Gingerbread ROMs for it and whether it's even capable of running Gingerbread.

I vaguely remember seeing a render showing a GNex on GB, but I reckon that was made way before its release. The only example of running a lower Android version than stock that I know is Nexus 4 (4.2) running a ROM ported from Optimus G (4.1) due to their hardware similarities, and it was buggy as hell. Generally it shouldn't be possible.

Ah I see. Thank you for the info @AndyYan

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


text:
Boot image header fields are invalid
I want to install TWRP on Redmi 5 (Rosy), during installation everything works normally. But when I want to boot into TWRP,
fastboot boot TWRP.img

a failure message appears on the ADB command line.
FAILED (remote: bootimage header fields are invalid)

Previously I was on the EU MIUI Custom ROM. All happened after I tried to flash the MIUI 11 Global firmware

So you are trying to boot the twrp-3.5.2_9-0-rosy.img? Have you checked the SHA256 hash that is also provided on that page to make sure the download is not corrupt (or alternatively verify the PGP signature)?

try this one twrp-3.5.2_10_r1-rosy.img

Thanks, all is done. I have to install TWRP base android 9/10. Maybe the boot image header on my phone is stuck in the boot image header for Android 9/10. How do I change back to the original version?

don't understand


text:
Why are battery optimization options getting reset all the time and how to prevent this?
They aren't just reset after every restart / upgrade but even without running any update or restarting.
One problem that results from this beyond having to change the settings after update is that firewall apps can get disabled.
After every update the NetGuard firewall was disabled which may be caused by this or be a separate issue.
Additionally, nonessential things/apps like "Facebook Services" can't be set to "Optimize".
For example, "Analytics" is constantly set back to "Don't Optimize", simply overriding my decision to disable it.
How to persist the battery optimization settings?

By "upgrade" you mean the (monthly) security updates or a major upgrade from e.g. Android 10 to Andorid 11? Which device are you talking about (manufacturer + model)?

I think both; not just the Android updates – I think the optimization settings were reset after every update including 'Google Play system updates'.

Play Story System updates - So you are talking about an device with Android 11?

Consider also mentioning the device model since each brand may implement different battery optimization (ref: Don't kill my app!)


text:
Why is impossible to remove system apps and preinstalled apps like 'Facebook' (with Android OS & without rooting) and can they be suppressed?
What is the explanation offered by manufacturers and vendors for why this is the case?
Have there been legal challenges to this practice?

For instance, I can't remove the apps 'Facebook' (not OS-related), 'Analytics' and some non-essential apps by the phone's manufacturer.
Using the network protocol feature of the NetGuard firewall I can see that very frequently data is (attempted to) being sent via these apps. I have not investigated the content of the data being sent but maybe somebody else will do so for common system-apps and phone models until new Android alternatives exist.
Furthermore, is there a way to disable such apps in a way that has similar results on phone performance, security and privacy as uninstalling them (like sandboxing the app) without rooting the device and using default Android OS on the hardware?

System apps reside on the system partition which is by default on Android read-only. With root permissions you can remount the partition to read-write and thus delete the file(s) that belong to a system app. For how to disable system apps without root see here: https://android.stackexchange.com/q/182118/2241

*What is the explanation offered by manufacturers and vendors for why this is the case?
Have there been legal challenges to this practice?* -- first question is too broad. There are way too many vendors from which to search the web and get an explanation from. It would also invite opinionated answers too. Second question is off-topic (legal issues).

Android apps are sandboxed already. See this and this answer for more information.

For the sandboxing I meant sandboxing in a way that makes sure the app can not access any data, any smartphone functionality and connect to the Internet in any way ever. I was asking about official explanations. The legal issues part is related imo.


text:
Tasker Volume does not work
I use the latest version of tasker.
I created a simple task Category Audio and then Media volume and system volume.
I set both of them to the maximum (15). However, when I run the tasks, the volume does not change. ideas?
FYI I'm using a Samsung SG10 and android 11.

you have to grant permissions as device administrator app

OK. I found a solution. seem to be a bug in Tasker.
Action 1: Set the Volume.
Action 2: Add 1 Second Wait
Now volume changes!
Note: I have not tweaked Wait times, it could be possible it can be optimized.


text:
Android reacts to a headset button press with a lag or not at all
I have cheap wired headphones by JBL which have one button. The Huawei smartphone runs on Android 9. Audio apps react to a button press with a lag and sometimes don't react at all. I couldn't notice any pattern in their malfunctioning.
I'll appreciate advice.

I solved the problem. It turned out that Google Assistant prevented the button signal to be read by other apps. Turning off Google Assistant didn't help. I had to turn off a device in a list of devices used by Google Assistant.

How did you manage to do that? turning off "use this device to talk to Assistant" switch in assistant settings did nothing regarding other apps not reacting to the headphones button..


text:
Resuming multiple downloads in Chrome
Many sites give all their files the same name. When downloading multiple files like this, Chrome helpfully adds a (1), (2), etc. to the filename. However, if something interrupts the download, such as a full memory or a connection reset, I find that Chrome often refuses to resume the download, on the grounds that "file already exists." Typically these are incomplete files and are useless if the download can not be resumed.
The problem here is not that Chrome is unable to resume the download per se. If you go to downloads you get the option of resuming. The problem is that Chrome refuses to resume a download if a file of that name exists, where 8f it were a new file it would just be renumbered.
Is there any way to get Chrome to finish the downloads in these circumstances?

May be a download manager app that takes over the download from Chrome would better suite your needs?

Downloading abilities of mainstream browsers are not flexible (Chrome, Firefox, Edge, etc). Your best bet is to rely on a download manager app to manage your downloads including mass resuming. Download resume also depend upon whether the server allows that or not.


text:
Is the "Cast" functionality Miracast or Chromecast?
When I go to Settings -> Display -> Cast, check "Enable wireless display" (no idea why I have to do that) and connect to a display, will it use Chromecast protocol (over Wifi) or will it use Miracast protocol (separate direct Wifi connection)?
Or does it support both and chooses depending on the receiver? Then let's assume the receiver is a Chromecast.

The "Cast" functionality should always be Chromecast (however as some manufacturer heavily modify Android there may be some devices where this is different). Up to Android 6 there was a "Screen Mirroring" functionality which should have based on MiraCast (according what I have read).

I just remember that the "Cast" functionality works with a Netgear PTV3000 (Miracast) on both my OnePlus 2 (Android 6) and a Xiaomi Mi A2 lite (Android 9). So unless that same menu can also cast to a Chromecast over network it seems that the menu is for Miracast.


text:
what kind of apps can cause high I/O?
The problem is high IO, mainly read 50 to 150 MB/s (shows always as 100% tho), for about one minute of despair, lowering the quality of the android realm user experience.
The only way to know for sure, would be https://www.xda-developers.com/check-io-usage-iotop-android/amp/
So, i would need root and a specially compiled kernel (rom?).
But, if you could hint me, mainly if yours have an iotop like app, it could be enough.
Android 6.0.1
I tried stopping gallery, i thought it was scanning media, didnt help.
During high IO, i saw zygote, /system/bin/installd, system_server  use a bit cpu but on top of the list, but that is a proccess, not an app (that we could stop).
I use simple system monitor app.
And i need to know HINTs of the app/proccess, not the overall IO neither what specific proccess here is causing trouble (as hints may suffice), so I can try stopping them by chance.
Thats why my question differs from: View disk utilization / activity (also the accepted answer there doesnt answer about showing specific proccess IO, that is in the body of the question, therefore the accepted is just a partial answer).

Typically a process with a lot of IO activity also shows a significant amount of CPU usage. That would be the first way to identify the problematic process.

Here, the mentioned processes use each less than 4%. If im not wrong, on linux at least, a proccess with low cpu usage could still be the source of high IO right? as both are similar


text:
Trying to (fast) boot: Error verifying the received boot.img
As described in this answer by @irfan-latif, I am trying to boot (without flashing) my Google Pixel 3a into TWRP via the following command:
fastboot boot twrp-3.5.2_9-0-sargo.img
This failed with the following messages:
Sending 'boot.img' (65536 KB)                      OKAY [  2.028s]
Booting                                            FAILED (remote: 'Error verifying the received boot.img: Invalid Parameter')
fastboot: error: Command failed

The only things I found on this topic are:

A thread on Reddit which wasn't really solved as they moved from booting to flashing which eventually worked for them, but I'm interested in booting only at this point.
A thread on XDA Dev which basically ended with "TWRP for Pixel 3/3XL on Adroid 10 does not work and will not until they release a compatible version".  Note also that this may not apply to me as I have Android 11 (RQ3A.210605.005 to be precise) and a newer TWRP version.
A Github issue from 4 Sep 2020, closed with the message "android 11 is not supported yet." (though this is for a slightly different device).

What caused the error, can it be resolved, and if so, how?
P.S. Further details:
$ adb --version
Android Debug Bridge version 1.0.41
Version 31.0.2-7242960
$ fastboot --version
fastboot version 31.0.2-7242960

I have unlocked the bootloader.
I also tried booting the LineageOS recovery which appears to work, but continues starting Android normally instead of TWRP:

$ fastboot -v boot lineage-18.1-20210608-recovery-sargo.img
Sending 'boot.img' (65536 KB)                      OKAY [  2.004s]
Booting                                            OKAY [  7.085s]
Finished. Total time: 9.156s

you can't boot from fastboot if that option is disabled intentionally. usually workaround is temporary flashing twrp to boot, and immediately restore original boot partition before installing twrp into ramdisk. the other issue is kernel related

@alecxs Just so I understand this: If booting from fastboot was disabled, wouldn't the Booting step (when trying to boot the LineageOS recovery) fail in the same way? Or is the fact that it says OKAY for the LineageOS recovery related to the kernel? Sorry, still wrapping my head around how this all works!

@alecxs So the LineageOS verifies OKAY (supposedly having been signed by the correct key) but TWRP doesn't? Will AVB prevent me from also flashing TWRP (or being able to boot TWRP after it's been flashed)? No, I haven't flashed the avbmeta partition, would I need an avbmeta.img (where from?) to be able to boot TWRP? If that's what I have to do, I'd also like to backup the current avbmeta before, how?

@alecxs Also, this section in the AVB docs suggests that verification shouldn't fail when in UNLOCKED state, which I think my phone is (at least that's what it says).

Does this answer your question? Android Verified Boot and generation of vbmeta image

yeah if bigdiff says android 11 not supported it's pointless to agonize over. my guess is avb can't patched because of vbmeta_vendor is inside dynamic partition. you can try to unpack and analyze super.img just for fun. btw i don't even know 3a has super partition at all, haven't checked. just wait some months maybe devs already working on it

you can do a simple test: unpack + repack LineageOS boot.img with AIK using flags --origsize --original without modifying anything. if that fails to boot it's avb

Does Magisk even work?

Exact same issue here on an Android 12 pixel 3. Found the same links as you, and no comment are really giving a working solution

Don't know if this helps anyone or not but,  I had the same issue and after two day's of attempting different things I decided to start from scratch but realized if I used the original factory image (Android 9) from:
https://developers.google.com/android/images
It would likely be a lot easier to manipulate.  Turns out that was all I had to do.  Once I flashed it back to original everything else worked without a problem.

Thanks for your answer. To make this more useful, could you please add exact steps you followed? I.e. commands entered on the command line, in the correct order? What exactly do you mean by "flashed it back to original"?

Up to now, the newest factory img for Pixel3 is SP1A.210812.016.C2 (8618562) , you can flash it through Android flashing website. I can boot by twrp_3.7.0_12-0-blueline.img, you can have a try.

Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Welcome to Android Enthusiasts! As I stated in my question, I would like to boot the image, explicitly without flashing it.


text:
I Can't Get Root Back After Trying To Modify The Hosts File
I have a Motorola Edge (regular not +) running LineageOS 17.1 (20210528). I had it rooted and decided I wanted to use the hosts file for ad blocking. I couldn't figure out how to get the OS to allow me to modify the host file. While I was doing so, I somehow corrupted to OS and couldn't boot into it. That was easily fixed by flashing the the OS, but now I can't get root back. When I reboot after I flash the Magisk patched boot.img (to both partitions), I get "Can't load Android system. Your data maybe corrupt..." (This happens when I try to boot into both partitions). Before I see the error message, it goes into a bootloop for a few minutes.
Thanks

format userdata

Could you tell me why something on that partition is preventing me from rooting my phone?   And what that something might be?       Thanks

you have installed magisk which destroyed encryption therefore phone is in boot loop unsucessful trying to decrypt until you start with a fresh formatted unencrypted partition

to undo magisk changes and fix encryption flash stock vendor (or restore fstab manually)

I fixed it a few days later. I don't know exactly what did it, but while the stock ROM was installed, I flashed the Magisk uninstall in TWRP. Then when I rebooted the phone, it booted into the LineageOS recovery and showed the  "Can't load Android system. Your data maybe corrupt..."  error message. I chose to do the factory reset and when the phone rebooted, to my shock and amazement, it booted into LineageOS! I got  it rooted again and everything is back to normal. I'm thinking it was flashing the Magisk uninstall zip that fixed it, but that's only a guess.

I think you solved it with fresh formatted unencrypted userdata partition

I think It was flashing the Magisk uninstsller that solved it, but you could be right.


text:
Close current tab on Chrome for Android without showing all tabs first
When I'm browsing on my computer, I can press CTRL-W or click the X on a tab to close it. That's convenient. But it seems Chrome for Android has no similar function.
To close the current tab on Android, I need to click the "tabs" icon which brings up all tabs. This often takes 10-60 seconds on my phone because there is anything between 100-3000 tabs open/cached there, and it seems very unnecessary.
Is there another way to close the current tab without first loading all the tabs?

Obviously this is not the answer to your question, but I would suggest closing some tabs. If you have 3000 of them, there's no time-efficient way you could get to tabs far off in the stack (not to mention having to visually find them!), so there's no point in having them.

@NonnyMoose There is a time-efficient way. See the most recent answer to this other question https://android.stackexchange.com/questions/155955/how-many-tabs-are-open-in-chrome-browser-above-100

Long press the tab number next to the 3 vertical dot, a menu will appear. Select Close tab.

Install a keyboard that has a control key. Here is one such keyboard.
To close the active tab without displaying all tabs, tap the address bar to invoke the keyboard, then press Ctrl+W (the keyboard should let you tap the two keys separately in the order Ctrl,W). The tab will close and the next older tab will become active.
To change the active tab without displaying all tabs, swipe the address bar left or right. This is useful if you need to skip over a tab you don't want to close.
To open a new tab without displaying all tabs, tap the three dot menu icon and choose "New tab."
Using these three methods, you should be able to completely avoid displaying all tabs. I believe the only function you need to show all tabs to access is "close all tabs." Even that might be possible with something like Ctrl+Shift+W but I don't want to try it because I too have an embarrassing amount of tabs I need to sort through.

tested on Chrome for Android version 74.0.3729.136


text:
Salvage Android Phone as Linux-Server (radio/wifi hardware broken)
My device has hardware problems with radio/wifi. Hence it's not possible to use sim-card or wifi. That also makes it restart frequently. Now it's useless as a phone. So I am trying to turn it in a desk computer (mini-server linuxdeploy). Simple air-plane mode isn't enough to solve these reboots.
How I figure out its wifi/radio components were broken (tentative)
I have an OnePlus 6 enchilada.

It fails to detect sim-card and at the same time can't turn on wifi.
If I try to turn on wifi. In the second I click to turn it on it freezes and reboots.
I read multiple logcat logs to my best efforts. Also system crash dumps. All seams related to radio/wifi or tentatives to turn modem on.
One think that make its work again (sometimes): is by pressing exactly on the Qualcomm SDR845 RF transceiver (and also Qualcomm QDM3620, QDM3670, QDM3671 Diversity Receiver Modules) on the back.
Other people also faced similar issues and same temporary workarounds. They found it to be related with those components. Repairing the motherboard seams impossible. And support want a full motherboard replace which is impractical ($$$).

Deeper disable wifi/radio than simple air-plane mode
Is it possible to somehow to disable the WIFI/radio somehow deeper than simple air-plane mode? So I can use it as a desk mini-server. Installing linuxdeploy or any other software like that and use reverse tethering.
I tried many solutions around internet (including android.stackexchange) but none really works.
If someone could give me any tip or advice I would greatly appreciate!!

Your device has active LineageOS support. Therefore you could try to build a custom version of LineageOS and modify the device tree or other parts of the source code to disable the broken components before building the ROM.

@Robert Hilariously the solution I found is exactly what you commented. Unfortunately I had to spent almost an year of exploration to find that by myself. Thank you anyway for your willingness to help.

I solved by myself so I'm sharing so it might be useful for others.
Deeper disable wifi/radio = recompile android Linux Kernel disabling wifi/radio drivers
First I tested the Lineage OS custom ROM for my device.
From that I got access to fully rebuild my Custom Lineage ROM. They have all source code for all supported devices including the source for the linux kernel for my mobile board (Qualcomm SDM845 Snapdragon 845 SoC).
When the kernel is built It should be decided if It will load driver modules (all SoC board component needs a driver) or have driver modules statically built in it. In either case the driver must be enabled during the kernel build. For configuring the linux kernel build a .config file is used.
After studying a lot more about linux kernel building. Found from here that QDSP6V5 from OnePlus 6 SoC SDM845 board was mandatory for mobile-data and WIFI when building the kernel.
Using Lineage OS docs and more research and 250 GB of source code and almost 12 hours of download (repo sync + brunch enchilada) I managed to build my custom Lineage OS 16.0 ROM after modifying the kernel .config fragment (enchilada_defconfig) from android\lineage\kernel\oneplus\sdm845\arch\arm64\configs\enchilada_defconfig.
Setting CONFIG_MSM_PIL_MSS_QDSP6V5 from y to n(NO).
Note: When building LOS I had to disable dashd since I couldn't find this file while extracting proprietary blobs. Comment it out on ~/android/lineage/vendor/oneplus/sdm845-common/Android.mk
#include $(CLEAR_VARS)
#LOCAL_MODULE := dashd
#LOCAL_MODULE_OWNER := oneplus
#LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
#LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)
#LOCAL_SRC_FILES := proprietary/rootfs/sbin/dashd
#LOCAL_MODULE_TAGS := optional
#LOCAL_MODULE_CLASS := EXECUTABLES
#include $(BUILD_PREBUILT)

and deleting it from  PRODUCT_PACKAGES += list on sdm845-common-vendor.mk on same folder.
Eureka!!
Wifi and Mobile not working at all.
No more reboots and internet working flawlessly from usb reverse tethering.
Hilariously solution is exactly like @Robert commented. I had to spent almost an year of exploration to find that by myself. `-)


text:
How do I create a shortcut on the home screen to change the time zone?
I want to be able to just tap a shortcut icon on the home screen and it would change the time to a predetermined time zone...instead of having to go to...Settings > Date & Time > Disable "Automatic date & time" > Disable "Automatic time zone" > Select "Select time zone > Scroll for the time zone I'm looking for > Select it.
Android 7 | Rooted

Via adb and root this is possible: https://stackoverflow.com/questions/8062827/how-do-i-change-timezone-using-adb You could try those commands e.g. in a shell like termux and then create a Termux-Widget on your home screen for starting the command.

Automate app can also do this. Requires a rooted device though.

@Firelord Just did it with Automate. Thanks! Funny, several months of trying to do this and I've always been using Automate but couldn't create it because "date & time" in Automate doesn't have a time zone option..for some reason, after reading your comment, I had a look at it again and searched "time zone" this time and sure enough, it was right there - the option to select a time zone. One problem though, it doesn't disable the Automatic date and time and time zone, so it keeps going back to local time.

@JJrussel good to know it helped. I didn't know either that Automate offered this feature. I saw your question and the first thing I did was to go through the automation apps I had to see if they offered this feature. Found one, so told you about it.

With Automate, use the App start block to open the Date & time window. Then use either Interact or Interact touch blocks to disable/enable Automatic time zone.

@Reddy Lutonadio Could you give a little more explanation please? I tried to understand but I'm failing. You say "use the App start block". Is that an app called "Start Block"? I can't find such an app. Then you say use "Interact or Interact touch blocks to disable/enable Automatic time zone"...again, are those apps or do you mean to start a flow in Automate? Obviously, I need a guide geared towards a more novice crowd :)

Create a flow in Automate, then use the mentioned blocks.

@Reddy Lutonadio There is no such think as "start block" in Automate https://imgur.com/a/0q2g1kV

@JJrussel I's right there App start.

@Reddy Lutonadio Which drop down menu for "date & time"? All of them seem to be only apps. Date & time is not an app so not listed. https://imgur.com/G2e5iFs


text:
Forbid phone from using Mobile Data
TL/DR:
How do I forbid the phone from using ANY mobile data ?

If I use a single byte of mobile data, my plan charges me.
Turns out, the phone used data by itself some days ago.
And NO, before you ask: it did NOT turn on the mobile data function.
Yet, I was charged.
The standard network usage graph is useless to spot what app used the data, and certainly won't tell how it used data without enabling the mobile data function.
Guess all I can do is forbid the phone altogether to access mobile data
Is there a way to do that ?
A prompt, with password, would be great
Thank you all for the solutions so far

Rarely, it DOES turn on mobile data itself, but it stays that way, so I can see and revert.
(Happens in some reboots, or when I unplug the SIM, while handling the SD card, etc)

The carrier said it's the phone's fault, obviously

I can't remember the last time I HAD to use mobile data. So, if the solution makes it hard to enable it, won't be a problem.

I'm gonna try and sabotage my APNs

The main problem is VoLTE which means that voice calls are transmitted via data. Therefore als long as VoLTE is activated there will always be a data connection and thus data traffic as the MNOs are tooo dumb to correctly distinguish between VoLTE data and user created data. But without VoLTE for voice the phone would have to switch back to 3G or 2G if they still exist in your country. The other way would be to use VoLTE and if your MNO tries to charge you "fight" against it. That may mean to contradict the invoice every month if they charge you for data.

It can be done by:

Setting "data limit" to "0 MB" (Settings-> Network and Internet -> Mobile network -> "YOUR_MOBILE_NETWORK" -> Data warning and limit)
Setting 2G as preferred Network (Settings-> Network and Internet -> Mobile network -> "YOUR_MOBILE_NETWORK" -> Advanced -> Preferred network type)
Using ADB:

adb shell settings set global mobile_data 0
adb shell settings set global mobile_data_always_on 0

Found those settings. Varies from phone to phone, apparently. But found it. Problem is: now I have a constant warning saying "data limit reached" (translated by me)

Update: that doesn't work, unfortunately. Right now I received a message warning that I "used" mobile data, even with this option of 0 MB there

If the SIM is plugged in, data will be used. The Android OS does lots of things in the background that use data, even if you disable data.
Some things that will use dara:
Synchronise (turn it off)
App Background Data (all apps off, OS will still xfer)
Location (will instantly try many methods to get accurate location data)
Bluetooth (Nearby devices names/mac addresses get recorded and transmitted over internet)
Maybe Aeroplane Mode would cut down a lot.
It is very frustrating, but almost every setting you can "turn on/off" Android will quietly ignore your choice, and do it in the  background anyway.
Only a rooted device could put in place a root user level firewall to only allow traffic on device wifi, deny all others (3G, 4G, LTE)

Yes! Rooted and Xposed. Also, I do have AFWall installed

Oh excellent. I'm not sure how network devices interfaces are presented to the root user. If it is like Linux, you could shut-down the IP interfaces. They probably initialise during start-up via a script. Comment out anything starting data interfaces (leave yourself a comment about why you made the change).
And use your firewall rules to DENY ALL data on those interfaces.
As @St0m suggests, use Android tools to disable mobile data. There might be more Android specific 'features' to turn off, or that can help shut-down network traffic.


text:
Force light mode for specific app
I use my phone on dark mode, but there is a specific badly done app that uses black text on dark background when using dark mode. So, I want to use light mode only for that app.
How do I do that? I'd like something that isn't an app constantly running in the background, so something like an XPosed module would have the best performance. However, I'm open to non-root solutions, especially for anyone who's reading this question and doesn't have root.

Have you tried to contact the author of the problematic app? Often "delegating" the problem solution development to the developer is the easiest solution.

It would be good if you mention the device and Android version you are using. Xiaomi devices running MIUI offers a way to exclude user installed apps from dark mode. Have you tried searching your Settings to see if your ROM has this feature to exclude an app from dark mode?

@Robert I will but I have not yet. Firelord I have a mostly stock Android ROM


text:
Accidental Whatsapp privacy breach
I exported my chat history with my friend, JJ, to my Google drive. Somehow a chat history between JJ and someone else (Meg) was exported. I have no idea who Meg is and i have no record of her in Whatsapp or anywhere on my phone.
I tried again and my chat with JJ was exported and saved. However,it did export Meg's a few more times as well.
It seems very wrong that i have a stranger's chat history with my friend saved on my drive.
Any ideas how this happened? I'm on Samsung Note 8.


text:
What is the difference between `fastboot reboot bootloader` and `fastboot reboot-bootloader`?
fastboot provides two methods for rebooting a device into the bootloader:

fastboot reboot bootloader
fastboot reboot-bootloader

How (and whyy) are these two commands different and when is it appropriate to use each?

it is just because some developers did mistake, only one of this works it's different between phones

It looks like different references give different commands.  I would suspect that the hyphen is a typo.  Have you tried them both ?

I found an answer to this question here. To quote from the source.

reboot : Reboot the device.
reboot-bootloader : Reboot back into the bootloader.                   Useful for upgrade processes that require upgrading the bootloader and then upgrading other partitions using the new bootloader.


text:
How to fix Hard disk unmount error
I tried to format a hard disk which was already formatted and i am getting this below unmounted error . Please tell me how to fix this error
sm list-volumes|grep public
public:8,1 unmounted 91da13ff-87b5-41bf-bf84-6300daae0cad

Are you sure this is a question about Android?

the uuid indicates ext4 file system, but android uses vfat/sdcardfs file system for public secondary external storage. try to format exFAT from PC instead

Why are you trying to do a trivial thing with an OS not designed to do such trivial things by end users? Just put your hard drive in a PC running GNU Linux, Windows or whatever you use and format it there. Problem solved! Or, get root access on your device and use busybox tools to format the drive and mount it from there.


text:
Why no storage error showing with my space empty?
Im having more than 12GB free space

And when i try to install app or update app im getting no storage error. I have clear cache also still showing same issue. Any suggestion. Thanks

Do you use an sd-card mounted as internal storage (adopted storage)?

Does this answer your question? How disk space is used on Android device?

@Robert No i dont use SD cards


text:
Android internal storage files recovery method that still work in android 10
I have a realme 5 phone running Android 10 and realmeUI 1.0. I accidently deleted whole folder containing pictures and a few videos. Is there any method that still works in android 10 since the methods I have read on this platform as well as on other websites are from 2015-16.
Deleted from: internal storage
NO ROOT and bootloader is NOT unlocked.
Although I'm ready to root if that could help recover all my data. If data recovery is possible without root that would be better but if not I'm ready to root.
Also since the phone is secured by passcode (the data must have been encrypted(?)) and if I root it directly without doing away with passcode will the data (images and videos) be readable by data recovery software. Or I should do away with passcode (which will decrypt data) and then root so that the decrypted data can be read by data recovery software.
Any help would be appreciated

On recent devices the internal user storage is always encrypted no matter if you have set a password or not. Rooting will not help you because this will erase all user data and also delete the encryption key which makes recovery impossible. But without root to my knowledge recovery is also not possible as you don't get direct access to the flash memory. Therefore I don't see a way to recover your data.

Does this answer your question? How to recover a deleted file from /data partition?

https://play.google.com/store/apps/details?id=com.i8dudata.imgrecover.free


text:
Why FlashTool isn't detecting firmware?
I'm trying to flash stock Android 8 onto my Xperia X F5121.
Please see screenshots below:

What did I miss ?


text:
WhatsApp sending videos with low quality
Using a Samsung Galaxy A30s and the WhatsApp Messenger (Beta) version 2.21.12.15.
Anytime I send a video, be that filmed within the app or externally, it loses all the image quality.

What can be done to fix it? For clarity, a few days ago this was working fine.

I followed the approach mentioned by Caomhin

If you are using a Beta version of WhatsApp, backup your chats and try
Uninstalling WhatsApp and revert to an earlier Stable version.
Also while chats are backed up clear the WhatsApp App info Cache and
App info Storage as well.
Log back in and see if that can help.

In order to do the backups,

Open WhatsApp
More options
Settings
Chats
Chat backup (without videos, or else it'd take too long in my case)

Then, uninstalled the app and left the Beta program.
After I installed the normal version, restored the backup and now it's working fine.


text:
Constant busy tone on a brand new LG L322DL
This is probably one of the weirder things on a phone that I've personally seen. This morning I finished setting up a brand new, out of the box, LG L322DL on Android 10. Setting up a Google account, check. Got all the updates, check. Then I noticed a sound that I thought was a dial tone coming from the phone.
Tried rebooting it. Still there. It's a kind of a low beep that changes with the volume going up or down, but even at the maximum volume it is still kind of low. I later realized it is not a dial tone, but sounds exactly like a telephone busy signal.
The beep would remain for a long time and it almost feels like it's going to stay. But then it would disappear out of the blue for a short while (a few seconds, a few minutes, or until the next reboot) and then come back, without me doing anything. I have done my homework and found some pages where people talk about similar problems, e.g. this and this. I have tried everything suggested on there, including putting the phone in safe mode. Nothing has worked.

Even if something happens and then the busy tone goes away, regardless of whether the two have a causal relationship, on reboot the beep comes back.

The tone disappears from time to time but always comes back later.

The phone is isolated and charged. It has nothing to do with battery, charging, notifications, roaming, or sound effects as far as I can tell.

I have the same problem on this phone. The busy signal comes when I plug in the headphone. Since this is not my primary phone, it doesn't need to connect to the cellular network all the time. About an hour ago, I turned on the airplane mode and use Wi-Fi only. The busy was signal magically gone. I will update the post if this method really works.
If it turns out that there is not an easy fix, I would go to the path of updating the OS or install an OS from another sources.

Good to know I am not alone in these efforts! Good luck to you!


text:
What is the difference between "Improve accuracy" and "Google Location Accuracy" settings?
After visiting the location settings we see two similar options, both mentioning improving the location accuracy using WiFi and Bluetooth.
The "Improve accuracy" option is part of the system dialog in the location settings and contains two switches ("WiFi scanning" and "Bluetooth scanning").
The "Google Location Accuracy" is part of "Location Services" list and contains one switch ("Improve location accuracy"). Toggling one setting does not automatically toggle the other so they appear to be separate.
What's the difference?

It seems that Google's location accuracy uses a combination of:

GPS
Wi-Fi
Mobile networks, and
Sensors (such as an accelerometer)

In contrast, Wi-Fi scanning most likely uses more than just your own Wi-Fi and uses other Wi-Fi signals (which is why it says it works offline) from around you to identify your location.
In general, Google's location service works better. If you're worried about battery usage all the time like I do, I would say the difference in turning either on is negligible as long as a service is not using your location. You'll know this if you see the location icon in the status bar.

Sources:

Google Support
How-To Geek

But if the Wi-Fi scanning does not use Google's services (as that's a system feature, not google location accuracy feature), where does it get the data for Wi-Fi scanning from? Phones coming with a huge list of Wi-Fi hotspots preloaded would be pretty ridiculous.


text:
Loud notification(?) sound happens at random on LG Stylo 6
This was my mom's phone, she got a new one and I inherited this nearly brand new stylo. I factory reset the phone (mainly to get rid of her dozens of unwanted apps), and found that when I unplugged the phone, it would make this really annoying loud sound:
Low-pitched tone for .5 sec, high-pitched tone for .5 sec, then a long slide from low register to high register. Reminiscent of a car alarm, kind of.
I have used Macrodroid on my old Stylo 3 for various utilities, so I downloaded it and made a Macro that detects unplugging of phone, turns on "Do Not Disturb," waits 2 seconds, then turns off "Do Not Disturb." This fixed the beep when I unplug my phone, but...
Now, this nasty, loud beepy thing happens at random. I'll be at the store, or in my garage, or it's sitting on my desk charging, etc. etc, and BAM! low beep, high beep, low to high swoop. My brother just now was two rooms over and came in to ask me, "So, was that your phone making that crazy sound again?" I told him "Yes, it just happens randomly now."
WTF?!? Any ideas on what could be causing this? I went through my notification sounds, and can't find one that sounds like that, I made sure that my NFC was turned off (I read that sometimes that can pick up a signal and do weird things).

Hi, could you record the audio and share it here? (Vocaroo, Soundcloud, or anything else)


text:
How to successfully and safely install a free app, using android (not a PC), from Play Store but without using the Play Store app?
I log in on Google with Firefox, access the Play Store site, click "Install" for the chosen app (only clickable after I remove &gl=US from the URL). It says it will be installed soon. 30 nonsense minutes later, nothing happened, and the site says "installed". So, it simply doesn't work.
How to make it work?
I don't want Play Store app endless restarting, bloating my 1.4GB RAM, and making good games, on my old phone, lag, or even crash. I already disabled or uninstalled many other bloatware apps, this one I enable and disable all the time, so messy is my Android realm user experience. I found no .apk link thru Chrome's view-source: at the Play Store site.
Any other way to get a safe APK from the Play Store site without the Play Store app, can work as an answer too!
Someone suggested: How can I download an APK file from the Play Store?
by what i read, i could directly download from play store, but i would need a PC and java, and use my credentials on it, what i could do but would require a PC, so i edit my question.
I could also download from other sites mirroring apks, but my goal was directly from play store.
In truth... if the play store app could stop auto restarting (after i force stop it), using RAM, making the phone lag and messing when i try to play heavy games (that use a lot of RAM), it would work too. But they insist in preventing us from controlling when an app will auto restart, and that just makes me feel like i am using windows 95 again (as i use linux on pc since long time ago) where we can control almost nothing right? so i created this: where is configured how an app will auto restart?
stuck with Android 6.0.1 (samsung wont uodate it) on a sm-j700m

The web version of the Play Store only sends a push trigger to the Play Store app to do the installation process. It's the same as pressing the "Install" button from the Play Store app. There is How can I download an APK file from the Play Store?, but your mileage may vary.

Oh... so the answer is: it is impossible!  :). I will check that link thx!

Any other way to get a safe APK from the Play Store site without the Play Store app, can work as an answer too! -- there you go. https://raccoon.onyxbits.de/apk-downloader-v4/about-raccoon/#about-raccoon


text:
Why whatsapp always makes notifications at the same time of everyday but there is no message?
Whatsapp always makes notifications at 13:15 of everyday, but when I check, there is no message at all. So when it's about to 13:15, I keep looking at my phone, whatsapp pops up a notification but it disappears immediately. This happens at 13:15 of everyday. I don't understand what is wrong. My phone is Android 9.
Thank you.

I'd assume it's trying to create a backup daily?

Thanks Andrew. But not everyone receives this notification everyday, right? What is wrong with my phone? How could I fix it?

Check the WhatsApp settings if the backup is set to daily. If it is, then the notification will also appear daily (though usually late night, not in the middle of noon). Depends on the amount to back up, it can be as short as 1 second and disappear after that. You can also try How to get the notification history to identify and pinpoint the cause first.

Thanks. I have checked the notification history, it is Whatsapp. The channelID is other_notifications@1. I don't understand what other notifications it is. I already set the backup option of whatsapp to Never long time ago.

I found some things here. I don't know whether they work or not. I have to wait until tomorrow. 1: https://www.journeybytes.com/stop-whatsapp-you-may-have-new-messages-notification/   2: https://www.journeybytes.com/stop-whatsapp-checking-for-new-messages-notification/


text:
Is there a container-izer for Android, to run an untrusted app that insists to have access to local photos etc?
I need to run an IoT control Android app with network access that also insists to have permission to access local media files, or its a no-go.
I don't fully trust this app and I don't want to grant it such permission.
Is there a way to run it inside a container of some sort, where it will just see "empty" local storage.
The phone is Pixel 5 with all the latest updates.

Nothing on-board I'm afraid. But isolation/sandbox apps like Shelter or Insular might do the job. An introduction and how-to for Shelter can be found here; it uses the work-profile feature of Android to create an isolated "work environment". Haven't tested such, though, only installing apps I trust from sources I trust (usually F-Droid).

@Izzy, thank you, I'll check it out. Surprising this niche hasn't been properly filled in yet, but maybe this is something only Google can do.

If it fits your needs, please consider to answer your own question ;)

We don't have anything like this, but we do have Multiple User and you can probably Add Guest User (Not sure about functionalities) to test it.

With the permission to access local media files, this will still allow the app to access everything on the (physical/removable) SD card I'm afraid. Though I'm not sure if the same is also true for Shelter & Co.

@Izzy Not sure if OEM adds anything extra into it, but my OnePlus isolate all the files that exist in the main user and the question is about the Pixel phone, so no slot for an external SD card will be there. Anyways he/she can test it first if it's viable.

Thanks Maaz! I've never played with that so I wasn't sure. But I guess you're speaking of Android 10 or higher, right? Because before that, an app with READ_EXTERNAL_STORAGE could read the external SD card completely. Scoped storage was only introduced with Android 10 and enforced with Android 11.


text:
Recurring crash from Google app with error message "EXCLUSIVE background task UPDATE_HOTWORD_MODELS crashed"
My mom's Xiaomi phone started displaying the error message:

The Google application has suffered an error again. Please send a report to Xiaomi.

The code under the "see more" button is extensive, but the gist of it is that the "EXCLUSIVE background task UPDATE_HOTWORD_MODELS crashed".
The error message pops up every 2 seconds. What should I do to help my mom return her phone to a usable condition? Restarts do not help; I purged the settings of Google apps, that did not help either.

Did this start happening after an update? Go into your Settings and then Apps, look for the Google app, go into it on the Play store and uninstall updates. That will return it to an earlier state.
Restart phone then see if message stops and you're able to use 'Hey Google' again.
If it works, then update the Google app again so its current and see if it works now.

@NetServOps - thank you, I'll try it!

This seemed to be caused by the latest update (12.22.8.23, 12.23.16.23.arm64, 12.24.7.29.arm64 beta) to the Google App.
As covered by many sources, the issue was caused by an update to the Google app and affected other features that use Google app:

XDA Forums - It’s not just you: Google App is crashing for many Android users
Android Authority - Is your Google app crashing? You're not alone. (Updated: Fix incoming)
Android Police - Google app crashing constantly? Here's how you could fix it
NDTV - Gadgets360 - Google App on Android Phones Across Brands Crashing After Recent Update, Users Report
9to5Google - Google app repeatedly crashing after latest update on Android; here’s how to officially fix [U]

Known problematic versions:

12.22.8.23
12.23.16.23.arm64
12.24.7.29.arm64 (beta)

Affected apps and features:

Google app
Google Podcasts
Google Lens
Google Assistant

Possible fixes

Uninstall the problematic update:
Settings > Apps & notifications > See all > [scroll to] Google > overflow menu (in the top-right corner) > Uninstall updates

Clear Google's data
Settings > Apps & notifications > See all apps > [scroll to] Google > Storage & cache > Clear storage / Manage space > Clear all data
Note: This will clear some settings for the Google app.  Please review the settings if you have changed from default.

Join Beta program


text:
Repetitive "Google failed" popup
I have a Nokia 3.4 (Android 10) for over a month now. This morning this repetitive error window keeps popping up. It opens and closes so fast that I don't have the time to select anything - in fact, it's so fast that the video capture is not able to capture all cases!

This is a static capture of one of those error windows:

Things I have already tried without success:

Shutdown and reboot
"Clean cache" and "clean data" of the Google app
Block notifications for the Google app

The only way I was able to "fix" this was by disabling the Google app. But I would rather not...
Should I just do a factory reset?

Looks like this is a global issue caused by Google's update very recently. While the dupe isn't "answered" yet (there's a helpful comment there), I have to close it to centralize the info. Thanks for your understanding.

@AndrewT. Oops, I tried to find dups, but could not find any... Btw, in mine phone, the issue stopped - I am unsure why - it stopped after I enabled/disabled the Google app and rebooted a couple of times...

I think Google has pushed the fix. Also covered on XDA Forums: It’s not just you: Google App is crashing for many Android users


text:
Messenger keeps removing itself from list of distracting apps
I use Digital Wellbeing's focus mode frequently and set up a list of distracting apps that includes Facebook Messenger. However, regularly, while focus mode is enabled, I get Messenger chat notifications and when I check the list of distracting apps, Messenger is no longer there.
Is there a way to force it to remain in the list?


text:
Click on link in main profile and automatically open in browser in work profile
I use TrackerControl and Nebulo with nearly all my apps in my main profile. I use Shelter which leverages the “Work Profile” feature of Android to provide an isolated space. In that isolated space I have my browsers and a VPN. Is there a way to automatically open links from apps in my main profile in my browser in the work profile? I can manually copy the link and open it in the browser but it's tedious. I already tried apps like "Open Links With" but it didn't work.
Example current behavior: Someone sends me a link to a website over a messenger (which is installed in my main profile), I click on it and it opens in the browser in my main profile.
Example wanted behavior: Someone sends me a link to a website over a messenger (which is installed in my main profile), I click on it and it automatically opens in the browser in my isolated work profile.
Thanks!

According to the documentation the entity who manages the work profile (usually in a corporate environment some admin) can configure what Intents can pass from one profile to another (app-to-app communication bases on Intents). I am not sure how Shelter creates the work profile but I would assume that Shelter has the power to configure or implement this.


text:
Disable swiping right on the home screen to Google news
I have a Samsung device running on Android 11. Swiping right on the home screen showing me some Google news propaganda. It is truly awful. It is just a bunch of hair-brained clickbait and lies.
I managed to disable it in settings.
Now, how can I prevent the swipe-right screen, or how can I replace it with a better app?

Long press an empty area on the home screen and swipe right to see a toggle button for the same. I don't think so if there is any replacement other than "samsung free".

Google are so rubbish at interfaces. Long press then tap Customize worked for me. And Google can't tell left from right. It was the Swipe Left toggle I had to disable.


text:
Pass extra data into `am start` command
Nougat Android (7.1.2)
What I use actually (it works), the app starts with the last know location:
am start com.location.provider

What I'm looking for like:
am start com.location.provider -e longitude 28 -e latitude 77

or
am start com.location.provider -d gps://13,678173-2,033719

Is it possible?

Related/possibly duplicate: Sending intents using ADB with additional action, data, and extra. The answer links to the official documentation

On all devices I have checked am start com.location.provider just produces an error that there is no Intent to start (most likely because there is no com.location.provider package.

com.location.provider works on bluestacks 4 emulator -> https://www.bluestacks.com/fr/index.html


text:
Data connection works without a data plan
I am trying to control my screen time by disabling internet access. I have filtered my mac address so the wifi does not work.
So I turned off WiFi and a 4G LTE symbol is shown in the notification bar. When I went to test out the internet, the only websites that worked were ones with google.com as the domain (mind you WiFi is off).
How is it possible that a website can work despite the fact that there is no data plan or WiFi connection? Is there a way I can turn this feature off? I know I can go to settings and turn mobile data off, but I want a "permanent" and less accessible solution.
Ps: I have tried app blockers, they are not an ideal solution for me.

Hi, I don't know what carrier and plan you're using, but maybe they have (usually more expensive) pay-as-you-use mobile data (with limited purposes, like only for Google search). You might want to check this with your carrier.

I got T-Mobile but I am unsure which it is. I did not pay for my phone plan so I will check

Disabling mobile data is difficult on 4G as the phone itself uses data for phone calls (VoLTE) as on LTE there is no other way to make phone calls.


text:
How to work with contacts in device only
I wanted to test custom VCF file. So I imported it in my phone to Device account, where was 0 contacts before (all of my contact comes from other accounts).
But When I selected show contact from device only in contacts to display, it shows me contact information merged from all other accounts and field Connected via shows all of these account where is this contact available.
How can I view only data stored in Device (to check if import is fully successful) and  be able to delete this data from device afterwards (but keep them in all other accounts)?
I'm using stock contact app on Asus ZenFone 6 (1.5.1.15_201105) which seems to be Android default.
//Update:

I created Test Contact in Device account with phone number 123456.
Then I created Test Contact in another account with two phone numbers 123456 and 666666

And get this:
Contact display settings

Contact results (there is only one contact visible)

Contact detail
(notice threre is nubmer 666666 which is not part of the contact in Device account)

What I see when tap to edit icon

This app is unintuitive mess...

From my understanding the Android contacts system simply has multiple providers. That some of them sync their contacts with a cloud in background is irrelevant for the contact system. In my device (Android 9) in the list of accounts inside the contacts app I have two entries one for the Google account and one for "Phone contacts". If I select the latter I see only the local contacts.

@Robert Yes, my previous phones did same. When filter what contacts I want to see, I saw only them. But now I see something like merged contact view (it offers me to merge some duplicate contact, but I never did it). Now I installed Simple Contacts and it behave as expected. So I was able to delete contact from Device account only.

But I still see contact image even when account where contact have images is filtered out...


text:
Can an app still send notifications if running in the background is disabled?
I have some apps which show me promotional notifications of new features, deals, etc. I know I can turn these notifications off, but I tried disabling the app running in the background altogether instead (Android 10), so it does not run at all by itself unless I start it explicitly.
Apparently, some of these apps still send me suprise notifications from time to time. How is it possible? Can apps still work and send notifications even if they are not started by me and  cannot run in the background?

That depends on which pushing mechanism your app uses.
In China, many applications use some pushing sdk, as long as there is one application using the same pushing sdk running, the pushing sdk will use the running application to launch stopped-running app(even force-stopped)  and make it running;
however, recently many chinese customized os has been modified to prevent this behavir
According to Google FCM(Google's pushing service), FCM won't send push message for forced-stopped application, but will do it for other situations.
So, according to this , you won't receive any notifications if you diable your application by force-stop

OP hasn't explicitly asked about push notifications. Notifications might also be local, not necessarily coming from a server. Apps can show scheduled notifications even from background.

@KevinDing Can you please link where you found the info about FCM and force-stopped apps?

https://groups.google.com/g/android-gcm/c/1J6XNVOzCcE?pli=1

why i mention pushing message not ordinary notification ，because every app company uses pushing message to send some news to users to trigger them openning the app，so they can get well look marketing data . and by using pushing messages as a trigger ，they can train users like a dog，let users get used to use their app ， aka get addicted. that's why pushing message is more important than native notices，because thery are targeted to youe habit
toktik is the typical one，by learning what you like ，keep send your likes， so your time is wasted.

That's absolutely correct. But only push notifications scenario partially answers the question. If you address the other half too, it'd be perfect :)

Not only in China: I have the same problem on lineage 20 (android 13) with a french app (I still get notifs even with background disabled)


text:
Replicant in QEMU virtual machine
I need an Android virtual machine to run an app I don't want to install in my device. I managed to install Android-x86 in QEMU, but I'd like to use Replicant instead. So, the question is: is it possible to install Replicant in a virtual machine with QEMU?
Please consider that I have nearly no experience in virtualizing Android and I have never used Replicant before.

Based on their supported devices, Replicant doesn't seem to provide Android for PC/Virtualization, so I'm afraid what you want is not possible now...

What is wrong with the standard Android Emulators provided by Google (Android SDK) or those that come pre-installed like Genymotion? Those emulators are well adapted to their run-time environment which makes them run much better than any custom Android-X86 installation.

@Robert I'm not using Android SDK because I prefer to avoid Google products as much as possible, but I might consider it if I can't find any other solution. About Genymotion and other emulators, I have a personal rule to use only free software on my device and I couldn't find a free Android emulator.


text:
Run oneliner shell command in Tasker does not work
When using Tasker as a clipboard manager I made a shell script which reads the last clipping (also successfully captured by Tasker, in /storage/emulated/0/clipper/clip.txt). This I append to a file with all clippings with a maximum of 300 lines.
I use the oneliner command:
( tail -n 300  /storage/emulated/0/clipper/clipall.txt ; echo ______$(date +"%Y-%m-%d %T")_______ ; cat /storage/emulated/0/clipper/clip.txt ) > /storage/emulated/0/clipper/clipall.txt
to add the last clipping on the bottom and each clipping separated by the current timestamp surrounded by underscores.
Running this oneliner in a Termux shell is successful, but not as a Tasker => Run Shell command, so now I use the Termux plugin for Tasker and it can be run from Tasker. But without the 'help' of Termux it cannot run.
It is rather standard shell script, because the same script (with another directory obviously) runs on my Mac as well.
There is no root involved.
Does Tasker have limited shell capabilities ?

What Android version do you use? Access to /storage/emulated/0 from within an app is  no longer possible on Android 10/11.

Did you debug Tasker? Split your command into multiple lines and execute each of them wherever file access is requested. Save output and error in global variables so that you can see the error Tasker reported. I have Tasker 5.9 (not updated) on Android 10 and I get no problem with that one liner.

I have Android 10, but no problem with accessing /storage/emulated/0 as I granted Tasker 'storage access'.
Well I tried to by enabling 'store error in %err' and then 'Flash $err', but it stopped before showing %err.
I'll try to debug it by splitting it up into more lines.

SOLVED: I forgot to add a path preceding the temporary file called 'z'. The script working correctly is now:
( tail -n 300  /storage/emulated/0/htdocs/clipper/clipall.txt ; echo ______$(date +"%Y-%m-%d %T")_SEP______ ; cat /storage/emulated/0/htdocs/clip.txt ) > /storage/emulated/0/Download/z && mv /storage/emulated/0/Download/z /storage/emulated/0/htdocs/clipper/clipall.txt


text:
How to delete a file registered in Word for Android recent files list?
The file in this picture within the recent list is an old competition fixtures file I want to delete.

I click on the three dots to the right of the file and select delete and it says I don't have permission to delete the file.

This file opens OK so it exists and it happens with all files in the recents list.
This is a file which is obviously on my device but I can't even find the data folder using a file management app let alone

≫ data  ≫ user ≫ 0 ≫ com.microsoft.word...

How do I delete this file?
Word version info provided by app

In an answer provided by EdwinSleepDoc to a similar question in Microsoft Forums, it says

When you open a password protected Word or Excel file on Android Word or Excel, it opens the file and then dumps an unprotected version of that file deep into Android's file system. Later, when you delete the original on your phone, the file still shows up in your Android Word or Excel 'recents' list and you can just tap it and open it.  It is quite disturbing.  It has a long file path usually users>>data>>0 ...

I cannot yet confirm that it is true about password protected files being handled like this, but I have found that this is true of files downloaded and opened from websites or opened from emails.
Following the instructions in the answer, the only way to delete this copy is to go to Settings > Apps > Word or Excel  > Storage > Clear data.
This will clear that folder of these files and reset your app.  You do not have access to that folder to delete these files individually. This is the only way.
NOTE FOR SENSITIVE FILES: The "remove from list" option within the recents list does not delete the file from the device.  It will remain in that folder, just no longer in the list.

"You do not have access to that folder to delete these files individually" unless you have root access. +1


text:
How to debug GPS problems on Android 11
I recently bought a Realme 8 Pro Phone with Android 11. To track my running course, I am using the app “Caynax Sports Tracker”. It did work for about 2 weeks without problem, receiving the GPS position. But after a while, the GPS signal was lost for more and more times. The last run lasted about 30 minutes, and GPS reception did work maybe for 2 minutes! On the same evening, no GPS signal was found whatsoever.
To fix this problem, I tried to use the following apps:

GPS Aid - Fix GPS Problems (TechRCS)
GPS Reset COM - GPS Repair, Navigation & GPS info (DS Software)
GPS Status & Toolbox (MobiWIA Kft.)

These apps seem to reset the GPS, clear GPS data, download GPS data, etc. Yesterday evening I tried for an hour to fix the GPS problems, also restarted the device, but I was not able to get a single GPS fix.
On the next morning, without any change, it seemed to have worked again.
Is there a way I can see where the problem is? Is it a hardware problem, software problem, a realme problem or a problem with android? Maybe there is an app which can debug a bit more?

One action most users forget is still available: Shutdown your phone for a minute. Do not reboot, really shut it down. Then the GPS chip will be cut from power which is like a hard reset for it. On my phone I had the case where GPS wasn't able to get a fix with any of the 24 available satellites with clear view into the sky. Only a shutdown was able to fix this problem.

Ah thanks, I surely will try that.

I'm too facing the same problem (Realme x2 pro), really anoying and random, it only started after the android  11 update. Tried several times to get help from realme, but they didn't care to help! I regret buying a realme


text:
how can i mirror phone screen with a brocken black screen?
my phone fell a few times and alas the screen is now unfunctional. there is a line straight down the middle, on one side it is black and on the other, it is purple/white/green, my point, that I cant use it for anything.
now, how can I mirror my screen onto another device so that I can backup everything I have on my device and be able to transfer it (and also still be able to use my old device until/)when I get a new device.
USB debugging is already activated on my phone but whenever I try to adb, I am told that I need to grant permission on my phone (which of course is impossible, being that I have no access to my screen).
now, I understand that I can purchase an external screen and connect it to my device via usb c and I don't need to go through this whole hocus pocus of usb debugging and screen mirroring, rather it can connect automatically, but that requires me to purchase a screen, etc.
is there any way I can do that exact same thing with a screen that I already have at how, for example, my laptop screen, or maybe I just got this whole thing wrong?
If you cant help me with the above, then please help me with this, how can I back up my data. i downloaded dr.fone, but the doctor broke the news to me that he can't help my phone if i don't permit him to do so, which will require me to grant permission on my phone.
or any other option for me to acquire my data thank you!!
p.s. i am running windows 10 20h2 and Linux mint.

The number of phones that support external screens is not very high. You can try USB-C to DisplayPort or HDMI connectors and try it out. But even if it works input is still the problem. USB mouse and keyboard can be connected but usually not at the same time as the monitor adapter.  Another problem is that the ADB authorization dialog is only shown while the USB connection to your PC is established. If you disconnect the PC connection (e.g. to switch to an USB keyboard) the authorization dialog also closes.


text:
Write to device failed (no link / unknown error / too many links)
I am trying to flash TWRP to my ZTE Axon 7, but until now I just keep getting errors every time I try to flash something.
D:\ZTE Axon 7>fastboot devices
a773911d        fastboot

D:\ZTE Axon 7>fastboot flash recovery "D:\ZTE Axon 7\twrp-3.5.2_9-0-ailsa_ii.img"
Sending 'recovery' (16104 KB)                      FAILED (Write to device failed (Unknown error))
fastboot: error: Command failed

When I look at any guides/videos online, it just works, but not for me. The device is already wiped and the bootloader is unlocked. I also tried some commands like clear cache and reboot bootloader, but they produce the same kind of error. I am in fastboot mode, I also get some unknown error in MiFlash.

So basically I haven't really been able to flash anything. Already tried different ports and cables, don't have any other cables lying around.
Trying to use fastboot boot (different USB ports):
C:\adb-platform-tools>fastboot boot twrp-3.5.2_9-0-ailsa_ii.img
Sending 'boot.img' (16104 KB)                      FAILED (Status read failed (Too many links))
fastboot: error: Command failed

C:\adb-platform-tools>fastboot boot twrp-3.5.2_9-0-ailsa_ii.img
Sending 'boot.img' (16104 KB)                      FAILED (Write to device failed in SendBuffer() (Too many links))
fastboot: error: Command failed

C:\adb-platform-tools>fastboot boot twrp-3.5.2_9-0-ailsa_ii.img
Sending 'boot.img' (16104 KB)                      FAILED (Status read failed (Too many links))
fastboot: error: Command failed

Really running out of ideas on this one, I've already tried numerous things and keep getting a variation of these "Write to device failed" errors all the time.
PC does have a Ryzen 5800x, maybe that is the problem?

"Too many links" does not mean that your Android had too many sausages for breakfast. This stupidity has persisted for too long. In Linux EMLINK (Too many Links) is 31. In Windows 0x0000001f is "A device attached to the system is not functioning". In Fastboot for Windows they let a Windows error get translated as a Linux error. In short, the Android was not responding over USB. Why is a different question.

Ok, the solution is pretty weird.
I was reading MrNoob - How to fix data transfer failure (Too many links) error in Fastboot? which mentions something about Windows 10 drivers being problematic, so it is suggested to use a USB 2.0 adapter or something similar. So I have one of those and tried a command, and it worked. Next, I tried flashing
fastboot flash boot twrp.img

But it still didn't work and got the "Couldn’t parse partition size ‘0x’". But I thought to myself how can this be, one command works and the next just fails like that all of a sudden.
Then I read through DroidWin - How To Fix Fastboot: Error: Couldn’t Parse Partition Size ‘0x’. I guess you can skip the root requirements for now and look at the flash command used:
fastboot flash:raw boot twrp.img

However, this still didn't work and I have tried it before, do you know why? In my case, it's really f-ing weird.
One thing I must mention before this is that I also installed the "QDLoader HS-USB Driver_64bit" drivers, on Windows 10. This will now display some "Test Mode" text on the lower right because these drivers are not signed by Microsoft.

Connect the phone to USB 2.0 adapter with a proper cable
Make sure the device shows up in fastboot devices
The weird thing is, DO NOT use any peripherals like a wireless mouse on the same USB adapter the phone is connected to. It probably interferes with it somehow.
Now run the command and it should work (you can use fastboot reboot bootloader just to make sure it's OK and commands work)

Might have to repeat these steps if the commands stop working again.

I've been going through every step you're all talking about. Most of the articles are fairly accurate, but they're outdated.
It's a weird procedure and you have to have the right tools installed (drivers, software, etc.). But, I've found that the key is in the order that you do these steps for fastboot to connect (recognize the device).
It's still a trial-and-error but so far, I've deduced:
Once you have everything set up correctly, unplug the device from USB, enter flash mode, plug in the device, run fastboot devices, and verify it's detected (make sure it's the only thing that is connected). If it's not detected, the fastboot command will fail. If it is connected, run your fastboot command and cross your fingers!

This is definitely port’s problem, use usb2.0 port instead will solve it all.


text:
How to disable automatic reboot on kernel panic?
Since my device was unproperly shut down because the battery stopped functioning (the battery is getting completely discharged at a level higher than 1%), it is rebooting in loops even in safe mode (more exactly it reboots about 3 to 5 seconds after finishing booting).
So it means a file or permission wasn’t properly written in /data.
But in my case, the /data partition is on the sd card thanks to Magisk root, so I have full access to it.
Using a computer, I tried to put an additional Magisk startup script which is executed at boot in order to stream kernel log to a file, but the result isn’t useful as the last line of the log file looks something like this :
[   72.480828] Ke

So which is the command to execute or file to write in /proc or /sys in order to disable automatic reboot after a kernel panic so the kernel finish to flush the log file ?

last_kmsg or pstore is the best ways to get kernel panic log. You don't need to write kernel log to a file. Details here: https://android.stackexchange.com/a/213460/218526. But you haven't stated in your question how a malfunctioning battery relates to kernel panics or reboots / bootloop and why you want to get kernel log. // Btw you can control reboot behavior on kernel panic by writing (directly or by using sysctl) to different files (including panic and panic_on_oops) in /proc/sys/kernel/.

@IrfanLatif unfortunately last_kmsg and pstore don’t return the kernel log on my device. And as I said, I suppose it’s because of the improper shutdown since I replaced by the exact same battery model from Samsung.


text:
Why is it possible to re-lock the bootloader after installing a custom ROM (on some devices)?
As I understand it, if an Android device’s bootloader is locked (fastboot oem lock), it should check the installed system on boot to verify that it’s signed with some (the manufacturer’s?) signing keys. I’ve seen several warnings not to lock the bootloader again after installing a custom ROM like LineageOS because the bootloader would complain about the modified system image and refuse to boot.
However, I have two Android devices on which I have installed custom ROMs:

The Fairphone 3 (FP3), where I installed /e/ OS
The OnePlus One (bacon), where I installed LineageOS 18.1 (with microG)

I’ve subsequently re-locked the bootloader on both devices and, surprisingly, not experienced any issues so far. For the Fairphone 3, I originally assumed that this works because /e/ OS is officially supported by the manufacturer, so I thought that the /e/ OS images are probably signed with some official keys. However, I don’t think there is any such support in the case of the OnePlus One (which is also long out of manufacturer support by now). Another hint is this forum post on the Fairphone forums, which reports the following:

I relocked the bootloader (fastboot flashing lock), it automatically
wiped my user data, and booted successfully! Also, after restoring my
data, I was able to upgrade from last-week’s release to the new
release of today - all without problems.
Now, this does raise a lot of security questions though. I did not
realize that LineageOS, /e/ and even Fairphone where all signing their
builds with google test keys - essentially rendering the OS build
integrity checks meaningless… I guess in fact that means that it
doesnt really matter which keys are being used, as they are simply not
checked? Any key would be accepted?

So, my question is: Why does running /e/ OS or LineageOS with a locked bootloader work in these cases? What is the significance of the Google test keys here – do the bootloaders just always accept them?

May be because some new devices support user-settable root of trust. Details here: Is there a way to root an Android phone without unlocking the bootloader?.

@IrfanLatif Ah, interesting! However, since you say “new devices”, this doesn’t sound like it would have been available at the time when the OnePlus One was released (2014)? I also don’t understand how it fits in with the statement about the Google test keys.

The official LOS subreddit has a comprehensive post on this topic. Still I'd advise against it because it makes recovering from failures much harder.

@AndyYan Thanks, that was a very helpful and detailed overview. I would say the most relevant part is: There are also a few phones (like the original Pixel/XL and OnePlus phones like the 5/5t and older) that don't support AVB v2, but can have their bootloaders relocked because they simply never check to see if the OS is signed by the vendor, just that it has some valid signature on it. This implies that the OnePlus One doesn’t check the origin of the signature, explaining that case. I suppose the Fairphone 3 is a similar case, then?

so in essence, re-locking does not make sense, because in the few models where it does work, it gets you no extra security, and otherwise just breaks your boot


text:
If I own Google Pixel and iPhone with same Google account, do I get unlimited upload for Google Photos?
Google Photos changed the policy so that only Google Pixel owners get to upload to Google Photos for free.
If I own an iPhone and Google Pixel both connected to the same Google account, does iPhone also get unlimited uploads?

The offer is device-dependent and only applicable for Pixel devices.
This is explained in more detail on Google Photos Help - Choose the upload size of your photos & videos under Android's tab - "Pixel storage info".

Important: If you have a Pixel 5 device or earlier, your current backup options and benefits remain unchanged. Photos and videos backed up in Storage saver quality (previously named High quality) from your Pixel 2-5 devices will continue to receive unlimited free storage. However, as of June 1, 2021 any new photos or videos you back up from other devices in Storage saver quality will count toward your Google Account storage.
(Emphasis mine)

Note that such info is not mentioned on the "Computer" tab and "iPhone & iPad" tab. Even for Android devices that are usually more prone to hack, the available hacks to disguise them as Pixel devices have also been patched.
The in-app Settings also makes it clear based on the device:

Left: Pixel 3a, "Free and unlimited on this device" | Right: Nexus 5, "Store more at a slightly reduced quality"


text:
The default Full Disk Encryption feature (known as Secure Startup on Samsung phones) is not working for me
In the past, with older Samsung devices, whenever I have enabled Secure Startup to fully encrypt a device, I have gotten an instruction to charge it to at least 80% and leave it plugged in, as it would reboot and take about an hour for this procedure to finalize (maybe not word for word, but iirc that was pretty much what it would say).
I've a used stock ROM Galaxy S9 here and I enabled Secure Startup, and it simply said that it is enabled... No restart, not an ~hour long activation process... Nothing, it just says it is enabled. When I restart the phone, it does ask for my password, but I suspect it just might be a UI/visual thing and that it does not really encrypt the device.
I checked if the Knox fuse was tripped and it wasn't. Also, because I had the phone heavily debloated, I suspected maybe I have uninstalled a crucial Secure Startup related system app, so I hard reset it and tried again with no default apps being uninstalled. But still the same thing. It says it is enabled, but did not say anything about charging the phone to 80% and that it would take about an hour, or prompt me to reboot, etc.
Again, this is a Galaxy S9 and I'm definitely sure it uses Full Disk Encryption (FDE) as its encryption method (I googled this). The reason why that is relevant, is because if it was File Based Encryption (FBE), I'd suspect it would be normal to enable Secure Startup instantly—as it seems to be doing it now—and not have to reboot and take about an hour to encrypt the entire phone.
What am I missing here?

It doesn't matter if it uses FBE or FDE. The reason why it is so fast when you activated encryption is that all Android devices come nowadays encrypted by default. Therefore all your user data were already encrypted when ever you write it to flash (even without a PIN or password set).
Therefore if you enable secure startup all files are already encrypted. The only part that has to be updated is the master encryption key (and may be some managing data). As such a key has only a few bytes activating secure startup is done in less than a second.
CPUs often contain hardware encryption/decryption commands which work pretty fast and require very little battery. This makes it possible to have it enabled all the time. This also has the positive effect that a factory reset is very fast (just eliminate the master key) and very secure as without the key all data is gone.

If it is enabled by default, then when I would disable it, and then later on enable it again, wouldn't it then go through the hour long process of actual encrypting? (Or rather a few minutes, since it is so fast)
Or are you suggesting that the device is encrypted by default and you cannot unencrypt it anyway? In that case why would it let you enable/disable Secure Startup as pleased?
In fact, why is there this Secure Startup feature in the first place, when everything is encrypted by default? Is it some form of UI psychological reassurance for the less tech savvy users?

@miraqolo6689 Yes that is what I told you all files are always encrypted. The only thing you can change is when the Gatekeeper system (the security manager of Android) allows to use the encryption keys. When it comes to FBE Android has the possibility to allow decryption before the first login (for some essential user files). Note: even if all files are always encrypted this does not mean they are always highly secured. As each file is encrypted with a different key if or if not a file is stored secure depends on who can access the key. And this the part where Sec. startup can enhance.

I see. So, Secure Startup disabled → all files encrypted regardless (on a per file basis). Secure Startup enabled → same thing plus master key at boot. Correct?

@miraqolo6689 From: https://docs.samsungknox.com/admin/knox-platform-for-enterprise/kbas/kba-360039577713.htm  Section on FDE: If the user sets a PIN, password, or pattern on the device, and configures Secure Startup via Settings > Biometrics and Security, the Primary Key is re-encrypted by the Keymaster using the user's credentials and stored. If Secure Startup is not enabled after being configured, the Primary Key is re-encrypted using the default password instead of the user's credentials.

Interesting read, thanks. To sum up, (a) my device is supposed to not reboot and take the hour long process to encrypt, as it already is encrypted and (b) enabling/disabling Secure Startup basically adds/removes a master key at boot; other than that the user files are encrypted regardless. Correct?


text:
How to block a specific URL phonewide
My first thought was blocking them using AdAway or AFWall, but ironically, an adblock and a firewall are useless
Most of the URLs are pictures. I can easily get their URL
I ask to block it phonewide because my browser doesn't support custom adblocking
Didn't even try adding some lines to the phone Hosts, because my adblock overwrites it.

A replacement for the AdAway is very well on the table (if not VPN-based), but for the AfWall, only if it's as lightweight, as well organized, free, and again, not VPN-based
My browser is Opera. Not changing that.

In case AdAway can be used:  If the URL needs to be a line of a host source,  how should it be formatted ?
Thank you ahead

Adaway is not content blocker. It is hosts blocker. You add only hosts (domain names and addresses). It has no capability (AFAIK) to block content sourced from a domain. To block content, you need something granular. In case of a browser, say Firefox, you can use Ublock Origin extension. For apps, I don't know what would work.

Changed the whole thread to put more options on the table

You can run tinyproxy server on your Android device. It supports FilterURLs option. To force redirect all traffic towards this local server, you can use redsocks2 with http-connect type. Both tools are free and open source. For hints see my answers to Using your Android phone as a proxy server and How to send all internet traffic to a SOCKS5 proxy server in local network?.

Man... Above my level... After reading twice, my brain became barely capable of Installing tinyproxy... Now the rest... All I can do is thank you for the attention and shared knowledge

Can your solution, or another strategy you may know, be adapted to a "script" that AFWall can swallow ?

Yes. You can run the CLI software in a shell script; directly or through AFWall. // Actually it's more complicated than what I wrote. FilterURLs won't work for HTTPS traffic without decryption (MITM) because in the case of SSL/TLS traffic the whole URL is not visible to the proxy. So a transparent intercepting proxy is needed. Without SSL interception only domains can be filtered using proxy. But a simpler approach to filter domains is DNS filtering using hosts file or by running a small DNS server (see example of dnscrypt).

Explanation on transparent HTTPS proxy can be found here and here.


text:
Blocking Reddit on android
I have a habit of using reddit app and I want to kick out this habit. I have tried the following ways to block reddit.

Blacklisted this website on a blocker and now cannot access it in any browser. ( BlockerX).
Tried blocking many other apps like Boost, Reddit for android, Sync which provide access to reddit.

Now, the issue is that there are so many other apps available on Play Store to provide access to reddit. It is ineffective and inefficient to block every Reddit app available on Play store.
So, Is there any other way to totally block access to reddit and it's third party apps ?
May be something technical like editing hosts file or build.prop file.

If an app works with reddit then it most likely uses their API which is also located on the www.reddit.com server. Hence blocking this server should also prevent other apps from contacting reddit. Can you explain why you want such a block? If you don't like reddit simply not using reddit and ignoring reddit content when to see it should be enough in my opinion.

@Robert..It's like an addiction that's why I want some mechanical stop from using this website. How can I block a server if my phone is not rooted?

VPN based ad blockers like Blokada and AdGuard can block complete servers by redirecting their traffic to localhost (-> no connection + no data). The work purely on the device itself.

@Robert..can we also do it by editing hosts file? I don't have a rooted phone. Vpn based softwares consume excessive battery.

Editing hosts file requires rooted device. And VPN is only battery excessive if the VPN does a lot transformations and/or the endpoint is not on your device. Just thy out Blokada (I prefer v4 instead of v5).


text:
Block booting into safe mode
I am using a porn blocker to protect my kids. But I got to know that there is a workaround to that by rebooting into safe mode. I also tested it and I was able to access everything.
Now my paid subscription to blocker seems useless. I am also worried about the kids.
So is there any way I can block safe mode in my device?
Like editing build.prop file or making any other change and safe mode blocker.

You can set a password for the primary account and set-up a secondary account for your kids. AFAIR after a reboot the password is required by Android so every time they reboot the device they need to come to you. I am not 100% sure but I would assume that this also applies to safe mode.

No, this method cannot solve my problem. As sometimes I have to give the smartphone to them for longer times. I am looking for a way to totally disable this functionality.

Do you have root access? You can write a Magisk module that sets persist.sys.safemode property to 0 before Android framework is loaded. Otherwise, you can't disable safe mode. Android doesn't offer a way out. Also, build.prop files cannot be changed without root access, so you should mention whether you have root access or not if you are thinking about solutions which depend upon root.

@ I don't have root access. Can you offer any other solution?

Another solution is to disable Play Store, package installer app, and stock browser apps that came with the phone. Even if your kid manages to boot into safe mode, they need access to a market app to install apps, or package installer to sideload apps, or stock browser to download apk files. As such, the two ways an app can still be installed in a fully patched device is via adb. There is no solution for app installation through  adb though.

@Firelord...Seems like a good option. But how can we disable all these apps without root access?

Why do you not want to use a kiosk app though? You can setup a kiosk app so that your kid only see and access the set of apps you want them to see and access. Even if your kid manages to install an app from safe mode, what good would it do to them since they can't run that app in safe mode, and when booted into normal mode you are gonna give them kiosk environment only.

You can search our website about disabling apps without root access. We have many such questions. Do know that some devices such as from Xiaomi don't like any system apps being disabled, and so, you might end up unable to boot the device afterwards. Proceed only if you are running a device close to Vanilla Android, such as from Google, OnePlus, Motorola, Nokia, etc.

When supervised with Google's own Family Link, safe mode option becomes disabled.


text:
Remap Chromecast device button via ADB
I got a Chromecast with Google TV. It has the ability to emit certain infrared signals when a button on the remote is pressed, allowing the user to control both Chromecast and TV with one single remote.
However, my TV is not supported in the predefined mapping profiles, so I would like to be able to configure the remote to trigger custom infrared signals.
How can I do that via ADB? Something like adb shell settings blah.
Updates:
When running logcat, I notice these lines: Axel.IrRemote: Uploading IR Profile '||1000024' to 60:98:66:D2:BF:E6. So in the end it's basically just upload data via Bluetooth, so with the right information I guess it shall be possible to get the job done.

Just making sure that you know that IR code sets can be reused by multiple manufacturers so I would double check (and perhaps mention) your make/model of TV.

I use Kedro. I tried like 50 brands but none work. It's too tiring man, the finger, it hurts.