text:
How to properly ENABLE dm-verity and FEC for /system on Motorola X4 with LineageOS 17.1?
I have built LineageOS 17.1 for Motorola X4 / payton with unlocked bootloader with reverted commit 81cc203c06596878d2beb62ab6e07f36e278018e.
The common question is how to disable dm-verity, but I want to know how to properly enable it for /system . The vendor partition is called oem on Motorola.
AVB was deactivated (the device is missing fastboot flash avb_custom_key but has a vbmeta_a/b partition?)
During build these options were set:
PRODUCT_SUPPORTS_BOOT_SIGNER := true
PRODUCT_SUPPORTS_VERITY := true
PRODUCT_SUPPORTS_VERITY_FEC := true

I checked system.img and vendor.img with verity_verifier script and the verity_key and it outputs VERIFIED.
I flashed boot, vendor and system to the corresponding partitions. /verity_key is inside the boot.img. The boot cmdline contains androidboot.veritymode=eio and veritykeyid=id:47b1fe9xxxxxx. The boot.img only contains recovery.fstab, verify option is set there, too. adb enable-verity is succesful for / and for /vendor. /vendor/etc/fstab.qcom contains the verify option for system and vendor partition.
The following obversations were made:

During boot I see a message "Verity mode is set to disable". What is this referring to?
Modifiying data (touch test) on the vendor/oem partition from Lineage Recovery results in the errors being corrected by FEC, messages shown from dmesg after next boot:

[    3.023786] init: [libfs_mgr]Enabling dm-verity for vendor (mode 0)
[    3.175842] device-mapper: verity-fec: 259:31: FEC 0: corrected 21 errors
[    3.257369] device-mapper: verity-fec: 259:31: FEC 4096: corrected 17 errors
[...]

The created file test vanishes after boot.

Modifying data on the system partition from Lineage Recovery is not corrected by FEC and no messages show up. The created file test is visible on the partition after next boot.
There is no difference between locked and unlocked bootloader (fastboot flash lock).

What am I missing here?

@alecxs see last paragraph of https://android.stackexchange.com/a/218886/218526

Warning! Use at your own risk!
The sense and especially added security of all of this may be disputed. Find some notes about security in the end.
tl;dr:
It took me some days to find a solution to get this:
[    2.251328] init: init first stage started!
[    2.251561] init: Switching root to '/first_stage_ramdisk'
[    2.252614] init: Using Android DT directory /proc/device-tree/firmware/android/
[    2.603025] init: [libfs_mgr]Enabling dm-verity for system (mode 0)
[    2.603181] init: [libfs_mgr]Verity table: updated block device from '/dev/block/platform/soc/c0c4000.sdhci/by-name/system' to '/dev/block/platform/soc/c0c4000.sdhci/by-name/system_b'
[    2.603195] init: [libfs_mgr]Verity table: updated block device from '/dev/block/platform/soc/c0c4000.sdhci/by-name/system' to '/dev/block/platform/soc/c0c4000.sdhci/by-name/system_b'
[    2.753873] device-mapper: verity-fec: 259:33: FEC 0: corrected 22 errors
[    2.830804] device-mapper: verity-fec: 259:33: FEC 4096: corrected 7 errors
[    2.831080] init: [libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/dm-0
[    2.854916] device-mapper: verity-fec: 259:33: FEC 0: corrected 22 errors
[    2.878336] device-mapper: verity-fec: 259:33: FEC 4096: corrected 7 errors
[    3.001281] device-mapper: verity-fec: 259:33: FEC 1052672: corrected 18 errors
[    3.001825] EXT4-fs (dm-0): mounted filesystem without journal. Opts: barrier=1
[    3.001947] init: [libfs_mgr]__mount(source=/dev/block/dm-0,target=/system,type=ext4)=0: Success
[    3.002215] init: Switching root to '/system'
[    3.139199] device-mapper: verity-fec: 259:33: FEC 3133440: corrected 12 errors
[    3.272389] init: [libfs_mgr]Enabling dm-verity for vendor (mode 0)
[    3.272662] init: [libfs_mgr]Verity table: updated block device from '/dev/block/platform/soc/c0c4000.sdhci/by-name/oem' to '/dev/block/platform/soc/c0c4000.sdhci/by-name/oem_b'
[    3.272679] init: [libfs_mgr]Verity table: updated block device from '/dev/block/platform/soc/c0c4000.sdhci/by-name/oem' to '/dev/block/platform/soc/c0c4000.sdhci/by-name/oem_b'
[    3.276744] init: [libfs_mgr]superblock s_max_mnt_count:65535,/dev/block/dm-1
[    3.279830] EXT4-fs (dm-1): mounting with "discard" option, but the device does not support discard
[    3.279845] EXT4-fs (dm-1): mounted filesystem without journal. Opts: barrier=1,discard
[    3.279935] init: [libfs_mgr]__mount(source=/dev/block/dm-1,target=/vendor,type=ext4)=0: Success

Build LOS 17.1 with the reverted commit from the initial question

Place verity_key in ramdisk/first_stage_ramdisk folder

Append the following cmdline options, this is the android testing key:
BOARD_KERNEL_CMDLINE += root=/dev/dm-0 dm=\"system none ro,0 1 android-verity Android:\#7e4333f9bba00adfe0ede979e28ed1920492b40f /dev/block/by-name/system_b\" androidboot.slot_suffix=_b rootwait androidboot.force_normal_boot=1

Add system partition to the DTB fstab and include verify option

There are more caveats here than I thought. I will also try to include all words I was searching for in this text.
Key findings regarding booting and dm-verity about the payton

It seems to be a legacy SAR (system-as-root) device (most important read!). The kernel mounts the root/system filesystem itself, no ramdisk or ramdisk partition involved. Typical cmdline arguments for the kernel are root=/dev/block/mmcblk0p6x, where x is 5 or 6 for the system A/B partition and init=/init.
The original motorola files do not contain a fstab in the ramdisk
There is no system partition defined in the DTB in the motorola files
Therefore the bootloader seems to verify the boot image, most likely with some certificates baked into the bootloader? (strings -a on the bootloader hints at this). Then it sets the appropriate start partition and maybe the command line for verity verification, more on this later.
vendor is called oem on motorola.
Like mentioned the payton is missing fastboot flash avb_custom_key, so no new shiny Android Verified Boot (AVB) 2.0 with vbmeta.img. Most likely because it was initially shipped with Android 7.0 and nobody cared updating the structures.

Some things about building LineageOS 17.1

Build LOS like written in their help
LOS seems to also boot legacy SAR, except when you enter recovery mode.
Using the instructions below will give you something like Android Verified Boot 1.0
The build process prepares the following things for dm-verity integration: Creating boot.img, system.img and vendor.img, adds dm-verity metadata to the end of system.img and vendor.img and signs boot.img. vendor is verified in the default LOS configuration by adding it to fstab and additionally creating a DTB fstab entry for it.

The general build process

Codebase is impressively huge: 190 GB without ccache

Revert the mentioned commit in dm-android-verity.c

Use the following Kernel cmdline.

This circumevenes A/B and slotselect mechanism for selecting the proper system_a or system_b. Without bootloader support I do not know if it is possible to ever reenable A/B.

Also this configuration always skips recovery, even if you try to boot to recovery from bootloader.

This did not work with androidboot.veritykeyid, I do not know why (yet).

You have to escape " and # here!

device/motorola/sdm660-common/BoardConfigCommon.mk:
BOARD_KERNEL_CMDLINE += root=/dev/dm-0 rootwait
BOARD_KERNEL_CMDLINE += dm=\"system none ro,0 1 android-verity Android:\#7e4333f9bba00adfe0ede979e28ed1920492b40f
/dev/block/by-name/system_b\"
BOARD_KERNEL_CMDLINE += androidboot.slot_suffix=_b
BOARD_KERNEL_CMDLINE += androidboot.force_normal_boot=1
BOARD_BUILD_SYSTEM_ROOT_IMAGE := false

without force_normal_boot a "normal" boot goes to recovery.

kernel/motorola/msm8998/arch/arm/boot/dts/qcom/sdm630.dtsi:
system {
compatible = "android,system";
dev = "/dev/block/platform/soc/c0c4000.sdhci/by-name/system";
type = "ext4";
mnt_flags = "ro,barrier=1";
fsmgr_flags = "wait,verify,slotselect"; };

Maybe you can also leave out the DTB change (mounting partitions with DTB will be obsolete in Android 11) and use a fstab file (somewhere, maybe in first_stage_ramdisk).

make sure verity is enabled in ./make/target/product/verity.mk

PRODUCT_SUPPORTS_BOOT_SIGNER := true
PRODUCT_SUPPORTS_VERITY := true
PRODUCT_SUPPORTS_VERITY_FEC := true

When changing the verity key, do not forget to add it to the kernel in kernel/motorola/msm8998/certs and check the certificates in the running system in /proc/keys
You can get the last (failed) boot messages in /sys/fs/pstore/console-ramoops
The resulting system behaves like 2SI ramdisk SAR

Main Question: Does this add security to the device?

You can lock the bootloader afterwards with fastboot flashing lock
The boot partition has to be verified manually with the key ids shown while booting (at least I think it is some signatures of the signed boot.img)
Flashing partitions from bootloader does not work
Entering recovery also does not work
fastboot boot file.img gives an error
fastboot flashing unlock clears userdata, this is good!
In case anything goes wrong with the running system, you have to clear your device.
Updating just got a little bit harder without changes to the updater because the A/B partition is hardcoded
Root needs to be enabled for updates (at least ADB root), so this will stay a userdebug build.
Changes to /system can be executed without messing the dm-verity, just sign the changed system.
dm-verity is in eio mode here, I actually did not try to set it to enforcing.

Open questions

Can you change the kernel cmdline from bootloader?
Maybe you can blankflash (fastboot oem blankflash) the device, I do not know what happens in this case.

Have fun!


text:
For video playback from cloud, would a properly written native mobile app be faster than a web app run on Android?
I want to develop a backend cloud service that delivers full color compressed videos (as high def as possible) to Android smart phones for streaming playback. Would I get better playback if I properly develop a native mobile app or if I simply use the browser, maybe with some scripting, to access and play the video? I want the highest bandwidth playback I can get. Thanks!

Video quality is determined by the used codec (plus the used options) and of the bitrate. Codecs should be implemented in hardware for efficiency reasons which limits the available codecs. I am not sure if in a web browser all codecs are available. If not this would be an advantage of the app. But this means of course that you have influence on the server side to decide which codec and bitrate to use. If you only can change the client side there is not much choice.

You might want to compare existing services like YouTube and other video sharing platforms which provide web app and mobile app.

source: Stack Exchange

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

sort: votes


text:
What privacy sensitive metadata does an APK package contain?
What information possibly sensitive information is included in apk files?
The obvious metadata are of course the fields in the signing certificate. But what about (absolute) file paths, user names used on the machine where the apk was built and similar information?

APK files usually don't contain much of that data unless the developer explicitly has added them or used unusual third party programs to edit resources contained in the app e.g. images. You can simply check that by unzipping an APK file ready to be released. Use full text search tools on all unzipped files and search for data you consider sensitive.
If you want to minimize unnecessary data I would recommend to use a virtual machine with e.g. a minimal Linux installation you where the installation itself does not contain any sensitive data. As Android apps can be built easily using Gradle on command-line you don't even need a UI. Use it to build the final APK file and copy it to the host OS.
Examine the created file as described at the beginning and if you don't find anything it is ready for release.

I already looked a bit around, but I am not sure about the details. For example, it is easy not to see that tar stores usernames when you untar as a regular user, and the ownership is set to your own username anyway. Similarly, I wonder if apk may have some metadata that one may not expect. I guess using a virtual machine is the best solution to be absolutely sure, but still, it is interesting what metadata may be present in apk files.

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


text:
Viewing files on Android phone from computer, only showing DCIM and Pictures folders, in internal shared storage
I have phones running Android..
When I connect either one to my computer, and click "internal shared storage", I only see DCIM and Pictures..
But if I go to any decent file manager app on the phone then it shows far more folders within "internal shared storage" e.g. Download, and other folders.
One of my phones, comes with what looks like a nice app for backing up, and it creates a folder with the backup, and I want to copy that folder to my computer. But I cant see how to access that folder to copy it onto my computer!
I'd be a little bit surprised if this is a situation where the phone has to be rooted to do it.. I do plan to, but this is an app that the phone comes with. So some may backup the phone before unlocking the bootloader.

Please read this question and answer for details why not all files and folder are visible at the moment from the PC https://android.stackexchange.com/questions/202728/why-my-dcim-folder-is-empty-seen-in-the-computer-but-not-empty-in-the-phone

so in this video https://www.youtube.com/watch?v=GitMOYdsA9I  where he shows here https://i.imgur.com/9gou0yT.png  windows explorer showing lots more folders than just DCIM and Pictures, he must have run a command like that suggested at your link to do it?

I've just tried on Nexus 5 (Lineage OS 14.1, Android 7.1.2), looks like the USB connection mode was set to Transfer Photos (PTP) and thus only showing DCIM and Pictures? Can you try Transfer Files (MTP) mode to show more folders?

@AndrewT. Thanks, I think you're right.. my Moto phone doesn't have an MTP option but it has a "file transfer" option which is probably the same thing, and that shows all more folders.  My oneplus phone has some strange issue that this guy seems to face https://forums.oneplus.com/threads/usb-file-transfer-not-working.1054546/ where you choose file transfer and double click the thing and it shows nothing at all

If file transfer mode is screwed on your device you can still use adb to pull files from your device via comand-line. Just enable developer options on your device and adb. On PC side install Android SDK or minimal ADB environment.


text:
Screen unlock pattern fails
After a system crash, it black screen and reboots, i am unable to unlock using a pattern, it is correct but is not recognised. I don't want to exceed the retry limit as things get more complicated...
How to fix it?
I'm stuck with android 6.0.1 on a galaxy j7 2015.

This happened 2 times already. I just had to calm down and think: the reboot was forced, in a non safe way. So something went wrong.
To solve it, i just did another, but normal reboot, and it fixed itself.


text:
Permanent ADB RSA-key authorization
My phone screen is broken but I managed to finally tap the allow button for ADB authorization so I can access the device via ADB.
My question:
Is there a way to do this once and never be asked again or backup the RSA which I can then push to the device via ADB if it happens to need re-authorization again (since I have a broken screen I just can't tap allow again).
I have enabled do not ask again on this device, but that does not seem to work from past experience and it keeps asking me to authorize if I reboot the phone.

Does this answer your question? "Allow USB debugging" keeps on popping evene when "Always allow from this computer" is checked in automation testing

Does this answer your question? Android ADB Key Not Working

@alecxs But scrcpy depends on adb for uploading the file that is executed. Hence it can't be used to control the phone before adb authorization has been set. But afterwards  it would be also by preferred way to control a phone with a broken screen.

@alecxs Hey thanks for the links, the second one kinda helped but not really, I managed to backup the keys and use scrcpy but then it just disconnected in a second and now we are back to adb authorization prompt even though I had authorised it an hour ago. :(

Though I had managed to get apowermirror/tea,viewer working but none of those let me unlock the device, it just shows a black screen sadly.

scrcpy comes with it's own adb binary, that might have caused it. restore the backup and try again. i can hardly imagine that coincidence the keys expired just now

@alecxs Thanks for all the help, I finally managed to get it to work. The restore method worked. As long as it holds for a couple weeks then I'll receive the new screen to replace the broken one.


text:
Permanently set app on launch (kiosk?)
I rooted my old Galaxy J2 today, and replaced the stock firmware with LineageOS. It works great.
My next question would be to set Retroarch the first and only app on startup, which supposedly is kiosk mode, so as if the phone would basically run Retroarch as its own system. I researched a lot about this (it is called kiosk) but no clue on how to do this.


text:
`adb backup` doesn't work even with `allowBackup=true` (e.g. Chrome)
I noticed that for some system apps (for example Chrome, which is preinstalled by default on my device), I can't do adb backup. Doing so results in the 47 bytes dummy .ab file. I checked in the manifest and they have allowBackup="true".
E.g. for Chrome, the content of the manifest is
allowBackup="true"
backupAgent="org.chromium.chrome.browser.ChromeBackupAgent"
extractNativeLibs="false"
fullBackupOnly="false"

Why is this happening? How can I backup such apps' data without root?
P.S. Helium backup doesn't show system apps.

https://android.stackexchange.com/q/143367 https://android.stackexchange.com/q/83080

I found the reason in logcat while performing a backup:
BackupManagerService: Package com.android.chrome is key-value.

By default, for abd backup, key-value backups are disabled:
"/system/bin/bu" (the command that is called on-device by adb backup) help text:

 -keyvalue|-nokeyvalue: include apps that perform key/value backups.
     (default -nokeyvalue)

Therefore, you need to include the -keyvalue option to create a Chrome backup:
adb backup -keyvalue -f chrome.ab com.android.chrome

This creates a backup file that contains only the Chrome settings (no cache files, cookies, local data, ...)

Any way to find out before the backup failed that this parameter is needed? Or is it safe to always provide it just-in-case, and "normal" apps will still be backed up as without?


text:
How to save all WhatsApp messages and media unencrypted?
I'm planning to quit Whatsapp but I would like to save an unencrypted record of my messages plus all the media files that are still on my phone. From existing solutions, I found some shortcomings such as no exporting of group chats or a 40k message limit. What is the method that best circumvents these limitations?
While I have the android app, I'd be open for a Mac or PC solution.


text:
How to disable Google news (clickbait) article notifications?
Every time I check my phone there is a list of 'news article' summaries in notifications. On the rare occasions I find any of it interesting it almost inevitably turns out to be a low quality fluff piece worthy of the description clickbait..  What is this 'service' and how can I opt out!
I am unaware of any third party news apps on my phone so presume it is some official google thing being pushed on me.

Have you tried this? https://android.stackexchange.com/q/20368/96277

Thanks for the lead - have already cleared the notifications that accumulated over night but will try the long press info trick the next time one appears.


text:
After unlocking a boot loader, is rooting different among phones?
After unlocking a boot loader, is the process of rooting different  among phones?

Hello. What problem are you trying to solve?

Well i'm asking the question I asked.   At the same time I happen to be trying to root my oppo phone that I unlocked the bootloader of

The answer is yes. Rooting is different, sometimes each device model requires different steps.

How to root Oppo Realme 2 // Oppo/Oneplus .ozip Firmware decrypter // Magisk Installation Instructions

@alecxs thanks.. I have an Oppo A9 - specifically, OPPO A9 2020 Snapdragon.. Would those instructions apply to me or if not how would I adjust them?  Should I ask a question here specifically for rooting the Oppo A9?

Does this answer your question? Is the root file different if a custom rom is installed?

maybe there is one additional step patching vbmeta or dtbo partition, but try the magisk boot patching + flash via fastboot first. no custom recovery TWRP required, only obtain a boot.img and follow Magisk Installation Instructions. or see 3.c) with correct stock ROM + 4.b) Magisk v8.0.5 usage is new/different + (5) fastboot

there is no development on xda how did you unlock bootloader? you can help others post your answer here (i will follow that thread and assist in rooting there as Android Enthusiasts is only Q&A site)

@alecxs Thanks. I have posted an answer in the thread you mentioned on how to unlock the boot loader

correction, I think I hadn't unlocked the bootloader!


text:
Fit more notification icons on status bar
I have a xiaomi mi a3, recently updated to android 11. Before updating to android 11, on android 10, the limit of the notification icons that would show, at the left side of the status bar was 4 icons. Now, after updating to android 11, I can see max 2 icons followed by a dot if there are more than 2 notifications. Is there any way to "increase" the limit? I would like to have 4 instead of 2. Is there any way without rooting please? I don't want to root my phone. Maybe an ADB command would do that?


text:
Samsung Phone write protection
I just bought a new Samsung Galaxy M11. I'm trying to transfer my files from my old phone to the new phone connected to a PC but it won't copy. I get the pop-up that says the internal storage is write protected. I have tried the developer options too by switching on and off the USB Debugging but it still doesn't work. I have searched the web but all I get is related to external storage or SD card. Is there anyway to remove the write protection on the internal storage?

check mount for ro flags


text:
Can you help me recover my accidentally deleted videos?
I have a Nokia 2.2 smartphone runnig Android 10 ( a hateful piece of software from my opinion). From 16 GB of storage only 2 are available for the user and it's shrinking even more with every new update. That's why I have disabled auto update and installed a sd-card in storage expansion mode (the phone uses the sd card as the internal memory).
I've been gone on a trip and took some videos and photos with the phone since I ran out of memory on my compact camera. On the way home, out of pure dumbness I deleted the DCIM folder.
"Fine, I will just install a recovery app." Guess what? Those require root and the Android 10 system is not vulnerable to any root exploits that I know. And Nokia will not allow me to unlock my bootloader!
"Ok. I will take the card out, plug it on my computer and start recuva from piriform." It didn't work. Windows is unable to open the card, but it shows it on device manager as 2 "healthy" partitions. "Maybe it is an ext4 file system and it will mount just fine on my linux laptop (Q4S Trinity desktop based on debian)" That one doesn't even detect that I've connected the card! The only device that is able to read the card is my phone! What can I do? Is there any way that I can  get my videos back? A firmware dump? How can I do that? Thanks in advance.

When mounting the sd-card as internal storage the sd-card is encrypted and can be read nowhere except from the phone it has been initialized in. Therefore removing the card and running recovery tools on it is totally useless as it will not work.

try this app it may recover pictures from thumbnails and trash folders https://play.google.com/store/apps/details?id=com.i8dudata.imgrecover.free

Damn! Thanks aniway bro.


text:
Play Store not updating some apps
On my Samsung Galaxy Tab S2 running LineageOS 16 with Opengapps, some apps are not being updated to the latest versions. In particular there is Google Meet and Sheets. Meet is stuck on a version dated August 2020 whereas my phone offers a version dated November.
I tried installing Aptoide apk store and it offered updates to both of these apps (and some other too). I installed them and they work, so it is not a question of incompatibility with my system. However, I would like to stick to the Play Store.
Why is this happening? And what could be done to get the latest versions?

What happens when you open the page for "Google meet" in PlayStore app? Is an "Update" button available?

No. I tried unistalling and re-installing to no avail.

May be the app has been modified and repackaged and therefore the update is not available. You should check the signature of the downloaded APK if it matches the other Google apps: https://android.stackexchange.com/questions/9312/how-can-i-verify-the-authenticity-of-an-apk-file-i-downloaded/218161#218161

I installed it from the Play Store and the app is offered by Google LLC. The Store on the tablet shows version 45.0.328626805 whereas on my phone, also running Android 9, it shows version 2020.11.29.345116913.Release

Different platforms (tablet/smartphone, armv7/arm64) can get different versions of an app. That is nothing unusual on Android.

On Android the app developer can upload different app versions for different platforms.
Therefore it can happen that on your smartphone you have an Google Meet version from Dec. 2020 but on your tablet the latest version is still Aug. 2020.
This can even happen if both device are using the same Android versions. Just the fact that the one device is a tablet and the other a smartphone is enough so that they get different versions of an app.
If you open the page of an app in Google Play Store app and there is no "update" button then you already have installed the latest version that has been released for your current device.
Other criteria that may lead to a different version are:

Android version
Supported ABI of the CPU and OS (armv7 = 32bit and/or armv8 = 64bit)
Screen size
Country
Mobile network provider
Device name
Installed libraries (some manufacturer add special libraries that are required for certain apps)
Available hardware features such as NFC, fingerprint sensor, ...


text:
Opening Termux to the entire phone
I think I have a memory leak on my phone. So I installed Termux then htop via pkg. When I opened htop, I could only see two processes--what seemed to be the instance of Termux, and htop.
How can I use Termux to access the rest of the phone, but without rooting (I want to still do banking on my phone)?

Base don your description I assume your phone has Android 10 or 11. On that versions apps can't see other apps processes. And termux apps are installed into private app data that can only be accessed with root permissions. Therefore you have to install htop manually e.g. to /data/local/tmp.

use adb shell, run custom (static) binary from /data/local/tmp


text:
How to disable the ghost touch and use device with mouse in android 4.0.4
Got an android tablet iBall i6012 with ghost touch. Its screen is touching in keyboard area with some fungus between touch screen and LCD. This is an hardware issue, have around 7 touch area in screen touching every second. want to use the tablet with USB mouse. Tried Touch Lock by kidscrape. It is locking the screen completely including mouse input.
Looking for a touch input blocking solution with mouse input support in Android 4.0.4

related https://android.stackexchange.com/q/224255

@alecxs solution mentioned in related link requires scrcpy, with minimum os Android 5+. iBall i6012 is Android 4.0.4 cannot use scrcpy.

maybe someone can have a look into source code and tell you which adb command is executed from --turn-screen-off

@alecxs scrcpy didn't use ADB to turn off the screen, it used Android code SurfaceControl, interfacing with the device


text:
asus phone data recovery with broken screen
I have Asus Zenfone selfie but the screen is broken and black and unfortunately USB debugging is not yet enabled.is there any way to recover data from it .please help. thank you

Is the phone protected by a pattern, pin or password?

I would replace the display. But I agree, you have a problem.

flash (adb enabled) magisk_patched.img from QPST and control your screen with scrcpy. for better answer better question is expected first (modelno ZD551KL? android 6? bootloader state?)


text:
Google showing places I haven't been
I am shown on google that I have visited Liverpool and Cornwall both of which are 100's of miles away from where I live.  Any ideas why?
My Facebook was hacked could this be the same thing?

Unlikely... We see this sometimes as well when GPS signal isn't available and Google is attempting your location by WiFi names, IP address, and cell tower ID's... We can occasionally appear to be hundreds and even thousands of miles away from our actual location when looking in location history. It's not super common, but it definitely happens. That said, you should do a Google Security Checkup and make sure nothing looks out of place. https://myaccount.google.com/intro/security-checkup

No. Your location history is never completely exact. It is because GPS location is often bad, particularly in these cases:

If you are inside reinforced concrete buildings or trains. It is because the metal in wall (of the building) or the case of the train shadows the signal of the GPS satellites.
If there is no GPS signal, google maps tries to use the MAC address of the available Wifi APs what your mobile can see - and compare it to the GPS signal of other google users, whose GPS at that position worked. It works in many cases, sometimes it does not (for example, the Wifi AP is actually another telephone of another Google Maps user who shares its mobile network with it).

If you see your position history (timeline) on the google, it shows you all the cities what the google thinks, you visited.
If the Wifi-based localization worked 10000 times in your life correctly, and 3 times badly, then you will see 3 cities where you never were. It does not matter that it worked correctly 9997 times, the first what you will think that you were never in Zürich or Philadelphia.
Your position timeline overweights the mistakes of the google localization. You can see these false points, many of them are airports or train stations.
Probably there are some option to change your google maps timeline retroactively.


text:
Lack of available storage on my Samsung Galaxy Tablet
My samsung galaxy tablet is low on storage and i have no idea where the storage is being used.   When I go into setting and look up storage I get a reading for the various sources documents,apps,pictures, etc.  When I add up the usage I get about 5G.  The usaged defined on the tablet is 15G.  Where is the other 10G being consumed.  Cache has all been cleared so I know it is not that and that should have been in the 5G anyways.  Is it the operating system?

Welcome on the Android SE! If the user-level options are depleted, I think here is the time to think on rooting. Hopefully you will get an useful answer before that.

I suggest you to read the posts here about how storage works W-A-A-A-Y before you head into rooting. Rooting should not be undertaken lightly, and you'll need the knowledge anyway. Move slowly and with firm footing.


text:
New Android 9 'phone - where is "schedule power off / on"?
I always use this feature to save battery, but can't find it on my new Android 9 'phone.
Where has it gone?

[Update] the 'phone is a Ulefone Armor X3. For the least 5 or 6 years, I have had exclusively Ulefone and they all had this feature, so I just assumed that it was baked in to Android itself. Otoh, they were all other models & pre Android 9.

Which device are you using? I don't think scheduled start/shutdown is a universal feature in Android. Might be OEM specific, such as Xiaomi, OnePlus, etc.

Thanks. Its a Ulefone Armor X3, All previous Ulefone  for the last 5 or 6 years had this feature. They also had Android version < 9. See App to schedule Android power off / on at specified times?


text:
Google Assistant voice search is slightly modifying my search queries
Has anyone else noticed when voice searching with Google Assistant it'll sometimes change your query slightly but to a question you didn't ask?
This is not a simple case of mis-hearing spoken words; Google is trying to be smarter than me by changing my search query to idiot-proof it.
One example of many I've experienced:

Asked google: "How to disable 'Application X' from starting with  MacOS Boot"
Search field populated with and results showing for: "'Application X' will not start."

Not what I asked, and this happens frequently.
Is this a preference, is there any way to turn this off?
Any thoughts appreciated.


text:
Camera doesn't save with new SD card and how to decrypt files from old SD card
it seems I had a bad idea yesterday. I got a new SD card for my Fairphone 3+ (running Fairphone OS/Android 10). There was already an SD card inserted I assumed not to be in use. So I turned off the phone, exchanged the cards, booted the device and when asked to extend the phones memory I confirmed that.
Now I have two problems:

I'm missing a couple of pictures.
I wondered if these were on the old (luckily only 8GB) SD card and recognized that there are two partitions on it: android_meta and android_expand. As far as I learned, this means the SD card also was used as phone memory extension and thus encrypted. And the posts on Android Enthusiasts read like the phone has only one encryption key and won't recognize the old SD card anymore.

The Camera can't save pictures anymore.
Whenever I take a photo I'm able to immediately open it by tapping its preview. Then I see a black picture, I'm told its size is 0 bytes and it's located in /storage/emulated/0/DCIM/Camera. Using the cx File Explorer I'm able to open that directory, but it's empty. And I'm not able to create files there.
Using the ADB shell I was able to ls -la /storage the directory and got this:
total 7
drwxr-xr-x  4 root root        80 2020-12-21 06:52 .
drwxr-xr-x 21 root root      4096 2009-01-01 01:00 ..
drwx--x--x  4 root sdcard_rw 3488 2021-01-12 21:38 emulated
drwxr-xr-x  2 root root        60 1970-01-01 01:00 self

So only root is able to write in /storage/emulated. BTW: "total 7"?

Currently I'm trying to find out the following:

is it possible to decrypt the pictures on the old SD card? Would be fine for me if it meant some work :)
is the encryption key for the old SD card still on the phone or could I reset the phone without making things worse regarding the old encrypted SD card?
is the phone in a bad state?

The Camera doesn't save pictures.
All other apps seem to work as expected.
The SD card overview in the Memory settings tell me there are apps on the new SD card (about 5GB). But when I tap the App category to get all apps listed, the list is empty.
When I eject the SD card, a couple of apps start, but only show a blank canvas.

if the phone is in a bad state: could this easily be fixed? If yes, how?

Would be great to get some hints. Thank you very much in advance.

Sorry, forgot to link accounts before asking. My bad. But I got the Camera working again by "formatting the card as mobile" (translated from German, I hope it matches somehow). There was no new data on the SD card, so it seemed reasonable to me. And it worked (this time I saved the remaining pictures :) ).

Would it be possible now to create an image from the old SD card (using dd on Linux), let the phone use it as memory extension again, remove the card and restore the image (android_meta and android_expand) and then trick the phone to use this card again with old data? Seems feasible to me if the encryption mechanism is not based on some random data but only on some static card and device information.

Why not simply give it a try – what can you lose? Either the adoptable storage is still recognized (in which case you can recover all data from it) or not (then you will have no chance anyway). As long as you did not trigger "forget this card", there's still a chance.

as Izzy said, swap the cards back! do not factory reset

Thanks. Unfortunately, it did not work. After I restored the old image on a newly created adoptable storage (same card), the phone tells me the storage was broken :( So I assume there is some dynamic information in the encryption key.

you must not re-create adoptable-storage that will of course force new encryption key. instead clone 1:1 disk image of the entire old (broken?) MicroSD Card (including all partitions) with gddrescue and write it back to another (working) MicroSD Card with dd. encryption key for old SD card is still on phone, just insert, boot and check from df or mount

Thanks for that hint and the link. You said the encryption key for the old SD card is still on the phone. I'm wondering if this holds true: as I told in the initial post, the old card (adoptable storage) got inaccessible after I inserted the new card and turned that new card into an adoptable storage. If the phone kept the encryption key of the old card I would give the instruction in the referenced post a try.


text:
Pixel 5 bootloop after flashing patched magisk boot image
I was running Magisk on Android 11 on my Google Pixel 5.
I installed it using a patched boot image from 11.0.0 (RD1A.200810.021.A1, Oct 2020, EU carriers).
Today Android 11 prompted me with an update, I installed it without thinking about the consequences. After rebooting Magisk stopped functioning. So I rebooted to fastboot mode and flashed the same patched boot image as i did the first time. I flashed both boot_a and boot_b, I remembered i did that the last time.
After that the phone is stuck in a boot loop.
I also tried flashing the unpatched boot image from the original image, but same effect.
Maybe i had to patch the latest magisk version on a fresh boot image, but can't do that anymore without access to magisk on my phone. Was running the latest canary YAHFA version.
Don't know what to do anymore, really hoping there is a solution without loosing all my data.

In the end i fixed it with extracting the boot image from the correct factory  image. At first I didn't see that the latest image was at the end of the list here https://developers.google.com/android/images
Flashing the boot image gave me a 'no command' screen. But I was able to boot into safe mode. After that i could patch the boot image file with magisk, and patch it in fastboot. And then everything was working again!

i am afraid by downgrading kernel you might have corrupted your encryption keys. flash all partitions according to your latest version (except userdata)

see 7. Reroot with Magisk

you write, flash all partitions according to your latest version. you mean the factory image i already downloaded? as far as i can see there is only one factory image available

there are two. but anyway search for Full OTA Images you can flash from recovery. check current version from 'fastboot getvar ro.build.fingerprint' i think it is this one redfin-ota-rq1a.201205.011-d13beb06.zip

you can also unpack OTA with payload_dumper.py and check whats inside. according to page 4 on above xda thread that should be the right factory image redfin-rq1a.201205.011-factory-2e49bd21.zip (flash manually, not flash_all.sh that will erase userdata)

i downloaded the latest factory image 11.0.0 (RQ1A.210105.003, Jan 2021) and extracted boot.img from it and flashed it. it loads a little bit longer before i get the 'no command' screen

why latest? to get your data back now you probably must flash latest ROM too, because as i said there is a downgrade protection in encryption keys. the no command screen is recovery mode. press Volume Up + Power on no command screen to enter recovery menu

I got the latest because of the update i did when android prompted me with that. But i fixed it! I was able to boot into safe mode. And from there i patched the boot.img with magisk and flashed it in fastboot. Now everything is working again. Thanks for your help!

feel free to test and copy&paste working steps as separate answer https://androidmore.com/install-ota-updates-rooted-android


text:
Android patttern lock reset
Awesome people! I need help!
My wife's old Xperia z1 has a broken digitizer, the phone is pattern locked without showing the path. Of course, no one can remember the pattern, USB debugging is not enabled, no root and no google account shows that it is paired with this device. I care about photos so is there any way to take a memory dump to an SD card or to clone the phone content without debugging mode? If I wipe the data in the boot menu, will I be able to recover the photos using e.g. Recuve? Can I run some script from SD card without permissions in the system? Or any other way to bypass pattern lock without debugging and root?

So not only the touchscreen is dead, but also you've forgotten the pattern, and the phone is also not rooted?

The Xperia z1 is a very old phone shipped with Android 4.2. This phone should not be encrypted (unless you activated it manually) hence file recovery should be possible.

Welcome to Android Enthusiasts! May I recommend taking a look at the data recovery section in our broken-screen tag wiki? Also consider the linked and related questions from relevant Q&As. Another good starting point is our locked-out tag wiki. It's core Q&A, Can not unlock my Android device as have no internet connection?, has a large collection of ways to reset the pattern.

hold vol down + power to enter fastboot mode, connect phone to pc, install platform-tools, post the output of fastboot getvar all (edit your question) then let's see whats next


text:
How to attach multiple displays to Android?
I would like to have an Android setup with one primary and two secondary hardware displays. I am wondering, if it is possible at all? I know you can have primary and secondary screens according to the documentation, and Android have Display Manager supporting multiple displays. But would a total of three displays work?
I am running Android 11.

I don't think you are talking about regular Android installed on some smartphone. You are talking about Android-x86 or some other Android-OS for PCs. Because usually you don't "setup" Android somewhere. A device comes with Android or not. The only other option is to change the AOSP source code and develop you own Android based custom ROM (a topic that is considered off-topic here).

Yes and no, you can plug Android device into HDMI extender and have at least 1 external display. Technically you can use multiple HDMIs to connect to multiple displays. I tried successfully with only with one HDMI.
But yes I'm talking mostly about AOSP ans it more configurable.
But it should be irrelevant as Android since version 10 has innate multiple display support.

So you are talking about displays connected via USB-C port to an Android phone? If that works and how (MHL, DisplayPort alternate stream, ..) is very device specific.

By "Android [...] 10 has innate multiple display support", is this you're referring to: Using more than two displays?

@AndrewT. Yes, exactly this what I'm talking about.


text:
How can I programmatically filter incoming traffic on an Android device via an app?
I need some pretty thorough guidance on a project I've been tasked with. I guess ideally I am looking for either a tutorial (or set of tutorials), or else a working, self-contained, open-source codebase for an Android app that can filter all incoming internet traffic on the Android device based on keywords.
In particular, the app will stop incoming HTTPS traffic for any given web request if the requested URL or webpage (not just the domain) has certain keywords in the HTML or the URL. If a request does not have the keywords, it will be allowed through and the device will function normally. If it is not an HTML or TXT request -- if there is no text to analyze except the URL -- then it will look for keywords in the full URL alone.
By self-contained, what I mean is that it should not require a remote proxy server or remote VPN.
I have searched Google for such a thing. I've searched in GitHub.
I've seen plenty of tutorials for setting up a local proxy or VPN... all point-and-click kinds of tutorials. I need something programmatic.
I've found libraries that supposedly allow you to set up a proxy from inside an Android app, but their documentation is too cryptic and there are no step-by-step examples for them, so I can never make them work.
I've found a few open-source apps that do some of this, but aren't quite what I'm looking for. Nothing that really does what I need it to. I've tried to alter the apps that I've found to turn them into what I want, but my knowledge is so limited and the missing pieces are always too numerous.
I've been working on this for months. Sad, I know.
Can anyone point me to a fairly thorough tutorial (or a set of tutorials) that will help me to build such an app? Or, can anyone point me to an existing open-source app like what I'm looking for? Or even something that comes pretty close?
FWIW, giving me broad advice like "you need to set up a local VPN and a local proxy, with a certificate, and then use the proxy to filter traffic" won't be of any help to me. I already know the broad outline of what I should probably do. I just can't figure out how to do it, and can't find any good resources for guidance! Which is why I'm here...
Thanks in advance!

Intercepting HTTPS traffic system wide is no longer possible on an unrooted Android since Android 6.

@Robert By "intercepting" do you mean actually reading it, or do you mean even just passing it through a local proxy (without reading it)? And, either way, is that true even with a manually installed certificate?

Well I never did it, but if I should do that, I would use an out-of-android solution (a https eavesdropping transparent proxy installed in the router).

@gcdev You need to install an auth certificate system-wide, probably it can be done, and also use a transparent proxy which eavesdrops https by decoding the traffic and auto-generating a cert by your auth cert. It is hard, but possible. Mainly big companies do this to eavesdrop their employee traffic.

While we might be able to help on the concept/idea for end-users, take note that app development is off-topic since Android Enthusiasts focuses on end-users or power-users (but not necessarily developers) solving their issues, so we won't and can't provide help on code (a directly runnable script is still okay, but code that needs to be compiled to make an Android app is not).

By "intercepting" I mean HTTPS decryption + reencryption because you were asking for searching for keywords. The main problem is that since Android 6 you need root permissions to install the root CA certificate of the used proxy. Installing the cert as user certificate has no effect as apps by default ignore user certificates.

Thanks @Robert! I've now found some corroboration to what you're saying, sad as it makes me. https://httptoolkit.tech/blog/intercepting-android-https/#intercepting-https-on-non-rooted-devices https://medium.com/@Mayank.Grover/intercept-ssl-traffic-to-perform-penetration-testing-on-android-apps-using-charles-debug-proxy-59211859d22f

Thanks @AndrewT.! I didn't realize that... probably should have... but even given that, if an Android enthusiast knew of an open-source app that filters based on keywords, they could recommend it to me and that would have answered my question!


text:
fasboot devices not getting attached xiaomi mi a3 no sound of attaching no nothing
I have the Xiaomi Mi A3 and I'm currently on both phone and PC latest stock update. I am using Windows 10 20H2 and I have tried everything – but still don't get it.
I tried another Mi A3 and it got attached normally. I've tried installing all kind of drivers and different ports, nothing. When suddenly it worked and I installed the stock ROM – but because the stock ROM is kinda laggy and ugly I want to change it. But I can't because I am also on stock recovery and I can't install another recovery because my device isn't recognized in fastboot mode.
My device is recognized in adb mode and in edl mode as well, only not in fastboot.

Does this answer your question? Fasboot Devices not getting attached XIAOMI MI A3


text:
How to decrypt Shelter/work profile without access to the app and no credentials?
I am referring to the topic How to decrypt Island / Work profile and Parallel Apps user in TWRP?
After installing a work profile (via Shelter) I wanted to install a backup of my LineageOS 17.1 via TWRP. My backup did not work and resulted in a bootloop straight into TWRP again:  failed to decrypt user 10.
My problem is: I do not know the user 10 password and I cannot start Android again. I cannot put in the password in TWRP or access the settings like advised in the answer of firelord… stupid me.
Does anybody have a suggestion? Is there a way to wipe the user 10? Any help would greatly appreciated.

Before restoring Lineage backup, did you make backup of the than state of the device? If yes, you might be able to restore it successfully and then follow my answer.

I did take a backup of the than working LOS (I am using the microG fork, as far as I know it does not have any influence there). After the last OTA update phone calls and sync were an issue, so I wanted to restore the TWRP backup, no success. I even got rid of some data to free the space on the phone (thought it might be the reason), but the restoring process got stuck at the same percentage again. That is when I restored a completely new nightly, same issues as mentioned above. I flashed the newest TWRP (3.5...), interestingly the MIUI 12.1 is starting (flashed it to get the current vendor).

It was possible to get rid of the encrypted work profile/user 10 with the MiFlashTool. It wiped out everything. But thanks a lot to Firelord for his first response!


text:
Turning on SMS delivery report on Android 9
How can I turn on SMS delivery report on Android 9? In messaging section, I go to settings, but there's no "advanced" option. I'm using Huawei Y5 2019.
Here's a screenshot and there's no double-check (which is a sign of a delivered message)

As far as I know, whether to show delivery reports or not is to be implemented in a messaging app, and is independent of Android version. If you don't see any such option in your stock messaging app, than it doesn't have that functionality. I suggest you try a third-party messaging app from Play Store or F-Droid. It should work out.


text:
I accidentally deleted the camera app: how to recover it?
Somehow I got into a mode where apps selected were intended for deletion .  I did not realize that and the camera app got deleted.  I have not made any changes since that happened. What can I do to either recover or reinstall the camera app?
This is a Xiaomi Redmi 8A running Android 9.  It is not rooted. As far as "how /when did it happen" I do not know more than this: somehow it ended up that ALL  applications were selectable with a white round circle and asking "DELETE apps" or something similar.  I had never seen that mode before (or since). I tried to get out of that mode but ended up with accepting the Camera that was selected and got deleted.
On and off I do connect Android Studio to the phone - for pushing a simple Ionic app to it. Does Android Studio have some mode that allows bulk deletion of apps on the phone?

This cannot happen so easily (camera app being a system app and immune from deletion). Is your device rooted? It would help which Android phone and Android version you have? What were you doing or what app were you using which uninstalled camera app? Is this the same camera app that came with your phone?

@Firelord I updated the question. I  do not even know how to root the device.  The mystery mode I ended up in (no idea how)  was allowing me to select any or all apps of whatever kind for deletion. I tried to get out of that mode without any effect but did not de-select the Camera app apparently.  One thing is I have been using Android Studio for pushing a simple Ionic App. Could that have gotten into a strange mode?

I think you might have entered into Settings -> Apps -> clicked on Uninstall button, and then selected apps. Xiaomi devices come with GetApps app which allows installing apps/bloatware in your device. See if that offers your Camera app. Also, just to be sure have you ensured that Camera app was not disabled. Your device might offer an option to shows disabled apps somewhere.

Thanks : my phone seems to only have PlayStore and not GetApps

I just what to confirm that Camera app is indeed no longer in your system (that is, it is not disabled either). Can you install this app and search the term camera? This is a FOSS app hosted on a fellow mod's website. https://apt.izzysoft.de/fdroid/repo/io.github.muntashirakon.AppManager_377.apk

Wow this is a serious process to get installed. I have downloaded and went to directions and selected ADB over TcP. Now there are still  a number of steps. I'll have to come back to this.

Oh, no no. You don't have to bother with adb or root. It is needed for advanced functionality offered by the app. Ignore it, just search for Camera term in the app and see if your camera app is shown there.


text:
Is it possible to flash a custom ROM (say Lineage OS) with adb/fastboot?
i have TWRP recovery installed, but i am looking for a way to flash the zip (after extracting) directly with fastboot. Is it possible?

Yes. You would be needing this tool for image conversion. https://github.com/xpirt/sdat2img

@Firelord , what is the difference between sparse data and raw image (ext filesystem )?/what I mean is which one really is required by android to boot the system ?

That I don't know about. I had a device which I couldn't flash using recovery, and so, came across that tool. That's why I recommended it. Other folks might know the difference.

"which one really is required" depends on how to flash it. the partition itself is of course always ext4 file system. all other file formats exist only to safe disk space (excluding the empty gaps)

Note: fastboot has size limit. depending on ROM and fastboot version one must split system.img into system.img_sparsechunk.0 files manually or via argument

@alecxs, I think converting the raw img file to sparse image handless the splitting part. I use img2simg for that purpose and after converting , I see the flashing takes place in multiple chunks. https://coral.googlesource.com/img2simg/


text:
What does "Voice network type: unknown" mean in my settings?
It is in the phone info setting, when you dial *#*#4636#*#* on my Moto g stylus:


text:
Super old email contacts suddenly appears in my phone contacts
When I woke up this morning I suddenly had 6 new contacts added to my contact book on my phone. All of them were emails, some of them I recognize from WAY back but I sure haven't had contact with them in a LONG time. I guess they were added in some kind of sync activity, but I'm pretty sure none of these addresses that were added, is featured in any of the accounts I'm currently using (gmail, yahoo) etc. I had contact with these people way before this
Why did this happen?
Is there any way to find out where a specific contact were synced from?

Probably not. If it is google contacts, maybe contacts.google.com might offer an out-of-android solution.

SO, it turns out these contacts were infact imported from a google account I actually deleted about a week ago (20 days for it to get permanently deleted). I looked into my sync settings on my phone and saw how this old gmail adress were still there with sync activated. I had to re-create the google account, and logon to find these contacts in there.
So apparently my phone suddenly decided to add 6 contacts from a deleted google account. This google account had actually a HUGE contact list synced from WAY back on my old phones and accounts. Now all deleted though


text:
Does google maps personalize the walking time to your destination?
Google maps has a lot of data about how far and how fast you move around. When you search for a walking route to your destination is the app calculating the walking time based on your average walking speed?

It does not take into account your walking speed but assumes a normal walking speed. From Google Maps help

What is the Google Map walking speed? Is this a constant value or does it change depending on slope?

Normal walking speed is about 3 miles per hour - It does not adjust for distance travelled, nor for whether you are on a road or footpath.
It does adjust slightly for slope - it decreases more for uphill than it increases for downhill.

A user wanted customized speed, like you do and they were suggested to raise a feature request.

I am usually incensed by suggestions that I do Google's work for it by telling it which features need to be implemented, mainly because I know that Google has never and never will actually implement any of my suggestions and it is a waste of time to think otherwise (for me).  However, there are some serious issues the lack of this feature causes, namely underestimating my walking speed causes it to suggest sub-optimal routes because it thinks it would take to long to walk to a particular public transportation pick up point or between points.

Also in general it ticks me off that every thread I find on Google's "support" page has already locked me out of adding my comment by the time I find it.  In part on principle (there is no reason to ever disable commenting short of inability to prevent spam, etc.) but also because the fact that I am still having these problems so much later indicates the Google is not doing a good job at these things.

Quite agree. They don't listen, don't discuss and implement what they think users need

Also 3mph is ridiculous considering a male in mid sixties is expected to do 5KM jog in 30 minutes


text:
ADB server version (40) doesn't match this client (41) {Not using Genymotion}
Disclaimer: this is not a duplicate to this SO question as the source of the question is different and the answers don't apply.* I hope, it is correctly placed in AE and that the note about not using Genymotion does not confuse the reader. The reason to include it in the title is that it is so dominantly present in other answers, but it does have nothing to do with this question, as I don't use any emulator including Genymotion.

So I'm trying to install LineageOS on my Fairphone FP3+ using Windows 10. But: This also applies to other products with other respective versions - in this case, the device uses Android 10 (with Build number 8901.3.A-0054.20200929). For the installation I need ADB - at first to access the fastboot mode. For that, I first installed the latest Android Studio from here but actually only needed the SDK Platform Tools, which you can find here (not to be mistaken with the Command line tools from the link before). I unlocked the bootloader and  ran the following command which is displayed with it's output:
D:\Setups\XXXXX\Lineage FP3\platform-tools_30.0.5(ADB_1.0.41)>adb devices
adb server version (40) doesn't match this client (41); killing...
* daemon started successfully
List of devices attached

This SO question I mentioned in the disclaimer didn't help, as abd didn't even print any devices - so the setting is quite different.  I also went through these linked questions: link 1, link 2, link 3 and link 4 among others. Genymotion is as said not used here, but referred to in almost any Q/A except here, but also no soulution for me to be found there. I already checked the PC for any software that could have installed another adb version, but neither me nor cmd's where could find any (4, 7, 8; 9, 11 or 10).

adb kill-server
adb start-server

Did also not change a thing as suggested here or here. I restarted all devices and software multiple times and tried getting rid of all adb processes too (6, 13 or 12).
I also reinstalled Android Studio to try it without using the cache as suggested in this SO answer from a possibly related question that unfortunately also has no leads. I can imagine that some questions like that one or this SO one could also be helped here.

This might be considered a follow-up

Since this adb server version (XX) doesn't match this client (YY); killing... seems to be a very prominent question, let me present the quite straight forward solution - I actually wonder why it wasn't answered anywhere else or at least, I couldn't find it. To find the version of ADB you are using, type adb version to get something like:
Android Debug Bridge version 1.0.41
Version 30.0.5-6877874
Installed as D:\Setups\XXXXX\Lineage FP3\platform-tools_30.0.5(ADB_1.0.41)\adb.exe

The Android version simply doesn't match the adb version. Android 11 for example uses the API 30 and ADB 41. Android 10 (API 29) and that phone needs ADB 40. You can check your Android version to find the corresponding ADB version to get or easily read the error message above to find XX (in this case 40).
I was able to find ADB version 1.0.40 from here and it works like a charm:
D:\Setups\XXXXX\Lineage FP3\platform-tools_28.0.1(ADB_1.0.40)>adb devices
List of devices attached
A2XXXXXXXXX1    unauthorized

There is one simple rule to avoid such problems: Do only use adb from installed Android SDK (and use SDK updater to get the latest version). Do delete all adb versions that come with other versions.

The latest version was not suited in this case - can you also downgrade that way?

ADB server and client both are running on your PC and this had happen because you had more than one adb version installed. You had executed the version v40 client which started the v40 server on your PC and later you used v41 client which caused the error message you posted.

Actually, I don't have anything installed right now, just the out-of-the-box (or .zip) SDK Platform Tools (right now also only one exists on this system).

I still believe that for this problem the Android version of your device is irrelevant. It is just the two versions of the adb serverthat is running (see adb.exe task in taskmanager) and the used adb.exe as client (usually adb server and client are provided by the same exe file they are just started in different modes). The error says that those two versions are incompatible. What device is attached (and it's Android version) is irrelevant for this error. The error can even occur if you don't have a device attached at all.

@Robert exactly. furthermore it run two different instances of the same binary (multiple versions handler internally for compatibility reasons). no need to downgrade

I just encountered this error and this QA thread did help me, although it wasn't the exact answer for me. I had recently added a second copy of adb to my computer, so that was causing a conflict between the two copies of adb. I needed to update the Path in my Environment Variables to point to the newer platform-tools directory.

Having had this issue after an update and I wasn't able to solve this in the usual way. Through @Cadoiz's answer I was able to find another adb.exe instance running om my windows, which was the one used by SuperDisplay, which I use to run an Android Tablet as a secondary screen.

Hello @Cameron - you can also consider this similar answer by jhocking.

This adds nothing to the existing answers.


text:
How to install Google Camera on Nokia TA-1053
My phone Nokia TA-1053 is almost stock android with a couple of apps from them here and there. I really dislike their camera app. So, I tried to install Google Camera(since all other apps are from Google).
Now Google Camera app is not available in Play Store(at least for my phone). So I tried to side-load it from Apkmirror. My phone's android version in 9 and it supports API 28.
I downloaded the apk, installed it and when I was trying to open it, the app just won't open. It instantly shuts down the app and shows error messages. What should I do?

As far as I know Google Camera app is limited to Google Pixel devices, therefore it does not work on other devices. Modified versions can be found on the Internet that allows to use them on non-Pixel device, but you never know what else was modified on such apps. Therefore better check the common camera apps like OpenCamera.

@Robert I think Google Camera can be installed (on custom ROM) with Open GApps, but they have a FAQ for Google Camera installation: I read that 'Google Camera can only be installed during a Clean Install or as an update to an existing Open GApps Installation.' What does this mean?.


text:
Why Google is sending SMS messages to me?
I have just received a SMS message... from Google (?):

What is this? Does this mean that some "bad guy" has my phone number and is playing some nice tricks with me, pretending that he is a Google? Or is this truly a Google-originating message?
Why there is a garbage in the message content? Could this be some Asian or otherwise ideographic language's characters which encoding got lost during transmission through my cellular network?

Since this looks like from Messages app (by Google), probably an SMS message to activate the RCS service (i.e. the Chat feature) which consists of 6-digit number and sent by Google, though I don't know why the encoding is broken...


text:
How can I control volume of Zoom app?
I have installed official Zoom app for my Motorola One / Android 10.0 to be able to join meetings directly from my mobile phone as an alternative to the regular PC connection.
However, I have each call very loud and I cannot control volume in any way:

I have both Media volume and Call volume set to 0 (mute?) and still can hear Zoom call's audio (and still can hear it very loudly)
Changing any of these two params does not change Zoom's volume even a tiny bit.

What am I missing? Is this some kind of bug? How should I control1 call volume in Zoom app for Android?
I understand (correct me, if I am wrong) that:

Call volume is specific to Phone app only and to an actual over-the-phone calls / cellular networks' calls
Media volume should control in-media volume of all apps so this would mandate (?) Zoom's in-app audio call's volume as well

If I am correct then the good question is, why any of these two working?
Of course, I have this problem in Zoom app only. Phone's volume buttons are working correctly. All other apps responds to Media volume correctly and I can control any other aspect related to volume in my phone without any problems. Zoom only seems to be the exception here.
1Note that I am talking about controlling / decreasing volume of Zoom calls. I am aware of this question and mine isn't a duplicate. I don't want to disable the Zoom meeting's totally (I know how to disconnect audio out of any Zoom meeting). I just want to make it a way, way lower. Because right now I have to keep my headphones on my chins, at least 5-10 cm from my ears to not get deaf.

Is it possible that you have an app running that provides a permanent transparent overlay on all apps that passes touches to the visible app but may be prevents Zoom app to correctly configure the volume keys (as it is not the top-most app)?

Such possibility exists. Zoom (in my case) is an office app, available in work profile in Android 10. I don't have issues with my apps in my private profile and I don't have any other audio-related app in my work profile, to test your theory though...

Does nobody else have this issue? It drives me absolutely nuts! And I have the same issue - I wear my headphones around my neck to lower the volume. It's ONLY Zoom. i can control anything else.

I figured out that it is a bug in Zoom app.
Alternative connection methods
Uninstall Zoom app and:

Use browser call-in feature on your mobile browser, if that's an option in your company.

Use call-in feature. You can't see video this way, but at least you can participate in meetings without destroying your ears and boiling your brain.

I use mobile device for participation in Zoom calls at a very rare basis. The most times I use PC to be able to share my computer screen. So both options work in my case (i.e. I don't need Zoom app as it turned out).
Physical volume control
Get a new headphones or extend your existing ones with any kind of solution that allows you to use physical volume control (irespective of volume control in your phone, which is not working in case of Zoom app):

Get a cable with such element, if your current headphones supports detaching and replacing audio cable:

Get an extension cable to your existing headphones cable that does pretty much the same:

Get a new headphones with volume control built-in:

In my case the first option was a dream come true, not only with Zoom app, but in many other scenarios. You can get cables like that for a 1-2 USD on Alibaba or Aliexpress, so I've got ten of them in one package (assuming that half will be DoA which turned out to be not true).


text:
Does play store filter out NFC apps for phones which do not have NFC?
I'm developing an Android app based on NFC technology.
So when my app goes live on the play store, will the app be displayed for people having non-NFC phones? Will they be shown a message like "this app is not supported on your phone" or will they have to face post-installation frustration?

That depends on the app. For using NFC in an app the developer has to declare that in the app's AndroidManifest.xml that is contained it the app (and used by the PlayStore to detect if an app is compatible at all).
When using a feature you can declare if it is required=true or not, if it is not required it is considered optional:
<uses-feature android:name="android.hardware.nfc" android:required="true"/>

Therefore for apps that declare the NFC feature as required=true PlayStore will not show you those apps on a non NFC phone. If it is set to optional (required=false) then you will be able to see this app.
See also https://stackoverflow.com/questions/52695866/does-nfc-permission-result-in-an-error-when-the-device-has-no-support


text:
Draw unlock pattern without having to swipe first
When an Android 10 phone is locked, it shows notifications and says "Swipe to unlock", then after swiping it hides the notifications, and shows the pattern lock saying "Draw unlock pattern". So the unlocking requires two steps (swiping and then drawing).
Andriod 4 directly shows notifications and the pattern lock below them. The screen is smaller than on the Android 10 phone, but it still all fits on the screen. How can this be achieved on Android 10, without the unnecessary first swiping step?
This is not about Android 3 like here nor Android 6 like here.
This is not about changing the timer for the swipe like here, but about removing the swipe completely.

claim it to google but we have to live with


text:
How to reinstall of Android on a tablet?
I am learning Android app development. I wanted a cheap tablet to test how apps looked on tablet as opposed to mobile. I bought a cheap tablet from wish.com.
OK, stop laughing at that last bit... it seemed like a good idea at the time.
What I received (and was subsequently refunded for), was a tablet that seems to be locked to only the Chinese app store that was already installed. I can't install Google Play (I have tried multiple versions), and therefore it is pretty useless to me.
I did manage to install a version of Droid Info which pulled up various data, build number, kernel, Android version etc.
Is there any way I can use that data to find, and flash the device with a clean version of Android that might work?
This thing is good for nothing but the bin, otherwise.
Appreciate any suggestions.
UPDATE ---
Screenshot below of what is displayed on the 'about this device' section of the OS settings. Hope that sheds some light on the device model.

It depends a lot on the tablet model. Can you dig it somewhere? Probably there is some "about this tablet" or similar in the system settings.

Btw, your case is absolutely not so bad, although rooting / reinstalling the Android will take some learn and work. But also learning the app development will be. If you can not root it, and do not brick it, you can sell it to others - maybe its worth is zero for you, but it might be pretty useful for a Chinese. The bad thing is only that these cheap chinese phones/tablets are mostly unsupported by the alternate Android versions (LineageOS).

@alecxs I think it does not - instead of a generic answer, it would be much better to have a google-searchable repository for all the Android-capable phones/tablets with a how-to-root tutorial.

@peterh-ReinstateMonica not worth it. broad question, broad answer. no guesswork

@alecxs If the OP writes his exact model, then it is not broad. If he does not, I agree in this. In the general case, I think getting a good place in the google search for "how to root " queries would be extremely useful. Currently these questions are answered by the *-developers. That site... well they would imho profit a lot if the posts there would be editable/downvotable.

Not all manufacturers provide stock ROM (especially for unpopular/unrecognized brands). If there's no stock ROM, then another workaround is custom ROM, but the problem is that there's no generic Android ROM that can be installed on any device. Instead, every custom ROM has to be built specifically for the specific model, so without any device/build information, we can't help either...


text:
Any way to preserve portable hotspot configuration (SSID, key)?
How can I preserve my initial portable hotspot configuration (mainly current SSID, encryption) settings on my device. I noticed when I use 3rd-party applications (such as WiFi transfer, Mi Drop etc) my hotspot configuration gets messed up and worse deletes the previous encryption, sometimes I only find out later that situation.
So in case of unattended session, I would love to preserve my initial config, to prevent unauthorised access to portable hotspot, which could incur significant data charges. Is there a way to achieve that [Running Android 7.0, Miui 11]
I had automation in mind to restore back to original setting, (but can't figure out full workaround) where the trigger type is WIFi tethering state → Enabling(but the limitation here I can't put the desired config rather its just an on switch AFAIK but I may be wrong)

Have you tried restoring the backup of /data/misc/wifi/softap.conf and rebooting the device?

No not yet,will definitely try that


text:
My Galaxy J7 phone is not connecting to the Internet without WiFi anymore, anything I can test / verify to make it work?
What would be the reasons for which my Android would not connect to the Internet using the Mobile Data mode? (that open is ON)
I don't go out much these days since there is Covid, but I'd like to have Internet once in a while and somehow the Mobile Data doesn't seem to connect, yet I can do phone calls just fine. It's it using the same connection for data?
I do have a data plan in good standing and it definitely worked before (last time I can say I tried was some time last summer, so about 6 months ago).
Any idea what I could try next?

Probably a problem with Access Point configuration. Since you mentioned Tmobile, have a look at this : https://www.t-mobile.com/support/devices/android/t-mobile-revvl/network-apn-and-volte-t-mobile-revvl

@KaranRajBaruah I've seen that info on my phone, I now compared with the data on that page, it's mostly equal. I would imagine that it's set automatically? Oh and also I can't edit the info anyway, so you'd hope it is automatic... :-)


text:
What’s the best way to migrate data from multiple user profiles on a Samsung tablet?
I have a Samsung galaxy tab s4 with several user profiles.  I bought a new Samsung galaxy tab s6 lite that I would like to migrate to.  However, when I used smart switch, it only transfers the admin account without the additional user profiles.  Smart switch does not seem to support user profiles at all.  Third party apps like CloneIT don’t seem to connect. Is the normal method in this case manually copying everything by hand?   What is the best way to migrate multiple user profile data to a new Samsung tablet?

I believe the answer is there is no native support for backups or migration because of isolated mount namespaces so one method is to use the adb as shown here


text:
How can I access my SanDisk sdcard from Linux Deploy
How can I access my SanDisk sdcard
I would like to know how to see it contents and set it RW property, ejected it copy,delete and so on from the command line using JuiceSSH and vnc file manager going though  Linux Deploy on android 4.2.2
Ubuntu 14.04 LTS [running via Linux Deploy]
Last login: Tue Dec 15 16:16:47 2020 from localhost
$ su
root@localhost:/home/android# lsusb
Bus 001 Device 003: ID 0781:558a SanDisk Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@localhost:/home/android#

Thank You

properties - Allow to mount the Android resources
properties - Edit the mount points list

$ANDROID_ROOT
/cache
$ANDROID_DATA
/su
$ANDROID_STORAGE/emulated
$ANDROID_STORAGE/4D47-9860

this result in
ubuntu@localhost:~$ df -a
Filesystem                                                     1K-blocks     Used Available Use% Mounted on
/dev/block/loop1                                                 3030800  1858236    998896  66% /
proc                                                                   0        0         0    - /proc
sys                                                                    0        0         0    - /sys
tmpfs                                                            1010636      740   1009896   1% /dev
tmpfs                                                            1010636        0   1010636   0% /dev/shm
devpts                                                                 0        0         0    - /dev/pts
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/system     2483744  2045332    422028  83% /system
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/cache       245679     2165    226311   1% /cache
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/userdata  11608792  8786360   2789664  76% /data
/dev/block/loop0                                                   92656     8064     82628   9% /su
/data/media                                                     11608792  8786360   2789664  76% /storage/emulated
/mnt/media_rw/4D47-9860                                         31150720 25943968   5206752  84% /storage/4D47-9860
ubuntu@localhost:~$

on android 4.2.2 the paths differ
$ANDROID_ROOT
/cache
$ANDROID_DATA
$EXTERNAL_STORAGE
$SECONDARY_STORAGE

this will bind mount all android partitions into linux chroot container
(the latter one is your external MicroSD card)
/system
/cache
/data
/storage/sdcard0
/storage/sdcard1

thanks but that did not work for me or you lost me in your method

have updated the paths according to some old android 4.2.2 device i found


text:
How to debug the kernel if the device only boot to fastboot
I am tring to compile the kernel source provided by the manufacture of my phone(OPPO PCCM00 precisely). Since it's not "well-opensourced", I changed quite a lot to make sure the kernel would compile without any errors.
However when I tried to boot the device after fastboot flash boot boot.img, the device only comes to fastboot.
I tried pull the dmesg out with TWRP developed by another owner and it goes like this.
<6>[    0.000000]  (0)[0:swapper]Booting Linux on physical CPU 0x0
<5>[    0.000000]  (0)[0:swapper]Linux version 4.14.117-perf+ (root@cp-ubuntu-123-78) (clang version 8.0.12 for Android NDK) #2 SMP PREEMPT Thu Mar 5 03:47:08 CST 2020
<6>[    0.000000]  (0)[0:swapper]Boot CPU: AArch64 Processor [51df805e]
<6>[    0.000000]  (0)[0:swapper]Machine: Qualcomm Technologies, Inc. SM8150 V2 PM8150 MTP
<6>[    0.000000]  (0)[0:swapper]earlycon: msm_geni_serial0 at MMIO 0x0000000000a90000 (options '')
<6>[    0.000000]  (0)[0:swapper]bootconsole [msm_geni_serial0] enabled
<3>[    0.000000]  (0)[0:swapper]OF: reserved mem: OVERLAP DETECTED!
<3>[    0.000000] disp_rdump_region (0x000000009c000000--0x000000009e400000) overlaps with cont_splash_region (0x000000009c000000--0x000000009e400000)
<6>[    0.000000]  (0)[0:swapper]Reserved memory: created CMA memory pool at 0x00000000ff400000, size 8 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node sp_region, compatible id shared-dma-pool
<6>[    0.000000]  (0)[0:swapper]Reserved memory: created CMA memory pool at 0x00000000fe400000, size 16 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node user_contig_region, compatible id shared-dma-pool
<6>[    0.000000]  (0)[0:swapper]Reserved memory: created CMA memory pool at 0x000000027dc00000, size 36 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node mem_dump_region, compatible id shared-dma-pool
<6>[    0.000000]  (0)[0:swapper]Reserved memory: created CMA memory pool at 0x00000000fbc00000, size 40 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
<6>[    0.000000]  (0)[0:swapper]Reserved memory: created CMA memory pool at 0x00000000f6000000, size 92 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node secure_display_region, compatible id shared-dma-pool
<6>[    0.000000]  (0)[0:swapper]Reserved memory: created CMA memory pool at 0x00000000f5000000, size 16 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node qseecom_ta_region, compatible id shared-dma-pool
<6>[    0.000000]  (0)[0:swapper]Reserved memory: created CMA memory pool at 0x00000000f4000000, size 16 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node adsp_region, compatible id shared-dma-pool
<6>[    0.000000]  (0)[0:swapper]Reserved memory: created CMA memory pool at 0x00000000f3c00000, size 4 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node cdsp_region, compatible id shared-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x000000008b700000, size 5 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node camera_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x000000008bc00000, size 1 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node pil_wlan_fw_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x000000008bd80000, size 0 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node pil_npu_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x000000008be00000, size 30 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node pil_adsp_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x000000008dc00000, size 160 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node modem_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x0000000097c00000, size 5 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node pil_video_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x0000000098100000, size 20 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node pil_slpi_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x0000000099500000, size 0 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node pil_ipa_fw_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x0000000099510000, size 0 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node pil_ipa_gsi_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x0000000099515000, size 0 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node pil_gpu_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x0000000099600000, size 1 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node pil_spss_region, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x0000000099700000, size 20 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node cdsp_regions, compatible id removed-dma-pool
<6>[    0.000000]  (0)[0:swapper]Reserved memory: created DMA memory pool at 0x000000009e400000, size 20 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node qseecom_region, compatible id shared-dma-pool
<6>[    0.000000]  (0)[0:swapper]Removed memory: created DMA memory pool at 0x00000000a4c00000, size 12 MiB
<6>[    0.000000]  (0)[0:swapper]OF: reserved mem: initialized node cdsp_sec_regions, compatible id removed-dma-pool

I couldn't find any thing useful because it looks so much like the prebuilt kernel extracted from stock firmware, there is no kernel panic and I found and the timestamp in the second line does not seem to be right.
My wild guess is that I am not debugging it in the right way, the actual log for my compiled kernel is flushed when it boots to recovery or the system.
So is there any advice for me the to debug the kernel without booting to other environment?
I really apperciate your help.
the kernel source can be found here

you can't debug because it is not booting. what you flashed just brings phone to dead, there is no log. TWRP has it's own kernel and dmesg is of no use at all

@alecxs Linux kernel has some options to log not only to the console. Surely it can log into an rs232 port. Maybe it can log even to the network. I don't know, how do they work. Possibly also other options exist. I don't know the details. In the case of the Android, I think it should log into a raw partition which could be later analyzed by twrp. I also do not know if it is possible, but if not, probably it does not need a very complex patch.

@peterh-ReinstateMonica if you flash garbage to boot partition then there is no kernel and no log

@alecxs Op can boot twrp, so booting should work.

@peterh-ReinstateMonica how is the relation between boot and recovery here? at least on non- system-as-root devices they are completely independent, and it makes absolutely sence because recovery is a separate fallback OS in case boot is broken

Thanks to both of you, sorry I might have not post my situation clearly, but I do think @alecxs is right, because the twrp I used was compiled by another person with prebuilt kernel, my own compiled  one also only boots to the bootloader/fastboot. I might need to re-check the configuration  I use, it's a SAR device running Android 10, the deconfig file I used  is in arch/arm64/config/vendor/sm8150-perf.deconfig(link), any advice on where to start? Thx


text:
Bootloader is unlocked, fastboot returns ''FAILED (Remote: Verify state locked)
I am trying to root my Vivo V11 with Android 10. The bootloader is unlocked. It says so in the dev settings, and I have to go through the warning prompt every time I reboot my device. When I run the fastboot command to flash the patched_boot.img file, it returns:
C:\Program Files\Minimal ADB and Fastboot>fastboot getvar unlocked
unlocked: yes
finished. total time: 0.002s

C:\Program Files\Minimal ADB and Fastboot>fastboot flash boot patched_boot.img
target reported max download size of 134217728 bytes
sending 'boot' (38579 KB)...
OKAY [  1.269s]
writing 'boot'...
FAILED (remote: Verify state locked)
finished. total time: 1.276s

Things I've tried to troubleshoot:
Running cmd as Administrator (im using win10)
Confirmed OEM unlocking is turned on in the dev settings (it is, it says "bootloader is already unlocked"
Confirmed USB debugging is on
Disabled "Verify apps over USB" and "Verify bytecode of debuggable
apps" in the dev settings.
Confirmed file transfer is enabled from my PC and my Phone (it is, I can transfer files back and forth between them)
Tried a different USB cable
[EDIT]
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\adb devices
List of devices attached
ZDIBLVIRY5DIJBEI        device

PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\adb reboot-bootloader
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot devices
ZDIBLVIRY5DIJBEI        fastboot
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot flash boot patched_boot.img
Sending 'boot' (38579 KB)                          OKAY [  1.272s]
Writing 'boot'                                     FAILED (remote: 'Verify state locked')
fastboot: error: Command failed
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot flash vbmeta vbmeta.img
Sending 'vbmeta' (4 KB)                            OKAY [  0.009s]
Writing 'vbmeta'                                   FAILED (remote: 'Verify state locked')
fastboot: error: Command failed
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot --disable-verity flash vbmeta vbmeta.img
Rewriting vbmeta struct at offset: 0
Sending 'vbmeta' (4 KB)                            OKAY [  0.010s]
Writing 'vbmeta'                                   FAILED (remote: 'Verify state locked')
fastboot: error: Command failed
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools> .\fastboot --disable-verification flash vbmeta vbmeta.i
mg
Rewriting vbmeta struct at offset: 0
Sending 'vbmeta' (4 KB)                            OKAY [  0.009s]
Writing 'vbmeta'                                   FAILED (remote: 'Verify state locked')
fastboot: error: Command failed
PS C:\Users\Himanshus\Downloads\platform-tools_r30.0.5-windows\platform-tools>

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

@alecxs I tried flashing a empty vbmeta.img but while flashing it the result is still same. While writing 'vbmeta' it says failed verify state locked

use official platform-tools and fastboot with proper flags

@alecxs i have edited the post for results it still can't verify

try fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img and don't use Powershell btw, run C:\Windows\System32\cmd.exe as Administrator

@alecxs still same error. Does it has something to do with device. I have Vivo V11 with android 10

readback boot + vbmeta from SP Flash Tool. open the dumped files with hex editor and double check the dumps are identical with stock ROM (to confirm the scatter file fits your phone) - then - and only then - flash vbmeta_disabled.img from SP Flash Tool. always make sure to flash in "Download only" mode only. always uncheck preloader. try to boot. finally patch the dumped boot with magisk manager and flash magisk_patched.img


text:
How to access forgot-password option when you forgot the PIN of your Android Device?
I have this Huawei Nova 3i, I forgot the PIN but there's no "forgot password" or "forgot PIN" option. I noticed that my Huawei Nova 2i doesn't have that option too, and I'm stuck on "Try again after 24 hours".
Normally, when I forgot my password or pin, I just click on the "Forgot Password" option, input the Google Account Password that is bound to the device, and viola, password or pin successfully reset.
Is there a workaround here to use that option?

google has removed the password option from find my device. i am not sure if that is related to local ROM unlock options, but android is developed by google and i believe that option is no longer available on recent android in general

You can go to google find my android page. Log in to your Gmail account linked with Huawei Nova 3i.
You get 3 option lock / unlock , erase and sound. Use unlock screen option. Now you can access mobile and change passcode. Or take full backup of mobile and restore it.
You can start mobile in recovery mode using volume and power button. Wipe Cache partition. This will remove passcode.

As @alecxs commented, there is no more option for unlocking your android device on Google Find My Device. The only options left are PLAY SOUND, SECURE DEVICE, and  ERASE DEVICE.

Also, wiping cache won't remove the PIN/Password/Pattern, it's not related to security, it's just for cache.


text:
Does sync work on Firefox Lite for Android
As a privacy conscious user I am trying to decouple as much as possible from our internet overlords Google, Facebook, Twitter et al. To that end I have decided to shift from using Google Chrome to Firefox as my primary web browser both on my computer as well as my Android mobile device.
The main Firefox app for Android is quite big, and there is a smaller substitute for called Firefox lite. My preference is to use Firefox lite but it is essential for me to be able to sync my bookmarks and saved logins across my computer and mobile device. While the main Firefox app allows me to sync, I haven't been able to figure out how to sync over the Firefox lite app. Has the sync feature been excluded for this "lite" version of Firefox?

Synchronization is not mentioned in the app description of the lite version but on the full version it is mentioned.


text:
ADB PULL (of app_pocess) fails with exit code 1
I am trying to pull a file from my phone (Blackberry Key2 / And 8.1) and it fails with exit code 1:
[host] admin$ adb pull /system/bin/app_process ./ ; echo $?
1

I confirmed the source file exists, and I have have write permission to current folder, and to /tmp, but it always fails for file "app_process".  I tried pulling a simple text file from /sdcard/test/myfile.txt to /tmp  and that works.  So for some reason app_process won't pull!
I restarted adb daemon, confirmed phone is in developer mode (and all options permitted) , restarted the host (Mac), ran adb with sudo, etc.  No difference, and no error message.
I am running adb v1.0.41, version 30.0.5-6877784 on Mac OS
I saw this post that suggests it might relate to a symlink, but trying to pull app_process32 (which is a file) has same issue.
How do I solve or debug this?  (This command is part of the final build process so this command has to work)

/system/bin/app_process is globally accessible. You can use Termux to copy the file to /sdcard/ and then pull from there.

yes shell works, and I can copy that file around in the shell.  I can use (termux) or other alternatives, since this command is run from another  program that builds my app

I did that already.  I could pull a text file (from /sdcard no problem)

I confirmed it does not exist on host.  I am running command from an empty directory

adb exec-out 'cat /system/bin/app_process 2> /dev/null' > app_process

The cause was surprising, but poor error reporting even more frustrating.  My devices is connected using USB, passed through to a VM.  It seems USB timing issues cause the connection to be intermittent or out of spec.  But not enough to cause an error in system log.
abd do not complain about the latency or loss of connection, just quietly died with error 1.  Switching to a TCP connection from USB resolved the problem

still no explanation why adb pull app_process fails but adb pull myfile.txt works

It seems to be intermittent.  The myfile.txt was a very small file, so that's probably why it did xfer long enough to timeout


text:
Is there a "recycle bin" option in EMUI 9.1.0?
I have deleted 47G worth of photos and no space has freed up. I have a Huawei Honor 9 (STF-AL10) EMUI 9.1.0 phone that I bought in China. What do I need to do in order to claim back that space that is still for someone reason occupied by my deleted photos?
Thank you.

Which app did you use to delete photos? Unlike other OS's trash/recycle bin would be separate for each app. If it is a Gallery app, look for something  called trash or deleted. Same goes for default file manager. Other option is to use an app called Diskusage. It would scan your internal storage and show a hierarchal view of what is taking most space.

May help: https://android.stackexchange.com/a/216132/218526

I used the HiSuite on my PC.