text:
How can i modify the boot.img files so that when the power button and volume + is pressed during startup it doesnt start recovery but fastboot instead
How can i modify the boot.img files so that when the power button and volume + is pressed during startup it doesnt start recovery but instead starts fastboot?
P.S I can unpack the boot.img

I am not 100% sure but from my understanding those key combinations are checked before boot.img is ever called. Hence these keys are checked by the bootloader which runs before boot.img. Therefore by modifying boot.img you will not be able to change the keys to press or which mode to start.

Key preases during boot are not handled by boot.img (ramdisk and kernel), but by bootloader (ABOOT, ABL or equivalent) which hosts fastboot protocol as well. Bootloader starts main OS (kernel from boot.img) or recovery (kernel from recovery.img) or fastboot, depending on key combination or file/bits in cache / misc partitions. However you can modify recovery.img to make the kernel/init run a program (even a shell script) which reads key combination and restarts device to fastboot.

I'll again suggest you read my threads or other internet resources on Android partitions and filesystems and boot process so that you don't have to ask very basic questions.

The problem im having is that when i hold power button and volume +, the device is starting up factory mode instead of recovery mode, so is there anything i can do so it doesnt start factory mode? I see this in my preloader file https://prnt.sc/uhufvg and http://prnt.sc/uhugwz

Rebuild preloader the way you want it.

You can't actually do this with just modifying boot image. You can do it but it is not that easy.
If you have a QCOM, you have to modify aboot.
If you have a mtk, follow other's instructions.

The preloader is fetching from hrawork10/hra_huangxj/mt8788_v9.0_G26/P08765_git/vendor/mediatek/proprietary/bootable/bootloader/preloader/platform/mt6771/src/core/main.c as shown in your screenshot which is holding the variable which decides as to whether it should boot factory mode when you hold the power and volume up buttons or not.
Do not try to rebuild your preloader and flash it otherwise you may end up with a nice brick.

Irfan Latif is incorrect in that you should rebuild the preloader.

Sir you are supposed to answer the question, not my comments. I know that compiling bootloaders and playing with low level things is not an ordinary user does, but if you have a better solution please put it forward so that OP and future visitors can benefit. And btw, if source code is available and binary isn't signed with OEM's private keys, why one should not build the preloader? What's the restricting factor? Instead of giving advice or opinion, better back your answers with technical reasons (not just the expected risks). I'd love to learn from you. Thanks.

Given that he has a Mediatek device , where the preloader binary is closed source, its not possible for him to change the factory boot settings so that it starts recovery mode, from the preloader. Also as shown in his screenshot, the preloader is building the code from src/core/main.c, thus to change the factory boot settings that is where the changes should be made.

When I say "Rebuild preloader the way you want it." but the source code is not available (as is the case with mostly bootloaders for Android devices), it's obvious that OP is asking for something impossible, or at least something that he/she cannot handle technically. So it doesn't need a warning "Do not try to rebuild your preloader". // I still wonder how your answer addresses the question. This is a Q&A site where you answer the question to partially or completely solve OP's problem. But as I said, you answered my comment, not OP's question. You may edit it to make helpful for OP.

i think the point is, there is no known method to unbrick from corrupt preloader - playing with preloader is not worth the risk


text:
The emulator process for AVD Pixel_2_API_30_2 was killed
I have just installed Android Studio on Windows 10. I am having all sorts of issues. The first, of many, is that I cannot get the emulator to work. I have tried the following:

Clicked software instead of hardware.
Restarted computer.
Uninstalled and reinstalled the emulator.
Clicked on all updates.
Googled troubleshooting answers, nothing.

It always comes up with the same error: "The emulator process for AVD Pixel_2_API_30_2 was killed."
Any ideas?

Make sure your Windows installation doe snot use HyperV (used by sandboxing, WUA2 and some other Windows features). Use this command to check: https://superuser.com/a/1538529/62676. If you execute the command it should not print any text, othewiese you have HyperV activated.

"emulator ___ process was killed" can be multiple reasons.

check if your machine having enough RAM support as starting emulator consumes too much memory.
You don't to select "hardware" or "software", select for automatic option in graphics options.

Work around can be, just create a light weighted emulator 1st and try to use, then use Pixel 2 with latest os. This will help to narrow down your issue in analysis.

Emulating an older phone model with lower hardware requirements worked, and helped me narrow down the issue on Ubuntu. Turned out the disk partition containing ~/.android/avd was full, so had to move+symlink it to a another partition with more space available.

source: Stack Exchange

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

sort: votes


text:
Samsung Galaxy A11. Turn on 64 bit node?
I wanted to purchase a 64-bit android smartphone. I looked at the processor used on the Galaxy A11. It is a 64-bit ARM Cortex-A53. And I bought this phone.
Looks like I made a mistake. Android on the Galaxy A11 runs in 32-bit mode.
Is it possible to switch the phone to 64-bit mode?

Why do you think that your phone is running a 32bit OS?

@Robert. Thanks for your interest.
1. It says so here: pulse2.com/samsung-galaxy-a11-pros-and-cons "The Galaxy A11 runs in 32-bit mode in order to keep the memory usage low."
2. This https://play.google.com/store/apps/details?id=com.evo.inware program detects "armeabi-v7a", "armeabi". And no arm64-v8a.
3. Programmatically, in Android studio "Build.SUPPORTED_ABIS;" contains {"armeabi-v7a", "armeabi"}. And "Build.SUPPORTED_64_BIT_ABIS" is empty.

Well then your phone really has only 32 bit support. The main problem is that you can't switch the phone to 64bit Mode because every executable file of your installed OS is 32bit. Changing would require installing a complete new OS which means you need to unlock/root the device and fine a custom ROM that is built to support 64bit.

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


text:
Turn Android device into a wireless or USB webcam with background removal
There exist several applications such as DroidCam that  can turn one's Android device into a wireless or USB webcam.
Do any of these applications have a background removal feature (= only shows the human face/upper body that appears on the video)? I tried DroidCam but it doesn't seem to have this feature.


text:
Unable to share photos
I just "upgraded" my Pixel3a to 11. Now I can't share photos from my piktures (yes, that is how it's spelled) photo management app via Messages or Gmail. Tapping the share button presents only two options: 'Nearby share' and 'bluetooth'. In Android 10, I was greeted with many apps.
I was able to briefly get Messages and Gmail to show up in the list by going to those apps and attaching photos from there. Alas, those apps are no longer visible from piktures. The problem with attaching photos from those apps is that they show the newest photos first. While that is often the right answer, sometimes I want to share an older photo and it is very tedious to scroll and scroll in the hopes of finding it.
As a side note, I can no longer delete photos from piktures either.
Is there a setting somewhere that allows me to share from piktures?

Starting with Android 11 apps have to use the new Scoped Storage API for accessing files on the sd-card section. piktures claims to be ready for Android11 (targetSdkVersion=30) but it still tries to use the legacy mode (requestLegacyExternalStorage=true) which will no longer work on Android 11. Therefore any file access problems are a bug that have to be fixed by the developer(s).

@Robert, the Pixel 3a does not accept an sd-card. Perhaps the Scoped Storage applies to main memory as well.

@Robert legacy storage works on Android 11 too but in different way. Though Google strongly disapproves its usage: https://developer.android.com/about/versions/11/privacy/storage#all-files-access

@IrfanLatif Thanks for the info. In this case however piktures app does not request MANAGE_EXTERNAL_STORAGE in it's manifest, hence if I understand it correctly it does not make use of this way.


text:
Create a widget that displays an activity from any app
I want to create a widget that will display an activity from another app (not something I built). For example, I want to have a widget that shows the stopwatch activity from the clock app.
I am not looking to do this as part of an application I am building, but as a customisation. I tried KWGT, but was unable to find how to do it. Is there any way to do this using KWGT, or similar apps. If there are other alternates, please tell me.
I am on Android 10, if it is relevant.
Thank you in advance.

I assume you meant creating a home screen widget from any app as an end-user? Note that app development is off-topic since Android Enthusiasts focuses on end-users or power-users (but not necessarily developers) solving their issues.

@Andrew T Yes. As I mentioned, I am not looking to build any app. I am an end user, just wanting to costomize the home screen. I am looking for a KGWT like solution, which I suppose is on-topic. If not, redirect me, please.

Thanks for the clarification, and yes, it's on-topic here.


text:
Google Speech recognition doesn't consistently enter the speech into app text field
I cannot figure out the whole pattern but much of the time these days if I use Google Speech to recognise some text to put into a text field eg Facebook's or Messenger's, it successfully recognises the text (it shows me) but then when the popup displaying the text goes away, it leaves the text field unchanged, instead of entering the recognised text. It seems to happen mostly if I do some speech recognition, then edit or move the cursor, then some more speech recognition.
Is there any way to force the recognised text into that field or get it into "paste" so I can paste it in?
(Using a Huawei P20 Pro running Android 10 and Microsoft Swiftkey to "activate" Google Speech).


text:
How to download synced application data from Samsung Cloud?
My Android Samsung S7 smartphone is broken, so I wanted to access my memo which I have backed up at Samsung Cloud. I don't have another smartphone. I just need to download the data to the PC and dig the data out of the files. But I don't know how to download those data. THere doesn't seem to be a link for download:

I went to Samsung Cloud, but here also is no link to download:

How do I download this as a file to PC?

This video says you can download Samsung Gallery app (from Microsoft store) on windows 10 laptop and sync to PC

@beeshyams the Samsung Gallery app seems to just "show photos and videos". I was asking about how to download other application data like Memo. Basically, there should be some option like "download everything", e.g. in a zip file.

I don't have any Samsung device ; pointed to that video, just in case it helps. All the best

Based on the screenshots it looks like you are resident of the EU. In this case the GDPR states that you can contact an online/cloud provider and ask to retrieve all the data they have stored about you. This should include your stored data like your memos. May be it is worth a try.

@Robert wow, amazing advice, thanks!! Didn't know this!


text:
App usage history
I'm trying to find out how to check my Application Usage History of this phone. 4636 Does not work, and other applications in play store only start monitoring the app history once installed. I uninstalled an application last 2018 but I want to know how many hours I used on the application, and when I last opened it. Is there an application that can see that?


text:
Why does Android force close apps after update?
I have been using Linux in my PC for a long time. I had noticed that if an app is updated while it is running, the app is not forced to close or restart. But in Android, I noticed that apps are forced to close after updating.
Android being based on Linux kernel, why does it force close an app after updating that app?

I assume this is a simple design decision Google made. An updated app that has still an old version running can have massive side effects if the app process is not aware of such situations. Therefore if the app installation process  starts the old process is ended. BTW: Linux or in detail Ubuntu with apt usually works the same to my experience (or at least for those services I recognize). If you update a service via apt it will be restarted.

In Android it's the operating system (activity manager) which takes care of app's life cycles (start, pause, resume, stop) and manages its resources when it's in background, in foreground, or when home button or back button is pressed, or when screen is locked / unlocked, or when app starts/stops a foreground/background service, and so on. AM keeps track of apps on per UID basis. In Linux distros, human user is the UID. And OS doesn't interfere with program starting or closing unless user asks to do so. So it's the entirely different userspace design, nothing to do with kernel.


text:
Stop ActivityManager killing background Termux processes
I've been trying to run a ssh and a http server on my non-rooted Android phone using Termux.
I've installed Termux:Boot and termux-services to run them.
The server processes run for a while after I release the wakelock but are then killed by the system:
09-23 13:25:21.592  4450  5008 I ActivityManager: KPU : put [com.termux] : 15433 K
09-23 13:25:21.592  4450  5008 I ActivityManager: Killing 25360:com.termux/u0a171 (adj 904): DHA:empty #17

I tried disabling the app power monitor (Setting -> Device maintenance -> Battery) but it doesn't seem to make any difference.
Save rooting the phone, or keeping a wakelock in place, is there any way I can stop the ActivityManager killing my processes?
Setup: Samsung Galaxy A5 with stock-rom
(Android 8 / Samsung Experience 9)

I don't have Galaxy A5, but I have Galaxy A10s and this helped me:

Go to Settings -> Apps -> Termux.
Tap Battery.
Enable Allow background activity.
Open Termux.
In Termux notification, click Acquire wakelock.
Tap Allow.


text:
Is it a requirement for an Android Go image to use f2fs format for data partition?
I am currently performing performance testing using PCMark on a 2GB Ram Android Tablet but changing its OS (Android 10 vs 10 go). I have noted a considerable increase in storage performance (around 40%) and around 5% increase in CPU and Graphics processing performance.
I have been trying to find other differences between the two systems and found that the Android 10go image uses f2fs for data partition whilst Android 10´s one uses EXT4. This would explain the increase in storage performance...
Is using a f2fs format a requirement for an Android 10 go image?
My main goal is to confirm if it makes sense to make the switch.

You can use f2fs with almost any recent ROM. Recent kernel builds are also built with f2fs support.

Thanks, but is this a must for getting improved performance on Android Go?

Sorry I haven't seen such requirement documented anywhere. Also, as per my limited knowledge, F2FS was basically designed to be flash friendly (to reduce wear), not performance friendly. So under certain conditions EXT4 (or other filesystems) may perform better than F2FS.


text:
Samsung phones bootloader unlock
I have a samsung tablet gt-n8000 and I want to flash a custom rom . Should I first unlock the bootloader?  if yes , how to do that ? fastboot commands does not work anyway on my tablet so I can not use fastboot oem unlock.

From my experience Samsung devices usually don't work this way and they are not flashed via fastboot but via odin. Unlocking and user data erase happens after flashing the ROM on first boot. Search for a tutorial exactly for your device and ignore ever other tutorial!

Thanks Robert . But I found nothing about bootloader unlock for my device . There are  some tutorials about flashing custom roms for my device but nothing about bootloader unlock

As I said usually you just flash the ROM and on next boot you are getting the option to unlock the device.

Under developer option, Enable OEM unlock.
First find custom rom as per your mobile model. Connect mobile to computer having developer kit. Root the mobile and flash rom.

My android version is 4.1.2 and it has no OEM Unlock option . meanwhile , fastboot commands does not work . It does not recognize my device .

Install proper usb driver as per mobile. Enable usb debugging.


text:
Rog Phone wont connect to internet with data but wifi, calls, and texts work fine
my phone is not able to use the internet on data, but wifi works fine. I can still send and recieve texts, and phone calls work too but it's just the data. My sim works fine because I've tested it on another phone. My phone is an Asus Rog phone (1, 512GB, Android Pie) and is not locked to any carrier.
Please inform of any possible fixes
Thanks


text:
"No SIM Card" after flashing custom ROM (Oneplus 7 Pro)
I have an unlocked Oneplus 7 Pro that I just installed Havoc OS on, which stopped the SIM card from being recognized. This SIM card works on both other phones (stock Pixel 2) and this phone with a stock ROM. The phone still has its two IMEI numbers. I've looked at quite a few options to fix this, such as:

Rebooting the phone multiple times
Clearing Dalvik/Cache
Resetting all network settings in Settings > System > Reset options
Reflashing the ROM and TWRP multiple times to make sure they are in both slots
Trying dial codes *#*#72786#*#* and *#*#4636#*#* (both cleared the input but nothing happened afterwards, no menus or popups)
Taking out the sim, putting it in airplane mode, putting the sim back in, powering off, waiting a minute, and putting it back in
The device was sim unlocked before flashing the ROM

You phone has a dual-SIM slot. Are you sure your ROM supports both SIM slots? May be the ROM only support one of the slots and currently your SIM is seated in the wrong slot?

@Robert That could be the case, but the phone only came with a tray for one SIM, which I assumed to be the primary one. I also just checked the two IMEIs again, and they both seem to be the same as the one printed onto the back of the phone.


text:
Android Chrome - enable auto-fill for the site
Android 10, Chrome 86. I have keepass2android installed and it works like a charm. The question is:
if I accidently tapped 'do not use autofill for site XXX' in the dropdown on the login field, how to turn in back on for that site? Cannot find any settings for that neither in system nor in chrome.

You should be able to re-activate this in settings -> app -> password access -> Autofill -> disabled autofill targets
In android 9 pie this can be found in the Keepass2android settings under "password entry access" -> "autofill service" -> "disabled autofill targets"
This issue was already created on the github page.. Hope it helps


text:
What is the most stable kernel for my ALE-L21 (2015) alice and ROM?
I'm pretty sure that this is already a weak legacy device but I want it to be useful and stable in performance to the max. Can you suggest the ultimate kernel for my 7.1.2 AOSP based custom ROM?

Note: I'm using a vanilla kernel.

custom kernels are always trial & error there is no most stable


text:
Backup MMS on Android without Google Play Services
Is there a way to backup and restore MMS without Google Play Services? I'm running Graphene OS on a Pixel 3 (no root). Thanks in advance!

Maybe using one of the SMS/MMS Backup & Restore apps? I've never tried them (myself, I use TitaniumBackup, but that requires root). Note 2 of the apps in the list are available via F-Droid; but Epistolaire cannot restore (it just backs up to JSON), and SMS Gate backs up to IMAP (I found no word on restore), so you're probably left with side-loading one of the tracker ridden candidates…


text:
Package manager has died while checking permission
Caused by: java.lang.RuntimeException: Package manager has died at android.app.ApplicationPackageManager.checkPermission(ApplicationPackageManager.java:427)
Caused by: android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Native Method)
Can anyone help me what does this mean and how to prevent this?

A DeadObjectException can occur if two Android processes are communicating with each other and one of them dies while transferring data to the other. The other process will then throw a DeadObjectException.
In your case the "other" process was the PackageManager process which was communicating to a second process - may be a system service for listing packages?
There is not an easy solution how to prevent such an error. The only chance you have is by checking the adb logcat output for errors when you access the package manager.
The reason why the other process (whatever process it is) fails may be corrupt data.


text:
How can I switch from WiFi to mobile data without interrupting my current download in Chrome?
I am currently downloading a roughly 50 GB file in Chrome for Android (10). I am on my home WiFi. Given the speed of my network it should take roughly 8 hours. It is a regular file download which is being handled in the default way, just like when you download any file in Chrome.
I will have to take the device out of my house (thus outside of the WiFi range) later, and I do not wish to interrupt the download.
I have 1000 GB mobile data plan so I could just continue the download over 4G/LTE as I go out. But, as my internet connection switches to mobile data, will that interrupt the download, forcing me to start over again?
If so would it help to pause the download? I could then either resume it when I get back home (on the same WiFi network) or even if it would work to resume it once I am on mobile data?

You could do a little experiment, try downloading ths same 50 gb file for 1 or 2 mins on wifi. Then stop, give it a couple of seconds and then switch to mobile data. See if it starts downloading. If it continues, then you're fine, if not, try pausing on wifi. Disconnect from wifi for a minute. And then reconnect again, see if it continues. If it does then good day mate, if it doesn't, well may have to look for some alternatives (:

@honeymoly Well I am already halfway through the download, so if I were to try this experiment it would have to be on another device!

Well, if you happen to have one, better test it before going out.

@honeymoly Yeah good idea.

If you switch from Wifi to cell phone network your public IP changes and therefore seemless handover without interrupting a download is not yet possible.
There is a standard that is designed to allow such a seamless handover between e.g. Wifi and cell phone, it is called "Mobile IP". Effectively it works a bit like a VPN. No matter what internet connection you use your public IP remains the same and changing between Wifi and cell phone network is covered by the Mobile IP system.
Unfortunately at the moment such Mobile IP providers are not yet well established.
Besides that even with the current situation a number of web servers should allow to handle download interruptions: Well configured web servers allow to resume downloads, hence if the download stops (because of a network switch) and you continue it, it skips the bytes already downloaded and continues where you stopped. Of course this also has to be supported by the downloading app.

I'm curious if he got a VPN setup with the VPN then changes IP when he goes from cellular to Wi-Fi? Or would that be a workaround?

@TechBoyKev If the VPN would be UDP based and accepts the IP change of the VPN client without reconnect this could work.


text:
Will any new apps or data installed or added to android phone after encryption also be encrypted?
if an android phone is encrypted, will any new apps or data installed or added to phone after encryption also be encrypted?

Obviously. That's the whole purpose of encryption.

Android 6 used Android Open Source Project: Full Disk Encryption

Full-disk encryption uses a single key—protected with the user’s device password—to protect the whole of a device’s userdata partition. Upon boot, the user must provide their credentials before any part of the disk is accessible.

So all apps & data installed on the userdata disk partition would be secured by that key. One way to think of Full Disk Encryption is like a exterior door house key, once you can get into the house, the contents are accessible.


text:
How can I restore a local backup of WhatsApp to a specific data profile created using Titanium backup app?
In Titanium Backup app I have multiple data profiles for WhatsApp. I am using WhatsApp in 1st data profile and I need to restore a local backup of another WhatsApp number to 2nd data profile. How can I do it without uploading it to Google drive ? Where are the data of apps stored for each Titanium Backup profile ?

Did you ever manage to resolve this?


text:
How do I toggle grayscale in Android 11?
In Android 10 I had grayscale display turned on. This was achieved by dragging editing the dropdown shade to add the Grayscale tile.
I just updated to Android 11. The display is still in grayscale, but the Grayscale tile is removed, so there doesn't seem to be any way to turn it off! I sometimes want to when using the camera, but then switch back to grayscale for day-to-day use. How can I toggle grayscale in Android 11? Moreover, is there a quick way to do so? The old way (pre-Android 10) involved turning on developer mode and changing a deeply embedded developer setting.

EDIT: There is a new Bedtime Mode tile. When I turned it on and off, color was restored. Turning bedtime mode on goes into grayscale, but also sets Do Not Disturb. So I can turn on grayscale only be entering bedtime mode and then turning off Do Not Disturb. This is less than ideal. Also, bedtime mode only lasts till the following morning. Is there a way to either (a) recover turning on grayscale without bedtime, or (b) change bedtime mode to last until turned off?

Actually you can schedule and customize the Bedtime mode.
If you long press the Bedtime mode tile, it'll open the Bedtime mode screen.

In the schedule option, select all the days and in the time select 00.00 to 23.59, so as to keep it on almost the whole day(max. possible time - 23hrs 59 mins a day).
If you tap the Customize option, you can see a way to turn off the DND mode.

That's it, done! Now you can simply tap the Bedtime tile and it'll remain on
Once you've done this, you need not turn off DNS, while enabling Bedtime mode, as it's customized now.

A small point: Bedtime mode turns off an hour before if you've set an alarm, say you set an alarm at 5.00 a.m. Then, the screen turns back colorful at 4.00 a.m. And if you set an alarm daily at that time, schedule bedtime from say, 5.05 to 5.04 or so

A bit of a hack. This mostly works, but the final "small point" is an annoyance. What if I have multiple alarms during the day, e.g. to wake up in the morning but also for recurring events or meetings? Is there any way to change bedtime mode behavior to not exit one hour before an alarm?

@LeeHachadoorian I think in that case, we have manually tap the bedtime mode after each alarm. I think we can't stop it to not exit before an alarm. It's generally an-hour when I use the "System clock alarm" but when I set an alarm using "Google clock", it turn off exactly at the time when the alarm is kept. So may be you can get rid off that one-hour time. But, yeah it turns off at the time of alarm

Going along with the first answer @19aksh
You can an add a quick toggle.
So when it's clicked, it just goes into greyscale only, leaving out the no audio and time restraints.
This is a Xiaomi Redmi 10, Android 11

I was referring to the Bedtime mode.

This guy in reddit has a great approach: https://www.reddit.com/r/GooglePixel/comments/9w4xc8/easy_toggle_between_monochrome_and_color_display/
He shares that the Accessibility feature in Android has the ability to easily toggle monochrome in Android 11, even if there's no shortcut available from the pull-down menu. On my Pixel 3, I go to Settings, Accessibility, look for Color Correction, and turn that on to get black and white. Then scrolling down in the Color Correction menu, under Options, select "Color correction shortcut" to either swipe up with two fingers to toggle between monochrome and color, or hold both volume buttons. Enjoy!

The post linked does not say that this applies to Android 11, and the method described does not appear to describe or work with Android 11. I'm pretty sure that this applies to Android 9 or earlier.

Good point, his post is from 2 years ago, but both methods that he mentions (dev mode or accessibility) work for me on my  Pixel 3 with Android 11. I don't see the same thing on my Samsung M8 tablet, so maybe this is only for order phones. On Android 11, if you go to Settings, then Accessibility, in the "Display" area, do you have a Color Correction row you can click on, where turning it on turns everything greyscale? I have it on my Pixel 3. Then the best part is having the Color Corrections shortcut, which is in the same Color Corrections activity.

@Sammy Cakes - I have Android 11 on a Pixel 4, and the color correction option you reference above only provide options to adjust color to compensate for different manifestations of colorblindness. I couldn't find a grayscale option which is composed of only white, black, and the shades between.

Pixel 3a on Android 12 has grayscale as one of the options for color correction. However, this might not apply to other devices since each manufacturer can customize many things, including developer options and accessibility settings.

You can turn on grayscale permanently from the developer options. Go to settings -> about phone -> software information -> click on build number repeatedly until you unlock developer options. Then go back into settings -> developer options and find "simulate color space" under hardware accelerated rendering. You can choose monochromancy there and it will greyscale your phone everywhere without turning off or relying on bedtime mode.

Pixel 3a on Android 12 has this menu. However, this might not apply to other devices since each manufacturer can customize many things, including developer options and accessibility settings.

Try this app.. https://play.google.com/store/apps/details?id=com.vegardit.grayswitch
Grant it the write secure settings permission through adb and change the settings accordingly.
And if you don't want to use a 3rd party app then try these commands..
  adb shell settings list secure (if not in this then try the other 2)
  adb shell settings list system
  adb shell settings list global

and see if there is a option of grayscale. If there is then.. adb shell settings put global <name> 0 to disable and 1 to enable back.


text:
How to fix bootloop
I unlocked the bootloader using fastboot, this command; fastboot flashing unlock I had downloaded the phone's firmware (Infinix note 7) and patched the boot.img using magisk I then flashed the boot with the magisk_patched_boot.img using fastboot;
fastboot flash boot magisk_patched.img

After flashing it, the phone has not been booting, it displays the message below:
Orange state- this device can't be trusted as it is unlocked. Reboot in 5 sec and reboot

then it goes off, and on again.... this has been repeating itself over and over
I was requesting if there is a way, I can bring back the phone and root it with no issues state- this device can't be trusted as it is unlocked. Reboot in 5 sec and reboot
then it goes off, and on again.... this has been repeating itself over and over
Any idea on how to fix please?

The only way to fix a bootloop is to remove the cause of the bootloop. Yes some phones reject the magisk patched image because recenctly i wanted to change a phone from system to systemless root. Phones which i think have no problem with magisk are Samsung phones.
Sincd you said you had downloaded a firmware, flash the original boot img that you patched with magisk and then your phone will be back to normal. LG phones also reject patched boot images. If your phone refuses the boot image you must then try rooting using using pc client rooting apps or even android client rooting apps.


text:
Do I need to root my Pixel 3 phone in order to install GrapheneOS?
I am interested in stalling GrapheneOS custom ROM on a Pixel 3 phone.
Does this require that I root the phone?

No, it is neither required, nor recommended to root the device.
You will need to follow the official instructions here: https://grapheneos.org/install
It will require you to:

Upgrade the stock OS (to get any firmware updates)
Show dev options.
Enable OEM unlocking.
Actually unlock the bootloader.
Install GrapheneOS via fastboot
Lock the bootloader.


text:
Google accounts (and apps not syncing) on RealMe 3 Pro (Android 10)
I have 5 Google accounts on my phone running on RealMe UI (Android 10). None of my Google accounts are getting synced I tried removing one of the account and adding back but then only Gmail synced but still not getting any mail notifications. I have tried all the solutions such as rebooting, re installing, turning off power saver mode. Problem is even if a uncheck and check the auto sync option nothing is happening.
Please find me a solution for this, as sync is extremely necessary because I need to get my notifications from Gmail Google classroom and Google calendar.

First use browser to log in to Gmail. If you are successfully log in to Gmail. Then it is confirm that problem with Gmail app.
Update Gmail apps.
Go to app setting / gmail / storage / clear data and clear cache.

I have done everything installing/ uninstalling, nothing is working. Problem is none of the Google apps are getting synced, in day to day life I use Google Keep, it is also not syncing with the google account. Thing is I'm getting mails on all the IDs but not receiving any notifications.

I've faced this twice now. It was fixed when I cleaned google play services and google play store data.

Update: The issue is with phone storage. That is, if out of 64GB only 5GB is free then Google Notifications might not come.

So the last time it happened was months back, and I had to factory reset it. It worked well so far, but the problem resurfaced again today. Funnily, I googled and found this page, and realized that I've been here before.
Anyway It might be the storage problem as you said, I was indeed low on storage, and after clearing some space. sync is working for now.
I wonder why devs are not working on this very apparent bug.

I spent quite a bit of time trying to fix the issue on my Realme GT but the only thing that did the trick was free up some memory as suggested by @sahil-jhawar (I was at 5% free memory and magically bringing it to 30% it worked!)


text:
What are the chances of a malware being persistent if I dd to write system.img and userdata.img from twrp
If I had a malware on my phone, say malware like xhelper, or strandhogg or something even critical than that, what are the chances of it being persistent even after using dd to write the system.img and userdata.img to the phone for eg dd if=system.img of=/dev/block/platform/mtk-msdc.0/by-name/system to write system as brand new. Is it possible that the malware could snoop into /cache or /nvdata to attain persistence. Is it feasible to use dd to flash those partitions as well? Which places would a malware use to hide itself to maintain persistence even after stock image flashing?


text:
Can I implement firewall-like internet blocking from ADB on a per app basis on stock Android?
Instead of using 3rd party app freezers, I've been using "pm disable-user" / "pm uninstall" for years to disable/uninstall bloatware. However, some apps, if uninstalled (or even disabled sometimes), bootloop the device or just break basic functionality.
So, I wish to block internet access to that bloatware which indirectly prevents me from removing it.
Is there an adb command to implement internet blocking on a per app basis, like "pm uninstall" is for uninstalling?
(Yes, there are plenty firewall apps, but why rely on a 3rd-party app for something you can do yourself?)

If you have root, a hardened iptables solution could be viable. For blocking per app net access, the uid of the apps are needed. App like Afwall+ could handle the job pretty good. It's open source and you cloud asses the codes on Github any time

honeymoly is correct. Per app blocking works only on UID basis. With root you can use iptables manually from commandline. Without root you need to use VPN, which requires an app. But even with root, keeping in view the complexity of firewall rules and the changes that occur on network events, it's not feasible to use iptables manually without using a third party app like AFWall+. Also blocking apps isn't always fruitful. Apps might be using shared UID. Or they may use other apps' APIs (e.g. of Play Services) to get/send data from/to internet.

I'm using unrooted stock Samsung S9, so pretty much... nah... right?

I've found something, which seems to work for Chrome web-browser, and requires a rooted device.
Sadly it seems to work on old Android version (tested on Android 9), but for some reason doesn't work properly on Android 13.
@echo off
set package_name="com.android.chrome"

c:
cd\
cd C:\Users\User\AppData\Local\Android\Sdk\platform-tools

for /f "delims=" %%A in ('adb shell dumpsys package %package_name% ^| findstr "userId="') do (
  for /f "tokens=2 delims== " %%B in ("%%A") do (
    echo Extracted UID: %%B
    adb shell "su -c 'iptables -A OUTPUT -m owner --uid-owner %%B -j DROP'"
  )
)

And to allow connection again:
@echo off
set package_name="com.android.chrome"

c:
cd\
cd C:\Users\User\AppData\Local\Android\Sdk\platform-tools

for /f "delims=" %%A in ('adb shell dumpsys package %package_name% ^| findstr "userId="') do (
  for /f "tokens=2 delims== " %%B in ("%%A") do (
    echo Extracted UID: %%B
    adb shell "su -c 'iptables -D OUTPUT -m owner --uid-owner %%B -j DROP'"
  )
)

If anyone can improve it and tell me how to fix it, please let me know


text:
Is it possible to run jar files in an android application?
I am a begginer in android and I want to develop an application which show a list of jar files to user and user can choose one of them and run it. Is it possible to run a jar file in an android application? (not as a library)
if yes, how does it run? I mean, a jar file needs to run in JVM but an apk file runs in ART.

Basic Java programs are possible, but all GUI elements used in JVM are not available on Android. Please note that app-development question are off-topic here and should be posted on stackoverflow.com instead.


text:
Forgotten parental controls password for Fire HD10
We have forgotton the parental control password for our Amazon Fire HD10.  I entered the incorrect parental controls password more than 5 times but was never given any other options to try to reset.  So I went with the option to deregister the device from our Amazon account.  this was successful however the next step was to re sync the device but to do this I need wifi to be on and to turn on I'm still being asked for the parental control password.  I have also tried to reset to factory default settings on the device but that also seems to require the parental controls password. I don't know what to do next, any suggestions?

Hard reset your Fire HD10

Power off
Press vol up and power key at the same time for around 5-6 seconds
Reset it..

Follow this video if you're stuck somewhere.. https://www.youtube.com/watch?v=ayvWAyftosw
Comment if you're still stuck


text:
Understanding why an app-supported link opens in the browser first
This is primarily an attempt at understanding what's going on (and whose fault the shitty UX is ). I don't think there's anything I can do to fix it and that's fine, I'm okay with that.
The situation
I have a subscription to the New York Times. I have their app installed, and I'm subscribed to their email newsletter. When I open one of these emails, they contain a link to the article at the end, which looks like https://nl.nytimes.com/f/newsletter/[id]. This obviously contains an article reference, as well as probably some tracking code for my subscription.
When I click that link in Gmail...
What I would love to happen is:
Android's app selector dialog pops up and asks me whether I'd like to open this in the NYT app, or one of my browsers.
The app is fine, but sometimes I might want to have it in the browser instead for various reasons.
What I would expect to happen is:
That it just jumps directly to the NYT app.
Not my prefered solution, but I think my use case is bit unusual and just going to the app is probably what most users would expect after installing the app.
What actually happens:
Android's app selector dialog pops up and asks me to select one of my browsers (but not the NYT app!). After selecting one, the browser pops up for a split second, then makes way for the NYT app.
What... the hell!?
That makes no sense, is a bad experience and provides no benefits!
Whose fault is this? Does the app not register the correct URL intent? If so, any theories as to why they didn't?
Or is this a flaw in Android's intent system and the app did the best it could?
Or do the browsers do anything they're not supposed to? (I have Chrome and Flynx installed, btw. With intentionally none of them selected as a 'default' -- I want to get the selector modal each time.)

Check the NYT's app info from the Settings, then navigate to "Open by default", and then "Supported links". That's the list of URLs that can be opened directly by the app.

@AndrewT. Was a bit harder to find on my Android version (MIUI), but I managed and it indeed only registers www.nytimes.com.

I guess the NYT app registers itself as URL handler for https://nytimes.com URLs, but not for https://nl.nytimes.com. This is why only the browsers can be selected.
Then nl.nytimes.com page redirects to the main nytimes.com page, and the NYT app can take over.

And all this probably happens in the name of tracking, so that the NYT newsletter people see what content people like most.

You're right, it registers itself for www.nytimes.com, but not nl.nytimes.com.

Interesting idea, that they might just do this for tracking. You would think that the tracking could also occur through the app, but you're probably right that the newsletter and the app departments operate separately, and might not wanna talk to each other...


text:
How to disable mobile data, in a way that's hard to re-activate, while still allowing mobile calls, for a child's phone?
I want to disable mobile data in the phone settings for my child in a way that makes it hard to re-activate it. Just turning off the "mobile data" setting is far too tempting for them to undo.
What I've tried:

Under Settings > Connections > Mobile Networks > Network Mode, I updated the setting to "2G only", which disabled mobile data but also disabled mobile calling. So that doesn't work.
Under Settings > Connections > Mobile Networks > Access Point Names > Data, I tried changing the "APN" value and also (separately) tried changing the "Mobile virtual network operator value", but mobile data still worked with either of those options changed.

Is there a different setting that will disable mobile data while still allowing mobile calls?
Am using Android 10 on a Samsung phone in New Zealand.

Hello. Is using a firewall app (and therefore denying internet access to all apps) not an option on the table?

Changing the APN as also my first idea. Unfortunately some MNO don't use them any more and just accept any APN value.

@Firelord Yes, that could be an option I think, though I do want to allow Wifi access. Are you aware of any firewall apps that can do that?

Search for any "no root firewall" type firewall in Play store. Firewall apps usually allow internet access per network configuration -- an app can be blocked on mobile data but allowed on wifi, ethernet, etc. An opensource alternative is called NetGuard.


text:
How to monitor SMS being sent by apps?
I just found from my mobile bill that SMS is being sent out to some 4 digit number (permium number) from my mobile. I could not find the message in my SMS app - "Messages".
I checked with the telecom company and confirmed that it's not some service I subscribed to.
I did see the same issue on an acquaintance phone which was by Huawei sending this SMS every week.
Mine phone is from LG and I have being using it for over 3 years and this is the first time. I don't remember installing any new app. Not sure what changed in the phone.
I am assuming that one of the apps on my phone is sending some kind of log. I don't remember any app asking for permission.
How can I find out what was the content of the message sent? Not sure which app is sending it.
What is this type of SMS that the apps are sending? Anyway to block it?
In the setting: app permission>SMS permissions: (apps with SMS permission)

Contacts
Google
Google Play services
Google Play Store
Messages (Google app that I am using)
Messaging (LG default SMS app)

If two different phone are affected may be the phone is not the culprit. The network operator networks are all interconnected and using the SS7 protocol other people can do a lot you would not expect. Therefore I would recommend to power off your device over night and on the next bill check the send date and time of every unwanted SMS. If the time is during a phase where you have powered down your device the device can't be the problem.

My phone is off daily (its a routine from long back) between 10pm & 7:30 am. The message was sent at 10 am.

I too suspected the network operator and still do based on their general things. I have a sim from the same operator in an iPhone and that never has the same issue.


text:
TWRP mount storage
I am using Lenovo A6000,I am unable to mount storage, system etc. in twrp , i have no os installed only twrp. I checked some posts here about formatting and then wiping and changing parition type...but none ssems to work . how can I mount to internal storage so I can flash custom os... I have checked backup in twrp it shows some folder like boot, system image etc data is present upto 2gb but nothing in /system folder. please HELP

Sure looks like your internal eMMC storage chip (internal storage) is corrupt or defective... Especially since ALL partitions are showing the same result. If you have the correct TWRP and current version and it is doing this, your device is likely bricked and not repairable with normal software means and would need jtag programming with an official image to recover it, assuming the eMMC chip itself is not defective (which is quite likely actually).

@acejavelin I think it's way out of my league to do that...so may be I will leave Thank you for reply I would do it was a simple and not much hard...tell me if  it is doable that I can do according to  given instructions..that's what only I am good given my knowledge about this.

Jtag programming requires special hardware and physical access to the chip... Typically you would send it off to a service to do it. You can purchase the hardware yourself for $150-$400, from vendors like cellcorner.com (as an example). You would likely need a universal one as I don't see a Lenovo specific unit, so you're pushing the upper limits of the price range. Then you would get into the situation of having to find a flashable image, which Lenovo does not offer to the general public. At that point, it is probably better just to replace the device imho.

actually I was messed installing custom os since then i am getiing this. sure it is hardware? can it be solved anyway...I tried using fastboot recovery.img but the same unable to mount arguments showup in oem android recovery also...I am asking becos its my fav and first one hope it can be mounted by some formatting or adb method

I can't be positive, but it looks like the partition table is borked (yes, technical term) and unless you can get an official way of restoring the device to stock, the chances it will be recoverable are slim. Is there an XDA forum for this device? If so, I would ask there as this would be a very device specific answer and not really an Android thing.

Yeah Lenovo A6000 forum is there...https://forum.xda-developers.com/lenovo-a6000


text:
ADB immersive mode and wm overscan commands no longer work on Android 11
I upgraded to Android 11 without knowing that it broke compatibility with existing immersive mode and window manger overscan adb commands. Are there new alternatives to these commands in adb now? I was specifically using:
adb shell wm overscan 0,0,0,-136 (reset: 0,0,0,0)
adb shell settings put global policy_control immersive.status=*
For reference I'm running GrapheneOS on build number RP1A.200720.009.2020.09.25.00 on a Pixel 3 with Android 11 on Kernel version 4.9.223.

There was recently a self-deleted question stating the same issue about Android 11 and ADB on immersive.status, though there's no comment nor answer.

@AndrewT. Yeah I saw that when attempting to research a solution. I was not the poster of that question though, I decided to post partly to "replace" that deleted question.


text:
Mobile legends not compatible after unity fix
I want to play mlbb on pc, but it gets black after logo phase. Because its unity game I patched unity fix. Others game like granny now works but mlbb vanishes if installed. Its in data/app. If I uninstall with pm and install, it says not  compatible.
Pm install says :
cant find matching adis,could not extract native resources.
I managed to get it run on primeos somehow. But can't do it anymore.

May be you are trying to install an ARMv7/v8a only app on an x86 emulator?

I also tried armv8 version of soulknight. It works. Also previous version of mlbb worked only in phoenix os. And some how I managed to run new one in prime os , don't know how. But I used unity fix than and it didn't show compatibility issue. Now when I switched to DM I can't work it anymore even on primeos

Why would it be not compatible when I have arm layer for arm games

Do u know how unity fix works


text:
My Galaxy Tab A SM-T510 won't unlock security screen with correct code or thru find my mobile unlock
My tablet won't unlock screen with correct code , clicks into wait try again in 29 seconds . Using the find my mobile site try to unlock screen that way , comes back with Something went wrong and does not unlock. Any other way to get into it without having to do a hard reset

unfortunately besides the official methods there is no other way. even bruteforce attack makes no sense because you already know code. i recommend to wait 72 hours and try again


text:
How can I find / transfer a single app's data files to a new phone? (unrooted)
I just got a new phone and I was able to have almost all my apps and data transfer over without an issue. Neither phone has root access.
But a couple apps (a game, a cocktail app) didn't transfer their data and don't have sync options.
I've looked through File Explorer but I can't seem to find an obvious folder for app data. I swear this used to be accessible but I assume it got changed around at some point.
I have dev knowledge so if I need to use adb or something I can. That said, ideally I can do this wirelessly because the old phone can't seem to be found by my computers.

How do I find the data files for an app?
Once I have the files, are there any extra steps beyond copy/paste like permissions or using adb?

Does this answer your question? Transfer Android app with offline data to NEW PHONE without ROOT

I'll check once I'm back with my new phone. Is there really no way to just do it myself through the file system? It has to be an app or adb?

https://android.stackexchange.com/q/47924 you don't have access to file system not even read access


text:
fastboot commands work. fastboot oem commands hang
My final objective is to do "fastboot oem off-mode-charge 0".  I've done this successfully with a Teclast P80H.  But I'm having trouble with a rino3 pro.  Specifically:
"fastboot devices" shows me "mt6572v1_phone fastboot" and "fastboot --version" shows me "30.0.4-6686687".  "fastboot reboot" works.  "fastboot reboot bootloader" works.
However, "fastboot oem " seems to never return back to my Windows Command Prompt.  It seems hung.  "fastboot oem off-mode-charge 0" hangs.  I must control-C to get out.  "fastboot oem device-info" hangs.  "fastboot oem junkyjunk" hangs.  It seems that ALL/ANY "fastboot oem" command hangs.  ("fastboot eom" with no following command, of course, returns "fastboot: usage: empty oem command.)
Well, maybe it's not strictly oem commands that hang.  "fastboot flashing get_unlock_ability" seems to hang as well.
My device is a rino3 pro.  Android Settings tells me "Hardware: MTK6763" and "Processor: 8 core" and "Android 9.1" if that matters.

fastboot oem commands are (as the command implies) oem/manufacturer and often even device specific.

your device looks like a scam. it is most likely a fake phone with dummy camera, 512MB of RAM, 4GB of storage and android 4.2.2 https://android.stackexchange.com/q/130278

Oh, hello @alecxs.  You responded to my other post as well.  That would be funny if it's a fake phone with dummy camera.  My product does not need to use either of those!  That would make the fake actually perfect!  The GUI and USB do operate.  Please see my other message at https://android.stackexchange.com/questions/230362/fastboot-not-working-with-new-teclast-p80h?noredirect=1#comment302886_230362


text:
Android cannot forward packets
Target:
Perform IP forwarding for devices within the same local network. (The real target is transparent proxy but the IP forwarding is a prerequisite)
Network setup:
All devices are in the same local network 192.168.0.0/16.

main router 192.168.1.1
Android phone 192.168.2.1 (network interface wlan0)
computer 192.168.2.10 gateway set as 192.168.2.1
others like Raspberry Pi at 192.168.1.11

Android setup:

Data disabled, only WiFi connects.
rooted Android 10 (Pixel 2 XL)
enabled ip forwarding by sysctl -w net.ipv4.ip_forward=1
netfilter: on all tables of nat, mangle, filter and raw, run iptables -F -t <table_name> and iptables -X -t <table_name>
rp_filter: Disable by sysctl -w net.ipv4.conf.all.rp_filter=0 and sysctl -w net.ipv4.conf.wlan0.rp_filter=0

Result:

the computer cannot access to the Internet, ping, dig, browser, nothing works.
the computer connects to local devices without any problem (like ping router 192.168.1.1, SSH to the Raspberry Pi, or use FireFox through the SOCK5 proxy hosted on the Pi).
Android phone connects to the Internet perfectly.

Debug:

using iptables -t <table_name> -L -v to show packet count, all chains have some packets, *except the FORWARD chain of both raw, mangle tables shows Chain FORWARD (policy ACCEPT 0 packets, 0 bytes). After some googling, rp_filter is the suspect but I'm sure it's turned off.

NetFilter (iptables) operates at higher OSI layer. What about IP routing (ip rule and ip route)? Are they set up correctly? Android doesn't use main table by default, unlike normal Linux distros. Related: How to send all internet traffic to a SOCKS5 proxy server in local network? and How to port-forward internet using Android Hotspot to PC?

Thanks to @Irfan Latif, I found the solution myself.
It's right that packets are sent to the last unreachable rule of ip rule, because they fail to match any previous rules:
# result of `ip rule`
... (no rules match)
22000:  from all fwmark 0x0/0xffff iif lo lookup wlan0
32000:  from all unreachable

So I added a rule to route incoming traffic from local network to route table wlan0 by:
ip rule add from 192.168.0.0/16 iif wlan0 table wlan0


text:
Can I copy data to be restored, if phone is stuck in bootloop?
My phone is stuck in a bootloop. I can get into TWRP recovery, which has a file manager. I can also connect the USB cable to computer and see the phones internal memory. Is there a way to copy text messages and WhatsApp messages so I can restore them on another phone?
I'm afraid the filesystem may have been corrupted. When I go to /data/data/ I expect to see names like "WhatsApp" or "Facebook" but everything is random...like +NiZZaTrs3RFzYegpkEk

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

Does this answer your question? /data's data is garbled in TWRP. How to decrypt

Does this answer your question? Backup WhatsApp from NANDROID

@Firelord please confirm the comments in chat will not be deleted by the system

@JonDon Hello. The comments are not deleted on their own. Only the chat room freezes after inactivity for consecutive seven days. Even after that, you can still read all the comments at any point of time in the future.

This was a long process with lots of side problems coming up. Somethings I don't know why they worked or did not work. I will give a recount of what did work in hopes the information will be useful in the future.
At a high level the idea is to backup the data partition, reflash firmware and ROM to fix the bootloop, reload the backed up data partition. Perhaps in some cases this would be enough, but recall the whole data partition is restored - you can't choose individual files or apps. In my case this corrupted some system settings but the data and apps were still there. I used Titanium backup to back those up to external storage, then flashed firmware and ROM again.
Whenever the phone is stuck use the "hard shutdown method" by holding the volume up and power button and waiting for the phone to vibrate 3 times. At this point the phone is off.
STEPS

The first thing to do is get into recovery mode with TWRP.
(If you already can do this, skip to step 3.)
https://twrp.me/sony/sonyxperiax.html

Notes About Sony Devices:
The Xperia devices have a recovery-in-boot arrangement. This means that the recovery is booted using the regular kernel / boot image in the device. Team Win has worked with the FreeXperia device maintainers to come up with a way to extract the ramdisk from the FOTAKernel partition and use the ramdisk from that partition instead of the recovery that is included in the boot image of your device. This means that if you install current CM nightlies and flash TWRP to the FOTAKernel partition, you will be able to use TWRP instead of the CWM or CM recovery that normally comes in a CM boot image. Other boot images including stock kernels can be repacked to include this extraction utility to allow you to use TWRP from the FOTAKernel partition. This setup allows you to choose what recovery you want to have installed and allows you to update your recovery more easily.  Unfortunately this setup requires that the boot image that you have installed include the ramdisk extraction utility.
TWRP may not work on your device unless you install other custom software as well.

You will need adb and fastboot, in Windows represented as adb.exe and fastboot.exe which run in command line terminal - (for adb and fastboot Windows XP click here)
If you do not have TWRP, follow these instructions (for the Xperia XZ1 Compact)
a) download the ZIP file from here (it is that TWRP but with working adb)
b) extract the img from the ZIP file (not a flashable zip)
c) connect the phone to the computer via a USB cable in fastboot mode. To put the phone in fastboot mode, completely power it off. Then hold the volume up button and the power button at the same time until the light on the phone turns on. connect the phone to the USB cable if it's not already.
d) If you're on Windows, open a command prompt with administrative privileges by right clicking on it and choosing "run as administrator". I recommend to use cmd.exe and not the Windows PowerShell. Navigate to the platform-tools folder with the cd command. Type in fastboot devices. If nothing is returned or it says "unauthorized" that means you need to install the correct drivers. The official drivers are here but I found I couldn't install them directly. I needed to download the Google USB Driver and replace android_winusb.inf with that from Sony. I found I needed to reboot using advanced options to disable Windows Driver Verification in order to install the drivers. Right click on the inf and choose "install".

Now that the drivers are installed, from the elevated command prompt run
fastboot devices
fastboot flash recovery C:\path\to\folder\twrp-3.3.1-0-lilac-android10-2.img

Boot to recovery. This can be done by turning off the phone, holding the volume down button and power on button at the same time until the screen turns on.
(If it doesn't work you can also boot image from fastboot without flashing)
fastboot boot C:\path\to\folder\twrp-3.3.1-0-lilac-android10-2.img

If your phone uses FBE file-based encryption the data will be encrypted with lock screen password/PIN (hence the strange file names in /data/data such as +NiZZaTrs3RFzYegpkEk). Newer versions of TWRP support decryption. TWRP should prompt you for a password when it first starts, however I found this buggy and it sometimes just didn't ask for a password. If this happens try restarting the phone in recovery or reflashing TWRP. Also going into terminal emulator from Advanced, try the command twrp decypt [password], see here if you had a pattern.

Backup your (decrypted) data from TWRP backup menu. make sure backup location is MicroSD Card or USB storage. Only choose the Internal Storage if you planning to save all your files to PC before factory reset.

Don't forget to backup Internal Storage manually as it is not included in TWRP backup. You can do this via cmd line
adb devices
adb pull /sdcard C:\path\to\folder

Note for adb to work, the phone must be in recovery mode (i.e. TWRP is open)

Download Flashtool, a ROM of your choice and compatible firmware. You can try to flash the same ROM that you have been using, but I was unable to find  stock ROM for this phone. I recommend Lineage 16 with this firmware (Lineage requires 47.2.A.11.228). I tried Lineage 17.1 but setup would go into a loop. Also download GApps Pico for Arm64 and Android 9. Download Magisk zip and apk. This is needed if you're going to use Titanium Backup to backup the apps and data you want to save. Perhaps in some situations this isn't needed if you can migrate without root.

Install Flashtool.

In Flashtool flash the FTF for the firmware first. Then flash the ROM (e.g. Lineage).

Boot into TWRP and install Gapps pico and Magisk. Magisk is needed for root which is needed by Titanium Backup, which will be used later.

The phone should be able to boot normally now. Give it plenty of time (e.g. 10 minutes). Take a break to go for a walk.

Confirm everything is working relatively ok. For example browse the web, download a simple app from the play store. If it's not, flash a different firmware or ROM with Flashtool.

Install and setup Titanium Backup. If you prefer alternative you can also use Migrate! (from the Google Play Store or anywhere else)

Reboot to TWRP

Restore only the data partition.

Clear cache and reboot to system.

In my experience all the data and apps were restored. But some system functionality was broken (like the WiFi). If it wasn't we would be done on this step :)

Use Titanium Backup to selectively backup the apps and data you want to keep. Make sure the backup is put on an SD card or USB storage so it won't get over written.
If your device is not working, there is also a method to do this 'offline' from recovery. refer to the Migrate support thread on forum.xda-developers.com (development in progress)

Do a factory reset from TWRP -> Wipe -> Format Data -> type 'yes'
if Format Data fails, Repeat step 7 and 8.

The phone should be working normally again.

Use Titanium Backup or Migrate to restore the apps and data from step 18.

Done.


text:
“OEM Unlock” unlockable
I've a very dramatic problem. I don't know how it could happen but sice a week the internal storage of my Cubot X20 Pro with android 9 is in "read only" mode. That's mean that I couldn't reset (anytime I tried, after restart, I found all like a week ago) or do something else. I spending last week looking and searching on web for a solution. I tried every guide. But nothing. The problem is that I can't switch on OEM unlock.

Without this all command on fastboot or adb will fail because the system is read only. Is a snake that eat his tail. So the question: there's a saint thatknow a program or procedure that surely work toescape that enpasse? Please I'm desperade, the phone has only 2 months of life and I can't take it on a assistance cause i've bank app and all accounts visible.

Have you tried to perform a factory reset?

if factory reset not working, try to flash empty userdata partition from SP Flash Tool. If no reset is possible sounds like data partition read-only which indicates emmc wear-out (btw unlocking bootloader will trigger factory reset)

I found this problem doing  factory reset. At the end of procedure nothing happen and that alarmed me. I also tried to flash the phone with stock rom from official site but tought flash tool say that all gone well, at restart I found the same screen of one week ago. https://www.cubot.net/platform/Support/detail/id/141/cid/10.html

did you flash userdata.img?

I don't know what you mean. I followed the instruction of link above. I also tried usi magisk app and flashing boot_patched.img created with it. It's like you try to modify an old cd-rom

in SP Flash Tool you have a scatter file with list of partitions to flash. one of the partitions is named userdata

some devices run in emergency mode where the whole userdata partition is mounted read-only - that mean any changes will revert on reboot (even factory reset) i first heard about such thing 4 years ago https://forum.xda-developers.com/showthread.php?t=3472891&page=2


text:
Hexedit libmmcamera2_isp_modules.so to fix camera daemon crash
I'm trying to get the camera working for the LG G4 (msm8992) in Android 10 (for almost a year now.
Can someone help me hexediting the camera blob (system/vendor/lib/libmmcamera2_isp_modules.so).
This blob seems to be a common cause of camera crashes:
https://github.com/search?q=%22libmmcamera2_isp_modules.so%22&type=Commits
I dont know what to look for to modify in the blob. I would like some guidance on what to look for once hexediting and debugging to find why the lib is causing the camera to fail..
Here is my log of the crashes during the startup of the camera app: https://github.com/aoleary/g4_issues/blob/main/Camera%20startup%20error
And the two tombstones :
https://github.com/aoleary/g4_issues/blob/main/tombstone_00
https://github.com/aoleary/g4_issues/blob/main/tombstone_01
These are the device trees :
https://github.com/aoleary/device_lge_g4-common/commits/q_cam
https://github.com/Suicide-Squirrel/Titan-Kernel-LG-G4/tree/staging/android-10.0
https://github.com/Suicide-Squirrel/proprietary_vendor_lge/tree/android-10.0

Modifying a binary via hex editor is possible but very very complicated. The common way to reverse engineer a binary is to decompile it to assembler using a tool like Ghidra or IDA and then modify it. But this requires still a lot of knowledge and if you don't know exactly what is going wrong it is even more complicated. In any way for modifying binaries I would recommend to post your question on https://reverseengineering.stackexchange.com


text:
Rooting Huawei mediapad T3 7 Wifi
I want to flash magisk on my device but i haven't been able to unlock the bootloader. I was wondering if i could patch the boot.img of the firmware file i found online then flash it with spflash tool. Would it work? Has anyone tried this?

Since mid 2018 Huawei does no longer allow to unlock devices, hence rooting Huawei devices has become extremely difficult. https://www.xda-developers.com/xda-huawei-decision-stop-bootloader-unlocking/

if SP Flash Tool can by-pass secure boot and flash it that will work. in Magisk Manager Advanced Settings enable keep avb/dm-verity preserve force encryption. but do a readback first for backup purposes

another method try mtk-su not sure it works for MT8127

or buy unlock code from dc unlocker


text:
On Firefox on Android, how to disable DNS over HTTPS and do normal DNS lookups via port 53?
I want Firefox on Android to be able to browse to local domain names on my LAN: http://koffiezetapparaat.lan should resolve to http://192.168.1.120 for instance.
This works on desktop Firefox, but doesn't work on Firefox on Android. I suspect that this is because of DNS over HTTPS.
What I tried:
I installed Firefox Beta on Android, went to about:config and set network.trr.mode to 5 as described here. Then, I removed all DNS cache present in Firefox on Android itself.
Then, I 'hard reloaded' http://koffiezetapparaat.lan by long pressing the reload button.
I still get a 404.
Network traffic analysis with tcpdump on my OpenWrt router showed no port 53 traffic, but a lot of port 443 traffic.
Please bear in mind that navigating to http://koffiezetapparaat on Chrome on Android works as it should, it resolves to http://192.168.1.120.
I supect that Firefox on Android still uses DNS over HTTPS and want to know a definitive way of disabling that.

Disable Private DNS (DoT) on Android 9+. It sends encrypted DNS traffic over port 853.


text:
Xiaomi A2 stuck in a reboot loop because of data partition
I installed the October 2020 update for my Xiaomi A2, and then it entered a reboot loop, giving me a "Cannot load Android system" message.
Actually, when I boot up the phone, I automatically get to the recovery menu, which only gives me two options: wipe the data partition, or reboot. And rebooting sends me back to the recovery menu.
Here's what I did:

First, using fastboot, I reinstalled the entire OS except the data partition. That ended up in the same reboot loop.
Then, using TWRP and executing it with fastboot boot twrp-3.4.0-1-jasmine_sprout.img I could adb shell into my device. From there I ran an fsck -f which did find a couple inode problem. But fixing those problems still did yield the same reboot loop.
Using TWRP again, I locally cloned my data partition using adb pull /dev/block/mmcblk0p69 data.img, then I tried the "wipe the data partition" option. My phone did reboot properly, but of course it was reset to factory settings.

Question: is there a way I can restore my phone to a working state with my previous data? I really don't want to reconfigure all of it…
Also I don't really understand what's the problem with my original data partition. Is there a way to know why Android doesn't want to boot with it and why it sends me to the recovery partition?
More info:

Running fsck on the local data.img says it has no error whatsoever
I can mount the data.img and browse it. It's full of, well, files!

in twrp do 'adb pull /tmp/recovery.log' and check if there is something like "successfully decrypted" - be aware for FBE you can't wipe locksettings.db https://android.stackexchange.com/q/216155

So, here's the best I could do:

Try to boot normally
The phone will crash and try to reboot to the recovery partition.
At that very instant, press volume down and power, so that it goes to fastboot instead
From fastboot, launch TWRP with fastboot boot twrp-3.4.0-1-jasmine_sprout.img
Once in TWRP, get a shell using adb shell
Then from this shell, look at the file /sys/fs/pstore/console-ramoops-0. It contains the previous kernel boot log!

In my case, here's what the boot log contains : init: Rebooting into recovery, reason: enablefilecrypto_faile. So apparently something is wrong with Androi File-Based Encryption…


text:
Stop news from trying to put me in a political echo chamber?
I like to tell google to "play the news" for me during long road trips.  However, I noticed it's giving me news which has a clear lean towards one side of the political spectrum.  While I admittedly do lean slightly towards that side I want to hear unbiased news which makes strong arguments for both sides' political views so I can make well informed decisions, not sit in an an echo chamber that says one side is always right and I shouldn't bother considering the other side's views.
I've manually blocked the 3 major networks that have a clear political lean, and I'm trying to block other news providers when I hear reporting with a clear bias, but since I'm usually in the middle of a long drive when it happens I can't block the provider right then, and by the time I've stopped and could block someone I usually no longer know who it was I wanted to block.
Is there some easier way to keep google from trying to give me politically biased news other then trying to manually block every single biased news provider, which I suspect would take forever?  Failing that is there at least a way I can block the current news provider, if I've decided their reporting is too biased, via voice commands while driving?

you have funny expectations to google - the whole design is to keep you in a bubble

@alecks Sadly it is, and I understand why google would do it from a business perspective, but I hate it anyways.  American politics are going down hill because everyone is in their own bubble that tells them their side is perfect and the other side is evil people trying to destroy America, the net result is cooperation across parties becomes even worse then it already was and nothing gets done.  Of course Google is just one of dozens of tech companies helping people put themselves in a bubble so it's probably not fair to blame just them for it.

it's 2020. it's not just america. it's Aldous Huxley Brave New World, or Marc-Uwe Kling QualityLand. blame the consumers

By Google, do you mean Google app? Because otherwise, the question would become off-topic to us.

question is about voice-control - blocking news provider via voice commands


text:
Is it possible to somehow understand from the logs what happened to the phone a month ago? Are there such logs?
I didn’t have access to my phone for a month, I’m afraid that I could have installed any software or hardware spyware. Is it possible to check it somehow by logs? Does the Android system keep logs for all operations in the system?

Here is some ADB commands that can help:
Dump each app and it data usage
for package in $(pm list packages | cut -f2 -d":"); do echo $package; pm dump $package | grep  "Mobile network"; done;

Monitor Application
for package in $(dumpsys package | grep "Package \[" | cut -d "\[" -f2 | cut -d "\]" -f1); do
    echo $package $(dumpsys package $package | grep firstInstallTime)
done;

That will list install date of all the applications on the device.
You can replace "firstInstallTime" with "lastUpdateTime" to get last update time.
Some applications monitor and store the phone state in a database or a log file, you can also backup the apps in the device and try to find some useful information in these backups.
Hope it can help!

Unfortunately Android does not maintain any persistent long-term log files by default.
There are some log buffers available that can be read via adb logcat. However the logs logcat can display to you are written to a fixed size log buffer (usually between 64k and 256k). If the buffer is full the first entries are overwritten.
Depending on the log traffic per minute this buffer usually last about some minutes up to may be some hours on a device that does not log very much (some devices really do create many log entries).
Some apps my do so, but if the logs are saved in the app private directory you need a rooted device to access them Also check the sdcard/Android folder and sub-folders for logs, but don't expect too much.
Therefore in your case all you can do is to perform a factory reset and if possibly try to re-install the device from a firmware image from your device manufacturer (if the manufacturer provides them).
Then it is up to you if you trust your device or not.

No.
It's not possible to use native Android logging to definitively say that your phone was not compromised when it was out of your physical control for a month.
If a device is out of your physical control for that long, you pretty much have to assume that anyone determined enough could have tampered with anything on it, including tampering with the logs to make it look like the phone was not tampered with. If you include hardware tampering, then really the sky is the limit.
On top of that, the native system logs aren't really designed to record tampering anyway, but just to help developers with debugging.
That said, you do have to weigh the threat level here. It's one thing if you have a normal life and your phone was left with a friend for a month vs. if you are in a spy film and your phone was captured by the villain.


text:
How to log requests to Google play services
Sometimes my battery usage gives me a very high percentage  (e.g. 45%) for Google Play Services.  Is there a way to log the name of the app that may be causing this problem.  Please note that I am not looking for a way to clear the play services heavy usage - I just want to know which app may be causing the problem.
Android version: 9
Google Play services version: 20.39.15
Thank you.

Have you checked adb logcat? As Play Services are an own process all apps have to use inter-process communication for sending/receiving something via PS. Such calls may be visible as Intent call in logcat.

Will using adb logcat require the phone to be always connected to the computer? If I use system tracing in developer options can I build a large trace file over a couple of hours?

Sorry, but I don't have an Android 10 device, hence I can not answer your question about system tracing as it is a new feature of Android 10.

Thank you. I have System Tracing in my developer options on an Android 9 device.
The System Tracing app is an Android tool that saves device activity to a trace file. On a device running Android 10 (API level 29) or later, trace files are saved in Perfetto format . On a device running an earlier version of Android, trace files are saved in the Systrace format.


text:
How can I access the usb of my device from inside a Lil'Debi chroot?
I am attempting to run adb from a Lil'Debi chroot enviroment. Unfortunately, I keep getting no devices in attached device list. The enviroment created by Lil'Debi links some system folders but does not    link /dev; I expect because Android /dev and Linux /dev are not fully compatible. I'm not even sure if this is a requirement for accessing the usb but I have read that since Lil'Debi chroot runs with full root priveleges that I am supposed to be able to access all the devices.

I have recursively bind mounted /dev/bus to /debian/dev/bus and can now get a read out from lsusb but adb still reports no device attached.

adbd uses Android/Linux kernel's USB gadget/device mode to expose itself to a USB host like a PC connected at the other end of USB. You are trying to access USB device from within USB device, not a host. It won't work simply. Better use ADB over network.

@Irfan Latif - Honestly, the goal is not to be able to adb from Lil'Debi chroot, that was just to try to test the connectivity of the usb device. The ultimate goal is to be able to use Rockchip usb tools from one android device to another. Unfortunately, the Rockchip usb tools are proprietary and only compiled to run in a Linux or Windows enviroment thus the need of the Linux enviroment created by Lil'Debi. Thanks for your reply.

https://github.com/guardianproject/lildebi/issues/41

@Aayush - after reading that I modified Lil'Debis' start up scripts to include 'mount -t devtmpfs devtmpfs $mnt/dev' and now have the following when issuing mount command with no args - devtmpfs on /dev type devtmpfs (rw,relatime,size=458172k,nr_inodes=114543,mode=755)

@Aayush - however still have same problem, I can connect a device and it will be identified when issuing lsusb command but adb still sees no device. I have noticed, both when using the bind mount as well as after having made the devtmpfs mount, that when issuing lsusb command it first says - libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented - before reporting the usb devices on the bus.


text:
if project treble aims to separate the platform and vendor partitions, why is the kernel source code needed when building system.img (platform)
if project treble aims to separate the platform and vendor partitions so they can be updated separately, why is the kernel source code needed when building system.img (platform) for AOSP, isn't the kernel source code provided by the vendor side?
p.s is the kernel source code used to build the core system/framework files or is it only used in the boot.img/recovery.img?

what do you mean?

i mean for system-as-root devices it may require kernel source to build system.img

is the kernel source used to build the core system/framework files?

https://source.android.com/devices/bootloader/partitions/system-as-root

do the core platform framework files in the system partition contain kernel specific code in a device which is not system as root?

consider self-answering your question here on android enthusiasts for sharing knowledge


text:
Conected to TV and control device via remote
I connected my Samsung Galaxy Tab S6 with my LG tv over HDMI and it works good so far.
But what I am missing, is the possibility to control my tablet with the LG remote controller.
When I connect my tablet via SmartView it works, but not when doing so via HDMI.
(I want the connection to be via HDMI because of different reasons.)
Is there some option that I missed?
Or is it simply not possible to send the needed signals over HDMI to my tablet?
If so, do you know of some workaround? Like connecting your smartphone to the tablet and use it as touchpad? I would like to avoid buying a bluetooth mini keyboard.
Kind regards

For forwarding remote control commands via HDMI the tablet would have to support "HDMI CEC". As the tablet is not directly connected via HDMI but instead a MHL adapter is used I don't know if the HDMI CEC commands can pass this adapter at all and second if the tablet supports HDMI CEC commands at all.


text:
What to do if my legacy device gets slower when Xposed Framework is enabled?
I'm using Xposed Framework 89 ver. on my Android 7.1.2 AOSP custom ROM: AOSiP which makes it slower but once I disable it my phone gets faster than the state of enabling. What can I do? Is there a lite version of it?

Is the device slower by your perception or is it only slower in some benchmark? Unfortunately the Xposed framework is designed to hook the central Dalvik-VM which is used (forked) by every app. Hence a little bit lower speed is excepted having Xposed installed. Usually with Xposed installed (without any modules) the device should not get much slower, however if you have a badly designed Xposed module this can be the cause.

It seems a little after a downgraded its version from 89ver to 88ver.


text:
Is it possible to add insurance cards to Google Pay?
I just received a new insurance card and would like to keep it in Google Pay. It's not a debit card that can be scanned as a method of payment; I would just like to keep digital copies of all of my cards in a single place on my phone. My State Farm app gave me the option of saving a copy of my car insurance to Google Pay, and I'm hoping there's a manual way to do this for other cards.
I've tried using the Add Pass feature, but there doesn't seem to be an option for just uploading an image.

It would be Google Wallet and not Google pay, but that's what I want to know too.


text:
Android 11 root process shows "no valid slot to boot" after flashing patched.img
This is the first time I've rooted a phone. I have a Google pixel 4a, running Android 11. I use Ubuntu 20.04 and have a limited knowledge of the command line.
I followed the process at this xda-link fairly smoothly until the last step before confirming root.
After extracting the stock boot.img, patching it with magisk manager, and running the command:
Fastboot flash boot magisk_patched.img
The Google logo pops up for about 10 seconds and then kicks me back out to fastboot mode. The "reason" displayed on the fastboot menu screen after this says:
No valid slot to boot
Im lost as to why this is happening, and I cant seem to find many people with similar issues. Which leads me to believe that I've missed something simple. Thank you for any insight, it is greatly appreciated.

that guide is far from complete... no mention of flashing right slot.. also encryption will break because no words about you must set preserve force encryption in advanced settings before patching..

I am thinking of buying this phone and did some reading. Firstly, On Android 11 most people suggest that you use the canary version of Magisk (search in Github), though some recent reports say beta Magisk version works. Secondly, it is easier for you to pick up the already patched boot image made using canary Magisk from here//Make sure you pick the right boot image // If it works for you, please self answer.


text:
How can I configure WhatsApp so that an email is sent to me when someone sends me a message on WhatsApp?
How can I configure WhatsApp so that an email is sent to me when someone sends me a message on WhatsApp?

You can also tell those people using Whatsapp that you prefer to receive messages via E-Mail.

Whatsapp natively does not support this, besides, it does not expose an API for other apps to use, so it's not possible. But using the notifications generated on receipt of messages, one can workaround these limitations.
automation is the way to go because, you need an action to be taken  in case WhatsApp is received from one / any senders.
Many automation apps are available. I prefer using MacroDroid , since it is free (upto 5 macros) and easy to learn. To understand how MacroDroid works, see answer here (Not affiliated to any app).
MacroDroid Setup

Give MacroDroid all the permissions it needs.

From Settings → Email account → Gmail account. Enter your account details and authenticate (MacroDroid needs to have access to be able to send you mails). Edit: As pointed out by a user you may need to use APP passwords instead of regular email password.

Create a macro as explained, name it whatever you like and save it.

Trigger: Notification → Notification Received → Select Application → Whatsapp → Text Content → Any (this will mail you for all messages received)

Make sure to uncheck prevent
multiple triggers (Edit:  As pointed out by a user if you get duplicate emails a fix could be, by checking multiple triggers YMMV)
A variant below for one contact
Notification → Notification Received → Select Application → Whatsapp → Text Content → Matches (or contains) → contact name (you can use wild cards or Regular expressions(Regex)
matching too)

Actions: Send Email → account → Email address (where you want the mail to be sent to) → Subject, copy paste

Whatsapp message from [not_title] at  [hour12].[minute][am_pm]
Message Text, copy paste [notification]
You will get mails with sender name, time stamp and textsee note as in screenshot below (Aa is a contact and I configured for a single sender)

Note:

Email  shows the text in notification, which may not be complete text, because Notifications are restricted to 500 characters . Long texts are truncated (in my tests text till see more was mailed).

Notifications need to be enabled for Whatsapp


text:
Are non indian sims work in this mobile?
I recently my Indian fb friend bought a Samsung F41 mobile online. On the package seal, it's written "Indian SIM Cards only".
Are non indian sims work in this mobile?

The restriction only affect users the first time they activate the phone. In short, just for the first time you'll have to use an Indian sim and afterwards you can use any sim card from any part of the world.
Source - Samsung: We don’t region-lock our phones (apart from when you first activate them)


text:
How to make a complete backup from rooted device to non-rooted device?
I would like to get my data from an old rooted android phone, to a new android phone which can't be rooted. adb backup and helium aren't able to get all of my data from my rooted phone.
Is there a way for me to use the power of root in my rooted phone to make a backup, and then through non-root means restore the backup to the non-rooted phone?

Does this answer your question? Transfer Android app with offline data to NEW PHONE without ROOT

no… unfortunately it just suggests adb backup, which i already tried

@əkaunt Unfortunately restoring app data of apps that disallow adb backup on an unrooted device is not possible.

@Robert do you think it is at least possible to set allowBackup directly on rooted phone without changing signature?

@alecxs I would assume yes as most properties from AndroidManifest.xml are cached in one or two central XML files. Unfortunately at the moment I don't remember where to find those files and their names.

@Robert I'd assume packages.xml being one of those. But still, not sure if the target will reject that as it gets the "no" from the APK (not from the XML it does not (yet) have).

@alecxs mtk-su failed on me… but setting allowBackup to true on the rooted device might be an option. I'm eagerly awaiting your answer

didn't find anything useful. guess it's not possible to change config on runtime https://stackoverflow.com/q/12870148

maybe it's possible to compile insecure com.android.commands.bu to ignore manifest? but the more interesting is still the restoring process on the unrooted device. will restoring work for matching signature with allowBackup=false? if so, that's worth a try

unfortunately that's pointless If someone
produces an apparent restore file with data for such an application,
it will not actually be restored onto the device

is it possible to recompile adb so that it doesnt check allowBackup and just backs up all programs regardless?

you probably didn't read the post from Nikolay Elenkov i have linked in comments. It's all written in java


text:
Android ADB Key Not Working
I used to have a rooted Android device about 3-4 years ago. I recently found it and I dont know the password. This android device was trusted on my computer but now it is showing unauthorized under adb devices. I also have the files called adbkey and an excel file. Do these keys expire after a certain time or am i doing something wrong? Thanks in advance.

If you connect the phone to your computer with adb setup, can you tell me what adb devices reads out; it might say "unauthorized".

you have the files just place the adbkey.pub into .android folder in your userprofile

@CzarMatt yea it is unauthorized.

@alecxs it is there

do you have any access to device via recovery, fastboot, Odin, SP Flash Tool? then you can by-pass. your question remains, first step to answer will be compare the files https://android.stackexchange.com/q/213116

The authorization depends on a key stored on your key. You can find it in the files ~/.android/adbkey and ~/.android/adbkey.pub. If this key has been modified, replaced or recreated the authorization is lost.
So you should make sure you are still using the same key.
However even if you have the same key you might not get an adb connection because of Android security (in detail the device encryption).
On modern Android device (e.g. Android 9+) adb is only fully working after the user has entered the lock password/pin/pattern for the first time.
Before this first user authentication has been passed adb is not or not fully available. For examle adb shell may work but access to /sdcard and other encrypted sections is not possible (Android 9 with FBE).
However on older Android versions (or if the manufacturer has changed the user authentication) this behavior may be different so that you see the device on ADB but the authentication fails as you have encountered it.
Edit: Starting with Android 11 there seems to be a new feature called ADB Authorization Timeout. By default this is set to 7 days. I did not had the chance to test this in reality but this looks like Android 11 device automatically "forget" the adb authorization(s) after a certain period of time. There is an option in developer options to permanently disable this functionality.

No I used this computer to root the device originally like 3-4 years ago so adb was authorized. The android is like v4ish if I remember correctly.


text:
Understanding the sending of commands in adb shell
I am trying to talk to the modem embedded within a module through adb shell but since I'm accessing the HW remotely, i'm not sure of the original setup and may need some help clarifying:
adb shell runs in linux and following is how I was able to run the command:
cat /dev/smd0 &
echo -e "AT\r" > /dev/smd0

what's the main point behind the first line with &? Doesn't that run things in the background? How does removing it not output the result to the terminal?
the interpretation of the second line: writes/sends the string to the application processor from the linux host over smd0 AT port. Is that legit?

Your question is about communicating with modem, not simply ADB shell. Communication with modem is very hardware specific and mostly closed-source, undocumented, not available for public use. Do mention your hardware specs. Also XDA and other forums are more suitable places for such kind of hacking stuff.

the 2nd line sends a request to serial. the 1st line is waiting for result. in order to make this work one must listening before sending request, that way the answer can not missed. one can accomplish that by running the listening process in background while sending request in same time. it is usual like for handling of named pipes


text:
Why downloading updates in android ask wifi connection rather than mobile data?
Why did downloading updates in android ask wifi connection rather than mobile data?

The size of update package is generally large so it by default uses only wifi rather than mobile data so that no money is deducted in case the mobile data is exhausted or there is no data plan.
In old devices
Go to setings --> About device --> software updates.
Here you disable the option download software updates via WiFi and enable , automatically download software updates or select manually update.
In new devices
If you're using a new device after clicking on check for updates ,you'll get a alert or popup showing what's the latest update, in most of the cases you will find a checkbox ticked against download using WiFi only, just disable the check box. If this is not the case then on the screen where you download the updates there should be three dots in upper right corner, you will be sure to find the option to change data usage preference there.


text:
Stop Notifications when the App is closed
This may be a stupid question since the Android is maybe supposed to work this way, still though I am wondering if this is possible.
Two apps, Microsoft Teams and Outlook are sending the notifications when the app is "closed". Now i would like for that NOT to happen when the app is closed. Is there any way whatsoever, that i can stop the notifications when the app is "closed"? I understand that the app is probably always running in the background and that until force stop it is never really closed. I am just wondering if I am missing something that can be chosen in the notifications settings that i havent found yet.
Also, i do realise that you can choose the "quiet hours" in the App settings itself, but that is not something i am looking for.

Push messages by design can wake-up (or even start) the app they belong to. The only chance to silence them is the "Do Not Disturb Mode" or if the app supports a different processing of push messages during certain hours.

Hello Robert, i was afraid you might say that but thank you for clearing it up for me!

You can block notifications of specific apps with Automate app. Tell me if you are okay with using a 3rd party app

@velvethadron If you want an app to not show any notification at all, you can long press the app -> go to app info. -> notifications -> and deny permission

So far I've found three ways to prevent notifications:

Remove the app. -- definitely not useful 99.9% of the time

Or, as you found out, kill any process that app. is running

The app. itself has some settings, including whether to send notifications or not

In the global Settings, go to Applications, search for the App, check the Notifications there and turn off what you do not want to be notified about

(1) is not likely what you want, (2) is rarely implemented and (3) is usually rather limited... so in many cases, it won't help you much. That being said, (3) can be an app. savior.
As Robert mentioned in a comment, the Android OS works by automatically waking up / starting applications when they receive messages if they were not running at that point. When installing an app., it can register the events it is interested in and it will receive them no matter what (nearly). And notifications work that way too...
In the cases you mentioned, it may require a poll() by the app. In that case, the app. has to be running. In generally, a very small amount of the app. gets loaded, just enough to handle the necessary code to run the polling. If the app. doesn't offer an option to turn that polling off, then it just won't go away without uninstalling.