text:
How to implement AOD functionality in Rom that lacks it (LOS)?
I'm using latest unofficial LOS 18.1 (by zeelog) on my Redmi Note 4/ mido. It works super-well and smooth and has everything I need - except for AOD (Always On Display).
Before I go into more detail, a couple of disclaimers:

I know there's other Roms out there that have it natively, such as crDroid (but I prefer LOS)
I know that AOD drains a considerable amount of battery (but I don't mind)
I know there's AOD apps (but I prefer native / in-built solutions)
I know it probably could be done using Xposed / Substratum, (but I don't want to use that)

That being said - is there any way one could modify the Rom so that AOD becomes possible? If the option is there, obviously it can easily be turned on and off using Shell commands
settings put secure doze_always_on 1

and
settings put secure doze_always_on 0

, respectively (I would use the app Tasker for that).
From what I found out, presence/absence of AOD might be related to the Gapps package one is using. I also found out that (maybe only in older versions of Android?) there is a file called AmbientDisplayConfiguration.java in frameworks/base/core/java/android/hardware/display folder which has one or several boolean(s) for AOD that just need(s) to be changed from 0 to 1(?) However, I don't find that file/folder on my phone (although I'm rooted, of course). Maybe this is just present when compiling the Rom?
There are also flashable zips out there that claim to be able to activate AOD, but this did not work for me.
What exactly has to be done to enable it (given my phone/Rom constellation as mentioned)? Like which files have to be added or modified and/or which permissions have to be changed? Is it even possible to implement this feature after the Rom has been baked, or can this only be done in the building/ compilation process?
Thank you so much in advance for any hints!  Regards, Gary
P.S. please feel free to ask for any details I might have missed!
EDIT I finally dared to compile LOS 16 for my Xperia Tablet Z (pollux). I changed the values of two AOD-related bools in .../master/core/res/res/values/config.xml from false to true, flashed the finished zip through recovery after compiling successfully. AOD now works as intended . Will try that for my mido later as well. So to answer my own question - AOD seems to be something hardcoded into the ROM. After compiling the ROM, the user doesn't see that config.xml (not even if you're rooted, and it's not in framework-res.apk, I checked that). So either this has to be set before compiling the ROM or, possibly, one could use an overlay apk that achieves the same result. In my opinion the first option is best - obviously this requires you to build LOS from source yourself, which I would encourage anyone to do - it's a rewarding experience to be able to tweak the OS to your own likes instead of having to rely on devs' decisions. Once you get the hang of it of course you can modify many other things apart from just Ambient Display settings.

It can be overlayed, see how GSIs do it. Applauses for your determination in building the entire ROM just for this simple tweak, though!

@Andy Yan Sure, you're right :) However, this was just the last little incentive for me to actually go ahead and try compiling LOS myself.
I'm still quite noob, could you possibly provide some more details for the overlay method? :) thx in advance, Gary


text:
How to "undo" Android cats easter egg and remove cat power controls on MIUI 12
I have enabled Android 11 easter egg by dialing 3 times and unlocking "11" now I have cat controls enabled when I slide down settings shortcut menu on my Poco F2 Pro (MIUI 12 - 12.2.4), and I do not know how to disable this. I honestly don't mind having these controls there, but my UI became very laggy since I've done this (there were no POCO launcher updates or any updates for that matter hence, "cats" are the main suspect). Anyone knows how to disable them?

Go to Settings, then About phone, then Android version.

Open the logo by pressing it several times, then reverse the regulator.

A  sign will show, and done.

I finally found it. You need to go to settings, then Notifications & Control centre, then under Smart home choose None instead of Android R Easter Egg.

source: Stack Exchange

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

sort: votes


text:
Why don't smartphone vendors ship without unnecessary gapps
I was wondering why smartphone vendors like OnePlus, Samsung etc ship with lot of unnecessary gapps
The user should have the independence or liberty to pick them on their own instead of getting forced and bloating the device with unwanted stuff
Like I understand PlayStore is important but for others we have alternatives. For example.

Google Maps alternative MapMyIndia, Apple Maps
Google Drive alternative Dropbox, Proton Drive etc
YouTube: Not everyone wants it
Play Games: Who needs it. When you can login with Facebook, Twitter or something else?

Actually even Playstore have alternatives like Aptoide and not everyone needs it

Because not everyone wants to care so much about making their phone apps fast or better, just convenient. They want the simplest way to fill their needs. Customer support for devices don't want to have to support everything available, so they supply the one set that costs less in money and supporting manpower. GApps fills the gaps for the customer, the device manufacturer, and the provider.

@wbogacz your reply is not convincing. The logic your gave feels more like a personal opinion

@wbogacz also I have edited the question. I asking more from bloatware point of view

What's bloatware in your opinion might not be so in every user's opinion. Mostly users prefer convenience and availability over anything else. As you are concerned only with bloatware, while in my opinion privacy is an even bigger issue. So vendors don't follow individual's desires, they address a market. But in my opinion the biggest reason behind the inclusion of Google bloatware in OEM devices is business. OEMs are bound in agreements with Google. They get benefits by doing so. Also, being the core developer, Google has a monopoly in Android market.

So Google is paying vendors for bloatware? Otherwise why would oneplus or Samsung make them system apps and not uninstallable?

Google doesn't have to pay the vendors, vendors are already paying Google to get Google Play Service included in their devices. See this answer for a basic understanding: https://android.stackexchange.com/a/216646/218526

Vendors don't explain to public why their product must come with X piece of bloatware or is devoid of it. In its absence, the users are left to analyze vendor's actions and device's performance and behavior to reach some sort of conclusion. Better to ask in private some ex/employee of  a vendor who might have been involved in decision making of shipping X bloat.

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


text:
TWRP crashes when trying to wipe/install anything on Lenovo Vibe K5 Plus(a6020a46) and reboots to system
I rooted my Lenovo Vibe K5 Plus, installed Magisk,Arrow OS ver 10, opengapps pico and it was all going very well until I applied the recent update of Arrow OS with 5 Mar 2021 patch.
I downloaded the zip, booted to TWRP, selected Install and pointed to the ZIP file. Then I booted to system without clearing Dalvik/Cache. Then the problems started.
I would download files from the internet and brave would say download failed while the file would be present. However checksums wouldn't match when I checked in my pc.
The default Files app wouldn't be able to delete files.
However the rest of the system was fully functional, network stuff, bluetooth browsing everything worked.
Another strange issue was that no matter what system sounds wouldn't just work. Alarms, timers included. However going to youtube.com on brave would play audio just fine. My music app also worked perfectly. All notification sounds were set at maximum.
I first noticed this issue when trying to use Vanced Youtube which would crash whenever I tried to play a video.
Then today, I booted to TWRP, wiped all data and formatted storage. I then flashed ArrowOS latest version again, wiped Dalvik and booted to system, it started up normally and worked fine. So I decided to install Magisk(obviously) and booted into TWRP. When I tried it to install it though, TWRP crashed(I think) and booted to system. I tried it a few times and it happened every time. No errors were shown.
Thinking it was an issue with ArrowOS, I booted into recovery and selected wipe but TWRP again crashed and booted to system. So I decided to repair the filesystems.
I booted into TWRP, selected Wipe then Advanced Wipe. I selected System and then Repair filesystem.
I got an error.
/sbin/e2fsck -fp /dev/block/mmcblk0p23 process ended with error: 1
Unable to repair System

But when I tried with the Data partition, it worked fine. I then rebooted to recovery and tried to repair the system partition again and this time I got no error(strange since I did literally nothing different)
So anyways, I decided that ArrowOS was the culprit and I should switch to a different ROM, so I downloaded AOSP Extended, formatted everything on my phone from TWRP.
Then I installed Magisk (on a previous phone this had helped a lot, ie: installing Magisk before installing LineageOS, the custom ROM). It completed properly. I then rebooted to recovery, transferred the ZIP of AEX(hash verified btw) and installed it. It completed without any errors. I wiped Dalvik and booted to system.
The Magisk Manager is not present in the app menu.
I need Gapps so I transferred the OpenGapps zip to my phone from my PC(pico for android 10 ) and tried to install it from TWRP. TWRP crashed and booted into system.
OpenGapps are not present, magisk manager is not present and TWRP won't install anything, it will just crash and reboot to system.
I want to know if there are any software fixes I could try to apply before assuming that it is indeed a corrupted storage, the phone is about 5 years old at this point. I think that's what it may be but I want to be sure and would appreciate your views and suggestions.
What I have found scourging online -
This thread which I couldn't make any sense of.
This thread. I tried the fix, it gave no error but it isn't working for me either.
This thread but my device is not covered.
Any and all help is appreciated since this in my only working phone.

use older Magisk version. use recommended rooting method (no TWRP needed). use older TWRP version

but on ArrowOS page it is marked as "official" and that it was well maintained. Also when I went through the thread there seemed to be no complaints in recent times so I assumed that it was stable. I formatted everything, changed file system of /data to ext4 and then again to f2fs. Then I tried it all again but it didn't work. So I downloaded Orange Fox recovery which was still in beta state and i tried flashing the latest ROM(the one where all the problems started) and it worked perfectly fine. I haven't installed OpenGapps yet but the ROM+ Magisk is working fine.

This leads me to believe that perhaps it is some sort of TWRP bug but I can't understand just where the problem is because I didn't get any error while flashing the ROM. Beta Orange Fox actually did the job better than stable and officially maintained TWRP. I would appreciate it if you could tell me where I could have found logs for TWRP as I use TWRP in one of my other devices.

What custom ROM do you recommend? How is LineageOS, AOSP Extended? How do I know if a ROM's kernel has been tweaked?

Thanks for the reply, I too had considered getting older versions of TWRP but since I couldn't find it anywhere I just decided to use Orange Fox and get my work done. Where can I find old versions of TWRP? In their site under Lenovo Vibe K5 Plus I could locate only the latest version.

try Magisk-v21.4.zip from https://github.com/topjohnwu/Magisk/releases with twrp-3.4.0-0-A6020.img from https://twrp.me/lenovo/lenovoA6020.html

Thank you so much

I flashed the TWRP you suggested, booted into it, selected Wipe and flashed right. And TWRP crashed.

https://ufile.io/7or0zgfv   https://ufile.io/mv1jluc6   The recent logs of TWRP crashing when I try to wipe it.

go with OrangeFox if it works for you. or compare recovery.log with OrangeFox maybe you figure out reason. i can only see e2fsck mmcblk0p23 ended with ERROR: 1 but no reason. in dmesg there is avc denied for mtab, not sure if related

I have no clue about what you said. So I'll just use Orange Fox until someone else provides some clue. Any good sub-reddit where I can post this question?(apart from r/androidroot and r/androidquestions as I've already asked there)


text:
How can I recover my deleted messages?
I'm a symphony i110 user.unfortunatly I deleted some sms which was important.now how can I get those back?

sqlite3 just mark entries as deleted for a while until they actually deleted. get a temp root shell with mtk-su and pull /data/user_de/0/com.android.providers.telephony/databases https://sqliteforensictoolkit.com/how-not-to-examine-sqlite-wal-files make sure you keep some untouched working copy as the files get already flushed when opening

you can also open files with HxD hex editor and search for strings you remember (it's far more easier)


text:
What kind of data do Google and Samsung collect from the OS itself?
Not including apps and websites. I've switched to open source phone, SMS, calendar, etc. and I use the DuckDuckGo browser to try to block some of the web trackers. What kind of data can Google and Samsung still see through stuff like Google Play Services and other OS level stuff? I assume they're still scanning WiFi and Bluetooth signals to try and approximate your location. What data do they collect and can it be stopped without flashing a custom ROM?

No one can tell. Read their privacy policy if your believe in what they say.


text:
How to remove the persistent 'Mobile data turned off' message on Android 7.0?
When I turn cell data off on a Samsung Android 7.0 non-rooted phone, the Phone app always displays a notification that data is turned off.  This results in 2 issues:

The notification area gets cluttered with too many notifications.
The Phone app icon notification badge in the launcher always shows at least 1 notification.  This is an issue because it is supposed to indicate how many phone calls have been missed.  Sometimes the device has cell data turned off, and sometimes it has it turned on; thus, there is no consistency with the meaning of that important icon's notification badge.

The notification is persistent, and cannot simply be swiped away.
Is there a way to resolve these issues that are caused by the persistent unwanted 'Mobile data turned off' notification?

Related question for an older version of Android (Android Marshmallow) with a different device manufacturer: Block "Mobile Data Turned Off" Notification


text:
What is the "phone index" in the hidden menu for "phone info"?
Device: OnePlus 7 Pro (GM1917), Oxygen OS 10.3.8.GM21AA, stock ROM
When I enter the hidden menu *#*#4636#*#* and select "Phone info", the first line under "Phone info" says "Select phone index" with a drop-down menu:

Phone 0
Phone 1

All of the info listed after "Select phone index" is the exact same no matter which index I choose: Phone 0 or Phone 1.
What is a phone index? Why are they identical?

Modern Android phones have two system partitions (a/b), one active and the other for installing updates in background. Unless an update had just been installed both partitions are identical. May be this is the info you see.

Oh. Ok. Thanks. I haven't had a phone that gave me that option before. Not very intuitive menu. Obviously not for me. Wait a minute. All of the info listed below was imei, imsi, freq, dwnld rate,... That shouldn't change unless my SIM changes, right.

Well it is a hidden menu, may be it is has been designed for people who know what they are looking for not for end-users.

Ouch! Bazzinga!!!

Comparing to my Pixel 3a which also has A/B partitions but only 1 phone index (Phone 0), I think this is more related to the dual SIM // cc: @Robert

Thanks Andrew. That makes sense. I only have one SIM card installed at the moment. Each SIM slot has its own IMEI. If the "Phone Index" is the two slots, the IMEI should be different. As well as not connected. I would think.

I contacted OnePlus support. They suggested I swap the SIM into the other SIM slot. When I did that, for a very short amount of time; "Phone 0" and "Phone 1" were each listed with their respective IMEI #s. But within seconds, one of them(assumably the empty slot) will duplicate. I still haven't gotten an explanation for this from OnePlus. Any thoughts?


text:
What is the Android 11 Easter Egg?
What is the Android 11 Easter Egg? If so how do you find it? Does Android 11 even have a Easter Egg?

Like with previous version, go to Settings -> About Phone -> Android Version. Tap on Android Version until the Easter egg appears.

Do you know what the easter egg is?

@Joshua by "easter egg", did you mean the "Android Neko"?

@AndrewT. Yes, Thank you.


text:
Contacts app on new phone is not pulling in contacts from Google Account
According to Google help:

If you save your contacts to your Google Account, they automatically show on your phone after you sign in.

My wife got a new Google Pixel 4a and successfully added her Google Account, but no contacts appear in the Contacts app. Needless to say, this mean that all phone numbers have to added manually for calls or text. Gmail contacts still autocomplete.
We've tried following some of the suggestions at Google's Fix account sync issues page, including:

Manually sync your Google Account
Remove & re-add your account

Neither one has solved the problem.
How do we get the Contacts app to populate with all the contacts in the Google Account?

What does the contacts synchronization status show for the Google account?

It shows a last-synced time for when the Google Account was added.


text:
What is the format of Android M1 Initial Preview system.img?
I download Android Emulator M1 Initial Preview from https://github.com/google/android-emulator-m1-preview/releases
Inside the .app file I found api30-gphone-arm64-v8a/system.img which isn't a yaffs2 nor sparse file:
./unyaffs2 /tmp/android-wip/system.img /tmp/android-wip/system-img/
unyaffs2-0.2.8: image extracting tool for YAFFS2
image size (3232759808) is NOT a mutiple of 2048 + 64

operation incomplete
files contents may be broken

simg2img system.img.ext4 system.img
Invalid sparse file format at header magic
Failed to read sparse file

So what is the format of such file?
Updates:
Based on the direction from @Robert, I can see that the file is an fdisk image:
$ fdisk -lu system.img
Disk system.img: 3,1 GiB, 3232759808 bytes, 6313984 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 41F73643-DBCB-41A1-A27E-9FDB53578618

Device      Start     End Sectors Size Type
system.img1  2048    4095    2048   1M Linux filesystem
system.img2  4096 6311935 6307840   3G Linux filesystem

Now, it's unclear what format of the partition inside, because mount it as a regular linux partition fails:
$ sudo mount -o loop,offset=1048576 system.img /mnt/android-1
mount: /mnt/android-1: wrong fs type, bad option, bad superblock on /dev/loop17, missing codepage or helper program, or other error.

gparted also doesn't understand the partition:

The file is not a partition but a whole disk. You can open it with fdisk and see that it contains multiple partitions.

@Robert Thanks. Do you have further information on what kind of format for each partition? It doesn't seem to be ext4 partitions?

wrong offset, partition start at sector 4096. you can use kpartx instead
newer android running dynamic partitions. the super partition can be unpacked with Dynamic Partition Tools
furthermore partitions are flagged as read-only, therefore mount -r flag is required
sudo -i

git clone https://github.com/AndroidDumps/Firmware_extractor.git
PATH=$PATH:$(realpath Firmware_extractor/tools/Linux/bin)

mkdir -p /mnt/android-1/system_root ../extracted
kpartx -av system.img
lpunpack -p system /dev/mapper/loop2p2 ../extracted

mount -t ext4 -o loop,ro,noexec,noload,noatime ../extracted/system.img /mnt/android-1/system_root
thunar /mnt/android-1/system_root

(or whatever kpartx tell you 2nd partition is mapped)

in case you need to make ext4-dedup/logical partition writeable, increase partition first, then duplicate shared blocks
cd ../extracted
dd if=/dev/zero bs=1G seek=1 count=0 of=system.img
resize2fs system.img 1G
e2fsck -E unshare_blocks system.img

you should be able to mount -w afterwards

re-packing requires new vbmeta signature with avbtool.py stored in first partition system.img1 start at sector 2048 (which goes too far here)
superrepack third-party cross-platform tool for easy unpack/repack system.img2 is recommended to automatize the whole re-packing process
you can however do it manually with lpmake (requires all partitions to be unpacked into ../extracted see above step lpunpack)
source
resize2fs -M system.img
e2fsck -yf system.img
lpmake --metadata-size 65536 --super-name super --metadata-slots 1 --device super:3229614080 --group main:2369171456 --partition system:readonly:787050496:main --image system=system.img --partition vendor:readonly:83619840:main --image vendor=vendor.img --partition product:readonly:1366814720:main --image product=product.img --partition system_ext:readonly:131686400:main --image system=system_ext.img --sparse --output super.img

It failed with this error:
mount -t ext4 -o loop,rw,noatime /dev/mapper/loop19p2 /mnt/android-1/system
mount: /mnt/android-1/system: wrong fs type, bad option, bad superblock on /dev/loop20, missing codepage or helper program, or other error.

Thanks for the enlightening answer. I was able to mount the image and changing the content inside now

you won't be able to run modified partition unless avb/dm-verity is disabled. maybe it's already sufficient to set the flag 2 in system.img1 with hex editor which will instruct to skip hashtree verification (never tested myself, but that's what magisk does) https://android.stackexchange.com/q/221756

superrepack come with a warning from the author just yesterday: I have bad news for you! This tool is dangerous! Do not use please! What I have found now while checked modified partition with e2fsck, found a ton of "Multiply-claimed blocks already reassigned or cloned.", when I do e2fsck repair it got repaired but bad news is some files is deleted from partition

just wait a few days it will solved soon :) you can meanwhile go the official way as descriped by Brepro1, it's well tested

I was able to produce the new super image with lpmake:
lpmake --metadata-size 65536 --super-name super --metadata-slots 1 --device super:3229614080 --group main:2366435328 --partition system:readonly:784314368:main --image... --sparse --output super.simg

How can I pack it back as a super partition together with a vbmeta partition like the original one?

(The original one is an fdisk file with 2 partition vbmeta of 1M and super of 3G)

cat super.img > /dev/mapper/loop2p2

The emulator won't boot with the new system.img generated by the method above. I go ahead and hex patched the byte to disable verification but I guess I don't know enough to make the correct patch: https://imgur.com/8remGKm

superrepack doesn't work for me neither. I'm getting clone_file: Could not allocate block in ext2 filesystem returned from clone_file_block while running superrepack on the emulator - I guess because I'm running it on emulator, not real device?

there is also dm-verity one must disable in fstab


text:
How can I transfer blocked numbers/phrases?
I have many blocked numbers/message phrases list on my Samsung S8 Plus phone. Never rooted it and it has still official rom. I will use with the same rom. I will just format it but I don't want to bother with
insert the numbers one by one after formatting. So, is there a way to restore numbers/phrases with a JSON/XML file or something else on stock rom?

This seem to be a feature of the Samsung Messages app (com.samsung.android.messaging). Unfortunately adb backup is disabled for this app.

@Robert Yes I don't want to use another app as most of them are not stable . I'm using old rom just for similar reasons. Thanks anyway

One of the problems with many of the stock Samsung apps is that they have no export functionality.

For now, I have found this app. It is exporting numbers as json format at least. But it does not have any action for message phrases

@RockPaperLz-MaskitorCasket You have right. I used many custom roms in the past to export on my old phone. Samsung's some apps supports to transfer another datas but they should think to export for different formats also


text:
myTv+ app returns error code 100 when running on Android TV box
I have installed an app called myTv+ (https://mytv-plus.com/mytvws/) for Samsung A7 and it worked fine.
I tried to install it on the Android TV box (MX9 Pro 4K) but it's simply not working, just getting "Error Code: [100]".
I contacted the developer he said this app is designed only for the smartphone and "Error Code: [100]" means that your Android is rooted.
I noticed SuperSU on my Android TV box, I went for a full unrooting, yet the app still shows "Error Code: [100]".
Is there any way I can force the app to work with the Android TV box?

I don't have much experience with rooted Android-TVs but on Smartphones "rooted" often just means "your ROM is not genuine" according to Google SafetyNet check. Therefore unrooting does not help in such a case. The only way that could really bypass that check is to change the app, e.g. by decompiling and changing it (patching the checks away). Or alternatively you could try to hook the app using Frida and bypass the checks at run-time (both requires Android/Java programming knowledge).


text:
Firefox stable version
If I go to the Play Store, and pull up Firefox, I notice that its version 88.0.0-beta.3. I searched some more and found another version that is 87.0.0-rc.1
I dont want a beta version or rc version, I want the most recent stable version.
How would I go about installing that?
Edit in case comment is removed: this site was helpful to me (aarch64):
https://archive.mozilla.org/pub/mobile/releases/

Looks like this was the first time Mozilla released "rc.1" on the Release channel after a long release history.

This is likely just a temporary experience where the current stable release is technically labelled as "87.0.0-rc1".  I agree that it's a bit confusing, but I think it is most likely temporary.
The latest official release version of Firefox for Android can be obtain here:
https://play.google.com/store/apps/details?id=org.mozilla.firefox
Alternatively, you can enter your email at the following page, and Mozilla will email you a link to the current official release version:
https://www.mozilla.org/firefox/mobile/
All the source code for Firefox mobile is available here (unlike many other browsers, there is no non-public source code used to create Firefox):
https://searchfox.org/mozilla-mobile/source/
BTW, all releases of the desktop version of Firefox are available via FTP, but I'm not aware of anything identical for the Android version.  For completeness, that FTP site for the desktop releases can be accessed via this link:
https://ftp.mozilla.org/pub/firefox/releases/

You can't get the latest stable version till it is released. AFAIK, Firefox doesn't offer an independent stable release channel. Therefore, your Options :

Wait for rc/ beta versions to be upgraded to stable.

Downgrade to previous stable version, as explained in the support page.

Firefox now includes downgrade protection to prevent corruption of user profile data. If you install an older version, you'll be prompted to create a new Firefox profile.

Switch to Firefox Extended Support Release (ESR) for personal use. Note that you will get latest security and stability fixes but not the latest features.

Use a different browser till such time Play Store offers stable version.


text:
Did I have USB debugging on or off?
my phone got stolen a month ago and I Don't know if I had usb debugging on or off(I had enabled developer options in the past and messed around with it a little bit that's why I'm not sure) but I remember,everytime I connected my phone to the computer I had to unlock the phone using my pin and select files or photos in the notification bar to access the files on the phone,otherwise you couldn't Mount phone as a storage device.i never had anything on the notification bar that said USB debugging is enabled when my phone was connected to the Computer. Did I have USB debugging on or off? and if I had USB debugging on could they simply remove the PIN and use the phone as is? I'm worried about my chrome data not about videos photos... Thanks alot

Having USB debugging (adb) enabled on a device is not a security problem anymore since Google introduced the adb authentication using public keys with Android 4.2 (or was it 4.4?).
Since that time adb does not work when you connect it to a PC it has never been connected before.
The device does not allow adb access unless the user has authorized the PC as allowed using the dialog that appears on the phone when connected via adb. This dialog can only be seen and answered when the device is unlocked.
Thus a lost or stolen device that is locked can not be accessed via adb.


text:
(ROOTED PHONE) Using WiFi and LTE Simultaneously
I have a rooted Google Pixel 4a and an IoT device which I connect to over WiFi. This WiFi network does not have internet connectivity and simply serves as a way to control the IoT device. I have a termux process (it is run within an Ubuntu chroot jail) with which I want to be able to get information from the IoT device (over WiFi) and then POST it to a server (over LTE). I have tried so hard to get this to work. I'm fairly sure this should be possible with root access but I've exhausted my options at this point. Here's what I've tried:

Connecting to WiFi normally. Doesn't work because even though Android knows the WiFi has no connectivity, it still attempts to connect through it. To be clear, I have mobile data always on and I'm able to ping through LTE interfaces while connected to my IoT WiFi. It baffles me why Android doesn't direct traffic to LTE for non local IPs when it knows WiFi is down. This functionality should come out of the box in my opinion.

Changing the routing tables. This doesn't work since the LTE interface being used tends to change names at seemingly random times so the entries must be kept up to date. I can't seem to bind processes to interfaces from the command line either (but you can from the ConnectivityManager), as far as I'm aware. This is the disadvantage of circumventing the system commands for these things and directly modifying them. I am not notified of any changes or any other things going on and stuff simply stops working.

Assigning my IoT network a static IP with no gateway. This works on Apple phones but not on Android. It still attempts to access the network through the WiFi even with a 0.0.0.0 gateway.

Bypassing the GUI WiFi connection system to try to connect to WiFi from the terminal. This involves turning WiFi off, then using iwconfig to link it to the right network so Android still thinks it's in LTE only mode. Doesn't work because wlan0 interface doesn't permit this action on Android, even with sudo (couldn't figure out how to give myself permission to do so).

[PENDING] I'm trying to see if I can build a wrapper app that runs this process from inside it. Then, using the ConnectivityManager, I can bind the process to use the LTE interface. Then, I run a second process which is piped into the first which handles all communication with the IoT device, and I bind it to use WiFi. I'm not sure whether this strategy works but it seems very hacky. Also, I'd prefer a more elegant solution.

Looking at the Android source to find out how ConnectivityManager's bind process to network interface works and if there is an equivalent instruction for the command line. I have not found anything yet.

If any of you has insight on new strategies or has suggestions on how to fix my approaches to any of the above, let me know! Thanks in advance for your help!


text:
Why do LTE Network Interfaces Change Names?
You may have seen my earlier question here detailing my struggles with multiplexing LTE and WiFi on a rooted Android device. Much of this stems from an issue I seem to run into with the LTE network interfaces used by my device (Google Pixel 4a), namely v4-rmnet_data{$X} where $X is some number from 0-9. When I do an ip link show, I can see many LTE interfaces formatted rmnet_data{$X} but only one formatted like v4-rmnet_data{$X}. I'm assuming this v4 interface is an IPv4 link generated from one of these IPv6 links. Occasionally, I will see that the $X used by the v4 link has changed inexplicably. I can't seem to find a good explanation as to why this happens. One second, the active link is v4-rmnet_data0, the next it is v4-rmnet_data2 and the v4-rmnet_data0 link has ceased to exist. Does anyone know what causes this to occur? Is there anything I can do to prevent it from happening? Since I am manually changing routing tables, disruptions like these cause disaster.
Thanks for your help!


text:
Xiaomi phones battery compatibility
Xiaomi phones have several batteries, for example, BM35, BM21, BN43, and etc.
I'd like to know the compatibility of those batteries, for example, if BM35 has the same pin and size as BM21 something like that.
I have this Xiaomi Redmi Note 4x it's kinda old but still working and the battery is now needed to be replaced because it's already draining fast. Instead of using the BM43 which is the current battery of it, I'd like to purchase a different model with a higher capacity for example the BN62.
If I only know the pin type and the size of those batteries, it will be easy for me to upgrade and replace them.

Actually, that will be hard but can be done. You may be able to find the dimensions or size of the battery but you will be having a hard time to figure the pin type of it. I tried searching for the specifications of BM43, I only get the dimensions and capacity.


text:
how to recover data from android 10?
My Samsung A80 had an issue and could start up
i had to flash it
tried to recover its data but could not
i  HAVE used windows and i used different apps, no thing worked
my friend rooted the phone SO MY PHONE IS ROOTED
the rooting is verified
used more programs and apps
nothing worked
DrFONE
Disk digger
all says its rooted but no data recovered
THIS IS ALL WHAT I DID
what should i do?

If encryption was disabled, you can use NAND flash chip programmer to recover data.

or in other words, no data is recoverable because your phone was encrypted

how can i make sure that my phone was not encrypted ?

i flashed it and now i just rooted it trying to recover data, so no way to recover any thing cuz its encrypted?

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

New versions of Android force disk encryption. Since your device is not so old and it was unrooted before the wipe happened, the encryption was definitely enabled.
I do not want to disappoint you, but the fact is that no data can be recovered anymore from the device. The encryption uses a security key that is stored on-device. A new encryption key is generated when you reset the device to encrypt the storage again. So, in the absence of the old encryption key, you will not be able to decrypt the data even if your recovery software manages to recover some bytes.
I'd recommend to avoid wasting time and other valuable resources to recover the data now. It is permanently gone.


text:
Use an Android tablet as a Wacom drawing tablet for a Mac?
How do I share Android tablet's screen while attending zoom meeting from Mac? I know there is a zoom plugin to share iPhone/iPad screen but is it possible to do the same with an Android tablet? (using the Android tab as a Wacom tab)?
I have: MacBook Air2020
Galaxy Tab A

You can do so using the Android remote control software scrcpy:
If you enable Development option on your Android device and afterwards enable the "Android Debug Bridge" option you can connect your Android device to your computer via USB and then remote control the Android device and see it's screen on your computer using a software like scrcpy (install it on MacOS via brew install scrcpy).
Then in a Zoom call you can share your computer screen which shows the Android screen via scrcpy.


text:
XLogger on Xiaomi?
Installed a simple file explorer on my pocket telescreen, Xiaomi MI 8 Pro, right now is running on unrooted MIUI 12.04
It happens that I have found a .log file, (completely by accident)
with hundreds of entries, day by day but they are encrypted somehow.
Here is the sample, mostly all look like this:
LV:I, TM: 2020-12-10 19:26:37, TAG: ##XLogger##, MSG: #&^hNNLFjwHJGwbUDpLDrj5urK+b6mXPcFQNJvkXgL5SVPxtfZBOzyPpBFgPDEUxllkC+FxzWWV2HyrPe0UE6F3ml9RFkJ4/kzHAnrdxHL4z5++zba4l8tq6w7WIqcmYEGbMkSfPnpErw7JTmIwvqer7t8uJJwn8NSHUmAFA49PiFg=!!JU07CfBL9bt46QcTJLLe9RN0juHv6fnuDUFD0yagTM9wm0gJxrWzy9zNOxSXpLJBOSBMw/2wJ1eGFj5VZqcjYmCidBHV4JR7IXMwfayEy7bVw0z98Fje1Eb5PymyU4RqosTTuF/V85pPRAvUscI1GwKAZogwuGlM776r84QJh0X3xcccccccccvvvvvvvvvvv+rX^&#

How can I open and or decode them?

I also have such logs on my old Redmi Note 4, Android 7 (MIUI 11?), in folders files like /device/MIUI/debug_log/common/com.xiaomi.finddevice.

Same happened to me today! Found "1.log" with encrypted log off like 2 weeks.
I'm using a Redmi 8a with MIUI 12.


text:
I have transferred (all) my files from my SD Card (phone) to my computer and my android phone ( Galaxy S9) is frozen. What can I do to save the phone?

My phone froze and won't respond to anything, what can I do ?
my internal storage is still full ( pics and docs all from there is still in the phone )
I thought of transferring those files in picture back to the SD card but I doubt it would do anything.(Would this work)?
There's also a write protection on the card.
Also, there's an android & system folder from the phone's SD Card that got transferred as in the picture above. Would that have caused my phone to freeze and be unresponsive?

check Lacking storage booting option from recovery mode

I can't go to recovery mode. My phone won't respond to any gesture and press from the physical buttons .The screen is frozen.

okay I was able to go to the recovery mode, which option to choose , n the next steps to make sure all files aren't deleted..?   what will the lacking storage booting do ?

lacking storage booting will boot a phone that won't boot because of lacking storage

Press and hold the power button for up to 60 seconds. Usually this initiates a farced reboot.

The phone resolved the prob. The phone was stuck and after I waited for the battery to die, the phone rebooted as usual and was fine. I wonder if its because the android or the main "important" folders aren't rewritable or can't be deleted....


text:
How to turn off the vibration, which happens when phone call is connected or the camera is turned on?
I've seemed to turn off all the vibration settings, including settings for camera application, but it keep vibrating when I turn my camera on (by pressing side button twice), the same happens when I call someone and they answer the call.

Android 10
Phone: King Kong Mini 2
I use Microsoft Launcher.


text:
Are wildcards available in setting up MiXplorer AutoTasks?
I want to set up an auto-task in MiXplorer to delete two types of files that another application creates – one appears in two different folders, and another is in one folder but has different numeric strings appended to it each time it's created. Is it possible to set a task for each with a wildcard that will work on either, like /internalstorage/$/.crap.tmp and/or internalstorage/backups/system/crap_$ (where $ is some wildcard character or string).
I tried asterisks but that didn't work, and tried figuring out if there was something to the regex renaming format that I could understand and use, but couldn't.
I'm using Android 8.0.0, MiXplorer 6.46.1.
Thanks much.

An automation app is a much better choice for the task at hand. Any particular reason for avoiding that?

I am using version 6.54.0 of MIXplorer. Autotask does not have regex (widcards) options when deleting files. They are available for copying, moving and archiving files.
What you can do is:

Create a .sh file with for example the following command to remove files:

#!/bin/sh
rm -f internalstorage/backups/system/crap_*

Create a autotask, select Execute. Then on the File option, select the file created earlier.

The command above assumed that you know the path and part of filenames. Notice that I did not use the directory  /internalstorage/$/.crap.tmp as using * will lead to check all directories for .crap.tmp file.


text:
Android 11 "raw/:storage/..." file paths
Hello Android community!
I am trying to recreate a way of putting a file on my emulator in a location, so that when picked it produces the following uri: "raw/:storage/..."
My challenge right now is I do not have a reproducible way of doing this. I have only gotten this raw uri once in my testing and can't anymore.
This is react native app, and we're using a forked version of image-crop-picker library.
Function: https://github.com/aarongrider/react-native-image-crop-picker/blob/master/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java#L369
This is the function that returns the uri of the selected file: https://github.com/aarongrider/react-native-image-crop-picker/blob/master/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java#L672
We're getting the following error from line 691 probably:

from calling the resolvePath which has a specific way of resolving the uri for Android API 19 and above: https://github.com/aarongrider/react-native-image-crop-picker/blob/master/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java#L546
I am a complete newbie with Android, and just need a consistent way of producing the raw/:storage/.. file uris. I appreciate any guidance provided here! Thanks :)

The only "raw" and "asset" things that I can think of are the raw/ and assets/ resource folders inside the APK though (refer to App resources overview)

@AndrewT. Here is a link to the Github issue: https://github.com/react-native-cameraroll/react-native-cameraroll/issues/244#issue-714741338 - this is basically an issue on Android API level 30 (Android 11 ? Android Q ?) Here is a PR that aims to solves this https://github.com/react-native-cameraroll/react-native-cameraroll/pull/271


text:
Fastboot command stucks and goes to disk sleep
I am trying to flash recovery in my Poco F1 but fastboot stucks when running fastboot flash recovery recovery.img. Also while running fastboot oem device-info for a second time gets stuck.
➜  ~ fastboot devices
c7ca2666    fastboot

➜  ~ fastboot oem device-info
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: false
OKAY [  0.001s]
Finished. Total time: 0.001s
➜  ~ fastboot --version
fastboot version 30.0.5p1-android-tools
Installed as /usr/bin/fastboot
➜  ~ fastboot oem device-info

this is where fastboot gots stuck when I ran fastboot oem device-info for a second time.
When trying fastboot flash recovery recovery.img gives error [Failed] fastboot flash failed no such device. If I try flashing after using fastboot --version, it stuck as described previously.
I tried with both Linux and Windows (Intel CPU) and the problem persists. I have already unlocked bootloader and previously(few months ago) flashed TWRP.

I finally discovered the source of the problem - another process had apparently claimed the USB device. In my case, fwupd was automatically connecting to the device, attempted some kind of USB transfer and failed. However, it didn't release the device, which is why fastboot was stuck and waiting for it to be released.
Stopping the fwupd daemon, fixed the problem.
I've opened a bug report with fwupd here ( https://github.com/fwupd/fwupd/issues/3187 ). Meanwhile, if you want to be able to use fastboot, make sure no other process is using the device.

so what about Windows? I tried in Windows as well same problem.

Then, it sounds like some process in Windows is holding the USB connection and refusing to release it, or something else may be causing the problem. Maybe it's a problem with fastboot on the device itself? Or maybe USB cable or USB port issue.


text:
How to control phone with broken screen from computer when there is a password?
My phone's screen is broken. I want to be able to use it using a PC (I just need to use two apps for a short while). I have a password on my phone. If I remember correctly, I have USB debugging enabled. I don't know if I had ever checked the option to always allow from this computer when the allow USB debugging modal pops up. I am trying to use scrcpy to control my phone from my computer. The phone is Samsung Galaxy J7 (2016).
This is what I have tried:
I downloaded adb from here. I downloaded scrcpy from here. I moved the adb files to a folder. I moved scrcpy files to the same folder, overwriting the duplicates.
I opened the command prompt from that folder (I'm on Windows). I connected my phone to the computer using a USB cable. As soon as I connected it, I ran the command adb devices -l. This is what I got:
List of devices attached
31002adf4e2c435f       device product:j7xeltexx model:SM_J710F device:j7xelte transport_id:1

The I ran the following commands:
adb shell input swipe 600 800 150 900 300                            (swipe to get to screen with password prompt)
adb shell input text "[mypassword]"                                  (enter my password)
adb shell input keyevent 66                                          (press enter key)
scrcpy

This is what I got in the command prompt (after the last command):
INFO: scrcpy 1.17 <https://github.com/Genymobile/scrcpy>
C:\Users\[User]\Desktop\New folder (2)\scrcpy-server: 1 file pushed, 0 skipped. 5.0 MB/s (34930 bytes in 0.007s)
[server] INFO: Device: samsung SM-J710F (Android 8.1.0)
INFO: Renderer: direct3d
INFO: Initial texture: 720x1280
WARN: Device disconnected

I am stuck here, with no idea what to do. I've tried using Vysor, but it also didn't work. I'd like to stick with scrcpy, unless there is a better option. Please keep in mind that I don't intend to transfer data; I want to use two apps (one of which is the Signal app, to transfer my chats).

guesswork: your battery is fully charged. when 100% is reached usb connection is interrupted because of charging mode switch. wait for battery is drained 50% and try again. it should work, do a research for "WARN: Device disconnected"

https://android.stackexchange.com/q/215869

if problem persist connect to usb 2.0 port / hub instead (adb might hang because sometimes usb 3.0 speed is too fast)

@alecxs I'm pretty sure the battery being at 100% is not the problem. I have tried this repeatedly, some times after the I had left the phone for some time without plugging it in.

do you have usb 2.0 hub?

@alecxs Sorry, I don't.


text:
How to install recovery image with fastboot? (Asus zenfone go 5.5 zb551kl)
I have an old phone "Asus Zenfone go TV zb551kl" and I am trying to fix it so I can give it to my nephew. It had a problem where the only thing that it can load is the "fastboot". And, it says "Invalid boot image!!" whenever I boot recovery or normal boot. I just want to install the stock recovery image so I can re-install the stock ROM.
I'm just wondering if someone can help me with my problem.

Does this answer your question? Bootloop issue and can't go to recovery mode


text:
Is it possible to reduce WhatsApp "msgstore.db" file size?
My WhatsApp backup file (msgstore-**.db.crypt12) size can reach up to 380MB+ for a single file. Because WhatsApp automatically backup chats every day and will keep the 7 most recent backups, my phone will store up to 2GB worth of these files.
In case anyone's wondering, my phone is not rooted, but I have the WhatsApp key and wa.db files, so I can decrypt (and re-encrypt) the msgstore.db file. What I have tried is to manually delete some messages in the messages table in the msgstore.db file, it sure reduces the file size, but then it fails when I try to restore WhatsApp chats using that file. Also, I have tried to clear chats in some groups that have a lot of messages using the Clear chat feature, this deletes the messages in the messages table, but doesn't reduce the msgstore.db file size, I guess the deleted messages are moved to another table which I don't know where.
I don't need a trick to stop WhatsApp auto backup, I just want to reduce the msgstore.db file size, is it possible?

https://sqliteforensictoolkit.com/how-not-to-examine-sqlite-wal-files sqlite3 databases are quiet complicated. entries won't deleted immediately. instead, content is flagged as deleted and preserved, sometimes collected in .wal files. start with fresh database

@alecxs I don't think WhatsApp databases are merely SQLite DBs. .crypt12 indicates they are encrypted, possibly with some proprietary scheme.

@IrfanLatif WhatsApp databases are SQLite DBs with encryption applied to them. There are tools available for decrypting WhatsApp databases such as this one. This will give you an unencrypted version of the database which you can then read just like any other SQLite database.


text:
Android files and folder is showing wrong time and date
I've noticed that the files of my Android phone are showing the wrong time and date.
I have made a folder "New folder" and the folder was created on 3/13/21, 12:23 PM.

I renamed the folder to "New renamed folder" and the folder is showing that it was created on 3/13/21, 12:23 PM. But it should be 3/13/21, 12:32 PM.

It said it was last modified on 3/13/21, 12:23 PM. But it should be last modified on 3/13/21, 12:32 PM.

Anyone can help me to solve this problem?

Moving or renaming a directory (see rename syscall) changes only ctime, not mtime. See this answer to know what they are: https://android.stackexchange.com/a/209243/218526

This is pretty much by design. The last modified isn't meant to change simply from renaming it. The folder modified timestamp only changes if the contents is modified such as adding, removing or renaming items within the folder.
The same goes for files. The modified timestamp shouldn't change simply from renaming or moving it. It should only change when its content is modified.


text:
How to get back media if media not restored during restoring without affecting recent chats and media?
So I backed up my whatsapp a month ago and then while restoring I was not able to find a wifi source so it just stopped restoring media, only the chats were restored. Now after a month use I have more chats and some media, what do I do to bring back all the older media and keep all the latest chats and media?


text:
search for filenames on entire android device tree using ADB 'find'
How do I use the 'find' command on ADB to search the entire android file tree on a rooted device, including sub directories, for any filenames containing the word 'prop' ?

fHave you tried find . -name "*prop*"?

dang, its simple only when you know, Thank you! (used through SU shell). Anyway to output that to a text file? actually copy/paste works too lol

Use:
find . -name "*prop*"

.: represents the current folder.
-name: option to find files by name.
*prop*: filenames that contain the word prop.

OR as mentioned by @alexs on the comment, you can use:
find . -iname "*prop*"

-iname: option to find files by name but is case insensitive.

If you want to find the all files with the root folder as the stating place, do as mentioned by @IrfanLatif by using:
find / -iname "*prop*"

Better use root directory explicitly (find /) instead of current/working dir which might not always be root dir, though by default ADB's cdir is root dir. Even better do find /{data,system,vendor,prodct,odm}/ to avoid going through pseudo filesystems unnecessarily.

Great thanks. Id be greatful if anyone would view my XDA thread and give their 2 cents. Ill be creating this later and will post the link here in comments (if thats allowed?). Its about altering volume steps on a Lenovo M8 FHD tab (MediaTek) which Im using to replace the popular Nexus 7 (2013) for car audio head unit. Its the only tab that is exact same length as the nexus and much better spec than a galaxyTab A. Im sure the lenovo could catch on for this purpose if not for the volume problem.

https://forum.xda-developers.com/t/fixing-volume-steps-on-lenovo-m8-fhd-blog-car-audio.4256731/

@Mamba76 if the answer has resolved your issue, you can mark it as accepted. See What should I do when someone answers my question.

sorry, iv learnt something new. accepted

how do i view available options / flags for shell command like 'find' ? linux use 'man' pages ect

@Mamba76 find --help

dont you just love the linux world! D


text:
NFC tags to execute commands
I would like to know if there is such a possibility to create NFC tag and then use it to execute complex commands on a tablet, for example opening a specific application or changing a certain system setting.
Is this kind of project possible to accomplish?

On a tablet that has a custom app installed or on a generic tablet without any special app instaled?

Since this project starts from scratch there is no specific tablet system setup. I would like to know about both options and decide what will suit the most.

Try using an automation app, like Automate or Tasker.

I was asking because there is no choice. An NFC tag contains a simple number or the more advanced NFC tags can be written so that you can write an URL to it. But without a special app on the device the NFC tag can trigger nothing.

So if I understand, I must create an NFC tag that will trigger an application which will execute the commands?

There are several [tag:automation] apps available, some of them support NFC directly. Also see my list of NFC apps, which includes several matching your question.


text:
Scheduling with Google messages. What does the roll-out information mean?
This news article describes the roll-out of Google's new scheduling feature for Google Messages. On my own phone, I briefly had the opportunity to use the feature before it inexplicably disappeared. The news article seems to suggest two things: first, that the brief opportunity to use the feature might have been part of a test prior to the general roll-out, and second, that "schedule send is rolling out as a server-side switch ..."
What exactly does that last part, about server-side switch actually mean. I understand the general principle of client-server relationships with things like using an email client on my PC connected to my ISP's email server, but what server is being talked about in connection with Google messages. Surely they're not talking about something that requires cooperation from every ISP!?

It means that feature will be enable by Google's server. You might already have the feature but you won't see it on the app's interface.

Surely they're not talking about something that requires cooperation from every ISP!?

It is not related to ISPs. Often due to the high number of users, some features are not "open" for all of them, but enable to users from the server (in this case Google's) slowly based on country, language, phone model, etc until all can use it.

I'm not sure that I understand. Are you saying that scheduling with Google Messages only works if one has one's device signed into a Google account and shares one's message with Google?

@user02814 it means that the availability of the feature is controlled by Google's side, and that the app/device needs to contact Google server to retrieve this info. A bit similar to staged rollouts on Play Store.

@AndrewT. Thank you. That would explain the disappearance of the feature. My device is not normally signed into Google, so I probably saw the feature on a rare occasion when there was Google account info on the device. I might add, that it seems to me to be a disgraceful privacy-invading way of implementing the thing.


text:
Enabling debugging with broken screen and usb keyboard (Google assistant working)
Is there a way to enable USB debugging with broken display - black screen and touches are not registering.
Ultimately I want to control my phone (answer phone calls, see messages, restore images, access bank mobile 2fa) through scrcpy, but it requires USB debugging mode.
Most tutorials make use of USB keyboard/mouse but for some reason they are not functioning (Oneplus 5t), and I have tested adapter+keyboard on different phone and it works.
What I have at my disposal

Unlockable phone - fingerprint sensor
Google assistant - it responds to "hey google"
Phone is connected to Wi-Fi and I can install apps through google play store on my PC

don't quite understand - otg is working or not? did you provide external power to otg hub? can you access files via MTP after unlocking with fingerprint?

Without an USB keyboard the chance is next to zero. Make sure to connect a plain USB keyboard, without anything special (no RGB LEDs, a smartcard reader and no integrated USB hub) and attach it directly to the phone (only use a simple USB-C/A adapter).

From the information I can gather - to be able to use USB OTG devices on Oneplus phones, you need to enable "OTG storage" which I cant do without screen or keyboard.

@Firelord you have Oneplus device don't you, can you shed some light here maybe?

@alecxs A problem with OTG on OnePlus devices is that the user has to enable OTG first in the settings app before using it!  One has to go into Settings -> System -> enable OTG storage setting. That setting auto disables after 10 minutes of inactivity! To keep it enabled all the time I use this tweak of mine: https://android.stackexchange.com/a/216273/96277

@Firelord Not quite sure how is this relevant in this case - since I can not enable OTG storage setting with touch controls and because I don't have debugging enabled I also cant set the flag through adb. Can you please clarify?

@Jimbo actually, user alecxs asked me if I could help out with OTG issue on a OnePlus device, so I told him why OTG is not working for OP (you, that is). Given your situation, its relevancy is its explanation as to why your OTG (USB keyboard/mouse) is not working at all in your OP5 device, even though it is fully functional.

@Jimbo I'm having the same problem. Have you found a solution? I can make Google assistant to start Teamviewer or Anydesk apps but they both need confirmation to start remote access which is not possible.
I can't find any solution.


text:
Should I clear my Gallery Data?
If I clear my gallery data, will I lose all of my albums? My gallery has been taking up a lot of data to the point that I have little data left. If I clear it, will all my albums be deleted?

i am pretty sure your pictures are consuming more than 401 MB disk space. furthermore pictures are not stored in apps private directory. therefore you can safely delete gallery app data, that won't delete pictures from storage

Switch to a different gallery app. If you see that your albums are visible in a different Gallery app too, than the albums are app-independent.

Does this answer your question? Is it safe to clear data for gallery?

Data store by the gallery apps are thumbnails it generates to preview the pictures and videos. The Gallery app can be considered as a movie theater where you go to watch a movie (in your case, viewing picture and videos in your phone). If its goes bankrupt (in your case deleting its data), it won't stop you from going to another movie theater.
Furthermore, if you delete the Gallery app's data, next time you opens it, the thumbnails will be recreated. When you navigate inside inside the folder thumbnails, more thumbnails will be recreated to preview their content. That's what increases its size.


text:
Restore data of a specific app from a TWRP backup
After installing an OTA update my phone bootlooped so I made a TWRP backup and did a clean install of the latest version of the ROM I'm using but restoring the backup using TWRP bootloop my phone again. I only need to restore one or two apps. I know that I can extract the files by adding .tar and opening them with WinRAR.
Now my question is : What files I need to move from the backup to my phone to restore the data of a single app manually?

ROM : Pixel Experience Plus (Official)
Android : 11
Magisk : 22.0

I tried copying the data from /data/data/com.exemple.idk and replacing the new ones in my phone but that doesn't seem to work. Is there anything else I need to copy from the backup files?

If the app uses the hardware backed AndroidKeystore for storing private or secret cryptographic keys you won't succeed in restoring the data as the keystone can't be restored selectively (if it can be restored at all). Therefore it depends on the app.

Is there a way to know if the app is using Android keystore system?

Does this answer your question? Backup WhatsApp from NANDROID

for more than one app use that script and restore with this app (with some intermediate steps)

Is the device rooted? IIRC Titanium Backup can restore parts of Nandroid backups, but it requires root.

@alexcs I already tried that but the app just refuse to start after copying its data (did it again with 0775 same result). I forgot to mention that I didn't reinstall TWRP again because in XDA forum they said it's not fully compatible with Android 11 and it's maybe the cause of my first bootloop since it's not an official release.

@Izzy My phone is rooted but Titanium Backup is outdated and doesn't work with recent versions of Android

Indeed, the last version was released more than a year ago (11/2019), a real pity! I didn't yet reach Q, so I did not notice it won't work on Q or R. The tools directory in the devel branch of Adebar has two scripts you might wish to investigate on what data belonging to an app is used for backup/restore: root_appbackup.sh tells you what goes into an app's backup (ie what files to look for), and root_apprestore.sh how it is restored. Maybe that helps?

if you know the app won't run on android 11 at all, this whole question is pointless...  of course you can restore app data only if the app itself is working. (btw the chown step is the important one, and maybe chcon too)

@alexcs You misunderstood me, it's not the app who doesn't work on Android 11, but the unofficial TWRP image. I already did the chown and chcon but I realized that the subfolders have a different group and that's what solved my problem.

you probably missed the -R flag very last line in the linked duplicate

Thanks to @alecxs and @Izzy I realized that the problem was related to the folder and subfolders attributes (permissions, owner and groups).
I will tell you what I did to restore just a specific application from the NANDroid backup generated by TWRP (without using any command but root is required)

Add .tar to the .win000 and .win001 etc (ignore the .sha2 files and any other files)

Extract everything in the same folder using WinRAR or any similar software
Go to \data\data and copy the folder of the app you want to restore to the internal storage of your phone (for exemple com.exemple.idk) and remove the cache folders from inside this folder (IMPORTANT)
Install Solid Explorer File Manager from the Play Store
Install the app(s) you want to restore from the Play Store too
Using Solid Explorer copy everything that's inside com.exemple.idk and navigate to /data/data/com.exemple.idk then paste everything
Now select the cache folder FIRST and select all the folders you just pasted one by one! DON'T use the select all button! > Click on the 3 dots > Properties > Attributes (You should be able to see a similar screen with similar permissions)

Now just check Recursive ☑ in both checkboxes and apply both.

Et voila! The application should be now restored to its previous state, if not uninstall it and try again step by step carefully.


text:
Will my phone be unlocked after it factory resets itself?
I forgot the password of my phone, and it says after 4 more failed attempts that it will be wiped clean. If that happens, will my phone be unlocked and ready for use again? I really don't care about the data on it, because everything I had is easy to get back (mainly just social media apps like instagram/discord).
Any sort of help would be appreciated to the fullest, because I just want to be able to use my phone again.

that will trigger factory reset protection (FRP) which requires google account to unlock after factory reset. btw you will lose all pictures from /sdcard

Aha, so if I understand what you said correctly, I if I fill in my google password, I will be able to get back into my phone without any issues? @alecxs

right. if you are fine with factory reset, all you need is google password. you can remote factory reset from PC too, all you need is device connected to wifi https://www.google.com/android/devicemanager this way you are sure you know the password

So as long as I know my google password, I can get into my phone? @alecxs

yes (it is the google account used for google play)


text:
Recover draft text message
I have a Samsung Galaxy J7 Star.
I was recently hospitalized and needed to write important information but didn't have anything to write on. I chose a random contact and started to write the information as a text message and never sent it because it was not for that person.
When I left the window, a message appeared "message saved as draft"; later I chose the same contact to add an important link and it appeared in the window but the previous draft messages disappeared.
I need to recover that important information and cannot find any folder where my draft was supposed to be saved.

Good messengers like signal allow to send you messages to yourself ("note to self").

even if data is still there (you don't know) you can't recover because of lacking permissions. better use any notes or calendar app in future

settings app has notification history widget for viewing recent incoming notifications, but i doubt you will find a draft message there. dialer app has conversation history including deleted messages, but again no drafts here

Please clarify if you're using Samsung's own Messaging app or other texting apps. Though, some apps don't support multiple drafts, so previous drafts will be gone if a user chooses to create a new text message. It's preferable to download and install a note-keeping app for this purpose. Otherwise, and in the worst case, use the Contacts app for adding notes on certain contacts instead of relying on Messaging app's drafts.


text:
Wifi Hotspot - Getting 504 Timeout (and CORS) when cache is not disabled
I have an android phone that I'm using for wifi hotspot to which I connect my laptop to. There is generally no problem with it however sometimes content just doesn't load.
I tried checking the Network DevTools to see what the problems are and figured out what requests were causing it. The causes were requests to a different domain and they are in "(pending)" status for a long time and eventually turning "CORS error missing Allow Origin". Upon examining further (using a different network) the responses properly have the needed headers and the requests properly have the origin matching the allow orgin header. When I tried checking again (with the mobile network), the response it receives is the 504 Gateway Timeout (which doesn't have the allow origin header) so Network DevTools i think treated it as CORS.
Now the thing is, when I try to use the "Disable Caching" feature of devtools everything works fine (except that caching is disabled so it eats quite more). So I am not sure what would be the cause of the 504 timeouts and if possible find a solution for it.
I've also noticed that I can load the requested url on a different tab and then that specific resource would load fine on the main site I was visiting but doing this for every resource is pretty tedious and doesn't really fix the issue. I have also tried using a different android device with the same SIM but it still had the same results.
As a band-aid, I was thinking of disabling cache for the specific domains but I am still unsure of how I will do it.

A Wifi Hotspot with caching? That does not sound like a regular Android Hotspot. What device are you using? As traffic is today mostly HTTPS that would require an intercepting HTTPS proxy which is by definition not a good idea...

I was thinking the same but wifi hotspot caching is really doubtful. The devices I tried it on were Huawei and Sony phones.


text:
Unable to connect Pixel Phone to TP Link WiFi extender
Please bear with me because I have very limited technical knowledge.
I have successfully installed a TP Link WiFi range extender and my iPad connects to it fine. My Pixel phone detects the extender but will not connect to it. When I try to manually select the extender it gets as far as saying Authenticating but then just goes back to showing it is a saved network in my list.
What can I do, in really simple terms,to ensure my Pixel connects to the TP Link extender?
Many thanks for any help.

Does the range extender use the same Wifi name (SSID) and password as the main WiFi? Please edit your question and add the exact product name of the "TP Link WiFi range extender".

typo in password, try again


text:
I'm looking for a data recovery program for my android phone
I had a Samsung Galaxy J7 it was stolen I managed to get it back but not before it was wiped completely but they weren't able to get passed the frp lock and I had some very valuable data on some of witch is not replaceable my question is since nothing was saved over the old data and I've got access to developer settings is there a program for windows 10 that I can get to recvoer my data preferably a free program
I'd even be willing to try rooting it if I knew it would get my data back

sorry your data is lost forever, no way to recover encryption key from factory reset

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


text:
I have connected an OTG cable to my OnePlus device, but nothing happens. What to do?
This is a self-answer post written in response to a question where the user couldn't figure out why their well-functioning OTG device was not working on their OnePlus device.
So, I have a OnePlus device running stock OxygenOS. I decided to connect an accessory to my device through an OTG cable/adapter but I see that the device doesn't detect or shows any response when I insert it. My cable/adapter works in other devices, so I'm a bit clueless here.
How do I get my OTG cable/adapter working in my OnePlus device?

OnePlus' OxygenOS (the Android OS that came with your OnePlus device or got updated some time ago) keeps OTG setting disabled by-default. A user has to enable that setting before using their OTG device. The setting can be found in Settings app → System → OTG storage.
If you cannot find that setting there, search for "OTG" term in Settings app and the relevant setting should show up. Once enabled, plug in your OTG cable/adapter along with your accessory and it should work (provided Android supports it of course!)
Do note that the OTG storage setting would auto-disable after 10 minutes of OTG inactivity. So you would have to enable the setting again should you find yourself in need of using your OTG accessory.
To keep the setting enabled all the time, see my answer here (required a rooted OxygenOS).


text:
Nexus 5X Nethunter has no linux-headers for 3.10.73-Re4son-3.5
So, i rooted my Nexus 5X oreo 8.1, installed nethunter, all good so far. I bought an tp-link TL-WN722N v3(EU) and now i'm trying to make it work. I downloaded the drivers from tp-link website but i can't install them because when i use command 'make' it's say:
/lib/modules/3.10.73-Re4son-3.5/build: No such file or directory.
If i install linux-headers with:
apt-get install linux-headers-$(umane -r)
It's say: E:Unable to locate package
How can i install the Linux-headers  for rtl8188eu drivers?
Sorry for my bad english.

Check the output of uname -a then use the full name of the linux-headers-$VERSION.
You can get the available linux-headers through:
apt search linux-headers

Then intsall it:
sudo apt install linux-heasers-$VERSION

Afer I type sudo apt install linux-heasers-$VERSION it's say:
Package 'linux-headers' is not installed, so not removed.
My uname -a: Linux kali 3.10.73-Re4son-3.5 #1 SMP PREEMPT Fri Apr 10 12:20:30 AEST 2020 aarch64 GNU/Linux


text:
ADB and Galaxy A71 5G
I use ADB to reprogram the toggle for Airplane Mode such that turning on Airplane Mode does not turn off WiFi and Bluetooth. The command is:
adb settings put global airplane_mode_radios cell,nfc,wimax
I've used this on several different phones, including my Galaxy S20 with no issues. On my wife's A71 5G, it accepts the command, but only partially works. Following the command, if I turn on Airplane Mode, WiFi stays on (good), but Bluetooth turns off (bad). Turning Airplane mode off brings back Bluetooth and continues to leave WiFi on.
BTW, do phones still come with a Wimax radio?
Any idea?

Does this answer your question? How to switch(not only on or off) the mobile data and wifi using adb?


text:
At what level of the android architecture can I find a devices audio configuration files?
I would like to change the granulation of volume steps on an android 10 device. The limited mods on xda don't work on my device (lenovo m8 fhd) What level in the android architecture should I focus on when searching for a configuration file and what file types typically exist for this purpose?

Is it possible this setting would be device specific? I remember reading somewhere that there is only ever 75 volume steps possible on any device and these are usually devided by a factor of 5 giving 15 steps. This may have originally been defined in C code and compiled so its possible the file Im interested in is a binary file on my device, possibly an .so file making it very difficult to change unless translated to assembly (hopefully well commented)?
If this question is not for stackechange Ill remove after 5 downvotes. Can anyone suggest a forum that may help (not xda)?


text:
Does adb shell RUN_IN_BACKGROUND ignore really works?
I did
./adb shell cmd appops set com.whatsapp RUN_IN_BACKGROUND ignore
for lots of apps in my android. However, when I go into the app settings, I still can press "force stop". Does that mean the app is still running in the background, even if I setted it to ignore?
How can I see the apps running? adb shell ps shows too much thing and I don't know which ones are the apps.
Also, will these settings work after reboot?

RUN_IN_BACKGROUND definitely works. Android relies on this AppOp for its internal functionality (Restricted Apps in Battery Manager settings). But RUN_IN_BACKGROUND doesn't guarantee that the app won't have its native process running. App's background activity is stopped within Java stack by Android's ActivityManagerService. That's what cached state of an app is.

Force Stop button can be active even if app has no background activity going on and just its native process is alive: https://android.googlesource.com/platform/packages/apps/Settings/+/refs/tags/android-11.0.0_r1/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java#505. So an active Force Stop button doesn't indicate that RUN_IN_BACKGROUND is not working.

@IrfanLatif by native process do you mean native java or native C++? is it possible to stop the app from running its native process? I wanted for apps to not run at all unless I have them open

By native I mean native to operating system. Native Linux process, not native to a language. // It's not the app which runs its native process. Android's zygote forks apps' virtual machines, ActivityManager service allocates the app resources (by making use of Linux cgroups and other subsystems), controls their activity (through manifest permissions), and may keep them in cached or background state even when the apps are completely idle. Or may kill them if resources (RAM in particular) are needed. If you want to change this behavior you need to modify the Android framework.

@IrfanLatif how does apps start to run again after I force closed them, even if I didn't open them again?

Learn about services, broadcast receivers and alrams.


text:
Debugger to a non-debuggable Android app
I want to know can we attach a debugger to an app running on the smartphone which is published over Google Play Store without modifying the original app?
The reasons for asking this is by default the app which is there over Google playstore are non debuggable, i.e in the AndroidManifest.xml file, either they won't have android:debuggable flag or if it is, then it will be set to false

The debuggable flag from AndroidManifest.xml is saved in some central XML files on your device when you install the app. Therefore on a rooted device you can modify this XML file (not sure which file it was exactly, it is one central file for all apps) and change debuggable to true without changing something on the APK itself.

@Robert Thanks for your response. May I know the file name. I tried looking into the /data/system/packages.xml but over there there is no information w.r.t whether the app is debuggable or not.


text:
Sharing Apps between Accounts (due to user age)
Good Morning Everyone,
Before I ask the question about sharing apps between Android users, I wanted to quantify the use case. This is because I don't want to come across as trying to illegally distribute apps in any way.
We have a tablet in the house that was specifically purchased as my child has a learning development disability. That means I have purchased a lot of apps from the Play Store to find things that were to help this. In the past it was easy; they were not adept enough to work out how to buy things on tablets. Now she is older and wiser, as is their sibling. Both are still single digit in age.
So the tablet is a Samsung Galaxy Tab A6, running Android 8.1 - stock updates, no root, no modifications.
In the past, when multi-user first appeared, I was able to buy apps from my Play Store, and it would appear on her non-admin user. I understand that this is now not possible though, and certainly I have not been able to achieve this with anything I have downloaded in recent memory.
The problem is though that both children are still under 10, so can not have their own Play Store account to have a Family set up.
So is there anyway to get around this? preferably without rooting the tablet? I am quite happy to wipe their account from the tablet if that helps things.

Copying apk from admin to other users is doable, so is their installation. But I don't actually know how this "share" feature you  are talking about used to work. Did it involve sharing not just the app but also its data (that is, whatever you did in the app using admin account was visible to child user)? Another issue is licensing check.Two accounts one license may not work for some apps,depending upon what license  verification  parameters are used by an app.

I will be honest and say "I can't remember either." I am sure it was just in Settings when multi-user came in, with a list of apps you could expose to all users. Apparently Google has a Family management option for under 13s but it looks like I also have to share my payment method with them.


text:
Turn bluetooth on when screen off and volume key is pressed
I would like to be able to toggle bluetooth on when phone screen is off (locked) and I press the volume up button, ideally twice (two quick presses).
What options do I have to accomplish this on a rooted Android 7.1.2 phone? ROM is Ressurection Remix 5.8.5.
So far I tried Tasker with AutoInput plugin, but it only works when screen is on. Apparently AutoInput does not register keypresses when screen is off.
I also tried Xposed Additions, which does react to volume button when screen off, but I can not assign a Tasker action to it that enables the bluetooth. There are only a limited number of actions I can choose when screen is off.

In Xposed Additions, under "Add New Action", choose Shortcuts and than assign your Tasker shortcut there. See "Instructions to use Task shortcuts in Xposed Additions" heading in my answer here: https://android.stackexchange.com/a/118917/96277

Weird, I don't have the "Applications" section in the 'add new action' menu. I only have a "Custom actions" section with "disabled" and "torch" and a bunch more if I choose "screen on"


text:
Looking for LineageOS 17.1 download link for vivalto3gvn (Samsung Galaxy V/Ace NXT/Trend Neo)
According to stats.lineageos.org, the Samsung model codename vivalto3gn has OS versions of 13.0, 15.1 and 17.1. I did a little more searching, but I couldn't find download links for 15.1 and 17.1. The latest version I can find is 14.1 from this website. Do these versions really exist or are they caused by reporting errors?

Your device was never supported by LineageOS officially. The old 14.1 version seems to be an unofficial version which means that typically one developer who owns the phone implemented the necessary changes for making LineageOS work on your device, but if those changes were ever published is unknown.
Why there are no newer versions is unclear, may be the device hardware was too restricted (it has only 512MB RAM which is way too small for modern Android versions) or the developer who created the 14.1 version got a new device and lost interest in developing new versions for the old device.
In the end you have to take it as it is, there is one 14.1 version for your device but nothing newer.


text:
Failed installing Ubuntu using termux-ubuntu
I want to mine sugar on my Android phone.
Can someone help a simple complete script, especially to complete method 1 or 2, whichever works.
METHOD 1
Installed F-Droid and Termux
Commands
pkg install automake clang git vim
press y to continue

clone git https://github.com/decryp2kanon/sugarmaker

When it's done, I enter
$ cd sugarmaker/
-/sugarmaker $ ./autogen.sh

it says
bash:  no such file or directory

METHOD 2
These two methods I tried each of them on both phones.
On method 2, when I get here, it keeps saying error on Huawei Y Pro phone and Huawei P20 Lite.
pkg update
press y to continue

pkg upgrade
press y to continue

pkg install git

pkg install wget
press y to continue

pkg install proot
press y to continue

git clone http://github.com/Neo-oli/termux-ubuntu.get

The problem start here on P20 Lite
-$ cd termux-ubuntu
-/termux-ubuntu $ ./ubuntu.sh

It says decompressing Ubuntu image, but this does not look like a trz archive.
Making start Ubuntu executable. You can now launch Ubuntu with ./start-ubuntu.sh script.
And it shows code 404 like the link to the image is not working also.

The script you are using is a bit old, it is trying to install Ubuntu 19.04 (Disco Dingo) which is a non-LTS version. Therefore support for this version ended in January 2020 and the download image was removed which makes your installer script useless.

Here is the ubuntu.sh, you get an error because the disco image has been removed and the following URL doesn't download anything:
https://partner-images.canonical.com/core/disco/current/ubuntu-disco-core-cloudimg-${archurl}-root.tar.gz

Check the available images from this directory. Edit the ubuntu.sh by adding a valid URL. Here is an example using focal Codename. Replace the following line:
 wget "https://partner-images.canonical.com/core/disco/current/ubuntu-disco-core-cloudimg-${archurl}-root.tar.gz" -O $tarball

with:
wget "https://partner-images.canonical.com/core/focal/current/ubuntu-focal-core-cloudimg-armhf-root.tar.gz"  -O $tarball

or using the archurl variable:
wget "https://partner-images.canonical.com/core/focal/current/ubuntu-focal-core-cloudimg-${archurl}-root.tar.gz"  -O $tarball

Then run your script it should work as expected.


text:
Overcoming softlock when creating /system/xbin on Android 9
Hoo roo,
Installing Linux Deploy (Linux chroot with root) on Android 9 requires that you install a custom version of busybox. However, due to system-as-root limitations on Android 9, you can encounter problems when attempting to run the custom busybox installer. The community has found a solution to overcome this, but I can't seem to get it to work.
My tablet is a rooted Onyx Boox Max 3 that has TWRP installed without a custom ROM, with dm-verity disabled.
Running ls -l `which su`  from a terminal emulator returns  lrwxrwxrwx 1 root root 8 1970-02-11 19:10 /sbin/su -> ./magisk so confirms that I am using the root busybox.
mkdir /system/xbinafter mounting /system as per instructions softlocks the tablet. Have also tried running mount -o rw,remount /sbin/magisk/mirror/system_root which also softlocks.
Are there any other options that I can try? Would really love a chroot of Arch on my eink tablet instead of just a proot. Would make for a much smoother experience.
Cannot emphasise how desperate I am, my failsafe is a proot using nix-on-droid, but reckon that performance will suffer. Does anyone have any ideas?

actually all you need is place 3 files, no need to install anything
/data/adb/modules/busybox-ndk/module.prop
id=busybox-ndk
name=Busybox for Android NDK
version=1.31.1
versionCode=13115
author=osm0sis @ xda-developers
description=Static busybox binary for all Android architectures built with the NDK
support=https://forum.xda-developers.com/showthread.php?t=2239421

/data/adb/modules/busybox-ndk/service.sh
#!/system/bin/sh
/system/xbin/busybox --install -s /system/xbin

/data/adb/modules/busybox-ndk/system/xbin/busybox

Am a little confused on what to do here. Have confirmed that the module.prop file exists already (installed from the magisk installer), and have created the service.sh file.
Attempting to run the service.sh file returns the following error /system/xbin/busybox: not found
Am not sure about the significance of the last directory either. Any clarification would be greatly appreciated :)

Hoo roo again, have recorded a voice message to properly convey what I've attempted. Cheers mate :) https://voca.ro/179SxVR5uKP4

you can download modules straight from magisk manager, no need to place files manually. this is just bare minimum example what's inside module and how to bind mount overlay files in /system/xbin without modifying /system. you probably lacking the third file which is the desired binary itself


text:
Upgrading Redmi 5 3gb 32 gb motherboard to a 4 gb 64 gb motherboard
I have Redmi 5 3 gb and 32 gb rom which is in good condition.
Now, I want to upgrade the memory specs to 4 gb and 64 gb without changing the phone.
Is it possible to remove the old motherboard and replaced with a new Redmi 5 4 gb 64 gb rom motherboard???
Please kindly help me with upgrading my memory specs instead of buying a brand new phone.

A smartphone is not like a PC where you can replace components. Additionally a smartphone mainboard contains everything soldered on it, which means that CPU, RAM, Flash-memory, sensors, and next to everything may be except from external components like display and camera module is an integral part of the mainboard.
Note that even if displays have the same size and all other technical details this does not mean that they are compatible.
So in the what you want has a very small chance that it is possible. Replacing the mainboard has only disadvantages (no warranty, high chance to destroy something,...).
So in the end it is better to buy a working new/used phone, otherwise most likely every money you spend on replacing the mainboard are lost and better spent on a new phone.


text:
How to disable battery saving when battery level is below 15%?
I used an old tablet to operate a smart home. In order to work continuously, I took the battery out of it and connected it to a 4V power source, which works continuously. Based on the measured battery resistance between GND and BSI, I soldered a 10k resistor. After this treatment, the tablet works properly, only despite the constant voltage level, the battery level drops after a few hours to 1%. I would not have a problem with it if the battery saving function did not limit the capabilities of the device. Is there any way to turn it off? The tablet has root access.

Any particular reason why you could not go ahead with keeping the device connected to a charger all the time? Device is old, so battery degradation due to constant charging should not have been an issue. Anyhow, which Android device is it? Do you have root access? What battery saving functions are you talking about? I don't think proper battery saver (the way it exists in newer Androids) existed back in Android 4.

If you leave the device connected to a charger with a li-ion battery, the battery will overcharge over time and begin to swell. Due to the fact that this device is supposed to work continuously all year round when hanging on the wall, I took the battery out of it for safety. In addition, I led out the wires on the back of the housing, so the usb socket is empty and no visible plugs or wires stick out. The device is a Samsung Galaxy Note 10.1 and has root access. Features that reduce battery consumption include, for example, the inability to adjust the backlight or slowing the processor clock.

Ah, yes. Safety issue is a big one. Thanks for clarifying that.

You may be able to mock the battery level to 100% by using ADB by the following command:
adb shell dumpsys battery set level 100

The battery level should then stay at 100%.


text:
Sniff Android protected app HTTPS requests
I am going to capture an app's HTTPS request to get its Login API.
I am using Fiddler. When inputting the username and password and pressing sign in, the app is working. But in Fiddler, I can not find the HTTPS request for login.
I tried with Charles Proxy too, the same problem
Also, I did with some more apps, but getting the same problem in some apps.
How to solve it?

Most likely it is not HTTP but HTTPS traffic. Intercepting HTTPS traffic using a proxy like Fiddler or Charles does no longer work on Android since Android 7 unless you modify the app or have a rooted device.

@Robert i have rotted device , what to do ? any resource ?

Then you can manually install the Fiddler/Charles root CA certificate as shown here: https://android.stackexchange.com/a/232051/2241 (se second part of the answer). When using Fiddler before installing te root CA cert make sure that you have installed the addon "CertMaker for iOS and Android" (BCertMaker shown on HTTPS options page).

@Robert done. i can get access to https://valid-isrgrootx1.letsencrypt.org/ , without error .
also . app working without error . i can do login in app  . but not showing htpp/s request in fiddler .
If the problem was a certificate. So the program should not have worked for me. But this is not the case

Then the app is using certificate pinning. If it is a "standard SSL/TLS pinning mechanism" you may be able to defeat it by using Frida+Objection or (ed)Xposed+TrustMeAlready plugin.

i did bro . certificate bypassed , someone told me app using native lib , that is why i cant capture , right ?


text:
Phone stuck in fastboot mode
I've rooted my OnePlus 6 yesterday. To do so, I followed this guide:
Root Your OnePlus 6 with Magisk — A Beginner's Guide
TWRP version: 3.5.1_9-0
Magisk version: 22.0

I also installed the Magisk app on my phone
Now  I've edited my hosts-file (needed to change some permissions to be able to modify this file
) to block some sites. I've restarted the phone once successfully, but now the phone will not boot anymore. When I power on, I see the OnePlus logo very briefly and then it gets stuck on the "bootloader is unlocked" warning for a long time. It then goes on into fastboot mode. If i press start from there, the process repeats. If I press recovery mode I still get into TWRP, but rebooting from there also repeats the process and does not boot up my phone successfully.
I'm not sure, but I don't think editing the hosts file is what caused this? Shouldn't I be able to edit this file without bricking my device?
Any help on what happened and how I can fix this bootloop without wiping/reinstalling my entire device would be greatly appreciated; I don't want to lose all my settings =).

The problem was that I edited the system hosts file. This causes the system to be unable to boot; the reason is dm-verity which denies boot (chain of trust) when any modified system file is detected.
To fix the issue, I followed https://www.droidwin.com/restore-oneplus-6-stock-via-fastboot-commands/
Basically, it explains how to download the stock ROM, extract the .bin file into multiple .img files, and how to flash them subsequently.
Since only the boot and system partitions were modified, and I did not want to lose my data, I flashed them using
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash system_a system.img
fastboot flash system_b system.img

This fixed the issue =).


text:
What makes the android boot sequence different from Windows boot sequence?
I've just studied the Windows boot process (theoretically) and now I want to compare the Android's boot sequence with the Windows boot sequence. One point I've found is that in Windows there is BIOS and in android there is BOOT ROM that does the same task. Can you please help me to get more differences? Also which is more secure in terms of boot process and why?

See Android device load process and How to boot Ubuntu persistent live USB on Android? and Why Android devices are more brickable than PCs? and BOOT PROCESS: ANDROID vs. LINUX. All answers cover Android vs. PC (Linux or Windows) scenario.

On Windows BIOS/UEFI is a standardized technology. On Android the lower boot process is not standardized at all.

Robert, I think you did not understand my question. Actually, I'm searching for the difference between Android's boot sequence and Window's boot sequence. Also, I'm concerned about the security that which has a more secure boot sequence?


text:
Force black navigation bar
The navigation bar at the bottom of my screen adapts with the app I'm using at any given time. This would be nice if it actually worked, but for some apps even while using dark theme the bar would turn into a bright white, which just looks distracting. I'd prefer to have it be all black at any given time, but I couldn't find any system settings for it. Is there a way to accomplish this using ADB or something?
I've got a Huawei Mate 20 X with EMUI 11.
Also here's an example screenshot of an otherwise dark app having a white navigation bar:


text:
Should there always be a '/system/default.prop' in android 10?
I can't remember if there was a /system/default.prop file or wether its missing. Should there always be one, because I only have 'build.prop in system folder?

default.prop (or prop.default) is for initramfs so it should be (or symlink) whereever init is / in boot or system_root

I found prop.default in /system/etc folder (same folder contains init folder) and I can say the contents look like I remember. Should I copy this to /system folder or just apply the mod to this one?

As it symlinked as suggested you can change either and effects are the same. although when it comes to permissions I changed the original file (/system/etc folder)


text:
Does the latest Android release is secure against the ADB vulnerabiliy?
I have two smartphones running Android 10 and 8, The ADB is enabled for many proposes. Generally some vendors have been shipping products with Android Debug Bridge enabled. But it seems that enabling ADB have many security risks according to DoublePpulsar blog: Root Bridge — how thousands of internet connected Android devices now have no security, and are being exploited by criminals.

This is highly problematic as it allows anybody — without any password — to remotely access these devices as ‘root’* — the administrator mode — and then silently install software and execute malicious functions.

Does the latest Android releases are secure against the ADB vulnerability?

" without any password"? RSA key authentication was added to Android 4.2, 8+ years back: https://android.stackexchange.com/a/219320/218526

The log article mixes up ADB with ADB over IP. For both the RSA authentication is required if you use a Google Android certified phone. What dumb chinese manufacturers do by enabling both ADB modes by default and disable RSA authentication is their problem. Just don't buy those cheap China phones.

Sorry but it seems Kevin Beaumont from Microsoft has no clue what he is talking about. Mythbusters would proof him wrong..

It is completely unauthenticated, meaning anybody can connect to a device

That is simply not true. Even on rooted android TV boxes (where the adb miner supposed to run) one still must have access to home network (which is not possible through NAT/Firewall)
Furthermore it requires at least one initial authorization of the RSA-Key from the host which is trying to connect - user must explicitly confirm this on tv screen with remote control (android tv box)
the analysis is based on open port scan where ~ 5000 devices in asia found open port 5555. But just open port means nothing. At least, according Hui Wang these adb miner did not succeed at all

Till now, zero coins have been paid, as can be seen in below


text:
Is it possible to record MJPEG directly on Android?
Is it possible to record video from an android camera directly as MJPEG? I am interested in MJPEG for quality purposes. I don't want to record video via default android settings and then convert to MJPEG, but directly from the camera device as MJPEG. Is this possible? I can't find any information suggesting this is possible.

It's camera app developer's choice, not Android's. You can build a camera app of your own and apply whatever formatting you want while converting raw stream to a video file.

@IrfanLatif thanks. Can you provide any examples or tutorials on how to convert the raw stream to a video file? I've already tried initiating the camera with ffmpeg and changing parameters to MJPEG, but the quality of the recorded video makes me think it was recorded and compressed on the device and then my command then converted the already compressed version. How do I get direct access to the raw stream?

That's a more development related question: https://stackoverflow.com/a/45577505/9165920, off-topic here. Official documentation would be a good starting point: https://developer.android.com/guide/topics/media/camera.