text:
Asus Zenfone Max Pro (M2) forced into CSC Fastboot Mode
I have Asus Zenfone Max Pro (M2) running on Android 8.1 Oreo and it was working fine, no viruses, no malware. When I was playing a game on the phone, I put it on the side, then I went to play a game on my PC. When I came back to my phone, it was turned off although it had plenty of battery left. When I tried to turn it back on, it launched into "CSC Fastboot Mode" and it will not boot normally anymore.
I have not rooted my phone either or even tampered with it. Currently, it's plugged in on the PC and in recovery mode. While the phone doesn't boot into Android, it does boot into recovery when pressing down on launch. When it's plugged in (when turned off) on the PC or in a wall plug, it turns on by itself.
I've already been searching for some similar options, but the closest post to the problem of mine was not solved or I think so:
What is CSC Fastboot Mode, and how to get rid of it?

maybe it is a hardware issue with the physical buttons. not sure if it works with locked bootloader but you can download boot.img and try to boot from fastboot with fastboot boot boot.img https://skyfileos.com/2019/02/20/asus-zenfone-max-pro-m2-zb631kl-official-stock-firmware-update-rom

another workaround is open the device and disconnect the Volume buttons


text:
Does `adb install` do APK signature verification?
When using adb install something.apk, does the Android Package Manager verify the signature of the APK? adb install seems to bring up nothing up on the phone's screen, so it's hard for me to know if it does.
I like the idea of using APK mirror websites to download APK files with a phone that does not have Google Play Services, but because I can't trust any of those APK mirror websites, I want to make sure that the app's data is not at risk if using adb install when upgrading to a new APK version.
A couple of questions:

If adb install does do signature verification, what does it do if the signature does not match? Does it fail the install, pop up a question on the phone's screen, or automatically erase the app's existing data?
What if using the -r option with adb install?
If I use adb uninstall -k before installing the app upgrade, does signature verification occur from the previous installation before the old app data will be shared with the new install?
Bonus: We have the option adb install -l, where -l stands for "forward-lock the app". What does this "forward-lock" mean, and does it have anything to do with signature verification and app data access?

You are correct adb install verifies the signature of the app.
If the app has not been installed on the device before the package manager can only verify that the app has been signed - who has signed the app can't be verified by the package manager.
Only if you install an update for an app that has already been installed before the package manager can check if the signature of the new app matches the already installed app. In case the "update.apk" to be installed has a different signature you will get an error message after executing adb install like

signatures do not match the previously installed version

I am not sure if this also happens in case you have installed the old app before using adb uninstall -k. I would assume (but have never tested it) that the signature is also checked and compared and only an apk with a matching signature can be installed. Otherwise you could get access to any app-private data on your phone by replacing the app with a custom app. This would be a serious security vulnerability.
If you additionally want to verify your downloaded apk files you can use apksigner which is included in the Android SDK. The necessary steps are described in this answer I wrote some time ago. Especially the verification of the publisher (check what other apps have been signed by the same entity) using androidobservatory.org and apkmirror.com may be of interest to you.
forward-lock in my understanding is if you want to pin an app to the current device firmware version, hence mark an app as potentially not compatible with future Android versions.

source: Stack Exchange

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

sort: votes


text:
SMS not depleting or opening Huawei Y6
I know this question has been asked here before, but there hasn't been a solution besides to factory-reset the phone.
My phone recently reviewed a SMS/MMS with a title 'No Subject' from a number not on my contacts.
The problem is I cannot open or delete the message. Is there any thing I can do to get rid of this message. My phone is a Huawei Y6 2018
Thnx in advance

Wow, miraculously this went away by its self after days of looking for a solution. In case anyone has the same problem

It could be possible that your current messaging app is not the default messaging app of the system, thus making messages cannot be removed. Check the default message app in the Settings, and head to the desired messaging app to see if it could be deleted.
You may also consider install the official Android messaging app from Play Store and perform deletions there.

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


text:
Can Google assistant on one device be commanded from another device both of which have been signed into the same Google Account?
User has two android devices(phones). User has signed into the same google account on both devices.
Device01:
 - Work Device
 - Has a sim card
 - Mobile data enabled
 - Is not used much, kept away while at home
 - Hotspot is switched on while at home.
Device02:
 - Play device
 - Doesn't have a sim card
 - Always used by the user while at user home
 - Gets data connection through WiFi of Device01/Public WiFi
Consider the following senario:
 - The user is watching YouTube on Device02 in another room / goes out to buy a pack of chips,
 - User wants to send a SMS real quick,
 - Now can the user ask his google assistant on Device02 "Okay Google, Send SMS to Mr. XYZ" and set up google assistant such that SMS is sent through Device01 instead?
Is this currently possible? Or will we need Google Nest/Hub/Home etc...?

I think you can not do that, because device 1 has a simcard and device 2 has internet connection only, but you can text device 1 using whatsapp or telegram

I think I didn't ask the question properly... I don't want to text from device2 to device1; I want to ask assistant in Dev2 to connect to assistant in Dev1 and send sms from Dev1 to some third party...


text:
Trying to alter already modified recovery partition on tablet
I have an Android tablet (4.2.2) where the recovery has been modified to only give the reboot option when you boot into it. What is the best way to unlock the other options? Do I need to flash a new recovery partition? Or is there some way to open and edit the available options in the current one?

Your description sound more like the default recovery. Only custom recoveries like TWRP give more options. If the device is unlocked you can try to install a matching custom recovery that has more options.

The default is restricted. Most default recoveries give you more options than just reboot. They give you data wipe, cache wipe, flash update.zip, etc. I want to know how these options could have been disabled and how I can add them back. As in, what do I have to modify?

recovery options are hidden while bootloader is locked

So my focus should be on unlocking the bootloader then? That's how my recovery options were limited? So once I get the bootloader unlocked all recovery options will become available to me (without alteration of the recovery partition)? (Sorry for all the questions but I'm just making sure I understand your assertion)

can not 100% confirm but for some android system recovery there is hidden option backup user data. beware unlocking bootloader forces factory reset!


text:
WhatsApp chat restore from file msgstore.db.crypt12 on the internal storage
I tried to setup WhatsApp for my friend’s phone number and restore “msgstore.db.crypt12” from phone’s internal storage and it worked. But the same step isn’t working for my phone number. In my phone number’s case, WhatsApp always looks for a backup in Google Drive to restore from, even if I’ve deleted the google account in the phone and the internet connection is switched off.

check this previous answer and see if it does the trick: https://android.stackexchange.com/questions/133066/i-dont-want-my-whatsapp-media-to-restore-google-drive-backup?rq=1

Try copy all whatsapp folder to your new phone

WhatsApp will first search for your logged in account and look for any WhatsApp backup files in your Google Drive with the same phone number. If you’d like to prevent WhatsApp from backing up using your Google account, simply delete the WhatsApp backup folder (instead of logging out your Google account from your device).
If your local “msgstore.db.crypt12” are using the same phone number on your new WhatsApp, the setup will then use your local file to continue restoration.
Hope this helps.


text:
On my Xiaomi, does the checkmark at "restrict data usage" mean "only allow" or "do not allow"
On my Xiaomi, does the checkmark at "restrict data usage" mean "only allow" or "do not allow"? Each of the two SIM and WLAN has the possibility of a checkmark, but what sense should I view the choice?

When checked, restrict usage data means that the application can not use the internet when using simcard.


text:
Getting all MP3s on Android and be able to listen to them
I'm an avid music lover, and over my long life collected many rare CDs.  I made MP3s of these CDs and had happily listened to them on my iPhone using iTunes.
This week I switched to Android (Samsung Galaxy s10e).  I painstakingly uploaded all of my Music folder from my Windows 10 PC onto Google Play Music using the Chrome extension.
Only 3/4s of my MP3s successfully uploaded.  Under Google Play Music > Settings> Music from My Computer, there's no mention of any failures.
After a quick look, it seems that the rarer recordings were the items skipped.  These recordings are not in Google Play Music's library, so now I'm fearing that I can only upload MP3s that are in Google's database.
Questions:

Can anyone confirm this theory?
If it's true, what can I do to get all my MP3s, as they are, onto this Android phone and be able to organize them into playlists and listen to them?

How many MP3s are in your collection?

I don't know about Google Play Music because I don't use Google products as much as possible. But playing MP3 isn't a tricky thing. Just copy the MP3 files to Android device over MTP or through SD card or any other way you like (many questions on this site will help you with that). Then any media player like VLC would auto scan all mp3 (and other media) files. Android itself scans and categorizes files on their file (mime) type which the media player and gallery apps can query. So you don't need any special setup.

@Morrison Chang I have about 10,000 MP3s

@Irfan Latif.  Thanks, I can try that, but will it allow me to organize the MP3s into playlists?  I need more that just a file browser to be happy with this phone.  Already I'm seething over the fact that Android Spotify doesn't work wi-fi only.  I'm trying to determine if I need to try to return this phone before my 15-day cancellation period ends.

@MarnieA. I don't personally listen to music very much but there is a huge collection of (free, paid, open-source) media players which can help you organize music based on metadata or on your choice. I quoted VLC because it's completely free, open-source, feature-rich and cross-platform. But you may find better options. And I feel that your problem is that you aren't used to Android, which may take some time.

@MarnieA I would also double chexkt that the files that Google Music had problems with are actually MP3 and not some DRM format that iTunes uses.

@MorrisonChang Definitely were MP3s. I had ripped them from original CDs.

While I can't confirm it, I'm pretty sure Google Play Music needs to recognize the song to be able to show it in its web interface, much like Spotify does.
So instead of using Google Play Music, I plugged my phone into my Windows PC with its USB-C cable.  Here, I could see the phone as a drive on the PC.  It's a Samsung Galaxy s10e, and fortunately both the phone and the SD card were formatted to show some typical folders, including one called Music.
Using File Explorer, I copied my MP3s from my PC to the phone into the Music folder (on the SD card, but the Internal Music folder would have been fine as well).
Then I chose one of the many MP3 player apps.  I did try VLC first since I've used it for years for other purposes and trust it.  Because I wanted to do more with the music (e.g., create playlist), I opted to go with Musicolet.  Both apps offer to scan your phone and SD card.  When you give the app access, it pulls in the files, and then you can go from there.


text:
How to stop automatic refreshing?
If I'm seeing a video on YouTube app, a website in Chrome, Firefox or checking some thread in Stack Exchange app and I minimize the app to open another app or go to home, then I return to previous app happens that automatically is refreshing the app (Youtube, Chrome, Stack Exchange or any other).
For example, if I'm seeing a video for 5 minutes, go to another app and then return to YouTube, automatically loads the same video but from the beginning, not in minute I stopped it.
The phone where this undesired refreshing happens is Huawei and has Android 9 and EMUI 9.1.0.
Another phone with Android 7.1 that is not Huawei and doesn't have EMUI, for example, doesn't make this kind of refreshing.
Is there a configuration option to stop this refreshing? Thanks in advance.

Most likely this is not a feature but a limitation of Android. Apps in background are automatically closed when your system runs out of RAM (or because of other things the manufacturer has added). When you later go back to the app it tries to restore the state it had before, but depending of the app and the techniques used some states (e.g. of an opened web site) can't be fully restored. Therefore your video is reset to the beginning.

Thanks for answer. So it seems not to do for this issue?

The only "solution" I see is to complain at Google and the other apps that they do not store the current state when closed by the OS in background respectively does not restore it appropriately.  However some manufacturers (especially Huawei) are known for closing background apps very aggressiv. Therefore in some cases the app my be not the problem but the system which does not give the app enough time to save the state before closing/killing them. Which case in your case is the problem can not be determined without getting directly "in touch" with the device.

Thank you Robert for.your suggestions.


text:
How to automate sending my current battery percentage to PC over the internet every 5 minutes?
I'm using Android 9 on my device, there are many times when I'm away from my phone and it is charging in a different room or someone else is using it, is there was a way to send over the battery percentage say bp over to my PC at regular intervals via the internet.
There maybe apps that can do this but I'm interested more in a script or terminal based approach
Ideas I'm thinking of are:

using a script manager on my phone like https://play.google.com/store/apps/details?id=org.androidideas.scriptlauncher
crontab with a script that sends out bp to a copy pasta and my PC can have it's own script reading that
using cat /sys/class/power_supply/battery/capacity or dumpsys battery | grep "level:" | awk '{ print $2 }' once my device is rooted as mentioned here : How to get battery status in terminal? and doing that every N minutes using cron

I have Termux installed and my device is not rooted yet how do I proceed.

Usually your PC is not exposed to the Internet, therefore a (temporary) storage is needed online. Typical examples are storage services like Dropbox, document services like Google Sheets or messaging systems like Signal or Wire. I am sure for a lot of services termux/Linux scripts exist that allow to store data in one of these services.

@Robert Exactly why I was thinking of a copy pasta aka a pastebin service to broadcast my battery status to for example maybe ix.io but I'm sure the people here have something even simpler. Another issue is how I'm going to get the battery percentage in terminal without rooting.

I'm using gist by Github (which can be done using gem install gist after installing ruby package) for broadcasting my battery percentage first to a private file,  tried using ix.io but pkg install ix didn't work on Android terminal the config.guess threw and error saying unable to guess system type.
Already had Termux installed on my Android with necessary packages and with pkg install termux-battery-status and installing the Playstore api app : https://play.google.com/store/apps/details?id=com.termux.api&hl=en_IN using termux-battery-status | grep percentage | grep -oP '\: (.*?)\,' | grep -Eo '[0-9]{1,3}' gave the battery percentage in terminal.
Finally I added permissions using chmod +x bp.sh and set up crontab on Android to do this every minute using crontab -e and adding the line * * * * * ~/bp.sh
EDIT
Have started to make use of jq to parse json ouput, so now the one liner for script is termux-battery-status | jq .percentage | gist -f bp -u gist_id and start the crontab using crond
PS : I've put the entire thing here :  https://github.com/himanshuxd/bp-broadcast

You could use Your Phone Companion from Microsoft to link Android to your PC. The battery percentage would be shown at the upper left corner near device icon.

It won't work when I'm using Ubuntu or Arch plus the permission list for that app is quite taxing.

You could try Find My Device which requires GPS to be active.


text:
Random calls incoming
I am using Redmi note 7 (android: 9 PKQ1) I have run virus scans on my phone, but I am still having this problem: I keep getting random phone calls on my phone, but strangely there's nothing showing on screen. Only ringtone goes off and that's all. Even when I restart device nothing shows up in history catalog.
I'am pretty sure this is some kind of virus and I would like to know if anyone has got same problem as me and some advice on how to fix it.
Any suggestion for virus scanner better than common ones?
Regards,
Highzivs

It is recommended to check what apps have you installed by going into Settings. Find out which apps you cannot recognise but seem suspicious.
And the last resort – remove your so-called virus scanner as some of them are simply virus and luring you to install it to “prevent virus”.


text:
List of ADB settable permissions
I am searching for a list of permissions that can be set with adb.
I could just iterate through all permissions and ignore the failed ones but i'd rather filter out the ones that i know can't be set before hand.

You can grant or revoke only runtime permissions (introduced in Android 6 with protection level: dangerous) - either from CLI (adb shell) or GUI (Settings). From package manager help:
~$ pm
...
  grant [--user USER_ID] PACKAGE PERMISSION
  revoke [--user USER_ID] PACKAGE PERMISSION
    These commands either grant or revoke permissions to apps.  The permissions
    must be declared as used in the app's manifest, be runtime permissions
    (protection level dangerous), and the app targeting SDK greater than Lollipop MR1.
...

To get a list of all on-device dangerous permissions:
~$ pm list permissions -g -d | awk -F: '/permission:/ {print $2}'

Or get directly from Android source. This list excludes any dangerous permissions defined by non-AOSP packages e.g. those provided by Google Play Services. wget is a busybox applet, or get a static binary:
~$ wget -qO- https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/android-9.0.0_r52/core/res/AndroidManifest.xml | grep -E 'protectionLevel=|<permission android:name=' | grep -B1 'protectionLevel=.*dangerous' | awk -F'"' '/permission/ {print $2}'

Or to avoid any wrong results, pre-format .xml (you need to get xmllint or similar tool):
~$ wget -qO- https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/android-9.0.0_r52/core/res/AndroidManifest.xml | xmllint --format - | grep 'protectionLevel=.*dangerous' | grep -o 'permission android:name=[^ ]*' | cut -d'"' -f2

In addition to dangerous permissions, it's also possible to grant or deny or ignore some of the special permissions shown under:
Settings → Apps & Notifications → Advanced → Special App Access.
These are not managed directly by package manager, but appops - a secondary permissions control framework. These are signature level permissions which can be granted only to system apps otherwise. On Android 9:
~$ wget -qO- https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/android-9.0.0_r52/core/res/AndroidManifest.xml | grep -E 'protectionLevel=|<permission android:name=' | grep -B1 'protectionLevel=.*appop' | awk -F'"' '/permission/ {print $2}'
android.permission.MANAGE_IPSEC_TUNNELS
android.permission.SYSTEM_ALERT_WINDOW
android.permission.WRITE_SETTINGS
android.permission.REQUEST_INSTALL_PACKAGES
android.permission.PACKAGE_USAGE_STATS
android.permission.ACCESS_NOTIFICATIONS
android.permission.INSTANT_APP_FOREGROUND_SERVICE

Their corresponding appops operations have similar names with minor differences. Also some OPs depend on other OPs. To get a complete list of operations you can read or set through command-line:
~$ wget -qO- https://raw.githubusercontent.com/aosp-mirror/platform_frameworks_base/android-9.0.0_r52/core/java/android/app/AppOpsManager.java | awk '/int OP_/ {print $5}'

For details on how to use appops see examples of VIBRATE, REQUEST_INSTALL_PACKAGES, COARSE_LOCATION/FINE_LOCATION and BOOT_COMPLETED/RUN_IN_BACKGROUND.

To get a list of all permissions available system-wide, use
adb shell pm list permissions
That will give you a full list of what permissions are available to be given/rejected on that device, including permissions defined by the manufacturer or by apps installed on the device.
To get a list of the permissions applicable to a specific app, use
adb shell appops get <PackageName>
That will give you a list of the permissions that that particular app may request, including whether or not the permission has been granted.
You can then use
adb shell appops set <PackageName> <PermissionName> ignore
or adb shell appops set <PackageName> <PermissionName> allow
to either deny or allow that permission for that app.


text:
Can an Android device be used for 2FA for an Apple/iCloud account?
Can an Android device be used for 2FA for an Apple/iCloud account? Google didn't return anything useful.
(Couldn't find any appropriate tags to use)

Please define the concrete 2FA type. Any (smart)phone can be used for 2FA where the user gets an SMS with the second factor. As far as I remember Apple primarily uses this scheme. If it supports a different 2FA system I don't know.

AFAIK on how Apple controls its environment strictly, I don't think it's possible to use non-Apple devices for two-factor authentication (see "Trusted devices" section). The alternative is to use two-step verification with SMS instead.


text:
Remove the recent apps part on Xiaomi Mi A2
I am using Android 10 on Xiaomi Mi A2 and want to remove the "recent apps" part from my menu, but there aren't the options shown above.
How to remove it?

"Recent apps" is a standard part of Android navigation and it cannot be removed. You should probably just stop swiping up that long from the bottom and you will never encounter the recent apps screen.


text:
Access the Digital wellbeing information from local device
Google has implemented Digital wellbeing as part of Android pie through its Beta experience. This app captures user interactions and creates nice charts for users to understand how much was screen on time and how many times the phone was unlocked and how many apps were used in what proportion during the day, in a week etc.
I wanted to view this data not as a chart but as raw format. Where can I find this information on local device?
If not locally available can we download it from any google service?
Please suggest.


text:
Prevent Google Contact Sync in Work Profile on Android 10
Imagine the current situation:
With the help of Shelter (https://github.com/PeterCxy/Shelter) I created a work profile. I want to use this work profile as a container with less personal data than my main profile.
For this reason I deactivated the "com.google.android.syncadapters.contact" app.
With this setup I was able to add my Google account inside the work profile without having my contacts get downloaded on the device in this profile.
On Android 10 however this doesn't work anymore. The syncadapter is still deactivated (frozen) but the contacts sync nevertheless.
I'm aware of the fact that I can manually disable the sync in the settings of the work profile.
However I need a solution that a) can prevent the sync before adding the account (since the first sync already happened when I add the account and then go to settings) and b) can be done programatically since I'm writing my own app based on this.
So my question is if any of you pros know where the contact sync mechanism (of a google account) is defined since Android 10 and if you see another possibility to disable this again.
Regards,
David


text:
removing privileged permissions from pre-installed apps
Many pre-installed apps get privileged permissions, which are defined in /etc/permissions/privapp-permissions-*.xml files. Given a rooted device, it would be possible to edit those files in order to remove those permissions (provided the ro.control_privapp_permissions buildprop is set to log – as otherwise, to my understanding, this action would lead to the device no longer booting, for "security reasons"; see developer documentation for details).
Not knowing the implications of such an act, I hesitate going to try-and-err (apart from the fact that my devices are running a custom ROM where I rarely have the need to do so). For privacy and security reasons, this might be useful, though – especially when seeing snippets like this:¹
  <privapp-permissions package="com.facebook.system">
    <permission name="android.permission.REAL_GET_TASKS"/>
    <permission name="android.permission.INSTALL_PACKAGES"/>
    <permission name="android.permission.DELETE_PACKAGES"/>
    <permission name="android.permission.CHANGE_COMPONENT_ENABLED_STATE"/>
  </privapp-permissions>

So I wonder if someone could enlighten me/us here on the implications of e.g. removing the two lines permitting FB to (un)install packages – or to re-enable apps the user might have disabled:²

Would removing the corresponding lines (or deleting the entire file) effectively make it impossible for the related app to obtain those permissions (accepting the risk of the app crashing if proper exception handlers are missing)?³
Are there any side-effects to be aware of (apart of mentioned app-crashes)? If so, would restoring the file to its original state be sufficient to fix them?
Would those changes be permanent – or if not, what might revert them (I'd expect e.g. a system update/OTA would replace the files)?
Are there any other things to be aware of in this context?

Note that I'm asking this from the perspective of a "power-user", not from a development point of view (I'm no Android developer anyway).

¹ on a device I had here for investigation
² the latter might be interesting to apply to the Play Store app, which seems able to re-enable itself as I experienced
³ some apps might ask the user to grant it again via "runtime permissions", esp. if they are distributed via Play as well?

I created a script some time ago which I execute to remove privileged permissions of GApps after flashing on a custom ROM. But my current ROM is almost a year old now. So I'll look into the list of permissions I had verified to be working without causing bootloops and without any ANRs / popups. But this would be very app specific. Non-platform apps won't cause a brick but possibly would no more be usable. Or may not complain at all. Personally I only tried this with GApps, plus uninstalling and disabling some of them, forcing XPrivacyLua, restricting RUN_IN_BACKGROUND etc.

That's quite helpful, @IrfanLatif – thanks! So the approach is at least feasible. ANRs/popups I already considered ("crashes"), but boot-loops are a different issue (I guess they where solvable by correcting the corresponding file while in recovery?) And yes, I assumed this being app specific (some apps having proper exception handlers, or rarely making use of a certain permission, while others do not and depend on it; imagine play store w/o INSTALL_PACKAGES ;)

For the opposite direction (granting/white-listing permissions on apps you integrated into priv-apps yourself) I just found this post at XDA. Not exactly answering my question, but useful in this context nevertheless.


text:
Gmail account disappeared and Google Play Store app not working on MXQ Pro Android TV Box
I have MXQ Pro 4K Android TV Box. The personal Gmail account disappeared and the Google Play Store won't allow sign-in/access.
How to fix it?

I've had the same problem.
What finally worked is:
Remove updates for Google Play Store and Google Play services (
Search on your computer for compatible .apk downloads for both apps (APKmirror.com has these files as download).
In my case (MXQ Pro 4k Amlogic S905) it was Android 7.1.2
Copy both .apk files to a SD card. Put it in the TV BOX and use APK Installer app to install these on the TV Box.
Then reboot.
Hope this will be helpfull


text:
Dual Sim Oppo Reno Z - not receiving notification of voice messages or calls on 2nd sim
I use vodafone as my 2nd sim and Optus as my 1st. I'm not receiving any notification that I have a voice message on my 2nd sim. I also don't receive a notification that someone called on the 2nd sim.
Any ideas on how to correct this?
Thanks

I've fixed it. It was actually an issue with the sim itself and I had to ring the voicemail settings and chose sms notification - which it had already been set up with - again. Vodafone is hopeless or it's an issue with this sim. Thanks


text:
Append code before phone number if call is made from SIM2
I've been trying to find a way to do this for weeks now but I just can't seem to find a solution.
In my phone (Huawei Nova 3) I have two SIM cards, private (SIM1) and work (SIM2).
SIM2 has a dedicated dialer app which basically appends a specific code (which never changes, 154784) before the number I want to call.
Phone Number: 070-1111-2222
Called from within the app becomes: 1547847011112222
The problem is this dialer only supports SIM2 and currently I have to use two different dialers depending on which SIM card I want to call from.
What I'd like to do is to use the default dialer, which prompts me to choose a SIM card whenever I want to make a call and make it so that it automatically appends the code above (154784) if I choose SIM2. I would like to avoid using the other dialer app altogether.
Is it something that can be done or should I just give up on it?

AFAIK dual sim is not a feature of standard Android AOSP (please correct me if I am wrong). Therefore there is no general answer for that and the two-dialer solution is manufacturer specific. As you conceal your device manufacturer and device name there is nothing we can do to help you.

@Robert Thank you for your input and sorry about the missing information. I have a Huawei Nova 3 running Android 9. I could upload a couple of screenshots to better illustrate my question but I'm not sure it's allowed.


text:
Google Pixel Bootloader unlock
I have a pixel phone struck in boot loop (just show google logo and restarts)!
I didnt enable oem unlock and usb debugging !
I want to unlock the phone to reflash the phone!
My Recovery also dont work! just stuck at google logo!
I have tried all the google search but there is no direct answer for this!
most of the fastboot command errors comes like this
FAILED (remote: 'oem unlock is not allowed')
fastboot: error: Command failed

Please help as I cannot buy new phone now
Thanks,
Sharan

How did you manage to crash the recovery without unlocking the device?

I bought this phone from ebay


text:
How to share files between a regular account and a work account?
How to share files between a regular account and a work account?
I've researched and I can't find anything. What I am missing?

It might not always be possible to transfer data between multiple users/profiles. It depends on the Device/Work Policy Controller app, installed by you or your IT admin.
Android device can be managed in two ways: fully managed (which is setup at the time of first use or after factory reset on a company owned device) and work profiles (which can be added or removed anytime without affecting primary profile on a personal device / BYOD). Both requires a  profile owner app (MDM/DPC/EMM) installed and registered as an administrator. Fully-managed devices may further have work profiles and it provides more isolation and control on device-wide policies than the latter. See a comparison of both modes under Building DPC (1, 2, 3, 4) and Employing Managed Profiles (5) in Android documentation.
Multiple users can also be added if enabled in ROM by OEM/ROM developer. Being more isolated than profiles, interacting with users requires INTERACT_ACROSS_USERS which is a permission with signature|system protection level. So third party apps cannot use it at all.
Irrespective of if the secondary user is a human user or personal profile owner or work profile owner, the primary intention is data isolation. As defined here:

"A work profile securely isolates work apps and data from personal apps and data."

And as explained here, file sharing between device owner and work profile must only be through intents (fired with content URIs), not file paths. But a profile owner may completely disallow data sharing (and IPC/intents) between users/profiles. For instance see DISALLOW_SHARE_INTO_MANAGED_PROFILE, DISALLOW_USB_FILE_TRANSFER, DISALLOW_MOUNT_PHYSICAL_MEDIA, addCrossProfileIntentFilter.
Since Android 9 adb is also disallowed to access file belonging to secondary user/profile. For details see How to access multi-user storage in adb shell on Android 9+?

However if the sharing is not disallowed, you'll see options to switch to other profiles (tabs in Share Sheet on Android 11+) when sharing files:

Shelter - a Free and Open-Source app (I've no affiliation) that leverages the "Work Profile" feature to provide an isolated space for cloning apps - acts as a content (media) provider and provides "File Shuttle" option which lets you access Work Profile files from Personal Profile through "Storage Access Framework":

You can also run a small http/ftp server for file sharing on either side, or sync to cloud storage, if not restricted by policy.

So it entirely depends on the profile creator's policy if file sharing is allowed or not, usually not desirable in a corporate environment. However following method may work in all situations:

The most widely used trick for file sharing among multiple users is Android/obb directory which is shared among users to save storage space. Sharing was managed using bind-mounts in early days but then handling was added to FUSE/sdcardfs internally. However sharing is deprecated in Android 10 introducing mount option unshared_obb in sdcardfs.
So up to Android 9 you can use obb directory for file sharing among users/profiles:
~# mkdir -p /storage/emulated/*/Android/obb; touch /sdcard/Android/obb/test_file
~# ls /storage/emulated/*/Android/obb/* /storage/emulated/obb/*
/storage/emulated/0/Android/obb/test_file  /storage/emulated/10/Android/obb/test_file /storage/emulated/obb/test_file

On Android 9 I was able to access files from work profile with root permissions. On Android 11 i can't even with root. Access is blocked by selinux probably.

@Qkiz fully working root solutions like Magisk provide a fully permissive SELinux context. You can always access all users' files from /data/media/. Not sure how you are doing it.

Second user is work profile without root permissions so it can't reach /data/media for write files

Found a very simple way, just using web browsers in both work and regular profiles.
Open a browser in each profile and browse to snapdrop.net URL, which should open a session with a random username that will appear on the other brother and vice versa.
By clicking the username icon you can send a file which should show up in the browser from the other profile. Then you can accept and download the file.
This doesn't need any third party app or server setup and data only transit on the phone (snapdrop only being used as a synchronization server for websockets).
During file transfer, clients directly talk to each others and do not send data outside.

I think this can also be done using the app. https://f-droid.org/packages/com.fmsys.snapdrop/

The only configuration that seemed to work for me is opening the snapdrop app in the work profile, and opening snapdrop.net in the brave browser (with shields disabled) in the user profile.  If it's still not working, try android's multi-window feature to show them both on screen at once.

Use Total commander for Android or other 3rd-party file managers where you are able to use "Share via.." and the app will save the files in a new destination.
E.g. the steps:

In the work profile via the internal "Files" app, select the file and use the "Share" option
In the Share dialog, switch to "Personal profile" sharing options
Select the file manager app
Select the personal profile folder in the file manager dialogue
Voila, the file is in your personal folder.

I just solved this for myself by -

using a file manager (Solid File Explorer) (no affiliation) to create an FTP Server on work profile,
accessing FTP server through file manager on personal profile, and simply
transferring files between both.

Quick fix!

I do this with a different app to transfer files between the phone and windows.

I managed to transfer files via Total Commander's WiFi plugin. Both users should have TC + Wifi plugin installed. One of them is set up as a server and will present you with a QR code. Take a photo of the code with your phone.
The other user then scans this QR code from the phone and you can transfer files easily between the to users as long as the server is running.

I found a simple solution which doesn't limit you to one file at a time and allows sharing with anyone anywhere. Just upload your files from the Work profile to a free cloud service. That's it.
I found this thread while searching for a way to access Work files directly, using adb. It all seems so complicated to do.
I tried Etienne's suggestion using snapdrop.net between Work and Regular profiles. It is OK but is limited to a single file at a time.
I then tried FX File Explorer and Total Commander but couldn't reproduce the results given by sanchez0x or on GitHub.
I then read on another thread a suggestion to install Google Drive in the Work profile and then upload and access files anywhere, not just on your device. There would be no restrictions in the Work profile on uploads to a server. I decided to transfer them to OneDrive since I already have an account and I can just use a browser (Firefox), even while using a VPN, to upload an entire directory of files and access them anywhere in the world and share them as well. I tried it with a directory of 99 files. I was able to download them to my Mac and delete them and empty the trash on OneDrive to free up limited (5GB) free space. It won't cost you a penny, or lots of time trying to 'game' adb.


text:
Define storage caps per app basis
Is there any way to define how much storage space an app can use?
I'm tired of uninstalling apps, deleting apps data and deleting files to see the newly freed space begin swallowed in just  some hours by those "storage abusive" apps!
The worst of all is that I have real needs with some of those apps.
Take Outlook for example, it wastes space caching old e-mails that I'll not read and it lacks any settings to control this behavior. I use it with my personal and work accounts and cleaning its data means going through the authentication steps again... for each of the accounts... on a daily basis... and it's just one of those problematic apps...
Using the "delete things" method repeatedly\constantly looks just dumb, a poor made process design choice...
And i don't care about loss of functionality, they'll have to deal with whatever space i judge them worthy having. =)

With root access it's possible to set filesystem quotas. But that too won't be helpful for external storage (/sdcard) where all files are saved with same UID/GID irrespective of which app creates them. So apps with WRITE_EXTERNAL_STORAGE permission cannot be subjected to filesystem quotas. Or at max you may set a limit on total size of /sdcard. For other apps the approach will work perfectly. However quotas are not implemented by Android this way. You'll have to manage them manually. And possibly apps may break when they reach quota limit since they are not aware if it.

The IMHO better way to stop "storage abusive"  is write a review and/or contact the developer and complain about this behavior. Or just use a different mail app. BTW: Do you know that Outlook app does not access your mail servers directly? AFAIK instead they send your username and password to a Microsoft server named "Outlook cloud service" (where it is stored) which now manages everything and to this server the app connects. Therefore every mail you receive/send/read goes through this server. Very creepy and a total privacy disaster.


text:
Get photos back from broken/locked android phone
Is there any way to open mobile phone and get it's ROM memory out and connect it with pc or something and get your files(photos and text files) ?

Duplicate of: How to perform a full system dump/backup with a broken screen?

Related: How to get data off a completely dead Android phone?

Related: Is it possible to transfer the internal memory/storage chip of an S9?


text:
What is the difference between twrp-[version]-[phone].img and twrp-installer-[version]-[phone].zip?
I know I can flash the image and boot it. But what are the zips used for? I'm asking this because I noticed that images are often accompanied/listed with corresponding zip files - not just for TWRP. And I'd like to understand how they relate and how those zips are applied and when.
For example: https://dl.twrp.me/enchilada/

The answer becomes clear once you read the install instructions:
You will need both files to install, as your device (OnePlus 6 aka enchilada) is an A/B device and thus has no recovery partition (recovery is part of the boot image there) – which means you cannot simply flash the recovery image using fastboot. So you download (or push) the ZIP to your device, then temporarily boot TWRP (fastboot boot *.img) and from there flash the ZIP.


text:
How to remove Chrome's per-site notification entry on the Android settings?
I'm using Samsung Galaxy S10. Sometimes when I visit "certain" websites, the site requests to send notifications to me through Chrome.

How do I remove these Chrome site notification requests from random websites on the Android settings? I don't see any locations for removal.
This is similar but not the same to How to permanently remove a particular Chrome notification from Android mobile phone? since that question is asking to remove the notifications only, not the entry on the settings.

Do you mean to say you want to remove those notification entries of websites from that Settings page?

Yes, I want to remove the entries.

One of the later answers to the linked question should also solve this question.

To remove notifications for an individual site on Chrome for Android, you need to block the Notification permission by doing the following:

Open Chrome -> Settings.
In the Advanced section, click on Site Settings, then All Sites. Sites that have permissions set will be listed.
Find the site you are looking for, click on it.
Under the Permissions section, click on the permissions you want to remove, in your case the Notification permission, then select "Block".

To remove the entries:

Open Chrome -> Settings.
Site Settings -> Data stored -> Clear all data.

This answer from a previous question (linked by OP) is actually better than my suggestion as it will remove only the notification entries.


text:
First N sec not played from pulseaudio over HDMI on Android TV
I start tv, select input source, set default sink for pulse audio(pacmd set-default-sink 0) and start some playback in mplayer. For some reason, there is like 3-5s delay between command being executed and sound actually coming out from tv(sony). After that, I can immediately turn off mplayer, and if I rerun, there won't be any delay/audio missing. However if I wait for like 30s, it will start over again.
I really don't know what is causing this issue. Is it pulseaudio, android tv, gpu, or it's a some feature of sound over hdmi?  Is it somehow fixable? I mean for initial first connection — not ideal, but OK, but then I'd like to 'hear' all executions of all potentialy launched apps start playing immediately.

Found the cause:
check this question:
https://askubuntu.com/questions/218444/sound-output-starts-delayed
so I commented out this line:
 load-module module-suspend-on-idle

in file /etc/pulse/default.pa, and issued pulseaudio -k waited for restart and now it works without any delay. Hurray!


text:
How to modify /system/priv-app in Android 10?
I use ES File Explorer to modify /system/priv-app in the past with root permission given via magisk.
After upgrading to Android 10, ES File Explorer can no longer modify the /system/priv-app giving me an error message saying "operation failed."
What alternatives do I have if I like to modify /system/priv-app?
The output of running set -x; exec >>/sdcard/mount.log 2>&1; id; mount -o rw,remount /system; mount | grep 'on /system '; touch /system/test_file; cat /sys/block/dm-*/dm/name:
uid=0(root) gid=0(root) groups=0(root) context=u:r:magisk:s0
mount: '/system' not in /proc/mounts
touch: '/system/test_file': Read-only file system
vendor-verity

It turns out:

On some system-as-root (SAR) devices you can no longer mount the system partition as read-write and doing systemless modifications through Magisk is the only way. If you do want to do actual edits of the system, and if it is even possible (from Android 10 it's actually impossible on some devices), you need to mount the root directory, /, as rw and not /system. You can also try editing the partition mirrors that Magisk keeps in /sbin/.magisk/mirror.

So all I needed to do is to:
mount -o rw,remount /

dm-verity? Dynamic partitions?

@IrfanLatif it looks like magisk isn't a complete root after I did some digging...

With root privileges run: set -x; exec >>/sdcard/mount.log 2>&1; id; mount -o rw,remount /system; mount | grep 'on /system '; touch /system/test_file; cat /sys/block/dm-*/dm/name. Share /sdcard/mount.log at https://pastebin.com/

mount: '/system' not in /proc/mounts I just pasted on the question @IrfanLatif

Please run with root privileges. Use su command on adb shell or pkg install tsu; tsu -p on Termux.

yes, i used su on adb shell. mount: '/system' not in /proc/mounts is the output. @IrfanLatif

You need to remount the partition as read-write. mount -wo remount / (change / to /system if you don't have system root enabled in my app). It should work then, though if not you probably have a read only filesystem like EROFS

I don't think magisk supports remounting /system it returns '/system' not in /proc/mounts.

Indeed, magisk doesn't actually mount the system partition at all. You will have to use an alternative.

'/system' not in /proc/mounts could mean that system partition is mounted as rootfs (/) and /system is just a directory inside it. Will have to look at mounted filesystems to be sure.

But if you're using magisk it makes no difference. Magisk does the craziest hacks (temporary workarounds) to modify /system

You can check reliably if system as root is used (regardless of magisk) in my app, kutt.it/trblchk

@AeroWindwalker please try to remount rw root / as Hack5 suggested

@alecxs yes that works. Thanks.

That "craziest hack (temporary workaround)" is called bind-mount. And you don't need necessarily Magisk to use this "hack". And to "check reliably if system as root is used" all that's needed is to see mounted filesystems using mount command.

@Irfan I know it's a bind mount. Except that it isn't. It's a large number of individual bind mounts. And why would you want to use this "hack"? The only advantage is that it helps magisk to hide root and add modules, and it's practically impossible unless you wrote some code to so that.

@Hack5 bind-mounts are not used to hide root. For that Magisk watches /proc (probably using Linux kernel's inotify framework) for newly created processes. And if it's an app (DVM) process which should not know about root, Magisk un-mounts /sbin in that app's mount namespace so that /sbin/su is not visible to that app. Plus there are other minor things to be taken care off to completely hide root presence. // Large number of bind-mounts are required to create a new file or directory (which doesn't exist already) systemlessly. To modify an existing file, only one bind mount is required.

Btw, original question has nothing to do with MagiskHide or Magic Mount.

@Irfan without the bind mount, magisk couldn't unmount /sbin. I think we should move to chat, but I know how the root hiding works. There are some props to set by magisk, as well as the bind mounts that are used to insert su. Of course, magisk could just insert itself to the system partition like a traditional root app, but it doesn't. This helps it to hide itself. And by the way, magisks way of finding out when an app launches it terrible. And magic mount is related to the question in that bind mounts can interfere with the remounting of /system and with the file management itself.

on Google Pixel (1st gen) any of these does not work. any ideas?

@Paschalis define does not work

I've actually created a question here: https://android.stackexchange.com/questions/223872/mount-system-on-android-10-with-magisk

> adb root

> adb shell avbctl disable-verification

Successfully disabled verification. Reboot the device for changes to take effect.

> adb disable-verity

using overlayfs
Successfully disabled verity
Now reboot your device for settings to take effect

> adb reboot

> adb root && adb remount
remount succeeded

> adb push ScreenCap.apk /system/app/
ScreenCap.apk: 1 file pushed. 33.1 MB/s (1640812 bytes in 0.047s)

> adb reboot


text:
How accurate is Google Play installs measure?
When you look at app listing in Google Play there is "Installs" section:

How accurate is that? What values can be found there? Does is take uninstalls into consideration?

Does this answer your question? What does downloads mean in Google Play store app page?

Kind of yes. But not exactly. There are some valuable information but not all I want.

When using a browser on a PC or phone, "Installs" is shown. But when using the Play Store app, "Downloads" is shown.

It doesn't take uninstalls into account. It is very slow to update and based on the all-time number of individual Google accounts that installed it, NOT the devices.
That's all based on what I experienced, from the Play Console combined with Store
Possible values include:
1+
5+
(Maybe some more)
100+
500+
1k+
5k+(?)
10k+
50k+
100k+
(Maybe some more)
1m+
(Maybe some more)
1b+


text:
android ".backup" into data files
How can i get all my backup data into (data folder) ??
Here is my list of data (i run this command with (file *)
userdata_20200109_180356.backup:   data
userdata_20200109_180356.backup1:  data
userdata_20200109_180356.backup2:  data
userdata_20200109_180356.backup3:  data
userdata_20200109_180356.backup4:  data
userdata_20200109_180356.backup5:  data
userdata_20200109_180356.backup6:  data
userdata_20200109_180356.backup7:  data
userdata_20200109_180356.backup8:  data
userdata_20200109_180356.backup9:  data
userdata_20200109_180356.backup10: data
userdata_20200109_180356.backup11: data
userdata_20200109_180356.backup12: data
userdata_20200109_180356.backup13: data

Can some one help me with that? how can i do this into data files.

Based on the file names this question is identical: https://android.stackexchange.com/questions/141805/how-to-extract-backup-files-created-by-android-stock-recovery

please note if your device uses full disk encryption you need a copy of metadata, otherwise these backup files become useless after factory reset. read back metadata partition with SP Flash Tool

How can i read back the metadata in SP Flash Tool?

Thanks i got the preloader.bin now from the phone. but i flashed the phone with wrong rom. i need the right rom now for fix the phone.


text:
Why Android x86 9.0 boots in command line and not in GUI?
i just installed android x86 9.0c and i don't know why it doesn't boot on GUI mode and it boots only in commandline then after some seconds i can only see just a dash appearing and disappearing. I have tried to put my graphics settings to vboxvga and disabled 3D acceleration but it still doesn't work. What else i can do to fix this problem?
here you can see that its booted in commandline , after some seconds it becomes black and all i can see is just a dash appearing and disappearing

This is a semi permanent fix. It will stay fixed until you open settings. Then you can just do it again.
1. On the main VBox screen in the display section click on what ever follows Graphics Controller:
2. In the box that opens select VBoxSVGA.

According to the answer here from Stack Overflow:

Temporary fix: append nomodeset xforcevesa at the end of the line containing kernel during boot time at the GRUB menu. During boot press E to edit. While on the line containing kernel press E again, append nomodeset xforcevesa at the end, press enter, then press B to boot.
Permanent fix: read the answer here.

Using the 32bit version worked for me. Also try an older Android version


text:
How do I prevent my keyboard from trying to suggest 2 sets of spelling corrections?
A decent while ago, my keyboard decided to start recommending two sets of spelling corrections. The new type of spelling corrections tends to get in the way of me using the one that I prefer to use.
For reference, I included an image. The popup coming down from the misspelled word is the spelling correction system I do not want to use, while the one underneath it is the one I do want to use.
I am on an LG phone with Android version 9.

Shortly after asking the question I decided to do some testing, and I figured out how to fix it. I went into my keyboard settings and disabled the spelling correction feature. This disabled only the "red line with drop down" spelling correction set while the spelling correction set that was below it and built into the keyboard was still there.
It was under Settings > General > Language & keyboard > Spelling correction. From there, I disabled it, and everything was back to how I liked it.


text:
Browsing play.google.com without opening Play Store
When I try opening play.google.com in Google Chrome, it redirects to the Google Play Store app. I want to access the Play Store from my browser so I can easily get links to different apps for sharing. Thanks for being such a helpful group!

Use an alternate browser such as Firefox or the Samsung browser?

Thanks. I had thought of this, but hoped not to resort to it. I guess I have an excuse to install Opera Touch again. Cheers

Have you tired entering play.google.com into chrome's address bar?

qblueRed, I thought I had already tried that, but it just worked. I guess my problem was trying to tap links to apps


text:
Dual booting android x86 with LineagOS x86 on external hard drive
I an installing on an internal notebook HDD that I use as an external dribe from the USB
The drive is a 500 GB HDD but has 50 GB, 50 GB, 50 GB partitions on it and the rest is unallocated at the moment
I have android x86 (android-x86_64-9.0-rc2.iso) installed on the first partition (sdb1) and I also installed EFI GRUB2 while installing android
I then installed LineagOS x86 (cm-x86_64-14.1-r2.iso) to the second partition (50 GB) and I also told it to installed EFI GRUB2 while installing LineagOS
The GRUB from LineageOS seems to have overwritten the GRUB from android-x86 and now I can't boot into android-x86 from the BIOS boot screen, even though it's files are all there in the first partition
Is there any way to edit the GRUB for LineagOS and add an entry to boot android-x86 from the first partition?
I also have in internal SATA HDD inside the notebook with Windows 10. I do not want the bootable installations on the external hard drive to affect this windows installation or the internal drive in any way, but it seems the EFI GRUB2 that got installed while installing android-x86 and LineageOS got installed on the internal HDD. This is still still acceptable because it doesn't seem to have affected the windows installation or it's booting procedure in any way, but I am not experienced with GRUB and whatever it is that I have to do, I want to make sure it will not affect the Windows 10 installtion on my internal hard drive.
To summarize:
sdb1: android-x86
sdb2: LineageOS, bootable using it's GRUB (this grub menu shows up when I select the entry for it in the BIOS boot menu)
How do I edit this GRUB menu to also point to the android-x86 installation? Is it possible to do this from Windows?

The speed is not going to be ideal if I understand your question correctly.

@William why would the speed not be ideal?

it's just typically slower that is all

To start it would help if you could provide some logs with adb. The x86 firmware to get a dump of whats going on just simply throw the command adb logcatfrom an elevated command prompt. Making it simpler to read though it should be a dump and pretty straight forward you can try to add -v (verbose) long looking like: abd logcat -v long
hopefully the adbd daemon has started since thats part of the init job.
However, if it has not and cannot get a logcat then you can try to skip part of the boot process to get thing farther along within the boot process by stopping the zygote by:
From the x86 developers website:

Stop zygote to run automatically:
Go within the the vendor/whatever_device_oem/eeepc/init.rc, change following lines:

service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on

to:

service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
disabled
oneshot
At this point hopfully stopping the zygote will get things communicating once the davlik starts going since that is what gets things in the virtual machine going.
Try to pull logs through the above mentioned logcat command.
When you want to start zygote manually after you get or if it fails then throw the command from an adb shell start zygote or if unable to get an adb shell you could just try from a terminal emulator start zygote if that fails then stop and revert the changes to the vendor/whatever_device_oem/eeepc/init.rc from the booted is is, or within the iso, or before re-compilation.
Hopefully by this point you can post a dump output so we can get to the nitty gritty of what is going on.
Though it sounds like a boot order issue from the primary bootloader to the secondary bootloader and so on. It could also be any of the other pertinent paths needed to boot.
With that, after going through your long detailed steps that you have tried for debugging. Leading to my long detailed winded answer to state logs are key to debugging. Of the top off my head I say that it is most likely a path issue that can be corrected using the set command from a linux based system or linux like system command prompt or emulator. (Key by the way when saving a brick from grub-recovery).
Throw the set command to see what the system recognizes and see as the way to the chosen path.
See what's shown and compared to what's needed such as set root, cmdpath, kernel, boot, grub, vmlinux or aboot, and many more things required for boot but not the same let device and OEM, OS version, or variants.
The syntax is:
set {envvar=value}
Simplified:
Set option = (Value)/the/chosen/path
To delete/remove an environmental variable just us unset instead of the set command.
GN'U technical manual explains what's appears to be your asked issue:
https://www.gnu.org/software/grub/manual/grub/html_node/set.html#set

GRUB’s normal start-up procedure involves setting the ‘prefix’ environment variable to a
  value set in the core image by grub-install, setting the ‘root’ variable to match, loading
  the ‘normal’ module from the prefix, and running the ‘normal’ command (see Section 16.3.51
  [normal], page 77). This command is responsible for reading ‘/boot/grub/grub.cfg’, run-
  ning the menu, and doing all the useful things GRUB is supposed to do

Start your debugging solutions with the set command to get the proper boot variables in order. If you have to delete a variable that's been set then use the unset command.
If not that than we need logs to find out what's going on with the boot process.


text:
Use image file as camera (Android 10)
Instead of using the real camera, I would like to simulate the camera input as a static image file. I want it to work with any app, as if it was a camera. This question had been answered Use image file as camera but it doesn't work with Android 10.
The real world use case is that I will need to scan a QR code / tag from WeChat in order to use WeChat official accounts, and WeChat made it mandatory to do it via the camera. You can test it on: https://mp.weixin.qq.com/ (You will need to register an account first obviously...)

https://android.stackexchange.com/questions/124751/use-image-file-as-camera

If it's a built-in in-app camera, then https://android.stackexchange.com/questions/145020/how-to-emulate-camera-input-in-android-to-activate-whatsapp-web?noredirect=1&lq=1 should be more relevant, though there's no satisfying answer yet.

@AndrewT. someone in that question referred to https://android.stackexchange.com/questions/124751/use-image-file-as-camera which is not working for Android 10. So I am guess in Android 10 this is not doable.

It's a different use-case: Q #124751 (mentioned on this question) was interpreted as taking a photo from an image file, whereas Q #145020 is about emulating camera input (e.g. scanning barcode/QR) from a file. The answer (now converted to comment because it's essentially a link-only answer) on Q #145020 that referred to #124751 doesn't apply. So, it's not because of Android 10, but it's a different use-case and not yet answered.


text:
Use phone as USB modem by ADB
I want to use the phone as a backup line for my Linux server. Can I do this by using the ADB? I mean, forward everything to a socket and route the traffic there.
I also need some port forwarding, would be great if it could be transparent. Or do I have to use the tether option on the phone and configure an interface?

Hi, looks like you changed the question after it received an answer. As a Q&A site, please note that changing a question that invalidates existing answers is frowned upon. Also, adding a new question after it has been answered won't notify existing answers, so it'd be preferred to post a new question and additionally link to this question as additional context.

First, you need to make sure that your phone has a public IP so that it's accessible from the internet (which is usually not the case). Otherwise, port forwarding doesn't make sense. See How to connect to Android over 3G/4G public IP?
Using an Android phone as a USB modem + router is rather simple. That's what we do by turning on the WiFi hotspot or USB tethering. On rooted phones, port forwarding works by adding DNAT firewall rules. On non-rooted phones, you can use adb or netcat or apps like Fwd (ports under 1024 cannot be forwarded though). For details, see How to port-forward internet using Android Hotspot to PC?
However, transparently forwarding all traffic (and not specific ports) to a Linux server - using Android as USB modem only - is complex (it won't work without root access). It works by manipulating network routing (tables and RPDB) on Android and optionally on a connected host. See How to assign Mobile Data's public IP to a host connected on a hotspot?


text:
Recover a phone number a dialed with no signal
At the bar last night I got a number from an amazing girl that I dialed in the bar. I had no signal when I dialed the number (the bar was deep underground) and I don't see the number in my call history.
How can I recover this number?

you could check the notification history but i am afraid if it never reached entry in call logs it will not be in any log. this becomes the day where you truly hate android

next time send sms instead or save in contacts amazing-girl :)

Afraid you're out of luck here, see: Android - Call log/ history : Retrieve a dialed number when there was no network coverage.


text:
Have apps that "support Chromecast", want to send to TV using MiraCast
Situation:

I have an app on my phone that says it supports "Chromecast" (mechanism not specified).
I have an TV (Sharp) that supports MiraCast (protocol).

Is there any way to provide the "Chromecast" API (whatever it's actually called) endpoint to a local app and use MiraCast to send to the TV?
I am not asking:

how to turn on screen mirroring [I can, but it works poorly]
how to obtain or use a Chromecast device [I know Google wants to sell them]
the difference between the two? [I have read around a bit]

I have read through a number of questions about MiraCast and Chromecast, but most seem to be "what's the difference?" and the few asking for "how to...?" seem to be "how do I re-enable screen-mirroring support in Android?" which isn't the issue, since there are multiple apps that use MiraCast protocol to connect to TVs and play video.
I need to know, specifically, whether there is a pre-existing app that can provide a "Chromecast"-like interface at the client side, and use the "MiraCast" protocol to connect to the TV.
If not, is it possible for me to write one, or is there something about the 'cast services that's restricted so it can't be provided by a non-Google-sourced app? Not asking how to write one, I'm hoping I don't need to try.
As per @MorrisonChang's comment, we actually have three devices we'd like to be able to use for this, all Huawei: an HONOR 20 Lite, a P Smart (not the 2019 update), and an older P9 Lite which has a dying battery but works fine plugged in. Android version is Pie on the HONOR; I believe the P Smart shipped with Oreo but has since had a Pie update available (not my device, so not sure if it has been updated or not).

You don't mention which phone you have. Related: Steps to programmatically cast from android to miracast receiver Note that programming questions are off-topic here.

@MorrisonChang it isn't specifically a programming question, I'm hoping there's an app I've failed to find or that I've overlooked a feature / setting somewhere. I'm fairly sure that SO would have deemed this as off-topic there.

I can, but it works poorly you still haven't mentioned what device(s) & OS version. Chromecast != Miracast so anyone using the Chromecast SDK isn't supporting Miracast directly. I suspect that to use Miracast (official vs OEM display SDK) would require a pairing first at the OS level then the app would then see the secondary display.


text:
Messages from other android users not registering
I've noticed that my galaxy s10 has problmes processing(might not be the correct term) messages from other android users. First, if im using my galaxy buds, it will skip reading messages from other android users. Second, KDE connect will not register new messages from android users. This is frustrating. Appreciate any help.
EDIT: Is there a way to treat android to android messages like regular SMS, as opposed to having the read receipt and blue indicator dots on? I think that is messing with everything.

use the default sms app

I am, is there anyway to disable the advanced messaging stuff

https://android.stackexchange.com/q/56620 https://android.stackexchange.com/tags/default-applications/info

i have similar problem with textra https://android.stackexchange.com/q/214283


text:
Accessing local computer using hostname
From my tablet running Android 9 I would like to access a web site on my local server using its hostname (server). This works fine from my laptop computer running Debian 10. However, on my tablet I get the error message "This site can't be reached" when I enter the address http://server.local in a web browser. Any clues?

What is your intended DNS resolver in this case? Does your computer know how to resolve on its own? Do you expect the phone to know it or to query it?

@wbogacz The server and my laptop runs Avahi. Can I install Avahi on Android or should I install something else?

Does this answer your question? How to ping a local network host by hostname?

@IrfanLatif If I login on my router (192.168.0.1) I can see that my server correctly presents itself with the name server. The question is, what should I do on my Android device to make it aware of the local hostnames?

Duplicate of: How to ping a local network host by hostname?
I order to access a local computer from Android using hostname. You have two options:

Add the IP address vs. hostname mapping of the local computer to /system/etc/hosts file on your Android device. See How to edit 'etc/hosts' file? and How to edit '/etc/hosts' file on non-rooted phone?

OR

Run a DNS server on local network. Usually a WiFi router is already hosting a DHCP+DNS server.

Make sure that DNS server is aware of the hostname of the local computer e.g. communicated through DHCP or some other mechanism.
Make sure that DNS queries from Android device goes to local DNS server and not on internet. See How to configure DNS properly?

Turn Private DNS off on Android 9+, and
Add static DHCP/DNS from settings, or
Add DNS using ndc resolver setnetdns command-line, or
Use VPN based app mentioned above to force DNS server, or
On rooted phone use iptables DNAT for port 53 to force DNS server

RELATED:

How does Android OS do DNS name resolution?


text:
Offline Mesh Instant Messaging
TLDR: Is there an Android app that would allow for reliable instant messaging in areas without internet of any sort?
I am looking for a free Android app that would allow several users to communicate with each other over short distances even when there may not be any internet connection available to them. This means that the app should be able to run in the background, connect to a mesh network of all other devices running the same app and send and receive messages reliably. Having to give the app special permissions is not a problem. (Though the previous option
is preferable, if there is a way that works using a private WiFi (without it having to be connected to the internet) and a server hosted on a local machine I am also interested in it.)
I know this is asking quite a lot, however, a number of apps on Google Play claim to possess all these features. I have tried some of these that work via Bluetooth and ad-hoc WiFi but I found that none of them worked reliably. These include:

FireChat: I know it used to work in the past but the current version does not
Bridgefy: only seems to support text messages in the current version and is unreliable, but it's still the best I could find
Briar: did not work well
Signal: did not work well
goTenna: likely works well but very expensive

I only tested these between two devices each time, might any of these work better in practice with more users as mesh networks should in theory? Is there an app that might help I have not tried yet? Or is there a point to trying out old versions of FireChat hoping to stumble upon a working one? If so, would I be able to trust it (both the APK from a mirror and the app data security-wise)?

You might want to describe what you mean by "reliable instant messaging in areas without internet" as Android is being aggressive about turning off the radios in recent versions of the OS and may require user action for pairing.

@MorrisonChang I edited the question.


text:
How can I remove system apps on my amazon fire 7 9th gen tablet using adb commands?
I'm tired of bloatware on my amazon fire 7 tablet (9th gen)

https://forum.xda-developers.com/showthread.php?t=3922213

1. Find out the package names
In order to uninstall the apps, you need their package names. Within an adb shell, execute:
pm list packages

Take note of all the package names that you want to uninstall. (PLEASE be careful. DO a backup first. Many if not all sources say it's oh so easy to re-install apps because you don't really fully delete them and only uninstall them for the current user but I did have issues with re-installing it on some devices in the past! Also removing crucial system applications can cause bootloops.)
2. Uninstall the package
pm uninstall -k --user 0 PACKAGE

Replace PACKAGE with the name of the package (e.g. com.confetti.app).
-k is to keep the data and cache directories around after package removal, this might be neccessary without root. It worked without it on an LG device for me in the past though.
--user 0 uninstalls the app just for the current user, so basically the app is still there, but since uninstalled for the main user, it won't bother you in any kind of way. Without root or RW access to the system partition, this is your best bet.
Done.

Alternative method (requires a recovery with RW access to the /system partition):
On some devices you can use a custom recovery to do this, slightly more efficiently, aswell. You won't need root within the phone (e.g. no superuser app.) but you will need a custom recovery and the ability to mount the /system partition as RW. Then you can use this, within an adb shell in recovery:
mount /system
ls /system/app

This will list your system apps. Take note of what you want to delete. For example if you want to delete confetti.apk, run this command:
rm /system/app/confetti.apk

Do this command for every app you want to remove, then restart your device.

In any case: BACKUP FIRST


text:
S7 data recovery with broken screen
I have a galaxy S7 (SM-G930F) with a broken screen. It can receive calls and texts and connect to wifi. I can access it via https://findmymobile.samsung.com/ to unlock it. That site also has options to back up data but they seem to hang without doing anything.
If I connect it to the computer via usb it is recognised but shows no files present to copy.
The phone has access to my wifi.
I have tried downloading several supposedly different programs for data recovery.
One thing that is really confusing me is that most of them seem to be variations of the exact same program dr. fone but with different product names. What is going on there?
For instance isky toolbox = dr. fone
Some of them don't support S7 (even despite being the same programs as each other). They threaten to risk bricking the phone if the wrong model is selected.
I do not have usb debugging enabled (at least I don't recall enabling it, though I possibly install some apps that might have such as a Linux terminal program I don't remember and can no longer check)
I'm am also trying up the contents of the SDcard. I'm not sure what's it and isn't on there. ie. in the Android directory. Windows refuses to transfer the files itself (if I select all of them it copies nothing). It also suggested it would take >1 day to backup a subset of the media files (~9Gb). so I need to use a different copy tool. I am currently trying AOMEI Backupper. This has not yet completed even counting the files to copy.
What are my options for recovering files such as photos or other data like app settings, game progress, whatsapp messages or whatever?
I'm not sure what's on the SD card versus the internal storage.
I have the option to use either Linux, PC or even iPad for this.
Replacing the screen or some other hardware repair is not an option.
I have since moved my sim card to a new phone (different model) but could move it back if that would make any difference.
airdroid looks like a good way to get around this kind of problem except that I have to have installed it before I broke my phone.
Some of the backup/recovery programs look like they work by pushing an app onto the phone somehow. Being able to push one of them or something like airdroid would be great.
Similar questions:

Access files or ADB on locked Galaxy S7 with broken screen
Enable ADB and/or change USB connection mode on Galaxy S7 w/ broken screen

They don't quite help me though.

Basically...the new phones have a choice for USB modes. It's probably stuck in USB charging mode by default. You need to switch it to MTP. If your touchscreen seems to still work, you can try to unlock it then go at it blindly. Use this video to approximate where to press on the screen. https://youtu.be/pZzIU5ErC4I?t=80  Once in MTP mode, windows will be able to access the files.

I would have previously set it to MTP mode, so it should still be in it, unless something can reset it.

MTP is not working on lock screen. enter your pin or password (see the "not helpful" duplicates). besides this, depending on build.prop for some devices you have to select MTP in developer options each time after connect (don't know if this is a bug or feature)


text:
Proxy server connection
I have got a question.
I am a college student in India, my college provides free wifi throughout the campus . To access the wifi we have to use the proxy server connection , we use apps like psiphon pro to connect. Using this proxy server connection we can access youtube and many other apps but apps like PUBG,netflix etc don't connect to this server and we cant use these.
I just want to know why is that these few apps dont connect to the proxy server while other apps do. I dont have much knowledge about network and proxy servers. Is there any we can use PUBG mobile using college proxy.
I am planning to develop an android application which can allow users to play PUBG mobile using college proxy. Shall I reach out to the PUBG mobile developers , so that they can help out as why is it happening so.
Please tell me what you think about this issue and is there any other way to solve this problem.

Does this answer your question? Why is not all traffic captured from my device when routing through proxy?

Most likely the used proxy server is an HTTP proxy server (also called Web Proxy server). This means effectively that you can only make HTTP connections (which is a TCP based protocol).
Online games require fast responses therefore they usually use UDP or at least TCP. A game that essentially requires a fast reaction rate like PUBG never use HTTP for game data.
Therefore if your proxy server only supports HTTP(S) you can't tunnel UDP traffic through it without loosing the speed advantage of UDP. Hence if you really would finally succeed to tunnel PUBG traffic through your proxy you will most likely pay this by extreme high latency values making it no fun to play.
Hence you may succeed in your "project" but anyhow at the same time loose.
The only chance I see if the used proxy would support the SOCKS-5 protocol. However it seems like Android can't use this proxy type without third party apps therefore it would be really luck if the used proxy would support this.


text:
Android asks me for USB debugging permission on one computer, but not another
I have two Ubuntu machines, a laptop and a tower. ADB works on the tower but not on the laptop. I'm using the same Android device on each, with the same adbkey and adbkey.pub. On my tower, ADB works - I can access the shell, etc. However, the moment I plug the device into my laptop, I get the "Allow USB debugging?" popup on the Android device. This is a problem because this device is non standard hardware with no touchscreen, so I have no way of clicking Yes. How can I troubleshoot this and get ADB working on my laptop?
The device is running Android 5.1.1.

This was due to missing udev rules on my laptop which I'd forgotten I'd set up on my tower. You can find information on setting up udev rules elsewhere, but I'll post the exact steps I took here (which I got from my company's internal help wiki - remember we use weird hardware, so I can't guarantee this will work in all cases).
Create a file at /etc/udev/rules.d/51-android.rules with the following contents:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1bbb", MODE="0666"

Then run:
sudo chmod 644 /etc/udev/rules.d/51-android.rules
sudo chown root. /etc/udev/rules.d/51-android.rules
sudo service udev restart
sudo killall adb

Disconnect and reconnect the device physically, then start using adb.


text:
How can I darken the navigation bar when presenting slides with Google Slides?
How can I darken the navigation bar when presenting slides with Google Slides?
For example in the following screenshot I want to have the white navigation bar on the right to be visible to be dark:

I tried to use the Navigation Bar application to darken the navigation bar: this works until I open Google Slides, which turns the navigation bar white again.

I use Android 9 with Samsung Galaxy S9.

When you say presenting, how are you doing it (mobile screen, Chromecast, Samsung screen share)? Also have you tried using Accessibility in Settings or set the Navigation Bar to gestures rather than buttons?

@MorrisonChang thanks, I'm sharing my screen through a videoconferencing program (BlueJeans). I have just tried using the gestures for the navigation bar: there is still a white band on the right but it's an improvement. What do you mean by using accessibility in settings?

In Samsung there are additional settings for visibility/themes in Settings->Accessibility->Visibility Enhancements which include Themes and color modifications. Just another thing to look at to see if anything works for you. But probably the gesture indicators are your best path for minimizing the navigation bar.


text:
Will Nextflix Widevine L1 play with magisk?
If my phone natively supports Widevine L1 in order to play 1080p to 4K videos on Netflix or Amazon Prime, will Netflix play the high res rather than 480p with magisk that passes safetynet.

I can confirm the answer is no.

Unlikely. Generally, on most phones, your DRM keys will be wiped when you unlock the bootloader. So, even if you clear SafetyNet, your Widevine level is most likely already dropped down to L3. That means no more HD playback. Locking the bootloaderback will work on some phones, won't on others. Ideally, it is a permanent loss of Widevine L1 when you unlock with no way to restore it.
I am not sure if there are some hacks which pass fake Widevine status to the apps in question and restore their HD playback.

Thanks, I decided to cancel my netflix subscription instead.

@singhnsk I disagree with you. Simply unlocking the bootloader doesn t means losing the L1. I tried to see if I could still play L1 videos on my Galaxy tab S3 after unlocking the bootloader but before rooting it and it worked.

@user2284570 can you kindly check with the DRM Info app about what's your current Widevine status? The drop in widevine should happen on every well secured Android device. In case it didn't on the Samsung, then it is Samsung which is not properly following the implementation of DRM.

@singhnsk I confirm it still shows that level. I suppose Samsung does it only once the efuse is trapped.


text:
How can I make the Firefox menu bar dark?
How can I make the Firefox menu bar dark?
The dark reader add-on doesn't change the Firefox menu color which is still white :

Any reason it needs to be Firefox? I personally recommend the Samsung Internet Browser for a dark mode. No need for addons.

@NatsuKage thanks good to know! On my side I'm using Opera, which also have a built-in dark for both the web pages and the user interface. I have some account on Firefox so I'd prefer to keep using it.

The bar you are targeting for dark mode can be changed via a theme. Head over to Addon store for Firefox, pick a theme of your liking and install/enable it. Do note that many themes listed there won't work on Firefox for Android even though they would install just fine.
But even after this, the menu bar or whatsoever that is called when you press the three-dots line is still gonna remained unaffected.


text:
Google assistant triggers in hindi language
Whenever I trigger google assistant using bluetooth headphones, it starts speaks in hindi and I need to ask in hindi. But when I start assistant from mobile directly it works normally (in english).
How can I fix this to always work in english ?

Could this problem be solved by going into keyboard settings and update the language feature? Android keyboard that came with the phone vs. app keyboards can vary greatly.Google assistant is in the input method of Android settings....it depends on your phone model but i would check there .hope it helps


text:
System partition locked to read only in Android 10
Help, I don't know what I did but after installing a custom ROM, I noticed that my system partition cannot be mounted as read/write.
I tried

"mount -o rw,remount /system" command on a terminal emulator, ADB shell, and TWRP terminal
The command shows no feedback showing failure (maybe I succeeded?)

Mount it using the built-in TWRP mount function.
The system check box can be checked out (it doesn't retain its check mark on reboot)

Some apps that actually works according to sources and reviews.
Some say (Failure to mount..) Some say (System mounted as rw) some doesn't have feedback.

I don't know what to do.
I noticed this when I installed a custom ROM. I tried using another custom ROM but same thing. Also reformatting doesn't help. I don't know if this occur on the stock ROM.

For reference
Device: Xiaomi Mi A2
Android version: Android 10
Custom ROM: AICP nightly build 15.0

Disable dm-verity

Android 10 prevents apps or pretty much anything from mounting system as R/W. Yes, even if you are rooted.
Top John Wu, the creator of Magisk has covered this in a series of tweets. I will link them below for your reference. Your only way of tampering your system now would be using a systemless Magisk module. You can make your own or use some other module and inject files inside its folder before rebooting to apply that module.

Just confirmed that the inability to remount system (the directory "/" in system-as-root) to rw is something new in Android Q, NOT an issue with the new system-as-root approach Magisk is using in the canary builds. Will have to investigate further to find out how to deal with it. Source: https://twitter.com/topjohnwu/status/1169720663201988611
I found out that Android 10's system images are formatted with EXT4_FEATURE_RO_COMPAT_SHARED_BLOCKS. It will deduplicate blocks in the filesystem to reduce the image size. On my Pixel XL, the partition is physically not large enough to successfully run 'e2fsck -E unshare_blocks'. Source: https://twitter.com/topjohnwu/status/1170404631865778177?lang=en
As clearly stated in the name of the feature, that EXT4 shared blocks feature is RO (read-only). The inability to disable this feature due to lack of free space in the partition (at least on my Pixel XL) makes it literally impossible to ever mount the system partition as rw. Source: https://twitter.com/topjohnwu/status/1170404633371525120
I guess Google's justification to format partitions with this feature enabled is the introduction of overlayfs to "simulate" a writable partition.
RIP to any mods or root apps that modify system. On Android 10 it seems system is either formatted as RO or using logical partitions. Source: https://twitter.com/topjohnwu/status/1170404634604658688
BTW, just found this tidbit in Android's source code. They call these kind of filesystems "ext4 dedup". Other read-only filesystems they are aware of is squashfs (widely used in extremely constrained devices) and Huawei's EROFS. Source: https://twitter.com/topjohnwu/status/1170443615077666816

So, in short, you cannot R/W the system partition anymore with Android 10. The argument is just rejected.

EXT4_FEATURE_RO_COMPAT_SHARED_BLOCKS would be a problem on devices originally shipped with Android 10 (due to Dynamic Partitions and hence small system.img). On devices upgrading to Android 10, custom ROM developers can (re-)build system.img without SHARED_BLOCKS. Or the user may try e2fsck -E unshare_blocks in TWRP. If the shortage of space is a problem, dump system.img to /data partition or external SD card or PC, remove block sharing (by resizing filesystem) and flash back to system partition. ATM I can't think of a reason for this to not work. Bigger problem is dm-verity.

@IrfanLatif my Nokia 8.1 updated from Android 9 to 10 and it had this problem and that's when I discovered TJW's tweets. I tried with a custom ROM and dm-verity was out too. My experience with dm-verity is more about device denying to boot or marking it as corrupt/won't boot types. It shouldn't be the one causing R/W from not happening. But I believe you know more on that topic. I don't know how and in what ways custom ROM devs can sort this out, but the few GSIs I used had this issue and I can't expect many of modifications from a GSI. Let's see what the ROM developers achieve in the future.

I was having similar problems with Android 10 (Havoc OS / TWRP / Magisk 20.4) on an ASUS Max Pro M1. I wanted to remount /system so that I could edit /system/etc/hosts. I couldn't get adb to remount, though, and running "adb root" wouldn't work either.
Eventually I was successful, though, doing what I needed to do on the phone in a terminal, rather than using adb / debug mode. Here's what I did, including installing a file editor, since busybox can't install on Android 10 either:

Install Termux from the google play store.
Run Termux.
Type "pkg install vim".
Type "su", and grant permissions when the Magisk app prompts you.
Type "mount -o rw,remount /" #mount -o /system doesn't work, so you have to mount the whole filesystem in read/write mode.
If you want to use vim as root, you'll need to do this, too: "alias vi=/data/user/0/com.termux/files/usr/bin/vim" #let the shell know where to find the binaries for vim, since it's installed with termux. You may need to modify the path slightly depending on your phone; check first to confirm that's where it is.
Do your dirty work.
When finished, type "mount -o ro,remount /" to remount the filesystem as read only.

That should do it! I hope this works for you as well...

Nope, and I'd be surprised if it actually worked for you. First of all, common sense told me that it should not matter whether you access /bin/sh through adb shell or through termux, but never mind. Remounting / as rw seemed work and it actually showed up in mount as rw. I could edit files under /etc, but: First time mount -o ro,remount / threw an i/o error on dev/block/dm-1, but repeating the command seemed to work and / showed up as ro again. However, after a reboot none of the changes were present. So, no, this doesn't work, since it doesn't survive a reboot, sorry.

Hi, I'm also trying to edit the hosts file! However, when I try to run mount -o rw,remount / in Termux, I get the error '/dev/block/dm-0' is read-only. Do you have any idea what the issue is here?


text:
How does rooting affect full disk encryption (Oneplus 3T)?
My oneplus 3T running Oxygen OS 9.0.6 (Android 9) came with full system encryption by default.
I want to install root but also keep full system encryption.

Will root disable encryption?
Does root allow to bypass encryption / lock screen with adb or some other method? (I. e. in any case)
I am familiar with the half-baked Android system backup feature. is there a way to root the phone without a factory reset? if not, what is the best way to create a system image or similar so I don't have re-install and configure  everything over again?
what is the difference between system and systemless root?

I have never heard of "full system encryption", I only know full disk encryption (FDE) and file based encryption (FBE) - both encrypt only user data. Android 9 usually uses FBE - you should make sure which method is use don your device: https://android.stackexchange.com/questions/195713/how-can-i-find-out-if-my-device-uses-fbe-or-fde In any way you should not ask multiple unrelated questions in one post.

no, rooting does not affect encryption
encryption remains safe. depending on user (who is responsible for granting root access) it is not vulnerable as long as malicious app has no root permissions
rooting does no factory reset. once rooted, the simplest straight forward backup method is (FDE)
adb pull /dev/block/dm-0
rooting system is outdated. systemless root does it's stuff without modifying system (to preserve functionality)

However, the answer becomes invalid when we are talking about unlocked bootloader

attacker can flash modified boot or recovery
TWRP may able to decrypt userdata partition without asking for credentials when FDE uses default_password (which seems the case for you)
attacker can inject scripts without having access to encrypted userdata, which can wait for the user unlocks it's device and then gain access to decrypted userdata. for FBE it is possible to modify credentials (not the case for you)
unlocking bootloader requires factory reset. your only chance for full backup would be a rooting method without unlocking bootloader, which is afaik only available for Mediatek devices and for the Galaxy S9 and Note 9. you rely on common (non-root) backup solutions

default_password can be changed. disable forceencrypt, format data, set screen lock, encrypt again. after this TWRP ask for screen lock credentials

I am confused: 1) how do I change default_password (FDE) to prevent access to userdata and do I need a custom rom to do that or Oxygen OS (default system) works?, 2) "attacker can inject scripts without having access to encrypted userdata..." -> does this refer to MALICIOUS root apps or to anyone with physical access to the phone and, if I understand correctly, I still need to unlock my phone?

see comment 2) physical access only, yes

thank you. one last question, then I will happily accept your answer : rooting requires unlocking the bootloader if I understand correctly. if that's the case, what are the implications for RE-locking it? I've heard of soft bricks with encryption and such, a bit concerning. Not sure if those comments were about systemless though. the purpose of RE-locking is obviously to increase security

yes, unlocking is required. before locking bootloader all partitions must reversed to official state, otherwise it may hard-brick


text:
Make me able to choose which images/videos received via WhatsApp to show in my Google Photos Gallery?
I am having a problem that drives me crazy. Coming from iOS I had my Photo Gallery, and separated from that I had my WhatsApp App with its chats and images. When I wanted to save some of those images friends sent me, I tapped them and saved them to the Gallery. Now on my Galaxy Note 10 either ALL images received by ALL chats are also shown in my Google Photos App or none of them and within WhatsApp I am TOTALLY unable to safe choosen images manually to my Google Photos Gallery. They do not show up on the Gallery nor any Album.
This drives me crazy!!! Who would want all images one receives beeing shown in the gallery? And who would not be able to store some chosen images to the gallery? How comes Android completely rides aside an obvious desire of a common user?
Is there any solution to this?
Note: I am not talking about automatic download of media in WhatsApp. I am talking about selectively/manually showing/saving media to my Google Photos Gallery.

WhatsApp saves - all photos which are downloaded - to the WhatsApp/Media/WhatsApp Images folder.
The way gallery apps work on Android is that they scan internal storage and any folder which has media files in it are shown in the gallery app. So, similarly, the WhatsApp Media folder shows up for you in the Google Photos app.
Your few options are:

You can copy items from the WhatsApp Media folder and move them to
another folder.
You can manually stop media from certain chats from appearing in your Gallery app. You can set that in chat settings and WhatsApp will move these files to a folder with .nomedia attribute set. So, this media will not show in any gallery app (except file managers).
You can disable all media from all chats from appearing in your Gallery apps. In this case, if you need to specifically save some media items, you will need to manually copy those items from the nomedia folders to your main folder. You will need a file manager for this task.

ok, so basically no solution to this. Just crazy that android does not provide such an essential feature.