text:
Tablet battery replacement and alloc_device_open fail?
I had to do a battery replacement on an Android 4.x tablet Denver TAC-97032.
The battery had been obtained from the manufacturer as aftermarket part; it is however not of the same size as the original one.
Still, I opened the tabled, desoldered the old battery, and soldered the new one; behavior thereafter is:

If I just plug in the charger, I get the Android "battery fills" animation for a while, the animation shows charging, and then it disappears, as usual. Good - means battery is detected and is mounted properly.
If I boot with Power + Vol Up, I get into the recovery, which here just shows the "dead android" picture; there are no extra menus for ADB sideload or similar, so basically it just sits there; adb can also see a "recovery" device, and adb reboot is also recognized and works
If I boot with just Power: first the DENVER splash is shows, then an Android splash screen is shown, then screen goes black (but there is still backlight it seems); device appears dead, but if I hold Power to force shutdown, at end a click from the speaker is heard and flash from screen seen - meaning the device ran also under the black screen.

At the black screen, I tried adb - and luckily, it worked:
$ ./adb.exe logcat
--------- beginning of /dev/log/main
I//system/bin/e2fsck(   67): e2fsck 1.41.11 (14-Mar-2010)
I//system/bin/e2fsck(   67): /dev/block/nande: clean, 5183/76800 files, 205676/307200 blocks
I/logwrapper(   67): /system/bin/e2fsck terminated by exit(0)
I//system/bin/e2fsck(   72): e2fsck 1.41.11 (14-Mar-2010)
I//system/bin/e2fsck(   72): /dev/block/nandh: clean, 15/20496 files, 2623/81920 blocks
I/logwrapper(   72): /system/bin/e2fsck terminated by exit(0)
--------- beginning of /dev/log/system
I/USB3G   (   85): usb 3g monitor v0.1 start
I/USB3G   (   85): event { 'add', '/devices/platform/sw_hcd_host0/usb1', 'usb', '', 189, 0 }
I/USB3G   (   85): event { 'add', '/devices/platform/sw-ehci.1/usb2', 'usb', '', 189, 128 }
I/USB3G   (   85): event { 'add', '/devices/platform/sw-ohci.1/usb3', 'usb', '', 189, 256 }
I/Netd    (   80): Netd 1.0 starting
I/Vold    (   79): Vold 2.1 (the revenge) firing up
D/Vold    (   79): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold    (   79): Volume extsd state changing -1 (Initializing) -> 0 (No-Media)
D/Vold    (   79): Volume usbhost1 state changing -1 (Initializing) -> 0 (No-Media)
D/Vold    (   79): Volume sdcard state changing 0 (No-Media) -> 1 (Idle-Unmounted)
I/SurfaceFlinger(   81): SurfaceFlinger is starting
I/SurfaceFlinger(   81): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
E/[Gralloc-ERROR](   81): int alloc_device_open(const hw_module_t*, const char*, hw_device_t**):436 UMP open failed with 1
E/FramebufferNativeWindow(   81): couldn't open framebuffer HAL (Operation not permitted)
E/[Gralloc-ERROR](   81): int alloc_device_open(const hw_module_t*, const char*, hw_device_t**):436 UMP open failed with 1
E/FramebufferNativeWindow(   81): couldn't open gralloc HAL (Operation not permitted)
E/SurfaceFlinger(   81): Display subsystem failed to initialize. check logs. exiting...
I/        (   82): ServiceManager: 0xf958
I/AudioFlinger(   82): Loaded primary audio interface from sunxi audio HW HAL (audio)
I/AudioFlinger(   82): Using 'sunxi audio HW HAL' (audio.primary) as the primary audio interface
I/CameraService(   82): CameraService started (pid=82)
I/AudioFlinger(   82): AudioFlinger's thread 0x1c7b0 ready to run
W/AudioFlinger(   82): Thread AudioOut_1 cannot connect to the power manager service
I/AudioPolicyService(   82): Loaded audio policy from LEGACY Audio Policy HAL (audio_policy)
I/SurfaceFlinger(  129): SurfaceFlinger is starting
I/SurfaceFlinger(  129): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
I/[Gralloc](  129): using (fd=10)
I/[Gralloc](  129): id           =
I/[Gralloc](  129): xres         = 1024 px
I/[Gralloc](  129): yres         = 768 px
I/[Gralloc](  129): xres_virtual = 1024 px
I/[Gralloc](  129): yres_virtual = 1536 px
I/[Gralloc](  129): bpp          = 32
I/[Gralloc](  129): r            = 16:8
I/[Gralloc](  129): g            =  8:8
I/[Gralloc](  129): b            =  0:8
I/[Gralloc](  129): width        = 163 mm (159.568100 dpi)
I/[Gralloc](  129): height       = 122 mm (159.895081 dpi)
I/[Gralloc](  129): refresh rate = 60.12 Hz
D/libEGL  (  129): loaded /system/lib/egl/libEGL_mali.so
D/libEGL  (  129): loaded /system/lib/egl/libGLESv1_CM_mali.so
D/libEGL  (  129): loaded /system/lib/egl/libGLESv2_mali.so
E/SurfaceFlinger(  129): couldn't find an EGLConfig matching the screen format
W/SurfaceFlinger(  129): ro.sf.lcd_density not defined, using 160 dpi by default.
I/SurfaceFlinger(  129): EGL informations:
I/SurfaceFlinger(  129): # of configs : 21
I/SurfaceFlinger(  129): vendor    : Android
I/SurfaceFlinger(  129): version   : 1.4 Android META-EGL
I/SurfaceFlinger(  129): extensions: EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer
I/SurfaceFlinger(  129): Client API: OpenGL ES
I/SurfaceFlinger(  129): EGLSurface: 5-6-5-0, config=0x0
I/SurfaceFlinger(  129): OpenGL informations:
I/SurfaceFlinger(  129): vendor    : ARM
I/SurfaceFlinger(  129): renderer  : Mali-400 MP
I/SurfaceFlinger(  129): version   : OpenGL ES-CM 1.1
I/SurfaceFlinger(  129): extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_matrix_get GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_point_size_array GL_OES_point_sprite GL_OES_texture_npot GL_OES_query_matrix GL_OES_matrix_palette GL_OES_extended_matrix_palette GL_OES_compressed_ETC1_RGB8_texture GL_OES_EGL_image GL_OES_draw_texture GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_OES_framebuffer_object GL_OES_stencil8 GL_OES_depth24 GL_ARM_rgba8 GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_OES_texture_cube_map GL_EXT_discard_framebuffer GL_EXT_robustness
I/SurfaceFlinger(  129): GL_MAX_TEXTURE_SIZE = 4096
I/SurfaceFlinger(  129): GL_MAX_VIEWPORT_DIMS = 4096 x 4096
I/SurfaceFlinger(  129): flags = 00000000
D/display (  129): ####disp_init, mode:0,out_type:1,tv_mode:0,app_width:1024,app_height:768
D/DisplayDispatcher(  129): display dispatcher enabled

... and here logcat stops - there are no further messages.
So, the primary error seems to be "Display subsystem failed to initialize", and it explains the black screen; however I cannot really tell:

Is this a hardware cause: maybe during battery replacement, I accidentally disconnected some pin from the display, so even if I get splash screens shown at start, there is an error later when normal operation is initialized?
There are very few resources online mentioning this error, and I think I got to an IRC chat log, where a factory reset was recommended for an error like this. I would imagine, that maybe there is an ID on the battery of sorts, and since now it is changed from the original one, the OS sees that as an error, and refuses to proceed. Obviously, I do NOT want to do a factory reset - because then, I lose all of the data on the device (I'd do an adb backup, but that typically raises a prompt on the device, and since the screen does not work, I couldn't have allowed it even if the system booted to a state where it would have shown the prompt)

So, my questions are:

Would anyone know what is more likely as the cause of ump_open error: hardware wire misconnection, or maybe differing ID of the battery?
Is it realistic to hope that factory reset would solve this problem?
If I need to do factory reset, is there any way I can back up this device purely from adb (but not using any GUI elements on the target device)?
Logcat says: "Display subsystem failed to initialize. check logs." - are there other logs than logcat I could check; and if so, which are they?
Is there anything else I could try, to get this tablet to boot fully?

Was the tablet fully working before the battery replacement? Regarding the check logs entry I would assume that this is a generic output of a driver developed for Linux. It might not be applicable on Android at all.

Many thanks @Robert - tablet was indeed fully working before; however it had been turned off for several months before todays battery replacement attempt. Thanks for the check logs comment, that makes sense.

Well, that was a doozy for me...
First of all, I found that the previous state of this tablet was not quite working - old battery ended up discharging completely; after that, plugging in charger only showed the "battery charging" splash screen, but device refused to boot; and at that point it was stashed away - until now.
Anyways: first of all, as documented here Why would Android list some files that are not accessible (I/O error)?, I discovered there were some system files which caused I/O error. That made me think that there is a possible corruption of the /system flash partition - in which case, a factory reset would indeed help.
First of all, mounts visible at this time via adb (at this time, I still run it from a folder under MSYS2 bash, therefore the doubled slashes) were:
root@android:/ # mount
mount
rootfs / rootfs rw 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/nandd /system ext4 rw,nodev,noatime,user_xattr,barrier=0,data=ordered 0 0

Cool, so we know now nandd is the /system partition. Let's check all block devices:
root@android:/ # ls /dev/block
loop0
loop1
loop2
loop3
loop4
loop5
loop6
loop7
nanda
nandb
nandc
nandd
nande
nandf
nandg
nandh
nandi
nandj
ram0
ram1
vold

(vold is some old Android init, which only appears, it seems, when there is a "normal" adb connection - not when in recovery).
So, I thought, I should try a backup, and somehow check for corruption; first I tried this for backup:
$ ./adb.exe backup -apk -shared -all -f /c/BACKUP/2021_06_26_DENVER_TAC_97032.ab
WARNING: adb backup is deprecated and may be removed in a future release
Now unlock your device and confirm the backup operation...

... but this needs an active GUI for confirmation - and my display here won't boot... so no dice.
Then I found https://github.com/TissueFluid/yaffs2-recovery which made me try:
$ ./adb shell 'nandread -d /dev/block/nandd -f /dev/tty' > nandd.bin

Problem being, I don't really have spare disk space at this point, so I tried redirecting to /dev/stdout (so I can save the stream on the PC) but it didn't exist; and finally I tried /dev/tty - but all I got were some text error messages in the output file: "failed get mtd info for /dev/block/nandd, Not a typewriter".
Ok, so I thought, let me check for corruption:
root@android:/ # e2fsck /dev/block/nandd
e2fsck /dev/block/nandd
e2fsck 1.41.11 (14-Mar-2010)
e2fsck: Device or resource busy while trying to open /dev/block/nandd
Filesystem mounted or opened exclusively by another program?

root@android:/ # umount /system
umount /system
failed: Device or resource busy

Eh yeah, can't really unmount the /system partition, when it is the system in use ...
Then I found this: https://superuser.com/questions/401217/how-to-check-root-partition-with-fsck - none if it is really applicable here.
Then I made a bad mistake: I found there is a program directiotest - so I thought, what could go wrong, it is a "test" of block devices? BAD mistake:
root@android:/ # /system/xbin/directiotest
/system/xbin/directiotest
Usage: directiotest blkdev_path

1|root@android:/ # /system/xbin/directiotest /dev/block/nandd
/system/xbin/directiotest /dev/block/nandd
Starting test
Testing area 8192/8192 (100.00% complete)
Test complete

root@android:/ # ls -la /system/xbin
ls -la /system/xbin

Ouch ...
$ ./adb logcat
- exec '/system/bin/sh' failed: No such file or directory (2) -

Oops ... the entire /system filesystem is now gone! Looking at the source afterwards https://android.googlesource.com/platform/system/extras/+/master/tests/directiotest/directiotest.c - it turns out that it "tests" by writing bytes in Flash memory, then reading them; which (now) obviously causes the entire content to be wiped!
Oh damn; only recovery left to try: turn off tablet; Power + Vol Up to get to "dead droid" splash; and the Power + Vol Up + Vol Down (or some other combo) - and I could see that /sdcard files were still live and listed! Boy, I better back that up ... but if I couldn't do it with adb backup earlier, I would be even less able to use it now ...
Then I found https://stackoverflow.com/questions/19908641/how-do-you-use-force-adb-to-backup-without-user-confirmation, which suggests:
sudo adb shell dd if=/dev/block/bootdevice/by-name/boot > boot.bin

Well, I didn't have dd before, and now I don't even have shell - so nope ...
Funny enough, as suggested in https://stackoverflow.com/questions/10050925/how-do-i-adb-pull-all-files-of-a-folder-present-in-sd-card -- I could still use adb pull to copy files from sdcard; but:
$ ../adb pull '//sdcard'
adb: error: cannot create '.\sdcard\Android\data\net.nurik.roman.muzei\cache\artcache\net.nurik.roman.muzei_com.google.android.apps.muzei.gallery.GalleryArtSource\file__external_images_media_16730_a40e97f6903cd2217b225c5fcec4cfcc_6d89a17d2a7ee168c95d93662a817314': Not a directory
pull: building file list...

So, this might have worked - unfortunately, adb breaks the process at first error, and apparently also /sdcard got corrupt ...
To solve this, ADB pull stops after first error suggests tar - but yeah, I do not have tar anymore, as it resided on the wiped /system ... I also found a suggestion for:
$ ../adb-sync --adb=../adb --reverse //sdcard/ .
INFO:root:Sync: local b'.', remote b'//sdcard/'
ERROR:root:Device not connected or not working.

Yup, this also uses /system commands, which are now wiped...
And finally, this https://stackoverflow.com/questions/29442630/copy-full-disk-image-from-android-to-computer helped:

As said in comment, adb pull /dev/block/mmcblk0 mmcblk0.img worked for me

Nice:
$ ../adb pull //dev/block/nanda nanda.img
//dev/block/nanda: 1 file pulled, 0 skipped. 5.9 MB/s (16777216 bytes in 2.702s)
...
$ ../adb pull //dev/block/nandj nandj.img
//dev/block/nandj: 1 file pulled, 0 skipped. 4.3 MB/s (5519704064 bytes in 1237.721s)

Yup, got all nand devices now; quick check:
$ for ix in *.img; do echo "$(du -hs $ix); $(file $ix)"; done
16M     nanda.img; nanda.img: , code offset 0x0+3, OEM-ID "        ", sectors/cluster 4, root entries 256, sectors 32768 (volumes <=32 MB), Media descriptor 0xf8, sectors/FAT 32, sectors/track 0, dos < 4.0 BootSector (0x0), FAT (16 bit)
16M     nandb.img; nandb.img: data
32M     nandc.img; nandc.img: Android bootimg, kernel (0x40008000), ramdisk (0x41000000), page size: 2048, cmdline (console=ttyS0,115200 rw init=/init loglevel=8)
512M    nandd.img; nandd.img: data
1.2G    nande.img; nande.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-ffffabf4-655f-ffffbf67-946fc0f9fffff25b (extents) (large files)
16M     nandf.img; nandf.img: data
32M     nandg.img; nandg.img: Android bootimg, kernel (0x40008000), ramdisk (0x41000000), page size: 2048, cmdline (console=ttyS0,115200 rw init=/init loglevel=8)
256M    nandi.img; nandi.img: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-ffffabf4-655f-ffffbf67-946fc0f9fffff25b (extents) (large files)
5.2G    nandj.img; nandj.img: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "android ", sectors/cluster 8, sectors/track 63, heads 64, sectors 10776527 (volumes > 32 MB), FAT (32 bit), sectors/FAT 10504, serial number 0x7d690be0, label: "CRANE      "

Nice, so apparently nandj here is /sdcard ... Now I can fsck the image files instead, but I have to boot to Linux for that ...

Right, so - as per https://askubuntu.com/questions/1147586/identifying-the-file-system-of-an-img-file-and-mount-it , it turns out that the images which are Android bootimg are mountable as sysfs:
$ mkdir /tmp/nandc
$ sudo mount -t sysfs -o loop nandc.img /tmp/nandc
$ ls /tmp/nandc
block  class  devices   fs          kernel  power
bus    dev    firmware  hypervisor  module

$ mkdir /tmp/nandg
$ sudo mount -t sysfs -o loop nandg.img /tmp/nandg
$ ls /tmp/nandg
block  class  devices   fs          kernel  power
bus    dev    firmware  hypervisor  module

However, since sysfs is is a pseudo file system provided by the Linux kernel, there seems to be no fsck for it. So, we can only do a file system check on the ext4 and DOS partitions.
$ e2fsck -p -f nande.img
nande.img: Directory inode 61534, block #0, offset 0: directory corrupted

nande.img: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
    (i.e., without -a or -p options)

$ e2fsck -f nande.img
e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Directory inode 61534, block #0, offset 0: directory corrupted
Salvage<y>?
...

$ e2fsck -y -f nande.img
...
Free inodes count wrong (71634, counted=71639).
Fix? yes

nande.img: ***** FILE SYSTEM WAS MODIFIED *****
nande.img: 5161/76800 files (4.9% non-contiguous), 204247/307200 blocks

$ e2fsck -f nande.img
e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
nande.img: 5161/76800 files (4.9% non-contiguous), 204247/307200 blocks

$ e2fsck -y -f nandi.img
...
nandi.img: ***** FILE SYSTEM WAS MODIFIED *****
nandi.img: 11/16384 files (0.0% non-contiguous), 2089/65536 blocks

$ e2fsck -f nandi.img
e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
nandi.img: 11/16384 files (0.0% non-contiguous), 2089/65536 blocks

$ fsck.vfat nanda.img
fsck.fat 4.1 (2017-01-24)
nanda.img: 44 files, 4188/8171 clusters

...
  Bad short file name (╗ö2╜Uδ┐F.pAñ).
1) Drop file
2) Rename file
3) Auto-rename
4) Keep it
? 3
...
Orphaned long file name part "img-28773653"
1: Delete.
2: Leave it.
? 2
Reclaimed 98484 unused clusters (403390464 bytes).
Free cluster summary wrong (321342 vs. really 419828)
1) Correct
2) Don't correct
? 1
Perform changes ? (y/n) y
nandj.img: 2483 files, 924607/1344435 clusters

So, quite a bit of corruption - unfortunately, repeated fsck of nandj does not seem to clear the errors ...
Regardless, I have as good nand backup as I can now, so I can try "wipe data/factory reset" from the Android system recovery <3e> menu ... Unfortunately, the end result now is:
-- Wiping data...
Formatting /data...
Formatting /cache...
E:failed to mount /system (Invalid argument)
Data wipe complete.

Eh, so apparently you cannot recover /system on this device ...
So my best bet now, is to somehow find the original firmware to restore.
In summary: the old battery, upon failing, probably caused some flash corruption -- which was first revealed upon the installation of the new battery. In spite of my error of wiping /system, it was corrupt to begin with, and factory reset would not have helped even if I did not make the mistake of wiping it.


text:
Automating android: stop all system/app related interference that prevents 100% reliability?
A team of us at work are trying to use Pixel 4a phones to take pictures every 30sec of a remote process from 6a - 6p each day, uploading the pictures to our AWS storage container.
My colleague wrote an app which uses the CameraX driver, however our uploads keep stopping but we are not sure how to find out why. As an alternative path, I have been exploring using something "off the shelf" like Framelapse coupled with Tasker and AutoInput to open Framelapse each day.
One challenge is that Android does unexpected things that thwart the ability to run this phone more like an industrial process computer. For example, I thought I'd successfully gotten Framelapse to auto-start via Tasker, and out of the blue (as in, it hadn't happened during many other attempts) I got a popup asking me if I want to rate the app. As a result, AutoInput couldn't find the button to start the recording as a result.
My questions:

is it possible to entirely silence any behavior other than what the user has specifically done?
if so, is there a comprehensive list of these settings?
if not, given our goal of taking pictures every day for months without interruption, is there an alternative approach you would suggest (that uses Android phones; I realize we could start from scratch on other hardware)?

Many thanks.

source: Stack Exchange

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

sort: votes


text:
How to Remove in Bulk Specific Website from Chrome's History?
I want to remove specific website mentions from Chrome's history on Android but doing it one by one will take a lot of time.
For example on Chrome for desktop, you can remove specific website mentions from history using bulk action.
I haven't found a way to do that on Chrome for Android. I though maybe I can access history of my smartphone on desktop and do removals but I can't find a way.

No not possible ; IDK of any app that does this

Can I delete entire history and then restore entire history from Chrome cloud backup or something?

I don't think so

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


text:
Audio over USB Android
Hi i have a android phone and want to use the Audio over USB feature  on the phone to connect the audio output to a windows computer
i dont have a usb driver and the windows errors about the driver does anybody know what driver where to get it?

Please edit your post to include the manufacturer/model number/OS version/USB type (micro USB or USB-C) of your android device AND details about your PC (Windows version).

Related: https://android.stackexchange.com/a/225350/218526

@MorrisonChang ,
Standaeed Window 10
And a Android phone,
However it  looks like people have abandoned the AOA project , do you have anything that could help.

@IrfanLatif thanks also


text:
Must a device's bootloader be unlocked to temporarily boot into another recovery?
If I want to boot into a temporary recovery by issuing command
fastboot boot my_temp_recovery.img

must the bootloader of the device first be unlocked?

A locked bootloader boots a boot.img (or recovery.img) only if it's signed with OEM's private keys: https://android.stackexchange.com/a/218886/218526

@alecxs It depends on the OEM. I had a Nokia device which used to boot boot.img from factory firmware. Never tested with any other device because the very first thing after having a device is bootloader unlocking ;)

It does indeed look like an unlocked bootloader is a requirement even for temporary boots, the key message found is the Device not unlocked cannot boot
$fastboot boot twrp.img
Sending 'boot.img' (15240 KB)            OKAY [  0.510s]
Booting                                  FAILED (remote: '    Device not unlocked cannot boot')
fastboot: error: Command failed

$fastboot oem device-info
(bootloader)    Device tampered: true
(bootloader)    Device unlocked: false
(bootloader)    Charger screen enabled: false
(bootloader)    Display panel:
OKAY [  0.000s]
Finished. Total time: 0.000s


text:
How to find PID of test runner
I have my app and my tests saved as following:
App package name: com.my.app
Test runner: com.my.app.test

When I run the app by itself, I can use adb to see the pid of my app: adb shell ps | grep com.my.app
u0_a839      14710  1044 41927360 714352 0                  0 S com.my.app

When I run my app with automation, I tried calling the same adb command while the tests were running: adb shell ps | grep com.my.app.test
But nothing shows up.

I would try to use frida-ps from Python frida-tools. You don't need a rooted device or install anything on device for frida-ps. Just execute frida-ps -Ua and it will list you all running apps by packageName and their pid.


text:
Why no storage error showing with my space empty?
Im having more than 12GB free space

And when i try to install app or update app im getting no storage error. I have clear cache also still showing same issue. Any suggestion. Thanks

Do you use an sd-card mounted as internal storage (adopted storage)?

Does this answer your question? How disk space is used on Android device?

@Robert No i dont use SD cards


text:
Constant busy tone on a brand new LG L322DL
This is probably one of the weirder things on a phone that I've personally seen. This morning I finished setting up a brand new, out of the box, LG L322DL on Android 10. Setting up a Google account, check. Got all the updates, check. Then I noticed a sound that I thought was a dial tone coming from the phone.
Tried rebooting it. Still there. It's a kind of a low beep that changes with the volume going up or down, but even at the maximum volume it is still kind of low. I later realized it is not a dial tone, but sounds exactly like a telephone busy signal.
The beep would remain for a long time and it almost feels like it's going to stay. But then it would disappear out of the blue for a short while (a few seconds, a few minutes, or until the next reboot) and then come back, without me doing anything. I have done my homework and found some pages where people talk about similar problems, e.g. this and this. I have tried everything suggested on there, including putting the phone in safe mode. Nothing has worked.

Even if something happens and then the busy tone goes away, regardless of whether the two have a causal relationship, on reboot the beep comes back.

The tone disappears from time to time but always comes back later.

The phone is isolated and charged. It has nothing to do with battery, charging, notifications, roaming, or sound effects as far as I can tell.

I have the same problem on this phone. The busy signal comes when I plug in the headphone. Since this is not my primary phone, it doesn't need to connect to the cellular network all the time. About an hour ago, I turned on the airplane mode and use Wi-Fi only. The busy was signal magically gone. I will update the post if this method really works.
If it turns out that there is not an easy fix, I would go to the path of updating the OS or install an OS from another sources.

Good to know I am not alone in these efforts! Good luck to you!


text:
Turn OnePlus 3 on with broken power and volume buttons
As title suggests, I'm looking for a way to turn my OnePlus 3 on but I have the following issues:

Volume buttons do not work
Power button does not work
USB debugging is not enabled
Phone is currently off...

Any ideas?

Off means "display off" or "phone has been shut down"?

There appears to be no obvious workaround to power on your device, if neither your power button or volume button work.
You might be able to revive your buttons with some isopropyl alcohol and intensive button pressing. On the old Nintendo DS, you were also able to briefly revive buttons by breathing/blowing into the buttons and repeated button presses.
Another more advanced possibility, if you have nothing too lose, is to open up the device and see if you can bridge the contacts the button is supposed to activate. You might also find replacement parts on the internet.


text:
How to get encryption keys for "adoptable storage" in MotoG3 without root - alternate methods, anyone?
So my sister in law handed me her MotoG3 where some apps had mysteriously disappeared and the videos of their little puppy were all gone (the videos of their kids were not as important apparently). Her SD was formatted as adoptable storage, no backup of course... I spent 8 hours yesterday reading up on how adoptable storage works encryption wise (not in depth, but I know about the vold dir with key files) and doing non-destructive tests on the phone. I also have a Linux "dd" copy of the SD card so I can mess around as much as I like with that card. I do understand that in a previously rooted phone it will be no match to read the key file(s) but obviously her phone is stock. In a PC environment, I would boot with Knoppix or some other Linux rescue image on a USB stick to get access to the disk in a similar case. I just wanted to ask if this can be done with a phone (preferably not just "a" phone, but the MotoG3 :).
Other ideas: The vold dir is in the /data partition and in my Linux/PC oriented mind, I have a delusional thought that perhaps one could install some "mini-OS" in the boot partition and leave the /data partition intact. That image could even have as its only task to copy the key files to a readable area or another SD card so no user-interaction would be necessary. Since no one has come up with this idea for the past 6 years or so that adopted storage has been around, I guess the answer is a big NO. Still, would anyone care to enlighten me as to why this is not possible or (still hoping!) suggest how this could be done!
Decryption of AES128 (which the partition seems encrypted with) is "cumbersome". I guess there are no known "salts" that weaken the AES significantly that we could use to brute-force the encryption, or are there?
As an alternate method, I guess the chip could be removed from the board or perhaps read while still attached with a chip reader, but that's over my budget and level of expertise. Also, for videos of a puppy, that might be excessive :)
If anyone as more ideas, feel free to reply!!!

The device is pretty old, if I am not mistaken it should run Android 6.0? On such old device there might be a chance to root the device without clearing all data using e.g. the Dirty Cow exploit (check the sued kernel version). Also check what is displayed in Android Security settings, especially if there is something mentioned about "Hardware security".

Yes, Android 6.0.1. I'll have to read up on that exploit. I returned the phone just now so she can make calls and so on but I'll probably invest the whopping $40 for another used G3 just to experiment for the fun of it. If I can root that one, I can root the original "casualty" later and make my wife's sister happy :) Thanks for the suggestion! If anyone cares to point me in the right direction for the Dirty Cow exploit, that'd be great!

clone the sd card and insert the healthy one. 2) or do 1:1 raw dump of whole phone via edl mode (so you have at least some failsafe backup in encrypted/locked state). root with kingoroot, get the key, restore backup


text:
Samsung phone has a broken power button, no physical home button and no bixby button. How can I power it up?
I have a Samsung A20 (A205W) with a broken power button (probably water damage), the only other physical buttons are the volume buttons. How can I power it up?
Thanks

Volume Down + usb cable, then flash something and wait for auto reboot. Be warned this might brick in case power button is short-circuited (and interrupt flashing)

Thanks, I ended up pressing up and down button then plugging it in and it worked


text:
Voice Changer in Realtime GSM Phone Call
hello I was wondering whether it would be possible to apply voice changer on GSM Phone call in realtime?
If possible, then I'm thinking of using a voice changer mechanism to secure the voice data before being transmitted to the receiver.

There are any number of voice changer apps available in the Play Store.  They may or may not be any good.

yes, and I've tried several existing applications but haven't found one that works in realtime. Most app works by recording the sound first and then selecting the sound to be sent when a phone call is in progress. This is not what I need.


text:
Unable to transfer files from Mi A1 to PC and wifi is also not working
I have a Mi A1 device which I didn't use for months and today I charged it to root for some work. I am sure Wifi was working earlier, but not sure about USB file transfer. (I didn't check wifi this time, just charged and started the rooting process)
I was able to unlock the bootloader and root the device and while I was in TWRP, I was able to transfer files from my PC to the android device. After rooting this device, I am seeing this

When I tried turning the wifi on, it automatically disables the wifi. I click the enable button and it automatically disables.

I wanted to connect the device using ADB, but when I connect the USB cable to the PC, its not showing up in ADB. Its not even showing in windows explorer where you can transfer files.

I am not sure how to solve this issue.
Mi A1 device running Android 9

if formatting userdata did not solve your problem, you probably messed up some wifi related partition. go back to square one and start from working firmware


text:
How options do I have for data recovery for my Samsunge Note 4?
The screen on my Samsung Note 4 cracked. Unfortunately, I did not back up the data in internal memory before that happened. Although the phone works, I have no way to access my data since I don't have a screen.
I am trying to determine what the best path forward is for recovering my data. These are the options I have identified as of the the moment.

I have an extra note 4 lying around and thought it might be possible to try and switch the screens, but I am not sure if that is easily doable.
Have a professional recover the data for me.

If anyone knows of other options then please let me know. For example, if there is a way to access the contents of the phone without a screen that would be really helpful.
Which is the best path forward? Should I just bite the bullet and pay for recovery services?

https://android.stackexchange.com/q/159551 you have a second device - perfect for doing things "blind"

even more lucky your devices support MHL 3 TV-out, just need MHL compatible TV or MHL to HDMI adapter and connect monitor + mouse + keyboard with OTG hub


text:
How to create an exact image of all the internal memory including the "free space"?
My father has done a reset by accident on his smartphone.
He has very important data he needs that was deleted.
Is there a software/app/way that will copy the internal memory (hard disk) exactly as it is byte-by-byte to my computer (also copying the "empty" parts of the disk because this is where the deleted files I want to recover are located)?
I want that as first step because I see there are a lot of different software that offer that but I would rather try more then 1 in order to extract as much data possible (they each have their pros and cons). Most of these programs also install an app or tweaks stuff on the phone and I would like to use each on the original copy.

Have you read my comment on your last question? You still don't name the Android version or the device model you use and if the device was encrypted because it it is then what you are trying to do is useless because encrypted data can not be recovered without the key.

raw dump: for Qualcomm chipset in EDL mode with edl.py, for Mediatek chipset in preloader mode with SP Flash Tool. but as Robert already stated raw dump is useless because encryption keys are UNRECOVERABLE from factory reset

Pocophone f1
@Robert

Pocophone F1 is encrypted with full-disk-encryption. crypto footer is located at the end of userdata partition. userdata partition is formatted on factory reset. new crypto footer is created on boot. old crypto footer is overwritten and therefore unrecoverable. disk image is of no use for data recovery

Thanks @alecxs and @Robert!


text:
Can 2 smartphones comunicate with each other over bluetooth if bluetooth is turned off?
Such a situation:2 smartphones have the same app and they are in the same bluetooth range. Can the app detect proximity between 2 devices over bluetooth if bluetooth is turned off on 2 devices

If Bluetooth is off on both devices how should they communicate?

@Robert I don't  know. I read somewhere that for example  NFC can communicate  in such a way.

It won't communicate with Bluetooth.

@Jacewerlock using NFC two devices can exchange some data but they have to be very close to each other. The maximum distance is usually about 15 cm and the amount of data that can be transmitted is very small (a few hundred bytes?). And for NFC it is the same as with Bluetooth if NFC is disabled one one device communication will fail.

Sorry but your question is unclear, what do you mean by "this way"?

@Robert  I mean for detecting proximity between 2 smartphones over wi fi direct   we also need to have 2 devices  that turned  on wi fi direct?                                                                                And is that mean that apps can't detect proximity between 2 smartphones if users haven't enabled Bluetooth, Nfc, wi fi  direct ?


text:
How to tell if an app is calling a system function and debug it
Super noob here for android. I have a dice app and I don't trust it! I want to see what is generating the numbers that it gives (1 through 6 each roll). To start with I was thinking I would see if it calls whatever system/math function android has for rand() (I assume there is one).
I don't have a version of the app with debugging enabled. Can I put a breakpoint (or whatever we call them these days) inside the system's rand() function to see if it gets called?
Thanks!

Root your device, install Xposed and hook into whatever system APIs you want to track.

Typically Dice applications aren't very complicated any may be even not obfuscated. Then you can simple decompile it using e.g. Jadx and check which Java functions are used. Alternatively inject Frida into the app so that you can trace or hook functions to se when they are called and if the result is the shown output.


text:
Google maps unavailable issue solved by playing Spotify or Amazon Music first
I am frequently facing this issue.

I would connect my Android 10 phone to our 2021 RAV4 Android Auto USB.

Then Google Maps would close up on my phone.

While that happens, the RAV4 console would notify blue tooth disconnected and Android Auto connected. Wait till these messages are completed.

But when I click on the RAV4 console Map button, the console would notify that no Map application was available or that Android Auto disconnected.

But fear not, I have a way to solve the Maps availability issue by taking these steps.

Connect my phone to the RAV4 Android Auto USB.
Ensure I do not press the Map button on the RAV4 console yet.
Play Spotify or Amazon Music on my phone first.
Then press the Map button on the RAV4 console.

Questions:

What is Google doing wrong that Spotify or Amazon Music is doing right?
What are the protocol disconnects between my phone and the RAV4 Android Auto that is causing these frequent disconnects. Feel free to refer me to other StackOverflow coding sites.

Sounds to me like Google Maps is not closing but the app is crashing. The question why this happens is difficult may be it was used in an unexpected way or some other problem occurred. If you connect the phone directly after this happens to a PC and check adb logcat may be you may find an error message and a stack trace.


text:
How is Google Play services still running after disabling?
A while ago I disabled Google Play services, Google Play Store and lots of other Google apps in my phone.
Below is a screenshot.

One can see that Google Play services is still having cached background processes.
How can a disabled app have cached background processes?
I tried stopping the process, but keeps reincarnating.
Rebooted the device, no luck.
I was also not signed into the device with any Google account.
It's a Nokia 2.2 (Android 10). Nokia won't provide any information about rooting or modifying this device. This device is really shady.
What can I do to get rid of this?

It's because GMS is privileged (framework and system apps). They provide system-level services like auto-backup, cloud messaging and location provider. So they cannot be entirely disabled. OS may enable any component of an app if required by some other functionality. Unlocking bootloader, rooting the device, and uninstalling the not-required apps is the only way to get rid of this.

Google Play Services is essential for all Google apps and for a lot of apps that use Google services. Disabling it does not make sense at all if you still have apps like GMail installed.


text:
Local Calendar events disappeared
I tried to remove a repeating calendar event from the unsynchronized Local Calendar account using the stock calendar app1. At first I thought that all calendar events were deleted (not just the repeating event), because the calendar was now completely empty.
But then I realized that I could still export all calender events using Calendar Import - Export.
And sure enough, inspecting /data/data/com.android.providers.calendar/databases/calendar.db revealed that all events were still there.
I tried the following to have the events displayed again in the calendar app:

Checking the proper calendar account was selected (it was, there is only one)
Using another app: DigiCal also displays no events (which it previously did)
Resetting the calendar app
Restoring the calendar app from a backup
Clearing the cache (not the data) of the Calendar Storage app that provides the database file mentioned above
Manually adding a new event works, but all other events are still missing. Exporting all events again now also includes this new event.

Nothing of the above fixed the problem. I could purge the data from the Calendar Storage app, clearing the DB and importing all events that I previously exported. But I'm hestitant to do so without understanding what's gone wrong and how I can properly fix it so it won't happen again, and I'm not sure this would even work.
What's going on here? How can I have all the events displayed again?
1 I'm running Xiaomi.eu's MIUI 12.5.2.0

Absent other ideas, I purged the data from the Calendar Storage and reimported the events.
This worked: All events are now displayed again, though it remains unclear what actually went wrong in the first place. Let's hope this won't happen again.


text:
Note 10 Plus Stuck with Partial Flight Mode (Faded Blue). What does this mean? Is this an indication of hardware failure?
I haven't yet come across a situation where factory reset didn't resolve the issue. This one is very intriguing to me as I could not conclude why the phone could stay in the partial flight mode (faded blue). It may be a coincidence, but it happened sometime after the firmware update. However, it doesn't look like a widespread issue to assume it is a bug. I have attached an image that shows flight mode in faded blue. It stays that way until I switch to Wi-Fi calling or remove the SIM card from the tray. I cannot select networks from the settings - "Error while searching for networks."
Here are the steps I have taken so far:

Wipe cache partition
Clear SIM cache, grant permissions, network rest, restart device
Multiple resets with flight mode on and off, finally did a Factory rest
Used ODIN flashed with latest stock ROM
Used ODIN flashed with  a year-old ROM - system performed updates as well
Used ADB shell to enable cell in airplane mode, no impact. ADB mode shows flight mode was off.
Replaced with new SIM card, no difference

Based on the above steps, it looks like this is probably a hardware issue, but I would be relieved if it comes from experts. No drops or physical damages to the phone. I haven't read anywhere that partial flight mode results from hardware failure. However, neither ADB made any difference to conclude it as a software/GUI issue. If there aren't solutions left, I can make peace with my phone.
I would appreciate your comments and inputs.

So if you touch the Flight mode icon to enable/disable it nothing happens? Have you checked logcat for errors when you touch Flight mode icon?

Hi @Robert - thanks for responding. I just learned what logcat is after seeing your response. I see a lot running log with an ability to filter on verbose, error, warning, etc. Is there anything particular should I be looking at? How can I capture log specific to toggle? Also, when I run 'adb shell settings get global airplane_mode_radios' - it shows nfc, wimax - so technically cell and wifi should still work, right?  What's strange is airplane mode when toggled should either be grey or blue- what does half blue indicate? any persistent lock?

Especially on Samsung devices logcat is pretty verbose to my experience. I usually open logcat, wait until the old message have scrolled by and then make the action I am interested in. Then directly after making the action I press Ctrl+C to stop logcat. How the airplane icon should look I don't know, I don't have a recent Samsung device and such UI elements always look different between manufacturers and Android version.

I had the same issue with my Samsung S9+ (out-of-warranty). After extensive internet searches and trying various software-based methods like restarting, safe mode, clearing the application cache, booting into recovery mode, and even a factory reset, none of these solutions worked. You should try all these steps before attempting my method.
My method involves hardware, so you'll need some DIY skills and the ability to follow tutorials. If you're not comfortable with DIY, your best option is to visit a repairer (Samsung-approved or otherwise).
The problem is often due to a poor connection with either the connector of charging ribbon cable (connected with the Motherboard) or one of the two coaxial antennas (see picture). Dismantling the phone and reconnecting these connectors corretly fixed the network issue for me. Proceed with caution to avoid causing any damage.
Good luck!
Note: I remembered that a few days before having this problem I had dropped my phone, so I think that's what caused one of the connections to move.

Key words:
US: Samsung galaxy, no network, stack, partial, flight mode, airplane mode, light blue
FR: Mode avion bloqué, carte sim non reconnue, Mode avion bloqué, grisé, bleu clair, réseau non disponible,


text:
Possible to perform data recovery with dead cpu? (LG G6 - Android 9)
I've got a dead LG G6, suddenly freeze during normal using.
After force rebooting, it was completely dead even though connecting to charging cable.
Have already performed cpu chip-off and reballing, still the same symptoms as before.
The cpu (Qualcomm Snapdragon 821) was found dead and the mechanic told the data is non-retrievable because of the fde with cpu.
Research from internet:
- The data partition is encryted with the key stored in cpu
- only replacing normally-function cpu is not possible to power on the device

Im wondering if chip-off technique applied to take off the ufs, reading it using a BGA153 reader on computer + brute-force decryption is possible or not.
The knock code(screen lock) is known, may perform dictionary attack without wild guess.
The screen lock is 6-step knock code.
Steps:

Extracting the full dump as a bin file
Performing a brute-force method(hashcat + physical analyzer) to the mounted storage
Good news or infinite waiting?

Thats absolutely my bad of not frequently backup the phone, want to make up the fault and retrieve those memory back.
Highly appricated to any advice on the issue, many thanks!

Does this answer your question? How to get data off a completely dead Android phone?

https://bits-please.blogspot.com/2016/06/extracting-qualcomms-keymaster-keys.html whatever you have read forget it, one can't brute force RSA-2048 key and there is no vulnerability to extract it


text:
How can I Flash my Bricked Huawei P40Lite with stock firmware
My Huawei P40 Lite "accidentally" switched off while updating in recovery mode and is now stuck on the boot logo and turns off. I tried the eRecovery mode to download the stock firmware but it says "Get package info failed". I've tried flashing it using OTG and USB drive with dload folder and it didn't work. I've also tried using fastboot but USB debugging is off so I cannot use any flashing tool. Please Help!


text:
How can I factory reset my device to bypass a new MDM solution?
I bought a Samsung Galaxy XCover Pro second-hand, approximately two months ago. It has worked fine and I have factory reset it previously which has also worked fine.
However, on factory resetting it and setting it up today, it told me suddenly that "This phone is controlled by [Company Name which I don't recognise] and needs to be enrolled using Knox Mobile Enrollment".
It has worked following factory resets fine before, which makes me wonder why this message has appeared on this particular occasion. Why might this be, and how can I seek to bypass it?

You have bought most likely a stolen device, therefore the correct way is to return the device and get your money back.

@Robert That was my first thought, but it seems to have worked fine for months, which I wouldn't have expected if that was the case.

That it worked fine just means that the thief managed to disable the MDM software somehow before selling it. Performing a factory reset also reset this "MDM bypass" and now you see the device as it is. The conclusion for people buying used Samsung devices is always to perform a factory reset first.

@Robert Per my question, I've factory reset it numerous times previously, so that would appear not to be the case.

How long do you own the device? May be the theft was not directly recognized and thus the MDM lock was activated some time after you had bought the device.

@Robert It's been two/three months now. I've also checked the IMEIs (dual SIM device) and neither are blacklisted, so I doubt that's the case.

Then the only way to get certainty in your case would be to contact that company and ask them to prove that your device belongs to them or otherwise how it can happen that their MDM is blocking your device.

@Robert I've emailed them and am waiting to hear back. I suspect that the device has been removed from their MDM, but the MDM solution is still installed on the device.


text:
How to reduce the size of thumnails folder in Android?
How can I reduce/get rid of the thumbnails folder in Android that is created under DCIM>Camera. I'm aware of the fact that thumbnails are auto-generated and will be generated again even if I delete them. But the point is my device has 6 GiB worth of the thumbnails folder, I keep almost no images or videos, still, it takes up a significant chunk, I know it is to optimize the loading of images in some apps, still 6 GiB in a device which has 32 GiB storage? And the worst thing is it keeps growing, never comes down. Is there a realistic way to bring down that 6 GiB to under 2 GiB. I'm ready to repeat this process every week or so if needed, I just need some space on my device.

Have you tried to delete all files in the thumbnail folder?

Yes, no help, the files go away for sometime but no space is freed

How do you know that those thumbnail files take up so much space? May be the app displaying the free/used space does not update the data after deleting or the files in that folder are not the one that use up the space. Make sure to check the current free space using an app like DiskInfo.

Yes, I'm using diskinfo and file manager, they always show up 6 GiB for the thumnbails folder or 6.2 GiB for the whole DCIM folder as I only have 200 MB of photos, even those are pre-installed wallpapers. Another reason is, I have 24 GiB total, as 8 GiB is system reserved. I add space used by apps and other files and I get a maximum of 18, I basically get 18 GiB space in a 32 GiB phone because of this.

It does not matter how much flash your phone has. The only value that matters is the used and free values shown by DiskInfo app for the /data partition. All the other partitions are of no concern to you. You still have not answered how you know that the thumbnails take so much space. My recommendation, use adb shell to access the file-system. That is the only way to get the real view of the file-system.

Here's the output of df -h command  in the ADB shell.
/dev/block/dm-2          22G   16G  6.1G  73% /data
It shows 16 GiB used, my apps are only 10 GiB, so clearly, 6 GiB thumbnails


text:
Output audio from mic on bluetooth headset to phone speaker
I want to get audio from the mic on a bluetooth headset, send it to the connected phone, and play it on the phone speakers. I'm aware there are different profiles and protocols to be used, but I'm unsure on how to start. What method can I use to achieve this with minimum delay?
Context: A friend of mine works in healthcare and is shouting themself hoarse while speaking to others through the PPE. If possible, I'd like to provide them with an app that lets them use their phone speakers as a megaphone to amplify their voice  - If such an app already exists, please let me know.
Thanks in advance.


text:
What can I do with an open source phone/kernel?
So this is my very first attempt in any kind of android development. I have here my phone's official kernel source. I was wondering if I can build this to boot or if it's ready for building.
Also this phone is bootloader locked and there's no official or unofficial way to unlock it. So what can I do with the source or the boot image ?

source code is released to comply with GPL license only, it's useless on locked devices

I figure out this is the whole phone open source. I'm sure I can break into it and root/unlock it somehow

what if I can build it as singed image so I can flash it using the locked bootloader or even use EDL mode

doubt you can sign you don't have OEM keys. even EDL mode is impossible without OEM signed firehose programmer

I found stock rom/firmware for the phone and I think we can do a lot with a locked bootloader

start with edl.py good luck https://android.stackexchange.com/q/224131 https://android.stackexchange.com/q/226838

I found a less risky way using adb sideload but now I need a way to change active slot from B to A. Since the stock recovery is nonexistent, I couldn't get adb sideload funtion but now I found a specific boot entry just for adb sideload which is new and interesting. They have everything separated and insanely locked in some way. I'm updating here https://forum.xda-developers.com/t/source-code-up-stock-rom-up-time-to-find-root.4297799/


text:
Why wi-fi calling turned off on reconnection of wi fi?
I am not getting any no cellular network at my home and I have broadband connection. When I go in cellular network area turn on mobile data and came back to home my wi fi calling works perfectly, however if I go away from wi fi network for few minutes and came back or wi fi restarts due to power failure then wi fi calling is automatically off.
I need to connect cellular network again  in order to re-enable wi fi calling.

Wifi calling isn't something which enables free calls over wifi.
Your SIM ISP operator needs to make sure you're on an active pack with voice facility available before allowing wifi calling. That's why you need to be on mobile network each time you connect to wifi calling service; and it stays toggled on on wifi calling mode before wifi drops for some reason according to the same logic.


text:
Where does Android store disabled packages list?
So I was playing with adb pm uninstall and now my phone doesn't boot.
So I'm actually curious, how really pm uninstall works, where does it store the list of uninstalled packages (if it does) and if there is a way to revert the changes I made via adb shell with root.

The is a file named /data/system/packages.xml which contains a lot info on each installed app. I never checked it but this would be a good place to start searching.

Disabled package states are stored in /data/system/users/<UserId>/package-restrictions.xml. Uninstalled packages are, well, uninstalled. They aren't disabled.

please mark the answer as accepted (check mark)

To answer your question. No there's no way to  get back an uninstalled app on Android like in Windows where you can restore back to a point in time - that feature unfortunately isn't that well developed in Linux ( Android is a far off modification of Linux ). if you had uninstalled using this ( below ) command instead of pm uninstall ( which just hides the app as against throw it out )
adb shell pm uninstall -k --user 0 <package>

you could re-install using
adb shell cmd package install-existing <package>

sounds like you don't quite fit in  the above. In that case your other options are
-hunt around the internet for the same package name and see if you can re-install it ( chances are fat to find the same  exact version and esp if its system app it may not install correctly or if it used crypto keys )
-Backup existing data. If you have an older /system backup then restore that after a full wipe.
-Resintall new ROMfrom scratch and restore data from backup


text:
How to automatically set a CPU governor on boot?
There are apps that can accomplish this task (e.g. "Kernel Adiutor" and others), however they in turn require other apps that can grant them root access to begin with, which is a lot of modification for this simple task.
In any regular Linux desktop system, setting the governor at every boot would be accomplished by creating a script, for example in rc.local or a systemd-oneshot, that simply calls echo "<governor>" > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor after each system start.
What would be the Android equivalent of this solution?
Is there any way to automatically set the CPU governor without installing any apps?

Rooting is mandatory to do this; apps like you mentioned make it easier though there may be command line solutions// Aside, Android only has a Linux kernel and not other features you find in Linux. see this

As beeshyams said, unlike normal Linux distros, Android strictly restricts root access to the apps, and ultimately to the human user. See details here: https://android.stackexchange.com/a/213344/218526. So rooting your device is essentially required. Using third party app to set CPU governor is optional. You'll be able to do echo exactly the same way as you've been doing.

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


text:
Completely broken (unviewing-untouchable) android screen - (known) patternlock - no google account
After my mobile screen fell I was asking if there was someway to draw my android lock pattern, I precise, pattern, NOT PIN, by using a keyboard, maybe typing corresponding numbers on the numpad...
Up to 80% and more of my android screen is completely black and full of cracks, with big regions of it completely unresponsive, which is far enough to cancel the pattern immission out while using the few responsive parts in touchscreen. I tried to blindly input the pattern with a usb mouse connected via OTG, but this is really really impractical, up to the point the mobile has started a very annoying song everytime I input an incorrect pattern and every few seconds the screen would dim cancelling out what am doing.
Google account was disconnected, as well as usb debugging mode which was deactivated.
I noticed keys like enter, spacebar, shift, and other buttons are operative on the screen when I use a keyboard, which would be perfect for my case. PS: Maybe there is a way to mirror the screen to a tv AND use the mouse at the same time? Or even some external mousePAD with a pen that I can use to PRECISELY draw the pattern and unlock the screen?
Thank you everybody,
Have a good day.

there is no other way than drawing pattern with usb mouse. do some exercise on another device until you got a feeling for doing it blind. once device is unlocked you should be able to connect a bluetooth mouse, enable usb-debugging and remote access device via usb with scrcpy

also check broken-screen tag wiki


text:
How can I enable VPN only for a specific app?
I want a spesific app to be only connected through a VPN all the time, while everything else remains normal and not connected through VPN. How can I achieve this?
Moto C Plus | Android 7 | Rooted.

The app you are using to create VPN must have per-app VPN feature enabled. Or with root privileges you can try to manipulate the routing table manually. Android makes use of UIDs and SOcket MARKs to filter apps from VPN.

I use Afwall+ with Orbot (per app VPN supported). In Orbot I enabled VPN access to my app of choice (XYZ app). In AFwall+, I enabled VPN interface along with wifi and mobile data. In whitelist/allowlist mode in AFwall+, I allowed my XYZ app to only use VPN. As a result, my XYZ app can only access internet when OrBot is running and is providing VPN service. Otherwise, it gets no internet access. Other apps works fine without VPN.

@Firelord Hi, can you show your screenshot for AFwall+? How to make app only use VPN?

@KellinStrook Hi. I no longer use AFWall+. It became unstable on my Android 10 after a while and I could not fix the problem with it.

ProtonVPN has a split tunneling function  and destination access/non-access.

The windows version have this feature. The android version does not. You can include an app but you can't single-out an app to be routed thru ProtonVPN.


text:
Which Google service is responsible for emergency notifications?
I have an app that blocks notifications. I want to let emergency warnings through (like tornado warnings).
The services that have google in their name are:

"Files by Google" - com.google.android.apps.nbu.files
"Goggles" - com.google.android.apps.unveil
"Hangouts" - com.google.android.talk
"Home" - com.google.android.apps.chromecast.app
"Maps" - com.google.android.apps.maps
"News & Weather" com.google.andoird.apps.genie.geniewidget - Maybe this is it?
"Personal Safety" com.google.android.apps.safetyhub
"Google" - com.google.android.googlequicksearchbox
"Google Go" - com.google.android.apps.searchlite
"Google News" - com.google.android.apps.magazines
"Google Play" - com.google.android.apps.walletnfcrel
"Google Play Games" - com.google.android.play.games
"Google Play Music" - com.google.android.music
"Google Play Store" - come.android.vending
"Google TV" - com.google.android.videos

I'm using a pixel xl 2.
Also, how do I test if I have the settings correct? Is there a way to fake an emergency broadcast to myself?

Does Google in USA really send emergency warnings? If they do it is something US specific, because in other countries emergency warnings are sent as some sort of broadcast SMS by the network operator (and thus no Google app is responsible).

Seconded Robert's comment. Other than Google's own "Personal Safety" (crisis alerts), emergency alerts are usually sent by network operator. You can check the setting on Android Settings - Wireless & networks - More - Emergency broadcasts - Cell Broadcast settings.

I had a blocked tornado warning yesterday. It was a notification not a text message.
Andrew, I do not have that menu chain in my phone. So I searched for similar terms. "Emergency" pulled up some results but they are all app settings. "Broadcast" had no results. "Network" didn't have any relevant choices. I do not see any way to choose to receive emergency alerts as text messages instead of notifications on a Pixel XL 2 with Android 11.

@triplej Searching for "Emergency" on the Settings of my Pixel 3a with Android 11, there should be the "Wireless emergency alerts" section. Note that this is an integrated Android system service though, not by Google.


text:
Why are Google authentication consent screen buttons disabled on an Android 2.3 phone?
I want to use an old Galaxy Ace which runs Android 2.3 as a camera. I installed the Alfred camera app on it which requires Google login in order to connect the camera and the viewer device securely.
I can log in successfully with the Alfred app to Google, but then there is a consent screen to allow the app to access my account data and both buttons are disabled like here on this picture taken from the net.

Why is it that loggging in works, but I cannot proceed from the consent screen? How can this be fixed?

This login screen is actually a web page shown. I would assume that the used web browser component is too old. If this page is shown within an app then it uses the "Android System WebView" which is most likely a bit out-of-date on that device. May be it is that old that some of the included JavaScript fails and therefore the buttons remain disabled. Try to update the "Android System WebView" app.

@Robert you may be right, I searched for it and found this: "In the coming months, we will no longer allow OAuth requests to Google in embedded browsers known as “web-views” "  https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.htm it looks like the version of Alfred I can install which supports android 2.3 uses a webview for login which is restricted by google, so it's may be the end of the line, because I can't install a newer Alfred, they've dropped 2.3 support for quite a while


text:
Xperia XZ1 won't boot after changing to pseudolocale
This would be the most ridiculous brick I've encountered
What I did:
Having enabled Developer options, I tried setting cibarA [XB] (Arabic when reversed) as my main language.

As I figured out now, this should be a pseudolocale.
Since not everything was reversed, I thought a restart might make even more things reversed, but it actually made my phone not able to boot (properly) after that.
Current state:
On startup, it shows the Sony logo (as usual), then a black screen with tools icon for a while (also usual), then animated Xperia logo (also usual), but after that, the animation gets stuck and remains like that. When I press the power button the screen goes black and the phone is in a kind of semi-turned-on state. Pressing the button again lights up the black screen for like half a second, the green led indicator of charging also seem to brighten a bit during the time. When I hold down the power button I get a reduced power menu:

I tried to hold down the Power down option to boot into Safe mode, which it did, but I ended up in the same situation, except that there is "edom efaS" written down there on that black screen :D.
I tried searching a bit, but could not find anything for such a specific case. I thought maybe using ADB (although im a noob in that) could help, but I found this post which says I would need root. Which reminds me:
My device:
Sony Xperia XZ1, non-rooted, latest official firmware, from EU (Czechia), developer options enabled, with USB debugging hopefully allowed for my PC in the past?.
I hope this is sufficient, since I cant get into the system to check for details.
Ill be glad for any tips or guides on what I can do or which you can point me to. I use my phone quite a lot on a daily basis with important stuff on it. I should be able to grasp technical terms (am an IT student), altough I havent done much Android experiments myself except rooting my older Z1 Compact a few years ago. Thanks!
EDIT:

I tried to get to fastboot, but it did not find my device, i guess probably would need unlocked bootloader for that?
I tried to use adb shell in that half-on state, but the UI is not there, so I cannot confirm anything, and on pc it still says "adb.exe: device unauthorized." and on next line "This adb server's $ADB_VENDOR_KEYS is not set".
I tried flash mode and Sony Flash tool, just to see what it says. It says This phone is locked and points to unlocking Bootloader. But I can see the IMEI here at least.
Holding Volume down and power button as described here does vibrate, lights up a black screen for a short while and then dims, and then vibrate again and does a casual startup process described above. I guess again, an unlocked bootloader needed?
Was able to pick up a phone call! It rang in my bluetooth headphones, so I picked it up, and then a call UI showed on the screen. Although, I was not able to move on, I found eg keypad codes here, but I cannot confirm them when in the call. After ending it I get back to the black screen. So I guess the phone actually IS booted, but just the UI is not working. Could this help?


text:
Dismiss ANR dialog on rooted device
I have a device that is rooted that is just used to display information on the screen without user interaction, screen is just a regular screen not a touch screen.
Since my device is rooted is there a way to dismiss this dialog through an adb command or something?
ANR dialogs are coming from some external app on the device I have no control over so I cant just "fix" the issue to make the ANR go away hence why I am wondering if there is a way to just dismiss it myself

can be solved with automate apps likes macrodroid


text:
How to kill Whatsapp process without it resurrecting after a time?
On my Xiaomi Mi A1 if I go to Apps & notifications > WhatsApp and tap "force stop", the app seems to stop. But hours later, WhatsApp is strangely on again and I start receiving messages.
If there is a way to safely kill the process associated with WhatsApp so the app does not start again, what is it?

Some phones have the possibility to limit certain apps from running in background. If your phone has such a feature you can prevent WhatsApp from running. Otherwise you could only uninstall or disable the while app (while keeping the user data).

Run adb shell appops set com.whatsapp RUN_IN_BACKGROUND ignore. Or if you prefer GUI over CLI you may use my open source app PMX.

Also see How do certain apps show new notifications when internet access is restricted to them?

@IrfanLatif wow that's pretty specific thanks :) How can I run this command though, I mean where should I type that?

https://android.stackexchange.com/questions/tagged/adb

https://duckduckgo.com/?t=ffab&q=how+ro+run+adb+shell+commands

Thank you very much :)


text:
Does `pm uninstall` also automatically execute `force-stop` and `clear` on a non-rooted device?
This is for non-rooted stock ROM's.
To get rid of one single app, I've been executing the following commands:
(Step 1) disable-user
(2) force-stop
(3) clear
(4) uninstall
(5) clear
Steps (1) and (2) first — otherwise, if I just execute (3) before them, the app will (more often than not) launch itself again and start accumulating app data.
At this point, I've achieved to make an app useless. It is not running (force stopped), it has no data saved (cleared) and will not launch itself without me knowing (disabled).
If I wish to take it further and entirely get rid of it, I can execute (4) to uninstall it.
Step (5), might seem redundant, but I tested myself several times on two different categories of apps. The first one is system apps (i.e., the Settings UI has the option to disable it greyed out) and the other is typical carrier bloatware (you can uninstall it from the UI yourself without ADB)
If you run steps (1)‐(5) on a system app, you will get "success" on all five. If you run all five on the carrier app, you will get "success" only in steps (1)-(4). In step (5), you will get "app is not found" (or some similar message) instead.
So I said, maybe an "uninstalled" system app is still accumulating app data, if I can run clear as many times as I wish after it's uninstalled and still get "success". Is that the case?
As far as just disabling is concerned, I have verified steps (1)-(3) are necessary. But when it comes to uninstalling instead, are they redundant?
(i.e., does a simple uninstall also automatically execute force-stop and clear?)

force-stop
Uninstalling an app always kills all related processes. Keeping them running doesn't make any sense and can end up in an app crash. Therefore Android kills the app process(es) before uninstalling it.
clear
Clear data and cache directories is enabled by default. It is just the opposite if you want to uninstall the app but keeping data and cache you have to add the option -k to the uninstall command.
clear an system app after uninstall
System aps are located on the system partition which is by default read-only. Thus uninstalling an system app is not possible on a non-rooted device.
If you execute uninstall on a system app only the installed app updates on the user partition are removed and the system app itself is set to disabled. Clearing the data of an disabled app is possible therefore you don't get an error.

Got it. So, to sum up, I wish to disable? Keep it as is; steps (1)-(3). Wish to uninstall? uninstall alone will suffice and it's safe to omit all other commands. And that is whether it's a system app, pre-installed carrier bloatware, or pretty much just any app I downloaded from the Play Store myself. Did I get it right?


text:
Android x86 change Keyboard layout
How can I change the keyboard layout used by Android from the command line?
I installed the Android-x86 release from https://www.android-x86.org/ in a VirtualBox VM. Unfortunately, the VM only boots to command line and I cannot access the GUI. I want to follow the following solution to directly boot into the GUI: https://stackoverflow.com/a/61247128/12336925
I cannot type the commands as I want and I cannot use vi appropriately because I have a German keyboard.


text:
What are validated connections?
The FairEmail client has the option to use only "validated" connections. The only explanation given in-app is that a VPN might prevent synchronising from working if this option is enabled, but what does this actually mean? Is this about not using the very weak 2G/3G encryption or open/WEP WiFi?

In the source code I see this sets a preference which is later read and enables the checking of NET_CAPABILITY_VALIDATED. This capability is documented as "Indicates that connectivity on this network was successfully validated." which tells you absolutely nothing. However, an example is given for "a network with NET_CAPABILITY_INTERNET, it means that Internet connectivity was successfully detected." Digging into when that capability is set: "Indicates that this network should be able to reach the internet."
So if it expects that a connection should reach the internet, some part of the OS will check it, and then apps can check that the check was successful, and only then they will try themselves to talk to the internet. That's what this switch does.
Presumably this will prevent custom setups from working, such as when you change routes after making a WiFi hotspot (without mobile data enabled) where it wouldn't expect to be able to reach the internet regardless of whether it can. Or if you, indeed, have a VPN where the email server is reachable but the internet in general is not.


text:
How do I download an Android 10 system update over cellular after I already said I want it over wifi?
My Moto G8 running Android 10 asked me how I want to get an update that just became available. I picked wifi only, but then realized I don't have wifi right now. I can't find any UI that would let me change my answer. It just says it's waiting for wifi and only offers me to check my wifi settings or configure "smart updates" which just means automatic download, install, and restart. What can I do?

Maybe this helps - from developer options (enable by tapping build number 7 or more times) find  “Download updates automatically.” or similar and disable it//next, go to  system updates in settings and search for updates. Maybe, you can now download over mobile data

Goto Settings
Goto "About phone" or "Software Update" (depending on your phone)
Find settings icon on top or setting item that says
"Download Automatically" or "Automatically Download over wifi"
Toggle This once
It will prompt you if you wish to use cellular data. If it does not
prompt. Then just restart and repeat this process once.


text:
I tried oneplus 8 pro with ubuntu: no lsusb/adb output
I have oneplus 8 pro connected to my ubuntu 20.04 box and installed:

vendor driver
android sdk
adb/fastboot

But different USB cables show no output in

lsusb
adb devices
fastboot devices

I have already reset usb-debugging and according authorization! I faintly remember having struggled with debugging authentication before...
What can I try next?

No, not at all: I have stock Android 11 from oneplus called Oxygen OS. I just want to use adb from the remote computer!

Sorry I was confused by the title. In my interpretation of the title you claim you have installed Ubuntu on your oneplus 8. When the device does not show up in lsusb then the other commands also will fail. Try to connect the phone to a different PC and check if it is detected there. If not the USB port of your device may be damaged. Does the phone charge normally?

No problem! I attached the smartphone to windows adb works fine... Ubuntu is my primary development machine: charging of the smartphone works but there is no usb debug authentication. I think I will have to wait for bugfix updates!


text:
Is there any way to call the share menu in a termux script?
I made a bash script for termux and at the end of it i want to  call the share menu to send a file made by my script by whatsapp for example
I really don't have any idea about how to do this.
Any help is appreciated :)

See termux-share and termux-open.


text:
I need to play audio file when microphone detects noise
I have some pretty rare use case.
I've recorded audio file and I want to play it automatically
anytime when microphone detects any noise.
I assume it can be done using smartphone with Android with some app(s).
What's the best way to do it?
Just for the sake of example. Imagine I've recorded "Go away, we are home!" and put smartphone in dining room. The mic is working all the time, listening to noises and if someone breaks glass and gets inside a house, my record will automatically play and scare the thieves.
Thank you!


text:
Upgrade Android on a really old tablet (SM-T210)
I've recently been given a free tablet, a Samsung Galaxy Tab 3 7.0 (SM-T210) and I want to experiment with custom ROMs and related stuff on it.
Since there is no official support for it and it still runs Android 4.4 I decided to do a search on xda and found no non-4.4 ROMs for it. Therefore, and because I heard it is possible to compile Android specifically for my device, I reached out to you for some help...
What information I have available:

Custom Kernel
I was able to flash TWRP 3.0.0.0 via Odin
The 7 inch variant has a Marvell PXA988 SoC (I heard it's more difficult to develop for?)
Stock ROMs readily available all around the web (multiple regions).

What knowledge I have:

Experience with flashing Custom ROMs and Recoveries in multiple devices and brands though I have never built my own.
Know my way around Linux and more specifically Ubuntu.

I really hope that somebody out there is able to help me and tell me if it is possible to create a custom ROM for it. Why noone has compiled a newer version of Android and all custom ROMs out there have 4.2/4.4 as a base?
Thank you so much in advance!

compiling is not the stumbling step here, one must modify the config and maybe source code - which you don't have because Marvell did not release. there is one lollipop build you can try (probably a kitkat port). lineageos has some building guide in case you get the source code somewhere

Okay thank you soo much! Two questions: a) The lollipop build you sent me is what I've tried (using TWRP) and it results in something like error due to signal 4. I have already modified the updater-script to no avail. Do you know what could be wrong? Maybe is it incompatible? Is there anyway to "force flash" this file just to see if it works? b) And when you mean the source, do you mean the kernel source or is it just something else I'm not aware of?

Does this answer your question? Building ROMs & Kernels?

a) you can extract zip and flash (converted) partition images via adb push b) kernel source code + aosp source code + hardware specific proprietary blobs

i recommend to build existing tree for SM-T217 only for learning exercise, you will get a feeling for compiling stuff. we can't help with this (i never built custom rom) it is off-topic here, only question about flashing issue is on-topic. you will find many experts on xda or stackoverflow


text:
How to create a big panic button on the home screen that, when touched, makes a phone call to a specific person?
As an elderly is going to use the smartphone, and has difficulty using technology, I would like to create a big panic button on the home screen for her, in order that she can immediately make a phone call to a specific person when touch it, without doing any more thing, only touching the panic button.
It is desirable that, when the smartphone is seemingly off (I don't know the proper name. Is it "standby"?), if the user presses the power button once, the panic button will appear and can be used, without the necessity to unlock the smartphone.

Does this answer your question? A wrongly 'I need help' text was sent from google maps

No. The suggestion of power 5x times, however, was good. The challenge is to enable it.

search for emergency sos it is built-in feature


text:
Lock screen is always ON even if I switch it off by pressing the power button
I have been facing a problem with my Samsung Galaxy M30. FYI The power button working totally fine(I can reboot using it and shut the phone down, no problem with my power button). But as I put my phone to sleep, the screen does go off but the problem is that after 2 or 3 seconds the lock screen of the phone automatically turns ON(without touching it or shaking, I haven't enabled any gestures) and continuously glows all the time, it doesn't turn off. I tried to shut down my phone but it didn't help me. How to troubleshoot this? This problem drains my battery too fast, I don't know what happened to my phone. Can it be a virus or malware problem(I have also tried to scan my phone for any malware but it also couldn't help me)?
Please help me.

This has been asked a few times in slightly different ways but none have a working answer.

I don't actually know what to do, to resolve a little bit or to save my battery I just used a screen dimmer that turns the screen opaque up to 95%. I don't have any other option right now


text:
Share internet through otg-ethernet from terminal
I know other threads already exist but none of them answer this specifically.
My OTG ethernet cable works only when used as a client, i.e. when a DHCP server is recognized.
I want to be able to share my 4G connexion to a router trough the WAN port. Android doesn't support this natively, so I'm guessing I'll have to create my own AP but I'm not sure exactly how do that trough the terminal.
I'm guessing there is some NAT involved.

I already commented on your previous question: Use an external WIFI dongle as a hotspot

This is different I never asked about a wifi dongle

There's no difference in network configuration of a WiFi dongle or Ethernet adapter. Both are connected through USB, both appear as a network interface.

I'm trying to use rmneet_data1 as AP but the mask is /30 should I adjust accordingly ?

Don't know what you are trying to do. rmnet_data1 naming convention is used for Mobile Data network interfaces on devices with Qualcomm modems. You cannot use Mobile Data (but WiFi) interface as AP. Then NAT the traffic between both interfaces for internet sharing. Or you may even avoid NATing, but it's complicated setup: https://android.stackexchange.com/a/218562/218526

Sorry I meant as upstream, ethernet is the AP


text:
How to understand the confusing naming conventions of modern Android companies and prevent getting ripped off?
Here's the reason for this post and my annoyance -
There is a phone called Redmi 9 whose codename is Lancelot and there is a decent amount of community support for it, TWRP is available as well as some ROMS.
Seeing this I was impressed and ordered it off of Amazon. It clearly said Redmi 9 and the same model with the same price is available on Redmi's official site as well.
However when I got the phone, enabled USB debugging connected it to my pc and ran adb shell, the name I got in the prompt was cattail and not lancelot!!!
And cattail has next to no community support for rooting and stuff, no TWRP either.
Googling cattail vs lancelot gives a bunch of results and there is a difference in camera alignment in the two phones.
Further while Lancelot is a decent enough phone in itself, cattail is absolutely disappointing. Searching for lancelot on amazon or redmi shows up nothing and when I search "Redmi 9 code name" in any search engine, I got lancelot!! I bought the Redmi 9 believing it was something it was not.
Is Redmi and Amazon straight up lying or am I missing something here? Where is the guide to understanding naming conventions of smartphones? How do I and everyone else who uses Android prevent companies from ripping me/us off?

Phone manufacturer like Samsung and Xiaomi sometimes create devices that have the same name but are dedicated for a certain area like your cattail for India or Samsung's sepcial devices for the US market. Therefore I would always recommend to check a device database like GSMArena where the list available variants or link to very similar phones. Comparing both phones allows you to see that they have a different display resolution and chipset (the G35 chipset of the Indian version is even mentioned in the linked Amazon product page).

Hindsight is 20/20, there's an article that explains all Redmi 9 variants on Xiaomist. The Redmi India's official site and the Amazon India's link show the exact model of Redmi 9 (India) though.

I assume stuff for lancelot will not work with cattail? I basically got ripped off and I don't like this practice in the least.

Yes, it won't work. While I sympathize with you caveat emptor

btw the model name of your phone indicates Poco C3 so i won't give that much on it. cattail is right


text:
How to restore a Nandroid backup without TWRP?
I have bricked my OnePlus 5 device (black screen, blue LED, bootloader locked, no TWRP on my device). I have tried almost everything (sideloading the official OnePlus firmware through adb, using the MSM Download tool to flash the .ops file - The flash is successful but I get the black screen, blue LED at boot again), none of it seems to work. But, I'm not prepared to give up.
So, I was thinking maybe if I get my hands on another OnePlus 5 device  and take a Nandroid backup of the device using TWRP with the OEM unlock option enabled in Developer Settings and use this backup to flash my original bricked OnePlus 5. The point of taking a backup with the OEM unlock option enabled in developer settings is to somehow load this Nandroid backup on my bricked OnePlus 5 device (so that I at least can unlock my bootloader and explore other options of restoring my device by flashing a custom recovery).
Now, the question is - If I manage to take a Nandroid backup of another working OnePlus 5 device, what are my options of loading this Nandroid backup on my bricked device (as I don't have TWRP on the bricked device).
Any guidance on this will be greatly appreciated.
Thanks.

you can't BECAUSE of locked bootloader


text:
How to track the source for an non-notification daily alarm?
Pixel 4, Android 11.
Every day on 12PM an alarm sets off, but no notification.
Only restart can turn it off. How can I track it cause?

Have you checked logcat for entries at that time?

Which commands would you suggest? adb logcat *:W | grep "alarm' ?

Just catch everything and then carefully read all lines just before and after the time the alarm starts. If you do this two or three times hopefully one or two apps will always be active at that time.


text:
Recovering data from "Recently deleted" folder (SD card) in Huawei P20 after removal
I sent some files from my SD card to the "Recently deleted" folder and then removed the card.
May I be able to recover these files if I insert back the SD?
Thanks for your help!

try this app from comments

i have better experience reconstructing pictures with ZAR/Klennet Carver especially on read errors caused by emmc wear-out. of course this method does not apply to encrypted sd card (adoptable-storage)

The easiest way to recover data from an SD card would be by connecting it to a PC.  I recommend an open source, cross-platform tool called 'PhotoRec'
https://www.cgsecurity.org/wiki/PhotoRec)

The reason is that files can be a little broken when they're recovered from being deleted, so having a tool that understands file structures can be helpful.  The name 'PhotoRec' is a little misleading, since it actually recovers hundreds of different file types
https://www.cgsecurity.org/wiki/File_Formats_Recovered_By_PhotoRec)

There's a good tutorial here since the UI is quite simplistic:
https://havecamerawilltravel.com/photographer/photorec-recover-photos-memory-card/


text:
What is the 'Relationship' field for in Android Contacts?
In Android Contacts, you can add a field called relationships.
What is it used for and does anyone even bother putting it in?

It is meant for your relationship with contact

After a relationship is added, you can call, text, or email the person using their nickname.... After the nickname is added, you can contact them by saying things like "Text my sister" or "Email my mom."

Some typical fields from Google contacts app in screenshot (you can define a custom field too)

In example below, I have added child with nickname of XYZ. If I use Google assistant I would say call XYZ

I saw this but it didn't work for me. Can you give example what do I actually put under nickname and under relationship?

Probably your contacts app doesn't support it. I use Google contacts and you can see in edited answer typical fields

I've done this but when I say 'Call Wife', it looks for all contacts which has the word wife in it. I have unfortunately labelled some of my contact as 'Wife John-Sarah', 'Wife Peter-Kate'. Anyway really appreciate the pictures you've put in.

the label field can be custom. it is (would be) enough for relation to oneself, i mean, to the phone owner. so, why is the relationship field? as i see, there are also other label fields of other fields, like additional explanation. so, seems, the relationship field can be filled with name, or full name, of another person, who is better known for the phone owner, and the corresponding "label" "subfield" should explain who is the better known person for the contact being edited.

in my currently used version of the contacts the "relationship" field from the screenshot above, with three dots icon, is named "related person".


text:
How to root the LGLS676? Is the idea I have about how to go about it the most efficient method?
I want to root my LGLS676, because I want to install the gnu coreutils on my android phone. The only way I can imagine doing this is making the phone think it's not a phone, because I can't use adb because all my laptops are running Debian 11 Gnu/Linux, and LG doesn't seem to provide Linux USB drivers. The only way I can think of to make my phone think it's not a phone is to take out its hard drive, RAM, and/or cpu and then write the gnu coreutils and su onto the phone's hard drive. Is this the right way to go about rooting the LGLS676 in my circumstances? If not, what should I do to root the phone? I don't know at the moment what version of android it's running, but I think it's Android Marshmallow. Going into recovery mode and trying to boot into the boot loader from there just boots into the normal login screen instead.

I have never seen an Linux computer that requires special drivers for adb. Only Windows requires special drivers, on Linux there is an generic adb driver available which should work with all (or most?) devices. On some systems you have to change some permissions to make adb work but that should be everything.

I didn't know there was a generic adb driver for Linux. Is it installed automatically with the adb package or is it something that has to be installed separately? If it has to be installed separately, can you post a link to it or the package name for it in Debian repos?

The official Android Developers says that Linux users shouldn't need to install USB drivers. Have you enabled Developers options and USB Debugging instead?

I have enabled Dev options and USB debugging. When I have time, I'll try to get the bootloader unlocked or the gnu coreutils installed over adb. I have a bit of stuff to do though, so I won't be available for about 6 hours.

I tried rooting it, and ended up destroying my computer (figuratively speaking, of course.) Now I need to hope a bunch of stuff went right for my computer to boot. Lesson learned: be even more careful.

The stuff went right.


text:
How can I restore Chrome capability to my android TV PCs?
I have several android TV PCs used as thin clients against a Windows machine. I do some things on the android box and some things in Windows. I've had the current set of TV PCs for about two and a half years and keep them configured exactly the same. Suddenly the Chrome icon disappeared from apps. Chrome is still installed and receives updates but no way exists to open it.
In January I purchased two Hisense 75 inch android TVs. The PlayStore said Chrome was not compatible so I sideloaded. It worked fine for awhile, then I could no longer open Chrome. At the same time I could not open Chrome on the Hisense TVs, the Chrome icons disappeared from all my TV PC workstations.
Probably the Hisense TVs are coincidence, but I wonder if Google maintains an evil person list and added my Google account to it. I could I guess delete the Google account from one of the TV PCs and see if Chrome then works. That seems silly, though. I have no problem with my phones which use the same Google account.
Is there anything I can do to reenable Chrome on the TV PCs? They all came rooted.
device name: TX92 02
model: TX92
android version: 7.1.2
kernel version: 3.14.29

Regarding the disappearing Chrome icon, consider trying Sideload non-'Android TV' app to show on the home screen

I use Nova Launcher on the TV PCs and do not watch TV on them at all. No Android TV stuff.


text:
is it possible to impose speed limit to certain device connected to my hotspot?
I have several devices connected to my android hotspot and would like to rate limit certain device from hogging the bandwidth too much. Phone is already rooted, and i've tried using built-in 'tc' program (followed the guide from here https://serverfault.com/questions/191560/how-can-i-do-traffic-shaping-in-linux-by-ip) from android terminal with no avail.
Is it even possible to do such thing?

tc is the perfect tool for this purpose, and it works on Android. I've experimented with it in past. But IIRC I used my own custom built binary.


text:
How To Add A Custom Border Which is unable to be touch Android

As an example the phone above contains border really close to the edge which is one the same as my current phone, playing games sometimes causes accidental touch from the side which will block touches, Example: PubgMobile
I'm wondering is there a way to add a custom border (black bar preferably) which blocks touches and fixes screen resolution as the camera blocks the game instead of going around
Extra :
Wondering if theres a way to lock rotation on horizontal on certain position ie not moving up or down

Please check out this question and answers: https://android.stackexchange.com/questions/57267/resize-screen-for-dead-touch-zone


text:
Lenovo S5 storage filled with invisible files
I have a Lenovo S5 with 64gb internal storage. I had this problem for a while now, so i really need some help.
Any file manager that I can find sums up all my files and aplications at under 20 gb, however i only have 3 gb free.
About 40 gb are filled with invisible/unfindable files. I looked online for answers many time, and I tried using "Android terminal emulator" with the command "df -h" and got this result, can anyone make something of it?

Starting point: our storage tag wiki has some pointers on how to find out what "ate" your storage.

There is one simple answer: You as the use and your apps don't have access to those files. Therefore those files are "invisible" to you. That is the Android storage design.

So how do I delete those files (or are they actually part of apps, but not registered so?)

basically yes, not all apps will delete it's files on uninstall. factory reset will solve this

Does this answer your question? What Is Using Up My Storage/Data on Android Phone?


text:
Restore mmssms.db without root?
So I have managed to get this file from a broken install, I'd like to restore my sms but I don't want to root my phone. How can I manage this ?
I've thought about converting to xml and using sms backup and restore but this will be tedious because of the format converting.
What else do you suggest ?

copy it to another device which is rooted and export xml

"another rooted device" can also be a rooted emulator...

I didn't work of course, I posted my solution

So I decided to export the SQL data as CSV and then imported in Excel.
I then checked the XML format from SMS backup and Restore, made it match, exported it as XML from Excel.
And finally you can just restore it.

good. please make this answer useful for others. How did you export csv? which tables/columns did you use, and how did you sort to made it match? how did you export xml?


text:
How to restore whatsapp data from local storage?
I have tried multiple options to restore data from internal storage. Unfortunately, none of them has been successful. Every time I get prompted to google drive back up even though I don't have any backup on google drive and I have disconnected WhatsApp from my google drive accounts. Can anyone help please?

Have you tried the step mentioned on WhatsApp Help Center?

yes its not helpful

There are similar questions asked already, and the most recent answer is to disable WhatsApp backup from Google Drive first: 1, 2. There's also the older approach mentioned on 3. Please try and let us know if any of it works. Thanks.


text:
Downloaded a phising application, what steps should I take next?
My dad accidentally downloaded a fishy DHL tracking application. The application was downloaded through a SMS he received.
I immediately noticed that the application wasn't accessible through the apps list. Whenever I click on it, the apps list immediately closes. The application had access rights to his contacts, phone and SMS. Trying to deny to rights was not possible as the application immediately turned those rights back on.
My first intuition was that "Hey, an installed application shouldn't have system level access to system applications" as such, I figured that if kept trying to click the delete button faster than that the application closes the apps list, I should be safe...
And guess what, it worked! I was able to delete the application that way... lame.
But now that the immediate threat is gone, should I worry about any lingering landmines?
Is there a way to be sure its all safe? Should I check anything specific? I made sure my dad changed his passwords.
Thanks in advance!