text:
Cannot boot into fastbootd OnePlus 8T
I'm trying to manually flash the factory image on my OnePlus 8T (using this TCD guide).
I was able to boot my phone into Fastboot mode using the volume + power keys. I'm able to execute fastboot devices and successfully flashed all images in Section 8 of the above mentioned tutorial before it gets to the fastboot reboot fastboot command (i.e. boot.img, dtbo.img, etc.)
When I try to execute fastboot reboot fastboot, I get the following error: fastboot: usage: unknown reboot target fastboot.
It seems other people have this problem as well and it's due to some changes that happened in Android 10 (my OnePlus 8T is on Android 11). Reading this XDA thread, comments #14 - #18 (inclusive) I think describe the underlying problem, but I don't understand the solution.
Do I need to execute a different command, is there a process I need to complete first?
For broader context, I was rooting my phone and got into a bootloop. Fastboot can recognize my phone but not adb. I'm trying to get a clean start by restoring it to the factory image and have successfully completed all the steps in the TCD guide except for the final step of flashing the images.
Here's a screenshot of my terminal -

My adb version is:
Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as /usr/local/bin/adb

Updates:

I tried fastboot reboot bootloader which does successfully reboot into bootloader, but then I cannot flash the other images. When I try, I get the error: FAILED (remote: Flashing is not allowed for Critical Partitions) which I think is because I'm not in "fastbootd" which seems to be important based on the XDA thread
When I try fastboot reboot recovery, I am not booted into recovery but get the same error: fastboot: usage: unknown reboot target recovery
I ran fastboot boot imagefv.img and got the following. My phone is now showing a screen with the OnePlus logo and the words "Fastboot Mode", but no other options.

I was able to enter recovery mode from the fastboot screen and from recovery reboot to fastboot, but still unable to enter fastbootd. This guide suggested I could enter fastbootd from recovery, but was unable.

I downloaded Android's SDK Platform-Tools, extracted the platform-tools folder and ran a terminal in side that directory. When I executed ./fastboot reboot fastboot it did boot into fastbootd successfully. What's weird is that I installed platform-tools, put it in my /etc/ folder, and added it to my PATHS only 2 days ago. I'm not sure why exactly this worked...


text:
Tried to ungoogle my android device, but accidentally removed a vital package, and neither it or google play store reinstalls through adb or apk's
I've got Coolpad Porto S, which is running Android 5.1. The apps I have been trying to reinstall were com.android.vending and com.google.android.webview (I don't have concrete evidence but after uninstalling it I am unable to access any browser application like duckduckgo or even steam) by using "pm uninstall -k --user 0 APP".
I've been trying to install those back using apks I got from apkmirror, but if I do through my phone or through adb they appear in the app list as "Downloaded", however they're also "Not installed for this user". I tried installing them through using "adb install -r app.apk" command, then going into "adb shell" mode and using "pm install -r --user 0 app.apk", but still same result. If I don't use the -r option, it just gives me INSTALL_FAILED_ALREADY_EXISTS error.
If it helps, upon doing "pm enable --user 0 com.android.vending" it gives me "Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=4418, uid=2000, package uid=10015" error.
My phone is not rooted. Anyone got any ideas?
Edit: After tinkering about for a bit, I am still having a ton of issues with doing that. If it helps, I found the base apk location for the webview app. It didn't work trying to "pm install -r --user 0 directory", because INSTALL_FAILED_DEXOPT, but I managed to get the crash in logcat.
E/installd(  263): DexInv: --- END '/data/app/com.google.android.webview-1/base.apk' --- status=0x0100, process failed
I/PackageManager(  777): Dexopt done on: com.google.android.webview
W/PackageManager(  777): Package couldn't be installed in /data/app/com.google.android.webview-1
W/PackageManager(  777): com.android.server.pm.PackageManagerException: scanPackageLI
W/PackageManager(  777):        at com.android.server.pm.PackageManagerService.scanPackageDirtyLI(PackageManagerService.java:6343)
W/PackageManager(  777):        at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:5635)
W/PackageManager(  777):        at com.android.server.pm.PackageManagerService.replaceSystemPackageLI(PackageManagerService.java:11107)
W/PackageManager(  777):        at com.android.server.pm.PackageManagerService.replacePackageLI(PackageManagerService.java:10917)
W/PackageManager(  777):        at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:11432)
W/PackageManager(  777):        at com.android.server.pm.PackageManagerService.access$2800(PackageManagerService.java:248)
W/PackageManager(  777):        at com.android.server.pm.PackageManagerService$6.run(PackageManagerService.java:9278)
W/PackageManager(  777):        at android.os.Handler.handleCallback(Handler.java:815)
W/PackageManager(  777):        at android.os.Handler.dispatchMessage(Handler.java:104)
W/PackageManager(  777):        at android.os.Looper.loop(Looper.java:194)
W/PackageManager(  777):        at android.os.HandlerThread.run(HandlerThread.java:61)
W/PackageManager(  777):        at com.android.server.ServiceThread.run(ServiceThread.java:46)
D/PackageParser(  777): isGmoROM() return false
I/PackageManager(  777): Linking native library dir for /system/app/WebViewGoogle
I/PackageManager(  777): Perform pre-dex opt for package: com.google.android.webview
I/PackageManager(  777): Installation done for package: null
V/PackageManager(  777): + starting restore round-trip 20
V/PackageManager(  777): No restore - queue post-install for 20
V/PackageManager(  777): Handling post-install for 20
I/art     (  777): Explicit concurrent mark sweep GC freed 28070(2MB) AllocSpace objects, 23(1188KB) LOS objects, 14% free, 22MB/26MB, paused 1.836ms total 161.529ms
I/art     ( 9195): System.exit called, status: 1
I/AndroidRuntime( 9195): VM exiting with result code 1.

Not sure if it helps, but here it is.

If your device is not rooted you can simply perform a factory reset and all apps will be there again.

Yeah I would do that, however I am more looking for a way to do this without factory resetting my device since I do have some applications (for example, bank authentication) that can't be easily reinstalled after factory reset.

Instead of re-installing you can just try to re-enable them. Both should be system apps that can not be deleted from your device thus you can not uninstall them just disable.

I've already tried it, and as stated in the post it gives me "Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=3298, uid=2000, package uid=10074" error message. Doing it through phone and not adb doesn't work either, because it shows the app as being enabled, and disabling it resets it to factory state which does not function because of the same "Not installed for this user" message.

pm install-existing com.google.android.webview – the APKs are still on the device, you just made them unavailable to the specified user.

Doesn't work, it doesn't recognize install-existing. I'm pretty sure you've meant "cmd install-existing com.google.android.webview", but that feature is, as far as I'm aware, only usable with android 7.0+, and my android version is 5.1.

source: Stack Exchange

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

sort: votes


text:
Redmi Note 5 Pro - unable to flash TWRP
I am trying to flash the LineageOS on my Redmi Note 5 Pro (whyred). Initially, I used Windows 10 for the Xiaomi Unlock Tool. However, the Xiaomi Unlock Tool did not detect my device. So, I used this tool https://www.xiaomitool.com/V2/ to unlock my bootloader and it unlocked instantly.
Now, I am using Ubuntu 21.04 (I am more comfortable using the command line here) (with android-tools-adb and android-tools-fastboot packages installed) to try to flash TWRP first.
When I connect my device, adb devices can recognise it. Then I use adb reboot bootloader to enter into fastboot. Now, fastboot devices can recognise it too. The screen of the phone shows the fastboot icon.
But, the problem comes here. I use fastboot flash recovery twrp.img and I get this error

FAILED (Write to device failed (No such device))

Now, when I use fastboot devices again. I don't see my device. Another change I see is press any key to shutdown written on the top left corner of the screen of my phone.
USB debugging, USB debugging security, OEM debugging are all enabled. Bootloader is unlocked (as I see in the settings). The phone is updated to latest MIUI version supported officially. And I used the same laptop and method to flash TWRP in a Redmi 3S (land) some time back.

Something else I experienced is that after randomly trying to get this right again and again, the command fastboot flash recovery twrp.img did not terminate and got stuck.

Well, I didn't really understand what happened. But there's this concept of Anti-roll-back due to which I was unable to flash TWRP. I followed the 5th method here and it worked. https://forum.xda-developers.com/t/everything-about-anti-roll-back-whyred.3816219/

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


text:
Device Unable to Boot, Error - mdtp image is corrupted
I am trying to install a custom on my Xiaomi Mi A2 Lite (first timer). However, I am facing a difficulty as my phone is showing me the error "Device Unable to Boot, Error - mdtp image is corrupted".
System I am using: Linux Mint 20.2
Things I did:

Downloaded TWRP and ROM file.
Unlocked the bootloader.
Booted into TWRP by running "fastboot boot twrp*.img" in the terminal when fast screen appears on my phone.
[I tried out this command "fastboot flash recovery twrp*.img" before running the above command, but failed and showed remote: partition table doesn't exist]

[So, it worked out well. However, I forgot to create backups]

Wiped "Dalvik/ART Cache", Data, System, Internal Storage.

Went to "install" and tried to flash the zip file of the ROM. However, it gave an error. [Probably, error 7, don't know what that mean]

Then, tried to reboot and carry out the same process from the step 3, it gave me the error and I am stuck.

Now, I cannot do anything. Can you please help me out.
Thank You.

after install error 7 'adb pull /tmp/recovery.log'

@alecxs, I have tried the above command, but, getting this error message: "adb: error: failed to get feature set: no devices/emulators found".

use official TWRP (have double checked adb will work)

Yes, I am using the official TWRP, but not working...

'adb kill-server' and re-plug cable until you can see it on 'adb devices'

if MicroSD Card is working you can copy recovery.log from GUI. please upload content pastebin.com

flash vbmeta (if your device has verified boot) and disable verified boot before flashing custom recovery by the following command.
fastboot --disable-verification flash vbmeta vbmeta.img
(ofc get vbmeta img for ur device yourself)
then flash recovery using the following command
fastboot flash recovery <recovery file name.img
then try flashing rom, if still fails, flash vendor partition in twrp before flashing rom

How does this fix error 7 in TWRP while flashing ROM "Updater process ended with ERROR: 7 Error installing zip file"?


text:
Why uninstalling system apps through ADB cause problems like battery drain?
I have an Android 10 phone (realme) which came preinstalled with a lot of bloatwares. Few days ago I used adb to uninstall a lot of apps, like the default browser, file manager, facebook bloatwares, gallery etc. But now I am facing a noticeable battery drain. So now, I am thinking of factory resetting the device to get back those system apps. But this time after resetting, I am thinking of disabling those apps instead of uninstalling.

Will disabling them also affect the device the same way as uninstalling them do? I mean will I again face battery drain if I instead disable them?
And also, will disabling them free up the storage as uninstalling them do?
How can uninstalling system apps cause battery drain? Are those apps really helpful for the device so that they cause harm to the device when uninstalled?

May be you should name the apps and their package name you have uninstalled. Please edit your question and include this list, otherwise it is very difficult to guess why you encounter a battery drain. Additionally I would recommend to check adb logcat for errors occuring frequently.

Ok I will update my question soon.

I ran pm list packages -u and found that there are about 200 packages, I can't check all of them if they are uninstalled or not so I am going to reset device.


text:
Difference between factory reset and forgotten password erase all data
Is there a difference between performing a reset from recovery mode, or clicking on the forgotten password button on the locked screen, which offers to "erase all data"? I assume there isn't, but I wanted to be sure.
I don't know if this is useful information or not but I have a Redmi Note 8.
Thanks!
Update: Clicking on the "Next" button on the forgot password screen that informs me it will delete all data just shows instructions on how to get into recovery mode, so it turns out there aren't actually two ways to reset this device in case of forgotten password like it seemed.

Usually they both are the same. But it depends on the OEM. They can implement them differently.

Beware it will activate FRP and requires both, google play account + mi account to unlock!

Thank you for the answer and the tip! I was not logged in with a mi account so I assume that won't be a problem. As for google, would I be able to use it to unlock my phone instead? I read that it should appear as an option after several unsuccessful attempts but it never did for me, despite being signed in.

google stopped offering all screenlock by-pass options via google account, what you have read is therefore outdated

Thank you for the clarification!


text:
Signing TWRP with OpenPGP doesn't work, private key needed?
I am trying to sign TWRP (Redmi Note 8 ginkgo) using GPG on Windows 10. I have imported the TWRP public key, however, when I select the file for signing, it does not show up in the drop-down menu in Kleopatra. From my research, this seems to be due to it being a public key and missing the private key part (correct me if this is wrong please).
I have no idea how to acquire such a key that would allow me to sign TWRP correctly. Could anyone please help me with this?
Additional info:
The bootloader is locked and I don't have TWRP installed. I want to use the command fastboot boot twrp.img, however, it doesn't work with a locked bootloader. I get the error FAILED (remote: Fastboot boot command is not available in locked device). I read somewhere that it might work if TWRP was signed without having to unlock the bootloader.
Thank you! :)

Thank you for the correction and the link. I will have to do more research to understand the information there, but I will give it a try.

For correctly signing TWRP you need the device signature private key that only the device manufacturer has.
Therefore it is impossible to sign TWRP for a bootloader locked device.
Furthermore Android images are not PGP signed, therefore a PGP signature would be of no use no matter which key you use.
More details about ROM image signatures can be found here: Verifying a (custom) ROM signature

Thank you for the answer! I will be sure to look at the link for more info.


text:
Determine power usage for specific timeframe
Under battery usage, I can see “battery usage since full charge,” broken down by app (and, if toggled on, non-app phone processes). I’d like to see that breakdown but in a more specific timeframe (and, if possible, prior to my last full charge).
The phone is a Motorola “moto g power” running Android version 11, security update June 1, 2021.
Context:
Last night, I went to bed with my phone at 49% (I checked because had been a bit since I charged it); this morning it was dead. The battery usage graph showed four days of steadily-declining battery, to just under 50% as I saw it last night, followed by a nose-dive to 0% in a few hours. The breakdown of usage showed about a third used by Firefox (makes sense, that’s the overwhelming majority of my usage of the phone), about a third used by “mobile network standby” (which makes little sense, I have pretty good signal), and the rest divided among a bunch of different things.
My assumption is that Firefox was the dominant usage over most of those four days, and mobile network standby is what caused the precipitous drop last night. However, I don’t know that—it could be that mobile network standby is always draining my battery more than I think it is, and something else (probably increased usage by Firefox?) last night caused the drain.
Question:
Is there any way to get that same battery usage breakdown, but for just those hours last night, rather than “since last full charge”? For that matter, I have since charged the phone, so now it displays no data since it just charged—is the record I described above just gone now?

I am afraid the data you are looking for is lost. Battery stats are re set when you face shutdown at 0% or when you  charge to 90%

@beeshyams The data I describe in this question came after the phone died at 0%, charged some, and restarted, so I know the first half of that is untrue (now, for this phone, anyway). Even if the data is gone, though, I would want to know for the future.


text:
How to fix corrupted IMEI number?
I have a Samsung Galaxy S GT-I9003 running GINGERBREAD.XXKPE. Right now when I type *#06# in the phone app, the popup shows:

(I recreated the image with my paint editor because I didn't want to use my camera. This is still an exact recreation of it.)
How would I put the IMEI back into memory? I have the IMEI from the back of the phone saying: *5**07/0*/9****7/*
I hid some numbers for obvious reasons. How would I put the IMEI back into the machine? Apparently, the IMEI is a 15 digit code but the IEMI on the rear of the phone is in this format: ABCDEF/GH/IJKLMN/O. Could you also rephrase this '15 digit code' to be 15 digits without slashes using letters A-O?

Are you sure this old device is still worth the effort? There are already countries and mobile network providers where it will not get a signal at all as 2G and 3G are already shut down.

Yeah, I'm using this for a second phone and I can't sign in to google because the IEMI was lost.

I don't think the IMEI is the problem. The device is simply EOL, Google announced that those devices will no longer work: https://support.google.com/android/thread/118703101/sign-in-on-android-devices-running-android-2-3-7-or-lower-will-not-be-allowed-starting-september-27?hl=en

Ok, thanks, Robert! Is there a way to update the phone without a sim card? I tried SETTINGS>  ABOUT PHONE> SOFTWARE UPDATE> CHECK FOR UPDATE but it says I need a SIM card.

The SIM card is irrelevant, there are no updates your phone could receive. 2.3 is the highest version it can get by official updates.

try miracle box. i dont know much about it so don't revert to me.

Apparently, the IMEI is a 15 digit code but the IEMI on the rear of the phone is in this format: ABCDEF/GH/IJKLMN/O. Could you also rephrase this '15 digit code' to be 15 digits without slashes using letters A-O?

https://www.wikipedia.org/wiki/International_Mobile_Equipment_Identity#Structure_of_the_IMEI_and_IMEISV_(IMEI_software_version)


text:
Cannot install/replace Android OS on Samsung S3
I have a corrupt version of Android on my S3 phone: WiFi signal is 100% but almost zero internet connection.
So I found a binary: S968CUDUAMH1_S968CTFNAMH1_S968CUDUAMH1_HOME.tar.md5 which is good(?) for my S3.

ODIN Report

I completely uninstalled everything relevant and reinstalled without errors or anomalies in Device Manager.
But am still in the same place. ADB sees phone connected but will not program so I'm missing something somewhere.
@alexcx suggested ODIN requires download mode. Please explain. I also looked at your XDA link but that seems to require Internet connection which I don't (nearly, see below) have.
Your link to lost internet on Android 4 or lower, I'm afraid, won't help since again I don't have internet access.
Your comment that you're pretty sure I have internet access may be [just] partially true.  Note my router connection is five bars but internet connection may be just one, hard to be sure, since I can intermittently connect to google but 99.9% of the connections time out.
So I'm assuming it's an OS issue so rooting and replacing OS just might resolve it.
Ah! @alexcs, your final comment led me to load ODIN and check the fist step when I should see (first) ID:COM with something like 0:[COM6] underneath but I don't.. see my pic.
Also no <ID:0/006> Added! in the Log.
So if ADB can see my phone why can't ODIN?  I have AFAIK have Samsung drivers loaded with no errors in DM.

Devices with yellow exclamation mark in device manager are usually not usable e.g. because of missing/wrong driver. You need to fix that first.

Does this answer your question? Why do apps stop supporting older Android versions after some time?

Possibly related: How can I get back lost internet access on Android 4.x or lower?

Does this answer your question? What are possible consequences of not installing updates

Does this answer your question? If I buy the cheapest possible Android smartphone today, how long can I keep it without having to buy a new one?

https://androidmtk.com/flash-samsung-stock-rom-using-odin

Edited my original post. Please see.

btw you didn't mention that you factory reset the device. a factory reset has same effect as flashing stock ROM, it is the first thing you should try. you only mention wifi, but what about mobile data?

The file you point is hash of the original file. You should find the file w/o .md5 extention

I think @alecxs inferred the actual problem. A faulty modem. A pretty brick :~((

@RomeoNinov tar.md5 file is fine. it is a tarball archive, not a hash. That's how samsung provides firmware


text:
Cannot bind to Cell Network Interface example with curl
I am trying to use the Mobile Network interface rmnet_data0 while Wi-Fi wlan0 is enabled.  You can read my progress with the developer JsBergbau of BindToInterface at this link https://github.com/JsBergbau/BindToInterface/issues/3.  He referred me here to request help with what is preventing with binding to interface rmnet_data0 while Wi-Fi enabled used with curl.  The phone is running ofono with UBports.
With wlan0 disabled:
curl --interface rmnet_data0 ifconfig.me
"MY IP ADDRESS OUTPUT"

With wlan0 enabled:
curl --interface rmnet_data0 ifconfig.me
curl: (7) Failed to connect to ifconfig.me port 80: Connection timed out

Substituted IP address for my real ones:
ip route list table local

broadcast 10.0.0.0       dev usb0         proto kernel  scope link  src 10.25.52.96 linkdown
local 10.25.52.96        dev usb0         proto kernel  scope host  src 10.25.52.96
local 10.75.188.126      dev rmnet_data0  proto kernel  scope host  src 10.75.188.126
broadcast 10.75.188.127  dev rmnet_data0  proto kernel  scope link  src 10.75.188.126
broadcast 10.255.255.255 dev usb0         proto kernel  scope link  src 10.25.52.96 linkdown
broadcast 127.0.0.0      dev lo           proto kernel  scope link  src 127.0.0.1
local 127.0.0.0/8        dev lo           proto kernel  scope host  src 127.0.0.1
local 127.0.0.1          dev lo           proto kernel  scope host  src 127.0.0.1
broadcast 127.255.255.255 dev lo           proto kernel  scope link  src 127.0.0.1
broadcast 192.266.10.0    dev wlan0        proto kernel  scope link  src 192.266.10.25
local 192.266.10.25       dev wlan0        proto kernel  scope host  src 192.266.10.254
broadcast 192.266.10.255  dev wlan0        proto kernel  scope link  src 192.266.10.25

ip route show table 0

default via 192.266.10.1  dev wlan0                      proto static                                       metric 600
default via 10.75.188.125 dev rmnet_data0                proto static                                       metric 700
10.0.0.0/8                dev usb0                       proto kernel  scope link  src 10.25.52.96 linkdown
10.75.188.125             dev rmnet_data0                proto static  scope link                           metric 700
192.266.10.0/24           dev wlan0                      proto kernel  scope link  src 192.266.10.25        metric 600
broadcast 10.0.0.0        dev usb0         table local   proto kernel  scope link  src 10.25.52.96 linkdown
local 10.25.52.96         dev usb0         table local   proto kernel  scope host  src 10.25.52.96
local 10.75.188.126       dev rmnet_data0  table local   proto kernel  scope host  src 10.75.188.126
broadcast 10.75.188.127   dev rmnet_data0  table local   proto kernel  scope link  src 10.75.188.126
broadcast 10.255.255.255  dev usb0         table local   proto kernel  scope link  src 10.25.52.96 linkdown
broadcast 127.0.0.0       dev lo           table local   proto kernel  scope link  src 127.0.0.1
local 127.0.0.0/8         dev lo           table local   proto kernel  scope host  src 127.0.0.1
local 127.0.0.1           dev lo           table local   proto kernel  scope host  src 127.0.0.1
broadcast 127.255.255.255 dev lo           table local   proto kernel  scope link  src 127.0.0.1
broadcast 192.168.1.0     dev wlan0        table local   proto kernel  scope link  src 192.266.10.25
local 192.266.10.25       dev wlan0        table local   proto kernel  scope host  src 192.266.10.25
broadcast 192.266.10.255  dev wlan0        table local   proto kernel  scope link  src 192.266.10.25

ip route list table main

default via 192.266.10.1  dev wlan0        proto static                 metric 600
default via 10.75.188.126 dev rmnet_data0  proto static                 metric 700
10.0.0.0/8                dev usb0         proto kernel  scope link  src 10.25.52.96 linkdown
10.75.188.125             dev rmnet_data0  proto static  scope link     metric 700
192.266.10.0/24           dev wlan0        proto kernel  scope link  src 192.266.10.164  metric 600

ip rule

0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default

Most probably due to routing policy. When WiFi is enabled, Android sets wlan0 as the default gateway, and blocks traffic to rmnet_data0.

Looking at the IP route it shows they are both default:
default via AAA.AAA.AAA.AAA dev wlan0  proto static  metric 600
default via BBB.BBB.BBB.BBB dev rmnet_data0  proto static  metric 700

And ip rule??

@IrfanLatif My post has been updated with the IP rules you asked for.

ip route and ip rule are different commands.

@IrfanLatif I apologize, I know they are different commands and I have updated the post with the output.

It's quite evident that the network traffic never reaches the second default route. The first one with lower metric value is always used. // Btw which device is it? In recent Android versions main table is not used, and RPDB is quite complex due to excessive use of fwmark and uid based filtering.

@IrfanLatif  This is a Sprint OnePlus 7 Pro 5G running ofono with Ubports

Alright. So this is Ubuntu, not Android. You must have root access then. Simply inject your own rule / route. Follow any Linux guide. See this recent answer of mine for a quick reference.


text:
Messengers don't show incoming call when they are not active
Samsung A10 with Android 11. Nor Viber, nor Telegram shows incoming call when they are not active. I mean, that if the messenger is open (in memory) and it is currently being used (focused) then incoming call is shown. However, if another application is used (but messenger is still open) then incoming call is not shown.
I think, the problem is that when messenger is not active it loses internet connection, because when Telegram becomes active (user switched to Telegram) it shows in the title "Connecting". Viber also shows something similar.
This is my mother's phone. It worked well before, but something happened. Either she changed some settings or the problem in updates.
Could anyone help to fix this problem?

Samsung devices are known for their aggressive battery saving. My guess is that you are "victim" of the problem this site is dedicated to: https://dontkillmyapp.com

I found how to fix it. Settings > Apps > (⁝) menu > Special Access. Here you will find something like Data usage with traffic economy (my translation). Find your application and enable it.

This is what happened to me as well. However, it wasn't with Messenger, but with another app. Go to settings>apps and find the messenger. Then click the app and go to Notifications and turn on Allow notifications. Here you will find call notifications also then turn on also.


text:
ADB not connecting after rooting with Magisk
I rooted my Coolpad Modena 2 (E502) using Magisk. After I rebooted it, ADB stopped connecting.
Things I've tried:

Wiping the phone and rooting it again
Using different USBs

adb devices just shows "List of devices attached" and nothing else. USB debugging was turned on and I can connect fastboot but not adb. Also when selecting an option from the notification "Connected only for charging", it doesn't save the option, leaving it at the default Charging option.
EDIT: i managed to fix it by disabling factory mode.

What does adb devices show? Is the phone detected in MTP or USB tethering mode? This might sound silly but did you absolutely made certain that USB debugging was not turned off or did not get turned off in the time during which you performed the diagnosis?

adb devices just shows "List of devices attached" and nothing else and yes usb debugging was turned on and i can connect fastboot but not adb. Also when selecting a option from the notification "Connected only for charging" it dosn't save the option leaving it at the default Charging option.

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

The issue is that when connecting the usb to the device adb dosn't connect to the phone, i can still charge it but i can't connect from adb to the phone. It shows me that the usb is connected on the device but adb just dosn't connect

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


text:
Why Mi Mover doesn't move apps but samsung smart switch can?
I move all apps to mi mover.

Some apps are moved
Another apps have a message "not installed"

This is weird. The whole point of using mi mover is so I don't have to reinstall all those apps one by one.
So I reinstall one by one.
Then I tried to move the apps again.
Now it seems to be working.
However, when I open whatsapp in the new phone I do not see my old whatsapp. I basically have to input my phone number again and uses back up again.
So basically it's useless.
I have to reinstall every app and move them like normal like usual.
So what's the point of using mi mover?
When I use samsung switch I think I got things moving quickly.
Why the differences?

If the app uses the AndroidKeyStore it can't be migrated because the cryptographic keys can't be extracted from the AndroidKeyStore, they can only be used on that device. If an app uses such a key to encrypt it's user data then migration will always fail.

I am quite sure I can move using samsung smart switch just fine.


text:
Can I disable Passpoint somewhere on the OS level (not GUI)
I'm using a version of Android for the Raspberry Pi and PasspointManager is causing the machine to crash and go into an endless boot loop.  Is there any suggestion for a way to disable Passpoint on the machine altogether?  A solution for any version above 10 and ideally 12 would be very helpful.  There is no menu option to disable Passpoint as on some devices.
The fact that it's a Raspberry Pi is not relevant other than to any other users with a similar issue, this is an AOSP question.  The following instructions are added in AOSP with no additional info on where to make the alterations within WifiManager:
"Conversely if device implementations do not include support for Wi-Fi Passpoint:
[C-2-1] The implementation of the Passpoint related WifiManager APIs MUST throw an UnsupportedOperationException."

I'm not sure if Raspberry Pi is critical to the issue (like, if there's a specialized Android ROM for RaspPi while this community might not have experience with that), but just FYI, we also have a sister site [raspberrypi.se].

Could probably be done via [tag:adb], if you've enabled that (see our adb tag-wiki) and know the package name. There are multiple ways to either disable (see e.g. here or even remove (see e.g. here) the app.

Thanks for your advice, Izzy!  I will look into that and report back if I find anything useful.


text:
SD Card formatting
Bought a 128G card I meant to use as mixed internal / portable (or 100% if not possible with mixed) on a

Galaxy-Xcover-4 (SMG390F)
Android version 9
Kernel 3.18.91
Not rooted (Though I could do it I guess, if there's any method and it is the only way to reach the goal).

First I tried to see if it was possible to do from Phone, but did not find any.
Then I did:
adb shell
sm set-force-adoptable true
sm partition disk:179,32 mixed 34
sm set-force-adoptable false

It got partitioned, but did not increase internal memory + using the elipsis on SD card view (Settings -> Device Care -> Storage -> SD Card) only crashed. Tried to reboot. But to no avail.
Then I deleted the partitions and re-inserted the card. It asked about formatting the card, and I did; but it is all portable. (I.e. System / Internal is not increased.)
Then I tried same adb session as above but with sm partition disk:179,32 private (I.e. use 100% of SD-card as internal). This also formatted SD-Card, but now it is not recognized at all.
Re-booted, but still the same.
Is there a way forth to make it increase internal storage?
The phone only have 15G natively and I am constantly pushing close to 100% usage.

If its becoming complicated I think you should mount bind somefolders in internal storage to folders in external storage and move the files to the respective folders or simply sysmlink them.

@Silent: One can do that on un-rooted device? Problem is apps. I have all media (including photos) on SD.

Could you mention the Android version and the encryption status? According to GSM Arena, looks like Samsung Galaxy Xcover 4 starts with Android 7.0 and is upgradable to Android 9.0. There's a warning on Android Developers that on devices encrypted with FBE on Android 7.0-8.1, external SD cannot be used as adoptable storage. Only since Android 9.0 that adoptable storage can be used with FBE.

@user3342816 actually it needs root sorry.

@AndrewT. It say "Android version 9" under Software information. (It does not say 9.0 though, but guess it is).

https://www.xda-developers.com/adoptable-storage-samsung-android-pie


text:
Why does Dalvik not support swap space?
I was asked this question and also explain why it is detrimental to the android system as a whole.
I have not found a web page which refers to this specific question about Dalvik and swap space. Any links would be appreciated or an explanation.
What I have answered is
Swap space is a method of using secondary storage of the device to free up RAM. This would not work on android as it is not guaranteed that a device would have secondary storage causing the application to crash.
It is also slow to read from external storage as Dalvik is a JIT compiler this may lead to the code being compiled at a rate which is effecting the users experience with the app.

An initial decision of Dalvik was not to support swap space. Explain what swap space is and
why it would be detrimental to the Android system as a whole.

Dalvik is the Android JVM (thus an program) and swap space is a feature of the OS. I a regular OS a program is never aware if it uses RAM or swap as the OS just provides memory. There are Android stock devices that are configured to have a small swap partition and of course a lot of custom ROMs make use of swap partitions. Therefore I am not sure what actually you are asking.

@Robert thanks for the reply and explanation, I will edit the question to include the  original question and exactly what was asked

As Robert said, saying that "Dalvik does not support swap space" does not make sense. Rather you can say that "Android does not support swap space". But it isn't true. Android is based on Linux kernel. And you can use a swap partition or swap file on Android exactly the same way as you'd do on a Linux PC. But you are correct in saying that Android devices by default do not use secondary storage for swap space. Instead engineers at Android decided to use ZRAM.

Some more details can be found in this answer and this comment.

"why it would be detrimental to the Android system as a whole". Quoted from the link I provided above: "embedded system normally are reluctant to use eMMC or SDCard as swap
because there is wear-leveling and latency issues" and "it sometime ends up making system very unresponsive caused by slow swap
storage performance".


text:
How do I block specific contact groups on an Android Note? On the weekend I don't want to be bothered by the 101 people taged in "workgroup"
How do I block specific contact groups on a Note 10 lite (Android version 10, UI 2.5)? On the weekend I don't want to be bothered by the 101 people taged in "Workgroup".
Basically, I don't want to be contacted on the weekend by "Workgroup",and still yet, receive texts and calls from outside of the blocked group (I want the ability to temporarily silence whole "groups" on my Android Note).

Could you [edit] and mention the specific device model and its Android version, possibly from Settings - About device (or similar menu)? We're not sure what model "Android Note" is.

Yes, thank you.


text:
How to extract boot.img from two ".bin" files (TF Flash Image)
I have got a TF Card flash image for my Hisense A6 (HLTE700T) and is trying to extract boot.img from it.
However, instead of payload.bin, two bin files are present in the zip file:
HLTE700T_TF (folder)
-- HLTE700T.bin (3.59GB)
-- HLTE700T_1.bin (1.00GB)

Those boot.img extract tools only accept one input and fails to extract the files. How can I extract boot.img?
Here's the TF card flash image if needed: Google Drive (Link UPDATED)

file says SysEx File (JEN) unknown file format. maybe it's easier to dump boot.img off device itself? I recommend python script edl.py (xxx.prog_emmc_ufs_firehose_Sdm660_ddr.elf can be downloaded here 1st link) your upload is corrupt btw don't use it

The link is updated and the uploaded file is no longer corrupt.

Extracting with QFIL worked well for me. Thanks for @alecxs 's advice!


text:
LG Stylus 2 k520DY not going to bootloader and fastboot

I have a LG Stylus 2 k520DY and I want to root it. the problem here is that I can't reboot it to bootloader and fastboot. the adb commands: `adb reboot bootloader` and `adb reboot fastboot` do not work. when I perform these commands, my phone just normally restarts.
Do you have any idea how I can fix this?
Is it even possible to get this phone to bootloader?

LG most likely disabled fastboot intentionally

Björn Kerler has some excellent low level tools with bootloader unlock options


text:
Can't do ethernet tethering while (wireless) charging the phone
I have a Google Pixel 4 XL with Android 12 stock OS, and I'd like to use it for ethernet tethering (for devices not supporting wifi). I'd also like to concurrently keep this type of tethering enabled and charge the phone when needed. However, because I can't charge it via USB-C cable while already connected to a RJ45 cable (though I'm using an adapter), I thought wireless charging, since it is supported, could solve the problem. But unfortunately it disables and blocks tethering until I put the phone off the wireless pad and re-plug the adapter. Is there a way to fix this (through Developer Options or else)?

Instead of wireless charging, you could try an USB-C adapter with an Ethernet and a PD (power delivery) port. So you can have LAN while charging at the same time. There's an ever increasing number of available products for these. Most of them also have USB-A ports in them. Be aware that incessant charging is bad for long term battery life.


text:
How to mount an Azure file share on Android?
I tried a couple of Android file explorer apps to mount an (SMB3) Azure file share, but I got an "Access Denied" error with each of them.
Does anyone know a solution?
I tried the most common File-Apps on PlayStore:

Cx File Explorer
File Manager
X-plore
AndSMB
CIFS Documents Provider

Authentication is with username and Azure storage account key based on the snippet provided by azure for Linux:
sudo mkdir /mnt/fileshare1
if [ ! -d "/etc/smbcredentials" ]; then
sudo mkdir /etc/smbcredentials
fi
if [ ! -f "/etc/smbcredentials/aname.cred" ]; then
    sudo bash -c 'echo "username=aname" >> /etc/smbcredentials/aname.cred'
    sudo bash -c 'echo "password=akey" >> /etc/smbcredentials/aname.cred'
fi
sudo chmod 600 /etc/smbcredentials/aname.cred

sudo bash -c 'echo "//aname.file.core.windows.net/fileshare1 /mnt/fileshare1 cifs nofail,vers=3.0,credentials=/etc/smbcredentials/aname.cred,dir_mode=0777,file_mode=0777,serverino" >> /etc/fstab'
sudo mount -t cifs //aname.file.core.windows.net/fileshare1 /mnt/fileshare1 -o vers=3.0,credentials=/etc/smbcredentials/aname.cred,dir_mode=0777,file_mode=0777,serverino

Which apps have you tried: do they claim to have SMB3 support because at Azure requires SMB 3.0 or 3.1 support? https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows What credentials have you used (e.g. pattern of user-name). Please edit your question and add those details.


text:
Is it possible to recover deleted files without root on Android 12?
I clicked the "free up space" button in Google Photos, and it deleted the original copies of all my photos and videos in the past 3 years. It happened on a non-rooted Galaxy Note 10 Plus (Android 12), about 120 GB worth of data, in the internal storage, /DCIM folder.
There are tons of discussions and tutorials on this topic, but they all seem outdated. Is it still possible to do data recovery in my case, being non-rooted? Is it even worthwhile to consider rooting the device (would probably wipe it in the process) then try to recover data after reset? After Google Photos deleted my original files, I shut down the devices immediately and have not turned it on ever since.

combination ROM with root shell is your only change, if device isn't encrypted FBE https://forum.xda-developers.com/t/is-it-possible-to-us-majisk-without-factory-resetting.4395617/post-86656619

google photos app has trash can - have you checked? also make sure not connect to internet as google photos might sync and delete all files from google drive, too. from PC web browser check https://photos.google.com

@alecxs I ran adb shell getprop ro.crypto.type it says file. So basically, "rooting it first (and wipe it in the process)" and then run file recover tool after root, is not a worthwhile approach? And being non-root, even adb cannot scan/dump the whole file system to recover files?

file = (FBE) file-based encryption, each file becomes unrecoverable instantly right in the moment of deleting (because each encryption key is secure deleted, too). recovery attempts only "make sense" on block = (FDE) full-disk encryption (or unencrypted devices). FDE of course only when block partition is NOT wiped during the process (unlocking bootloader + root with Magisk is no option). only combination ROM might worth a try (FDE). But afaik even flashing combination ROM requires some authorization nowadays (DID unlock token)

@alecxs Thanks! If I understood you correctly, file encryption is even more secure than block, because each individual file is encrypted with a different key, and deleting a file would secure wipe the key, so the actual file content is just gibberish, which means, even with root access, right after a file is deleted, no recovery is possible.

@alecxs which file encryption do poco x3 pro uses? i accidentally formatted device and want to recover files


text:
Mount ISO file in Android
I am trying to install SPEC CPU2017 benchmarks on an Android development board. SPEC comes with an ISO file. You're supposed to mount the ISO and run the install.sh script inside it. Otherwise, you get the following error.

Can't find the top of your CPU2017 tree!  Please change to the benchmark directory and run this program (./install.sh) again!

Unfortunately, I can't figure out how to mount the file in Android. I've tried the commands in this answer without any luck.
When I run mount -t iso9660 cpu2017-1.1.7.iso mountpoint -o ro,loop, I get the following message:

mount: 'cpu2017-1.1.7.iso'->'mountpoint': No such file or directory

I checked the kernel config and I've found that the CONFIG_ISO9660_FS options isn't set.
What are my options? Is it possible to mount the ISO? Is there any other way to install the SPEC CPU2017 benchmark suite?

A lot of tools can handle iso files like archives e.g. 7zip.

Welcome to Android Enthusiasts. I guess the first question is whether Android (not Linux) is supported or not, and it seems it's not that simple. I found How to run SPEC CPU 2017 on ARM platforms? that refers to SPECInt 2017 scores for ARM Cores (a76, a72, a57etc). Though, I don't think I can comment further about the process nor the result.

It certainly doesn't seem straightforward. Before running them though, I have to figure out how to install the SPEC benchmarks.

@vic You can try busybox which provides the mount command. But you cannot simply run any Linux program on Android. Many things are missing on Android or are different. Even if you can mount the iso you won't be able to install it because the system partition is read-only for example. So better give it up early instead of wasting time.

Does this answer your question? Is it possible to mount .iso files (virtual optical drive) on Android?

I've included in my original post that trying these commands does not work.

Related: Can't mount ISO in Android

Frame challenge: mounting the ISO on Android won't get you anywhere.
I took a look at the FAQ for SPEC CPU®2017, which makes it clear that the ISO contains source code, and you have to build the benchmark programs yourself. To do that, you need compilers and a linker, and apparently a Perl interpreter to run the benchmark suite. None of those programs are normally present on an Android device: this benchmark suite is meant for desktop or server computers, with software development tools installed.
Running these benchmarks will be a fair amount of work
If you want to run these benchmarks on Android, you'll need to do some work with build systems. Possibly quite a lot of work. You'll need to start by installing the benchmarks on a machine that you can use for Android development (Windows, Linux or Mac), and then build and run the benchmarks on that system to get the hang of working with them. Once you have done that, you can install the Android NDK and figure out how to build the benchmarks for Android. There are two obvious routes:

Adapt the makefiles that SPEC provide to work with the NDK compiler, linker, and so on. This is the route that I'd take, but I'm used to working with the Android command line in the ADB shell. That should let you build the individual programs. You'll need a Perl system to run the runcpu wrapper, or it may be easier to do that on your build machine and have it run the programs via adb shell.

Install the Android SDK as well as the NDK, and write an Android app that runs the benchmarks and presents their results. This is more work, but it gets you an Android app. However, you can't distribute that app without breaching SPEC's copyright on their benchmark source.

Look into SPEC's benchmarks for embedded computing
SPEC has recently added an Embedded Group which produces "industry-standard benchmarks for the hardware and software used in autonomous driving, mobile imaging, the Internet of Things, mobile devices, and many other applications."
These may well be easier to run on Android.


text:
Checking on Android OS for unauthorized access and the last connection of the charging cable to the phone
The question arises, how can I view the last attempt to connect the charger to the phone and also track the last attempt to select passwords and attempts of unauthorized access and authorization on Android 5.0 and older? If yes, how can I implement the receipt of this information in the form of an application.

Check Settings -> Battery if I remember correctly there should a battery graph on which you can identify the last charging.

Welcome to Android Enthusiasts. While running commands/scripts from end-users PoV is still on-topic, please note that app development is off-topic since Android Enthusiasts focuses on end-users or power-users (but not necessarily developers) solving their issues. It seems you have posted the same question on Stack Overflow which should be more suitable for app development issues (despite the quality issue as of currently written).

I agree too @Robert 's comment. However, AccuBattery does exactly what you want; show timestamps of all charging and discharging activities; it works from Android 5 all the way up to Android 13 Developer Preview (older than 5, I dont really think if there's any)


text:
Cannot disable the clipboard history feature on Samsung galaxy device
Samsung devices have a clipboard history feature which is a big security risk for people who use a password manager.
I have tried disabling the ClipboardSaveService package as described in the thread "Disabling the clipboard history on Samsung devices" but I am still able to see the clipboard history using the edge panel and the Samsung keyboard and I am not sure if disabling clipboarduiservice package will make any difference. Please tell me what other package do I need to disable so as to get rid of this non-sense clipboard history feature. Thanks.
Android Version: 12 (One UI Core 4.1)

So I found out a workaround. Please Backup everything before doing this!
Install openboard -> make it your default keyboard -> uninstall com.samsung.clipboardsaveservice using adb -> uninstall Samsung keyboard using adb and you’re done!
After doing this, copying things to clipboard doesn’t populate the edge panel clipboard list, which probably indicates that clipboard history feature is not working
OpenBoard on Play Store & FDroid

From review: Can you please edit your answer to provide a link to openboard?

did you try it with other 3rd-party keyboards? i'd say the keyboard app doesn't matter, the main piece is to uninstall Samsung standard keyboard


text:
Squeaky voice with Microsoft Teams on eOS and iodéOS
On both Android phones I own (all systems up-to-date), MS Teams calls are not usable, since the caller voices are all squeaky. I have the impression that a compression algorithm in the background is not doing its job properly.
The phones are a Fairphone 4 (with the latest eOS) and a Fairphone 3 (with the latest iodéOS). The problem occurs every time someone calls, both with and without video. Everything else seems to be working fine, just voice is unusable.
Some internet searches reveal that the issue might not be related to MS Teams itself, but I doubt that, since normal calls and VOIP works just fine. So the question is: is there a workaround, some package that I’m missing, or is MS Teams plainly incompatible with de-Google-d operating systems?

Welcome to Android Enthusiasts. I don't use MS Teams, but I can't think of what Google components have anything to do with voice calls/transmission. Also, if that's the case, then there may be other reports of users using custom ROM (without flashing Google apps) and MS Teams.

You're right; usually, software relying on Google APIs (mostly Google Play, actually) just plainly doesn't work. It just baffles me entirely why everything else is working just fine. Plus, when I still had FairphoneOS on both smartphones, MS Teams did work, too.


text:
How to install TWRP on Huawei Honor 8 FRD-L14?
I have tried rooting my FRD-L14 yesterday. I have successfully unlocked the bootloader, OEM, FRP, and developer mode on the phone to install TWRP. I have also installed ADB (with corresponding drivers like fastboot like the usual). I have inputted the usual flashing command through fastboot:
.\fastboot.exe flash recovery .\twrp-{version_name}-frd.img

However, after trying to flash both TWRP versions 3.6.2 & 3.0.2-0 (as shown in a video guide to install TWRP on FRD), I am always stuck on the "Your device is booting now..." screen when entering recovery mode either through ADB or [power] + [Vol Down] buttons. I have to always press down [power] + [Vol Up] buttons in order to do a regular boot. I have already spent countless hours trying to look for a solution to install TWRP rather than giving up.
Some of the websites that I have browsed through seems to have a custom TWRP that is fit for FRD-L14 but unfortunately, the download links seem to have expired already.
XDA Developer Link with no solutions on continuing to install TWRP
Expired Custom TWRP Link Page
Link where I get my official TWRP downloads
My phone is a FRD-L14C567B402 (USA only) running on Android 7.0 Nougat with Hisilicon Kirin 950 processers and EMUI version 5.0.4....
Current Plans:
I am planning to download every single TWRP version on the Official TWRP website for FRD and try every single one of them... If this fails, I am not sure how to successfully install TWRP
Any other suggestions or solutions to solving this problem? Thanks in advance!

I recommend to start with reading error message from fastboot flash recovery ;)

I am not sure how to enable error message while flashing the .img to the recovery through fastboot since I did not get any error messages while doing that!


text:
How to get fastboot identifier token to unlock bootloader on HTC One M9 where Android is no accessible?
I want to revive an old HTC One M9 rotting in my grandmothers locker for some years. I would like to flash the phone with a custom ROM but unfortunately it is locked,

so I can't access Android.
However according to the HTC documentation to unlock the boot loader on has to enable developer options in Android settings first:

you will need to first manually enable OEM unlocking in Developer
options in order to allow the bootloader to be unlocked and proceed
with the next steps.

Apparently without doing so it is not possible to get the identifier token which is needed to unlock the bootloader.
fastboot oem get_identifier_token
< waiting for any device >
                                                   (bootloader) [KillSwitch] : /dev/block/bootdevice/by-name/frp
(bootloader) [KillSwitch] Last Byte is 0X00, disable unlock
(bootloader) [KillSwitch] oem unlock Turn Off!
OKAY [  0.063s]
Finished. Total time: 0.063s

Is there any way to unbrick this phone?
UPDATE:
As suggested in the comments I tried to flash

the original RUU ROM to restore a proper state

I got it here: https://htcstockrom.com/htc-one-m9
The following steps are suggested:

Enter: fastboot oem rebootRUU
Now enter: fastboot flash zip update.zip
Once the installationis finished, reboot the device.

However fastboot oem rebootRUU makes the device humming and blinking but does not lead to a status where I could successfully upload the file (same problem described here):
https://www.youtube.com/watch?v=VVG4kT-LiQQ&feature=emb_rel_end
I can upload it in normal download mode but there I get:
FAILED (remote: '9 RU_SECURITY_FAIL zip from usb command in download mode')
fastboot: error: Command failed

The whole process is well documented by HTC for their devices: https://www.htcdev.com/process

@Robert I know, I followed the steps but the device is locked, so I can't make the configurations within Android settings, which are required to get an identifier which is needed to unlock the boot loader.

The problem is not that it is locked but that the installed software has been modified unauthorized. So you first have to flash an original RUU ROM to restore a proper state, then boot the phone and enable OEM unlock.

@Robert Thanks for the good advice! I updated the question...

The MMO TOOL HTC Module has a feature to get token ID.

You may have to search it by yourself to download it.

Please explain a little bit about it.


text:
copy play services from one device to another
I have an Android device (fire tablet) without playstore/playservices. By googling, I found tons of howtos to download and install the 4 necessary apk packages. Since I have several "offcial google" devices, I thought if it isn't possible to just download the apks from one of them, so I don't have to read a lot to find our which download source is trustable.
While I know how to list all installed packages and also how to adb pull them, I only found

com.google.android.gsf
com.google.android.gms
com.android.vending
but not com.google.android.gsf.login in the list retured by pm list packages.

Is this package somehow protected and hidden or where could I find it?

Google play service requires system permissions which means it can not be installed like an app. You need to install it as system app in recovery which requires a device with unlocked bootloader. In that case you can simply use a package from OpenGApps.org to install all Google apps and services you want.

I should have mentioned that the device is a fire tablet. According to the web, it is possible to just install the .apks downloaded from somewhere. I wanted to give it a try using my already existing ones from my trusted phones, but can't find the .login apk. :(

In my opinion it would make more sense to strictly following the tutorial you have and download the APK files (especially as the tutorials I have seen require certain versions of the APKs to be installed, not the latest version) . Before installing them you can verify their authenticity by comparing the signature certificate hash of one Google Playstore APK from your device and the hashes from the downloaded files. How to do so is explained here.

Checking the certificate is a very good idea, I think I will go this way. Thank you for the suggestion. Still wondering that I don't find this one apk on my devices, it seems to be quite special.


text:
SimpleSSHD Missing SCP?
I successfully got SimpleSSHD running on my OnePlus 7T and I can SSH into the phone fine and I can also connect using WinSCP.  However, whenever I try to transfer a file, I get an error 127, which apparently means the scp command wasn't found.  I can confirm from the CLI that it thinks scp doesn't exist.  But does that not come with SimpleSSHD?  Am I missing something with the installation?  I should add, I am transferring files to /sdcard/*

After talking with the app author, it sounds like it's an issue that may not get resolved, but he confirmed that he had to do some funny stuff to get scp working and the Android updates have probably broken it.  So I ended up using Termux instead and wrote some documentation on it, in case anyone comes across this later.
Termux Android SSH Server Setup
SSH Setup

Download and install Termux on the phone

Enable File Storage permissions for the app (I had to manually do this)

Start the app and run these next steps in the app

Install dropbear and openssh
pkg upgrade
pkg install openssh
# When OpenSSH asks about overwriting your local config file, answer N to keep the local file

Run the command passwd to generate a login pasword

Start the SSH server
sshd

NOTE To Stop the SSH server, run this pkill sshd

Ref: https://www.crisisshelter.org/install-ssh-in-termux-openssh/
Key-based Auth Setup (Windows)
Generate Keys

Download https://www.puttygen.com/

Run puttygen

Select:

RSA
Bits: (2048 or 4096 for better encryption)

Click Generate

Wiggle mouse in blank space of program

Copy the public key for pasting into OpenSSH authorized_keys file and save it to a file named authorized_keys

NOTE: Output should look like this
ssh-rsa 1231AD_REALLY_LONG_KEY_HERE_FG123= rsa-key-20220806

Save the private key as id_rsa.ppk

Send Public Key to Phone

Connect to the phone's IP using WinSCP on port 8022
Enter a blank username and then the password set above
Manually change to $HOME/.ssh/authorized_keys (Note, the location of the home directory may be different so use what your path shows)
Transfer the authorized_keys file created above to this folder

Setup Key in Kitty/Putty

Setup the SSH connection as usual, being sure to use port 8022 and the phone IP
Go to Connection->SSH->Auth and select the id_rsa.ppk file saved from puttygen
Be sure to go back to Session to name and save the connection
Click Open to connect
Hit enter to skip the username and it will use the certificate to authenticate

Setup Key in WinSCP

Setup a New Site using the option at the top of the connection list
Select SCP as the file protocol
Enter the phone IP and port 8022
Click Advanced and navigate to SSH->Authentication
Select the id_rsa.ppk generated from puttygen and click OK
Click Save and name the connection
Click Login
Click OK to bypass the username prompt and it will use the certificate to authenticate

Disable Password Authentication

After ensuring you can login using the certificate, log back into the phone using SSH

Edit the sshd config file
nano $PREFIX/etc/ssh/sshd_config

Modify the following line to this setting:
PasswordAuthentication no

Save changes and exit with CTRL+X

For good measure, set the password to some random password
passwd
# Enter some RANDOM_STRING

You can exit the shell session now

Termux Logs
SSH daemon does logging to Android system log, you can view it by running logcat -s 'sshd:*'. You can do that either from Termux or ADB.
Ref: https://wiki.termux.com/wiki/Remote_Access


text:
How to flash boot partition from the phone itself?
I already have Magisk installed by patching boot_b — the current boot partition. Therefore I have root privilege and can access it through the su command in Termux. The issue is that when I update LineageOS through OTA, it also updates the boot image, so I lose Magisk every time I update. And so, I need a computer to install it back every time I update (that is, every week or so).
I'm trying to get away with installing Magisk from the phone right after the update while I'm still on the rooted partition.
I've successfully extracted the updated boot_a partition using cp /dev/block/by-name/boot_a /data/data/com.termux/files/home/storage/documents/boot_a.img, patched it though Magisk, and now I'm trying to flash the patched image back with dd if=/data/data/com.termux/files/home/storage/downloads/magisk_patched-25200_FyF2V.img of=/dev/block/by-name/boot_a
But it says that operation is not permitted and refuses to do the thing:
dd: /dev/block/by-name/boot_a: write error: Operation not permitted
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.002583 s, 0 B/s

I find it strange since there are posts (1, 2) where people managed to do the same.
Again, I'm running the command in a root shell given by su. And, as you can see, the files' permissions are set to rw for the root owner:
# ls -l /dev/block/by-name/boot_a /dev/block/mmcblk0p38
lrwxrwxrwx 1 root root       21 1970-07-16 15:34 /dev/block/by-name/boot_a -> /dev/block/mmcblk0p38
brw------- 1 root root 259,   6 2022-08-31 22:02 /dev/block/mmcblk0p38
# whoami
root

I've also set SELinux to permissive just in case, but it didn't help either:
# getenforce
Permissive

I've also found a great story in two questions (1, 2) from someone with a somewhat similar problem, and they determined it was the lack of some linux capabilities that stopped them from chrooting. So, I've also tried to find if I lack some "capability" to dd, and it seems I indeed don't have any capabilities on the toybox binary, which provides dd. Although, I have all 38 capabilities for the current process (the shell):
# ls -l `which dd`
lrwxrwxrwx 1 root root 6 1970-07-16 15:34 /system/bin/dd -> toybox
# getcap /system/bin/dd
# getcap /system/bin/toybox
# getcap /dev/block/by-name/boot_a
# getcap /dev/block/mmcblk0p38
# cat /proc/self/status | grep Cap
CapInh: 0000000000000000
CapPrm: 0000003fffffffff
CapEff: 0000003fffffffff
CapBnd: 0000003fffffffff
CapAmb: 0000000000000000
[ThisOneRan@PC]$ capsh --decode=0000003fffffffff
0x0000003fffffffff=cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read
# cat /proc/sys/kernel/cap_last_cap
37

So, I've tried to set cap_dac_override for the /system/bin/toybox binary, but couldn't — it is read-only:
# setcap cap_dac_override+ep /system/bin/toybox
Failed to set capabilities on file `/system/bin/toybox' (Read-only file system)

Form running mount | grep system it turns out that not the system itself is mounted, but... Magisk's system_root bloack device to eash individual binary and stuff. So, I have remounted toybox as rw:
# mount | grep toybox
/dev/DBScy/.magisk/block/system_root on /system/bin/toybox type ext4 (ro,seclabel,relatime)
# mount -o remount,rw /dev/DBScy/.magisk/block/system_root /system/bin/toybox
# mount | grep toybox
/dev/DBScy/.magisk/block/system_root on /system/bin/toybox type ext4 (rw,seclabel,relatime)

This allowed me to setcap all capabilities:
# setcap all+ep /system/bin/toybox
# getcap /system/bin/toybox
/system/bin/toybox =ep

But even with this, I'm still not permitted to flash the boot image:
# dd if=/data/data/com.termux/files/home/storage/downloads/magisk_patched-25200_FyF2V.img of=/dev/block/by-name/boot_a
dd: /dev/block/by-name/boot_a: write error: Operation not permitted
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.001446 s, 0 B/s
# dd if=/data/data/com.termux/files/home/storage/downloads/magisk_patched-25200_FyF2V.img of=/dev/block/mmcblk0p38
dd: /dev/block/mmcblk0p38: write error: Operation not permitted
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000779 s, 0 B/s

At this point I've no idea what else to try, or where my obvios mistake could be, so please help me figure it out. Thanks in advance!

Strange, but after a reboot to the same prefix, it allowed me to flash it without any "capabilities" and with enforcing SELinux. And everything worked perfectly as intended. I've no idea what caused it to not work on the first try, maybe I had to restart the shell?
Anyway, to boot into the same prefix on the next re/boot, you should set the active boot slot using bootctl set-active-boot-slot `bootctl get-current-slot`


text:
Check IP details via Android Terminal App in Android 13
Seems that Android 13 doesn't allow any more access to /system/bin/ip command.
I tried to list the connected hotspot devices via ip neigh [1].
The error message is:

Cannot bind netlink socket: Permission denied

Is there any way to fix that issue in Android 13?
So far I tried it with the following terminal apps

Temux v0.101 v0.118.0 (via F-Droid)
Terminal Emulator for Android v1.0.70

[1] How to view devices connected to hotspot on Android?

Termux in Google PlayStore is no longer updated (because of Google restrictions), you should switch to Termux F-Droid version.

@Robert I don't think the Google Play version is kind of related here since it's still possible to do what the OP wants on Android 12, but I could be wrong...

That said, does calling ip command without flags return anything? (the screenshot shows a typo neith, which would show Object "neith" is unknown, try "ip help" on Android 12)

Deinstalled Termux and updated to v0.118.0. Now the command ip returns, that it is not installed, and I can do that via iproute2 or termux-tools package. I'll try that now...

@AndrewT. now /data/data/com.termux/files/usr/bin/ip comes with the same error: Cannot bind netlink socket: Permission denied.

@AndrewT. in Android 13 with the iproute2 package man ip and the search for ip neigh says: Shows the current neighbour table in kernel.

The error comes because the bind call fails. Most probably it's due to the restricted SELinux policy as was the case with UNIX domain sockets. You can try to check AVC denials in kernel log. Hopefully it'll still be working on ADB shell.

Google has removed the possibility to bind netlink socket to retrieve arp table from targetSdkVersion 30 through SELinux policies. If you have root, you can disable SELinux policies and it will work, giving the command su -c setenforce 0 when you're done with ip neigh command, I suggest you to enforce SELinux policies again with command su -c setenforce 1
Without using bind function, I've made a library that does a workaround that consist in sending via netlink socket a type message not listed (30) and then I've used the socket receive to see which data system returns to that socket. From that, I've noticed that the received data was the arp table.
You can find more here https://github.com/fulvius31/ip-neigh-sdk30/blob/main/ipneigh30/src/main/cpp/ip_neigh.c

@fulvius31 is your library implemented in any public app?

Yes. Mine called WeeNet link

@fulvius31 I can't get your library to work when the targetsdkversion is set to 32 or above and being run on Android 13 device. The message "socket send failed" is being shown in Logcat.

@Dieter27 I can confirm that the library does not work with Android 13 and targetSdk setted to 32 otherwise it works.


text:
dumpsys battery in Termux
I am trying to get battery info in Termux.
I granted android.permission.DUMP and android.permission.PACKAGE_USAGE_STATS via ADB for com.termux (Termux app)
Then I opened Termux and types in /system/bin/dumpsys battery. It displays this error message:
Can't find service: battery

and exits with code 0.
I can confirm that I can get those info via ADB using the same command (e.g. getting battery level with /system/bin/dumpsys battery | grep level)
Am I missing some permissions for Termux app? Or are there some more fixes? Please help.
Edit: I am aware of the existence of termux-battery-status command in Termux. It's output is not too informative. So I will not accept answers telling me to use the command.

It's restricted by SELinux. Apps cannot access u:object_r:battery_service:s0 context.

So this has no workaround?


text:
Download file from Android shell
I am making a shell script for Android to run on ADB, however, the script should download a file. Commands like wget and curl aren't available in /system/bin. Here are a few possibble solutions that I thought of, each with its cons:

Rooting and installing BusyBox (my target systems are rootless)
Downloading file in computer using wget or curl then transferring the file to Android with adb push (the script should be ran on Android, not the computer connected to it)
Downloading wget or curl in Android (how can I download a binary without them in first place???)
Termux (nope, my script sets some settings in Android which Termux can't)

Is it even possile? If yes, how?

Why don't you just include an HTTP library in your command-line program and download the file yourself? You are developing a command-line program not a shell script.

I am developing a shell script. I will make edits to clarify

Put your busybox or wget or curl binary in /data/local/tmp/ and execute from there. Simple.

You have two options.

Install Termux, which supports curl.

Use your option number 2. adb push simply copies the file (unlike adb install, which looks for an apk file and tries to install it on the device).

Since you say that you are writing a shell script, you will have to install an Android terminal and (presumably) a Linux environment anyway.
You say "my script sets some settings in Android which Termux can't." If you need root access for an app, you may get what you need using Magisk.


text:
/sys/class/net on Android 12
Recently, I bought a new phone with Android 12. This command worked on Android 10 (just Termux, no ADB, no root):
cat /sys/class/net/wlan0/statistics/rx_bytes

but failed on Android 12.
Any work arounds without root? Only shell commands are accepted, not Java/Kotlin and such.

Apps cannot access /sys/class/net/. It's restricted by SELiux policy.

So, you mean it is impossible (without root) and no workarounds?

To my knowledge, yes. Not even ADB shell can read sysfs. There are Android APIs you may use to get network stats.

What Android APIs can I use? Best if it is not battery consuming and it must be ran through the command line.

See NetworkStatsManager.


text:
Google Sign-in Alert: Hide Android Model Name
I want to sign-in my Google account on my Android phone (not only Chrome). The rest is said in title.
When signing in with Android, Google emails me the sign-in alert: a new sign-in on [device name]. In contrary, on Windows, it's only a new sign-in on Windows. How to hide my exact phone model such that it shows a new sign-in on Android instead?
I'm rooted, so it may be easier to do so.

Those emails are generated on Google servers, they are part of your Google account which means they are totally unrelated of Android.

I know. Except, the device model name is from Android itself. If I can change that, then I've hidden my real model name.

I'm unsure if hardcoding it as "Android" is possible. While I don't know how Google names it, they may be using their own device list mapping for the Play Store.

So can i spoof as specific device? Like, for example, S22 Ultra?

By changing the product model on the build.prop file (need root access) perhaps (not confirmed, no devices to test). Maybe changing to an unlisted product model may achieve something else, though Android apps might not behave as expected if they depend on the value of the product model.


text:
Mtkclient | mediatek phone won't boot into brom/boot rom mode
I downloaded mtkclient from the GitHub and followed the installation instructions but when I plug my phone in after running the command it never recognizes my phone. I've tried all different types of button combos and none seem to work. My phone is a Moto g 5g 2022 codenamed Austin and it is a mediatek dimensity 700.

When talking about tools like "mtkclient" that are not part of Android or Android SDK please always include the lik to the tool in your question. You should also explain detail at which step your phone is not recognized.

Ok yes, so my phone is not being recognized during the part where it says to plug your phone in and hold the buttons down. Nothing happens.

This is due to Motorola disabling the ability to boot into brom mode on newer Mediatek devices. I have the Moto G 5G 2022(Metro PCS) and I have unlocked the bootloader and rooted with Magisk, I think that the issue is due to a setting on the kernel command line, but I have been unable to recompile the kernel so far, so I can't be 100% sure. Long story short, as of right now the only way I know for sure to get into brom mode is to crack open the case and ground some test points, but since I have no idea which ones to do I would highly recommend against this.

have you found any custom roms or gsis that work with this phone? I tried some but they lacked any good features that im looking for. would like a pixel experience


text:
Process has died: cch CACC
I have a 32-bit app that is crashing on an LG-H872.  When I look at the logcat output, I see
I ActivityManager: Process my.app (pid 18816) has died: cch  CACC
W cr_ChildProcessConn: onServiceDisconnected (crash or killed by oom): pid=18816

What does cch  CACC mean?

This log is posted when a process is killed due to out-of-memory (OOM). It is accompanied by 2 codes: the OOM adjustment level and the process state.
The relevant code from ActivityManagerService:
reportUidInfoMessageLocked(TAG,
  "Process " + app.processName + " (pid " + pid + ") has died: "
  + ProcessList.makeOomAdjString(setAdj, true) + " "
  + ProcessList.makeProcStateString(setProcState), app.info.uid);

The following is the list from the AOSP source code for the OOM adjustment level and the process state.
OOM adjustment level

Message
Code
Explanation

cch
CACHED_APP_MIN_ADJ
This is a process only hosting activities that are not visible, so it can be killed without any disruption.

svcb
SERVICE_B_ADJ
The B list of SERVICE_ADJ -- these are the old and decrepit services that aren't as shiny and interesting as the ones in the A list.

prev
PREVIOUS_APP_ADJ
This is the process of the previous application that the user was in. This process is kept above other things, because it is very common to switch back to the previous app.  This is important both for recent task switch (toggling between the two top recent apps) as well as normal UI flow such as clicking on a URI in the e-mail app to view in the browser, and then pressing back to return to e-mail.

home
HOME_APP_ADJ
This is a process holding the home application -- we want to try  avoiding killing it, even if it would normally be in the background,  because the user interacts with it so much.

svc
SERVICE_ADJ
This is a process holding an application service -- killing it will not have much of an impact as far as the user is concerned.

hvy
HEAVY_WEIGHT_APP_ADJ
This is a process with a heavy-weight application.  It is in the background, but we want to try to avoid killing it. Value set in system/rootdir/init.rc on startup.

bkup
BACKUP_APP_ADJ
This is a process currently hosting a backup operation.  Killing it is not entirely fatal but is generally a bad idea.

prcl
PERCEPTIBLE_LOW_APP_ADJ
This is a process bound by the system (or other app) that's more important than services but not so perceptible that it affects the user immediately if killed.

prcm
PERCEPTIBLE_MEDIUM_APP_ADJ
This is a process hosting services that are not perceptible to the user but the client (system) binding to it requested to treat it as if it is perceptible and avoid killing it if possible.

prcp
PERCEPTIBLE_APP_ADJ
This is a process only hosting components that are perceptible to the user, and we really want to avoid killing them, but they are not immediately visible. An example is background music playback.

vis
VISIBLE_APP_ADJ
This is a process only hosting activities that are visible to the user, so we'd prefer they don't disappear.

fg
FOREGROUND_APP_ADJ
This is the process running the current foreground app.  We'd really rather not kill it!

psvc
PERSISTENT_SERVICE_ADJ
This is a process that the system or a persistent process has bound to, and indicated it is important.

pers
PERSISTENT_PROC_ADJ
This is a system persistent process, such as telephony. Definitely don't want to kill it, but doing so is not completely fatal.

sys
SYSTEM_ADJ
The system process runs at the default adjustment.

ntv
NATIVE_ADJ
Special code for native processes that are not being managed by the system (so don't have an oom adj assigned by the system).

(integer number)
(none)
Value when it is below the lowest defined level (NATIVE_ADJ = -1000)

Process state

Message
Code
Explanation

PER
PROCESS_STATE_PERSISTENT
Process is a persistent system process.

PERU
PROCESS_STATE_PERSISTENT_UI
Process is a persistent system process and is doing UI.

TOP
PROCESS_STATE_TOP
Process is hosting the current top activities.  Note that this covers all activities that are visible to the user.

BTOP
PROCESS_STATE_BOUND_TOP
Process is bound to a TOP app.

FGS
PROCESS_STATE_FOREGROUND_SERVICE
Process is hosting a foreground service.

BFGS
PROCESS_STATE_BOUND_FOREGROUND_SERVICE
Process is hosting a foreground service due to a system binding.

IMPF
PROCESS_STATE_IMPORTANT_FOREGROUND
Process is important to the user, and something they are aware of.

IMPB
PROCESS_STATE_IMPORTANT_BACKGROUND
Process is important to the user, but not something they are aware of.

TRNB
PROCESS_STATE_TRANSIENT_BACKGROUND
Process is in the background transient so we will try to keep running.

BKUP
PROCESS_STATE_BACKUP
Process is in the background running a backup/restore operation.

SVC
PROCESS_STATE_SERVICE
Process is in the background running a service.  Unlike oom_adj, this level is used for both the normal running in background state and the executing operations state.

RCVR
PROCESS_STATE_RECEIVER
Process is in the background running a receiver.   Note that from the perspective of oom_adj, receivers run at a higher foreground level, but for our prioritization here that is not necessary and putting them below services means many fewer changes in some process states as they receive broadcasts.

TPSL
PROCESS_STATE_TOP_SLEEPING
Same as PROCESS_STATE_TOP but while device is sleeping.

HVY
PROCESS_STATE_HEAVY_WEIGHT
Process is in the background, but it can't restore its state so we want to try to avoid killing it.

HOME
PROCESS_STATE_HOME
Process is in the background but hosts the home activity.

LAST
PROCESS_STATE_LAST_ACTIVITY
Process is in the background but hosts the last shown activity.

CAC
PROCESS_STATE_CACHED_ACTIVITY
Process is being cached for later use and contains activities.

CACC
PROCESS_STATE_CACHED_ACTIVITY_CLIENT
Process is being cached for later use and is a client of another cached process that contains activities.

CRE
PROCESS_STATE_CACHED_RECENT
Process is being cached for later use and has an activity that corresponds to an existing recent task.

CEM
PROCESS_STATE_CACHED_EMPTY
Process is being cached for later use and is empty.

NONE
PROCESS_STATE_NONEXISTENT
Process does not exist.

??
(none)
Default value when the code is not in the list.


text:
Get location on screen of pop-up box
In an automated test I'm trying to perform against a Nexus 5X, this pop-up prompt (in this case, Magisk asking about granting superuser permission) will show up periodically throughout the test.  To make it go away, I have to click a button on the pop-up.  I've tried to get it to stop prompting me but it to no avail.  The easiest solution seems to be to start a side thread in my test that checks the screen every second or so to see if the pop-up is present.
I thought that running
uiautomator dump

while the pop-up was on screen would give me the pixel location of the button to press.  However, I scanned the resultant XML file and didn't see the text of the pop-up anywhere.
Also, running uiautomator displayed
ERROR: null root node returned by UiTestAutomationBridge.

Is there another tool I can use the get the pop-up's location?

So long as you are running your automated tests, why not tell Magisk to be out of your way? In Magisk settings there is an option called "Automatic Response". Set it to Deny or Grant and the popup won't appear ever. Have you tried this approach?

The only options I see in "Settings" are Themes, Language, Update Channel, DNS over HTTP, and Download path.

I have Magisk v25.2. There are four sections in the Settings: Customization, App, Magisk, and Superuser. In Superuser section the option "Automatic Response" is listed.

I also have 25.2 and only have two sections: Customization and App.

Have you tried swiping up in Magisk settings? Magisk's source code does show that setting. See https://github.com/topjohnwu/Magisk/blob/master/app/src/main/res/values/strings.xml#L161 So either you are not using the genuine Magisk app from GitHub or you have not swiped up on the Settings  to find the aforesaid option.

Swiping up doesn't help.  I'll try re-downloading the app and rooting again.

I re-download and re-installed Magisk 25.2.  Same settings.  However, at the bottom of the main page of Magisk (not in settings), I see icons named "Home", "Superuser", "Logs", and "Modules".  However, "Superuser" and "Modules" are grayed out.


text:
Port-forwarded connection (adb) being reset
I'm connected to an Android phone (being hosted on OpenSTF) via adb and have run
$ adb reverse tcp:34567 tcp:34567

adb reverse --list confirms that the command was successful.  I've also got an HTTP server listening on my computer at 127.0.0.1:34567.  I've compiled a simple C program which creates a socket connection to 127.0.0.1:34567, sends a GET request, and then calls read on the socket.
When I run the program on the phone, it successfully connects and I'm able to send my request.  However, read fails with

Connection reset by peer

Running Wireshark on my computer shows no TCP packets on port 34567 (I'm listening on the any "interface").
Am I missing something obvious?  It's strange that the connection succeeds but that no packets reach my computer.
I don't have the issue if I connect a phone to my computer directly (i.e., via USB).

Is the PC running Windows? Not sure if localhost is covered by the "any" interface. AFAIR localhost is very special on Windows and Wireshark wasn't able to capture it at all, I think that changed with the latest major version of WinPcap so if you want to capture localhost make sure to use the latest versions of Wireshark and WinPcap and select the localhost interface for capturing. On Android side start with a standard program like telnet (e.g. in a Termux shell) instead your custom app.

No, this is a Linux PC.


text:
Start Chromium at web page with ActivityManager
I've got Chromium 106 installed on my phone and can successfully launch it via
$ adb shell am start -n org.chromium.chrome/com.google.android.apps.chrome.Main

However, when I try to bring up a specific page at launch time with
$ adb shell am start -n org.chromium.chrome/com.google.android.apps.chrome.Main -d http://127.0.0.1:8080

(I've got a web server running on port 8080 on my host with reverse TCP forwarding set up.)
the app doesn't launch but I get the error
Starting: Intent { dat=http://127.0.0.1:8080 cmp=org.chromium.chrome/com.google.android.apps.chrome.Main }
Error type 3
Error: Activity class {org.chromium.chrome/com.google.android.apps.chrome.Main} does not exist.

Is this not the right way to use am with Chromium?
Note: The command works if I run under su -c.

Try changing the activity name to org.chromium.chrome.browser.ChromeTabbedActivity and put the URL in double quotes. Source: https://android.stackexchange.com/a/241012/96277

You mean org.chromium.chrome/org.chromium.chrome.browser.ChromeTabbedActivity?  Same error.


text:
am start of Chrome: Activity class does not exist
I've downloaded Chrome 106.0.5249.79-524907934 from APKMirror and installed it (along with the corresponding Trichrome package) on a Pixel 5a via
$ unzip com.android.chrome_106.0.5249.79-524907934_8lang_11feat_..._apkmirror.com.apkm
$ adb install-multiple -r -d *.apk

So far, so good.  However, when I try to start the app via
$ adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main -a android.intent.action.VIEW

I get
Error type 3
Error: Activity class {com.android.chrome/com.google.android.apps.chrome.Main} does not exist.

Running adb logcat at the same time shows
W PackageManager: Intent does not match component's intent filter: Intent { act=android.intent.action.VIEW flg=0x10000000 cmp=com.android.chrome/com.google.android.apps.chrome.Main }
W PackageManager: Access blocked: ComponentInfo{com.android.chrome/com.google.android.apps.chrome.Main}

I just tried the command on Pixel 3a, Android 12 and it succeed. Could you open Chrome manually? Otherwise, check if Chrome is disabled or not, because it returned the same error when I disabled it.

I can load it manually.


text:
adb fails to authenticate but still connects
I'm connecting to a phone on OpenSTF via adb.  Running
$ adb connect <url>:<port_no>

produces the message
failed to authenticate to <url>:<port_no>

However, adb devices shows the device and I can interact as expected with the phone.  What does the authentication failure mean and should it concern me?

Looks like sometimes the adb tooling changes.
I doubt you have had an old adb running in background that was still connected but try adb kill-server.
A new connect failed but an old connection is still open.
As for me, the pubkey has to be renewed on STF sometimes so remove it from OpenSTF and add your adb pub key (~/.android/adbkey.pub) again (even or especially when it tells you the key already is registered!).

No, good.  Same message.

If you're connected to the phone via USB, you may need to run
$ adb tcpip 5555

See https://developer.android.com/studio/command-line/adb#wireless

I can connect to it without problem.

Could please write your environment?

Do you mean my environment variables or my OS info?

I want to know how your phone is connected to your pc.
Failed to authenticate message means that the phone doesn't provide permisstions to wifi debug - wifi adb

I'm on a VPN connecting to the phone via an OpenSTF web GUI.

I understand how the phone is connected to the network, but I also need to understand how the phone is connected to the host.
Can you show the output of adb devices command on the host?

some.url.lan:20973  device

So you don't have access to the pc to which the phone is connected?
So could you please describe your connection scheme like:
phone with adb wifi (or adb usb with tcpip open port) <--> host pc with OpenSTF <--->  VPN network <---> Client with web gui

That I don't know.  I don't have physical access to the phone.

So I suppose that this is the reason: I mean that initially adb debug access of the phone to pc wasn’t granted.
 While connecting the phone you should grant an access to pc.

After running adb tcpip 20973 and reconnecting, I get the same message.

This command should be executed on the pc where the phone is connected. It is needed to open the debugging port

Ah, I see.  I'll ask the person in charge of the phone to give it a try.


text:
How do I create a new route table on rooted Android?
On Linux I can type something like echo 202 my_table >> /etc/iproute2/rt_tables and voila, I can use my_table in commands like ip route add 1.1.1.1 dev eth0 table my_table.
But my rooted Android phone doesn't have /etc/iproute2. And even if I create this directory (mkdir -p /etc/iproute2/), then echo 202 my_table >> /etc/iproute2/rt_tables and run ip route add 1.1.1.1 dev eth0 table my_table I get :
Error: argument "my_table" is wrong: "table" value is invalid

How to create and delete route tables on Android?

It's /data/misc/net/rt_tables on Android. But Android's limited ip command doesn't read rt_tables at all. You need to build iproute2 package. Be noted that routing on Android is far complex than normal Linux distros.

@IrfanLatif Can you point to some documentation on routing on Android works?

As was pointed out in the comments, Android doesn't use /etc/iproute2/rt_tables.
You can, instead of a name, use a new table ID number.  E.g.,
ip route add 1.1.1.1 dev eth0 table 10


text:
Boot image blocked by OEM lock
I'm attempting to root a Samsung Galaxy A20s (Android 10).  I've already patched the boot image with Magisk and enabled "OEM Unlocking" in Developer Options.  I ran
adb reboot fastboot

However, when it reboots, fastboot devices shows no devices.  Looking online, I found the odin4 utility and attempted to flash the phone by
tar cf boot.tar boot.img
./odin4 -b boot.tar

However, it failed with
Check file : boot.tar
/dev/bus/usb/001/120
/dev/bus/usb/001/120
Setup Connection
initializeConnection
Receive PIT info
success getpit
Upload binaries
boot.img
Close Connection
Fail request receive -5
FAIL close
Fail Close Connection

On my phone's screen, I see
OEM LOCK: ON (U)
...KG STATUS: CHECKING # I can't read the beginning of the line because it's in the round corner of the screen.
QUALCOMM SECUREBOOT: ENABLE (CSB)
AP SWREV: S1, T1, R1, A2, P2
AP SWREV: K 2, S 2
SECURE DOWNLOAD : ENABLE
DID : <hex>
download mode !!
    Custom Binary(boot) Blocked by OEM LOCK

How do I unlock the OEM?

Following these instructions did it for me.  In summary, after powering off the phone, you have to hold down both volume buttons and then plug the phone into your computer via USB.
Eventually, a screen will appear which will allow you to press the Volume Up button in order to unlock the bootloader.
From the reference:
1. Tap "Settings" Menu on Galaxy A20s, then you have to tap "About" option.
2. Tap "Software Information" option.
3. Tap "Build number" option several times until you see "You are now a developer" message.
4. Tap "Settings" Menu again.
5. Tap "Developer options", then activate "OEM unlocking" option.
6. Now you have to activate "USB debugging" option.
7. Switch off your phone.
8. Download and install Samsung USB driver on desktop.
9. Connect your phone with computer via USB cable while pressing Volume down button and Volume up button simultaneously. Your Samsung Galaxy A20s (SM-A207F, SM-A207M) will enter into download mode.
10. Long Press Volume up button for a few seconds to enter Device Unlock Mode.
11. Press Volume up button again to unlock bootloader.

the steps written lead to exactly situation of question: Custom Binary Blocked. you are missing important step (12. finish initial setup) 13. = repeat 1.-5. to actually disable VaultKeeper (and step 6. usb-debugging is not needed for Odin btw)


text:
How to copy paste rich-text in Android 9?
I'm using Android 9 on Cherry Mobile Flare S8 Pro, and it seems I'm unable to paste rich text on an online rich text editor.
For example, I'm copying a header and bold text within rich text format then when I paste it in any Online Rich Text Editor, but it only pastes plain text without the header and bold formatting.
The problem is, this kind of workaround actually works in my Windows 10 laptop but not on my Android 9 smartphone.
I have tried downloading some copy-paste apps in playstore and using them to copy paste the formatted rich text but it doesn't work either and gives the same result.
Is there any way to deal with this without rooting my phone?

This can also depend on the used JavaScript based online rich text editor component. I have seen really dumb and badly working versions (e.g. sourceforge.net forumns is a really bad example...).


text:
Android head unit stuck due to enabling "simulate secondary display"
Got an Android head unit with no physical buttons (has 1 tiny reset hole only). I was playing around with developer settings and enabled Simulate Secondary Displays with 4K option. Unfortunately this lead to the simulated display overlay taking over the entire screen with no way to get rid of it as the touchscreen is not unresponsive over the overlay. As a note, USB debugging mode was not enabled on the headunit prior to this happening.
I've hooked up a USB keyboard and have managed to get to the app drawer but can't seem to find a way to scroll through and select the "settings" app. Pressing 'TAB' or the arrow keys don't seem to be able to cycle through the app drawer.
If anyone could help with any of the 3 solutions, I would be grateful:

How to navigate through app drawer to get to "settings" app on android via USB keyboard?
How to bring up the android search bar with the keyboard only (that way I can search for "settings")
How to boot up android headunit in safe mode (tried it on my mobile phone and was able to disable simulated display once in safe mode). However my headunit has no physical buttons.

Thanks
this is as far as I can get with keyboard - can't seem to browse the apps inside the app drawer

Head units running Android often use very old versions. Do you know which one is installed on yours?

Since you don't have USB debugging enabled, your best bet is to flash the headunit with recovery.sh.  I'm not sure the details on your make/model, but for example on a Honda Clarity 2018 PHEV headunit, you would simply have a USB drive (formatted to the correct type, I believe it was FAT32 off the top of my head) with recovery.sh in the root directory plugged into your USB slot (may need to alternate between each if you're unsure which will work correctly), then reboot the headunit.  It my also take more than one attempt to power-cycle before it pops up, but it should eventually boot into recovery menu.  The recovery.sh file itself may be challenging to find, again depending on your make/model, in the case of my example it was acquired through a reputable 3rd party's site, the developer for HondaHack.
EDIT: I've successfully booted into safe-mode on my head unit once, by holding down some combination of the "soft" keys on the side of the unit (volume buttons, menu, etc).