text:
How to make a complete factory reset, without anyone being able to retrieve my data?
I will have a few Android phones that I will have to let go.
I would like to make a proper clean wipe of the data, without no one being able to retrieve them, and do a factory reset.
I have read about the Schneier Method, encrypting the device before doing a factory reset, doing both, etc.
Since I am not an Android/adb guru, I would like to know if some of you would have some idea on how to achieve this with certainty.
I know "certainty" is a big word when it comes to proper data erasure on flash memory but still.
I have found some answers here and somewhere else, saying that encrypting and doing a factory reset on your Android device is enough, but I could not find a reliable source.
Just a few information that could be useful:

I'm running Linux as my OS and, therefore, I'm not looking for a Windows-based solution
My devices are non-rooted and (almost) identical (Samsung A510F + 1 A510FD)

this device is encrypted by default. in order to avoid FRP lock, enable OEM unlocking in developer settings (if it exist), then just do a normal factory reset

@alecxs I could just remove my Google account before doing the factory reset in order to avoid the FRP lock, or am I missing something?

yes, removing google account is fine too

HOW DELETED DATA IS RECOVERED?
Data (un)deletion strongly depends on how a storage media (HDD, SSD, eMMC etc.), filesystem (NTFS, FAT32, ext4 etc.) and OS save and delete files.

File carving / signature search / content-aware recovery identifies standard signatures values in the headers of deleted files (as file command and antivirus programs do to identify known viruses hiding in files) e.g. JPEG files start with 0xffd8 and end with 0xffd9. The data in between blocks is assumed to be the file (considering the file is contiguous; no fragmentation). Other checks may also be performed on header like a checksum, the file’s length, or date/time etc. But not all file types have a standard header/footer signature, so determining where the file starts/ends is difficult. Metadata (including filenames) isn't recovered with this method.
This approach works for deleted files, filesystems or partitions. Photorec, scalpel, foremost and popular Android app DiskDigger (in dig deeper mode) work on this approach.
Recovering as much as possible information about deleted data blocks from within filesystem e.g. from directory entries, journal, inodes etc. Filesystem is basically the catalog which holds file name vs. file location information and journal is a kind of backup information. So recovery of filenames (and other metadata) is more probable with journaling filesystems.
This approach works only if filesystem and partition are intact, or are recoverable using first method. DiskDigger (in dig deep mode) and extundelete work on this approach.

WHAT MAKES RECOVERY OF DELETED DATA DIFFICULT / IMPOSSIBLE?

A file/directory is simply deleted e.g. from some File Explorer app or with rm from commadline.
A file is renamed to some random string, then deleted.
Filesystem on the device is not journaling, so no information can be collected from journal. Ext4, the commonly used filesystem on Android, is journaling.
Filesystem on the device is a Flash Filesystem e.g. F2FS.
In this case you are left with minimum tools (e.g. no debugfs to list deleted inodes and to lookup corresponding data blocks from journal) and also data is always written to new blocks as a wear-leveling strategy. Garbage Collection makes recovery less probable from filesystem because Logical Block Addresses (LBAs) of data blocks get changed. So only carving method is applicable, and it works.
Filesystem or partition is deleted, making it harder to search directory structures and journal from within filesystem. Android's stock recovery deletes filesystem during a Factory Reset. See this answer.
Whole disk is erased including Partition Table, boundaries of partitions and filesystems are vanished. This isn't possible on Android devices because there are partitions required to boot the device.
File was fragmented (not saved contiguously as a single piece), particularly if no information can be recovered from filesystem.
Fragmentation is higher on Windows as compared to Linux/Android; Ext4 is self de-fragmenting because of Delayed Allocation and reserved-blocks-percentage etc. But usually large files on an older filesystem are always fragmented.
You overwrite file/filesystem/partition with other file/filesystem/partition, or zeros, or random data (shredding).
If you have root access, throw a stream of /dev/urandom on block device to overwrite all data including filesystem. Now forget about its recovery, though it doesn't nullify the possibility of data recovery directly from flash storage (raw NAND), by chipping it off the board (who will do this except in forensic lab!). Official tool from SD organization: SD Memory Card Formatter also overwrites with zeros in full format mode. Please note that repeated overwriting wastes precious E/P cycles of flash memory.
Filesystem is TRIMmed or SECURE TRIMmed, or ERASEd or SECURE ERASEd.
These are special commands for different types of flash storage devices. TRIM is issued by the filesystem to the firmware of flash device, requesting the actual physical erasure of data blocks (LBAs) which have been deleted from the filesystem. Filesystems mounted with discard option always send FITRIM ioctl whenever a file is deleted. Android does a scheduled TRIM, or you can do manually with fstrim command. See this answer.
Partition is BLKDISCARDed or BLKSECDISCARDed.
blkdiscard issues TRIM command for whole block device i.e. partition or disk (roughly equivalent to issuing TRIM on a newly created filesystem).
TRIM saves filesystem's superblocks/inode table and drive's partition table, BLKDISCARD saves nothing on block device.
Android's stock recovery tries to do at least one of the both during a Factory Reset. See this answer.
Something similar happens with bootloader unlock and fastboot erase, though it depends on implementation inside bootloader but that's what Google expects from OEM/SoC vendors.
Deleted file is encrypted or file doesn't have an identifiable unique signature (at start or end), so no carving is possible.
Like an encrypted archive or file that mostly file explorers can create. Or a file with some uncommon format, not known to recovery programs.
Filesystem or block device is encrypted so the data becomes unrecognizable (like FBE/FDE on Android). Mostly new devices come with forceencrypt or fileencryption flags set in fstab, so vold encrypts them on first usage. If not decryptable (e.g. formatted), data is impossible to be recovered on such devices.
Flash storage device is self-encrypting, common for SSDs but not for eMMCs.
Flash storage device is erased with SECURITY_ERASE or ENHANCED_SECURITY_ERASE ATA commands, common for SSDs but not for eMMCs.
Storage device isn't accessible e.g. on embedded system if bootloader is erased, device is bricked and no more bootable. There is no protocol to communicate with eMMC, even if the data is there, except through something very lower level like JTAG or a chip-off.
Also see: Bootloader/BIOS, flashing ROM and correlated risks. Why Android devices are more brickable than PCs?
Storage media is physically damaged; mechanically or electrically.

Large size storage solutions like NAS or the more complicated SAN that makes use of LUNs with advanced protocols likes iSCSI, and data integrity solutions like RAID also complicate the data recovery process. However single disks like on home PCs or the flash memory like on Android phones are rather simple cases.

So while a Factory Reset with stock recovery suffices in most cases, you can combine any of the above described steps, whichever applicable to your device, to make sure your data is not retrievable.
RELATED:

Can user data be recovered after formatting and flashing stock ROM?
How to recover a deleted file from /data partition?
How to get data off a completely dead Android phone?


text:
Factory reset my RCA Viking Neptune 10 tablet
Trying to factory reset my RCA Viking Neptune 10 tablet it has no volume button, no home button, only a power on button and detachable keyboard. Any suggestions are truly appreciated!

Do you have a home button?

Or a pinhole with "reset" printed near it?

Thank you helper, there is no home button on the tablet. There are some holes on the back of the tablet but none are marked. If I find which one is the reset what would I do please?

Would reading the user manual tell you this? RCA publishes pdf files for their models.

As wbogacz suggested i found the user manual and found out that there is a reset button which can be located at number 9 of the following image of the backside of the device:

Press that button to reset the tablet (then press and hold the
Power button for 4~5 seconds to turn on the
unit).
Hope this solved your query.

Thank you so much everyone! It is so strange I tried to press the reset button with a pin and then turn on the power and I still see the same message - "to start android enter your password" How long do you need to press the reset button? Maybe there is something I am missing. Thank you so much!!!

source: Stack Exchange

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

sort: votes


text:
Access missing settings in Developer options?
On my Moto C Plus (7.0), "Cool colour temperature" and "Picture colour mode" appear in Settings search results but don't show up once tapped in Developer options. Is there any way to access them if they seem to have been hidden or removed? Thanks.

Are the developer options enabled in the settings?

Sorry for the lateness of my reply, developer options are enabled but the two settings still don't appear. After reading this, I think it could be because my display isn't supported.

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


text:
Plugging phone into laptop charges laptop instead of phone
When I plug my father's Xiaomi 5X into my MacBook Pro, it shows up as a charger on the MacBook and I don't get the usual USB options on the phone. Tried it on two Macs with same result. Also tried my Pixel 2 with the same cable and that worked as expected.
Is there some setting in either the phone or laptop that I can change to make it recognise the phone for what it is?

This is called PD charging. There should be a setting in connection dialog. Also there should be the same options in Developer Settings

That makes sense. Trouble is the connection dialog doesn't appear on the 5X like it does on the Pixel.

this happens to me often when enabled developer settings - each time i connect i have to navigate to developer settings and select "MTP" again (it does not remember nor show a dialog)


text:
Bluetooth volume on headset vs. phone
I have two pairs of Bluetooth headphones (stereo).
With one pair, when I adjust the headphone volume using the buttons on the headphones, it adjusts only the headphone volume and not the phone's Bluetooth audio volume. This is my desired behavior. (My car's (Bluetooth-capable) audio system also displays this behavior - when I adjust the volume in the car, it adjusts only the car's volume, not the phone's.)
With the second pair, when I adjust the volume using the buttons on the headphones, it adjusts both the headphone volume and the phone's Bluetooth audio volume - making for large steps (large increases and decreases in volume) - too large to be useful.
How can I make the first behavior the default behavior? i.e. make my phone ignore external device's volume commands by default.
Phone is rooted Moto G6 with 8.0 stock

You can try to change setting 'Disable absolute volume' in Developer options, but it can affect other devices also.

@hank15 thanks, worked

@hank15 if u want to repost your comment as an answer, I will accept it


text:
On an Android phone, how to create a shortcut to read new Gmail emails with a specific tag?
On my Android phone, to be specific a Google Pixel 2 XL, where I use Gmail app to receive and read emails, I'd like to have a shortcut to read new emails tagged with a specific tag. How to do it?

On your home screen, long-press an empty space, then select widgets.
Look for "Gmail label". Add it to your screen. You might be prompted to select an account if you have multiple one.
Select the label, give it a name and click "Done".
A shortcut to emails with a particular label will be created on your home screen.


text:
Quick way to send a link to a Google Play store app via SMS
I feel like I'm not seeing something obvious.
I have several apps installed via the Google Play store on an Android device.  I want to send links via SMS to the appropriate Google Play store pages so the recipient can click on the links, have them open in the Google Play store app, and then decide if they want to install them.
This seems like obvious functionality, but I'm not seeing any way to do it in Android Nougat.
How can this be accomplished without installing a separate app for the task?

Might be related: Play store - share button missing

OK. I must be losing my mind.  Before writing the above question, I searched for a Share menuitem in the Google Play store.  I swear there was none.
Now, when I try the same thing, I see a Share menuitem that does exactly what I want: I can SMS a link for an app to someone else.
I can't explain why it wasn't displayed before.

Can you add a screenshot? I'm looking for that function and can't find it.

I came here for the same reason and it looks like you have to have the app installed before you can share a link to it. I hate modern UX.

I just tested by browsing random apps/games that I haven't installed and the share option is there.


text:
How do I know my Samsung S8+ Model SM-G955FD is Exynos and Snapdragon?
I want to root my S8+. I found two type of TWRP recovery file Exynos and Snapdragon for my SM-G955FD.I wanted to know which one is suitable for my mobile?

you can use a app (no root required) https://play.google.com/store/apps/details?id=ru.andr7e.deviceinfohw
UNIVERSAL8895=Exynos(dream2lte)
MSM8998=Snapdragon(dream2qlte)

The model number unambiguously determines the device's core configuration - if it says G955F(D) everywhere on the device (especially in Download Mode, which AFAIK can't be faked), then you can be sure that it's an Exynos variant.
Boot into Download Mode with the key combo VOL- + BIXBY + POWER, and you'll be greeted with a screen like below, where the model number will be shown after "PRODUCT NAME".

EDIT: For a more detailed breakdown of all S8+ models (full specs), check out this list from PhoneDB: Samsung Dream 2 ("Dream 2" is the development codename of S8+)

Why the downvote? Haven't I given an explicit answer based on what OP offered?

"unambiguously" is misleading

@alecxs Uhh... How so? I know that the ending letter doesn't concretely define the region/country, but at least the SoC and even supported bands are tied to it.

afaik the D just stands for dual-sim, but there is no official list for the letters. do you have a source for it? besides it might not be unique identifier (can far remember about GT-I9301i comes with sony or samsung camera)

@alecxs F = international, not necessarily Exynos for all devices but Exynos in S8's case. By "unambiguously" I mean where we know for sure that there are both Exynos and Snapdragon variants at play (which OP made clear), in which case F is always Exynos.

@alecxs And I did limit the discussion to "core configuration"...

@alecxs As for the source of my knowledge on the trailing letters, AFAIK Samsung doesn't offer an official explanation on this (I figure they'd rather you ignore the difference and fall into carriers' trap). If you think unofficial ones around the web are acceptable then I'll edit and add one, but then again I've posted answers regarding the trailing letters without citing sources and it never got frown upon, which is why I find it surprising this time.


text:
In Android Oreo 8.0, how do accessibility options interfere with enhanced data encryption?
In Android Oreo 8.0 many accessibility options such as Select to Speak, TalkBack, and Switch Access show a similar message:

If you turn on TalkBack your device won't use your screen lock to enhance data encryption.

Does this mean that the screen lock and/or data encryption will not work properly when choosing to turn on the chosen accessibility option, or does this mean that the way the screen lock enhances data encryption will no longer be active. How does the device use screen lock to enhance data encryption?
[Homescreen > Settings > Accessibility > TalkBack > On => message in question]

I guess the notice is misleading, it simply means that talkback by-pass your screen lock. On the other hand, there are two basic encryption option: 1) full encryption, phone does not boot 2) data encryption, phone boots without unlock (required for talkback working)

I tried it: one outcome was that the phone no longer required a password for starting up. This was against a certain device policy, so I had to turn it off again (and find out how to require the password again).


text:
SD card not appearing when formatted as internal
I'm a user of the Realme C2(android P). I've just formatted my SD card as the internal storage through Powershell since my manufacturer doesn't allow me to do it in the settings. It don't think it worked as now i do not see the SD card in the storage section. It seems to have completely disappeared.These are the commands that I used from this link:
adb shell sm list-disk
adb shell sm list-volumes all
adb shell sm set-force-adoptable true
adb shell sm partition disk:179,64 private
adb shell sm set-force-adoptable false
adb shell sm list-volumes all

I really have no idea if they even worked as I was told that the 4th command would take some time but, it didn't. I'll be more than happy to post screenshots or anything that is required for you to understand the problem. So if there is anything you can do to help me, please do so. This is my last resort.
EDIT:
This is what happened in the Powershell window:
PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb devices
List of devices attached
EUS4***ZPBTWAM79 device
PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm list-disks
disk:1*9:1*8
PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm list-volumes all
private mounted null
public:1*9:1*0 mounted 01*7-1*13
emulated mounted null

PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm set-force-adoptable true
PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm partition disk:1*9,1*8 private
PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm partition disk:1*9:1*8 private
PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm set-force-adoptable false
PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm list-volumes all
emulated:1*9,1*0 unmounted null
private:1*9,1*0 mounted c5ee2ab2-9**7-468e-8**6-c700ba9**283
private mounted null
emulated mounted null
PS C:\Users\Sa**vik\Downloads\platform-tools>

I'd put in * to keep it anonymous
I'm giving up for now. We'll see what happens in the future

Comments are not for extended discussion; this conversation has been moved to chat.

@alecxs the link you gave me doesn't work. I have an issue trying to modify my boot image. It says file image is unsupported

When you format your SD card as internal storage (aka adoptable-storage), it will be encrypted. The key for en/decryption is stored on the device only. Hence all that a PC can see is "there is a partition but I don't know what's on it": as it hasn't access to the key, it cannot decrypt the contents.
For further details, see e.g. our adoptable-storage tag-wiki and follow the links from there.

but that isn't the problem I'm facing! I just can't get the additional memory to show up in my storage settings

Could you then please update your question and say so? Even the title suggests you're talking about having formatted the entire card as internal and no wonder where it's gone, and neither does the text speak of "partitioning". Not sure if it's part of the commands used, but then only those familiar with them could spot it.

@Izzy when we talking about adoptable storage issues we should also mention the double encryption problem since Android 9 https://source.android.com/devices/storage/adoptable#fixing-double-encryption

@alecxs only if it's relevant to the problem (it is not here IMHO).

@Izzy Yes the card is gone when we look at the storage from my phone. I don't understand why you thought I was looking at my SD card from a PC. The only thing I used a computer for is to convert my SD card into adaptable storage. Plus I haven't mentioned anything about partition as I didn't to the best of my knowledge make any

If you didn't partition, then the entire card got converted to internal memory – and of course can no longer show up separately. So on-device, it should look like your internal storage has been enlarged, while the external SD card is gone (if I understood that correctly).

Try to plug the memory card into PC and see what is the file system of it. Default format for memory cards is FAT32. Sometimes file systems does gets changed and the changed file system is not compatible with the Android system. It happens a lot of times with USB drives.

I don't see anything under the file system. Windows thinks the SD card is corrupted

I dont think Android is uses EXT4 file system for external SD Cards. Instead Android Systems use exFAT or FAT32 for the SD cards.  https://www.all-things-android.com/content/understanding-android-file-hierarchy

Please note that when formatted as internal storage (aka [tag:adoptable-storage]), the card is encrypted and indeed not formatted FAT but, in most cases, EXT4.


text:
What are potential causes of internet malfunction?
I'm using Asus Zenfone Max Pro M2.
Running on android pie.
Phone is updated to latest firmware.
Few days ago I've changed sim card but problem still persist.
I can use internet with another sim card even with same network.
Sim tool kit is disappeared with sim I face problem, for other sim card it is appeared.
So what should I do to get rid of this?
Here is may you get cause of problem

I was facing same problem in my 3G phone so there also sim toolkit was disappeared.
And because of removing and insert sim in slot scratching sim card chip.
I insert this sim card in my new phone.
And I've started facing same problem.
So I had changed sim card but still facing same problem.
I had tried in both sim slot.  Tried other sim that was working fine.
Just notable difference is about sim toolkit.
For my sim card it is disappeared for other sim which is used in other phone is appearing.

Do I need to change my sim card as well as phone sim slot?

internet malfunctioning is a very broad term. There could be scores of types of such malfunctioning, and hundreds of possible causes. Be more precise. Internet works on Wi-Fi/SIM1/SIM2? Using SIM of a different network works? Mobile networks other than internet work fine? MNO frequencies are compatible with your phone? Did you try using mobile internet in different area? Did you configure Access Points properly? How do you find out if internet works or not? You installed some firewall or similar apps to control internet connectivity? You tried ping/dig? You get an IP from MNO? bla bla bla

Possible causes of SIM Card and Mobile Data related internet problems,

Incorrect Mobile Service Provider.
Dirty or Scratched SIM Terminals.
Misaligned SIM in SIM Slot, usually caused by cutting your own SIM Card into a Micro SIM.
Broken SIM Card.
Broken Device Aerial.
Incompatible SIM Slot ( Micro, Nano ).
Incompatible SIM Frequencies, usually caused by having an old 2G Sim card with newer 4G device's.
Mobile Phone Number Inspection, A possible DOS or Denial Of Service may be happening for a specific phone number only.

Without further information I am unable to answer you with regards to your specific problem,
Try additional information,
What was happening prior to the issue ? ..
Did you get a new device because of internet issues ( maybe it wasn't the device but the actual SIM Card is damaged )
Did it ever work at all, Can you Read SIM Contacts ( Therefore Connect to the SIM )


text:
Why is the bURLy app no longer visible in the Play Store?
Dan Hulme posted a (deleted) answer on How do I stop Play Store from randomly opening when I'm in other apps?, mentioning an app called bURLY.

I made an app bURLy which lets you control what your phone does when an app tries to open a web link, such as to a Play Store app page. Even when other apps (such as the Play Store app) can open the link directly, it lets you preview what link will open, and create rules. You can make a rule to automatically ignore links to apps on Google Play, except when you allow it first.

However, it is no longer visible on the Play Store. Why?

After a career change a few years ago I stopped updating these apps. When GDPR came in, Google required all app developers to update their apps' privacy policies to show GDPR compliance, even if the apps weren't collecting any personal data etc. Because I didn't update the apps' privacy policy, Google removed them from the Play Store. Because I wasn't logging into my developer account and keeping track, I didn't find out until months afterwards.
If I get around to it I might dig out the source code and publish it somewhere, so any interested party is able to update the apps and maybe to keep developing them.
Thanks for your interest! If people had been that interested at the time I might have been able to keep developing bURLy and other apps.


text:
Lost power because of an overheat
I have a redmi note 3 pro that has lost power after an overheat from a hot day in the car. I'd like to take part in reviving it back from the dead (if it's possible) because it was a great phone. I know how to open a phone and replace parts but don't know which parts to replace... I've bought a ribbon cable connecting the charging circuit with the motherboard, together with a new battery and a charging circuit. I've replaced them and it powered on, though it isn't charging. I'd like to know if there is something I missed in order to complete the "revival". If anyone has any suggestions for a better title and some more tags, they are welcome! Thanks in advance!

If you are lucky the battery is just dead. Does it power on when you try to charge it? For the battery have you tried to search on Youtube for redmi note 3 battery replace?

@Robert it does power on but it's not charging, so either there is something wrong with the motherboard or the charging circuit.


text:
Changing /data mount in fstab
I want to change the data mount point into an image inside the actual data partition.
My stock fstab has this:
/dev/block/bootdevice/by-name/userdata      /data        ext4   noatime,nosuid,nodev,barrier=0,noauto_da_alloc,discard  wait,check,encryptable=footer,quota

Would it work to do like this ?
/dev/block/bootdevice/by-name/userdata      /pre_data        ext4
/pre_data/media/0/data.img                  /data            ext4      noatime,nosuid,nodev,barrier=0,noauto_da_alloc,discard  wait,check,encryptable=footer,quota

No it won't work that way? There are multiple factors which matter. May I ask what do you want to achieve by doing so?

My phone has two slots for each partition (boot_a and boot_b, system_a and system_b, vendor_a and vendor_b...etc) except for userdata. This feature is only used for updates, but I want to exploit it to dualboot my device, but for that to work each slot needs to have a distinct data. So I thought maybe I could mount an image as /data in one of the two slots ?

If you want to go that far, then divide your userdata in two partitions.

I don't really want to mess up with my partition table. Some utilities (like DualBoot Patcher) make diverse mounts done from folders inside the actual data partition, but I couldn't find out what they exactly modify to do it


text:
How can I enable last_kmsg?
I'm trying to diagnose a random reboot on LineageOS 14. last_kmsg is not in /proc, nor it is in /sys/fs/pstore/console-ramoops.
EDIT:
~# mount | grep PSTORE
~# mkdir /mnt/pstore && mount pstore -t pstore /mnt/pstore && ls /mnt/pstore
mount: 'pstore'->'/mnt/pstore': No such device

Back in 2012, /proc/last_kmsg (1) used to be a dump of kernel console messages, exported after reboots by Android's ram_console functionality (CONFIG_ANDROID_RAM_CONSOLE), which used persistent_ram (CONFIG_ANDROID_PERSISTENT_RAM) to handle a block of RAM that wasn't erased across reboots (2).
persistent_ram was based on Linux upstream RAMOOPS code which logged panic and oops messages to RAM. RAMOOPS was deprecated in favor of PSTORE (3) (memory handling) and PSTORE_RAM (4) (logging panics/oops to pstore/dmesg-ramoops). Later PSTORE_CONSOLE support was added (5, 6) to log not only the panics/oops, but all kernel console messages to pstore/console-ramoops-N which can be read later by mounting pstore (7). So the Android specific RAM_CONSOLE (8, 9) and PERSISTENT_RAM (10) were utterly removed.
Now pstore also offers logging userspace messages (PSTORE_PMSG) (11) and other features (12). Plus it supports multiple backends for persistent storage if supported by hardware, though SoC's on Android devices only support RAM storage (ramoops driver, AFAIK).
So it's not possible to enable last_kmsg on an upstream kernel, instead pstore offers a more versatile functionality.

mount: 'pstore'->'/mnt/pstore': No such device

It shows that your kernel isn't built with pstore support. All you need to do is use a kernel built with CONFIG_PSTORE_CONSOLE and optionally CONFIG_PSTORE_RAM (though buggy). Android's init by-default mounts pstore at /sys/fs/pstore (13) from where dmesg-ramoops (on panics/oops only) and console-ramoops can be read.
You can search forums for a custom ROM shipped with such kernel. Or if you have kernel source, you can build yourself on a Linux machine.
NOTE: Some new devices, like Samsung, still expose /proc/last_kmsg interface; I'm not sure whether they use original implementation or pstore at back end.

FURTHER READING: Reading kernel logs

/sys/fs/pstore/console-ramoops is only accessible if rooted ?

I did eventually manage to set up some kind of chron job which wrote the log to a file every few seconds. I can't remember how sorry - it was more than two years ago.
The log didn't give me an answer, which I found puzzling. I wondered if the log was not being copied quick enough before the shutdown.
That might be an issue for some people, but I soon discovered the problem was very simple - the battery was faulty. This model (s5) has a removable battery, so I swapped it and the problem was gone. Do the simple things first.


text:
Notepad/text-editor encrypt on Android, decrypt on linux -- and vice-versa
I'm looking for an encrypted notepad or text editor for Android which encrypts files in a way that allows them to be decrypted under Linux.
I also want this to work in the opposite direction: encrypting a file under Linux and having it be decryptable under the same encrypted notepad or text editor under Android.
It's important to me that the encryption and decryption under Android get done with one, single step. I don't want to perform a manual pre-encryption or pre-decryption step under Android. I want to simply open the file via some sort of encryption-enabled app under Android, edit its contents using that same app, and then save it encrypted using that same app ... so that the file is also decryptable and re-encryptable under Linux.
I don't care if multiple steps are needed under Linux, because I can encapsulate those steps within a script on that operating system. Furthermore, I want the encryption/decryption under Linux to be performed using command-line tools, not via some sort of GUI-based application, because I plan to implement this Linux-based encryption and decryption within emacs. Therefore, I'm looking for the Android encryption to be done via some sort of standard encryption algorithms.
To be clear, I expect to have to use the same encryption/decryption password for these files both under Android and Linux.
I know how to transfer files between Android and Linux, and I'm not looking for help with that. This question simply has to do with the encryption/decryption.
Does anyone know if what I want to do is possible?
Thank you.

So actually you are searching for an encrypted text editor Android app, right? Please note that questions about app recommendations are considered off-topic.

Oh, OK. I'm Sorry

You can use shell scripts on Android too to avoid the hassle of multiple steps, like you can do on Linux. But that's not necessary. Give encfs a try. Luckily MiXplorer has both features built-in; encfs encryption and a simple text editor. But you have to encrypt/decrypt the directory containing your file(s). It's easily decryptable in a single step on Linux too.


text:
Logging off Viber account on my stolen phone
I lost my phone last Friday, May 31. I was able to get already a replacement SIM card for me to use the same no. again for my new phone now. My Facebook was already hacked yesterday since my FB app in my lost phone was open just like my emails and VIBER accounts.
With this, I would like to know how to log off Viber on all devices that I previously opened so my info will not be compromised.
My Viber is now open on my new phone and my laptop but I want it to log off in my lost phone and all other devices.
Is this possible just like Chrome, or Google, Yahoo, and even Facebook?

The fact that you are able to use Viber on your new phone means that it is logout of the former as explained here:

Lost or stolen phones
If you have lost your phone, or it has been stolen, you can deactivate Viber by simply reactivating your account with the same phone number on a new phone.
Setting up Viber on a new phone will close your account on the old device, and no one will be able to access the chats stored in there.

For other apps such as Facebook, Gmail, etc., change your passwords.

Activate it on a friends phone, then deactivate it on the same phone. It will deactivate your account on all phones and PCs.


text:
Why does my headset swallow the notification sounds?
I've used the Blueparrott B250-XT+ headset for many years now. I love this headset, and I found it after trying a bunch of other models. I have 4 of these now.
(My phone is a OnePlus 5T, OxygenOS version 9.0.5, Android version 9.)
I've been using it happily for years, but now there's a new problem when using it. All notification sounds, such as ringing in case I get a call, or message notifications, are being heard on the headset instead of on the phone's speaker.
I discovered this after a few days of frustration where I would miss phone calls and messages. I thought I was maybe on "Do not disturb" mode, but I wasn't. After some trial-and-error, I discovered that I don't hear the notifications only when the headset is connected, and that the notification is being heard in the headset, which isn't usually on my head.
In the Bluetooth configuration, the headset has "Phone calls" on but "Media audio" off.
Why is this happening and how do I fix it? I'm afraid to connect my headset right now because I don't want to miss calls and messages.

For me it is normal behavior. If Bluetooth hands-free profile is connected, ringing sounds and message notifications are heard in the headset, not from phone speaker. Similar to wired headsed. Not sure how the phone should behave in case when only hands-free SLC (control) connection is established, but if in-band ringing is supported, it should establish SCO (audio) connection on incoming ring anyway.

BTW do you have something like “Enable in-band ringing” or “Disable in-band ringing.” in the Developer Options? If such option is present, changing it can help.

@hank15 I looked for that now and didn't find it. Good thinking though.

Have no familiar OnePlus to check. Maybe they moved this option into Feature Flags?

@hank15 I checked the Feature Flags now, nothing useful there.


text:
How to run an executable on boot and keep it running?
I have an executable build from a ndk-build program. I want to run it on a rooted Android device. How much is the possibility that Android will kill my executable?
Using adb shell, I am able to execute my executable using following commands:
adb push executable /sdcard
adb shell
device:/ $ su
device:/ # cd /system
device:/system # mount -o rw,remount /system
device:/system # mv /sdcard/executable .
device:/system # ./executable

My requirement is to run this executable on device boot.
I have tried following:

Write ./executable in init.rc.

On reboot init.rc reset to its original contents. I figured out that Magisk done this.

Write commands in /system/etc/init/bootstat.rc

./executable
service custom /system/executable
on boot
./system/dhandler/diag_revealer

None of the above thing is working.

Comments are not for extended discussion; this conversation has been moved to chat.

How much is the possibility that Android will kill my executable?

Privileged native processes usually don't get killed by Android except if they can't handle an error occurred inside, such as some system resource not available or permission denied because of SELinux etc. To free up memory, Android only kills processes within its framework i.e. running under zygote. To manage resources for native processes, Android uses cgroups.
Processes are killed when they receive SIGNALS from kernel or other userspace programs (e.g. with kill command) (1, 2). Kernel is the actual operating system, not visible to us but handling everything we do with device. A developer can program his code how to react to a specific signal if received, or completely ignore it (3). Except SIGKILL. Which can't be handled by program, no warning from kernel, no grace period to exit safely, just being terminated immediately. But kernel won't mind your presence unless he gets short on hardware resources or you start misbehaving. That's why programming is important.
Programs can send each other signals (including KILL), which are forwarded by kernel, governed by UID (4). However, init the very first process in userspace started by kernel is the dear one, kernel never forwards dangerous signals to init. And if this happens for some reason, kernel gets panic and reboots (5).
Summarizing above lines, it is possible to avoid being killed (AMAP) programmatically or using some scripting tricks as @alecxs has mentioned. But if you want to make sure that your process should restart if gets killed, define an Android init service.

On reboot init.rc reset to its original contents. I figured out that Magisk done this.

No, Magisk didn't do this. Android's rootfs is a temporary filesystem (not a persistent one like on /system or /data) that gets cleared on every reboot. Contents of root directory (/) are extracted from another partition named boot which contains kernel and ramdisk (though things have changed with system-as-root). So you can't change init.rc permanently unless you extract, modify, repack and reflash boot.img.
But to define a new init service, modifying init.rc isn't necessary. Android parses all .rc files from /etc/init directories located under /system and /vendor (6). So you can create your own .rc file.

NOTE: In order to get real root privileges and to deal with SELinux, all of the options given below depend on Magisk. See this answer for details.
INIT.D SCRIPT
You can use traditional init.d-like feature of Magisk to start a process on boot. Create script /data/adb/service.d/custom.sh:
#!/system/bin/sh

# write log file if executable throws something at stdout/sterr
exec >>/data/media/0/executable.log 2>&1

# run script in background to avoid blocking boot chain
[ -n "$BG" ] || { BG=Y "$0" & exit; }

# try to ignore signals as much as possible
for i in $(seq 64); do trap '' "$i"; done

# execute script whenever exits e.g. when executable gets killed
trap "sleep 5; exec $0" EXIT

# avoid multiple instances e.g. if script killed but executable is running
pkill -9 -x /system/bin/executable

# execute the binary, should run in foreground, otherwise get in loop
echo "$(date): Starting program..."
/system/bin/executable

# program is killed, won't reach here if script is killed
echo "$(date): Re-executing script..."

* EXIT is shell's pseudo-signal.
* Android's /system/bin/pkill (from toybox) is buggy, better use busybox applet.
Place the executable under /system/bin and set permissions:
~# chown 0.0 /system/bin/executable /data/adb/service.d/custom.sh
~# chmod 0755 /system/bin/executable /data/adb/service.d/custom.sh

You can also place script under /data/adb/post-fs-data.d/ but that's executed a bit earlier. Be sure that filesystem paths (and other required resources if any) are available at that stage.
EXECUTE PROGRAM FROM INIT
Another way is to directly execute the binary from init. Create custom.rc file:
#/etc/init/custom.rc

# execute the binary when boot is completed
on property:sys.boot_completed=1
    exec_background u:r:magisk:s0 -- /system/bin/executable

Set permissions:
~# chown 0.0 /etc/init/custom.rc
~# chmod 0644 /etc/init/custom.rc
~# chcon u:object_r:system_file:s0 /etc/init/custom.rc

And that's all! Restart device for changes to take effect.
However it's a one time execution, won't be restarted. Also there are some shell scripting features not available in .rc files. For instance you can't redirect stdout/stderr to a file, this has to be handled by executable program itself. So we can try to make use of both; shell script and .rc file:
INIT SERVICE
Instead of directly executing binary from .rc file, execute a shell script. Create script /system/bin/custom.sh:
#!/system/bin/sh

# write log file if executable throws something at stdout/sterr
exec >>/data/media/0/executable.log 2>&1

# execute the binary, should run in foreground, otherwise get in loop
echo "$(date): Starting program..."
exec /system/bin/executable

Create init service:
#/etc/init/custom.rc

# define service, use executable here if script not needed
service custom /system/bin/custom.sh

    # don't start unless explicitly asked to
    disabled

    # only execute once, don't restart if exited
    # don't add if you want to restart service when killed
    #oneshot

    # run with unrestricted SELinux context to avoid avc denials
    # it's required if SELinux is enforcing and service needs access
    # to some system resources not allowed by default sepolicy
    seclabel u:r:magisk:s0

# start the service when boot is completed
on property:sys.boot_completed=1
    start custom

Set permissions on executable, custom.sh and custom.rc as stated above and restart.
Other parameters (7) such as user, group, capabilities are required if you want to run the service as non-privileged user. Granting least required privileges is the recommended approach from security's perspective. See this answer for more details on capabilities and SELinux.
init will keep on restarting service every 5 seconds (by-default) if it gets killed. You can stop the service with setprop ctl.stop custom. Replace stop with start to start again.
To see what happens with service: dmesg | grep init: | tail.
RELATED:

How to run an Android init service with superuser SELinux context?
How to run a script in background from adb shell?

A script in /data/adb/service.d would be great, but for some reason these scripts don't seem to run with root privilege: using mount ... gives me "mount: Permission denied" and using su -c "mount ..." gives me "su: Permission denied". Anything I'm missing?

/system/etc/ is read only and /data/adb/service.d doesn't seem to start on reboot so I believe we can safely say that this answer is no longer valid. a23xq:/ # echo  hello > /system/etc/init/custom.rc                                                                                /system/bin/sh: can't create /system/etc/init/custom.rc: Read-only file system

@Mihai correct. If you do not know how to make /system/etc/ writable and do not know about Magisk's Boot Scripts, then this answer is certainly invalid for you :) Probably you skipped the NOTE: statement.

I tried the custom.rc part, and I couldn't get it make to work.


text:
File copy from external sdcard fails sometimes
I recently bought an sd card reader that can be connected via USB-C to a phone.
My phone recognized the SDCard inside that card reader and I can copy files - usually. However, it seems like when I try to copy more than 5 files it will definetly fail and I have to remove the reader, wait a few seconds and connect it again and try again.
I tried two filebrowsers. One came pre-installed with my phone ('Files') and Cx Fileexplorer. The latter seems to have less chance of failing but it will still fail eventually.
Neither of them will give me a proper error message aside from the list of files it couldn't copy.
The copied files were .jpg(5mb on average) and .CR2 ( Canon RAW files which are 22mb on average in size in my case).
Smartphone: Moto Z play, android 8.0.0 stock, not rooted. The SD card is 32 GB in size while my internal microSD is 64gb in size with 40gb free space.
Question would be: How to fix this?

Does the reader using the same card work without problems on a PC?

@Robert unknown as the usb-c cable is not detachable. I also haven't tried it on a different smartphone.

An SD-card reader with fixed USB-C cable? Can you please edit your question and add the details on the reader (brand, model)? Anyway PCs have USB-C ports, too. I strongly recommend you to test the reader somewhere else and try to use different SD-cards.

@Robert as I'm currently unable to test the reader on something else I tried a different card - same result - and another file explorer - Total Commander - which seems to work. I copied 200 files at 2.6 GB which worked without issues.

@Robert so, I copied files from the SD card via a SD Card reader connected to my computer which worked fine. I also tried a different SD Card with the reader connected to my phone, which resulted in the same problems: The default explorer and the Cx Fileexplorer abort after 4 to 8 files each time, while Total Commander works fine.

@Robert just as a follow up: I have tried the card and reader with different smartphones from friends (Android 8 and 8.1) and it worked flawlessly on each of  them. Meanwhile on my device it is no longer being recognized at all. As in the phone doesn't event recognize anymore that the reader was connected to the USB-C port.


text:
Change language in Google Maps app
I would like to have mobile Google Maps' content on my Moto Z2 Play in different language (Polish) than rest of the system (English). Is this possible? If yes, then how to achieve this?
Based on my research and previous tries, I managed to:

change language of audio guidance in mobile Google Maps to Polish,
change content in desktop / PC version of Google Maps to Polish (even though my Windows 10 and Google Chrome runs in English).

However, I can't / don't know how to change content's language in mobile Google Maps.
Edit: An answer suggested by Robert is out of option in this particular case, because it requires device to be rooted. I don't have an ability to root the device for which I want Google Maps to run in a different langauge than the rest of the Android system.

In the end I assume the answer is identical to this question: https://android.stackexchange.com/questions/29124/change-language-for-one-application-google-now-voice-recognition-root-availabl

Can you define contents in this case? Is it the streets' names or Google maps' interface? Or something else?

Everything that can be localized in the whole Google Maps application. Starting from maps and their content (street names, cities etc.) ending up in user interface. In particular I am looking for something as obvious as most applications have -- meaning to be able to select in-app language. In case of most of applications it can be different than the system language. In case of Google Maps, Google again knows better and always offers Google Maps in system-default language only.


text:
Reassign Bixby button on rooted S10
I never use Bixby on my rooted Galaxy S10e, so I would like to repurpose the Bixby button, for instance as camera shutter or to open an app of my choice.
Question: How to do that?
Note: I tried following https://www.theverge.com/2019/3/1/18246255/how-to-re-program-bixby-button-samsung-galaxy-s8-s9-s10-8-note-9 but at the first step, which is to open Bixby, I am told:

Bixby Voice isn't available in your country.

From Settings > Advanced features > Bixby key:

The Bixby key setting isn't available yet. Sign in to Bixby to start using the Bixby key.

Does useing a VPN work?

@helper: I just tried with a USA VPN server, it also says "Bixby Voice isn't available in your country".


text:
Is there a way to activate NFC during initial phone setup?
My mdm (Ivanti/Landesk) requires to deploy an APK through NFC during the initial phone setup (and only during this setup, where you need to set the langage, time zone, google account, etc.) .
This is part of the Android Entreprise Device Owner Mode process. ( Some mdm can follow this process with QR codes or afw#codes but mine don't .. )
The thing is the NFC card seems disabled by default at first boot (or after a factory reset), and I can't find a way to either enable it from top quick acess bar or settings pages.
Is there an hidden way to enable some settings at this intial step ?
I'm using Altice S61 in my tests, but I think this may apply to other devices as this is during the android standard setup wizard. ( Android version 8.1 )
Thanks in advance !
Regards

NFC is a low-speed network with AFAIK max 53KB/sec (424kbit/sec) - are you sure you want to transfer an APK file of several MB using this connection?

Hello, technically this is not an APK transfer, NFC just pass a link to an APK to download for the device to provision.
This is described here : https://developers.google.com/android/work/play/emm-api/prov-devices#nfc_method


text:
Recovering Files from Broken Screen Nexus 5x
I have a Nexus 5x that has an unresponsive and broken display (screen displays colored lines and doesn't respond to any touches) that I am trying to get files off of.  I can't seem to get my computer to recognize it, presumably because you need the phone to be unlocked, but i cant get through the lock screen without touching the display.  Is there any way to unlock my screen through recovery mode or something without wiping it?
Thanks!

Do you think the device boots up normally (e.g. does the phone show up in a Wifi if Wifi is enabled?)? Is the device locked via pattern/PIN/password? Have you tried to connect an USB keyboard via USB-OTG adapter?

It does boot up normally, I just can't interact with it, and yes its a PIN.  I have not tried a keyboard, do you think I could enter a pin with that?

I never tried it, but AFAIK it should work at least on some devices. Before entering the PIN press SPACE and in the end press RETURN. Theoretically it should be even possible to navigate blind through Android using keyboard shortcuts.

check if adb is working from adb devices (maybe you previously left USB-debugging enabled), and check if bootloader is maybe already unlocked from fastboot oem device-info (after starting into bootloader with Vol down + Power) just to gather options. at least you can get a second Nexus 5x, get two USB-OTG adapters,  tape together two mouses each connected to one phone, set the same pin, and unlock both in parallel with both mouses. Then enable USB-debugging (still "blind"), and then you finally can use scrcpy to cast the screen to PC

the solution from @Robert seems to be the best. buy a "Micro USB OTG Charge HUB", connect keyboard and use earphones to check key feedback. Post your Android Version. Then SOMEBODY with Nexus 5x please post the proper key sequence https://talk.sonymobile.com/t5/Xperia-Z3-Compact/Enabling-USB-debugging-with-OTG-keyboard-without-seeing-the/m-p/1301419#M27733 to enable Developer settings and USB-debugging here?

also key sequence for accepting the RSA key fingerprint is required https://www.howtogeek.com/129728/how-to-access-the-developer-options-menu-and-enable-usb-debugging-on-android-4.2 before you can use scrcpy https://www.xda-developers.com/scrcpy-control-android-on-pc


text:
Movable apps restricted to be moved to SD card by manufacturer
I'm a user of the RealmeC2 and really want to move an app to the sd card.The creator of the app allows it to be moved but my phone's manufacturer does not. Is there any software that can send these apps to the sd card? I'm talking about those apps where we are supposed to enable usb debugging and let them do their thing? Even powershell commands will work.Please help me! This is a new device and i really don't want to root this just because i wanted to send an app to the sd card.

please add screenshots of the missing change storage button in app settings storage, and the missing migrate data button in adoptable storage settings, to clarify for others (equivalents of https://www.jimcofer.com/personal/wp-content/uploads/2016/03/Screenshot_2016-03-09-10-52-26.png and https://www.jimcofer.com/personal/wp-content/uploads/2016/03/Screenshot_2016-03-09-10-50-00.png according to your ROM)

@alecxs updated my post!

wait some days i guess you're on the right way (trigger the missing "migrate data" button from adb shell commands)

i didn't get it to work, but it must be something like adb am start -n com.android.settings/com.android.settings.deviceinfo.StorageWizardMigrateProgress

@alecxs i'm kinda in a rush to get this done! Either this or the root. Did i tell you about a problem i faced by the link you gave me? The bootimage doesn't want to get modified for some reason. It says image is unrecognized

It is a very new device, i guess you can not root at the moment. open a new question about how to decrypt Oppo boot.img and patch with Magisk https://bkerler.github.io/reversing/2019/04/24/the-game-begins

@alecxs by the way, i've used a micro sd  HC1 class 4 from sandisk! Do you think i'll have better luck if i try using a faster card??

@alecxs and also, i don't think it will ever be possible to root this device as this is an entry smartphone(Really cheap)

here comes the root solution https://forum.xda-developers.com/android/software/guide-root-realme-c2-unlock-bootloader-t3970447


text:
Fingerprint Scanner Problem with Samsung C5
I have bought Samsung C5 recently. The mobile phone is very nice and slim to work with. But yesterday I was trying to configure my finger print on it for biometric security. I tried repeatedly on it but it is not scanning my thumb? Can anyone please help me regarding this?

The solution to this problem is really simple. This model comes with a front end fingerprint scanner that doesn`t cover up the area of your thumb. So while scanning for biometric registration, you have to slide your thumb from top to bottom to get it done rightly. As a tip, try to clean your thumb before biometric registration.

that solved the problem. thanks mate


text:
How to back up app data from system applications? (e.g. YouTube search history)
In 2018, YouTube triggered their kill switch / time bomb for older versions of their Android application.
Their more recent versions of their app limits the search history to 50 items, which means that after updating, the entire unlimited search history of 1000+ items will be erased except for the last 50 searches. Trivia: Capital letters get set to small letters.
The device is a few years old already and the bootloader was not unlocked right after purchase. Remember: Always unlock bootloader after purchasing the device. Otherways: regret. That bootloader has been a headache to me repeatedly.
It is possible to back up some apps using ADB, but YouTube is a system app.
How can I back up the app data of Android system apps despite locked bootloader?
If there is a way to bypass the w*** (**pe) during bootloader unlock without losing data, that would be good.
My goal is to rescue the search history that got trapped in the older version of the YouTube app due to Google's time bomb that made the app inaccessible.
It is not that important, but if there is any possible way I could rescue that search history, that would be appreciated. Otherways, I would just move on, but I would like to give it a try.

All youtube search history is stored on your Google account, the newer versions of the app might show only the last 50 entries, but every single search you've made is in your account's data except if you've opted out of it in the privacy settings.

@NickDeltaIn the beginning, I was not logged in. These searches are only saved in this trapped, timebombed YouTube app.


text:
How to save YouTube downloaded video to phone gallery
I have downloaded a youtube video in my youtube app and I want to save this video to my phone gallery. What steps should I have to follow to do this?

Do you mean using Youtube Premium? I am pretty sure you can only watch it through the Youtube app and it won't show in the gallery, it has DRM which prevents it from being played outside of the Youtube app. If you are doing this some other way, please provide more details on how you are downloading it, etc.

Use NewPipe.

I'm closing this as a dupe of "download YouTube video" because the only way to get it into phone gallery is by not downloading from YouTube app due to DRM protection.

You can use Y2mate for this purpose. All you need to do is to open the web site and paste video url in it. Rest will be done automatically.
https://y2mate.com/

I'm using Termux and youtube-dl python script. Here you have steps to install required software.

Install Termux https://play.google.com/store/apps/details?id=com.termux
Run Termux and paste following commands:

apt update
apt install python
pip install youtube-dl
Now you can download movies from YT
youtube-dl <link to YouTube movie>
But this is not comfortable way. Here are more steps to make it more user friendly.

Create dir in home:

mkdir ~/bin

Create file with your favorite editor. My is vim so I used it

vim ~/bin/termux-url-opener

Paste following content:

youtube-dl $1
and save file.

Make file executable:

chmod 700 ~/bin/termux-url-opener

Make Termux internal storage accessible.

termux-setup-storage
Accept access for Termux to internal storage

Create config file for youtube-dl:

mkdir -p ~/.config/youtube-dl
vim ~/.config/youtube-dl/config

Paste following config:

-o /data/data/com.termux/files/home/storage/movies/%(uploader)s-%(title)s.%(ext)s
Now if you want to save movie from YT simply open YouTube app, find movie, tap Share and choose Termux.

Movie will be saved in Movies directory in internal storage.

YouTube gives you an option to download Videos to Watch them Offline later. These videos get saved in encrypted ‘.exo’ format that can only be opened with YouTube App.
So, If you want to use it with Other Media Player, you have to download it on your Android Device. Get the best way to do it, Below:
Step 1: First Download & Install: TubeMate YouTube Downloader App on your Android Device from here
Step 2: Launch TubeMate App &. Tap on ‘3 Horizontal Bar’ icon from Top Left Corner and Go with ‘Youtube’.
Step 3: Now search for any video on YouTube that you want to download.
Step 4: Once you run any video, you can download that video by simply ‘Tapping’ on ‘Green Download Icon’ from the Top.
To Get Full Pictorial Guide: Check Out Here NOW… here
Step 5: It will give you the option to download that video in different quality. Select the desired Quality and Tap on ‘Green Download icon’ from the bottom.
Note: Google considers that downloading YouTube Videos without authors permission is illegal. That’s why All YouTube Videos Downloading App has been removed from Google Play Store. Use TubeMate YouTube Downloader App to save a copy only for backup.

TubeMate uses 6 ad services and 2 analytics services. It asks for 16 Android permissions including location and 4 Google services permissions. Reads identifiers for analytics and tracking. NewPipe has 0 ad services, 0 analytics and asks for 7 necessary Android permissions in total.

You can do it by copying the **video link ** and copy that link on
**savefrom.net ** site.
You will be able to do it successfully


text:
Why is Bluetooth tethering disabled in a lot of Android devices?
What is the current state of Bluetooth tethering on Android devices? I have a couple of phones Android 5 and Android 6 that I can use from PCs for Bluetooth tethering. Both phones have support for WiFi tethering also.
As far as I can tell there are two ways of tethering from the PC. One is to use the old RFCOMM interface where a PPP channel over a Bluetooth serial link is created, where AT commands are sent and where the PC needs to know the APN of the carrier that is in the phone. The IP address is assigned to the tethered device and the phone cannot use that some connection. I have tried this with both phones and this works from the PCs. That was early 90's to 00's technology. I usually use the packet based Ethernet emulation (bnep) and access the Network Access Protocol/Protocol that runs over bnep. The NAP runs over PANU and has and ID of 0x1116. This creates a packet interface of IP packets with and address provided by the phone (with network access) and this is somehow used (using perhaps NAT as in the WiFi case) over the route-able Internet and both devices can use this channel.
I have a couple of tablets that I can successfully tether using WiFi. But I cannot get tethering using Bluetooth NAP. I have searched far and wide and it seems that the only solution for Android is to run an app that creates two new PANU profiles over which a VPN connection is made (because VPNs can be created without root).
Is my understanding correct? If so why is it that Fire/Nexus/Other tablets disable Bluetooth tethering?

Because some Android phones/tablets ECT sometimes needs a better Wi-Fi connection if that isn't the case then the Android is either not picking up the signal or...
Your Android s not compatible with that Bluetooth


text:
This app promises to run "fstrim" without root but I am not sure if it works
I am not sure if this app works. Can someone please help me? My phone is new and in its warranty period so I can't root it yet. I tried this app but I am not sure if it actually did something. Unlike the other famous app on the PlayStore for fstrim, it doesn't require root access which is quite incredible.

AFAIK, only apps running as root (UID 0) (1) or system (UID 1000) (2) or with android.permission.MOUNT_UNMOUNT_FILESYSTEMS (3) can do fstrim. But third party apps can neither get UID 0/1000 (without rooting phone), nor the said permission is for third party apps (4).
Also manually sending FITRIM ioctl with fstrim command requires at least capability SYS_ADMIN (5), which is almost root if not full root.
The app you have mentioned asks for permissions CLEAR_APP_CACHE (delete all apps cache data) and KILL_BACKGROUND_PROCESSES (close other apps). So it's quite evident what it must be doing to give a feel of lag-free experience.
PS: You don't need to run fstrim manually in most cases, OS can handle this. See this answer.

I highly doubt it. I use an app called Trimmer which requires root to trim /cache, /data, /system. I installed this app & ran only selecting cache, but it shower trimeed cache & data. I ran a logcat, did not catch anything. So most probably it is a snake oil or at best it clears your cache.


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:
Flashing stock LG firmware in GNU/Linux?
I'm looking for a way to flash stock LG firmware for the LG M700DSK (Q6) in GNU/Linux.
I have tried running LG UP though Wine though it doesn't seem to open the installer for LG 8998 USB DLL. The LG UP installation itself went well. Is there anyway to flash these *.KDZ in Linux environment?


text:
Moving unmovable apps to SD Card
My target was to get enough space on my Tecno Camon CA7 running Android 8.1 and get it a 32 GB SD card but only to find out that some applications cannot allow me to transfer them to SD Card. This sounds like the legitimate law of some apps developer suggestions.

Does this mean that after rooting my device I can have access to transferring every app with storage suggestions?

https://play.google.com/store/apps/details?id=com.gmail.heagoo.sdcardmovable
open the app,
goto "only ROM" tab,
press and hold the app,
tap "make it movable",
"uninstall" (the original app),
"install" (the patched apk),
then check again from your app settings if the "change" (storage) button appears.
Note: the app will no be longer updated from Playstore. You lose all app data on uninstall

After installing it, it ends up only deleting my existing app and cannot re-instal the patched apk

check for android settings - security - unkown sources (this will allow installing apk)


text:
Samsung tablet locked with power on
my daughter has forgotten the password for her tablet. Not an issue if the device was off but it is on. Any suggestions?

whats the matter of "with power on" (what exactly is your question targeting)? Do you want to know how to switch off? Or do you asking for hacking the password?

Resetting the device will do the job. But you'll lose all your data. There's also a risk of google account authentication requirement on reboot after you format in certain devices involved so continue at your own risk.
Here's how to do it:

Press and hold the power button for 8 seconds, and the device will power off automatically.
Reboot the device by pressing and holding Volume down + Power button at the same time
Now, you can format your device from the recovery mode. Navigate with the volume keys and choose wipe data/factory reset. Press the power button to confirm.
Your device will reboot after formatting just like a new device and logging in back to your Google account will restore most of the data if you had backed up before.

Is not correct, it is not "just like a new device" This will trigger FRP lock on modern Samsung devices. You should clearly WARN that the previous used google account is still bonded to the device, and without knowing the google account and password, the device becomes unusable

I did it on my mom's new Samsung J8 infinity (android pie v9.something, approx 1 month ago) after she forgot her pin, and it worked just fine. No google authentication was required, even though she had her google account in the phone before. So not all modern Samsung devices for sure have this much security.

the Samsung J8 definitely has FRP (i guess the only possible reason can be, there was no google account bonded at time of reset) regardless please add a warning, i cannot technically revoke my downvote until you edit your answer

There were google accounts in the J8, infact there was two, one being work and other personal. Anyways as you've said it,I made the edit. After all the person hasn't mentioned the device model so no guarantees ig.

then someone must have already OEM unlock allowed in developer settings (previous owner?)


text:
How to get SD-card write access on Honor 6x with Android 7.0?
My phone is a Huawei Honor 6x, using Android 7.0 (Nougat). EMUI version 5.04.
I want my music apps to have write access to my music folders on my external micro SD-card. I understand that this might only be possible if all my apps have access to all my folders on the card.
I would prefer to do this without rooting my phone, but if that is not possible, then please recommend alternate methods.
What I've already done:
Install Fx File Explorer on my phone, but this only creates write permissions for itself, not for other apps. That seems plausible of course, but that was not as I was told.
Questions:

How do I get write access to folders on my external micro SD-card, without rooting?
If it is not possible to get access without rooting, what is the best method to root for my type of phone and OS?
Can I root my  my type of phone and OS without or with unlocking the bootloader?
Is formatting the SD card as internal storage a better option? Or do I need to root my phone to do that anyway?

Can you create or delete files/folders using Fx File Explorer on the sd-card? You know that every app has to request write permission on the sd-card on it's own. This process is very cryptic and usually not well explained as it opens the built-in file explorer and you have to perform certain actions: https://metactrl.com/docs/sdcard-on-lollipop/

yes i can do that


text:
Apps suddenly stopped starting automatically when my phone boots
I have two apps that I expect to start when I boot my phone: AccuBattery and Weatherbug. A few months ago though, Weatherbug stopped starting automatically, and AccuBattery stopped a couple days ago. I've been needing to remember to manually start them when I boot my phone, which is a pain.
Neither app lists such a change in functionality in their changelogs, and I haven't done a firmware update that would change how Android functions.
Does anyone know why these apps stopped starting automatically?
Note 8, Android 9

It turns out Android decided to "optimize" the apps for some reason, which apparently had the effect of preventing them from starting automatically.
To fix this,

Go into Settings
Search for "Optimize" (click the magnifying glass in the top right)
Click "Optimize battery usage", then click the option again in the menu that comes up
In the drop-down at the top, click "All"
Find your app(s) in the list, and deselect the toggle to the right of it.

The app(s) should now start properly when your phone starts.


text:
If I reset my phone, will it also TRIM the fragmented eMMC?
I know that Android supports fstrim but it only works if the phone is idle for a long time while charging. I think my phone is too fragmented and is lacking performance so I want to reset it but I am not sure if TRIM will also run if I do so. Since TRIM is important to improve the SSD's speed, I'd really like to run TRIM on my phone.

If you phone is "lacking performance" in 99.99999% of all cases the fragmentation of the flash memory is not the problem. On flash memory the effect of fragmentation on the performance is next to non-existent.

Oh I didn't know that. But will resetting run Trim though?

Most likely, yes.

Android supports fstrim but it only works if the phone is idle for a long time while charging

It's not so. On newer versions, Android runs fstrim with a daily schedule, provided that the conditions meet. Or it should run on a reboot if not run for 3+ days. See this answer for details and how you can run fstrim manually.
FRAGMENTATION ON FLASH MEMORY:

I think my phone is too fragmented and is lacking performance

No, fragmentation doesn't exist on flash memory, or at least doesn't affect the performance. It's actually the filesystem which gets fragmentation (that's why newly formatted filesystem has 0% fragmentation), transferring the same to underlying physical storage. However underlying medium handle it differently.
Let's first take a brief insight into filesystem vs. storage media relationship. Filesystem interacts with Logical Block Addresses (LBAs), which are just numbers representing a unit of memory. Filesystem to LBAs mapping is irrespective of whether underlying media is HDD or SSD.
On HDDs, LBAs to Cylinder-Head-Sectors (CHS; rotating magnetic disks) mapping (1:1 / sequenced / linear) (1) is created during low-level formatting of disk drive when manufacturing, which never changes except if some sector is marked bad by disk controller firmware (in g-list from disk's defects table) and remapped to some spare sector. OS may also mark sectors bad in filesystem to exclude them for future use, as CHKDSK does on Windows during full format and e2fsck/badblocks do on Linux. So Operating system is aware of the physical geometry of the disk, which is propotional to the geometry of LBAs.
On flash memory (including SSDs, eMMCs, SD Cards and USB sticks etc.), LBAs to Physical Block Addresses (PBAs; silicon cells) mapping is fully controlled by Flash Translation Layer (FTL); a part of memory controller firmware. OS knows nothing about it, it can see at maximum the LBAs, not what's happening below it, not even the ECC of failed memory cells (just like bad sectors on HDD), and that's why we don't realize the bad health of eMMC unless it fails. Since a page of memory can't be just overwritten unlike HDDs, it has to be Erased first before being Programmed (written). A side effect is that a number of pages are erased/re-written and the physical mapping changes even if a small file is edited. On HDDs, files aren't physically replaced unless shortened or elongated. OS is aware of these physical changes on HDD, but not on flash memory.
So on HDDs, OS is aware of the physical fragmentation which is same as filesystem (LBAs) fragmentation, and defragmentation (as done by Windows regularly) occurs at physical level. But on flash memory, you can't simply do defragmentation in actual, rather good flash memory controllers do fragmentation purposely as a wear-leveling strategy. OS has no control over the actual fragmentation at physical level (unless you have some advanced tools to communicate with flash controller). However OS is aware of the fragmentation within filesystem. But if you defragment the filesystem, it won't defragment the flash memory.
Also as @Robert mentioned in comment, there is no effect of physical fragmentation on the performance of flash memory at all because there are no mechanical components in flash memory i.e. no seek latency because of head moving over different tracks as in HDDs. Filesystem fragmentation - as some experts think - may have somewhat impact due to increased number of I/O requests OS has to make to read/write scattered data.

Summarizing the above lines:

On HDDs it's the OS/filesystem which controls where the data is actually saved on physical memory, so it can de-fragment it.
On flash storage media, OS/filesystem doesn't know where the data is actually saved on physical memory, so it can't de-fragment it.

Since TRIM is important to improve the SSD's speed, I'd really like to run TRIM on my phone

When an OS asks a filesystem to send TRIM to eMMC, it actually requests flash memory controller to do Garbage Collection - Erase the PBAs which map to LBAs which belong to deleted files. So the eMMC controller maps those LBAs to already/newly Erased blocks (PBAs). This won't do defragmentation. See above mentioned answer to know how often fstrim should be run.
DOES FACTORY RESET DOES TRIM?

 I want to reset it but I am not sure if TRIM will also run if I do so

Factory reset on Android devices format /data and /cache (2) partitions. So the question is whether formatting is accompanied by TRIM or not.
Well this can't be standardized. Formatting and TRIM are different things, so it depends on the formatting utility whether it sends TRIM command to eMMC or not. Formatting may involve partitioning but in most cases (particularly on Android) it's just the high-level formatting i.e. to  create data structures (e.g. superblocks, file tables, directories, inode/block bitmaps, journals etc.) used by the OS to identify the partition's contents.
If we go through the lines in source code of stock recovery which handles formatting of partitions during factory reset, we see no notion of TRIM it does wipe_block_device (3) which calls BLKDISCARD or BLKSECDISCARD provided that they are supported (4). Both ioctls are essentially TRIM on block device level (not on filesystem level). fstrim is only run by vold inside the main Android OS. Additionally one of the tools used for creating filesystem mke2fs_static does try to discard device before fs creation (5), but not the other tool e2fsdroid_static. So there are chances eMMC will be sent a TRIM/discard request during factory reset, but be aware of the past: Android phones don't completely wipe data when their factory reset option is run.

Thanks a lot. This was a highly appreciated answer. It pretty much answers everything with no room for confusion. Thank you.


text:
Media recovery and rooting my phone
I have an LG G6 (LG-H870) with android oreo 8.0.0, kernel version 3.18.71
I want to root in mainly to recover a couple videos I've deleted.
If there is a way to recover the videos without root that would be great, if not then I need some help rooting my device because I've never done it before.
The videos I've deleted were locked and I have "permanantly deleted" them as they don't go in the trash.
I've found this : https://forum.xda-developers.com/lg-g6/development/tool-tool-one-driversunlocktwrpfactory-t3674088
Also, I know that rooting my phone voids my warranty so I was wondering if there was a way to unroot my phone in order to get back my warranty after I'm done recovering my videos/photos?
Basically...
Is there a way to recover deleted videos/images without rooting my device and if not then how do I safely root it?

you can't root without data loss, because unlocking the bootloader will factory reset. there might be a small chance to root without unlocking via rooting app. But your phone is encrypted, it is hard to recover deleted files. However, you can try to get a copy of your phone with QPST+HDDRawCopy and see if userdata is already decrypted (only then you can run tools like photorec on the disk image) https://forum.xda-developers.com/general/rooting-roms/how-to-backup-qualcomm-phone-root-t3570178


text:
Is there a way to set a global http/https proxy on Android 8 either with root or no root?
I am interested in setting up a global proxy on a rooted android 8.1.0 device. Is there a way to configure a system-wide proxy?
I have already tried a couple of apps to achieve this but have not had success.
shadowsocks - can't remove encryption and password setting. The password can be set blank but still does not seem to work as a plain proxy setup.
Proxy manager - doesn't allow you to set proxy host/ports manually. Only seems to support preset proxies
Drony - can't click on settings tab. I can only press turn on/off
ProxyDroid - keeps crashing. Does not run.
postern - insists on having an encryption method and user login credentials.

Related: How to set up a socks5 with Android cli?

Which kind of proxy you want to set? Is it a public one or do you have your own server?

I have my own local proxy server.

@IrfanLatif: Regarding the socks5 question that you referred to, I looked at that and tried it and it doesn't work for me. The app runs but it is not behaving as an http proxy, but perhaps more as a socks5 proxy. I need an http/https proxy

Instead of a proxy server you should set-up a PPTP VPN server and configure your device to use this VPN server. In difference to a proxy a VPN is used by all connections.

@Robert For my use case, I need an http/https proxy specifically. A VPN would not be the right solution.

@user55570 I just mentioned the VPN as it captures all the traffic. On the VPN end point you can of course implements a transparent proxy which therefore also processes all data as you don't have to configure it on Android side.


text:
Tablet bootlooped because of bootanimation.zip ~ No TWRP/CWM support
So I installed a bootanimation on my tablet and it bootlooped because the bootanimation basically crashes the boot sequence
So can I somehow delete bootanimation.zip file? I tried fastboot erase system/media/bootanimation.zip and it says RESULT: FAIL(unable to format)
Any help is appreciated

boot into custom recovery and delete. provide more information if you want a detailed answer

There's no custom recovery support for the model, not TWRP or CWM. Unofficial versions aren't available either.

I guess if it is possible to place a file into /system, it should be possible to port a custom recovery, too. for some devices it is possible to copy partitions from flash tool, manipulate content, and flash it back without data loss. I ask you again, which exact model and android version? Without this information the only answer will be: flash stock ROM. at least you should update your post with steps how you exactly replaced the bootanimation, because you needed root access for this

Please edit your original question and add this information. TWRP is available for your device. https://forum.xda-developers.com/memo-pad-7/orig-development/recovery-unofficial-twrp-3-2-1-asus-t3745190 But the tricky part is to unlock bootloader. I guess you can use Intel Flash Tool, but wait for a answer. There is a unlocked bootloader available, i will come back and explain later https://github.com/me176c-dev/me176c-boot/releases

But I have K013 not ME176C. It's not a correct one, I tried

@MememanBob please download the twrp-recovery-3.3.1-20190609-UNOFFICIAL-me176c.img
unpack it and see in prop.default what i posted is for your device. what exactly did you try, and what was the error output?
ro.product.model=MeMO Pad 7 (ME176C(X))
ro.product.device=K013

Use this temp bootloader to sideload twrp from a PC via fastboot. Can confirm this will work with K013!
Get an SD card format it too EXT2, not anything else. Then use the link below. Now u can back up and thusly manipulate your system partition thru twrp or pull a backup via sdcard and do some magic on the pc with the resulting zip file, repack it ans load the backup.  Either way this intel temp recovery thing works on K013 with 4.4.3 kitkat. All the custom recovery that can be actually put on the device require update to 5.0 lolly and above, as this reformats the hidden boot partitions Asus used...the boot is nit normal. Finnally bootanim.zip must be set to be the exact screen resolution the device expects. Can't use just any.
https://forum.xda-developers.com/android/development/intel-android-devices-root-temp-cwm-t2975096

It's Asus Memopad 7 (K013) and I gained root using ZenRoot. I installed bootanimation using Bootanimation changer app. And there's no custom recovery support. Android version is 4.4.4. And I add this here because I can't add comments.

You are not able to add comments (or edit within your original post) because you have created a second account with the identical name. Maintenance to your posts cannot happen with a different account. See help regarding merging the accounts you have into the owner account of the original post.

Please boot into fastboot from fastboot (yes, this is doubled). Do not flash anything, because the tutorial is for Android 5.
I will update this answer step by step, based on your input
(download link below)
fastboot boot C:\adb\droidboot.img

If this works so far with Android 4.4.4, now enter fastboot mode from the selection screen again. If not, you must flash stock ROM Android 5.0 (or maybe just efilinux.efi + esp.img but this is out of scope, because it may brick your phone)
Now lets see if you can boot TWRP from this. Your bootloader is still locked, so i am not sure if this works.
fastboot boot C:\adb\twrp-recovery-3.3.1-20190609-UNOFFICIAL-me176c.img

in case you get TWRP booting, but it stucks on TWRP splash screen, next check if TWRP's adb is working (at least, this commands can be used on a fully working TWRP too)
adb shell

Now, lets see if TWRP is able to mount /system (within adb shell)
mount /system -w

You should be able to navigate to the bootanimation with cd and check the path. If not, skip this next steps and try to manually mount /system (see last)
Exit the adb shell and replace the bootanimation with the correct one
exit
adb push C:\adb\bootanimation.zip /system/media/bootanimation.zip

If this is successful, set permissions for this file (the last one i am not sure, it is maybe u:object_r:bootanim_exec:s0)
adb shell
chown -h 0.0 /system/media/bootanimation.zip
chmod 0644 /system/media/bootanimation.zip
chcon -h u:object_r:system_file:s0 /system/media/bootanimation.zip

If this is working without errors, you are done. Reboot your phone with reboot
For manually mount /system in case fstab is wrong, you need to figure out the partition (within adb shell)
ls -l /dev/block/by-name/system
mount -t ext4 -w /dev/block/mmcblk0p* /system

(replace mmcblk0p* with corresponding system partition)

https://forum.xda-developers.com/memo-pad-7/orig-development/bootloader-me176c-boot-asus-memo-pad-7-t3780225


text:
Get Android activities and sub activities path programmatically
This is my first question on AE forum, so excuse me for my ignorance.
I'm searching for a method to get the complete path through the system apps like Music, Video, Settings, etc...
The goal is to prepare a checklist for manual testers to browse through the checklist and do sanity/functional tests
Currently, I'm using :
adb logcat | find "ActivityManager"

Then I record the path manually to prepare the script for launching the activity, for example:
adb shell am start -n com.android.settings/.Settings\$WifiSettingsActivity

The problem I can't go through all the forms of the system apps this way because it's time-consuming
Is there any tool, idea to help me automate the process of launching system apps activities one by one to create a full checklist ?
Regards

Not programmatically: There are apps for this. This one is just for browsing, but sure you will find one with record mode https://play.google.com/store/apps/details?id=com.sika524.android.quickshortcut

@alecxs Thank you for the suggestion, but is there something else which makes me gain in productivity? an automated way to get all launchable activities with their intents ?

I've edited the question, Thanks!

See https://stackoverflow.com/questions/33441138/how-to-find-out-activity-names-in-a-package-android-adb-shell

Based on this question from StackOverflow, you can try the following:
adb shell dumpsys package | grep -i "com." | grep Activity

It will list all activities from packages whose names start with com.. You can apply the same command for packages that start with net. or org. or whatever by substituting com.


text:
Hosts doesn't work
So i play a game that uses a server to detect emulator users.
Is there anyway to prevent other emulator users from being in my online game ?
The problem is that other emulator users usually use hacks and cheats on their device's, and I do not want to be in a game with those players.
I already tried adding the server block using hosts and i have root access on my emulator.

You can probably do it, however you'll need to NOT be using an emulator to connect.
The main problem is that you are using this server to connect yourself and your own emulator... The server is detecting that you should be playing a game with equally matched players and therefore other emulator users.
If you did Block the server from connecting, I'm sure you would also be blocking yourself.
To get around this, you would need to mock a device that is not an emulator, Maybe your UA ( User Agent ) is saying your an emulator, so you'd need to Mock a device that is Not an emulator
"in hope that the server only checks your UA String"
It could be also using the Application to identify your device even further, Therefore you need to change your device inside the build.prop to mock a Non-Emulator device, some device's will also use CPU and hardware inspection to identify the proper capabilities.
It is very hard to Trick some apps, and others are simple !

Thank you for the answer. I will try what you suggested but blocking emulator detection server worked before in previous version but after the last update i can't block tge server i used vpn and hosts to block it but the server appears in a different ip with the same domain if there is a way to block such server it would be a lot easier.  Is there?

I also tried blocking all connection from that server port with iptables but still somehow data was sent to the server and i still got detected even though my moniter showed no connection from that port

The thing is i don't mind playing with emulator in fact i only can play in emulator since i'm more used to computer not phone. But about %80 of emulator players use hacks and ruin the game experience for me so i'm trying to avoid playing with them


text:
How to "passthrough" a file from PC to Android and back using 'exec-in' and 'exec-out' directives?
I can do this:
adb exec-in "gzip > sdcard/test.gz" < C:\test.txt
adb exec-out cat sdcard/test.gz > C:\test.gz

The question is how to do something like this:
adb exec-in "gzip > C:\test.gz" < C:\test.txt

I mean, how can I use a file on my PC as an input for some android (linux) program and use another file on my PC as an output WITHOUT saving any data on android's internal memory (flash, microSD etc)?

exec-in and exec-out can write/read to/from only files, not STDOUT/STDIN: https://android.googlesource.com/platform/system/core/+/android-9.0.0_r42/adb/commandline.cpp#1553. However you can use shell: adb shell gzip >C:\test.gz <C:\test.txt. This will write nothing to Android device. However this is not the recommended method. Some unwanted characters may get included when reading/writing to terminal. Btw, what command from Android do you want to use on PC? Why don't you get that on PC?

The command adb shell gzip >C:\test.gz <C:\test.txt creates a test.gz file, which is the same like test.txt, not an archive. Also the shell hangs (need Ctrl+C press). Thank you for information, that exec-in and exec-out can't use STDOUT/STDIN.

Right, that would be the case if you are on Windows PC. Windows' handling of terminal related stuff is poor. adb would not be forwarding data read from test.txt to STDIN of shell (/system/bin/sh)`. I just tested it on Linux/Android and it works.

My post is more a comment than an answer (but I cannot comment).
All my comments below address only the case of Windows adb host.
adb shell gzip >C:\test.gz <C:\test.txt probably works just because the input file is a text file.
adb shell gzip >C:\test.gz <C:\test.bin fails because the call of Windows read function in adb stops reading as soon as 0x1A byte (ctrl+Z) is read. This is the default text operation mode of the Windows read function.
The workaround uses by exec-in and exec-out is to call _setmode() to configure the writing and reading of file descriptors in binary mode.
Unfortunately most of the time <test.bin adb exec-in "cat - > sdcard/test.bin" fails as well for adbd version < 1.0.41 (ie anything below android 10). The cause is probably some race condition issues in the usb.cpp code of adbd.
Android 10 fixes this with the nonblocking FFS implementation and <test.bin adb exec-in "cat - > sdcard/test.bin" works with Windows (tested with LineageOS 17.1 + Windows 10)


text:
Android screen is dark, no USB debugging is enabled, how can I recover contacts?
My phone screen is not showing anything, although the touch detector works perfectly. I hear the sound of the notifications and call and I can answer them but it shows nothing.
What are my options for recovering my log and contacts, I read that I need to root the phone since USB debugging is not enabled for me, is it possible to pull the database files from the phone's storage and extract the data from them, or are they encrypted ?
PS: (my phone is Samsung J2)

https://android.stackexchange.com/questions/213373/recovering-files-from-soft-bricked-nexus-5x#comment273103_213373

@AlexMyers No they are not syned, is there any hope ?

You need to find someone figuring it out for J2 https://talk.sonymobile.com/t5/Xperia-Z3-Compact/Enabling-USB-debugging-with-OTG-keyboard-without-seeing-the/m-p/1301419#M27733

Unfortunately your phone does not support MHL. With MHL support you can try "Micro USB OTG Charge HUB" + "MHL micro USB to HDMI converter" + Monitor/TV + Keyboard + Mouse


text:
Deleting unsent WhatsApp messages
What will happen if I do a "Delete for me" option to a WhatsApp message that doesn't have any ticks? Will it reach the recipient or will it be never sent?

messages with no tick will not be delivered to the recipient as it is not moved from your device to server.
However if it have single tick that means it is delivered to server but still if you delete that message than it will be deleted from your device as well as from the server as it is not delivered to the recipient.
If message is delivered and have two ticks that it is delivered to the recipient and you have to delete that message for both to remove messages from both devices, but that is limited to some time frame, limited to 8 seconds i guess from the time it is delivered to the recipient device.


text:
Is there a way to record whatsapp calls?
Do you know of a reliable (and preferably simple) method to record audio calls made using whatsapp on android phones ?
The method should record both correspondents, not just the voice of the local phone user. Permission to record the voice of the remote correspondent would be asked before recording, of course. The goal is to record an interview, where the would-be-interviewed person proposed to use whatsapp.
I've tried a few apps so far, but they seemed to record only the voice of the local phone user, or worked with normal phone calls, but not whatsapp calls. I'm not sure why.

https://android.stackexchange.com/search?q=record+whatsapp

The Cube ACR app is able to do this.
At the top of the menu of this application, turn "Enable recording" on. Then, when calling with whatsapp, you have a button to switch recording on and off. The recordings are then available within the app in AMR format (with the free version of the application), and can be exported, for instance to your google drive.


text:
How to automatically trigger missed Tasker profiles after power outage?
I have a phone running Android 8(Non rooted) and tasker with some tasks scheduled to run at specific time.
How can I make tasks which hadn't run because the phone was out of power, to run when power comes back.
What I`m searching for basically, is Anacron for Tasker


text:
What is cause of internet malfunction?
When phone is brand new and updated to latest firmware and network is also good then what possible causes can be of internet malfunction?
I'm using Asus Zenfone Max Pro M2
Running on stable pie.

Possible duplicate of What are potential causes of internet malfunction?

@irfan Latif this is my own unanswered question that I had forget I already asked.

It is a duplicate however nobody has answered it.

I have answered your previous question.


text:
Can I set Parallel App or Dual App as a default app?
If more than one browser, media player, PDF reader, etc. is on an Android phone; it asks for the default app for browsing the Internet or opening a web link, playing music, and opening a PDF file.
Like this, there are two WhatsApp (primary WhatsApp and WhatsApp by Parallel App) running on my phone.
How to set WhatsApp by Parallel App as a default WhatsApp?

WhatsApp is not a browser or SMS app or contacts app that the phone can allow to select one from many as the default in its category.
Furthermore, your primary WhatsApp is "separate" from WhatsApp in Parallel space. They don't see each other and are not aware that the other exists, making it difficult to select a default.


text:
What can be saftly deleted in data/data
What can be saftly deleted in data/data.  I have almost no space left on a few devices.  I don't want to delete account info.

Remove apps via Settings > Apps > Your app > Uninstall. It is safer and you will be able to know easily the app(s) that you want to uninstall (you won't need to know the package name).
Start by removing apps you don't use. If there are system apps (i.e Google play music, duo, Hangouts, etc), you can remove their updates then disable them.
If there are apps you want to remove and keep their data in case you reinstall later, use Titanium backup or Helium to backup the apps and their data then remove them.

The apps are easy to remove, but data/data is taking 75% the space.


text:
Why I am only getting 8gb storage when I was said that my phone contains 16gb storage?
I recently bought Oppo A3s smartphone with 2gb RAM and 16gb ROM but I am only getting 8gb usable storage from which Android is using 2 gb. What should I do now?

Welcome to Android Enthusiasts! Try to download Aida64 or CPU-Z from Playstore, then check if the reported storage is still wrong.

Yes it is showing total storage as 9252 gb. Usually 16gb phones have 14gb storage(as in my friend's Galaxy j7) also in my settings storage is total 16gb but 8gb usable

If the phone is still under warranty, bring it back so you can be provided with what you paid for.

How disk space is used on Android device?


text:
Check for install then uninstall with Tasker
I'm new to tasker, just got it today.
I want to set up a profile that looks at the apps I am installing and if it is on some block-list, uninstalls it.
I've seen this answer (to a related question):
Get new installed app name with Tasker
But I am still not quite getting it.

Tasker or any third party app cannot know which app is getting installed. They get to know about the app only when it has been installed. All you can do with Tasker is initiate the deletion immediately after installation if the app is blacklisted.

Ok, how would I do this?


text:
MI Max 2 soft-bricked
Okay here is what happened Yesterday I restrated my phone beacuse the volume and power keys were acting funny but instead of booting into the system in boots into TWRP btw just in case I installed a custom rom before i restarted this okay back to the problem today I gave up trying to flash new custom roms since It keeps booting into TWRP so i decided to go with the stock rom I flashed with Miflash hoping it would fix but now TWRP is gone can't turn off my phone,can't boot into fastboot or bootloader,all I can is Mi-Recovery 3.0 also just to add my volume up key wont work that's the reason for why i think there is damage on my volume up key.
From the Main Menu of Mi-Recovery 3.0 all i could do is reboot to system which just makes it boot bact to recovery and wipe data which also did'nt work, Connect with MIAssistant is also useless since the app cant detect it. Thats all.

Comments are not for extended discussion; this conversation has been moved to chat.

Your phone boots into recovery because of a short circuit in the Volume Button.

From TWRP Recovery, get a backup of boot partition and
copy the boot.emmc.win file to PC via MTP-USB
tap "Reboot" and "Bootloader" to enter fastboot mode
boot your phone from fastboot with
fastboot boot "C:\Users\<profil>\Desktop\boot.emmc.win"

you must repeat the last step each time you want to boot into system