text:
How does the Google Play signing certificate looks like
Since some time it is possible to opt in for Application to be signed with Google maintained key. How does the certificate looks like? Is it a self signed one like before, or maybe it is issued from some Google one?

As far as I know the applications signed by Google is simple that you upload your private key + certificate and Google then performs the signing instead of the app developer. The certificate and the created signature is identical to the one created by a developer.
I would assume that Google introduced this feature because a lot of developers loos their app signing keys and are then unable to publish updates for an existing app.

Looks like there's a possibility that if the developer doesn't provide their own the signing key, then it will be generated by Google and cannot be downloaded. I guess the question asks for the automatically generated one.

@AndrewT From my understanding this is just a convenience functionality so that the developer does not have to generate a private key and then upload it to Google. As already all apps provided in the Google PlayStore are additionally signed by Google (aka "frosted") it is just not necessary to change something in the app signing key generation process when it runs in the Google cloud.

@Robert the question is about the certificate used by google to sign the app, is it self signed or maybe there is some trust path to check if it is a google cert

@majkrzak I had access to a large pool of popular Android apps from the last year (~12k apps) and I checked all of them for their signature using apksigner. Most apps have a single self-signed certificate. Only a few apps from Microsoft and Amazon use a certificate chain, but only the leaf cert is included. Not a single app used a root-cert of Google. I would assume that at least a few apps of those 12k have their cert generated by Google. Therefore I think we can take it for sure that the Google generated certs are no different to the user generated.

It is RSA 4096 self signed certificate:
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            ...
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = US, ST = California, L = Mountain View, O = Google Inc., OU = Android, CN = Android
        Validity
            Not Before: ... 2020 GMT
            Not After : ... 2050 GMT
        Subject: C = US, ST = California, L = Mountain View, O = Google Inc., OU = Android, CN = Android
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                RSA Public-Key: (4096 bit)

You should elaborate a bit more. Just pasting a certificate dump is not a good answer.

@Robert I'm not really sure what should I add there (ok for sure where those cert comes form: it was generated yesterday for the new app using google console) Can you merge my "answer" into yours, It seems im not the best in selfanswering

Well first you should briefly describe what you did and that the presented certificate has been generated via Google by you (my assumption).


text:
Disable IPv6 entirely on a Xiaomi Mi A3
I am running Android One 9 on a Xiaomi Mi A3 and am trying to stop it from using IPv6 DNS servers, as they are essentially turning my RPI4 running Pi-Hole into a useless lump of silicon. How can I do this without having the phone ignore my instructions??
I have tried setting the WiFi connection to use a static IP and DNS info, as well as both the sudo sysctl -w net.ipv6.conf.wlan0.disable_ipv6=1 and the older echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6 commands but to no avail...the file retains the value 0 and my phone insists on using one IPv4 and one IPv6 DNS server no matter what I try!
Please help me end this madness! MTIA :-)

Nevermind, I finally managed to configure this at a network-wide level by disabling IPv6 on my router. Now Pi-Hole works across all my devices. Happy days! :D

source: Stack Exchange

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

sort: votes


text:
Enable vibration and location services while on battery saver
I like using battery saver on my Android phone as it greatly extends the battery.  However, there is one app that I use that I would like to exempt from two of the things that batter saver disables - vibration and location services.
I'm ok with the battery usage for these on this one app only but want to restrict all other apps from using the battery.
How can I accomplish this?

Vibration and GPS are considered as system services, not apps. Thus, it cannot be exempted on the usual setting when Battery Saver is enabled. However, since Android 8.0 Oreo, it is possible to tweak some settings for Battery Saver.
This is related to the BATTERY_SAVER_CONSTANTS global settings that can be modified through ADB.
/**
         * Battery Saver specific settings
         * This is encoded as a key=value list, separated by commas. Ex:
         *
         * "vibration_disabled=true,adjust_brightness_factor=0.5"
         *
         * The following keys are supported:
         *
         * <pre>
         * advertise_is_enabled              (boolean)
         * datasaver_disabled                (boolean)
         * enable_night_mode                 (boolean)
         * launch_boost_disabled             (boolean)
         * vibration_disabled                (boolean)
         * animation_disabled                (boolean)
         * soundtrigger_disabled             (boolean)
         * fullbackup_deferred               (boolean)
         * keyvaluebackup_deferred           (boolean)
         * firewall_disabled                 (boolean)
         * gps_mode                          (int)
         * adjust_brightness_disabled        (boolean)
         * adjust_brightness_factor          (float)
         * force_all_apps_standby            (boolean)
         * force_background_check            (boolean)
         * optional_sensors_disabled         (boolean)
         * aod_disabled                      (boolean)
         * quick_doze_enabled                (boolean)
         * </pre>
         * @hide
         * @see com.android.server.power.batterysaver.BatterySaverPolicy
         */
        @UnsupportedAppUsage
        @TestApi
        public static final String BATTERY_SAVER_CONSTANTS = "battery_saver_constants";

For the possible integer values of gps_mode:
/**
     * Either the location providers shouldn't be affected by battery saver,
     * or battery saver is off.
     */
    public static final int LOCATION_MODE_NO_CHANGE = 0;

    /**
     * In this mode, the GPS based location provider should be disabled when battery saver is on and
     * the device is non-interactive.
     */
    public static final int LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF = 1;

    /**
     * All location providers should be disabled when battery saver is on and
     * the device is non-interactive.
     */
    public static final int LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF = 2;

    /**
     * In this mode, all the location providers will be kept available, but location fixes
     * should only be provided to foreground apps.
     */
    public static final int LOCATION_MODE_FOREGROUND_ONLY = 3;

    /**
     * In this mode, location will not be turned off, but LocationManager will throttle all
     * requests to providers when the device is non-interactive.
     */
    public static final int LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF = 4;

As stated on XDA Developers, How to Customize Battery Saver Mode in Android 8.0 Oreo:

Install ADB and USB drivers if necessary.
Connect the Android device to the PC with USB and wait until the device is detected
Open a command prompt and type adb devices to make sure the ADB detects it.
Type adb shell
Decide which values wanted to be changed. Inputting multiple keys are supported with comma separation. For this specific question: vibration_disabled=false,gps_mode=0
Type settings put global battery_saver_constants <new_value>. Note that the change is permanent, so to undo, the user needs to manually input the opposite values instead.

On rooted devices, it is also possible to run the settings command directly from the device using terminal apps like Termux.

This is very helpful, thanks!  I think for my use, gps_mode=3 would work well, as my app runs a service which is foregrounded for GPS events only when I tell it to run, while other apps that run in the background will get denied and not use extra battery.

I have tested this out and it works perfectly.  I appreciate this this awesome answer and am going to wait to accept until I can give you some bounty points for it. :-)

After running with this for over a day, I noticed that my app had stopped producing screen off vibration when in battery saver mode.  I then checked GPS and it would no longer lock or report positions in the same.  But I reconnected USB and reran the adb command and now it's working again.  Perhaps it's less permanent than you thought?  I didn't install anything such as updates in the interim.

@Michael Unfortunately, I don't have an Android 8.0 or higher to test... and in theory, the setting should preserve permanently. However, I can't expect much since each vendor may behave differently and something might overwrite the value. Perhaps a new question regarding "preserving settings value" or "identifying the app/process that modifies the settings value" could be a good candidate... (though, the comment thread on How to make changes done through adb settings put persist through device reboots? might hint a more complex issue...

I don't even remember rebooting the device!  Ah well, it's useful although if I'm going to have to periodically reset it I'm going to try to automate it somewhat. :-)

Assuming you have a Pixel 3XL and using the system level battery saving,
From: https://dontkillmyapp.com/google
Pie and pre-Pie
If you see background processing issues, overall it is a good idea to make your app not battery optimized to ensure it gets the freedom it needs to perform in the background.
For that:

Go to Settings > Apps > Your app > Advanced > Battery > Battery optimization
Change view to All apps
Search for your app
Choose Not optimized

From the comments:

my app is already not optimized, but vibration doesn't work nor does GPS with the screen off when power saver is on.

So as stated in: https://support.google.com/pixelphone/answer/6187458?hl=en
What happens when Power Saver is on:

Apps only refresh their content, like email or news, when you look at the app.
Location services stop when your screen is off.
Apps stop doing things in the background, unless you turn off battery optimization.
Your phone stops listening for "Ok Google.” Instead, you need to squeeze your phone or tap the Assistant icon Assistant.
Dark theme turns on.
Your phone and notifications may be delayed.

So your app not receiving GPS/location services is covered by Power Saver behavior, as to why vibration isn't working I can't say without knowing why vibration is occurring unless its related to any of the above items like location or a background process.

my app is already not optimized, but vibration doesn't work nor does GPS with the screen off when power saver is on.

@Michael See update to answer.

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


text:
China phone new, touch not working
Maybe anybody can help me. I got a brand new china phone (xgody) with no working touch. As it was a present to the Dominican Republic, back shipping was not an option.
As the situation goes a little pressured now in Virus times, I do not have the money to buy a new phone and I need at least an emergency phone.
The screen looks perfectly fine, the buttons work, just the touch does not do anything. (I reached the google account password when it happened, after that no reaction on touch) For any reason, the USB connect is on charging only.

otg does not work on that phone
the only solution non-otg may be to enable USB debugging with adb command, but all solutions use nearly the same word by word and something is missing. I never get the command window from adb to write something. all articles say to hold power button, volume up/down + home button. My home button is touch, for that I cant do this.
Yes, I can reach factory mode on the phone, but there are only worthless tests, clear eMMC, version and reboot.

Anybody maybe can help me please.
thx so much in advance


text:
Reset PIN from adb shell
I have forgotten the PIN of a device but I do have access to a root shell with adb shell and su
Is there some way I could remove the screen PIN lock or change it?

Does this answer your question? Can not unlock my Android device as have no internet connection?

no your comment above is a better answer than the link.

if your device is not encrypted with login credentials you can delete locksettings.db
adb shell su -c "rm /data/system/locksettings.db*"

However, bear in mind the following files are required for FBE encryption. If you delete these files you won't be able to decrypt userdata partition, all data is lost
/data/system/gatekeeper.password.key
/data/system/gatekeeper.pattern.key
/data/system/locksettings.db
/data/system/locksettings.db-shm
/data/system/locksettings.db-wal

How exactly does FBE's key derivation work?

@alexcs solution can work without root / su (sorry I can't comment on his answer) :
adb reboot recovery

(wait for reboot)
adb shell rm /data/system/locksettings.db

and reboot into normal mode with :
adb reboot

Alas this isn't working on my phone either, In recovery mode, adb won't connect anymore. Reboot and it wiill. But in recover mode "error: no devices/emulators found". Recover mode offered a menu, and delete cache seemed safest but didn't help.

The big axe
A brute force solution existed as I had access to fastboot too.
To remove the PIN, removed the entire userdata partition with fastboot
fastboot erase userdata
as described here:
https://android.stackexchange.com/a/175887/320098

To wipe the entire partition is pretty brute force to be - it removes everything


text:
Does Google Takeout contain Android Backup for my devices?
In theory, Google Takeout lets you download all the data Google stores for you (or about you). Among these there should be the backup content of my Android devices.
Is it Android Backup included in the Takeout?
Should it be?
Is there a way to request that?

From https://takeout.google.com, you can download files stored in My Drive and Computers, which don't include mobile Backups:

From the question: Downloading Phone's Backups from Google Drive to PC or Alternative Phone:

You can not download the backup onto your PC. It can only be installed back onto the product it came from, or if it is an iOS or Android backup, then that can only go back onto that operating system (so back onto another phone or the same phone).

However you can "View details about a backup" and "Delete a backup" directly from a web browser or Google Drive app (source: Manage & restore your mobile backups in Google Drive).

I was afraid that was the case. I wonder how does it play with the GDPR and others, for which they built, right?

@GrzegorzOledzki sorry I'm very bad at grasping things related to ever-changing complicated legal matters. Personally I avoid products and services I don't trust. That's what I do in case of Google.


text:
Disable mouse acceleration on Android
I am using PrimeOS on my laptop. I have noticed that when I move a mouse slowly for about an inch, consider it travels some distance on screen line about 2 inches. But when I move the mouse rapidly for 1 inch as before, the distance traveled by the cursor is much more like about 3.5 inches.
I want to disable this mouse acceleration to get the same displacement of the pointer at both slow and fast speeds.

There's no API for that unfortunately, except on some of the latest SHIELD products that check for a com.nvidia.rawCursorInput manifest property.

Install SetEdit app, then on the System Table, find: Pointer Speed, then change its value from 1 to 0.

At least on samsung phones it seems like this might work.

The property in question accepts a wide range of values, at least [-5; 5], not just 0/1. Works exactly how you'd expect.

Open Settings > General management > Mouse and trackpad
Change Enhance pointer precision from the default value of enabled to disabled.
This will disable mouse acceleration in both Android and Samsung Dex.

The setting is in Android so plus oned it. But I  don't know if its in PrimeOs


text:
What could break an app download from the Play Store?
I cannot pinpoint exactly when it started, but I'm starting to get a lot of users complaining that they cannot download my app from the Play Store, the download always stops at 89%.
Users can download other apps, even bigger ones.
I tried to reproduce but to no avail. Could some antivirus prevent the complete download?
App bundle size is approximately 50 mb, the issue appears on a variety of devices and different Android Versions. Available storage space does not seem relevant.
I am aware that it is common for Android users to not be able to download apps for various reasons (lack of space, wrong configuration on user device), but here the issue seems to be that they cannot complete the download of this app in particular, it always fails at 89%, and it started recently (but I cannot be sure that it is linked to a specific release). This app has more than a million downloads and all my other apps are unaffected.
Update: an user told me it worked when he tried to download the app again

Have you tested your app with https://virustotal.com?

Thank you for the suggestion @Robert, but it was deemed clean by this website.

Then I don't see a way to change something other than just release a new version or open an issue at Google. May be the file-to-be downloaded is defect on certain Google cloud instances?

Unfortunately I already released a few versions since I was first notified of the issue and it doesn't seem to help. I have contacted Google Play support but I doubt they would be able to help...

If you use a bundle format then your app is decomposed into several chunks for different languages and screen resolutions. Maybe one of these chunks cannot be downloaded or it is broken.

I don't think that's it because an user told me it worked for him when he tried to download the app again.


text:
Unable to do factory reset on my vivo mobile without password
My mobile model is vivo y95. I forgot my new pattern which i have changed recently and im unable to unlock my mobile. So i tried to do factory reset on my mobile.
But when i click on Wipe data option it is asking pattern again.
Please let me know any option to unlock my phone (With factory reset also fine).

https://www.gsmsmall.com/2019/10/reset-pattern-vivo-y91y95-qualcomm.html

@alecxs Is it possible to do it with Ubuntu system?

yes and no. not with QPST, but with other tools https://android.stackexchange.com/q/224369

sudo apt-get install android-tools-adb android-tools-fastboot I cant download android adb tool also in my system Its showing 404 error

install apt-transport-https apt-get fails: The method driver /usr/lib/apt/methods/https could not be found or download platform-tools from google https://www.xda-developers.com/google-releases-separate-adb-and-fastboot-binary-downloads

@alecxs from the above link you sent me in first comment is not downloading tools properly.. Im getting only vlc files from the website

Please give me official link where i can get vivo reset pattern tools.. Im stuck with this since 3 days

there is no official reset pattern tool, the link is just instruction how to format userdata partition. you need to extract prog_emmc_firehose_8937_ddr.mbn from Split / QFIL Firmware

prog_emmc_firehose_8937_ddr.mbn ? Where i can get it?


text:
Green line on whatsapp video call after some time
When I have a video call, after some time, a green line will appear on the left portion of the screen.
It seems to appear from the other party's image.
Below is the screenshot:

When I switch the display, it still appears (it is showing a smaller green line as the other party's display was displayed in a smaller box).

Any idea what caused this and how to resolve it?

Looks to me like a glitch in the video codec. This may happen if the video data is transmitted via UDP and some packets git lost. Usually they should go away after a few seconds respectively after the next key-frame (a full image in difference to other frames that just transmit the changed parts of the image) has been transmitted.

Well, this one did not go away after a few seconds, it seems persistent for quite long time.


text:
How to disable high contrast text when that option isn't available?
I bought a new phone and the settings from my old phone were transferred during the initial setup.
One setting was "High contrast text" within Accessibility settings. I would like to deactivate this option. The reason I don't like it is that astronomy programs with a "night mode" (red on black) settings display black text with a white outline, and the white outline destroys my night -adapted vision.
My new phone, a Realme 5 - running Android 9 with the custom layer "Color OS 6" - doesn't have the high contrast text option available in its settings. Apparently the next version of Color OS does have this setting, but it's not yet available for my device in my country.
Things I have tried:

I have tried using restore factory settings to only restore system settings, but that didn't affect the high contrast text setting.
I have tried running getprop | grep text and looking to see if there's anything relevant, but there isn't.
I have tried deactivating the option on my previous phone, manually triggering a cloud backup, then using Activity Launcher to launch CloudRestoreFlowActivity, but it doesn't open.

The only related question I can find is this one but it applies to Android 5, and it's protected and I'm unable to add an answer.
(I'm asking this question to self-answer, because I've just solved the problem myself and couldn't find any valid solutions elsewhere: everything assumes that this option is available in settings but it isn't on my device)

I finally found the solution. A computer with ADB is required. Attempting to do this from a local terminal will fail with a permissions error: "Failed calling service settings: Failed transaction (2147483646)"
Prerequisites:

ADB enabled in developer tools.
The last option in developer tools, "Disable permission monitoring" I believe it's
called (on my Spanish phone it's "Desactivar supervisión de
permisos"), enabled. If not then the command will fail with the message

Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS

Then, with the phone connected to the computer, simply execute:
adb shell settings put secure high_text_contrast_enabled 0
Thanks to:

ADB+Accessibility
I can't enable WRITE_SECURE_SETTINGS for an app over ADB

Worked great for me! Thanks! Lifesaver! (also I'd reccomend webadb.com for a simple, browser based adb shell; no installation required!)

@Rafael I'm glad that this has helped someone else! (and thanks for the webadb tip!)


text:
How do I backup my website homescreen shortcuts?
I have many websites which I constantly access thru my phone, but they aren't bookmarked on Google, they're just added to my homescreen as a web shortcut.
Of course Windows is something else entirely, but I could just go to Desktop folder and copy everything *.lnk, right? Thing is, now I'm migrating phones. I already migrated all apps I wanted to keep. I feel there should be an equivalent easy way to do this, even without an app. Is there?

Everything on the home-screen is organized by the configured "launcher" app. Therefore it depends on the used launcher.
Some advanced launchers include a functionality to export the complete launcher configuration including web-links and all the other launcher icons.
The default launcher is usually modified by the manufacturer hence it is difficult to say what it supports.
As a fallback mechanism you can try to create an backup of the launcher via Android Debug Bridge (adb). However this requires to

Enable Developer menu
Activate in the Developer Menu the Android Debug Bridge
Connect your Android smartphone to your PC via an appropriate USB cable
Install the ADB drivers and ADB on your PC
Identify the package name of the used launcher
Perform the backup on the command-line/terminal of your PC via adb backup <packagename of launcher app> launcher-backup.ab.
Check the created file launcher-backup.ab if it is larger than a few kilobytes then the chance if good that the backup was successful

On the new device (or after a factory reset) you have to more or less perform the same steps. Just execute adb restore launcher-backup.ab as the last step.

I would like to add that if the browser through which the shortcuts were originally created is no longer installed and enabled in the target device the shortcuts won't be restored AFAIK. I had once created a demo web shortcut through Chrome. I disable Chrome and shortcut was gone even though Firefox was my default browser all the time. I enabled Chrome and the shortcut didn't come back.


text:
Streaming audio to windows10 through USB
I want to listen music from my android device (Xiaomi Redmi Note 7).
I checked this page that tell you maybe the best option to do that.
Stream audio to windows10 through USB
But the issue is that when i plug the aux cable into my phone, it recognize it like an headphone. And after i plug the cable into mic port into pc it doesn't recognize it like an headphone anymore.
If i play an audio just in that second when i connect it to pc it work, after changing song my phone doesn't regonize it like an headphone again.

Does it work at all at least for a short time? If yes does the audio play in stereo? An alternative way to transmit audio to the PC would be to use Bluetooth. Theoretically this should also work.

You should get an external digital-to-analog converter (DAC) and an appropriate amplifier for your headphones and/or speakers. That will provide far better sound quality than the headphone jack on your phone or Bluetooth.


text:
Access encrypted /data Partition over ADB and recovery (TWRP, LineageOS 16, Redmi Note 4)
I have a Redmi Note 4 (mido) Android phone with a broken screen: the screen lights up, but otherwise it stays entirely "black". I already replaced the screen, but with no luck - the cause of the error must be somewhere else. The phone has data-encryption enabled with an unlock-pattern. Now I'm trying to access the data on the phone, but did not succeed so far. Here is what I've done so far:

Connected the phone to a PC over USB.
Started the phone in fastboot-mode by pressing and holding the buttons vol-down and power simultaneously.
Booted the latest version of TWRP for mido: fastboot boot twrp-3.3.1-0-mido.img.
Opened adb shell and presumably managed to decrypt the data (found instructions in the TWRP Commandline Guide):

TWRP decrypt:
~ # twrp decrypt 41236
Attempting to decrypt data partition via command line.
Data successfully decrypted, new block device: '/dev/block/dm-0'
Updating partition details...
...done
Unable to mount storage
~ #

Unfortunately, the block device /dev/block/dm-0 cannot be mounted.
This is the result of fdisk:
~ # fdisk -l /dev/block/dm-0

Disk /dev/block/dm-0: 57.0 GB, 57033580032 bytes
255 heads, 63 sectors/track, 6933 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/block/dm-0 doesn't contain a valid partition table

So I pulled an Image of the block device with adb pull /dev/block/dm-0. This image has a size of 57,033,580,032 bytes.
I tried to mount this image in Ubuntu 20.04, but did not succeed:
# file /media/sf_U_DRIVE/Note4Data/dm-0.img
/media/sf_U_DRIVE/Note4Data/dm-0.img: data

# fdisk -l /media/sf_U_DRIVE/Note4Data/dm-0.img
Disk /media/sf_U_DRIVE/Note4Data/dm-0.img: 53,12 GiB, 57033580032 bytes, 111393711 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

# mount -o loop /media/sf_U_DRIVE/Note4Data/dm-0.img /mnt/Note4Data
mount: /mnt/Note4Data: wrong fs type, bad option, bad superblock on /dev/loop3, missing codepage or helper program, or other error.

# mount -t ext4 -o loop /media/sf_U_DRIVE/Note4Data/dm-0.img /mnt/Note4Data
[ 6986.649794] EXT4-fs (loop3): VFS: Can't find ext4 filesystem
mount: /mnt/Note4Data: wrong fs type, bad option, bad superblock on /dev/loop3, missing codepage or helper program, or other error.

# mount -t f2fs -o loop /media/sf_U_DRIVE/Note4Data/dm-0.img /mnt/Note4Data
[ 7004.610412] F2FS-fs (loop3): Can't find valid F2FS filesystem in 1th superblock
[ 7004.615289] F2FS-fs (loop3): Can't find valid F2FS filesystem in 2th superblock
mount: /mnt/Note4Data: wrong fs type, bad option, bad superblock on /dev/loop3, missing codepage or helper program, or other error.

I wonder if I need to mount the image in another way (with offsets? with LVM?) or if the decryption did not work. TWRP creates a log file in /tmp/recovery.log. After running the twrp decrypt command, the following lines are added:
I:Command 'decrypt 41236' received
I:Set page: 'singleaction_page'
I:operation_start: 'TWRP CLI Command'
Attempting to decrypt data partition via command line.
D:crypt_ftr->fs_size = 111393711
I:starting verify_hw_fde_passwd
I:Using scrypt with keymaster for cryptfs KDF
I:TWRP keymaster max API: 3
I:Signing safely-padded objectkeymaster module name is Keymaster QTI HAL
keymaster version is 256
Found keymaster1 module, using keymaster1 API.
I:Extra parameters for dm_crypt: fde_enabled ice
I:target_type = req-cryptI:real_blk_name = /dev/block/mmcblk0p49, extra_params = fde_enabled iceE:test mount returned 0
I:Found no matching fstab entry for uevent device '/devices/virtual/block/dm-0' - add
I:Found no matching fstab entry for uevent device '/devices/virtual/block/dm-0' - change
Data successfully decrypted, new block device: '/dev/block/dm-0'
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'
I:Actual block device: '/dev/block/dm-0', current file system: 'ext4'
Updating partition details...
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'
I:Actual block device: '/dev/block/dm-0', current file system: 'ext4'
I:Unable to mount '/sdcard1'
I:Actual block device: '', current file system: 'auto'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'auto'
...done
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'
I:Actual block device: '/dev/block/dm-0', current file system: 'ext4'
Unable to mount storage
/data | /dev/block/dm-0 | Size: 0MB Used: 0MB Free: 0MB Backup Size: 0MB
Flags: Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up Wipe_During_Factory_Reset Wipe_Available_in_GUI IsPresent Can_Be_Encrypted Is_Encrypted Is_Decrypted Has_Data_Media Can_Encrypt_Backup Use_Userdata_Encr
Symlink_Path: /data/media
Symlink_Mount_Point: /sdcard
Primary_Block_Device: /dev/block/mmcblk0p49
Decrypted_Block_Device: /dev/block/dm-0
Crypto_Key_Location: footer
Length: -16384
Display_Name: data
Storage_Name: Internal Storage
Backup_Path: /data
Backup_Name: data
Backup_Display_Name: Data
Storage_Path: /data/media
Current_File_System: ext4
Fstab_File_System: ext4
Backup_Method: files
MTP_Storage_ID: 65539
I:Unmounting main partitions...
I:Done reading ORS command from command line
I:operation_end - status=0
I:Set page: 'decrypt_pattern'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
SELinux contexts loaded from /file_contexts
Full SELinux support is present.
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'
I:Actual block device: '/dev/block/dm-0', current file system: 'ext4'
I:Unable to mount settings storage during GUI startup.
I:Copying file /cache/recovery/log to /cache/recovery/last_log
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'
I:Actual block device: '/dev/block/dm-0', current file system: 'ext4'
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'
I:Actual block device: '/dev/block/dm-0', current file system: 'ext4'
Unable to mount /data/media/TWRP/.twrps
I:Attempt to load settings from settings file...
I:InfoManager file '/data/media/TWRP/.twrps' not found.
I:Backup folder set to '/data/media/TWRP/BACKUPS/f707e0500604'
I:Copying file /etc/recovery.fstab to /cache/recovery/recovery.fstab
I:Version number saved to '/cache/recovery/.version'
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'
I:Actual block device: '/dev/block/dm-0', current file system: 'ext4'
I:Unable to mount '/sdcard1'
I:Actual block device: '', current file system: 'auto'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'auto'
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:PageManager::LoadFileToBuffer loading filename: '/twres/languages/en.xml' directly
parsing languageFile
parsing languageFile done
I:Translating partition display names
I:Backup folder set to '/data/media/TWRP/BACKUPS/f707e0500604'
I:Starting MTP
I:[MTP] Starting MTP
I:Can't probe device /dev/block/dm-0
I:Unable to mount '/data'
I:Actual block device: '/dev/block/dm-0', current file system: 'ext4'
MTP Enabled
I:Check_Lifetime_Writes result: '648837'
I:Switching packages (TWRP)
I:Starting Adb Backup FIFO
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:[MTP] created new mtpserver object
I:[MTP] MtpServer::run fd: 18
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 0

Any ideas what I should try next or where I could find helpful information?

when phone is still booting you can use scrcpy https://android.stackexchange.com/questions/213116

You don't need to use any offset in decrypted dm-0 device. It contains a standard filesystem at 0 offset. So mount should be able to detect it even without -t. There must be something wrong with your filesystem.

Thanks for all your input! Normal boot of the phone only worked until the pattern input screen for decryption. Anyway, today the phone died completely, and I'm left with my dump of dm-0. So far, I did not succeed in accessing its contents. TestDisk failed to find Intel or GPT partitions. Photorec did not find any intact files. fsck did not help either. I might be out of luck.

One thing I remember, though: I might have chosen to split the internal storage to format part of it as removable media. I think this once was a function in adb or in CyanogenMod. Could this be relevant?

sounds more like encryption was not successful, otherwise testdisk would detect file system type. you can look with HxD, if there are no zero bytes in file then it is still encrypted

Did you got any further with all of this?

Unfortunately not. As the device completely died in the meantime, I only have the dump of /dev/block/dm-0 which I cannot mount.

try this from TWRP terminal
busybox mount -t ext4 -o ro,noexec,noload /dev/block/dm-0 /data
busybox mount -o bind /data/media /sdcard
busybox mount -o bind /data/media/0 /sdcard

https://forum.xda-developers.com/showthread.php?t=3727158&page=3

Thanks for pointing me to this thread - although it's for Redmi 5. Unfortunately it does not work: busybox mount -t ext4 -o ro,noexec,noload /dev/block/dm-0 /data -> mount: mounting /dev/block/dm-0 on /data failed: Invalid argument. I also did the mentioned hexdump -C -n1088 /dev/block/dm-0, and I do not have 53 at 0x438. -t f2fs and -t vfat also do not work (same error message).

for F2FS you have magic 10.20.f5.f2 starting at 1024 byte

Ok, this is not in the image, so it does not seem to be F2FS. Thx!


text:
How to block all trafic outside home network and VPN by patching Android code?
I would like to patch LineageOS on my phone so it

opens Wireguard tunnel through the 4G network to the home network
routes all traffic from Android applications through a Wireguard tunnel or through the home network

I am really not sure which layer of Android should I patch. I was thinking about changing ip rule and ip route, but I am not sure if it is the best possible.
Can you imagine anything more faster than this?
Thanks.

What is wrong with the Always-On VPN function?

@Robert I don't know how to automatically deactivate it, when I come to my home network. VPN server is in other building and I don't want ping pong traffic across my network.


text:
Forward SMS messages to Telegram
I'd like to read my SMS messages without picking up my phone when I work on a laptop.
Telegram has a lot of handy bots for different things.
Is it possible to forward SMS messages to Telegram bot?

You can forward new SMS messages to Telegram bot.
Look at https://smsq.me

"This site can’t be reached. Check if there is a typo in smsq.me. DNS_PROBE_FINISHED_NXDOMAIN."


text:
Unable to install an APK file downloaded from a webserver
Im trying to download an apk file for a game that I cant access on Play store, but whenever I try it keeps saying APP NOT INSTALLED or there was a problem with the package, I read about a thing where sometimes it tries to install it into the SD card which I don't have a.

There are two main reasons why you don't see an app in Google PlayStore:

The app is not available in your country. In such a case you may be able to install the app manually via APK.
The app is not compatible with your device. If that is the case you can do what you want but the app installation will always fail. Unfortunately the on-device APK installer doe snot display the error message to you so it is not easy to understand why the installation fails. If you have Android Debug Bridge enabled (adb)  you can try to install the APK from your PC via USB and adb (adb install <apkfilename>). Then you will see an more detailed error message why the installation fails (e.g. Android version too old or other hardware features required by the app are not available).


text:
Connect via ADB to a physical X86 via USB
I have Android-x86 (version 9.0-r2) running in a Lenovo MIIX-320 and I have another PC running Linux. From the Linux host I can connect to any other Android device using an USB cable . But I can't connect to the Lenovo. Googling around I noticed that the vast majority of people connect to Android-x86 host via ADB using the network, what is not an option in this case.
Is there any service in the Android-x86 that I should use to allow ADB connections using USB?

USB is a master-slave system. The USB ports of a PC work as master. When connecting two PCs via USB both PCs want to work as master which don't work. I am not sure if a software like Android x86 can on software level "reprogram" one USB port as USB slave so that communication is possible. Another problem is that an USB PC-PC connection is physically impossible unless you are using USB-C.

In this case I'm using USB  Type C.

Then this question also applies to you: Is it possible to connect two PCs via USB C?

check if you have such setting in developer options: Plugging phone into laptop charges laptop instead of phone also this might helpful: Terminal emulator on Android device: Can I communicate with the terminal on my Linux machine over bluetooth?


text:
How to long-press in android 4.1.2 and 4.2.2 using ADB?
I discovered that the command below does not execute in android 4.1.2 and 4.2.2 but it executes from android 4.4+.
input touchscreen swipe x1 y1 x2 y2 [duration]

I am using my old android 4.1.2 and 4.2.2 in kiosk mode and I need my script to long-press on some areas but I can't get the above command to do the trick for me but it does work perfectly in my other android 4.4.2 and 4.4.4?
My question is, what files should I copy from my android 4.4.2 to my android 4.2.2 to get the above command to work in android 4.2.2 ?? Or is there any other means of doing it?
NOTE: I don't need sendevent method please, I only need input touchscreen swipe method. Thanks

try /system/bin/input binary from kk is running on jb (from /data/local/tmp)

Sorry please, I did not understand what you said I should do with the input binary from KK. Can you elaborate better please?

adb push input /data/local/tmp; adb shell; cd /data/local/tmp; chmod a+x ./input; ./input

After pushing the KK input binary to /data/local/tmp how can I execute it from terminal because I learnt that it is the shell that searches /system/bin or /system/xbin for binaries when your script calls a binary

call binary with full (or relative) path

Does the --longpress modifier works?
input keyevent --longpress ##

No it doesn't work in android 4.2.2. If I run input command it doesn't list --longpress as an available modifier, but does so in android 4.4.2+


text:
How to encrypt an SD card for android so that it can also be used on other devices?
When encrypting the SD card via Android's encryption it makes the SD card only usable on that device.
However if that device gets lost or broken or if one would like to access the SD card from another device such as another mobile phone (maybe even with another OS than android) or a computer the SD card isn't accessible.
This is why I'd like to encrypt my SD card with some other tool than the one built into Android.
Is there such an encryption tool for Android which allows you to de- and encrypt the SD card in a way that it can also be decrypted on other devices?
It would be best if the tool also automatically prompted the user to enter the SD card password right after Android has completed the entire boot-process. This question seems to be relevant: Cross-platform compatible encryption of SD-card for Android but it's not about specific tools/ways.
It should be capable of encrypting Android data on the SD card, convenient to use and install (FDroid or Playstore), secure, not put the card at risk of data-loss and not slow down the phone / read/write-speeds a lot.
Here I asked about a way to do this with Android's default SD card encryption mechanism without having to root the phone until a proper solution to this question exists.

There is another question linked inside the question you mentioned which is about specific tools/ways: Decrypting microSD card on another Android device or desktop computer

Thanks, that Q&A you linked is helpful. However, I couldn't find any concrete steps / recommended app there. The answer only discusses different technologies to use but not a simple and easy-to-implement practical solution in the form of an (intuitive) app downloadable from Playstore or FDroid. I'll check the technologies proposed there later.

the link is still there in the comments https://play.google.com/store/apps/details?id=com.sovworks.edslite

@mYnDstrEAm advanced solutions aren't for fainthearted, so there is no simple and easy-to-implement solution if you want something robust. All of the solutions provided there are practical which I have used/tested at different times for different purposes. I can provide detailed step if you choose which method you want to go with. It's a matter of compatibility with your OSes and how far you can go to implement the solution. But a simple solution is use Amdroid's built-in encryption on rooted device and keep a backup of encryption key so that SD card can be decrypted later on a PC.


text:
Is there anyway i can run the same Whatsapp account on both my android phone and android tablet at the same time?
I have a Samsung J6 phone, with Whatsapp installed.
I also have a Samsung Tablet, Tab A 2019.
Both are running the latest version of Android at the time of writing.
Ive downloaded and setup Whatsapp on the tablet, but this disassociates Whatsapp on my phone, is there anyway i can run the same Whatsapp account on both my android phone and android tablet ?

Yes, there is a way indeed. Install WhatsApp primarily on one of your devices. On another device, open google chrome and head to web.whatsapp.com. Now click the menu icon (on the top right of browser with 3 vertical dots), scroll down and check the "Request desktop site" option. Now you will receive the web version of WhatsApp on one of your devices. Scan the QR Code from your primary device.
Enjoy!


text:
What's the purpose of A and B partition slots if both are flashed?
I recently play with LineageOS flashing (or actually adb-sideloading) tutorials, but I guess my question is more generic.
In my device there are A and B partitions for everything except the userdata partition (and maybe something else). I understand the purpose is to provide extra safety against bricking. Should anything go wrong during a flashing operation, there's the other slot.
Now, every tool and manual procedure I have seen flashes both A and B. Doesn't it render the whole concept useless? What's the gain from A and B slots if we keep on putting the same to both?

with "every tool and manual procedure" you mean unofficial usage only. it is used for OTA in right way

Both slots aren't flashed at the same time. Inactive slot is flashed during an OTA update while the OS is running on active slot, without distribing user's workflow. If flashing goes well slots are switched on next reboot. If for some reason flashing or booting fails after update, bootloader falls back to previously active slot. And update is retried. When there is no update taking place, the inactive slot serves no purpose. You can keep a copy of active slot on it or erase the whole contents. It won't make any difference. Custom ROMs may or may not follow standard practices as alecxs said.

For more details on what @IrfanLatif said, see. It boils down to custom ROM implementation

every tool and manual procedure I have seen flashes both A and B.

This is not correct-
Update engine does not flash both A and B, 2 slots exists for rollback purpose if updated slot does not boot up.


text:
Can't unlock apps on the recent apps screen to close them
I cannot unlock apps to close them in the recent apps screen on my new phone. Pressing the lock icon only open the app.

Neither of the two answers worked for me on a TCL A3 device running Android 11. The locked app is Google Play Store.

I solved it by swiping down the lock icon on my android 10 device. Hope this helps

I had to tap and hold the lock icon for a second and then swipe down, to unlock it. Just swiping wasn't working for me. Android v11.

There was a rejected edit suggestion that tries to add a new solution.

Not sure if you're still having this issue, but recently suffered the same (different app) and managed to resolve it completely by accident:
Go to the recent apps menu (as shown in image) and simple do a (quick) swipe to the right on the app you want to lock/unlock, starting point doesn't seem to matter much but make sure to swipe all the way to (or over) the edge. If you do it too slow or not far enough it doesn't work.
I haven't been able to find this in any official documentation or if/where it can be configured/disabled, it's not listed in the System->Gestures menu. It also seems to be fairly tenacious since 'locking' an app persists after a reboot or force stop via developer menu's 'running services'.
It seems to be something similar to Windows' 'Pin to Taskbar' or Apple's 'Keep in Dock'.
Phone: Alcatel 1S (2019) running Android 9 (build 01001)

This may help someone.
On the BLU G61S android phone, to unlock recently opened tabs with a lock to the right corner:

Long-press lock icon
Then swipe down,

This puts the lock in an unlocked position and then it can be cleared.

I also found tapping and swiping under or on the lock icon and swiping down unlocks the app.


text:
Flashlight comes on for no apparent reason
I have a Samsung A5 running Android 8. Every so often when I pull it out of my pocket the flashlight is on.  The screen will be locked due to timeout and there is no indication that I somehow pocket dialled it.  This doesn't happen often but it is totally wierd.
I suspect that this may be caused by inadvertent use of some physical shortcut or hack that turns the flashlight on, but I have searched carefully and have not found it.
Can anyone offer some ideas?

This should fix you up 8 comments as of now.   https://www.reddit.com/r/LineageOS/comments/6qmx3f/flashlight_turns_on_randomly/ its probably flashlight screen lock. In which if there isnt an option normally for your phone then you might have to find a shorcut code like the dialer codes, or look up if there is a mod for the problem of not having the option


text:
Which IMG file from ISO to patch with Magisk to use on Android-x86 9 Pie?
Setup:

Oracle VirtualBox VM with installed Android-x86 9 (Pie)

Rooted out of the box (with SuperSU, guessing from the root access popup, but there's no manager app)
.vmdk VM drive

android-x86_64-9.0-r1.iso

Files on it:

Which one of the .img files on this ISO should I use for Magisk Manager boot image patching installation?

I would like to know!


text:
Move Chrome's address bar to the bottom
From How to Move Chrome Address Bar to Bottom or Top, Chrome's address bar can be moved to the bottom by using experimental features from chrome://flags. However, it has been deprecated since Chrome 66.

Google deprecated the bottom address Bar ‘Chrome Home’ in favor of a new
  ‘Chrome Duet’ interface from Chrome Stable to 66. [...]. If you want to use this Home
  Flag, you have to downgrade to Chrome Stable 65.

Are there any other possible ways to move Chrome's address bar to the bottom?


text:
is it possible to install linux on android?
Is it possible to install open-source Linux distribution like Ubuntu on Android Device?
If so, how would this be accomplished?

Have you searched this stackexchange, and found the questions there with previous answers lacking detail for you? What previous steps have you considered? Can you be specific which ones or which steps are failing?

i would recommend app Linux Deploy and don't remove android, or look for Ubuntu Touch from UBports https://chat.stackexchange.com/transcript/95316/2019/6/24 https://android.stackexchange.com/q/213910

@wbogacz Tried AndroNix - Linux on Android without root but it consumes a lot of memory. ANd poor documentation

Would like to explore other methods with root & without root

@Pluviophile you cannot natively boot Linux on Android device (see How to boot Ubuntu persistent live USB on Android?). But you can run in chroot (if device is rooted) or proot environment. There are plenty of apps which rely on either of both phenomenon, but in my experience using apps adds to your trouble. Just learn how to use chroot (it's very simple because it's same on any Linux environment) and run it yourself on adb or Terminal Emulator app or as init service or remotely e.g. on ssh. It works for any Linux distro.


text:
Can I preserve phone battery remotely?
I lost my phone and connected it to my computer via Google account so I can check it's location, commend it to beep, etc. However, I will be able to retrieve it only tomorrow and by then it will definitely be drain out of battery as it has only 15% of battery capacity as of now. Can I turn it off and then on? Thanks.

no you can't. but you can remotely wipe the entire device (all data lost)

OK not what I wanted to hear, but thanks buddy.

wait for somebody has charged it

he he if he won't covet it for himself. I offered 75$ for the returner in n a notification I sent to the phone lock screen remotely. Should I raise it? (it is a galaxy s9).


text:
How to disable user input (touchscreen) from command line without root
In the android command line, I need to disable the touchscreen user inputs. I do not want to use root because I want it to be universal instead of device-specific (root is obviously not as widespread as non-root)
I need to do this because I want to open a youtube video using link (done already).
And I also want to make sure that the user/person does not change / pause the video.
I do not want to install any app whatsoever, but only use existing ones (system apps and maybe the extremely popular apps with 500m+ downloads)
I am assuming I will have all the permissions adb has (not the adb root part), so let's go with that
This is for a rickroll btw hehe

Disable all user input without root is nearly impossible. The only way that comes close to this is to start a second app after Youtube that just shows a transparent full-screen app window (overlay), so that touches got to the app and the youtube app in background is still visible. However the user can still make the Android navigation bar on the bottom or the status line at the top visible and therefore leave this mode. In any way such an needs to be developed, and app-development is off-topic here.

I do not mind the status bar or the other ones which can't be overlayed.
as for the application method; it would be viable, if only there was a such application installed on many devices (maybe a system app has a bug like that?). As for the app part, there are such applications like "lock your screen" or "screen touch lock" I would resort to these; but only if there are absolutely no other ways (excluding root).

You should edit your question and present more details on what you want to achieve and  what your restrictions are (e.g. without installing any app?, how do you execute the script - via app or adb)

the script? im just planning it to be an sh script tbh (run it from adb maybe). Not to be rude, but why does how I execute the script matter? I mean its all the same shell and (mostly?) the same permissions. As for the first part yes I will add that now.

@A68AGaming shell is not same on adb and apps. There are huge differences of permissions.

ok, I added to the question to assume we have adb permission :D


text:
How to solve Signal Cellular off error?
My android 9 phone acting slowly yesterday, so I restarted it. Then its cellular signal icon on top get crossed from left to right. I googled it and that is a "Signal Cellular off" icon. Now my phone could not connect to any cellular signal or WIFI(could not find any AP), but it could still acting as AP hotspot(and my laptop could connect to it).
I tried to turn on and off airplane mode, go to safe mode, reset APN, my signal icon remain crossed. Does anyone know how to solve this problem? Anything without doing factory reset please.
Phone: HTC U12+
Kernel: 4.9.112
ROM Version: 2.50.709.3 10.0_g CL1099005 release-key
Last system update: Oct 2019
Something before error: misclick an ad on chrome, close it, tap my FB app to foreground and it shows me session expired and need to relogin. Then my phone seem a bit slow when I do APP switch, so I cleared all background and press restart. After passed PIN check at boot up process, my signal icons get crossed and no wifi can be found(even I'm sitting next to my WIFI AP).

Do you see any other Wifis? Remove Sim card, reboot and then reinsert Sim card. Is your device rooted or have you installed a system update recently?

@Robert no Wifi found, I did reboot my phone without SIM card and reinsert but not working, also not rooted and don't have system update for months

If there is any way to identify the source of this error, like I could find it from system log, please tell me how to find it.

Please edit your question and ad more details like the exact model name and the manufacturer of your phone. Also please include when you have installed the last system update and if you remember anything special what you have done before the error has occurred.

Basically, I don't even go to play store or installed any insecured APP from outside of store that day, so I can't recall anything really suspicious unless I'm hit by 0-day from the malicious website.

It seems very coincidental that both cellular and WiFi don't work at the same time despite being different hardware parts. Usually, logcat can give some info on what's happening on the Android device in real-time (you may also need ADB, USB drivers, and enabling USB debugging).

@AndrewT. HTC U12+ uses a Qualcomm Snapdragon 845 which has LTE modem and Wifi integrated into the main chip. If there would not be the working hotspot I would guess that there is a hardware failure at the antenna connection are something similar.

@AndrewT. Ok, I got logcat log, 4294 kb. Do you know the keyword that I could search inside this log?

@Robert so this situation is really odd because I could still connect to my phone's hotspot on both normal startup and safe mode even now. really weird

seem like no way to solve this but return to factory. this is it.


text:
Apps will not auto start on Android 9.0 Pie
I bought a cheap Blackview BV5900 running on Android 9.0 (I assume a custom ROM) as I needed something rugged and with long battery life for testing purposes. I'm struggling to find any answers as to why apps won't auto start when they are supposed to. The app in question primarily is Grandstream Wave - Video which is effectively a SIP client. It auto starts just fine on an old Samsung Galaxy V6.
I've tried various auto-start apps to see if I could get around it, but it would seem they fail to load as well on boot, so they don't do the task they are intended to perform. I've been in contact with the manufacturer and their answer is it just won't do it.
As it's a test phone I'm quite happy to root it, although I'm completely new to Android, I'm sure I'll find enough info to get started with a bit of googling.
What I'm after is a bit of help on what to look for and how to find it. From what I gather, the app is looking for a BOOT_COMPLETE message of some sort, so I'm guessing that is disabled somewhere? Any answers, please assume I know nothing, you will be correct.
EDIT 11May2020
Tried the shell command as requested here - no Joy. Result from shell below. Not sure whether this just means I don't have enough privilege to run it or it's disabled in some way?
Broadcasting: Intent { act=android.intent.action.BOOT_COMPLETED flg=0x400000 pkg=com.grandstream.wave }
Security exception: Permission Denial: not allowed to send broadcast android.intent.action.BOOT_COMPLETED from pid=5834, uid=2000

java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.BOOT_COMPLETED from pid=5834, uid=2000
    at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:21774)
    at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:22411)
    at com.android.server.am.ActivityManagerShellCommand.runSendBroadcast(ActivityManagerShellCommand.java:690)
    at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:174)
    at android.os.ShellCommand.exec(ShellCommand.java:103)
    at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:16434)
    at android.os.Binder.shellCommand(Binder.java:634) at android.os.Binder.onTransact(Binder.java:532)
    at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3551)
    at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3397)
    at android.os.Binder.execTransact(Binder.java:731)

BOOT_COMPLETED is not the only thing required for an app to run in background. May help: Disable autostart on boot and restrict background execution

Response to EDIT 11May2020: ACTION_BOOT_COMPLETED “is a protected intent that can only be sent by the system.”: https://developer.android.com/reference/android/content/Intent#ACTION_BOOT_COMPLETED. So you need root access.

This would not be a complete answer to your problem.
But if you suspect that BOOT_COMPLETED broadcast is disabled for some reason, you can try to send it manually using adb shell and see if your app starts up.
It better to send the broadcast directly to your app by specifying its package name. If you do not know the package name of your application, first you need to find it. To get a list of all installed packages in your device, you can use following command.
$ adb shell pm list packages

After finding the package name of your app from the output of above command, you can use following command to send the broadcast to your app, and see if it starts after it received the broadcast.
$ adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -p <com.your.apps.package.name.comes.here>

In above command replace <com.your.apps.package.name.comes.here> with your app's package name.

Thanks, I’ll try the shell later in the week when I get some time and post the results here.

Seems like you do not have permission to send BOOT_COMPLETED broadcast via adb shell.
Please check if you can run this command and get root access through adb shell : adb root as mentioned here.
If you can get root access, you will be able to send the broadcast.

Thanks, pretty sure I don’t have root access, but I will check.

This problem is due to the fact that in all firmware on all smartphones the application autorun is disabled
This problem is solved very easily with root access. You just need to fix one line in the /system/build.prop file:

ro.freeme_freemanager=1
ro.hct_autostart_manager=1

In these lines you need to change 1 to 0. You can edit the file /system/build.prop with Total Commander or anything else.
Tested with success on BV5900

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


text:
Can't set lockscreen passcode
I have a Samsung Galaxy J4. A few days ago, I suddenly was not able to unlock the screen of my phone. I don't recall doing anything special with it before that happened.
After some searching and playing with adb, I removed the files /data/system/locksettings.*, and /data/system_de/0/spblob/. And I was able to clear the screenlocker and get in to my phone.
However, when I tried to set a screenlocker again, the following error message appears in logcat:
04-29 14:00:47.103  3083  4440 I SyntheticPasswordManager: Device does not support weaver
04-29 14:00:47.109  2757  2757 D gatekeeperd: enroll ret = -1
04-29 14:00:47.111  3083  4440 E SyntheticPasswordManager: Fail to enroll user password when creating SP for user 0
04-29 14:00:47.114  3083  4440 E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system_de/0/spblob/0000000000000000.handle: open failed: ENOENT (No such file or directory)
04-29 14:00:47.117  2757  2757 D gatekeeperd: enroll ret = -1
04-29 14:00:47.118  3083  4440 E SyntheticPasswordManager: Fail to create new SID for user 0
04-29 14:00:47.119  3083  4440 D LockPatternUtils: isCredentialRequiredToUnlockUser: 1
04-29 14:00:47.119  3083  4440 E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system_de/0/spblob/0000000000000000.handle: open failed: ENOENT (No such file or directory)

After that, it would appear like if there is no lockscreen set in the settings menu. But if I turn off the screen and on again, there would be one. Attempting to unlock gives the following errors:
04-29 14:03:01.453  3083  3083 E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/password.key: open failed: ENOENT (No such file or directory)
04-29 14:03:02.770  3083  5292 E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/password.key: open failed: ENOENT (No such file or directory)
04-29 14:03:02.771  3083  5292 E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/gatekeeper.gesture.key: open failed: ENOENT (No such file or directory)
04-29 14:03:02.771  3083  5292 E LockSettingsStorage: Cannot read file java.io.FileNotFoundException: /data/system/gesture.key: open failed: ENOENT (No such file or directory)
04-29 14:03:02.771  3083  5292 E LockSettingsService: doVerifyCredential type mismatch with stored credential?? stored: -1 passed in: 2

It seems like the passcode was not properly saved. After reading the source code of SyntheticPasswordManager, I'm guessing it's caused by the gatekeeperd: enroll ret = -1 error, but I'm not sure what to do next.
Any help on how to continue debug this problem is appreciated.

I foudn that spblob directory regenerates itself. But even after putting the files I removed from spblob directory back, it puts me back to the original state where I can't unlock even with correct passcode. The phone won't lock up after 5 incorrect retries, though. It's back to normal after wiping data partition, so I'm pretty sure the problem came from missing files or wrong setting values.

only delete locksettings.db + wal + shm


text:
I want to capture with adb commands the result of a USSD dial?
I want to capture with adb commands the result of a USSD dialing? connect my android cell phone with adb shell I make calls with ussd but I want to capture those results like saying the credit balance?

i doubt you can capture anything of modem from android


text:
Can I use an Android One device without a Google account?
I wish to buy an Android One device and install only apps from F-Droid. I don't own a Google account and don't wish to register. I don't wish to install LineageOS or other alternative firmware.
Is it possible to use Android One device without a Google account?
What are the restrictions (without Google account) except that i can't use Google cloud services and Play Store? For both there are alternatives.

Note that Google has started to push Android security updates to Android OS components via PlayStore (not sure if an account is required for retrieving those updates). Hence even without an explicit Google account Google collects certain data of your device.

@Robert Google Play Store was updating itself or some other Google apps (don't remember specifically which ones) in a new Poco X3 (Android 10) without a Google account added into it. It was right after I finished setup wizard a couple of days ago.

@Firelord I would assume that all pre-installed Google apps are now getting updated without ever signed in to Google. On an Pixel3a on Android 11 device I have explicitly seen automatic updates for "GBoard", "Digital Wellbeing" and other apps.

You need to register with Google

I had bought two Android MiA1 one phones , one for me and one for my son, a couple of years ago. I registered with Google account on my phone and got security updates and Android version update. On my son's phone , there were no updates of any kind till he came a few days later and activated Google sign in. It was connected to data (his spare SIM)
Android One wiki says the device needs to have Google Services intact. It doesn't mention Play Store explicitly but logically if the core service is missing, it will not work.
Robert, in comments pointed out another important point- of security updates being pushed through Play Store, and likely these won't be available without registering.
USP of Android one is low cost devices with timely updates, If you can't get updates and you don't want to install a custom ROM, your plan isn't going to help


text:
Huawei without Google Play: will I be forced to create a Huawei account?
I wish to buy a Huawei P30 Lite phone. It's a phone without the Google services and play. Can I use this phone without a Huawei account? Only use F-Droid apps?

Google Play is available on Huawei P30 Lite.
http://storage.googleapis.com/play_public/supported_devices.html
Only Huawei devices that are produced after the Google Ban, which is 20 May 2019 do not have Google Play Services.
You will not be forced to create a Huawei account in order to use the phone. Huawei account is only needed you are using specific apps on the Huawei devices.


text:
Phone is just pretending to move app data to external storage?
My internal storage is full, so I've bought a SD-card and I'm trying to move some application data. For example I have 20GB of data for Audible which is my main concern.
I went in to Settings > Apps > Audible and there it says "Storage: 20 GB used in internal storage".
I clicked Storage > Change and selected SD Card and I got up a loader informing me of the progress of moving my data and informing me that the move is complete. Now Audible is saying that I'm using 20 GB of external data.
But Storage in Device Manager is still saying that my internal memory is full, and that I only have an insignificant amount of data, 2 GB from other things, on the SD Card. But then just under that summary, it is saying that is has 20 GB in application data in the SD Card. I'm only using 2/60GB, but at the same time it's informing me that I have 20 GB of application data on it?
This does not add up, what is happening? I've tried restarting the phone.

Does this answer your question? How to free Internal Storage by moving data or using symlink / bind-mount with Adoptable Storage?

@alecxs I feel a little bit confused, how do that question relate to mine? Are you saying I have some problem with symlinks?

@Alex no you have some problem with "moving data" which is the first part of the linked question, symlinks come after that.

@IrfanLatif That seems like a very general problem, I don't see how that relates in a meaningful way to the problem that I have with the app saying that it's data is stored externally while no data actually seem to have been moved?

run df/du from adb shell to examine occupied space, it might happened that this app moved it's stuff to /sdcard (which might still pointing to internal storage instead of /mnt/expand)


text:
How to check Android phone’s processor (ARM, ARM64, or x86)?
Knowing which processor you have is very important to make sure you are downloading the right files. One app, nowadays, has multiple versions for multiple processors so that it runs smoothly on each and every phone available. If you only install apps from the Google Play Store, then knowing which CPU architecture your phone has is not necessary, but if you sideload apps, then this information is required as CPU architecture is becoming a factor in more and more scenarios these days, including certain sideloaded app updates and, of course, custom ROMs and Gapps.
As of now, there are three main CPU architectures used in Android smartphones

ARM: ARMv7 or armeabi
ARM64: AArch64 or arm64
x86: x86 or x86abi

There are a couple of 3rd-party apps to find CPU architecture found from this article:

Inware
Droid Hardware Info
My Device – Device info

My question is, can we find the CPU architecture of the Android phone without installing any apps?
Just in case it's relevant, the device I'm using is a Poco X2 with Android 9+.

try answer here Get chip name of the android device using adb?

Simply do uname -m or cat /proc/cpuinfo on adb shell or any Terminal emulator app. It's same for any Linux OS, not specific to Android.

Related, if not a dupe: How can I tell if my installed Android version, not CPU, is a 64 bit or 32 bit one?, Android apps for "armeabi-v7a" and "x86" architecture: SoC vs. Processor vs. ABI

Does this answer your question? Android apps for "armeabi-v7a" and "x86" architecture: SoC vs. Processor vs. ABI

It is indeed a pity that this isn't listed anywhere in Settings, not even in Developer Options. The minimum-change way to get the information is as follows:
Turn on Developer Options and USB debugging
This is familiar, and this answer isn't the place to reiterate that.
Ask Android's Linux kernel
adb shell uname -m

The reply will tell you what architecture the Linux kernel in your Android OS is running. It tells you this in Linux terminology, rather than Android ABI names:

"aarch64" is 64-bit ARMv8-A, which is Android's "arm64-v8a" ABI.
"armv7l" is 32-bit ARMv7-A, which is Android's "armeabi-v7a" ABI.
"x86_64" is 64-bit x86, which is Android's "x86_64" ABI.
"i386" or "i686" are the basic 32-bit x86 or the Pentium Pro variant respectively, which is Android's "x86" ABI.

One way that I was able to find the cpu architecture for my google Pixel was by going to "settings/Apps/See all apps/Clock/App details".  That will get you to "Google Play".  On that screen below "Installed on all devices" I see "Google SDK_gphone64_x86_64" and it says its "Installed".  So you can  then infer that my phone architecture is x86_64. I also assume that you can infer that this is a 64 bit architecture (gphone64).  So that's one way you can get the architecture without any special application installed or using an "adb shell".
Please note that I'm not sure this exact method will work for all vendor Androids on the market.  You may need to look at the "App details" for some app other than clock. So substitute another app's name for clock in the settings path I described above.
It's too bad that the phones cpu architecture is not listed in "settings/system" or in " settings/About phone".
Update:
Based on the comments from John and Andrew, I'm going to say that my answer is wrong. This doesn't work as a method for inferring the processor type without the aid of some other tool as mentioned in the other answers. Apparently, the App Store keeps information about all the apps installed on all your devices just by the fact that you visited the App Store. I must have visited the App Store from an Android emulator I was running, and the "app detail" from the App Store confused me. I was hoping that I might find the name of a native library code installed with some app by looking at the "app detail".  Apparently that's not the case.

What model Pixel is this? If it's a phone, I'm suspicious that SDK is wrongly labelled, because there aren't any x86-64 based Pixel phones.

I have a feeling this is an Android SDK emulator running on an x86 image, while using the Google Pixel template, not a real Pixel phone. That aside, I believe what is displayed on Play Store is actually the device name, which on real Android devices, won't include CPU architecture.

It's an Google Pixel 8.  I'm not sure what processor it has, I assumed from the information I see that it is an x86_64 since I got that information using my phone and not an emulator.  I will say the I don't truly understand why the screen I mentioned says "Installed on all devices".  I certainly could be wrong but that's what I see when I expand "app details" using my pixel.  It could be that the App Store details are miss leading. My assumption was that if I found app details about native code that an apps was using, I could infer the type of processor architecture.

My "About phone" settings says the device name is "Pixel 8".  Maybe, the App Store only keeps track of the last device that the app was installed on. I did recently update an emulator from Android Studio.  So maybe that explains it!  I won't think that an emulator update would access the Play Store, but maybe it does!


text:
What is an alternate method to flash stock firmware for S9+ G965F?
My S9+ went into bootloop, I loaded up twrp through odin and flashed no-verity-opt-encrypt-samsung-1.0.zip
The problem is when phone turns off, it goes back into bootloop. I tried flashing stock firmware through odin, but odin crashes whenever I load up AP. I tried different versions on 2 computers but no luck.
What is an alternate to the stock firmware that I can flash to stop the bootloop?

Odin crashes? How?

Yes, it never happened before but that one AP file makes odin crash everytime :/                (AP_G965FXXU8DTC5_CL18339721_QB30180704_REV01_user_low_ship_meta_OS10.tar.md5)


text:
Gmail app high storage usage
I have installed custom rom on my android device 10 days ago. The rom was official pixel experience from xda for moto x4(payton). Today, I have noticed that Gmail android app have used about 1.2gb as user data and a total of 1.3gb. What may be the reason? Now, I have cleared storage. How to solve if it occurs again.
Device: Motorola Moto x4
ROM:pixel experience official Android 10
Root status: unrooted

Related question: https://android.stackexchange.com/questions/138990/how-can-i-make-the-gmail-app-consume-less-space Additionally you can disable the setting Automatic attachment download via Wifi

One fundamental reason is that any mail addressed to you has two copies - one in important and one in All mail. If you receive 20 Mb attachment, it eats up 40 Mb space

@Robert Now, I have unchecked Automatic attachment download via WIFI. I'll update if it occurs again.


text:
Is it possible to visit a localhost page of my pc on Android without wifi route?
I don't have a wifi router.  I want to visit xampp localhost from my mobile. I have two android phone.  Is it possible with any app to use a phone like wifi router and another phone to visit the localhost pages?

You have already tagged WiFi hotspot. What's wrong with that?

I assume you mean router in the headline? It ends with wifi route, which is something different.

@IrfanLatif There are multiple possibilities, and choosing one is the question.

Possibly related/dupe: How to use Android in Wi-Fi repeater mode by bridging Wi-Fi with Access Point?

Servers on Localhost will never be available from outside of your PC no matter how many routes you set or connections you add. The only way is to make the server listen on all IPs or use the USB connection to the device and install a port forwarding for the server port via adb from the PC to the device.

You do have a hotspot available!
You can configure your own phone as WiFi hotspot, and connect to it from the PC!


text:
Is it possible to fix the orientation of the camera?
I have disabled "Auto-rotate screen", but the camera still changes the orientation depending on how I level it.
For example, I want a picture like the following:

Without changing the alignment of my Android phone with the object, the photo orientation may change if I swivel the phone a little bit and get the following:

Is it possible for me to get the first orientation always?

Common photo apps always create images upright like your first one. The orientation is usually stored in the exif metadata inside the image. Good photo viewers consider this flag and rotate the image appropriately before displaying it.

Could you recommend a photo app that always uses the portrait orientation (i.e. when it is in the portrait orientation when it is viewed)?


text:
What is 0x10DB21 error code in Kingoroot?
I'm currently using android 6.0
And i wanted to root it
I downloaded kingoroot apk
I installed it clicked one click root and it stopped at 90% and then said failed to root error
0x10db21 what do i do?

Does this answer your question? Why are the rooting apps not working anymore?

there is currently one app still working with exploit (Mediatek Chipset only)

The answer is simple:
Kingoroot does not work for Android 6
The vulnerability it uses for gaining root as been fixed in Android 6 and newer. Hence rooting will not work on those devices!
Cite from the site root-apk.kingoapp.com

It perfectly covers Android 1.5 to 5.0 mainstream models from different manufacturers including Samsung, Google, HTC, Sony and else.

Hence before installing any third party app you should read the documentation before installing and running it.

AFAIK Kingoroot and other similar rooting solutions rely on a range of exploits (which they don't expose unless reverse-engineered or leaked), not a single one. Though most of those (or possibly all) are fixed in Android 6+ releases. But still there is always a room for vendor-specific and model-specific exploits. However relying on exploits and using such solutions is obviously never recommended.


text:
Connected to wifi, but no internet access
first question here. I was using wifi normally on my phone. Then I turned it off and after some time turned it back again. Since then I can not access the internet. It's showing Connected(no internet access).
I tried to set the IP static. It did not work for DNS 192.168.200.1. No matter what IP I set with this DNS it does not work. Then used the 8.8.8.8 as DNS, now it's connected. But it is really slow, and the connection does not seem stable. Every time I have to reload google.com several times just to get the page.
The problem is specific to this device only. Other devices connected to the same network are perfect.
Can someone suggest me what should I do? Is this a router issue? Or is this my device problem?
I'm new in this area. So my knowledge is not so deep and you might have to explain things a bit more in detail for me to grasp the concept.

Have you tried removing ALL static IP's and DNS settings, and allowing DHCP to get to work for you?

You mean from the router?

Also restart the router.

@CFCBazarcom tried that, it was the first instinct, Did not help.

First change the DNS to the original like suggested in the other comment, you can see the original in a working device, set DHCP and all settings to their original and automatic values, restart the phone and wait 5 min. After that we can continue with the debugging.

@CFCBazarcom tried it. It's still the same result.

You can use Airplane Mode to reset DNS.
Put the phone in Airplane mode. Wait about a minute. Power the phone OFF, then start it up, then Remove Airplane Mode and test. It should work.

Just for my learning, what's the logic behind these steps? Turning phone OFF and ON would definitely kill everything including netd which holds DNS server address and cache. In fact when WiFi is turned OFF and ON, or Airplane mode is turned ON and OFF, netd resets settings, fetches DNS server during DHCP handshake if applicable, invalidates cache, and creates a new network ID. So putting phone in Airplane mode, waiting for a minute, resetting phone, turning Airplane mode OFF... what difference does it make?

The operative measure is disabling Airplane Mode, waiting and turning it back on.  Turning the machine off and on is just for good measure. This is what I have found to work from long experience with smart phones.

I just had this issue took me ages but clearing the data from the the google play store app solved it for me..

Open your Android device's Settings app and tap "Apps" or "Apps & notifications."

Select the Google Play Store app from the complete list of apps.

Tap "Storage," and then hit "Clear Data."

Hope it helps someone else!

I’ve mixed this answer with John’s answer and it fixed! Amazing! I was afraid of an hardware issue. — Just clear the cache of Google Services, then activate Airplane Mode, wait a minute, deactivate it. It connected immediately and I got internet access!

"Forgetting" the WiFi network on my Samsung S7 and then re-logging into it solved the problem.


text:
Phones got unknown and unrecognized notification sound
It is not a tech question....
Few days ago I was with my friend in the same room. Suddenly my phone and my friend's phone had a notification sound almost at the same time.
We thought that we properly got whatsapp group chat messages from other common friends.
We looked at our phones and there was nothing.
What could it be??
We have both Samsung A series phones.

Could be the notification of an incoming [emergency] Cell Broadcast

@Robert probably. Especially at the current situation...  however we did not get any "message". We are in Europe.


text:
How to see all partitions on an SSD
I have an SSD with 2 partitions (volumes? ) on it. I can R/W to both of them from my WIN10 PC.
However, when I mount it on my Note10 , I can only see one of the partitions.
Is there a way that I can see both partitions when I open file manager?

What file-systems are used by the partitions?

It depends on multiple factors including if vold supports multiple portable partitions on portable storage, if voldmanaged entry in fstab for your USB OTG storage device is configured to recognize multiple partitions, if partition type (id set while creating partition table) is supported by vold etc. With root access however you can handle things manually. You can check kernel log and logcat to see if both partitions are recognized when attached.

you need custom ROM because stock ROM only mounts first partition


text:
How do I solve this download manager problem (android)?
I don't really know if this is the right place to ask this question, but can anyoane be kind and help me a little here?
My mom has a huawei smartphone. I don't know what has she pressed but now, everytime she tries to download some file from facebook like a ppt or a pdf, the download manager redirects her to ".archivetemp" folder and she can't acces the downloaded file. How can I solve this without resetting the phone?

Have you tried pressing the left arrow button left to the .archivetemp... text? Use it to go back toMemorie Interna and then select the Downloads folder.

@Robert the files dont show in the Downloads folder

Does this happen only on Facebook or all sources? If she downloaded the file from the Facebook app, try downloading from the browser instead? Also, mentioning the Android version might help.


text:
Stuck in bootloop Neffos X1. No recovery mode
My phone (Neffos X1) is stuck in a bootloop since yesterday evening. I haven't done any updates (at least not manually) or new installations recently, so it just happened out of the blue. It loads till the Neffos logo and then restarts over and over again.
Since I can't take the battery out, I tried letting it run out of energy and then restart, but as soon as I connect it to a power source the bootloop will start again.
My Phone won't react to any button combination, so I also can't access recovery mode, or any other mode by that matter.
I tried flashing it via SP Flash Tools, but the phone doesn't react to it.
My laptop actually doesn't seem to detect my phone at all, so I can't use ADB as well, can't unlock bootloader or get into fastboot. At least I don't know how.
I tried removing my SD card, since that seems to be the problem sometimes, but it also didn't help.
Is there anything I can do to get out of the bootloot or is it beyond fixing? Like I said, it just happened out of the blue, so it would be pretty upsetting, if my phone just broke for no reason.
I would appreciate any help very very much, so thank you in advance.

On every android I've had holding down the power button 30-90 second will hard power the phone off. you should be able to enter the bootloader by holding the entry button combination and letting it bootloop

2 cents' worth :
Had the exact same thing on a Neffos X1 Lite today (9-29-20).
Phone was offline (no wifi, no phone network), and ringing out on alarm clock, when I hit snooze, and then it started looping like crazy (15-20 min until resolved) - Of course I've no idea if these conditions had anything to do with it.
While looping, I took out sim and memory card.
I hit power+Vol.Down, for a what seemed like eternity -
This didn't seem to stop re-booting, but then at one point, out of the blue, boot screen appeared for a split second, and one of the choices on the menu was picked up (either by me when already pressed keys leaped into it, or by system..?) - The phone restarted back to normal at that point. phewww.


text:
Does Samsung process its single take images in China?
I was in my backyard, taking pictures of the bees on the trees. I got inside and noticed that one of the single take pictures I'd taken on my s10 T-Mobile version had a location tag from Yushu, Qinghai, China. This wasn't an original single take picture, but a screenshot taken from a video. All other files were located in the US. There are some other files that I want to include but are too big, so here's a google drive link to the rest of them.
So, that brings me to the question of whether Samsung sends photos/videos taken on Samsung devices to be processed in China? Is it even possible? Thanks!

You know that the geo location is just some meta data inside the image? It can be set to any place on the world. May be the location you encountered was some default value the Chinese manufacturer had set in production.

Normally the processing of captured images doesn't take place remotely. It's a built-in feature of camera app. If the camera app is location-aware, it saves the current location of your device in the metadata of the image along with other info like captured date, camera specs, dimensions, resolution etc. So might be your device was reporting wrong location at the moment you captured that image? The same may hold true if that's a screenshot. But I've never seen location being saved in screenshots.

There is a similar case on different phones (ZTE) mentioning a bug before the Android Nougat update and geotag just gives random locations on other models. While this doesn't mean the same issue, it might be a more global issue than a specific model.

@IrfanLatif The filename and it's path VideoCapture... clearly indicates that the image was not taken by what we call "screenshot". Looks more like it was created by some app that is specialized on frame-extraction from videos.

@Robert correct. I addressed what the OP said.

OP here. @Robert, it wasn't exactly a screenshot. It was one of Samsung's camera app things. You can see the button I pressed on the right picture.

Did some more digging... all of the other VideoCapture files on my phone don't have geotags, so this was probably a bug. Thanks, guys!

Not sure how to resolve this question, thanks to @Robert and @IrfanLatif in the comments. Did some digging and this is probably just a bug. If it happens again, well, I'll see. Additional thought: Onedrive is connected to the photos app so maybe something with that.


text:
Getting Application is Sending Too Many SMS despite changing sms_outgoing_check_max_count
I need to send a large number of SMS messages, ~1000, and have edited android's sms_outgoing_check_max_count using the following command:
adb shell settings put global sms_outgoing_check_max_count 2000
It didn't work. I got the annoying "Application is Sending Too Many SMS" message.
The phone is a Nokia 3.1+ running Android One 9 and I used the stock messaging app. adb was invoked using Win10 Powershell and the value for sms_outgoing_check_max_count was checked to be 2000. Developer options was turned on this whole time, but the phone has not been rooted.
What am I missing here?

Maybe, you need to change interval?

@beeshyams Honestly, I can't see how that's important. What I did should enable me to send 2000 messages in 30 minutes, and the whole process takes less than 5. But I'll have to try that in a few days to be sure.

I am not sure if it helps too, just thought it may be connected in some way

Figured out the reason. After using
adb shell
settings put global sms_outgoing_check_max_count 600
settings put global sms_outgoing_check_interval_ms 60000

you need to reboot your android phone.

Restarting the device worked. Accepted the answer.


text:
Keeping ADB permissions while USB tethering
It seems that I can only get ADB permissions for my device only while in MTP or PTP mode and NOT in USB tethering mode, which is what I need.
I have done plenty of research but I stumbled upon so much contradicting and very old information that I can no longer see how to proceed.
Here they say that it is not possible, but it dates back to 2012. Here and here they propose to invoke the shell via ADB to put the device in USB tethering mode (which works for me as well) but also to disable it, which in my case fails since as once stepped away from MTP or PTP mode I no longer have permissions for my device.
Then I found this interesting post which seems relevant but does not provide a complete solution. This also looks relevant but it does not touch the tethering case.
So, once and for all, how do I keep ADB permissions for my device when it is NOT in MTP or PTP mode? I only care about recent Android versions. I obviously have root access for my device as well the possibility to deploy custom ROMs, although, for personal taste, I tend to stick to LineageOS.

Additional note: this is the error that I get when not in MTP/PTP:
$ adb devices
List of devices attached
2d8568f6    no permissions; see [http://developer.android.com/tools/device.html]

$ adb shell
error: insufficient permissions for device
See [http://developer.android.com/tools/device.html] for more information

Unfortunately the link is quite useless, but it seems that ADB identifies and communicates with the device, but this does not accept any request.
I don't think that this has something to do with my PC, the udev rules are in place, plus ADB works fine when the device is in MTP or PTP mode.
Here is a screenshot (click for video browsing to that menu):

When in MTP mode I can open a shell via ADB, this is what I see:
$ su

# pwd
/

# ls -lah
total 1.0M
drwxr-xr-x  18 root   root   4.0K 2008-12-31 19:30 .
drwxr-xr-x  18 root   root   4.0K 2008-12-31 19:30 ..
dr-xr-xr-x  56 root   root      0 1971-04-23 21:51 acct
lrw-r--r--   1 root   root     11 2008-12-31 19:30 bin -> /system/bin
lrw-r--r--   1 root   root     50 2008-12-31 19:30 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
drwxrwx---   6 system cache  4.0K 1971-04-23 21:51 cache
lrw-r--r--   1 root   root     13 2008-12-31 19:30 charger -> /sbin/charger
drwxr-xr-x   3 root   root      0 1970-01-01 01:00 config
lrw-r--r--   1 root   root     17 2008-12-31 19:30 d -> /sys/kernel/debug
drwxrwx--x  42 system system 4.0K 2020-05-02 11:50 data
lrw-------   1 root   root     23 2008-12-31 19:30 default.prop -> system/etc/prop.default
drwxr-xr-x  17 root   root   3.4K 2018-03-20 08:10 dev
lrw-r--r--   1 root   root     11 2008-12-31 19:30 dsp -> /vendor/dsp
lrw-r--r--   1 root   root     11 2008-12-31 19:30 etc -> /system/etc
lrw-r--r--   1 root   root     20 2008-12-31 19:30 firmware -> /vendor/firmware_mnt
-rwxr-x---   1 root   shell  2.1M 2008-12-31 19:30 init
-rwxr-x---   1 root   shell  1.2K 2008-12-31 19:30 init.environ.rc
-rwxr-x---   1 root   shell   29K 2008-12-31 19:30 init.rc
-rwxr-x---   1 root   shell  7.5K 2008-12-31 19:30 init.usb.configfs.rc
-rwxr-x---   1 root   shell  5.5K 2008-12-31 19:30 init.usb.rc
-rwxr-x---   1 root   shell   511 2008-12-31 19:30 init.zygote32.rc
-rwxr-x---   1 root   shell   875 2008-12-31 19:30 init.zygote64_32.rc
drwx------   2 root   root    16K 2008-12-31 19:30 lost+found
drwxr-xr-x  12 root   system  260 1971-04-23 21:51 mnt
drwxr-xr-x   2 root   root   4.0K 2008-12-31 19:30 odm
drwxr-xr-x   2 root   root   4.0K 2008-12-31 19:30 oem
dr-xr-xr-x 512 root   root      0 1970-01-01 01:00 proc
lrw-r--r--   1 root   root     15 2008-12-31 19:30 product -> /system/product
drwxr-xr-x   3 root   root   4.0K 2008-12-31 19:30 res
drwxr-xr-x   3 root   root    300 1971-04-23 21:51 sbin
lrw-r--r--   1 root   root     21 2008-12-31 19:30 sdcard -> /storage/self/primary
drwxr-xr-x   4 root   root     80 2020-02-27 08:07 storage
dr-xr-xr-x  12 root   root      0 1971-04-23 21:51 sys
drwxr-xr-x  17 root   root   4.0K 2018-03-20 02:40 system
-rw-r--r--   1 root   root   5.2K 2008-12-31 19:30 ueventd.rc
drwxr-xr-x  15 root   root   4.0K 2008-12-31 19:30 vendor
-rw-r--r--   1 root   root    524 2008-12-31 19:30 verity_key

I can open the various .rc files in there (with nano or /sbin/.magisk/busybox/vi) but in readonly mode. I might be able to get rw permissions from recovery, but still I would not know what to change.

That seem to be a device specific problem (-> edit your question and add device details). My Sony XA2 works out of the box with USB tethering and ADB at the same time (however MTP seem to be disabled while USB tethering is active).

@Robert I am trying with a lenovo k6 (karate k33a48). I have the feeling that in the past it used to work, but I cannot remember what ROM I was using. I expect this to be a software issue, possibly device unrelated.

Note: Your question is a bit misleading as you always talk about "adb permission". However this is not a permission problem but a configuration of the USB interface. Each physical USB device can have multiple logical devices active at the same time (on my device one for "Remote NDIS" and one for adb or one for adb and one for MTP). On Windows you can view them nicely in the device manager grouped by a USB compound device (virtual device that combines the logical USB devices). Hence your question is how to activate RNDIS and adb at the same time.

You should add this very important info into your question and not hide in comments. However I still don't think that this is a permission problem. The adb permission uses public key auth, hence the permission can't just change. I suspect a bug in the firmware of your device or a general bug if others can reproduce your problem.

@Robert I will just try another rom, but It's a pity because that doesn't lead to any understanding of the issue.

If your device is rooted and it uses sysfs interfaces to configure USB functions, you can edit init's .rc files to write adb and rndis at the same time (as it writes adb and mtp together). The same should be achievable if your device uses configfs interfaces. // If the problem is only about ADB permissions (and not that tethering and ADB cannot be turned ON simultaneously), all that you need to do is add the USB VID/PID to your device manager (e.g. udevd) on PC so that proper permissions are set on USB interfaces in /dev. There's nothing to be done on phone.

Does this answer your question? Getting "???" and no permissions when using 'adb devices' on Linux

@IrfanLatif not really. My udev rule is in place and works fine when in MTP/PTP mode. The answer which suggest to change usb mode is quite silly in my case. See the edits for the .rc files.

MTP/PTP uses a different USB VID/PID, usually that provided by Google in AOSP. Tethering (RNDIS) is a hardware-specific USB mode, so OEM's VID/PID is exposed to PC. Mostly Linux distros recognize MTP/PTP out of box because that's a generic case. But there is a long list of Android phone vendors, so not every Linux distro recognizes every vendor (VID) and every of its product (PID). I suggest you read about how USB VID/PID works, instead of blindly resisting.

@IrfanLatif Thank you for your persistence. That was indeed the case: the product ID changed slightly when in tethering mode and I did not have the proper udev rule. I transferred this knowledge in the archlinux wiki: https://wiki.archlinux.org/index.php/Android_Debug_Bridge#No_permissions_error If you make your comment an answer I would be happy to accept and upvote it :D

@DarioP I'm glad it helped. I think the question I linked already includes the relevant answers. Reposting isn't encouraged.

Let us continue this discussion in chat.

This is the answer to my question: https://android.stackexchange.com/a/195443/322110

I had the same problem and I think it is caused by some bug or misconfiguration in the ROM.
As a workaround, I figured out enabling the option ADB over network from the Developer options allowed me to connect using adb while having USB tethering mode turned on. However you have to be careful not to enable that option on untrusted networks (untrusted wifi or 3G) because it allows remote access to your device over TCP to anybody on that network.