text:
CPU-Z shows 8 cores, but 4 of them are stopped
I am using CPU-Z to test basic things about the J7. It reports an Exynos Octa 7580, 8 cores, 8x ARM Cortex-A53 @ 1.5GHz, r0p3, 28 nm.
At all times that I checked, only cores 0-3 are active, and cores 4-7 are stopped. Power saving is disabled.
Is there any way of activating all cores?
Is there any way of at least seeing all of them active, for testing purposes?
I have found a few posts around (here and here) mentioning that it may be the way the phone + OS kernel keep temperature in check, but I am not sure it applies to J7, and if so, how to circumvent it.
PS:
I find some times that my J7 is sluggish, so I wonder why would it have 4 processors idling if they could work (assuming the causes are processing several apps, which could be tackled by assigning different processors).

One time I played a high graphics game that got stuck, quickly went to cpu z and still saw a cpu core not working, but RAM 90%. I was furious, hoping to show you how to force all cpu cores to run

Is there any way of activating all cores?

You can't.
The hardware is not designed to have all 8 cores active. The reason for this is that this Octacore CPU is actually based on big.LITTLE technology, where there are two sets of four cores: a powerful big cores used for heavy processing (e.g. gaming) and energy efficient LITTLE cores used for low load applications. The system will automatically switch between the two sets depending on system load, but you can't activate all 8 cores at the same time (it'll likely overheat beyond its intended design if you somehow managed to do so).

Does this mean the other answers are mostly wrong?

That is perfectly fine. Why would 8 cores be active if you are in cpu-z app. Four cores are let's say active all time, and other four are jumping in if needed, cpu-z don't need 8 cores trust me. Try runing some heavy process like video convertor or unziping huge file, and in time of converting/unziping open cpu-z and see.

Were you refering to Video Converter Android?

It all depends on how the apps that are running are written and if they can actually make use of multiple cores.
Even if you are running a heavy application, if it cant make use of all the cores, the other cores might still be appearing as off. Most system apps these days can use all the cores that the hardware has to offer.
Bottom Line: You do not at all need to worry about number of cores running. Let OS do its thing!

Do you know of any specific app that one could use to see the 8 processors running?

If you switch to other apps and then back to CPU-Z, you would briefly see all the cores working.

Yep, same here thought which brought me here but then noticed also if you fire few apps and then switch between these and back to CPU-z it will shortly show activity on all cores.

Actually the core usage depends on the usage of particular apps. Like, if you use high graphics game you'll usually find that the number of core in use are more whereas if you use simple applications like WhatsApp Messenger the number of core in use will be 3-4 maximum. Hope it helped you.

Try running a benchmark app from play store. It will test your CPU to it's maximum potential and give you a report that will specify what each of the cores are doing.


text:
How to take full image backup of partitions or eMMC?
I have an Archos 55 Platinum here. There is also a unofficial TWRP, if this might help.
I would like to make a backup of the storage of the phone, like dd for any partition, so I can inspect the content later.
Also, I don't want to root or flash anything, nor install apps.
Is there a way that allows me to run TWRP via fastboot instead of flashing? Any ideas how I can proceed?

@IrfanLatif isn't that an answer? Note that at least when on Linux, you can also use adb exec-out dd if=/dev/block/(bootdevice/)mmcblk0 > mmcblk0.img to store the images directly on your computer instead of on the Android device. TWRP has ADB enabled.

Yes you can boot in TWRP if bootloader is unlocked:
fastboot boot /path/to/twrp.img

Then you can simply dd whole eMMC or individual partitions. You need some  extra memory (on external SD card) to backup whole eMMC or /data partition. Smaller partitions (including the biggest one: system) can be backed up to internal memory i.e. data partition.
For Qualcomm SoC:
(for MTK devices, path is slightly different)
dd if=/dev/block/(bootdevice/)mmcblk0 of=/path/to/external-sd/emmc-backup

For single partition:
dd if=/dev/block/bootdevice/by-name/userdata of=/path/to/external-sd/data-backup

In order to come up with shortage of space, instead of using SD Card you may save backup files directly to PC using adb shell or exec-out. Thanks to @Izzy:
adb exec-out dd if=/dev/block/(bootdevice/)mmcblk0 > emmc-backup.img

Make sure your adb binary (on Windows or Linux) supports exec-out. Also take care that unwanted non-printing terminal characters don't get included in output.
There are also other methods like adb pull, UMS or streaming over network. For details see How to recover a deleted file from /data partition?
PS:
Another way to save space and to speed up backup process is to backup only the contents of mountable filesystems instead of whole partition image. Particularly userdata and system are larger partitions but they aren't usually completely filled. Mount them and create backup archive using tar so that zeroed out portion of these partitions isn't backed up.
Make sure to preserve all file permissions and attributes (whatever applicable depending on filesystem etc.) including classic UNIX file mode and owner, ACLs, XATTRs and SELinux contexts.   These options are supported by tar. Otherwise things might get messed up. See more details in How to stream an encrypted backup of the entire device to remote host?

RELATED:

How disk space is partitioned in an Android phone?
Why can't I see Android storage as a partition on PC?
Is there any way to recover data from 2nd SD partition?

Based on this question I did use the method described above:
~$ adb exec-out dd if=/dev/block/bootdevice/by-name/userdata > data.img

But there is an issue, the image will be encrypted if the data is not decrypted first. File and folder names will be gibberish.
The only way I got decrypted data was via TWRP, because it asks for decryption password on start.
And then I was able to copy the data via mtp.
I know this may not seem on topic on how to recover files, but this question is getting a lot of traffic and the proposed solution has a drawback and I'm not allowed to comment right now.

source: Stack Exchange

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

sort: votes


text:
How to organize photos from Camera folder in to folders sorted by month names?
For various reasons, I often end up pulling photos of my phones by connecting the USB connection to a computer and extracting what I need.
The problem I am facing is that my DCIM/100ANDRO folder is now huge, and simply loading the full list of files takes considerable time. Is there some way (ideally in basic Android 7.1.1, but additional apps are acceptable) to sort these in to separate folders possibly by month of taking or similar. Onus points if this happens dynamically as photos are taken.
I'd also be interested in alternatives to the USB -> browse device options, but I'd want something that does full resolution, doesn't upload to an internet location first, and doesn't require bluetooth.

Android 7 stock Photo Gallery has some basic views by default, you can group by time or by location. Is this sufficient for your needs, or do you mandatory need to sort in folders?

@alecxs folder's I'm afraid - the problem isn't navigating on the device itself, it's when I browse the SD card from an attached device.
If there's a quick way to "send" full res photos to a nearby PC, ideally via the USB as the network situation is complicated, that would work too.

Do you mean when connected via USB MTP, it takes too long to show, so you never be able to start copying DCIM folder, because you can't see/select folder for copying?

You could run a shell script each time on triggering event (for example on gallery start) which creates subfolders and move files into with MacroDroid

for a simply transfer you could enable USB debugging in developer settings and run from cmd.exe when connected via USB cable (or adb over wifi) adb.exe pull -a -p /sdcard/DCIM/Camera

"Solid Explorer" available in the app store allows you to navigate your phone files, make new files, filter by months (eg: "PIX_YYYYMM"), select all in that filtered list, 'cut', navigate to your desired folder, and "paste". Using it now, and it works, the phone files are all as expected, as in my photographs from my test month comes up in my test folder :)

There must be apps to facilitate what you want to achieve, but one of very straight forward method (for me at least) is to use a shell script as suggested by @alecxs in comment. We can read date of Photo Taken using exiv2 commandline tool. You can build from source or try this one. Or get Modified Time of photo using stat command, but the former is usually more accurate because some programs like file explorers badly change the modified date e.g. during copy/move operation.
Once the month of photo is known, create respective folder and move photo there:
#!/system/bin/sh
set -e

DIR='/sdcard/DCIM/100ANDRO'

find $DIR -maxdepth 1 -type f -iname '*.jp*g' -o -iname '*.png' |
while read -r photo
do
    month=$(exiv2 -q pr "$photo" | busybox awk -v c=1 -F '[: ]' '/timestamp.*[0-9]{4}:[0-9]{2}:[0-9]{2}/{print $5"_"$6; c=0} END{exit c}') ||
    month=$(busybox stat -c %y "$photo" | busybox awk -v c=1 -F '[- ]' '/[0-9]{4}-[0-9]{2}-[0-9]{2}/{print $1"_"$2; c=0} END{exit c}') ||
    { echo "Couldn't find month for $photo" >&2; continue; }

    mkdir -p "$DIR/$month"
    mv -n "$photo" "$DIR/$month/"
done

echo Done.

Android's awk and stat are buggy or show non-standard behavior. Better use busybox.
Let's name the script sort.sh. This is how it works:
~$ find /sdcard/DCIM/100ANDRO/ -type f
/sdcard/DCIM/100ANDRO/00100sPORTRAIT_00100_BURST20190222182032908_COVER.jpg
/sdcard/DCIM/100ANDRO/IMG_20170312_013609.jpg
/sdcard/DCIM/100ANDRO/IMG_20180818_180827_HDR.jpg
/sdcard/DCIM/100ANDRO/IMG_20190222_164812.jpg
/sdcard/DCIM/100ANDRO/PANO_20190421_132245.jpg

~$ sort.sh
Done.

~$ find /sdcard/DCIM/100ANDRO/ -type f
/sdcard/DCIM/100ANDRO/2017_03/IMG_20170312_013609.jpg
/sdcard/DCIM/100ANDRO/2018_08/IMG_20180818_180827_HDR.jpg
/sdcard/DCIM/100ANDRO/2019_04/PANO_20190421_132245.jpg
/sdcard/DCIM/100ANDRO/2019_02/00100sPORTRAIT_00100_BURST20190222182032908_COVER.jpg
/sdcard/DCIM/100ANDRO/2019_02/IMG_20190222_164812.jpg

Additionally you may use file command (instead of relying on file extensions) to only move photos and not videos or other files. But again Android's /system/bin/file is very limited. Either use one from Termux, or build from source, or try this one.
You can run this script manually or on a regular basis using some automation app. crond is also an option if you have root.

I'd also be interested in alternatives to the USB -> browse device options

This part is itself a separate question. If you want to browse files from PC you can go for adbfs, SSHFS/SFTP, FTP, WebDAV, SMB etc. Or to simply transfer files adb pull will suffice and is reasonably faster. If you have root and the volume of data to be transferred is high, consider using USB Mass Storage (UMS) from custom recovery. It's very high speed and reliable method.

Can this be run without root? (I'll have to search on how to pull up shell etc, but sure I can figure that out)

No root required. You can run script from adb shell or terminal emulator app like Termux.

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


text:
How to grant an app root access without GUI interaction?
I'm trying to update my APN settings using:
adb shell "su -c 'content update --uri content://telephony/carriers --bind name:s:\""SDR"\" --bind apn:s:"SDR-internet"'"

The first time I run this command I receive a superuser request from the package: com.android.shell. I can grant this manually but I'm hoping to automate the process for practice and knowledge.
I've tried to use the following to list all permissions, but can't find superuser:
adb shell pm dump package com.android.shell

I attempted the following:
adb shell pm grant com.android.shell android.permission.SUPERUSER
adb shell pm grant com.android.shell android.permission.REQUEST_SUPERUSER
adb shell pm grant com.android.shell android.permission.ACCESS_SUPERUSER

But receive an error:
    Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown permission: android.permission.REQUEST_SUPERUSER
    at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1398)
    at com.android.server.pm.permission.PermissionManagerService.access$900(PermissionManagerService.java:89)
    at com.android.server.pm.permission.PermissionManagerService$PermissionManagerInternalImpl.grantRuntimePermission(PermissionManagerService.java:2093)
    at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:5411)
    at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1730)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:217)
    at android.os.ShellCommand.exec(ShellCommand.java:103)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21330)
    at android.os.Binder.shellCommand(Binder.java:634)
    at android.os.Binder.onTransact(Binder.java:532)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2821)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3856)
    at android.os.Binder.execTransact(Binder.java:731)

Edit:
I tried:
adb shell su cat /data/adb/magisk.db

Which gave:
    SQLite format 3@

�                      .�
�       �-�d
N�tablehidelisthidelist
CREATE TABLE hidelist (process TEXT, PRIMARY KEY(process))/ Cindexsqlite_autoindex_hidelist_1hidelist
                             X�tablestringsstringCREATE TABLE strings (key TEXT, value TEXT, PRIMARY KEY(key))-Aindexsqlite_autoindex_strings_1stringsZ�tablesettingssettingsCREATE TABLE settings (key TEXT, value INT, PRIMARY tablelogslogsCREATE TABLE logs (from_uid INT, package_name TEXT, app_name TEXT, from_pid INT, to_uid INT, action INT, time INT, command TEXT)��tablepoliciespoliciesCREATE TABLE policies (uid INT, package_name TEXT, policy INT, until INT, logging INT, notification INT, PRIMARY KEY(uid))/Cindexsqlite_autoind��/ies_1pol�com.android.shell
���7�/    )�com.android.shellShell�l��uR/system/bin/sh7 /    )�com.an!�id.shmagiskhidel��?5/system/bin/sh
��!magiskhide
��6ucom.google.android.gms/.droidguard.DroidGuardService

That's pretty ugly, so I tried using sqlite3 but it provides no tables? I was expecting a list of something at the very least.
sqlite> .mode line
sqlite> .headers on
sqlite> .tables
sqlite>

I'm using Magisk Manager v18.

What is the root manager app you are using? (SuperSU, Superuser, or some other one?)

android.permission.ACCESS_SUPERUSER was defined by SuperSU but:

Due to changes in Android 5.0 Lollipop, this permission has been deprecated and is completely ignored from SuperSU v2.30 onwards

Also only app which declares a permission in its AndroidManifest.xml file can be granted that permission. Shell (com.android.shell) is an AOSP's dummy app to define UID for adbd, it must not have any such third party permission in its Manifest.
Magisk doesn't use this or any other such permission at all. So you have to grant the permission through user interface. Or try to modify database or configuration file directly where permission preferences are stored. In case of Magisk it's sqlite3 database (/data/adb/magisk.db):
~# sqlite3 /data/adb/magisk.db .tables
hidelist  logs      policies  settings  strings
~# sqlite3 /data/adb/magisk.db '.mode column' '.headers on' 'select * from policies'
uid         package_name  policy      until       logging     notification
----------  ------------  ----------  ----------  ----------  ------------
10146       com.termux    2           0           1           1
~# sqlite3 /data/adb/magisk.db "INSERT INTO policies (uid,package_name,policy,until,logging,notification) VALUES(2000,'com.android.shell',2,0,1,1)"
~# sqlite3 /data/adb/magisk.db '.mode column' '.headers on' 'select * from policies'
uid         package_name  policy      until       logging     notification
----------  ------------  ----------  ----------  ----------  ------------
10146       com.termux    2           0           1           1
2000        com.android.  2           0           1           1
~# sqlite3 /data/adb/magisk.db 'DELETE FROM policies WHERE uid = 2000'

For help on SQLite: sqlite.org
Above commands are working at the moment but Magisk may change database location, table names, table structures etc. any time.
Values may possibly be cached in running processes. So your changes may get ignored or overwritten. In that case putting a modified database from recovery (with proper permissions) may work. I didn't try though.


text:
Android OS - strange UDP traffic on port 123
I have a Redmi Note 3 (unrooted) phone running MIUI Global 10.2 [Android version 6.0.1 MMB29M]
I have installed AdGuard to monitor the traffic that my phone sends/receives. While checking the 'Filtering Log', I see few connections that the app "Android OS" makes to the remote address "118.189.138.5:123" (see screenshot). As you can see from the screenshot, the requested URL is having a "UDP" connection protocol.
Now, when I do a search for this IP address, I see that it belongs to "M1 Connect Pte Ltd" in Singapore.
https://www.speedguide.net/ip/118.189.138.5
I also noticed similar UDP connections to these IP addresses:
95.216.192.15 belongs to "D2 Internet Investment Ukraine ETTH broadband" in Ukraine 133.243.238.163 belongs to "National Institute of Information and Communicatio" in Japan and the strangest of all 202.12.97.45 belonging to "Ministry of University Affairs" in Thailand
So my question is why would Android OS make connection to this IP addresses. What are these connections for? Am I missing something here or are these some legit connections used for some 'good' work? Is my phone connecting and leaking some information?
Hoping that some expert on networking will answer this.

Stay close to vanilla AOSP AMAP. Avoid using highly customized ROMs, particularly from OEMs, whether it's Xioami, OnePlus, Huawei, Samsung, Google or whatever. You never know what they put on your device.

I don't know what software you used for back tracing the IP addresses, but using the current protocol rdap (successor of whois) I get "Computer Center Khon Kaen University" for 202.12.97.45. Anyway some UDP traffic can be the result of Voice over LTE (VoLTE). Additionally the Port 123 indicates that this is the Network Time Protocol (time sync). Often a large pool of NTP servers is used. May be this is the explanation for the different UDP connections over time.

There is a simple answer what is causing the UDP traffic.
The first indicator is the used port number 123 which is typically used by the Network Time Protocol (NTP). This protocol is responsible for synchronizing the time of your smartphone with a remote server.
To spread the burden among multiple servers and to make sure there is always a server available the NTP protocol usually does not use one specific time server to synchronize with.
Instead a large pool of servers is used. The three IP address 118.189.138.5 95.216.192.15 133.243.238.163 and 202.12.97.45 you mentioned are all NTP servers and they belong to the NTP pool "Asia 1".
Therefore if you capture more traffic earlier or later I assume you will see all of those IP addresses with UDP traffic on port 123.

AOSP has hard-coded value 2.android.pool.ntp.org for NTP server. I wonder if this can resolve to some address in Asia.

@Irfan Maybe this pool uses GeoDNS (different result based on the IP you request it) or Xiaomi has changed the NTP server default value.


text:
Does "adb backup" also backup /data/misc/vold - the Encryption Key for Adoptable SD card?
I want to make sure that using adb backup -apk -shared -all -f ~/backup.ab will also save /data/misc/vold?
I am trying to backup before rooting, in order to be able to gain access to the encryption key in /data/misc/vold (got corrupted SD card adopted as internal). So I want to make sure ih something bad happens during the rooting, I could still access the backup version of /data/misc/vold?
Thanks!

It doesn't get backed up. For verification you can backup with that command, unpack the backup file and see the contents yourself.

Mmh, does not seem trivial to verify that by unpacking. Would that work anyway if I encrypted the system? More importantly, is there then a way to back up also /data/misc/vold ? Thanks!!

Try this to unpack the backup file. As for vold, it can only be backed up using root access.

thanks! So you are saying that it is not possible to backup vold without being root? This is a conundrum, as I am precisely trying to root to access vold, and the process of rooting is likely to erase that file

Unfortunately, this is just not possible without root. :(

Related: Is the Encryption Key for Adoptable SD card included in manual backup done over MTP?

Related: How to get Adoptable storage encryption key without root access after I "forget it"

My solution to Matifow problem was ...
I cannot extract the token because my device was not rooted.
I bought a new microSD and clone in it the microSD from my device.
https://askubuntu.com/questions/227924/sd-card-cloning-using-the-dd-command
When i put this new card the phone recognize as the old one.
I recover photos, media from whatsapp, apps installed ...
I lost some files ( the corrupted I assume) but can recover the most.

nice idea! in case dd not working use gddrescue for cloning


text:
All contact names on device changed without user intervention
All of the contact names stored on my device got changed to "1 Null" without my intervention.
How can I get them back? Any ideas?

Did you try some other contacts app?

What did you do that might have led to this situation? Anything you remember between when it worked last time and then started being like in that screenshot? Like: installed some other app, tried to sync with something, experienced a sudden device shutdown/crash…


text:
How to get rid of SeLinux Denials in Permissive mode?
Need some help with 3 issues:

In Permissive mode I get denials, why does this happen and how do I fix that?
If I am enforced, how  do I give access to my  Partitions to various processes. Right now I am permissive but in case I want to switch over as enforced what do I do in enforced mode to ensure that Apps and processes have full access to all my partitions on micro SD card?
How do I ensure that I have permissive mode at the time after boot? I am using seLinux changer app which changes the mode to permissive after boot, I am assuming.

Backdrop
I am on Android 9 Pie. Rooted with a Custom ROM via Magisk (v20 which is the latest).
I have 3 partitions on my MicroSD card, all ext4. First partition is to store the external data. Second partition is for app2sd or application data linking. And third partition is for WhatsApp.
But I have a problem which mysteriously keeps popping up; for a very brief time it disappears and then it is again back.
The issue is when I link the WhatsApp folder in my internal storage to the third partition, it stops working and I am not able to download any images. When I try and access internal folders that are linked to my external partition on micro SD card through ADB and non-rooted prompt, it says Access denied. If after linking I have to access any file on my internal storage or external storage through a non root user, I have to copy it in /data/local/tmp and chmod it.
So after running a dmesg via su prompt, I keep getting this kind of information and I am totally confused as to how I keep getting rejects even when I am in permissive mode:
[64108.645494] type=1400 audit(1571547099.201:11658): avc: denied { call } for pid=1301 comm="pool-1-thread-1" scontext=u:r:untrusted_app:s0:c2,c257,c512,c768 tcontext=u:r:hal_memtrack_default:s0 tclass=binder permissive=1
[64108.645560] type=1400 audit(1571547144.071:11659): avc: denied { open } for pid=23335 comm="om.mobikwik_new" path="/proc/vmstat" dev="proc" ino=4026532137 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:proc_vmstat:s0 tclass=file permissive=1
[62276.620621] type=1400 audit(1571545312.043:11584): avc: denied { read } for pid=8534 comm="webview_zygote" name="fonts.xml" dev="mmcblk0p66" ino=1968042 scontext=u:r:webview_zygote:s0 tcontext=u:object_r:theme_data_file:s0 tclass=file permissive=1
[61774.878054] type=1400 audit(1571544810.294:11570): avc: denied { call } for pid=1301 comm="pool-1-thread-1" scontext=u:r:untrusted_app:s0:c2,c257,c512,c768 tcontext=u:r:hal_memtrack_default:s0 tclass=binder permissive=1
[61770.686186] type=1400 audit(1571544806.104:11569): avc: denied { getattr } for pid=12417 comm=4173796E635461736B202334 path="/data/sdext2/data/com.google.android.googlequicksearchbox/cache" dev="mmcblk1p2" ino=413617 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:unlabeled:s0 tclass=dir permissive=1
[59854.882802] type=1400 audit(1571542825.956:11523): avc: denied { call } for pid=13288 comm="GoogleLocationS" scontext=u:r:priv_app:s0:c512,c768 tcontext=u:r:hal_memtrack_default:s0 tclass=binder permissive=1
[58684.872549] type=1400 audit(1571541715.916:11505): avc: denied { getattr } for pid=4379 comm="Binder:4379_3" path="/storage/6226b27a-ebc1-4fdd-b54c-096abc40c2b9" dev="tmpfs" ino=52150 scontext=u:r:untrusted_app:s0:c241,c256,c512,c768 tcontext=u:object_r:storage_stub_file:s0 tclass=dir permissive=1
[58416.978554] type=1400 audit(1571541430.215:11458): avc: denied { open } for pid=31520 comm="CallMonitors-1" path="/proc/stat" dev="proc" ino=4026532088 scontext=u:r:untrusted_app:s0:c18,c257,c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=1

What I did:

Tried to use the script approach with  setenforce 0 under init.d  dir. Hopelessly works only in <5.0.
Tried to  remount partitions as R/W.

permissive=1 is just a warning, it doesn't restricts you from doing anything. 2. You need to modify SELinux policy. 3. You need to define an init service. // For mounting a SD card partition to be used by apps for storing data, you need to consider 1. Ownership 2. Permission mode 3. SELinux context 4. Mount namespace. If any of the four isn't configured properly, you'll be in trouble.

Thank You Irfan but if I'm in permissive there shouldn't be any pern issues. why the denials after i dm in permissive mode

I mentioned 4 factors, SELinux is only one of those.

ok thx very useful framework to think long but I need some more meat between those points any idea where I can read up & how these are customised and configured

ownership will vary depending on who is writing to the card it should be made available to all users magisk is running in in global namespace .selinux is permissive

To understand ownership, must read: https://android.stackexchange.com/a/210159/218526. Other helpful sources: https://en.wikipedia.org/wiki/File_system_permissions#Traditional_Unix_permissions and https://android.stackexchange.com/a/208982/218526 and https://source.android.com/devices/tech/config/filesystem. If you state clearly, step by step, how you mounted the partition, what are the ownership and permission modes and SELinux context of the mount point and inside files, I can try to answer your question directly.

heyya thx gain... specifically I was asking about AvC denied errors that I put up in the above log snippet. if I have Selinux  running in permissive mode then what are these errors coming from ? i guess that was one of the things I was trying to figure out and still haven't gotten  a a faint clue 'bout....

avc denied  cannot be just an f y i m message.  there is some actual denial going on and I was asking,  if it's  in permissive mode.... then what is causing so many denials when nothing in my phone has changed and this is intermittent...it ll  stay on  for a good amount of time and then goes away on its own to , reappear again

sure it is permissive? selinux changer app only work for kernel which supports that. btw WhatsApp should be bind mounted, sdcardfs does ignore symlinks

@user1874594 that's how SELinux works. Android's official documentation says: “SELinux can operate in two global modes: Permissive mode, in which permission denials are logged but not enforced. Enforcing mode, in which permissions denials are both logged and enforced. ” And you can read SELinux documentation where ever you want, the principle remains same. I can't say much if SELinux is enforcing in permissive mode only on your device. You can modify sepolicy to get rid of denial messages but that won't solve your problem for sure.

127|root@android:(unreachable) # getenforce Permissive root@android:(unreachable) #

yes of course it is bind mounted  all the folders that I am linking somewhere else from internal storage our bind mounted  only for the WhatsApp folder I am not able to download the images when I have the linking on and as soon as it refuses to download the image I go look at dmesg this avc denied message which makes me think this is connected with selinux it is a assumption based on on this strong correlation. 1 thing WhatsApp partition's mounted under /storage there are 3 partitions under storage the log message tells me that it mounted    SDcardFs on so and so partition

is there a concept that at boot time there are certain rules that are enforced and even after it changes  post boot from enforcing to permissive the rules previously en forced are still applicable

As I mentioned in previous comment: If you state clearly, step by step, how you mounted the partition, what are the 1. ownership 2. permission modes and 3. SELinux context of the mount point and inside files, I can try to answer your question directly. If you keep on repeating the same thing, not listening to what others say, no one will be able to help you. Sorry.

heyya ok ... fine sure  wasnt clear what exactly you are getting at now you articulated it very well I will revert back to you with all the info. Thank You


text:
How to enter recovery mode with an OTG keyboard?
I would like to know how to boot my Mediatek tablet into recovery mode by using a physical keyboard (OTG) because my volume key doesn't work.
And I can't boot to the OS to enable the USB debugging.

Is your bootloader unlocked? Can you boot to bootloader mode?

I think that my bootloader is unlocked. How can I check that and boot to bootloader mode?

Make a search with your model number.

Does the unlocked boot.img mean that the bootloader is unlocked?

The boot.img from my firmware is unlocked.

Unlocked boot.img doesn't make sense. It's the bootloader which is locked or unlocked. You can get your stock recovery.img (or custom one like TWRP if bootloader is unlocked) and boot that from bootloader mode using fastboot boot recovery.img. But first you must be able to boot into bootloader mode. That has a different key combination than recovery mode. Key combinations are specific to devices and manufacturers.


text:
Is it possible to designate a Wi-FI SSID as metered "mobile network"?
I am wondering if there is a method by which I can designate a WLAN/WiFi connection as "mobile network" based on its SSID for the sake data usage policies by apps or the Android system in general.
Typically when you have a data plan with your mobile provider, your phone's LTE (or  3G ...) modem will connect to the provider to enable you to have internet access.
Now if I am using a mobile LTE/WLAN router instead, my phone assumes that it's on an unmetered WiFi uplink and apps/the system will (mis)behave accordingly.
Is there a way to tell the system that when it connects to a particular SSID it should treat that as "mobile network" in regards to how apps may use data?
Phone: Samsung S9+ (SM-G965F), Android 9
NB: the settings from this answer don't exist on my phone.

This option actually exists and I have just tested it on Android 10 (AOSP). The trick is to set a custom DHCP option 43 with the text value "ANDROID_METERED". What I find a bit confusion is that Android does not show you that it is on a metered Wi-Fi. I verified it with the NetworkMonitor app.
Someone documented this further: https://www.lorier.net/docs/android-metered.html

+1 Helpful only if WiFi router allows to configure custom DHCP option 43 which must not be the case with many routers.

Yeah, I wonder if that option gets set when you open a hotspot on one device and another connects to that hotspot. Gotta experiment a little.

I don't think WiFi can be designated as a Mobile Network, but stock Android provides option to set WiFi network as metered. When connected to the WiFi, go to that WiFi connection settings and you will find options to set the connection metered or unmetered (at least on Pie).

OEMs might be removing the option from GUI. You can also try CLI method as stated here. From adb shell execute:
~$ cmd netpolicy set metered-network <WIFI_SSID> true


text:
Is there any custom ROM that includes a feature to permanently kill a process?
As is well known from many blog/forum posts, Android 2.2 (Froyo) changed the mechanism for the API to kill the process such that a killed process will likely/possibly be re-started by the OS after being killed. E.g. there is no way to PERMANENTLY 100% guaranteed to stop an application from running short of un-installing it.
Question: Is there any code out there (likely part of some custom ROM) that allows permanent killing of a process without re-spawning it afterwards ala Android 1.6?
I'm mostly interested if such code exists, NOT whether it is in some specific ROM.
I don't much care about specific implementation way (I can think of at least two - either add a new API for "permanent kill" or provide a blacklist of apps that a modified AOSP API would respect).
UPDATE: Just to clarify - I am NOT looking for a way to prevent an app from being started again due to some event triggering an Intent that the app registered with. I am asking about preventing apps from being started by memory/process manager just because it was recently killed, even if that app has no Intents registered whatsoever, e.g. not listed in Autostarts app for any of the Intent types.
Please note that the above-mentioned notion of "restarting an app just because" comes from 2 sources:

Froyo help section for a well-regarded system app "Watchdog"

Google has changed the kill API that the task killers use. In 2.2 (Froyo), the kill API now just restarts the app. It will come right back, under a new system process.

My own observations, where VERY frequently, my Droid X would have apps listed as running in ATK after I killed them, BUT those apps either don't have ANY Intents listed in Autostarts app, or all the Intents listed for them there are 100% disabled. Oh, and these are the types of apps (e.g. games) that are very unlikely to have a side daemon process responsible for reviving them.

Cyanogenmod ROMs has a feature that by LONG pressing the BACK button you can kill the running process.

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


text:
Enabling Location Reporting disables itself
I'm trying to enable Location Reporting such that I can use it with my Moto 360 for tracking stuff. Whenever I enable Location Reporting in the Google Settings app it immediately turns itself off again.
I looked in the docs and noticed this:

I'm in Spain, and I know "Ok Maps" for offline maps doesn't work here. Could that be it?
It's also an Apps account, but I couldn't find any settings to enable or disable this in the admin panel.

I think your issue may actually be the fact you are in Spain. I've come across issues with others in the country, including (as you mentioned) the fact that you cannot download offline maps in Google Maps.
This appears (though it's not fully clear) to be down to licencing / legal issues around the mapping. Even a few metres over the Spanish border and everything works again.

Thanks, I feared as much. I wonder if I complain loudly enough Google will sort it :D

@daentech it's worth a try I guess, but I'm sure it's a known issue!

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


text:
How to free Internal Storage by moving data or using symlink / bind-mount with Adoptable Storage?
Galaxy S5 running LineageOS 16 (Android 9).
I'm having issues with running out of storage space, even though I have 128GB external SD card, merged with the internal storage. Is there a way to create a symlink from the internal memory to the external SD card, even though they are technically merged and aren't identified as separate storage locations within Android as a result?
I've never made symlinks on Android so I'd appreciate some pointers or resources on that as well.

post the output of adb shell df

https://pastebin.com/9a1LrHBf

it is already mounted to /storage/emulated with 100 GiB free space (84%) no need to symlink

But I get warnings about low space sometimes. Should I just ignore that or will it cause issues with the system? My intent with symlinks was to force my large music folder to be stored on the external SD card as well as my TWRP backups.

Well i haven't seen one for a day now. But if it persists then I'll comment here again with said screenshot. Thanks for the help

i can see the /data partition is full (92%) maybe you forgot to Migrate? Go to Settings > Storage & USB and tap your SD card. Tap the three dots in the upper-right corner and choose “Migrate data”

@alecxs when I select the external SD card, the three dots show: rename, eject, format as portable. I see a migrate option in the internal SD card's three-dot menu, but I believe that is trying to move data to the internal memory. I tried it anyway and it said "not enough space"

then see Irfan Latif - move the apps separately - Go to Settings > Apps and tap on an app. Tap “Storage”. At the top of the resulting window you should see “Storage used: Internal storage”. Tap the “Change” button

Okay. I've done that for the big ones (OSMand and google maps with downloaded maps). A bulk of my data are just music files and TWRP backup files. Any way to force those to be stored on the external SD card like I just did with apps? Also, is there a way to have new apps installed to the external sd card by default from now on?

nvm about default installation directory. I discovered that since merging the external sd card with internal, it installs new apps to the external sd card by default. Still curious about moving mp3 files and TWRP backup files into the sdcard though. Maybe I could use the terminal to move them into the sd card? Not sure how the external is mounted and if it's similar to Linux in that it would be located in /mnt or /media/user/

/mnt/expand/9cf8b187-cdba-4fad-
9d1c-14a17d4be4de

@alecxs thank you

First of all, symlinks don't work on Android's emulated storage. A workaround is to use bind mounts instead. See this answer for details.
But with Adoptable Storage you don't need to:

Create symlink to external SD card
Manually move data to external SD card
Bind mount a directory from external SD card

Because what you see as /sdcard or /storage/emulated/0 should already be on Adoptable SD Card.
When you format external SD card as Adoptable Storage, it's mounted at /mnt/expand/[UUID], which holds a file hierarchy very similar to /data partition, like /data/app, /data/data and /data/media etc. When you migrate your data to newly created Adoptable Storage, data from /data/media/ is moved to /mnt/expand/[UUID]/media/ and the later is now emulated and bind mounted at /storage/emulated (which apps see).

You can check this by executing df or mount command on a terminal app or adb shell.
Without Adoptable Storage:
~$ df --output=source,target
Filesystem                  Mounted on
/dev/block/dm-0             /data
/data/media                 /storage/emulated
/dev/block/vold/public:8,1  /mnt/media_rw/[UUID]

* dm-0 is FDE encrypted userdata partition, vold public volume is external SD card or USB drive.
Before moving data:
~$ df --output=source,target
Filesystem                  Mounted on
/dev/block/dm-0             /data
/data/media                 /storage/emulated
/dev/block/dm-1             /mnt/expand/[UUID]

* dm-1 is FDE encrypted Adoptable SD card.
After moving data:
~$ df --output=source,target
Filesystem                  Mounted on
/dev/block/dm-0             /data
/dev/block/dm-1             /mnt/expand/[UUID]
/mnt/expand/[UUID]/media    /storage/emulated

* Actually /data/media or /mnt/expand/[UUID]/media is emulated to /mnt/runtime/[default|read|write]/emulated which is bind mounted to /storage/emulated.
You can only move apps (along with their data) to Adoptable Storage which have installLocation set to preferExternal or auto by app developer. In case of auto, default install location (set using pm set-install-location) decides where app will be installed. See this answer for details.

If you want more free space, replace large directories (like /data/media, /data/app and /data/data) with mounts (or bind-mounts) from partitions (or directories) on external SD card. However (DAC and MAC) permissions should be taken care of, otherwise apps (or even OS) may break.

RELATED:

How to move apps from internal to external storage?
What is /storage/emulated/0/?
How disk space is used on Android device?


text:
How to stop apps writing to "Android" folder on the SD card?
I have a (seemingly) simple question to which I haven't found a clear answer to. My phone creates an "Android" folder on my SD card and I'm wondering if it could be moved into the phone's internal storage instead.
I just got a new phone and it's got way more storage than my last phone, so I'd like to make the most out of it as I can, so I'd prefer that all the application data is on the internal storage rather than on the SD card.
That's the way it worked on my old phone, so I'm a bit puzzled that it doesn't seem as easy to do anymore.

I'm afraid it won't work as simple as that, especially for OBB files (expansion files), since it's by default located on the system's shared storage location (i.e. "external" storage). Note that on some devices that don't have SD card slot, "external" storage is emulated in the internal storage.

Apps usually don't write data to external SD card, but starting with Android 4.4 up to latest release 10, there is no permission to stop apps writing to Android directory on external storage. The reason is more historical than technical.

ANDROID'S STORAGE JOURNEY:
Android provides two types of storage to apps: private (or internal) and shared (or external). As names suggest, private directories of every app (in /data/data/) aren't accessible to other apps, but data placed on shared storage is.
External storage used to be physically external SD card (with permission-less filesystem from FAT family) in early days when flash storage was costly. So apps used to place a lot of data on external SD card.
Android enforced WRITE_EXTERNAL_STORAGE permission as early as in Android 1.5 to control which apps could write to external storage, so almost every app had to request this permission.
As the internal flash memory grew in size, OEMs created a separate partition (usually named sdcard) "to provide external storage internally". Now there were two external storage: primary (sdcard partition) and secondary (external SD card). Since primary external storage was still smaller, apps continued to widely use secondary storage by placing files wherever they wanted, creating random directories on both storage.
In Android 2.3 FUSE was introduced to emulate primary external storage (/sdcard) over actual filesystem of sdcard partition which majorly remained vFAT. But the primary intention was to retain a permission-less virtual filesystem (like FAT) over a permission-aware Linux filesystem (like ext4) so that data could be shared among apps (UIDs).
Android 3.1 switched USB Mass Storage (UMS) to Media Transfer Protocol (MTP). It means that sdcard partition or external SD card was not mounted as partition when connected to PC. So actual filesystem contents aren't visible over MTP, instead MediaStore (one of Android's built-in content providers) provides an indexed list of files. Also apps can make use of this content provider. See details in this answer.
Starting with Android 3.2 apps write-ability to external SD card was restricted to only system apps (using WRITE_MEDIA_STORAGE permission). See details in How to move files to external SD card?. On rooted devices this restriction is hacked by mapping GID media_rw (1023) to WRITE_EXTERNAL_SRORAGE permission.
By the release of Android 4.0 (started with 3.0) OEMs started emulating /data/media on /sdcard as primary external storage, which eliminated sdcard partition. This was not possibly with UMS because /data could not be un-mounted from Android to mount on PC. This is true to till date.
Android 4.3 merged multiple fstabs used previously to a single /fstab.<device>  file and introduced voldmanaged flag for external filesystems to be mounted by vold. With Treble support in Android 8, fstab was moved to vendor partition and in DTB. See What is default “fstab” file in Android?
In Android 4.4 making use of FUSE-based synthesized permissions, apps were allowed to write to their "private directories" (inside Android/{data,media,obb}/ directories) on "shared storage" without requesting Storage permission. It made it officially possible for apps to use multiple external storage (primary and secondary). Also READ|WRITE_EXTERNAL_STORAGE was necessarily required to read external storage, including other apps' private directories.
Storage Access Framework (SAF) was introduced to let non-system apps write to SD card and direct write access to secondary external storage was strictly stopped. So now it was made clear that external storage is not always removable storage, the former could be physically internal. Transient storage like USB is in addition to these.

Coming to your question:

I'd prefer that all the application data is on the internal storage rather than on the SD card.

Third party apps cannot write directly to public directories on secondary external storage, but cannot be stopped from writing to their private directories (1, 2, 3, 4), thanks to synthesized permissions based on directory structure:

"The WRITE_EXTERNAL_STORAGE permission must only grant write access to the primary external storage on a device. Apps must not be allowed to write to secondary external storage devices, except in their package-specific directories as allowed by synthesized permissions. Restricting writes in this way ensures the system can clean up files when applications are uninstalled."

And:

"Starting in Android 4.4, the owner, group and modes of files on external storage devices are now synthesized based on directory structure. This enables apps to manage their package-specific directories on external storage without requiring they hold the broad WRITE_EXTERNAL_STORAGE permission. For example, the app with package name com.example.foo can now freely access Android/data/com.example.foo/ on external storage devices with no permissions. These synthesized permissions are accomplished by wrapping raw storage devices in a FUSE daemon."

By accessing / creating their private directories, apps confirm if the secondary external storage is available. So in most cases the directories under Android directory on SD card are either empty, or the files are a copy of those on primary external storage. Though it doesn't make sense most of the times, but some app developers may prefer to save data on secondary external storage, it's up to their will. E.g. for quickly expanding raw video files or large OBB files as mentioned by Andrew in comment. Android's suggestion:

"... the device has two different external storage directories, so you need to select which one to use when writing "private" files to the external storage.
  ...
  The first entry ... is ... the primary external storage, and you should use that location unless it's full or unavailable."

And the other one:

"An application may store data on any or all of the returned devices. For example, an app may choose to store large files on the device with the most available space"

Since private directories on external as well as internal storage are deleted on app uninstall, the preferred storage for apps to store persistent data (like photos) is primary external public storage. This norm continues to till date. Therefore it's usually safe to delete Android and other empty directories (some Android versions also create standard directories) on external SD card but those would be recreated.

STORAGE JOURNEY CONTINUED...
SAF (file picker) was extended in Android 5 (for Directory Selection) and then in 7 (to Scoped Directory Access). Android 10 further extended it to Scoped External Storage Access entirely removing filesystem level access to primary external storage as well, replacing with filesystem APIs.
Android 6 introduced Adoptable Storage to use SD card as primary external storage by encrypting it (vold flag in fstab: encryptable=userdata). Now even apps and their data on internal storage can be moved to adoptable storage. See How to move apps from internal to external storage? This was previously achieved by OEMs and custom ROM developers by applying patches like "Default write disk" or "Disable Internal Memory" to AOSP. Apps like "Link2SD" also filled the gap on rooted devices.
Additionally Storage Configuration (storage.xml) was removed from framework-res.apk and merged to fstab. UUID based mount path was introduced.
Also many install-time permissions were shifted to runtime permissions and in order to make WRITE_EXTERNAL_STORAGE a runtime permission, mount namespaces were used. For details see What is the “u#_everybody” UID? and What is /storage/emulated/0/?
FUSE was removed completely in Android 9. sdcardfs is now used for emulation. Read full story here.

The journey continues still: SDCardFS is deprecated since Android 11.

Continuing on @IrfanLatif's Android Storage Journey, as of Android 11 SDCardFS is deprecated, some of its functionality has been moved to the lower filesytem, and other parts are provided by a new FUSE filesystem.
Case-insensitivity could not be implemented efficiently in a layered filesystem like SDCardFS, but for platforms with a new enough kernel version that is now available in the lower (f2fs/ext4) file systems. Quota support is also available there now, though I'm not sure what Android's story on that is exactly.
It also looks like Google wanted to implement more functionality in their filesystem overlay for which an in-kernel file system was architecturally not the right place, so that has once again been moved to a new FUSE overlay provided by MediaProvider, which handles media indexing, redacting sensitive media information such as location, and enforcing the scoped storage model. And I'm sure Google didn't mind the lower maintenance burden of a FUSE filesystem (written in Java) compared to an in-kernel overlay either. The Android 12 kernel also support FUSE passthrough, which improves FUSE performance substantially on certain types of workload.
For certain phone models (such as mine :( ), which don't support case-insensitivity in the lower level file systems, this means that as a transitional implementation these phones use a MediaProvider FUSE filesystem (without FUSE passthrough) on top of an SDCardFS filesystem on top of the actual storage, which is probably far from ideal from a performance point of view.


text:
How to load kernel module with Magisk root but without custom kernel?
I am having a really hard time finding anything about this on Google which is not from 2011. I have a Samsung Galaxy S10+. I have rooted it with Magisk without TWRP, i.e. no custom recovery or custom kernel. I want OTA updates without having to delete everything on my phone just to update, that is why I use Magisk without TWRP.
What I need is drivers for my WiFi adapter TP-Link TL-WN7220. I know that to be able to install a driver into the kernel, that means a custom kernel and then you would not be able to have OTA updates which defeats the above purpose.
My question is, is there a way to load a driver, even if it is temporary like loading a kernel module on Linux? On Linux this does not require a reboot, can this be done similarly on Android, so I will keep my stock kernel but still be able to run the WiFi adapter?

Is it possible to add a driver to my kernel without flashing a new kernel?

I know that to be able to install a driver into the kernel, that means a custom kernel and then you would not be able to have OTA updates which defeats the above purpose.

You can't have OTA updates with Magisk installed because flashing Magisk modifies boot partition in which kernel binary lives. Before OTA update, you will have to uninstall Magisk which will restore original boot.img, backed up in /data. So at the moment you can do whatever you want with kernel. That will be reversed with Magisk uninstall.

is there a way to load a driver, even if it is temporary like loading a kernel module on Linux?

Yes you can load kernel modules just as you do on Linux. But for that you have to rebuild kernel with the required module, or it should be compatible with installed kernel if built separately.
The installed kernel should be built with CONFIG_MODULES=y in order to load modules. Make sure the version of kernel source code tree or that of header files match with installed kernel version. Otherwise dependencies may break resulting in Unknown symbol in module type of errors. Also, if kernel is signed (CONFIG_MODULE_SIG_FORCE), modules must be signed with the same key to avoid required keys not available error.


text:
Can't change DNS Server on Android
I have few devices in my local network.
I want them to have names like in this example:
192.168.1.1    router.home
192.168.1.2    nas.home
192.168.1.3    rpi.home

I setup dnsmasq server on my NAS server (192.168.1.2) and edited router's DHCP config to have IP of NAS as first DNS resolver.
When I enter nas.home/ on my desktop PC everything works fine, but Android phone on same network does not, even I see right settings in WiFi description (first DNS resolver is 192.168.1.2, static IP etc.)
What can be problem? Even my notebook on WiFi works fine. Just phones not work.

Because Android loves Google, it must be sending DNS queries to 8.8.8.8. Which Android version you are on? If it's Pie, disable Private DNS in settings. If you have root, force DNS queries to your server by: iptables -I OUTPUT -p udp --dport 53 -j DNAT --to 192.168.1.2:53. Also clear DNS cache: ndc resolver clearnetdns wlan0.

@IrfanLatif Private DNS is turned off, cleanup not helped. Sure I can force it to use my dns but I dont want to do this on every Android Phone I have at home.


text:
How to merge /data and /sdcard on Android 4.4?
Is it possible to use two partitions as one storage on a MediaTek device?
AFAIK, it is already implemented in Samsung Galaxy S III, may be.

Which device are you talking about? Have you checked if there is a custom ROM that already does what you want (or at least has a installation manual that covers this step)? Doing this manually is not that simple...

@Robert I am talking about an Mediatek phone based on android 4.4 and want to do it manually

Not very large number of physical primary only devices were shipped with separate /sdcard partition (with attribute removable="false") in transition phase from UMS to MTP. Most of those were shipped with ICS or JB, a few got updated to KK. Then mostly vendors moved to the dominant concept of emulation on /data/media/0. See Android's Storage Journey for more details.
You can take risk to paly with partition table in order to merge both partitions: /data and /sdcard (depends on the layout of partitions). But how would you get a compatible ROM? In fact you'll have to develop a custom ROM from scratch, which needs modification to both; AOSP and kernel code. Particularly vold configurations need special upgradation as it would be looking for partition to be mounted at /sdcard with (permission-less) FAT filesystem, which is now merged to /data with ext4 filesystem. Storage configuration in framework, fstab and init.*.rc files would also needed to be changed.
So the struggle required isn't worth it. And I doubt even if you would be able to get complete source code for such an old device.


text:
Equivalent of the Control + F to search text in PDF
Is there in Android an equivalent of the control + F search in texts and OCR PDF? In browser we have "find in page" options. But for PDF I didn't find such option. Is there shortcuts to make such search as we can make with the dashboard in PC?

It depends on the app you are using to open PDF files.

Are you using Google's PDF viewer?  If so, there should be a magnifying glass on the top right where you can search from.

Fine. Thanks so much. I often use Adobe Acrobat.

Based on your comment that you often use Adobe Acrobat, the app offers the same process as Google's PDF viewer. When reading a document, you must click the magnifier.

You can then enter the word(s) you are looking for on the document.


text:
WiFi “Network Notification” greyed out
I have a Sony Xperia Z1 Compact running Android 4.4.4 KitKat.
I am unable to un-check "Network Notification" under Settings -> Wi-Fi -> Advanced as its greyed out. Is there a way of un-checking that box?

Click image for larger version

Did you turn on WIFI ?

Yeah the problem was wifi was off but as Chirag64 pointed out there's no reason it should be on... Anyway turning the Wfi on before trying to uncheck works. Thanks.

You need to enable your Wi-Fi for that option to be available for checking or unchecking. Seems like a bug since I don't see any reason why the Wi-Fi should be enabled for the option to be available for toggle.


text:
Can I report phone numbers as spam callers?
Google recently introduced a feature that lets me know if someone is a suspected spam caller. However, sometimes I get calls from numbers that aren't listed as spam callers but are still spam callers. Is there some way I can report these?

Click image for larger version

Yes, you can report callers as spam.
From Google support:

You can mark all calls from a number as spam to keep from getting any more and to report the spammer.

Open your device's Phone app phone.
Go to Recent calls Recents.
Tap the call you want to report as spam.
Tap Block / report spam. You’ll be asked if you want to block the number.
If you have the option, tap Report call as spam.
Tap Block.


text:
My Nexus 5 won't update
So my phone was doing random shutdowns. I thought maybe rooting it would solve the problem. And it did.. but now I can't do any updates.
There is this 10.1 MB Update that keeps prompting to install ever since March 2015. I have tried unrooting it back but still no luck.
The major problem is I want to download the new Marshmallow software update but well I can't. My nexus 5 always says it's up-to-date. I decided to manually download and install it. So I restarted phone and went to recovery mode for TWRP and I initiated the install. And I got this error error executing updater binary in zip etc.
How can I get Marshmallow on my Nexus 5?

Click image for larger version
Sorry for the bad res image, had to use my laptop for that.
P.S: I have Lollipop 5.1.1

From what I can read on the image you posted it looks like your device has 4.4.4 not 5.1.1, and possibly a custom rom rather than the stock one (it looks like omni_hammerhead/hammerhead: 4.4.4 in the screenshot).
If you have a custom ROM you will not be able to apply an OTA update as they will only work for the stock ROM.
Your best bet might be to flash a factory image (see my instructions here - you'll need to modify the file names but the process should be the same). You should note that unless you've already unlocked your bootloader this will wipe your device, and even if you have if you don't follow the steps correctly it still might (so you'll have to set everything up from scratch again unless you have a backup).

I don't mind it wiping everything - I did a factory reset yesterday (which I thought might help me but did not).

I will try what you posted and get back to you!

Ah, sorry. You need the fastboot.exe (and possibly adb.exe) files. I've uploaded them to my Google Drive  or you can download the full SDK from Google. Put the files I uploaded in the same directory as the extracted .img files and you can then run the flash-all.bat

Let us continue this discussion in chat.


text:
Samsung KNOX is not working
I'm having a problem with my Samsung Galaxy S4 GT - I9500, it isn't rooted and has the official Lollipop ROM.
Whenever I open KNOX and select setup and press next, it closes and displays the error:  Failed to start KNOX mode, Try Again
Things I've tried so far:

Resetting App preferences.
Booting into Safe Mode and trying to run in Safe Mode.

Does anyone know what might be causing this?
Download Mode :

And Here's detail of my KNOX version :

Could you boot to download mode and post a picture of the information it gives? thanks

@SuperThomasLab - I've added the details.

Once you flash your phone with ODIN then your KNOX flag will ALWAYS be triggered. Even if you flash an official ROM/firmware package. As you can see in download mode: KNOX WARRANTY VOID: 1. That can never, yes I say NEVER be reset back to '0'. So you haven't got any warranty anymore on your phone and you can never use Knox anymore.  Hope my answer helped you to understand the issue.

I've installed Ozcan ROM in my phone before, which was custom ROM. It also downloaded KNOX and it worked totally fine. I've also read various documents and forum, but none of them says that you can't use KNOX if you're counter is triggered.

@Pankaj and how did you install the stock ROM again? If you did it with Odin then your flag will be triggered.

Yes, I did it through odin.

@SuperThomasLab, I suggested an edit to alter the last sentence in your answer because if I may say so, that sounds sarcastic.

@ThomasVos facing strange issue have posted it on stackexchange https://android.stackexchange.com/questions/196585/secure-folder-password-input-not-working

I assume you have rooted your phone. In that case KNOX Will refuse to work as it says:
KNOX warranty void:1
Sometimes this gets even triggered by normal OTA.

my phone isin't rooted now. As the system status displays "official", it should be working. Here's more detail : KNOX Counter is to help Samsung After-sale Service get a better idea of a device and see if users have tampered with the device when it comes to warranty claims. And reportedly, this newly developed KNOX Security technology prevents its KNOX Counter from being reset.

No, once the KNOX flag is triggered its triggered. It will refuse to work.

Could you please provide me any page or document providing support to your answer.

Just seen this a few minutes ago, fir more infirmation just search there http://forum.xda-developers.com/showthread.php?t=2738175

I don't understand the downvoting. For installing a custom rom you need to root your phone. This DEFINETLY triggers KNOX. As KNOX detects a security issue (rooting is a security issue to KNOX) it WILL refuse to work.

@TechMod, there are ways to root your system without triggering Knox. See this: http://android.stackexchange.com/questions/115526/why-i-should-i-care-about-knox-warranty-can-i-still-root-my-s5 . Also, your answer does not describe why Knox doesn't work. Please put more effort into your answers from now on.


text:
Unfortunately, Music has stopped
So recently I've been developing an Mp3 Download app, which may have caused some problems. I've deleted my app, deleted all the content, deleted the 'Music' Apps Cache and Data, yet It still crashes whenever I click on "My Phone" (When selecting music). Or, when I click Folders, Playlist, etc.

Device Info:
HTC One X
Android Version: 4.1.1
HTC Sense Version: 4+
Software number: Android Revolution HD 20.1 by mike1986
HTC SDK API Level: 4.63

If there's anyone that could help me find a solution, I'd be very happy.
Thanks in advance!

Edit #1
Just did a cold-boot, and wiped the cache.
This had no effect.   :(
I will not do a Factory Reset, or format my whole phone there's too much that I can't lose. I've read the comments, and the links you've posted.. Unfortunately, none of those links helped me either.

Edit #2
Didn't bother trying to fix that, thought it'd just be the flu or something that a week could fix. Didn't care too much tho..
On the other hand, while developing my app, the phone got stuck and didn't do anything. I thought it was a bug in my app. After trying to run the app after some  'Fixes'  the Virtual Android device started to come up (since it didn't detect my phone). I tried to go to settings, to enable USB Debugging (since that's most likely to happen), and it didn't do anything. Phone froze. I shut it down and tried to power it up again. It went to  'HTC quietly brilliant' screen, and froze. I tried to reboot and it got stuck at the same screen.
I tried to power it off, and on one more time, when the Charging LED was no longer on, and the phone went 'Cold' so to speak.
I've tried multiple combinations of buttons, plugged in,not plugged in, with/without Simcard.. but no.
My HTC One X is dead. It's still plugged in,on the wall, but it's not charging, booting, nothing.
I am sad.
Have a nice evening!

"Unfortunately, Music has stopped". So sad statement.

@uprego it really is...

You may find the hints about the real cause of the force close in the Android log. Feel free to edit any new information in your question.

And first-aid in our force-close tag-wiki :)


text:
Ring only for favorites?
Any way to micromanage ringtones?  I'd like to only hear my phone ring when called by people on one of my favorite lists, or family list.  Same with sms/mms sounds.
Edit:
I'd already considered putting everyone but favorites on silent.  However those lists change fairly often.  So only a specific group ringing at a specific time is prefered.

You can do this. I use Zedge to get ringtones. Get a mute or silent ringtone and then select another ringtone and set it manually for specific people. Zedge also helps you set it for individual contacts.


text:
Is there a larger interface for older owners?
Does anyone know of a larger visual interface for older owners on android phones?  It seems to me that most programmers haven't experienced over 40 eyesight.  :-)  Much less over 50, 60 etc.
Having an option for larger icons and text throughout the phone would be a fantastic.  I know a slew of over 40 folks who are technically savvy but have to wear reader glasses to see the phone interface well.

I've thought about this as well for my senior parents. There are really only two options:

Replace the stock launcher with something like BIG Launcher ($10) or Large Launcher Senior (free). The downside to these is that they feel more childish, and some older tech-savvy users might not appreciate that.

Increase the font size that Android displays text in. Some versions of Android already have an option under Settings > Accessibility > Large Text (SIDENOTE: Magnification gestures may also be helpful to some senior users who can remember them). Additionally, Big Font (free) offers more granular control over font sizes.
Pair that with a third-party launcher, like Apex and Holo Launcher which allow you to change the icon sizes on both the home screen(s) and the app drawer. Another nice thing is that you can hide apps with these launchers too, so you could hide apps that might not be helpful for the user to see every time they search the drawer.

When my mother first switched to a smart phone I made her a customized launcher with Lightning Launcher. Its free and has tons of customizations. Downfall is that it might take a bit to learn all the features but once you learn its really incredible. You can change icon size, text size, icon rotation, and even set it up with massive fonts so putting on glasses to use the phone isn't always required


text:
Stop Adding Home Screens on App Install
I do not want to turn off new icons being added to the Home Screen.
Instead there is a problem where my tablet will keep adding new Home Screens.  It's curious, because there is plenty of space for new icons on the previous page.
The tablet is Galaxy Tab S3 with Android 7.0 and the default launcher.

Can't check on Nougat because I don't have it but IIRC there is an option in Play Store settings to disable this . This is accessible from settings. Please check

There is an option for adding icons to the home screen.  Not a setting for creating newer home screens.

Ahh yes, my bad. Must be Samsung specific thing. All I can suggest (since I dint have that device) is to use an alternate launcher like Nova or any other


text:
How to share VPN connection with devices on hotspot?
I use a VPN on my Galaxy S8+ and I am looking for a way to be able to share my ExpressVPN connection via hotspot to be able to connect devices such as Xbox One and a Smart TV. Currently cannot use a PC and my router is trash so my phone is the last resort. What can I do? What are some workarounds?

Duplicates: 1, 2, 3

Android doesn't redirect hotspot traffic through VPN network as far as I have tested on Pie ROM (almost stock; custom ROMs might have different implementations or some specific settings). The reason is VPNService API works in Java framework of Android to redirect traffic to VPN's tun interface based on UIDs (and/or SOcket MARKs) of apps. While tethering works in native code; dnsmasq is the DNS server (up to Pie) while the rest of traffic is handled by kernel directly. Also using same internet connection or VPN for multiple devices may break terms of contract with service providers. So it's left disabled by default.
A workaround is to modify routing table but it requires root and is a bit complex on Android. This works for me:
~# ip rule add iif wlan0 lookup table 5000
~# ip route add default dev tun0 table 5000
~# ip rule add to 192.168.43.0/24 lookup table 5001
~# ip route add default dev wlan0 table 5001

First command adds a rule to RPDB to send traffic coming on hotspot (WiFi) interface to table 5000.
Second command adds a route to routing table 5000 to send all traffic on tun0 interface i.e. the one used by VPN app.
Third and fourth rules do inverse i.e. send traffic coming from VPN to tethered devices.

Firewall works above routing policy. Forwarding rules and source NAT should already be set with hotspot but just to make sure:
~# echo -n 1 >/proc/sys/net/ipv4/ip_forward
~# iptables -I FORWARD -o wlan0 -i tun0 -j ACCEPT
~# iptables -I FORWARD -i wlan0 -o tun0 -j ACCEPT
~# iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE

First three commands instruct kernel/firewall to forward traffic in both directions in between VPN and hotspot interfaces.
Fourth command sets SNAT i.e. keeps track of hotspot traffic leaving VPN interface and coming back.

Make sure interfaces names and IP address are correct as on your device.
Also there is VPN Hotspot but I haven't tried. For non-root devices there exist some Wi-Fi Direct (ad-hoc) based solutions like PdaNet which require setup on both sides.
RELATED: How to use Private DNS on Android Pie for tethering?

Another option would be to use a raspberry Pi as the router with one of its USB ports connected to your phone with the VPN-based internet connection. To provide the internet to other devices, the ethernet port of the Raspberry Pi can connect to a router/switch/bridge and/or also the Pi's own wifi could be used to broadcast it for wireless devices. Or a wireless access point could be added to the router attached to the Pi.
Here is an answer for using a Raspberry Pi tethered to a phone to enable its mobile network to be provided as an internet connection other devices:
Answer to: 4G LTE Device [USB Tethering]--> Raspberry Pi [Ethernet]--> Router, is this possible?
What this answer assumes is that your phone will support USB tethering and the VPN at the same time and that the VPN-based internet connection can be routed over that USB tethered connection to the USB host to which your phone is attatched.
If that is possible, then I can't foresee any other blockers, assuming that the steps described in that answer are correct (I haven't yet tried them).
If successful then that means you would not need to do any particular adjustments to your phone - possible examples of reduced hassle could be: less involved, less risk to 'bricking' the phone, less risk to banking apps stopping working due to rooting, also can use another phone without having to redo the steps on that.
Update
(Following a comment from @Irfan Latif here, I added a response comment, and updated my answer with it, here):
However, if VPN is not supported at the same time as USB tethering on your phone, then the next option you could try is to run the VPN on the Pi itself Other VPN providers, such as speedify.com also support the Raspberry Pi - and Speedify in particular can bond different network connections together should, say, the original poster want to use multiple phones etc as internet connection sources. I don't work for ExpressVPN nor Speedify nor have a financial interest or affiliation with them.
It's worth also noting that if you try this, then the settings in that linked answer above might need adjusting because they might have been written for a scenario that doesn't use a VPN. I say might - because they might still work - I don't know - I just want to bring your attention to it to minimise any frustration :) . With that in mind, the approach could be to get the steps working on your setup with the Raspberry Pi, without the VPN running. Then install ExpressVPN on the Raspberry Pi and see if it still works. By having tried without VPN first, you'll know that the Raspberry Pi can work as a router, so you have that and use that as the basis to get it working with the VPN. Maybe the VPN provider can support you, or at least they might be interested as there maybe others who want to do what you're aiming to achieve, so it saves them time supporting everyone on this as well giving them the edge on support and appealing to those who appreciate the adaptability - all good for their offering in the market.

As the question states that the phone doesn't support WiFi tethering and the VPN at the same time. So is there a reason to "assume that the phone supports USB tethering and the VPN at the same time"? The difference is only of network interface type i.e. WiFi or RNDIS. The network routing is alike AFAIK.

+1 fair point. I could expect the original poster of this question to confirm this - but until then we would not know, for sure, however it's certainly possible as you advise. If indeed USB tethering isn't possible with the VPN, then the next thing to try is to run the VPN on the Pi itself, ExpressVPN seem to provide support for this: https://www.expressvpn.com/support/vpn-setup/app-for-raspberry-pi/ Other VPN providers, such as speedify.com also support the Raspberry Pi - and they can bond different network connections together should, say, the original poster want to use mulriple phones etc.

P.S. I don't work for ExpressVPN nor Speedify not have a financial interest or affiliation with them.

In my case I have a Samsung tab which got bricked and lost its mobile network functionality. Now I wanted to tether the vpn connection to the phone that that wifi hotspoted to me. Turns out android specialises tethered packets(I mean connections from tethered clients cant be connection tracked by the system itself or blocked by normal android firewall apps but iptables can block it) so I used this to my advantage.
Turns out the solution is simple. Works on customizable vpns over tcp( for udp maybe u need to run a socks proxy server havent tried that).

Download any proxy server apps on playstore.
In my case I was using openvpn so you need a customisable openvpn client and go to the exclude routes options and enter the ip address of the phone that needs to connect to my proxy server.
Simply start the vpn connection and change wifi settings and add the ip an port of the proxy server and your are good to go or simply run a vpn over tcp using that proxy server on the phone you want to tether.

Note: In step 2 excluding routes is for my case or simply when you want to tether to the access point but if you are the one tethering there is no need to change routes. Also In my case I was able to run a vpn on my access point with it not cutting off my connection on the client phone like a vpn over a vpn.


text:
Why is "mdnsd" draining my battery and how to stop it?
This process (mdnsd) had been draining my battery for a few weeks. I have not been able to find a solution after a lot of search.
I don't have any drone app, Facebook app or Firefox, although it's true the issue started more or less when I installed the Firefox app. But I have uninstalled it, rebooted my phone and the issue is still there which makes me think Firefox maybe didn't have anything to do with this.
Any ideas? I have an LG G2, Android 4.4.2

How to you see the process list (via an app - which one; or via command-line - adb/termux)?

@Robert I just see it from the default battery usage feature of my phone

WHAT IS MDNSD:
mdnsd (Multicast Domain Name System Daemon) is Android's implementation of mDNSResponder, a part of upcoming Zero Configuration Networking. It allows you to automatically discover services and appliances attached to your network:

Name-to-address translation and other DNS-like operations (mDNS) in the absence of a conventional unicast DNS server:

It provides the ability for the user to identify hosts using names instead of dotted-decimal IP addresses, even if the user doesn't have a conventional DNS server set up.

Network Service discovery (DNS-SD):

It also provides the ability for the user to discover what services are being advertised on the network, without having to know about them in advance, or configure the machines.

This daemon is continuously sending multicast broadcasts (queries / advertisement) to all hosts on local network at IP address 224.0.0.251 and UDP port 5353, also listening on the same port.
WHICH APPS USE MDNS:
Any app that makes use of Android's Network Service Discovery, will request mdnsd running in background (1, 2, 3):

Adding NSD to your app allows your users to identify other devices on the local network that support the services your app requests. This is useful for a variety of peer-to-peer applications such as file sharing or multi-player gaming.

A quick search on forums will show many apps being blamed for excessive battery drainage becuase of using mdnsd, e.g. Facebook and Firefox. The later has been gone through a bug in the past that caused the unexpected behavior. Now they have their own implementation of MDNS (4). Google Play Services also have built-in MDNS service (to discover Google Cast receiver devices like Chromecast) (5, 6).

Devices that support NSD include printers, webcams, HTTPS servers, and other mobile devices.

AOSP's built-in apps Print Service Recommendation Service (com.android.printservice.recommendation) and Default Print Service (com.android.bips) also make use of NSD. So if you are using printing features on your device, those would be causing mdnsd run in background. But the most common reason is ADBD (Android Debug Bridging Daemon) which force starts mdnsd (7).
HOW TO STOP MDNSD?
mdnsd is an init service (8) which can be stopped by triggers. Add a few lines to /etc/init/mdnsd.rc:
# stop mdnsd on startup
on property:sys.boot_completed=1
    stop mdnsd

# stop mdnsd when adbd starts/stops
on property:init.svc.adbd=*
    stop mdnsd

You can also manually stop the service anytime by executing:
~# setprop ctl.stop mdnsd

Or you can directly kill the mdnsd program as suggested by @DBX12. The service shouldn't restart because it's oneshot. But if it's triggered again and again by some app or the OS, you can make the binary inexecutable (or delete) at all:
~# chmod a-x /system/bin/mdnsd

However this may break some apps' functionality.
All of the above solutions require root. If your device isn't rooted, the only way is to identify and stop using the app/feature that uses Android's NSD API or directly starts mdnsd service.

I guess I'll have to root my phone. I have tried to identify the app but I couldn't, after playing a lot with uninstalling things

Did you stop UDB Debugging from Developer Options and restart device? May be it's the ADB starting mdnsd at startup. Once started, it won't stop even if you stop ADB later on.

Yes, I had done that

May be you have set persist.sys.usb.config=adb in your /default.prop.

It seems like it is the daemon for multicast DNS. I have the same issue as OP and Trevor. My solution is the following (assuming you have a rooted device). If you have adb, then do step 2 over that, it is more comfortable to type on a keyboard ;)

Install a Terminal Emulator
Create a shellscript with the content su -c "kill $(pgrep mdnsd)"
Run it everytime you see fast battery drainage as this is a symptom of a running mdnsd. Confirm the prompt of SuperSU to grant root permissions to the script.

What the script does:
su -c "kill $(pgrep mdnsd)"
^      ^    ^ ^
|      |    | |
|      |    | +- Search the process list for the phrase "mdnsd" and return the process id
|      |    |
|      |    +- Spawn a subshell and execute contained command and return its output
|      |
|      +- Stop the process with the process id specified after kill
+- run the command specified after -c with superuser privileges

Needless to say, it requires a working "su" binary, meaning you need a rooted phone.

@peterh well, I put that requirement in the second sentence in bold ;)

Oops, thx, dbx! :-)


text:
Why can't I move apps to external sdcard?
I'm using Redmi 5 Plus with global Oreo 8.1 ROM, rooted with Magisk. And I can't move my apps to external sdcard.
I tried with native method of Android. But the Redmi 5 Plus or MIUI doesn't seem to have the option to move the apps. So, I used Apps2SD app to do the work. It has the option to move with just native method. But it failed with new installs into ASEC containers no longer supported. I also tried other apps but the same error.

MIUI probably just not showing the buttons. you can do it from adb shell https://android.stackexchange.com/questions/213312 and then any new installed app should be installed there. if phone is rooted you can force the Migrate Button with am start -n com.android.settings/com.android.settings.deviceinfo.StorageWizardMigrateProgress (after following the above tutorial (hidden link))

The device was rooted. Tried Apps2Sd app. The error said something "the asec folder is write restricted". I tried with other like link2sd too. Same result.

@IrfanLatif I think the problem is not with any specific app but rather the android itself. But the surprising thing is that why there isn't much commotion about it? Android is really a mess. restricting write access to Ext card already was out of my understanding and now this! I am not sure what you mean by portable or adoptable but my sdcard is what everyone else is using and mounting.

you can only move apps which allow it in manifest. adoptable storage is the native counterpart for Link2SD. you would knew that if you had read the link

external MicroSD Card can be splitted in two partitions. one partition remain vfat while the other partition must formatted ext4. The ext4 partition can be treated as internal memory while the vfat partition is still useable as external. of course Link2SD can do more than just native App2SD, but it is the nearly same concept

i don't use any of this, neither encryption. i never used WhatsApp at all (which is main reason for 90% waste) and i am fine with 10 GB. My girlfriend has just one single bind mount of WhatsApp Media Folder at startup, so all other apps remain at (faster) internal memory while the big WhatsApp garbage is stored on MicroSD. Best stable solution :)

I once tried creating a 2nd partition of Ext sdcard to transfer whole app with all its data to extsdcard. But I am not talking about that. Now it seems I can't even move the apps with native move method given by the Android. The apk used to be moved to the encrypted "asec" folder. But now it says the write to that folder has been restricted. So, basically no more move to sd is available.


text:
Does Android 8 has journaling enabled in its ext4 files sytem?
Android 8 uses stackable file sytem called sdcardfs, which emulates FAT32 on ext4 on the data partition. Does sdcardfs recognize the ext4 file system and journaling?
In other words, files written using sdcardfs has journal history information created?
On Android 8 it's not clear how the journaling works e.g. can it be used to recover data? Is the new data written to empty fresh areas or first the deleted areas are used?

Does Android 8 has journaling enabled in its ext4 files system?

It depends on a few factors. OEMs can possibly disable journaling e.g. on system partition as it's always supposed to be used R/O. These days ext4 and f2fs are commonly used filesystems on Android, so first make sure you have ext4 on userdata partition. f2fs is by-origin a log-structured filesystem which is a circular buffer, that's what a journal is but the functionality differs.
Filesystems are part of Linux kernel, not Android (AOSP) itself. ext4 by default is created with journal, though it depends on mke2fs.conf, and can be disabled with mke2fs or tune2fs option -O ^has_journal.  Journaling support can be checked from filesystem features by executing tune2fs -l /dev/block/bootdevice/by-name/userdata | grep has_journal (or use dm-0 block device if userdata has FDE) but it requires root. As alternate if mount | grep 'on /data' shows data={journal|ordered|writeback} option then journal is enabled for sure.

Does sdcardfs recognize the ext4 file system and journaling?

sdcardfs itself doesn't have a journal, but since emulated filesystem is stacked over /data/media (which is ext4), the files created through sdcardfs are recorded in underlying filesystem's journal.

On Android 8 it's not clear how the journaling works e.g. can it be used to recover data?

Yes definitely, if you have root already and the data isn't overwritten. We have tools like extundelete which are very effective. But do consider factors like TRIM and others described below and in given links.

Is the new data written to empty fresh areas or first the deleted areas are used?

Well that's a different question, again it has nothing to do with Android. The question is how often a filesystem overwrites deleted data blocks and it's not simple to answer. Create a new ext4 filesystem, create a file foo inside it and delete it. Create new file bar and it will take the inode block and data blocks freed by foo. Delete bar and create file baz, it will occupy the same space. However in actual things are complicated. Will the data blocks of deleted file be immediately overwritten or not depends on whats the size of new file is, how much fragmented your filesystem is, how much free LBAs you have before the logical location of deleted file etc.
PS:
Things are different on f2fs, it's the Flash Friendly FileSystem, so as a wear-leveling strategy it preferably writes data to new empty blocks (free segments), so that FTL doesn't have to Erase cells, trying to reduce the E/P counts on flash memory. Later it does background garbage collection (GC) synchronized with FTL to release LBAs corresponding to deleted data. But the tools like debugfs aren't readily available for f2fs to explore deleted inodes and to lookup corresponding data blocks from journal. So from data recovery's view, f2fs isn't very friendly (AFAIK and experienced).
RELATED: What Makes Recovery of Deleted Data Difficult / Impossible?

Where would I find the journal file itself? I'm actually looking for the journal file of the 2nd partition (ext4 partition) of a micro SD card that is inserted in the device.

@Sruly journal is stored in an invisible file usually located at inode 8. See https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Journal_.28jbd2.29 or any other EXT4 resource. It's not specifically about Android.


text:
Where can I find User Data of an app?
I have downloaded an app on my phone because I want to take out information from it. It has pages (In image form, probably PNG) that I need on my computer. I went to storage and I clicked on the app, in "Space used" it says the app size is 57.27MB, but I want is the user data (Because when I first downloaded the app, the pages weren't there, but when I opened the app they gave the option to download the pages and I clicked the option to downloaded all pages). The user data is 288MB, and the total size of the pages is probably somewhere in 200MBs. So it means the pages are in "User Data." When I connect my phone to my computer (through USB) this shows up:

So if the images are in User Data, from which of those can I locate the "User Data" of the app?
Note the app's name is Al-Muhaffiz and it was published by Mahad Al-Zahra Publications.

Look under /sdcard/Android/data/com.aliasgarmurtaza.hifzalquran, but all data might not be there. Private data is in /data/data/com.aliasgarmurtaza.hifzalquran which you can't access without rooting your phone.

Data could also be found in hidden folders starting with .
You can easily find a hidden folder using the built-in File Manager or a 3rd party application.
Once you open your directory,  tab the hamburger icon and select "show hidden folders"

@IrfanLatif is there anyway to access it without root?

May be and may be not. adb backup trick may work, but I never tested. See this and this. Is it a Quran app? Most probably it will be placing files in first location I've given in above comment, or may be simply creating a (possibly hidden) directory in /sdcard if it has Storage permission granted.


text:
An app on the play store promises to TRIM without root access but I highly doubt if it even works
My phone is new so I can't root it because I don't wanna void my warranty just yet and trimming my phone would also not make a significant difference. Since most other apps on the Play Store promise to run TRIM only with root access, I don't think it's possible for this app to do so without root but if it can that's the best thing I can get. Can someone please confirm if this app actually works?
Link to the app:
https://play.google.com/store/apps/details?id=com.lagfix.fstrimmer


text:
Hide SMS message in notification bar
I am using Moto E powered by Android Kitkat.
When I receive an SMS, I get a notification displaying the sender name with the message. I don't want the message text to be displayed in the notification, just the sender name is enough.
How can I prevent the message text from being displayed?
NOTE: I don't want to stop the notification. I just want to hide the text message in the notification

GoSMS Pro has a "Notification bar privacy mode" option, which 'shows "New Message" instead of the message's content'.

I personally use Sliding SMS (which is a standalone app created for and taken from CyanogenMod 10). It has an option to enable "Privacy Mode", which hides the sender and message from the status bar notification. 8sms (which is also from CM10 M2) also has this option.

Third party sms app like Handcent SMS ,8sms and Go sms etc have option to hide the notification message from the status bar.
Just go to these sms app. In settings you will find option to hide the message content in notification bar.

Chomp SMS also works fine. We can choose what to display in the notification bar. In privacy mode, we can hide name, text and both.


text:
Is this a phishing or hacking attempt using a survey? How do I get rid of this popup?
For the last few days I have been getting a really annoying popup. Every half an hour or so my web browser randomly opens up when I unlock my phone (Samsung Galaxy S5, running Android 6.0.1) and opens up this site:
www.surveygizmo.com/s3/3191047/mul-widget-uninstall-survey

The thing is, I don't even know which app or widget they are talking about. I did not recently uninstall anything on my phone, and I don't know what the "mul widget" from the URL is. So I figured it might just be a phishing or hacking attempt by a dubious website or ad, and I just closed the tab. Then, annoyingly, the same site popped up again after a while, so I clicked on "other", added a random reason. Which did not help either. Obviously I did not submit my e-mail, but nothing helped so far and it's starting to piss me off. I couldn't find anyone who had the same issue on the internet, and the only other thing I could think of is adding a random e-mail address but I keep thinking that it looks like there is some software on my phone that has been installed by somebody else, which activates this popup.
I must stress that this popup turns up even if the browser is closed, and it opens the browser by itself.
I also ran Malwarebytes and the AVG AntiVirus multiple times, to no avail.
Does anyone know what I could do?

There are 2 apps associated with this problem, Amber Weather and Histogram. Histogram is a weather widget that has its roots in Amber weather.
I had the same problem. It started after is uninstalled Amber weather but the problem kept occurring. I searched for "Amber" in all of storage and found a folder linked to Histogram called Amber. I uninstalled Histogram and the problem went away.

Try to open the list of installed apps and then inspect the list. Uninstall anything that you think you hadn't installed
especially something like mul widget .

I tried that, but there was nothing suspicious. Everything that I did not install was a default app by Samsung or Google. And I couldn't find anything related to mul widget...

Unfortunately that did not help either... It just popped up again.

I assume you are talking about Samsung's built-in browser?  Try deleting your personal data (menu->settings->privacy).
It could be a piece of code in the cache using it's own delay.  To be sure, delete cookies too, but that might inconvenience your browsing elsewhere.
Have you checked Device Security on Smart Manager?

Yes, I am talking about the built in browser. Thank you for your suggestions, I deleted all cookies and other personal data. And I'm also running a Smart Manager scan right now. I hope that does it! I'll let you know if it does.

After a while I seem to have figured out what caused it. I do not use that many widgets so I figured I'd just try to uninstall one after the other and wait for a while to see what happens. This is a rather tedious process but I reckon beggars can't be choosers. After I had uninstalled AmberWeather completely I haven't heard anything for two days now.
First I tried uninstalling any widgets I had installed and then uninstalling the app and reinstalling it, or Amber Weather Elite instead of it, but that did not solve the issue. Only after I completely uninstalled it kept it that way did the popups disappear.
I sent an e-mail to the developers asking for information as to why this is happening and how I can get rid of it but I haven't heard anything back from them yet. If I do I will post it here, since some people told me here that they are having the same issue.


text:
Outlook keeps asking for login credentials during setup
I'm trying to switch from a windows mobile to android. My main problem is moving contacts which are saved on windows mobile in an outlook account.
Therefore i tried to download and configure outlook on Android, but have no luck on entering the user credentials.
The following happens:

I enter the email (which does NOT end in '@outlook.com', i used a normal mail address to sign in at outlook which works with outlook on windows 10, windows mobile and web).
I enter the password.
After entering the password the outlook app authenticates on android and gives a message, that the server configuration is updated, and i need to re-enter password.
I reenter the password.
I'm asked if the application is allowed to access outlook and answer yes.
Password question step 2 appears. From this moment step 2-5 are endless loops.

What i've tried so far:

Delete the app cache
Delete the app, reinstall it from play store

Both did not work, same behaviour as before occurred.
I have tried to enter another outlook account ending with outlook.com - only one time password was needed and everything works - but as this is not the account with contacts it is not so useful.
So how can i enter my main outlook address to outlook? Or is there another way to get windows phone contacts to android?

See answers here for windows to Android contacts transfer

@beeshyams thanks found a workaround. Add a second outlook.com-alias online to the existing account and log in with this alias. then you can easily send the contacts from outlook to android.

Answer:
there seems to be a bug if you use outlook accounts which are not ending on outlook.com.
If you go to https:\login.live.com you can login with other credentials.
There is a menü "Your Informations" where you can edit the email or telefon alias.
In this menü you can create an outlook.com alias.
With this outlook.com alias login from Outlook on outlook mobile to Outlook.com works and contacts can be retrieved.


text:
Accessing battery usage graph on Android 8
How can I access the battery usage graph on Android 8? This is the graph that shows the battery drain since last the last charge and estimates the number of hours left on the current charge.

Go to Settings and select Battery. Tap on the large battery image in the battery section and the usage graph will be shown.

If you mean this menu, you can access it from Settings > Battery.