text:
There's some weird storage nonsense going on, as if part of an app's data is permanent on your phone?
So, when I want to free up some space, first yesterday it said WhatsApp was worth 207MB, and then today it said it was only worth 166MB, What's happening here?!

Go in-depth to learn how things work and never get frustrated :) See How disk space is used on Android device? and Where Android apps store data?

We can't tell how you are freeing the storage. If you are using any third party app then it will free the caches of whatsapp. In which case no one can say how much storage is used by your whatsapp cache. Whatsapp it self deletes some caches when there is no need of it. So, if it's cache then it's totally normal.
Other than that you should look into Whatsapp's media folder where all your images,audio,video and docs are stored.


text:
How can I create a list of files in a folder with adb, including time stamps?
I'm a new adb user and am trying to build some automation with images from my Android. I've been able to connect, 'ls' and push/pull files. What I want to do is determine the most recent file(s) in the Camera folder on the phone and pull that one. Is there a way to do this?
My command in Win 10 is "adb ls /path-to/Camera", which produces a list with some numbers preceding the filenames, e.g.
000081f9 005145e2 607f4c6e 20210420_144934.jpg
000081f9 004430cb 607f4c7c 20210420_144949.jpg
000081f9 0031701e 6080d67e 20210421_185054.jpg
000081f9 003847b0 6080e058 20210421_193256.jpg

If I add 'shell' to that ("adb shell ls /path-to/Camera") I just get the filenames, though they're in 3 columns:
20201121_144842_HDR.jpg 20210311_155639.jpg     20210421_185054.jpg
20201121_144902.jpg     20210312_225720.jpg     20210421_193256.jpg
20201121_144911.jpg     20210312_230021.jpg     20210422_065438.jpg

Can I save the list to an array or hash with timestamps? Or figure a way to determine the most recent files?
Thanks, Scott

Have you tried adb shell ls -l /path-to/Camera? -l means "long", ie. with details. Which parameters ls supports depends on how your device's busybox/toybox binary was compiled; full parameters for your use case would be -latr (Long, All files, sorted by Time Reverse (i.e. newest one first)).

The easiest way I know is to use find command. Search for how to find recently created files using find command. Use that with adb. If for some reason your Android's find binary doesn't support some arguments, use busybox's find or better, termux.

source: Stack Exchange

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

sort: votes


text:
Deleted all SMS! - unrooted Android 8.0.0 - Recovery Options?
I was deleting 2 SMS messages, I did long press on the 1st until the blue tick appeared then selected the 2nd SMS. I then quickly went to the top 3 dots to select 'Delete' and the next thing I saw is blue ticks by every SMS and 'Deleting' message on the screen.
The screen refreshed and it was blank - all SMS messages deleted :-(
What are my options to recover them?
I have looked at apps like Fonedog & Dr Fone but after they connect they state root is required.
My phone details;
Model: Mi 5
Android version: 8.0.0 OPR1.170623.032
Android Security patch level: 2018-10-01
MIUI version: MIUI Global 10.2 Stable 10.2.2.0(0AAMIXM)
In Developer options:
OEM unlocking is greyed out but it says "Bootloader is already unlocked" underneath (see screenshot below)
Mi Unlock status says "Unlocked"

Phone has been left turned off.
If the bootloader is already unlocked - could I try to root the device (with low risk of data loss) then try Fonedog & Dr Fone recovery again?
When I first got the phone I tried Kingo-root and similar apps but they failed to root the device. I didn't take it any further at the time.
OR is there a way I can dump the internal memory flash (NAND?) to pc and use data recovery to find & restore my SMS?
Your help and suggestions greatly appreciated - I had some sentimental messages I would definitely like to recover. I have removed the SIM, turned off Wifi, turned on aircraft mode and phone is turned off unused.
Thank You.
Mark

fastboot boot twrp.img, get sql database, examine with hex editor. if messages still there change deleted-flag with some forensic tool

Thank you for your reply.
I am following the guide but am stuck at 'fastboot flash recovery twrp.img' - all I get is < waiting for device >. The phone is connected and rebooted into FASTBOOT with the bunny on the screen - but after 1-2 minutes it just restarts.
Before I tried the "adb devices" command and it lists 1 connected device.
What am I doing wrong?

UPDATE: Looks like I got the latest twrp working. I'm viewing the internal storage in file explorer but there is no /data/user_de/0/com.android.providers.telephony/databases/mmssms.db showing. What am I doing wrong now? Do I need to allow modifications at the first prompt?

Sorry I worked it out now. I've found the file - do I copy it off the phone to pc or is there something else I should be doing?  I did search for a twrp users guide but haven't yet found a detailled English one.- if you know of one a link would be great :-)

db has over 1400 id's & 600 threads (so looks good) all '1' in deleted column! I guess the next step is to get the deleted column changed back to 1 and copy the amended db back to the phone?

ok. I ran your metadata command and it returned: -rw-rw----    1    671744 Apr 23 14:48 u:object_r:radio_data_file:s0 - I have taken backups and renamed the original db/journal on the phone (so not visible to sys). I have copied the amended db to the phone.

How do I update the owner/permissions/secontext on new db file? In twrp file manager there is 'chmod 755' & 'chmod' button

'chown 1001.1001 mmssms.db; chmod 0660 mmssms.db; chcon u:object_r:radio_data_file:s0 mmssms.db;'

ok. Rebooted and the SMS screen is blank but in the search bar in grey it says '1054 messages' which is the number of rows in mmssms.db - if I search contact names & phrases it returns results! But selecting one just opens the new sms window with  at the top. I checked the folder and a journal file has been created.

try to connect with MyPhoneExplorer maybe it will read the modified database. or try another app like Textra. or maybe there are more flags in other tables

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


text:
Is there a way to make a short cut icon that executes a sh file in android?
I made a sh file for being executed in termux, i want to make an icon that opens termux and execute that sh file. Kind an apk icon, that when you mash it executes the program

See this discussion for possible ways: https://github.com/termux/termux-app/issues/1730

Termux Widget

Use the termux widget add-on is not viable, because my program is interactive.

Using Termux Widget you can create an icon in home/launcher app. Tapping that would execute the command you specified while creating the widget icon. What else are you asking for?

Use the termux::tasker plugin in tasker or use the native termux task from the tasker function.

Thanks for sharing the idea. Would you mind to add details for those not familiar with the two mentioned options? What would one need to do to achieve the goal with them?


text:
Install linphone on kyocera e4610
Is there a way to install LinPhone on this android based flip? The other option would be "signal" as an alternative voip idea...
Let me know, David

Yes it's possible just sign thought app with a test signature int should install via adb.
Is thought still having issues just rename the package to com.android.cts.linphone and thou should be fine.


text:
AOSP Android 11 Kernel build for Pixel3a/Sargo Touchscreen not working
Intro: I had an issue getting the build to compile, but finally got it to successfully build/compile, & installed on my phone, as covered here: mkbootfs command not found while trying to build aosp kernel I followed the guide here: https://source.android.com/setup/build/building-kernels
BUT... I made NO CHANGES to the kernel as I want it to work first.  My phone boots fine, but the touchscreen doesnt work!  Am I missing something?
To say it again if I wasn't clear, I have vanilla AOSP Android 11, made no changes, compiled the kernel, flashed it to my phone, and the touchscreen doesnt work.
If I can't figure this out, at least I'm sharing a complete guide on how to build this...without a functional touch screen!
Here's exactly what I did:
PREREQS:
Unlock bootloader (not covered here)

Install kernel-build-tools (not included in repo for some reason):
cd ~/
mkdir kernel-build-tools
git clone https://android.googlesource.com/kernel/prebuilts/build-tools
ls -l kernel-build-tools
nano ~/.profile
Add lines to path: (this will work as current user NOT SUDO!!)
# add Kernel tools to path
if [ -d "$HOME/kernel-build-tools/build-tools/linux-x86/bin" ] ; then
    PATH="$HOME/kernel-build-tools/build-tools/linux-x86/bin:$PATH"
fi
Refresh environment: source ~/.profile

Install/Setup adb & fastboot
Download adb & fastboot & unzip:
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
sudo apt-get install unzip
unzip platform-tools-latest-linux.zip -d ~
nano ~/.profile
Add lines:
# add Android SDK platform tools to path
if [ -d "$HOME/platform-tools" ] ; then
    PATH="$HOME/platform-tools:$PATH"
fi
Update environment: source ~/.profile

Install build tools:
sudo apt-get update
sudo apt-get install -y bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev

Create build directories:
mkdir -p ~/bin
mkdir -p ~/android/lineage

Install Repo cmd:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Fix Python:
sudo ln -s /usr/bin/python3 /usr/bin/python

Configure Git:
git config --global user.email "[email]"
git config --global user.name "[user]"

Turn on Caching to speed up build:
export USE_CCACHE=1
export CCACHE_EXEC=/usr/bin/ccache
ccache -M 25G

STEPS:
AOSP REPO:
cd ~/
mkdir aosp && cd aosp
repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r38 --depth=1
repo sync

AOSP KERNEL REPO:
cd ~/
mkdir aosp-kernel && cd aosp-kernel
repo init -u https://android.googlesource.com/kernel/manifest -b android-msm-bonito-4.9-android11-qpr2
repo sync

KERNEL CONFIGS: (I did NOT do this; left here for reference for others)
ls -l ~/android/aosp-kernel/build.config -> [symbolic path to actual file]
->~/android/aosp-kernel/private/msm-google/build.config.bonito_no-cfi
Edit this file:
(orig) POST_DEFCONFIG_CMDS="check_defconfig && update_nocfi_config" ->
POST_DEFCONFIG_CMDS="update_nocfi_config"
*Note: This file indicates the kernel config file: bonito_defconfig
Edit & add to: ~/android/aosp-kernel/private/msm-google/arch/arm64/configs/bonito_defconfig
# Kevin added - IPTables TTL support
CONFIG_NETFILTER_XT_TARGET_HL=y
CONFIG_NETFILTER_XT_TARGET_HMARK=y
[Need a blank carriage return at bottom!]

BUILD Image.lz4 via AOSP Kernel repo: (I tried both)
build/build.sh
-OR: BUILD_CONFIG=./private/msm-google/build.config.bonito_no-cfi build/build.sh (if you want to specify a different build that the default)

CONVERT Image.lz4->boot.img via AOSP repo:
Copy newly created \aosp-kernel\out\android-msm-pixel-4.9\dist\Image.lz4
-> \aosp\device\google\bonito-kernel\
cd ~/android/aosp
source build/envsetup.sh
Setup device:
lunch aosp_sargo (Just lunch to get device list)
Make only boot image:
m bootimage

FLASH TO PHONE:
adb reboot bootloader
fastboot flash boot boot.img
fastboot reboot

Uh android-msm-bonito-4.9-android11-qpr2 Why are you using a older (beta?) kernel tag? https://groups.google.com/g/android-building/c/aOj7GU1X3JI/m/cArgPnadAwAJ?pli=1

LOL sounds like youre on to something...I used that because Im new to this :)  I followed the Google guide https://source.android.com/setup/build/building-kernels & they say there to use android-msm-bonito-4.9-android11-qpr2 for Pixel 3a.  Did I read that wrong? Is there a better way to find out this info? Where? Thanks so far!!

Ah website not updated. Don't know if that is your problem or not. Anyway the Google group in the link of my prior comment is probably the best source (for Nexus/Pixel/AOSP building - anything else is off-topic there).

BTW how do "I" tell that this is an older beta tag?  I'm not sure what I'm looking at in that link.  Do you happen to know what "branch" I should be using, android-msm-bonito-4.9-android11-qpr3?  And is that the correct repo URL, "repo init -u https://android.googlesource.com/kernel/manifest -b BRANCH"? Thanks!

And looks like I dont have permission to post on there :(

That thread is the announcement thread from Googlers. Typically releases have no suffix or 'rX' where X is a number. 'qpr3' seems like a beta release. I would also check when the tag was created but that also assumes you are familiar with Android release schedule. You'll need to sign in with a GMail account (and may need approval from admin).

In https://android.googlesource.com/kernel/manifest/+refs the branch I used appears to be the latest Android11 for bonito (which sargo uses). Again, I'm not sure where else to look, or what I should be using, if I'm using the wrong one...

Assuming you found this similar but different device notes about touchscreen driver: https://groups.google.com/g/android-building/c/aOj7GU1X3JI/m/MvkGdhlrAwAJ and https://groups.google.com/g/android-building/c/ou630PviyDc

I didn't see that - WOW, so Google, for their own devices, has a guide how to build a kernel that is incorrect, and known missing/incorrect drivers, for quite some time?! Astonishing. BUT they compile this code & sell these devices, so are they not sharing correctly? I mean why must we download their repo, then make changes just so it works? I'd totally understand if it was a third party device but it's not. Bizaar.

& I noticed this bad driver on first boot, couldn't go any further...who knows how many other issues there are...is there a place u can download a working recent aosp kernel source for Google devices?!?

I spent a lot of time on the "solutions" on those links - with a production build its impossible to mount /system as RW so that appears to be a deadend. I also had to first get Magisk/root installed, and navigate the screen with ADB to allow su access from adb shell su...what a waste of time!!

Just came across this, might be the fix: https://github.com/facebookexperimental/ExtendedAndroidTools/issues/3 in: aosp-kernel\private\msm-google\arch\arm64\configs\bonito_defconfig WHY the heck would Google do that?!? (& how did THEY get it to work on phones on the store shelf?!)

I'd to know how an issue like this still exists, but here's the fix:
File: aosp-kernel\private\msm-google\arch\arm64\configs\bonito_defconfig
Change these to "y" & rebuild:
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v27=m CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_RMI_DEV_v27=m CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v27=m CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_TEST_REPORTING_v27=m
Also found here: https://github.com/facebookexperimental/ExtendedAndroidTools/issues/3

I'm pretty sure this means they were being loaded as separate modules so they could be updated or something. I know this is old, but do you still have the phone around to run lsmod on? On a stock build of AOSP, these four modules are listed.


text:
Can a WiFi modem be directly connected to an android and use the android phone's usb tethering (via an adapter)?
I have an old wifi modem which lacks usb port. I was wondering if we could an rj45 to usb adaptor to use the internet connection from the android device via usb tethering?
Or if there is any other way to achieve the said task, I'd be more than happy to know that.

I am sorry but what is a "wifi modem"? I know DSL or cable or glass-wire modem and I know Wifi router but I never heard of a "wifi modem".

@Robert we call all these terminal devices wifi modem (technically incorrect, i know). I am sorry, i should've specified that. And my question is regarding any device such with rj45 jack. I wanna know if i can use android phone's usb tethering feature with an rj45–usb convertor.

Any device will not work, at least the kernel needs to support it. And by the way the picture you have added seems to be an USB cable extender so effectively it is once connected a very long USB cable. Therefore it does not seem to be something you could use with this "wifi modem" ( whatever it is).

@Robert Sometimes people call modems that also double as WiFi access points "WiFi modems".

@Robert it's not a simple male to female usb; if you look closely, it is a female rj45 to male usb convertor.

@robert anyway, that means it's not possible!  :(. I hope someone knowledgeable enough writes such kernels some day.

@RockPaperLz I know, right. We all grow up calling a lot of stuff wrong or at least partially incorrect names.


text:
How to fix duplicated/echoed missed-call notifications?
TL/DR: How can I prevent missed call notifications from being duplicated when I dismiss them?
Background:
I get several phone calls per day from numbers I don't recognize.  My phone (Google Pixel XL) usually labels them as suspected spam and I press the volume button to stop the ring tone but I don't reject or answer the calls.
Shortly after the incoming call ends, I get a notification of a missed call.  When I swipe the notification to the right to dismiss it, the notification pops back up as if it was a new notification, complete with the notification sound.  As far as I can tell, this duplicate or echo of the notification is identical to the original with one exception: when I dismiss it, it does not echo or duplicate again.
Almost all missed call notifications echo like this but I have been unable to figure out why nor have I noticed any clear difference between the majority of notifications that get duplicated and the few that do not.
Question:
How can I prevent these missed call notifications from being duplicated?
Details:
Phone is the original Google Pixel XL running Android version 10 (Kernel version 3.18.137, Build number QP1A.191005.007.A3) on the Google Fi service.

Are you sure the second notification comes from your device and is identical to the first? Some mobile network provider send SMS for every missed call.

@Robert Neither notification (original or copy) is a standard SMS; they don't show up in text messages.  Also, it makes no sense to me that an SMS notification would appear only after the original is dismissed.


text:
How to mount image file without root?
In rooted android phone, ext4 image file is mounted using these commands in android terminal :
  #  mknod    /dev/block/loop52  b 7 0
  #  losetup  /dev/block/loop52  /sdcard/ext1.img
  #  mkdir /mnt/ext
  #  mount -t ext4 -o rw,noatime  /dev/block/loop52  /mnt/ext

I have an ext4 image file stored in sdcard.
How can I mount the ext4 image file in my non rooted android phone or Is there any other way to access it ?

You cannot access block devices without root access. Some explanation here: https://android.stackexchange.com/a/220020/218526


text:
How to "adb push" files from linux to android without the non-permissive symlinks
I want to push over 120K small files including symlinks using "adb" but without those links if they fail in "remote symlink failed: Permission denied" to Android device.

Copying a large number of files from/to the device you better tar the files and extract them after transferring them. Using adb exec-in you can pipe the tar file to the device and directly extract them without ever saving the tar file.

that will defeat the purpose of fast copying, packaging and extracting is not the right approach to this problem.

Irrespective of what method you use to transfer files, symlinks aren't supported in Android's shared storage: https://android.stackexchange.com/a/218944/218526

thats why i need to skip those :)

You want to skip symlinks? I couldn't get that point from your question. adb push provides no filtering options based on file type. You need to use some other method, possibly combined with adb push e.g. find -type. But pushing individual files would largely reduce the transfer rate. Better use some other file transfer method.


text:
How do I get rid of broken, invisible files that take up lots of space?
I tried downloading a pretty big mp4 file, but that failed because i didn't have enough space.
However, it filled up all my leftover storage. I tried getting rid of it but it doesn't show up in the file explorer. I checked hidden files.
Checking device care -> storage, it seems like it's in the "other" category.
I'm kinda desperate because i need the storage space to work. How do i clear it up?
Samsung galaxy Tab S4, Amdroid 10

You can copy all the necessary files from your internal storage to somewhere else and do a factory reset. Then copy the files back. Should work.

In my opinion this is not a good idea as it will delete all app data stored in the app-private section. Therefore performing a factory reset should be the very last option.

I agree with robert, it's not a good idea if avoidable. However, i'm glad to have the option if i genuinely can't fix the problem in any other way


text:
How to delete recovery mode
Which files I need to delete from the system of a rooted device to delete completely the recovery mode, and in which folder I can find them?
Ty

block odin download mode
https://ge0n0sis.github.io/posts/2016/05/how-to-lock-the-samsung-download-mode-using-an-undocumented-feature-of-aboot happy bricking
https://forum.xda-developers.com/showthread.php?t=3775903


text:
How to access Night Light settings on Samsung
I just upgraded my Pixel 2 to a Samsung Fold 2. My Pixel was using Night Light and it was set to go on at 8pm and off at 6am. The Samsung Smart Switch app helpfully copied these settings over; however, Samsung doesn't use Night Light. Samsung has their own software called "Eye Comfort Shield" (disabled). So, now at 8pm, my phone simply goes dark. Completely black and unusable until 6am.
I can probably factory reset the Samsung and recopy from the old phone, but that seems excessive. Is there a way to add Night Light or just wipe those Night Light settings?

May be possible via adb shell settings put secure ... see this question for more details: https://stackoverflow.com/a/50144828/150978

@Robert That's a great idea. If those settings are all .xml I could probably have grep'ed for the start and stop times. Sadly, I went ahead and wiped the phone and cloned the stuff I care about with android-studio instead of the Samsung app.


text:
Facebook app missing 3D photo button on LG Velvet 5G
I bought the LG Velvet 5G because it has a 5MP depth camera, whuch sounds good for taking 3D photos. All the guides I can find suggest that the 3D photo option should appear in the menu below. But I have looked carefully and I cannot find it.

Use the camera app that comes with the device. Does it provide the 3D option? From within Facebook I would use the "Photo/Video" option, as a 3D image is just a regular image (e.g. JPEG) with additional depth information.

Yes, but as with other phones the camera calls the 3D option "Portrait". Sharing as just "photo" results in a 2D photo.

Could you go through Facebook's help center about 3D photos for troubleshooting first, clarifying if it's the same as the guide you're reading?

Different Guide. With that guide I get to step 3, and there is a Next button (not Done). I press Next since that is the only thing I can do. At Step 4 there is no "Make 3D" button.

BTW, the built in Gallery app can convert to 3D (but sharing the image to Facebook still results in 2D).

Hmm, I think this is going to be more technical on how the Facebook app decides which photo can be converted to 3D or not, possibly the "Don't edit your photo" part...

Well I didn't edit the photo. Has anyone successfully uploaded a 3D photo on an LG Velvet 5G? I have heard people have done it with the LG V60.


text:
Bluestacks can emulate Android and play Angry Bird but not Pokemon Go?
It is a bit strange Bluestacks (4.270) can run on the Mac, and run Angry Birds, Cut the Rope, but when Pokemon Go is run, the spinner just spins and cannot log in.  Is there anything special about this app and is there a way to make it work?

Possibly because Pokemon Go prevents itself to run on Android emulators (similar to rooted devices) to prevent cheating.

so emulators cannot make itself just look like an Android phone (that we buy for US$99)?

@StefanieGauss They could but it is a lot work and if you do so and publish it everybody who don't want to let an app run on an emulator can get the emulator and find how which property you forgot of in which other way this emulator can be identified. I would assume that there are a lot of emulator that can't be detected but they are kept private (e.g. anti virus companies most likely have such an emulator).


text:
Bootloader won't load any commands
My Bootloader won't do anything, when I type fastboot getvar all it stops giving the strings half way, or when typing any other command it will only give ... and nothing more. Bootloader log only shows: cmd: oem-info and nothing more

check cable+jack (loose or broken)

I already tried different ports and pcs. Cable is fine too. It is detected in computer in both fastboot and adb state. Is there any way to check for bootloader logs in a more advanced way?( Too see if it shows any errors) The default only shows me my commands

must be the cable or port related. maybe COM transfer rate (SuperSpeed) is too high. Do you use latest version? https://www.xda-developers.com/google-releases-separate-adb-and-fastboot-binary-downloads

Yes I do use latest version, thanks. Idk what this COM transfer rate is...

connect intermediate usb 2.0 hub to eliminate speed problems

Hi, looks like you've found the solution with the help of someone, which is great! Instead of posting an answer that looks like a comment (it's technically "not an answer" and will get deleted), consider writing a proper answer since self-answering is not only allowed, but even encouraged! Otherwise, you might want to ask them to post a proper answer for you instead. Thanks!


text:
Samsung A21S support USB-C to HDMI?
I buyed a USB-C to HDMI device and it didnt work, so i thought the problem is the device and tryed to get a refund.
I have no other device capable of testing it and i searched in the entire Internet about it but found nothing.
I found something about HML and my device does not support it, but some people said that the HDMI works even without the device supporting HML.

Samsung flagship devices support it - not all. Check the lists at mhltech.org and everybodywiki.com. I cannot find the A21s or its model alias SM-A217F there.


text:
Removed battery while phone plugged in
I accidentally removed the battery from LG G3 while plugged in and charging, does this damage the battery or the phone?

When you removed the battery did the phone stay on or did it instantly went off? As long as device did not went off but stayed on I don't see a problem.

It turned off and show a battery with exclamation mark inside

Removing power from a running phone may damage a lot especially if there were write operations active on flash memory at that moment.

that won't damage anything because it's not unusual for smartphones that battery runs out of power. journaling file system can handle such emmc writing failures very well. powering smartphone without battery is a different story. most ac chargers won't deliver stable dc current that's why power is only used for charging, while phone is powered by battery only. therefore it should make no difference if charger was connected at the time of battery removal or not


text:
How do I turn off screen turnoff during call?
Even though thr light sensor still works as Ive checked, it turns of screen automatically no matter how lighted the area is and i can only reuse the screen once the call is over. I've followed other directions to check call settings, but i couldn’t find any settings to modify that there. Is there any other ways to disable this?
To reiterate, I'm running Android 10 on Realme 7i.

If you speak about "light sensor" do you mean the proximity sensor or the brightness sensor? The latter just measures the environment light, the first emits a short light signal and checks if it is reflected by something next to the screen/sensor.

The screen off feature in phone apps use the proximity sensor rather than the luminosity sensor. I am saying this because my device doesn't have a luminosity sensor, but the screen turns off as soon as I bring it near my face during a call.
To answer your question: There is no Android system setting for this as far as I know. It is completely up to the phone app whether it will turn off the screen. If the caller app that you are using does not give you an option to keep the screen on, your only option is to try other apps that have this feature.

What's the difference between "light sensor" and "luminosity sensor"?

@pmor Same afaik.


text:
Firefox Android with password storage
Can you suggest a good solution how I can store my passwords secure with Firefox for Android? Firefox sync has no "cloud storage" which means I have no cloud backup. Keepass2Android with Autofill has a bad user experience. The Autofill pop always needs a long press, password storage unlock (as my device permanently kills the app) and needs to much clicks in general. Sometimes the popup is not even opening on my device. Any good alternatives?

What do you mean by Firefox sync has no "cloud storage"? Firefox sync can use a private Firefox Sync server but you don't have to. You can just use the one provided by Mozilla.

Mozilla itself warns form using Firefox sync as a backup or storage solution. Google on the other hand advertises its cloud services a reliable storage.

This is just about reliability if you only use Firefox sync. For backup simply sync the data to a PC and then backup the Firefox user data to different backup types. If something goes wrong you can go offline, restore the backup and reestablish Firefox sync.


text:
Use USB OTG mic audio device for audio input ONLY (use mic with headphones)
I want to record some audio using a USB mic and my OTG-supporting Android phone. The problem is, because the phone recognizes the mic as an audio input/output device even though the mic has no physical way to make sound, I can’t use the headphone jack while the mic is plugged in. Is there an app or a setting I can use to only use the input portion of the USB audio device, and instead use the 3.5mm headphone jack for output?

Can you please exactly name the USB microphone you use? May be the mic uses an audio chip that supports input and output (but does no make use of the output) which is then detected by Android.

It’s a Fifine K669.


text:
Lineage boot on power script
I've installed Lineage on a Samsung tab s2 which I use in the car. I've added the following to get it to auto start when it goes on charge
# /system/etc/init/off_mode_charge.rc
on charger
    setprop sys.powerctl reboot,leaving-off-mode-charging

But does anyone know a way to add a script to the startup routine so if the battery is below say 10% it won't continue starting? I use tasker to power off the tablet when the usb power drops but there have been a couple of times for some reason it doesn't, meaning the battery can drop to 0% and then it goes into a restart loop as the low power supply in the car isn't enough during startup. I can read the power using the capacity file in /sys/class/power_supply/battery/ just not sure how, or if, I can add a script to the startup sequence to use this.
Thanks

Does this answer your question? How to run an executable on boot and keep it running?

Do not call setprop sys.powerctl ... directly from .rc file. Instead use exec or exec_background to run a shell script which first checks battery level or any other conditions. Already mentioned in the last point of my answer from where you copied the off_mode_charge.rc file: https://android.stackexchange.com/a/221384/218526


text:
Alternatives to App blockers?
There are work arounds to using the app blockers from the play store.
For example: If I am quick enough I can access the play store and download apps.
I can also restart my phone and quickly access a blocked app. I can also use split screen mode to access an app as well.
Are there any alternatives instead of using apps that block other apps? Most of these apps require a purchase of a feature, so a free alternative would be appreciated.
Just to clarify I am not looking for app blockers from the play store, I am looking for other ways to block apps.
Thanks in advance.

You should mention what devices/OS versions you are trying to control. As you tagged your question parental-control do check out Google Family Link and see if it fits your needs.


text:
Moto G5 will not boot, what are my options to recover user data?
I have a Moto G5 (XT1676), which is stuck in a boot loop. It will ask for my pattern to unlock the partition, and then the motorola / lenovo logo spins forever and the phone will not boot.
What are my options to recover the user data ?
I am able to access the recovery, and I have tried already tried to clear the cache partition, with no luck. There is no option to backup the user partition in the stock recovery.
I could flash TWRP recovery and backup the phone from here, but my booloader is OEM locked, and unlocking it requires wiping the phone.
Is there a way to unlock the bootloader without wiping the phone ?
Or is there a way to backup the user partition from the stock recovery ?

Moto G4 is listed as exploitable, maybe works similar https://blog.elcomsoft.com/2018/05/demystifying-android-physical-acquisition

read/flash partitions without losing data may possible, only encryption is showstopper usually (but your pattern still works?) maybe you can enable adb or root by slightly modifying boot.img (on locked bootloader) depends on AVB version https://android.stackexchange.com/q/227110

romprovider.com, firmware27.com, leakite.com, github.com, tuserhp.com, firmwarego.com

I was able to make my phone boot again by flashing a stock (official) firmware, without erasing the userdata partition. As it uses an official firmware, this approach does not require unlocking the bootloader. Here is a summary of the steps I followed.
Install fastboot
Fastboot is an utility that is used to upload and flash ROMs on Android Smartphones.
On Linux, fastboot can be downloaded as follows:
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip platform-tools_r31.0.0-linux.zip
# Using fastboot requires root permissions, so from now on
# we execute commands as root
sudo -s
export $PATH=$PATH:/path/to/platfrom-tools

For other OSes, you may find installation instructions here:

Using ADB and fastboot - LineageOS Wiki
Minimal ADB and fastboot - XDA Developers

Start the Moto G5 bootloader
To do so, shutdown you phone. Then press Volume down and Power
Plug the USB cable in, your phone should now appear when you type:
 # fastboot devices
 ZY3222HM8L Motorola Fastboot Interface

Find an official ROM for your phone
This is definitely the most risky and tricky part, as there is no foolproof way to determine which is the good ROM for your phone.
The least risky way is to use the Lenovo Rescue and Smart Assistant (LMSA) to download the ROM for your phone. However, DO NOT USE LMSA TO FLASH YOUR PHONE, IT WILL ERASE YOUR DATA.
Use LMSA to download the ROM, locate the zip archive it downloaded, and close it. LMSA requires Microsoft Windows, so this is not a viable solution for Linux users or MacOS users.
The other solution is to guess which ROM is appropriate for your phone, and download it from a public mirror. I used: https://mirrors.lolinet.com/firmware/moto/cedric/official/. Identify your model variant by looking at the information displayed by the bootloader. The important line is:
 Product/Variant: cedric XT1676 16GB P5

Try to explore the "RETAIL", "RETEU" (Retail EU), "RETUS" (Retail US) etc. depending on your country and try to find a an archive that matches your phone variant. Mine was in RETEU:
 XT1676_CEDRIC_RETEU_DS_8.1.0_OPP28.85-19-4-2_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip

Make sure you download the last version for your phone (look at the dates, and version number 19-4-2) because the bootloader will not allow you to downgrade your OS.
Flash the ROM on your phone
Unzip the archive you just downloaded, then locate the flashfile.xml file. Open it with a text editor, and locate the <steps> block
<step operation="oem" var="fb_mode_set"/>
<step MD5="9f3a13b8222b08e2171d2519e5276c31" filename="gpt.bin" operation="flash" partition="partition"/>
<step MD5="9ea732d853c838d9ed8486ca6df10321" filename="bootloader.img" operation="flash" partition="bootloader"/>
<step MD5="3605a87a6e4ba36c2f995204a7ec2aa6" filename="NON-HLOS.bin" operation="flash" partition="modem"/>
<step MD5="77aec885e43c1441ae775a36add08125" filename="fsg.mbn" operation="flash" partition="fsg"/>
<step operation="erase" partition="modemst1"/>
<step operation="erase" partition="modemst2"/>
<step MD5="bded198b6f1d31e9ce664376503b223b" filename="adspso.bin" operation="flash" partition="dsp"/>
<step MD5="0f114b5a2ab83e18444fa0d8e79a8e0e" filename="logo.bin" operation="flash" partition="logo"/>
<step MD5="4559fd8bad5404d1ec16a98614b3765a" filename="boot.img" operation="flash" partition="boot"/>
<step MD5="864a8060abe29e56fe2e8e93cac2c4a3" filename="recovery.img" operation="flash" partition="recovery"/>
<step MD5="39b15d4e645ba9576e819edfaf5b668e" filename="system.img_sparsechunk.0" operation="flash" partition="system"/>
<step MD5="ed64b41d92f7cf5f4079442fc446e0af" filename="system.img_sparsechunk.1" operation="flash" partition="system"/>
<step MD5="aef832b70ded5b7b5788bf87b61a8ad6" filename="system.img_sparsechunk.2" operation="flash" partition="system"/>
<step MD5="31c52fe5f412ac621e325f879a08e6e8" filename="system.img_sparsechunk.3" operation="flash" partition="system"/>
<step MD5="982e8d23a01a1017c72c23c56aed3ca2" filename="system.img_sparsechunk.4" operation="flash" partition="system"/>
<step MD5="1ef6cd540e95e3fe2c80d934376b6f3a" filename="system.img_sparsechunk.5" operation="flash" partition="system"/>
<step MD5="66a2a34e2bacd1ab0f5065524e2ce141" filename="system.img_sparsechunk.6" operation="flash" partition="system"/>
<step MD5="052ca5a46c322450dacad5678c31ac0e" filename="system.img_sparsechunk.7" operation="flash" partition="system"/>
<step MD5="0a20486510c1c5f45d1d8dbfcf0b9975" filename="system.img_sparsechunk.8" operation="flash" partition="system"/>
<step MD5="1e60bbc27184845acdc99d789f503c0c" filename="oem.img" operation="flash" partition="oem"/>
<step operation="erase" partition="cache"/>
<step operation="erase" partition="userdata"/>
<step operation="erase" partition="DDR"/>
<step operation="oem" var="fb_mode_clear"/>

Then translate each step into a flashboot command, and write a script. However DO NOT TRANSLATE THE ERASE USERDATA AND ERASE DDR commands. In my case the script I wrote was as follows:
cat fastboot.sh
set -x
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase clogo

Again, make sure THERE IS NO erase userdata line.
Make sure your phone is plugged securely, then you may then execute this script as root. It will flash your phone with the official ROM.
Once this is done, use the volume up and down keys on your phone to navigate to the "Start" entry and press power. Your phone should reboot, and hopefully your userdata partition will still be there.


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

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

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

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

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

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


text:
Why do my recent sms show elapsed time instead of time sent or received? Pixel 3 android 11
Why do my recent sms show elapsed time instead of time sent or received? ie:"10 min ago" instead of 10:27pm.
Pixel 3 android 11

This depends on the Messaging app you're using. Since this is Pixel 3, is this the default Google Messages app?

Yes, default app 'messages'


text:
Installing SuperSU with Twrp to root android
I am having trouble installing SuperSU from Twrp Recovery. The steps I used are as follows:

Boot into bootloader: adb reboot bootloader
Flash recovery to twrp image file: fastboot flash recovery twrp-3.5.2_9-0-ali.img
Open recovery mode, opens twrp
Twrp asks for decryption password, I don't know what to do so I
press cancel
Twrp asks if I want to keep system read only
I swipe to allow modifications
I click install
I find /external_sd
I click UPDATE-SuperSU-v1.80.zip
I swipe to confirm flash
It says successful, but also says unable to mount storage unable to mount /data/media/TWRP/.twrps
I click wipe cache/dalvik
I swipe to wipe
I click reboot system
I input my password to start device
I look for the SuperSU app, I don't find it.

So something messed up and SuperSU didn't install. Any ideas?

How old is the device (which is it and what Android version runs on it)? Nowadays nobody installs SuperSU, everybody uses Magisk instead.

Its a Motorola G6, I can try Magisk later, but I think its a file access error.

11 failed because you didn't pass 15 into 4


text:
WhatsApp backup to Google Drive
I am planning to switch to a new phone. so on the old phone, I start WhatsApp backup to Google drive and I waited until it was completed. then I wanted to make sure that it is completed so I started the backup again and it showed me that it has some data and started uploading again.
I am now confused. are my chats backed up or not?

Every time you do a new backup, it will be uploaded to the Google Drive cloud. So, that's a cycle you'll forever keep on seeing. If one backup is complete, then you can switch to your new device.
Just in case something goes wrong, the data will remain on your old device and you can re-login there using the SMS OTP. Once you're satisfied that all data is restored on the new device, you can wipe your old device.

Well, even I have encountered such a weird problem. But no worries, your chats are already backed up. For further confirmation, visit your Google Drive account and go to the Backups section. You should see a backup listed, namely, WhatsApp Backup , along with the time when the backup was completed. Each time you do a new backup, the time gets renewed.
If such a backup isn't listed, then perform the backup again. If it is, you can conveniently proceed.


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

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

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


text:
How to root Redmi 9C (Redmi 9 India)?
As I understand I can get root access without installing a custom recovery with fastboot commands as described in the Magisk Installation Instructions.
I have downloaded the Magisk app and under Ramdisk I do get a yes.

The name of the device is indeed cattail which I have confirmed by running

adb shell

in my terminal, screenshot posted:

However I came across this XDA forum post where it wasn't possible to get root access with Magisk and fastboot.
This post appears to offer a solution but upon a little digging it seems that the instruction provided here cater to the device "angelica" but not cattail.
Here is how I found out it was angelica: In the screenshot provided in the forum, you can see model name of the device is:

M2006C3MG

while the model name of my phone is:

M2006C3MII

Upon searching the different model names on the internet, it is quite obvious that device is different from mine.
So here are my questions:
1. Where should I download the firmware from to extract the relevant boot.img file?
1. This link or 2. This one. I am confused because I had bought the Redmi 9 India (from Amazon) but apparently cattail is Redmi 9C. The first link(for Redmi 9) has an option having India while the second one(for Redmi 9C) doesn't.
2. How do I even root this device?
I'm unable to properly piece together all the info online and would greatly appreciate any pointers or guides. Searching for "how to root redmi 9 india" gives weird results asking to use Kingo Root and the like.

https://xiaomifirmwareupdater.com/archive/miui/cattail

This may help with more details re :second part of your question https://android.stackexchange.com/questions/232257/how-do-you-root-a-device-with-magisk-when-it-doesnt-have-a-custom-recovery

OK @alecxs. Should I flash the vbmeta then? Is my device not different from the one mentioned in the XDA thread? Or are the model numbers unique for every phone and they are indeed referring to cattail?

@beeshyams I already know how to root supported devices with fastboot. I've done it successfully in another phone I have which is the Lenovo Vibe K5 Plus (a6020a46) which is 6 years old at this point. I would have gone ahead and done the same on this device had I not had a confusion regarding relevant boot.img file as well as the link I found on XDA.

rooting steps are identical, devices are not. Do not flash foreign boot.img. vbmeta provided on xda is just empty file and therefore universal

Hey @alecxs should I download the recovery option's img file or the fastboot option's ? I'm runnign 12.0.10.x .This probably is a dumb question, sorry.

fastboot download contains all partition images. recovery download should contain desired boot image too. in your case it probably doesn't matter

okay @alecxs thanks


text:
How to flash Huawei P30 firmware via PC?
I need info on how to flash Huawei P30 rom without sd card via PC.
Please help.

What have you tried?

I've tried to use dload method but this phone doesn't take an sd card
I've tried using SigmaKey but that fails on my PC
I've tried fastboot but the images on the unpacked firmware are not the same as on the tutorials I even tried to download a different version but still the images  (boot.img, recovery.img etc ) are missing
I've tried a lot I even posted about it in a different question but got no response


text:
Android 10 system taking up too much hard drive space
I have a Nokia 5.3 running Android 10. Of the 64GB hard drive space, the system file is currently taking up 52GB.
Couple of days back, it was taking up 48GB and my phone was complaining of running out of hard drive space, so I removed some old apps and files to free up some room, and now it looks like the system file has just expanded to take up the available free space, and again it's complaining about running out of hard drive space.
How do I go about reclaiming some of the space taken by the system folder(s), as I can't believe that it's needed to write 4GB worth of data in a few days, nor that the OS really needs 52GB of hard drive space, when my old phone only had a 32GB hard drive for the same OS.
(apologies, I'm not entirely sure what tags to use for this)

There is no "system file" on Android. Android has a system partition which is of fixed size unless you completely repartition your device (and erase all user data). If you have a large file on your device you should use a file explorer to look at it and note the full path. Then edit your question and add this path.

Following Robert's comment, you can try DiskUsage to list all big files on the storage (disclaimer: not affiliated, just a long-time user). However, you need root access to also list the internal storage.


text:
How do I block the Tethering and Hotspot Active notification from showing?
The device is Samsung Galaxy M31. I have searched for a method but couldn't find out. Can anybody help me out?

Make your search query generic. Such as, how to hide or remove a system app persistent/sticky  notification in Android. See my answer. https://android.stackexchange.com/q/163338/96277

@Firelord thanks!


text:
How to have a different input/output audio source
I have a one plus pro 8. It has excellent microphone (output) noise cancelling. I also have a Bose quiet comfort 35 II which has excellent noise (input) cancelling as well.
My problem is they when I ride the bus and talk to people:

If I use the phone default speaker they can hear me great but I cannot hear them
If I use the bose speaker then I hear them great but they don't hear me

Question: how can I speak using the phone microphone (output) but listen (input) using my Bose earphones?

I don't have an answer but Android's lack of support for sensible audio device selection (as on Windows for example) gobsmacks me. Cone on Google, put some of those development dollars towards something that affects lots of people lots of the time.

As long as you have an Android phone, you can use Lesser AudioSwitch, an Android app found on the Play Store that allows you to switch between input and output for microphone and headphones both connected via Bluetooth or wires.

For some reason this app isn't compatible with my device

My phone is android 11


text:
Android Chrome cookies all suddenly disappeared
This morning all the cookies seem to have disappeared from Chrome on my 'phone. When I log in again they stay, so it's not a bug or settings problem I think. They definitely have not all expired at the same time. History is fine, it's just the cookies. Can't find any references to this particular issue elsewhere.

Did you find the reason why it happened?

No, though I did wonder whether it was related to a Chrome update


text:
Move contacts between 2 accounts
On my Samsung Phone with Andorid 11 and OneUI Core 3.1
I have 2 google accounts. Lets call them ACC1 (private) and ACC2 (corporate).
By default when I add new contacts, phone add them to google ACC2.
Very often I change the destination account in time when I create new contact, but also very often forget to change them.
I do not see possibilty to change account after the creation process is done.
As I have them both (google accounts) configured on my Phone I want to ask:
How to easily move specific contact from google ACC2 to ACC1 ?

It started to get more compiled.
I have two contacts both with the same name. 1 stored in the phone. 2 saved in google contacts. How to check with the "Google contacts" application, ie without logging into the web, which contact is saved in the cloud and which on the device? I just want to select the correct contact on my phone and remove it from the device.

If you want to copy multiple accounts you can use Google Contacts web UI and their export/import function:
Step 1: Export existing Gmail contacts

On your computer, go to Google Contacts
At the left, click Export.
Select which contacts to export.
Select Google CSV.
Click Export.
At the top right, click your profile picture and then  Sign out.

Step 2: Import the file

On your computer, go to Google Contacts, then sign in with your other Gmail account.
At the left, click Import.
Click Select File.
Choose your file.
Click Import.

https://support.google.com/contacts/answer/1069522/add-move-or-import-contacts-computer?co=GENIE.Platform%3DDesktop#zippy=%2Cfrom-a-gmail-account

Yes, I know this feature, but very often I want to move single specific contact, which I added few minutes before by mistake, and I do not want to especially login,export,delete,import via browser. It is too time consuming to do this several times a month. So I was wondering that maybe there is some utility program to transfer contacts between accounts, or just some option in the system that I don't see.


text:
When I take pictures of text with my android the text is too blurry to read
I have tried this with two separate Android phones.
When I take a picture of text, say a letter posted on a window or a serial number on a device, etc., the text is out of focus and too blurry to read in the picture.
Often the text goes into focus in the camera for a split second but then immediately goes out of focus so that I am not able to take a picture of text where it is readable.
What is the solution to make text clear when I take pictures of it with my Android cam?

Have you tried to tell the camera app what area you want to focus? Usually this can be done by touching the area on the preview image.

Yes, that works thank you


text:
'Wifi calling' notification impossible to remove
At the top of my notifications for the last 2 years or so, there's been a notification that says:
Wi-fi Calling
Tap here to confirm or update emergency location information for Wi-Fi Calling.
This will allow you to make and receive voice calls when a mobile network isn't available.

I don't want to use wifi calling, I can't get rid of this notification. There's no way to silence, hide, mute, or do anything to the notification. Wifi calling is disabled in settings. Clicking the notification shows a loading symbol and 'Loading, this may take a few moments' for about a minute and a half, then gives an error that says 'Unable to activate wi-fi calling at this time. Please try again later.'. It does this with or without wifi being connected or enabled, and with or without a sim card.
I have tried everything I could possibly find on google, to no hope. I don't want to reset the phone or root it just to get rid of a notification.
The phone is a Galaxy S10+ with Android 11 on Verizon

See if my answer helps : https://android.stackexchange.com/a/163569/96277


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

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

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

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


text:
Is there anything I can do to securely erase my phone's data before sale?
I've had a Samsung Galaxy filled with thousands of sensitive financial documents, which I've been using as a pocket computer pretty much, in order to reference them each time I need to throughout the day.
It's heavily debloated, de-Googled, I've had the Secure Startup device encryption enabled in case I'd lose it and a firewall (NetGuard) installed to prevent data leak for when it had to connect to the internet.
I wish to sell this phone now (or rather, give it away for free to someone who might). So, that means decrypt it and hard reset it.
Is there anything I can do programmatically (e.g., via ADB) to further wipe data? Something we would do to a computer hard drive, for instance, like secure wipe/zero out its data?

What Galaxy phone are you talking about (ai don't thing you are talking about the original Samsung Galaxy)? You don't need to decrypt the device. Just perform a factory reset. This will erase the decryption key and all the encrypted data will be unrecoverable. You can check that after factory reset the files are gone.

@Robert It's an S9+ and apparently there's another S8 that I was using for the same purpose, like a year ago, forgotten in a drawer. Basically, what you are saying is keep them encrypted and simply perform a hard reset? That will do?

Yes. If you are unsure, perform the factory reset from within running Android (not via recovery) and then after factory reset skip most of the first start wizard and check if you can see any files. Because of the encryption if the files are no longer to be seen they are unrecoverable gone after a factory reset.

@Robert Can you explain why I should reset from within the Settings menu and not via Recovery? In the past, I've always used Recovery for this purpose. Specifically, I'd use Wipe cache partition, then Wipe data/factory reset and finally Reboot system now.

Search the internet for "factory reset protection" (FRP) and you will know why.

Ok, I looked up FRP and from an article I found, I'm quoting: "If you try to reset a phone through the bootloader, FRP will kick in, and it can't be set back up without the previous account's password." ——  As I mentioned in OP, my phone is deGoogled, so I am/was logged in with no Google Accounts. Is in my case in-Settings reset and Recovery reset, one and the same thing? edit: Also, no Samsung accounts ever.


text:
How to determine exact package/application which cause undetected traffic consumption (only UID are known)
The situation
Some time ago I am started to locate data traffic leakage by the some packages, which listed in traffic listings as a numeric UID (five digits long). In both selection - by the cellular data and wifi.
Device is unrooted, and can not be rooted: Sharp R2 Compact
I ask'd on web forum (4pda), about this situation, and I am was instructed to try to inspect Package Manager via ADB, but as I expects - nothing is located there with investigated UID numbers. For example, the larger consumer (about a half of gigabyte) is UID=10366 and it was in april.
Android/sdk/platform-tools% adb shell "cmd package list packages -U | grep 10366"
Android/sdk/platform-tools%

These days some different UID numbers is still present in traffic consuming lists.

Questions:
Is there a way to catch which package cause "unnamed" traffic consume on unrootable phone?
Is this a malware activity or an ordinary system activity may cause the same (traffic leak tie to unnamed UID instead to exactly package/application)?
May be somwhere exist a guide to learn more how traffic is counted in system provided listings?
As a PS:
I am Android developer and can write couple lines of code to run, but I needs to be pointed to where I'll should to start from

Based on previous questions, these numbers usually are a remnant of uninstalled apps. Do new numbers still appear without uninstalling anything?

@Andrew T. I don't think so. First: on a first screen on the bottom present a isolated item named "Удалённые приложения" (uninstalled applications in english). Second: I am do not have equal counts on install/deinstall applications as number of UID's in traffic consuming lists. Btw, thanks for the link on previous discussion.

@Andrew T. And yes. New numbers appears without deinstalling any applications.

If you are sure that the app is not uninstalled, my answer to How to view network traffic requested by a specific app? may help.

@Irfan Latif, seems your variants is irrelevant. First - phone is unrootable. Second - on-topic records (with UID only as a consumer) goes aside from NetGuard (on my second screenshot this tool presented by the two icons in notification bar). NetGuard send notify on every new install - this is okay. But no notifications come when some activity by the undetectable UID occurred in the system. This may be due to I am some misconfigured in the NetGuard tool.


text:
How to change .kl file without root
I am using Xiaomi phone(redmi note 7, miui 12, mobile says it has full OTG support) and I would like to use games with my Xbox 360 wired controller. When I plugged it in, the light just flashed, and the phone didn't react to any buttons. (I tried to use otg troubleshooter, it says it's plugged in, it just don't work). I saw some answer to this question: use 1Controller (series of .kl files). I got it, and I have no idea how to use it, or write it in system/keylayouts without root. So, have anyone answer to:

How to safely and rather temporarily root my phone?
How to write to system without root?
How to use .kl files without writing it to system?
How to solve this controller issue?


text:
Add more clock speeds
I know that the phone's kernel contains the clock speeds but is there a way to add your own clock speeds?
What do I have to do to edit the kernel, where is the the clock speed data stored?

On most customROMs with root permissions you can configure the CPU governator which controls the clock speed for the different scenarios (idle, load and everything in between).

@robert but how to I add new clock speeds to the kernel?

As far as I know you need a rooted device and your ROM has to support CPU genvernator (not sure if this is the case for regular ROMs from Android manufactures). Please see for example this page: https://forum.xda-developers.com/t/changing-cpu-governor-with-adb.4193163/


text:
How do I change temperature units in "Discovery"?
I'm using a Pixel 3a, with Android 11. I have Google Assistant disabled in general, but occassionally go through the articles section that's still available and sometimes stumble upon the "Discovery" tab in other ways.
Recently, a weather/temperature bubble showed up in the corner of the assistant's "Discovery" tab:

Now I don't understand °F and would like to switch the bubble over to °C units. I can't figure out how to do that.

The weather widget on my home screen already shows temperature in °C.

The notifications for "Current weather conditions" are in °C as well.

If I click on this bubble to open full weather information, that also uses °C.

I even have location enabled, letting the weather page guess my current location.
(Although the current-weather notifications do insist that I live in another town a few kilometers away from where I live, with "AGPS reset" only helping for a few minutes, but at least it still gets the city right, so surely that shouldn't be the problem.)

My Play Store country is still set correctly.

Geolocation websites recognize my IP address correctly.

Is there any setting that I'm missing? Do I need to re-enable the full Google Assistant to find it? I don't really care about this weather bubble in itself (it just shows the same thing I already see otherwise), but the inability to change it annoys me every time.

From 3 dots menu

I don't have that menu, I only have the tiny "73° F" bubble shown in the screenshot and nothing more.


text:
Talkback speed is very fast, how can I reduce it in Samsung S21
I have Samsung S21 5G Android 11 mobile. This device Talkback talking speed is very fast that I am not able to catch it.
How can I reduce speed ?

On Pixel 3a, there is a Setting inside TalkBack menu about Text-to-speech, and there's a Speech rate slider inside it. Not sure what Settings are available on Samsung.

@AndrewT. Its working in Samsung too.


text:
Confusion regarding Factory Reset via TWRP
Background The OS is Android 10 that uses FBE as encryption type.
Problem I do not remember my PIN, that would decrypt the files in /data partition, so I cannot unlock my screen.
Question I can boot into recovery (TWRP). And, naturally, TWRP asks for PIN to decrypt the files.
But if I choose not to enter the PIN, and decrypt the files, and go straight to do a Factory Reset via TWRP, will I be able to access my files (images, media) in internal storage? (/data/media/0/)

The PIN that you forgot is one of the  essential pieces to decrypt user data (includes /data/data/ and /data/media/USER_ID). If you don't have your PIN then you can't have your data. There is no workaround. If you can remember the length of your PIN, you can try bruteforcing through recovery (don't know if keymaster would slow this down). // Factory reset would delete all of your data including /data/media/*. Even if you do a partial reset (leaving /data/media intact), nothing useful would come out. /data/media would remain encrypted anyway without your PIN.

Thank you so much for clearing this out, I didn't have much hope as it is, regarding the data in internal storage but you cleared my doubts! Thank you again! The thing is it is either a 4 or 5 digits PIN ending with 7 and I need a custom script for that, to try brute forcing. And yes, I completely agree with you, it makes total sense.


text:
Having a phone with no call log
There are a lot of questions asking about unlimited call log. I have the exact opposite problem: I want no call log at all in the software.
Even with a phone with "pocket detection" and a complicated swipe pattern, I still happen to randomly call a number who called me previously and that I do not want to call (clients who do not see my number when they call me : I do not want them to have my number). For instance because of inadvertent manipulation, drop of water on the screen making the touch detection put my finger where it isn't, etc...
I do not care about privacy issues, I just do not want to have any way to reach a call log with phone numbers from the UI.
Is there any way to achieve that with android ? Maybe with a third-party phone app ?

Call logs are integral to phone apps and are considered essential, not withstanding your concerns. Therefore, it's unlikely to find an app that can do this // Use  of [tag:automation] tools to delete call records is an option, other being you write your own app for this

In line with automation suggestion, you can try MacroDroid //Set up a macro like this, make and save it. I haven't tested it but it should work

Thanks, that macrodroid solution looks like it's enough for me

Good. You can try that and if that works for you either post an answer yourself or ask me


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

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

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


text:
Download location of Aurora Store?
Working on an Android 6 (stock ROM) phone, which has only internal storage (no external sd card), and is not rooted.
Aurora Store is installed and updated on this phone via F-droid.
Aurora Store has a "Downloads" choice in its "hamburger" menu, where I see something like this:

So, clearly some .apk's have been downloaded - the question is, where?
I have checked the following locations:

/sdcard/Aurora/ - there are some random .apk's there, but not the two on the screenshot
/sdcard/Download/ - again, some random .apk's there, but not the two on the screenshot

With a bit of find, I also found the following location - but unfortunately, it turns out completely empty in adb shell:
$ ./adb shell
shell@DDDDD:/ $ ls -la /sdcard/Android/data/com.aurora.store/files/Downloads/
shell@DDDDD:/ $

My guess is, the .apk's Aurora downloaded are actually here - but I cannot access/see them, because I'd need root for that, and this phone is not rooted.
Could anyone confirm, what should be the default downloads directory/location for Aurora Store, on an unrooted phone with only internal storage - and whether root is needed to access these files?

Update
Aurora Store doesn't have an external storage option anymore.
Instead, once you've downloaded an app you can open the downloads view in Aurora store, tap and hold on your desired app, and select Save App bundle. Aurora Store will prompt you for a location to save a zip archive of the app's APK files.

Old answer
Aurora Store downloads files to app-specific storage by default (/data/data/com.aurora.store/files/Download).
If you want to save APKs to shared storage to access them without root, in Aurora go to Settings → Downloads and switch on "User external Storage". After this, APKs will be stored in Android/data/com.aurora.store/files/Downloads under Internal Storage (typically /storage/emulated/0).

It seems it's for security reasons (https://gitlab.com/AuroraOSS/AuroraStore/-/issues/1072).

You are right - I had the same problem...
However, "manual download" works with this folder:
storage/emulated/0/Aurora/Store/Downloads/
...com.futuremark.pcmark.android.benchmark/
...4061/
...com.futuremark.pcmark.android.benchmark.apk

Unfortunately I do not see a directory called Aurora in my /storage/emulated/0 volume.


text:
Bluetooth Headset does not work with VoLTE
I have a strange situation where my Bluetooth headset does not work for (most) VoLTE calls. More specifically, I can perfectly hear the other end, while they are unable to hear me.
Is there a way to find out why? And how can I mitigate it?
Details

Xiaomi Redmi Note 8T with LineageOS 17.1 (build from 12. July 2021)
AfterShokz Trekz Titanium Bluetooth headset
Using the German carrier O2.

What I know so far
Headset works perfectly fine for music, non-VoLTE calls, audio recording apps, WhatsApp voice messages, etc.

If I switch the audio to phone or speaker during the call, everything works as expected. If I change it back to the headset the other party no longer hears me. I can switch back and forth multiple times with the same results.
If I disable VoLTE calls the headset works fine.
The problem does not occur on all VoLTE calls, but on most. It seems to be consistent with the opposing party, i.e., happens all the time with caller A, happens never with caller B.
Most tests done in a zone with excellent LTE+ coverage (full bars and I can even see the antenna tower). The problem seems to be independent of the LTE tower or city I am in.
When on VoLTE calls, the audio quality is definetley better.

Ideas I had
My prime suspect is "audio codecs".
When I connect this headset to Windows, it appears as two devices: "hands free audio" and "stereo headset". And only the "hands free audio" one is able to also record sound. When I switch the output to "headset" the audio quality is worse. Also, when I am using the headset's microphone it can not playback music over the "stereo headset" device.
My guess is, that there is some kind of "high quality" audio mode and when on VoLTE calls, a better audio codec is used and the phone wants to also use this for the headset. The headset accepts, but is unable to do both (high quality audio and microphone usage) at the same time.
Is there a way to check which audio codecs are used? Maybe via adb?
I could change the bluetooth codec in the developer settings, but the list is huge.
Can I somehow determine which codecs are supported by the headset?

The developer options in Android settings app has several options regarding Bluetooth codecs.

I saw that, but there are so many options. I can change the AVRCP version, the codec, the bitrate and sample rate, the channel mode, and the LDAC codec ... some of which I don't know what they mean.

Try a factory reset of earbuds//to find out which profiles are supported, many apps are there (search for Bluetooth code info) // try with a different device


text:
How can I find the oldest SMS that is stored on my phone?
How can I find the oldest SMS that is stored on my phone?
Since SMSs are threaded I can't just scroll all the way down to find my oldest message.
The reason I want to do this is that I use a backup solution for SMS that, for unknown reasons, has failed to copy some messages from my current phone. I therefore want to startover and make a full backup of my current phine. At the same time I have a decade worth of history backed up in this solution and I just want to cull the messages that is on my current phone.
Basically, in my backup solution I have messages 1 to 1200. 1 to 1000 are old, from old phones, while 1001 to 1200 are on my current phone. I want to find 1001 and then delete all messages newer than that from the backup. Finally I will backup 1001 and newer again.
Android 10 on a Oneplus 6T


text:
How google check the apps submitted for publication in playstore?
I knew playstore authority ( None other than google)  take some time to analyze the app and then gives permission.Am I right? What do they do to analyze the app?
and how they check all assets( image or audio or video) are used without infringing copyright ?

I never heard that Google performs copyright checks. You as the developer are responsible for this. Only if you mimic an existing successful app Google may not publish an app as such mimic apps are usually spam or malicious apps.

As per Play Console Help - Intellectual Property, Google rely on users' reports since they don't (and can't) check by themselves.

Thanks for comments.One more thing, If someone uses my artwork anywhere without my permission, how can I know that?(It's definitely not possible to check everything in internet)

You can't......


text:
Can any Google Pixel smartphones take 12MP or better photos in 16:9 aspect ratio?
I have been considering buying a Google Pixel 3 or 3 XL Android smartphone to use primarily for photography and phone calls.  Google advertises that these phones have 12MP main cameras.  That's fewer megapixels than I would like in a camera, but I was still considering those devices as possibilities.
While performing research, I saw a short video clip that showed Google's UI.  From what I could tell, 12MP is only available in 4:3 aspect ratio.  In 16:9 aspect ratio, the resolution drops all the way down to a paltry 8MP.  That's much less resolution that what I what in a camera.
Is the resolution of the main camera in the Google Pixel 3 and 3XL only ~8MP in 16:9 mode?  If so, is this limitation true for their entire line of Pixel smartphones?

Why camera sensor size is more important than more megapixels

16:9 is only a common video but not a common photography format, therefore the camera chips usually have 3:2 or 4:3 ratio. 16:9 is created by cropping the image, therefore the megapixel value is always lower for a 16:9 image. See this article for details: https://photographylife.com/aspect-ratio

See related answers on why 16:9 has less pixels and not a preferred photo format in most cases

@Robert I can't speak to current Samsung flagship smartphones, but I know that for years their market-leading flagship phones featured maximum resolution at 16:9 aspect ratio.  For example, their Samsung Galaxy S6, S6 Edge, S6 Active (and I think S7 and S7 Edge) all support 16MP at 16:9 aspect ratio, but only 12MP at 4:3.

@beeshyams Thanks. Both answers to that question are, unfortunately, incorrect.  It all depends on the aspect ratio of the sensor.  Sensors come in a variety of aspect ratios, including 1:1, 4:3, and 16:9.  Since most people view images on ~16:9 screens these days, I would postulate that 16:9 is the preferred ratio.  Otherwise, you'll wind up with large bands on your screen or a cropped image where the primary subject may be partially off-screen.  For prints, at only 300DPI, 12MP does not have enough pixels to make a print much larger than a common piece of paper. At 600DPI, cut that in half.

Well, it looks like the Google Pixel 6 Plus (or Pro, or whatever they decide to call it) will finally have a camera sensor that isn't limited by technology that's a decade old.
That phone is supposed to come out sometime around the end of 2021.  Of course, it will cost more than most computers, so it won't be practical for most people to own.
For all practical purposes, the answer is that Google does not currently have any smartphones that can take 16:9 photographs with greater than 8MP.  In a few months, this might finally be possible, but the device will cost more than a mirrorless DSLR camera with a professional sensor that has much better characteristics.


text:
Reducing Tx_Power for mobile hotspot - hostapd.conf
I am using rooted Samsung J2 pro with Marshmallow 6.0.1. My mobile hotspot uses a lot of battery. And this battery usage is reported by Android OS process by Smart Manager.
I have reduced the tx_power manually from 4 to 1 in hostapd.conf located under /data/misc/wifi/hostapd.conf but it gets overwritten whenever I switch on the hotspot.
How can I make it permanent or is there a way to change tx_power through adb?


text:
Is there a way to root a locked Motorola phone?
Someone gave me their locked phone and I want to install a custom rom on it but it's not rooted and developer options aren't enabled. The phone model is Motorola Moto G6 Play.

What means "locked"? SIM locked, mobile network locked, screen locked, bootloader locked?

Locked like they forgot the password and don't know the email (it's a child)

Does this answer your question? How to bypass "Verify your account" (Factory Reset Protection)

Does this answer your question? Bootloader Unlock Question: Motorola

Does this answer your question? What are the various ways an android phone can be locked?


text:
Executing Edify script via adb shell
Edify script is a very limited language that is being used in flashable zips (mostly updater-script files);
Within Edify script we can execute shell commands (run_program()) but what about the vice versa? Is there anyway/tool to execute Edify script via adb shell?

updater-script alone is useless. All the Edify functions which are called in scripts are defined in a binary file named update-binary, just like shell functions are defined in a shell interpreter binary like bash, zsh, ksh etc. Both files updater-script and update-binary are packaged in ZIP file (inside META-INF/com/google/android/). update-binary is executed with 3 arguments. Second one is the FD you need to create where to print the output. Third one is the path to the ZIP file which is extracted and commands in updater-script are executed in sequence.

You need to simulate this behavior exactly, in order to run Edify script from a shell. Normally this doesn't worth the hassle. Just translate the Edify script to a shell script and run directly.

@IrfanLatif Thanks for the info.

@IrfanLatif but some functions are not implemented in the shell; for example functions for managing Dynamic Partitions operations (such as resize, remove, add_group ...)

you can install flashable zip from TWRP command line https://twrp.me/faq/openrecoveryscript.html

@alecxs yes, but that's the hard way (I have to write updater-script and put it into a flashable zip); I'm looking for a more straightforward way; like direct execution of commands in adb shell;


text:
Start button broke, USB debugging NOT enabled, need to start phone!
Basically I have a Moto X4 without USB debugging enabled and the start button doesn't work.  I can boot up to AP Fastboot (the screen with the little droid in the background), but I don't have USB enabled, so when I connect the phone via USB cord to my laptop, ADB won't recognize it (so I can't reboot using ADB).
Is there anything I can do!?  I don't want to do anything "security sketchy" here: just start it up to get to the point where I can enter my password/use fingerprint ID.
Would an OTG adaptor work!?

How do you manage to make the device boot without a working power button?

I input the charging cord and simultaneously hit the volume button.  Both volume buttons work.

you don't need usb-debugging for fastboot commands. install bootloader interface drivers and fastboot reboot

Thanks.  I'm trying to follow https://www.droidwin.com/install-google-android-bootloader-interface-drivers/ to do that. But, I run into two problems

All I see in Device Manager is Motorola ADB Interface, and I get an error when I try to update using the Android USB Driver.

When I go to a command prompt in the Platform-Tools folder, I get "List of Devices Attached" and nothing is listed.  Also when I enter ADB reboot bootloader, I get "no devices/emulators found."

Nevermind it worked!

maybe interesting for you https://android.stackexchange.com/a/221384

Hi, looks like you've found the solution by yourself, which is great! Consider post it as a proper answer since self-answering is not only allowed, but even encouraged!. Thanks!

I basically did what Alecxs suggested, so I don't think I answered it myself.   It didn't seem to work prior though, as my phone wasn't being recognized by ADB.  I guess maybe it was the wrong cord?  I don't know. Because of this I was thinking I needed usb debugging to get my phone recognized

you are mixing up adb with fastboot. adb is a different mode with different drivers and different program/protocol language. fastboot does not require usb-debugging at all. furthermore you can't start device from adb because adb only works on already running android (with enabled authorized usb-debugging). so the trick to power up was simultaneously input cable + volume down button (fastboot mode)


text:
Command line to remontly shutdown the display and power on
I'm using a digital signage CMS and app to control an Android tablet with root access. I can "reboot" it with this simple command, but I haven't found a command line to put the display to sleep(shut down / on).
I'm thinking it's possible also to set shutdown hours and start up?

Please don't mix shutdown and sleep together. They are neither interchangeable nor synonymous to each other. If you just want to turn off the display or put the phone to sleep (akin to using a timeout in Android devices or pressing power button once), use adb keyevents. See https://stackoverflow.com/questions/7789826/adb-shell-input-events. If you intend to shutdown the phone (turn off the OS and hence, the device itself, not just the display), then use svc command. Cold Booting the device automatically is not something I know of.

As for timers for shutdown, many automation apps can do this.


text:
Android 10 on car doesn't have a sleep mode option
I got a head unit in my car that runs android 10. I'm kind of disappoint with this unit, and the most annoying thing is the loading time at boot, since I need to go reverse and need to wait for the rear camera.
I saw on youtube that there is an option to make the device not going to sleep for hours/days (under Settings > Car settings)... but I can't find "Car settings" on my device. I was also looking for it under Settings > Display, but no luck again.
Any suggestions?
Thanks

Youtube videos are usually a bad information source especially as each manufacturer may modify Android e.g. by adding new featured and options. Therefore unless the car was the same model from the same manufacturer the video is no applicable to your car. If the boot time is too long you should complain at the car manufacturer.

I am new so I may be totally wrong here but...
You could root the device and change the sleep file/delete it.
Also, for me personally, I would take maybe 20 minutes to study all the device's content especially the settings.
Cheers!


text:
Can I downgrade my Nexus One from Android 2.3.6 (Gingerbread) to Android 2.2 (Froyo)?
So I was wondering whether it's possible to downgrade my old Nexus One which is currently on gingerbread back to Froyo. If so, how do I go about this? I don't know much about downgrading on Android, but I think I have to root the device first and then flash a stock ROM. If that's the case, where could I find Android 2.2 ROM for my Nexus One? Any help is appreciated.

Nexus One was a develope device that can be unlocked easily, therefore you can install any matching ROM. So theoretically this is possible however practically it will be very hard to find OS images to such an old device. I would assume that you will find many many dead links. BTW why Domain want to install Android 2.2? 2.3 is as outdated as 2.2 more or less no app will support any OS of that age anymore.

@Robert thanks for the help man. I want to go back to Froyo because it feels smoother and overall looks better than gingerbread in my opinion. It's true that many apps don't support it nowadays, but I don't really plan on using it for daily tasks, I have a Samsung a10e from two years ago as my daily driver. I also have another question, do I have to root my nexus in order to install the ROM or can I just unlock the boot loader and flash?

Just unlock the bootloader. Please keep in mind that such old systems are heavily insecure. Never ever connect it to any network.


text:
Unable to get oem unlock data
I am dealing with a Motorola X4 that says "Your device is corrupt. It can't be trusted and will not boot." when ever I try to boot it up. I am able to get the device into fastboot mode, and I can use fastboot on my computer to see the device info, but when I try ./fastboot oem get_unlock_data I get:
(bootloader) Failed to get unlock data.
OKAY [  0.002s]
Finished. Total time: 0.002s

And when I try ./fastboot oem unlock I get:
(bootloader) Check 'OEM unlocking' in Android Settings > Developer
(bootloader) Options
OKAY [  0.001s]
Finished. Total time: 0.001s

Since the phone will not boot, I cannot turn it on to change the Android settings. I am also unable to get the device to be detected by adb. Is there anything else I can do from here to get the OEM unlock code?

Is it possible to perform a factory reset and then boot the device?

I have tried performing a factory reset from the fastboot menu but I get the same, "Your device is corrupt. It can't be trusted and will not boot." error. Is there another way to factory reset the device?


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

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

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

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

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

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

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

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


text:
How can I see request and network profiling on an app that is decompiled by Android studio?
I chose "Profile or Debug APK" in Android Studio and chose a downloaded apk. Then, when I try to profile it, I see spikes in network tab, but I cannot see network requests and responses.

Any solution for this?
Does downloading apk from websites matters?

I believe it's only possible on debuggable apps. APKs from the internet are usually taken from the Play Store, and those have their debuggable flag set to false. Otherwise, they get prevented from being published.

@AndrewT. - Thanks for answering. So, if apps can't be released unless debuggable = false, then when Android studio has an option "debug pre-built apks" while opening android studio is counter statement. Which means, we can profile only the apps that we develop. Is that correct?

@sofs1 That is the purpose of Android Studio. But you can use apktool to decompile the app, change debuggable flag and recompile and sign it. Some apps my check for debuggable flag and signature and refuse to run but a lot will just run.


text:
Adoptable storage filesystem?
I have a sdcard split into two partition: portable and adoptable.
Not long time ago my /data is formatted as F2FS, really unstable on my device. So I recently format it again to EXT4. I'm noticing that my adoptable storage is still F2FS even though I already format it again using
sm partition disk:***,** mixed 69

Is the adoptable filesystem following the device /data filesystem or it's default to something?


text:
Generic approach to get Ethernet working on android
Is there a generalised approach to getting Ethernet cable networking to work on (preferably) recent Android versions with minimum fiddling?
I've looked at other similar questions but they focus on pre-existing devices, specific Ethernet adapters and/or specific ROMs.
For example, I have found that Nexus 7 (2013) with the ResurrectionRemix ROM (Android 7.1.2) worked with a generic noname Ethernet (powered) adapter from aliexpress when connected through an OTG cable and with the USB RNDIS selected in Options > Developer Settings > Default USB Configuration. Connecting power to the ethernet adapter, the OTG cable and the RNDIS setting was all that was required.
With more recent android devices and newer Android versions I could not identify a successful combination of rom+adapter+device+[kernel].
Given that I am willing to root a device and/or buy a specific combination of compatible android device + compatible ethernet adapter, what are some known configurations that work out-of-the-box with minimal extra configuration? Any hints, suggestions or guidelines in this regard?
Alternatively, is there a 'generic' package with USB-Ethernet drivers that could be flashed for widely supported ROMs (such as lineageos) that [in combination with a custom kernel or without] would provide Ethernet connectivity?
And finally, in case if the official AOSP/LineageOS/etc repos have this functionality but it is not enabled by default, what would be the steps to build a ROM such as lineageos or AOSP with all possible Ethernet and USB-Ethernet modules enabled?

Does this answer your question? How to make Ethernet work on Android over OTG?

I did read that answer before posting this question. That answer focuses on what technically needs to be done on an android device in order to get ethernet up. This question is specifically about how to avoid having to do all those steps manually, and instead pick a combination of device+adapter+rom+kernel that just works (as in the example I provided), or how to build/mod a rom to enable this functionality.

Mokee 11 ROM experimental (Android 11, apparently a fork of lineageos) and xiaomi.eu roms contain the required ethernet drivers that happened to work with two USB-C to Ethernet adapters that I tried. The USB-C version of the ethernet adapter works on a rooted mipad4 tablet OOTB without any extra actions required. The USB-A version only worked with an intermediary USB hub + USB-A to USB-C dongle. When connected via a USB hub the network connection will only appear after rebooting the device with the cable plugged in or after issuing in the terminal su followed by dumpsys ethernet.


text:
How to get a list of all apps that start in Direct Boot Mode (Device Encrypted, not Credential Encryption)?
I want get a complete list including all apps (including system apps) that are running in Direct Boot Mode, therefore they necessarily store their data in the DE (Device Encrypted) area (as opposed to CE = Credential Encrypted Area).
Background: As of Android 7, FBE (File-Based Encryption) was introduced as an alternative to FDE (Full-Disk Encryption). Sadly, in Android 10, FDE was removed and everyone is now forced to use FBE.

https://source.android.com/security/encryption/file-based
https://source.android.com/security/encryption/full-disk

There are some apps that are considered "essential" and therefore they start-up on boot. As such, information leakage can happen if the phone is booted cold by an attacker. Such apps include:

Telephony-related apps
Alarm apps
Accessibility Services
Keyboard app to enter the passphrase
etc

For a given device, I'd like to get a complete list of all apps that are currently permitted to run in Direct Boot Mode, and I'd  like to remove them (Yes, I don't want my alarm to run in Direct Boot Mode. Yes, I don't want to be able to send or recieve calls/messages in Direct Boot Mode)
How can I get a list of all of the apps that are set to start & run in Direct Boot Mode, and whose storage is then necessarily using DE instead of CE?

As direct boot aware apps are identified by a manifest entry <application android:directBootAware="true"  android:defaultToDeviceProtectedStorage="true"> apps that read AndroidManifest.xml of all installed apps should be able to show which apps have this enabled. Not sure if there is already an app to summarize apps with that setting.

Android apps that can run in direct boot need to be declared in the Android Manifest as android:directBootAware="true"
To get the Manifest XML of an APK apktool can be used. https://ibotpeaches.github.io/Apktool/
You can write a script to achieve your result or else, do it manually.
Use adb and package manager to get a list of packages installed
adb shell pm list packages | sort

Find apk directory
adb shell pm path com.king.candycrushsaga
package:/data/app/com.king.candycrushsaga-1/base.apk

Download the APK
adb pull data/app/com.king.candycrushsaga-1/base.apk

Then use apktool on the output
apktool d base.apk

Then search for android:directBootAware="true" in manifest
If it is there, you can remove the APK with adb
https://stackoverflow.com/questions/2507960/does-android-keep-the-apk-files-if-so-where
https://stackoverflow.com/questions/4191762/how-to-view-androidmanifest-xml-from-apk-file/54874783#54874783