text:
When is the Final vbmeta Image Generated in a Signed Build?
BACKGROUND
I am attempting to generate my own signed builds of LineageOS 18.1 and am having trouble with the final signed OTA.  Specifically, the vendor partition is failing during AVB verification which causes a boot loop.
To perform my build, I am following the official Lineage build instructions as well as a number of external guides.  The general outline is as follows:

Build Android via mka target-files-package otatools.  Interestingly, after this step, I have a valid vbmeta at $OUT/obj/PACKAGING/target_files_intermediates/lineage_fajita-target_files-eng.*/IMAGES/vbmeta.img which has the correct hashes for both the vendor and system images found in the same directory.
./build/tools/releasetools/sign_target_files_apks -o -d $CERTDIR -p "$ANDROID_HOST_OUT" --prebuilts_path $TOPDIR/images/fajita $OUT/obj/PACKAGING/target_files_intermediates/*-target_files-*.zip signed-target_files.zip .
./build/tools/releasetools/ota_from_target_files -p "$ANDROID_HOST_OUT" -k $CERTDIR/releasekey --block signed-target_files.zip lineage-18.1-$(date "+%Y%m%d")-UNOFFICIAL-fajita-signed.zip.
Profit.

I admit, step 2 confuses me somewhat.  I get that each of the APKs is extracted and signed; that part it easy.  What I do not understand is what happens to the files after they have been signed.  If I extract signed-target_files.zip I have both a full system image at IMAGES/system.img as well as what appears to be a full system rootfs as individual files at SYSTEM/*.  Which is the "correct" system payload?  I notice there is no equivalent VENDOR/* directory; shouldn't one have been created in a similar fashion to the system files?
After step 2, I see that the vbmeta image in the extracted signed-target_files.zip is different.  Obviously, the hash for the system image has to be regenerated as the image contents have changed and, presumably, the same would have to happen for vendor and/or any other partition which has its contents updated.
Unfortunately, this is where things seem to go off the rails.  Again with the extracted signed-target_files.zip:

IMAGES/vbmeta.img has the correct SHA for IMAGES/system.img, with a different value from what is found under $OUT.
IMAGES/vbmeta.img has an incorrect SHA for IMAGES/vendor.img.  This value is also different from what is in $OUT.
IMAGES/vbmeta.img has correct SHAs for boot.img and dtbo.img which, as far as I can tell, are unmodified from the original build.

QUESTIONS

When signing an Android build, which files are used to generate the updated vbmeta image?
How do these relate to the contents of signed-target_files.zip?
Is there any good documentation on the part of the build process?  I have found a bunch of stuff on how APKs are signed or how AVB verification works but, unfortunately, startlingly little on the mechanics of signed image generation itself.

maybe related How to properly ENABLE dm-verity and FEC for /system on Motorola X4 with LineageOS 17.1?

Related, but different.  The above question covers how to enable and verify dm-verity across the entire build and boot process.  My question is specifically targeted at the vbmeta regeneration as part of build signing, which isn't discussed in detail in that question.


text:
SD Card suddenly not recognized?
Xiaomis Redmi 8 stopped recognizing a 128gb SD card by SanDisk a few months after first usage.
The card is not broken, neither is the phones slot.
The card works fine in my Samsung M20 and other cards work for the phone.
I guess the file system is the reason, but the phone couldn't format it in a way it is recognizeable again.
How do I know what file system the SD is using and which the phone needs?
And what else could be the problem?
Have a nice day

can you see it 'adb shell sm list-volumes public' or 'adb shell grep media_rw /proc/mounts' is mounted?

source: Stack Exchange

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

sort: votes


text:
USB OTG only working on charging mode
I have an android tablet that came with OTG support and adb binary already installed, I would like to connect my phone to use adb but when I connect it only charges the phone and adb does not show my device connected, the default usb setting of my phone is MTP, my tablet seems not have a setting to change the usb mode.

Have you activated USB debugging on the tablet?

yes I did on both

Did You try https://play.google.com/store/apps/details?id=com.htetznaing.adbotg

Yes and not worked, neither Bugjaeguer. I'm not sure but I think its about a property called ro.sys.usb.charging.only that is set true, idk what this property is for, if you know let me know, anyway I'll try later set ro.sys.usb.charging.only=false and see whats happen

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


text:
Can one add a virtual background with Cisco Webex and Google Duo with a Samsung Galaxy S21?
I read on https://www.sammobile.com/news/galaxy-s21-custom-backgrounds-video-calls-duo-teams-webex-zoom/:

Galaxy S21 smartphones offer custom backgrounds during video calls via Cisco Webex, Google Duo, Microsoft Teams, and Zoom.

This is currently incorrect as the S21s, or at least most of them, do not support custom backgrounds during video calls Microsoft Teams. As for Zoom, the quote is misleading because Zoom has being providing custom background support since at least the Samsung Galaxy S9 and Android 10.
Can one add a virtual background with Cisco Webex and Google Duo with a Samsung Galaxy S21?
If it depends on the S21 version, then my main interest is the Samsung Galaxy S21 Ultra (US version).

I don't know how much you have known about it, but I think this is an exclusive Samsung feature accessible from system Settings, not from each individual app.

@AndrewT. Thanks, the feature doesn't seem to work anymore for Microsoft Teams, so I wonder if it also doesn't work for the other videoconference apps it used to support.


text:
Magisk 25+ on a custom ROM: ramdisk + vbmeta, but no boot.img
According to the release notes in Magisk v25 there was significant rewrite. The installation instructions advocated now say flashing Magisk in recovery is

This installation method is deprecated and is maintained with minimum effort. YOU HAVE BEEN WARNED!

Instead they're pushing a new "Patching Image" method.
My device has a vbmeta and a ramdisk, but I don't understand what they mean with boot.img. What is that?
I'm flashing LineageOS with Micro G, which has

lineage-18.1-20220703-microG-instantnoodlep.zip

There is no boot.img there, and even in the zip there is no .img. So how do you get the patched method working with a custom ROM that isn't an .img? All the instructions say is

If your device has boot ramdisk, get a copy of the boot.img.

But it doesn't say where to get the boot.img?

Related

Here is what I did that worked.

Install TWRP

Download payload-dumper-go

Run go build

For your lineage or lineage-microG distribution which is a .zip, run unzip MyDownloadedImage.zip

Inside you'll have your payload.bin, you need to run
./payload-dumper-go ./payload.bin

This will output a directory like extracted_20220713_181918/ inside which you'll have your magisk_patched-<number>_<hash>.img

After that you must use TWRP to flash the patched image.

Push this file over to your phone with
adb push ./boot.img /sdcard

Run with Magisk and patch that boot.img, this will create a new patched file under Download as magisk_patched. IT DOES NOT REPLACE THE boot.img.

Reboot into TWRP.

Click Install (top left)
Click Install Image (bottom right)
Browse to Download (should be /sdcard/Download)
Select the magisk_patched-<number>_<hash>.img
Select Boot
Swipe to confirm

Not using TWRP?
If you're not using TWRP, you can manually flash boot, by

Pulling the image down from your phone,
adb pull /sdcard/Download/*.img

Flashing with fastboot, like
fastboot flash boot /sdcard/Download/magisk_patched.img

Even if you don't have TWRP, it can be done as explained here How do you root a device with Magisk when it doesn't have a custom recovery


text:
Compiling Android Bootloader Little Kernel
I have successfully compiled Android bootloader from git://codeaurora.org/kernel/lk.git
It produces a lk.bin file which I assume is the code for the bootloader.
How do I pack that file into a bootloader.img file for fastboot flashing?

what other tools can I use other than fastboot?

It's a Qualcomm chipset.

QPST, MiFlash, MSMDownloadTool or similar tool for EDL mode

Thanks. I tried all those tools and after reading articles about Qualcomm secure boot, I don't think it's possible to write  your own bootloader once the oem enables it.


text:
Booting twrp.img with fastboot doesn't work "FAILED (remote: unknown command)
I am trying to boot twrp.img on my LG G6 ThinQ using adb and fastboot. I reboot into fastboot mode and do:
fastboot boot ../users/******/downloads/twrp.img
and then it says
downloading 'boot.img'...
OKAY [  0.500s]
booting...
FAILED (remote: unknown command)
finished. total time: 0.524s

My phone doesn't have root or bootloader unlocked and platform-tools is version r26
Note: fastboot -c "lge.kcal=0|0|0|x" boot ../users/******/downloads/twrp.img also doesn't work

Pretty sure you need the bootloader unlocked for this to work.

@acejavelin when I try to unlock it with fastboot OEM unlock it says failed (remote: unknown command) and lg doesn't have bootloader "unlock.bin" generator.

@WorldOfFun Boot into the device and enable oem unlock and usb debugging from dev settings. If you can't boot into the OS, try flashing the stock ROM. If you can't, then you are screwed.

@acejavelin I already did that on the phone. Guess I can't get twrp or custom os ¯_(ツ)_/¯

I ran into the same issue. Turned out I was actually in fastbootd mode. Once you reboot into fastboot (without the "d" at the end) the problem is solved.


text:
Silent notifications except for one app
I have a Samsung Galaxy s9+ device and I was wondering if it is possible to use the silent mode and still receive sound notifications from one app only?
I want to hear whenever I receive a Telegram message and have all the other notifications for other apps only appearing in the notifications bar, but without any sound.

Enable DND and add Telegram to exception list.

I don't find any application exception in the DND mode. I only see exceptions for calls and messages. Also, if assuming it would work, wouldn't that stop the notifications for the rest of the apps for good? I only needed the sound stopped.


text:
Why is my phone WiFi keep disconnecting and reconnecting when playing games?
The device I used is Realme C2 and there's no problem about my WiFi except my games. If I open the apps that uses more bandwidth it never disconnected, while if I use games like Minecraft Bedrock then I connected to a Minecraft server which have 30ms ping then it starts to disconnecting and reconnecting every 5 - 10 minutes. And now my gaming experience is impacted.
And again, I use other apps and the WiFi is fine and not disconnecting. My distance from router is 3 meters and I have full WiFi signal.
I forget all networks, clear cache, restarted my phone but still okay EXCEPT ONE which is games keep disconnecting and reconnecting.
I have another phone and connect to same network it fine even in games but in my phone Realme C2 is a problem when I play games.
Video:
https://youtu.be/854mOZhAAHQ

Do you use your phone often in landscape mode? May be Wifi disconnects because your hands are shielding the Wifi signal (the water in the human body can weaken the signal, especially if you hold your hands close to the antenna).

Or did the phone get hot? The temperature may also affect hardware performance, including the WiFi chip.


text:
What will happen if I tried to boot into twrp recovery without flashing it (not made for my device)
As their is no twrp recovery for my device (vivo 1802 mtk device)
I was thinking of booting into twrp recovery not made for my device specifically Without flashing it.
To get the job done maybe some backups or flashing using twrp.
But I don’t know what will be the consequences of it……
If anyone got idea or hands on experience on it, I would like to know

The core of the recovery as well as the main ROM is the Android kernel. If you try to boot a kernel not specifically built for your device, it won't boot at all in most cases due to missing device tree and other reasons.


text:
Samsung a32 5g - Does having an app running in the foreground vs when you tab out of it when the screen is turned off take more battery/data?
In case you are confused on what I'm asking, let's say I open Pokemon go and have it running in the foreground, then turn my screen off. Will this take up more battery and data than if I tabbed out of the app, had it in the background, and then turned my screen off?

To my knowledge if the screen is turned off for Android this is like the app is going into background.

Sounds good, you mean while the app was still running right?

Yes. You can test this on your own. Use an app that records your GPS position and give the app the permission to access GPS only in foreground. To my experience GPS recording will stop if the app is in fore-ground and you switch off display.

I think that's true, when my screen is off the game does not follow location and lags behind until it catches up to me. Thanks! I do believe this will save data in that case correct?


text:
Turn off bluetooth on bedtime
Is there a native way to turn the bluetooth off every day between certain hours?
I now use ITTT, but couldn't find a native way.

As a Pixel 3a user, I don't think AOSP/Pixel's stock ROM provides this feature natively. I believe automation apps are still needed to be used.


text:
Android 11 - If you turn off your screen with an app open that uses data, will any data/battery used be considered background?
Let's say I open Pokemon go and was using mobile data to play it and kept the app open but turned off my screen.
For the next few hours, I know battery and data usage will be significantly reduced, but during this time will any battery and data used be only considered "background usage?"
It's impossible for an app to use "foreground data and battery" if the screen is turned off?

To my knowledge all apps are considered to be in background when screen is off no matter which app was on top when you switched off screen.

Sounds good, thanks! To make sure this is clear you're saying if you check foreground and background data usage, any data used while the screen is off when any app on top of the screen was opened, usage would ONLY show up in "background?"


text:
Unable to install Kik on android
I'm trying to install the kik app from the google play store. I click on the install button and it flashes "pending" but then immediately shows the install button again. I cannot install the app because it won't go beyond this. It just keeps showing the install button. I'm using an Samsung S8+ with android version 9. How do I fix? Thank you.

See this https://support.google.com/googleplay/answer/7513003


text:
Samsung MTP Requires "Allow" access to files every time when connecting to Mac
I have a Samsung M51 device running Android 12 and a MacBook Air M1 running macOS Monterey. I have installed Android File Transfer App and tried to transfer files between the devices. The issue is that The application requires permission to access the files every single time I connect the phone to the mac.
I hope this is a problem with SAMSUNG devices since programs like OpenMTP instructs you to select allow every time you connect the device.
I was wondering if there is a way to make the Samsung device remember the computer it was connected to.
I have already tried clearing data and cache of USBSettings MTPapps and force stopping them in my Samsung Device.
Thanks in Advance.

AFAIK the MTP protocol has no (reliable) way to identify the host you are connected to. So the only way is to ask every time or to automatically allow access. Only the adb protocol (can be enabled in Developer options) has the option to identify a computer and thus allow to trust for some months (or optionally permanently). But ADB requires different programs on host side.

Thanks @Robert for the reply. Even though I understand what you are saying. I found out that only latest devices (Android 11,12 ) of Samsung are facing this issue. It should be noted that I didn't have the opportunity to test latest devices of other manufacturers. I had the opportunity to test older devices of Samsung (Android 9) and Others and haven't got this issue. It connects to computer directly after the first time. If you don't mind, Why is that?

I have the same issue and it would be great if there is a solution to that.... can't manage files for quite a while...


text:
Google maps changing a route given by a link
I created the directions using https://www.google.com/maps my PC. The directions are not the shortest route. I've sent the link via Facebook Messenger:
https://l.messenger.com/l.php?u=https%3A%2F%2Fwww.google.com%2Fmaps%2Fdir%2FKooskia%2C%2BIdaho%2BCounty%2C%2BID%2FFog%2BMountain%2C%2BID%2B83539%2F%4046.0870642%2C-115.6040729%2C12z%2Fdata%3D!4m19!4m18!1m10!1m1!1s0x54a099a8e938ec4b%3A0x1a26a25f8e52a6b2!2m2!1d-115.9779189!2d46.1448942!3m4!1m2!1d-115.676752!2d46.102913!3s0x54a09fc76bce9d25%3A0x54e8e74decd35d79!1m5!1m1!1s0x535f46b661626efb%3A0xddb17339bfa227d!2m2!1d-115.236512!2d46.0932474!3e0&h=AT3h0DE3UQ4wWecBOlI0Mr6-t_ry6N3SZ02I9_vrNtno2dbHaDM8y26hkRtpq_gqHflsPsrZYk1ENemba7z-JkFdZanus04llDAzzlduyOsBSDNS7viQ5N8NaT_Tng
When I open it on Android 11 phone the last part of this URL is trimmed:
&h=AT3h0DE3UQ4wWecBOlI0Mr6-t_ry6N3SZ02I9_vrNtno2dbHaDM8y26hkRtpq_gqHflsPsrZYk1ENemba7z-JkFdZanus04llDAzzlduyOsBSDNS7viQ5N8NaT_Tng
and Maps app displays a different route. When I try the trimmed or a full length link on my PC in Chrome the original route is displayed correctly. How to make Android display the original route?

I just tried opening the link on Chrome PC and looks like it's Facebook who trimmed the link. Also, I got 2 different results on Chrome PC; 1) the trimmed Facebook link goes to Fog Mountain, Idaho 83539, United States by car, 2) the original URL goes to NF-319, Idaho 83539, USA with recommended travel mode.

@AndrewT. I had the same results with both links on my PC. To fix the problem on Android, I chose a named waypoint instead of dragging the route with a mouse: https://www.google.com/maps/dir/Kooskia,+Idaho+County,+ID/NF-286,+Idaho+83539/Big+Fog+Saddle,+Idaho


text:
Developer options suddenly disappeared
At the same time, the developer options suddenly disappeared on all the android devices that I used to test. I didn't do a reset or anything. Not even turning off all these devices. Why did it happen? am i hacked? maybe there are people who want to prevent me from completing the application that I made by making me confused because suddenly logcat can't connect, ON ALL ANDROID DEVICES I USE..

Please mention the device models and Android versions, and if the devices are managed by the company or not. Otherwise, we can't really help.

i use xiaomi 9a(android 10) and vivo v3(android lolipop). This two device lost developer option in setting at the same time. I do that click click thing on this two device to get that "you're a developer now" text and it show up again. I'm not shutting down this two device since the last test before i lost the developer option. It weird right?

Go to Settings->~About this device~->(scroll down)Build number.
Click on it.
If it says: nothing,
try clicking on it seven times, to become developer again.
If it says: “you are already developer”,
this means the developer options should be enabled, try to find them via the settings search function.\
I do only know very little about hacking, but it seams very unlikely that someone disables developer options during an attack.
Maybe your app trigger something, or your rom does not allow you to install self build apps.(sometimes devices, which where given to you by schools have such options disabled)

yeah.. its weird. i just use logcat as usual and then i cant connect because developer option disabled. I activate it again by doing that click click thing till i got “you are already developer”. i use vivo v3(android lolipop) and xiaomi 9a(android 10), two different phone from different brand and different operation system. Is that even possible to disable developer option after you unlock it?


text:
What is a vbmeta partition?
One of the optional steps of the Magisk installation steps says,

(Optional) If your device has a separate vbmeta partition, you can patch the vbmeta partition with command:
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img

What is the vbmeta partition it's referring to there? I didn't do that step. What may occur from that?

It is for verified boot. A lot of details are described here: https://android.googlesource.com/platform/external/avb/+/master/README.md#The-VBMeta-struct It also contains information about what is stored in vbmeta partition.

Bootloop :( // not necessarily, but on some devices, like Samsung and more that's why it is recommended as "optional", if you have that partition

@Robert Thanks a lot for the link. Bless you! It would be nice a summarized but complete answer for newbies. :) I am learning myself about ROMs and, believe me, the information is so fragmented and written in expert jargon that I am just craving for clarity and didactic contributions. :_(


text:
How to build a script to stop infinite scrolling in any app
How can I build a code/script to stop infinite scrolling (or scrolling at all) in any app I want to, like YouTube Shorts, IG Reels and Tiktok. Script should not break any app from running at all and other functions should work.
Rooting is permissible.
I think there would be a need to change some code near to Android base.

"Infinite scrolling" is as far as I know not a base feature of Android, so I don't think you will find code for that in Android. Infinite scrolling is basically loading data from a server and adding new UI elements at run-time when the user scrolls down to a point where the end of the current list is near. This can be implemented in any programming language (Java/Kotlin, Xamarin, ReactNative, HTML in WebView) and in different ways. I the end I would expect that you have to implement an app-specific "fix" for every app you want to stop.

@Robert So in my phone, I can't do anything about infinite scrolling on third party apps? (Which keeps wasting the time)

You can uninstall such apps and search for alternatives.

I guess there are apps that can do time management and prevent the app from opening/running, if it might help instead.


text:
Can the Google Ads identify my phone for ads in apps?
A lot of free apps rely on advertisement. Even the OS in a lot of mobiles show ads in built-in utility applications.
Does the Google Ads framework has a capability to identify an Android user for the ad shown in the following scenarios?

Ad shown in an app where Google log in credentials have been used.
Ad shown in an app where Google log in credentials haven't been used, but the app's data and cache is intact.
Ad shown in an app where Google log in credentials haven't been used and the app's data and cache have been cleared.

Definitely yes for the first case (see "Types of data & collection purposes covered in the Data safety section") and by extension in other two cases (less Google credentials because user hasn't signed - in)


text:
How to forget a WiFi network that is previously connected to via QR code?
My main phone is Pocophone F1 (Android 10, MIUI 12.0.3)
I connected my phone to home WiFi network via QR code, like this:

It works. And when I click it to show its detail

There's no the usual "forget/remove this network" button.
On WiFI -> Additional Settings -> Managed saved networks -> the home wifi network isn't listed there.
How should I remove it, then?

I had the same issue on my Google Pixel 7.
For me it worked to uninstall the app that I had used to connect to the network, which in my case was a QR reader app.


text:
how to transfer app data from old phone to new one?
There seems to be a lot of questions regarding this topic, but what I want to know is, how do I transfer the data from all of my apps (not just one or two specific ones) from my old phone to my new one? I transferred the apps using Samsung Smart Switch, but all it did was transfer the apps, not the data, so much of my game history and information in other apps is not on the new phone. This also includes my various ringtone and notification settings; they're all set to the default setting instead of what I had on my old phone. (The one exception that I noticed was ColorNote, where all of my note files were copied over. And, there are others like Viber, Facebook and Messenger, which have their own means to get everything across. But most of them, including pretty much all of my games didn't have anything transferred except the apps themselves.)
How do I get all of the app data and settings from the old phone to the new one? Is there a utility available that will automate this? (Note: I'm going from a Samsung Galaxy A50 to an A53.)

Most apps do not allow backup, I assume this is the reason Samsung Smart Switch failed for so many apps. The way Google recommends is via online GDrive backup https://support.google.com/android/answer/6193424

@Robert if an app does not allow backup, how should GDrive backup be a solution? That app should not be included there then either.


text:
How supercookies works in Android?
I would like to know if there is a cookie pool where several companies can query within Android so that it can store supercookie.
Or if it is site specific.
The foundation of this question was an event that occurred when I was talking about citizenship on Whatsup and, out of nowhere, suggestions for advertisements on Twitter about citizenship appeared.
I question how Twitter manages to capture the content of a conversation on Whatsup if they are not the same companies.
Note: I use twitter via the progressive web-app and not the app.

Ads are in 99% not loaded by code from the company that provides the app. Instead they use ad frameworks by Google, Facebook, ... SO it doesn't matter from which company an app is, more important is what ad frameworks the use.  For detecting ad frameworks and trackers in apps see https://exodus-privacy.eu.org/en/


text:
Backup and restore app data via adb
I have a app installed on my old phone with a lot of settings and data that I want to transfer to my new phone. So I tried using adb backup:
$ sudo adb backup -f org.secuso.privacyfriendlynotes.ab -apk
org.secuso.privacyfriendlynotes
WARNING: adb backup is deprecated and may be removed in a future release
Now unlock your device and confirm the backup operation...

Which worked fine:
$ ls -la
...
-rw-r-----.  1 root   root   5057212 Jul 16 10:59 org.secuso.privacyfriendlynotes.ab

But then to import the data on my new phone, I tried using adb restore:
sudo adb restore org.secuso.privacyfriendlynotes.ab
WARNING: adb restore is deprecated and may be removed in a future release
Now unlock your device and confirm the restore operation.

I unlocked and confirmed and the phone said "Restore starting..." and then "Restore ended", so everything seem fine. But the data was not restored.
Comparing /data/data/org.secuso.privacyfriendlynotes on both phones clearly shows that my data wasn't restored at all.
I realize that abd backup and adb restore are deprecated. What are the alternatives now? (I don't want to use Titanium Backup etc. I only use open source software.)
Is there an official alternative way to do this?

If you would remove -apk from command-line you can directly see on the file size of the created .ab file if the backup was successful. If the backup failed the file size will just be a few bytes.

adb backup and restore of Secuso PF Notes works without problems on my devices. Just saved an image and restored it to a different device.

It was around 5MB in size which seems fairly accurate. My old device was an Android 9 device and the new one runs Android 11. I suspect that it stopped working on Android 11. But I dont know. Which version of Android were you using?

I was using Android 11 and 12, both Google Pixel devices. Don't forget that the backup also includes the APK files with is about 3.7MB of size (at least the version I found on apkpure).

Maybe a backup created on Android 9 can't be restored on Android 11.

https://github.com/BaltiApps/Migrate-OSS

Could be that ugly bug introduced around Android 7. If it's that, the work-around is easy: pull the APK separately (or extract it from the backup), and then precede the adb restore with an adb install. Restore should then succeed if the app was already installed before. My little tool Adebar has some scripts for those tasks in its tools/ directory.

The only workaround I could think of was a combination of adb pull, adb push, restorecon and chown:
APP_ID="org.secuso.privacyfriendlynotes"

# Backup (RUN WITH OLD PHONE CONNECTED)
adb pull "/data/data/${APP_ID}"

# Restore (RUN WITH NEW PHONE CONNECTED)
APP_OWNERSHIP=$(adb shell stat --format "%U:%G" "/data/data/${APP_ID}")
adb shell mv "/data/data/${APP_ID}" "/data/data/${APP_ID}_backup"
adb push "./${APP_ID}" "/data/data/${APP_ID}"
adb shell restorecon "/data/data/${APP_ID}"
adb shell chown -R "${APP_OWNERSHIP}" "/data/data/${APP_ID}"
#adb shell rm -rf "/data/data/${APP_ID}_backup"

It does require root though.


text:
How to enable/disable VPN via adb/termux/terminal?
I have a VPN configured on my android device running Lineage OS 18.1 (Android 11). I'm not using any third party apps, I'm simply using the standard Android settings to specify my VPN login data etc.
Now I'm looking for a simple way to enable7disable the VPN connection form the terminal without disruption.
I found a hacky way to do it by launching the VPN settings activity and then sending a bunch of key events to click on the connect/disconnect button.
Connect:
am start -a android.intent.action.MAIN -n com.android.settings/.Settings\$VpnSettingsActivity && input keyevent 20 && input keyevent 23 && input keyevent 61 && input keyevent 61 && input keyevent 61 && input keyevent 61 && input keyevent 61 && input keyevent 61 && input keyevent 66

Disconnect:
am start -a android.intent.action.MAIN -n com.android.settings/.Settings\$VpnSettingsActivity && input keyevent 20 && input keyevent 23 && input keyevent 61 && input keyevent 66

But first of all, this will open the settings dialog in the foreground, disrupting whatever I have been doing and secondly this whole method relies on the UI to have a specific amount of fields and buttons.


text:
Do any versions of Google's "Voice Typing" work completely offline?
Do any versions of Google's "Voice Typing" work completely offline?
Note that when I specify "completely offline", I mean with absolutely no data sent to Google or other parties.

Google's "Voice Typing" can work completely offline on Samsung Galaxy S9 with Android 10 and Google Pixel 6 with Android 12, provided you downloaded their speech to text model:

Turn off "voice contributions" as well if you don't want Google annotators to listen to you (note that they're not supposed to link audio snippets with speakers, so it's supposed to be anonymous).

Thanks Franck.  One of my concerns with anything Google-based is that, even if their keyboard is blocked from sending data, they could use another one of their processes to upload keyboard/voice data to their servers.  After all, Google is the company that drove around collecting people's WiFi data (not just the SSIDs) and then claimed they didn't know that's what their software was doing.  They must truly think each and every person in the world is incredibly naïve to believe a nonsensical story like that.  Regardless, I appreciate the info you provided here.  Thanks!

@RockPaperLz-MaskitorCasket agreed, would be worth an infosec audit (esp. since they don't  make any commitment on
whether the text will be sent to Google servers).


text:
ALLDOCUBE kPad Magisk
Before you ask, I cannot use TWRP or any custom recovery since I couldn't find any for my device.
I have spend over a day trying to flash Magisk on my kPad I got for Prime Day. Every single time, it's been bootloop after bootloop after bootloop in flashing either slot A or B. I couldn't flash vbmeta since there were 5 different vbmeta files and none of them said vbmeta standalone. At this point, I'm about to give up and seeking help online is my last resort.
Thanks in advance to anyone who helps me.


text:
How to connect Samsung galaxy S9 plus to internet while phone is locked and notification bar is also locked and I have forgotten pattern lock
I have forgotten my phone's pattern lock now in order to unlock it there is one option I know is by using Samsung account I can unlock it but unfortunately my phone's notification bar is locked and phone's ADB debugging is also off, so how can I make my phone online. I don't want to hard reset as it will erase my data in the phone so please if anyone know how to connect a locked phone to internet please tell me and also let me know if you know how to break pattern lock without losing data. thank you so much.

insert sim card into another phone and disable SIM PIN completely. now insert sim card back into locked phone it will connect to mobile data automatically without asking for PIN. finally login to find my mobile on pc and remote unlock phone


text:
gmail does not show messages in outlook -- install as imap?
I have a OnePLus 7 (not Pro) and use the Outlook app for certain reasons (work).
Because I don't want multiple mail programs if I can avoid it, I always had my Gmail account in there which always worked fine. But now, not sure if this is an update, my Gmail account has become unresponsive. If I delete the account and then:

add it via "Add mail account" -> add Google account, it asks for some permissions the Google way and does not complain, but it does no show any emails, not even the unread ones. I'm "done for the day".
add it via IMAP (selecting not Google) after setting "IMAP enabled" in my Gmail account on the browser, using these directions, it says: Log-in error Please check your email and password and try again.

For route 2 I'm sure the problem is not the e-mail or password, because those work in the browser. And route 1 does not seem to work as it does not load messages.
Does anyone know how to access Gmail as IMAP on and Android device? Does it require the 2-step verification somewhere?

Note that Outlook app is not a mail client. It is a viewer of the mail store in Microsoft cloud (where all the credentials are stored). So the app does not access GMail at all, only the cloud servers do (so behavior can change without app update). Have you set-up an application password on the Google account? Because otherwise Google's two-factor authentication may be a problem.

I have two exchange e-mail accounts in there, and it has an option to add e-mail accounts, pre-configured ones from Gmail, Yahoo etc as well as costom IMAP and POP accounts -- I think it supports e-mail? I used to be able to read my Gmail in there without problems.

I just want to point out that Outlook is not a "classic" email app, it does not read any mail accounts, Instead the mail accounts are managed in Microsoft cloud where also your account data is saved. So Microsoft has access to all your mail accounts, downloads their mails to their cloud and then displays them in the Outlook app.

Ah right. So the IMAP options etc that I fill in are sent to the cloud, then handled there, then sent back to my phone, instead of from my phone straight to the IMAP server? Still, if the options are all correct that should also work (unless they specify that it doesn't)?


text:
Recover data from bootlooping phone
The phone is bootlooping and I can only get to fastboot mode. It says PHONE Unlocked, but I can't flash TWRP. How can I recover the data?

What happens when you try to flash TWRP? Show us the the output of your console/cmd. // Also, which phone and Android version are you using? Which TWRP version did you use and from where did you download it?

@Firelord C:\ADB>fastboot flash recovery twrp-3.1.1-0-grace.img target reported max download size of 471859200 bytes sending 'recovery' (26226 KB)... OKAY [  0.640s] writing 'recovery'... FAILED (remote: Command not allowed) finished. total time: 0.662s The phone is a Huawei P8, it has android 6. I downloaded TWRP from the official website.

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

@Community I'm trying to recover the data from a bootlooping phone. I can only get it to fastboot but I cannot flash anything.

try boot twrp or flash recovery2 https://forum.xda-developers.com/t/twrp-3-2-2-unofficial-huawei-p8-gra-l09.3811895

@alecxs I tried, but got error. C:\ADB>fastboot flash recovery2 twrp-3.1.1-0-grace.img target reported max download size of 471859200 bytes sending 'recovery2' (26226 KB)... OKAY [  0.611s] writing 'recovery2'... FAILED (remote: Command not allowed) finished. total time: 0.611s

try fastboot boot <file>

@alecxs same error

sounds like your phone is FRP locked. try IDT Image Download Tool or check these comments https://android.stackexchange.com/q/229072


text:
Complete backup in offline mode
In front of me I have an Android phone that has been infected with a malware installed as system service. I want to perform a factory reset on this phone, but first I need to make a backup, of course. The phone needs to stay in offline mode, due to the malware.
After making the backup, I want to selectively reinstall the apps and restore their data. For now, I'm assuming that I don't need the APKs, but having them wouldn't hurt.
One thing is that the malware has installed itself as a system service, so can I even trust my backup anymore?
How should I (as a software developer) proceed?
More importantly, how should an ordinary Android user deal with this situation? This means the only allowed tools are those that have a GUI and that have acceptable usability. And, of course, no root access to the phone. Shouldn't Google as the manufactorer of the Android operating system provide these very basic services?

You can create an backup of all apps via adb backup (for those apps that allow it). For being able to selectively restore you need to backup every app on your own, preferably by a script like https://codeberg.org/izzy/Adebar. But you will recognize that may be 50% of the apps don't allow backup.

@Robert That's exactly the answer I didn't want to hear. I was more interested from the perspective of an ordinary Android user. An ordinary Android user should not have to use adb backup (which is deprecated, by the way) or the more modern adb shell bmgr. An ordinary Android user should not have to enable the developer mode just to do a regular backup.

Shouldn't Google as the manufacturer of the Android operating system provide these very basic services? If something doesn't bring revenue to the table, then there is no point working on it from their perspective. Keeping Android users powerless and dumb is a design approach of Google and Android OEMs. Providing powerful backup tools means user can avoid using Google cloud services for backup, or can use a competing product (such as from Amazon, Microsoft, etc.) on their device. That's a loss in revenue. Hence, broken-by-design tools we have got.

By the design of Google backup is uploaded to cloud. An offline backup is therefore deprecated from Googles perspective. Anyway ADB backup works and deprecated just means it will be removed some day in future. BTW: from an app developer perspective you can discuss if users should have the permission to make a backup. Having access to the data allows users to manipulate app data.

Also, this can get very technical but you need to dig more information on this malware. If a malware can compromise your phone and gain root access (assuming that's the case), then so can you, provided you find a trustworthy exploitation tool or have the skillset to design and deploy a payload to compromise your Android. If you can gain root acces (which you should because your malware probably has it anyway) you can get complete access to all the apps' private data you want. Restoring all of that would be impossible without root access though.

You should tell us the Android device and Android version you are using. You might be having an Android version where Verified Boot is not enforced. Otherwise, a persistent malware should fail verified boot and the device ought to refuse to boot successfully.

In addition to Firelord's comment, which I agree to, you have to keep in mind that even with root access keys from AndroidKeystore can't be exported (protected by TEE) and will be missing in any backup no matter what permissions you have.


text:
TProxy IPv6 not sending connections
I'm trying to capture connections using tproxy, but I'm unable to receive IPv6 TCP connections. IPV4 TCP and both UDP work properly. TCP v4 and v6 are both received from the same accept call. I'm on Android 9.
PORT=2080
MARK=2080

iptables -t $TABLE -A $CHAIN -p tcp -j TPROXY --on-port $PORT --tproxy-mark $MARK
iptables -t $TABLE -A $CHAIN -p udp -j TPROXY --on-port $PORT --tproxy-mark $MARK

ip rule add fwmark $MARK lookup 100
ip route add local default dev lo table 100

ip6tables -t $TABLE -A $CHAIN -j LOG --log-prefix='[iptables] '
ip6tables -t $TABLE -A $CHAIN -p tcp -j TPROXY --on-port $PORT --tproxy-mark $MARK
ip6tables -t $TABLE -A $CHAIN -p udp -j TPROXY --on-port $PORT --tproxy-mark $MARK

ip -6 rule add fwmark $MARK lookup 100
ip -6 route add local default dev lo table 100

The log output shows ICMP packets and TCP packets with IPv6 and IPv4 addresses, but only IPv4 gets accepted on the listener.
Occasionally something connects from WSL on my laptop, but nothing else connects over ipv6 and browser tests such as https://ipv6-test.com/ say ipv6 failed.
Running the command curl google.com in WSL hangs until I press ctrl+c, at which point the accept call returns the now useless socket.

Cross-posted from Server Fault: https://serverfault.com/q/1106053/252799

Cross-posted to Unix & Linux: https://unix.stackexchange.com/q/710747/180315

Please refer to Unix & Linux for more information.


text:
What what do the colors represent an Android 11
Hi I have an Android 11 Motorola phone and I was wondering what the colors represent next to the contacts and also the colors that are different using during the text

Possibly related/duplicate: Contact avatar colors

Does this answer your question? Contact avatar colors


text:
How to access the Emoji keybaord on a new Samsung Galaxy S22+?
I bought a new Samsung Galaxy S22+, but I don't see the Emoji keyboard. I think it should exist on my phone, but I don't see anywhere how to access it.
My input method is 'Samsung Keyboard', and under 'Languages and types', I have English(US).
How can I enable it or how to access it?

It is pretty hidden, but this is the solution:
When the keyboard is open, press long on the comma (',') button to the left of the space bar. Then, you'll have the option to choose different keys, one of which is the emoji symbol, press it.
Then, the emoji symbol key will replace the comma one, and you can use it to open the Emoji keyboard.


text:
Clear Data of Package for Single User
I am trying to clear the data for a few apps on a work profile without clearing the data on the main user account for my android phone.
What I'm trying for example is :
pm clear com.Microsoft.teams

Is there a way to clear just on the work profile and not my main account?
From my research, you can't seems to specify a user for this command unlike a few other commands: pm documentation

See the latest documentation. Or pm help | grep clear which shows clear [--user USER_ID] PACKAGE

You can specify the userID for pm: --user <USER_ID> . You just need to find out which userID your work profile has.

Thanks the both of you. I was able to figure out the user id and clear it with that option.

@Kayracer You can write an answer yourself showing the commands you have used to get the user id and then how you deleted the data.

Thanks to the commenters, I was able to figure it out.
I used Termux with root privileges, I typed the following:
To be super user
su

Then list the users
pm list users

The number in front of UserInfo{ is what you want
ie. in my case is 12
UserInfo{0::24} running
UserInfo{12:Work profile:35} running

Last enter the clear command
pm clear --user 12 <package to clear>


text:
Cannot Mount userdata partition on Android 11
I have pulled a block of encrypted userdata partition ".img" and trying to mount it on unecnrypted device (same device with encryption set to off). My device is rooted.
My userdata is mounted as ext4: -
/dev/block/dm-7 on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,resuid=10010,resgid=1065,errors=panic)
I have tried these steps

Pulled the block on local system using adb pull - userdata_block.img

mounted the block on an unencrypted device over CIFS using busybox mount command - userdata_block is virtually present on /sdcard/temp/userdata_block.img

Want to mount this img file on device to check the directory status on Android 11 if all the directories are encrypted or not.

/system/bin/losetup /dev/block/loop2 /sdcard/temp/userdata_block.img
/system/bin/mount -o ro /dev/block/loop2  /sdcard/dummy
Getting below error on Android 11, same command works fine on Android 10.

mount: /dev/block/loop2: need -t

Does anyone has any idea how to fix this?

mount: /dev/block/loop2: need -t. So did you give -t ext4?

yes it says Invalid argument

are you sure you have pulled /dev/block/dm-7?

yes and redirected to an img file

try busybox mount instead. try loop,ro,noexec,noload,noatime. double check userdata_block.img is ext4 with xxd/hexdump. make sure file size (kb) matches dm-7 in /proc/partitions (sdcard must not fat32)


text:
Is there a fool proof way to change the clock position on my lockscreen? Nothing else. Just drop it down by 50 pixels
Title says it all:
Is it possible to change the position of the clock on the lockscreen.
I need to move it downwards a bit.
I'm on a OnePlus 8 (IN2015_11_C.21)
Latest Android (12)

Since the clock on the native lock screen is baked into the system, I'm not sure if there's a way unless with a root (code injection wizardry) or a 3rd-party lock screen app.

Thanks @AndrewT.


text:
How do I extract the boot image from my ROM on my phone to modify with magisk?
I am trying to root my phone and I need to extract the boot img from the ROM on my phone preferably using the phone itself. Then I will modify the boot img with magisk.
How can I extract the boot image and save it on my phone?

The easiest way is usually to download a firmware update for your device and extract boot image. Have you already  unlocked bootloader?

please provide link or at least mention phone model


text:
Get PKCS#8 key from .jks storage
Previously I used jarsigner tool for APK signatures.
But jarsigner provides v.1 sign only.
So, I'm trying to move signing process to apksigner because I need v.2 signature as well.
And it works well when I use .jks for it.
Please, check example below.
  apksigner sign \
     --ks some.jks \
     --ks-pass pass:somepass \
     --v1-signing-enabled true \
     --v2-signing-enabled true \
     --v3-signing-enabled true \
     --v4-signing-enabled false \
     --out DESTINATION_APP \
     PATH_TO_APK

Also I need option to sign APK with key and cert parameters.
I've tried to use my .key and .crt file from .jks storage but it returns me an error.

According to the documentation key file must be in PKCS#8 format and cert in X.509.
Could you please tell me how can I export .key and .crt in correct formats?
Thanks.

@Robert, I've removed post from there. It was added to Serverfauld mistakenly.

I would try to open the JKS file using https://keystore-explorer.org and then export the private key using context menu.


text:
Can Android Device be flashed without using Host PC? Can we flash full SW image using sdcard/external USB storage
For all Android Products there are 2 ways to flash the SW image:

EDL Mode(Emergency Download Mode) - Normally used when bootloader can't be booted up or for first flash
fastboot mode

Both of above method requires flashing via USB connected to Host PC.
Query:
Do we have any alternative way to re-flash full SW image to Android Device which does not bootup without using HOST PC?

it's possible to run fastboot from another android device as host. flashing ROM from SD Card on device itself is possible in recovery mode

@alecx thanks. But recovery mode will not help if device is not bootable. It also can’t enter recovery mode. Do you have any suggestion/detailed steps how can we run fastboot from another device as host and flash.

there is a Magisk module for this


text:
Is Android unit testing on a physical device actually a thing?
Firebase has physical devices for testing: https://firebase.google.com/docs/test-lab/android/available-testing-devices however it's a little expensive.
I was wondering if testing things on a physical Android device is a real thing and if there are frameworks for that. I know that there are unit tests that are mocked and run on the computer, but some things like the Android Media Codec Decoder can only be tested on the device

Not sure if this is a development topic or not. That said, real devices should be used for testing due to differences in chipsets/OS versions/OEM customizations that can't be done via emulator. Since scrcpy exists to drive a device from a PC, other projects like Smartphone Test Farm appear to aim for similar utility to be used at some scale within a business. Also just noticed the same question on SO. Generally physical device test is for things which can be affected by prior listed items.

what is your question? Define "actually a thing".


text:
Trying to flash Gapps on Sony Xperia 10 III AOSP android 12
I have a Sony Xperia 10 III open device and I have build an AOSP android 12 and flashed the build to the phone which has booted successfully. Since the AOSP is not having any google apps prebuilt, I tried flashing the Gapps through ADB sideload by downloading the .zip file of the Gappa from NikGapps, BiTGapps etc. While trying to flash the .zip file from the ADB in recovery mode, the flashing was not successful and the following error occured:
I have a Sony Xperia 10 III open device and I have build an AOSP android 12 and flashed the build to the phone which has booted successfully. Since the AOSP is not having any google apps prebuilt, I tried flashing the Gapps through ADB sideload by downloading the .zip file of the Gappa from NikGapps, BiTGapps etc. While trying to flash the .zip file from the ADB in recovery mode, the flashing was not successful and the following error occured:
E : Failed to find META-INF/com/android/metadata
E : Failed to parse metadata in the zip file.

It was found that the directory tree of the downloaded .zip file was META-INF/com/google/android/metadata, but the search was done in the tree mentioned in the first error. I pulled the 'android' directory outside the 'google' directory. After this change, there is a signature verification error that arose
E: footer is wrong
E: Signature verification failed
E: error: 21

Since the recovery is stock, there is no option to disable signature verification. I am also unable to flash third party recoveries like TWRP and ClockWorkMod on Sony Xperia 10 III.
Is there any other method where we can flash Gapps to Sony Xperia 10 III? Kindly reply.

Not sure if it may help, but AFAIK custom ROM (e.g. LineageOS) recommends to flash GApps before the first boot: "NOTE: If you want the Google Apps add-on on your device, you must follow this step before booting into LineageOS for the first time!"

If your device is unlocked you can boot any recovery ROM you want, so why keep stock recovers?

I don't find any third party recoveries for Sony Xperia 10 iii. I tried flashing some TWRP recovery images but it only crashed.


text:
Create custom SELinux domain using magiskpolicy
Tried to make custom domain for an app that is installed from PlayStore. I created a module that would patch the policy at boot and edited system/etc/selinux/plat_seapp_contexts to assign the app my new domain.
sepolicy.rule file:
type battery_app appdomain
allow battery_app sysfs * *

I also added this line of code to plat_seapp_contexts:
user=_app seinfo=platform name=com.someapp domain=battery_app type=app_data_file levelFrom=all

After running ps -eZ | grep com.someapp the app is still running in untrusted_app domain. I don't know what i did wrong.


text:
Mobile data usage on smartphone when NordVPN is turned on
I've recently started to use NordVPN on smartphone as I need to spend a lot of time in public networks.
However, it is only 5th August and I have already got a data warning that I have used 2GB of mobile data.
Which makes me think that NordVPN does not change the "carrier" network automatically, when I switch from LTE (4G) to some WiFi (office or home).
I've contacted NordVPN support team, they told me that all traffic is accounted for an actual app (e. g., Firefox) and NordVPN. The problem is that the mobile plan provider somehow adds these two traffics. I use an Android phone.
How to solve this problem? Thank you!

You could, potentially, manage your traffic by following a couple of rules:

When you are on the move, i.e. using mobile data
a. Turn OFF  Wi-Fi
b. Turn OFF VPN
c. Enable Mobile Data
When you are expecting to use an unsecured WiFi (e.g. Internet Café, Airport)
a. DISABLE Mobile Data
b. Turn ON VPN
c. Turn ON Wi-Fi

The order that these are done in is important. This does, of course, assume that you do trust your carriers internet access to be reasonably private.
You could potentially automate with something like If This Then That or you may be able to find an app that lets you have a button to toggle these settings.

Yes, thank you. A little bit involving procedure, but it seems the only option.

There is an issue here that NordVPN do not recognise. From Jan - Oct this year I had adequate mobile data. In November my mobile data consumption rocketed up. In December the NordVPN app consumed most of my mobile data allowance, so I turned mobile data off. I contacted NordVPN, they have not got a clue. To me something in the App is consuming data and this error has emerged in Q4. I'm going to get myself another VPN that pays a bit more attention to it's customer. I would recommend that you do the same.
When I look at the mobile data usage log for Nov and Dec, NordVPN is the number one mobile data consumer.


text:
Prioritize cellular data over Wi-Fi
Is there a way to set the phone to prefer cellular data over Wi-Fi so that it will use cellular if it's good but Wi-Fi if cellular is not?  Similar to the "Switch to mobile data" setting but in reverse?
The intent here is while using internet as a passenger in a car and driving through areas where coverage isn't great, I bought a cheap prepaid hotspot from another carrier (that's providing the "Wi-Fi" referenced here), but I want my primary cellular plan on my phone to be used first rather than that.
Right now I manually switch between the two, but there are areas where which one is better changes quite frequently, so it'd be nice if this could happen automatically.

Is the "Roaming preference" option accessible from com.android.settings > Network and Internet > Calls and SMS > Wi-Fi Calling (on A14) of any use? I'd provide the name of the activity to visit directly, but as this GitHub issue explains, it's difficult, currently.

The activity is com.android.settings/.Settings$WifiCallingSettingsActivity, per this answer.

This is probably not exactly what you wanted, but I experienced similar issues, and the way it sort of worked for me is either:

Ensuring the Wi-Fi is of such an excrutiangly bad quality so that Android thinks it's an Internet-less connection and therefore only drops to it when the cellular is at absolute zero.
To ensure that the phone thinks there is no internet over Wi-Fi, you could probably try blocking the URL it uses to check the connection, on your router. I remember there was a way to change the default generate_204 url in Android (see this: Change the server that Android uses for an internet connectivity check?) - change that to msftconnecttest.com/redirect or something that uses its own domain you're not afraid of blocking. (as the default gstatic.com is actually used for other purposes as well)


text:
FBE securely wipe all data
According to android documentation the FBE system has two different levels. Credential Encrypted (CE) storage and Device Encrypted (DE) storage.

Does a factory reset of an FBE phone reset the keys of both storages?
If I run a full disk encryption on a phone that had FBE enabled by default and then proceed to factory
reset- will BOTH CE and DE keys be different from what they originally
were before FDE?
What would hypothetically be recoverable of the previous system assuming full physical access? Data remanence and all. (I assume bootloader is completely unencrypted. Is there anything I'm not aware of like an unencrypted swap or something?)

A factory reset is designed to erase all keys. A device can only support one encryption method. So you can not use FDE on a device that is FBE.


text:
Increase number of fingerprint attempts
Is there any way to increase the number of allowed fingerprint attempts before PIN etc is demanded? I'm comfortable using adb shell if necessary.

At least until Android 7, an Xposed module named Fingerprint Enabler was able to do that. Not sure if it supports higher Ándroid versions (7 was the last running on the only device I had with a fingerprint scanner).

Is that something that can be done without rooting or bootloader unlocking or whatever?

No, definitely not. And I'd be very surprised if there's a non-root solution to that.

Unfortunately it seems like it's not possible without changing the source code, not even on a rooted device. The max number of attempts is hardcoded at line 43 of LockoutFrameworkImpl.java (and stored in the constant field MAX_FAILED_ATTEMPTS_LOCKOUT_TIMED), and the number of failed attempts is stored in the mFailedAttempts private field, declared at line 69.

Thanks for the info! Seems like a crappy way of doing things. I could see the logic if fingerprint sensors were 100% reliable, but they're far from it.


text:
Samsung Auto sync personal data - Does syncing all at once use less data/less battery versus syncing small items every few minutes?
Does turning on auto-sync use a significant amount of mobile data and battery usage, or is it not as much as you'd think?
Let's say someone sent you 100 emails, would your phone use a fixed amount of data usage and battery to sync all those emails, or would it use slightly less data to sync that many emails like you were buying things cheap in bulk?
Would the same apply for battery usage, or would syncing a lot of emails at once use a lot more battery than syncing just one email?

In general a process that is executed less frequently should save battery as all the hardware components can stay longer in energy saving state. Additionally an intelligent scheduler could sync the data while charger is connected (not sure if this is done). How much the difference is is difficult to guess. The only way would be to monitor your device some weeks with enabled/disabled auto-sync and compare the results.

@Robert I see, I think the battery usage would make sense but I'm also wondering about the data used. Maybe it applies the same way and syncing a lot of emails at once might save more data than syncing multiple emails at different times?


text:
How can I block factory reset on a phone?
is there a way to block factory reset on a phone? Like delete the functionality, make it totally impossible. Thanks!
Note: Not something like Factory Reset Protection, something that doesn't let you wipe the phone in the first place.

To deter a  third party from doing factory reset you'd need to do three things: (1) setup protected lock screen so that factory reset cannot be done using Settings app unless your lock screen credentials are known to the party; Additionally, use 2FA on Google account or remove Google account from your device, or at least disable Google Play Services (2) modify kernel image and remove the part which loads recovery or modify it so that so it become non-trivial to do anything with it...

...(3) disable access to low-level interfaces that can factory reset your device -- this is a bit hard. How to disable access to fastboot mode or the mode that is used to flash MTK device? 3. is most problematic to do with no surety at the end.

@Firelord I want to make it that it can't be reset from the settings app.


text:
The calllog.db file remains the same even after changing
As you know on android call history in /data/data/com.android.providers.contacts/databases/calllog.db
path as sqlite file.
I change this file with adb push command then I will check on Dialer Call history application but it still same with old data.
If I am reboot emulator and reinstall Dialer application I can see new data.
How can I see new records without reboot emulator?
Is android have any cache db for calllog.db

On Linux just replacing a file does not mean it will be used on next write operation. If the process that uses the file you have replaced is still running and keeps the file open it can continue to use the file unless the process ends even if the file not accessible in file-system anymore. If you replace a file you have to kill the process that uses it (or somehow make the process close the file). When the process is restarted then new entries will be written to the new file.

SQLite databases are cached in the framework (system_server and zygote processes). It won't read your changed file until it's not restarted as Robert said.

Did you try force stopping the dialer app or by clearing its data (should likely force it to reload the db).

When we make a sql query with the adb command, the changes are reflected.
I mean when am I try to
sqlite3 calllog.db 'update calls set number='123' where _id=1'
Then I check on dialer application, changes are reflected.
But when am I try to change calllog.db file I see old data on application.


text:
Converting APKM to APK so that I can install it manually by a default installer
As written in the title, I just downloaded an official app from APK Mirror, it has 2 files apk and apkm and since the apk version didn't work, I tried to download the second one i.e. the apkm one. I don't know how to install it.

So I googled and found this. Yes, I'm aware of the article that says converting APKM to APKS, it doesn't matter because I have a tool to convert APKS to APK
I don't know if it's a scam or not  but the app that's called unapkm, after installing it, it doesn't have the "open" option and the app isn't appeared on the screen or perhaps I just don't know how to use it. Anyway, is there any chance to convert the apkm to apk so I can install it normally from my phone?

This is also discussed on reddit

Thank you. The thing is reddit is banned in my country, so your link, (I'm sorry) I couldn't open it. Could you tell me the main discussion plz? Thanks.

Possible duplicate: Creating universal APK form multiple APKs without having *.aab (Android App Bundle) file

@user516076 You can always read Reddit pages via Teddit, try e.g. this one: https://teddit.pussthecat.org/r/AndroidQuestions/comments/fv1haf/what_is_apkm_format/ (there are more Teddit instances if needed). Further, with UnApkm installed, have you tried to "start" the APKM file? Maybe the app has registered for that, like the installer reacts on APKs (and neither has an "open" option).

Does this answer your question? adb install: filename doesn't end .apk

Thanks for the links, I have read them all. The adb thing looks difficult to do, so I probably try it later. And one of your link from the reddit suggest using the exact same app like the link I provide i.e. unapkm, i've tried it but it doesn't work. I even tried to install the apkmirror installer from google play but it failed. It says The bundle requires Android SDK 31 but you have Android 11. What happened?

When I tried SAI installer, it said failed to allocate 68309932 because only 0 allocatable. What does that mean?

I think I have found the problem. I can't install the apk or the apkm because there's something wrong with the Androidmanifest.xml. I tried to analyze the app and compare it with the previous version, and when I replaced the file, it was able to be installed. If that's the case, what's the problem and what should I do to fix the Androidmanifest? Is there any related problem like this? Thanks

To the OP, I'm sorry about that, I saved the reddit as a pdf and uploaded it to a file host - https://easyupload.io/rkvl0t I don't like to regurgitate other people's comments as my own. To the moderator I posted another answer because I cannot comment.


text:
Is there any way to prevent an app from restarting after force stopping it in the settings
I've tried to force stop Whatsapp but after some time it restarted. This is so disgusting and apparently out of control. What can be done to prevent it from restarting.

Try to set RUN_IN_BACKGROUND permission to ignore: Disable autostart on boot and restrict background execution. But it's not guaranteed that the app won't ever start again because it uses scheduled Jobs / Alarms as well as Google Cloud Messaging to receive new messages. Also setting WAKE_LOCK to ignore may help. You can use my app PMX to set both permissions conveniently.

Related: https://t.me/PermissionManagerX/2703

Did you find a working solution to this? I used to force stop Whatsapp on my Samsung A21s and it wouldn't start unless I open it myself. Now on my Samsung A33 5G, it restarts on its own.


text:
Rate limit notifications from an app
So when family and friends go bananas on a communication app, the phone spews alerts endlessly, one for every single message. Sometimes even every time someone starts typing! Some apps, like signal, provide an option to disable alerts for an hour or some other choice of duration. But not all apps have this, and I certainly don't want to disable all notifications.
Is there some way in android to rate limit notifications per app? I will live very happily the rest of my life if Snapchat can send maximum one audio/vibration notification every 10 minutes. Can I make android fix this for me, or is it up to every single app developer to implement this?
I already block and disable some notifications, and I've already set up "Do not disturb". I've never seen any option to avoid these notification torrents, though.


text:
Can I create link to a page in the home screen?
I'd like to have several collections of apps but also widgets. Problem is widgets can't be in folders.
But, could I just link to another page of the home screen? Thus each page would be my unit of organization. But I could access all of them from page 0 without scrolling N times.
Is it possible in some way?

There's no standard for home screen apps, so it depends if they support it or not...

Home screen and how the icons are organized there is managed by the selected launcher app. You can install other launcher apps that can have a totally different UI and usage concept see e.g. https://devsjournal.com/top-weird-unusual-launchers-to-transform-your-android-phone-interface.html


text:
Which soc is redmi note 3 snapdragon?
I have a redmi note 3 snapdragon 650(which is supposed to be msm8956) variant.CPU-Z is showing my soc as msm8952 which is name for snapdragon 617.

I am also not able to install adreno drivers(using magisk or recovery) for snapdragon 650 it says that this is for msm8956 but your device is msm8952 I installed drivers for snapdragon 617 but then the phone doesn't boot.

https://youtu.be/snJXwL2WVDk I found this video of CPU z on redmi note 3 his phone too shows msm8952 in the system tab

Sorry, in the device tab not the system.

maybe you have other device "Redmi Note 3 Pro" (kenzo)

I have faced something similar with my MTK G85 and this happens when your vendor (in your case xiaomi) does things in a hurry and uses some generic code/config files with SoCs similar to your one. For instance, my MTK G85 was detected as some MTK P series chip.
If you're already on the latest software version, try raising an issue in Xioami/redmi forums
Also, make sure you're not having Redmi Note 3 Pro which actually runs on an msm8952.


text:
Chrome (Android) auto download pdf every week (is it a virus ?)
A year ago i've been fighting against an hacker that had access to a lot of my accounts (not very difficult since my passwords were record with google account). Somehow he archives to get the codes from 2FA on my phone. I guess he had infected my phone as well (dunno if he infected my PC or my phone first and if he archieve to infect both threw one). I decided to reinstall android. Now as a 2FA i'm using authenticator app from google. Since that time, I also reinstall windows on my PC to be 100% safe. I obviously changed all my passwords since that time, multiple times.
I received a month ago an alert from microsoft saying that someone break in (again). So I changed the passwords (again). Im weakly checking connexions. Hackers are still trying but for now they just could not break the password.
But more recently, I've notice chrome app autodownloading a PDF once or two a week. I dont have any tab open to the domain where it comes from, it never ask where i want to store the file even when I enable this parameters. The file is called reaching-all-learners.pdf and come from this link : https://education-static.apple.com/product/reaching-all-learners.pdf
BE CAREFUL ABOUT THE LINK since I dont really know what is the matter with this site and how legit it is or not.
I'm wondering if any of you, with cyber knowledge could tell me what is going on and how I can fix it so it stop download this file again and over again.
I've ben looking on internet and no one looks having the issue. I have run couples of antimalware process (malwarebytes and the default security app from android) and nothing have been founded.
Thanks for taking the time to read me .

The download link is legit from Apple, at least nothing to be worried about the file. Also, probably related: Chrome - unprompted auto-download of files after opening the browser - bug or something else?

Are you sure it is legit from apple ? Because the education-static.apple.com is kinda weird. Yeah i'm gonna take a look to the thread ! Thanks !

It's one of the subdomains of apple.com, that one is related for Apple Education. The file is like a brochure for the webinar with the same name by Apple.


text:
How can I prevent an application from closing in the background on Android 12?
I have a Pixel 6, and have the application "Fate/Grand Order" installed. On an earlier version of Android 12, the game would remain opened in the background, when the application was switched. That means, when I returned to it after e.g. looking something up on Chrome, the game would remain loaded, ready to proceed.
However, after updating Android 12 (not the game itself), the application would immediately close when switching to a different application. Returning to the game will cause it to start from the beginning.
How can I force Android to keep the game loaded in the background?
What I've tried
I have read in several sources that setting an app's battery usage to "Unrestricted" will cause the application to remain open in the background. I tried that, but the behavior did not change.

For information, my Pixel 6 has 8GB of RAM, and the developer options show that only 4.8 GB are used on average. So I highly doubt that the application is being closed out of a lack of RAM. Furthermore, Fate/Grand Order only requires 242 MB of RAM, while Chrome needs 337 MB.

"How can I force Android to keep the game loaded in the background?". End user can't. Developer of the game can. Take logact when switching to other app to see why the app gets killed. If needed you can use my app WhatsRunnig to get a more broader picture of RAM usage.

@IrfanLatif Thanks for the response. I ran logcat when launching and switching the application, but the output is very verbose. Any hints on what specifically I am looking for?

Look for "ActivityManager", your app's PID and  package name.

@IrfanLatif I've had a look around and ended up writing a bug report to the developers. It seems to be a bug with this specific unity version and this specific android version, so nothing even the devs can realistically do aside from upgrading.


text:
Accessing An Android Device With Broken Screen Via ADB and Unauthorized Machine in 2022
I've done a lot of experimentation on this, but can't seem to get anywhere. I'm looking for guidance on recovering data from my broken Android phone(s). It seems like this is going to require some advanced forensics recovery process at this point.
Is it possible to push files or do any device manipulation if it's put in Recovery Mode/Fastboot/etc?
So far I've uncovered two methods that have saved two phones:
ONE: Use scrcpy with keys found on an old laptop backup from ~/.android/adbkeys.pub
shell$ scrcpy -b4M --print-fps --push-target=/sdcard/Download/ --verbosity=debug -t --disable-screensaver
shell$ adb pull /sdcard/errrrything* /localbox/

This obviously only works if you can push APKs via a working debug session. I happened to have a working copy of an adbkey.pub from an old backup I found.
TWO:
Again, finding a good ~/.android/adbkey.pub and copying it to the device via push like so:
shell$ adb push ~/.android/adbkey.pub /data/misc/adb/adb_keys
shell$ adb pull /sdcard/errrrything* /localbox/

This will push your key to the device, but obviously won't work while the phone is booted Normally unless you click "Grant Permission" on the prompt, which is impossible without a screen to see/touch.
Moving along back to my original question: Is it possible to push files or do any device manipulation if it's put in Recovery Mode/Fastboot/etc?
If so, I'd think it would be possible to remember the steps and timing for the volume/power buttons and slip in.
Any help is appreciated! If it helps, these are my phones I'm trying to recover:
Pixel 3a XL (USB Debugging On. Rooted.) - OS Version Unknown. 2 Years Old.
Motorola Nexus 6 (USB Debugging On. Rooted) - OS Version Unknown. Also 2 Years Old.
Small Note: I know this question might be seen as me trying to do something "unethical" but I can prove these devices are mine and am not trying to break in to stolen phones or whatever. That said, I understand if you assume the worst - it's probably best to think that way in life. I digress..
Thank you for reading,
-notdan

Finding a good adbkey.pub and copying it to the device via push doesn't make sense. If you can push a file you should be able to directly read and extract the files. In my opinion the best option to use an USB keyboard to unlock the phone (lock screen) and to register a Bluetooth keyboard. Without a working screen this is not that simple, best is having a similar device to practice. Once you have the Bluetooth keyboard paired, accepting the adb prompt should be easy.


text:
how to force an old app to be supported in the higher android version than it's supposed to be?
I have a very almost similar question to this discussion: Is it possible to run old apps on newer versions of Android? If so, how?, the question in the discussion hasn't even got answered officially yet, so I don't think it's duplicated.
Besides my question more want to ask about the possibility if the app that used to work in my previous android version i.e Android 11 and after updating my phone to 12, the app that used to work, doesn't work anymore.
The app that I'm talking about is "Stack Exchange" i.e. the android app version of this very site and has loads of similar features to this site. Sadly, however, the app doesn't seem to have the older or the latest version and it's even rare and not listed in Play store, mind you the app used to be in Play Store, but I don't know why they removed it, the app itself doesn't seem to be dangerous and it helped me a lot to even ask, answer, pose questions and getting notifications. This is the link of the app if it matters: Stack Exchange.
I'm not a developer, so if you explain rather complicated things I'm afraid I wouldn't understand. However if it's just a small edit using apktool, apkeditor I would probably understand.
Is it possible to make this app functions again as usual using small tricks? Or at least tell me why this is happening. I mean, I have another old app that worked in my previous android version (11), but is still also working now. Why only this app that doesn't work? What's the issue?
I also have collected all possible duplicates that after I read they apparently are not relevant.
I honestly think there's still hope to use this app after reading Robert's comment in this discussion: How to use an old version of an app that wants to get updated. Also: How to use an older version of an application?

I know the app. The official explanation was that the mobile website works well so that no app is needed anymore (IMHO the app is way faster and reliable for daily use). Unfortunately I have bad news for you, if an app doesn't work on a newer Android version this is usually caused by new restrictions introduced by Android. To adapt an app to the new version often a lot of code changes are necessary, some times you have to rewrite parts of the app. As the Stackexchange app is closed source making those modifications is extremely hard as you have to make it on Smali code (not Java).

I'm disappointed they stopped developing the app. But anyway thanks for letting me know that.

I was an Android developer, and I know why the Stack Exchange app doesn't work on Android 12. Unfortunately, I'm not sure if I have the knowledge to reverse engineer the app and fix it. As for why it disappeared: Why did the Stack Exchange Android app disappear from Google Play Store?


text:
Location indicator always visible
After a year or two of nothing, my Motorola Moto One (XT1941) with Android 10 again started to show location indicator 24 hours a day, 7 days a week:

Nothing, that I tried so far, worked. Restarting phone brings solution only for a few minutes, killing Google Maps also. The only workaround that I found is to permanently turn of GPS location in my phone. The moment I turn it on, I see that damn indicator again.
This is very frustrating to me. Is there anything else I can do to permanently get rid of it?

Unclear if you checked/tried Google Account Help-Choose which apps use your Android phone’s location You may also wish to check: Google Account Help-Manage your Android device’s location settings

On your device, have you checked under Settings › Location what app(s) last accessed your location? If the indicator is permanently on, maybe some app is permanently requesting the location. To find out if it is "the last one", tap on its name there, which brings you to its details screen. There, tap "force close" to kill the app. Should the indicator promptly disappear, you've found the culprit. There's also the privacy dashboard in settings telling you which app last accessed what, having a more detailed history incl. time of last access.


text:
Encrypt files using Android shell tools
I want to encrypt and decrypt some files (symmetrically and asymmetrically) on the Android command line, including the one in the TWRP recovery. Is there a program which can do this?
I've tried googling but I've found nothing so far. The only thing which comes close is this GPG port from the GuardianProject, but it seems rather old and is unmaintained.

You can install Termux from Fdroid to get a well maintained command-line environment including gog openssl and so on. If you have a recovery that allows to mount and decrypt user data files and run executables from that partition this might als work from within recovery.

You want ARM64 static binary of AESCrypt? But AES is only symmetric.

Yeah something like this would be great, thanks for the pointer. I am thinking of compiling openssl for ARM64 since it offers a HUGE range of crypto operations.

aescrypt_static_aarch64_v3.16


text:
Recovering data with a mouse when the screen doesn't respond to touch
Suppose my screen breaks, and I can no longer operate it via touch, but I can still see parts of the screen although broken.
In this case, can I connect to my Android device via a mouse (for instance, a Bluetooth mouse, or a mouse via USB hub that allows me to charge my phone or keep it charged while keeping a USB mouse attached simultaneously)?
This way I could back up some pictures that were not saved to Google photos, WhatsApp chats, or other data.
So, this could be useful (navigating with a mouse when your screen is broken and does not respond to touch).
Is Android configured by default to support this behavior? If not, then i think it should. I don't know which screens break the touch sensor only when they break, but perhaps quite a few. In this case, if Android is not preconfigured to allow this behavior, the mouse will not be able to operate, and the data will be unrecoverable.
Thank you for your answers.

Yes, most devices allow an external mouse. Note that if touch doesn't work you won't be able to pair a Bluetooth mouse or enable Bluetooth if disabled, so for starting you need an USB mouse or keyboard plus adapter and hopefully your phone supports USB OTG so that USB devices work.

I think the question is about OTG charging simultaniously - not working on most devices


text:
Dark Mode glitch on Vivo v23 Pro
Why is the Dark mode in my Vivo v23 pro like this? It's bit transparent in darker areas, I'm able to see my phone's background and icons. Its very weird. Any solutions?

This question is similar to: Does my screen have burn in or is it something else?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.

It looks like a burnt-in screen to me.

Is it? Any solutions?

@SayanManna try screen burning a white image


text:
Can a hacker unlock the bootloader of an android device remotely?
Is it true that you can not unlock the bootloader of an android device remotely and the only way you can infect the firmware or bootloader is to have physical access to the device.
What about rooting? Can a hacker root your device remotely?
So if it is true does that mean that no matter what kind of malware your device is infected with you can remove it by simply performing a factory reset?

again, no answer without knowing phone model. for example if device is exploitable with mtk-su, malicious app could gain root access remotely (on tap). for some devices bootloader unlocking is possible by modifying devinfo or seccfg partition (can be done with root access). in case system partition is modified too, simple factory reset won't fix

@alecxs: What about Huawei or Samsung phones? If there is difference between models then what about huawei p or y series or Samsung s or a series? (I have many phones)

@alecxs: So do you think if I got infected by the pegasus spyware on a huawei phone, I can remove it by performing a factory reset?

Pegasus depends on zero-day exploits, I don't think your huawei phone got infected. simple factory reset won't remove root kit

@alecxs: But since rootkits by definition infect the firmware and you said huawei and Samsung phones can't be rooted or unlocked remotely so the installation of a rootkit without physical access should not be possible right?

right. your device is secure

If you can dream it up, it can be accomplished ;) I do not know of any PUBLIC methods to do this at the moment, but I assure you it's possible.
For example, there is a malware called "xHelper" and also matryoshka. You'll see that in this particular example, the kit abuses root privilege to silently install xHelper by directly copying malicious package files to the system partition (/system/bin folder) after re-mounting it in the write-mode.
It also has a sister-kit called Triada. These kits take the extra steps of making their core files immutable, and overwrites to system library /system/lib/libc.so.
This means that you would need to enter into Recovery mode, chattr the libc.so to mutable, delete and replace it with a good version, then re-image. Did I mention this malware family removes your root access? ;) You can get very evil with Android or any OS if you want to.
As far as your second question, factory resets are usually enough to shake malware infections, but if you have an advanced adversary, it can enter parts of the boot process that would be extremely difficult to detect and remove. That said, we're talking government-level attackers.
Most phone malware can be shaken by uninstalling the offending app and/or even rebooting. If you look at 'Exploit Brokers' that buy malware professionally, one of the biggest and most expensive things they pay for is PERSISTENCE. That's because maintaining the malware on the device is increasingly difficult these days.

modifying /system/bin will trigger avb/dm-verity and deny boot. therefore it is necessary to disable dm-verity, but that is not possible on locked bootloader. so this kind of infection does apply to old insecure devices with weak/broken secure boot implementation only


text:
Micro SD cards work on phone with Android 8 but corrupted in phone with Android 11?
I have two SanDisk micro SD cards, a 8GB one for storing my photos and files in a Sony Xperia XA1, which runs Android 8.0 as the OS, the other one is a 128GB used in a Sony Xperia L3 phone, running Android 8.1. Since both of them had problems after years of usage, I bought a new phone, which is a Motorola e40, which runs Android 11.
When I transferred the micro SD card to the Motorola e40, it said the micro SD card is corrupted and asked for re-formatting. It happened to both of the micro SD cards. But the cards were actually working when I put them back to the Sony phones.
I wonder if the problem is on the OS. Does Android 11 use a micro SD card with a file system format different from that used by Android 8? Or is it the problem of the different phone brands?
I recall that both cards had not been formatted by me before when I used them for the Sony phones, so they should be pre-formatted by the manufacturer.
Also, the Motorola phone asked whether I would like to format the card as internal or portable storage (I did not choose either of them because the cards actually can work in the Sony phones and they contain data). But this option never appeared in my old Sony phones. So is it a property of the phone or Android 11?

Is your SD card encrypted? I'm going to assume it's not, but there may be an update you can install that fixes the problem. If the device is different, use the device the SD card works on and copy all the files to your computer as a backup, usually this is a sign that your phone's SD reader is corrupted or going bad, either that or it's the SD card. Hearing you have two different devices, I will go with my chance and say the problem is with the SD card, prepare a backup while you can.


text:
I have 2 .thumbdata files
I have 2 .thumbdata files on my tab for some reason. My tab is the lenovo M10 16GB model
I have some space issues so I was trying to delete some unnecessary files and I came accross DCIM I researched and learner that .thumbdata was a deletable file. My question is,is it normal to have 2 .thumbdata file and if I delete one what will be the consequences?


text:
Impossible to select script line on mobile fone
On any mobile fone running Android, it is impossible to select the whole script line. If you slowly try to move the line to expose more of the script line and then attempt to move the blue end mark of selection to select more of it, it will select everything else in the thread at the top. Is there any other way to select a script line?

Here everything gets selected. And the Select All option will select everything in the post. It is impossible to select the line.

If you are referring to the StackOverflow site, I would try the 'Desktop site' option in the browser to see if that helps as markup format code seems to behave as described when rendering into a horizontal scroll region for lengthy code lines.

thanks! at stackexchange. i also realized i can go into edit post and then easily copy it there. xd


text:
Floating Icon on Home - What is this called?
My volume keys are dead because of some of my stupid mistakes. So I have downloaded a Volume button assist app, that always displays + and - buttons that simulate the volume button behaviour.

I checked and the app is sharing my activities with some other org and I dont want that.
I thought it can be easily built. I want to know what it is called so that I can read some documentation.

I assume it is not an Activity

My guess is that those buttons are placed on a system overlay window that is shown always on top.

Okay. And how do we create a system overlay window?


text:
How to enable ethernet tethering via shell (android 12) [for a start-up script]
I've read numerous threads on doing it with USB Tethering, and I feel confident I could do that. However, I need it for ethernet. I can use Magisk + shell script at /data/adb/service.d. Any other scripts inserted in there I can do, but I do not know what the command is. Not too many people seem to have this question, as it's a recently-introduced feature of Android 11. Phone is a Pixel 3A with the latest PixelExperience Plus (Android 12). Ethernet tethering device is ASIX-based USB-C w/PD passthrough power. The other end of the ethernet connection goes to the router WAN port.
For USB Tethering:
See: https://stackoverflow.com/questions/65800955/programmatically-enable-usb-tethering-on-android-11 and Activate USB tethering from the command line
For how to make a Shell script at boot:
See: https://stackoverflow.com/questions/7873615/how-to-run-script-at-boot-time

Solution that uses the Automate app: https://android.stackexchange.com/a/228258/379837


text:
Recover Data from Boot Looping OnePlus6
I have a OnePlus 6 (all stock except developer options enabled) that randomly started doing a boot loop in the night, I CANNOT lose the data from this phone, any suggestions to recover it?
We are in the middle of renovating a house and the photos and videos on there are our proof to building control that certain things have been done correctly, without these we will be in some trouble.
Cheers.

try to get logcat for more info. don't try anything you have read - it won't work

Thanks, but I have no idea what any of that means, it's been MANY years since I've done anything remotely to do with command line etc.... I'd need talking through it step by step

you need PC and adb for logcat

Thanks for the reply, I understand that, I have downloaded ADB, what now?

logcat says no connected devices

I am afraid this is dead end. but you can view logs in recovery mode maybe

So is there no other way to recover the data?

@Mogs84 whatever data that was back up in your Google account is all that you can lay your hands on. It sucks but Android is designed in a way to not allow the owner to access their data for no fault of theirs. Just because of some software or hardware failure.

the way to recover data off device is, fix the boot-loop and let it boot into stage with access to data. your best options are switching slots (fallback to healthy slot) or install OTA zip from recovery (will hopefully fix it). sometimes only wiping cache partition is enough - you can try first

Thanks Alecxs, have tried all viable options via the recovery mode, reluctand to try factory reset from recovery just yet incase any other option turns up.
How would I install an OTA zip from recovery?

I am not sure. usually copy zip to MicroSD then chose "Apply update from SD card" but adb sideload may work with "Apply update from ADB" https://forum.xda-developers.com/t/3792244

I'm trying the guide here: https://www.thecustomdroid.com/oneplus-factory-image-creation-guide/ and got through everything required to get to flash stage, getting error saying "FAILED (remote: Flashing is not allowed in Lock State)
finished. total time: 1.628s"


text:
Sys can't boot, recovery broken, adb disabled, zero ideas [Oneplus 5T]
I tried to update from crdroid 7 (Android 11) to 8 (android 12) with a clean flash (no format data though) and now my situation is the following:

System is stuck on boot animation
in fastboot, my device is not recognized, adb devices  shows nothing, and fastboot flash waits for devices. I tried reinstalling adb and drives, but my guess is that system is sorta installed and disabled usb debugging, which is off by default. I also tried from another pc, device is not found by it.
twrp is broken, it remains stuck on the twrp logo. Every 5 minutes or the screen flashes black.
I uninstalled magisk before flashing anything.
The devices is not encrypted, I removed the password before starting the process

Now, the only hope: the devices is recognized in recovery mode by the pc, even though windows does not mount the storage. Here is what I tried:

adb root says adbd is already running as root, but I'm unable to access the root in the adb shell.
I tried adb pull \data\media\ but it fails to copy: open failed: Required key not available.
adb sideload the recovery or a rom or magisk ends in error: closed
adb pull /system/build.prop ends in remote object '/system/build.prop' does not exist

So I have not idea how to get the required key to pull the data or enable the usb debugging through adb (so I could reflash the recovery). I have zero clues on how to recover the data and/or the phone so here I am. (I also have to head out from home so I won't be able to reply today)

Even if the phone has no password it can still be encrypted. Modern Android devices are always encrypted no matter what you do. Your device is from 207 initial with Android 7.1 i am not sure if default encryption was enabled on devices at that time. Required key not available also indicates that your user data can not be accessed be cause the default encryption is active but the necessary decryption key is gone or not accessible (assuming you have a recovery that supports user data decryption).

fastboot is unrelated to adb and doesn't require usb-debugging 2. TWRP provides a set of terminal commands (I would start with 'adb pull /tmp/recovery.log')


text:
Moving Screen Position Entirely
My phone screen broke (I dropped the phone) - I wanted to repair it, but it costs a lot.
The company where I bought fixed the screen for me, but it doesn't work properly still - at least not 100%.

Marked part of the screen on the image is not responding to touch.
The solution I came up with is to somehow in Android Developer settings move the screen these 50px down, so it starts under the camera, and so I can use the phone like nothing ever happened.
Do you guys know how it can be done?
I looked everywhere but didn't find a solution ;/
Thank you in advance!

PS. The image below shows basically what I want to accomplish:

Have you tried this https://mashtips.com/hide-display-notch-and-cutouts-on-pixel/ ?

I did it, thank you very much, but sadly it's more than I thought it is. I also changed screen DPI, that's how it looks like, but it still has to be moved down to work properly: https://i.postimg.cc/Rh6r82xL/298362512-430104902505949-7469116080281976904-n.png

Ok, I was able to change screen resolution via ADB shell commands, not it looks like this: https://scontent.fpoz4-1.fna.fbcdn.net/v/t1.15752-9/299264174_742590493489957_9171596892222942583_n.jpg?_nc_cat=107&ccb=1-7&_nc_sid=ae9488&_nc_ohc=2gnF4R8zn1oAX9_xw9J&_nc_ht=scontent.fpoz4-1.fna&oh=03_AVIz0sfmHtqJYczmfp__KQUJPAd3VfWh8_XaVER9hMy4AQ&oe=63245F37

But I have no idea how can I change placement of the screen to move whole screen down, then it would be perfect

I find out the solution (ALMOST) - it's overscan option, for example: adb shell wm overscan 0,0,0,-200

Sadly, it does not work since some Android version (unknown command prompt)