text:
Will a Xiaomi Redmi Note 9 (international version) work reliably in the United States (comparable to a domestic phone)?
I'm buying a new phone, upgrading from an LG Q7+, and so far the best phone I've seen is the Xiaomi Redmi Note 9. The only con to this is that the Note 9 is only available in International version, and I live in the USA. I've heard that Metro by T-Mobile (my service provider) is good for international phones, but I don't know if it will be comparable to buying a domestic phone. That is, I don't want to get a really good phone but sacrifice all of my connection speed. If it's a little slower, I'm fine with it, but if it will be a major difference, I'll shop domestic.
One thing I've noticed is that, according to this site https://www.gsmarena.com/compare.php3?idPhone1=9206&idPhone2=10192 , the Note 9 actually has more 4G connectivity than my current Q7+ (11 bands compared to 9). Does this mean that it will be more reliable than my current phone, or does this mean nothing since it's international? (Note that I'm not very tech savvy. I know next to nothing about these complicated specs, so I don't actually understand the numbers)
The bottom line is, I want to buy a new phone, but I want to be sure that the new model I'm considering will have comparable connectivity speed to a domestic phone. I know that T-Mobile will support international phones, but I want to be sure that the support is good compared to their domestic support. If anyone reading this owns a Xiaomi in the US, I'd love to hear from you, but anyone who knows about this sort of topic would be extremely useful to hear from. Thank you to anyone who has read this far. I appreciate the help!
EDIT: I've found this site https://www.kimovil.com/en/frequency-checker/US/xiaomi-redmi-note-9 which suggests that it will work on US networks, but I have no idea what the numbers and technical terms mean. I'd like to know what exactly this says about the network reliability in the US. Thanks for putting up with my lack of tech knowledge!

A large number of supported frequency bands by the phone is good. But more important is what frequency bands are used by your mobile network provider (hence it has to support the "right" bands from your perspective). Every netwoprk provider uses different bands.

Community bump prevention: this question was closed because the question seems to have been abandoned (OP hasn't visited the site after asking the question, and no answers have score above 0). If anyone can evaluate the existing answers, feel free to vote accordingly and reopen the question (or mod-flag the question requesting for reopening). For anyone else having the same issue, please post a new question and refer to this question as additional context.

I was going to try and leave a comment instead but my reputation is not high enough.
A useful site that breaks down frequency bands is
https://www.frequencycheck.com/compatibility/Jxq7inG/xiaomi-redmi-note-9-global-dual-sim-td-lte-64gb-xiaomi-merlin/united-states
This will show you the bands of each network in the US and will state whether the phone supports it or not.
I can see that it is stating that only 2 of 5 LTE bands are supported on T Mobile for this phone. So it is likely you may experience some issues with 4g mobile signal depending on the bands available at the location you are at.


text:
Is there a super partition on Pixel 3/3XL with Android 10 (or greater) loaded?
Question: Does a production Pixel 3/3XL have a super partition when loaded with Android 10 or greater?
Background:
I changed out the UFS piece on a Pixel 3XL and loaded the newest Android 10 and 11 beta factory images for Pixel 3XL (crosshatch). In both Android 10 and 11 beta, when I use "fastboot getvar all" in bootloader or fastbootd mode, there is no super partition listed. However, according to the BoardConfig-common.mk file, it looks like the device should have a super partition:
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS), true)
BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := \
    system \
    vendor \
    product

ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS), true)
# Normal Pixel 3 must retrofit dynamic partitions.
BOARD_SUPER_PARTITION_SIZE := 4072669184
BOARD_SUPER_PARTITION_METADATA_DEVICE := system
BOARD_SUPER_PARTITION_BLOCK_DEVICES := system vendor product
BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE := 2952790016
BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE := 805306368
BOARD_SUPER_PARTITION_PRODUCT_DEVICE_SIZE := 314572800
# Assume 4MB metadata size.
# TODO(b/117997386): Use correct metadata size.
BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 4069523456
else
# Mainline Pixel 3 has an actual super partition.

I've followed all instructions on the Implementing Dynamic Partitions page. Any help is greatly appreciated.

there is no super partition on a pixel 3/3xl, the device is retrofit to be able to work, but still no super partition: https://source.android.com/devices/tech/ota/dynamic_partitions/ab_legacy#background

source: Stack Exchange

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

sort: votes


text:
Turning on an Android phone with broken power and volume buttons
I have a Oneplus Two phone which fell down in just the right (or wrong..) way a couple of years ago and the volume and power buttons were smashed. I managed to use it for a while just without letting run out of battery but eventually moved on to another phone. Now I'm trying to see if I can somehow revive it or if I should sell it for parts. I remember I did install some app (likely Gravity Screen) that would supposedly turn the phone on when moved, but it doesn't seem to do anything. The phone is otherwise charging just fine, I just can't turn it back on.

If the phone is really off no app can turn it on. Try to connect to a charger, some phones start booting with charger attached.

Unfortunately, while it does start charging, it doesn't power up when connected with a charger. Thanks for the info!

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


text:
What shall I do if I damage battery?
I've been disassembling phone - Xiaomi Mi 5X/A1, in order to change crashed screen. However, while I was trying to remove battery, I probably cut battery cover, so I can see white slices and sharp smell is present (to remove battery I was just using playing card so I am very surprised that happened). Phone doesn't turn on and I am afraid it might explode (I really don't know but lithium is quite reactive). Is there any possibility to recover this phone? What shall I do with it?

As far as I know Lio batteries usually don't explode but they can set themself on fire. You can try to carefully remove the battery but make sure only to work where nothing is within range that could catch fire. Or place the phone in a closed metal box and bring it to a professional phone repair shop.

i guess this happened because of this glue stripes. buy new battery and replace diy https://youtu.be/J6M-WBbPAZM


text:
Backup data in Recovery mode on Android 3.2
My Samsung Galaxy Tab 7 plus(GT-P6200) is stuck in boot loop.I have tried to solve the boot loop problem but couldn't succeed.The only solution seems to me is to format my phone and I am unable because of important files.I am able to go to the recovery mode.It shows the following options:-
reboot system now
apply update from sdcard
apply update from cache
wipe data/factory reset
wipe cache partition
backup user data
restore user data
Is there any way I can back up data on an external sdcard or on my PC? My android phone is not rooted.

backup user data looks good! hopefully it is not encrypted. try to unpack with bckp2win

Please how can I do that

insert MicroSD Card and select backup user data from recovery


text:
Android detect which hardware key pressed
Is there a utility which detects which hardware key was pressed?
I can only find resources for simulating key presses but not for detecting them.
Something similar to xev on Linux.

'getevent -il' get device with three event names KEY_VOLUMEDOWN + KEY_VOLUMEUP + KEY_POWER then listen with 'getevent -lc4 /dev/input/event0' or with wrapper shell function GetKeyEvent

@alecxs That works. Please make that an answer.


text:
LineageOS 16.0, can't get tethering to work, Samsung Galaxy J5 SM-J500FN
I use 'Free' French ISP. Tethering was working previously, I made no update.
I have another device with LOS 16 that works well with tethering.
After running dhclient usb0 from my Linux OS, I get my private IP address, adb logcat shows:
07-16 01:46:41.940  4507  4507 I dnsmasq : DHCPREQUEST(rndis0) 192.168.42.124 00:11:22:33:aa:bb·
07-16 01:46:41.941  4507  4507 I dnsmasq : DHCPNAK(rndis0) 192.168.42.124 00:11:22:33:aa:bb address in use
07-16 01:46:44.221  4507  4507 I dnsmasq : DHCPDISCOVER(rndis0) 00:11:22:33:aa:bb·
07-16 01:46:44.222  4507  4507 I dnsmasq : DHCPOFFER(rndis0) 192.168.42.119 00:11:22:33:aa:bb·
07-16 01:46:44.222  4507  4507 W dnsmasq : Ignoring domain domain.tld for DHCP host name (null)
07-16 01:46:44.224  4507  4507 I dnsmasq : DHCPREQUEST(rndis0) 192.168.42.119 00:11:22:33:aa:bb·
07-16 01:46:44.224  4507  4507 I dnsmasq : DHCPACK(rndis0) 192.168.42.119 00:11:22:33:aa:bb linuxbox

from my Linux box, I can ping the Android device as well, but I can't get network access through Android
the Android interface rndis0 is up with ip in the same network as my Linux box.
I have default route established to the android device as well.
from the Android shell (via adb), I can ping whatever domain or IP.
in sysctl, I have net.ipv4.conf.all.forwarding = 1

This is some errors from dmesg:
[ 910.429371] 2 init: 1] init: Received control message 'interface_start' for 'vendor.lineage.trust@1.0::IUsbRestrict/default' from pid: 230 (/system/bin/hwservicemanager)
[ 910.429463] 2 init: 1] init: Could not find service hosting interface vendor.lineage.trust@1.0::IUsbRestrict/default

Any clue ?

Found the issue.
Blokada app is blocking tethering. Filled a bug report


text:
Ensuring that a deleted file cannot be recovered
A few months back, I had deleted a media file from my gallery. My phone wasn't encrypted at this point. Now, I wish to ensure that this file cannot be recovered in any way. What is the best way of doing this? Is it sufficient to encrypt my phone and do a factory reset? Or do I need to overwrite the memory blocks using software?

Is your device rooted? Securely deleting a file on an unencrypted flash storage is pretty hard. Enabling encryption usually only encrypts the used space.
The best method would be to fill the remaining free space with random data. However in such a case the spare sectors (used for wear leveling) may not be overwritten.

It's not rooted (still on warranty, so really wish to avoid any solution involving rooting). So what would you suggest to ensure that those spare sectors are also overwritten?

The only thing you can do is overwrite the free space with random (up to only a few bytes are left). Wait a minute and delete the created files with random data. And then do the overwrite again. After may be 4-5 rounds the chance is high that all sectors has been overwritten. BTW: What phone that is still on warranty comes unencrypted nowadays? I thought encryption is nowadays active by default on all devices (enforced by Google).

A better approach than overwriting the whole free space with random data would be to perform a factory reset. Hopefully if your hardware and kernel supports, BLKDISCARD command will be called for userdata partition which erases everything at lower level. But in fact there is no way to ensure 100% that your file is no more recoverable. Shredding and BLKDISCARD both erase only the physical blocks which currently belong to logical blocks (filesystem) of your /data partition. But possibly the physical sectors where actual file was written no more belong to /data partition. ...

... They might have been allocated to some other partition or over-provisioning space as Robert said. FTL firmware handles this all. So you data might still be recovered by chipping off the flash storage circuit and bypassing the FTL. However that happens only in forensic labs.

See my answers to How to make a complete factory reset, without anyone being able to retrieve my data? and Can user data be recovered after formatting and flashing stock ROM?


text:
Rooting my samsung j7 gone wrong
I was rooting my android phone by following youtube tutorial https://www.youtube.com/watch?v=eXyWgyW5-5M .
At step 2:11
after selecting bootloader only blue screen and downloading is written i.e. the above data is not written on my left top screen at the same time i started the odin and the odin log are
<ID:0/004> Added!!
<ID:0/004> Odin engine v(ID:3.1100)..
<ID:0/004> File analysis..
<ID:0/004> SetupConnection..
<ID:0/004> Initialzation..
<ID:0/004> Get PIT for mapping..
<ID:0/004> Firmware update start..
<ID:0/004> SingleDownload.
<ID:0/004> boot.img

It is not proceeding after boot.img please help me and my phone keep on restarting continuously if i stop the process and turn on device normally.

seems you have done nothing wrong. to unbrick restore original unmodified boot.img (haven't watched video but i can imagine you tried to flash magisk patched boot.img and this probably causes boot loop)


text:
How to use wired and wireless headphones simultaneously?
I have both wired and wireless headphones. I thought of sharing the both to see a movie.
To do that, can we get the audio output of both at same time.
I can able to switch the output but not access at same time.

Does this answer your question? Using wired and wireless headphones simultaneously?

Upgrade to Android Pie, most of the android devices support it as an inbuilt feature since API28.
There are certain hacks you will find on Google for lower versions, they don't work to be honest. As per my knowledge in Pie it will work, because I'm using it


text:
Drag-n-drop Uninstall
I have a Moro G5 and would like to know if there is any way I can disable the Android drag-n-drop Uninstall feature from the homepage which allows little fingers to uninstall parental apps by just dragging the appropriate icon to the uninstall at the top of the screen.
At times it makes me wonder why Android has this feature. Is it a life and death situation that requires apps to be uninstalled so easily?
I've tried to install different apps which claim to prevent uninstalling of apps but all fail and again uninstalling anything is as simple as dragging an icon to the uninstall.

just don't leave your child unattended, it's not a healthy toy

There are four different answers to this question at this link. Prevent apps being uninstalled


text:
How to disable popup when turning on/off Wifi in Tasker
I have Tasker on 2 phones. One is Huawei, Android version 9 while the other is KTouch, Android Version 8.1. Both have the same settings provided (Battery optimization disabled, Usage access enabled etc). However, Tasker in Huawei was purchased from the App Store but Ktouch is an .apk version downloaded from the Huawei phone. KTouch do not allow Play Store to be installed :(
What I want is to switch on the phone at a set time and turn on wifi. For the turning on of Wifi, I used the Net > Wifi "On" feature.
For Huawei, Wifi automatically turned on without any popup. However for the KTouch, there was a popup asking user to deny or allow for Wifi to be turned on. May I know how to disable this popup and just auto turned on the Wifi, just like Huawei's?


text:
How to run my Play Games with its correct game progress after it runs another Play Games account of the same game app?
I have this problem as a game user. I have contacted the game developer and they told me that's an issue of google instead of their game.
I have an old phone A with a Play Games account A that saved my game progress A. I have another old phone B with a Play Games account B that saved progress B.
I now have a new phone C that signed in both Google accounts A and B. When I opened the game, it loaded my game progress A, but actually, I wanted to load progress B.
Therefore I signed out my Play Games account A in the game settings inside my game, and signed in my account B. Restarted the game, but it still didn't load progress B.
So I cleared the cache and data for both Play Games, Play Store, and my game app. I uninstalled my game app. Then I switched to my account B in Play Games and installed the game app again. However, it still only ran progress A.
So I gave up to play progress B in my new phone C, and opened my game in my old phone B. Turns out my old phone B, even it only logins to Google Play account B, runs the game with progress A. None of my phone seems able to load progress B anymore now.
Does that mean my Google account A overwrite game progress A onto B? How is this even possible and how can I fix it? Ideally, I want to run progress B in my new phone C. Or, at least my old phone B runs my game progress B back again.

Do you also had account A on phone B? Because overwriting is a rare case.

I do not have account A on phone B. It only has account B on that phone.

Looks like the problem is finally found out. I guess it is because when my new phone downloading .dat files from the cloud, I immediately signed in account B. It was saved at the same location in my new phone as account A. The data then sent back up to the cloud. Therefore when I opened my phone B, it downloads the data back from the cloud to my account B.
Lucky enough, I have backups of the .dat files somewhere else very long time ago to restore it.


text:
Why can my phone only play ringtones from my SD Card now?
I have a Samsung Galaxy S8 running Android 9 (at least currently - I don't know when that update took place, so I don't know if it is responsible for this issue). I have always had my ringtones (in mp3 format) in a folder on my internal storage, and my music (also mostly mp3) on my SD card. Sometime in the past year, an update caused my ringtones to stop working. They would not play at all, even when trying to preview them in the ringtone selector. Instead, the default ringtone would always play.
After some trial and error, I discovered that I could only get my ringtones to work if I put them on my external SD card.
Has anyone else seen this issue? Is there a way to fix it? It's very annoying, and messes up my file organization and management.


text:
Trying and failing to use phone mobile data as proxy
I tried following this: https://android.stackexchange.com/a/196779/327770

I connected my android phone, a Samsung 8 with Roger's sim card to my computer
Bridged with adb
Port forwarded 6400 on my computer to 8080 on the phone
Started a proxy server with servers ultimate
Visited 127.0.0.1:6400, it works! I was excited!
But then I try to use 127.0.0.1:6400 as a proxy gateway, it doesn't work, I don't know why, or what else to do.

Any help?

What proxy do you use on the phone and how is the proxy started? Is there a reason why you don't use the standard USB tethering?

Have you tried setting proxy settings with a different browser Ex: try Firefox if you already have tried Chrome and vice versa.

@Robert I'm not using a proxy on my phone, I'm using the mobile data, I'd like a different application to use the IP resulting from my mobile data, that's why I don't just do standard USB tethering or hotspot.

@M.Abdelhafid Yes, I tried it on both Chrome and Firefox, I get ERR_NO_SUPPORTED_PROXIES, but when I visit the port on my browser, I'm able to access the files on the device, so I think the portforwarding works fine, but trying to send data out isn't working, I think.

In your question you wrote that you are using a proxy on your phone that runs on port 8080 - and now you say you don't use a proxy. And regarding the IP: It does not matter you you use a proxy on the phone or USB tethering (which uses NAT), you only get one IP address from your network provider, hence all request end up using the same IP address: The one from your phone.

@Robert Sorry if I wasn't clear, I started a proxy server on port 8080, my goal is to send traffic from port 6400 on my computer, through port 8080 on my phone, to the internet. I have a wifi connection on my computer, it has a different IP from the mobile connection on my phone, i'd like to use the mobile connection on my phone - on my computer. I hope that clarifies some things.

If you want to use your mobile connection on your PC just use USB tethering. If you don't believe me do it and open the page https://www.whatsmyip.org/ on both mobile and PC. They will show the same IP address.


text:
Where are these 14 GB images that are occupying my Android storage?
I have been running out of storage on my android phone, the one plus 5T. I have Google photos backing up to the web and have deleted the local images post backup.
Google photos and even gallery are barely taking up a gigabyte.
But there under storage it does show 14 GB of images but I cannot seem to identify where these are or which app they belong to. I looked up all the usual culprits in the app list  but none of them shows  a claim to 14 GB of memory.
Any thoughts how I can find these images and reclaim the space?

For in-depth explanation see my answer to How disk space is used on Android device?

I deleted my answer since your issue is not related to Google trash (6 photos only) and the answer posted by Irfan above would probably help you to get to the root of it. You may see this if it helps. Thanks. All the best


text:
How would one simulate a charging experience on a real android device?
I possess a Samsung Galaxy S8 with Samsung Global Goals installed. The app allows you to donate based on ads viewed during the time the device is charging. Would be possible to essentially 'fake' the charging experience to donate more on the go while also conserving energy? Morally questionable methods for the greater good are perfectly welcome ;)

I’m voting to close this question because it is unethical & not a fit for this site

Uh it is quite literally charity and just an intellectual endeavor. I'm not actually promoting any immoral practices.


text:
How to get drivers for Android support of USB webcameras for Streaming Apps?
I know there are applications that allow you to do videos through applications, for instance USB Camera - Connect EasyCap or USB WebCam, but it does not allow you to use the USB camera in Streaming applications such as Google Meet.
It is known since 2017 that standard Android API does not support them: the thread How to open usb camera in android using android.hardware.camera.external's answer:

There's currently (as of Android O) no common USB camera support on
Android devices via the standard camera API.
Some Android manufacturers do have their own support for USB cameras,
but it's hard to know what devices do and what don't.

So I think the only way to have USB camera in all streaming applications is to have driver support for USB cameras in Android.
I need the feature because of Corona pandemia, and have a need to stream while driving etc, and there is no phone that can have sufficient streaming video quality.
I know the project External USB Cameras, but it seams that you need to root your phone to do it, which I have not done.
I have not seen any attempt for the implementation of USB cameras in Linux kernel. I think the Linux should first have the support before android API will get it. Debian's Webcam article here, Package libv4l-0.
Phone: OnePlus 6T.
Android: 10, newest.
USB camera: Logitech C922 Pro HD Stream Webcam.


text:
Moto G6 not charging, not connecting via USB and battery indicator frozen at zero, not enetering battery saving mode
Here is how problem came about:
I unlocked my moto G6's bootloader and fastboot flashed twrp-3.4.0-0-ali.img in it. I opened TWRP trough the recovery option in fastboot, and enetered my PIN, but TWRP was unable to decrypt my storage. I noticed that TWRP was showing that the CPU temperature was at 34ºC and battery full. Then, I clickend on "cancel" the operation, kept TWRP read only and rebooted to delete the fingerprint recognition in system settings, which I thought could have been causing the failure of TWRP to decrypt. That didn't work, but this time I shut my phone down with power button. I am unsure if I did so before or after cancelling the operation, but I didn't choose the option to keep TWRP read only. I also noticed TWRP showing a ridiculously high CPU temperature before turning off. Regardless, it disappeared. I can now boot normally but I am having the issues described in the title. I tried a factory reset from moto but it solve this problem.
I performed a full adb backup before unlocking the bootloader with the command

adb backup -apk -shared -all -f C:\Users\

However, I may not be able to restore this backup via USB, given that my phone is not connecting via USB.
Any ideas of what to try?

After factor resetting through fastboot (so called hard reset), rather than factor resetting through the settings (i.e. soft reset), I got my phone in order again.


text:
Manage connectivity of apps to internet of Sim-card vs. wifi
I have a Redmi note 8 android smart-phone,
If I use Wifi then all the applications connect to the internet, But in Simcard, some of the applications are not able to connect to the internet.
For instance, in sim-card internet, some apps like Telegram or Whatsapp connect to the internet easily, but my Chrome browser or google map does not connect to the internet and says you are offline and there is no connectivity.
I'm wondering if there is a place in android or specifically in redmi note 8 which manages how application connectivity.
Thanks

To identify the cause you ca test a different SIM card in your Redmi phone, or test the SIM card in a different device. Then you will see if the cause is the phone or your mobile network provider.

Turn off any power saving mode or data saving mode. If u have limited the data per month or per day, then turn that off.
Run an Internet Speedtest from the sim card data. If you are having trouble run Speedtest may be there's an issue, so try that sim on another phone and check.
I think MIUI has an option for turning on/off mobile data used by app. You can find it in App Management (from settings) for a particular app.


text:
Enable Camera Shutter Sound Switch on roooted Samsung Exynos with Android 9+
This question has been asked a lot of times, but since new versions of Android rolling out the given answers are not accurate any more. The old solution as root was to rename the *.ogg sound files in the system/media/audio/ui folder but since Android 9 the sounds are hardcoded into the Camera App. On devices in countries where it is forbidden by law to take sneaky pictures (Europe for example) Samsung had to remove the switch from the options where you can disable the Camera Shutter Sound.
My question is: how to put back the switch into the Camera App options menu?

After days of searching I finally found out how to do it. The solution was to change the "cscfeature.xml" file in the folder corresponding to your country code. This file is encrypted, so I've written down a step by step guide. (no xposed or magisk modules needed, only root access to the filesystem):
add Call Recording en Shutter Sound options to your Exynos phone by adding 2 CSC options to cscfeature.xml

check your csc code (about phone > software information > service provider sw > last 3 letters: [CSC])

in root explorer goto: /system/product/omc/[CSC]/conf/cscfeature.xml

download OmcTextDecoder (https://github.com/fei-ke/OmcTextDecoder)

put the downloaded "omc-decoder.jar" in a folder together with the encrypted "cscfeature.xml" file on a linux pc

open terminal and cd to the folder where you have put the files

run: java -jar omc-decoder.jar -i cscfeature.xml -o cscfeature_decoded.xml

open the "cscfeature_decoded.xml" file in a text editor

add the following lines to the file:
<CscFeature_VoiceCall_ConfigRecording>RecordingAllowed</CscFeature_VoiceCall_ConfigRecord>
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>

save the file and rename your old "cscfeature.xml" to "cscfeature_encoded.xml"

encode the edited file by running the following command in terminal:
java -jar omc-decoder.jar -e -i cscfeature_decoded.xml -o cscfeature.xml

copy the changed and ecoded file back to your phone: "cscfeature.xml" and backup the old one to "cscfeature.bak"

reboot and you will find the shutter switch in the camera settings!

extra options:
https://www.askvg.com/tip-enable-hidden-secret-features-in-samsung-galaxy-smartphones/


text:
How does Android's FBE store each key used to encrypt each corresponding file?
I am very new to Android's FBE and still learning the basics.
From what I could understand, the way FBE works is that for each file to be stored on the disk, the kernel requests for a key from some secure hardware logic. The kernel then assigns this key to the file to be encrypted and is then stored on the disk. When that file is read from the disk in future, the kernel will use the same key to decrypt it.

Since there are multiple files that use multiple keys, who keeps track of the key used to encrypt each file?
Are these details stored in some secure non-volatile memory? If the device is reboot, and the keys removed from RAM, how is this information mapped again?
If some files are deleted on the disk, do the keys get re-used?

How exactly does FBE's key derivation work?

The file keys are stored directly in the ext4 file-system "dentry" of each file. See bottom of page 9 https://pdfs.semanticscholar.org/e1cf/9ad5614f3a24b24088e4b22e9218f0abc3a0.pdf Note: The key derivation process shown in this paper is outdated, but the key storage is AFAIK still used this way.

The per-file keys are generated from a "master key". Actually, FBE uses 3 "master keys":

A global one, used to encrypt data necessary to recover the other two keys
Device Encrypted, used to encrypt files that must be available even when the device is locked (To be able to show notifications etc)
Credential Encrypted, used to encrypt user files that require unlocking the device. This key requires the user PIN/password (or a hardware token, in the case of hardware-assisted unlock, like fingerprint) in order to obtain.

Each file (save for the /unencrypted folder) is encrypted by one of the three.
Every encrypted file or directory contains an extended attribute with index 9 and name c (xattr names are a combination of index and string. Index 9 is reserved for encryption data). Depending on whether the encryption is done using fscrypt version 1 or 2, this xattr contains either 28 or 40 bytes respectively.
The first 4 (v1) or 8 (v2) bytes is a header containing the fscrypt version, and the algorithms used for encryption, as well as some extra flags.
The next 8 (v1) or 16 (v2) bytes is the identity of the key used in the encryption. For v2, this is HKDF-SHA512 of the key, with empty salt, and info is a concatenation of 'fscrypt\0' (That's a NUL byte at the end, and it actually contributes to the final hash value), and the byte 1 (Context enum value for "Key identifier").
The final 16 bytes of the xattr are a randomized per-file salt. This is what allows each file to have a different key, and is randomly generated for each new file or directory. To answer question 3 from the OP, the odds of two files using the same key, regardless of whether one was deleted first or not, are 1 in 2^256.
In v1, the key derivation is AES-128-ECB, with the master key as the message and the per-file salt as the key. In v2, the key derivation is HKDF-SHA512, with the master key as the key, empty salt, and the info is a concatenation of 'fscrypt\0', the byte 2 (Context enum value for "Per-file Encryption Key"), and the per-file salt.
So, to answer the questions in the OP:

Each file keeps its own "salt" in an extended attribute. The actual key is generated from that "salt" plus the master key used by that file. The way master keys are stored/generated is a far more complex topic, which, depending on the device, may or may not involve an in-hardware encryption and key storage chip, and, depending on whether it's the CE key, may or may not involve the user PIN/password.
The per-file salts are stored unencrypted (not counting metadata encryption, which is a type of full disk encryption done on top of FBE) in extended attributes. Even without the master keys, anyone can read the salt values. But the master key is required in order to generate the per-file keys from the salt values. As long as the master key and salt are available, the key can be regenerated no matter how many reboots are involved, since the generation algorithm is deterministic. Only the master key has complicated storage. And, in the case of the CE key, one part of the process uses a hash generated from the user PIN/password, so it cannot be retrieved without the PIN even if you have all the data on all chips on the device.
As stated above, the salt for each file is chosen at random. Two files can have the same salt, but the odds are 1 in 2^256. If two files have the same salt, and are encrypted by the same master key (1 in 3), then they also have the same encryption key. It doesn't matter if one of the files was deleted or not, since there's no "collision check" done when generating a new salt (It would be too expensive to iterate over all encrypted files). The odds of it happening are infinitesimal anyway.


text:
Can a mobile processor be Overclocked with Software means?
I was searching weather a mobile processor be Overclocked or not so i came across an answer saying no because processor operates on PLL(phase locked loop) which if set to a particular frequency can't be changed. But i have heard about Android Overclocking with some custom kernels and rooted devices. So i need some expert opinion on this matter.

http://play.google.com/store/apps/details?id=com.grarak.kerneladiutor

I don't know if there are hardware limitations of some processors. But kernel can definitely do overclocking. If kernel doesn't support OC, you can't do from userspace.


text:
Samsung Galaxy S20 Ultra - default file transfer mode issues
I just got a Samsung Galaxy S20 Ultra, I tried moving some files using the usb-c cable. Thankfully, I have usb-c type port in my laptop. I attached it, and a lot of issues started.
The default USB settings for the phone are: connection controlled by the phone, file transfer - auto android. (I apologize if those aren't perfect translations, I am using the phone in my native language)
With those settings, I can't get anything done. Trying to look at pictures, disconnection after 2 seconds. Trying to move files, same thing.
After a lot of cursing and trying, I McGyvered this solution. If I connect the phone, then change the settings to "controlled by phone, pictures transfer" for a second and then back to the so called "default" settings, "controlled by phone, files transfer - auto android" - it works fine.
My question:
What can cause this? Why aren't the "default" settings actually default? Is there any way to fix this?

For a PC connection all modes that contain "controlled by phone" are wrong. Those modes are for direct connections via OTG, for example to a USB stick. When connected to a PC just use File transfer.

It's a separate settings. It's not "controlled by phone" or "file transfer". It's one setting with options "controlled by phone" or "other device", in which if I use other device (the computer), the connection automatically fails.


text:
how to convert android 10 phone to a software access point
I have an android 10 device which I would like to use use as software access point. I have broadband connection landline in my home. There are some corners where signals dont reach. So I want to use my spare android phone to convert it to a software access point. If this is some how possible then please let me know. I want my phone to be connected to the exisiting wifi network at a location in which signal is comming and at the same time want to convert the phone to work as an AP.
The phone is already connected to Wifi network in my ADSL router.

What you describe is not an access point but a Wifi repeater.

For rooted device see my answer to How to use Android in Wi-Fi repeater mode by bridging Wi-Fi with Access Point?. Without root some WiFi Direct based solution may work, never tried though.


text:
Strange Saving Behaviour of Samsung's "Write on PDF"
I did some work yesterday using Write on PDF on my Samsung S6 Lite tablet. Come this morning, and it didn't save. Bit of a nightmare. Anyway, I redid the work, but decided this afternoon to test out exactly how the saving works. It behaves very strangely!
I have uploaded a video (screen capture) to YouTube showing exactly the behaviour: https://youtu.be/ksfVwWm6iUY.
Basically, when I open with Write on PDF, it doesn't seem to save successfully. Instead, I need download it, open it up and write on it before saving. Even then, it saves some random stuff. The video hopefully makes this clear.

I want to open a PDF from a webpage (or app) in Write on PDF, do some writing on it, then save.
How do I get this to actually save?

I would try to use a local PDF file, not one that is saved in Dropbox.

Sure. The point is to not have to download the file then open it with Write to PDF when there is the option there immediately. As you can see in the video, it clearly says Saved in Device Storage/Write on PDF (around the 29/30sec mark). I don't know why it saves without the annotations...


text:
How to find previously installed apps after micro sdcard gone bad?
My micro sd card that was used to extend internal storage died. Now the apps I moved there are also gone. I don't remember precisely what I had on the card but would like to reinstall all of them.
After doing factory reset on my phones, the system automatically installs my previously installed apps after logging in to my google account. Is there a way to access this list?

Yes - your installation history is preserved in the Google Play Account associated with your device.  To see your apps, both current and previously installed, you can navigate to the Play Store App -> My Apps and Games (in the drawer) -> Library on your device.
Alternatively, you can visit https://play.google.com/apps?hl=en_US
Please note that if you side loaded apps or installed from a third-party store, the above information does not apply.


text:
Samsung Galaxy stops synchronizing Exchange ActiveSync account after every OS update
On Samsung Galaxy S10 Exchange ActiveSync (outlook365) account stops synchronizing after each Samsung OS update.
Our corporate IT policy requires a PIN to access the device when using the Android client.
I needed always to delete and recreate the ActiveSync account to make it sync again.
Today I have tried to just open the settings of Exchange server under setting/accounts in E-mail application and confirm it and it somehow started to sync again.
Any clue how to easily fix those problems and what is the cause?

Couldn't you just ask your Corporate IT section what controls the signature that ActiveSync needs for authentication? It probably includes multiple fluid parts, some more than others, that can change over time: your specific Outlook Account (not generally mutable), the device ID (not mutable), a signature from the OS version (mutable, but specific).

It is difficult with the IT section. But it is outlook.office365.com exchange account, so it should behave in some standard manner? The device is quarantined first, then they mark the quarantined device as an authorized device, that's what they do I believe.There is Device ID which should be unique.


text:
How do I correctly backup android apps with a PC for a factory reset?
I want to reset my phone. I want to preserve some apps state across the reset. I don't want to use third party software. Which folders do I have to copy?

Answer to "Which folders do I have to copy?": Where Android apps store data?. On restore you need to set proper UIDs/GIDs, permission modes and SELinux labels on all apps directories. For system and framework apps things are further complicated. Particularly related to content providers. Apps relying on android_id may also break after reset. App backup solutions (at least try to) take care of all of this.

If your device is not rooted you can only use adb backup.

In addition to Robert's suggestion, you can only backup those apps (through adb) which explicitly do not disallow backup (so, bye bye Firefox, Google Authenticator, etc.).

This question is not about where android stores data and not about fully backup the phone. I want to backup some decicated single apps, like terminus and whatsapp. So it is not a duplicate. These suggestions do not answer my question. If it works I guess Roberts comment comes the closest for now, but I had no time to check now.

Critical MediaTek rootkit affecting millions of Android devices has been out in the open for months depending on your chipset you can try to backup with mtk-su https://forum.xda-developers.com/showthread.php?t=3922213&page=101


text:
Did Android ever have an option to disable apps?
The way the Google support page ("Android 8.1 and up") is written suggests that this option may have been only available in third-party ROMs:

Disable apps that came with your phone
You can’t delete some system apps that came pre-installed on your
Android phone. But on some phones, you can turn them off so that they
won't show on the list of apps on your phone. To learn how to disable
apps, contact your device manufacturer.

I don't personally have an issue with bloatware as I run LineageOS, but temporarily turning off apps would have often been beneficial for various reasons (some, while useful, are rarely used and may run at boot; issues with the latest update and no roll-back option).

With root privileges you can disable any app.

@IrfanLatif: Natively in Android?

What does that mean? Aren't we talking about Android?

AFAIK, based on my personal experience, even without root, system apps can only be disabled (and uninstall updates, but not uninstall the app) on vanilla Android 2.x (or in fact, probably older than that). And I've also disabled some LineageOS' built-in apps since I don't intend to use it. Open the app's info and you can either disable (for system apps) or uninstall (for user apps).

@AndrewT. apps signed with system certificate cannot be disabled from app's info: https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-10.0.0_r1/packages/SettingsLib/src/com/android/settingslib/Utils.java#275

@IrfanLatif hmm, I probably need a distinction between "apps signed with system certificate" and "apps that reside on the system partition"... also, is this limitation added since Android 10 (or even Android 8.1)? I also have to clarify that most of my experience is still limited up to Android 7.x...

@AndrewT. I think it's so since early days of Android.

@IrfanLatif: Yes, I meant if apps can or could be disabled in the Android user interface (without running ADB or some third-party root apps for instance).

@AndrewT.: LineageOS does indeed have a disable option for some of its system apps (such as "email" and "browser").

@user598527 you need to execute pm disable <pkg_name>. Do it the way you like; through ADB shell, some terminal emulator app, a shell script, or simply from within some file explorer app (if it supports executing commands).


text:
USB tethered device cannot communicate with WLAN hotspotted device on the same Android phone
Here I have one Android phone, the provider, a device, usb, connecting to it through USB tethering, and a device wlan connecting through WLAN hotspot.
So once usb connected, it got assigned an IP in the 192.168.42.0/24 block. provider, acting as router, had an IP in there, of course. When I connected wlan, it got an IP in the 192.168.43.0/24 block, and provider had one IP in there too.
Now, I can't see the other from either device, either by scanning both blocks, or by directly pinging or sshing into the other device. All I can see is the device I'm operating on, and the two gateways, which are essentialy the same provider.
I suspected it's a limitation of the ROM I used at first, but after flashing a custom ROM the problem persists. Is this a native limitation of the Android OS? As far as I remember iOS didnt't have this problem, and a USB tethered device can communicate with a WLAN connected one. Thank you.

It's because hosts on different subnets cannot communicate with each other. 192.168.42.0/24 and 192.168.43.0/24 are two different subnets. iOS might be using same subnet for both USB tethering and hotspot, I'm not aware of. Or you can add a static route to setup Routing Between Multiple Subnets. Your question is more about networking than Android.

@IrfanLatif Thanks for pointing out! You're right about subnet communications. However, after adding a route on one of the devices, with the gateway being either address of provider, it can still not ping the other. I'll go further to figure out. It also seems true that iOS uses the same subnet (172.20.10.0/28) for both USB tethering and hotspot.

Here is a solution, and the question is largely the same.

Adding some routes or setting up proxy ARP is better than using third party tools to divert the traffic in userspace.

Agreed. I'll try and find a way.


text:
Cant flash my firmware on my huawei p8 lite ( Model Num: ALE-UL00___Build num: ALE-UL00C00B230) Also cant find firmware avalable anywhere?
I have been at this for almost 2 days straight now, Here is the scenario: I bought a phone off of E-bay, but it has a wierd firmware on it which didnt allow me to connect to wifi, but instead had a Wlan only option, and no wifi to be found anywhere. It also had all these wierd chinese apps on it with tons of ads bombarding my screen. and no wifi to be found anywhere.
So i decided to load a different version firmware off of an SD card, and not only did the new firmware not work, but it overwrote the old firmware aswell. Now i'm stuck in a bootloop. I have tried about 10 different firmware's by now and i cant get my device to successfully install it. So then i turned to Windows Powershell.
I followed online instructions, my computer detects my phone in Fastboot mode, but i cant for the love of GOD get my commands applied, it keeps saying:"" FAILED (remote: Command not allowed)"" '. Another note, before this whole mess, i enabled USB debugging, but i couldnt find an ""Enable OEM "" slider, I also cant find my exact Firmware anywhere. (So i just played around with simar titled Frimwares. )
**(My Model Number is: ALE-UL00)
(And my Build number is: ALE-UL00C00B230)**
**So now my phone is stuck with no OS/Firmware, and i cant use POWERSHELL because i dont have OEM enabled. SOME PLEASE TELL ME WHAT I CAN DO TO FIX THIS. My current fastboot screen sais : PHONE locked ** does that have something to do with the OEM setting and is that why i cant apply my Powershell Commands? please advise me, IM BEGGING YOU INTERNET!!!

In mid 2018 Huawei has stopped allowing to unlock their devices. If your latest firmware had been created after that date most likely Huawei has removed the OEM unlock option.

i see, but the firmware i need is from november 2016

ive been awake for 34 hours trying to flash this damn phone lol

@Wian i doubt you understand. your bootloader must unlocked. you can't flash from fastboot on locked bootloader. buy unlock code from 3rd party, Huawei doesn't provide unlock codes anymore

There is a way to get your bootloader unlocked, it's called slock unlocking.


text:
Android phone does not recognize that there is a backup in Google Drive
I have backed up my phone (LG G7 ThinQ) to google drive and I am trying to restore my app data. The problem is that when I go into the settings app under the backup and restore option, it tells me that there is no backup in the drive. I am running android 8.0 oreo and I was also running it when I made the backup.
I know for sure that I am signed into the account with the backup. I've tried resetting the phone and removing and re-adding the account but it still says that my drive does not have a backup.
What is causing this and how do i fix it?


text:
Easiest way to root Xiaomi redmi 4x with TWRP
I'm trying to root my Xiaomi redmi 4x (Android 7) using TWRP.  I have unlocked the phone,   turned on USB debugging and odm.  It's my first time ever trying and seem to get confused following the instructions I have found on YouTube and Google.  Many seem to have skipped steps or are not very clear.  Can someone please help me with a step by step guide to rooting my phone and the links to download the required apps. I would greatly appreciate it since I have four days trying to figure it out.  My head hurts from it at this point.

If bootloader is unlocked, flash TWRP uisng fastboot flash and then from TWRP flash Magisk zip for rooting. What's the confusion?

twrp-3.4.0-0-santoni.img + no-verity-opt-encrypt-6.1.zip + Magisk-v20.4.zip

Does this answer your question? How do I root my Android device?

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


text:
Can you block certain commands from a headset?
Many Bluetooth headsets have few buttons for a multitude of functions. Press once for "louder", twice for "next song", doubletap for dial, hold for stop, hold longer for pairing and what not. Especially the "dial last number" is the source of a lot of embarrassment. Can you limit the functionality of those buttons, i.e. disallow any interaction but volume change?
Thanks.


text:
No Items on Play Store
Whenever I enter Google Play Store on my phone, there are almost no apps available for me to download except for a very few (like 1 or 2) that are featured as the 'most popular.' On most categories, though, the screen is empty and an error message appears with a "Retry" button.
...Of course, the "Retry" button doesn't work and my Play Store remains empty.
I have a working Internet connection so I don't understand what's going on here. Apps installed prior to this issue works just fine, though.
My phone is not rooted, and I'm using Samsung Galaxy U running on Android Froyo 2.2.1.

Thank you for the information. Would the lack of TLS 1.2 support explain why I couldn't connect any accounts with two-factor authentication with my phone (adding from Settings --> Accounts and Sync)?

@Robert I think you should put the answers from your comments as a proper answer as they are relevant, and could be for others.

Your device is very very old. I am not sure if Google Play Store is still supported on Android 2.2 - if it would be still supported it would be the oldest
The current Android development tools can't create apps for Android 2.2 anymore, hence it is impossible to support such old apps. Also there are no emulators or devices available for testing apps on such an old platform. I assume for these reasons most developers have removed their apps with Froyo support from Play Store.
Additionally Froyo totally lacks support for TLS 1.2, hence it is now next to useless for Internet services as most web servers require TLS 1.2 or higher. There is a special Google Crypto Provider included in Google Services, however I am not sure if this provider is really available on Android 2.2 and additionally it is only used by apps which explicitly make use of it.


text:
I failed to install Magisk and now I can't get out of TWRP
I have a Xiaomi redmi note 8, which runs on MIUI-11,
I've recently unlocked my phone with MiUnlock, the official program of xiaomi to unlock (root) your phone.
I've stumbled across a few hickupps, but eventually I got here, I can't get further though...
I installed TWRP using the ADB terminal, wiped the cache, flashed a zip that disables force encryption treble and after that, I installed Magisk (I did this all with the compatible versions for xiaomi redmi note 8). Normally, I should've been able to just reboot to the system, but TWRP just comes back.
When I reboot, I first see: Redmi by Xiaomi (screen 1)
Then: Redmi Note 8 by Xiaomi powered by android (screen 2), this takes longer than it normally should,
after that I see screen 1 again, and then again screen 2, whereafter I get the splashscreen from TWRP and it boots in recovery again...
I've already tried clearing the cache, enabling "System" in mount, tried to write this code in the advanced --> terminal option:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
Nothing helped me, one other weird thing that scares me is that, when I watch my folders with file explorer from windows, everything has gotten a random string as name... You can see it in my attachment.

I would be soo grateful if someone could help me out.
Thanks for being awesome!

Is it an A/B device? Possibly you have flashed TWRP to boot partition.

the force encryption disabler did break fileencryption. do a factory reset to remove encryption completely and stay unencrypted. or restore/repair your fstab to bring encryption back to working state

@IrfanLatif What do you mean with A/B device? I've looked it up and it has something to do with how updates are installed, but I don't really get it.
I've just used the adb commands:
fastboot recovery twrp.img -->
fastboot boot twrp.img```
So I don't know where it normally gets flashed

@alecxs Do you mean within TWRP itself? Or with mi flash or another desktop program?

If I need to use wipe, which partitions should I wipe? System too? or only ART cache, Data, Internal Storage and Cache?

make sure you format (that is different from normal wipe) TWRP -> Wipe -> Format Data -> (type:) "yes" (if that fails, reboot and try again)

@alecxs , thanks, I did a format, but it removed my entire software, including my previous MIUI, got wiped. I've managed to fix this using Xiaomi adb/fastboot tools. Right now, I am back on MIUI, and still trying to get LineageOS.

when your device uses (FBE) file based encryption force encryption disabler will break it again. i recommend to preserve force encryption and disable dm-verity only. for LineageOS do not wipe vendor only system

@alecxs Okay, thanks, I stumbled on another Issue, my adb doesn't recognise my phone anymore, when I type adb devices I get List of devices attached and then an empty space where I had a number before, so I can't boot into twrp anymore :((

Volume Down + Power = fastboot, Volume Up + Power = recovery

Yes, but TWRP is gone from the moment you reboot with your phone, so I need to use adb to flash TWRP again, and atm, that isn't possible because adb doesn't recognise my phone

I managed to break it again, I got into TWRP, managed to install magisk, tried to install LineageOS, and now my phone loops in the "Redmi by xiaomi" screen, it just goes on, 2 seconds later, goes off, and on again, But I can still boot into TWRP. I used  LineageOS 17.1 from this link: link

It's encryption issue. restore original /vendor/etc/fstab.qcom

If you don't need the data download the stock fastboot rom for your device and flash it.
From your comments above it looks like you've already wiped your data.
So I would suggest that you download the stock fastboot rom. Do a clean all flash. Don't do the clean all and lock flash, as it will lock your phone.
Once it's finished, you can flash twrp but don't try to disable file based encryption and then try flashing whatever other rom you were trying


text:
How to block Minecraft on YouTube on Android phone?
I have a child who is too young to watch computer games on youtube.
How can I block Minecraft on youtube search and videos on my phone? (Android)
I tried Youtube Kids app. I blocked several videos, but I can still find other videos typing "Minecraft". Is it possible to block the search by whole words?
Also: Is it possible to block the search for "Minecraft" on the Google bar?
Or Is there a web browser that allows blocking by keywords?

Yes, this is possible with Google Family Link.
You install Family Link on your device (or some device that is managed by an adult) and simply configure the content you will allow your child to see and use.  You can configure everything from Filters on Google Chrome/Search to location and account information.
I'm not sure Google Family Link has everything you describe exactly out of the box, but with some adjustments I'm sure you can manage.  For example, instead of filtering out what you don't want to see, you might instead have to specify what you do want to see - i.e., a whitelist approach instead of a blacklist approach.
Here is the link to the Google Play app Family Link:
https://play.google.com/store/apps/details?id=com.google.android.apps.kids.familylink&hl=en_US


text:
Termux: airmon-ng: Permission denied
I want to run airmon-ng  but when I do it seems like the airmon-ng skript can't access other tools and it looks like this:
% sudo airmon-ng start wlan0
/data/data/com.termux/files/usr/bin/airmon-ng: 59: id: Permission denied
Unable to determine user id, permission errors may occur.
/data/data/com.termux/files/usr/bin/airmon-ng: 75: uname: Permission denied
/data/data/com.termux/files/usr/bin/airmon-ng: 171: ls: Permission denied

/data/data/com.termux/files/usr/bin/airmon-ng: 1085: ls: Permission denied
/data/data/com.termux/files/usr/bin/airmon-ng: 1095: sed: Permission denied
/data/data/com.termux/files/usr/bin/airmon-ng: 1098: sort: Permission denied
/data/data/com.termux/files/usr/bin/airmon-ng: 982: grep: Permission denied
/data/data/com.termux/files/usr/bin/airmon-ng: 989: grep: Permission denied
/data/data/com.termux/files/usr/bin/airmon-ng: 1008: ps: Permission denied
/data/data/com.termux/files/usr/bin/airmon-ng: 1008: grep: Permission denied
/data/data/com.termux/files/usr/bin/airmon-ng: 1013: [: -gt: unexpected operator
/data/data/com.termux/files/usr/bin/airmon-ng: 1024: [: -gt: unexpected operator

PHY Interface   Driver      Chipset

In the first place I thought it is about the permissons of airmon-ng itself and I tried to change its permissions resulting in no changes of its behavior.
To me it seems like it can't be due to id's permissions:
% ls -l id
lrwxrwxrwx 1 u0_a129 u0_a129 9 Jul  9 19:40 id -> coreutils

I already run termux-setup-storage and restarted. As this should not influence the issue it did not change anything as well.
Now I'm running out of clues and can't find similar issues. Got someone an idea?

From where did you get sudo? Try with Termux's tsudo.

I use the sudo from tsu/stable,now 8.5.1-2 all [installed]. Can't find the command/package you mentioned, so I guess you ment tsu?

tsu, sudo, tsudo etc. in Termux are not actual binaries but shell script wrappers around actual su binary provided by rooting solution like Magisk. You don't need to use any of the wrappers. Pass your command directly to su -c. But you obviously need to preserve Termux envitonment, in particular PATH and LD_LIBRARY_PATH for Termux packages to work.


text:
Forgot Authy password
I accidentally broke my OnePlus 5 which contained the recovery codes for my Instagram and Facebook, both were using Authy as their two factor authenticator. Thing is I apparently don't remember my Authy backup password either, I've tried all my common passwords.
I logged into Authy on an old phone (Moto G5 Plus), I've tried all my common passwords, none of them seem to work.
There's no other way I can login to my Instagram. For Facebook they're asking for a government ID which I'm not comfortable providing. Authy is the only thing preventing me from accessing my Instagram and Facebook.
Is there any way I can brute force the password out of Authy on my phone? There's no desktop version or Firefox extension/add-on that I can use to login to unfortunately. Or is there any other method that I'm missing?
Any small help would be deeply appreciated. Thank you

no more access to Instagram or Facebook is probably the best thing ever happens to impact your real life ;)


text:
WhatsApp - Auto Creates thumbnail images in DCIM Directory - Impossible to stop
Hope someone can help with this.
Handset
Xiaomi Redmi Note 8 Pro
Precondition
Ensure that Internal Storage/DCIM it totally empty.
Or that the Internal Storage/DCIM/.thumbnails directory is totally empty.
Clear all other caches where possible including WhatsApp cache.
Description
Launch WhatsApp
Enter a conversation
Click the camera icon to launch the camera
Camera is launched and allows a picture to be take.
A gallery of recent pictures is displayed
Issue
A number of pictures appear in WhatsApp recent pictures that i do not want to appear.
In Internal Storage/DCIM/.thumbnails,  a set of thumbnails matching the pictures as displayed as recent by WhatsApp are now displayed. How do i prevent this?
When i take a new picture with the camera app. This image will appear under the automatically created ones from the .thumbnails directory.
I have deleted the DCIM and .thumbnails folder many times. When the camera is launched from within WhatsApp the folder and thumbnails is automatically reacreated
Questions
How do i control what pictures are displayed to me when i click on the camera icon in WhatsApp. Whats App call these “Recent”
    Can it point WhatsApp to only look at the DCIM directory on my SD Card?
How do i prevent the old thumbnails reappearing the in Internal Storage/DCIM/.thumbnails directory when the camera app is launched from WhatsApp?
Other suggestions.
Kind Reagrds
Richard

In chat settings of whatsapp there is an option to disable media showing in gallery. Did you disable that?

Thumbnails are created in .thumbnails folder, so it's hidden from normal users why do you want to disable this. It makes the images and videos load fast and be stable. If they are occupying like more than 500MB of space then you can delete them. But when you open any image again the thumbnail of that will be saved there automatically. It like a safety type features in mobiles.

How do i control what pictures are displayed to me when i click on the camera icon in WhatsApp. Whats App call these “Recent” Can it point WhatsApp to only look at the DCIM directory on my SD Card?

After installing WhatsApp, you allow it the permissions to use the camera and your files. Pictures are usualy saved in the DCIM folder. Thus, when you want to take a picture with WhatsApp using the camera, WhatsApp, due to the access to your storage, displays pictures from the default folder where pictures are stored (even though that is not the folder where WhatsApp stores its pictures) plus other locations. What follows is the creation of thumbnails (if they were not already created) in case you would like to view/use other images.
Unless you deny both camera and storage permissions, you have no control. Plus denying the storage permission will also prevent you from using other files not just pictures.

How do i prevent the old thumbnails reappearing the in Internal Storage/DCIM/.thumbnails directory when the camera app is launched from WhatsApp?

Whether it's WhatsApp or another app, as long as they have permissions to your storage and/or camera, you can't prevent it. I think MediaStorage will re-create them any way if not immediately at least during the next reboot or next time you use the camera.


text:
How to use Events in Tasker?
I clicked on Profiles + Event and selected the event that I want (Net > bluetooth connection) and it shows me two input fields with Name and Address and a list of variables above.
Ok I select the variable that I want, but how do I give it a condition/value? If I enter anything else than the variable name it gives me some error about lower case characters...
Basically I want an event that matches if(%bt_name="Some device Name" && %bt_connected=true) and there's nowhere I can enter such code!
I find it baffling that there's no single example on the entire Internet about how to use this Tasker feature!

This answer should help


text:
Automatically copy calling phone number in realtime?
I was looking for an app or an API to copy currently calling phone number to the clipboard where I could paste them to PC directly.
For instance, I'm getting a phone call from (xxx-xxxx-xx) on my android phone and having an app called pigeon that automatically sends any clipboard copied content to PC.
Let's say I want the current calling phone number to be copied and sent to the connected pc to paste in a database searching for said client.
is there a way to achieve that efficiently?

Have you checked the different adb logcat and it's different buffers like main event system if it contains information on incoming calls? https://developer.android.com/studio/command-line/logcat#alternativeBuffers

@Robert It seems too complicated for the required task

It is possible with Tasker.

First, Create a profile that triggers this task.
Then set, State > Call Incoming.
Next set, Task  > clipboard to %CNUM (caller number)

I'm linking a Reddit post which has the exact project and an additional getting started with Tasker guide for your reference.


text:
Screen Timeout not Working
My Pixel 2 running stock android 10 seems to not respect the screen timeout setting. I have it set to ten minutes, and sometimes after putting the phone down with the screen on when it is fully charged and picking it up a few hours later it would be dead.

Have you at least checked the device after 15 minutes? A not working screen timeout is just one potential reason. Therefore you should check if it is really the reason. BTW: The Pixel2 has an AMOLED display, setting a screen timeout to 10 minutes has a high risk that you will face the OLED burn-in effect very soon.

Oh yeah sorry I have checked the phone between leaving it on and it dying, I've had the phone on and taken a 30 minute nap and it was still on when I got back to it. Also, does that mean that 10 minutes is too high for a screen timeout?

Probably some aggressive wakelocks, perhaps you can refer to this question: How to deal with (orphaned) WakeLocks?


text:
Rooted Android Emulator
I want to install avd with google play and work with it as a root, is it possible?
if not there any chance to install google play on rooted  android emulator , because I have an app the I can't install not via the google play store.
Thanks

You don't need to root a device to install an APK not available in Google PlayStore. Just install it via adb install (requires Android SDK/ADB minimal installed on the PC and adb enabled on the device which is by default enabled on emulators).

I need the root for the next steps (reverse engineering ) and I need that app installed.the problem is that I can't find that apk on the web, so the solution is to install it with google play but then I don't have rooted device ...

If the app itself does not need Google Play Services I would not use an emulator with Google Play installed. APK files can be extracted from non-rooted devices as well. Several file explorer apps have this functionality and via adb you can do it yourself. Also Web services like apkpure.com can download the APK file for you or you use a local download tool like https://raccoon.onyxbits.de BTW: If you are non-commercial you can simply use Genymotion emulators, they are already rooted and free for private use.

I have tried all those methods but nothing works, in apkpure I found XAPK and I cant install it...:(

Install XAPK: https://apkpure.com/xapk.html

Thanks , it doesn't work also, this is arm64 app , any other idea ? I don't know what its so complicated .

Let us continue this discussion in chat.

try this: https://stackoverflow.com/a/44473415/191761


text:
Can't decrypt adopted storage
Last night, I messed up my LineageOS 16 install on my Galaxy S5 and had to reinstall it, starting essentially from scratch. I wanted to see if there was any way I could decrypt the 128 GB microSD card I used as adopted storage and found this tutorial. I got the key from a backup made using TWRP and tried it on Linux Mint 20 MATE (booting from USB), but it didn't work. The following command gave me an error:
dmsetup create crypt1 --table "0 `blockdev --getsize /media/mint/4B2E-1F13` crypt aes-cbc-essiv:sha256 [16-BYTE HEX KEY] 0 /media/mint/4B2E-1F13 0"

blockdev: ioctl error on BLKGETSIZE: Inappropriate ioctl for device
/dev/mapper/control: open failed: Permission denied
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.02.167 (2019-11-30) and kernel driver (unknown version).

Doing it with sudo gave me this error:
blockdev: ioctl error on BLKGETSIZE: Inappropriate ioctl for device
Invalid format on line 1 of table.
Command failed.

I couldn't even mount the SD card with Termux when after putting it back into my phone. Is my data unrecoverable? Do I have the wrong key? Thanks.

/media/mint/4B2E-1F13 must be a directory. You need to provide the block device path to dmsetup. It must be something like /dev/sdb or /dev/sdc. Use df to see available block devices. Or see kernel log using dmesg when connecting SD card to PC. // Btw your question is about Linux, not Android.

Duplicate of https://stackoverflow.com/q/16701326/9165920

@IrfanLatif I changed /media/mint/4B2E-1F13 to /dev/mmcblk0p1 (my SD card according to df -h) and the error messages were the same except the BLKGETSIZE lines were replaced with blockdev: cannot open /dev/mmcblk0p1: Permission denied. The same thing happens when inputting /dev/mmcblk0 instead.

no need to nest blockdev in backticks just type value of partition size directly and use proper path to block device

@Pete block devices cannot be read without root. Run from a root shell or use sudo with dmsetup as well as blockdev (both are separate commands). Or write partition size directly as alecxs said to avoid using blockdev in subshell. Provide encrypted partition (mmcblk0p1), not whole SD card (mmcblk0).

@IrfanLatif My memory card actually appears to have 2 partitions. mmcblk0p1 is ~17 MB and gets mounted automatically upon insertion at /media/mint/4B2E-1F13. The file browser shows it as empty with ~127 GB free. There's an unmounted 2nd partition (~119 GB) called mmcblk0p2 and I don't know if I can mount this (or if I even should). I think I'll try the command again, but with ````sudobeforeblockdevas well asdmsetupand use/dev/mmcblk0p1instead of/dev/mmcblk0``` and see what happens.

Then the encrypted partition is /dev/mmcblk0p2. You need to decrypt it before you can mount it. There is no visible filesystem on it until it's encrypted.

https://unix.stackexchange.com/q/599682

Good news: trying the following command successfully decrypted my SD card without any errors:
sudo dmsetup create crypt1 --table "0 `sudo blockdev --getsize /dev/mmcblk0p2` crypt aes-cbc-essiv:sha256 [16-BYTE HEX KEY] 0 /dev/mmcblk0p2 0"

A couple of minor issues:

sudo mount -t /dev/mmcblk0p2/crypt1 /media/mint/sd returned the error mount: /media/mint/sd: can't find in /etc/fstab. I can view the content of the SD card in the file browser running as admin, however.
Copying the files over to my laptop's Windows 10 SSD, some files and directories didn't get copied due to the presence of invalid characters in their names (mainly asterisks and colons in file names and a period in a folder name). Not sure how to deal with these...

Thanks for all your help.

-t expects a filesystem type. Learning by trials is a good thing but having a brief look at manuals and existing web resources saves a lot of hassle: https://www.man7.org/linux/man-pages/man8/mount.8.html

Oh yeah, I forgot about the ext4 part in poqdavid's answer in the question I linked lol. Thanks for the catch. I'm still not sure how to deal with files and directories with invalid filenames for Windows. It seems like only ext file systems can support those filenames, and Windows can only read that with 3rd-party programs. The other filesystems that Windows can use (exFAT and FAT32) don't support those filenames, so I don't think I can copy those files to flash drives formatted as either of those.

No way to force filesystems change their behavior. Such limitations are deep rooted in their design. For backup/restore purpose archive such files using tar, zip etc. Or batch rename such files if possible using sed, mv etc.

you can use tar --transform to convert file names during extraction to fat32 file system based on whitelist charset

transform="--transform='s/[^][A-Za-z0-9 !#$%&'$'\047''()+,./;=@'$'\136''\`{}~'$'\177''-]//g'"; tar -c /media/mint/sd | tar $transform -vxC /media/mint/targetdrive

... still might overwrite case insensitive duplicates (like File.txt with file.txt) but this kind of copy will never fail


text:
Use laptop's keyboard shortcut in in Android device
I am using Ubuntu 18.04 with Genymotion version 3.1.0 for my laptop. How do I use the laptop's keyboard shortcuts like Ctrl+C and Ctrl+V in the installed android device?

Genymotion added support for copy and paste around their 2.1.0 version release.  The host device and virtual device share a clipboard so copy/paste is possible.
There are a few ways to copy/paste into an Android emulated device:

long press on a text entry field and then choose "paste".
menu+c/menu+v if your keyboard has this button.  It looks like this.

Sometimes this is called the "application" key.  See: https://help.gnome.org/users/gnome-help/stable/keyboard-key-menu.html.en

Change the IME to a keyboard that supports ctrl or alt for copy/paste.

I haven't used Genymotion in quite some time, but I would also try digging around its settings to see if there are key remapping options for things like copy/paste.

Thank you @CzarMatt. I tried the first suggestion and it's working. The second one doesn't work.


text:
Galaxy A50 won't boot up or even try to
I was on my phone looking at twitter and then it just suddenly stopped working, i thought it was some app crash but my whole phone wasn't working, not even the power button.
I force restarted my phone and restarted it, the boot screen showed up and then disappeared.
I tried charging it but it doesn't show anything, i tried to remove the sim card, i tried to boot into recovery mode and my attempts were unsuccessful, and the screen is not the problem as my phone doesn't even vibrate after booting up.
Somehow, i got my phone working again for a couple minutes, i pressed the power button and the battery showed up (i had 45%) and the boot screen showed up, but the was stuck on that screen this time, i force quitted my phone and next thing you know my phone is still broken.
My phone has a lot of space left (50GB), it isn't very old, (i've had it for like 10 months) and the charging port is working well, i tried it on my switch and it does the job.
Any help would be appreciated.

is it by any chance physical problem like water damage (wet air or pocket) or dropped on the floor? is behavior same with keeping charger connected over night? might it be the case that it's still on but unresponsive?

No, i was staying on my phone and it just flat out froze, i was in my bed, it isn't a screen problem as i said because it turned on again for a minute but was stuck on the boot screen nor is it on because i tried to make it ring using another phone, and finally i kept it charging for over 2 hours now i'm pretty sure it's battery is full.

press Power for 30 seconds to see if there is some kind of response. or watch youtube how to disassemble in order to disconnect battery

I've looked further into the problem and it seems to be a software issue, the power button doesn't do anything, it's practically unusuable and removing the battery would be useless because the phone is already off and i could risk damaging the phone. I will go check tomorrow and go to samsung to fix it.


text:
Accessing list or raw data for blocked numbers?
I'm using some vendor' stock ROM but I as far as I understand it still uses Blocked Numbers Storage - com.android.providers.blockednumber, however I cant seems to find a way to export or back it up.
Is it possible with Tasker?
Is it possible with root? Any API that can get me access to it, if I have root and will set my test palceholder app as a default dialer? I'm willing to use some Xamarin template to make it work.

Blocked numbers are accessible through contacts APIs. Stock Contacts app can show blocked numbers, as well as add and remove them. Or with root access: sqlite3 /data/user_de/0/com.android.providers.blockednumber/databases/blockednumbers.db 'select * from blocked'

Huh, interesting, it is empty.

Unless you're really sure that it's using the public shared provider "Blocked Numbers Storage", there's another possibility that the Dialer app is using a its app's storage/DB for blocked numbers.

Yeah, it is possible that MIUI is a special snowflake that does that it wants.


text:
Reviving my phone after a small part of it (eg the processor) overheated
I tried to compress my 1.6GB video in the Media Converter app by exporting it to mp4(h264,aac) on my OnePlus 3 as per https://www.quora.com/How-do-I-reduce-video-size-on-Android. However, approximately 75% of the way through the conversion (after about 30 minutes) my phone overheated and turned off (with the screen going black immediately and no shut-down procedure). I tried to turn it on in the normal way, but it would not turn on. After leaving it to cool for 5 minutes, I plugged it back into the charger and it immediately turned on automatically (displaying battery at 30%).
I tried to compress the video a second time, this time putting my phone on an ice-pack to keep it cool and leaving it on charge. I touched and checked the front and back of the phone regularly to ensure it was remaining dry, was not cooling too much because of the ice pack, and was not overheating (it remained at something like 20 degrees C, approximately the same as the top of the ice pack, through most of the process - although the bottom of the ice pack remained cold). This time it turned off after 45 minutes, 1 minute before the conversion was due to complete. Immediately after it turned off I noticed a very small area near the speaker (I assume near the processor) was overly warm (though not hot). I assume the heat could not escape fast enough from the hot processor into the body of the phone. Maybe the internal thermometer was closer to the ice-pack than the processor and 'tricked' into thinking the processor was cool. Now my phone is not turning on, displaying anything on the screen, or vibrating, even after plugging it into the charger and unplugging it many times over the past 12 hours. What can I do to try and revive my phone?

If you manage to revive your phone and still want to do cpu-intensive jobs, make sure to root it, than set a kernel profile which would auto cut the power to the CPU once a set temperature reaches (many runtime kernel tweaks apps are available in the market). Make sure the temperate is way below your SoC can handle. Also, try running your commands with limited processors. taskset command should help in this case.

The only thing you can do is get it to a repair shop. Smartphones are not designed so that a user can do anything. May it would be possible to replace a certain part of the phone but it requires experience and testing tools to identify the defect part and disassembling/reassembling is not that easy (see OnePlus3 teardown).

@Robert I bought the phone second-hand from CeX, and am 18 months into a 24-month warranty. Should I tell CeX what happened first to see if they would replace it, in case taking it to a repair shop would void the warranty? Or would running the phone on an ice-pack have already voided the warranty? (Just to re-emphasise the phone as a whole was not at a lower-than-normal temperature when it went unconscious, but I probably introduced a steeper-than-normal temperature gradient from the processor to the internal thermometer(s).)

I managed to turn my phone on by myself. Hopefully it will continue working.
I warmed up 2 plates in the oven to 80 Degrees C, took them out, and put a third (cool) plate with the phone on top of them. Once they had cooled enough to hold my finger on them, I stacked them into a warm plate-phone-warm plate sandwich, with the top plate upsides down. This warmed the phone up quite a lot, and was meant to allow any moisture to escape. Maybe it also affected the battery. In any case it turned on after 30 minutes of warming.
I would have put my phone on the radiator, but the weather is too warm to turn the radiator on right now.


text:
Sony Xperia Z1 Compact D5503 (Android 5.1.1) extremely laggy typing
Sony Xperia Z1 Compact D5503 with Android 5.1.1 os.
I got this cheap phone ~a year and a half ago.
Works well overall, but there's one problem that I had since I bought it, the typing is very slow; it's extremely laggy, I press a key, it displays the visual animated keypress for a couple of seconds until it identifies the next keypress. Then 1 more second for another keypress. This is ridiculous. In fact I still use my iPod 2G for notes and whatnot I bought in 2009 and typing works perfectly; no lag at all.
This doesn't always happen but I cannot identify the prime cause. It mostly happens when I'm typing in notes, and sometimes on the web browser. Other times web browser might work fine, messages work fine. I tried installing 'Gboard the Google Keyboard' app, in case it'd help but no. Same thing.
I didn't mind much at first because I very rarely use it, occasionally for notes. But lately I've been using it more (you don't have much to do in the army other than get a smartphone with internet and browse the web, or read, to pass the time) and I am seriously at the brink of tossing it 100 f*in metres away. I do want to get a "dumb phone" asap actually if this is not resolved.
If you have anything to suggest that would be great.

The device has a quadcore and 2GB RAM, even if old it should be not that slow. I assume because of the Android OS and it's vulnerabilities you may have accumulated a lot of malware (ad-clicker) on your device that is stealing the performance. Or you have too many XXL_apps running in background. Have you ever considered to unlock the device and install LineageOS - eg. LineageOS 16 (-> Android 9). There are no official builds, but the unofficial one seems to be relative stable: https://forum.xda-developers.com/sony-xperia-z1-compact/development/rom-lineage-os-16-0-xperia-z1-compact-t3886233

Yes, malware might have been the case. I performed the all powerful factory reset and after testing it for a couple of weeks it seems to be fine now, fast responding, no lags. It's all good.


text:
Retrieve (list of) default apps via ADB
Many of you will know (or at least have heard of) commands like adb shell pm list packages or adb shell dumpsys package to retrieve a list of apps available on your device. What I am looking for and cannot find is a command to list default apps – like what is set as default launcher, default camera, default browser etc. Not even parsing the full details of all apps via e.g. for app in $(pm list packages); do [[ -n "$(dumpsys package ${app#package:} | grep APP_BROWSER)" ]] && echo ${app#package:}; done reveals that (the command would simply list all web browsers on the device).
So how can I query for those default apps via ADB? It's fine if I have to pass the "type" (like APP_BROWSER in my example) as long as there's a reference of types available.

As of Android 10 roles are saved in /data/system/users/<user_id>/roles.xml which can be dumped using dumpsys role.

Thanks, @IrfanLatif – that's what I was looking for in dumpsys. Looks like role was added only with Q (and up), as it's not available on the Oreo or lower devices I've got here for testing (did not yet check with the Pie one as it's currently "occupied"). Any clue for what would work at least with Oreo, and ideally also below? I mean, the concept of "default apps" goes back at least to 2.x IIRC – so the system must remember them somewhere there as well. I've combed dumpsys up and down, didn't find a hint.

I don't have access to any Android release other than Q ATM. But IIRC these settings were split across multiple locations, at least /data/system/users/0/package-restrictions.xml and /data/system/users/0/settings_secure.xml. So the respective CLI tools (pm and settings) might dump the required info. Or may see the files directly if root access is available.

Thanks again! settings doesn't show them, and for pm I didn't see a corresponding parameter. What sounded close was cmd package resolve-activity -c android.intent.category.LAUNCHER – but that returns nada ("No activity found") for all I tried. I was able to identify the dialer using cmd package resolve-activity tel://123456; similarly the browser with a http URL (yields the OS (package android) if no default set, interesting) and the mail app with a mailto:john@example.com. But what actions to attempt for homescreen, assistant etc?

By "default apps", did you mean apps that the user can set from the Settings (e.g. default dialer, default camera), the default "open with" apps, or both? Other than those that are explicitly set from the Settings, most apps are set as default from calling implicit intents -- usually for specific filetype/mime or some URL schemes -- that match the intent filters registered on the apps' manifest file. Haven't researched where these values are stored in the system though.

Initially the first group (as my answer shows) – but the second group would be interesting, too. Actually, I'd say they overlap. On one of my devices, e.g. default mail resolves to k9 mail as that's the only mail app available (the other one is disabled). I even used the "implicit intent" way for the URLs I guess (without knowing its name, thanks for that!) Though when resolving via MimeTypes, that could be a long check ;)

I meanwhile found a partly resolve working with Android 7/8 and up (when the cmd package command was added):

Default dialer: cmd package resolve-activity tel://123456
Default mail: cmd package resolve-activity mailto:john@example.com
Default browser: cmd package resolve-activity http://www.example.com/
Default messenging: cmd package resolve-activity sms://123456
Default homescreen launcher: cmd package resolve-activity -c android.intent.category.HOME -a android.intent.action.MAIN

In the output, then grep for packageName= (e.g. packageName=com.android.messaging for the default SMS app). If a given action has no default set (e.g. multiple browsers are installed but none was declared to be "always used"), the action will resolve to the OS (packageName=android) to prompt the user. Side-note: if you want to check for available alternatives, just replace resolve-activity with query-activities (note it might also return a one-liner like "No activities found", especially on Android < 8).
I call this a "partly resolve" as it lacks several default apps I've no idea what activity to ask for – like the default homescreen launcher (note: just figured) or the assistant app (hints welcome!).
Thanks to Irfan Latif for pointing out a solution for Android 10 and up. Here, the role manager was added which I had already found but didn't figure how to call it via ADB. Turns out that was because all my devices are running Android < 10 (and as just said, role manager was added with Android 10), and the command would be dumpsys role (but not availabe before Android 10).

PS: Still missing something that resolves to the Contacts app, the Emergency app and the Assistant app…


text:
Any way to flash a custom rom without twrp recovery?( It doesn't work on my device)
I am trying to root my Galaxy Note 10.1 (sm P605). I've already upgraded the firmware with odin and flashed twrp with odin as well. Now after flashing twrp it boots normally then I switched it off and tried entering recovery mode. It shows me 'Recovery is not Seandroid Enforcing'. Now after getting this error multiple times I flashed the twrp again with auto reboot unchecked in odin. I keep getting the error again
I followed some steps on the XDA forum for this device and it said uncheck auto reboot but that I've already tried. I tried kingsroot but it just doesn't work as well.

TWRP is working fine. start from scratch and read more careful. Be aware of dm-verity, RMM protection and Vaultkeeper on newer devices (if that concerns your device). not seandroid enforcing mean your TWRP has successful switched kernel into selinux permissive mode (which is desired), nothing to worry about and unrelated to your issue

Then how to make it work? I've tried everything again from scratch but still stuck on Seandroid not enforcing.

you must boot straight into recovery after flashing. try another build https://forum.xda-developers.com/showthread.php?t=3635803

Thank you so much this one worked


text:
Is it possible to have shell access to Trusted Certificates
I have an Android Application that launches Python via JNI. Inside of Python I have web requets that I make, some need to be secure. I can configure the APK to be able to access a User CA certificate, but the problem comes in when trying to make a web request from Python.
If I manually copy the PEM file into my app space and load that, I can make SSL calls in python without a problem, but trying to use the OS installed credentials is where I'm having problems. Is there any way in which I can load or use the certificates that have been installed? I would need to be able to use or access them from the shell.

If you start python via JNI python is running within the app process? Anyway please note that (app+python) programming questions are better suited on stackoverflow.com. BTW: You can make a virtue out of "necessity" to add your own certificate to python: Just call it root ca/certificate pinning and you have a security feature ;)

I've posted a question to SO with no responses for a few months. I figured I'd post something here as more of a "Can I access these from outside of Java" type of thought process. Is there a folder on the device I can cat or try to load trusted certs from.  Similar to what was mentioned here
https://github.com/yan12125/python3-android/#ssltls

And yes, python is running within the app process

Directly accessing the certificate store is not a good idea as it may change in future Android versions. I would use the Java app, list all root CA certificate and convert them in a format that can be used by Python.

@Robert So once I can list all the CA, can you point me in a direction of how I would use this to create a PEM?  I see how maybe I could do it with openssl, but not sure how to do it all from java
https://stackoverflow.com/questions/652916/converting-a-java-keystore-into-pem-format

https://stackoverflow.com/questions/3313020/write-x509-certificate-into-pem-formatted-string-in-java

@Robert in running some of these things, do you know if the User Certificates are available in the KeyStore object, or do I need to access them through KeyChain?

I have not tried it but in my understanding the user certificates are automatically "mapped" into the AndroidCAStore in case the app that is requesting this store is configured to use user certificates via Network security config.

Thanks for the help. I think I have managed to get what I want working.


text:
Galaxy Note 4 "boot loop"?
I'm guessing it's called boot loop from research over the past few hours.
I switch it on, it loads the logo and phone introduction screen, the screen goes dark, it resets and then repeats.
Charges fine, works without charger. I've tried lots from Google results like take out battery, soft and hard reset, recovery boot screen: clear cache, factory reset. I've even tried installing TWRP and rooting via odin which was successful, computer recognised it via USB. I then tried installing a custom ROM and gapps which was also successful but still have boot loop issue.
Possible water damage, if so what part will be faulty?

Have you tried to boot your device while connected to the charger?

@Robert Thanks for the reply Robert, yes I have and got the same result.

How many seconds does each loop take? This allows us to guess how far your device gets it the boot process.

@Robert From fully switched off I power it on and it takes 15 seconds for the screen to come off logo and go blank, then a further 5 seconds for the first vibrate followed by a second vibrate and reset 1 second later (approx)

sounds like short circuit in power button. watch youtube how to disassemble and dry components with hairdryer. android in general does not boot on modified partitions like recovery, you need to disable dm-verity first

@alecxs Thanks, I will try this


text:
How to unencrypt my data on a Lenovo Tab M8 FHD TB-8705F device
I'm trying to unencrypt my data on my device.
My device is rooted with Magisk Manager.
This is what I have already tried.

Uticked the box Preserve forced encryption in Magisk Manager.
Patched the boot image in Magisk Manager.
Flashed this patched boot image to my device.
Formatted userdata thru ADB.

But after this my userdata is stilled encrypted.
Thank You,
Sruly

you need to patch /vendor/etc/fstab.mt6762 see this example for userdata partition flag encryptable= and 'fastboot format:ext4 userdata'

Looking at that example I'm not sure what the encryptable= should be. There are 2 places in that example that have such a statement.

/dev/block/platform/bootdevice/by-name/userdata

@alecxs I have now another device that I'm trying to unencrypt. Even after changing the fstab.mt**** file it goes back to its original form after reboot. I tried to pull the vendor image and changed the file then re-flashed the image. It still goes back to its original state.

A/B device? Forward Error Correction?

I'm not familiar with these terms I looked at the link you provided. How can I find out if one of these reasons is my problem? If it is waht can I do about it? Thanks

i don't know, it's heavily device- and rom- dependent. Open new question with good device description and as much details as possible regarding your problem

check the universal dm-verity disabler xda thread page 90 there is some info about that


text:
Is there STB emulator for STB developers which runs on PC?
We develop an STB app, we run it on actual STB boxes for testing, the boxes are slow and the development experience is so bad.
Many options on the STB are only accessible through a remote control. We use windows 10. We tried many Android emulators and bluestacks and whatnot, all of them boot the app but they boot it in phone layout, we're looking for

Free STB emulator that can be used for development and run on windows
The STB should open the app in STB layout, as if we're using an
actual STB BOX
The STB should map some keyboard keys as if they were TV remote control keys, such that everything we can do on an STB, can be done on the emulator

The emulator form Android SDK has two Android TV emulator device profiles, have you tried them?

@Robert I'm not the android developer, I asked him to test that, he said he did and didn't work, not sure if I should take his word, will test that myself in few days and let you know


text:
TWRP 0MB Internal storage issue
I have a Lenovo tab 4-10 TBX304L
I flashed it with TWRP and It shows 0 MB for Internal storage.
I Tried changing file system to ext 2 and ext4.wiped data and system.
Reinstalled android stock rom via QFIL tool.
Any help?

fastboot format:ext4 userdata

Tried it......Even formatted data.....

after formatting, boot straight into TWRP (fastboot boot ) otherwise partition becomes encrypted again

Well Ill tell U Brother!!!..After flashing twrp....ill let u know if it works...Thankss


text:
Android fastboot restoration points
Does Android have restore points that can be accessed via fastboot?
In Windows7 (support ended February 2020) restore points are created so the OS can revert back to last known state should anything go wrong. This revision includes settings, software, browser history, etc. This handy feature has helped me several times. Does Android have such a utility/feature where by any means (fastboot or adb) it can be rolled back to last known state? Kindly read more to understand the full situation.
My phone is stuck in fastboot. I have been doing research on how to get it out of this. The phone runs Android Go. Usually the OS updates and completes without any issues, but this time during an update the battery died and upon power up it got stuck in Fastboot mode. I understand both Fastboot and ADB have commands of their own that can be used to interact with Android OS via USB connection. I have a question that my research has NOT answered. Before I run any commands in this mode (fastboot) I want to know, is there a way to restore the device to its last stable state (ie before the failed OS update)?

Does this answer your question? A/B (Seamless) update device questions

@alecxs Thanks for the input.
In many ways this information helps. Now another question is how do I get out of Fastboot into the partition that had the older (working) version? According to the link if the update is 'borked' it should rollback to working build. But now it is stuck in Fastboot. How do I tell it to come out of Fastboot into the working build. Thanks in advance.
PS: Is there any pdf tutorial you can recommend to learn fastboot, adb commands?

fastboot or adb just some google results (haven't read)

thanks for the help @alecxs. Since I don't know what slot was active/inactive, I will go over the commands to know which one can retrieve the slot with a clean installation of the OS, then Fastboot into it (the other slot should be the one that failed). Sounds like a plan. I will endeavour to post results so others can learn as well

flash official ROM

I ran the command fastboot getvar all and the current-slot was NOT in the list output. I can see partition-size and partition-type listed for diff partitions though. My guess is the device does NOT support seamless system updates for dual slots. I tried rebooting into recovery but it takes me back to Fastboot mode. I can see recovery in the output but cannot boot into it. I can really use some useful suggestions thanks.

@alecxs I had to delete and repost an edit to my last comment (kindly take a look). Will I be able to keep my files/data if I flash the official ROM? I am keeping that as a last resort until I am sure I have exhausted ALL options. fastboot continue does NOT work for me

@alecxs I have asked another question with more details.
https://android.stackexchange.com/questions/228396/cant-access-recovery-partition-android-8-1-go-edition

you can try
fastboot --set-active=a

or
fastboot --set-active=b

ane one of them should work if your other slot is not corrupted

please add fastboot continue (or fastboot reboot) to your answer as well

I will NOT be able to use this since I recently found out my device does NOT support Seamless System Update.

@thinkhjj what is your phone model

@theggputest55 I have asked another question that has phone details and commands I have tried:
https://android.stackexchange.com/questions/228396/cant-access-recovery-partition-android-8-1-go-edition