text:
How do I get the actual boot image file from a block device without padding?
I have 9.6mb file that after doing dd if=/dev/zero of=/dev/block/mtdblock2 I write to mtdblock2. Before writing I have done a sha1sum on the file. I can use applypatch -c to check both size and sha but if I do a sha on the blockdevice it is of course different because of the space left on the device. If I copy the device I will get a 16mb image including that free space. Every where I read the suggestions are to use fdisk to get a count and then use the count option in dd. However, this does not work because the block and partition is the boot partition. How can I copy the original file, same size and sha, back off of the block device?

Not clear what you are asking. If you already know the size (9.6mb; is it 9.6MB or 9.6MiB?) just do dd if=/dev/block/mtdblock2 of=boot.img bs=9.6M count=1. bs=9.6M is 9.6*1024*1024 bytes. bs=9.6MB is 9.6*1000*1000 bytes. Use whatever applicable to your case.

you know what /dev/zero is? you destroyed boot already, no way to get back

@Irfan Latif - The file I have is 9.6mb but the file I'm trying to extract maybe and probably is a different size. It's proprietary and signed. I need the image file itself to get the sha1sum so that I can use applypatch on it.

So you are looking for boot.img format. See official documentation: https://source.android.com/devices/bootloader/boot-image-header and how magiskboot extracts boot.img: https://github.com/topjohnwu/Magisk/tree/master/native/jni/magiskboot. It's very device-specific.

I would indeed use dd, with one or more of the several options available to specify the length (amount) of data to copy; otherwise, as you have noticed, dd will read the entire contents of the device, which is not what you want.
Re the apparent problem of the block device being the boot partition, the usual solution is to boot from some other medium (perhaps a LiveCD) so that the device you want to read is not the boot device/partition and can be read without difficulty.  Before that, though, try sudo dd ... and see if running as root solves the problem without requiring more drastic measures.

Boot partition is read-only. It's loaded in memory only once by the bootloader. After that it's no more in use. And even if it is, reading a raw block device is always possible. 2) How would you boot an Android device from LiveCD or any other medium?

Taken literally, (1) is a little different than I'm used to on platforms I know better than Android, but still means OP should have no problem. Since he says he does*, I hypothesized that "maybe Android is different."
Too, Android runs on so many different devices that maybe OP's device can boot from CD --or maybe a thumbdrive if you prefer.  I've never seen anybody run a command-line shell, or dd, on Android before ; so, if he can do that, I can't assume anything is impossible.
Bottom line, I think my basic points still hold, as far as they go.

Just if you are interested to know in detail what I meant: https://android.stackexchange.com/a/220678/218526. Concepts of booloaders, boot partition and booting are entirely different on Android devices as compared to normal Linuxes or other OSes.


text:
How to fix completely non-functioning Gionee S10C Android phone?
My phone is Gionee S10C and I have Android 7.1.1 installed on it.
I was going to upgrade the Android version to 10, but Gionee no longer provides OS updates(Not sure whether the company even exists now), so I tried to flash Lineage OS 17.x from this site.
I connected the phone via USB cable, opens up command prompt on Android platforms folder and run adb reboot-bootloader to enter the bootloader screen of the phone.
And then I tried to run fastboot flash -w system lineage-17.x.x.img.
After rebooting, my phone is not longer running, but completely bricked. It keeps stuck in the Gionee logo screen and keeps rebooting when entering the Recovery screen.
I tried factory reset, but that didn't work out.
FYI, I forgot to run fastboot oem unlock.
The worst case is that I can't find the device on Windows, which means adb devices returns nothing even the phone is plugged in.(fastboot devices in the bootloader screen shows the device)
So now I'm going to re-install the original Android OS on the phone, so that I can use it, but no method works because of adb disconnecting.
I tried the steps from this site using various Flash Tools, but no tool can find the connected phone.
All I can do now is to use fastboot.
(I was going to use fastboot flash to overwrite the system partition with the one from the original ROM, but there are too many images for the system like system1.img, system2.img, .... - I don't know which one to use).
This is the files I have in the original ROM firmware.

Please advise me how I can get back to my original Android or install any other Android OS, so that I can use this phone.
Thanks.

you can't flash ROM without modifying boot partition https://android.stackexchange.com/q/214902

GSI's requires treble ready device. in your case only lineageos devices specific release will work. flash the whole zip it contains a set of partitions https://android.stackexchange.com/q/213272

source: Stack Exchange

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

sort: votes


text:
How to mount sdcard as "internal" using custom filesystem on Android 10 (root access only via adb)
How can I properly mount my SD card as "internal" (i.e. so that all apps are on it) using a custom filesystem (in my case Ext4, but I'd like to use full-disk encryption using a key that I can decrypt when putting the SD card in my laptop too, and eventually switch to a custom FUSE filesystem, so it's not an ext4-specific question)?
According to https://source.android.com/security/encryption/full-disk, I would need to run class_stop late_start; class_stop main to halt all applications, mount on top of /data (I guess, any other location that should be hidden?), and restart with class_start late_start; class_start main. However, these commands do not exist, and don't seem to be sub-commands of init.
How would I do this stop-all-apps, mount-on-/data/, start-all-apps dance from an adb shell?
I have root access via adb, but no root access for apps. The bootloader is locked (needs to be for my banking app it seems), so I can't edit /etc/vold.fstab or any other file in /system or /vendor. I'm using /e/ os Android 10 (a fork of LineageOS).

You can't do that from adb shell. The init commands you mentioned aren't to be executed from commandline but need to be put in some .rc file: https://android.googlesource.com/platform/system/core/+/master/init/README.md#commands. They are already defined in .rc files by ROM developers and are executed automatically in proper sequence when you format your SD card as Adoptable (internal) Storage.

Not sure what you mean by "using a custom filesystem". I think you are looking for something like this: Decrypting microSD card on another Android device or desktop computer

even if you manage to edit something your device would brick. modifications prevented on locked bootloader. just use android native adoptable-storage and get a copy of /data/misc/vold/expand_*.key

@IrfanLatif "Adoptable" storage can be stopped and started while the phone is running, IIRC, so I assumed there was a way to trigger these stop / restart events. That link to your other answer is very interesting. If I understand well, you suggest to do the mounting in init.rc (dm-crypt + mount or mount + fscrypt or mount a FUSE filesystem). I can't edit this file: it's on boot.img, and something in the system refuses to lock the bootloader if it's modified (e.g. I flashing a magisk'ed boot.img and locking gives a "corrupted" message, and my bank's app won't run with unlocked boot)

@IrfanLatif examples of using a custom filesystem: Ext4, dm-crypt + Ext4, a FUSE filesystem which I wrote myself.

@alecxs I didn't know where the key was (saw somewhere that you had to dump it from RAM, that's much better!). This would work for Ext4 + dm-crypt, but wouldn't work if I wanted to use e.g. a FUSE filesystem which I wrote myself.

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


text:
Google Voice typing punctuation - how to have it?
I'm trying to use Google's voice typing, but it is not able to punctuate my sentences.
No matter I say "point", "dot" or "comma", it always writes it into my text.
Earlier I though this is only because I wanted to use the voice typing in other languages (not English). But now I'm trying to reach this functionality in English.
Is there any hidden tricks to enable the punctuation on Android 11 (Samsung)?
I found someone used the Swype keyboard which is obsolete now (since 2018). So really what are my options?

On Android 12 with a Google Pixel 6 and Gboard keyboard:

This works great for me.

I don't have the GBoard, only the standard "Google Voice Typing": https://imgur.com/FQOu8lt

No matter I say "point", "dot" or "comma", it always writes it into my text.

I'm using English (US) and for me the voice input for punctuation works fine. It also works for me in German.
I noticed that you did not have the word "period" -- (aka "full stop" for brits)
These work fine for me:

Period .
Comma ,
Colon :
Semicolon ;
Dash -

Check the language input settings, and try experimenting with different ways of pronouncing the punctuation.
This "faster / more accurate" setting might help as well:

PS: 99% of this answer was written with voice input.


text:
Use my Android phone as the camera and microphone for PowerPoint slide recording
For conference purpose, I have to record a PowerPoint presentation recording. (That is, I have to record a video of me explaining a PowerPoint presentation using the webcam and mic while playing the presentayion). The problem is that the inbuilt camera and microphone of my laptop are not that great. iS there any way to use my android phone as the source of the camera and mic input? I tried DroidCam and I could connect the camera to the laptop. But when I start recording, it is using the default inbuilt camera instead of my phone.
I'm using Samsung Galaxy S9 running on android 10.

FYI for alternate solutions: Can I turn my Android device into a webcam? However you don't explain how you record so the problem/limitations may be with that PC software.

If you don't manager to change the recording software to use DroidCam you can try to disable the inbuilt camera of your PC, e.g. if it is a Windows PC in the DeviceManager.

Sorry for the confusion there is an option inside the PowerPoint where you can select the source of audio and video. You can select droidcam there.


text:
My battery drop from 60% to 0%
So i have this problem with my original battery. When my battery drop below 60%, its immediately change into 0% and died 30 second after.
And when im charge it, the battery fills from 0 to 50% and then changed into 100%.
I have tried some battery calibrate, factory reset and even buying new battery twice and still didnt work.
So is there anything i can do?

replace usb connector

I believe this is not an Android issue, but the issue is with your device - more specifically, the battery. Have you tried switching it?


text:
Genymotion: Why is Android version 9.0 the highest I can use on an S10 emulator?
I'm trying to replicate an issue a customer is having on their Samsung Galaxy S10 running Android version 11. When I spin up an S10 emulator, the highest Android version I can use is 9. Does anyone know why this would be, and if there's a way to get higher versions?

Genymotion is a closed source commercial software. How should we know why an emulator image is available or not?

@Robert 1) If Genymotion came with only a default set of emulator images that were most common, and you could download others, and someone knew how, that would be an example of knowing why an emulator image is available or not. 2) My second question was how to do that, if possible.

Genymotion Cloud SaaS seems to have Galaxy S10 on Android 10 as a preview. However, we don't really know how Genymotion works with their images since Samsung doesn't provide their system images in the first place.

Your Genymotion seems to be outdated. When I select Samsung Galaxy S10 I can select Android 10 as the maximum. BTW: Such an the "Samsung Galaxy S10 Emulator" is just an AOSP emulator. Just the screen size and density seems to be identical to an original S10 (there not a single Samsung specific package installed).


text:
turn off phone services notification
A happy owner of a palm phone, though every time the phone is turned off then on or restarted, it shows a notification that a non-verizon sim is being used. I understand these were exclusively verison prior and there is not an unbranded firmware readily available for these, but would still like to ask about a way to remove this particular category from the phone services app.
When long pressing on the notification is shows as 'name_verizon_wireless_notification_channel' but the option to disable this category in the phone services notification settings is greyed out. I have removed much of the verizon bloatware by uninstalling the packages with abd shell. Is there a way to enable this toggle or otherwise remove it from phone services?

If you are running Android 8 or above you can try MacroDroid to clear that particular notification automatically. See my answer https://android.stackexchange.com/a/163569/96277


text:
Private DNS over HTTPS rather than over TLS
The private DNS feature on Android Pie and above doesn't give you the option to select DNS-over-HTTPS (DoH) rather than DNS-over-TLS (DoT). I often connect to a network that doesn't allow traffic on port 853 which is used by DoT. The only solution I found is an app from the Play Store (called Nebulo) that allows you to use DoH but works through a (fake) VPN. Is there a way I can use DoH without a VPN, and possibly without external apps?

If you are using Cloudflare there's also 1.1.1.1 Android app. It also uses VPN. The only other way is to run a DNS forwarder on phone but it requires root: How to run DNSCrypt as init.d script?


text:
Look at motion pictures without Google Photos
Google Camera can take "motion pictures", pictures in which a quick video is taken with the photo.
I'd like to be able to look at them from my phone without using Google Photos. How do I do so?

Related: How do I view google's motion photos on my windows PC?

Thanks for sharing the related question! I've edited it to remove the last part about how they're formatted, just so it's clear it's a different question


text:
True instant sync via Dropbox
I want to have my todo.txt file synchronized on PC and Android via a cloud service in both ways and instantly on change. Let's call this true instant sync. Unfortunately, I have not found a good solution yet and I don't understand why.
My setting: Markor to edit todo.txt on Android, todo-txt script to edit todo.txt on my Linux PC, official Dropbox client on both Android and PC.
In order to get true instant sync, I tried FolderSync and Autosync for Dropbox. However, I think that neither of these apps does what I want flawlessly and their precise function is not really documented. For example, Autosync for Dropbox has the options "autosync", "instant upload", "clever detection of changes" (available in the pro version) and one can also set synchronization in given time intervals, all independently of each other. What do these options do precisely? FolderSync seems to support synchronization in time intervals only, which is not what I want.
I imagine that a true instant sync solution should work as follows:

There is an interrupt whenever something is written in the shared folder .
The interrupt is associated to the sync client, which sends the information about changed files to the sync server immediately.
The sync client pings the sync server whenever its network address changes.
When another sync client uploads something to the sync server, the sync server broadcasts the information about changed files to all sync clients.
There is an interrupt whenever a packet from the sync server is received.
The interrupt is associated to the sync client which updates the local files immediately.

Questions:

How do 1--6 differ from the reality and what are the problems? Aren't the interrupts 1 and 5 already implemented on the system level?
Can I configure Autosync for Dropbox or FolderSync (+ Tasker) so that I get true instant sync which was defined above?
Do you know any other solution for true instant sync?

Thanks!

You need an viewer/editor app with built-in DropBox support. Every time you open the file the app will check the cloud if a new version is available and sync it.

If you are keeping notes/text and not processing the file on PC, just making sure that you are excluding pure cloud solutions like Google Doc or Microsoft 365 Word(?) as the near "instant update" is what I get with Google Doc [including a cursor of the person who is editing the file live on both Android device & PC browser].

AFAIK, true instant sync (as in first para of your question) , isn't possible using Dropbox, for reasons mentioned in answer here. If Dropbox itself doesn't permit, you can't force it through either apps you tried (I tried and have the pro version of both these apps).

My need was to have a real time sync across Android and PC (Linux and Windows). The only app I could find was from standard notes. The Android app on Play Store is marked beta but don't let that discourage you. It works perfectly well on Android, Linux and Windows for real time sync.

Only thing left is Dropbox sync - if you go in for pro version of standard notes, you can install an extension, that provides daily updates to Dropbox, and obviously isn't real time. But then your files are synced across platform in real time, so updation in Dropbox may not really matter, unless you have other reasons. I haven't tried this extension because I stopped using Dropbox.

As far as real time sync goes this ticks all the boxes except via Dropbox. You don't need to go in for extended (pro) version, if you decide to cut off Dropbox or use either of the apps you tried for periodic sync.


text:
What's the best way to move files from SD card without the risk of losing any files?
So I'm running out of space and I'd like to use link2sd to move my apps to sd card. But before that I need to create a partition on my SD card, and to do that I would have to move my files from it and keep them somewhere else temporarily, format/create a partion on the SD card, and then move the files back. I'm using a lot of apps with a lot of data that would obviously no longer be there if something happens to the files during the move.
I'm also using XinternalSD (though xposed) to automatically store some of the apps data directly on the SD card.
So basically alot of the files on the SD card aren't put there directly by me but rather through apps. I'm not sure what their write protection is and I don't want to risk losing some in the move.
I want to be able to move everything as is and move them back in a way that it would be exactly how it was before the move and nothing changes or apps not being able to detect some of the files or anything like that.
What's the best way to achieve this?
Android 7 | Rooted | Moto C Plus
Note: OS available: Ubuntu | Windows | Android

Comments are not for extended discussion; this conversation has been moved to chat.

For regular fuse/FAT file system type, there is no need to preserve file permissions, just copy all files as usual. You can check file system type by typing in mount  in the terminal emulator. You will see somthing like this example:
/mnt/media_rw/149B-8301 type vfat
/storage/149B-8301 type fuse

149B-8301 is the UUID of the SD card and it shows that the file system is vfat.
To copy files regularly, run the following:
adb pull -a /storage/149B-8301 ~

advanced copy (tarball archive)
adb exec-out "tar -c storage/149B-8301 | gzip" > ~/sdcard_backup.tar.gz

copy from PC MicroSD Card Reader
cd /media/xubuntu
tar -czf ~/sdcard_backup.tar.gz 149B-8301

Note: replace ~ with path to target disk drive providing enough free disk space on PC

three different methods. first two methods are for MicroSD Card inserted in phone (will take several hours)

Thank you very much. Obviously for the first 2 methods (on the phone) it means I need 20 GB free space in internal memory, correct?

no, it is streamed directly to PC


text:
How many years an app is downloadable in Google Play Store?
I wonder how many years an app is downloadable/distributed in Google Play Store after developer upload his/her app.

I don't think there is a strict limitation besides the validity date the self-signed app developer certificate is limited to (Google recommends to set a validity period of at least 25 years for newly created certificates).

Other than what Robert mentioned, I've had apps removed from the Play Store due to included legacy Advertising SDK being deprecated / considered using unsafe code OR the developer account not updating the listing for Content Rating.

There are 2 possible interpretations of this question: 1) the developer just uploaded the app once and not maintaining it anymore, or 2) they still continue providing updates to the app. The distinction is quite important due to Google renewing and enforcing their Google Play Policies, so old apps can just be removed from Play Store if they're not complying to the latest policies.


text:
USB camera not recognised
I wish to use a USB camera with a Samsung Tab S2 t813. I have the USB Camera Pro app installed, however when I plug in a camera, the app does not register the device. On two other Samsung phones with the same app running, there is no problem, the video is shown.
Is it likely to be a hardware fault, or is there some configuration that needs to be adjusted or a certain driver necessary?
The tablet is running Android 7.0 and kernel 3.10.84-14953299 dpi@SWDH7017 #1.
Thanks

On Android/Linux drivers are integral part of the kernel. If the USB webcam driver is missing on one device you can't install the driver, instead you would have to rebuild a matching kernel and enable the usb drivers(s) and then replace the kernel (which is the first step to a custom ROM).

I've compiled Linux kernels before but have no clue about android. Can you please suggest places where i can find information? Is it unusual for Samsung to omit webcam drivers in their kernels? The two phones that I've tested have both been Samsung - one is a Galaxy J8

Doe USB OTG works at all on the device where the webcam is not recognized? You can test it by connecting a simple USB mouse or keyboard. And there are also OTG checker apps in Play Store.

Thanks. USB OTG Checker reports that it the tablet has "Android Compatible USB OTG" . Under "List of connected devices" however, it reports no device found" when I attach a mouse or camera

I tested the mouse with Word. I works on my J8 phone, but not on the tablet unfortunately

The app "USB Diagnostics" fails to recognise the USB camera on the tablet but recognises it on the J8. The mouse is not recognised on either

Keyboard also doesn't work. I think my tablet is faulty. I will return it.


text:
Bad screen resolution permanently crashes Poco F1
In short: I used SecondScreen app and changed the screen resolution to a bad one. The app autostarts and changes my resolution automatically. This causes a boot loop. What can I do?
In detail:
This is what I did on my non-rooted Poco F1:

installed Second Screen
I gave it the permissions it needed, using ADB via my PC, and other permissions it asked via UI .
I chose some big resolution.
I shut down the PC, before disconnecting the phone from PC.
The phone was stuck in the weird resolution, so I restarted it.
it is now in an infinite boot loop. :(

It starts booting normally, but than the screen resolution becomes bad (see the photo), and, before finishing the booting, it restarts again :(
At last, the recovery menu is reached and it gives me 3 options.

Reboot (this is the restarting loop that brings me back to the same menu)
Access via MI PC Suite: I cannot access the device this way; the device is not detected. It never sees the device, except in Fastboot it says: "Try connect in normal mode first then switch", but I cannot enter "normal" mode.
Wipe the data (if at all possible, I would prefer to avoid losing the data).

What I know:
Codename:       beryllium
Bootloader:     locked
Anti version:       1

I can get my phone into FASTBOOT and adb sideload modes, but unfortunately not in the "normal" adb mode. Can I uninstall the app somehow, stop it from autostart, undo its damage, or anything to fix the phone without losing the data?
A non boot-loop fix was done by typing:
From adb shell, type:
wm size reset
wm density reset

but I cannot find out how to do that from FASTBOOT or sideload....

For anyone who may be facing the same situation, check my answer here I had a similar problem and managed to restore the defaults without discharging the phone or relying on a brief window of opportunity

Comments are not for extended discussion; this conversation has been moved to chat.

I fixed it* by letting the phone bootloop until fully discharged. I then plugged the phone into the computer and turned the phone on as soon as it charged enough to allow me this. At that point there is a brief window where full ADB access is possible, but only because I did have USB debugging enabled after all, but the bootloop was too fast to allow full ADB access at any point.
I imagine the phone does a fuller/slower reset when discharged. At one point in the "good" bootloop it shows a nice, round, "loading" circle, and that is when I got ADB access. There is little time before "bad" bootloop is resumed.

This is what I kept entering in command line during the "loading" circle boot phase, until it finally indicated that I have the full ADB access by showing the alphanumeric ID of the phone and "device" after it:
adb devices

List of devices attached
    03464364da54  device

Uninstall the culprit app called SecondScreen, by first finding its proper name, and then uninstalling it via adb:
adb shell pm list packages | grep second

pm uninstall -k --user 0 nameOfTheAppReturnedByTheAboveCommand

This was not enough, and the phone entered the "bad" bootloop again, so I discharged it again and reset the screen size and density (DPI I believe):
adb shell wm size reset

adb shell wm density reset

It works like new now.


text:
How can be deleted the com.android.cts.priv.ctsshim?
I have been told this is a compatibility test suite, but it is safe to delete? if so, how can be deleted from the device?

It is a system app (see CTS shim package heading). Why do you want to delete it? Are you experiencing symptoms of a malware on your device? In my device I see that I can disable the app. Is that not enough?

If you don't get a Disable option or if you want to uninstall it see my answer. https://android.stackexchange.com/a/182123/96277 A system app is never truly uninstalled without root access. It would be reinstated once you factory reset the device.

@Firelord, Im trying to uninstall bloarware, and I dont know what is this.

Bloatware that does not get updates via Play Store and that is not running in background does no harm. If you disable it or delete it with root permissions you can do harm to your device. Therefore if you don't know something better don't touch it.


text:
Recording calls reliably using pre-installed hidden functionality (Samsung Galaxy)
While poking around the activities available for the pre-installed apps on an older non-rooted Samsung Galaxy Android 7.0 phone, I noticed one for recording phone calls.  It was located in package com.android.phone, and the activity is com.android.phone.RecordCallsAutomaticallyActivity.
I created a shortcut for the activity and launched it.  Sure enough, it brought up a screen with an option to enable automatically recording phone calls.  I turned on that option and made a call.  I didn't find any new files in storage/emulated/0.  I have a hunch it didn't record, but I don't know how to determine that for sure.
Without breaking this question up into a bunch of separate Android SE questions, I'll simply state my objective: I want to be able to reliably record phone calls.  Currently, I use an app to do that, but it has failed to record a few recent important calls, and that's a big problem.
So what I'm wondering is:

Did I look in the right place to see if the call was recorded?  If not, where do you advise looking?
Is there any chance of getting this hidden functionality to work (it is not present in the standard UI) without root?  If so, is there anything else you advise that I try doing?
Will rooting the device make any difference?

Which Android device is it? Is it carrier locked? OEMs may keep some functionality disabled regionwise to comply with local laws. Is call recording (without informing the other party) permitted in your country?

@Firelord It's a Samsung Galaxy S6.  How do I tell if it's carrier locked?  It was purchased new at retail without a contract or even activating it, if that matters.  I popped in a GSM SIM, and it worked without issue. Call recording is definitely legal here regardless if you tell the other person.  I personally choose to tell the other person because I want them to know there is a record of the call.


text:
Adb sideload flashing file type recovery or fastboot
I want to flash rom through Adb sideload I am confused with zip.file used in sideload. is it recovery file or fastboot file?
I am downloaded both from
https://xiaomifirmwareupdater.com/miui/lavender/stable/V11.0.9.0.PFGINXM/

adb is unrelated to fastboot, you can either run adb commands with usb-debugging enabled in boot mode, or adb sideload command in recovery mode. fastboot commands work with fastboot mode only (no adb commands accepted) and requires unlocked bootloader


text:
How to switch default home launcher at macrodroid
I use several home launcher apps.
At my school, i use system launcher.And at my home or any other cases,i use nova launcher.
And,ther are secret apps that i don't want to show my friend in nova home.
So,i want to swich default launchers automatically at a certain time.
I think i can use macrodroid.But I'don know how.
Are there any shortcut to swich  default launcher in app?
(it's not good idea to touch the app icon to swich to go to nova or another home)
(I don't  want to root if possible)--edited

If you have root access you can try the command mentioned here: https://android.stackexchange.com/a/220149/96277

Im worried about rooting.Please let me show if there is a way to solve it with other app without rooting.


text:
How to disable/block access to Portable Hotspot feature
My client asked me to configure Google Family Link (parental control) for his daughters phone/tablet/s, I did and everything worked great, but the little one is clever as a fox and found at age 9 a sorta bypass... She enables the portable hotspot to give internet to the laptop and even if the phone remains a brick till morning, the laptop is fully operational.
A few caveats, the phone/s are not rooted, and I might need to do the same with a tablet/s, also not rooted.
So far what I've found and tried is an AppLock app to lock the Settings option, but wondered if there was another more elegant solution, that didn't block all settings.
Cheers.

It would be best to take away the and tablet laptop at bedtime.  Some kids are crafty, and can bypass any parental-control software.  ❧  Failing that, you could lock down the laptop, and set up time and/or network restrictions.  What operating system is installed on the laptop?


text:
Record and play sound from Android to a computer - Jack disconnects periodically / Jack undetected - Depending on Android version
I would like to control audio IO of my android phone with a computer. I'm currently using a usb audio sound card with a input mic and line output ports connected to my computer. A phone is connected to an adapter jack 4 pins to 2 jack 3 pins (reference). The adapters mic input is connected to the sound card line output and the adapters line output is connected to the sound card mic input. Like this, I can theoretically record phones output with the computer and play a sound on phones input from the computer.
I have with me 3 phones devices, one android 10 (Redmi Note Pro 8) an other one is a android 9 (Samsung Galaxy A40), the last one is an android 4.0.3 (LG p700)
Everything works fine on the 4.0.3. The phone can detect the cable and I can record the phone output and play on the phone input.
But on the two others devices, it's not working.
On Android 9 : the phone can't detect the jack cable of the adapter, but when I plug earphones with mic (jack 4 pins), it's working. I think that isn't an hardware issue.
On  Android 10 : the phone can detect the cable but changes state every seconds (detected/undetected). That means it is switching between earphone output and speaker output which is impossible to record or play. Like android 9, i can plug earphones, and it's working.
I personally think this may be related to phone impedance that is checked by recent version of Android.
What should I do to record and play on audio IO of a phone from a computer?
It's possible to me to develop an app on android and create a program on the computer to initialize the connection. Stereo recording isn't the objective here, mono will be enough.
(I cannot use in my case other protocol like USB or Bluetooth to record and play on phones)
EDIT 1 : Concerning OMTP/CTIA standards
To know the standard used by each device, I did this experimentation. On my previous setup, I’m able to find that it is a CTIA standard (found with an ohm-meter, mic and output line are separated). I know then my Android 4.0.3 is working with a CTIA standard.
I have with me wires, a sound card (reference), and jack 4 pin to wires adapters (reference) (the adapters are respecting OMTP standard but we don't care because we are using 2 of them)
Firstly, I created a normal DIY setup
This setup works fine for the Android 4.0.3. Then i guess my sound card is a CTIA standard. But unbelievably, it works fine with Android 9, and don't work with Android 10.
Now, I know that my sound card, Android 4 and Android 9 are all CTIA standard
Secondly, I decided to create a crossover cable setup. Like this, I will force an OMTP standard with a CTIA sound card.

As expected, this setup do not work on Android 4 and Android 9. But on Android 10, an headset without mic is detected. But I'm unable to listen/play a sound on the device. When I'm switching cable side on Android 10, the headset is periodically connecting/disconnecting like with the first setup (before edit).
To conclude, I guess that my issue isn't related to OMTP/CTIA but to the protocol used by devices to find plugged headset. With the Android 4, the jack port contains a little switch to know when a cable is plugged. On the others devices, this switch is present but do not have a direct impact on the detection of a headset. I guess the switch are used to launch a program that could detect the type of the audio device plugged (headset with mic, headset without mic...)

measure electrical resistance most likely that is decreased on splitting

Topic that could be related : https://www.reddit.com/r/Xiaomi/comments/e9lal1/headphone_jack_doesnt_work_on_xiaomi_redmi_note_8/

Ok, after many attempts, I have found where the problem lies.
TRRS is respecting a standard of electrical impedance.

This standard isn't respected by sounds cards, impedances were highly different.
I tried to simulate an headset only by using resistors.

This jack is detected as headset on all my devices (Android 4.0.3, Android 9 and Android 10).
I found that the impedances are used here to find the type of headphones (TRRS or TRS), when the type is unknown, each phone acts differently. In old version, the audio port is enabled. In newer version, it's disabled.
Another info : depending of the usb connection of the phone and the sound card, noise could appear in the signal. This noise can be high enough to avoid its use.
To conclude :
In my case, I'm unable to create an electronical component that would take out the signal and send it to a jack. I created a solution that could record the signal from Bluetooth.


text:
What does a status bar icon that looks like a SIM card with a little house inside it mean?
I have Samsung Galaxy J1 Mini on Android 5.1.1 Lollipop. There is a status bar icon between the Wi-Fi and the signal icon that looks like a SIM card with a little house on it.

What does this icon?

Ah! Another case of companies putting icons on our screens without telling us what they mean.  And once again, it's Samsung doing it.  Bad Samsung, bad.


text:
Compromised phone
I have a stalker who has managed to intercept texts and maybe calls. I have changed phones, providers, and phone numbers and they always get in. I also believe my locations are being tracked. So my question...if I buy a 2nd phone with different phone number, leave the compromised phone at home and forward calls and texts to the new phone would my movements, calls and texts still be able to be intercepted. After all this harassment I would like to try something  else before I do a factory reset, since nothing else has worked...and law enforcement cant help...I've tried.

If "they always get in" you are making something wrong. Sell the old phone and get a new one. A skilled hacker can compromise a phone so that a factory reset does not delete everything. Make sure your Google account and the linked external email account (if the Google account is linked to one) have a secure password that is only used for this account (do not reuse passwords). I would recommend to change the Google account to 2-factor authentication and buy a FIDO hardware token like the one from Google. Set a at least 6 digit PIN in Android.

I very changed phones, numbers and service providers, and change passwords frequently and use step authentication when available

May be the attacker is just good in social engineering. You can do a lot harm by just calling the service hotline and pretend to be someone else or send letters with forged signatures.

sounds like your stalker is working for NSA. police can't help, are you a criminal? Did you change provider, phone number and phone at same time? seriously someone must have physical access to your phone. or you are using the wrong apps (like whatsapp, instagram, etc)

The stalker is criminal..I dont know who the individual is but they are affiliated with one of the motorcycle groups that has a grudge with me...and no I am not a criminal....these groups are very good at harassment...and law enforcement doest have the knowledge nor equipment to track it down...pretty much told me unless I know specifically know who it is they cant help...yes changed them all at same time. Even used fact name and address on one. But I was hoping doing the call forward thing might give me a clue as to if it's someone who is close.

afaik traffic is encrypted, makes it very hard to attack nowadays (but not impossible) https://security.stackexchange.com/q/157970

tracking car is easy with magnetic gps tracker placed somewhere hidden. listen you one phone call is probably easier with some hidden microphone placed nearby, instead of attacking (unknown/randomly changed) phones itself

Well just to tell you the level of this...I did find a GPS tracker hidden in the engine compartment, attached to my battery...I am not positive the calls are being monitored...but texts for sure

I dont use WhatsApp,  I  use a app that blocks unknown numbers and texts.

The degree to which you are being stalked is exceptional.  The attacker's apparent success in targeting you can only be possible because they are not dependent on the things you have changed.  They must have another angle you haven't discovered yet.  Perhaps someone with physical access to your phone/home, hidden cameras, etc.  Finding the GPS tracker indicates to me that this attacker is not fantasy, and means you must put a convincing end to this for your sanity.
You didn't mention changing your google account or how/if you restored data/apps from your old phone to the new one.  The latter being important if the attacker has ever had physical access to your phone.
Anyone accessing your google account would result in email notification messages that you would probably have noticed.  But if there was ever a malicious app installed it might have been auto-migrated to the new phone.
If you do get a second "secure" phone be sure to start a unique google account with it - and keep it disassociated with your old phone.
You must still find the security leak.  Start with locking down your home with video monitoring-using blink or equivalent.  Use a camera to monitor your home-safe-space for uninvited visitors when you are away.  Don't forget that the attacker may be someone you know and do not suspect.
Take the GPS tracker and put it somewhere where you can focus a camera on it.  Sooner or later your will try to retrieve it.
There will be a reason that motivates the attacker.  Only you may know what that might be, but use that as bait to predict their next move.

Too late on the tracker, I went to police and shortly after I found the tracker, but  unit was cut and wires connected  to battery we all that was left.. leaving compromised phone home while using another was my idea to see if I get any kind of response knowing me or the phone havnt moved. When I get contacted it always with a spoofed number, but I would still know if there is a reaction. No emails on the Google account  but when I've changed phones I've connected to existing  Google acct to retrieve contacts.


text:
Magisk manager not detecting magisk installation
Device: itel A11, Android 6
Before the installation of  magisk v22, my magisk installation was working fine, so I updated the magisk through direct installation and rebooted my phone but magisk manager wasn't detecting magisk.
I tried flashing magisk on my boot image and flashed the patched image with fastboot and spd flash tool but magisk manager  wasn't still detecting magisk.
I updated to the latest canary version and tried the same thing but to no avail, so I tried flashing my stock ROM but replaced my boot image with the patched boot image still nothing.
Today I came across this thread Magisk issue :Device rooted but Magisk not installed that shows exactly the problem I have and he solved the problem by uninstalling the repackaged magisk manager, but now my problem is I flashed my phone and I doubt if the repackaged magisk manager will still be in the phone but why is magisk manager not still detecting magisk

This happened to me. Here is what I did. I uninstalled Magisk Manager app. Downloaded latest Magisk apk from GitHub. Renamed its extension to ZIP. Went into recovery and flashed that zip. Rebooted and Magisk Manager was installed and was working fine.

@Firelord signature verification failed and I can't use custom recovery because they don't support my device

Unhiding of Magisk manager is essential. Please do post your fix afterwards- for now , I am deleting my answer(not relevant)

@beeshyams, I can't un-hide magisk manager since I flashed my device with my stock ROM, except the app remains even after the phone being flashed

Very unusual. I would suggest make a backup of data, wipe data, flash stock ROM and patch boot image for root


text:
SMB/CIFS URL not working in Android browser. How to open SMB shared files and folders in Android browser
I'm sharing some folders and files from windows in my LAN. I can access the files using ES-explorer and X-plorer apps. What I want is to open the folder in browser using URL. All laptop browsers can open the folder. The URL is like (file://sarath-69/e/), but android browsers cant open. I tried this way too (file:///sarath-69/e/) and I tried replacing file to smb, like (smb://sarath-69/e/), (smb://192.168.0.111/e/), (smb://null:@192.168.0.111/e/), (\sarath-69\e). Nothing works. Please help to resolve it. Thanks in advance.

As far as I know none of the common web browsers include support for SMB/CIFS (on any platform). Even the FTP protocol is removed from more and more browsers. If you want to access files from a server run an HTTP(S) server on that server for providing the files. Or use an app that contains an Samba-client to copy files to your Android phone.

@Robert I checked with 2 browsers, EDGE and Chrome. Both are working. I can access file:// url in laptop browsers. But not working in android.

I was talking about SMB access. If you use file:// protocol then resolution of the path is forwarded to the OS, but Android has no built-in SMB support. Additionally file:// protocol  is disabled on Android web browsers for security reasons.

@Robert Is't it possible then? To open in android browsers? Or any other alternative way to open in browser? I mean like disabling the security.


text:
Is there a way to log all access to the phone include a photo
Is there a way to setup an android phone so that it logs all access and takes a photo each time it's accessed?

By access, do you mean "attempts to unlock the screen"? If yes, there are already apps for your use case. E.g. https://play.google.com/store/search?q=anti%20theft%20catcher&c=apps&hl=en_US&gl=US

Not just attempts each time it's unlocked. The phone may be accessed with a correct password by multiple people


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:
OS Version relation between android and lineage OS
I have currently Android 6.0 Device but app which I am trying to install only supports Android 7.0+.
I am thinking of installing lineage OS.
Is there Lineage OS 7.0 etc. equivalent of Android 7.0, so that app can be installed or I need to stay with android.

@alecxs, this answers where I can find custom ROMs. I want to know what is relation between them. Means compatibility of apps. How their version relate. If app requires Android 7+ in play store, what it means for lineage os.

Does this answer your question? Where to get old LineageOS ROMs?

14 = android 7 (increase +1)

Ya that's what I was looking for, Thanks

https://www.wikipedia.org/wiki/LineageOS#Version_history


text:
My google account is disabled
My google account is disabled. My mobile is working fine. I add another google account. Can I get all my apps to that account.

Are you talking about paid or free apps?

All apps. Mainly free apps.

Only paid apps are bound to an Google account. You can just remove the old account. The apps will stay.


text:
Impossible to set a new SD card as adoptable after successfully using the first card as adoptable
I have successfully expanded the internal storage of the phone with an sd card using the "sm partition DISK mixed" command in adb:
mido:/ $ sm list-disks
disk:179,96

mido:/ $ sm partition disk:179,96 mixed 50
mido:/ $ sm list-volumes
private:179,99 mounted 0e05b528-c814-4078-b7ef-1a0f95260531
private mounted null
public:179,97 mounted F227-1806
emulated mounted null
emulated:179,99 unmounted null

My phone is Xiaomi Redmi Note 4x MIUI Global 11.0.2 (android 7.0). Sd card used: Kingston 8GB MicroSDHC class 4.
I successfully used this mode for a while (transferred applications to sd) until I saw that class 4 memory cards are really very slow and bought a new class 10 memory card: Smartbuy microSDHC 64gb class 10.
And here, unfortunately, it was not possible to expand the internal memory with the new SD. Before using new SD card I undo adoptable storage on the 1st SD-card: "sm partition disk:xxxxx public" and also formated it using “Settings” -> “Storage” -> “SD card” -> ”ERASE SD-card". As I saw after these steps, the phone stopped distinguishing the SD card as adoptable.
Then I inserted the second SD card into the phone and started converting it into adoptable:
mido:/ $ sm list-disks
disk:179,64

mido:/ $ sm partition disk:179,64 mixed 75

mido:/ $ sm list-volumes
private:179,67 unmountable null
private mounted null
public:179,65 mounted C1B0-1F00
emulated mounted null

We see that private volume is not set, unlike it was on the 1st card. Moving applications to the sd card does not work (the "change storage" button disappeared in the interface)
I tried to
mido:/ $ sm format private:179,67
mido:/ $ sm mount private:179,67
Error: java.lang.IllegalStateException: command '328 volume mount private:179,67 0 -1' failed with '400 328 Command failed'

The "set-force-adoptable: setting also failed, but the error code changed:
mido:/ $ sm set-force-adoptable true
mido:/ $ sm mount private:179,67
Error: java.lang.IllegalStateException: command '336 volume mount private:179,67 0 -1' failed with '400 336 Command failed'

How can it be that this procedure worked with one memory card, but did not work with another? Perhaps the phone still thinks that it works with the first SD card as adoptable, but how can I reverse this?
Thank you very much in advance for your help!

@alecxs I don't know where to begin to understand how to solve it and what exactly mean "unmountable null", google just returns loads of different similar but not exact problems. Please help. I tried to sm partition disk:179,64 private, but result is the same (there is one unmountable null volume). sm partition disk:179,64 private worked without errors

no clue. is it still working with old MicroSD Card?

@alecxs Yes, it is still sucessfully working with old microSD card but doen't want to work with 2 new cards.

just for testing purposes clone working card to new one


text:
Vanced Youtube & Native Youtube App crashes after ArrowOS update on a6020a46
I have a rooted Lenovo Vibe K5 Plus running TWRP+Magisk+OpenGApps+ArrowOS(android v10).No MicroG.
I installed Vanced Manager and Youtube Vanced in it(sometime after the February update) and it was working perfectly. I had given Vanced Manager superuser permission.
Recently there was an update with 5 March 2021 security patch which I applied yesterday, since then Vanced seems to have completely broken while everthing else runs fine.
Things I have tried -

Uninstalling Youtube Vanced from Vanced Manager, uninstalling Vanced Manager then re-downloading Vanced Manager from their GitHub releases page and reinstalling Youtube Vanced with SuperUser permission granted to Vanced Manager.

Re-Installing ArrowOs update from TWRP install and then wiping Cache/Dalvik. Trying same thing again but without wipping Cache/Dalvik.

Booting to TWRP and selecting Wipe > Advanced Wipe > selecting only Cache

I open the App, click on a video and Youtube crashes.
Here is the log -
time: 1615626523312
msg: Native crash: Segmentation fault
stacktrace: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Lenovo/A6020a46/A6020a46:5.1.1/LMY47V/A6020a46_S105_161124_ROW:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2021-03-13 14:38:41+0530
pid: 9210, tid: 9233, name: yt-critical3-1  >>> com.google.android.youtube <<<
uid: 10181
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
    x0  0000000000000000  x1  00000077a4f6bcd8  x2  0000000000000038  x3  0000000000000004
    x4  0000000000000000  x5  000000780fb67c37  x6  0000000000000000  x7  0000000000000036
    x8  00000077a4f6bcd8  x9  81d816781534a741  x10 0000000000000000  x11 0000000000000003
    x12 000000773bb0e000  x13 0000000000000040  x14 fffffffffc000000  x15 0086401000000008
    x16 00000078940a5890  x17 0000007894098130  x18 00000077a1a98000  x19 000000773bb0e0c0
    x20 000000773bb0e0c0  x21 000000773bb0e0e8  x22 000000773bb0e0e0  x23 0000000000000000
    x24 0000000077450758  x25 0000000077450218  x26 0000000077450748  x27 000000007708ffe0
    x28 000000773bb0e0c8  x29 00000077a4f6bcc0
    sp  00000077a4f6bbf0  lr  00000077f9c030ec  pc  00000077f9c031f8

backtrace:
      #00 pc 00000000000401f8  /system/lib64/libmedia_jni.so (JavaMediaCodecListWrapper::JavaMediaCodecListWrapper(android::sp<android::IMediaCodecList>)+128) (BuildId: 5048733c629f4c47102dc6d3e92b512f)
      #01 pc 00000000000400e8  /system/lib64/libmedia_jni.so (getCodecList(_JNIEnv*)+152) (BuildId: 5048733c629f4c47102dc6d3e92b512f)
      #02 pc 000000000003f4ec  /system/lib64/libmedia_jni.so (android_media_MediaCodecList_getCodecCount(_JNIEnv*, _jobject*)+8) (BuildId: 5048733c629f4c47102dc6d3e92b512f)
      #03 pc 00000000002818c0  /system/framework/arm64/boot-framework.oat (BuildId: ba17fdaa4953a5a20b9a87065f5c2176fd5803b1)

I got it when a notif like "Youtube keeps stopping" showed up and there was an option called 'Copy crash log URL'(del.dog/futhypock). Going to the URL on my phone showed this output.However typing it in my pc yielded nothing.
The strangest thing is that uninstalling youtube vanced and then installing the official youtube app from the play store yields the exact same behaviour.
Here is the log (del.dog/anothyfutt)-
time: 1615627396186
msg: Native crash: Segmentation fault
stacktrace: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Lenovo/A6020a46/A6020a46:5.1.1/LMY47V/A6020a46_S105_161124_ROW:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2021-03-13 14:53:15+0530
pid: 11931, tid: 11964, name: yt-critical2-5  >>> com.google.android.youtube <<<
uid: 10182
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
    x0  0000000000000000  x1  000000779f0a2438  x2  0000000000000038  x3  0000000000000004
    x4  0000000000000000  x5  000000780fb67c37  x6  0000000000000000  x7  0000000000000036
    x8  000000779f0a2438  x9  81d816781534a741  x10 0000000000000000  x11 0000000000000032
    x12 0000007738a00000  x13 0000000000000040  x14 fffffffffc000000  x15 a04c000000000000
    x16 00000078940a5890  x17 0000007894098130  x18 000000779e26c000  x19 0000007738a00c80
    x20 0000007738a00c80  x21 0000007738a00ca8  x22 0000007738a00ca0  x23 0000000000000000
    x24 0000000000000008  x25 000000779f0a6020  x26 00000077fdd1c0b0  x27 0000000000000002
    x28 0000007738a00c88  x29 000000779f0a2420
    sp  000000779f0a2350  lr  00000077f9c030ec  pc  00000077f9c031f8

backtrace:
      #00 pc 00000000000401f8  /system/lib64/libmedia_jni.so (JavaMediaCodecListWrapper::JavaMediaCodecListWrapper(android::sp<android::IMediaCodecList>)+128) (BuildId: 5048733c629f4c47102dc6d3e92b512f)
      #01 pc 00000000000400e8  /system/lib64/libmedia_jni.so (getCodecList(_JNIEnv*)+152) (BuildId: 5048733c629f4c47102dc6d3e92b512f)
      #02 pc 000000000003f4ec  /system/lib64/libmedia_jni.so (android_media_MediaCodecList_getCodecCount(_JNIEnv*, _jobject*)+8) (BuildId: 5048733c629f4c47102dc6d3e92b512f)
      #03 pc 00000000002818c0  /system/framework/arm64/boot-framework.oat (BuildId: ba17fdaa4953a5a20b9a87065f5c2176fd5803b1)

I couldn't make head or tail of what this log means. I tried searching for "msg: Native crash: Segmentation fault" and found this but I couldn't understand that either and the links they provided are Greek and Latin to me. I also found this but again understood nothing.
How do I get Youtube Vanced to work again? Please help a newbie here who really loves Youtube Vanced. I will be happy to provide any further logs should you require them, but I don't know how to collect logs and would appreciate it greatly if you could point me in the right direction.

Based on your description something is wrong with the customROM you have installed. Those crash reports can only be sent to the ROM developer(s), may be they are helpful to them. Regular users typically don't understand a word of such a report.

@Robert could you point me in the right direction? An email id of the maintainer of a6020a46 perhaps where I can describe my issue? Or should I just open an issue on the GitHub page of ArrowOS?

Sorry I am not familiar with that custom ROM. But "a6020a46" sounds more like a git commit hash (thus it is simply a version identifier) than a developer.

a6020a46 is the model/code name of my phone Lenovo Vibe K5 Plus

Should I just forget resolving this issue and format everything and reinstall my OS? I'm also having strange problems with accessing stuff in my storage. eg: downloaded files are getting corrupted and I am unable to delete files in my Downloads directory with my file manager(the default aosp one). Perhaps there are some permission issues?

I get this error when trying to install the ROM, it's the only error I get. "failed to mount /dev/block/bootdevice/by-name/system at /system: Device or resource busy." The way I've done it is just select Install from TWRP and point to the ZIP of the custom ROM. Is this incorrect in any way? Could you tell me how I can do update my system correctly?


text:
Settings won't open because of Samsung Experience Service after Software Update
I updated my android today and now the settings app won't open. I can access all settings through the search function of the launcher except Samsung specific ones.
I connected the phone to my pc to see the logs and here is the stack trace from logcat:
FATAL EXCEPTION: main
Process: com.android.settings, PID: 17254
java.lang.RuntimeException: Failed to call observer method
at androidx.lifecycle.ClassesInfoCache$MethodReference.invokeCallback(ClassesInfoCache.java:226)
at androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeMethodsForEvent(ClassesInfoCache.java:194)
at androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeCallbacks(ClassesInfoCache.java:186)
at androidx.lifecycle.ReflectiveGenericLifecycleObserver.onStateChanged(ReflectiveGenericLifecycleObserver.java:37)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:361)
at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:300)
at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:339)
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:145)
at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:131)
at com.android.settingslib.core.lifecycle.ObservablePreferenceFragment.onStart(ObservablePreferenceFragment.java:80)
at com.android.settings.dashboard.DashboardFragment.onStart(DashboardFragment.java:266)
at com.android.settings.homepage.TopLevelSettings.onStart(TopLevelSettings.java:192)
at androidx.fragment.app.Fragment.performStart(Fragment.java:2756)
at androidx.fragment.app.FragmentStateManager.start(FragmentStateManager.java:355)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1192)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1354)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1432)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1495)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2620)
at androidx.fragment.app.FragmentManager.dispatchStart(FragmentManager.java:2578)
at androidx.fragment.app.FragmentController.dispatchStart(FragmentController.java:258)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:550)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:201)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435)
at android.app.Activity.performStart(Activity.java:8207)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3806)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2295)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

Caused by: java.lang.SecurityException:
Failed to find provider com.samsung.android.mobileservice.profileProvider for user 0; expected to find a valid ContentProvider for this authority
at android.os.Parcel.createExceptionOrNull(Parcel.java:2385)
at android.os.Parcel.createException(Parcel.java:2369)
at android.os.Parcel.readException(Parcel.java:2352)
at android.os.Parcel.readException(Parcel.java:2294)
at android.content.IContentService$Stub$Proxy.registerContentObserver(IContentService.java:1229)
at android.content.ContentResolver.registerContentObserver(ContentResolver.java:2630)
at android.content.ContentResolver.registerContentObserver(ContentResolver.java:2618)
at com.samsung.android.settings.homepage.TopLevelSamsungAccountPreferenceController.onStart(TopLevelSamsungAccountPreferenceController.java:95)
at com.android.settingslib.core.lifecycle.Lifecycle.onStart(Lifecycle.java:124)
at com.android.settingslib.core.lifecycle.Lifecycle.access$100(Lifecycle.java:55)
at com.android.settingslib.core.lifecycle.Lifecycle$LifecycleProxy.onLifecycleEvent(Lifecycle.java:222)
at java.lang.reflect.Method.invoke(Native Method)
at androidx.lifecycle.ClassesInfoCache$MethodReference.invokeCallback(ClassesInfoCache.java:222)
... 36 more

Caused by: android.os.RemoteException: Remote stack zrace:
at com.android.server.content.ContentService.registerContentObserver(ContentService.java:388)
at android.content.IContentService$Stub.onTransact(IContentService.java:482)
at android.os.Binder.execTransactInternal(Binder.java:1190)
at android.os.Binder.execTransact(Binder.java:1159)

So the relevant part seems to be:
Caused by: java.lang.SecurityException:
Failed to find provider com.samsung.android.mobileservice.profileProvider for user 0; expected to find a valid ContentProvider for this authority

What I've tried so far:

Restart the phone
Restart the phone in safe mode
Reinstall Samsung Experience Service
Reinstall com.android.settings
Reinstall com.samsung.android.mobileservice

I think because there are Samsung related settings in the settings main menu, it causes a crash. Any ideas on how to get the settings back?
PS: Please don't suggest a factory reset. That is cause for another headache.
PPS: Previously, I had uninstalled Samsung bloatware via "adb shell". But that had never caused problems. So maybe now one missing package could be the culprit?

Unfortunately, I caved in and did a factory reset. I made sure not to delete "com.samsung.android.mobileservice" when cleaning the bloatware (of which there is a ton).

It's caused by uninstalling com.osp.app.signin. If you simply uninstalled the package for --user 0 (which most debloating scripts do), then you can reinstall it with
adb shell cmd package install-existing com.osp.app.signin

Thanks for the suggestion. In my case, the answer is too late to the party. But let's hope it helps others, or maybe me when I get a new phone in the future. :)

YES - thank you!!! (I had gone down the same path of uninstalling some bloat for samsung and must have accidentally uninstalled this one; didn't notice until ages later when I tried to open the settings app and of course could not remember which of the uninstalled apps was the issue)


text:
Change MAC Address on Android 10
I am running a Nokia 8.1 with Android 10. Now, I'd really like to change my MAC Address, though no shell commands I've found work for me. Now, I would use the randomised Mac Feature, that only gives me one random Mac per network though, which is apparently not changeable.
Now, for several reasons, I'm really not into rooting my personal main phone, so is there any way I can change my Mac without root access?
If it was needed, I'd even consider a system reset.
Thanks.

If you want to change your tablet MAC this awnser wont help you, but if you want to keep changing your random MAC you can look here https://android.stackexchange.com/questions/225839/android-10-and-11-get-new-random-mac-for-same-ssid-without-factory-reset


text:
How can I "Show all notification content" for one app, but "Hide sensitive content" for all others?
I'm using a timer app, Multi Timer Free, but it doesn't show the time remaining on the lock screen. Meanwhile, Google's Clock app does. I want to set it to Show all notification content, but when I have Hide sensitive content turned on system-wide (which is always), Show all isn't available. Is there no way to make an exception to the rule?
I considered turning on Show all notification content system-wide, but then I'd have to select Hide sensitive content for a ton of other apps, which is a hassle.
This answer indicates that notification sensitivity is set by the dev, so I checked the Multi Timer Free settings (as well as the system notification settings) for anything that could designate the notifications as "public", but didn't see anything.
I'm using Android 9 on a Moto G6. If it's relevant, it's due for an upgrade to Android 10, I just haven't gotten around to re-locking the bootloader yet.
To be verbose, the particular notification class I'm looking at is Running Timer Notification.

Please when talking about a specific app include the link the Google Play Store in the question (or include the app package name) as apps often have different names in different countries and there are often more than one app with the same partial name. Have you contacted the author of the timer app you use? May be this can be better solved in the code of the timer app.

@Robert Added link, thanks! That's a good point, yeah, I should contact the dev!

When you open the app page not in Play Store app but in web browser near the end is a contact link of the developer.


text:
Display two clocks in two different time zones in the notification bar
How can I display two clocks in two different time zones in the notification bar? By default, only one time is displayed at the top left of the screen.

You can achieve this using tasker Play Store Link and a plugin called Text Inject Xposed Repo Link you will need to be rooted and have Xposed installed.
Instructions:

Setup a profile in Tasker that runs every 2 minutes. (Smallest interval)
Set the task to Parse Format Date/Time
Input should be Now.
Output should be h:mm a z
Formatted Variable Name set to whatever you want. Ex. %TimeOffset
Offset should be set to Hours and set the amount of hours needed.
Set a task to set TextInject Variable to the variable setup in previous task. Ex. TimeOffset = %TimeOffset
In TextInject set statusbar time to #TimeOffset and parse as time
Done

I found a better solution, but leaving my original answer in case someone wants to format the statusbar differently.
Using Xposed as well as before. There is a Module called xDualStatusClock which makes it very simple to just choose the timezone and it works.
XDualStatusclock - http://repo.xposed.info/module/com.jukka666.xdualstatusclock

Thanks for the update!


text:
How to make sparse image file from original firmware?
I accidently erased /system partition and now have my Gionee S10C phone bricked.
I downloaded original firmware, but I can see series of system image files.(This firmware is to be used by Qualcomm Flash Image Loader)
system_1.img, system_2.img, ..., system_53.img

When I'm trying to install the original firmware using QFIL by putting the phone in EDL mode, I get sahara fail error. (Same error in here and I tried most of the fixes I can find, but nothing works)
Now, is there any way to use the above 53 system images to restore my phone using fastboot flash command?
I'm sure only system partition is needed to be restored to get my phone working again, because I haven't modified any other partitions.

concatenate files with dd seek=$offset from xml and then sparse with img2simg
rawprogram0.xml contains
- partition name:    filename="system.img"
- partition size:    num_partition_sectors="8388608"
- partition offset:  start_sector="1312768"

rawprogram_unsparse.xml contains system_1.img - system_53.img
- file name:         filename="system_1.img"
- file size:         num_partition_sectors="262160"
- file offset:       start_sector="1312768"

Note: we don't want the offset so we will subtract from start_sector
1312768 - 1312768 = 0
- file name:         filename="system_1.img"
- file size:         num_partition_sectors="262160"
- file offset:       start_sector="0"

1576968 - 1312768 = 264200
- file name:         filename="system_2.img"
- file size:         num_partition_sectors="16"
- file offset:       start_sector="264200"

1581024 - 1312768 = 268256
- file name:         filename="system_3.img"
- file size:         num_partition_sectors="256048"
- file offset:       start_sector="268256"

Now use the dd seek parameter to paste junks into proper offsets
(sparse is filled with zeros)
bs=$SECTOR_SIZE_IN_BYTES
seek=$start_sector
count=$num_partition_sectors
dd if=system_1.img count=262160 seek=0       bs=512 of=system_ext4.img
dd if=system_2.img count=16     seek=264200  bs=512 of=system_ext4.img
dd if=system_3.img count=256048 seek=268256  bs=512 of=system_ext4.img
...
dd if=/dev/zero    count=0      seek=8388608 bs=512 of=system_ext4.img

the result is mountable ext4 partition image
mkdir system
sudo mount -t ext4 -o loop system_ext4.img system
ls system

finally this file can be sparsed with img2simg
sudo apt install -y f2fs-tools android-tools-fsutils android-sdk-platform-tools-common
img2simg system_ext4.img system.img

GNU bash script with sed
#/bin/bash

shopt -s extglob

bs=512
label=system
input=rawprogram0.xml
output=rawprogram_unsparse.xml

source <(sed -nr "s,.*\s(filename=.${label}\.img.)\s.*\s(num_partition_sectors=.[0-9]+.)\s.*\s(start_sector=.[0-9]+.).*,\1; \2; \3;,p" "$input" | head -n1)

out=$filename
off=${start_sector:-0}
end=${num_partition_sectors:-0}

printf '%s\n' "${label}"_+([0-9]).img | cut -d. -f1 | sort -t_ -k2n | xargs -n1 -I_ echo _.img | \
while read -r file
  do
    source <(sed -nr "s,.*\s(filename=.${file}.)\s.*\s(num_partition_sectors=.[0-9]+.)\s.*\s(start_sector=.[0-9]+.).*,\1; \2; \3;,p" "$output" | head -n1)
    dd if="$filename" of="$out" bs=${bs:-512} count=${num_partition_sectors:-0} seek=$((start_sector-off)) status=none || exit 1
    echo "filename=$filename num_partition_sectors=$num_partition_sectors start_sector=$((start_sector-off))"
done

dd if=/dev/zero of="$out" bs=${bs:-512} count=0 seek=$end status=none || exit 1
echo "filename=$out num_partition_sectors=$end start_sector=$off"

file "$out"
e2fsck -n "$out" | grep clean || exit 1
mv "$out" "${out%.*}.raw"
img2simg "${out%.*}.raw" "$out" || exit 1
file "$out"
echo "Done."

exit 0


text:
How do I keep a messaging app in the foreground so that my status is always online even though I'm not using the app?
Let's say I'm using the messaging app and then switch over to another app, the messaging app will show that I'm not online, until I switch back to it bringing it to the foreground. I want my phone to always think that it is on the foreground so that I always show that I'm online. How can I achieve this?
Android 7 | Rooted

Not possible. You need to build a messaging app of your own (or hack the existing one) which runs a foreground service and fakes your online status.

What app can do that?

Sorry I'm not aware of. Normally the behavior you want doesn't make much sense. So I don't think any official messaging app/service would let you do that. That's why I said you need to build your own app provided that it's possible at all to integrate it with the backend messaging service.

What device model and manufacturer do you use? How the device handles apps in background is very different due to manufacturer implemented battery saving features. See also https://dontkillmyapp.com


text:
Does turning off cpu cores will actually save power?
My phone is using custom kernel that has cpu hotplug in it. The hotplug name is AutoSMP and it has max cpu (big & little) core that should be online option in it. Currently I'm using 3 + 3 core configuration instead 4 + 4 core. Does it has impact on power consumption?
Note: big core is oc'ed to 1.79 ghz, stock is 1.58 ghz and little core I underclocked it to 1.35 ghz, stock freq is the same as big core.
gpu freq is oc'ed to 1.1 ghz, I think stock freq is 845 mhz for Exynos 7870.

search for this nice app com.grarak.kerneladiutor you can play with

If no one is able to answer you here, I'd love to read your follow-up if you have time to run some experiments.

If you want to use developer tools: https://developer.android.com/topic/performance/power/setup-battery-historian and I assume you've read/know about: Relationship between CPU Usage and Battery Usage


text:
Cannot sign in Google Play store on Bluestacks
I can't install any apps from Bluestacks because I can't sign into Google Play store. I get this message: "Couldn't sign in. There was a problem connecting to www.google.com."

Can't figure out why. My laptop doesn't even have an antivirus. It doesn't give any network error notifications either.

Bluestacks bases on Virtualbox. What network configuration is set for the Bluestacks virtual machine in the VirtualBox manager?

How do I check that and what should the configuration be set to?

Open VirtualBox and open the network settings of the BlueStacks VM configuration in VirtualBox.


text:
How to use -user argument to android backup utility bu sucessfully
I would like to restore an android backup to a secondary user. If I run from adb shell bu help, I see this output:
sunfish:/ $ bu help
 backup [-user USER_ID] [-f FILE] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared]
        [-all] [-system|-nosystem] [-keyvalue|-nokeyvalue] [PACKAGE...]
     write an archive of the device's data to FILE [default=backup.adb]
     package list optional if -all/-shared are supplied
     -user: user ID for which to perform the operation (default - system user)
     -apk/-noapk: do/don't back up .apk files (default -noapk)
     -obb/-noobb: do/don't back up .obb files (default -noobb)
     -shared|-noshared: do/don't back up shared storage (default -noshared)
     -all: back up all installed applications
     -system|-nosystem: include system apps in -all (default -system)
     -keyvalue|-nokeyvalue: include apps that perform key/value backups.
         (default -nokeyvalue)
 restore [-user USER_ID] FILE       restore device contents from FILE
     -user: user ID for which to perform the operation (default - system user)

However, after uploading the backup file to the Owner profile (because I can not get an adb shell in any other profile), I run bu restore -user <uid> <backup file> but restore never succeeds.
First, I tried while logged in to the secondary user, but no backup confirmation UI shows and the restore operation times out. Here's relevant adb logs:
03-14 17:58:29.286 11753 11753 D AndroidRuntime: Calling main entry com.android.commands.bu.Backup
03-14 17:58:29.288 11753 11753 D bu      : Beginning: restore
03-14 17:58:29.289  1493  1731 I BackupManagerService: [UserID:11] Beginning restore...
03-14 17:58:29.289  1493  1731 D BackupManagerService: [UserID:11] Starting restore confirmation UI, token=30388736403-14 17:58:29.289  1493  1731 I ActivityTaskManager: START u0 {act=fullrest flg=0x20000000 cmp=com.android.backupconfirm/.BackupRestoreConfirmation (has extras)} from uid 1000
03-14 17:58:29.289  1493  1731 W ActivityTaskManager: startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent {act=fullrest flg=0x20800000 cmp=com.android.backupconfirm/.BackupRestoreConfirmation (has extras) }
03-14 17:58:29.293  1493  1731 D BackupManagerService: [UserID:11] Waiting for restore completion...
03-14 17:59:29.388  1493 25093 I BackupManagerService: Full backup/restore timedout waiting for user confirmation
03-14 17:59:29.388  1493  1731 I BackupManagerService: [UserID:11] adb restore processing complete.
03-14 17:59:29.388 11753 11753 D bu      : Finished.

Second, I tried when logged in to the Owner profile. I get a confirmation prompt, but it also fails. Here's the adb logs:
03-14 18:00:39.448 11948 11948 D AndroidRuntime: Calling main entry com.android.commands.bu.Backup
03-14 18:00:39.450 11948 11948 D bu      : Beginning: restore
03-14 18:00:39.451  1493  2786 I BackupManagerService: [UserID:11] Beginning restore...
03-14 18:00:39.451  1493  2786 D BackupManagerService: [UserID:11] Starting restore confirmation UI, token=606614021
03-14 18:00:39.451  1493  2786 I ActivityTaskManager: START u0 {act=fullrest flg=0x20000000 cmp=com.android.backupconfirm/.BackupRestoreConfirmation (has extras)} from uid 1000
03-14 18:00:39.451  1493  2786 W ActivityTaskManager: startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { act=fullrest flg=0x20800000 cmp=com.android.backupconfirm/.BackupRestoreConfirmation (has extras) }
03-14 18:00:39.459  1493  1994 W ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (22366588)
03-14 18:00:39.462  1493  2786 D BackupManagerService: [UserID:11] Waiting for restore completion...
03-14 18:00:39.572  1493  1757 I ActivityTaskManager: Displayed com.android.backupconfirm/.BackupRestoreConfirmation: +112ms
03-14 18:00:43.431  1493  5565 D BackupManagerService: [UserID:0] acknowledgeAdbBackupOrRestore : token=606614021 allow=true
03-14 18:00:43.432  1493  5565 W BackupManagerService: [UserID:0] Attempted to ack full backup/restore with invalid token
03-14 18:00:46.213  1493  2063 D InputDispatcher: Waiting to send key to Window{200410c u0 com.android.backupconfirm/com.android.backupconfirm.BackupRestoreConfirmation} because there are unprocessed events that may cause focus to change
03-14 18:01:39.563  1493 25093 I BackupManagerService: Full backup/restore timed out waiting for user confirmation
03-14 18:01:39.563  1493  2786 I BackupManagerService: [UserID:11] adb restore processing complete.
03-14 18:01:39.564 11948 11948 D bu      : Finished.

An acceptable answer includes details steps taken to get the restore to succeed for the secondary user. This should work on stock android. I prefer android 11, but I'll accept any version as that would indicate that it did work at one time.

have you tried adb restore?

Yes, and it appears that adb restore does not accept the -user argument. It just hangs, iirc. Does it work for you?


text:
Why don't I get notifications from messaging apps on my phone?
If I don't have the app open, I don't get messages that people send to me. When I open the app, I see unread messages. I have seen this with LinkedIn messages, Quora messages, and Signal recently (these are the apps I do use - I don't know if there are more apps that are showing this behavior). And this has been going on for about a year now, if not a little more; it didn't use to be like this before. The only apps where I do get notifications for messages are Facebook Messenger, Instagram messages and WhatsApp (basically, all Facebook owned apps), in addition to the plain old SMS.
I have checked in App settings; I have turned on notifications, so I should receive notifications for messages. But I don't. For example, see this screenshot of LinkedIn permissions, where you can clearly see that that I have enabled every kind of notification there is, but I still don't get notifications for messages that are sent to me:

And here's a screenshot of the battery optimization settings of LinkedIn, where you can see that I have not enabled battery optimization for it, and given it permission to run in the background:

If I further click on "Battery optimization", this is what I get:

Could someone please explain in detail, is this the result of some OS update, possibly as part of an attempt to extend battery life? How do I make it such that I get notifications for all messages sent to me all the time, regardless of whether I have the app open or not? I don't care much about other notifications (likes, shares, etc), but it is important to me that I get notifications for DMs (direct messages) sent to me.

Hello. Have you made sure that your app is exempted from Battery optimization settings? You should be able to see this in Settings -> Apps -> your app -> Battery optimization.

I have attached a screenshot of it in the question now. It says "app can use battery in background", so I assume it has been exempted?

No. Under Battery optimization, choose "Don't optimize" or something similar.

@Firelord I've added a screenshot of what I can see when I go to "battery optimization". Please have a look.

Make/model and OS version of your device would be helpful. Related: https://dontkillmyapp.com/

May be the push notification got defect by an update. I would clear the app data and re-initialize the app. That will get you a new push notification token and thus also reset the push functionality. If it still not work afterwards then it is a device problem.

@Robert How do I do that? Actually, about it being a device problem, my wife has an iPhone 11 and she has been facing similar issues too. So, I wouldn't be so quick to call it a device problem. Do you get messages from messaging apps without fail?

Android settings -> apps -> LinkedIn -> Clear app data. Or just uninstall the app and later reinstall it. Android and iPhone don't have anything in common even the used push notification system is different. Thus observations made on an iPhone may or may not indicate a general problem.

Ok, cleared the app data. Let's see if this fixes it. And yeah, I know nothing's common between iOS and Android, but I was just replying to the "device problem" comment, that if there's an iPhone displaying similar issues as well, it can't simply be that both devices have now suddenly become faulty. Actually, things shouldn't even be this convoluted - not every layman will post a question or google about it and figure out what to do - notifications for messages should come on our phones at all times, simple as that.


text:
DNS over internal VPN?
I'm currently renting a server where I installed PiHole and PiVPN. PiHole is a DNS sinkhole that I use for blocking ads, and the PiVPN allows all my devices thanks to OpenVPN to get all my traffic through a personal VPN to reach my PiHole.
On PC it's great, even for laptops, because battery life is enough to support the "keepalive packets" that allow OpenVPN to stay connected to my server even if I'm not using the internet directly.
However, on Android, it's the main problem, since I'm using a VPN 24/7, and my battery is melting like snow in the sun. So the question is the following: How can I set up an internal VPN that redirects DNS queries to my PiHole (my server got an IP address that corresponds to my personal DNS-PiHole)?
I know some applications can work like "that", like AdAway (for non-root smartphones) or NetGuard.
I'm by the way rooted, and already using AdAway which is making the job, but it's more for technical challenge battery management.

Is your PiHole server reachable without VPN? Because if not one "internal VPN" wouldn't be enough, you would need a second VPN to just reach your PiHole server (e.g. just for DNS traffic to the PiHole server). Finally the main question remains: what do you gain by using your PiHole server instead of AdAway or similar apps like Blokada?

If root is available, I prefer running dnscrypt on the device than relying on VPN.

Hi there, I don't even know how to do that (I mean, running a script on Android), I guess it's with adb command ?
I read as well that each time you reboot your device, you will have to re-over-write DNS again, I'm wrong ?

From the OP's (now deleted) comment (with copyedit),

I finally find what I need, "DNS Change" or "DNS Override" are making the job. My problem is solved I guess, even if I don't like using apps which aren't open source.


text:
Source code for Android programs and applications
How do I view the libraries, directories, source files, etc... for Android programs and apps. Obviously file viewer doesn't show nearly what I am looking for. 8ts all open source, so why can't I access them?

no, it's not open source. you can find source code for open source apps only https://www.wikipedia.org/wiki/F-Droid

Open source does not mean that the source is included in the Android app. An APK files never contains the code in compiled form. Some time sit means that the source code can be downloaded somewhere on the net.
Usually nowadays you can find the source code of an open source on on one of the three most popular platforms:

https://Github.com
https://gitlab.com
https://sourceforge.net

Typically the project page is linked on the [Google Play] store web page of the app.


text:
How to prevent the use of a phone as a second-factor security confirmation
Mobile phones are frequently used to read email and access secure online accounts.  So the average phone contains both the account signon usernames and the associated passwords.  Email has been used for resetting a password, and is also accessible using the phone.  Recently many host sites have started using text messages a second factor security mechanism.
The popular use of mobile phones as a second-factor security mechanism has inadvertently caused a huge security problem.  The odds are much higher that your phone will be lost or stolen than you becoming a victim of an online attack or suffering the compromise of your online account password.  Since a typical phone grants access to everything, including the ability to reset passwords and get past 2-factor security based on your device, the phone has become a valuable target for theft much more than ever before.
So now if your phone is lost or stolen, the attacker will be able to access everything the phone has been enabled to access.  And you will not be able to access ANYTHING without your phone.  You may not even be able to reset your password or lock your accounts.
Is there any way to stop the use of a text message as a second-factor account confirmation?  I would prefer the use of personal questions to confirm my identity.  The only alternative I know of is to not use your phone at all for email or accessing high-value online accounts.  And I highly recommend you enable tracking to allow you to find a lost or stolen phone quickly.

I assume by "text message" you are referring to SMS as second factor. There is a simple way to prevent access to a phone if it is stolen: set an access PIN that has at least 6 digits (for comfort you can use the fingerprint unlock). As modern Android devices are encrypted by default the only way to bypass this PIN is to guess it (if the PIN was chosen too simple) or to rob the phone while it is unlocked.

I have both pin and biometric in use, and of course, I very highly recommend doing so. But it is easy to watch someone entering their pin and targeting their phone afterward. The use of the phone as a second-factor is not only an undesired nuisance and security problem - but it also prevent accessing (or locking) any accounts without phone service.

Hi, since this question is asked on Android Enthusiasts, a Q&A for Android end-users (not necessarily security experts, though we also have a sister site [security.se] for this), the answers will focus on what end-users can do, not what service providers can do. Though, I actually doubt end-users can do anything else as long as they're dependent to what the service only provides, other than preparing for risk mitigation (what can be done if stolen).

Most services support to use different type of seconds factor that work offline (e.g. 2FA-app based, or dedicated hardware based token). You can also use a cheap Android phone or tablet as dedicated 2FA-hardware you always leave at home.

Yes Information Security might be a better forum. And this is a security problem bigger than Android for sure.  From an Android standpoint, setting up your device so that it can be located (when powered up) is critical to minimizing risk.  The user must be able to do so very quickly.  With Apple devices all you need is an online browser to locate your device.  Its a bit more complicated with Android.

To Robert.  Until recently the use of HW tokens and FIDO devices was a great alternative.  But sites such as Blink and Nextdoor havent become this sophisticated yet.  I have been using a tablet for accessing email and high-value sites.  But they are now frequently re-authenticating which requires my phone and is the equivalent of resetting my password every time I signon which has become painful.  Like having to solve a captcha which was the last security trend.  Google sends and email if anyone unfamiliar accesses my account.  This is an excellent, and painless, security measure.


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:
Android ADB Port forward returns CONNECT aborted with curl
I'm trying to use my phone's data connection as a proxy on any port on my PC. I've enabled the port forward with: adb forward tcp:5001 tcp:8080 and I get 5001 as a response from the adb shell. Different ports i've tried:
Now i'm just trying to send a curl request to ipify.org's api with curl https://api.ipify.org?format=json --proxy 127.0.0.1:8128 but the response I get is curl: (56) Proxy CONNECT aborted, for reference, i've tried this with an external proxy and it works fine: curl https://api.ipify.org?format=json --proxy 159.197.253.210:7689 returns {"ip":"159.197.253.210"} which is exactly what should happen. Pic for reference:
Am I doing something wrong? How do I use my android as a proxy?

Please do not post terminal text inside of screenshots. Please paste it as text and format it as code.

Are you aware the when you use --proxy option of curl the remote side requires to be a real HTTP proxy. Proxy uses an own HTTP based protocol. Web servers don't understand this protocol. Thus adb forward can not be used for internet connection sharing. If you want to use the connection of your smartphone use USB tethering or start mobile hotspot feature.

Hey Robert, sorry about that. The thing is, I want to use my home wifi as normal on my computer, I just want to be able to use my phone's data as a proxy too. You're saying this isn't possible? Then what's the point of adb forward?

The point of adb forward is that it allows to forward a TCP connections from or to the phone. It can be used to reroute connections on TCP  level but it is not a proxy. If you want to use a proxy you need to install a proxy on your phone. The proxy port then can be forwarded via adb. Without proxy you would need to manipulate DNS to redirect connections.


text:
How to change download manager
Everytime i try to download anything it uses the built in android download manager.There is no download manager option at default apps . Is there anyway to force the use of my download manager?
My device is Realme 7 and it runs android 10
My download manager is advanced download manager

When you mention "download anything", what app are you using to invoke the download action, a browser or specialized app? Possibly similar to How to intercept Chrome links with Advanced Download Manager?


text:
Internal Storage has no space even with SD card?
So I have an LGK4 android phone with 8GB of storage, and lately I've been having really weird storage problems; When I try to install or update an app I can't because the storage is full; thing is, I've already cleared my cache, deleted unnecessary apps, and all my photos/videos etc are on the SD card. The apps I do have installed all come to 3.16GB, which theoretically should be the only things on the internal storage, but it still says I just have 611MB available? What happened to those 4GB? To top it all off, I can't access any files on the internal storage, it literally doesn't have any icon or button to access it, so I can't see what's causing this. Any ideas? Should I do a factory reset?

How to free Internal Storage by moving data or using symlink / bind-mount with Adoptable Storage?

You don't consider the Android system itself which also requires storage. Typically on a 8GB device like yours half of the storage thus ~4GB are already occupied by the system itself.


text:
How to process live sound output
I'm new to android and new to anything related to soundprocessing.
The thing is, I have a simple deep learning model to eliminate noise (barking dogs, cars, ...). I want to apply (use) it to the sound output on android phone (ex: when I call messenger, the sound comes from my friend have barking, I will turn on my app to get rid of dog barking, I will turn on my app to eliminates dog barking) but I don't know how to do it. I have found an architecture on Windows that shows where my model is located:

On picture display shows both incoming and outgoing sound for a conversation, It adopts the driver and IOCTL protocol to interfere with the transfer of sound from user mode to the kernel and vice versa, is it the same in android? . Can someone tell me how it looks in android or any information, I've seen something here but for a novice like me it's too little information. Thank everybody!

As you already pointed out the diagram is for Windows and thus can't be applied to Android. Furthermore on Android you can't install drivers or system components. Please note that app development and ROM development is considered off-topic here. This community focuses on Android (power) users, not developers.

@Robert Thank you so much


text:
How can I activate the new Chrome tab management tools tab groups & grid layout?
I make heavy use of my tablet for research & typically have 200 to 500 tabs open. So I have been looking forward to the alternate grid layout and to Chrome Tab Groups for Android, which would make my life a lot easier.
However these features, which I understood to be activated by default as of Chrome 88, do not seem to be available from my instance of Chrome (version 89). I have the file folder-style row of tabs across the top. I have neither a switch to grid mode button nor the hollow square with the number of open tabs inside. I have enabled the flags for tab grid layout, tab groups, tab group continuation, and tab group UI improvements, and restarted Chrome several times, all with no change I can see.
I couldn't find anything on the Google help site that offered any glimmer of hope -- nor of discouragement.  I can not even think of anything else to try. Help!
I am running Chrome under Android 10 on a Galaxy Tab A.
Oh, one more thing. I doubt this is relevant,  but when I first got this tablet from Amazon, it took some work to convince it that its home was not in Mexico. Maybe there are still some Mexico-base settings causing a problem? Just a long shot.


text:
WinSCP like sync on Android
An android client needs to sync files from the server and then execute app.
If it is a windows client, I can use autohotkey and winscp to do this.
appA.ahk
SplitPath, A_ScriptFullPath, name, dir, ext, name_no_ext, drive
FileDelete, %dir%/%name_no_ext%.log
runwait,D:\Tools\WinSCPPortable\WinSCP.exe /script="%dir%/%name_no_ext%.txt" /log="%dir%/%name_no_ext%.log"
sleep 3000
run,C:\Program Files (x86)\APP\APP.exe

appA.txt
option batch abort
option confirm off
option transfer binary
open ftp://User:123456789@192.168.1.11

synchronize local -filemask=|*.db "C:\Program Files (x86)\APP\data" APP/data
close
exit

How can I do similar task in android?


text:
Where are epub files stored?
I have this old epub file on my phone that I'm trying to download but I have no idea where it's stored. The app I used was Lithium. I can read it fine on lithium but it won't show up anywhere else. Lithium doesn't give me an option to show file location either.
I tried installing other epub readers but none of them can locate the specific epub I want to get. Does anyone know where epub files are stored on android?

How was the epub file copied on your phone? By the Lithium app itself?

Usually, the file is inside the app's data folder that can't be accessed by other apps, and as a user, needs root access to access it.

Thank you guys. At this point it seems more trouble than its worth to get to it.