text:
What position do cellular communcation (1G, 2G, 3G, 4G or other function only implemented in phone) play in Android operating system archtecture?
I am entirely new to Android, but have a little knowledge on Linux.
I have view the architecture graph of android on official site:

The Problem:
Not all android device support cellar network. As a result, it isn't shown in graph. But which layer is actually cellular networking (and other function related to SIM card) drivers in?
Analysis:
If it is in kernel layer, it means that there should be an independent kernel repository or patch specific for cell phone other that tab computer, smart television and music player. It would not be a good design of architecture and will be difficult to maintain.
If it is in HAL, it means that wrong driver won't affect the booting process, instead, it will only make cell phone unable to connect to cellar network. While the other application and GUI should be run properly, because the init system will skip the error units. However, it is actually not true.
What I have done:
I have a Samsung Galaxy Note II GT N7108 (China Mobile) (Use TD-SCDMA) which I bought from China. I download and flash two firmware package (Official Samsung ROM for AT&T device and Lineage OS 14.1 for NOTE II LTE). But the result is the same, the device is unable to boot and keeping no change on startup screen.
Update 1:
According to the wikipedia link provide by '@Morrison Chang', it is said that NOTE II for China Mobile use Snapdragon SoC. However, it should be noticed that, the model use Snapdragon SoC is GT-N7108D instead of GT-N7108. GT-N7108 use Samsung Exynos 4412 as its SoC.

If it is in kernel layer, it means that there should be an independent kernel repository or patch specific for cell phone other that tab computer, smart television and music player. It would not be a good design of architecture and will be difficult to maintain.

Bingo. Lots of device specific stuff are in binary blob drivers which only work for specific devices. Android has no common platform like a PC. Those drivers are held by the device manufacturers or system-on-a-chip vendors.
See: Why is it that Android still can't be installed as regular OS?, and Why are there not generic phone OS installers?
Based on this article from LWN.net: An update on the Android problem is seems like the Android kernel problem is improving, but architectural changes like Project Treble would only benefit devices already integrated with those changes.
And so posts like Is there a technical reason Android update story is so bad? will remain valid for some time.
If you wish to go down deeper, at least be aware of the content in the AOSP Architecture documentation
Yes, but what about cellular radio
Mobile telephony radio is managed via a baseband processor which will have its own CPU/RAM/Firmware. Control communication appears to be done by serial AT commands. Realize that baseband processors may differ based on device model.
For more detail see:
How mobile OS talks to baseband OS and How does Modem code talk to Android code
But why doesn't it boot?
Flashing software that isn't specifically designed for the hardware could/would result in bricking. A quick check of the specs for a Samsung Galaxy Note II shows two different CPUs - Exynos and Qualcomm. While both may run ARM code, the internal architecture is different: i.e. number of cores, GPU driver, camera driver, memory layout etc. Putting a US AT&T firmware, designed for Exynos, on hardware for China Mobile, containing Qualcomm, is guaranteed won't work.
Response to Update 1
While the CPU chipset may be the same, GT-N7108 radio band support for the USA is poor with no 3G bands, which means that the physical baseband processor would be different for Galaxy Note II models marketed and sold in the USA. As part of the boot process, the baseband processor is checked (further details in prior links), that could easily result in a non-operational state.

Thanks, it is helpful. However, if it is work in kernel layer, is it works as loadable kernel module (like Nvidia display driver) which can be load and unload manually via modprobe? If it is, the incorrect configuration of a specific module won't affect the others. Why that cell phone mentioned in post cannot boot just because a different cellular network protocol support (In my expectation, it will only show service unavailable in status bar)?

@AlexisAbram Updated with the StackOverflow posts that address the cell radio

Thanks for reminding, I have search for some detailed information about their difference. Please see Update 1 for additional information. Thanks.

@AlexisAbram Responded to your update. Accept answer if it meets your needs. As we have drifted from the original question, it would be best to create a new one should you have other issues.


text:
Calendar widgets always prompt to select a calendar app when tapping an event
I have two calendar widgets that operate like this. I emailed the developer for one of them, and he said that it was not the widget causing this issue. I've cleared defaults for all my calendar apps and set them again, and I still get prompted. Tapping the plus button or the title bar of these widgets will open my default calendar app (Google Calendar), but Android does not seem to save my calendar choice when clicking the event. Any fix for this? I have an LG V30 on Oreo.

Please have the screen shot of the issue to understand in detail.

Do you run more than one launcher? If so set one as default. Check permission thru system settings/apps.

source: Stack Exchange

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

sort: votes


text:
Huawei Phone Ram replacement, flash rom?
My friend's phone died with no signs of life, the repairs shop diagnosed it to have it's ram chip failed and they say that all the data will be lost after repair.
Does it need to have its ROM reflashed after the ram chip replacement?

I don't think that Replacing Ram by manufacturer's official service person's doesn't require to flash ROM again, but, the repair person may do it, to make it fresh.

All the data will likely be lost, in fact, the phone will likely even have a new IMEI after the repair. The exception would be any data on an SD card as long as it is not adopted as internal storage.
These individual components, such as RAM, storage, radios, etc, are generally not replaceable even in an authorized factory repair facility. The standard practice for this "repair" would be to replace the mainboard of the phone. This action is similar to replacing a motherboard in a laptop, when it is done it is essentially a new device in the same original shell. Any data or information currently on the existing device will be lost as the "guts" will be replaced with new.

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


text:
fastboost doesn't see device on linux even with su and sudo
so i Had a trouble booting into download mode on my Samsung Galaxy J4 to boot twrprecovery.img and not flashing it after enabling "developers options" and "USB debugging" and "Unlock OEM" now bootloader is already unlocked under "Unlock OEM" I tried adb devices it saw my phone I did adb reboot bootloader it did not boot into bootloader so after a little research I found I had to use adb reboot download I could enter download mode but when doing fastboot devices with normal, sudo and su privileges it simply doesn't see it while in OS mode nor in the download mode. I tried booting into bootloader via recovery mode using poweroff+Vol up+Homescreen and then navigating to reboot to bootloader it simply reboots to the OS.
so why adb sees devices but not fastboot?
anonsam-X550CC ~ # uname -r
4.4.0-127-generic
anonsam-X550CC ~ # cat /etc/os-release
NAME="Linux Mint"
VERSION="18.3 (Sylvia)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18.3"
VERSION_ID="18.3"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
VERSION_CODENAME=sylvia
UBUNTU_CODENAME=xenial

Phone Model : SM-J400F/DS
Baseband version : J400FXXU2ARI2
Build number : R16NW.J400FXXU2ARK2
Android version : 8.0.0
Android security patch level : November 1, 2018

Samsung devices do not have "fastboot" but use a proprietary system. You must use Odin/Heimdall to communicate with the device. You cannot communicate with a Samsung device with fastboot.

I'm not trying to flash i'm just trying to boot twrprecovery.img, I think odin/Jodin/Heimedall only flashes a rom

Still, Samsung devices do not support fastboot in any way, you can't just "boot" TWRP on them, you must flash it.


text:
How does "PowerAmp" make song quality better?
I am using Poweramp trial version.
I tried so many music player but can not find anything like poweramp.
I am curious how poweramp makes song quality better even using low quality headset.

Equalizer, it's that simple.

Android has also default equalizer.
Why does poweramp equalizer do great? [ technical answer would be appreciated ]

sorry IDK :P so I can only give a +1 to your question, good one

https://www.reddit.com/r/androiddev/comments/aohjqy/how_does_poweramp_make_song_quality_better/


text:
Hotspot issue, connected, no internet
I have an issue in my phone, and I lost hope I will find solution.
Phone:
* Xiaomi Redmi Note 4
Android Version:
* 7.0 NRD90M
MIUI Version:
* MIUI Global 10.1
Kernel Version:
* 3.18.31-perf-g4339b70

The problem:
I share internet via hotspot and everyone can connect to it with any devices but when I connect my tablet (Galaxy tab) or my other phone (OP 5T) I got an exclamation mark next to my wifi and "connected, no internet".
I don't understand why. Can somebody help me what is the problem?

Most likely to be an issue with Galaxy tab, check if there is static IP settings, you may want to change to default DHCP and try reconnecting

What is the thing that provides you internet ?
Wi-Fi or cellular data ?
if its wifi Android devices auto-disconnect from the wifi so they can host you Hotspot
if its cellular data then i dunno !

I tried to share my cellular data.


text:
Selection for batch operation in Gmail's new material design
I'm confused, while I'm trying to understand the new Gmail "compact" style user interface. This is the view, where left to the email's 2-line representation a checkbox can be found.  I can't really grasp the UI presentation of "selection". Please, take a look at these four screenshots.

Selected and checked

Selected but unchecked

Checked but unselected?

Selected and unchecked, but different from (2)

It is clear (from the operation appearing at the upper part of the screen), that 1, 2 and 4 are selections. Why is the UI different in these cases? Also clear, that 3 is not selection... but a checkbox has a mark in it, and it normally used to mean selection for further operation.
So I'm totally confused, what the UI tries to tell me. Could you please shed some light on what

checkbox (marked and unmarked state)
colored background
thick, and thin frame of the checkbox

mean in the context of email selection?


text:
How do I move gigabytes of data from my computer to my phone's SD card?
I'm trying to put my music collection (~37GB) onto my android phone's SD card via USB cable and MTP. It has to go on the card, because my phone's internal memory is not capacious enough.
I've tried drag and drop, rsync, cp, etc. (OS is Linux, phone is Galaxy S8)
Once I get about ~15 GB of data in the directory I can't even ls it or look at it in the GUI file browser, much less add more. Attempting to do anything at that point seems to crash the filesystem driver.
Googling the problem seems to be useless, I just get a bunch of basic tutorials on transferring data with no mention of problems or scope.
Is there some known way to accomplish this short of yanking out the SD card and loading things onto it directly? Am I just weird for trying to copy such a large amount of data via USB/MTP?

Although you seems to have solved this problem by using Windows, did you try using adb (setting up a script to copy-paste individual files) or running a server say FTP, on Android and than copy-pasting into it? adb is slow but FTP could be faster using USB tethering.

I put the SD card in the computer and drag & drop there. I have a SD slot and use a uSD to SD card adapter. Try dragging smaller chunks vs all at once.  I have a 64GB card and drag 20-30 folders at a time, each folder being a complete album. Getting ready to install a 128GB card and do it all again to hold about half my music collection.

Yeah, I can do that (and have in the past) but that means that every single time I get new music I have to go through the whole rigamarole all over again.

Then only do it for the very large transfers. Use USB to let the PC see the phone as external hard drive for transferring an album or two. For hundreds of albums, direct to card is better.

The problem is that like I said, once there's so much in that directory on the card I can't even look at it without a crash, much less modify. I can't even rename something.

You need a better card then, sounds like it's on the way out.  What kind is it? I'd pop mine put of my LG (ThinQ G7?) and tell you the brand/model if I had the little widget that goes in the hole to release it with me. I can tell you I have 15.3GB free, 43.3GB used on my 64GB card. It's the same card I had in my Samsung Galaxy SIII for ages. I've deleted everything and reloaded it since then, the music app I had was showing double entries for a lot of stuff, reformatting and reloading seemed to be the only thing that fixed it.  40+ GB of music takes quite a while.

I don't doubt that: even moving it to a flash drive takes a couple hours on USB2.0. And it may well be an issue with the card, it was a cheapo I got off amazon. But I've been using it for a long time with no issues until I deleted and tried to reload my music collection.

I got it done with no issues on a borrowed windows 10 box. Not happy about it, but it got done. Thanks for trying to help, gave an upvote.

Was able to do it no problems on a borrowed Windows 10 box. Not that such an answer is very pleasing to a linux enthusiast.


text:
Moto G6 audio sending through wrong audio channel
My unrooted, basically stock android decided to stop sending audio through any channels except call audio today. I have not installed any new or unstable apps recently. Symptoms include:

the lower speakers (the ones used for playing music, etc.) are completely nonfunctional.
The upper speaker sounds like I'm in a call all the time. When I am actually in a call, it is nearly silent unless I'm on speakerphone, at which point it's as quiet as any other app.

I have attempted general troubleshooting. To wit, this includes:

I closed all current apps and then tested sound. No change.
I rebooted the device. No change.
I booted into 'Safe Mode.' Problem persisted.
Connection over Bluetooth seems to be immune to the issue. I connected a headset and nearly blew out my right eardrum.

Any suggestions on what the heck is going on and/or how to fix it?
Update:
Appears it was a hardware issue, as it spontaneously corrected itself a few days later.

So basically, I waited for a few days and it fixed itself in the middle of the night. I don't know why. Sorry, future humans!
Given that it both spontaneously started and stopped, that it persisted through multiple restarts, and that it was present during safe mode, I suspect that this was either a hardware issue or it was embedded in the registry.
note to editors: this answer is here simply to successfully close the question.


text:
Note 8 dies when battery is drained completely
the samsung galaxy note 8 dies when battery is drained completely and it wont start or charge unless the battery is pulled and charged and pushed back again.
Why this happens and is there any solution for it ?

Even if the device seems to be off you can try a hard power off (press power button for more than 10 seconds) to really shut if off.

Since it's a Note 8, it MAY still be covered by a warranty. If so, take the phone to the store you bought it, they should look it up for you, and if it needs any repair they will take care of it, since as far as I can tell it's not your fault.


text:
actual limitations of locked bootloader
I have read in many posts that a locked bootloader prevents from flashing custom ROMs, because it checks the digital signature of the ROM itself.
I thought a "bootloader" was only responsible for loading an image at startup, thus a locked one would refuse to load an unsigned image.
Therefore, wouldn't it be more accurate to say that a locked bootloader refuses to load/boot an unsigned image, but it cannot do anything to prevent one from flashing that image ?
Of course flashing something one cannot boot does not make any sense, but that is not the point of my question. I just want to learn exactly what the locked bootloader on a phone does.

Your statement is correct. :) The bootloader can't prevent images from being flashed, it just prevents unsigned images from loading. My answer to this question has some detail on the way locked/unlocked bootloaders work.
For example, if we consider "SP Flash Tool", an application that communicate with the bootloader of MediaTek devices to flash images, the lock status of the bootloader does not affect ability to flash. (It is still possible to block flashing by only allowing signed binaries to communicate with the bootloader) But still, if an unsigned image is flashed, the bootloader will refuse to load the image.
Still, usually images are flashed using Fastboot (even when there are more options to flash like "SP Flash Tool") and quite a lot of devices only have Fastboot as a known flashing method. Some common exceptions include Samsung, and MediaTek devices. And Fastboot checks most of the time if the bootloader is unlocked, and only lets flashing images if it is. (Same goes for Odin, the flashing application for Samsung devices. It only lets flashing when bootloader is unlocked) So, unless there is a secondary way to flash, it usually is not possible to flash with a bootloader unlocked.

Just to clarify why SP Flash Tool works.... SP Flash Tool connects directly to your CPU Firmware prior to booting up the device, You just need a USB Cable .... This means that you can flash an entirely different bootloader along with all the corresponding images. . . SP Flash Tool is practically a Binary editor that can edit the device's storage via a preloader .


text:
How to fix Xperia Z3 Dual flashtool driver too old error?
I'm trying to install .575 firmware on my Xperia Z3 dual D6633 device with flashtool but as  i connected to the pc (with vol down pressed) flashtool says ERROR - Device connected in flash mode but driver is too old. How I can fix this?
I'm on latest Marshmallow update and unlocked bootloader.

Go to drive C and locate C:\Flashtool\drivers.
"flashtool" folder. Open it. Then folder "drivers", open the folder. You will see an application "flashtool drivers". Run this application as admin. Select the flash tool drivers and the fastboot drivers.
Follow the wizard by pressing next.
You must be connected to internet.


text:
How do I check if my Android SD is encrypted?
I can't remember if I encrypted it already or not. How do I verify that?
Under SETTINGS - SECURITY - ENCRYPTION, there is just "Encrypted phone", but nothing related to the SD card.
The SD is NOT formatted as Internal, and I do NOT want to use that mode (I don't wanna risk to be slowed down; and wanna be free to take out my SD card and still have my phone working).

Power off your device, eject the sd card, place it in an sd card USB reader and connect it to a pc, then you will see if it is encrypted or not.

I thought about that but I don't have a pc nor an adapter for the card atm. And wanted to have an Android solution; there is for sure a way to know it directly from the OS.


text:
Calendar notification - no sound
On Xiaomi Redmi Note 4 with MIUI 10, Android 7 there is no way to enable sound for calendar notifications, I get vibrations only. I have tried several calendar apps including Google, MIUI, aCalendar+, various settings including setting battery optimisation off but it never plays a sound, it only vibrates.
When I press TEST in aCalendar+ notifications settings it vibrates but makes no sound and provides no further help. Of course my sounds are on and I have even tried to turn off bluetooth. I have no SD card, all sounds are stored in internal memory.
Notifications form WhatsApp or Facebook messenger work well with the sound.
Any hints?

Finally figured it out by browsing and reviewing all available settings.
There is an entry Notifications and status bar under System & Devices menu.
There is an entry App notifications and I have enabled everything for aCalendar+ there. Now notifications come with sound finally.
Those settings are quite complicated especially for former Windows Phone users where such stuff worked out of the box.
A good article about the problem is here.


text:
I wiped everything from my phone with TWRP and my version is too old
i have a few ROMs and some backups in my computer so I tried to flash them but I always get "Error executing updater binary in zip" which I heard means my version is too old.
EDIT: I tried to flash them with adb sideload which is the only way adb recognizes the device. I can't really boot on bootloader either
I got a linux, and a windows with SDK is there anything I can do to recover my phone?

How did you try to flash them? Please edit your question and add more details.

Is there a way to install a new version of TWRP from adb sideload + Twrp sideload?

Usually you install TWRP via fastboot.

Flash a new version of TWRP with fastboot... Otherwise if you have a OpenRecovery flashable version of latest TWRP for your device, just copy it over to your internal storage and flash it with TWRP. Neat think about TWRP, you can write your recovery from recovery, then just Reboot - Recovery. For a more detailed answer, we would need to know 1) Your EXACT device and 2) Your current TWRP version

My device is a Alcatel Onetouch (OT) Pixi 3 4.5 4G (5017A) a Lollipop. My TWRP is super OLD is a OTO I believe it is before version 3.0.0 I have the .img of TWRP 3.0.0 that fits my device (on my computer).

Can SP flashtool be useful here?

Flash the new TWRP with the old TWRP ... Then try.

Hang On..... DO YOU HAVE A WORKING TWRP, AND A BACKUP MADE BY THAT TWRP ?

Please have a look at this video on MTK firmware backup's and restoration using SP Flash Tool v5.17 and above.

It saves me writing everything twice https://m.youtube.com/watch?v=e2_U68EGSlY

I have a backup made by that TRWP in my computer. But, as mentioned above my computer can't see my phone

Thanks for the video, but BOOT_1, BOOT_2 and USER are empty as I couldn't do the readback, so I can't restore just like that I still think if there is a solution it will come from SP flash


text:
What is the difference between Factory Images and Full OTA Images on the Android download site?
On the Android Developer site you can download Factory Images or Full OTA Images.

What are the exact differences between them?

Factory images are meant to be flashed using fastboot or alternative low-level tools or environment. They come with batch and shell scripts to automate flashing. Flashing them requires a device's bootloader be unlocked (is considered a data security risk by OEMs). Flashing factory images in entirety would always delete user data, unless the user has taken precaution before flashing, such as excluding userdata partition from the script or running other available and relevant scripts.
On the other hand, full OTA images are over-the-air updates that are to be flashed via recovery environment or seamlessly in A/B supported devices. OTA updates are usually either incremental or full. Incremental updates require the user to be running a specific Android build (not just Android version) as they increment in the existing
build only. On the other hand, full OTA updates don't require a specific existing build to continue. They are handy when a user hasn't updated their system for a long time and wants to skip successive incremental updates. In addition, per an answer here from beeshyams, any full OTA in theory should carry all the previous security patches made available up to the release of that OTA.
I myself had jumped from an Android 9 build to an Android 10 build using a full OTA on a OnePlus 6 even though there were a couple of incremental builds between those two builds.


text:
Install TWRP/Lineage on Huawei 10 Mate Lite (RNE-L21) Oreo
I'm trying to install TWRP to be able to get LineageOS running.
But I'm stuck at the very first step:
$ adb reboot bootloader
$ fastboot flash recovery twrp8.img
target reported max download size of 471859200 bytes
sending 'recovery' (18296 KB)...
OKAY [  0.757s]
writing 'recovery'...
FAILED (remote: Command not allowed)
finished. total time: 0.763s

It seemed to be the issue that "OEM-Unlock active" had to be activated. Is done on my phone. I'm getting a white screen with some message, at the bottom written:
PHONE Locked (in green)
FRP Unlock (in red)

I've been trying to figure out how to unlock the phone and apparently there are ways to do that with fastboot flashing lock. The command fails.
Seems there was a time Huawei used to give away codes which allowed to unlock it.
I'm stuck now, are there options I forgot to enable? Or other ways?
I'm using using Linux and as stated in the Title:
Model: RNE-L21
EMUI: 8.0
Android: 8.0

If it is a rather new Huawei device, that might be a "deadlock" – as Huawei decided to no longer allow bootloader unlock.

@Izzy - how would I find out?

No idea. I've scrapped Huawei from my list when they announced that (about a year ago IIRC). According to GSMArena, your device was first released 11/2017, which was around the time. Though XDA has a guide, you'll fail at the first step: that Huawei link to obtain your unlock code no longer exists (it redirects to their "EMUI news" page). Bad luck I'm afraid. (PS: the XDA thread has some work-arounds for $4)

If your security patch level is newer than June 2018, then it has been patched against BL code obtaining tools, and you're out of luck.

@AndyYan - how do I find that out and what exactly is that security patch?

Didn't expect that you're still watching this question... It should be right there in the "about phone" page in Settings.

@AndyYan - why would I post a question and then just decide to ignore it? That patch was probably in the last security update... 5th of June 2019. Shit

Yeah, tough luck. Hate Huawei for the sudden betrayal.


text:
Using TV as monitor for my Android phone
I have thought of using my TV as a monitor before and today I saw an RCA to USB cable in my garage and wondered whether it would work if I plug that into my OTG or Lightning "connector". And also, would it just work straight away or is there software involved.
Please help

Was there a failure when you tried it? Any results to edit onto the question?

I tried it, but didn't work. I do suspect that the USB to rca cable I have might be faulty. I think I would rather just buy a decent hdmi converter for my phone.

Have you seen the adapter only or a working set-up? If I get it right RCA is an old analogue connector used for audio or video but also for various over analogue signals. I remember such connectors with old digital cameras but they were device specific and proprietary. Never heard of an Android phone that had such an adapter.


text:
External SD card changes mount point
I have a Moto e5 Plus (Android 8.0.0) that has a 128GB Samsung Evo card in it. The card works well in the device (freshly formatted), but has an odd system of mounting.
On previous devices, the external card was mounted on /storage/ext_sdcard or some similar place that was always constant. On the Plus, the mount point for the external card is /storage/32313943-2d33-3032-4600-d8b34000d8b3, which is great. For now. Until it reboots. Then the UUID for the card changes, and any media referenced with the old mount point is now inaccessible. I realize one way around it is to make your app just look for what UUID is available and use that, but my question is in reference to a third-party app so I don't have modification abilities.
I really don't care what the mount point is, but is there a way to stop it from changing every time the card is remounted or the phone is rebooted?


text:
How can i authorize my PC to my phone that doesn't work properly?
So yesterday I accidentally changed my phone's (Samsung Galaxy Note 4 SM-N910C) dpi from 640 to 140 using Nomone Resolution changer  that uses root and that screwed up my whole phone because now it completely skips my lock screen background and straight to my home background but all it shows me is the background itself and a tiny error that says "System UI has stopped" and its literally the only thing there. I tried resetting my dpi using adb commands but the problem is that my laptop isn't authorized to my phone, I mean usb debugging is on (i think) but I don't think that will help because I have no access whatsoever inside of my phone and I don't have CWM recovery flashed so I have no clue what to do :'((
I saw this post that says i should try installing a custom launcher to fix the problem but like I said its no use trying to do anything because my laptop isn't authorized:(
I seriously have no clue what to do and I really don't want to reset my phone because I have a lot of important files and pictures there, any suggestions? Thanks.
Update: So i managed to flash TWRP recovery but now i don't know what to do because I don't have a back up and i dont know the file that managed to change my dpi but at least i managed to progress somehow. What do i do next?

You can use ODIN to flash Twrp. https://twrp.me/devices/samsunggalaxynote4qualcomm.html

That app which changed the dpi either did this by editing build.prop or setting a property (stored under /data/property), assuming it is not an Xposed module. You have to ascertain this and undo the change.

ill try flashing twrp but its gonna be difficult because i have a SM-N910C phone which is like the most difficult of note 4's

@Firelord do you have any idea how to "undo" the change?

Use the terminal in TWRP to issue the command to change the density.

You have to use grep and sed tool to make changes in build.prop if it was edited. Otherwise, if you can find one for your device on Internet use it to replace your modified one. Also, check /data/property to see if there is any file containing the term density somewhere? Delete it too. One of them is the cause of your problem.


text:
How can I configure a separate MMS APN on LineageOS
Some mobile phone providers (e.g. Optus, including MVNOs that deliver service through Optus' networks) have a separate mobile APN (access point name) for sending MMS to what is used for mobile data.
However, the user interface in LineageOS (and probably other Android variants) does not seem to let you configure two APNs.
Through the UI, under Settings -> Network & Internet -> Mobile network -> Advanced -> Access point names it is only possible to select a single APN as 'preferred'.
How can I configure my MMS APN at the same time as my data APN?

Firstly configure the mobile data APN through the UI and verify that is working.
Next, we will need to configure to MMS APN without using the API. To do this, you will need access to the phone through adb, and you will need a rooted phone (see other posts on how to do this if you don't already have that). All of the commands could alternatively be performed on the device itself through a shell.
In Android, the different networks that can be configured are identified by a 'subscriber ID' or subId. The first step is to find the correct subId to use.
If you haven't already, restart adb as root using adb root.
Now find the subId already in use for data with:
adb shell content query --uri content://telephony/carriers/preferapn

Look for the part of the line that looks like sub_id=3, - you may have a different number in place of 3. That is the subId for mobile data - not the one we want to use, but useful for elimination. Also make a note of the _id number and the numeric from the response - you will need those in another step.
Run adb logcat -d -e "matching subId" and look at the subIds that come back. If you only have one SIM enabled, but you need to enable a separate network for MMS, you should see two different numbers in the results. Eliminate the one that matches the mobile data subId. This is the subId you will need to configure (in my case, it is 2).
Now list the options with
adb shell content query --uri content://telephony/carriers/ --where "numeric='50502'"

(replacing 50502 with the numeric you recorded from the earlier query). In the results, find the row that matches the APN you want to configure. In the Optus case, the row will like something like
Row: 5 _id=2912, name=Optus MMS, numeric=50502, mcc=505, mnc=02, apn=mms, user=*,
server=*, password=*, proxy=202.139.83.152, port=8070, mmsproxy=61.88.190.10, mmsport=8070,
mmsc=http://mmsc.optus.com.au:8002/, authtype=-1, type=mms, current=1, protocol=IP,
roaming_protocol=IP, carrier_enabled=1, bearer=0, bearer_bitmask=0, mvno_type=,
mvno_match_data=, sub_id=3, profile_id=0, modem_cognitive=0, max_conns=0, wait_time=0,
max_conns_time=0, mtu=0, edited=0, user_visible=1, user_editable=1

If there are several options and you are not sure which one, you could try each one in turn using the following steps. Note the number after _id= - that is your APN ID you need to configure.
To configure the MMS APN, use the command
adb shell content insert --uri content://telephony/carriers/preferapn/subId/2 --bind apn_id:l:2912

Replace the 2 with the subId you worked out you needed to configure (i.e. the one that is not the mobile data subId). Replace the 2912 in the above with the apn_id from the above command.
If you configured the APN successfully, you should now be able to send MMS and use mobile data at the same time.


text:
What special privileges "/system/xbin/su" does have w.r.t. root access?
This answer says:

Because of the way directory/file permissions are configured on
  Android, you need to have the su binary on your /system partition
  in order for it to work. Putting elsewhere will not suffice, because
  it will not have the permissions it needs to actually allow processes
  to switch users.

What is the mechanism that causes binaries in /system to have special privileges?
Specifically, if I moved /system/xbin/su to /data/xbin/su (and changed anything relevant to point to /data/xbin/su instead of /system/xbin/su), what would be different?

My guess is that these privileges are enforced by SELinux.
I searched Android's sources, and found in platform/system/sepolicy/private/file_contexts:
/system(/.*)?       u:object_r:system_file:s0

and in platform/system/sepolicy/public/domain.te:
allow { appdomain coredomain } system_file:file { execute read open getattr map };

However, I also found in platform/system/sepolicy/private/file_contexts:
/system/xbin/su     u:object_r:su_exec:s0

and in platform/system/sepolicy/public/domain.te:
# Nobody should be able to execute su on user builds.
# On userdebug/eng builds, only dumpstate, shell, and
# su itself execute su.
neverallow { domain userdebug_or_eng(`-dumpstate -shell -su') } su_exec:file no_x_file_perms;

So I am confused.

Since Android is based on Linux kernel, getting root access by executing /system/xbin/su - like one can do on a Linux system - used to work in good old days but not now. The story is a bit twisted.
WHAT IS SUID?
Special thing about /system/xbin/su isn't that it's in /system partition, but the set-user-ID-root (SUID) bit set on this binary makes it special. SUID  (Set owner User ID up on execution) is a special type of permission on Linux kernel that grants the permissions of the file owner to the new process rather than inheriting permissions from parent process who runs it. Since the owner of /system/xbin/su is root (UID 0), it can switch the effective UID of process to 0 when executed, hence enabling calling process to have root access.
This is a part of Discretionary Access Control (DAC); one of Linux kernel's security features.
MANDATORY ACCESS CONTROL (MAC):
Implemented since KitKat, SELinux can control who executes su binary, by defining Access Vector rules.
On userdebug/eng build of a ROM, adb shell (by executing su, as you have mentioned) and adb daemon (1) can make transition (2, 3, 4, 5) to run as root with unrestricted context u:r:su:s0 (6). But adbd can't be run as root on final user builds (7, 8), neither su binary is included. So, /system/xbin/su is intended only for developers to debug engineering or userdebug builds of a ROM, not for end user (9). And second special thing about it is its SELinux context u:object_r:su_exec:s0.
See Why “adb root” does nothing? for more details.
HOW ANDROID RESTRICTS ROOT ACCESS?
Keeping SELinux aside, on user build of a ROM that is intended for end users, placing su under /system won't give any advantage, even with set-user-ID-root. A normal app can't elevate its privileges to root by executing su because:

Starting with Jelly Bean, Android switched to file capabilities (a capability is a subset of root privileges) instead of relying on set-user-ID type of security vulnerabilities. A more secure mechanism: Ambient capabilities has also been introduced in Android Oreo.
System daemons and services can make use of file capabilities to gain process capabilities (see under Transformation of capabilities during execve) but apps can't do that either because they run with process control attribute NO_NEW_PRIVS set, ignoring set-user-ID as well as file capabilities. SUID is also ignored by mounting /system and /data with nosuid option for all apps.
UID can be switched only if calling process has SETUID/SETGID capability in its Bounding set (one of the 5 capabilities categories a process can have). But Android apps are made to run with all capabilities already dropped in all sets.
Starting with Oreo, apps' ability to change UID/GID has been further suppressed by blocking certain syscalls using seccomp filters.

ADB daemon, however runs with CAP_SETUID and CAP_SETGID (to allow switching to UID/GID shell???). But adb shell too can't get us capabilities by executing a SUID-root su binary because NOROOT and NO_SETUID_FIXUP security bits are set on adbd process. Contrarily on a debugging build, no capabilities are dropped from bounding set (10), so executing /system/xbin/su (with set-user-ID-root bit or cap_setuid,cap_setgid+ep file capabilities) would get us full root access.
Syscalls used in these sandboxing methods: cap_set_proc, setresuid, setresgid, sys_seccomp, prctl (CAPBSET_DROP, SET_NO_NEW_PRIVS, SET_SECUREBITS, SET_SECCOMP) are all part of Minijail.

Summarizing the above lines, DAC and MAC would only allow adb root and executing /system/xbin/su from adb shell on userdebug build of ROM. To have root access from apps and on user builds targeted for end user, we need to root the phone as explained below.

HOW TO GET ROOT ACCESS ON ANDROID?
So if we want to have privileges with UID 0 and all 38 capabilities of Linux kernel, we need a rooting solution that can deal with all above described security measures. Since the standalone su binaries stopped working with the release of Jelly Bean, a transition was made to su daemon mode.
Now on a rooted phone, a fully privileged daemon runs from the very start of booting process (in fact init is replaced). When an app needs root access, it executes su binary provided by the rooting solution. This su doesn't change UID/GID on its own, but just connects to super user daemon through a UNIX socket and asks to provide the requesting app a root shell with all capabilities. In order to interact with user to grant/deny su requests from apps, su daemon is hooked with an app that can display user interface prompts. A database of granted/denied permissions is built by su daemon for future use.
In addition to that, SELinux denials are also handled by defining SELinux policy allow-rules when rooting the phone.
New methods of root like Magisk work in system-less mode i.e. without modifying /system partition. Only boot partition - that contains kernel and initramfs - is modified to inject su daemon service and new SELiux policies. A locked bootloader won't boot modified boot.img, so bootloader needs to be unlocked. For more details regarding this, see Unlocking Bootloader. However there have been some rooting hacks that worked by bypassing above described security implementations without going for proper way of rooting. Most of such exploits and vulnerabilities in Android OS have been fixed over time. Here is a good write up on this subject.
So to conclude, placing su binary under /system or any other location won't give any benefit.
Also see How Magisk works? for more details.
PS: Please ignore so many links, they are for my own future reference.

any way to get root access in an app on a user_debug build? executing /system/xbin/su fails due to selinux, even with permissive mode!

@Paschalis nothing can fail due to SELinux in permissive mode. But it's not only the SELinux which causes /system/xbin/su to fail. The bigger problems are NO_NEW_PRIVS attribute and dropped capabilities for all app processes. That's why we need a background daemon. Answer to your query is already there: "To have root access from apps ... we need to root the phone".

TWRP isn't available for android 10, and booting into it fails to mount /system. And magisk patching of boot.img breaks as soon as I modify stuff at /system/lib64 and /system/bin/. I wonder if you could spare some time to discuss this over a chat. Thanks a ton!

@Paschalis I have been too lazy to switch to Android 10 so far. So I'm afraid I'd be able to help you on things specific to Android 10.

the way to go was magisk modules. I don't have to modify /system/. I just create some modules that override or extend /system. And it works wonders on a factory image. The only reason someone might want to modify /system thesedays it's if he/she uses an app that relies to /system modifications.

@Paschalis I run a Linux environment on my device. Linux tools are often using /etc to save configurations (if not modified to use some other location). So I find it easy to just make /system partition (where /etc lives) R/W rather than bind mounting (like Magisk does). So it depends on priorities and situations.


text:
Firefox wants to record video/audio
I have an Xperia Z5, running 7.1.1.
When I browse the web using Firefox, I keep getting requests from Firefox to record audio and take photos/videos. Both requests always happen together, in that order. I can't think of any reason why it would need to, but it does seem to happen only when I'm on pages with a lot of ads. I deny it every time, of course, but I don't tell it not to ask again, because I want to know when a request comes through.
So, my question is, is this normal? Could ads get Firefox to record video and audio, and if so, why would they? Or, could this instead be evidence of malware/a compromised device?

When the pop-up appears, there would be an option of "Dont ask me again", check that and it will never appear again.
And if for some reasons you need that allowed later, you can give it permission by going to Settings>Apps>Firefox>Permissions, switch on the permission for particular service you need.


text:
Opening JPG under Android/data/<app.name>/files/docscan-sdk/.../documents/<number>/ not possible
With the app of my health insurance, I am able to upload bills and other data via scans / photos of the corresponding document. In order to have my own repository of transferred bills, I want to access the corresponding files. However, and regardless of the access method (Android file manager, copy to PC via USB or FTP), I cannot view the corresponding image. At the same time, all file metadata (file size, access permissions, ...) looks "promising", i.e. it has reasonable file size, R/W-access is granted, time stamps correspond to scan / upload events, opening these files with notepad results in the usual garbage you'll see when opening image data...
Actually, I only want to know how I can view this data.
The curious, but Android ignorant me would also like to understand what is happening here. What do you need to do, to have image data available for everything but viewing?

There's a possibility that the image is actually encrypted by them for safety/privacy reason so it can only be viewed on their apps. At least that's basing on my bank/insurance statement PDF that asks for the password when opened on external apps.

Thxs, @AndrewT., I did not think of this obvious reason! As I see it, your comment should be marked as answer - if it weren't a comment ;-)


text:
What are the alternatives for Xposed framework on Pie? Preferably without triggering Safety Net?
Xposed development has been in a limbo with the last update being a beta released a year ago.
Die hard fans of Xposed  hesitate to upgrade Android, in the absence of Xposed support.This is true for the latest Android Pie as well. Magisk is useful but cannot replace Xposed for deep stuff. Yet another concern is Safety Net getting triggered when Xposed framework is installed through Magisk.
What are the alternatives available? Preferably without triggering Safety Net?
Note :

This is a self answered question to share my recent foray into this after upgrading to Pie.
Moderators are welcome to make this a wiki Q and A if it attracts more updates or if deemed fit.

There have been changes in Magisk /EdXposed drivers which are explained in this answer. Please see that https://android.stackexchange.com/q/218179/131553

There are significant changes in Magisk /EdXposed drivers which are updated here How to install EdXposed on Android 10 without triggering safety net
Please refer to updated installation instructions.

*Alternatives to Xposed (rovo89) are:

Virtual Xposed - a rootless Xposed and therefore far less capable. I didn't investigate further for this reason but I read that development on this has stopped (unconfirmed).

Tai-Chi Xposed by the same developer of Virtual Xposed and supports Android Pie. Said to be close sourced and likely to be paid module per some reports.

Edxposed. This is the alternative I chose.

Disclaimer: I am not a developer nor am I affiliated to any app or module.
Is it safe?
Yes
For an average user like me, two factors help decide:

Open Source Vs Close Source Edxposed is  Open source. I have no understanding of code and cannot draw any conclusion from looking at code. But yes, being open source means it is subject to scrutiny by knowledgeable folks and therefore safer (Please don't drag me into open source discussion, rather post an alternative answer :).

Provenance or trust attached

The last  Xposed update by rovo89 is also close sourced (as against earlier versions which are open source). This being close source would not have detracted people from using it purely based on developer's reputation.

In the case of Edxposed, my trust lies with Marcel (aka M66B) who has developed several privacy centered modules / apps such as NetGuard, Xprivacy, XprivacyLua and FairEmail. For me, when a staunch privacy advocate like Marcel starts development using EdXposed(edit-completed development), that's pretty much sovereign guarantee despite some warnings about close source (Incidentally, this claim is incorrect and a Reddit user informed XDA portal. To clarify again, it is open source)

Is it as good as Xposed and can I use all Xposed modules?

It is not (yet) as powerful as Xposed because it lacks support at this stage for resource hooks but it may get added hopefully.

It is still in beta stage but a lot of modules work already. See [Updated] List of Xposed modules for Android Pie working with Ed Xposed Framework for a list of working and non-working modules which is being updated. Take this list with a pinch of salt - it may mean anything from doesn't crash and works partially to fully works. See last question below.

For me XPrivacy Lua works and works far better on EdXposed than on the beta version of Xposed on Oreo. Another must module for me is Maxlock which works fine. Only one I want is GravityBox and C3C076 , developer of GravityBox is considering development for EdXposed and it is likely others follow suit.

Does it pass Safety Net?
Yes :)
OK, how do I install it?
Check for updates from corresponding links below as they would change being a beta. Valid as on 12 Feb 19 and will not be updated in this answer. See How to install EdXposed on Android 10 without triggering safety net for a more recent method
Source Android 9.0 uses xposed solutions as updated
Use Magisk order to install these modules in the same order ( You won't find them in the magisk repo. Download them and from Magisk Downloads option click on the + to install and they will appear as Magisk Modules)

Magisk-riru-core-arm-arm64-v10.zip

Magisk-EdXposed-arm-arm64-v x.x_beta-release.zip

Don't reboot yet , install XposedInstaller_by_dvdandroid_19_10_18. apk or from XDA

magisk-EdXposed-v0.2.9.8_beta1-release.zip (check for updates in subsequent releases)

Reboot.

Does it work on modded UI's like that of Samsung , MiUI, Poco etc?
Traditionally XPosed always had a problem with such devices but EdXposed seems to fare better. Issues with some devices are reported so YMMV (check out the linked XDA thread)
List of  modules that are  fully optimized?
Developers would need to upgrade their modules for working with Pie AND EdXposed. As of now, the following modules meet these requirements

XPrivacy Lua

Xposed Edge Pro

Gravity Box Beta released on 08 Mar 19.

Notes

You may need multiple reboots.

Ignore the warning on the installer Xposed not yet compatible ...with SDK 28...or your Android architecture (see pic below).

You may find at times that installer is disabled - reinstall and reboot to fix. For some , soft reboot from installer fixes the problem (root permission needs to be given for installer).

Whenever Installer is upgraded, it is better in my experience to uninstall the earlier installer and install the newer one to prevent instability

Your device may be noticeably slower to respond - that's a price to pay till things stabilize.

Some modules may work with earlier versions of Edxposed and not with later versions or vice-versa.

Pro-tip Just in case you land up installing a module that ends up in a boot loop or creates some other problem , it is handy to have [Tool][2018.8.1] Magisk Manager for Recovery Mode (mm) installed so that you can disable or uninstall the Xposed modules from Magisk.

Screenshots are from my MiA1 (Android one) running stock OS with latest Magisk 18.1

(Click to enlarge)
Happy Xposing !

Taichi is on GitHub here: https://github.com/taichi-framework/TaiChi

TaiChi is on GitHub, but its source code is not. The developer does not want to open source it.

Relatively new entries on the scene are SPatch (Beta) (tried) and perhaps a lesser popular Xpatch.
What is SPatch ?

Let devices without root or bootloader unlock to use Xposed framework!
SPatch is a new root free Xposed framework, also available for devices
not unlock bootloader. Support both ARM(SandHook) and X86(SHook, for
Android emulator)

System requirements:
Android 6.0+ (Support Android 11)
256MB ram or more
128MB free disk space
Usage
Spatch has some kind of Virtual xposed look and feel and overall functionality is almost similar though the former has extra tweaks for pro users plus users can install SPromoter (a helper app) for module management

Open SPatch app and wait until password activity appear
Input zero four times, then long press D button
Click visit button, remember numbers that pop up from the top of window, then input the numbers you remember
Click M button for Xposed or Cydia modules injecting, V for virtual machine, T for hack tools, rest of all for your explore
Click add button for add application you installed or apk file in internal storage, wait for action finish then reinstall or install
application. Application you add by SPatch will load all Xposed
modules you installed. You can use SPromoter for module managing.

What is Xpatch

Xpatch is a jar tool which is used to repackage the apk file. Then,
the new apk can load any Xposed modules installed in the android
system.
This is a way to use Xposed modules without root your device.
It is easy way to modify one app using xposed module. And any apps
changed by Xpatch can load every modules downloaded in the Xposed
Module Repository.

Haven't used Xpatch but from the developer page, the usage instructions are provided:
How to use

Download the latest jar file from the my github release page.

Run this command in the Windows/Mac console:
$ java -jar ../../xpatch.jar ../../source.apk

Basically the main idea here is that a new apk is produced in the same folder as source apk.
This apk can load any xposed modules installed in the device.(Support up to Android 11)
Learn more here
Xpatch source code: https://github.com/WindySha/Xpatch

sure thanks! will try LSPosed, right now on nougat but planning to upgrade to pie soon.

Just an update, managed to install LSPosed, and its very ideal, loving it ;)


text:
ADB claims that app is not installed when uninstalling and that it is installed when installing
Gboard kept crashing when trying to open the settings, so I wanted to uninstall and reinstall it. Google Play Store kept giving me the error code 910, the advice for that was installing it with ADB.
The command
adb install -r /home/fabian/Downloads/com.google.android.inputmethod.latin_7.9.7.230658658-release-armeabi-v7a-26790713_minAPI21\(armeabi-v7a\)\(nodpi\)_apkmirror.com.apk

gives me the output
Failed to install /home/fabian/Downloads/com.google.android.inputmethod.latin_7.9.7.230658658-release-armeabi-v7a-26790713_minAPI21(armeabi-v7a)(nodpi)_apkmirror.com.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install com.google.android.inputmethod.latin without first uninstalling package running as com.android.inputmethod.latin]

This is weird, since with the -r flag it should have no problem with an app that is already installed. Apart from that, it is not installed, I checked the app list, the /system/app directory, as well as /data/data. And when I run
adb uninstall com.google.android.inputmethod.latin

, the output is:
Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown package: com.google.android.inputmethod.latin
    at com.android.server.pm.Settings.isOrphaned(Settings.java:4134)
    at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:18419)
    at com.android.server.pm.PackageManagerService.deletePackage(PackageManagerService.java:15836)
    at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:888)
    at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:792)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:118)
    at android.os.ShellCommand.exec(ShellCommand.java:94)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18682)
    at android.os.Binder.shellCommand(Binder.java:468)
    at android.os.Binder.onTransact(Binder.java:367)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3150)
    at android.os.Binder.execTransact(Binder.java:565)

So what can I do to install GBoard again?
Fairphone 2, Android 7.1.2, "Fairphone Open", root enabled

Did the app come pre-installed?

@esQmo Right, important detail: I flashed openGApps, because "FairphonOpen" has no Google Apps in them.

It seems like the package wasn't properly uninstalled : This happens usually if you delete the APK from /data/app or /system/app or /system/priv-app instead of uninstalling the app. That is why probably the adb uninstall command isn't working.
Maybe you can try reinstalling the app again after rebooting your phone?Tip: If this is the only keyboard app on your phone, it would be better if you install another keyboard app just as a backup before rebooting (especially if you have a text lock screen password).
If it still doesn't work after rebooting, try uninstalling the app only for the current user and then reinstall it from the play store.
adb shell pm uninstall --user 0 com.google.android.inputmethod.latin

Also, if possible, please also share the output of this command
adb shell dumpsys package com.google.android.inputmethod.latin

(Sorry, I am a new member and do not have commenting permissions yet; that is why I have to mention it here.)

Output of the first command: Failure [not installed for 0] Output of the second command: `Renamed packages:
com.google.android.inputmethod.latin,com.android.inputmethod.latin
Dexopt state:
Unable to find package: com.google.android.inputmethod.latin
Compiler stats:
Unable to find package: com.google.android.inputmethod.latin` And yes, I did reboot.

Oh, I just remembered that the app that I used to uninstall GBoard had made a backup of it! I restored that backup and it actually worked. Now I'm back at the state where GBoard crashes every time I open the settings.

Afterwards, uninstalling and reinstalling worked. This doesn't solve the question, but I don't need an answer anymore.

I still suspect that my initial statement was right. Maybe the app that you used to uninstall GBoard didn't uninstall it properly. It probably just deleted the app APK from its system applications folder, so the GBoard app didn't get properly unregistered from the system.    Then, when you restored the backup, the app probably put back the APK from where it had deleted it earlier and hence it might have started working again.

So you mean that just putting the APK file into the right folder would have solved it as well?

Probably. But you had also mentioned in your question that you hadn't found anything in your system apps folder. Maybe the uninstaller had deleted the folder?

The entire system app folder? No, that would have destroyed everything. But the app wasn't in it anymore.

No no, I didn't mean the entire system app folder . I meant the folder of the keyboard app — /system/app/LatinIME or /system/app/LatinIMEGoogle for AOSP Keyboard and GBoard, respectively. (However, the folders could have also been named differently based on the developer of the ROM)

I don't have a folder with either of those names, even with GBoard installed again now. I had originally looked for "GBoard".

This doesn't solve the question, but I managed to work around it:
I had a backup of the app, restored that back to the system partition, then I was able to uninstall it with ADB (without google. in the package name) and install it again.

Ok. This is something different. com.google.android.inputmethod.latin and com.android.inputmethod.latin are 2 different apps. The one with 'google' in the package name is called GBoard/Google Keyboard whereas the latter one is called Android AOSP Keyboard. The GBoard app doesn't usually come pre-installed on open-source systems (you said that you have a Fairphone) whereas the GBoard is a part of Google Apps (you mentioned that you flashed GApps). However, it is also worth noting that it is not possible to have a phone with both these keyboards as system apps.

Maybe I now understand why GBoard crashes for you; there are 2 libraries of the names libjni_latinimegoogle.so and libjni_keyboarddecoder.so which are required by both, the AOSP Keyboard and the GBoard. The OpenGApps installer script shows that if GBoard is to be installed into the system, then a different version of these 2 files has to be put into the system and the AOSP Keyboard has to be removed. This doesn't seem to have happened in your case, and hence the crash. However, when GBoard is installed as a user app (non-system), it doesn't seem to need these 2 files to be in the system.

@ManasSambhus After a lot of back and forth I finally managed to install it as a user app. Still crashes in the preferences.

As soon as the app crashes, you can check the reason for the crash in the /data/system/dropbox folder. Sort the files by newest to oldest. Look for files that are named as data_app_crash or system_app_crash. However if these files happen to have a .lost extension, then you might be out of luck.

@Manas https://pastebin.com/6khqGpbw Googling that error message leads me to a two year old bug report on Github where the only advice seems to be a factory reset: https://github.com/opengapps/aosp_build/issues/116 But what I did was installing the OS, updating it and then installing Google apps, so I don't think another reset would help.

I solved it by:

pm uninstall com.google.android.inputmethod.latin
pm uninstall com.android.inputmethod.latin
Removing <renamed-package new="com.google.android.inputmethod.latin" old="com.android.inputmethod.latin" />
from /data/system/packages.xml
Reboot


text:
How to restore phone numbers from contact.list file to my phone
I made a backup using tunesgo software which turned to be a scam, I couldnt restore the backup I must to pay for them 40 dollars!
I managed to extract the bak file using winrar but my Xiaomi mi max cant read the contact.list file and I cant get my phone numbers back. please help

So I have a solution but it is not totally able to re save them on your phone,you will only be able to save them in a word file
1-convert the .bak (backup) file to into zip file by renaming it and changing the last word after the dot from .bak to .zip
2-unextract the zip file with winrar , open the folder and you should find contact.list file,leave it.
open a new document notepad , choose open and click on the "contact.list" file to open it in the notepad text
3-now select all and copy them into a word file,you can search for your numbers or specific contact by the search and replace tool of the microsoft word.


text:
No GPS on Alcatel 1T 7
Before I bought this tablet, I have been exploring about it on internet, and found on GSMArena that it has built in GPS.

On Alcatel official site it also says that it has built-in GPS

But when I try to start navigation with HERE WeGo app, app doesn't allow to start navigation because GPS isn't turned on.

But in settings it is set to "High accuracy", which means that tablet uses GPS, Wi-Fi, Bluetooth.. to better determine location.

Does anyone had same problem or does anyone know solution?
Btw. I am sorry because language on tablet is set to Serbian, but I translated what is important.

The red box for the specs say GPS (LATAM Version Only). What version/model number do you have?

Model: 8068, Android: 8.1.0, Kernel: 3.18.79, Build number: 01003. And what does LATAM mean?

LATAM means Latin America, so for devices for sale to that region it will have GPS. However all I can find the Model 9009G - Alcatel 1T 7 3G. I would see if Google Maps gives you accurate location, and check if HERE WeGo has all the permissions granted. My fear is that the Yes with A-GPS from GSM Arena implies that the 9009G would need a sim/data plan for use, see: Assisted GPS

It is not 3G version, it just has Wi-Fi. And HERE WeGo has all the permissions that it needs, so does that mean that this device doesn't have GPS even if there is setting for enabling it in settings?

Correct. If Google Maps Go gets a reasonable fix, it may be due to their large collection of WiFi locations. Other tablets have GPS so can take a while to get a fix (even offline), but if the tablet doesn't have a GPS chip, all you can get is coarse location.


text:
On Kindle Fire 8, granting permission to Android apps
This is a modified cross-post from ebooks, but perhaps more of an Android question since Kindle Fire runs on a bespoke Android build.
I have a Kindle Fire 8 (7th gen) running on Fire OS 5.3.6.4, which I believe is the same as 5.6.3.0, just misnamed. The underlying Android build for this is Android 5.1.1 Lollipop.
I use RescueTime on my MacBook and Chromebook to log my on-screen activity, which has been tremendously useful. Unfortunately, while there is a native Amazon app for RescueTime, it is not compatible with any recent-generation Fire.
So I tried installing RescueTime on my Fire two different ways: First, through an APK, and the through Google Play, which I use for common apps not available through Amazon like WordFeud.
To be useful, however, the app needs access to the Fire's app activity so I can track when I'm reading a book, the news, or, well, playing WordFeud. When I log in with either installation version, I get a generic android screen asking for permissions:

I've got through the Fire's settings ad nauseam without luck. I see a "Device Administrators" option under "Security & Privacy," but when I open it I don't have any options to enable specific apps. All it offers is "Find My Device" and "Google Pay."
Is there any way, besides rooting the Fire and installing a native Android build, to allow apps to access the more generic Android-level permissions? I don't mind rooting the device -- it's out of warranty -- but would prefer not to switch the OS entirely. Thanks!


text:
google services has stopped wont stop long enough for me to fix the problem cant even get into my settings
google services keeps looping gives me no time to fix due to it just keeps forcing me back to same looping message cant even get into my settings for long enough to repair because it just throws me back to the same looping error screen

This happened to me also and here is how I got past it. I also used this to recover my friends phone.
The high frequency of the app failures makes it very hard to access the settings menu and make your selections. Even so, tap the failure messages to get them to close. In between tap or try pulling the settings menu down from the top of the screen. After several tries it seemed there was very slight pause in the failure cascade. I used that slight pause to make my settings menu selections. Either way, after pulling down the settings menu I selected Back up / Reset. You have to keep closing the failure messages and try flicking the menu down to the option you want but it is possible if you are quick and persistent. I just factory reset mine, but I've read suggestions to clear the caches of several apps central to the phone's operation. Tomorrow I have another to do and I'll try clearing caches then return to update on how that worked.  Best of luck.


text:
How to use old phone (LG G3) as wifi client bridge via micro usb ethernet adapter
Looking to see if I can use an android phone to "get the internet" from wifi and provide it to a ethernet cable that I intend to run way beyond my wifi range to another router I have configured as an access point. The single string data flow architecture is as thus:
[wifi device wanting WWW, e.g. iPad]<-wifi connection->["far away" wifi Access Point]<-wired connection->[micro usb ethernet adapter]<-micro usb charge port on phone->[Android phone (LG G3)]<-wifi connection->[primary wifi router]<-ethernet cable->[cable modem]<-coax->{WWW}
Does that make sense?
Is it possible?
I know I should be flashing DD-WRT to a wifi router and configuring it in client bridge mode but I don't have a spare DD-WRT compatible router lying around. I do have multiple un-used but working 2015 vintage android phones sitting unused.

How to make Ethernet work on Android over OTG?


text:
Why is my Android activity showing up on myactivity.google.com?
I never consented to this and there was no indication anywhere that activity on my Android phone would show up in Google's My Activity. I see stuff like "com.google.android.pack" and other stuff. How do I STOP this information from being sent to Google? How long has this been going on for?
What information gets sent? For instance, I just read My Activity has detailson the photos I've taken. What kinds of details? How does Web & App Activity differ from Device Information? Does Web & App Activity the setting that controls whether information about apps I use is sent to Google? Does it send my Chrome browser history to Google? It looks like it controls my Pixel's default camera app, too. Is there a way to keep search history on but not the camera info being sent?

"Does it send my Chrome browser history to Google?" ... Oh boy.... aren't you in for a treat

@Slav I'm serious. Chrome is not set to synchronize my history, tabs and so on with Google, so does it still do it with these settings? I know Google has privacy issues, but if Chrome is transmitting my actual history—not just stuff like search suggestions and what not—then that is something that was not made clear in the least.

"Chrome Sync" is to synchronize between different instances of Chrome. It does not control what is sent or not sent to Google Account servers. The latter you control through myaccount.google.com -> Activity controls -> Web & App Activity -> Include Chrome History

On your phone, navigate to Settings > Google (or Accounts and select Google account). Then click Google Account > Data & Personalization.
Under Activity Controls section you can review and turn on/off many of these tracking features. BTW, you consented to this when you skimped over the ToS Agreement and just clicked "next, next" when setting up your phone.
Each section explains what it saves/tracks.

Web & App Activity is specific to Google Apps and Websites (maps, search, account, etc). It also includes 3rd party Apps you use on Google's OS (i.e. Android). It also includes history (i.e. Chrome History) of these apps. Thankfully, the latter can be separately disabled.
Device Information is more for preinstalled Android apps, like Phone and Contacts, voice searches, etc.

Oh and it has been going on for years.
The only "recentish" change is that logging into 1 Google Service (for example, Maps) also logs you automatically into other Google Services (like YouTube, Gmail, etc)

Is the Chrome history done through the tab synchronization thing?

Has this been happening with only certain Android versions?

@Melab been happening since I started using Android, which is at least 4 versions

It looks like it was unchecked by default. Is it unchecked by default?

+1. Slav is right. @Melab by default it is checked. You may also want to see my related answer


text:
How to limit Google account access to selected apps?
I have used Google Photos App on iOS and the google account there allows me to disable access to the other google services where I don't see my other accounts in all Google Apps like Youtube, Gmail, Drive etc.
This can't be done as far as I know on an android device. Although I can turn the automatic sync off but the account is pretty much there on all apps.
Is it possible in some way that I achieve the same behavior as in iOS. It's pretty strange that google apps are giving more options on iOS than on Android.

I don't use Google products but there are two non-root possible ways I can think of. Either restrict Google apps' (YouTube, Gmail, Drive) ability to read accounts by denying AppOps operation GET_ACCOUNTS. Or add Google account to a new Work Profile and use Google Photos in that profile.

I wanted to use Meet for workplace meetings but I absolutely didn't want my workplace account to be all over my phone, my emails, calendar etc. So I have installed Shelter. It's a delight to use. The app itself looks simple, it has two tabs, Main and Shelter. Initially I had only very few apps in the Shelter: Contacts, Files, Google Play Store (and Moto Actions). I can see them in the launcher, they have a little briefcase overlay, here are three normal icons with two versions of the Play Store:

I launched the work Play Store, added my workplace Google Account as prompted, installed Meet, the screenhshot has Messages next to it to show the difference:

The apps outside of the Shelter do not see my workplace account. This is absolutely perfect. Here's how Shelter now looks:

Link is dead and I can't find this app anymore. Is it still a thing?

Yes. https://github.com/PeterCxy/Shelter

There are two ways to do it.
Method 1 - Ugly
If your phone supports multiple sessions (I mean this), then disable GApps except Google Photos in the new user session.
Method 2 - Better
Use Parallel Space and just run the Google Photos A.P.K. in it
I'm not sure here but I think if you are a privileged user you can direct the sign in to a webview.
As suggested by @chx, Shelter is good, I just tested it, makes clone for these apps when I tried to do it for Google Photos.


text:
Hard Reset to Factory Settings without USB access
I've got an Asus ZenPad 300C that is crashing constantly. Things I have tried:

Clearing cache. I am unable to access Settings to clear the cache but was able to run a clean-up app, which I think did some of that. No effect.
Factory Reset. If I use Power+Volume Up to access recovery mode I can see the options - FASTBOOT MODE and POWER OFF, but the power button doesn't work so there's no way to actually select FASTBOOT MODE. I tried connecting via USB to run ADB and do it that way but USB Debug mode is not enabled and I cannot get into Settings on the phone to allow it because Settings crashes.
Battery. I have removed the back and temporarily disconnected the battery but that made no difference.

Is there any other way to perform a hard reset or troubleshoot and fix this issue or is it done for?

You can still flash it though. Flash a stock firmware for your model number and your crashing should be fixed.

Can I flash it if I don't have access to Fastboot on the device or via ADB?

I completely forgot you don't need debugging and all things. On Windows/Mac/Linux:

Just open an internet browser and go to https://www.google.com/android/find
Enter your email ID and password (which one used in Asus Zenpad Z300C)
If you have multiple devices with the same ID, then selected Asus Zenpad Z300C carefully
If only one device is registered, then skip step 3. And on the left-hand side, select the option ERASE DEVICE.
Might be Google will confirm the password again. So enter it again.
Done.
Your device is now factory reset.

Note: Your device Asus Zenpad Z300C needs to be connected to the internet to perform this operation, prefer a WiFi connection.

I think this would work - but the device is not signed in so not listed under the Google account or Find My Device and it's impossible to sign in because of the crashing. So unfortunately, not successful.

Try this 27673855# or *#7780# this are universal code to format android   I not sure it will work on Asus tab. NOTE:- Perform  on your own risk.  I am not responsible for any damage.


text:
Which part of Android directories contains so-called proprietary blobs?
When building AOSP (Android Open Source Project) or LineageOS, there is a tool named breakfast. It downloads proprietary blobs and integrates them to the source tree.
I have read this article, does it mean all of the blobs are under  /system/vendor/ directory?
Do those binary files also exist in Android filesystem? And where are they?

Yes, binary blobs are part of Android filesystem. Android can't boot without them as they are kind of hardware drivers for the device. Most of those are found under /vendor/lib(64), some also under /system, /etc and /bin. Before Android Treble, /vendor wasn't necessarily a partition but a symlink to /system/vendor directory. Starting with Oreo, /vendor is a partition, containing all content related to OEM and SoC vendor. Most of the blobs are executable files or libraries, run as independent services on boot. See this sample proprietary-files list.
In addition to that, the first partition (usually labeled modem) on eMMC contains Radio/RIL related firmware. Another partition dsp contains Qualcomm's Digital Signal Processor related binaries. They aren't built with ROM but are part of Android filesystem tree, mounted at (/vendor)/firmware and (/vendor)/dsp. Their execution is isolated from the rest of the device.
Many partition related to bootloaders are in themselves complete binaries, such as aboot, sbl, rpm, tz, cmnlib, devcfg, keymaster, lksecapp on Qualcomm devices. Those aren't mountable filesystem, but directly executed by bootloaders during boot process. All of them are proprietary binary blobs; the closed-source part of Android devices.
PS:
Android (a superset of AOSP) isn't a generic OS which can be installed on any hardware like we do on PCs. Support for the hardware is locked down to proprietary binaries (HALs) by the OEM and/or silicon vendors. So the binary blobs are critical, and the open-source AOSP (including modified Linux kernel source provided by Google) is of no use without hardware drivers. And the manufacturers rarely document the working of their hardware so that developers like Replicant can implement an open source driver. There is very small set of hardware components on Android devices that you can expect to be handled directly by making syscalls to kernel as is the case on PCs. The only notable addition by SoC vendors / OEMs to generic kernel source already modified by Google (1, 2) is the handling of non-discoverable devices (defining device nodes). Rest of the hardware related stuffed is handled in userspace through binary blobs.
Further reading:

Android Device Partitions and Filesystems
Android and Linux Kernel Drivers
Android HAL and Device driver architecture


text:
Game Servers and ROM
Are there any ways to change the server of a game without flashing ROM, or to keep the same server after flashing a ROM from a different geolocation?


text:
How to use external OTG webcam for video calls/conference/talks?
I am sorry if this is a dumb question. I thought this was an easy task, but either I am searching in the wrong direction or this isn't easy at all.

I want to make a video call (like Skype, Skype fo Business, Jitsi ... whatever) using a (external) webcam.

Thats it. My phones (I have a few here, all different vendors from Samsung to 3chintsa) all have two cameras (front/back), which are working fine. I can call (video call), switch cams, conference call my cats - everything is perfect.
Additionally I have an external cam, which also works fine by itself. I can use "IP Webcam" apps, take fotos, make videos, use it as remote cam ... works flawless. Except one thing.
I want (reads: need to) use this camera as a ... camera. Within video calls (app doesn't matter, everything would be fine). But almost no app lets me change or chose the camera, except from switching front to back.
Why would I want to do that? We have a (surprisingly well done) "handsfree microscopic magnifier headset" that, so the idea, should be used as a "remote support assistent" helper, to guide people remotely fixing stuff. We (a non profit org) are trying to reduce our carbon footprint by no longer flying around the earth for visual diagnosis on our tech and/or guiding locals to fix things by themselves. Am I to far from reality here?
I couldn't find any app that lets me do that. What am I doing wrong?
I have tried:

Skype
Skype for business
Jitsi (App)
Duo
IMO
JusTalk
KiK
WebRTC
Hubl

I am I missing something important here?

Android 9 has native support for external cameras, but in order for it to work it should be implemented by the manufacturer, which according to anecdotal reports I saw online isn't done by most or even any of them. I just faced the same problem myself.
One solution is to patch the Android kernel on your device to turn on the support for the feature at the Hardware Abstraction Level (HAL). People have done it successfully, but you will lose your warranty and it's not easy to figure out.
Another solution is to take an open-source app and tweak it to support UVC cameras using an appropriate library. I've got an estimate from a highly experienced mobile developer that it'd take 40+ hours. There was a feature request made to add UVC-webcam support into Jitsi Meet for Android. You can follow the link and express that you need this feature too, maybe the maintainers will prioritize it.


text:
rooting gigaset phone
I am trying to root my Gigaset phone (GS 160), but I couldn't make it with
http://kingoapp.com (probably the model is not supported)
and
https://towelroot.com (model is not supported)
Does anyone have another tool in mind that could work?
Thanks for your help

Try OneRootClick
they have quite a good range of phones they can root.

Thanks! apparently on https://www.oneclickroot.com/rootable they say they have no support yet  :( ....thanks anyway


text:
LG V20 stucks on "firmware update, now looking for any connection" message
I powered off my LG V20 and 3 hours later went to turn it on and it says, "firmware update, now looking for any connection". It appears stuck on this screen. I can't do anything.
Any suggestions?

I fixed it myself. I held the button down for a while to try to turn it on.  Finally, the screen changed where I could toggle and select power off to stop the cycle.  It worked and the phone powered down.  I turned it back on and good to go.


text:
Do I Need a Super User app on a rooted phone?
Our company uses a few devices for in house tasks.
I have the SU binary flashed to my devices. I have proprieteary apps installed that access the SU through hardcoded shell commands. My devices are completeley locked and cannot install new apps (no package installer, custom recovery, and re-engineered USB ports) so I don't really have any security concerns.
At the present we rely on a 3rd party SuperUser app to grant privaleges to our own apps. Is there a way to Automatically grant SU priveleage to all the apps on the device (we trust them all - because we wrote them) without prompting the user?
Understanding that a few SU apps do have a feature to "allow all" I still ask because I would like to avoid using 3rd party software completely.
Can I just remove the SU app, or do I need to write a replacement?

From where did you get the su binary?

flashed it from a zip before we installed our own recovery

And who provided that zip?

Pulled it from here , worked for us.

I think you can Allow All and then delete the su app...

Also, you probably just need build you own SU app... One that does nothing.

@sh7411usa those must be really old devices if just placing su binary elevates root privileges. Starting with JB, it went on getting harder and harder. Anyway, granted/denied su requests are managed by UI app and usually stored in a file somewhere. The latest rooting solution Magisk, for instance, stores its settings in SQLite database file /data/adb/magisk.db. You need to figure that out to make su work without UI app. I'm not sure how strongly this old su binary is hooked to the UI app.

Answered here

@Irfan Latif - having read your link, would that imply that on ICS (yup! our devices are that old) we would need a root permissions manager?

@sh7411usa not necessarily. You need to find some su binary that works independently without permission manager app. I'm not sure if any such working thing exists. Another workaround would be to create a database or config file (wherever su saves permission granted/denied policy) for all possibly installed apps and put that database on all devices.


text:
Proc-folder: App generated almost a thousand sub-folders
When I was searching with the "File Manager" app (com.alphainventor.filemanager) for some files in the root-folder, it generated hundreds (almost a thousand) folders in the proc-folder.
[I don't have root-access btw., but still can see some files there.]
They're named just 1, 2, 3, 4, etc.
Each folder has about ~40 files in it.
I already found out, that those are virtual files, that eat like no space.
However I would still like to clean those up.
Is there any smart way to do this?
I was hoping, they would be removed by restarting the system or deinstalling the app, but so far nothing worked. :/
I am on an LG G7 with Android 8.
Any help would be greatly appreciated.

When talking about a specific app you should always name it including PlayStore link (or a different app "store").

On all operating system based on Linux kernel, procfs is a virtual filesystem. /proc/1 is the PID of init, the very first process that starts all other services and processes. /proc/2 is kthreadd, the kernel thread daemon that (along with its children) coordinates between kernel and userspace processes. And so are hundreds of other directories in /proc, each number denoting a process ID. /proc is managed by kernel, and an app can't create directories in /proc under normal circumstances even with root. Where are these directories exactly located in /proc?

They are all directly in /proc.
I also remember, that it when I was doing the search (search-term "APK" in the root folder) the Filemanager showed me everything multiple hundret times and the list with results was growing and growing. (Probably it was showing me some results from this proc folder, but I can't remember anymore.)
And as I said, all those new folders in /proc were generated at exactly that time.

@OwlTown so you think that app created directories /proc/1, /proc/2 and others? And those created directories have files named mounts, cmdline, status among many others?

No, the subfolders in there are: attr, fd, fdinfo, map_files, net, ns, task -
Not sure, if the app created it. Probably they were created by the system, but because of something the app was doing. Maybe a bug in Android or the LG-version of it.
In any case they are still there.

@OwlTown attr, fd, fdinfo, maps, net, ns, task... they are all expected to be there. See this. It's how Android - in fact Linux kernel - works. Everything is in place, you don't need to be worried about.

No it's NOT. There are almost thousand folders for processes, which don't exist. And they are not removed. That's the whole point I was asking about it. Does nobody know how to reset/clean those?

@OwlTown sir what you are saying is utterly impossible. A virtual filesystem lives in RAM and is totally cleared on reboot. Then it's repopulated by kernel on every restart. And there are around 150~200 userspace processes and 700~ 800 kernel processes (kworkers etc.) running all the time. They can't be removed. Use ps axf command with root access to view all the running processes. Dead process are auto removed from /proc. If you are sure a process doesn't exist in actual but isn't removed from /proc, please mention its name to clear the confusion.

/proc is very special in that it is also a virtual filesystem. It's
  sometimes referred to as a process information pseudo-file system. It
  doesn't contain 'real' files but runtime system information (e.g.
  system memory, devices mounted, hardware configuration, etc). source

Therefore the directories and folders you observe just represent the processes started by the app. If you see them that the app has still running processes. Some apps contain ant-reverse-engineering technologies by using multiple processes for monitoring each other. Also the Android system may start multiple smaller processes for one app e.g. for background service(s).
Conclusion: The proc file system is nothing you should worry about. Just ignore it.

I know, what it is. But the processes are definetly not running anymore. I deleted the app, deleted its data, and restarted my phone.
Also I looked at the processes with another app. There is no app connected to those dead ghost processes.
Also I am just not sure, if it's good for the system, if there are like 40 000 more files on it. Files, which are  not needed by anything.

@Owl: If you already know that much you should write it in your question. You should also name the app and post more data like the process list with the processes you are talking about. May be the app is malware and has persistently installed itself on your phone?

Ok, the App is called "Dateimanager +" from "Flashlight + Clock".
In english it might be called "Filemanager+".
About the folders:
There were generated in exactly that moment, when I was searching in the root-folder.
The other app I have to see ... already deinstalled it. Will look for it later.
However I made a screenshot. Those dead processes have their PID, but no UID and GID. And there's also no process linked to them.
They have package names like: /init, kthreadd, ksoftirqd/0, kworker/u16:0 and many more.

@Owl Just post the Google Play Link, based on your description it should be this app: https://play.google.com/store/apps/details?id=com.alphainventor.filemanager

Yes, that's it!

@Owl Wait a moment, is this the app that is causing the proc entries or the one you used for viewing them? I only want to know the app that is causing those entries of course.

Yes, it's the app, which generated the folders, when I was doing a search for "APK" in the root folder.
I also remember, that it was showing me everything multiple hundret times and the list with results was growing and growing.
(Probably it was showing me some results from this proc folder, but I can't remember anymore.)


text:
Make device take power only from charger when the battery is full
I made a device that is up and running (screen is on) 24/7 and connected to AC charger. After only 1 year, the batteries of these devices are dead. I don't really understand since the device is directly connected to AC, the battery should be bypassed and never been used.
I made some current measurements and I discovered that the current consumed by the device is sometimes 0 for ~1 minute. So it is obvious that the battery is working because if AC current is 0 while the screen is on, it means the battery is working.
This power management does not make any sense. Is it the expected one? Is there any hack I can do using ADB commands?
thanks

"I don't really understand since the device is directly connected to AC, the battery should be bypassed and never been used.
If you mean li-ion battery, cycle use is recommended
since keeping it fully charged for 24/365 may shorten its life cycle as in your case.
Since you need battery as backup only, use UPS (Pb  gel battery) coming with bypass instead

This is a fairly frequent requirement, when doing DIY smart home or similar. It's easy to repurpose an old tablet/phone for a control screen, but the issue with power (and dying battery) is ever present. How do you fix it with a UPS? A tablet charge cable can be easily hidden in-wall (in-mount), but how do you hide a UPS? Finally, how would you configure the UPS to only turn on an supply power once the device battery is nearing depletion?

" how would you configure the UPS to only turn on an supply power once the device battery is nearing depletion?

" how would you configure the UPS to only turn on an supply power once the device battery is nearing depletion?
Just replace your device battery with small UPS.
Rear window car camera comes with small capacity li-ion battery back-up but when you leave your car, camera gets disconnected from charger and li-ion battery leaves fully-charged status overnight.
Use 2 batteries and a switch  to make one charged on even days and the other on odd days

Car camera? I had to go re-read the OP several times to make sure I didn't miss any references to car cameras.... or cars... nope. Sorry dude, you totally lost me there

smartphone's battery comes with charging controller built-in to prevent overcharge but a user is advised not to keep his/her smartphone connected to the charger, while making phone calls.
I used my Android tablet as PC with external usb mouse, 3g modem, keyboard connected and non-stop charged.
Today I develop 3D scanner with 20 usb  5Mpix cameras, sensing OTG charging pin. USB camera if connected to charger or PC switches from camera mode into charging mode, so I need to disable sensing pin with Arduino to keep camera on, when connected to PC via hub for data transfer. No easy solution

Thank you for your answer but I cannot change the battery type. My devices are already on production and I have no access to them. Is there any adb command I could run remotely to change the way the battery is managed?

there is a nice app for Android, called Battery Doctor
https://play.google.com/store/apps/details?id=com.ijinshan.kbatterydoctor_en&hl=en_US
just read about the features supported
not sure if you can emulate Battery Doctor with adb commands
http://adbshell.com/
" Healthy Charge Master
Monitor charging status and extend battery life when charging.
"❄Battery Cooler
Battery Cooler feature accurately detect phone temperature, disables heat-producing apps to cool down battery.

Hi again,
I have got such message emailed:
Make device take power only from charger when the battery is full
"
Please do not post throwaway answers. Provide a specific solution with steps needed to achieve th...
"
See all of your inbox items:
https://stackexchange.com/users/6109220?tab=inbox
The problem is don't have any such inbox, since link is invalid

There is no easy solution to your problem since chemistry of Li-Ion cells bans charging to be 24/365 on, due to pillow syndrome.
Share more details about your device if you are looking for specific solution.


text:
TWRP: adb devices works in recovery but fails in sideload mode
I want to install a custom rom (LineageOS with microG) on My Asus Zenfone Max Pro M1. I followed every steps detailed in the tutorial (enable debugging, unlock bootloader, run fastboot, flash TWRP, reboot in recovery,  backup then wipe the system with TWRP).
My problem is when I want to sideload the custom rom. So, adb devices works and detects my phone in recovery mode. However, as soon as I lauch the sideload mode in TWRP, adb devices is not able to detect my phone anymore and the command adb sideload xxxxxx.zip fails because it cannot see any device.
I'm running TWRP 3.2.3, my computer runs on GNU/Linux (Xubuntu 18.04), I have the latest version of the Android SDK.
It is the same question as here from 2015: Device disappears from ADB devices when entering sideload but there was no answer.
Thanks in advance

Why don't you install the ROM directly from TWRP?

That's indeed what I ended up doing

Eventually, I found a workaround (which is not a fix but it allowed me to continue the installation).
Since my device was detected in discovery, I did not used sideload. I just pushed the image to the sdcard with:
adb push xxxxx.zip /sdcard/

and then I installed the image from the sdcard directly in TWRP.

I have this issue when the adb server is running without root permissions. Try:
$ killall adb
$ sudo adb devices

This will run the adb server with the correct permissions, then you'll be able to sideload.

See https://www.reddit.com/r/LineageOS/comments/cez05b/twrp_adb_sideloading_fails_device_has_no/.

Still fails with me. Even with root, 'adb devices' works outside of sideload but not during sideload.


text:
How to turn my Android tablet into general Wifi IP camera with AP?
I would like to turn my Android tablet into general Wifi IP camera to be accessible as a standard wifi camera from another wifi enabled tablet, smartphone or PC.
There is a number of Android apps on Google Play, called Wifi camera, but to stream video GSM connection is required and login to gmail on both devices is required either.
All I need is to have my tablet to act as a general WiFi camera , supporting wifi pairing
and access from VideoLan VLC media player via
rtsp (example rtsp://10.1.1.20:554/ch0_0.h264).
I want to stream not encrypted video   at a selected resolution ( HD or above)

I need such appl to come with AP, I can set multicast mode, to let 2 or more devices to access the same video stream
I am interested to have such Android appl to feature and support ONVIF wifi camera standard to let me run more ONVIF tests.

darius

You have a few options,
What is AP ?
Do you only want Local Access ?
Whereas the camera can only be connected to from the same WiFi network, Not publicly accessible ?
Or do you want Publicly Accessible ?
Whereas the camera can be accessed from another device remotely over the internet  ( check on home while you're at work for example )
You can create a simple IP Camera app that works on local networks very easily, however you'll need a server to handle internet access, I use Ivideon to do my remote access.
My Setup ...

IP Webcam Pro    ( For Running IP Camera )
TinyCam Monitor Pro  ( For Viewing IP Cameras )
Ivideon Account  ( For Remote Camera Access )

Both TinyCam.. & IP Webcam .. Offer Free Versions.
Ivideon has a free limited account, the limits should be enough for Home use.
You can also grab some Free Open Sourced Alternative's from the website F-Droid Free Open Sourced Software Repository F-Droid.org

Part 2
OK, so I've looked into IP WebCam and it uses it's own dedicated website that you can connect to locally, however I remember the app from a few years ago and behaved differently back then... Maybe Android limitations.
You can build an application for what you need, or search for RTSP Camera on Google Play,
I know that there is some because you can get libraries on GitHub that are OpenSourced .. like this one pedroSG94's RTMP-RTSP-stream-client

Thank you  for your answer.
AP stays for access point.
I am interested in direct connection over wifi, from PC, tablet or smartphone to my wifi enabled tablet, running WiFi IP camera app (Android 4.2.2)  Just installed IP Webcam on my tablet but no SSID is to be set to be brocasted over wifi to let me pair my PC with my tablet over wifi.
I am not interested in the cloud service since camera connection should work ad-hoc, locally.
My search for Wifi camera with F-Droid
https://search.f-droid.org/?q=Wifi+camera&lang=en generated no relevant app

follow-up
none results from search for IP Camera with your f-droid
https://search.f-droid.org/?q=ip+camera&lang=en

follow-up 2
TinyCam is monitor application for hardware IP cameras, so has nothing to do with my interest to have app installed on Android tablet to emulate real hardware IP camera ( wifi enabled) to let me connect to such tablet like to a real IP camera via UID SSID P2P wifi pairing

Their was several Open Sourced projects, however F-Droid was completely rebuilt and a lot of developers didn't re upload source's as required... Sorry about that link,  it is worth keeping an eye out..

thank you,
money is what makes developers happy ;)