text:
How shall I prevent an app from being killed without using third party tools?
Contrary to the traditional computing world, where programs won't quit without the user asking for it, in the mobile world (and Android in particular), it's generally considered up to the system to decide which app to quit and when, to the point where many if not most apps don't even have a quit option.
Up to some extent, it's justified due to :

The limited amount of RAM available (contrary to the PC/Mac world
where we've gone too far in the other direction, and the system by
default considers a program can ask for as much virtual memory as it
wants, which is a security problem, but that's another subject)
The devices being for the general public, in a context where people
don't necessarily have the knowledge/will/time to manage their phone
usage on an app by app basis
The apps are often designed to be used for short periods of time
(which is linked to the previous point somehow)

However, there are cases where one doesn't want a given app to quit unless it's asked to explicitly by the end user. The reality of that need seems to have been taken into account by some mobile phone manufacturers (if I'm not mistaken, Samsung has been providing such an option for some time now).
So my question is : how shall I tell the system to not kill a given app ? I know there are apps that pretend to achieve this, but how shall I do that myself, without resorting to third party tools, only the stock Android command line tools and APIs ?
Afaik, there seem to be three criteria to decide to kill an app :

Memory usage (the LMK daemon being in charge, unless a specific
driver is present, in my case I have lmkd running)
A limit on the number of running processes
Battery optimisation, but there's already an option to disable that
per-app, so I don't consider it a problem

So basically, only points 1 and 2 remain to be solved. You advices are welcome !
For what it's worth, I run Android x86 9.0 on an emulator (qemu).
EDIT : I checked the code of a program that's called App Settings, that's part of the Xposed framework. The program pretends to be able to set a program to stay resident in memory. After checking the code, it seems it modifies some application process attributes that are defined in the ProcessRecord class, namely maxAdj, curRawAdj, setRawAdj, curAdj and setAdj, setting those to the value of -12.
I wasn't able to test the program since my x86_64 Android 9.0 doesn't seem compatible with the framework, but I found this page, explaining in more detail how the activity manager service updates OOM values according to the app status, and communicates with LMK. It explains what the OOM values can be and what they mean. So clearly, trying to change the OOM values in /proc is useless, as the activity manager will change them, and probably LMK doesn't even read them anyway, and only takes what the activity manager transmits.
Is there any way to hint the Activity Manager into giving chosen OOM values to an app ? I could for example set the value to NATIVE_ADJ, or even no more than FOREGROUND_APP_ADJ at all times. Or maybe passing those parameters through a specially crafted intent ?
REEDIT : for those interested, the stop lmkd command should stop the LMK daemon until next reboot at least, which leaves only the OOM killer from Linux in charge. I didn't test it so I can't say for sure, but that should do it for some people. Beware of the consequences, however, if you continue using many apps at the same time, as a performance hit can be expected.

It's not the Android system which decides which app to quit. But it's the app developer who decides whether their app (or one of its specific functionality) should run in background or not. You are correct that end user cannot influence the decision much. If an app that should run in background but it doesn't, that's a poorly designed app. // OOM killer is also part of Linux kernel and every OS has some phenomenon to free RAM when needed. Android's LMKD operates in userspace because it provides more fine grained control over what to kill, asking system_server when making decisions.

You can run a native process (like an init service) in background and that won't be killed (do take care of cgroups though). Exactly the same behavior as on a Linux PC. Android's decision to not let apps run in background is not only to free RAM but mainly to preserve battery. And also to provide user somewhat control on privacy i.e. what's happening in background without being noticed. Phones are 24/7 partners and hence perfect spying tools, PCs aren't. Btw I don't think there's a reliable way to prevent an app (which doesn't run a FG service) from being killed, even using 3rd party tools

@IrfanLatif Thanks for your reply. However I'm not speaking about an app being able to run in the background, I don't have any problem with that, but I want to have an app in the foreground, switch to something else and be sure it will be still there when I switch back to it. It is able to leave the foreground, except the system sometimes decides to remove it, which is annoying.

Be aware of: https://dontkillmyapp.com/  realize that if the app is not actively on the screen, the app is in the Android Activity onPause state and may be killed. Programming related questions should be directed to https://stackoverflow.com/questions/tagged/android

@NovHak alright. You talked about LMKD and number of running processes, so I gave an overview of lower level things according to my limited knowledge. Now what you state in comment is a trivial problem (there exist duplicate Qs) and is entirely handled by Android framework (as you figured out in your edit and as mentioned by MorrisonChang). The logic to control app killing behavior is hard-coded in AOSP and is made more forceful by OEMs. So the only way is to modify the source code of your ROM (if available). It's development oriented question, not meant for end users (whom this site is for).

@MorrisonChang, thanks for the info. I didn't know about that problem of essentially Chinese phone manufacturers agressively killing apps, and I understand the concerns of the developers. However, on the other hand, I'm the kind of person who doesn't like invasive apps, trying to be everywhere on your phone and tracking as much as they can of your activity without leaving any choice, draining the battery as a bonus. And don't tell me not even one of those developers complaining don't fall into that category... But indeed, addressing that issue should be Google's job, not the manufacturer's

@IrfanLatif, I didn't realise this place was not for development-oriented questions, I will redirect accordingly in the future ! In fact, I'm not necessarily looking for a developer's answer, using command line tools would be OK too. However, I have the feeling my only option will be to run stop lmkd, that's better than nothing after all.

@NovHak stop lmkd would definitely break Activity Manager as there would be no way for AM to communicate with kernel for memory management. So the device may get into bootloop or at least zygote would keep on restarting. // I agree with your concerns that at least there should be a way to whitelist some apps from being killed in background (and in fact there should be if your device is configured to use memory cgroup on per UID basis (check ro.config.per_app_memcg)). But my point is that comparing to standard Linux distros, Android's memory management is no way worse. Actually it ...

... relies on Linux kernel's built-in subsystems including vmpressure and cgroups to limitize the allocated memory to apps before the killing stage comes. Linux kernel alone (OOM killer) may kill anything (including critical native service e.g. HALs and frameowork apps) on memory pressure events (if there is no dirty data to flush out and no SWAP memory). It relies on oom_adj and oom_score_adj values (if set from userspace). Android at least controls what should be killed first to avoid any crash situation. Also LMKD is added in Android 9, on older devices lowmemorykiller was an ...

... in-kernel driver which also depended on oom_score_adj values of processes but with a more fine grained control. That's why the problem you are highlighting is there since ever: https://android.stackexchange.com/questions/89544 // Now that said, what I have talked about above and what you are talking about IS NOT YOUR ACTUAL PROBLEM at all. Your problem is that the Android's Java framework (which runs in system_server native process and) which has a core component name Activity Manager puts your favorite app in a list of cached processes (to be killed if needed) as soon as ...

... the app is no more in foreground. App's native process is still running (if you check using ps) and is NOT KILLED BY LMKD immediately (if there's not a shortage of RAM). So to keep your app running even in background (and not to get into cached processes list) the app must be in foreground or it must run a service (in Java framework, not native) or a broadcast receiver etc. Or the other way again, what I stated in my previous comments: modify Android source to change the behavior how Activity Manager puts apps in cached processes list, which is not exactly killing ...

... the app, but is a quickly resume-able state. After modifying AM, playing with LMKD or kernel's OOM-killer would be the next step. // I hope it clarifies the situation now. Sorry for the length. I can improve and post it as answer if required.

Thanks for your reply ! However, you seem to be thinking I didn't understand something about the true cause of my problem, but I understood perfectly (or so I think). I know everything comes from the Activity Manager and it's where the problem should be addressed in the first place, but as you said, it requires a modification of the Android source code, since basically there seem to be no API or tool to do what I would like to do. Stopping lmkd should not be done on a regular basis, since it breaks Android memory management. I would only do that when running a specific app and nothing else.

"I would only do that when running a specific app and nothing else." This statement of yours indicate that either me or you have a wrong understanding of what LMKD actually does. According to my understanding stopping LMKD won't let your app run in the background (if it's not running a foreground service). Activity Manager (if it manges somehow to keep on running after LMKD is stopped) will still put your app in a dormant state as soon as it leaves the foreground screen i.e. native virtual machine process is put in cached process list (see under Running Services in Dev Options).

What you suspect that LMKD does is achievable by setting Background Process Limit in Dev Options to "0". It's equivalent to Force stop in individual app settings. Or kill <pid> from CLI. This is not what LMKD does.


text:
Bluetooth and external speaker loosing audio data
I'm experiencing a weird problem. When I connect my android phone (Android version 10) to a bluetooth speaker, for some MP3, the ones where there are pauses inside a track (for instance, for languages courses), the sound is not reproduced correctly.
Basically if a track is composed by sentenceA pause sentenceB
the very first beginning of sentenceB is lost. An example:

Hello, how are you.........I'm fine and you?

In this case I can hear:

Hello, how are you.........m fine and you?

Do you know how to fix this problem? I couldn't find any option in the phone.
Thank you
[edit]
Android version 10
Kernel Version 4.14.113

Please always name the manufacturer and model name of all devices that are related to your question (phone, BT speakers). For Android devices also include the installed Android version.

sure thank you. Android version was already mentioned in the post

source: Stack Exchange

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

sort: votes


text:
whatsapp bluetooth call gets disrupted by 2nd incoming call
In Android 10, while talking to a person on Whatsapp using bluetooth headphones, I receive a standard call on the phone, and two bad things happen:

the sound of incoming call is bothering me for too long and too loud, as if it does not realise I'm using bluetooth headphones,
once the incoming call is not answered, I lose bluetooth connection in Whatsapp, namely it goes back to default phone speaker/mic.

(This situation could also be e.g. Whatsapp/Signal, or even perphaps the ongoing call being disrupted by the incoming one: in this case where is the priority set?)
Is this a bug of my phone/ROM, or is it standard?
Is there a way to have a better default behaviour, perhaps

only hear a low sound for incoming 2nd call while on bluetooth,
not get bluetooth disrupted and having to set it back by hand

in the Android options?

Yes it is WhatsApp bug.
You can click on Bluetooth icon to reconnect to your headphone again.
Hope this helps till it is fixed.

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


text:
Top running processes - interpretation of Termux result
Post updating a bunch of apps, I noticed high battery drain and temperature. I ran top -m 10 on Termux and the output is below

Going by the CPU usage, the first app is a big culprit and was killed (will study the change in performance later).
How do I interpret the fields in heading (line 800%CPU 107% user...) and in general how do I get help? (top --helponly gives the options but not the description)

CPU on Linux is usually measured in 100% equals 1 CPU core.
So 800% means 8 CPU cores.

This means that processes in user space, doing ordinary things that don't require calls into the kernel, are using 1.07 CPU core equivalents cumulatively. You can also think about those numbers in terms of time, meaning a total of 1.07 seconds per 1 real time second of CPU time is spent doing unprivileged CPU instructions.

This blog gives details


text:
Is it possible to image android phone and run on emulator?
I have an LG phone with faulty screen that I am not interested in fixing, but I am interested in an installed app.
I am looking for a way to convert it to an image and run it on my PC, is that possible?
Searching online just shows me results for how to transfer images from my phone to my PC :D

Hope you're doing well.
You said you're interested in an application, well let me try and clear it up, but if you just want to use an application, you're better off with running it fresh on an emulator, and that way you will not have to worry about your broken phone, but if it is the app data you're interested in then I'd suggest you'd take a backup of your phone, that will basically be an image of your broken phone, using adb tools and then restore it onto an emulator. But you will have to look it up as to how you want to flash adb tools onto your phone without a display(assuming your display is completely dead).
Otherwise, your topic seems a little too broad


text:
Show incompatible (installed) apps in Play Store
It appears that the Play Store app (not website) is hiding apps which are incompatible with your device. Is there a way to disable this, so all apps, regardless of whether they are compatible or not are shown?
I am not asking for a way to install incompatible apps, just a way to find them in the Play Store.
One workaround is to search in the web version of the Play Store and then have the browser open it in the Play Store app where it then shows that the app is incompatible. But this is rather cumbersome.
The current behavior of hiding incompatible apps seems pretty counterproductive and might lead users to download knock-off apps instead because the user cannot find the official one if it is incompatible.
What is even weirder is that apparently when you have an app installed and a new version which is incompatible with your device gets published, you will not be notified and the app will not be listed under your "Installed" apps either. So you have to rely on the old version of the app itself to check for updates (I doubt many are doing that) to notify the user that they are using an outdated and potentially unsafe version.

Why would you as an end-user want to see an app in the app store that you can't install? Wouldn't that cause user confusion?

@MorrisonChang, I would be less confused if I knew that an app existed, but my device is outdated, compared to not being able to find an app (you possibly even have installed, see question), and having to open the browser just to find out that the app indeed exists (and being to view ratings, changelog, ...).


text:
How does a soft reset of a smartphone with Android really work?
Does it only trigger some kind of "shutdown -h now"? Or are there any hardware mechanisms involved?
I want to know, what happens, if I shutdown the smartphone such as you can do with holding the "start" button for 10 to 20 seconds in most cases.
More concrete: What happens, if I press the power button on my Huawei P20 for 10 seconds? What steps are taken exactly?

Related answer on different question: https://android.stackexchange.com/a/82857/44325

See my answer to How to perform a hot reboot using the terminal emulator?. Related: What is the fastest way to shutdown unrooted Android phone?

The forced reboot by holding the power button for 10-20 seconds is AFAIK implemented in hardware. It directly resets the CPU. Therefore this forced reboot works even if all the software has crashed the the CPU is in an invalid state.


text:
Disabling data for specific apps on android
My device is rooted with magisk, and I prefer cli options over apps.
My device have android version 10 with stock android.
All the firewall apps connect to a vpn (which i don't trust at all) to block applications from using mobile data. That is why I'm looking for better options, I'm thinking of using iptables but I don't know how to block specific apps with that.

EDIT: I recently switched to Lineage OS 17.1, it does have options for disabling mobile data/wifi for individual apps.

See: Block apps from accessing the Internet on Android device If you've already tried the solutions listed there, please update your question with what attempted.

All the firewall apps don't connect to VPN, they just use VPNService API so that whole network traffic is redirected towards them (over TUN interface) and they may control it in whatever way they want. // Since every app owns a unique UID, you can use owner module with iptables to control traffic i.e. iptables -m owner --uid-owner .... That's what AFWall+ does. For details: How to view network traffic requested by a specific app?

Apart from that, not "all the firewall apps" use VPN – only those that don't have root access revert to that. I'm using AFWall+ and it does not use VPN, but iptables. And you can decide per-app as well as per-interface what app gets Internet access: via mobile data, WiFi, while in Roaming. It uses a GUI, but can be extended by your own scripts (which is what I e.g. do to override my providers DNS). // As your question is for command-line, I'm not sure if an answer along these lines would be acceptable? "iptables howto" would rather be off-topic ;)

@IrfanLatif that could probably be solved by running a service. But yes, I see your point. In dubio pro reo, let's assume OP meant to prefer cli over GUI, and things could match again ;)


text:
Why does the phone shutdown and battery drains super fast on 20% or less capacity when taking pictures?
When the phone is 20%ish or lower battery, after taking pictures the os shuts down.
I have observed this behavior on 5 different brands (lg, samsung, lenovo, xiaomi, oneplus), across different android os versions, across different camera apps, even on devices with the battery replaced with a new part.
The system takes a picture then shuts down. The battery drains almost visibly upon restart, going from 20 to 15 in a minute or two.
I've seen it on official roms, flashed roms, rooted phones etc. Hopefully somebody who's an expert in these things can hit this nail on the head.

So, basically, the method of estimation of battery level left is imprecise and the device is not suffering from a hardware bug but from a software bug ?
That seems unlikely, why did the estimate work properly in the first months of life ? why doesn't it work anymore even if I swap the battery with a new one ? I understand that if the battery is actually low, in reality 2-5% (even if it shows 20% on screen) taking a picture would still use the same amount of electricity as if it were 100%.
Is the chip/component/software system that estimates battery percentage left flawed ?

Long read with plenty of links. I will summarize so that one gets the key points and if needed dive in for details
Battery levels are not accurate

Firstly, battery levels based on voltage are an approximation and not accurate.Android battery levels are based on voltage See Are battery monitors accurate ? . Key points:

See this answer to understand why voltage based battery levels are misleading

The voltage of a battery does not tell you how much charge a battery has, nor does any other characteristic of the battery. Battery voltage does drop as capacity drops, but the voltage drop is a function of the percentage of charge, not amount of charge.

In other words, voltage correlates to percentage of charge, not amount of charge.

Li Ion batteries display a "flattish" voltage drop even though the amount of charge falls relatively steep.
Frequency(how often) Voltage levels are updated to reflect the current state is
up to the OEM (so,phones may show different battery levels under identical conditions

Voltage levels at extremities are again inaccurate for safety reasons

When your device says it is 100% , it is not really so (see this answer
When your device says it is O or low battery , it is not really so since a prevention circuit kicks in stopping further discharge

Camera draws a lot of power

Power drawn by a camera is quite high 1000- 2000 mW based on this old answer.This excludes the full screen power. Present day phones with multiple cameras and complex algorithmsfor image processing will surely draw a lot more likely to the tune of 3500 mW
As pointed out in comments, if you are using a flash even more power is drawn

Critical or low battery shut down
From Android 5 , IIRC, this feature was introduced , with later versions allowing you to configure the low battery level. High camera power drawn drops the voltage level to low battery shutdown
To summarise , we saw that voltage based battery levels are inaccurate, camera draws a lot of power and there is a critical battery shut down which is likely triggered
Readings on reboot

When you reboot the phone , Hysteresis comes into play

Hysteresis is simply the fact that once we've got the battery discharging, if we stop discharging it (say, by turning the phone off), it will keep on discharging by itself for a short while.

Your device is programmed to cater for this loss , maybe 2% or more or none

Voltage correction: Considerable power is drawn for reboot.In the first point , we said "voltage drop is a function of the percentage of charge, not amount of charge." . Percentage of change means there is a previous value needed to compare , i.e, N-1 (previous) value compared to N (current value). Now when it is 20% on reboot, it takes some time to estimate the current value (a minute or so in your question) and fall to the current value.

Hysteresis plus adjusting to the current value contribute to the rapid fall in a short duration
To add to all this is the degradation of battery performance over time and aging effect as described here Battery capacity wear-down, and its relationship to charging practices to be taken into consideration to answer your query in comments (why did the estimate work properly in the first months of life)

thanks for the answer, it's informative, however, how do you explain that a new phone does not display such behavior at all ? somehow when it's brand new, everything just works ? (no nvidia pun intended)

@Horatiu A new phone =new battery @  best performance ! = battery that has "aged". I pointed you to that in the last paragraph specifically. Please read that link again


text:
How can I dump UI hierarchy to a variable in Bash?
I want to dump the output of uiautomator dump to a variable and read it from there. How can I edit the below script so as to achieve that?
#!/system/bin/sh
while true ;
do uiautomator dump
sleep 1
done

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


text:
How could I prevent some smartphone's IMEI and/or ICCID leakage through getprop output?
By chance, I found some Android smartphone would leak IMEI through getprop, you could test in Termux like this:
# Tested on a Mi 5s Plus (Natrium)
$ getprop | grep imei
[persist.radio.imei]: [86REDACTED]
[persist.radio.imei1]: [REDACTED]
[persist.radio.imei2]: [REDACTED]
[ro.ril.oem.imei]: [REDACTED]
[ro.ril.oem.imei1]: [REDACTED]
[ro.ril.oem.imei2]: [REDACTED]

On a OnePlus 7 sold in China I even get ICCID of SIM card which could be used to track and retrive your personal data from ISP...
$ getprop | grep iccid
[persist.radio.bksim.iccid]: [REDACTED]
[persist.radio.ddssim.iccid]: [REDACTED]

And I have Magisk installed, so I come up with the idea of deleting these props using Magisk's ability to run startup script. I have tried using this script below:
#!/system/bin/sh
# /data/adb/service.d/0001deletethefuckingimei.sh, already has execute permission

# For debugging
touch /sdcard/init

# Wait till the system boots up
while [ "$(getprop sys.boot_completed)" != "1" ]; do
  sleep 1
done

# For debugging
touch /sdcard/after-boot

/sbin/resetprop -p --delete persist.radio.imei
/sbin/resetprop -p --delete persist.radio.imei1
/sbin/resetprop -p --delete persist.radio.imei2
/sbin/resetprop -p --delete persist.radio.meid
# For 3rd party ROMs like LineageOS
/sbin/resetprop -p --delete ro.ril.oem.imei
/sbin/resetprop -p --delete ro.ril.oem.imei1
/sbin/resetprop -p --delete ro.ril.oem.imei2
/sbin/resetprop -p --delete ro.ril.oem.meid
# For MIUI
/sbin/resetprop -p --delete ro.ril.miui.imei
/sbin/resetprop -p --delete ro.ril.miui.imei1
/sbin/resetprop -p --delete ro.ril.miui.imei2
/sbin/resetprop -p --delete ro.ril.miui.meid
# For OnePlus leaking ICCID
/sbin/resetprop -p --delete persist.radio.bksim.iccid
/sbin/resetprop -p --delete persist.radio.ddssim.iccid

# For debugging
touch /sdcard/done

But it seems that this script has never been executed, as there is no /sdcard/init. Somehow these props are set in the middle of the booting process, having no idea how it is set.
Currently I am using SmartPack Kernel Manager to run script after Android boots up, and limits untrusted apps running automatically at startup.

So the question is how to run a script on startup?

@IrfanLatif Partially...Yes? Just running resetprop to delete those containing IMEI before startup. With Magisk I thought this would be easier...

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

The problem is that it is hardcoded in the firmware (Correct me if I am wrong! ) and we could do nothing about it except delete this using Magisk's resetprop utility before apps start. So this is the point running a startup script.

OK, so I edited the problem for a more general discussion - Maybe someone else could figure all the mess out.

you probably run magisk in core only mode and script is not executed at all


text:
Connection issues
My Wi-Fi connection was very inconsistent, in times it would just be on 'Saved', and sometimes it's connected. I thought that I could maybe fix the issue by changing the last number of my IP address. As I read somewhere that the number must be from 1 to 225, I put a few numbers, but for every single one I would get 'Connected, no internet'. Is this an issue, because I have three members of my family that use the Wi-Fi. One has the same problem as me, and one has excellent connection. The one with the excellent connection connected to the Wi-Fi the first in our family, so does that have anything to do with his excellent connection and our poor connection? Thank you in advance.

usually DHCP Server gives you IP address and this has nothing to do with WiFi, it is not related at all. there are some incompatible combinations with speed rate protocols 802.11b/g/n/ac and encryption methods WPA/WPA2 TKIP/AES which aren't supported on all phone models. set the router to 802.11n-only + WPA2-CCMP (AES) and delete all previous saved networks before re-connecting phone

My phone is Umidigi A5 Pro, of the other family member with inconsistent connection Wiko View 2.

unfortunately, there is no common solution for this. try a few combinations and report back if this makes any difference. weak signal can have several causes


text:
How To Root An Android Phone?
I was looking here and there and i can't find any answers how to root my samsung galaxy s6 i was trying to root fully i was trying kingoroot,iroot,kingroot i can't so i find a different way to root my phone i just plug my computer and just download some files and show those steps that how to root a android phone? it says you need to root but a way to root the way is to enable bootloader so i have no option in my settings now guys how i will root my phone guys help me out of this thing!

Every phone is rooted diferently. It depends on the phone and current ROM installed. Normally the steps are as follows:

Enable USB debugging in the developer options for your phone. Sometimes the bootloader is also unlocked from the developer options.
Unlock the boot loader.
Install a custom recovery(TWRP, CWM).
Flash the root software with the custom recovery.

For your phone there seem to have been changes in the root process. You can try this video and report if you find any problem.


text:
How to gain root on BlueStacks Android emulator
BlueStacks is a popular Android emulator for Windows and macOS for gamers. It is popular, because the emulator ships with Google Play Store pre-installed and installing any games is easy. Unfortunately, the emulator file system is not rooted by default. How to root it?

These instructions require that you understand the UNIX command line basics. The instructions work on OSX, Linux and Windows. No Microsoft Windows or BlueStacks Tweaker needed.
The emulator is internally using VirtualBox and runs Android x64 binaries (64 bit). It ships with two VirtualBox VDI disk images, Prebundled.bdi and Root.vdi. Luckily BlueStacks has left a primitive su binary on the disk image, so we do not need to add this binary to the image ourselves. We still need to change VirtualBox settings, though.
adb command can be obtained from Android Studio SDK by Google or it is also found in /Applications/BlueStacks.app/Contents/MacOS/adb.
Make sure that the emulator is off and turn all disks in VirtualBox configuration file to read-write. On macOS, the file can be found ~/Library/BlueStacks/Android/Android.vbox. Make sure the emulator is not running when you edit this file.

Start the emulator.
Enable ADB bridge in the emulator settings.

Download SuperSU zip file on your local computer.
Start your ADB hacking session.
# This is the default port exposed by BlueStacks
adb connect localhost:5555

Push the zip file to the /mnt/sdcard of the emulated device.
adb push SuperSU-v2.82-201705271822.zip /mnt/sdcard

Then work inside the emulator shell:
# Start shell session in the emulator VM
adb shell

# Use the provided BlueStacks binary to switch to root
system/xbin/bstk/su

# Disable SELinux
setenforce 0

# Remount all filesystems
mount -o rw,remount,rw /
mount -o rw,remount,rw /system
mount -o rw,remount,exec,rw /storage/emulated

# Unzip SuperSU zip
cd /mnt/sdcard
mkdir supersu
cd supersu
unzip ../SuperSU-v2.82-201705271822.zip

# Extract su command and run its post-install
cp x64/su /system/xbin/su
chmod a+rwx /system/xbin/su
/system/xbin/su --install

# Start su daemon mode
/system/xbin/su --daemon

Now run the installer for Superuser.apk in the emulator through Media Manager.

When su --daemon is running SuperSU Android UI should detect the root when started:

The emulator needs to be restarted after this as it hangs. After the restart, when opening SuperSU you see it is enabled.

I got this error cp: /system/xbin/su: Read-only file system when I ran cp x64/su /system/xbin/su. i followed all of the steps up to that point. How can I fix this?

Some of the earlier steps have failed and Virtualbox did not mount the disk in write mode.

Something's wrong with the SuperSu zip. It doesn't extract and VirusTotal doesn't like it for some kind of ad aware library. I'd recommend checking on that and ensuring a safe binary is used instead.

mounting of /system fails. I too am getting Read-only file system. Anyway to bypass this?

I just found out in latest build they removed su access. now I get permission denied for su. I did kind of work around. Mounted Root.vdi under Library/Bluestacks/android into ubuntu vm via virtualbox. Added the files manually. changed their permission to 1000:1000 and tried 2000:2000 but did not got it to work. only position independent executables on super su. also tried busybox's su but no luck yet. I copied bstk su to other location. It works but gives output 1 and gives back shell user again. :(

may also (instead?) need to change a "ReadOnly" from true to false in bluestacks's HypervVm.json

Using the latest version of BlueStacks5 I ran into a few changes.  1) The file name to edit for read/write is now named Android.bstk.in.  2) I also had to change HyperVm.json (thanks amgg).  3) /mnt/sdcard is not accessible in any way.  I simply used /sdcard instead. 4) telling people to randomly search for "SuperUser.apk" is not a good idea.  Lots of garbage comes up.  Tell people to find "SuperSU free".

Mikko Ohtamaa's answer already covered the main question. However, if there are some difficulties while following it, here are some additional tips that may help:
a) If adb connect localhost:5555 doesn't work, try adb kill-server and then adb start-server
b) Usually the .zip file SuperUser..... is a directory, if so, I suggest avoiding these steps
mkdir supers
cd supersu
unzip ../SuperSU-v2.82-201705271822.zip*

c) Try to find the SuperUser.apk on the internet. Then run
Exit from adb and begin from the first step
All steps are similar but
adb push <SuperUser.apk just got from internet> /mnt/sdcard
Avoid these steps
#1. Unzip SuperSU zip
cd /mnt/sdcard
mkdir supersu
cd supersu
unzip ../SuperSU-v2.82-201705271822.zip

#2. Extract su command and run its post-install
cp x64/su /system/xbin/su
chmod a+rwx /system/xbin/su
/system/xbin/su --install

#Continue with the next steps
Then run the SuperUser.apk you got from the internet from the step where says run SuperUser.apk from MediaCenter.


text:
Samsung s7 password locked - can't get onto phone
today I authorized a payment through Google pay on my phone. I've always avoided this and now I know why I never wanted to pay through Google. As I made this purchase it prompted me to create a phone safety option (either a pattern, password, or fingerprint), and I didn't really understand why that was necessary to authorize payment (no other payment form was given as an option), but I went with it and created a password. I remember this password. Now after my phone went to sleep, it wanted me to enter a password, since I apparently enabled this feature (hate it). I entered the password I created during this transaction, and there is no 'enter' button or prompt. Just the password box, and 'emergency call.' However I tried hitting 'done' on my phone keypad and it says incorrect password. Several times, I know it's what I created it with. SO... I went ahead and tried my actual Google password for the email account I used to make the earlier purchase. Still can't get onto my phone. I'm sorry, but what the hell ???  Can anyone help me with this and maybe a way I don't need to factory reset and lose everything (pics, texts, apps, contacts (I'm not sure if they're Google backed up)) ?   All I wanted to do was relax and watch something I really like.  I'm also having trouble troubleshooting on my computer because it's slow... and I can't call anyone.  WHY

remove the SIM card. this way you can be sure not to mixing up SIM pin and screen lock. maybe the password is too long and doesn't fit? i am sorry to say but all your data is lost. you can try to set new password from PC with Find My Mobile or Find My Device but people report this method doesn't work. Your only chance left is enter the correct password

If you go through your computer and change the password it makes you able to initialize a new password and unlock it manualy when you do so and log off your computer after turning your phone back on so yes turn your phon.off before changing it on your cpu
. I hacked a phome back to myself this way but i forgot the password and initaly im forever locked out of that phone unless i figure out the newest password that google took away from me! Contact google AFTER! YOU do this so your account dosent get locked due to them thinking its being hacked!


text:
How do I run an Android app on an iPhone?
Based on my 30-60 minutes doing research on Google it seems there is no general solution for my question, but I wanted to double check on my favorite Q&A forum network, SE.
So, how can I run an Android app on an iPhone?

Generally, you cannot run Android apps on an iPhone.
Based on my 30-60 minutes doing research on Google it seems there is no general solution.

This Android.SE post
This Quora question

However, some apps can be emulated on an iOS environment.

Cydia is an emulator option for jailbroken iPhones, as mentioned in the Quora post cited above
iOSEmus is an emulator option without the need of jailbreaking iPhones. By the way, I recommend these installation instructions.

I welcome anyone who has more general solutions.


text:
Bootloop issue and can't go to recovery mode
I am using Asus Zenfone 3 ZE552KL, it got hang and then i tried to restart the phone but it get stucked in, Also I can't get in to recovery using standard method. Generally I keep USB debugging mode off that's why my device not listed in adb devices list but, i can go into CSC Fastboot mode.

Text in the image.
csc fastboot mode!!! long time press power button to restart
I tried below solutions

Used Asus Flash tool as per its help doc the process takes 10 to 15min but i wait around more than 2 hours it shows "Uploading OS Version"
I downloaded Firmware zip file from asus official site, but in zip file only boot.img is present other two requried files are missing recovery.img and fastboot.img

Kindly suggest me some workaround.

Hi @alecxs, Thanks for your answer. Just want to know from where I can get twrp-3.2.3-zenfone3-20180806.img file

got it, tried your method and getting this error Sending 'boot.img' (21090 KB)                      FAILED (Write to device failed (Unknown error))"

please try flashall_AFT.cmd it may work with locked bootloader (link see answer below)

@alecxs i tried flashall_AFT.cmd method, and got this error "FAILED (remote: failed to write partition)". I think need to set some permissions to write data, is it so?

then you are left with EDL mode

the device's USB debugging mode is off.

EDL mode is qualcomm Emergency DownLoad Mode and doesn't require adb usb-debugging, oem unlocking or fastboot. instead it requires deep flash cable and factory loader (firehose programmer)

The Asus Zenfone Flash Tool is no official Software, furthermore it looks like this tool is using fastboot (which usually works on previously unlocked bootloader only)

for fastboot.exe download platform-tools and open cmd.exe. navigate to platform-tools folder with cd now you can type
fastboot reboot

if bootloader is already unlocked, you can also wipe cache partition and see if this fixes your boot problem
fastboot format:ext4 cache

you can also boot into recovery from fastboot and then install firmware update.zip. this should even work from TWRP as long as you don't flash recovery.
do NOT allow modifications of system. just wipe cache partition. try to reboot into system from menu. if still not booting, install firmware update.zip
fastboot boot C:\platform-tools\twrp-3.2.3-zenfone3-20180806.img

for locked bootloader you can download Factory_Phone-userdebug.raw emmc image which contains GPT partition table and all partitions. (from linux it is possible to loop-mount this image with kpartx  and split into partitions, but this is out of scope)
WARNING: all data lost
this will flash the entire device, be aware this deletes all your personal data. make sure this is the right phone model.
download CSC_ZE552KL_13_13_1_36_M2_6_7_P7_userdebug.zip.
it seems no flash tool is needed, it is maybe working from fastboot directly.
connect usb cable in fastboot mode and just run flashall_AFT.cmd

Qualcomm Devices usually can be flashed from EDL mode with QPST.
found a site with some Qualcomm EDL Programmers maybe one of this works for your device
Qualcomm_Factory_Loader_MSM8953_Lenovo.mbn
Qualcomm_Factory_Loader_MSM8953_Xiaomi.mbn
Qualcomm_Factory_Loader_MSM8953_Xiaomi_2nd.mbn
for EDL mode install Qualcomm HS-USB QDLoader 9008 Driver
for EDL mode you need to find Test Point

The following is just an example to illustrate the process and not valid instructions
For further documentation refer to alephsecurity there you can learn how to flash devinfo which unlocks bootloader and gives availbilitiy to flash custom recovery TWRP
basically you need the following files (most of them are included in QPST)
fh_loader.exe
QSaharaServer.exe
prog_emmc_firehose_8953.mbn
rawprogram0.xml
patch0.xml

the xml file has instructions for flashing partition, for example TWRP (not the right size/offset)
<?xml version="1.0" ?>
<data>
 <program SECTOR_SIZE_IN_BYTES="512" file_sector_offset="0" filename="recovery.img" label="recovery" num_partition_sectors="131072" physical_partition_number="0" size_in_KB="65536.0" sparse="false" start_byte_hex="0x1c200000" start_sector="921600" />
</data>

QSaharaServer.exe is used to initialize firehose with on the already to COM port connected device in EDL mode
QSaharaServer.exe -p \\.\COM10 -s 13:prog_emmc_firehose_8953.mbn -b tmp\"

fh_loader.exe is responsible for flashing the instructions from xml file
fh_loader.exe --search_path=tmp --port=\\.\COM10 --sendxml=twrp.xml"

search for collections like romprovider.com, firmware27.com, leakite.com, github.com 1, 2, tuserhp.com, firmwarego.com

found prog_emmc_firehose_8953_ddr.mbn (chinese post)


text:
Help in Reverting Nokia X RM-980 to STOCK ROM
I have a NOKIA X RM-980 mobile phone and I desired to install a custom ROM on it. I had choose Lovi OS 2.0 Update 1 (Unofficial-LoviOS-2.0pa.zip) + (TWRP-3.0.0-0-normandy-X.img) .
After that I decided to install Google Play (GApps_Minimal_4.4.4_signed .zip).
Problems:

After setting up Google Play with my account, it didn't worked! and
many pre-installed apps became corrupt with an error message:
"unfortunately com.google.process.gapps has stopped" .
WiFi is automatically powers every time I restart or power-up the
phone.
Camera became not working with this error message: "unfortunately
the process com.google.process.media has stopped" .
I backed-up some personal files by Moving them from SD card as a
prepare step to install the stock ROM on this phone, but they are
still appearing when I connect the phone to my PC ! and in the same
time aren't exist at file manager on the phone ???
So, I decided to rollback to the original firmware - stock ROM - by
following two methods:

(5a) Nokia Care Suite.
(5b) Nokia X Flasher.
(5c) ADB and Fastboot.
All are not working, after restart, system is restored again and again with the same status !
During this post, I tried to do something to prove my theory. I've change the desktop background on the phone and after restart, it revert back to the default one. Phone became in "read only" or "system restore" mode. that's why the stok ROM wouldn't install.
No important personal data on this phone, I'm free to totally format it.
Stock ROM info:

Model : RM-980
Variant : 059T9F2
Revision : 1.2.4.1
Manufacture : Microsoft
Platform : Nokia X

Apart from that, let me share some issues that I found may it will help us to solve this problem.
To check the status of bootloader, I used this command:
fastboot oem device-info

Device tampered: false
Device unlocked: false

I used this command to unlock bootloader:
fastboot oem unlock

Device tampered: false
Device unlocked: true

Every time I reboot the device, it's resets automatically to locked state again.
Device tampered: false
Device unlocked: false

I think the main problem is that device is not writable. Any actions on this device was gone after every reboot.
I don't know how to troubleshoot this problem?
I really appreciate your supporting in this. I really need every help.


text:
Android phone keep broadcasting SSID
I didn’t have android devices for years, I got a Xiaomi redmi 7 for my son but I don’t know why it keep broadcasting a SSID “Redmi”
From what I understand that the “WiFi Direct” (settings/Wi-Fi/Additional settings/WiFi direct)
I don’t see any option to turn it off, how can I prevent to broadcast any WiFi but allow to connect to an external WiFi network ?
I’m also surprise it’s won’t connect to 5Ghz, I assume it’s not compatible but that really funny for a smartphone bought in 2020

According to GsmArena Xiaomi redmi 7 has only support for 2.4GHz Wifi: Wi-Fi 802.11 b/g/n. As usual you get what you pay for hence you can't expect much from a low budget phone (<150€). Regarding the Redmi wifi I would assume that the Hotspot feature is activated on the phone which allows to share the internet connection with other Wifi devices.

“ you can't expect much from a low budget phone (<150€).” agreed, regarding the hotspot feature yes that was my guess but I never found anything

Just to confirm, I checked again and portable hotspot is off already - saying that I realise that the phone is randomly broadcasting the "redmi" SSID, I guess it could be the user too (he claiming not doing anything but I don't understand how would that broadcast otherwise...)


text:
Force install apps?
I bought a cheap Chinese Android-based set top box for the bedroom. It came with a few apps preloaded, amongst which YouTube and Netflix.
Unfortunately, the developers of this box seem to have missed a few steps, and the device does not seem to be configured properly as an Android TV device. The result is that the installed YouTube app is the Android TV version, but the installed Netflix app is not. Needless to say, in this situation the Netflix user experience is suboptimal. When I try to install the Android TV version of Netflix, Google tells me that the device is not compatible.
Due to the whole lockdown situation, replacing the device by one that is done properly is complicated right now (courier services are in lockdown as well where I live, and the shop where we bought it is not currently in operation until after the lockdown), so I would like to explore the possibility to override these restrictions somehow. I don't mind hacking the device, as long as it doesn't require rooting the thing, as that might mean Netflix won't work anymore at all, which obviously I wouldn't want.
How do I figure out why the Android TV version of Netflix won't install on my device, and is it possible to override this restriction somehow?

Instead of trying to force an installation you should first find out why Netflix TV app is incompatible. Therefore I would suggest to enable Developer mode + ADB and connect the TV box via USB to your computer. Then try to install the Netflix TV app via adb install netflix.apk and see what the error message is.

As it might be relevant lateron: have you [tag:root-access] on the device, or can you obtain it?

@Robert that makes sense, and I had a look at it, but it turns out this device doesn't have a USB port (at least not an external one -- I did say it was cheap). Before I resort to a screwdriver, is there another way to do this? It does have two USB A host ports as well as a micro SD slot, if that helps.

@izzy as I said in the question, I'd prefer not to root the device if it's possible to avoid that, as that can cause certain apps to refuse to install (including Netflix in some circumstances, I've found)

@WouterVerhelst ADB interface can also be used via network. Search for adb ip or wireless adb.

@Robert thanks. The only way I can find to configure adb over WiFi is to first connect through USB, and then to run adb tcpip to enable the wireless method. Am I missing some other option?

maybe the power connector is micro usb?

I fiddled with this a bit more, but eventually gave up and decided to just buy a slightly more expensive device that's a proper Android TV one. The new one does not have the issues of the other device, and I can use proper Android TV apps now.


text:
Accept Android SDK Build-Tools on Windows 10
I'm trying to understand why there is no GUI way or Post-Installation process to accept the android SDK Build Tools license:
Failed to install the following Android SDK packages as some licences have not been accepted.
   build-tools;28.0.3 Android SDK Build-Tools 28.0.3
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html

After searching a lot I found the command for sdkmanager.exe but the directory tools/bin/ does not exist in C:\Users\MyUsername\AppData\Local\Android\Sdk.
Can anyone help me to accept the license to move on? :)

You can view and accept all licenses of the Android SDK and related components using the following command:
android-sdk\cmdline-tools\latest\bin\sdkmanager.bat --licenses


text:
Why is Gmail taking so long to fetch new e-mails?
Mobile Gmail in my Moto Z2 / Android 7 needs ten times longer time to fetch / show new e-mails in my mailbox than it happens in web version on my PC.
Is there anything I can do about this?

For years using mobile Gmail (now with Motorola Moto Z2 Play / Android 7.x) it was clear to me that mobile Gmail needs much, much more time to fetch e-mails that its PC / web counterpart.
But now this went far beyond the level that I can accept. My Gmail needs literally 15-30 minutes or sometimes even more since e-mails is sent till it appears in my Inbox. While PC counterpart needs 2-3 minutes in the very same scenario.
Just an hour ago I wanted to sign-up to some service and I wasn't able to do this, because my mobile Gmail was fetching account verification e-mails after 30+ minutes since sending them. Which was too long, because service -- that I was trying to sign-up for -- allows only 30 minutes long account verification tokens and each time was showing an error that the token that I am trying to verify account with has already expired.
After three such unsuccessful attempts I opened up my laptop, used web Gmail and managed to complete the process within 3 minutes, because that was the time needed by Gmail to show up verification e-mail.
fast.com shows 30 Mbps for mobile phone and 60 Mbps for laptop, so network speed shouldn't be a problem here.
On contrary to other mail clients, Gmail doesn't have any frequency setting for checking e-mail and mails are checked with as often as Google thinks they should.
So, is there anything I can do about this?
Any thing to speed up my mobile version of Gmail?

I don't know what can be done but I've switched to this open source, privacy oriented E mail client that is fast and much more flexible. I've been using it for an year without any problems and happy that I switched

AFAIK GMail app uses Google push notification to be notified of new messages in a GMail account. Hence there is no frequency setting. For comparing PC and smartphone make sure to use the exact same network because even if the tested network speed shows no issues this might be different to the GMail servers. Have you tried to clear the app data and caches of Gmail app?

Check any battery optimization settings for the Gmail app. The app won't sync if the device is on battery saver. Also, check the network connection between the Google server and the mobile, or otherwise try other email clients to confirm whether the issue is on the Gmail app or not. I got notifications from Gmail on both Android and a Windows 10 laptop almost at the same time when an email arrives.

Thank you all for your valuable comments. I will try to address them all here though I am pretty sure that this is like looking for a needle in a haystack. So: I am using exactly the same (home) network with only difference that laptop is connected through cable so fast.com shows much, much higher network speeds than on wireless in mobile. I have just cleared cache and app data cleared and turned off battery optimisation and will observe for some time. If there is no difference, I'll switch to an alternative solution as suggested, thanks.

BTW: I have just noticed that in current form this question is not answerable as is too wide, too opinion based and in fact is a mentioned searching for a needle in a haystack. If we consider answering it, we should rather focus on answering, if there are any possible time-affecting problems, in scope and by design? Seems, not. I'd suggest anyone of you adding an answer focusing around of Andrew T.'s claim that there should be no difference and only suggesting all these solutions you formulated here (battery optimisation, cache etc.). But, that is just a suggestion which I am leaving to you.


text:
Any way to force Android to treat copied pasted images as new?
I have some art apps that only let you choose images from built-in galleries that display images chronologically.
I have hundreds/thousands of images on my tablet (organized in folders), especially older ones I want to edit. It'll take forever to find within these apps galleries.
One thing I noticed is that downloaded images appear at the top of these galleries. So I thought a workaround would be to COPY & PASTE the older image (via file managers) - so that it appears as new.
But for some reason, Android will only treat downloaded images as new - not copied pasted images.
Is there any trick to make this work? Because I'm forced to edit on Android - but it's so annoying to do simple things as in Windows.

timestamp is prefered before mtime. usually a picture's timestamp is saved in metadata or EXIF data of image. this timestamp is never changed no matter how often you copy a file. however, if timestamp is missing, the linux mtime (which exist for any file) is used instead (fail-safe). mtime is changed for each copy of a file.

If the image is a photo taken using camera (app or device), it most probably contains Date Taken as EXIF metadata as alecxs mentioned. In this case if your gallery app prioritise Date Taken, you need to remove metadata of the image. Secondly you need to make sure that the app you are using for copying doesn't retain the original Modified Data of the image. Related: https://android.stackexchange.com/a/215582/218526 and https://android.stackexchange.com/a/209243/218526


text:
How can MIUI read my previous MI Account ID and phone number on clean install?
I unlocked my bootloader, flashed some custom ROM and the ROM is working fine for several months.  Today I decided to return to the stock MIUI global ROM.  After finished flashing new images using fastboot, I'm quite surprised when the phone asked me to login to Mi Account.  It remembers the account id and my previous phone number correctly.  This is when I'm not connected to Internet.  I also have flashed TWRP  cleared user's data many times before.
I would like to know where is this information stored?  Is it on /persist partition?  Or, perhaps in Trusty OS?  Is it possible to see what are stored there (apart from account id and phone number)?

It's called Factory Reset Protection. Different vendors save the information to different partitions e.g. CONFIG, FRP, PDB. A factory reset performed from Settings erases this partition.

For Mi 8 Lite, it is stored in /persist/fdsd/st. This file contains JSON structure with extra_email and extra_phone that matches what is displayed in the screen.  Also, after deleting this file, the initial setup step that asks for account activation is not displayed anymore.


text:
How to stop a system update upon restart
I have an old Essential PH-1 that runs on Android 7.1.1 (Nougat).
I accidentally okay'ed it to update to Oreo and it says to allow the updates to take effect to the newer Oreo OS I need to restart my phone. I do NOT want to update to the new OS. I want to keep Nougat OS.
How do I prevent this from happening?
Is there a way to erase these new files so that a restart will not finish installing the update to Oreo?
Or do I have to let it update upon restart and then downgrade (back to Nougat)?
If so, where do I go to find the easiest way to do that?

You need to open your device "Developer options".
In case it is not there then:

Click your device build number 7 times.

Then in "Developer options":

Disable "Automatic system updates"


text:
How to identify temporary files by file extension
I want use find command to search and delete all temp files that could exist in android by file extension as a result of device regular usage. So far I could gather the following:

*.tmp
*.log
all cache folders

etc
But I don't know any other ones can anybody tell me another file extension I could add in my search because I what to run find command while specifying all the file extensions so as to delete them

There are no standard extensions for temporary files. It's up to apps how they save their files. Also every app's private storage isn't accessible to other apps without root access. So you have to clear cache from app settings. See Where Android apps store data?

I have root access and I can search all locations but just don't know what to specify as temp file name so that I can erase all available temp files both for system files too


text:
Output sound through jack and speakers on Samsung Galaxy phone
I am trying to find a way for my phone to output sound to both the phone's jack and to the phone's speakers simultaneously.  Currently, plugging something into the jack turns off the speakers.
The reason I'm asking is because I'm hard of hearing and need the speakers so I can hold the phone up to webcaptioner.com to create automatic captions, while using the jack to plug the sound into my hearing aids.
I have a Samsung Galaxy (samsung-sgh-I747) using Android version 4.4.2.
What I have tried: I looked on the phone under "sound" and "accessibility" - nothing there works.
I also tried plugging the phone directly into the computer to see if this could make really clear captions, but the computer didn't register the incoming sound.
I tried turning on "Samsung captions" - but no captions appear anywhere.
I also found that it seems you need an app or a splitter - https://www.quora.com/How-can-you-use-your-headphones-and-speaker-at-the-same-time-for-a-mobile - I'm hoping there can be another solution.

the link you provided really says it all... there is no good way do do this. You can try an app or get a speaker, but that is your best bet. (you could also consider blutooth headphones,as this wouldnt use the internal amplifier.)

"I'm hoping there can be another solution." - There might be, but the simple solution is to follow the recommendation in the link you already gave. A suitable 3.5mm male-to-male auxiliary cable is about $5-$8 on Amazon and a suitable stereo Y-spitter is around the same or slightly cheaper. So you are looking at perhaps $15 for both. Not cheap, but you can just plug the auxiliary cable into the PC mic input (the Y-splitter is for the phone).

Hi Anaksunaman and ragnvaldr.js - thank you very, very much for taking the time to respond.  It's good to know what direction to go in.


text:
Arrow keys are shown by some weird characters everywhere
In my Android device, arrow keys are shown by some weird characters everywhere. Example:

I have tried changing system fonts. Also, this is independent of the keyboard because I have changed the keyboard but the issue is not resolved.
Edit:: ij acts as  UP key, IJ acts as LEFT key, 'n acts as  RIGHT key and ' acts ad DOWN key.

Cross-post on Reddit, in case it's answered on there.

Anyway, in case it may help, some shown characters are: ĳ, Ĳ

I have already posted on reddit but haven't got any working solution.

I don't have a fix, but Internet search results (this, this) give me the impression your issue is caused by lacking Unicode support in the fonts you've tried so far, although that would be strange for something as generic as arrow symbols. As such, my only suggestion is to try yet more fonts if you are able to do that. I doubt I can provide more help than that, but you could add some more info about your issue:

Have you seen these symbols display correctly on your device in the past?
What device are you using, and what Android system is it running?
What fonts have you tried so far? (font names)
When you say "everywhere", do you only refer to keyboards or texts as well?

No I haven't seen them correctly in the past. My device is infinix hot 8. I have tried the fonts provided by infinix fonts. Everywhere in the app termux where it is showing errors in the first place.


text:
How to change the pitch of the white-noise ***when placing a call*** with Samsung S10e connected to the Bose QC35ii?
Background
Ok, here goes:
Huawei P10 is still the best phone out there. (Only thing I miss here is an additional wide-angle lens, but hey.)
After having taking it's ten-thousandst fall the glass splintered slightly on the side and the camera is showing focus issues (which can only be "fixed" temporarily by letting it drop on a flat surface: google it...) I decided I need to look for a replacement :(
Regarding modern phones, I can't stand a notch, with the exception of the punch-hole on the side, like featured in the Samsung S10e. Thanks to Trump and the Huawei-Google-sanctions, the obvious Huawei P40 family is also out of the question.

The Problem
Hitherto, I'd use the P10 in combination with a Bluetooth-connected Bose QC35ii headset for business calls. Sure, there was a distinct white-noise hiss already then when initiating calls, but now this hiss with the S10e has a different pitch and it's driving me bonkers / bananas.
Note:

All devices have the latest firmware and updates installed (as
per 20 Apr 2020).
No (white-noise) hiss is present when placing a call with another, USB-C wired
headset
or without a headset.
The hiss starts already when dialling and continues throughout the call.
Listening to music does not cause any (discernible) white-noise (irrespective of whether noise-cancelling is on or off).

Does anyone have an idea of how to change the pitch of the white-noise when placing a call with the Samsung S10e through the Bose QC35ii?

Related Link(s)
https://community.bose.com/t5/Around-On-Ear-Headphones/Bose-QC-35-Firmware-4-5-2-Noise-Cancellation-Investigation/td-p/285738 (interesting read, albeit not that helpful... doesn't cover a way to turn off the "hiss")

@downvoter: care to comment?

I haven't voted (yet), but the rant doesn't make the question anything easier to answer. Care to reduce your personal opinion/rant and stick to the fact & issue only?

@AndrewT. Fact is: Huawei P10 had a much more pleasant (to me!) "hiss" than the Samsung S10e when calling via the Bose QC35ii.

I happen to own a S10e and QC35II as well. Before I had the QC35 (version 1) and never had issues with the bluetooth. Everyting was running smooth, I had my phone and PC connected to the headset at the same time all the time.
It started with the QC35II. I cant say anything about calling with the headset, but I recognize the interference with listening to audio. Things that helped between phone-headset connection where going to 'Settings' -> 'Connections' -> 'Bluetooth' -> Next to your connected QC35 headset press settings symbol -> There are three options, turning 'Calls' and 'Acces to contacts' off helped (so leaving only Audio on).
As for desktop, go to Configuratiescherm\Hardware en geluiden\Apparaten en printers\ to properties of connected QC35II, tab Services and unselect Handsfree calling.
Third thing that helps with less interference is turning off my phone bluetooth when the headset is connected to my PC and vice versa.
You can see my tips are focussed on listening to music, however it probably works the other way around as well --> turning off audio and leaving on call-things will cause less interference for calling.


text:
How to make the kernel to also check termux bin folders
How can i make android kernel to always check termux binary folder for some binaries assuming they are not found in /system/bin ? I tried copying those binaries from termux bin folder into /system/bin but they refuse to be executed. I need help please.

The kernel does not check "bin folders". The shell does. Just adjust your $PATH variable accordingly.

Where can I find the $PATH variable?

I am executing my scripts using Xposed edge and Xposed edge queries the variables from /system/bin or /system/xbin but most of the binaries i need are not in those 2 folders like bc command jq command and so on so I am looking for a way to make Xposed edge to check termux bin folder for binaries

See my answer to How to modify environment variables like PATH at startup?


text:
How to fake device info for a specific app?
I need an app that can spoof device info. Like:
Choose amount of RAM: 20GB
Choose your CPU: ARM64 9000cores
Choose app to lie to: [android app]
And so on.
I know there is an Xposed module for that, but I want to temporarily fake info for only one app of my choosing, and not permanently for the whole device.
I also know of the GLTools app, that lets you do exactly that, but because it's a GPU tweaking app, it wants me to install a custom EGL driver first, which I don't need.
I would prefer a non-root alternative, if such exists, but root ones are equally as welcome.

There is only one chance to get this without root: You have to repackage the app and include the Frida Gadget in it. Using this solution you could develop a Frida script that returns forged data for certain system information calls. If the app contains anti-reverse engineering and/or anti-debugging measures this can get pretty complicated.

Which is this Xposed module that can fake RAM?

I'm entirely unfamiliar with frida, and the question is about whether or not there is a "tap-and-go" app to do this

I noticed you've asked a similar question on Unix.SE. For Android, I don't think there is a "tap-and-go" app that can fake device info easily. While Robert's comment is a possible answer, I'm afraid this might be an XY-problem...

Yeah, it's actually same app I want to run, BOINC, only this time for android. On my laptop, I did manage to fool it, works like a charm, and doesn't actually use as much memory as it claimed to need, which made me think, why not to try to do same thing on Android? And no, there IS one app that can do that, called GLTools, except it needs to install a special driver before I can use it, which I'm understandably hesitant about. So, if there is one app, why can't there be another?

Memory allocated to an app is determined by the Android Framework: https://developer.android.com/topic/performance/memory#CheckHowMuchMemory The exact heap size limit varies between devices based on how much RAM the device has available overall. You are free to alter your own custom ROM but on a mobile device - swapping is bad and will burn out the lifetime of Flash memory. As GLTools provides a different graphics driver than what is built-in which allows for "fixes" to the OEM driver in a gaming context, I'm not sure how that relates to C/C++ apps running on CPU.

I don't want and don't need to mess with heap sizes. Swapping was bad, but now zRAM is enabled in every single android device by default. And while GLtools provided different graphics driver, it also provided the ability to spoof specs -- make an app think that you are using Google Pixel with 8GB RAM, when in fact you are using Huawei with 2GB. It didn't provide those additional 6GB in any way, no swapping involved. It just lied. And that's exactly what I need. But I don't need that EGL driver, and the app won't let me past start screen, unless I install it. So I need another app

authors: Роман Мавроян


text:
How do I restart my phone without using my power button?
Recently my Huawei P8 Lite decided that it doesn't want to play videos in apps anymore. Videos that I tap on on Twitter, Youtube, Youtube Go, and Reddit just load infinitely and don't do anything. Videos in my browser work completely fine, however, and videos that I've recorded myself play just fine, and there's audio, but the screen stays black.
I've tried clearing caches and deleting/re-downloading apps, but nothing seems to work. The only thing I can think of is to reboot my phone. The problem is that my power button is broken, so I have no way of turning it off. My phone doesn't have a Home button, and my volume buttons aren't separate so I can't press them both at once. So I don't think a lot of those fixes are going to work for me.
Do I have any other options? I've seen people recommending apps that will reset my phone for me, but that usually means rooting my phone, and the ones that don't require rooting don't work. I'm not rooting my phone, so those options are out the window.
Is there anything else I can do? I just want my videos to work again.

Does this answer your question? Automatically power on Android when the charger is connected

What is the fastest way to shutdown Android phone?

extract platform-tools-latest-windows.zip, enable usb-debugging, connect usb cable, open C:\Windows\system32\cmd.exe as Administrator, cd into platform-tools folder, type adb.exe reboot (however, you should more care about what happens if battery is drained completely, see first link)

That did it - thank you!

No need to install the entire platform tools for that, see Is there a minimal installation of ADB?

@AdamMcKay please mark Robert's answer as accepted

There are two possibilities:
Reboot via ADB

Enable Developer options on your device and enable Android Debug Bridge (ADB).
Install the Android SDK or at least the minimal ADB environment on your PC.
Now connect your phone via USB to your computer
Execute adb reboot

Reboot via app (requires root)
Rebooting your phone from within an app requires root permission. If your device is already rooted you can use one of the reboot apps from PlayStore:


text:
How to copy files from Android root directory app to SDCard or PC (Rooted Device)
I have an app which allows downloading videos too but it can be viewed only via app.
Now I've rooted my tablet but still unable to copy those videos from Root Directory App Data to SDCard or My computer using Total Commander.
Tried several method to pull app package from adb as well but no luck.
Files location: Data/data/com.app.package/app_files
Videos permission in the directory shows rw----- and when I do it from Root File Manager in my device, it crashes. When I try doing the same from Total Commander, it says Error Downloading file!
Commands I've executed on adb:

adb pull "/data/data/com.app.package/" Z:\Data
Result: Cannot find 'Data.....'
adb shell run-as com.app.package cp /data/data/com.app.package/
Result: run-as: Package 'com.app.package' is not debuggable

What's that app? Where does it save files? Are you sure files aren't encrypted? Please elaborate "but still unable to copy those videos". How pulling app package is related to copying video files? What do you exactly mean by saying "Root Directory"? Apps don't save files to root directory (/).

Sorry if I am not able to convey my problem properly, I'm a newbie with root access and all. There's this app which provide educational videos to be downloaded offline and it saves the video in m4v format in data/data/com.app.package/app_files and I'm unable to copy those videos from there to SDCard or My Computer.

"unable to copy" isn't clear. What's the error you get when trying to copy?

Videos permission in the directory shows rw----- and when I do it from Root File Manager in my device, it crashes. When I try doing the same from Total Commander, it says Error Downloading file!

Include this last comment and the files location in your question (by editing) to get better response. Though there is not obvious reason. May be SELinux. Better use commandline tools for copying to get more precise reason of failure.

@iWhiteSharK Please edit your question and include all commands you have executed and for the command that fails the complete error message.

have you tried adb backup com.app.package (leave password blank) or adb exec-out su -c "tar -c data/data/com.app.package" > com.app.package.tar


text:
bootloader error err:0x7000
I am trying to unlock my phone's bootloader
Device techno i3
I have installed drivers , adb &fastboot
And when I type
fastboot oem unlock
It gives error
err:0×7000
(bootloader)    off-mode-charge: 1
(bootloader)    warranty: yes
(bootloader)    unlocked: no
(bootloader)    secure: yes
(bootloader)    kernel: lk
(bootloader)    product: RLK6737M_65_N
(bootloader)    version-preloader: 0.1.00
(bootloader)    version: 0.5
all: Done!!
Finished. Total time: 0.133s

you probably forgot OEM unlocking in developer options

@alecxs it is enabled

try fastboot flashing unlock and try latest platform-tools

@alecxs same error even though m using latest platform tools zip

@alecxs okay.. I have updated it

ask repair-center maybe you need unlock code


text:
Does the Moto G7 Power support HDMI alt mode?
I plugged my Moto G7 power into my audio/video receiver, with a high quality USB-C to HDMI cable. This same cable works with other devices, such as a Lenovo C330 Chromebook. Unfortunately, I am not getting any HDMI signal from my Android device. Apparently HDMI "alt mode" is required in order to support video output from Android devices, but I am not sure if the Moto G7 Power has this capability or not.
Question: How can I check if the Moto G7 Power supports HDMI alt mode?

check if it supports Hdmi or not first. I don't think it does, else support page would have mentioned apart from Chrome cast https://support.motorola.com/us/en/solution/MS136519

AFAIK the "HDMI alt" mode is a nearly dead specification that was nearly never implemented because it came too late. The only alternative mode that is actively used is the Displayport alternative mode. Some adapters use Displayport alternative mode plus DP2HDMI chip to provide an HDMI output.


text:
How do I prevent the installation of just a few specific apps on my android phone?
I basically want to prevent myself from installating VPNs and a few social networking sites like Quora and Reddit , every other app is fine

Who are you preventing? Yourself, a child in your family, employees using company owned equipment?

I am preventing myself


text:
Catch USSD Codes
I need some help to figure out a way to catch which USSD codes are executing in my phone. This is for a little project I'm working on, to simplify an app that my cell carrier provides, but I don't have any idea of what codes are executing some times, couse there are not documentation about it. I'm expecting something like a sniffer or similar, but I'm open to suggestions. My handset is a Xiaomi Redmi Note 5, just in case somebody knows a way to achieve what I'm looking for doing a trick in system settings or something hidden in the OS.

Notification history logs USSD. Try that

Sorry but this is not the behavior I was looking for. I don't need the USSD message itselft, but the code executed to get this message, i.e. if the app executes *1234# and I get the answer "Hello user", I want to know that the code used was  *1234#, not the message returned


text:
Flashed stock firmware galaxy S7; speaker phone stopped working (please help)
My speakerphone isn't working correctly..
Whenever I switch to speaker phone in a call /video call the other person cannot hear me. The other person can hear me only when I am calling via either headphones or non-speakerphone mode.I recently installed/flashed the stock firmware (android 8.0) onto my samsung galaxy SM-G930F to try and fix the issue (to no avail unfortunately).
I previously had Lineage OS 16.0 Herolte (on which speaker phone worked perfectly) installed but on that ROM Roaming did not work so that's why I decided to install a different ROM. Currently installed ROM is android 8.0 stock firmware downloaded from this link: https://www.sammobile.com/samsung/galaxy-s7/firmware/SM-G930F/PHN/download/G930FXXS8ETC3/327932/
I thought installing original firmware would fix the issue but unfortunately not..
Am I doing something wrong?
Notes:

The microphone is working perfectly (when tested using voice recorder)
the issue is definitely with the samsung s7 phone not with the phone of the person of the other side of the line (this issue occurs regardless of who is being called from the s7)
I have tested it with many apps (phone app, whatsapp, discord, skype, hangouts), all give the same issue

I have tried:

rebooted many times
I cleaned the speaker ports and microphone port (all are clean now)
flash original firmware (android 8.0)(currently installed OS)
starting phone in safe mode
wiping system cache
plugging in/out a headphone into the headphone jack many times
unplugging headphone connector on Motherboard (made no difference)
I checked the contacts on the speaker assembly (which connect to the MB), they look clean and in pristine condition

To summarize:
When I am in a call (regardless of what app I am using) it works fine as long as my phone (s7) is not in speaker-phone mode (in this case the other person can hear me and all works as it should), as soon as I switch to speaker phone mode I can still hear the other person but the other person cannot hear me anymore.
I downloaded the firmware from Sammobile.com as suggested by quite a few tutorial videos. I downloaded the version for the correct country (the Netherlands), for correct phone model (SM-G930F); here is a link to the page I downloaded the firmware from: https://www.sammobile.com/samsung/galaxy-s7/firmware/SM-G930F/PHN/download/G930FXXS8ETC3/327932/
I flashed using ODIN V3.14.4 as suggested on the download page, all appeared to have gone well, ODIN gave no errors and said "passed" when it was done flashing..
I downloaded the version "Netherlands (PHN)"
I have tried all the 'fixes' I could find so far on the internet but nothing has worked yet, i need some help. Any suggestions on what I could try/test to make it work again would be very much appreciated! Thank you so much!


text:
Why preinstalled apps have more privileges than third party apps?
This question is based on an observation of Android's powerful security features, In my old Android Lollipop third party apps had read access (but no write access) to external SD card, but my Android Pie prevents apps from even reading / writing data to the external SD card? But the preinstalled  apps will prompt to aquire these permissions. Is there a way for app developers to circumvent this ?

Comparing permissions across Android versions is tricky and misleading. More so, when you want to compare Lollipop permission model to that of Pie. The differences are many and too vast to be covered, perhaps even as a separate question .
Pre-installed apps may be OEM /carrier dependent (bloat ware) called system-apps. They ask for permissions which are required by them, just as user installed apps. However, by virtue of being system apps (see system-apps tag wiki), they are privileged, in the sense

being "trusted", they can get access to some restricted app permissions which are not available to "user-space apps" (e.g. ACCOUNT_MANAGER, MANAGE_APP_TOKENS); if a user-space app requests those, they are denied.

You can read the linked tag wiki for more on system apps


text:
Call Android phone using an API
Is it possible or are there any applications that provide an API to make it possible for a script on the internet to ring the phone?
I need to get reminded of a specific action that happens in an online application I've built, when I'm not in my desk.

You can try IFTTT. Make a new applet and make the trigger a webhook. Make the action service a phone call.


text:
How to transfer Firefox bookmarks (and saved logins, etc) from one phone to another **without** using Firefox's "sync", 3rd-party apps nor root?
Title says it all, pretty much.
A quick Google search (surprizingly) did not return any pertinent results.
I guess it might boil down to copy-pasting some system folders/files from one Android installation (via USB-C, via a PC) to the other. But I prefer not to be the guinea pig here...
(PS: I'd rather not have to revert to Firefox's "sync"-feature for various reasons... anyway, it's obvious that "sync" would work, but that's not the question here...)

EDIT:

My phone(s) aren't rooted.
Neither a 3rd-party app, nor a cloud-based solution is what I'm interested in.

Related link(s):
seems like the transfer-via-USB-route would require a rooted phone :(

How can I access the folders where Firefox mobile stores its application data
https://support.mozilla.org/en-US/questions/949785

Does this answer your question? Export Firefox Android Bookmarks to html file

@beeshyams Not really; I can't imagine saved logins (incl. passwords) could be simply dropped into a flat html file (securely) for migration from device A to device B...

I wrote how to do this for bookmarks (without meta data unfortunately) in this answer:
https://android.stackexchange.com/a/256203/407146

As of now, given the constraints, you cannot achieve what you have set out for.
Firefox app would be able to restore bookmarks using these methods,  in the absence of a hack:

native settings option to import bookmarks. This is not available in Firefox for Android as of now.
Using Web Extensions/ Addons. Firefox for Android doesn't provide API support for manipulating bookmarks as of now.
Read and write to its browser.db database using a universally accessible content provider. Firefox's content provider for this is not accessibly by any user other than Firefox itself.
Full participation in Android Backup Service. As a result, a user can use adb to backup and restore Firefox app's data. Sadly, Firefox explicitly disallows backup as of now, so adb is also out here.
Using its own implementation of cloud backup service. It does provide a sync service -- but then, you don't want that so this is also not an option anymore.

Possible hacks:

copy and then restore the browser.db or into your another phone. That database contains users' bookmarks. Alternatively, use a root backup/restore solution, such as Titanium Backup.
Use content provider with root access to read and write into browser.db. But if you have root access, "1." is plain and easy.

As you can see from above, your options, as of now, are: get the devices rooted, or use Firefox's sync services.
Third option is to raise a feature request with Mozilla to provide bookmarks import, and extension support for manipulation of bookmarks.

I recently migrated app data from multiple Firefox apps from one Android phone to another. At first I tried to rely on Android's device-to-device backup transfer mechanism, but that did not migrate any meaningful Firefox data. I also tried adb backup, but that does not work either (bug 1808763).
What did work is to enable Firefox's remote debugging feature (about:debugging to connect to an Android device) + adb (no root required) to unlock the ability to execute arbitrary JavaScript code in Firefox's main process on the Android device. This enables me to do anything what Firefox is allowed to do, including reading and writing its app data. Which is exactly what we need to create and restore a backup.
The remaining part is the code to actually perform the copy and restore, which I shared at:
https://github.com/Rob--W/firefox-android-backup-restore
Backup instructions: https://github.com/Rob--W/firefox-android-backup-restore#backup

The backup instructions are designed to not consume any space on the source device. The first step is to start a TCP server on your computer to receive the data directly. If you don't have nc (netcat) available on your computer, an alternative is to run a local TCP server on your Android device and then use adb to retrieve the data from it:
adb shell 'nc -l -p 12101 > /sdcard/firefox-android-backup.tar.gz'
adb pull /sdcard/firefox-android-backup.tar.gz
adb shell rm /sdcard/firefox-android-backup.tar.gz

Once the server has been set up, follow the rest of the instructions to run fab_backup_create();

Restore instructions: https://github.com/Rob--W/firefox-android-backup-restore#restore

The first step to restoring is to put the backup archive on the device (replace org.mozilla.firefox if NOT using Firefox release!):
adb shell mkdir /sdcard/Android/data/org.mozilla.firefox/
adb push firefox-android-backup.tar.gz /sdcard/Android/data/org.mozilla.firefox/

The default instructions are for Firefox release (org.mozilla.firefox), but if you want to restore to a different app, replace org.mozilla.firefox with:

org.mozilla.firefox - Firefox Release
org.mozilla.firefox_beta - Firefox Beta
org.mozilla.fenix - Firefox Nightly
org.mozilla.focus - Firefox Focus

Once the backup has been uploaded to the device, restore it by following the rest of the instructions to run fab_backup_restore();

I have tested this with all Firefox apps (versions 118 - 120), on Android 12 and Android 14, on Google Pixel 3 and Google Pixel 8.


text:
Recover broken smartphone
My Xiaomi Redmi Note 6 Pro broke and 3/4 screen is completely black, I can't see anything but a little part below

Other than that, the touch doesn't work AND sometimes the screen triggers some random coordinate touch.
If that's not enough, Xiaomi devices must be unlocked at least 1 time after startup with pattern, but can't. I usually use biometric unlock such as fingerprint sensor and facial recognition but, again, can't.
I want to still use it anyways as a mobile hotspot. I managed to turn on mobile data on adb but, trying to activate hotspot like suggested in this post, so adb shell service call connectivity 24 i32 0, I receive this output:
Result: Parcel(
0x00000000: fffffffc 00000019 00610063 006c006c '........c.a.l.l.'
0x00000010: 006e0069 00500067 0067006b 00630020 'i.n.g.P.k.g. .c.'
0x00000020: 006e0061 006f006e 00200074 00650062 'a.n.n.o.t. .b.e.'
0x00000030: 006e0020 006c0075 0000006c 00000330 ' .n.u.l.l...0...'
0x00000040: 00000193 00610009 00200074 006f0063 '......a.t. .c.o.'
0x00000050: 002e006d 006e0061 00720064 0069006f 'm...a.n.d.r.o.i.'
0x00000060: 002e0064 006e0069 00650074 006e0072 'd...i.n.t.e.r.n.'
0x00000070: 006c0061 0075002e 00690074 002e006c 'a.l...u.t.i.l...'
0x00000080: 00720050 00630065 006e006f 00690064 'P.r.e.c.o.n.d.i.'
0x00000090: 00690074 006e006f 002e0073 00680063 't.i.o.n.s...c.h.'
0x000000a0: 00630065 004e006b 0074006f 0075004e 'e.c.k.N.o.t.N.u.'
0x000000b0: 006c006c 00500028 00650072 006f0063 'l.l.(.P.r.e.c.o.'
0x000000c0: 0064006e 00740069 006f0069 0073006e 'n.d.i.t.i.o.n.s.'
0x000000d0: 006a002e 00760061 003a0061 00320031 '..j.a.v.a.:.1.2.'
0x000000e0: 00290038 0009000a 00740061 00610020 '8.).....a.t. .a.'
0x000000f0: 0064006e 006f0072 00640069 006e002e 'n.d.r.o.i.d...n.'
0x00000100: 00740065 0043002e 006e006f 0065006e 'e.t...C.o.n.n.e.'
0x00000110: 00740063 00760069 00740069 004d0079 'c.t.i.v.i.t.y.M.'
0x00000120: 006e0061 00670061 00720065 0065002e 'a.n.a.g.e.r...e.'
0x00000130: 0066006e 0072006f 00650063 00650054 'n.f.o.r.c.e.T.e.'
0x00000140: 00680074 00720065 00680043 006e0061 't.h.e.r.C.h.a.n.'
0x00000150: 00650067 00650050 006d0072 00730069 'g.e.P.e.r.m.i.s.'
0x00000160: 00690073 006e006f 00430028 006e006f 's.i.o.n.(.C.o.n.'
0x00000170: 0065006e 00740063 00760069 00740069 'n.e.c.t.i.v.i.t.'
0x00000180: 004d0079 006e0061 00670061 00720065 'y.M.a.n.a.g.e.r.'
0x00000190: 006a002e 00760061 003a0061 00300032 '..j.a.v.a.:.2.0.'
0x000001a0: 00330035 000a0029 00610009 00200074 '5.3.).....a.t. .'
0x000001b0: 006f0063 002e006d 006e0061 00720064 'c.o.m...a.n.d.r.'
0x000001c0: 0069006f 002e0064 00650073 00760072 'o.i.d...s.e.r.v.'
0x000001d0: 00720065 0043002e 006e006f 0065006e 'e.r...C.o.n.n.e.'
0x000001e0: 00740063 00760069 00740069 00530079 'c.t.i.v.i.t.y.S.'
0x000001f0: 00720065 00690076 00650063 0073002e 'e.r.v.i.c.e...s.'
0x00000200: 00610074 00740072 00650054 00680074 't.a.r.t.T.e.t.h.'
0x00000210: 00720065 006e0069 00280067 006f0043 'e.r.i.n.g.(.C.o.'
0x00000220: 006e006e 00630065 00690074 00690076 'n.n.e.c.t.i.v.i.'
0x00000230: 00790074 00650053 00760072 00630069 't.y.S.e.r.v.i.c.'
0x00000240: 002e0065 0061006a 00610076 0033003a 'e...j.a.v.a.:.3.'
0x00000250: 00300033 00290038 0009000a 00740061 '3.0.8.).....a.t.'
0x00000260: 00610020 0064006e 006f0072 00640069 ' .a.n.d.r.o.i.d.'
0x00000270: 006e002e 00740065 0049002e 006f0043 '..n.e.t...I.C.o.'
0x00000280: 006e006e 00630065 00690074 00690076 'n.n.e.c.t.i.v.i.'
0x00000290: 00790074 0061004d 0061006e 00650067 't.y.M.a.n.a.g.e.'
0x000002a0: 00240072 00740053 00620075 006f002e 'r.$.S.t.u.b...o.'
0x000002b0: 0054006e 00610072 0073006e 00630061 'n.T.r.a.n.s.a.c.'
0x000002c0: 00280074 00430049 006e006f 0065006e 't.(.I.C.o.n.n.e.'
0x000002d0: 00740063 00760069 00740069 004d0079 'c.t.i.v.i.t.y.M.'
0x000002e0: 006e0061 00670061 00720065 006a002e 'a.n.a.g.e.r...j.'
0x000002f0: 00760061 003a0061 00380033 00290031 'a.v.a.:.3.8.1.).'
0x00000300: 0009000a 00740061 00610020 0064006e '....a.t. .a.n.d.'
0x00000310: 006f0072 00640069 006f002e 002e0073 'r.o.i.d...o.s...'
0x00000320: 00690042 0064006e 00720065 0065002e 'B.i.n.d.e.r...e.'
0x00000330: 00650078 00540063 00610072 0073006e 'x.e.c.T.r.a.n.s.'
0x00000340: 00630061 00280074 00690042 0064006e 'a.c.t.(.B.i.n.d.'
0x00000350: 00720065 006a002e 00760061 003a0061 'e.r...j.a.v.a.:.'
0x00000360: 00330037 00290035 0000000a          '7.3.5.).....    ')

I also wanted to install an application on the phone to control it through the pc, but can't because it needs confirmation from phone itself.
After I tried to use a screen unlocker bash file (through windows ubuntu subsystem) and, finding the coordinates for the points, the screenshots from the phone lock screen are blank so I can't see which coordinates they are.
After that I also tried to use AdbControl (written in Java), which should stream the phone to the pc , but it gives me errors for every single frame.
I tried also Mi Suite with no luck: although I connected my device it shows this:

Any thoughts?

for adbcontrol you must escape backslash in windows path and specify a writeable path on device for example /storage/emulated/0 which probably fails because location isn't available during unlock/decryption. depending on permissions you can maybe use external MicroSD card instead
adbCommand = C:\\platform-tools\\adb.exe
screenshotDelay = 100
localImageFilePath = C:\\adbcontrol\\adbcontrol_screenshot.png
phoneImageFilePath = /storage/4D47-9860/adbcontrol_screenshot.png

you can also use scrcpy instead

another manual method for unlock/decryption (only works for password)
adb shell input keyevent KEYCODE_SPACE
adb shell input text <password>
adb shell input keyevent KEYCODE_ENTER

another option is physical keyboard connected via usb-otg adapter

btw you are lucky that you previously enabled usb-debugging :)

Yes, I made some apps and needed to do it ;) btw I haven't got an OTG, I'm gonna try the first two methods

I am getting this error and this is config. I watched the source code and there shouldn't be errors...

changed to  /storage/emulated/0/DCIM/ADBC/adbcontrol_screenshot.png. This doesn't resolve anything: exact same error

Thank you so much, with scrcpy works the first time! The last thing I ask you is: how can I disable touch since the phone, with the broken screen, keeps interfering with the touch?

Can't find a way to do this, I made another post to solve this "forever", but I found a temporary solution since all I want now is the hotspot and I managed to activate it. Thank you again!

scrcpy --turn-screen-off


text:
Removing the Chinese text "未写入google key和tee key" watermark on the screen
After flashing a custom ROM, there is a watermark in the top-right of the screen saying

未写入google key和tee key

I've googled it and have tried several of the solutions suggested, but none have worked. Interestingly, most people get a slightly different variation of this message, in red.
I've removed "FactoryTest" from my phone, but do not have com.mediatek.factorymode as some have suggested. I've messed around with my IMEI keys, this did not help. The message also still appears even with the SIM card removed.
Where on the phone could this be stored? My phone is rooted, so if I could locate the file responsible, I could easily delete it.

Download Minimal ADB and Fastboot on the computer

Plug in the phone into the computer, but keep the phone on

On the computer, open the terminal/command prompt

Enter these commands
adb devices
adb shell
pm list packages
pm uninstall --user 0 com.mediatek.factorymode

Restart the phone and the watermark will be removed

Thanks, but this doesn't work unfortunately. Seems I don't have this package installed on my phone.

@KaptainKris The watermarks are gone!! For me it worked. You have to leave the cell phone on, not in stand-by mode. In addition, USB debugging and OEM (bootloader) must be allowed in developer mode. Confirm USB debugging again when prompted after connecting the mobile phone to the PC. If you follow this, then the given commands will be accepted. Otherwise errors are displayed. It is actually quite simple.

it might be package:com.mediatek.engineermode, which I didn't risk to uninstall (I don't really know what's that).
I did pm uninstall --user 0 com.android.watermark and so watermark is gone.
You might need to lookup for a solution to actually fix it instead of hiding. In this case you need SNWriter, which I couldn't really use.

I successfully removed the watermarks with "tee" and/or "google" words in Ulefone Armor 3WT.
Many sources suggested 2 possible solutions:

Kill the service name "sdrpmbFloat" from the Developer options (not work for me)
Using ADB, delete the package called com.mediatek.engineermode or com.mediatek.factorymode or com.android.watermark (again, it didn't work for me, I couldn't find the packages)

But, I found another solution.
I had to comment/delete the line ro.agui_tee=TRUSTKERNEL in the file /system/product/build.prop (need root) just in case that line does not exist in the file /system/build.prop.
So, to root Ulefone with MTKroot app: https://www.ayudaroot.com/root/ulfone/como-hacer-root-en-los-telefonos-moviles-ulefone-armor-3wt/ (Spanish)
And where I found a similar solution: https://www.phonandroid.com/forum/threads/ulefone-armor-9-imei-manquant-et-erreurs-tee-google-resolu.208178/ (French)

You can kill/uninstall the sdrpmbFloat view service with root permissions.
You should be able to go to Developer Options > Active Services to disable the service.
Source: https://forum.xda-developers.com/t/ulefone-power-3s-problem.3794521/post-77513923


text:
How to recover files after formatting android mobile
i accidentally formatted (soft reset) my Oppo smart phone running on android 9.0 , it has important images, now how can i recover them

Does this answer your question? How to recover a deleted file from /data partition?

Photorec (part of testdisk) is a fantastic open source file recovery tool that's my go-to, well respected, pretty easy to use and very good at file recovery as long as the data on the drive has only been deleted, not overwritten. I think it should work for your phone then, as long as the format didn't secure delete / rezero the memory
It's a PC tool, but you can run it on your SD card in a reader, or on your phone's memory if you attach it to the PC as a USB storage device
One thing to be aware of is it will find most files in my experience, but often it loses the filenames in the process, and it dumps every file it finds on the drive into generic folders, so you might have to sift through a lot of files with the extension of the ones you need before you find them, but it is good if you need something important back
https://www.cgsecurity.org/wiki/PhotoRec


text:
Whatsapp calls not working on a specific Wifi
I live in Germany and I can't make a whatsapp call whenever I am connected to my home's wifi. It just goes on "connecting". Whatsapp messages work and whatsapp calls work on other wifis and my phone internet too. I checked my wifi internet speed and its around 100mbps so that is also not an issue. It seems our landlord did some firewall settings to block some websites and now she doesn't know how to enable the whatsapp calling. Or there could be some other issue. Help is appreciated.

Whatsapp requires a number or ports to be usable/free: TCP 4244, 5222, 5223, 5228, 3478, 45395, TCP/UDP 50318, TCP/UDP 59234 A second problem may arise if your provider does not provide a full IPv4 address and no working IPv6 (e.g. DSLite connection where multiple DSL users share the same IPv4 address).


text:
How to combine ODEX and VDEX files with an APK file?
I have an .apk file, also comes with it two files, one .odex files, another .vdex file. The files were pulled from the /system/app folder of another phone.
The files hierarchy on the original system is like this:

/system/app/FM2/FM2.apk
/system/app/FM2/oat/arm64/FM2.odex
/system/app/FM2/oat/arm64/FM2.vdex

What I want to do here is to combine all these files into a single APK file, so that I may be able to install it on other phones.
(Let's ignore for the moment that the other phone may not have the required dependency installed on it)
So, how can I combine .apk, .odex, and .vdex files together into a single .apk file?
P.S. I have read some articles about using smali and baksmali to convert odex to dex and vice-versa, but I couln't find the detailed tutorial that I need. Also, these articles never talk about VDEX files, which is an issue here.
P.P.S. Both the source and destination phones are exactly the same with Android 10, but different regions.

Did you already try to install the actual .apk to the target device?

Yes I tried. The apk installs successfully, but it doesnt open. When I click on its icon, nothing happens except a nanosecond flash of black colour. Then I'm back to home screen.

Check the logcat for the precise error.

odex file is the Ahead of Time Compiled binary code and vdex is a supportive file. Both are not packaged with .apk file but generated by compiler (dex2oat) after installation or after a few runs. So they should not be the reason for failure. But mostly system apps cannot be installed as ordinary user apps due to lack of privileges and permissions.