text:
Android phone doesn't start, screen black
So yesterday i picked my phone up from my pocket, the screen was on but just black, and it was blinking (guessing around 7 seconds of, 7 seconds black). After a few hours of doing this, it sounded like it turned on or off, but nothing had changed. It was still just blinking. I also tried holding the power button for at least 2 minutes but nothing. Next change happened at half past eleven where it again sounded like it had turned on/off. But this time when i hold the power button, it sounded like it turned on, and after that i could turn the screen on or off, but it was still just black. Next morning, when pressing the power button, it turned "on" i could switch the screen on/off, and after 5 minutes it shut itself down again. This happened again. When i turn it on, it doesn't display the right splash screen, rather just black like usual.
Upon plugging it into a computer with android studio installed, and running adb devices, it doesn't show up (haven't tested while it is in the mode where i can control the screen since i haven't got access to a computer that has as rn, will update once i tested it). Right now i am trying to discharge it completely and see what happens when i charge it and turn it on. After it being discharged, i can turn it on, it seems to boot up like normal, taking the normal amount of time, but without image. After that i can turn on and off the screen, it also turns itself off after awhile like normal. After about 15sec to 5 minutes it then shuts itself down completely again
Earlier that day, i had just browsed some twitter, and tested a react native app. One thing that i did do was clean it in the sink, but it is a IP68 phone, the rubber around the corners have started becoming a bit loose, but the actual phone seems to be encased in an inner hard plastic shell. It's a lower end device from china, a Nomu S10 Pro to be specific, which i've had since Aug 2018.
Could it be the screen that is dead?
Update
i'm pretty certain the screen is dead, i plugged it into my PC, remembered the Microsoft Your Phone/Phone companion or whatever, and i could send messages, i could even view photos, so i took a screenshot, and it showed up. :(

you can take screenshots? that might be helpful for enabling usb-debugging, and finally you can get full control https://www.xda-developers.com/scrcpy-control-android-on-pc

it should be possible to root with SP Flash Tool + Magisk (on locked bootloader) and make full backup with Migrate (if you care)


text:
"Failed to load kernel" after flashing LineageOS 17.1 on Moto G6
I purchased a new Motorola Moto G6 with the intention to try out using LineageOS instead of the stock rom.
Here's everything that used to appear in the About section of the Settings. Keep in mind I selected Portuguese so I'll be translating some labels:

Software channel: retin
Android version: 8.0.0
Android security patch level: 2018-04-01
Base band version: M450_03.08.10.51R ALI_INDIADSDS_CUST
Kernel version: 3.18.71-perf-ga4749e5
hudsoncm@ilclbld32 #1
Fri Mar 30 11:53:22 CDT 2018
Version number: OPS27.82-45

This is my first time messing with phones like this. I am a Computer Engineer, though.
I started following the instructions here. I enabled developer options in the settings, enabled USB debugging and allowed OEM unlocking.
Then I unlocked the bootloader. I'm using ADB and Fastboot that came with Android Studio.
I ran fastboot oem get_unlock_data, got the code, inserted in on the Motorola website, got the email with the unlock key and unlocked it with fastboot oem unlock UNIQUE_KEY.
Then I installed TWRP 3.3.1-0. No problems there.
Then I had to search for the link to download LineageOS and GApps because it looked like the steps I was following were incomplete.
I downloaded LineageOS from here and GApps from here. For the latter, I chose ARM64, Android 10.0 and full. I transfered them to the internal storage using Android Studio Device File Explorer.
Then I followed the YouTube video from the first link. I had trouble wiping because of encryption, so it seems. I followed this to proceed. Using a pass or a pin didn't work. The next solution, Repair File System, was unavailable. I could only see Change File System. Then I formatted /data to EXT2 then back to EXT4 and it worked.
Then I tried to flash LineageOS. I got error 255. I looked here. Apparently, I should have used a 64 bit TWRP. I found one here and flashed it. Then I was able to flash both LineageOS and GApps. No error messages here.
Then I rebooted without installing the TWRP app. I got the following:
Start Up Failed:

Your device didn't start up successfully.
Use the Software Repair Assistant on computer
to repair your device.
Connect you device to your computer to get
the Software Repair Assistant.

AP Fastboot Flash Mode (Secure)
Error: failed to load kernel!
Fastboot Reason: Fall-through from normal boot mode
USB connected

I searched and didn't find much. I looked for the Software Repair Assistant but it seems it's only good to reinstall the stock ROM. I still want to install LineageOS, though.
I found some results about flashing boot.img and some other stuff, but I'm too afraid to hard brick my phone to follow any instructions that haven't been written specifically for my situation.
I still can access TWRP. I wiped and installed again to double check that there wasn't any error messages during flashing and then again to try installing the TWRP app, but the prompt for that didn't show up.
Please advise on what to do to complete installing LineageOS on my Moto G6.
Thanks in advance.
Update 2020-12-15: It seems that the tutorial I followed has been updated. Now there are no steps missing. I'll try again using the files provided there.
Update 2020-12-16: I'm currently trying to flash stock ROM in order to follow the latest instructions. I'm using Lenovo Rescue and Smart Assistant but it's been on Wait for matching firmware, don't unplug your device for quite a while now. In the meanwhile, I'm downloading a stock ROM that more closely matches my device. I found out about the command fastboot getvar all so I'll post the output here:
(bootloader) version: 0.5
(bootloader) version-bootloader: moto-sdm450-C3.09
(bootloader) product: ali
(bootloader) board: ali
(bootloader) secure: yes
(bootloader) hwrev: PVT2
(bootloader) radio: 5
(bootloader) storage-type: emmc
(bootloader) emmc: 32GB SAMSUNG GD6BMB RV=08 PV=01 FV=0000000000000001
(bootloader) ram: 3GB SAMSUNG LP3 DIE=8Gb M5=01 M6=06 M7=00 M8=5F
(bootloader) cpu: SDM450
(bootloader) cid: 0x0032
(bootloader) channelid: 0xc0
(bootloader) securestate: flashing_unlocked
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 534773760
(bootloader) reason: Fall-through from charger boot mode
(bootloader) imei: [REDACTED]
(bootloader) meid:
(bootloader) date: 08-11-2018
(bootloader) sku: XT1925-13
(bootloader) carrier_sku: XT1925-13
(bootloader) battid: SB18C18509
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Tue May  9  7: 0:46 UTC 1972"
(bootloader) ro.build.fingerprint[0]: motorola/ali/ali:8.0.0/OPS27.82-45
(bootloader) ro.build.fingerprint[1]: /56:user/release-keys
(bootloader) poweroffalarm: 0
(bootloader) ro.build.version.full[0]: Blur_Version.27.81.56.ali.retail.
(bootloader) ro.build.version.full[1]: en.US
(bootloader) ro.build.version.qcom: LA.UM.6.6.r1-04400-89xx.0
(bootloader) version-baseband: M450_03.08.10.51R ALI_INDIADSDS_CUST
(bootloader) kernel.version[0]: Linux version 3.18.71-perf-ga4749e5 (hud
(bootloader) kernel.version[1]: soncm@ilclbld32) (gcc version 4.9.x 2015
(bootloader) kernel.version[2]: 0123 (prerelease) (GCC) ) #1 SMP PREEMPT
(bootloader) kernel.version[3]:  Fri Mar 30 11:53:22 CDT 2018
(bootloader) sbl1.git: git=MBM-NG-VC3.09-0-g4650d8f
(bootloader) rpm.git: git=MBM-NG-VC3.04-0-g02798db
(bootloader) tz.git: git=827710b-dirty
(bootloader) devcfg.git: git=827710b-dirty
(bootloader) keymaster.git: git=827710b
(bootloader) cmnlib.git: git=827710b
(bootloader) cmnlib64.git: git=827710b
(bootloader) prov.git: git=827710b-dirty
(bootloader) aboot.git: git=MBM-NG-VC3.09-0-g225f207
(bootloader) frp-state: no protection (0)
(bootloader) ro.carrier: retin
(bootloader) current-slot:
(bootloader) slot-suffixes: _a
(bootloader) slot-count: 1
(bootloader) slot-successful:_a: INVALID
(bootloader) slot-successful:_b: INVALID
(bootloader) slot-bootable:_a: INVALID
(bootloader) slot-bootable:_b: INVALID
(bootloader) slot-retry-count:_a: unknown
(bootloader) slot-retry-count:_b: unknown
all: listed above
Finished. Total time: 0.082s

I thought I had 1925-3 but it's a XT1925-13... Explains why I received a charger with India standard pins in Brazil... At least it came with an adapter.
Later today, the Lenovo tool worked (I closed it, opened it again and followed the instructions to the letter).
I got the screenshot from Magisk Manager as requested.

If you bought the phone with the plan to install LineageOS, why haven't you chosen a device with official LineageOS support? Unofficial custom ROMs may work or not, usually the chance is much higher getting a working ROM for on officially supported device.

@Robert I did a quick search before purchasing and I found that tutorial for this device so I imagined it was ok. I had no idea there was this difference between official and unofficial.

@alecxs Thanks, I'll try that tonight. I wiped those referenced in the video: Dalvik / ART Cache, Cache, System and Data,

okay these partitions can be wiped safely. do not wipe vendor, modem/radio efs or any other firmware related partitions, LineageOS requires a working underlaying stock firmware and most likely comes with it's own system.img + boot.img only (the latter one should be already dm-verity disabled)

@alecxs I tried to install no-verity-opt-encrypt-6.1.zip but it failed. I got this error from the log: /tmp/updater[63]: .: config.sh: No such file or directory. I tried after wiping as before and after installing LineageOS and GApps. Speaking of which, I tried with the GApps provided by the now fixed tutorial I was following.

@alecxs Is this what you need? https://imgur.com/a/F3t7iH5 . It's late now. I'll try the steps from the first answer maybe tomorrow.

install stock ROM + firmware (do not accidentially re-lock bootloader)

make sure device is working fine before trying to install custom ROM

boot custom recovery from fastboot
fastboot boot mali.img

format userdata partition from TWRP menu

reboot bootloader

boot custom recovery from fastboot (again)

backup boot, recovery, system, vendor (just in case)

copy backup to PC
adb pull /sdcard/TWRP

wipe system, vendor

install LineageOS flashable zip

reboot and wait for LineageOS is booted successfully

After this, try to install GApps

reboot bootloader
boot custom recovery from fastboot (again)
install OpenGApps flashable zip
format userdata partition from TWRP menu
reboot and wait for LineageOS is booted successfully

If all wents well, done.
If device goes into boot-loop it must be related to GApps. start again by wiping system, vendor and install LineageOS again. In Magisk Manager check the SAR (system-as-root) section.
Only if your device is SAR (system-as-root) that workaround may help

bind mount /system_root/system
adb shell
mount -w /system
mkdir /system_root
mount -o bind /system /system_root
umount /system
mount -o bind /system_root/system /system

install GApps flashable zip

If still not working flash another stock ROM+firmware (Android 8.1.0 or Android 9.0) and try again.
Also try other custom ROMs. I recommend to only flash official custom ROMs with Status: Stable (for example RevengeOS or Resurrection Remix)

Note: this is the most non-invasive install method without installing TWRP or rooting and preserving encryption

Yes, thank you! Successfully installed LineageOS and GApps. I used Sensor Box for Android to test it's sensors. Also tested the camera, sound recording, GPS and voice calls. All working! I'll try to re-lock the bootloader now to keep it cleaner.

Additional question, if I may: I read several mentions about OTA updates as I worked on this. I received some updates as I was configuring it for the first time. Does that mean that OTA updates are already enabled for me?

Do NOT re-lock bootloader, that will brick your device. Google Play updates will work as usual. For FOTA updates custom recovery is required, you must flash TWRP. But seriously i doubt unofficial ROMs will receive FOTA. "Never touch a running system" :)

source: Stack Exchange

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

sort: votes


text:
Device not booting and not allowed me to unlock boot loader
Everytime I try to boot the device HTC Desire 728 I am getting a white screen with
*** Software status: Modified ***
*** Locked ***
HTC_AS0CML 128 SHIP S-ON
*** Security Warning ***
CID-HTC__J15
LK-1.01.0000
OS-1.36.401.4

VOL Up to previous item
VOL Down to next item
Power Key to select item

REBOOT
REBOOT TO BOOT-LOADER
BOOT TO DOWNLOAD MODE
BOOT TO RECOVERY MODE
POWER DOWN

Tried Booting into recovery and selecting "wipe data and factory reset" but still the same problem.
Tried to fastboot boot .. but it says
FAILED (remote: 'download for partition 'unlocktoken' is not allowed')
fastboot: error: Command failed

I searched the web and found that I must first unlock bootloader (see this link) But however my device is locked and I cannot even boot it to enable "Developer Mode" and "Enable OEM Unlock" options from settings.
Can you suggest what to do?

this is called a brick. fastboot not working on locked bootloader. find another way to flash official ROM

https://androidmtk.com/flash-stock-rom-using-smart-phone-flash-tool

not compatible with SP Flash Tool but you can create scatter file and try to convert
(haven't downloaded so can't really say what format it is) https://www.leakite.com/htc-desire-728-official-firmware-flash-file

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


text:
Is Android's system recovery a firmware thing or Android thing? Can factory reset be prevented?
I'm researching on how to protect my phone from being able to be reseted by thieves. Doing some research online I figured out that the main method of putting a stolen phone to work again is to do a factory reset through rebooting and using some combinations of volume + power buttons to activate the factory reset.
I'd like to know how this reset works. I've seen that on a Moto G 2nd gen, it had options like 'factory reset' or 'recover from SD card'.
First of all, this program, let's call program A that starts when you press the volume + power is running from firmware or kernel? Can it be erased?
I'd guess it's firmware, but it'll only accept a new system from an SD card if it's signed. So, the option a thief would use is the factory reset.
Supposing that I cannot block the program A from running and neither modifying it to supress the factory reset option, is it possible that I can make it factory reset to a custom OS, not the installed one? This custom OS could not work or have some monitoring programs.

Android recovery is a part of OS. If key combo is used to do a factory reset,  factory rest protection kicks in and the thief can't use the device in most devices (I am assuming locked bootloader or unrooted device or no custom recovery is installed.

You cannot have two OS 's running on unrooted Android phone

https://android.stackexchange.com/q/219561
https://android.stackexchange.com/q/220268
https://android.stackexchange.com/q/229462
https://android.stackexchange.com/q/220648
https://android.stackexchange.com/q/127739

someone else please post another answer about certain possibilities to prevent factory reset via 3rd party MDM device management software (for some samsung devices it is even possible to disable Odin/Download mode completely)

Android recovery is part of boot.img located in /boot partition. Hold key press signal for bootloader and recovery mode are hardcoded in android bootloader (ABL). ABL listens to keypress signal and boots bootloader or recovery mode. In Qualcomm Snapdragon devices, if ABL is corrupted, then Qualcomm's Extended Bootloader (XBL) fallsback to EDL mode for flashing device partitions.
See the bootflow of device with Qualcomm's SoC:

In this image, it shows kernel boots recovery which is not the case anymore. In A/B slots, recovery is part of boot.img so it can be directly booted by ABL.
Android has weak implemented physical security. Someone with physical access can access bootloader and recovery mode by hard restart of the device and pressing key combinations. Hard restart is hardwired to the SoC. By pressing power button for 15 seconds, SoC reboots and this feature is independent of the OS but reboot policy like hold press delay timer is hardcoded in firmware of SoC.
If factory reset protection (FRP) has no unpatched vulnerabilities, it will prevent reuse of stolen device after factory reset without authenticating your account. But OEMs implement it poorly and its bypassing methods become quickly available.
A good security design is when an unauthorised person shouldn't even have authorisation to factory reset the device. Android 8+ devices are fully capable of authentication for bootloader mode and recovery mode. Modern android devices are equipped with TEE which wakes on boot and in Qualcomm devices, it is awaken by XBL. TEE can perform biometric authentication or can use PIN authentication of screen lock even if the host OS is not loaded yet. Why AOSP and OEMs are not enforcing it doesn't have a justifying execuse.
Whether your bootloader is locked or unlocked, there's no anti-erasure protection. But atleast with bootloader locked, fully patched FRP can't be bypassed.

https://lineageos.org/engineering/Qualcomm-Firmware

that's egg hen dilemma. you can't do modifications on locked bootloader. unlocked bootloader allows thief to do everything he like
Your data is protected of being stolen (by encryption, and encryption key is wiped on factory reset). Your device is protected against re-using by thief as long as FRP factory reset protection is enabled (and you have bonded google play account). It doesn't protect your data from erasing and factory reset is still possible, but thief requires your google password in order to use the phone again. unlocking bootloader will disable FRP
after factory reset, as long as FRP is activated, thief cannot finish initial setup, therefore can't enable OEM unlocking in developers options and has no availbility to unlock bootloader. however certain hacks are possible to by-pass FRP, but that doesn't concern your data security
the more interesting is overcome encryption - as long as your lock screen credentials are part of encryption, your data is secure. But if your device is running FDE encryption with default_password, attack (on locked bootloader) is possible for devices where OEMs leaked programmers/tools for raw access

https://blog.elcomsoft.com/2018/05/demystifying-android-physical-acquisition


text:
App getting crashed even if no modification done to the code and the stack trace is same as the repackaged version of original app
My question is related to the repackaging of a mobile app. This app uses v1 signing scheme and I did the following:
I fetched the apk file from the playstore using adb and I signed with my keystore using apksigner. Now, when I launch this app on my smartphone, it is showing the following exception.

I took the original apk, I change the format to *.zip and unzipped it, and then again, converted back to apk and I  applied zipalign on the apk. The apk gets successfully installed on the smartphone but when I launch this app, I am getting the following exception.

In this scenario, I didn't modify any file. In the past, I have done this same process for few app's apk and the app is running successfully.
If you observe the above two exception's image, the 1st three lines are same.
My doubt is:

Irrespective of the signature change, we are getting the same
exception (atleast the 1st three lines). What can be the reasons
regarding the same? (Also, I have used the zipalign for the proper
alignment)
Which type of framework this app is using such that even without changing the source code, the app is getting crashed?

Any help/inputs regarding this domain is highly appreciated.

The app seems to be obfuscated and may use invalid file names, therefore just unpacking and repackaging can already change the app. Make sure to unpack only on Linux as it has best support for abnormal file-names, is case-sensitive by default and has less restrictions regarding special file-names.

Hi @Robert, I tried Linux also. But for that case, the apk generated file seems to be invalid. Hence the app won't even install. But when I used the WinRar Software on Windows OS, atleast, I am able to install.


text:
What is the analogy of the X Server on Android?
I know well the desktop world of the Android and I am currently digging for, how does it work.
I think, because multiple processes (apps) can interact simultanously with the desktop, some central service (process) should exist to collect their change requests and unite them into an always consistent form (for example, if the content of a window changes while it is not visible, then the change should be invisible on the screen - until that window does not go into the front). Only this process has direct access to the frame buffer of the display (i.e. only it can directly change the pixels).
In the Linux/Unix world, this is being done by the X Server. The processes (apps) interact with the X Server on Unix sockets.
On Windows, as far I know, it is a kernel feature (thus, there is no specific process for that), and the processes interact with it on LPC (local procedure calls, windows-specific user space - kernel space communication mechanism).
On the net around, there is a huge mass of detailed documentation about the app-level interface, but nothing about this deeper internals.
How does it work on Android?

https://android.stackexchange.com/a/16244 https://android.stackexchange.com/a/221825

@alecxs First link: I think it is mostly unrelated to my question, and surely does not answer it. Second link: I think system_server is probably what I am looking for, although it is unclear, how does it access the display hardware, and how do the processes (apps) interact with it.

@alecxs I am sorry but if you think that this answer has anything to do to this question, you probably do not understand this question. Btw, I don't think that this answer is an useful answer for this question. Thank you very much, but I know that a kernel is not a "platform" (the OP probably understands the set of Java libraries on "platform").

@peterh-ReinstateMonica The question linked by alecxs mentions "Surface Flinger (Android's Display Server)" which is from my understanding the answer to your question. See for details: https://source.android.com/devices/graphics/surfaceflinger-windowmanager

@Robert 1) He linked an answer (which is imho NAA) 2) Yes, "Surface Flinger" is already an important trace, but there is still nothing what is it. It is a process? A java library? A kernel module? Or what? How do processes (apps) interact with it?

SurfaceFlinger is an init service, at least in recent Android releases; a native binary as well as a library. Check /system/bin, /system/lib, pgrep -a surfaceflinger, getprop init.svc.surfaceflinger on your device. Somewhat related: https://android.stackexchange.com/a/221749/218526. "How do processes (apps) interact with it?" is purely ROM / HAL development question, not suitable here. In short they use Android's/Linux's IPC mechanisms for communication. You may check official documentation for details.

@IrfanLatif Thanks! It is already an answer. The details of the Android/Linux IPC mechanism would be imho interesting, but I think it uses unix sockets (AFAIK sysv ipc does not exist on Android).

Android's preference is Binder and shared memory in most cases.

Summarizing the answers: display handling happens by the Surface Flinger, which is a service process started by the init scripts on boot.
Apps interact with the Surface Flinger over Linux/Android IPC mechanisms. The comment did not detail, how. Androids preference is binder and shared memory in most cases. Binder uses device files for process communication.
Surface Flinger communicates with the hardware over the vendor-provided HAL. Until Android 8, HAL was a set of shared libs in /lib/hw, provided by the vendors. Since Android 8, HAL is a set of system services (also processes started by the initialization). Legacy HALs in the form of shared libraries still do exist.

SurfaceFlinger communicates with vendor-provided HAL, not hardware.

@IrfanLatif Tyvm!

"HAL is a set of shared libs in /lib/hw". No. Binderized HALs introduced in Android 8 are not libraries but run as native daemons.

@IrfanLatif Thanks! I inserted it into the answer, is it okay?

Yes but not all HALs are daemons. Legacy HALs are still shared libraries.

@IrfanLatif Thanks, I inserted it into the post.


text:
Wifi stops working at random
I have a Galaxy S20, which is having a problem with wireless networks (for around a week, maybe a few days more). It will always connect to them fine, but after a certain (somewhat random) amount of time, it will lose network connectivity but still appear to be connected. Sometimes an exclamation mark appears on the icon, sometimes not.
In either case, disabling and then reenabling wifi will fix it, until it drops out again, usually a few minutes later but could be hours later.
I have tested both with my main wireless network (using UniFi APs) and also with an old dd-wrt AP I had lying around. It has the same problem on both although if anything seems to happen more on my main network with much better APs, as well as happening more when I'm actively using the phone rather than just watching a ping command. APs (for my main network, anyway) are running latest firmware, on the best channels (currently 6 and 1) but I have tested other channels. Network is performing fine, DHCP and DNS working properly, etc. DHCP lease time is 12 hours with a static mapping for the phone so I know it's not expiring and failing to renew.
In the logs for the UniFi APs, I get a lot of log entries like this, but search results for them are generally useless:
Dec 14 21:03:32 unifi-1.***** user U7PG2,fcecdaa379ba,v4.3.24.11355: : mcad[19924]: wireless_agg_stats.log_sta_anomalies(): bssid=fc:ec:**:**:**:** radio=wifi0 vap=ath0 sta=58:d5:**:**:**:** satisfaction_now=73 anomalies=tcp_latency
Dec 14 21:03:50 unifi-1.***** user U7PG2,fcecdaa379ba,v4.3.24.11355: : mcad[19924]: wireless_agg_stats.log_sta_anomalies(): bssid=fc:ec:**:**:**:** radio=wifi0 vap=ath0 sta=58:d5:**:**:**:** satisfaction_now=73 anomalies=tcp_latency

When I run a ping to an address on the local network, it works for a while, then stops receiving the replies. Meanwhile, if I ping the phone's IP from a computer, I see a corresponding sudden loss of all packets to the phone (Destination Host Unreachable). The same problem does not occur for any other wireless devices (phones, tablets, or laptops) and happens whether the phone is charging or on battery.
Any idea why this happens or on any fixes? I can do ADB if needed but not sure what to do for diagnostics as android's network tools are fairly limited.
Model: SM-G981U1
Android version: 10
Patch level: 1 Nov 2020
Kernel: 4.19.81-19654513 #2
Edit: Have kept fiddling with different wireless networks, still having the problem. I have also noticed that if I go into the wifi menu, that is enough to cause it to reconnect and start passing traffic again even if I don't disable/reenable it.

Can you add in the specific model number of phone (hardware version if available), version of Android OS, patch level, etc. and any other information by tapping on Settings->About Phone->Software information/Android version. Assuming that other devices (laptops/PC/phones) are not having problems with your WiFI APs.

Done.
No other problems with other devices including another Android 10 phone.

For some reasons, there's a similar symptom posted one week ago both with Samsung devices, but also not answered yet.


text:
How do I get rid of the many sticky notices about my hotspot with tethering?
I'm using a smartphone as a WiFi hotspot - and connecting a PC to it with a USB cable. As I plug the cable in, I get a first notification bubble:

USB debugging is on
Tap to turn off USB debugging

I don't want to get this every time I connect!... and even if I do - at least I want to be able to swipe it away. No such luck.
Now, I turn on the hotspot. This gives me two more notifications:

Tethering or hotspot active
0 connected devices
Tethering or hotspot active
Tap to set up.

then I turn on USB tethering (which I also don't understand why I can't get to default to on); that yields another notification:

USB tethering is on
Tap for more options.

So, four different notifications, none of which I can swipe away.
What can I do to:

Make them swipeable-away?
Make it so that they don't show up in the first place, or at least
Make it so that they disappear a short while after appearing?

Notes:

My phone is a Xiaomi 9 SE, running MIUI 12.0.2, that's based on Android 10 QKQ1.

Those messages are shown most likely because they can affect device security. Otherwise someone who gets access to your device could activate those features, remove the notification and get back the device.

@Robert: 1. I don't view my device as being secure anyway. 2. Be that as it may - I want to make the messages go away.

I just tested my answer on an Android 10 device, and it seems to automatically swipe those notifications your have mentioned. Try it and see if it helps.

Also, you can change their priority status by long pressing them and selecting the cog icon, than "network status", and then tap on "Other" and enable Minimize. This way, they become less infuriating.

@Firelord: The long-press doesn't work for me, but - see clarification about the phone I have. I'll try MacroDroid later on.

@einpoklum yeah sorry, I should have led with "MacroDroid part of my answer worked" . I now tested it on Android 10 (MIUI 12) on a Poco X3. Works great.

Android 13, toggle locked: https://i.stack.imgur.com/5ezum.png.


text:
I Can't Change Album Art On Three Songs By One Artist
I tried everything, even reformatting the phone. I never had this problem before.
The album art shows up properly on my computer.
New: I copied the songs from another phone, each song had the same profile pictures like it should, but it was still in two albums like before. When I moved the files from phone storage to the SD card via phone, the 3 songs went back to black album art and and it is still in two albums.

Try using Mixplorer (download free from XDA to add album art. FAQ of Mixplorer


text:
Why can't I link contacts? (Moto G Stylus)
I just started to use a Moto G Stylus. I copied my contacts over, and several contacts are linked (like Gmail, Signal, WhatsApp, Exchange, etc.). This is how I had it on my previous phone and is as it should be.
However, I can't create new links -- neither completely new links, nor adding contacts to already linked contacts. The only things I can do is display the links of already linked contacts and unlink them.
Does anybody know what I could do to be able to link contacts? Is this a limitation of this specific dialer?
The odd thing is that the Verizon help for this phone mentions the "Link" feature (https://www.verizon.com/support/knowledge-base-230168/), but the Motorola help page for the Contact app doesn't (https://support.motorola.com/us/en/solution/MS149789). I got my phone through Google Fi, FWIW.
(Note that I'm not talking about merging contacts. Merging only works within a given account; linking contacts is provided specifically to be able to link contacts from different accounts into a single entry in the contact list.)

Try a different contact app?

@beeshyams: That's what I'm doing. So far I've tried Simpler Caller ID and Drupe, and neither has the link feature. Do you have any suggestions?

Not particularly.....

In the meantime, I have found out that the dialer of this phone really can't link contacts. What a bummer... I thought this was a basic functionality of all but the most basic phones. (Well, maybe it is, and this phone is just one of the most basic ones.)
In any case, be prepared to add a 3rd party dialer to the bill if you're thinking of buying this phone from anywhere but Verizon.
From Motorola:

The :Link" feature that you've mentioned is only available for Verizon specific phones, so a Moto G Stylus that is purchased from Verizon would work with that feature.


text:
Microphone does not work when speaker is on
So, for a few days I have been having problems with my microphone on video call or call with loudspeakers. I tried Whatsapp video call, Whatsapp voice call with loudspeaker, Zoom, and Google Meet and the problems are same: my voice cannot go through, while I can hear other people's voice.
I tried using mic checker app and both my microphones are fine. I also have tried recording video and audio and they both work just fine.
I also have checked the applications' permission and they do have permission to use my microphone.
Last time, I tried zoom meeting, and muted my speaker, and my voice went through. However, when I turn on my speaker again, my mic cannot pick up any sound.
Is there a way I can fix this so that my speaker and my mic can be on at the same time?

Does this happen in safe mode too? If yes, could be hardware issue, if no, some app is creating this mess

what do you mean by safe mode? how do I enable safe mode?

Safe mode is a mode in which the device works as if there are no installed apps. One usually needs a key combination to enter into safe mode. You didn't mention your device in question, anyway Google for how to enter into safe mode

okay, I tried it in safe mode and this happens too. So this could be a hardware issue then?

To me, it looks like a hardware issue and it's better to get it checked out by service guys


text:
Call Automatically Disconnects When Calling
I have a android tablet with android 5.1 lollipop in which I have an airtel number.
When I call someone using my number (not WhatsApp just normal call),  sometimes it shows "Dialling" and then automatically call ends in 1-2 seconds. Sometimes, it directly disconnects in 1-2 seconds.
Last thing I remember was that I was playing with some of the dial codes of Android. From then this problem started. Before that, I was able to make calls with the SIM which I have now & also with my old SIM

So this is weird, but I realised that I accidentally dialled *31# and the problem started. Now, I dialled #31# and I am able to call.
For information on USSD/MMI Codes see this wiki page


text:
Help me to Unlock Bootloader on this Chinese phone
I am trying to unlock the bootloader for my device (it's a cheap Chinese phone) and then root using Magisk. The first problem is that OEM Unlock option is not available in developer options, so I got no choice other than try unlocking using fastboot. Now the second problem is that fastboot doesn't show anything at all. Normally there is a Fastboot written at the top left corner of the device but in my case there is no output but the blank screen, and I do verify that my device is in fastboot mode because when I do fastboot devices, it show's the output:
C:\Users\Mujtaba>adb devices
List of devices attached
Y3123A0310Q0100020953   device

C:\Users\Mujtaba>adb reboot bootloader

C:\Users\Mujtaba>fastboot devices
Y3123A0310Q01000209     fastboot

Since fastboot is responding, I tried to unlock the bootloader using different commands but each time I get read/write failed error.
C:\Users\Mujtaba>fastboot oem unlock
...
FAILED (command write failed (Unknown error))
finished. total time: 5.011s

C:\Users\Mujtaba>fastboot oem unlock
...
FAILED (status read failed (Too many links))
finished. total time: 80.886s

Alas, I got the same results with fastboot oem unlock-go and fastboot flashing unlock as fastboot is not picking up (at least I think) any command except for fastboot devices.
I read the official guide and there I found that:

Devices should deny the fastboot flashing unlock command unless the
get_unlock_ability is set to 1. If set to 0, the user needs to boot to
the home screen, open the Settings > System > Developer options menu
and enable the OEM unlocking option (which sets the unlock_ability to
1).

My device supports unlocking bootloader because I've checked the build.prop file using adb shell getprop and it includes the properties stated below:

The ro.oem_unlock_supported property should be set at build time based
on whether the device supports flashing unlock.
If the device suppports flashing unlock, set ro.oem_unlock_supported
to 1. If the device doesn't support flashing unlock, set
ro.oem_unlock_supported to 0. If the device supports flashing unlock,
then the bootloader should indicate the lock status by setting the
kernel command line variable androidboot.flash.locked to 1 if locked
or 0 if unlocked.
For devices that support dm-verity, use ro.boot.verifiedbootstate to
set the value of ro.boot.flash.locked to 0; this unlocks the
bootloader if the verified boot state is orange.

C:\Users\Mujtaba>adb shell getprop
[ro.oem_unlock_supported]: [1]
[ro.boot.verifiedbootstate]: [green]
[ro.boot.flash.locked]: [1]
[sys.oem_unlock_allowed]: [0]
.
.

Someone on reddit did this to find the OEM unlock state, mine of course returned 0 as you can see above.
adb shell getprop sys.oem_unlock_allowed

Device Specs:
CPU: ARM Cortex-A-7 @ 1.20 Ghz
GPU: Mali-400 MP
Board: sp7731cea (Unisoc aka Spreadtrum)
Build: Q Infinity C_MP_26_01
Treble: NA
Seamless update (A/B): NA
So long story short, I'm still unable to unlock the bootloader so any help would be very helpful guys. Thanks

https://androidmtk.com/flash-pac-stock-rom-android-smartphone

if OEM Unlock option is not available you need to find some app/ROM/workaround which reveals that. you may succeed with flashing (AVBv1 signed) magisk_patched.img on locked bootloader. once you have rooted you may enable OEM unlocking from cmd line. unfortunately i can't help flashing pac, don't know if it is even possible to flash single partition from SPD flash tool

for samsung devices one must insert SIM for 7 days, worth a try https://android.stackexchange.com/q/225021

@alecxs but i still need my boot.img file for magisk right??

@alecxs when patching boot.img from magisk, will it use avb1 or 2 by default?

only AVBv1 is supported, assuming your device is running Android 7


text:
WhatsApp overrides do not disturb
Android 7. A contact accidentally initiated a video call at 04.58 and my phone briefly let out a notification ( brief as I'd guess she presumably killed the call pronto?). I've just double checked and Do not disturb is set to prevent all apps' notifications at night, including WhatsApp.
Any ideas as to what happened? How I can prevent this again?

Are calls permitted as an exception?

There doesn't seem to be a setting for that, at least not one that I can find. The caller is not on my exceptions list and notifications/WhatsApp doesn't go any more detailed than "override do not disturb", which is set to off.

i guess your device was on deep sleep until call woke it up, then device started to realize it's night time now and instructed WhatsApp to shut up immediately, but it was already too late ;)

I wondered if that was feasible: That seems to be a reasonable assumption.  Somewhat defeats the DND, but I suppose at least it did kick in. After we were woken up..m

exclude the clock from battery optimizing maybe it helps


text:
Enabling Wireguard tunnel through ADB shell
I'm trying to enable and disable Wireguard tunnels through the ADB shell.
I can see the followings actions and receivers are available :
adb:# dumpsys package com.wireguard.android
...
Receiver Resolver Table:
  Non-Data Actions:
      com.wireguard.android.action.SET_TUNNEL_UP:
        4166aa1 com.wireguard.android/.model.TunnelManager$IntentReceiver filter 631a6bf
          Action: "com.wireguard.android.action.REFRESH_TUNNEL_STATES"
          Action: "com.wireguard.android.action.SET_TUNNEL_UP"
          Action: "com.wireguard.android.action.SET_TUNNEL_DOWN"
      com.wireguard.android.action.REFRESH_TUNNEL_STATES:
        4166aa1 com.wireguard.android/.model.TunnelManager$IntentReceiver filter 631a6bf
          Action: "com.wireguard.android.action.REFRESH_TUNNEL_STATES"
          Action: "com.wireguard.android.action.SET_TUNNEL_UP"
          Action: "com.wireguard.android.action.SET_TUNNEL_DOWN"
      com.wireguard.android.action.SET_TUNNEL_DOWN:
        4166aa1 com.wireguard.android/.model.TunnelManager$IntentReceiver filter 631a6bf
          Action: "com.wireguard.android.action.REFRESH_TUNNEL_STATES"
          Action: "com.wireguard.android.action.SET_TUNNEL_UP"
          Action: "com.wireguard.android.action.SET_TUNNEL_DOWN"
      android.intent.action.BOOT_COMPLETED:
        4f4cb74 com.wireguard.android/.BootShutdownReceiver filter 426c4de
          Action: "android.intent.action.ACTION_SHUTDOWN"
          Action: "android.intent.action.BOOT_COMPLETED"
      android.intent.action.ACTION_SHUTDOWN:
        4f4cb74 com.wireguard.android/.BootShutdownReceiver filter 426c4de
          Action: "android.intent.action.ACTION_SHUTDOWN"
          Action: "android.intent.action.BOOT_COMPLETED"
...

Looking at the package's sourcecode, I see that com.wireguard.android/.model.TunnelManager$IntentReceiver asks for the name of the tunnel to enable/disable to be passed as an extra string :
 val tunnelName = intent.getStringExtra("tunnel") ?: return@launch
 val tunnels = manager.getTunnels()
 val tunnel = tunnels[tunnelName] ?: return@launch

So I tried two different versions of the same command to enable a tunnel named my-tunnel :

adb:# am broadcast -a com.wireguard.android.action.SET_TUNNEL_UP -e tunnel my-tunnel
Broadcasting: Intent { act=com.wireguard.android.action.SET_TUNNEL_UP flg=0x400000 (has extras) }
Broadcast completed: result=0
# am broadcast -a com.wireguard.android.action.SET_TUNNEL_UP -e tunnel my-tunnel -n com.wireguard.android/.model.TunnelManager$IntentReceiver
Broadcasting: Intent { act=com.wireguard.android.action.SET_TUNNEL_UP flg=0x400000 cmp=com.wireguard.android/.model.TunnelManager (has extras) }
Broadcast completed: result=0

But after checking on my phone my-tunnel is still disabled.
What am I missing ? Note that I'm pretty new to using ADB commands so it might be something obvious.

When calling a Intent/Broadcast via adb and am then actual code is executed asynchronously, therefore you never get an result. Effectively this means the result code you see is meaningless.

Good to know ! I edited my question in accordance.

This is the most reliable way that I have found:
am broadcast -a com.wireguard.android.action.SET_TUNNEL_UP -n 'com.wireguard.android/.model.TunnelManager$IntentReceiver' -e tunnel <tunnel_name>
am broadcast -a com.wireguard.android.action.SET_TUNNEL_DOWN -n 'com.wireguard.android/.model.TunnelManager$IntentReceiver' -e tunnel <tunnel_name>

Notes:

This only works if adb has root rights.
You need to enable "Allow remote control apps" under "Advanced" in the settings of the WireGuard app.
If you also want this to work when the WireGuard app is not running, you need to disable background battery optimizations for the app.


text:
Another Without-Unlock Backup Question: (Temporarily) Booting a Recovery?
There was a nice thorough discussion of backups for non-rooted (and maybe also locked) devices here.  Most of that covered Android 4.x+ because of the use of adb backup, which apparently doesn't exist in prior versions.  A second question on backing up 2.3.x under the same conditions, found no answers.
I'm am dealing with Honeycomb 3.2.6, which I have not yet unlocked, and I am considering the last answer at the first link.  I am considering if there is a way to, possibly temporarily, boot a recovery to do the backup.  I can see three possibilities:
(1) That answer suggests connecting via USB with Debugging enabled and then:
abd reboot bootloader
fastboot boot twrp.img
fastboot reboot

As opposed to fastboot flash recovery twrp.img, that should temporarily boot the twrp.img without changing/wiping /data.  From there it should be possible to do a nandroid backup to an SDCard.  The author of that idea didn't seem to have tried it themselves.  I wonder if anyone has, and if it's likely to work as described.
(2) According to the TWRP website for this device, if I fastboot flash recovery twrp.img and then on reboot press the proper key combination to enter the recovery (in this case power+volume-down), then

Note many devices will replace your custom recovery automatically
during first boot. To prevent this, ... find the proper key combo to
enter recovery. After typing fastboot reboot, hold the key combo and
boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to
prevent the stock ROM from replacing TWRP. If you don't follow this
step, you will have to repeat the install.

Is this true for TWRP on all/most/many devices?
(3) Another approach to temporarily booting a recovery, mentioned in one of the comments at that first link, is to boot one off of an SDCard.  I found one example in another device I have.  I'm wondering under what conditions that might work and how to arrange it?  If anyone has any insight, I would also appreciate them.

you can safely try fastboot, if bootloader is locked it will just deny. for old devices cf-auto-root or other one-click-routing apps will work. for some older devices cwm or philz-touch recovery is signed and flashable from stock recovery

For Honeycomb devices the kernel should be new enough to contain the DirtyCow vulnerability (kernel after 2.6.22). Therefore temporary rooting using an app that uses the DirtyCow exploit should be possible. As alecxs said this exploit is typically contained in on-click-root-apps.

also worth mention you can flash modified boot or system with proper flash tool according to your chipset https://android.stackexchange.com/q/213116


text:
How to convert a number to words in MS Excel Android app?
Excel Macros are unsupported in Android and there is also no SpellNum Function in Android .
I want a function which can convert a number to words.
Is there any way we can achieve this ?
eg -  40004  , should be converted to Forty Thousand Four

The simplest approach is to use a VLOOKUP() table
put the number in A1 and in B1 enter:
=VLOOKUP(A1,C:D,2,FALSE)

But 30304 , should be printed as Thirty Thousand Three Hundred Four , how to achieve this ??


text:
Does Android perform cold app startup optimization?
I am trying to measure the time it takes to launch an App (cold startup) on Android.
As the official documentation states, that the startup time will be displayed in the logcat:
ActivityManager: Displayed com.android.myexample/.StartupTiming: +3s534ms

The problem I currently have is that startup times vary greatly. I tested on three different days à 10 times. These are the results:

Day 1:

~1100ms

Day 2:

~900ms

Day 3:

~350ms

My Question:
Does Android perform any optimization in the background for the App startup? Is there a way to reliably measure the startup time?
I haven't done any changes to the App in these three days. Before the testing, the phone was at 100% battery capacity and was cold to the touch (to eliminate the possibility of thermal throttling).
On day 2 and 3, I deleted the App, restarted the phone, reinstalled the App and tested again with the same results (day 2 was again ~900ms and on day 3: ~350ms).
Maybe it has something to do with the ART (Android RunTime) using JIT (just-in-time) and AOT (ahead-of-time) compiler?!
The app does not perform any network actions. At startup it only ready about 100 pictures from the internal storage and displays them in a Recycler View.
I used a Google Pixel 2 running on Android 9. The app is written in Java.

run-time measurement of Java based programs in generally is not very easy (JIT, garbage collector, ..). Additionally you have to consider that your app may be executed concurrently by other apps or other services starting-up. Therefore measuring execution time is IMHO meaningless, better measure CPU time. Also when your app is loading something from internal storage I assume you use other services such as MediaStore which itself can have different execution timing. If you really need a timing value, measure may be 100 boot cycles and take the median.

https://elinux.org/images/4/4c/Android-bootup-time-linuxcon-2010-08.pdf


text:
I can't open or close any tabs on my Android tablet in Chrome
This is a tablet I've had for years, and suddenly it decided that tabs in Chromes cannot be selected, exited, or added (The only change I can do is the new tab button option on the 3 dots, but I can't switch back from it, or I close out of Chrome and reopen it, then I can do only one of those things, but not more).

I had this issue too on my Galaxy Tab A.
I found a workaround. It's not the fix just a workaround. Please enable rotation of display btw. landscape and portrait. Each time you encounter this issue so you cannot close any Chrome Tabs any longer just rotate your display. That's it!
Regards and stay healthy!
Markus

I have the exact same issue in Chrome on pixel c. It happens every time i have had a video in film screen. And starter sekund the same time as you. I found the same work around, nyt it is anoying.

Same issue is in chrome 87.0.4280.141 and Android 8.1.0 on pixel c.

Do you have Samsung Note 4?? Follow this..
4 Ways to Fix Can’t Close Tabs in Samsung Note 4

Firstly, go to Settings in your Samsung Note 4 and head over to Developer Options. Then click on Input and uncheck show touches. After doing this, try again and this time you will be able to close tabs on Note-4.
Note: If you don’t have developer options, you can get them by going to the Settings page and heading over to About Phone and then tapping  Build Number 7 times.

If you are using Chrome, head over to Chrome settings and then turn off combine tabs. This step will restart Google Chrome and you will be able to tap on the number box and close the tabs.

Another great fix to solve the can’t close tabs in Note 4 problem is to Go to Settings -> developer options and unchecking ‘allow mock locations’. This will fix the issue and you will be able to close all the opened tabs.

Go to Developer options and go to the Apps section. Here, you will see an option “ Do Not Keep Activities”  Uncheck this box and you will be able to close tabs in Samsung Note-4. If that doesn’t work, you can also check this box and then try again.

Source

Thank you for the effort, but none of what you have told me has worked. I should make clear this is a tablet, not a phone.

Oh yeah.. sorry.. my bad. See https://android.stackexchange.com/questions/89468/cant-switch-close-tabs-in-the-chrome-browser-on-my-android-tablet and also try updating/downgrading (sometimes there are bugs in new updates) the app.. Tell me when you've read this, I'll delete the answer.


text:
Incorrect "Google Maps" section in Gmail contact
My contact suddenly has a new section titled "Google Maps" and this section shows information for a random business located in another state (this "Google Maps" section is between "Contact details" and "Google profile".
When I click on a link icon within this section, it takes me to the Maps listing for this business. AS far as I can tell, there is nothing in there that could possibly link my contact to it.
It's important for me to fix this because I have a business and this messes with my local SEO. Thanks in advance for any help.

Is there a pic attached to the contact that might have some incorrect EXIF data?

Is your web activity turned on?

Contact picture is a professional studio headshot, EXIF data for location isn't present. Web activity has been turned off for years. But thank you for the suggestions!


text:
Is it possible to connect to a WiFi network using the router's MAC address and not the broadcasted SSID on Android?
Assuming that there are many hotspots broadcasting the same SSID, is it possible to "force" my Android phone to connect to a specific network by using a unique identifier, for example the MAC address of the broadcasting router?
What I'm looking for is a solution without the need of third party software. I'm currently using Android 10 on Xiaomi MIUI 12, but I'm open to hear any answer including other Android versions or mobile manufacturers.


text:
GBoard app: Initializing of voice-to-text takes forever
I use GBoard on my Poco X3 and the keyboard sporadically takes forever to initialize when using Voice Typing. Sometimes it's fast, sometimes it isnt. Sometimes it shows "initializing" and than aborts - sometimes it goes over into speech-recognition mode. Very unreliable :(
Not sure why... Occurs on Wifi, as well as on mobile data connection. Havent found a way to reproduce it reliably.
Any ideas why?
Latest updates installed. Cache already cleared.
Different things tried, nothing yet worked :(
Thanks!

In  keyboard settings, enable "faster voice typing" //Is the keyboard language set to the phone language

@beeshyams Unfortunately Im in germany, hence this option is not even available, probably US-only :(

Maybe it's waiting for the background noise level to decrease before it activates its listen mode???


text:
Recover OPPO A9 2020 (Android 10) from forgotten PIN(6 digits => 1000000 probability)
I have tried more tools to recover oppo A9 2020 (Model CPH1937; patch: oct,2020; Android Version: Android 10; ColorOs Version: 7) from the forgotten PIN. I'm using Snapdragon 665 device. Since I couldn't get FRP unlocking tool, I have tried to wipe device or atleast reset /data to recover OPPO A9 2020. In anyway (either wiping or recovering) how can i recover by tools without BOX?.
I recognished, EDL mode is the only way to recover phone from PIN.
Tried ways,

Tried to build brute-force machine.
I know 6 digit PIN protection is not big deal to predict the right PIN among 10,00,000 numbers. (10 lack numbers from 000000 to 999999).

 Enter PIN
  ......
   1 2 3       // This is the structure and prediction rate for any single try (1/1000000)100 => (probability100)%
   4 5 6       // If Android accept keyboard even from lock screen it will be possible.
   7 8 9       // 8279 programmable keyboard or 8051 controller will be the brute-force machine.
     0      // I recognished using emergency call type *#899# (Works in Oppo A9 2020) -> manual test -> last title panel (on topbar) write/read log -> It will asks for PIN (safest way to try PINs it won't show timer after certain attempts you can try infinite times using programmable keyboard). note: It won't Erase your data and applications. You don't need to spend more internet packs, It is the best method to find old "PIN". You can unlock your phone with this. Not best for password, I don't know about pattern .
I'm 100% sure, It will work. "If your android can recognize keyboard in lock screen and if has secret log write option"
chip not available in my district shops. But available in online shopping(use trusted shopping sites). The dare is, I don't have mobile to use mobile banking now to work with above option.

Wipe mobile via Google account phone recovery (find my device),

=> Mobile internet and location service both were turned on but google find my device didn't detect mobile after phone locked.

Used MSM Download tool to recover device (Stock ROM + setup file = 6.5Gb).

=> Mobile didn't responds to windows after 15 seconds of EDL mode. Prompts(log, message or whatever) to restart device(every time after 15 seconds).

Asked(via call) oppo store to help.

=> Oppo store not present in my district to go :-(.

Given to service center,

=> Again refered OPPO Store :-(.

Used QFil (Python and linux) it seems to be work.

=> There is no clear command list for repartitioning using .img file. How to use QFil?
=> Signature verification failed even for Stock ROM. notable: I don't even tried to flash custom ROM and OPPO A9 2020 has almost all feature ie. Dolby, HIGH performance mode(Game Boost), floating window apps(*supported Apps), Dark Mode, Custom snapshot, OPPO secure storage(CHIP level encryption), Recovery Mode Encryption(This is why I can't wipe my device via Recovery :-(. ),...etc.

Used QFil(Prebuild GUI Application) in windows.

=> Sahara protocol Error => Read 0 bit header in Rx (Fixes more annoying and not available).
=> Respose timeout

**Used QDL tool for linux from these channels,

Via snap package manager
Via Official git source code repository
Prebuild download**

=> Starts to work (from the debug log). But not writing (and still stuck there before writing into port(ttyUSB0))
qdl --storage ufs --include path/to/image/ prog_firehose_ddr_ufs.elf rawprogram0_ufs.xml patch0_ufs.xml

To point snap,
/snap/bin/qdl --storage ufs --include path/to/image/ prog_firehose_ddr_ufs.elf rawprogram0_ufs.xml patch0_ufs.xml

To point current(git cloned directory) working directory("."),
./qdl --storage ufs --include path/to/image/ prog_firehose_ddr_ufs.elf rawprogram0_ufs.xml patch0_ufs.xml

After the installation of prebuild(downloaded) from internet,
$ which qdl
/usr/bin/qdl  <= pointing 'make install'/apt/dpkg/yum/pacman/... installation
$ qdl --storage ufs --include path/to/image/ prog_firehose_ddr_ufs.elf rawprogram0_ufs.xml patch0_ufs.xml

Result does not have any error and stucks after displaying details about device(ventor id, product id, device id, ...etc).

Tried EDL tool(edl.py) available with QFil(Python, [used Linux] CLI no-GUI),

Used following command to format userdata partition,
$ python edl.py --debug --memory ufs --loader ../extracted/prog_firehose_ddr_ufs.elf r userdata userdata.img

The error result was,
No such volume named 'userdata'

***I'm proved to have such secure device(Just lol).
How to remove PIN in mobile with/without wiping whole data?.
If can, How to unlock using FRP method?.
Any methods available without opening device body and without Box?.
Any kind of suggestion, which you can give?.***
I only used these commands in these(above) tools, If you know tool usage or methods or new tools please kindly share to help people and for me too.

the bruteforce part is nonsense, there is a timeout (30 sec) after 10 attempts, increases after 30 attempts up to 1 day from 140 attempts on. but EDL mode is good choice, you should be able to wipe data and frp, all you need is oppo signed firehose programmer for sdm665

@alecxs Thanks, Yeah I know, Also I could not recognize that till opening engineer mode(on OPPO A9 2020). So I'm keep trying since yesterday But it seems to be night mare. It didn't make time delay even after too many attempts only when you are in engineer mode. I have highlighted This above -> *I recognished using emergency call type #899# (Works in Oppo A9 2020) -> manual test -> last title panel (on topbar) write/read log -> It will asks for PIN (safest way to try PINs it won't show timer after certain attempts you can try infinite times using programmable keyboard)

@alecxs I could not get correct sdm665 for oppo. Stock ROM's signature is not working. Does other(OPPO) ROM's signature will work?. Where i can download (without bricking) it?. Thanks in advance.

the qualcomm factory loader (firehose programmer) is independent from ROM, so yes any sdm665 loader will work as long as it is for Oppo (or Realme) device

gatekeeper is limiting timeout on lower level (TEE) so attempts will (silently) fail with(out) warning no matter what mode you try

Thanks @alecxs I will try it. Then let you result.

search for collections like
romprovider.com,
firmware27.com,
leakite.com,
github.com,
tuserhp.com,
firmwarego.com

not sure if that is of any help (haven't downloaded don't know what it is) https://gulzarsps.blogspot.com/2020/05/oppo-a9-2020-cph1937-ufs-full-dump.html

That's(https://gulzarsps.blogspot.com/2020/05) other ROM with changed name :-/. I could not find correct prog firehose UFS for smartdragon 665. latest Qualcomm chips uses dual hash encryption on from qualcomm and another hash signature from Manufacturer(OPPO).

Hi, i think the easiest and the most convenient way would be to pay somebody who has access to the care tools of Oppo. They can flash the device in 5 minutes and you'll be good to go again.


text:
Google Account(and apps) not syncing on my Realme C2(Android 9)
My google account and app data are not syncing on my Realme C2 (Android 9). The data of a few apps like Chrome and Calendar is syncing and showing up when I select my google account under "Accounts and Sync", but the data of other important apps like Gmail, Drive, and Keep is not syncing. The "Sync Now" button is unresponsive.  I tried removing and re-adding the google account, clearing the data and cache of all google apps, uninstalling and reinstalling them, and rebooting the device. But nothing seems to work. Please help me with this.
Thanks a lot!!

The issue was lack of storage. The sync resumed when approximately 2 GB of storage space was available on my device.


text:
Hosting a hotspot without signaling metered connection
Currently, I am running a hotspot from an Android phone as my home network. The cellular plan for this phone has unlimited data.
When I host the hotspot, connected devices detect that this hotspot has a cellular connection behind it, and treats it as a cellular connection. This, for example, limits connected Android phones to not back up photos via Google Photos if the "back up over cellular data" option isn't enabled.
Can I somehow edit the way the hotspot is being run, so that it doesn't signal to connected devices that there is a cellular connection in the background?
The hosting phone is rooted, and I have no trouble using a terminal-based setup (with hostapd or similar)
EDIT:
Additional information:
 raphael:/ # netstat -lntup | grep -E ':53|:67'
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      22525/dnsmasq
tcp        0      0 192.168.166.70:53       0.0.0.0:*               LISTEN      22525/dnsmasq
tcp6       0      0 2a00:801:237:80f8::c:53 :::*                    LISTEN      22525/dnsmasq
tcp6       0      0 ::1:53                  :::*                    LISTEN      22525/dnsmasq
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           17668/mdnsd
udp        0      0 127.0.0.1:53            0.0.0.0:*                           22525/dnsmasq
udp        0      0 192.168.166.70:53       0.0.0.0:*                           22525/dnsmasq
udp        0      0 0.0.0.0:67              0.0.0.0:*                           2243/com.android.networkstack.process
udp6       0      0 :::5353                 :::*                                17668/mdnsd
udp6       0      0 :::5353                 :::*                                17668/mdnsd
udp6       0      0 2a00:801:237:80f8::c:53 :::*                                22525/dnsmasq
udp6       0      0 ::1:53                  :::*                                22525/dnsmasq

raphael:/ # cat /proc/22525/cmdline
/system/bin/dnsmasq--keep-in-foreground--no-resolv--no-poll--dhcp-authoritative--dhcp-option-force=43,ANDROID_METERED--pid

It's because Android's DHCP server sends ANDROID_METERED DHCP option to connected clients. You can set connection unmetered on connected hosts, see screenshot in this answer: https://android.stackexchange.com/a/215528/218526

Thank you! I was looking to implement it from the hotspot side (to avoid having to change every connected device), but this is a step along the way!

Which Androis version your hotspot device is running? If it's Android 9 or earlier you can edit dnsmasq commandline arguments. I can write a bit detailed answer. What does netstat -lntup | grep -E ':53|:67' and pgrep -a dmsmasq return when hotspot is on?

The hotspot phone is running Android 11, so that might be a problem. I edited my original post with output of the commands you wrote.

Unfortunately both commands you have run don't provide the info I'm looking for. Run netstat with root so that last column is not empty. pgrep was supposed to show the running dnsmasq process. Instead you can try cat /proc/$(pgrep dnsmasq)/cmdline. // You can use https://pastebin.com to share command output.

I thought that was the case. I've updated it with more reasonable outputs now. Thanks!

Hmm. dnsmasq is listening on port 53, as DNS server. But on port 67 Android's Java stack is listening as DHCP server, as expected. So it's not a straightforward option to remove ANDROID_METERED option, as we can do with dnsmasq on Android 9 and earlier versions. Still there is a possibility to manipulate DHCP options using third party software like dhcpoptinj. However I've never tried this.

I see. Thanks for the tip about injecting dhcp options, I'll check it out!

Another option is not to use Android's hotspot feature at all. Instead create hotspot from commandline. This answer may help: https://android.stackexchange.com/a/217896/218526

Thanks, I actually saw that post, but my device (running an AOSP-based ROM) didn't have iw and some of the other commands mentioned in the guide.

I've all of the 4 statically built binaries. But I don't think they are missing in any Android release. Android framework itself rely on these binaries under the hood. Check your /system and /vendor in depth.

I did a 'find / -name "iw"' and nothing came up, but maybe its hidden somewhere...

Might be. Exceptions may exist.


text:
How can you remove notification of new Messages chat features
A few updates ago on my Samsung Galaxy S10 added new "chat features from Google" and a notification of this new feature was flagged with the standard "N" icon:

Clicking the N icon brings up the Messages Settings

and clicking on "Chat settings" comes up with

I click on use without chat features and annoyingly the new feature notification N icon stays there.
I now know about the potential new features I don't want so the N icon should be gone.
How do I get that removed without accepting the new chat features?

You can downgrade the application
Download any earlier version of the app from here. Don't download any beta version.. use stable ones.

Wouldn't downloading and installing earlier versions introduce potential security flaws onto the phone?

You can check the changelog of the app if there is any security update but to be honest the earlier version of the app is safe too after all it's made by google. But if you're not happy with it then you can use any other messaging app (which i don't recommend) Tell if you're not satisfied by the answer, I'll delete it.


text:
Can't delete contacts from SIM card
So in an attempt to undo all the [wrong word here] apps do in mixing contacts somehow, I ended up deleting all contacts from the entire phone including the SIM card, to then try to put them back either one by one or from a backup.
Though, I can't delete all contacts from the SIM card! Why is that??? Would anyone know? I could delete around 100 contacts, but I can't delete duplications of the contacts. I started blaming Whatsapp, Google account and another one which is MBWAY which is from a bank. They have contacts of their own or something. So I deleted all the accounts and uninstalled Whatsapp and MBWAY, tried again and no success... Now I installed an app called SIM Card Manager which I got from 4PDA, so I'm trusting it's an app that does the things right. And when I go on it to delete the contacts, it says "Cannot delete contact". Another app I got from Play Store allowed me to "delete", but when I restarted the app, it would show all the contacts I "deleted", so it didn't delete at all. The app from 4PDA at least says it can't. But if it can't and it actually knows it can't delete, I'm wondering VERY MUCH why...
Would anyone know why this happens and how I can delete the contacts?? Or I'll get an old phone which never got me any problems and delete the stuff from there... (if the phone will let me, since I can't here). I'm thinking those apps have to do with this. This never happened to me before. First time in my life I see I can't delete contacts. And I'm supposing it's from Whatsapp because one each contact that the person had Whatsapp, I had 2 duplicates of the original one on the SIM card. And I never asked Whatsapp to even try to do that, but why not......
Thanks in advance for any help on this...

Does your Phone have a system app to deal with SIM? If yes, enter into safe mode and try to delete

Yes, it does. And it seems it's crap, because it shows no numbers on the SIM and I know there are numbers... I know this because before, it wouldn't show copies of numbers and I knew there were numbers there because I have an app of mine reading all contacts and there were contacts there. So I got another app which showed the duplicates, since the official doesn't show... And now the app is saying there are contacts again, even though I can't see them from the official app, only from other apps. What safe mode are you talking about though? I only know of Safe Mode on Windows, not Android.

Oh wait, a system app to deal with the SIM card. What do you mean with that? I think I just confused an app to manage the card with the Contacts app hahaha. You mean a SIM manager? If that's it my bad, didn't get it the first time. It doesn't have any of those.

Oh, they I can't go there in any way hahaha. My dear phone has no screen nor touch glass XD. I control it with voice (an app of my own - which I might even publish), TeamViewer and the amazing Vysor. Interesting to know such thing exists though. Never heard of it. Some phones seem to have it on the Power menu, but mine doesn't. Maybe "too old" (Lollipop 5.1, OnePlus X). Can't go there anyways, so yeah xD. But thanks for the suggestion in any case!

I should have waited a bit more. But maybe this helps someone else with the problem. I had just had to restart, load the app, see it still detected no contacts, leave the app, go on another app, wait a bit, and get back to Contacts app. Then it showed the problematic contacts. And I was able to delete them, only from the Contacts app.
And I think the problem is really from the apps that put duplicates --> Whatsapp, MBWAY, Google account, any other account on the system that synchronizes contacts. It creates duplicates and the phone got everything mixed up. Not sure if it's my fault or those apps' fault in mixing the contacts. I just wanted only the SIM contacts on the entire phone... But no.... The apps have to put the contacts of their own there. Cool. Thanks a lot. Amazing... But at least it's fixed. I deleted all the contacts and put them back one by one. Now I'll install the apps back and put my account and see what happens...


text:
Reading battery level/voltage via USB port
I'm interested in creating a device that needs to externally monitor the battery level or voltage of the phone via the USB port. I haven't had much experience with the inner workings of Android, but I do know that apps have access to the battery manager, but I'm wondering if, during charging, is it possible to obtain data (at least the voltage reading) about the battery via USB without having to install/create an app that reads and sends the data?

Hardware that is connected between the charging adapter and device is perhaps the only way of you don't want an app. Such hardware is available, though I haven't used it

Via adb you should be able to query the battery data: See this for details: https://stackoverflow.com/questions/42274720/is-it-possible-to-query-device-state-ie-battery-charge-remaining-via-adb-shel


text:
Accessing a phone after factory resetting it with adb
I have a smartphone running Android 6.0.1. The screen is broken and unresponsive so I control the phone using adb and scrcpy, but to run adb I had to turn on "USB debugging" from "Developer options". I want to know that whether after factory resetting(using adb) will I still be able to access the phone with adb? Since the "USB debugging" option would get turned off after a factory reset, would I still be able to access the phone using adb?

i think you gave the answer in your question already. what you can do is permantly enable adb (and disable the RSA authorization) by flashing modified boot or system, that will survive factory reset. depending on device there are several flash methods. unlocked bootloader is required for flashing via fastboot, therefore the more important you should enable OEM unlocking in developer options (if available) as long as you still have access via scrcpy

https://android.stackexchange.com/q/213116

You won't have USB debugguing after a factory reset.
Perhaps you could tweak a custom rom to do so, i never tryed myself, but ie TWRP recovery have adb enabled by default.


text:
How to hide your SSID from apps / keep your Android apps from finding your Wifi SSID?
As far as I know, all android apps are able to scan nearby / available Wifi networks. They can either get a list of nearby SSIDs, or at least they can get the SSID of the Wifi you are currently on. Correct? I remember the "get wifi scan results" unrevokable permission from some time ago (stoppable only if you were rooted and had xposed framework) (Also, exhibit B: Google, SkyHook, and Apple SSID databases).
This means that even if you are on a VPN, even if you turn off wifi scanning, even if you turn off location services and take out your sim card, even if you stop broadcasting your router's wifi SSID, your apps will be able to know what wifi SSID you are currently on.
This means that an attacker (read: the surveillance capitalism :) ), can figure out if/when I am home, and which other devices that are/were online have used the same SSID. E.g. all my family's (mandatory) banking apps will know where my family members congregate, and could change my insurance score, or other "insert dystopian scenario here".
Considering what I described, I don't think there is any wiggle room for you to ever hide your real location from a bad (state, corp, hacker) actor. Am I wrong? Can I hide my SSID from the apps that are on my phone?
I can't believe there aren't any hits on this subject on the internet.
(PS: obviously, the point of the question is not whether or not I am paranoid, the question is whether this is technically solvable)

[EDIT] To be clear, I haven't technically analyzed recent Android versions, but my question is about the most recent Android versions, as those are the versions everyone's obviously moving forward with. E.g. Android 10, Android 11.
[EDIT2] Would also be interested if iOS offers better privacy / protection in this regard. I created a sister question on "Ask Different", and spoiler alert: APPLE DOES NOT HAVE THIS PROBLEM. (as much as I hate apple's UX and lack of customizability and user control, at least rogue apps don't get that control either)

Wifi scanning has been changed a lot in recent Android versions. Therefore please update your question and include the info about which Android version you are talking about.

Hi, for iOS-related questions, we have a sister site [apple.se] for Apple products. We, as mostly are Android users (regardless of using other OS), might not have sufficient knowledge to answer that question.

I've been living under a bit of a rock, but with a bit of research on my own, seems at least theoretically, starting with Android 8.1, apps should not get SSID info (and I guess also MAC addresses and bluetooth) if you don't grant them Location Permission. Apple does not bundle location permissions with ssid/network permissions. The trouble being that e.g. banking apps kinda "require" some of the things under the blanket "Location" permission.


text:
Which Virtual machine is used in Android 11?
Every Android application runs in a virtual machine. We know that Dalvik virtual machine \was the one that is used by Android.  Next, they changed to ART (Android Runtime machine). Just correct me if I am wrong. Android 11 uses which virtual machine, Dalvik or ART?

ART replaced Dalvik in Android 5. Dalvik VM is no more used.

Android 11 uses ART.  Android 4.x KitKat were the last Android releases to use Dalvik.

@Mdshammi111 You're welcome.  Glad to help.  BTW, Wikipedia has good articles on both Dalvik and ART, and the transition from one to the other.

Can u suggest to me some textbooks regarding the android source?

I'm sorry, but I do not currently know of any.  The source is available online, but I'm not aware of any textbooks that walk you through it.  Perhaps someone else will know of one.


text:
htc u12+ flashing twrp, stuck booting
I've been trying to root my HTC U12+, and I've been stuck trying to boot twrp onto my phone through adb commands.
.\fastboot boot twrp.img
Sending 'boot.img' (32424 KB)                      OKAY [  2.006s]
Booting

This is what I'm stuck on, my phone screen says "flash images success 1/1)" When I know it's more than one step.
I've got all the drivers, correct adb files, and correct twrp disc images. I rooted my brother's U11 using the same process, with the U11's files.

The command you have posted should not flash anything. Just boot into TWRP. What happens exactly on your phone after executing fastboot boot twrp.img?

The above cmd should work. ask in support thread. in case fastboot boot is disabled for some reason, try this trick: 1) get current boot slot 2) flash twrp.img into boot partition (other slot) 3) switch slots + reboot 4) restore boot partition (you can mirror slots with dd via terminal) 5) install TWRP via twrp.zip into both slots (recovery ramdisk in boot) or via the "Install Recovery Ramdisk" option 6) switch slots back + reboot Note: you may lose root

So I've figured out, I needed a different command. I looked a bit longer, and found that .\fastboot flash recovery twrp.img actually runs it and gives feedback. my new issue is getting the "23 RU _READ_PARTITION_FAIL read/open partition fail".
it's on the latest twrp img, that's dated on december 2020.

what don't you understand in "read/open partition fail"? please read the installation instructions according to your device (linked above). 'fastboot flash recovery twrp.img' won't work because there is no recovery partition at all (as mentioned in installation instructions)

My reply from the XDA support thread was already posted here, however I will formally reply now that if you're seeing "flash images success (1/1)", then you're in Download mode. In order for the "fastboot boot" command to work, you have to be in Bootloader. There is an option to "reboot to bootloader" from the main Download mode screen. Choose that option, and then you will be in the correct mode to use the "fastboot boot" command.
You mentioned U11, however the difference with that device is that it has a recovery partition (U12+ does not), and thus the install method for it is to flash the image, not boot it. If you wanted to fastboot boot a recovery image on U11, you likewise would need to be in Bootloader mode.

so fastboot ins running in two different modes? by any chance you are refering to hboot? do i understand this correct this is something htc special? https://android.stackexchange.com/questions/13440/what-is-the-difference-between-fastboot-and-hboot-mode

Yes, fastboot works both in Download and Bootloader mode. HBOOT is something else, and is only on older HTC devices. HBOOT stands for "Htc BOOTloader".


text:
Clean LineageOS 17.1 install and empty device - can't work out how to mount data partition in TWRP?
I'm installing LineageOS 17.1 on my new phone. It works fine, but I can't get to data in TWRP.
As usual, to install, I wipe everything, drop into TWRP, format (not just wipe) data, wipe cache/davlik/system, and flash the LineageOS installer file. When the system starts first time, it gives a message "encrypting data", which doesn't have a "skip" option.
When I drop back into TWRP it asks for a decryption password to access data, but I don't have one because I haven't entered one in the first place.
How do I get LOS to not encrypt data, or alternatively, what decryption password should I use in TWRP?
Note: this isn't a duplicate question. Other questions about decrypting data involve corrupt data or system issues that prevent data being accessed because of encryption, or trying to recover files from data. In my case, it's a clean install with no prior data content, but I can't figure how to access data in TWRP because it seem to encrypt it automatically but there's no hint what key to enter in TWRP.

Please specify exactly what device model you are talking about. Have you followed the installation instructions on the device specific page on LineageOS web page?

Samsung encryption is generally not supported in TWRP https://forum.xda-developers.com/t/sm-g935-exynos-cf-auto-root.3337354/post-72204306

S9+ Exynos (international) model. Yes, followed install instructions, experienced . Samsung encryption isnt involved, this is pure LineageOS stuff.

Apparently it's related to Android 10 requiring data to be encrypted if the device is up to it. So LineageOS 17.1 does so, and doesn't offer a choice on the matter, there's no "skip" option. But it doesn't provide an option later, to set a password, or turn encryption off, it leaves the device with a forced-encrypted data and no password told to me, which prevents any back up or terminal use, in TWRP.  Obviously I'm supposed to know the password as its my device. Hence the question.

Does this answer your question? Cryptfs : Unexpected value for crypto key location

@alecxs - manually editing /vendor/etc/fstab* was perfect. Do you want to write up your comments as an answer? I'm a bit stunned that LOS would insist on encrypting a partition in a scenario where the user is never given (or able to set) the key, if they configure the lock screen in some ways.

First let's have a look why it is not (yet) possible to mount encrypted userdata partition from TWRP especially on Samsung devices.
Encryption is hardware-backed in TEE and therefore vendor specific. Furthermore ...

... some vendors such as Samsung use their own encryption techniques. Without heavy deconstruction/decompiling of custom library blobs, and successful ports by an active maintainer, this may never be done.

TWRP FAQ
sandy framework DerbyCon 3.0

Decryption involves the underlaying firmware. It requires to mount various partitions and running libraries for communication with (TEE) Trusted Execution Environment.

Azeria TrustZone Research

For Qualcomm devices it is necessary to run qseecomd, for Exynos devices the Trustonic Kinibi daemon. In this example the modem partition is mounted with mounttodecrypt flag (qualcomm)
/firmware   vfat   /dev/block/bootdevice/by-name/modem   flags=slotselect;display="Firmware";mounttodecrypt;fsflags=ro

As we can see on this list of libraries also the vendor partition is mounted. This is also OEM specific content used by LineageOS and not included in TWRP by default. Some recent TWRP builds have it, most builds are designed to use the firmware. However no Samsung devices known. This example is from another qualcomm device not for Samsung:
/firmware/image/cmnlib.b00
/firmware/image/cmnlib.b01
/firmware/image/cmnlib.b02
/firmware/image/cmnlib.b03
/firmware/image/cmnlib.mdt
/firmware/image/keymaste.b00
/firmware/image/keymaste.b01
/firmware/image/keymaste.b02
/firmware/image/keymaste.b03
/firmware/image/keymaste.mdt
/system/bin/linker64
/system/bin/qseecomd
/system/lib64/hw/keystore.qcom.so
/system/lib64/libbacktrace.so
/system/lib64/libbinder.so
/system/lib64/libcnefeatureconfig.so
/system/lib64/libc.so
/system/lib64/libcutils.so
/system/lib64/libEGL.so
/system/lib64/libgccdemangle.so
/system/lib64/libGLES_trace.so
/system/lib64/libGLESv2.so
/system/lib64/libgui.so
/system/lib64/libhardware.so
/system/lib64/liblog.so
/system/lib64/libm.so
/system/lib64/libnetd_client.so
/system/lib64/libsigchain.so
/system/lib64/libstdc++.so
/system/lib64/libstlport.so
/system/lib64/libsync.so
/system/lib64/libui.so
/system/lib64/libunwind-ptrace.so
/system/lib64/libunwind.so
/system/lib64/libutils.so
/system/vendor/lib64/libdiag.so
/system/vendor/lib64/libdrmfs.so
/system/vendor/lib64/libdrmtime.so
/system/vendor/lib64/libNimsWrap.so
/system/vendor/lib64/libQSEEComAPI.so
/system/vendor/lib64/librpmb.so
/system/vendor/lib64/lib-sec-disp.so
/system/vendor/lib64/libsecureui.so
/system/vendor/lib64/libsecureui_svcsock.so
/system/vendor/lib64/libssd.so
/system/vendor/lib64/libStDrvInt.so
/system/vendor/lib64/libtime_genoff.so
/system/vendor/lib64/libvendorconn.so

TeamWin github oneplus2

Now, as we know there is a lot of research to make decryption working, it's obviously TWRP maintainers are desperate overhelmed with providing encryption support for all devices. Therefore decryption is always only a goody, heavily depending on maintainers knowledge and engagement.
That might one reason why android modding scene prefer to run custom ROMs unencrypted

Encryption is forced since Android 5.0 with forceencrypt= flag in fstab (FDE) or fileencryption= (FBE)

source.android.com Full-Disk Encryption

The flags encryptable= forceencrypt= and forcefdeorfbe= are always pointing to crypto footer. Therefore they are interchangeable.

android.googlesource.com fs_mgr_fstab.cpp

To disable force encryption (FDE) use the first flag. Edit your fstab entry for userdata partition and replace forceencrypt= with encryptable=
/dev/block/platform/11120000.ufs/by-name/USERDATA   /data   ext4   noatime,nosuid,nodev,discard,errors=panic   wait,check,encryptable=footer,length=-20480,reservedsize=128M

This can be done from TWRP by installing no-verity-opt-encrypt-6.1.zip

no-verity-opt-encrypt-6.1.zip (FDE)

The benefit of having force encryption disabled while keeping the availability for encryption is in the nature of Direct Boot vs Secure Start. Upon first boot, the device creates a randomly generated 128-bit master key and then hashes it with a password and stored salt. The resultant hash is also signed through TEE (such as TrustZone), which uses hash of the signature to encrypt the master key. There are four kinds of encryption states:

default
PIN
password
pattern

On Direct Boot the former one is forced with 'default_password', indeed that's how most android devices still encrypted. (TWRP always probes against 'default_password' and only asking for password if decryption failes.)
If you choose Secure Start from security menu the keystore password is re-created using your current lock screen credentials. downside of this encryption state android won't boot until correct passphrase is entered.

To overcome this the benefits of Secure Start with Direct Boot was merged in (FBE) File-Based Encryption, which was introduced with Android 7.0 and enforced for devices shipped with Android 10+
Be aware there is no way to disable enforcement of (FBE) File-Based Encryption. Therefore the only method left is to disable encryption completely by deleting the fileencryption= flag from fstab (with no proper replacement). Indeed that is how Magisk does currently when flashed from TWRP.
Universal DM-Verity ForceEncrypt Disk Quota Disabler will disable encryption completely

Universal DM-Verity ForceEncrypt Disk Quota Disabler (FBE)

The only* way to decrypt existing data on Samsung devices is boot into android.
(*there exist investigations to break encryption, however not for Samsung encryption)

Recovering the master key from RAM

If your goal is data recovery from encrypted Samsung device TWRP is not the way to go.

manually editing /vendor/etc/fstab* was perfect


text:
How reliable are waterproof phones?
I want to have a waterproof phone that I can realiably wear when I am windsurfing.
During a session it might get wet and might sink for a few centimeters for a couple of seconds from time to time.
I bought a refurbished Huawei P20 Pro for the purpose, IP67 waterproof.
I had watched videos on Youtube where it would be under 1.5 meters water for 15 minutes and still be working fine.
After a short session on the water with this phone, where it got wet but never sunk, the next day the phone was dead forever with water damage.
I imagined that, being refurbished, it might have been hacked by the previous owner.
I got my money back and bought the same phone again, also refurbished.
This one was really new, in the box with all the gadgets.
I took it on a session, this time in a cheap "waterproof" pocket.
At the end of the session, there was some moist in the pocket.
Next day the phone was dead forever. Again.
Was this hacked too? I don't think so.
I got my money back and bought a refurbished Samsung S9, which is waterproof IP68.
Now. I am not going to bring it with me on the water until I am sure it will survive.
I could buy a IP68 protection for it but wouldn't it be overkill and actually nonsense (IP68 + IP68 = IP68) and maybe still let water in?
Are these videos on Youtube realistic?
Maybe 10 minutes after the video the phone becomes useless.
Are the IP67 and IP68 certifications reliable for general public phones?
I am sure they are when it concerns professional equipment.
Thanks for your thoughts

Note that all water-resistant/waterproof specifications are for as far as I defined know tap water only. Salty sea water or chlorined pool water is never considered as "water" in the IPxy specifications (because of the additional damage caused by salt/chlorine).

@Robert good point. My sessions are in freshwate but  I should buy a waterproof pocket anyway.

buy a cheap rugged phone

I have a fair amount of experience using and testing IP68 waterpoof phones.  Here are my experiences.
I personally have had quite a bit of success with them in several different types of environments.  When getting a new one, here's what I do before I put any data on it:

I charge it up and turn it on.  I make sure it works before testing.
I set the display to go off after 5 minutes.  I set an alarm with both sound and the buzzer to go on in 10 minutes.  This will ensure the speaker and buzzer work underwater, and will also provide a little agitation.
With the device turned on, I place it in a tall glass of fresh water for 30 minutes.  I want the glass to be tall to increase the water pressure.  A flower vase works well.  The device's display will shut off after 5 minutes, as expected.
With the device still wet, I turn it back on, and test it.  The speakers may temporarily sound horrible; I find this to be normal on some models.
Now, I place it under a water faucet turned up to a flow rate in which I would wash my hands.  I wash it under that pressure at all angles for several minutes and at various non-extreme temperatures.
Repeat step 4.
I let it sit overnight.
Repeat step 4.
I place it in the bottom of a tub as deep as I can, but within the manufacturer's specifications.  I try to agitate it as much as reasonably possible, often using a long stick or with a long piece of string or dental floss attached.  Then I let it sit in the water up to the duration specified by the manufacturer.
Repeat step 4.
I dry it with a cloth and vigorously shake it to remove some of the water within ports.
Repeat step 4.

I have yet to test a device that hasn't survived these basic tests.
At this point, I repeat the above steps with the type and temperature of water to which it will be exposed during real-world use.  I do this knowing that it may invalidate a weak warranty by a manufacturer that does not have confidence in their products.
I have only found a few minor downsides to waterproof devices:

Often, after being wet, the speakers sound really bad.  I typically have to wait for them to dry completely.  If I need good quality audio before then, I'll play loud music to use the air pressure created by the sound waves to help extricate the water.
Charging and data transfer are often risky/impossible until the device is completely dry.  Depending on environmental factors, this may take anywhere from 30 minutes to 12+ hours.  I've learned not to plug it in for as long as possible after being wet, to reduce fire risk or shorting a circuit.  When I do finally plug it in, I keep an eye on it, and I don't let it charge unless someone can supervise it (and therefore cannot be asleep).  I've learned to not attempt any data transfer via cable for at least a day, if I can wait.
Any ports are the hardest thing to get dry.  I haven't tried them yet, but I'm researching buying some little rubber port covers to hopefully help with this issue.  I am concerned that they will all fall out and get lost on the fist use.
It's often hard to find waterproof phones with easily replaceable batteries and microSD slots.
Repairs can be harder to perform yourself or more expensive for a technician to perform.

I have spoken to repair shops who state that they get waterproof devices that weren't nearly as waterproof as the manufacturer claimed.  Because of this warning, I tend not to intentionally push the limits of the waterproofness once the device has data on it.  Remember that increasing water pressure due to turbulence is similar to increasing water pressure due to depth.
If I'm going to be in extreme conditions, I place my waterproof phone inside a clear waterproof bag (which also has a rugged lanyard, which I have reinforced).
Overall, I highly recommend waterproof devices.  Just test them well before use, and make sure you backup your data frequently.  As we say in rock climbing, "never climb higher than you are willing to fall".
If you do have to return a device due to a waterproofing failure, please do your best to ensure the manufacturer doesn't just offload it to a refurbisher who will then sell it to an unsuspecting person who will not be aware of the device's previous failures.  No one wants that to happen to them, so let's work together to make sure it doesn't happen to others.

Thank you for you thorough answer. Were all the phones IP68? From your answer I understand that you would wait for the wet phone to get dry before starting to use all of its functionalities again. So I should probably not let my phone get wet intentionally. Did you test a S9?

@qwlice You're welcome.  Yes, all were IP68.  I use the phones when wet, except for making physical electric or data connections.  Also, the speaker(s) may not work well when wet, but I find it actually helps to use them when after being wet to eliminate some of the moisture (point speakers down to let gravity assist).  I have never tested an S9, but I'm considering purchasing one.  My experiences with Samsung support & warranty service have been exceptionally poor (surprisingly bad, and very time consuming), but if the phone works well, support or service would hopefully not be needed.


text:
Remove WhatsApp images from OneDrive Photo library
I'm trying to remove WhatsApp clutter from my private photos folder on OneDrive. I'm using OneDrive on Android and it seems it is being used as the backup target for WhatsApp and Viber.
I really need a suggestion on how to remove the whole WhatsApp lot from the OneDrive and stop syncing new ones.
If there is an API and a WhatsApp tag of some sort, I'm open to creating a shared script on github.

Can OneDrive stop syncing certain folders? WhatsApp images are located in /sdcard/Media/WhatsApp Images

I'm trying to remove all Whatsapp Images already synced to OneDrive.


text:
Sharing image makes phone very unstable
I think that Motorola One can be considered a quite powerful phone with its octa-core 2.0 GHz Snapdragon 625 and 3 GB or RAM. It also produces a fairly small images of 4160x3120 pixels and approx. 3-5 MB in size. Based on that specs, I'd say that sharing image should be an instant experience.
Yet, in fact, it is a nightmare in my case:

attaching single image to Gmail (to share it via email) takes 20-30 seconds, sometimes more and often hangs Gmail itself for a moment (i.e. I can write an address or message content during adding of image) or permanently,
attaching image to Messages app (to share it via MMS message) takes 30-50 seconds or even more, often hangs Messages app and on a few rare occasions hanged entire phone.

Is there anything I can do about this except for uninstalling Gmail and Google Messages and start using another email and messages app?
BTW: We could say that my slow network (which is not slow) can be considered as a contributing factor in case of Gmail. But could it also explain MMS experience? Which has nearly nothing to do about data transfer over Internet during MMS message creation?

When you send the image via GMail does the recipient get the original image or ist it somehow processed (resized recompressed,...)?

Does this happen with all source apps or only some apps? I remember Wikipedia app needed to download the image first before sharing to other apps (including uploading the image again on Gmail case).

@Robert No, neither I (sender) see any dialog asking me to resize image prior to sending it nor the recipient gets it modified. It is 1:1 / 100% exactly the same image as captured by my camera. There's no processing AFAIK.

@AndrewT. I cannot answer you this question directly, because I am using orignal (stock) Messages app and Gmail on all brands and kinds of Motorolas that I've been using for years. However, I am pretty sure that this has nothing to do with downloading or network speed, because I have it quite fast. For example yesterday I managed to download and install two huge game updates (approx. 1 GB each) in just a few minutes. I have a stable approx. 30-50 Mbps upstream and downstream so downloading or uploading these images during share shouldn't be a problem.

@trejder Why don't you just send an image top yourself and compare the files? That would be the easiest way to determine if the image is processed.

@Robert Seems my comment is confusing to you, sorry for that. These images are 100% the same. I am sending them via email to myself only. And I am doing so only when I am too busy (or too lazy) to do this via cable. But I am sure that there is no processing and image is changed in no way. So, it lands on my PC exactly the same, no matter, if I use Gmail or USB cable.

you could try if other app will make a difference (i personally prefer mail.ru for sending pictures as attachments, no size limit)