text:
Redmi Note 5 Pro - unable to flash TWRP
I am trying to flash the LineageOS on my Redmi Note 5 Pro (whyred). Initially, I used Windows 10 for the Xiaomi Unlock Tool. However, the Xiaomi Unlock Tool did not detect my device. So, I used this tool https://www.xiaomitool.com/V2/ to unlock my bootloader and it unlocked instantly.
Now, I am using Ubuntu 21.04 (I am more comfortable using the command line here) (with android-tools-adb and android-tools-fastboot packages installed) to try to flash TWRP first.
When I connect my device, adb devices can recognise it. Then I use adb reboot bootloader to enter into fastboot. Now, fastboot devices can recognise it too. The screen of the phone shows the fastboot icon.
But, the problem comes here. I use fastboot flash recovery twrp.img and I get this error

FAILED (Write to device failed (No such device))

Now, when I use fastboot devices again. I don't see my device. Another change I see is press any key to shutdown written on the top left corner of the screen of my phone.
USB debugging, USB debugging security, OEM debugging are all enabled. Bootloader is unlocked (as I see in the settings). The phone is updated to latest MIUI version supported officially. And I used the same laptop and method to flash TWRP in a Redmi 3S (land) some time back.

Something else I experienced is that after randomly trying to get this right again and again, the command fastboot flash recovery twrp.img did not terminate and got stuck.

Well, I didn't really understand what happened. But there's this concept of Anti-roll-back due to which I was unable to flash TWRP. I followed the 5th method here and it worked. https://forum.xda-developers.com/t/everything-about-anti-roll-back-whyred.3816219/


text:
Block domain for a specific app
Is it possible to Block domain for a specific app, like to edit host file or via firewall app (have root) to block domain but just to 1 or 2 app?

Hosts file is always globally active for all apps. A local VPN based blocker might work. I have read that e.g. Blokada allows to apply blocking only on certain apps user has selected from a list of installed apps.

Ty robert that works grate!

source: Stack Exchange

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

sort: votes


text:
(Not Solved Again) How to root Gabb Wireless Z2?
(UPDATE: The accepted answer has since been patched. 12-16-2021)
I have a Gabb Wireless which is an Android that is programmed to be "dumb". By "dumb", I mean it only has core apps such as Settings, Phone, Messaging, etc. I like it because it is not additive to where I can't focus on my school.
It has some major drawbacks though. To keep kids from messing up the restrictions, they pretty much bricked the phone. I can't flash, ADB*, install apps**, or unlock the bootloader*** the way other sites say to do.
All I want to do is host a web server and customize the OS a bit. I have contacted the distributor and of course, they would not reveal anything.
Stars:

The original way to allow USB debugging/Developer mode is gone.
The store was removed and you can't install raw APKs.
When I boot into the Bootloader, the screen is blank with "=> FASTBOOT mode..." at the bottom.

Overall, I am disappointed with the extremes which the company took. I have gotten them to admit that the device is hackable. Of course, any device is hackable so I did not get much from that.
Any ideas?

Just a heads-up, due to the cat-and-mouse situation with Gabb, I'm afraid any workarounds that are posted publicly from/to here will be patched by them again, though looks like they have published a guide on Nov 4 (please also read the rest of the thread since there's a mixed result, including a possibility of bricking the phone).

Ok, I've got half an answer for you.
I was able to get apps on my Gabb phone. What you do is get an ADB program like this one. Next, you want to extract the contents of the platform-tools file to a new folder in your (C:) drive called adb. Next, you are going to set up USB Debugging on your phone by going into your settings in your Gabb phone, Privacy, Permission manager, and search "autofill" and press on the one with developer options under it, turn on developer options at the top then look for USB Debugging and turn it on.
Now back on your computer open the Command prompt, take the charger, and plug one end into the computer and the other into your gabb phone. Get an APK file like this one and once it's done installing, go to your command prompt and type: cd C:\adb then enter. Next, type adb install, then insert your file then press Enter. Now the app has been installed and that's how you get apps, it's easy and it worked for me so, have fun getting apps on your Gabb Phone!
I don't have an answer for the rooting part though sorry.

Looks like they pushed up update that blocks the ability to access developer mode.

Maybe you could downgrade to a previous version of the phone before the update

when I try to enable USB debugging, it won't let me enter into the developer settings. They stripped the thing down pretty well. Maybe a new firmware update?

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


text:
how do i make phone default to transfer files when plugged in to computer usb?
i have developer options set to transfer files but every time i plug it in it only charges.
i have a motorola e5 play running OS 8.


text:
Has the floating calendar icon feature and "Aa" button been removed from Google Sheets on Android?
I found a screenshot of the buttons I am trying to describe on this other post. Thanks.
But the actual feature is no longer appearing on my app. I recently updated it (8 Jun 2021) so I'm worried that it's been removed.
Anybody know?

I'm such a fool... Please forgive me... I found it! I panicked because my understanding was that it was a feature introduced recently and I thought perhaps it had been removed already but thank God... No, it is still there! You just need to click the input field and it appears. (Cringe)

[![enter image description here][1]][1]
Eureka!
[1]: https://i.stack.imgur.com/f33wG.jpg

Sorry but I don't understand your answer. Please do not just post a screen shot also describe what it means and what steps are necessary.


text:
.nomedia + SD Card - just can't create the file, no matter what
I have an ASUS Zenfone 7 Pro phone running Android 11. This phone comes with an SD card slot and so I wanted to make use of it. It stored the files great, I can read the files all good. But I cannot make my Gallery/Android System ignore any folder on the MicroSD card.
For example, I have a folder with album previews. These all show up as folders in Gallery - needlessly.
So why I can't make the file? I don't know.
If I open Solid Explorer and try to create a new empty file as .nomedia anywhere on the SD card, it will just time out and will fail at the task. I can only force close the app when this happens. Other apps just gave me an error, but nothing specific.
How do I overcome this limitation? Maybe it's because the SD card is formatted FAT32? But I remember using MicroSD in my old Note 4 and other phones, and they handled .nomedia just fine. What changed? Something Android 11 related?

your problem is with Solid Explorer

Try this app to create

@beeshyams Unfortunately I was not able to open the SD Card with this app. It only shows internal storage - where Solid Explorer also worked just fine. :/ Thank you though.


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:
dex2oat64 is eating battery on Android 12 (Beta). What is it?
I have updated my Pixel 5 to Android 12 Beta, and in the last update, the "app" or service called "dex2oat64" eats too much battery.

I found some thread in Reddit, but they also don't know the answers like me.
What is this app/service?

dex2oat compiles the Java byte code to native ARM code so applications will run faster. After each update/upgrade all aps are usually processed one time this way which can take several minutes and a significant amount of battery.

@Robert That sounds like a good answer.  Why only posted as a comment?

dex2oat is a utility used when installing or updating applications, so that was likely just a remnant of your "Android is upgrading" phase that you saw after the initial/first reboot after the system/software update.
Most likely you have just installed Android 12 and it's setting up everything/caching process in the background. See if it get fixed in a few days (3-4 days usually).


text:
Cant disable wifi multicast and constant arriving of data packets on rooted Android
Problem :
I'm using public wifi in my college. (They won't allow alternatives). At least 40,000 students are using it regularly.
I keep receiving data packets from the moment I turn on wifi even though my device is idle and no other apps are using the wifi. You can see it here :
https://i.stack.imgur.com/zKzcO.jpg
This has been giving me nightmares lately. My active drain per hour was 6-7% and CPU usage was below 40% while browsing social media or stream videos.
After this problem, my active battery drain is 20-25% per hour, and CPU usage is always around 70%+ which leads to phone heating up and very poor screen on time.
Solution :
• Tried blocking qcom_rx_wakelock from the kernel (doesn't block data packets)
• Tried editing WCNSS_qcom_cfg.ini from system/vendor/etc/wifi and added offloading features e.g. arpOffload and nsOffload. The guide can be found here -
See here
This works for the majority of the phones (my friends tried it and it worked) but sadly not for me.
What I need -
I have root and I'm looking for a way to block the packets from coming to my phone. I could disable wifi multicast from the router if it was my wifi. But it's not.
Is there anything I can do? Thanks for reading
Note : The problem disappears if I e different wifi which proves college wifi the culprit

Multicast in Wifi is often a problem because most Wifi system just convert it to a regular broadcast to all devices. If this is the problem source in your case it has to be solved by the Wifi network provider. I would make a PCAP network traffic dump using e.g. PCAPDroid and provide this capture to the college IT admins. The common way to stop this is to block multicast and broadcast traffic.

@Robert thank you so much for the comment. I already complained to IT office and they won't do anything about it cause only a few people reported it. It's sad there's nothing I can do from my phone.


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:
Are push notifications normally slow?
I have a persistent problem with notifications to all apps on my OnePlus6+ where they typically are delayed 30-60s, often I will get several notifications showing at once or when I unlock my phone suddenly I get notifications.
I can test with gmail, Slack, Messenger, WhatsApp and any other app where I have a version open on my PC at the same time
I've only ever owned Android smartphones, and only from OnePlus so I do not know if this is just how Android works or is a 'feature' of OxygenOS/OnePlus hardware. But it's happened across multiple versions of Android and hardware for several years.
It suggest PUSH notifications are not really being PUSHed but polled, like the phone is only checking periodically.
I see it whether on WiFi or cellular networks and it's quite irritating. Can anyone give me any information or advice about it?

Check from battery settings if these apps are battery optimised , if they are , remove from battery optimiztion. This seems to be a likely reason. This would help you understand how push notifications work

You may also refer to Don't kill my app for some tips per device brand.

Early tests show I can turn off optimisation and fingers crossed it is much better. I have one app I really need notifications to be delivered prompty.#

That push messages are not delivered in real-time is because of the battery optimization Android applies (this optimization may additionally also be applied by the Google servers providing the push messages).
The main idea behind the function to concentrate/group multiple notifications is that if you have multiple apps running waiting for incoming push messages it may end up that your device has to wake-up every few seconds and check for incoming push messages. A device that wakes up that often has a negative effect on on the battery so Google decided to group the messages and only check in every few minutes especially when the phone is not used for a certain time.
If I remember correctly this feature was introduced first in Android 7 and more and more extended with every new Android version.


text:
Battery usage for "mobile network standby" even without SIM-card
I have a phone reserved for development, which has never seen a SIM-card (to avoid accidental use of expensive amounts of data transfer).
Now, when checking battery usage, I see 4% accounted to "mobile network standby".
So what's wrong here?
No SIM-card == no mobile network, right?
I've seen this Android data usage shows significant usage even without SIM card but it talks about data usage, not mobile network."
Edit:
@Robert sugested:
"If you want to disable cellular activate Air-plane mode and then reactivate Wifi+Bluetooth if needed (phone will still be in Air-plane mode)."
And it looks as if this is working. I Still have 4% battery loss (over the time of 2-3 days), but the phone does no longer attribute it to "mobile network standby", so hopefully it is really only internal battery discharge.

Enable developer options, disable mobile data always active and check

Requests that your app makes to the network are a major cause of battery drain because they turn on the power-hungry mobile or Wi-Fi radios. Beyond the power needed to send and receive packets, these radios expend extra power just turning on and keeping awake. Something as simple as a network request every 15 seconds can keep the mobile radio on continuously and quickly use up battery power //so your apps keep requesting access irrespective of SIM being present or not and therefore suggestion above should help

@beeshyams that sounds good, Settings->(Edit)->System->Developer options->[from many, many options, choose]: mobile data always active It will take a few days to verify.

My hunch is that it should solve but only verification can confirm. You can charge the phone fully and test overnight. That should give a fair estimate (without interruption of your development work)

No SIM card does not mean no mobile network. In some countries you can still make emergency calls without a SIM card. Therefore the phone constantly searches for local cellular networks. If you want to disable cellular activate Air-plane mode and then reactivate Wifi+Bluetooth if needed (phone will still be in Air-plane mode).

@beeshyams Your proposal does not work on my phone. It has a strong battery, so one day to verify is not enough. After the first try, "mobile network standby" was 11%, but checking the switches, "mobile data always active", somehow, was "On" again. I recharged and checked again, it is "Off" now but has still drawn another 4%.

@Robert as beeshyams's advice does not work (don't know why, sounded real good) I will try yours. Your hint on emergency calls is valuable, especially if someone needs an emergency call that is not working ... .

@GyroGearloose A lot of country already have disabled possibility to make an emergency call without SIM because it was massively abused by people making fun calls. I remember one case where some one (not a child) was making more than 100 emergency calls during one weekend.

@Robert that's a shame. But I really miss the possibility to make some test calls, not to the emergency people but to some automaton, just to make sure it would work if needed.


text:
Why would Android list some files that are not accessible (I/O error)?
For background, trying to resolve a problem with a Android 4.x tablet Denver TAC-97032 (Tablet battery replacement and alloc_device_open fail?).
The device cannot boot fully, but I can connect to it via adb.
After finding Android boot-up messages for debugging?, first I tried ./adb pull //proc/kmsg (doubled slash due to MSYS2 bash); and there I could see:
<3>[    9.696137] init: cannot find '/system/bin/bootanimation', disabling 'bootanim'
<7>[   12.967235] WRN:L1364(drivers/usb/sun4i_usb/udc/sw_udc.c):handle_ep0: ep0 setup end
<7>[   92.223978] battery vol change: 59->60

Hmm... so I thought to check:
root@android:/ # ls /system/bin/bootanimation
ls /system/bin/bootanimation
/system/bin/bootanimation: I/O error

Weird - so I thought to check the listing of /system/bin as plain, vs listing with -la; and you can see the result of this compare in meld (note, I manually removed timestamps from the -la output for easier comparison):

So, there is a whole bunch of files (thankfully, all grouped together, so all of them are shown on the screenshot), that plain ls lists - but ls -la doesn't!
What is the explanation for this behavior? How could Android possibly get those filenames to begin with, if they are not accessible? And is there anything I could do, to make the inaccessible files accessible?


text:
Sim card manager - Mobile Data sim card assignment not persistent
I am using Samsung A50, which is dual sim. In the Sim card manager I set my SIM 1 to be the one for Mobile Data, but every time I reboot the device, the setting gets reset back to SIM 2, and so I need to make sure to revisit and adjust it. (I have just received an OS update so I had it all reproduced quite clearly.)
Not sure:

why it is resetting, in the first place. Isn't that setting supposed to be persistent across reboots?

what causes SIM 2 to prevail? Is it that because it is the first sim card that manages to establish data connection? Programmatically speaking, I would assume that SIM 1 would prevail as the one with 0 index.

Is there any other setting that could mess with all that? Can I somehow mitigate this problem?


text:
How to change phone model for not get recognizing over apps like instagram
Where phone model props save on device?
When you login with another IP , apps like Instagram send an email which this email contain IP, Phone Model which had access to login.
How can i change phone model in Android?
I got root access.

There is a very similar question: https://android.stackexchange.com/q/229405/2241

You can try this Magisk module


text:
one tap wifi widget similar to power control widget?
I recently bought a new phone and was surprised that the power control widget is no longer a thing. I tried many other widget and they're either just shortcuts to the settings or they straight up don't work. Do you know a similar widget to activate wifi/ data/ bluetooth in just one tap?

Looks like your old phone was really old. If I remember correctly those widgets disappeared because Google removed the possibility to enable/disable those settings by apps and windgets in newer Android versions (without root). Also there is now the swipe from top menu which contains all the necessary switches.

Ok, so it's impossible? That widget was simply brilliant and brilliantly simple.


text:
Unable to activate Developer Options on Samsung
A quote from here:

I have tried everything and am unable to activate the developer
options on my Sasmung Galaxy S7 Edge with Android 8.0. Whenever I tap
the build number repeatedly, it says that the developer mode has
already been enabled. I can confirm however, that this is not the
case:

The "Developer Options" menu does not appear in my settings
Even when using the search, these settings do not appear
Some users used third party apps like "ActivityLauncher" to manually search the com.settings.Settings.$DeveloperOptions activity.
I have tried this method multiple times with different apps, it doesnt
work. Trying to open an activity that requires developer mode gives me
an error as well.
Tried restarting the phone multiple times, closing all tabs, clearing the "settings"-App cache and data. Nothing works.

I am at a loss right now... I really want to avoid resetting to
factory mode because my phone has a ton of data stored on it. Any
ideas on how I could solve this?

This was also true for my S8, Android 9. Though, every time it says "You are _ steps away from being a developer..." and then asks me to put in the password and then says "Developer mode has been turned on." I can repeat this many times and it will ask me for the password every time and say the same things every time and the developer options are still not there. I am equally at a loss to the OP and I'm equally unhappy about the current only solution of a factory reset. Help would be greatly appreciated!

Does this answer your question? Re-enabling Developer Options

Try this app https://play.google.com/store/apps/details?id=cn.trinea.developer.options

@Robert I am looking for a solution not a workaround.

Have you tried to enter Developer Settings and then disable them from within? Sometimes it is possible to activate Developer options the regular way.

I am not sure what you mean. See my answer if that answers your question.

I found the reason it was for me: I use an internet filter called NetSpark (https://www.netsparkmobile.com/en/) which disables Developer Options as a security measure to prevent workarounds or uninstallations. It is a matter of enabling this in the Netspark settings.


text:
How do I stop the Google app from automatically updating?
On my Samsung Galaxy A10E, Android 10 the Google app will update, taking up 300 Mb of unnecessary data, despite these things I tried:

Disabling the app (It re-enables itself after updating)
Disabling all permissions
Disabling Google Play Services permissions
Disabling auto updates in Google Play Store

I don't really need those 300 Mb, but I hate that this app is acting outside of its permissions. Can this be stopped?

Yes the search app

On my A10 I simply uninstalled it.  Have you tried that?

@Chenmunka I have tried, but on my device there is no uninstall option. Instead, there is the option to disable the app. In the Google Play Store, I can uninstall the updates to the app, but even with automatic downloads disabled, the Google app will update itself to the 300 MB version without notifying at all.

Same for Huawei Y6 II Dual :/ Hope someone will find a solution

its a hige pain .. nexus6 no unistall & when i disable it cant use my phone.. get the tumbling hr glass ..google apps constant snooping consumes battery.. the updating seems to be run from google launcher.. & nexus6 has no options to control it.. battery life doubles with update removed but its back after 24hrs

Well if Google app isn't important for you, you can uninstall it using the following ADB command adb shell pm uninstall -k --user 0 com.google.android.googlequicksearchbox


text:
Generic approach to get Ethernet working on android
Is there a generalised approach to getting Ethernet cable networking to work on (preferably) recent Android versions with minimum fiddling?
I've looked at other similar questions but they focus on pre-existing devices, specific Ethernet adapters and/or specific ROMs.
For example, I have found that Nexus 7 (2013) with the ResurrectionRemix ROM (Android 7.1.2) worked with a generic noname Ethernet (powered) adapter from aliexpress when connected through an OTG cable and with the USB RNDIS selected in Options > Developer Settings > Default USB Configuration. Connecting power to the ethernet adapter, the OTG cable and the RNDIS setting was all that was required.
With more recent android devices and newer Android versions I could not identify a successful combination of rom+adapter+device+[kernel].
Given that I am willing to root a device and/or buy a specific combination of compatible android device + compatible ethernet adapter, what are some known configurations that work out-of-the-box with minimal extra configuration? Any hints, suggestions or guidelines in this regard?
Alternatively, is there a 'generic' package with USB-Ethernet drivers that could be flashed for widely supported ROMs (such as lineageos) that [in combination with a custom kernel or without] would provide Ethernet connectivity?
And finally, in case if the official AOSP/LineageOS/etc repos have this functionality but it is not enabled by default, what would be the steps to build a ROM such as lineageos or AOSP with all possible Ethernet and USB-Ethernet modules enabled?

Does this answer your question? How to make Ethernet work on Android over OTG?

I did read that answer before posting this question. That answer focuses on what technically needs to be done on an android device in order to get ethernet up. This question is specifically about how to avoid having to do all those steps manually, and instead pick a combination of device+adapter+rom+kernel that just works (as in the example I provided), or how to build/mod a rom to enable this functionality.

Mokee 11 ROM experimental (Android 11, apparently a fork of lineageos) and xiaomi.eu roms contain the required ethernet drivers that happened to work with two USB-C to Ethernet adapters that I tried. The USB-C version of the ethernet adapter works on a rooted mipad4 tablet OOTB without any extra actions required. The USB-A version only worked with an intermediary USB hub + USB-A to USB-C dongle. When connected via a USB hub the network connection will only appear after rebooting the device with the cable plugged in or after issuing in the terminal su followed by dumpsys ethernet.


text:
Is there anything I can do to securely erase my phone's data before sale?
I've had a Samsung Galaxy filled with thousands of sensitive financial documents, which I've been using as a pocket computer pretty much, in order to reference them each time I need to throughout the day.
It's heavily debloated, de-Googled, I've had the Secure Startup device encryption enabled in case I'd lose it and a firewall (NetGuard) installed to prevent data leak for when it had to connect to the internet.
I wish to sell this phone now (or rather, give it away for free to someone who might). So, that means decrypt it and hard reset it.
Is there anything I can do programmatically (e.g., via ADB) to further wipe data? Something we would do to a computer hard drive, for instance, like secure wipe/zero out its data?

What Galaxy phone are you talking about (ai don't thing you are talking about the original Samsung Galaxy)? You don't need to decrypt the device. Just perform a factory reset. This will erase the decryption key and all the encrypted data will be unrecoverable. You can check that after factory reset the files are gone.

@Robert It's an S9+ and apparently there's another S8 that I was using for the same purpose, like a year ago, forgotten in a drawer. Basically, what you are saying is keep them encrypted and simply perform a hard reset? That will do?

Yes. If you are unsure, perform the factory reset from within running Android (not via recovery) and then after factory reset skip most of the first start wizard and check if you can see any files. Because of the encryption if the files are no longer to be seen they are unrecoverable gone after a factory reset.

@Robert Can you explain why I should reset from within the Settings menu and not via Recovery? In the past, I've always used Recovery for this purpose. Specifically, I'd use Wipe cache partition, then Wipe data/factory reset and finally Reboot system now.

Search the internet for "factory reset protection" (FRP) and you will know why.

Ok, I looked up FRP and from an article I found, I'm quoting: "If you try to reset a phone through the bootloader, FRP will kick in, and it can't be set back up without the previous account's password." ——  As I mentioned in OP, my phone is deGoogled, so I am/was logged in with no Google Accounts. Is in my case in-Settings reset and Recovery reset, one and the same thing? edit: Also, no Samsung accounts ever.


text:
How can I make an APK stop checking for updates? It's not downloaded from Google play
There's this music app (Fildo 4.2.9) that for a certain reason I don't want to use the latest version of, is there a possible way i can stop it from checking for updates? i literally can't use it because it displays a box that won't go unless it's updated.

There are only two way: 1. don't allow the app to connect to the server it uses for checking if there are updates. 2. Modify the APK so that it does not check for updates. For both ways there no "one-click" solution.

Care to explain more on how i can do these stuff? Or how to locate the server or the file that checks for updates?

Both ways can get pretty complex. The easier way is usually blocking the server. Use one of the packet capture apps or PCapremote to capture the app network traffic (after clearing it's app data). Also make sure that you don't use private DNS feature of Android. Then you should see the server name. Once you got the server name you can try to block it e.g. using Blokada app.

Thank you, i will try it out.


text:
No Zoom and Google Meet on Android 7/8 TV
I have Sony TV X82E 2017 model. Today MiTV Webcam got launched. It says in the specs that the webcam supports Android 8 and above which I think my TV has.
But when I tried to install Google Meet and Zoom from the Google Play TV store, it said that this was not available for this device. So there's no Google Meet and Zoom for my Android TV, then there is no point in buying this webcam.
Is there any way to get Google Meet and Zoom on my Android TV?

Have you tried to side-load those apps onto your TV? The Zoom app defines in it's AndroidManifest.xml that it uses the camera but it also says that a camera is not required (-> hence it is optional). A lot of apps are not available via Play Store because their developer simply have not tested it for AndroidTV compatibility.

Google Meet is a Google product. Is there a reason why Google Meet isn't available for the TV ?


text:
Break or trivialize recovery mode
Is it possible to have either a broken recovery mode (without bricking other modes) or a trivial recovery mode (e.g. no menu and automatically shutdown)? Where can I find existing ones or instructions to build my own one?
One naive "solution" I thought about is to flash 0 into /recovery, but I do not know if there may be unexpected consequences.

The main problem of flashing a broken recovery is that someone can reflash a working recovery using the same method. Therefore this only an obstacle for "very simple Android users".

@Robert I understand that. But exposing a 3-second factory reset option to everyone is even worse. Also, let's ignore FRP since that relies on google services.

Does this answer your question? Is Android's system recovery a firmware thing or Android thing? Can factory reset be prevented?

@alecxs The answer in that question says " In A/B slots, recovery is part of boot.img so it can be directly booted by ABL." If I understand correctly normal boot and recovery do share the same kernel. But then where is the beginning of the railroad switch? in ramdisk?

that happens earlier. in ABL where the physical key is recognized.

@alecxs Ok key gets recognized. But suppose we are not on A-only device, the same kernel will be loaded. So there is going to be a firmware level railroad switch? Do recovery and normal os use the same ramdisk?

https://source.android.com/devices/bootloader/partitions/ramdisk-partitions

@alecxs No I am not mixing them up but that link clarifies a bit. Do we have control over kernel parameters or it is completely hardcoded in bootloader?

use this tool AIK to separate ramdisk from kernel and have a look into split_img/cmdline txt file for parameters


text:
Can I use Whatsapp / take backup on phone A while having associated SIM card inserted in Phone B?
Problem Statement
Phone A (Nexus 6P) cannot detect mobile networks due to some issue and hence cannot receive WhatsApp verification SMS. This makes WhatsApp on Phone A unusable. Phone B (Samsung J7 Prime) is OK in all aspects.
Proposed Idea

Use SIM of Phone A in Phone B
Log in to WhatsApp on phone A. Receives verification SMS on Phone B and access WhatsApp on Phone A using that verification SMS
Take a WhatsApp backup on Phone A and send it to Google Drive
Then log in to WhatsApp on Phone B and restore the backup on Phone B
Finally, start using WhatsApp on Phone B

Will the proposed idea work? Will it destroy my WhatsApp chat history?

Hi, yes, it will work. If there is existing chat history on the device associated with the same WhatsApp number, then it should be retained with no issues.


text:
How to uninstall gmail app on android without root
I'm looking for a way to remove the preinstalled Gmail app (not account, I meant the app itself). My web searches yield methods to remove gmail account, not the app. Just to add, I had managed to finish the default android setup/installation (when the phone was 1st activated after purchase) by using a non-gmail account. It worked just fine til today (almost 1 year).
Gmail/Gmaps/Photos/Other G-Apps is just another app in android. Just quite puzzled why it can't be uninstalled just like any other app. I'd prefer a non-root removal solution if possible.
If it is not, appreciate if you can include a way to 'undo' the root after the app removal. Terminal based or debug mode solution are still acceptable as long as the phone can still be switched back to 'non-root' mode later. Fyi, I'd prefer the phone to operate in 'non-root' whenever possible as a (tiny) phone cybersecurity effort.
p/s : This post share a method to disable it.. but not (afaik) uninstall.

adb shell pm uninstall --user 0 com.google.android.gm. See What are the differences between a system app and user app?.

Install Platform-tools on your computer (google if don't know how to)
Enable Developer Options on your phone (google if don't know how to)
Then enable USB debugging in developer options
Then give the command
adb shell pm uninstall --user 0 com.google.android.gm

I just learnt : shell (run emulator console command) pm (package manager) uninstall (removes package) --user (what's this means/for?) com.google.android.gm (target app) | off all the reference I had encountered, non explains the info for --userunder pm uninstall   command |my ref | Thanks a lot for the great assist, really appreciate it. ( :

@p.phidot --user 0 implies admin user on your phone. For example, if you have multiple users, --user 1 implies the second user. SO here, uninstallling an app for --user 0 implies removing it for admin user or rather the first user on the device

oic.. thanks @karthiknair.. got it.


text:
Downloaded files consistently disappearing from Internal Storage
I have a Moto G Power running Android 11.
I like to listen to audiobooks, so I routinely download files from OneDrive, using the OneDrive app, to folders in my internal storage.
When I open the "My Files" app, I can go directly to Internal Storage. When I open Internal Storage it actually takes me to the folder "/storage/emulated/0/" I cannot go up to a higher folder. So I created a folder there called "Audiobooks" I create subfolders for each audiobook and I use an app (Smart Audiobook Reader) to read them.
When I download files, I go to OneDrive, find the audiobook mp3 files I'm looking for, select "Download" and then save it in the appropriate Audiobook subfolder. Also sometimes I download jpg files that serve at the "book covers" in the app.
All of this works well. I download new files every few days, 2 or 3 at a time.
However, over time, files in these folders start disappearing seemingly at random. Only the mp3 files, and it happens without me even know it so I'm not sure when the files are disappearing. I vaguely think it might have something to do with how long ago the file was downloaded and whether or not I accessed it recently, but in general, files start disappearing within 2 weeks or them being downloaded. It's only the MP3 files, and not the jpg files which leads me to believe a size issue too.
I've searched for solutions to this but no dice. This is what I've ruled out:

It's not the audiobook app reader. I deleted it, installed a different one, and the problem continued to happen.

It's not the Storage Manager under the Storage system settings. That feature is turned off.

Files aren't hidden. I've selected to show hidden files in My files.

I feel like I've exhausted all of the usual suspects. So I'm wondering if anyone has any thoughts.

You've missed another "usual suspect": the OneDrive app. Some "cloud storage apps" want to "help" you with storage management that way, as you always can get the stuff from "there". Not sure if this app is one of those (I'm not using it), but it would fit.

I did actually already check OneDrive. There is no setting in the app that cleans up files. Also, I'm not making the files "offline" to store them on my phone, I'm downloading them, so once downloaded they are outside of OneDrive's purview. I doubt the app could keep up with downloaded files to try to delete them, especially since they can be moved freely after download.

Thanks! Just wanted to make sure it wasn't missed (I don't use any such cloud apps, so I couldn't tell).

Did you find any solution for this problem ? Last month I suddenly observed files being disappeared from my android device shortly after I download them from google drive, and move them from downloads folder to custom directory.

I have the same issue with my pixel 7... I download mp3 files from my one drive which disappears after a few days. I do not like that at all...


text:
How to let Gmail only send notifications and not allow the features like Find My Phone?
I have a Gmail account and 7 of my friends including me have added the google account to our android devices. However, it can be used for the features like Find My Phone and subsequently can be used to erase the data if any one of us wishes to do so.
So, how do I make that Gmail account just send me notifications for new emails, and not allow it to trace my phone using features like Find My Phone? I have searched in the web, but didn't get any way to achieve what I want. Any suggestions regarding this would be of much help to me.
In other words, is there a way to add the Gmail account like just another email account (e.g. Outlook etc.) in our devices?

Couple of ways of using a Gmail account on your phone without linking it to your device (avoiding contacts sync, device manager concerns etc) :

Configure Gmail as IMAP. See How to add Gmail account without adding Google account on Android for instructions.

Use a mail client that allows you to add Gmail accounts . I use an excellent open source client, FairEmail to add multiple Gmail accounts (also other mail providers) ( See FAQ for help). Free version is good enough for your purposes.

Both these methods don't link the mail account to your device and therefore cannot be used for Find my phone, contact sync etc.
Note: First remove the account from your device and then use either options

The first way did it for me. However, I was not able to sign in using the default email client of my phone via Personal (IMAP) way at the first go, and tried 2-3 times again but to no avail. Finally, while configuring the outgoing server setting, I unchecked/turned-off the Require sign in option and it did the trick.


text:
Cannot record audio using screen recording on Google Meet
I am using screen recording to record Google Meet on phone. Unfortunately, the recording cannot record audio. It shows an error that the microphone is on used.
Any way to record Google Meet on phone? I am not the organizer.

Maybe the screen recorder app has settings for sound? Try selecting system if it is available (guess, I haven't tried)// or put it in speaker mode to record (provided it does not disturb others)

Unfortunately, you can't.
Due to privacy concerns, while screen-recording, Google has put up restrictions to record audio in apps such as Google Meet, Google Assistant,etc


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.


text:
How to determine exact package/application which cause undetected traffic consumption (only UID are known)
The situation
Some time ago I am started to locate data traffic leakage by the some packages, which listed in traffic listings as a numeric UID (five digits long). In both selection - by the cellular data and wifi.
Device is unrooted, and can not be rooted: Sharp R2 Compact
I ask'd on web forum (4pda), about this situation, and I am was instructed to try to inspect Package Manager via ADB, but as I expects - nothing is located there with investigated UID numbers. For example, the larger consumer (about a half of gigabyte) is UID=10366 and it was in april.
Android/sdk/platform-tools% adb shell "cmd package list packages -U | grep 10366"
Android/sdk/platform-tools%

These days some different UID numbers is still present in traffic consuming lists.

Questions:
Is there a way to catch which package cause "unnamed" traffic consume on unrootable phone?
Is this a malware activity or an ordinary system activity may cause the same (traffic leak tie to unnamed UID instead to exactly package/application)?
May be somwhere exist a guide to learn more how traffic is counted in system provided listings?
As a PS:
I am Android developer and can write couple lines of code to run, but I needs to be pointed to where I'll should to start from

Based on previous questions, these numbers usually are a remnant of uninstalled apps. Do new numbers still appear without uninstalling anything?

@Andrew T. I don't think so. First: on a first screen on the bottom present a isolated item named "Удалённые приложения" (uninstalled applications in english). Second: I am do not have equal counts on install/deinstall applications as number of UID's in traffic consuming lists. Btw, thanks for the link on previous discussion.

@Andrew T. And yes. New numbers appears without deinstalling any applications.

If you are sure that the app is not uninstalled, my answer to How to view network traffic requested by a specific app? may help.

@Irfan Latif, seems your variants is irrelevant. First - phone is unrootable. Second - on-topic records (with UID only as a consumer) goes aside from NetGuard (on my second screenshot this tool presented by the two icons in notification bar). NetGuard send notify on every new install - this is okay. But no notifications come when some activity by the undetectable UID occurred in the system. This may be due to I am some misconfigured in the NetGuard tool.


text:
How to display camera image on second Android device?
I'd like to hold my Android phone in an awkward to reach place and be able to see the live image on my Android tablet.
I might be able do it with some cable adapters and a Chromecast dongle, but is there a software solution that uses wi-fi or Bluetooth directly without any of the extra hardware?

Android doesn't provide any native way of mirroring one screen on another Android screen, but there are several apps that can do it.
The problem is that, in every search I tried, they are buried in with a much larger number of apps that stream to TVs, and are difficult to find.
user3179186 suggested using the HTTP Stream app, as described in Cast Android Screen to Android - YouTube, but as a link-only answer it was deleted.
I tried it, and it's more than adequate for my purposes.
Basically what it does is act as a mini-web-server running in the background.
It makes a single web page available on the local wi-fi network, a page that simply shows whatever is currently on the host device's screen.
Anyone on the local network can use a web browser to see it, so it is not only useful for acting as a remote camera, it can allow several people to see whatever you are doing on their own devices (rather than having all the heads together trying to see the one screen).
So it's perfect for "look at these photos" or "look, this is how you do it" situations.
The only two possible drawbacks I've found so far are that it doesn't provide audio, and the video has a slight time lag.

[Note to user3179186, feel free to repost a more suitable version of your answer.
Make it better than this, and I'll delete mine and accept yours.]


text:
How can I configure Microsoft Teams so that it doesn't disconnect the audio when I receive a phone call during a Teams meeting?
How can I configure Microsoft Teams so that it doesn't disconnect the audio when I receive a phone call during a Teams meeting? I use Android 10 with Samsung Galaxy S9.

Sounds like this is impossible to  configure Microsoft Teams so that it doesn't disconnect the audio when I receive a phone call during a Teams meeting. From  barneyman on Reddit:

I don't think you can - Goog's hangouts and meet suffer the same problem


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


text:
Hide the ETA screen in Waze when starting a new navigation
When starting new navigation in Waze, I want to drive right away: I don't want to have to click on Go or wait ~ 13 seconds to remove this screen:

(Click the image to see its larger variant)
Is there any way to automatically bypass / hide / remove that ETA screen?


text:
Which Apps can be deleted from an Android?
Are there any pre-loaded apps that can be deleted without affecting the operation of the phone, or of other apps? The purpose is for ease of use, and to save space.
Hi, thank you. I have a Wiko 2 phone, an Android version 9, U307AS with 16 GB for data. I have 64 apps.  76% of memory is already used. There are apps I never use, and apps where I have two for the same purpose. I rather have just the ones I need and use including some new ones. Please let me know if you need more information.  Thank you.

Depends entirely on the phone and Android version you are using. Until you tell us both we cannot provide you a precise advice. In addition, see if this helps: I have less than 40 apps (including system apps); What else can I remove?

Additionally the manufacturer (and it's modifications made to Android) plus the device hardware have an impact on the pre-installed apps Especially hardware (Qualcom, Mediatek, ..) related apps are usually those you should never disable, otherwise the device may end up in a boot-loop.


text:
How to set distinct boot and lockscreen passwords in Android 10 (full disk encryption)
How can I set a distinct password for:

The Full Disk Encryption password (used to boot the device)
The Lock Screen password (used to unlock the device)

For security reasons, I use a 25-50 character password to protect my devices when off and a shorter password for the lock screen.
This was previously possible using apps such as:

EncPassChanger or
Cryptfs Password

I just upgraded my phone, and neither of these apps appear to work in Android 10.
How can I set a distinct password for [a] the boot password and [b] the lockscreen password in Android 10?

Are you sure your device uses FDE? Modern devices no longer use full disk encryption, instead file-based encryption is used. See How can I find out if my device uses FBE or FDE?

See also https://android.stackexchange.com/questions/239114/how-to-use-fde-in-android-10-full-disk-encryption

Solution: Primary & Secondary account, distinct passwords
This doesn't answer your question directly, but you can probably achieve what you want by using multiple profiles with distinct passwords.
Set the "owner" profile to a very long "boot" passphrase.
Then create a new user profile (Settings -> System -> Advanced -> Multiple users -> Add user). Switch to this user and set a shorter "lockscreen" password.
Now when you boot the phone, in order to access the secondary user's data and apps, you must type the long "boot" passphrase for the "owner" user first, then you must type the shorter "lockscreen" password for the secondary user.
After switched to the secondary user (thereby necessarily having authenticated with both passwords), your lockscreen will be unlocked with the shorter "unlock" password.
If you reboot the device, then you must type both passphrases again. This achieves almost the same end as having FDE with a distinct boot & lockscreen password.
Issue: FDE removed in Android 10
Unfortunately, the solution you're looking for does not appear to be possible because it's not possible to use FDE in Android since Android 10.
According to the ASOP documentation, it is no longer possible to use FDE and the user is forced to use File-Based Encryption

Note: Devices running Android 7.0–9 support full-disk encryption. New devices running Android 10 and higher must use file-based encryption.

More issues: Backups
Unfortunately, the biggest issue with the dual-user approach is backups.
As far as I can tell, both users have distinct files (encrypted with distinct keys that are not shared), apps, and app data.
Moreover, secondary users in Android cannot use adb or become root. Therefore, adb backup and tools like oandbackups will not work because the "owner" user (the only user who can become root) cannot see the secondary user's files/apps/data.
So, if you're google-free, then this solution probably means you cannot backup your phone anymore :(
Update: I was successfully able to restore backups of apps taken on my old phone's "owner" account in oandbackups and restore them to my new phone's secondary user's account with oandbackups following this procedure:

first, uninstall the app if already present
open oandbackup (as the secondary user, needs root)
find the package you want to restore, long-click it -> click "uninstall"
when finished, long-click it again -> restore -> apk (only)
open the app as the secondary user
after opening it, run ls -lah /data/user/10/xyz.tld and make a note of all the owner:group perms of the files
back in oandbackups, choose "restore -> data" for the package
run mv /data/user/10/xyz.tld /data/user/10/xyz.tld.fresh
run mv /data/user/0/xyz.tld /data/user/10/
run chown abc:xyz -R /data/user/10/xyz.tld to match the permissions of the freshly-installed app for this user
run restorecon -R /data/user/10/xyz.tld to fix SELINUX permissions
reboot the phone (if you don't do this, opening the app will immediately crash)

Secondary users can access root. The superuser manager has to provide that functionality. Magisk allows running it in multiuser mode. Enable it, install Magisk Manager app in secondary user and test it out using an app which requests superuser permissions, such as Terminal Emulator. It would work. As for adb, it is not about secondary users. It is that functionality you are after is not added in the Android. Android backup relies on backup manager service which by-default doesn't run for secondary users, so adb backup or adb shell bu  doesn't work as a result IMO...

This is more of a functionality missing than a constraint. As for backup tools, they need to be programmed to work with root acces in secondary user accounts. So far, I have found none (likely because the demand for such feature and the size of users needing such feature is miniscule by any standard). That said, if an app can access root when running under a secondary user, it should not have problem backing up data too. See How to access /storage/emulated/10 (multi-users env) in adb shell on Android 9+ without root access?

@Firelord Thank you so much for this! To gain root in a secondary user profile, you must first open the Magisk Manager app in the "owner" profile and navigate to Settings -> Multiuser Mode. Set it to User-Independent = Each user has his/her own separate root rules. Now switch back to the secondary user profile, and you can use Magisk Manager in the secondary user profile to grant root to applications. Hooray!


text:
How to use FDE in Android 10 (Full Disk Encryption)
How can I setup Full Disk Encryption in Android 10?
According to the ASOP documentation, it is no longer possible to use FDE and the user is forced to use File-Based Encryption

Note: Devices running Android 7.0–9 support full-disk encryption. New devices running Android 10 and higher must use file-based encryption.

Though I understand the argument for convenience (morning alarms, updates, etc), there are several strong use-cases where it's better to have a FDE with a very long passphrase -- consider journalists, activists, political prisoners, etc crossing borders with oppressive governments. It's better to just turn the device off and rely on FDE to protect absolutely everything in these situations.
So the question is: how do at-risk folks use FDE in Android 10?

Note: creative answers that involve root, custom ROMS, apps, etc are welcome. I'm asking how this can be done on an Android 10 device. I'm not asking if Google "permits" it to be done.

Are you aware that the login password is no longer used for generating the encryption key? It now bases on the Trusted Execution Engine in the CPU. https://security.stackexchange.com/questions/196230/connection-between-pin-password-and-encryption-keys-in-android

holy crap they were using the login password to generate the encryption key?? Are you sure? It should be that the encryption key is randomly generated and symmetrically encrypted with the password, as most FDE systems use..

No, my comment was a bit simplified of course on FDE the password was not directly used as key. But the important fact was not on how it was but how it is now on FBE: the user password has no impact on the encryption at all. Therefore the password length is now totally irrelevant as long as you can't guess it as the code in TEE slows down the entering process (brute-force prevention).

screen log credentials still involved in FBE encryption (that's why TWRP ask for password) 5 digit pin is secure enough against bruteforce

on Poco F1 latest MIUI 12 doesn't even support secure startup anymore and uses FDE default_password, even if password is set while in unencrypted state, and encrypted later (which used to be workaround for MIUI 11 secure startup). see build.prop for Poco F1 Android 10 with forceencrypt= flag in /vendor/etc/fstab.qcom this is one of the devices one should keep bootloader locked for security reasons (or downgrade MIUI 11)


text:
Google Photos using up too much data and at the same time hangs on uploads even when on wifi
Two problems related to the Google Photos App:

It often hangs on uploading saying "waiting for wifi" even though the phone is connected to wifi
According to "Mobile data usage" in settings, Photos is using a lot of mobile data

To me it almost seems like 1. and 2. contradict each other. I use an always on VPN.


text:
How to always boot in recovery mode?
I'm using Magisk and, because my device (lavender with Android 11) does not have ramdisk in the boot images, I have to boot in recovery mode (not to recovery, only in recovery mode) every time I want to have root enabled.
So my question is, is there a tweak to automatically boot in recovery mode every time ? Maybe a script or something (I am not very familiar with these) ?
Thank you for your help !

i think you have rooted wrong. you can use magisk in boot

No, It's pretty common : https://topjohnwu.github.io/Magisk/install.html#magisk-in-recovery

this section is for samsung, and there is special note that instructions not valid for xiaomi. root magisk in boot


text:
Problem in installation of PrimeOS
When I want to install PrimeOS, I see a black page with a bash like command line instead of choices for choosing. Is it normal? If it is normal, what should I do and type in the page? In all PrimeOS install guides, there is choice for choosing not a place for typing.
I make USB bootable with ventoy. My OS is LinuxMint.

Excuse me for my poor english

Have you checked the PrimeOS FAQ thread at XDA? https://forum.xda-developers.com/t/rom-beta-primeos-android-for-laptops-pcs-v0-4-5.3858992/page-120#post-78858613

My problem is not same the link

Does your system meet the described criteria on described in that forum entry to run PrimeOS (SSE4.2, AMD/Intel graphics, ..)?

@Robert I think YES: Intel i5-4300U (4) @ 2.900GHz  - Intel Haswell-ULT


text:
Home wifi connection is very inconsistent and also my 5G as well. What is going on?
My phone tends to lose connection to the internet when I'm connected to my home wifi. Throughout the day, I will be watching youtube videos only to run into buffering as I lose connection. Then maybe a couple minutes later, it returns, or sometimes I manually disconnect my connection to my wifi and reconnect to fix the issue immediately.
I don't understand why it is doing this. I know the wifi itself isn't losing connection to the internet because my Xbox and PC are both connected to the same wifi and I haven't experienced lost of connection at all when I'm browsing the internet on my PC or playing online games on my Xbox.
Another thing is, my 5g connection isn't working as I would like it either at my home. At work, I don't even connect to the company wifi at all. I use my 5G mobile data to all day as I have unlimited data and it works perfectly at work as well as whenever I'm out and about. I'll watch Netflix, Youtube, etc and won't experience any lost of connection.
But when I'm home, I wouldn't be as mad about experiencing these wifi issues if my 5G unlimited mobile data also worked but it doesn't work as well neither. Usually I'll be using wifi, lose connection when my youtube video stops, turn off the wifi to switch over to 5G, still don't get connection to internet so I manually reconnect to my wifi and I get internet again, or I do get internet with my 5G only to lose connection maybe a couple minutes later.
Is there some signal interfering with my phone to both the wifi and the 5G network? I have two Xboxes both connected wirelessly to the wifi and they both work flawlessly. The smart TV as well.

I have the Galaxy S21 Ultra by the way but the previous phone I had, my Galaxy S9+ also experienced these same spotty internet connections as well at home.

UPDATE

Some Info on my WIFI

SpeedTest

Provider = ATT U-verse
5GHz Wifi Signal Strength = -50dBm
Router Model = BGW210
Ping = 57ms
Download = 30.27 Mbps
Upload = 12.08 Mbps

Wifi-Client Connection Statistics of Some Devices

MAC Address: (Galaxy S21 Ultra) |  Authentication State: Connected | IP Address: xx | Access Point: 5GHzxx | Transmit Packets: 100203 | Receive Packets: 41983 | Transmit Bytes: 106343914 | Receive Bytes: 7400949 | Trans Errors: 0 | Signal Strength: -69dBm | Disassoc Count: 1197 | Death Count: 2

MAC Address: (Galaxy S9+) |  Authentication State: Connected | IP Address: xx | Access Point: 5GHzxx | Transmit Packets: 282677 | Receive Packets: 93193 | Transmit Bytes: 386678945 | Receive Bytes: 14062960 | Trans Errors: 0 | Signal Strength: -61dBm | Disassoc Count: 1 | Death Count: 0

MAC Address: (Xbox1X) |  Authentication State: Connected | IP Address: xx | Access Point: 5GHzxx | Transmit Packets: 149483 | Receive Packets: 70467 | Transmit Bytes: 203467990 | Receive Bytes: 10668784 | Trans Errors: 0 | Signal Strength: -62dBm | Disassoc Count: 10 | Death Count: 4

Where do you live and which Wifi channels (2.4/5GHz) do you use Wifi? How many other Wifis are around you?

I live in South Florida near Miami. There's a 2.4 GHz and 5GHz connection to my wifi meaning each have their own SSIDs and passwords but both are inconsistent in terms of connection with my phone with the 2.4GHz probably being more inconsistent. My tv, pc, and xbox all use the 5GHz connection. This is an ATT Home Wifi system by the way. There are 5 Wifi connections showing in my area inluding my wifi.

Also, i'm looking at my wifi signal right now on my phone and its giving me one bar?? I'm literally the next room over where our wifi router is and I just walked in that room and it is still one bar. When I switch to my 5G, my bar is still one bar as well.


text:
Nothing happen when 'Tap yes' in Google 2-step Verification
Phone is Sugar C13. The phone is running Android 8.1.0.
When I sign in Chrome on PC, I get the "notification" of "Is it you trying to sign in?", and the two step verification pops up.
I tap "Yes", and nothing happens.
What could cause this and how could I fix this?

Possibly related: Google two-step verification doesn't want to work. Pops up, I approve and nothing happens

Yes, it's related. But it differs.  When I tap "Yes", I didn't  get a toast notification "Approved".... and nothing happens.

Strange thing is that other google services work fine.


text:
Unable to mount storage on twrp-3.5.2_9-0
My device is gt5note10lte (SM-P555) and running on Samsung stock 7.1.1.
I have compiled the twrp in 7.1 version but unable to get the storage mounted.
Device tree : https://github.com/psuryatej4android/twrp_device_samsung_gt5note10lte
TWRP Sources : https://github.com/EngMoPro/platform_manifest_twrp_omni
I think it is to do with some permissions. Please refer to the following video to see the issue https://www.youtube.com/watch?v=QxJ6ry5iHDQ
I have tried changing twrp.fstab, init*.rc,. Also, tried the suggestions from youtube videos.but no luck
XDA request link : https://forum.xda-developers.com/t/unable-to-mount-storage-on-twrp-3-5-2_9-0.4300059/
Any help would be greatly appreciated.

you are missing symlinks. resolve it from boot mode with realpath and use it in fstab. also have a look into TWRP 3.0.2 fstab init.rc

Tried, still not successful. will update once able to make it work

give example how did you resolve symlink and how did you update fstab


text:
Rooted android device but getting "Security exception: Permission Denial: not allowed to send broadcast android"
I've got a nexus 6P running stock Android 8.1 which is rooted using Magisk (verified by runnign adb shell su).
When turning airplane mode on/off using adb (as per these instructions: https://stackoverflow.com/a/40271379) the following exception is returned:
$ adb shell settings put global airplane_mode_on 1
$ adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
Broadcasting: Intent { act=android.intent.action.AIRPLANE_MODE flg=0x400000 }
Security exception: Permission Denial: not allowed to send broadcast android.intent.action.AIRPLANE_MODE from pid=6484, uid=2000

java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.intent.action.AIRPLANE_MODE from pid=6484, uid=2000
    at com.android.server.am.ActivityManagerService.broadcastIntentLocked(ActivityManagerService.java:19204)
    at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:19842)
    at com.android.server.am.ActivityManagerShellCommand.runSendBroadcast(ActivityManagerShellCommand.java:621)
    at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:154)
    at android.os.ShellCommand.exec(ShellCommand.java:96)
    at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:15021)
    at android.os.Binder.shellCommand(Binder.java:594)
    at android.os.Binder.onTransact(Binder.java:492)
    at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:4243)
    at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2919)
    at android.os.Binder.execTransact(Binder.java:697)

What needs to happen for adb to be able to turn airplane mode on and off?

Have you tried sending that broadcast as root user or as system user?

System, how do you send it as a root user?

Get into shell using adb shell, then su -c "am broadcast -a android.intent.action.AIRPLANE_MODE".

Awesome, that works!

Good to know. Please do post it as a self-answer.

Your problem was asked in a comment on that stackoverflow.com question and somebody had provided the same solution as I did here. See this comment: https://stackoverflow.com/questions/10506591/turning-airplane-mode-on-via-adb/40271379#comment86503606_40271379


text:
How to Embed audio files to cells in Excel? (in Android)
I have a table of alphabets, phonetics, and word examples.
I want to embed the pronunciation of each cell,
so I can press it and it plays the audio file in-app.
Is this possible?
If not, is there any other way I can do it (a table with embedded audio)?


text:
Is there any way to change screenshot buttons in phones which don't have it in the settings?
I have a Samsung Galaxy Core GT-I8262.
Its power button has some issues and I can't take screenshots using the combination of power and home buttons (I can't take screenshots using the combination of other keys).
It doesn't have the screenshot feature in the notification bar. Also, there isn't anything regarding screenshots in settings.
So is there a way to change the buttons to, for example, home and volume-down keys?

If your device is rooted, yes. If not, maybe an app may help

@beeshyams Thanks. How can I find out if it's rooted or not?

If you are the first owner and didn't root it, then it is not //many root checker apps are available on play store. They can help


text:
How secure are Pixel Recorder files?
I noticed that the files stored on Pixel's Recorder app (if not backed up/synced) cannot be easily imported from other apps.
They are stored in /data/data/com.google.android.apps.recorder/files/recordings which I understand requires root access to directly access the files outside of the Recorder app.
My question - and I apologize in advance for the newbie nature of this question - is, on a non-rooted phone, how easily could these files be accessed by an app that has permission to access media files or all files? Thinking of malicious apps, or apps like TikTok which have been known to gather/access more data than they need.

The directory /data/data/com.google.android.apps.recorder and the files and folders within are app-private which means that no other regular app can access those files.
This is true as long a the app itself does not provide a way to access the internal files (this is possible providing a ContentProvider). But for an audio recoding app this would be quite unusual to implement something like that.
The only exceptions are system apps and may be other apps from Google (assuming the the recorder app has set some special sharing flags (sharedUserId ). But this flag is rarely used and thus not very likely to be present here.
The last possibility is an malicious app which uses a vulnerability to temporary gain root permissions.


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:
Logcat: Different logs when the same app has been run multiple times
This question is w.r.t getting the logs from the logcat (using command-line tool).
I want to fetch the logs of a particular app after the app has been run for a specific amount of time (say 15 seconds) without any user involvement. So, I used the logcat using the command adb shell logcat --pid ProcessIdOfApp and when I tried to run the same app two times (after the fresh installation and cleaned all the earlier logs) using adb shell logcat -c, then also for many apps, I am getting different logs. When I am saying different logs what I mean here is we are getting different tags.
I also tried rebooting the smartphone and then installed the apk on the device, but still I am getting different logs.
My curiousity is when the same code is being executed, the corresponding logs generation should also be same. Why it is coming different when the same app has been launched multiple times?

Is it like I am not filtering the logs properly for a given app? If
yes, then what command I should use to filter the logs for a given
app?

Since I am getting different tags when the same app has been launch
multiple times, how to  know which tags should be ignored?

Have you seen: Filter LogCat to get only the messages from My Application in Android? Not sure/you didn't explain how you were getting ProcessIdOfApp Although I would probably just get the full logcat and grep for the app package. You might want to explain what you are trying to achieve, but please note that programming related questions are off-topic.

"we are getting different tags." without knowing the exact logs/tags, we can only guess, but tags are free-form input. Developers can provide ever-changing tags on their apps if they want (which I can't think of why, but it's just possible).


text:
Does GrapheneOS's Android 10-based releases use FDE (Full Disk Encryption)?
According to the ASOP documentation, it is no longer possible to use FDE and the user is forced to use File-Based Encryption

Note: Devices running Android 7.0–9 support full-disk encryption. New devices running Android 10 and higher must use file-based encryption.

Though I understand the argument for convenience (morning alarms, updates, etc), there are several strong use-cases where it's better to have a FDE with a very long passphrase -- consider journalists, activists, political prisoners, etc crossing borders with oppressive governments. It's better to just turn the device off and rely on FDE to protect absolutely everything in these situations.
I see that GraphoneOS's FAQ page talks about FDE and also Android 10, but doesn't directly answer this question.
Do the GraphoneOS releases that are based on Android 10 still use FDE? If so, how?

See also https://android.stackexchange.com/questions/239114/how-to-use-fde-in-android-10-full-disk-encryption

lot Android 10 devices still running FDE, the quoted google statement is irrelevant. which encryption type is used depends on device, not OS

@alecxs can you name one device that runs Android 10 and uses FDE?

Mi5, Poco F1, Galaxy S9+ (and lot more)

They don't run Android 10+

download stock ROM for star2lte and check /vendor/etc/fstab.samsungexynos9810 yourself. i have two Poco F1 and i know it for sure

https://android.stackexchange.com/questions/239114/how-to-use-fde-in-android-10-full-disk-encryption#comment317406_239114 https://android.stackexchange.com/q/233129 https://android.stackexchange.com/q/230892

GrapheneOS clearly mention metadata encryption which is FBE (not FDE) with additional keydirectory= in fstab (previously location for FDE crypto footer) for example default since Android 9 on One Plus 7


text:
Why does GrapheneOS use signify instead of PGP to sign their releases (GPG, cryptographic signatures)?
Why is it that the GrapheneOS (Android ROM) project crypographically signs their releases with signify instead of PGP?
The install documentation for GrapheneOS instructs the user to install the signify-openbsd project from apt and use it with the official GrapheneOS release signing public key to verify the authenticity of their releases.

https://releases.grapheneos.org/factory.pub

Most software projects use PGP to sign their releases.
Why does GrapheneOS use signify?

Daniel Micay (Lead developer of GrapheneOS) decided to use signify instead of gpg because of many issues associated with gpg and the OpenPGP standard, including:

PGP Certificate Flooding attacks
gpg is very hard to use
signify is far simpler than the OpenPGP spec; it's less vulnerable to (keychain) exploits, the code is shorter, and has a lower attack surface
The gpg implementation bugs permitting DOS attacks on keyrings are long-standing and not being addressed in a timely manner by its developers

It's overly complex with far too much attack surface and has egregiously bad usability and security. It's only suitable for usage as a case study in how not to design and implement software. Rather than changing the instructions to work around GPG deficiencies, it won't be used.

Source: https://twitter.com/DanielMicay/status/1145264664315604992

It's a systemic issue, not a specific problem. GPG is vulnerable to a severe denial of service (permanently bricking the keyring) when importing public keys through multiple weaknesses. The public keyservers make the situation worse, but the issues with the GPG implementation are still relevant even without keyservers.
GPG also has a lot more wrong with it than this. I've been phasing it out over time for my own usage and had previously talked about my plans to phase it out for GrapheneOS too. OpenPGP is a overly complex and poorly designed legacy standard, and GPG is a low quality implementation of it.
The thing that finally pushed me to prioritize fixing this was the terrible responses of the GPG developers to the issue summarized well by Hanno Böck: https://twitter.com/hanno/status/1145597144373575680.
Look through my recent tweets / replies and retweets about GPG, or my previous threads about it in May.

Source: https://www.reddit.com/r/GrapheneOS/comments/c7gb3f/grapheneos_factory_images_are_now_signed_with/
These are the opinions of Daniel, not my own. Of course I think signing with PGP is better than not signing at all (or where signature verification requires you to use a tool that cannot itself be obtained securely), which is the absurd reality of most Android ROMs.


text:
how to get data from Android phone internal memory in downloading or recovery mode
My Yotaphone 2 started to boot loop (can not finish booting). I can only reach "Downloading mode"
or Android system recovery with options:

"reboot system now"
"apply update from ADB"
"wipe data/factory reset"
"wipe cache partirtion"
"reboot to bootloader"
"power down"
"view recovery log"

reboot or wipe cache partition didn't help.
I tried "ADB devices" but it can't see the phone and shows only  "List of devices attached" (downloading or recovery modes).
The Windows_7 can see "Androd bootloader interface" in downloading mode or "Linux file-CD Gadged USB Device" in the boot loop state.
I was also unsuccessfil with the "go-mtpfs" to reach MTP file transfer in Linux.
Before I do the factory reset I would like to save photos and some datas.
Is there any other way how to save datas from the Android phone with boot loop problem?

if your bootloader is unlocked you can 'fastboot boot twrp.img' custom recovery and decrypt your files

after trying (four different ROM) and spending many hours with

fastboot boot boot.img  (some finished OK but still boot loop)
fastboot boot system.img (finished with errors and still boot loop)

I gave up trying to save datas and did "wipe data/factory reset".
The mobile phone started after few minutes and works, unfortunately without my photos a files.


text:
Samsung's stock camera app, where are Virtual Shot 3D photos stored?
I've got a Samsung S7 and the default camera has a Virtual Shot mode where you walk around an object to take an array of photos as one photo. You can then view it in the default gallery app and turn the device or swipe left/right to see the 3D effect.
My question is, where are these Virtual Shot 3D photo files stored?
When I take such a photo it stores a single .jpg, when I connect a USB to my laptop I can see it in this folder (btw the phone is not jailbroken or anything)
\Samsung\Card\DCIM\Camera\20210703_124317.jpg

But that is just the first of the array of photos which acts like a thumbnail sort of. The reason that I want to get all the photos is to edit them as a 3D photo or print them side-by-side for a stereo photo 3D viewer. I've looked in the folders listed below, but I can't find where they are stored.
\Samsung\Phone\DCIM\Camera\
\Samsung\Phone\Android\data\com.samsung.android.coreapps\
\Samsung\Card\DCIM\Camera\
\Samsung\Card\Android\data\com.samsung.android.coreapps\

EDIT: the single JPG that I found is actually just one photo, the file size is too small for multiple photos but I've also opened it in a binary editor to verify it isn't some container file or concatenated files.

Not exactly the same thing, but for e.g. Panorama photos, some Samsung devices will just stitch the images together. Have you examined the single .jpg to see if that is the case?

Edited my question just now, yes I've examined the .JPG file and it is indeed just one photo image, not the virtual collection of photos.

The linked YouTube video looks more like the outcome of a virtual shot is a video which is just played not the common way. Therefore I would search for a motion jpeg video.

Possibly related: How does one share Samsung camera “Virtual Shot” (3D spin-around) photos?