date
stringlengths
10
10
nb_tokens
int64
60
629k
text_size
int64
234
1.02M
content
stringlengths
234
1.02M
2019/06/06
887
2,992
<issue_start>username_0: I'm a user of the Realme C2(android P). I've just formatted my SD card as the internal storage through Powershell since my manufacturer doesn't allow me to do it in the settings. It don't think it worked as now i do not see the SD card in the storage section. It seems to have completely disappeared.These are the commands that I used from this [link](https://jimcofer.com/2016/03/10/marshmallow-lg-and-adoptable-storage/): ``` adb shell sm list-disk adb shell sm list-volumes all adb shell sm set-force-adoptable true adb shell sm partition disk:179,64 private adb shell sm set-force-adoptable false adb shell sm list-volumes all ``` I really have no idea if they even worked as I was told that the 4th command would take some time but, it didn't. I'll be more than happy to post screenshots or anything that is required for you to understand the problem. So if there is anything you can do to help me, please do so. This is my last resort. EDIT: This is what happened in the Powershell window: ``` PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb devices List of devices attached EUS4***ZPBTWAM79 device PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm list-disks disk:1*9:1*8 PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm list-volumes all private mounted null public:1*9:1*0 mounted 01*7-1*13 emulated mounted null PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm set-force-adoptable true PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm partition disk:1*9,1*8 private PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm partition disk:1*9:1*8 private PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm set-force-adoptable false PS C:\Users\Sa**vik\Downloads\platform-tools> .\adb shell sm list-volumes all emulated:1*9,1*0 unmounted null private:1*9,1*0 mounted c5ee2ab2-9**7-468e-8**6-c700ba9**283 private mounted null emulated mounted null PS C:\Users\Sa**vik\Downloads\platform-tools> ``` I'd put in \* to keep it anonymous I'm giving up for now. We'll see what happens in the future<issue_comment>username_1: Try to plug the memory card into PC and see what is the file system of it. Default format for memory cards is FAT32. Sometimes file systems does gets changed and the changed file system is not compatible with the Android system. It happens a lot of times with USB drives. Upvotes: -1 <issue_comment>username_2: When you format your SD card as internal storage (aka [adoptable-storage](/questions/tagged/adoptable-storage "show questions tagged 'adoptable-storage'")), it will be encrypted. The key for en/decryption is stored on the device only. Hence all that a PC can see is "there is a partition but I don't know what's on it": as it hasn't access to the key, it cannot decrypt the contents. For further details, see e.g. our [adoptable-storage tag-wiki](https://android.stackexchange.com/tags/adoptable-storage/info) and follow the links from there. Upvotes: 1
2019/06/06
1,532
4,336
<issue_start>username_0: I'm trying to diagnose a random reboot on LineageOS 14. `last_kmsg` is not in `/proc`, nor it is in `/sys/fs/pstore/console-ramoops`. **EDIT:** ``` ~# mount | grep PSTORE ~# mkdir /mnt/pstore && mount pstore -t pstore /mnt/pstore && ls /mnt/pstore mount: 'pstore'->'/mnt/pstore': No such device ```<issue_comment>username_1: Back in 2012, `/proc/last_kmsg` ([1](https://android.googlesource.com/kernel/common/+/c672528aec4a1cf6f3df7a6022e6823a20b20f8e)) used to be a dump of kernel console messages, exported after reboots by Android's `ram_console` functionality (CONFIG\_ANDROID\_RAM\_CONSOLE), which used `persistent_ram` (CONFIG\_ANDROID\_PERSISTENT\_RAM) to handle a block of RAM that wasn't erased across reboots ([2](https://blueprints.launchpad.net/linux-linaro/+spec/android-ram-console)). `persistent_ram` was based on Linux upstream RAMOOPS code which logged **panic and oops** messages to RAM. RAMOOPS was deprecated in favor of PSTORE ([3](https://android.googlesource.com/kernel/common/+/9ba80d99c86f1b76df891afdf39b44df38bbd35b)) (memory handling) and PSTORE\_RAM ([4](https://android.googlesource.com/kernel/common/+/1894a253db97059bc299b834b76f665bc6586b1d)) (logging panics/oops to `pstore/dmesg-ramoops`). Later PSTORE\_CONSOLE support was added ([5](https://android.googlesource.com/kernel/common/+/b5d38e9bf1b0c4db19e336b59b38dfb5d28bf1bf), [6](https://android.googlesource.com/kernel/common/+/f29e5956aebafe63f81e80f972c44c4a666e5c7f)) to log not only the panics/oops, but all kernel console messages to `pstore/console-ramoops-N` which can be read later by mounting `pstore` ([7](https://github.com/torvalds/linux/blob/v5.1/Documentation/admin-guide/ramoops.rst#reading-the-data)). So the Android specific RAM\_CONSOLE ([8](https://android.googlesource.com/kernel/common/+/15d76446205710ddfcba6cc9156c7883074f84b1), [9](https://android.googlesource.com/kernel/common/+/d7a33d74e9913bd4d2580aff67ed7051935f546b)) and PERSISTENT\_RAM ([10](https://android.googlesource.com/kernel/common/+/cddb8751c80348df75149f44fc3bf38d3dd1f3e6)) were utterly removed. Now `pstore` also offers logging userspace messages (PSTORE\_PMSG) ([11](https://android.googlesource.com/kernel/common/+/9d5438f462abd6398cdb7b3211bdcec271873a3b)) and other features ([12](https://github.com/abrt/abrt/wiki/pstore-oops)). Plus it supports multiple backends for persistent storage if supported by hardware, though SoC's on Android devices only support RAM storage (`ramoops` driver, AFAIK). So it's not possible to enable `last_kmsg` on an upstream kernel, instead `pstore` offers a more versatile functionality. > > mount: 'pstore'->'/mnt/pstore': No such device > > > It shows that your kernel isn't built with `pstore` support. All you need to do is use a kernel built with [`CONFIG_PSTORE_CONSOLE`](https://android.googlesource.com/kernel/common/+/refs/heads/android-4.19/fs/pstore/Kconfig#110) and optionally `CONFIG_PSTORE_RAM` (though [buggy](https://android.googlesource.com/kernel/common/+/a28726b4fb624f81d637a8afb9ea12fc16500f61)). Android's `init` by-default mounts `pstore` at `/sys/fs/pstore` ([13](https://android.googlesource.com/platform/system/core/+/android-9.0.0_r42/rootdir/init.rc#235)) from where `dmesg-ramoops` (on panics/oops only) and `console-ramoops` can be read. You can search forums for a custom ROM shipped with such kernel. Or if you have kernel source, you can build yourself on a Linux machine. **NOTE:** Some new devices, like Samsung, still expose `/proc/last_kmsg` interface; I'm not sure whether they use original implementation or `pstore` at back end. --- **FURTHER READING:** [Reading kernel logs](https://docs.halium.org/en/latest/porting/debug-build/dmesg.html) Upvotes: 5 [selected_answer]<issue_comment>username_2: I did eventually manage to set up some kind of chron job which wrote the log to a file every few seconds. I can't remember how sorry - it was more than two years ago. The log didn't give me an answer, which I found puzzling. I wondered if the log was not being copied quick enough before the shutdown. That might be an issue for some people, but I soon discovered the problem was very simple - the battery was faulty. This model (s5) has a removable battery, so I swapped it and the problem was gone. Do the simple things first. Upvotes: 0
2019/06/07
393
1,441
<issue_start>username_0: I lost my phone last Friday, May 31. I was able to get already a replacement SIM card for me to use the same no. again for my new phone now. My Facebook was already hacked yesterday since my FB app in my lost phone was open just like my emails and VIBER accounts. With this, I would like to know how to log off Viber on all devices that I previously opened so my info will not be compromised. My Viber is now open on my new phone and my laptop but I want it to log off in my lost phone and all other devices. Is this possible just like Chrome, or Google, Yahoo, and even Facebook?<issue_comment>username_1: Activate it on a friends phone, then deactivate it on the same phone. It will deactivate your account on all phones and PCs. Upvotes: 0 <issue_comment>username_2: The fact that you are able to use Viber on your new phone means that it is logout of the former as explained [here](https://support.viber.com/customer/en/portal/articles/2914872-protecting-your-privacy-on-viber): > > **Lost or stolen phones** > > > If you have lost your phone, or it has been stolen, you can deactivate Viber by simply reactivating your account with the same phone number on a new phone. > > > Setting up Viber on a new phone will close your account on the old device, and no one will be able to access the chats stored in there. > > > For other apps such as Facebook, Gmail, etc., change your passwords. Upvotes: 1
2019/06/07
913
3,191
<issue_start>username_0: I have downloaded a youtube video in my youtube app and I want to save this video to my phone gallery. What steps should I have to follow to do this?<issue_comment>username_1: YouTube gives you an option to download Videos to Watch them Offline later. These videos get saved in encrypted ‘.exo’ format that can only be opened with YouTube App. So, If you want to use it with Other Media Player, you have to download it on your Android Device. Get the best way to do it, Below: Step 1: First Download & Install: TubeMate YouTube Downloader App on your Android Device [from here](http://tubemate.net/) Step 2: Launch TubeMate App &. Tap on ‘3 Horizontal Bar’ icon from Top Left Corner and Go with ‘Youtube’. Step 3: Now search for any video on YouTube that you want to download. Step 4: Once you run any video, you can download that video by simply ‘Tapping’ on ‘Green Download Icon’ from the Top. To Get Full Pictorial Guide: Check Out Here NOW… [here](https://www.mashnol.org/download-clip-from-website/amp/) Step 5: It will give you the option to download that video in different quality. Select the desired Quality and Tap on ‘Green Download icon’ from the bottom. Note: Google considers that downloading YouTube Videos without authors permission is illegal. That’s why All YouTube Videos Downloading App has been removed from Google Play Store. Use TubeMate YouTube Downloader App to save a copy only for backup. Upvotes: 0 <issue_comment>username_2: You can use Y2mate for this purpose. All you need to do is to open the web site and paste video url in it. Rest will be done automatically. <https://y2mate.com/> Upvotes: 2 [selected_answer]<issue_comment>username_3: You can do it by copying the \*\*video link \*\* and copy that link on \*\*savefrom.net \*\* site. You will be able to do it successfully Upvotes: 0 <issue_comment>username_4: I'm using Termux and youtube-dl python script. Here you have steps to install required software. 1. Install Termux <https://play.google.com/store/apps/details?id=com.termux> 2. Run Termux and paste following commands: `apt update` `apt install python` `pip install youtube-dl` Now you can download movies from YT `youtube-dl` But this is not comfortable way. Here are more steps to make it more user friendly. 1. Create dir in home: `mkdir ~/bin` 2. Create file with your favorite editor. My is `vim` so I used it `vim ~/bin/termux-url-opener` 3. Paste following content: `youtube-dl $1` and save file. 4. Make file executable: `chmod 700 ~/bin/termux-url-opener` 5. Make Termux internal storage accessible. `termux-setup-storage` Accept access for Termux to internal storage 6. Create config file for youtube-dl: `mkdir -p ~/.config/youtube-dl` `vim ~/.config/youtube-dl/config` 7. Paste following config: `-o /data/data/com.termux/files/home/storage/movies/%(uploader)s-%(title)s.%(ext)s` Now if you want to save movie from YT simply open YouTube app, find movie, tap Share and choose Termux. [![screenshot of youtube share window](https://i.stack.imgur.com/UN1aA.png)](https://i.stack.imgur.com/UN1aA.png) Movie will be saved in Movies directory in internal storage. Upvotes: 2
2019/06/07
985
3,421
<issue_start>username_0: I am not sure if [this app](https://play.google.com/store/apps/details?id=com.lagfix.fstrimmer) works. Can someone please help me? My phone is new and in its warranty period so I can't root it yet. I tried this app but I am not sure if it actually did something. Unlike the other famous app on the PlayStore for `fstrim`, it doesn't require root access which is quite incredible.<issue_comment>username_1: YouTube gives you an option to download Videos to Watch them Offline later. These videos get saved in encrypted ‘.exo’ format that can only be opened with YouTube App. So, If you want to use it with Other Media Player, you have to download it on your Android Device. Get the best way to do it, Below: Step 1: First Download & Install: TubeMate YouTube Downloader App on your Android Device [from here](http://tubemate.net/) Step 2: Launch TubeMate App &. Tap on ‘3 Horizontal Bar’ icon from Top Left Corner and Go with ‘Youtube’. Step 3: Now search for any video on YouTube that you want to download. Step 4: Once you run any video, you can download that video by simply ‘Tapping’ on ‘Green Download Icon’ from the Top. To Get Full Pictorial Guide: Check Out Here NOW… [here](https://www.mashnol.org/download-clip-from-website/amp/) Step 5: It will give you the option to download that video in different quality. Select the desired Quality and Tap on ‘Green Download icon’ from the bottom. Note: Google considers that downloading YouTube Videos without authors permission is illegal. That’s why All YouTube Videos Downloading App has been removed from Google Play Store. Use TubeMate YouTube Downloader App to save a copy only for backup. Upvotes: 0 <issue_comment>username_2: You can use Y2mate for this purpose. All you need to do is to open the web site and paste video url in it. Rest will be done automatically. <https://y2mate.com/> Upvotes: 2 [selected_answer]<issue_comment>username_3: You can do it by copying the \*\*video link \*\* and copy that link on \*\*savefrom.net \*\* site. You will be able to do it successfully Upvotes: 0 <issue_comment>username_4: I'm using Termux and youtube-dl python script. Here you have steps to install required software. 1. Install Termux <https://play.google.com/store/apps/details?id=com.termux> 2. Run Termux and paste following commands: `apt update` `apt install python` `pip install youtube-dl` Now you can download movies from YT `youtube-dl` But this is not comfortable way. Here are more steps to make it more user friendly. 1. Create dir in home: `mkdir ~/bin` 2. Create file with your favorite editor. My is `vim` so I used it `vim ~/bin/termux-url-opener` 3. Paste following content: `youtube-dl $1` and save file. 4. Make file executable: `chmod 700 ~/bin/termux-url-opener` 5. Make Termux internal storage accessible. `termux-setup-storage` Accept access for Termux to internal storage 6. Create config file for youtube-dl: `mkdir -p ~/.config/youtube-dl` `vim ~/.config/youtube-dl/config` 7. Paste following config: `-o /data/data/com.termux/files/home/storage/movies/%(uploader)s-%(title)s.%(ext)s` Now if you want to save movie from YT simply open YouTube app, find movie, tap Share and choose Termux. [![screenshot of youtube share window](https://i.stack.imgur.com/UN1aA.png)](https://i.stack.imgur.com/UN1aA.png) Movie will be saved in Movies directory in internal storage. Upvotes: 2
2019/06/09
1,009
3,444
<issue_start>username_0: So I installed a bootanimation on my tablet and it bootlooped because the bootanimation basically crashes the boot sequence So can I somehow delete bootanimation.zip file? I tried fastboot erase system/media/bootanimation.zip and it says RESULT: FAIL(unable to format) Any help is appreciated<issue_comment>username_1: It's Asus Memopad 7 (K013) and I gained root using ZenRoot. I installed bootanimation using Bootanimation changer app. And there's no custom recovery support. Android version is 4.4.4. And I add this here because I can't add comments. Upvotes: 0 <issue_comment>username_2: Please boot into fastboot from fastboot (yes, this is doubled). Do not flash anything, because the tutorial is for Android 5. I will update this answer step by step, based on your input (download link below) ``` fastboot boot C:\adb\droidboot.img ``` If this works so far with Android 4.4.4, now enter fastboot mode from the selection screen again. If not, you must flash stock ROM Android 5.0 (or maybe just `efilinux.efi` + `esp.img` but this is out of scope, because it may brick your phone) Now lets see if you can boot TWRP from this. Your bootloader is still locked, so i am not sure if this works. ``` fastboot boot C:\adb\twrp-recovery-3.3.1-20190609-UNOFFICIAL-me176c.img ``` in case you get TWRP booting, but it stucks on TWRP splash screen, next check if TWRP's adb is working (at least, this commands can be used on a fully working TWRP too) ``` adb shell ``` Now, lets see if TWRP is able to mount /system (within adb shell) ``` mount /system -w ``` You should be able to navigate to the bootanimation with `cd` and check the path. If not, skip this next steps and try to manually mount /system (see last) Exit the adb shell and replace the bootanimation with the correct one ``` exit adb push C:\adb\bootanimation.zip /system/media/bootanimation.zip ``` If this is successful, set permissions for this file (the last one i am not sure, it is maybe `u:object_r:bootanim_exec:s0`) ``` adb shell chown -h 0.0 /system/media/bootanimation.zip chmod 0644 /system/media/bootanimation.zip chcon -h u:object_r:system_file:s0 /system/media/bootanimation.zip ``` If this is working without errors, you are done. Reboot your phone with `reboot` For manually mount /system in case fstab is wrong, you need to figure out the partition (within adb shell) ``` ls -l /dev/block/by-name/system mount -t ext4 -w /dev/block/mmcblk0p* /system ``` (replace mmcblk0p\* with corresponding system partition) Upvotes: 0 <issue_comment>username_3: Use this temp bootloader to sideload twrp from a PC via fastboot. Can confirm this will work with K013! Get an SD card format it too EXT2, not anything else. Then use the link below. Now u can back up and thusly manipulate your system partition thru twrp or pull a backup via sdcard and do some magic on the pc with the resulting zip file, repack it ans load the backup. Either way this intel temp recovery thing works on K013 with 4.4.3 kitkat. All the custom recovery that can be actually put on the device require update to 5.0 lolly and above, as this reformats the hidden boot partitions Asus used...the boot is nit normal. Finnally bootanim.zip must be set to be the exact screen resolution the device expects. Can't use just any. <https://forum.xda-developers.com/android/development/intel-android-devices-root-temp-cwm-t2975096> Upvotes: 1
2019/06/11
890
3,011
<issue_start>username_0: Is it possible to limit searches within the Google Play Store to apps (gratis or paid) that do not contain ads? If it's not possible within the Google Play store, is there another effective way to accomplish this?<issue_comment>username_1: Not sure with native Google Playstore, but you could use Yalp or a fork of Yalp, [Aurora](https://labs.xda-developers.com/store/app/com.aurora.store) ([F-droid link](https://f-droid.org/packages/com.aurora.store/)), it has many search filters e.g for ads, gratis, number of downloads etc.. > > Aurora Store is an alternate ( FOSS client) to Google's Play Store, with > an elegant design, using Aurora you can download apps, update existing > apps, search for apps, get details about in-app trackers and much more. > > > Select the filter and tap apply, your search results will match your criteria. [![](https://i.stack.imgur.com/zOsJB.png)](https://i.stack.imgur.com/zOsJB.png "Filters in Aurora") Filters in Aurora (click image for larger variant) Disclaimer I am not affiliated with Aurora, but I use it as a replacement to Google play store client Acknowledgements 1. [Xda thread](https://labs.xda-developers.com/store/app/com.aurora.store) Upvotes: 4 <issue_comment>username_2: There's the [Playsearch](https://playsearch.kaki87.net/) website which allows you that without having to install anything beforehand: [![](https://i.stack.imgur.com/tXvsD.png)](https://i.stack.imgur.com/tXvsD.png) Playsearch website, your criteria marked (click image for larger variant) In addition to what you asked for, you even can specify how long ago the last update should be at maximum, what size the app should have, what Android version it should support, how well it ranks (stars) – and how wide-spread (number of installs) it should at least be. Upvotes: 6 <issue_comment>username_3: I developed an app (and web) called reallyfreeapps for Android to look at apps and games with no ads and no IAP. You can take a look at <https://reallyfreeapps.com> Upvotes: 2 <issue_comment>username_4: With ***App Finder***, you can filter for apps without ads (and many other criteria). Also, in the result list it is indicated for each app if it contains ads. It has 2,380,000 apps indexed currently, much more than *playsearch.kaki87.net* and *reallyfreeapps.com*. Also, there are more filters available, and more information is shown in the result list. Available from Google Play [here](https://play.google.com/store/apps/details?id=scadica.aq). For more information see the [thread on XDA](https://forum.xda-developers.com/t/app-6-0-app-finder-the-most-advanced-search-engine-for-android-apps.4578809/), and [here](https://skyica.com/). ***Disclosure: I am from Skyica LLC, the developer of App Finder*** [![enter image description here](https://i.stack.imgur.com/1OgfW.jpg)](https://i.stack.imgur.com/1OgfW.jpg) [![enter image description here](https://i.stack.imgur.com/Tqn8n.jpg)](https://i.stack.imgur.com/Tqn8n.jpg) Upvotes: 2
2019/06/12
695
2,749
<issue_start>username_0: Recently I install a custom ROM named eelo <https://e.foundation/>. It comes with pre-installed Telegram app. After much research I was able to uninstall if from the system with the command `adb shell pm uninstall --user 0 org.telegram.messenger`. But when I tried to install the new apk with `adb install telegram.apk` I got the following error ``` adb: failed to install telegram.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package org.telegram.messenger signatures do not match the previously installed version; ignoring!] ``` I also tried uninstalling with this `adb uninstall org.telegram.messenger` but it gave out `Failure [DELETE_FAILED_INTERNAL_ERROR]`. With further research I found out that I can install the new `.apk` with different if I comment the section in `/data/system/packages.xml` referring to `telegram`. But after making the change when I reboot it get back to the unedited version. Currently using Android Nougat 7.1. Can anyone tell me the reason as to why this happens and how I can stop it from happening? And how would I be able to install a different version of the app?<issue_comment>username_1: Try using an apk Cloner if you want to reach to your goal fast. using <https://appcloner.app/> you can change the package id of your new telegram version and install it manually Upvotes: -1 <issue_comment>username_2: Ultimately found an answer to the query and how to solve it. 1. The first is how to delete a system application completely? These are the following steps `$ adb root` - To start adbd with root privileges. `$ adb shell` - To interact with the phone system directly. `$ pm uninstall --user 0 .apk` - To uninstall the package from the root user is any package you want to remove from the system. These few steps may remove the whole package but in my case it was different as it left behind few files from the previous built app. So these were the steps that I followed : `$ adb shell mount -o rw,remount /system` - This would remount the system as read-write. Originally `/system` is a read-only folder so you can't edit directly. `$ adb shell rm -r /system/.apk` - This would remove the apk and there won't be anything left from the previous built. 2. Why I couldn't edit the `/data/system/packages.xml` file? The answer to this is that though I can edit it with `vim` but it kept reverting back to the previous unedited form. This was happening because it was updating the information from `/system/app` files. Thus, editing it went in vain. Refer to the following links that actually helped me out <https://stackoverflow.com/questions/6066030/read-only-file-system-on-android> <https://www.besttechie.com/remove-preloaded-software-from-android/> Upvotes: 1
2019/06/12
304
1,251
<issue_start>username_0: When an app is uninstalled, is the data in its SharedPreferences database deleted? If not, without a device being rooted, is there any way to clear that data? (Or at least view it?)<issue_comment>username_1: SharedPreferences database always deleted when app is uninstalled. But when in the AndroidManifest.xml `allowBackup` is set `true` then data is not cleared even if application is uninstalled and re-installed. `android:allowBackup="true"` So, always keep `allowBackup` to `false` when you don't want the data to be stored. Upvotes: 2 <issue_comment>username_2: SharedPreferences are actually saved in a file in the app private directory: `/data/data/package_name/shared_prefs/somefilename.xml` When an app is installed this directory and file are automatically created. When an app is uninstalled this directory is deleted along with its parent `/data/data/package_name` **UNLESS** the app is uninstalled in order to update it. From command line this is done using the flag -k or -r that is `adb uninstall -k package_name` - Keep the data and cache direct­ories around after removal `adb install -r package_name` - Replace existing application (effectively reinstall an existing app, keeping its data) Upvotes: 3
2019/06/13
524
1,963
<issue_start>username_0: I bought a graphics tablet (Huion HS64) that works wonderfully with my S10. Only problem is that I can't see where I'm about to tap due to no cursor display. Is there any way I could force the mouse pointer to always be on or have my phone recognize the tablet as a mouse? I could try and connect both a mouse and the tablet with a USB hub, but I'd rather a coding solution. My phone isn't rooted, but I'm not opposed to rooting to solve the problem. Thank you in advance!<issue_comment>username_1: Try turning on developer options(if you don't know how, you go into settings, about phone, software information, and tap on the build number a few times), and scrolling down in developer options to the one that says "pointer location". Tell me if it works. Upvotes: 0 <issue_comment>username_2: I discover this method to show the cursor on Samsung A6+ (2018) using the Huion Pen Tablet HS64. It is not an "arrow-type cursor" but a "small-circle cursor" similar to the Samsung Note series with S pen. 1. Go to **Settings** 2. Open **About phone** 3. Under **Looking for something else?**, tap **Reset**. (If you do not see the reset, go to **General Management** and then tap **Reset**) 4. Tap **Reset setting** (just go through to make your settings can be reset) 5. Reboot the phone 6. Just do the 1st, 2nd, and 3rd steps, and then tap the **Reset Accessibility Settings** (just go through to make your accessibility settings can be reset) 7. Reboot the phone 8. Plug an OTG with a USB cord to the phone 9. Plug the USB cord to the Huion Tablet 10. The cursor will appear on the screen as a small circle This is the method I used to my Samsung A6 plus 2018 and it worked perfectly. Now I can use my Huion Pen Tablet for my Digital Arts. Note: I can't tell you guys if your Samsung phone can be work. I just want you to share this method. But I really hope can be work on your phone too. Please tell me if it works for you. Upvotes: 2
2019/06/13
527
2,054
<issue_start>username_0: I want to root SG S7 Edge. I have not installed twrp. Once I install twrp, all I want is root acess not custom roms or whatever. My question is if I only will install Magisk, do I need to wipe. If yes, what is the bare minimum I need to wipe. I don't want to do a full wipe if I don't have to. (I am refering to the wipe on twrp)<issue_comment>username_1: When installing Magisk you don't need to wipe anything (data, dalvik, cache, system, etc). All you need is to install the Magisk zip. If you want to install a custom ROM, then it is recommended to wipe data, system and dalvik/cache. Upvotes: 3 [selected_answer]<issue_comment>username_2: I'd personally recommend a full wipe, as that gives you the best chance to avoid weird bugs forcing you to do a factory reset later on anyways, even if you are just aiming to use Magisk. Wiping the Dalvik partition and cache alone, however, should be fine to perform without loss of data, as those are both files that the system maintains to reduce loading times for apps and such - if they are missing, the system will just regenerate them the next time you load that app, and clearing it out to begin with can mitigate hangups. Upvotes: 0 <issue_comment>username_3: If you flash TWRP then there is a lot of work. You need to disable recovery-from-boot dm-verity and vaultkeeper. Besides this TWRP is not able to decrypt encrypted data partition by default. I am not sure if flashing Magisk from TWRP works with unmountable data partition (magisk stores files inside /data/adb). If you don't want to factory reset, i recommend to install Magisk Manager app and root without flashing TWRP. The app patches your boot image, so most of the work is done. However, regarding vaultkeeper there is still a high risk you may brick your device. OEM unlocking once is not enough, you have to unlock it twice in a 3 step way. topjohnwu wrote a description how it works for the Galaxy S10. I am not sure if this also concerns your device today, but sure it will in the future Upvotes: 0
2019/06/14
645
2,638
<issue_start>username_0: Looked everywhere around the net, followed any guide I was able to find, and now my last hope is here. As the title say I'm unable to successfully connect my device to any PC. What I already did ? * Tested connection on Windows 10, Windows 7 and Kali. Windows not show any device connected, same for kali, using lsusb command. * On the device, in Developers menu I've turned ON/OFF settings related to usb, changed the usb mode from Charge Only to any other option, but as soon as I exit the menu the settings change back to Charge Only, Debug USB OFF. * I've also changed USB Port Settings in the ProjectMenu to Manufacture Mode/Google Mode. * Removed, installed and updated to latest version HiSuite. * I've tested with 6 different cables. What I can think is the EMUI 9 update I did few days ago broke something or the connector is half dead and can only charge(weird). Any idea about any possible solution?<issue_comment>username_1: When installing Magisk you don't need to wipe anything (data, dalvik, cache, system, etc). All you need is to install the Magisk zip. If you want to install a custom ROM, then it is recommended to wipe data, system and dalvik/cache. Upvotes: 3 [selected_answer]<issue_comment>username_2: I'd personally recommend a full wipe, as that gives you the best chance to avoid weird bugs forcing you to do a factory reset later on anyways, even if you are just aiming to use Magisk. Wiping the Dalvik partition and cache alone, however, should be fine to perform without loss of data, as those are both files that the system maintains to reduce loading times for apps and such - if they are missing, the system will just regenerate them the next time you load that app, and clearing it out to begin with can mitigate hangups. Upvotes: 0 <issue_comment>username_3: If you flash TWRP then there is a lot of work. You need to disable recovery-from-boot dm-verity and vaultkeeper. Besides this TWRP is not able to decrypt encrypted data partition by default. I am not sure if flashing Magisk from TWRP works with unmountable data partition (magisk stores files inside /data/adb). If you don't want to factory reset, i recommend to install Magisk Manager app and root without flashing TWRP. The app patches your boot image, so most of the work is done. However, regarding vaultkeeper there is still a high risk you may brick your device. OEM unlocking once is not enough, you have to unlock it twice in a 3 step way. topjohnwu wrote a description how it works for the Galaxy S10. I am not sure if this also concerns your device today, but sure it will in the future Upvotes: 0
2019/06/18
969
3,207
<issue_start>username_0: Is it possible to make the following commands a one-liner command ? to change bootanimation.zip quickly and gain some ``` C:\Users\User\Desktop>adb push bootanimation /sdcard C:\Users\User\Desktop>adb shell $ su # mount -o rw,remount /system # cp /sdcard/bootanimation.zip /system/media/bootanimation.zip # chmod 644 /system/media/bootanimation.zip # reboot ``` Regards<issue_comment>username_1: Much like @CzarMatt I'd suggest saving the commands ya want run within the Android device to a shell script such as `adb_boot_animation_copy.sh` on your PC... ``` #!/usr/bin/env sh if ! [ -f "/sdcard/bootanimation.zip" ]; then printf 'No can do\n' >&2 exit 1 fi su || exit "$?" mount -o rw,remount /system cp /sdcard/bootanimation.zip /system/media/bootanimation.zip chmod 644 /system/media/bootanimation.zip reboot ``` > > Tip, `#!/usr/bin/env sh` is more portable than `#!/bin/sh`... this is not just because the Android dev. team thought it was a *good idea* to move things about when adopting Linux into Android, there are other *unixish* OSs that also got *clever* with where one can find an executable shell. > > > ... then use redirection with either `<` or `cat`... ``` adb shell "$(cat "adb_boot_animation_copy.sh")" ``` Which essentially does the typing of the commands saved within the *`adb_boot_animation_copy.sh`* file for ya. Though I'm not certain that this kind of redirection will work on MS bound devices without some modifications. Update ------ Another way to redirect output of one command into the input of another... ``` cat adb_boot_animation_copy.sh | adb shell ``` > > Note PowerShell **does** have the `cat` command, though ya might want to edit the file path from the above examples to be an absolute file path. > > > ... which *should* result in the same behavior of redirecting commands from the `adb_boot_animation_copy.sh` file into the `adb shell`. And yet another way would be to use the `FOR \?` syntax within a `batch` script... ``` FOR /F "tokens=* USEBACKQ" %%F IN (`type adb_boot_animation_copy.sh`) DO ( SET var=%%F ) ``` ... to save the continence of a file to a variable for later redirection into `adb`, eg something like *`adb shell "%var%"`*, or use `type` in place of `cat` and `>`/`<` instead of `|`... ``` type adb_boot_animation_copy.sh > adb shell ``` If ya run into issues leave a comment and perhaps I'll make another edit with more ways of doing the same thing. Upvotes: 1 <issue_comment>username_2: Finally I figured out how to do it in a one-liner adb command from Windows CMD Shell: ``` adb push bootanimation.zip /sdcard & adb shell "su -c 'mount -o rw,remount /system & rm /system/media/bootanimation.zip & cp /sdcard/bootanimation.zip /system/media & chmod 644 /system/media/bootanimation.zip & reboot'" ``` In order to make this one line useful in a **batch file use && instead of &** ``` adb push bootanimation.zip /sdcard && adb shell "su -c 'mount -o rw,remount /system && rm /system/media/bootanimation.zip && cp /sdcard/bootanimation.zip /system/media && chmod 644 /system/media/bootanimation.zip && reboot'" ``` Thank you for your time & contributions! Upvotes: -1
2019/06/19
435
1,729
<issue_start>username_0: I have an old Samsung Galaxy S3 that's been sitting in my desk for years. I wanted to clear it off to give to a friend, but I'm not seeing the factory reset option anywhere. All guides I can find online indicate that it should be in the Settings app, but it's not. (There is no Privacy section anywhere in the Settings app.) Is there any other way to factory-reset a phone? It's on 4.3 (Jellybean), according to the About Device screen. (I've tried to get to recovery mode with the [power/volume down key trick](https://android.stackexchange.com/questions/25701/how-to-do-factory-reset), but it doesn't work; just continues to boot normally.)<issue_comment>username_1: If you can't go to Recovery Mode, hence go to download mode and use Odin to flash your android device. 1. Reboot Phone and go to Download Mode. (press and hold Home + Power + Volume Down buttons) 2. Connect your android device to PC and wait until you get a blue sign in Odin. 3. Download a good verion of framework which is match with your device (build number, etc). 4. Add the downloaded firmware file to AP / PDA in Odin. 5. **Make sure re-partition is NOT ticked.** 6. Click the start button and wait few minutes. 7. After step 6, your phone will start, but it takes a few minuets at first time turing on. Upvotes: 0 <issue_comment>username_2: Posting this as answer in case anyone else runs into this. It turns out that I had manually disconnected my Google account years ago, when I switched to a new phone. By reconnecting the Google account, it added the Privacy section (including the Factory Reset option) back into the Settings app. Once that option became available again, the reset worked with no problem. Upvotes: 1
2019/06/19
171
666
<issue_start>username_0: I tried to pull SystemUI.apk on my Samsung Android Pie/OneUI and it seems like it's either in some other directory than /system/app or has been renamed. I tried to pull this through adb. Tried different cases for it but didn't work. To anyone curious, I want to modify me status bar icons. Does someone know where it might be located?<issue_comment>username_1: Since Android 4.4, all privileged system apps including SystemUI have been moved to `/system/priv-app`. Upvotes: 3 [selected_answer]<issue_comment>username_2: To find its location, you can use this `adb` command: ``` adb shell pm list packages -f | grep systemui ``` Upvotes: 0
2019/06/21
306
1,428
<issue_start>username_0: The Android Q Beta has some great features and fixes the bad gesture navigation from before. I would really like to try it. From what I was able to gather, it's mostly fine, but I wasn't able to find a lot of resources detailing the downsides. What I'm mostly concerned with is errors during the upgrading process, data loss and the running of the four most important apps for me: 1. WhatsApp 2. YouTube (music) 3. Firefox I have already searched for issues, but wanted to make sure before I do something that could potentially create a huge hassle for me. I'm really thankful for any advice in advance!<issue_comment>username_1: In general productive usage of beta versions provided by Google is not recommended. Google provides beta versions of upcoming Android versions for developers. Using the beta versions they are able to check if their apps will be compatible with the upcoming Android versions. Also developers can use those images to make some first test with upcoming new features. Therefore I would strongly suggest to wait for the official release, especially if the apps that are important to you don't explicitly state that they are Android Q compatible. Upvotes: 3 [selected_answer]<issue_comment>username_2: I think you should wait until the official release of android q is made by Google because if you use it now you can get many errors while making an android app Upvotes: 0
2019/06/21
481
2,025
<issue_start>username_0: I have a bootleggers [ROM](https://forum.xda-developers.com/moto-e-2015/orig-development/rom-bootleggers-rom-moto-e-2015-lte-t3725351) (Android 9 pie) installed on a Motorola Moto E 2015 phone. I have a setting, enabled in adaptive display settings, which makes the screen to turn on, when a new notification is received. It is a good feature, but my music player (AIMP) updates it's notification each time a new song starts playing, which makes the display to turn on (pulse) often and use additional battery. I could avoid that by turning off the notifications for AIMP completely, but I want to see the notification when the screen is on. Is it possible to prevent the notification from updating while the screen is off? Another way to solve this would be to turn off the notifications for AIMP, when the screen is turned off, and then turn them on again when the screen turns on (using tasker, [for example](https://www.reddit.com/r/tasker/comments/2xux2t/disable_notifications_for_specific_apps_on_tasker/)). But the drawback of this approach is that once turned on, the notification does not appear until the next song, so it is not possible to see the current song in the notification this way.<issue_comment>username_1: In general productive usage of beta versions provided by Google is not recommended. Google provides beta versions of upcoming Android versions for developers. Using the beta versions they are able to check if their apps will be compatible with the upcoming Android versions. Also developers can use those images to make some first test with upcoming new features. Therefore I would strongly suggest to wait for the official release, especially if the apps that are important to you don't explicitly state that they are Android Q compatible. Upvotes: 3 [selected_answer]<issue_comment>username_2: I think you should wait until the official release of android q is made by Google because if you use it now you can get many errors while making an android app Upvotes: 0
2019/06/21
2,199
8,284
<issue_start>username_0: The Contact apps that ships with Samsung devices does not seem to have a function to reliably backup *all* contacts on the phone and SIM storage to Google accounts. Is there any third-party app that'd let me reliably do so? Bonus points if it'd let me sort which contact goes to which Google accounts registered on the device. As a last resort, if there's no such app, I don't mind if I can get to backup to storage with which I can transfer the contacts to a different device. **PS** I intentionally point to a specific model because I need to do so from two different Samsung devices and both their contact apps did not let me move all contacts to Google account. One of them does have `.vcf` export, but the other doesn't. I want a more universal solution if at all possible. **PPS** The device that can do `.vcf` export has Google accounts correctly setup on both the new and old devices but all contacts has not been synced, hence the question.<issue_comment>username_1: Most of the contacts backup apps lack one feature or the other e.g. they don't backup high resolution photo when creating `.vcf` file. So I prefer CLI method to extract contacts data directly from database file using some scripting, but ***it requires root***. That's how I do scheduled back up of my contacts without Google account. The following script doesn't save Google sync account information to `.vcf` file but you can extend the script to include/exclude any data if the concept is perceived. Original credits to [dump-contacts2db.sh](https://github.com/stachre/dump-contacts2db). ``` #!/system/bin/bash -e # dumps following fields of contacts from Android's sqlite database to vcf: # Name, Phone Number, Email, Address, Photo, Title, Organization, Notes, Website # required binaries: sqlite3, base64, xxd (all included with Android) # contacts directory, database file and photos directory CONT_PROVIDER='/data/user/0/com.android.providers.contacts' DB="$CONT_PROVIDER/databases/contacts2.db" PHOTO_DIR="$CONT_PROVIDER/files/photos" # vcf file VCF="/data/media/0/contacts_$(date '+%d-%b-%y_%H-%M-%S').vcf" # delete backup file if error occurs trap '[ $? -eq 0 ] || rm -f $VCF' EXIT GEN_VCARD() { # skip blank contact for first time [ -n "$name" ] || return 0 # count number of contacts n=$((n+1)) vcard="${name}${tel}${adr}${email}${url}${note}${org}${title}${photo}" vcard="BEGIN:VCARD"$'\n'"VERSION:3.0"$'\n'"${vcard}""END:VCARD" echo "$vcard" >>$VCF echo >>$VCF } # fetch contacts data from different columns of 'view_entities' table of contacts sqlite database ROWS="$( sqlite3 $DB " SELECT view_entities._id, view_entities.mimetype_id, view_entities.data1, view_entities.data2, view_entities.data3, view_entities.data4, view_entities.data5, view_entities.data6, quote(view_entities.data15), view_entities.photo_uri FROM view_entities WHERE view_entities.deleted = 0 ORDER BY view_entities._id, view_entities.mimetype_id ")" # to parse rows IFS=$'\n' # iterate through contacts data rows for ROW in $ROWS do # to parse columns from a row IFS="|" i=0 # iterate through columns for COL in $ROW do i=$((i+1)) # data included in each column case $i in 1) # Contact ID id=$COL;; 2) # Mime Type ID mime_id=$COL;; 3) # Phone Number, Website, Email, Notes, Address, Organization data=$COL;; 4) # Type ID of Phone No. / Email / Address, First Name first_name=$COL; type_id=$COL;; 5) # Name of Custom Phone No. Type / Email Type / Address Type, Last Name last_name=$COL; type=$COL;; 6) # Name Prefix, Title name_prefix=$COL; tytle=$COL;; 7) # Middle Name middle_name=$COL;; 8) # Name Suffix name_suffix=$COL;; 9) # Photo thumbnail hex data photo_hex=$COL;; 10) # Full resolution Photo URI photo_uri=$COL;; esac done # start new contact when all rows of same contact ID are parsed if [ "$prev_id" != "$id" ] then # echo current vcard prior to resetting variables GEN_VCARD # init new vcard for i in name tel adr email url note photo org title; do eval "$i=''"; done fi # add current row to current vcard, 'mimetype' determines data type on every row case $mime_id in 1) # Email case $type_id in 0) email_type=X-$type;; 1) email_type=HOME;; 2) email_type=WORK;; 3) email_type="";; 4) email_type=CELL;; *) echo "Unknown email type of '$data'" >&2; exit 1;; esac email=$email'EMAIL;TYPE='$email_type':'$data$'\n';; 4) # Organization, Title org='ORG:'$data$'\n' title='TITLE:'$tytle$'\n';; 5) # Phone No. case $type_id in 0) tel_type=X-$type;; 1) tel_type=HOME;; 2) tel_type=CELL;; 3) tel_type=WORK;; 7) tel_type=VOICE;; 12) tel_type=PREF;; *) echo "Unknown phone no. type of '$data'" >&2; exit 1;; esac tel=$tel'TEL;TYPE='$tel_type':'$data$'\n';; 7) # Name name="$name_prefix $first_name $middle_name $last_name $name_suffix" # remove leading/trailing spaces IFS=' ' read name <<<"$name" # always add complete name as First Name name="N:;"$name";;;"$'\n'"FN:"$name$'\n';; 8) # Postal Address case $type_id in 0) adr_type=X-$type;; 1) adr_type=HOME;; 2) adr_type=WORK;; *) echo "Unknown address type of '$data'" >&2; exit 1;; esac adr=$adr'ADR;TYPE='$adr_type':;;'$data';;;;'$'\n';; 10) # Photo if [ $photo_hex != "NULL" ] then # look for high-resolution photo instead of thumbnail uri=$(echo $photo_uri | sed 's|content://com.android.contacts/display_photo|'"$PHOTO_DIR"'|') if [ -f $uri ] then # convert binary to base64 foto="$(base64 -w 0 $uri)" else # remove prefix/suffix from hex output, convert hex to binary to base64 foto=$(echo $photo_hex | sed "s/^X'//; s/'$//" | tr '[:upper:]' '[:lower:]' | xxd -pr | base64 -w 0) fi photo="PHOTO;ENCODING=BASE64;JPEG:"$foto$'\n' fi;; 12) # Note note="NOTE:"$data$'\n';; 14) # Website url=$url"URL:"$data$'\n';; *) echo "Unknown mime type: '$(sqlite3 $DB "SELECT view_entities.mimetype FROM view_entities WHERE view_entities.mimetype_id = $mime_id" | head -n1)'" >&2; exit 1;; esac # preserve current ID to compare with next row prev_id=$id # reset IFS for parent loop to parse rows IFS=$'\n' done # echo last vcard, loop is done GEN_VCARD echo "Backed up $n contacts." ``` If you prefer GUI or don't have root, you can use some app like [Contacts VCF](https://play.google.com/store/apps/details?id=by.androld.contactsvcf). Upvotes: 3 [selected_answer]<issue_comment>username_2: This is what I did when I need to have a backup of my contacts. Because I lost most of them in a factory reset. But some contacts were there in my gmail account and sim card. So I did, 1. I copy all the contacts to the gmail account I have connected.(copied to 2 accounts) 2. Using google contacts app I remove duplicated and empty contacts. 3. I have selected my gmail account as the default contact saving place (not the phone or sim card. Its directly save to the google) Now I can use google contacts app on any device or just contacts.google.com using any web browser on pc or mobile to access my contacts anywhere anytime. Upvotes: 0
2019/06/24
2,045
7,579
<issue_start>username_0: I have android 7 on my device but i am cant find how i can enable FRP. I was thinking that all devices above 5 have FRP protection app as the settings ought to have cloud and accounts menu that i can find the FRP support. Is this to be expected?.<issue_comment>username_1: Most of the contacts backup apps lack one feature or the other e.g. they don't backup high resolution photo when creating `.vcf` file. So I prefer CLI method to extract contacts data directly from database file using some scripting, but ***it requires root***. That's how I do scheduled back up of my contacts without Google account. The following script doesn't save Google sync account information to `.vcf` file but you can extend the script to include/exclude any data if the concept is perceived. Original credits to [dump-contacts2db.sh](https://github.com/stachre/dump-contacts2db). ``` #!/system/bin/bash -e # dumps following fields of contacts from Android's sqlite database to vcf: # Name, Phone Number, Email, Address, Photo, Title, Organization, Notes, Website # required binaries: sqlite3, base64, xxd (all included with Android) # contacts directory, database file and photos directory CONT_PROVIDER='/data/user/0/com.android.providers.contacts' DB="$CONT_PROVIDER/databases/contacts2.db" PHOTO_DIR="$CONT_PROVIDER/files/photos" # vcf file VCF="/data/media/0/contacts_$(date '+%d-%b-%y_%H-%M-%S').vcf" # delete backup file if error occurs trap '[ $? -eq 0 ] || rm -f $VCF' EXIT GEN_VCARD() { # skip blank contact for first time [ -n "$name" ] || return 0 # count number of contacts n=$((n+1)) vcard="${name}${tel}${adr}${email}${url}${note}${org}${title}${photo}" vcard="BEGIN:VCARD"$'\n'"VERSION:3.0"$'\n'"${vcard}""END:VCARD" echo "$vcard" >>$VCF echo >>$VCF } # fetch contacts data from different columns of 'view_entities' table of contacts sqlite database ROWS="$( sqlite3 $DB " SELECT view_entities._id, view_entities.mimetype_id, view_entities.data1, view_entities.data2, view_entities.data3, view_entities.data4, view_entities.data5, view_entities.data6, quote(view_entities.data15), view_entities.photo_uri FROM view_entities WHERE view_entities.deleted = 0 ORDER BY view_entities._id, view_entities.mimetype_id ")" # to parse rows IFS=$'\n' # iterate through contacts data rows for ROW in $ROWS do # to parse columns from a row IFS="|" i=0 # iterate through columns for COL in $ROW do i=$((i+1)) # data included in each column case $i in 1) # Contact ID id=$COL;; 2) # Mime Type ID mime_id=$COL;; 3) # Phone Number, Website, Email, Notes, Address, Organization data=$COL;; 4) # Type ID of Phone No. / Email / Address, First Name first_name=$COL; type_id=$COL;; 5) # Name of Custom Phone No. Type / Email Type / Address Type, Last Name last_name=$COL; type=$COL;; 6) # Name Prefix, Title name_prefix=$COL; tytle=$COL;; 7) # Middle Name middle_name=$COL;; 8) # Name Suffix name_suffix=$COL;; 9) # Photo thumbnail hex data photo_hex=$COL;; 10) # Full resolution Photo URI photo_uri=$COL;; esac done # start new contact when all rows of same contact ID are parsed if [ "$prev_id" != "$id" ] then # echo current vcard prior to resetting variables GEN_VCARD # init new vcard for i in name tel adr email url note photo org title; do eval "$i=''"; done fi # add current row to current vcard, 'mimetype' determines data type on every row case $mime_id in 1) # Email case $type_id in 0) email_type=X-$type;; 1) email_type=HOME;; 2) email_type=WORK;; 3) email_type="";; 4) email_type=CELL;; *) echo "Unknown email type of '$data'" >&2; exit 1;; esac email=$email'EMAIL;TYPE='$email_type':'$data$'\n';; 4) # Organization, Title org='ORG:'$data$'\n' title='TITLE:'$tytle$'\n';; 5) # Phone No. case $type_id in 0) tel_type=X-$type;; 1) tel_type=HOME;; 2) tel_type=CELL;; 3) tel_type=WORK;; 7) tel_type=VOICE;; 12) tel_type=PREF;; *) echo "Unknown phone no. type of '$data'" >&2; exit 1;; esac tel=$tel'TEL;TYPE='$tel_type':'$data$'\n';; 7) # Name name="$name_prefix $first_name $middle_name $last_name $name_suffix" # remove leading/trailing spaces IFS=' ' read name <<<"$name" # always add complete name as First Name name="N:;"$name";;;"$'\n'"FN:"$name$'\n';; 8) # Postal Address case $type_id in 0) adr_type=X-$type;; 1) adr_type=HOME;; 2) adr_type=WORK;; *) echo "Unknown address type of '$data'" >&2; exit 1;; esac adr=$adr'ADR;TYPE='$adr_type':;;'$data';;;;'$'\n';; 10) # Photo if [ $photo_hex != "NULL" ] then # look for high-resolution photo instead of thumbnail uri=$(echo $photo_uri | sed 's|content://com.android.contacts/display_photo|'"$PHOTO_DIR"'|') if [ -f $uri ] then # convert binary to base64 foto="$(base64 -w 0 $uri)" else # remove prefix/suffix from hex output, convert hex to binary to base64 foto=$(echo $photo_hex | sed "s/^X'//; s/'$//" | tr '[:upper:]' '[:lower:]' | xxd -pr | base64 -w 0) fi photo="PHOTO;ENCODING=BASE64;JPEG:"$foto$'\n' fi;; 12) # Note note="NOTE:"$data$'\n';; 14) # Website url=$url"URL:"$data$'\n';; *) echo "Unknown mime type: '$(sqlite3 $DB "SELECT view_entities.mimetype FROM view_entities WHERE view_entities.mimetype_id = $mime_id" | head -n1)'" >&2; exit 1;; esac # preserve current ID to compare with next row prev_id=$id # reset IFS for parent loop to parse rows IFS=$'\n' done # echo last vcard, loop is done GEN_VCARD echo "Backed up $n contacts." ``` If you prefer GUI or don't have root, you can use some app like [Contacts VCF](https://play.google.com/store/apps/details?id=by.androld.contactsvcf). Upvotes: 3 [selected_answer]<issue_comment>username_2: This is what I did when I need to have a backup of my contacts. Because I lost most of them in a factory reset. But some contacts were there in my gmail account and sim card. So I did, 1. I copy all the contacts to the gmail account I have connected.(copied to 2 accounts) 2. Using google contacts app I remove duplicated and empty contacts. 3. I have selected my gmail account as the default contact saving place (not the phone or sim card. Its directly save to the google) Now I can use google contacts app on any device or just contacts.google.com using any web browser on pc or mobile to access my contacts anywhere anytime. Upvotes: 0
2019/06/24
2,073
7,688
<issue_start>username_0: I intend to reset my phone to get rid of bad applications. I will reinstall all applications wanted, but there is the notes application I use that I want to get the data of (no option to back up notes)... how do I get the data? the application is called [Notes by programmer "Office"](https://play.google.com/store/apps/details?id=com.edi.masaki.mymemoapp)<issue_comment>username_1: Most of the contacts backup apps lack one feature or the other e.g. they don't backup high resolution photo when creating `.vcf` file. So I prefer CLI method to extract contacts data directly from database file using some scripting, but ***it requires root***. That's how I do scheduled back up of my contacts without Google account. The following script doesn't save Google sync account information to `.vcf` file but you can extend the script to include/exclude any data if the concept is perceived. Original credits to [dump-contacts2db.sh](https://github.com/stachre/dump-contacts2db). ``` #!/system/bin/bash -e # dumps following fields of contacts from Android's sqlite database to vcf: # Name, Phone Number, Email, Address, Photo, Title, Organization, Notes, Website # required binaries: sqlite3, base64, xxd (all included with Android) # contacts directory, database file and photos directory CONT_PROVIDER='/data/user/0/com.android.providers.contacts' DB="$CONT_PROVIDER/databases/contacts2.db" PHOTO_DIR="$CONT_PROVIDER/files/photos" # vcf file VCF="/data/media/0/contacts_$(date '+%d-%b-%y_%H-%M-%S').vcf" # delete backup file if error occurs trap '[ $? -eq 0 ] || rm -f $VCF' EXIT GEN_VCARD() { # skip blank contact for first time [ -n "$name" ] || return 0 # count number of contacts n=$((n+1)) vcard="${name}${tel}${adr}${email}${url}${note}${org}${title}${photo}" vcard="BEGIN:VCARD"$'\n'"VERSION:3.0"$'\n'"${vcard}""END:VCARD" echo "$vcard" >>$VCF echo >>$VCF } # fetch contacts data from different columns of 'view_entities' table of contacts sqlite database ROWS="$( sqlite3 $DB " SELECT view_entities._id, view_entities.mimetype_id, view_entities.data1, view_entities.data2, view_entities.data3, view_entities.data4, view_entities.data5, view_entities.data6, quote(view_entities.data15), view_entities.photo_uri FROM view_entities WHERE view_entities.deleted = 0 ORDER BY view_entities._id, view_entities.mimetype_id ")" # to parse rows IFS=$'\n' # iterate through contacts data rows for ROW in $ROWS do # to parse columns from a row IFS="|" i=0 # iterate through columns for COL in $ROW do i=$((i+1)) # data included in each column case $i in 1) # Contact ID id=$COL;; 2) # Mime Type ID mime_id=$COL;; 3) # Phone Number, Website, Email, Notes, Address, Organization data=$COL;; 4) # Type ID of Phone No. / Email / Address, First Name first_name=$COL; type_id=$COL;; 5) # Name of Custom Phone No. Type / Email Type / Address Type, Last Name last_name=$COL; type=$COL;; 6) # Name Prefix, Title name_prefix=$COL; tytle=$COL;; 7) # Middle Name middle_name=$COL;; 8) # Name Suffix name_suffix=$COL;; 9) # Photo thumbnail hex data photo_hex=$COL;; 10) # Full resolution Photo URI photo_uri=$COL;; esac done # start new contact when all rows of same contact ID are parsed if [ "$prev_id" != "$id" ] then # echo current vcard prior to resetting variables GEN_VCARD # init new vcard for i in name tel adr email url note photo org title; do eval "$i=''"; done fi # add current row to current vcard, 'mimetype' determines data type on every row case $mime_id in 1) # Email case $type_id in 0) email_type=X-$type;; 1) email_type=HOME;; 2) email_type=WORK;; 3) email_type="";; 4) email_type=CELL;; *) echo "Unknown email type of '$data'" >&2; exit 1;; esac email=$email'EMAIL;TYPE='$email_type':'$data$'\n';; 4) # Organization, Title org='ORG:'$data$'\n' title='TITLE:'$tytle$'\n';; 5) # Phone No. case $type_id in 0) tel_type=X-$type;; 1) tel_type=HOME;; 2) tel_type=CELL;; 3) tel_type=WORK;; 7) tel_type=VOICE;; 12) tel_type=PREF;; *) echo "Unknown phone no. type of '$data'" >&2; exit 1;; esac tel=$tel'TEL;TYPE='$tel_type':'$data$'\n';; 7) # Name name="$name_prefix $first_name $middle_name $last_name $name_suffix" # remove leading/trailing spaces IFS=' ' read name <<<"$name" # always add complete name as First Name name="N:;"$name";;;"$'\n'"FN:"$name$'\n';; 8) # Postal Address case $type_id in 0) adr_type=X-$type;; 1) adr_type=HOME;; 2) adr_type=WORK;; *) echo "Unknown address type of '$data'" >&2; exit 1;; esac adr=$adr'ADR;TYPE='$adr_type':;;'$data';;;;'$'\n';; 10) # Photo if [ $photo_hex != "NULL" ] then # look for high-resolution photo instead of thumbnail uri=$(echo $photo_uri | sed 's|content://com.android.contacts/display_photo|'"$PHOTO_DIR"'|') if [ -f $uri ] then # convert binary to base64 foto="$(base64 -w 0 $uri)" else # remove prefix/suffix from hex output, convert hex to binary to base64 foto=$(echo $photo_hex | sed "s/^X'//; s/'$//" | tr '[:upper:]' '[:lower:]' | xxd -pr | base64 -w 0) fi photo="PHOTO;ENCODING=BASE64;JPEG:"$foto$'\n' fi;; 12) # Note note="NOTE:"$data$'\n';; 14) # Website url=$url"URL:"$data$'\n';; *) echo "Unknown mime type: '$(sqlite3 $DB "SELECT view_entities.mimetype FROM view_entities WHERE view_entities.mimetype_id = $mime_id" | head -n1)'" >&2; exit 1;; esac # preserve current ID to compare with next row prev_id=$id # reset IFS for parent loop to parse rows IFS=$'\n' done # echo last vcard, loop is done GEN_VCARD echo "Backed up $n contacts." ``` If you prefer GUI or don't have root, you can use some app like [Contacts VCF](https://play.google.com/store/apps/details?id=by.androld.contactsvcf). Upvotes: 3 [selected_answer]<issue_comment>username_2: This is what I did when I need to have a backup of my contacts. Because I lost most of them in a factory reset. But some contacts were there in my gmail account and sim card. So I did, 1. I copy all the contacts to the gmail account I have connected.(copied to 2 accounts) 2. Using google contacts app I remove duplicated and empty contacts. 3. I have selected my gmail account as the default contact saving place (not the phone or sim card. Its directly save to the google) Now I can use google contacts app on any device or just contacts.google.com using any web browser on pc or mobile to access my contacts anywhere anytime. Upvotes: 0
2019/06/24
592
2,375
<issue_start>username_0: I recently discovered that on my new phone (the old one died suddenly because of eMMC failure) some purchased apps are no longer on Google Play. They are **not** incompatible with device; they are not listed at all. I have some old backups by Helium Backup, but I am 100% sure that newer versions were released. Is it somehow possible to download these apps? Most of them I purchased, but I can't find them even in "Library". I contacted their respective developers, but got no answer at all...<issue_comment>username_1: You can try to find the app on a site such as [apkmirror.com](https://apkmirror.com) or [apkpure.com](https://apkpure.com). Download the .apk file for the app, and install it using adb. This is called "sideloading," and you can find instructions for it [here](https://www.droidviews.com/install-apk-files-using-adb-commands/) or [here](https://androidcommunity.com/how-to-sideloading-apps-on-your-android-device-20180417/). Upvotes: 0 <issue_comment>username_2: Unfortunately, the answer is no, nothing can be done. Apps that are paid for via Google Play can only be installed and have the purchase validated by the Play Store. Even if you get the app from a third party, it will not be able to authenticate that you paid for it via the Play Store. If an app is removed from the Play Store, it will continue to be authenticated on your device as long as it is installed, but if the application is removed for any reason, it will no longer be available from the Play Store, and the purchase information is lost. > > Is it somehow possible to download these apps? Most of them I purchased, but I can't find them even in "Library". I contacted their respective developers, but got no answer at all... > > > The app is not really the issue, although a variety of different methods are used, the most common one is that app is the same for the paid or free version, but when you pay for it, an authentication token is issued for the app on your device. When you remove the app, the token is removed as well. If the app has been removed from the Play Store, a new token will not be issued. In most cases, the developer can do nothing anyway, a sympathetic dev MIGHT give you an alternative to use the paid version, but I do not believe they have a way to validate that you purchased it from the Play Store anyway. Upvotes: 1
2019/06/25
703
2,525
<issue_start>username_0: WhatsApp has a Media Visibility feature which if disabled, hides the media files from phone gallery. It is claimed that "apparently" it reduces file storage. But WhatsApp still has to store media in some location, otherwise how would it show in chats. I am able to access the media while scrolling through a whatsapp chat, even while offline, so the media is definitely getting stored somewhere on my phone. Can I access this location? I have to access many media files that whatsapp must have downloaded somewhere on my phone. I am using parallel whatsapp on my One Plus 5 android phone. It creates a "999" directory under emulated. ![](https://i.stack.imgur.com/crckG.jpg)<issue_comment>username_1: In most devices, I have used WhatsApp creates a folder in internal storage. The folder for media files is `/internal storage/WhatsApp/Media`. It contains subfolders for images, videos, etc. ``` /internal storage/WhatsApp/Media/WhatsApp Images /internal storage/WhatsApp/Media/WhatsApp Video /internal storage/WhatsApp/Media/WhatsApp Animated Gifs . . . ``` Upvotes: 0 <issue_comment>username_2: > > The Android operating system uses empty `.nomedia` files to tell smartphone apps not to display or include the contents of the folder. ([1](https://en.m.wikipedia.org/wiki/Hidden_file_and_hidden_directory)). > > > And, > > Treat all files as non-media in directories that contain a `.nomedia` file ([2](https://android.googlesource.com/platform/frameworks/av/+/refs/tags/android-9.0.0_r42/media/libmedia/MediaScanner.cpp#142)). > > > So all that `Media Visibility` feature of WhatsApp does when disabled, is to put the newly downloaded media in a subdirectory of main media type directory, named `Private` which contains a `.nomedia` file e.g. `/sdcard/WhatsApp/Media/WhatsApp Video/Private/`. Therefore the media files are not visible in gallery apps. But you can access that using any file explorer. Parallel WhatsApp is a different thing, which makes use of Android [Multiple Users/Profiles](https://source.android.com/devices/tech/admin/multi-user) feature to isolate whole `/sdcard` as well as other contents. But the media is still visible in gallery app installed within that profile. See [this answer](https://android.stackexchange.com/questions/210139/what-is-the-u-everybody-uid/210159#210159) for details. Upvotes: 1 <issue_comment>username_3: Use the 'My Files' app icon - Internal Storage - Android - media - com.whatsapp - WhatsApp - Media - WhatsApp Images Upvotes: 0
2019/06/26
1,012
3,374
<issue_start>username_0: Device: LG G4 Android version: 6.0 Status: rooted What can I do to power off the device (with a 20 sec delay) when I remove the charger. I tried with `AutomateIt` app, but after first cycle of power off / power on, it doesn't work if I don't open the app again, to run in the background. I want to use my old phone in a old car, as a GPS device. I make it power on automatically as is described here: <https://forum.xda-developers.com/att-lg-g3/general/lg-d3-d850-autoboot-t3714070><issue_comment>username_1: Using [Macrodroid](https://play.google.com/store/apps/details?id=com.arlosoft.macrodroid): 1. On the Triggers tab, under Battery/Power section select "Power Connected/Disconnected", then choose "Power Disconnected". 2. On the Actions tab, under Macrodroid Specific, select "Wait Before Next Action", then set the delay period to 20 seconds. 3. On the Actions tab, under Device Actions, select Reboot/PowerOff, then choose "Power Off". If "Power Off" does not work on your device, choose "Power Off (Alternative)". 4. Save the macro and give it a name. When completed, the macro will look like the image below. Use the 3-dot to test the macro. Note: Powering off requires the device be rooted. [![Power off when charger is removed macro](https://i.stack.imgur.com/eIjnl.png)](https://i.stack.imgur.com/eIjnl.png) **Update:** The way the macro is programmed above does not allow to stop the device from being power off if the charger is connected again before the 20 seconds delay expires. To stop the trigger, a condition to check the state of the device after the delay expires but before the action to power it off. Edit the macro. Add a new action. Under the Actions, on the Conditions/Loops section, select "If clause". Add a condition. Select "Power Connected" under the Battery/Power section and choose "Power Disconnected", then OK. Click the up and down arrows button on the Actions box, move the "Power Off" action inside the "If...End If". Save the macro. The macro will look like the image below. [![Power off when charger is removed macro version 2](https://i.stack.imgur.com/Nn9v0.png)](https://i.stack.imgur.com/Nn9v0.png) Upvotes: 2 [selected_answer]<issue_comment>username_2: Run the following shell script from `init.d` or `/data/adb/*.d/` in case of Magisk. Or run directly from `init`'s `.rc` file. See [How to run an executable on boot and keep it running?](https://android.stackexchange.com/a/213623/218526) ``` #!/system/bin/sh is_charging() { [ $(cat /sys/class/power_supply/battery/status) = Charging ] || return 1 } # keep waiting while is_charging; do sleep 1; done # charger is disconnected, countdown sleep 20 # again start waiting if charger is connected is_charging && exec $(realpath $0) # else, shutdown /system/bin/reboot -p charger_disconnected || /system/bin/setprop sys.powerctl shutdown,charger_disconnected ``` Upvotes: 0 <issue_comment>username_3: Try [Automate](https://play.google.com/store/apps/details?id=com.llamalab.automate&referrer=utm_source%3Dstackexchange) (free): 1. [Power source plugged block](https://llamalab.com/automate/doc/block/power_source_plugged.html) 2. [Delay block](https://llamalab.com/automate/doc/block/delay.html); 20s 3. [Device shutdown block](https://llamalab.com/automate/doc/block/device_shutdown.html) (rooted device required) Upvotes: 0
2019/06/26
427
1,345
<issue_start>username_0: On many apps, they have an "Add subject" menu: ![](https://i.stack.imgur.com/plHG2l.jpg) (source: [tapatalk.com](https://img.tapatalk.com/d/14/05/01/nu2yzuda.jpg)) This allows setting the message's subject, a feature of the MMS protocol. But how to do the same with [the official Google app](https://play.google.com/store/apps/details?id=com.google.android.apps.messaging)?<issue_comment>username_1: You need to long-press the MMS button on the bottom right. Only then will you be able to add the subject. ![enter image description here](https://i.stack.imgur.com/L9ZXl.jpg) Upvotes: 1 <issue_comment>username_2: The newest version of Google Messages (as of this answer) has moved the subject to the "three dot" menu in the upper-right of the application when composing a message. Simply tap the three-dot menu, choose "Show subject field" and you're there! This is possible without the message being an MMS beforehand, but will convert it into an MMS (instead of SMS) when used. See the screenshots below: [![Three-dot menu](https://i.stack.imgur.com/tUtCsl.jpg)](https://i.stack.imgur.com/tUtCs.jpg) [![Show subject field](https://i.stack.imgur.com/3EEoIl.jpg)](https://i.stack.imgur.com/3EEoI.jpg) [![Use subject field](https://i.stack.imgur.com/jD1tTl.jpg)](https://i.stack.imgur.com/jD1tT.jpg) Upvotes: 0
2019/06/26
565
2,024
<issue_start>username_0: I have a very similar problem to e.g. [here](https://android.stackexchange.com/questions/196389/android-x86-stuck-at-a-n-d-r-o-i-d-x86-64). I installed Android-x86 on a partition on my Acer Aspire Switch 10E next to Windows. I added Grub as trusted boot option in the UEFI and let Secure Boot **enabled**. Using this I can completely boot and reboot into e.g. Android x86 version 8.1-R2 **But** the problem is: in this version my Realtek RTL8723BS is not supported -> No WiFi/Bluetooth! --- So I worked my way back to older versions (I need at least Android 6.0). Using CM 14.1-R2 and Androidx86 7.1-R2 I have a strange behavior: Right after the installation if I select "Run Android" everything works fine, it boots normal, WiFi/Bluetooth everything fine! But I am not able in any way getting it to run again after a reboot. It is forever stuck on a black screen with only displaying a fix (not blinking) ``` _ ``` --- I already searched for two days and tried a lot of parameters and settings in the Grub entry like `nomodeset`, `xforcevesa` etc ... nothing worked so far. I also tried both 32bit and 64bit versions (the device is 64bit) but it made no difference. I don't understand what I am doing wrong or why it boots all fine the first time if not going for the reboot but directly to the `Run Android` option. So I guess it can not be due to unsupported hardware since the system basically works ... I just can not boot into it anymore after shutting down / reboot. --- Does anyone have a solution for that? --- **Note: I am not speaking about a Virtual Machine here!**<issue_comment>username_1: when you change the internal frame where the UEFI firmware settings to the EFI framework setting change the boot order you have to make a small partition for grub go back and change it back otherwise it won't boot the second time Upvotes: 0 <issue_comment>username_2: I found disabling 3D acceleration and setting the graphic controller to VBoxVGA solves the issue. Upvotes: 3
2019/06/27
609
2,122
<issue_start>username_0: My phone can't see Wifi 2.4 Channel 13. Why? How can I fix it? I have an android phone (Moto E4, Android 7.1.1, Not rooted) that was purchased in the US about 12 months ago. Just after purchase,I came to China for a few months, and it worked perfectly on the Wifi here in my home. I had a Chinese sim card. I don't know what channel my home Wifi was working on last year. In September, I returned to the US and swapped out the sim card for a US carrier. It continued to work perfectly. I have just now returned to China, and my phone no longer can see the wifi signal in my home. When I look on my PC, it shows that the Wifi is transmitting on channel 13. When I look in my android app "Wifi Analyzer" it shows a blank space for channel 13. (Also, I forgot my Chinese sim card in the US) Is this a hardware or a software issue? How to fix this?<issue_comment>username_1: [WiFi Channels](https://en.wikipedia.org/wiki/List_of_WLAN_channels) are a regionally/country regulatory issue. In the United States the 2.4 GHz bands are 1 through 11. You can either: * Change your router's 2.4 GHz band to fit the U.S. firmware/ROM limitations. * Switch to using a router on the 5 GHz band as there is overlap with China and the United States. * Risk bricking your phone with a Custom ROM. Note that the Moto E4 appears to have only [U.S. and European](https://en.wikipedia.org/wiki/Moto_E4) versions, and each version is using a different CPU manufacturer so trying put International ROM on a U.S. phone would not work and may brick the device. Upvotes: 1 <issue_comment>username_2: My phone can now detect ch 13 on 2.4 GHz wifi. Here's how I did it. I borrowed a local sim card. As soon as the phone booted up, if was able to see the wifi signal. I confirmed that it indeed was on ch 13 with both wifi analyzer and on my pc. I have since removed the borrowed sim card, and the phone continues to see channel 13. So indeed, as suggested in the comments by @Robert, > > auto detection of the country you are in e.g. via used SIM card > > > Is the correct answer. Upvotes: 3 [selected_answer]
2019/06/27
445
1,976
<issue_start>username_0: I have `Moto G5 Plus Android phone`. I don't want to allow someone to uninstall the application from my android phone. The android phone allows to press on the application and drag it to delete icon and allow uninstallation. I want if someone does the same operation in my phone then before uninstall it ask password or pattern lock. Thanks.<issue_comment>username_1: That is not possible. The other way to uninstall app is going to Settings and under usually **Applications** where you can uninstall the apps easily. What you can do instead is move your app as a System app, but it needs your phone to be rooted. System apps cannot be uninstalled easily without the person having the knowledge how to uninstall it. Systems apps are like your Messaging, Dialer, Gallery Apps, if you'll notice there is no uninstall option but disable option only. Upvotes: 0 <issue_comment>username_2: When a user tries to uninstall an app through the home launcher, Settings app, or through any third-party app, the system app Package Installer is invoked and user is asked to confirm the uninstallation. So the solution for you is to either disable that Package Installer app (or at least its component which is invoked for user confirmation) or find an app locker which can lock this system app. I tried some app locker apps and found that [AppLock - Fingerprint](https://play.google.com/store/apps/details?id=com.sp.protector.free) can lock down Package Installer app. It even recommends it. From then on, anyone trying to uninstall an app would need to authenticate with your preferred choice of authentication before proceeding to uninstall. At the risk of redundancy, this does take care of uninstallation via Settings app too, as I explained the reason for it in the beginning. **Note:** app locker apps alike many privacy protector apps are notorious for floundering a user's privacy and shoving ads down the user's throat. Upvotes: 3 [selected_answer]
2019/06/27
412
1,549
<issue_start>username_0: I'm using Asus Zenfone Max Pro M2. I found there's **Mobile Plan** in **Network & Internet** settings. But I'm not sure it is for eSIM. When I tap on it, it says: *"Network has no known provisioning website"* How to check if an Android device supports eSIM?<issue_comment>username_1: To post [Rahul's comment](https://android.stackexchange.com/questions/214100/how-to-check-if-device-support-esim#comment274157_214100) as an answer: > > eSim depends upon carrier and mobile manufacturer. Top end devices like Pixel, Apple, nuu and top smart watches support esim. In India Airtel and reliance jio support esim. I think Asus doesn't have such feature even if it is pure android from Google. > > > To see if it supports that, check manufacturer specifications. If those aren't available in detail, [GSMArena.com](https://gsmarena.com) is a great resource. Upvotes: 0 <issue_comment>username_2: Having gone through it myself, a few weeks ago, you actually need to ask your provider if they support **esim** on that phone. * If the esim is for the phone, then the options will become enabled and visible if you are connected to a provider that supports esim on that phone. They may also only become available after you have purchased that option from your provider. * If the esim is for the watch, then those options only become available after you have paired a compatible watch to your phone. Prior to that they are either disabled or not visible. The options may have different names on different phones. Upvotes: 1
2019/06/28
3,829
11,879
<issue_start>username_0: I have a Moto G 4th Edition (harpia) running LineageOS 14.1 nightly. I was trying to debug some issues with its MMS and I used Titanium Backup to take a backup of the APN settings because I was about to follow some tutorials and I wanted to know I could certainly undo them if I needed to. I wasn't able to fix the problem, so I tried to restore using Titanium Backup. When I was restoring the settings, it asked me if I wanted to restore App, Data, or App+Data. Without thinking too much about it, I clicked "App+Data". Then, I went back to the APN settings page to see if the APN settings I had were restored. When I clicked on an APN, it crashed. I think the exception in question is: ``` 06-27 18:44:22.454 2067 3374 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading com.android.providers.telephony.TelephonyProvider uri content://telephony/carriers/1265 from pid=4901, uid=1000 requires the provider be exported, or grantUriPermission() 06-27 18:44:22.454 2067 3374 E DatabaseUtils: at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:608) 06-27 18:44:22.454 2067 3374 E DatabaseUtils: at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:483) 06-27 18:44:22.454 2067 3374 E DatabaseUtils: at android.content.ContentProvider$Transport.query(ContentProvider.java:212) 06-27 18:44:22.454 2067 3374 E DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112) 06-27 18:44:22.454 2067 3374 E DatabaseUtils: at android.os.Binder.execTransact(Binder.java:565) ``` (But another suspicious-looking message I see is `06-27 18:44:20.760 2067 5631 W ContextImpl: Failed to ensure /data/user_de/0/com.android.settings/databases: mkdir failed: EACCES (Permission denied)`.) I reached out to Titanium Track via their "Contact Us" page but haven't gotten a response so far (it's only been about 36 hours). In the meantime, I noticed that I also can't even use the Messaging app on my phone. When I try to enter an SMS conversation, it crashes. I think the exception for that is: ``` 06-27 18:43:54.101 1141 2774 W ActivityManager: Permission Denial: opening provider com.android.providers.telephony.SmsProvider from ProcessRecord{890eeb3 3530:com.android.messaging/u0a73} (pid=3530, uid=10073) that is not exported from uid 1001 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: wtf 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: SyncMessagesAction: unexpected failure in scan 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.telephony.SmsProvider from ProcessRecord{890eeb3 3530:com.android.messaging/u0a73} (pid=3530, uid=10073) that is not exported from uid 1001 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.os.Parcel.readException(Parcel.java:1684) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.os.Parcel.readException(Parcel.java:1637) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4199) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.app.ActivityThread.acquireProvider(ActivityThread.java:5534) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2239) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1520) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.content.ContentResolver.query(ContentResolver.java:518) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.content.ContentResolver.query(ContentResolver.java:475) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at com.android.messaging.mmslib.a.VL(SourceFile:40) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at com.android.messaging.sms.i.ahs(SourceFile:1498) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at com.android.messaging.sms.DatabaseMessages$SmsMessage.getProjection(SourceFile:120) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at com.android.messaging.datamodel.action.q.(SourceFile:450) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at com.android.messaging.datamodel.action.m.Lg(SourceFile:131) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at com.android.messaging.datamodel.action.SyncMessagesAction.Jf(SourceFile:293) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at com.android.messaging.datamodel.action.SyncMessagesAction.IU(SourceFile:244) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at com.android.messaging.datamodel.action.BackgroundWorkerService.Kk(SourceFile:146) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at com.android.messaging.datamodel.action.BackgroundWorkerService.onHandleIntent(SourceFile:123) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:68) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.os.Handler.dispatchMessage(Handler.java:102) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.os.Looper.loop(Looper.java:154) 06-27 18:43:54.103 3530 3843 F MessagingAppDataModel: at android.os.HandlerThread.run(HandlerThread.java:61) 06-27 18:43:54.103 3530 3843 E MessagingAppDataModel: SyncMessagesAction: unexpected failure in scan ``` Based on these two exceptions, I'm guessing that I shouldn't have restored the app but just the data, and some important metadata of the app got lost or wasn't restored correctly. However I'm not sure where I would find that metadata or what it should be. * I tried TWRP "Restore Contexts". * Someone on the `/r/Android` Discourse suggested I dirty load the same ROM. Unfortunately support for LineageOS on my handset is discontinued and there's no images to download. I tried re-using the latest update from `/data/lineageos_updates`, but that didn't fix my problem. * I took a backup of my phone in its current (semi-working) state and I've tried wiping data for the messaging app, the telephony provider, the settings app, but I still have the same crashes. Has anyone seen these exceptions before? What are these providers? Where are they kept on a normal Android system? What creates them, and is there a way to manually cause them to be created?<issue_comment>username_1: OK, so I figured it out. For posterity, here's the process I went through. * I took a complete backup using TWRP before I made anything any worse. * I was fortunate in that I had a pretty clear idea what I had done to make everything go wrong (restore "App+Data"). That meant I could do it again and try to get a sense of what the app had done. I used `find` on the device to get a list of all the files that got changed when I did the bad restore. (busybox find doesn't have `-mmin` so I did `touch somefile; [do the bad thing]; find . -newer somefile`.) This gave me a list of "suspect" files: some stuff in the data partition `/data/data`, some stuff in `/data/misc/profiles` that I couldn't figure out; some stuff in `/data/app` incl. an APK and ODEX stuff; and a handful of files in `/data/system`: `users/0/runtime-permissions.xml`, `users/0/package-restrictions.xml`, `packages.xml`, `packages.list`, and a few others. * In Titanium Backup, the thing that was being restored ("Phone and Messaging") seems actually to be an alias for `com.android.providers.telephony` -- when you click "Open system details", that is the "App" that comes up. This sorta matches the errors from the logs. * I found <https://github.com/TilesOrganization/support/wiki/How-to-use-ADB-to-grant-permissions> and <https://gist.github.com/Arinerron/1bcaadc7b1cbeae77de0263f4e15156f> which were interesting. When I tried to `adb pm dump` the `com.android.providers.telephony` package, I saw that it had `WRITE_APN_SETTINGS: granted=true`. This increased my confidence that the permissions weren't really the issue. * I also looked through the `/data/data` for the `com.android.providers.telephony` package. Everything was owned by `system` rather than by an app-specific account, but maybe that was OK. `restorecon` didn't do anything on any of those files either. * Among the things that I tried in order to get stuff working again was to flash LineageOS 15.1 from a random post on XDA-Developers. That led to other problems but at least my messaging app didn't crash any more. This gave me a "known good" state. From this I `adb pull`ed a bunch of stuff from `/data`: `system`, `misc`, `app`, `user_de`, `data`. * I grepped through all the files looking for `telephony` since I was pretty sure that was the thing that had been restored wrong. Nothing in `runtime-permissions.xml` had `telephony` in it (and I didn't really suspect permissions anyhow because of the `WRITE_APN_SETTINGS` thing, above). `package-restrictions.xml` seemed OK -- there was only one entry that referenced the `providers` package and there was nothing in it except `stopped="true"`. (`telephony` occurred in some other entries for other packages, but always under `enabled-components`, so that seemed OK to me.) `telephony` did show up in `packages.xml` but I didn't understand enough of the data format to know what it was saying. (Attributes present include `ft`, `it`, `ut`, and `isOrphaned`.) * By comparing the `packages.xml` from the "broken" 14.1 install and the one from the "working" 15.1 install, I made some progress. From the 14.1 version: ``` ``` From the 15.1 "working" version: ``` ``` OK! It seems like the `codePath` and `nativeLibraryPath` are screwed up. Possibly the `ft`, `it`, and `ut` fields too. I still don't really know what those are for, but they correspond to fields in other apps in the `packages.xml` file. Maybe they represent some kind of cross-application sharing. Anyhow, I used vim on the device to make some changes -- first removing `stopped` from `package-restrictions.xml`, and (when that didn't work) editing `packages.xml` to merge the two entries into one entry with the `codePath`, `nativeLibraryPath`, `ft`, `it`, and `ut` fields from the element (and then deleting ). I restarted the phone after each change to see if it worked. I can edit APNs/read SMS messages again so that's nice. I was able to find <https://dzone.com/articles/depth-android-package-manager> which says that the `ft`, `it`, and `ut` fields represent timestamps so probably they don't correspond to anything in particular. Probably the paths were the essential change. Overall I would say that I think Android could one day become as approachable and user-friendly as Linux, given enough effort. I don't even think it would require anything difficult -- just more effort documenting how things work from the user/system administrator's perspective (to balance out all the extant documentation about how things work from the app developer's perspective). A good example would be "What is the package.xml file and what do ft, it, and ut stand for". Also it would be great if the source of truth for Android distributions wasn't an ad-encrusted forum like XDA, but hey, one step at a time. Upvotes: 3 [selected_answer]<issue_comment>username_2: Today, I made the same mistake (restoring the whole 'Phone and SMS Storage' app with Titanium Backup) and solved it by * uninstalling it from within TitaniumBackup (a warning appeared, but it was safe to ignore for me and uninstalling the update is not possible via the normal Android app settings) * and restoring my SMS from an XML file afterward (Titanium Backup -> Menu Button -> Restore Data from XML...). Upvotes: 0
2019/06/28
1,069
3,227
<issue_start>username_0: I have been looking into 32-bit or 64-bit Android versions for phones. It seems to me that the information on the number of bits of the installed Android version is always missing from phones' specs, unlike what happens for the CPU. Googling around, the ways I have found to understand whether a phone is running a 32-bit or a 64-bit OS all include actually doing something with the phone, like looking up the kernel version or downloading some app, like AIDA64. How do I know if a phone I want to buy will come with a 32-bit or a 64-bit Android *before I buy it*? It would be interesting to find a *layman-friendly* criterion or resource that allows me to know this in advance, especially to be able to look into the cheapest phones running a 64-bit Android.<issue_comment>username_1: Until the manufacturer doesn't describe the technical specifications of OS included with a device, it's hard to say if it's 32-bit or 64-bit. But a device with 64-bit hardware is expected to come with 64-bit OS (not always), let's take a look how to identify 64-bit hardware. To find out if a device is 32-bit or 64-bit, you need to check the specifications of its SoC and then of its processor. For instance SoC in [Redmi Note 4](https://m.gsmarena.com/xiaomi_redmi_note_4-8531.php) is [Qualcomm Snapdragon 625 (MSM 8953)](https://www.qualcomm.com/products/snapdragon-625-mobile-platform), which contains processor `Cortex-A53`. It's evident from [technical specifications of Cortex-53](https://developer.arm.com/products/processors/cortex-a/cortex-a53) that it's based on `ARMv8` architecture, which can process 2 types of Instruction Sets: `aarch64` (which Android's `arm64-v8a` ABI uses) and `aarch32` (which Android's `armeabi-v7a` ABI uses). So the phone is 64-bit, shipped with a 64-bit OS. On-device processor/SoC information can be checked using some third party app as you have mentioned, or directly from CLI: `uname -m`, `cat /proc/cpuinfo`, `cat /sys/firmware/devicetree/base/model` etc. **RELATED:** [Android apps for “armeabi-v7a” and “x86” architecture: SoC vs. Processor vs. ABI](https://android.stackexchange.com/a/208132/218526) Upvotes: 1 <issue_comment>username_2: One way to know that the OS is 64-bit is to check the RAM. 32-bit OSes have (see/utilise) a maximum of 4GB of RAM while 64-bit devices see more. Devices with more than 4GB of RAM will be using 64-bit Android. Limits are as followed: 32-bit: 2^32 = 2^2 \* 2^30 = 4GB. A 32-bit OS will go 1 bits up to 4GB. 64-bit: 2^64 = 2^4 \* 2^60 = 16EB. A 64-bit OS will go 1 bits up to 16EB. Up to 4GB, the RAM won't help differentiating whether it is 32 or 64-bit. More than 4GB, then it is more than likely to be 64-bit. [Large Physical Address Extension(LPAE)](https://en.wikipedia.org/wiki/ARM_architecture#Large_Physical_Address_Extension_(LPAE)) was implemented to allow physical address up to 40-bit. But as [@Irfan](https://android.stackexchange.com/users/218526/irfan-latif) as inferred, it is not known (at least publicly) if there are devices in the market which have taken advantage of it. ``` Conversion table ----------------- 2^10 = 1 KB 2^20 = 1 MB 2^30 = 1 GB 2^40 = 1 TB 2^50 = 1 PB 2^60 = 1 EB ``` Upvotes: 2
2019/07/01
1,059
3,080
<issue_start>username_0: This is pertaining to a smart phone with data. My phone is connected to my WIFI which lacks internet currently. It is also connected to the cell network and using it for data. When I ifconfig it tells me I am connected on wlan with 192.168.1.4 and rmnet at 10.124.121.12. I am trying to ping a device on 192.168.1.55 for purposes. If I turn off my cell network I can ping it fine. With my cell network on its unreachable. How do I get my android to allow me to ping 192.168.1.55 while being on the cell network? I have only noticed this since the internet went out on my WIFI so its a strange and new problem.<issue_comment>username_1: Until the manufacturer doesn't describe the technical specifications of OS included with a device, it's hard to say if it's 32-bit or 64-bit. But a device with 64-bit hardware is expected to come with 64-bit OS (not always), let's take a look how to identify 64-bit hardware. To find out if a device is 32-bit or 64-bit, you need to check the specifications of its SoC and then of its processor. For instance SoC in [Redmi Note 4](https://m.gsmarena.com/xiaomi_redmi_note_4-8531.php) is [Qualcomm Snapdragon 625 (MSM 8953)](https://www.qualcomm.com/products/snapdragon-625-mobile-platform), which contains processor `Cortex-A53`. It's evident from [technical specifications of Cortex-53](https://developer.arm.com/products/processors/cortex-a/cortex-a53) that it's based on `ARMv8` architecture, which can process 2 types of Instruction Sets: `aarch64` (which Android's `arm64-v8a` ABI uses) and `aarch32` (which Android's `armeabi-v7a` ABI uses). So the phone is 64-bit, shipped with a 64-bit OS. On-device processor/SoC information can be checked using some third party app as you have mentioned, or directly from CLI: `uname -m`, `cat /proc/cpuinfo`, `cat /sys/firmware/devicetree/base/model` etc. **RELATED:** [Android apps for “armeabi-v7a” and “x86” architecture: SoC vs. Processor vs. ABI](https://android.stackexchange.com/a/208132/218526) Upvotes: 1 <issue_comment>username_2: One way to know that the OS is 64-bit is to check the RAM. 32-bit OSes have (see/utilise) a maximum of 4GB of RAM while 64-bit devices see more. Devices with more than 4GB of RAM will be using 64-bit Android. Limits are as followed: 32-bit: 2^32 = 2^2 \* 2^30 = 4GB. A 32-bit OS will go 1 bits up to 4GB. 64-bit: 2^64 = 2^4 \* 2^60 = 16EB. A 64-bit OS will go 1 bits up to 16EB. Up to 4GB, the RAM won't help differentiating whether it is 32 or 64-bit. More than 4GB, then it is more than likely to be 64-bit. [Large Physical Address Extension(LPAE)](https://en.wikipedia.org/wiki/ARM_architecture#Large_Physical_Address_Extension_(LPAE)) was implemented to allow physical address up to 40-bit. But as [@Irfan](https://android.stackexchange.com/users/218526/irfan-latif) as inferred, it is not known (at least publicly) if there are devices in the market which have taken advantage of it. ``` Conversion table ----------------- 2^10 = 1 KB 2^20 = 1 MB 2^30 = 1 GB 2^40 = 1 TB 2^50 = 1 PB 2^60 = 1 EB ``` Upvotes: 2
2019/07/01
1,038
3,147
<issue_start>username_0: I have an issue with file permission in Termux. For instance, I installed c4droid and copied the Termux `/include` and `/lib` folders content in the `/c4droid` folder where the headers are being looked for at compilation. I changed the owner and group to the correct name and mode to 777, but at compilation, it says "cannot open \*\*\*\*.h permission denied". Same thing with a worldlist that comes from the SD card that I put on a folder meant to be used with hydra, not only have I have to use root access to unzip the file and move it around, but hydra itself can't open it. What is this so important thing that I am missing about Termux and filed ownership and permissions?<issue_comment>username_1: Until the manufacturer doesn't describe the technical specifications of OS included with a device, it's hard to say if it's 32-bit or 64-bit. But a device with 64-bit hardware is expected to come with 64-bit OS (not always), let's take a look how to identify 64-bit hardware. To find out if a device is 32-bit or 64-bit, you need to check the specifications of its SoC and then of its processor. For instance SoC in [Redmi Note 4](https://m.gsmarena.com/xiaomi_redmi_note_4-8531.php) is [Qualcomm Snapdragon 625 (MSM 8953)](https://www.qualcomm.com/products/snapdragon-625-mobile-platform), which contains processor `Cortex-A53`. It's evident from [technical specifications of Cortex-53](https://developer.arm.com/products/processors/cortex-a/cortex-a53) that it's based on `ARMv8` architecture, which can process 2 types of Instruction Sets: `aarch64` (which Android's `arm64-v8a` ABI uses) and `aarch32` (which Android's `armeabi-v7a` ABI uses). So the phone is 64-bit, shipped with a 64-bit OS. On-device processor/SoC information can be checked using some third party app as you have mentioned, or directly from CLI: `uname -m`, `cat /proc/cpuinfo`, `cat /sys/firmware/devicetree/base/model` etc. **RELATED:** [Android apps for “armeabi-v7a” and “x86” architecture: SoC vs. Processor vs. ABI](https://android.stackexchange.com/a/208132/218526) Upvotes: 1 <issue_comment>username_2: One way to know that the OS is 64-bit is to check the RAM. 32-bit OSes have (see/utilise) a maximum of 4GB of RAM while 64-bit devices see more. Devices with more than 4GB of RAM will be using 64-bit Android. Limits are as followed: 32-bit: 2^32 = 2^2 \* 2^30 = 4GB. A 32-bit OS will go 1 bits up to 4GB. 64-bit: 2^64 = 2^4 \* 2^60 = 16EB. A 64-bit OS will go 1 bits up to 16EB. Up to 4GB, the RAM won't help differentiating whether it is 32 or 64-bit. More than 4GB, then it is more than likely to be 64-bit. [Large Physical Address Extension(LPAE)](https://en.wikipedia.org/wiki/ARM_architecture#Large_Physical_Address_Extension_(LPAE)) was implemented to allow physical address up to 40-bit. But as [@Irfan](https://android.stackexchange.com/users/218526/irfan-latif) as inferred, it is not known (at least publicly) if there are devices in the market which have taken advantage of it. ``` Conversion table ----------------- 2^10 = 1 KB 2^20 = 1 MB 2^30 = 1 GB 2^40 = 1 TB 2^50 = 1 PB 2^60 = 1 EB ``` Upvotes: 2
2019/07/02
1,096
4,084
<issue_start>username_0: I'm trying to set up my motorcycle Bluetooth headset (Fodsports BT-S2) to let me use Google Assistant. It has the following Bluetooth profiles: * A2DP-SNK * AVRCP * HSP * HFP I've managed to find an old APK of 'Smart Bluetooth Headset' which has allowed me to map the normal 'redial last number' button to the more useful 'Google Assistant'. That seems to be working flawlessly, opening the assistant and making the normal beep awaiting voice input. The problem I have is that it doesn't pick up the audio from the microphone on the headset, only from the phone itself. I've tried various combinations of the settings within the Google Assistant, as well as various mono routing apps to try and get it to work. One of these mono routing apps was successful at one point. However, my setup was no longer using A2DP, and so I was forced to endure poor sound quality. Is there any way I could either: 1. Make Google Assistant correctly use the microphone on my headset? 2. Force the phone to use only the microphone part of my headset, instead of the phone's built-in microphone, whilst retaining the A2DP mode for audio?<issue_comment>username_1: I have managed to make this work in a way that, although satisfactory to my needs, is an absolutely convoluted hack. 1. Found a version of the 'smart Bluetooth headset' apk from before the functionality to remap the redial button was stripped out. 2. Unfortunate this old version didn't support Tasker correctly (just did nothing when trying to select a tasker task). As such, I had to install the new 'smart Bluetooth assistant' and open this when redial was chosen. This was then set to open a module once loaded, which was a task set up in Tasker. 3. The task was set up to open BTmono (full version), call the BT\_ON intent of BTmono, activating the hfp on my headset and allowing the microphone to work. It then waited 2 seconds before starting a 'voice search', opening the Google assistant which now hears me. Fortunately my headset cancels the BTmono connection just by pushing the hangup button, allowing the headset to return to A2DP once I had finished my command. Convoluted, messy and takes 4 apps to get the job done, but works surprisingly reliably so far. Would be grateful if anyone has any better suggestions, but for now this will do! Upvotes: 0 <issue_comment>username_2: This could be your Bluetooth device goes into power saving mode, and need to be woke with a button press, a more advance model device may listen for the Google wake up commands while power saving mode, or a setting on the master device. <https://support.google.com/headphones/answer/9027902?co=GENIE.Platform%3DAndroid&hl=en> <https://support.google.com/headphones/answer/7520404?hl=en&ref_topic=7518050> <https://support.google.com/googleplay/answer/113412?hl=en> <https://support.google.com/assistant/answer/7283669?hl=en&ref_topic=7172845> <https://support.google.com/assistant/answer/7394009?co=GENIE.Platform%3DAndroid&hl=en> Upvotes: 0 <issue_comment>username_3: I had the same problem with [Google Voice Access](https://play.google.com/store/apps/details?id=com.google.android.apps.accessibility.voiceaccess). I came across [these instructions](https://profandroid.com/network/bluetooth/bluetooth-headset-voice-commands.html), which seem to be for [Google Assistant](https://play.google.com/store/apps/details?id=com.google.android.apps.googleassistant). Executing them did not seem to affect the desired change in Voice Access, but I think they might work for you with Assistant. The configuration is performed in the main [Google](https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox) app. After opening it, I clicked "⋯ More", then "⚙ Settings", then " Voice", and there - under the "Hands-Free" heading, I found an option for "Bluetooth audio recording", subtitled "Enable audio recording through Bluetooth devices if available. See [the linked instructions](https://profandroid.com/network/bluetooth/bluetooth-headset-voice-commands.html) for screenshots. Upvotes: 1
2019/07/02
464
1,749
<issue_start>username_0: Around this morning, I had the idea to transfer all my whatsapp chats(from android to ios) Not so ***complicated***, right? Well, I was in for a rude awakening. Not only did I spend literally 7 hours trying to fix it... I couldn't fix it! That's basically why I'm reaching out to you. My last hope. My knight in shining armor. Here are the more technical details: * Before you say it, and I know you will, I'll tell you - I restarted my phone about 10 million times * I've enabled and disabled usb debugging around 10 million times minus 1. * I haven't played with adb so I don't screw with my android system. However if that's necessary, I'll do what must be done. * I'm specifically using my own samsung galaxy note 8 since I previously tried on another phone(LG v20) and it didn't work either. So, I must ask you, are you up to this challenge? Can you fix what seems unfixable? P.s. Here's a preview of what should be showing up on my own android device but is not: [![enter image description here](https://i.stack.imgur.com/nOnEn.jpg)](https://i.stack.imgur.com/nOnEn.jpg)<issue_comment>username_1: It seems like the profile of the computer(perhaps the RSA key fingerprint) was automatically recognized by the android device and so it didn't ask for any permissions. From there, I'm still kind of trying to understand it. But basically, as soon as I reset(factory reset) my computer, it started prompting me for authorization again. I'm sure the factory reset was on the extreme end of options, but it worked in the end. Upvotes: 0 <issue_comment>username_2: There's an option called "Revoke USB Authorization" within the Developer options. Click it and it'll revoke the auth key. Upvotes: 2 [selected_answer]
2019/07/04
1,009
2,881
<issue_start>username_0: I got an old s7. Looking through the settings it says: Model Number: SM-G930FD Build Number MMB29K.G930FXXU1BPIF Baseband Verion:G930FXXU1DQE8 I am trying to find a compatible firmware to manually install, since when I told the phone to search for updates it does not find anything. The device has Android 6.0.1 with September 2016 security update which looks very insecure to use. I am trying to find a compatible update, preferably based on android 8 and released during the last two months. However I am not sure about what to use. Another strange thing is that when I try to find the existing firmware on the device I cannot find it when searching for SM-G930FD. However I do find [this entry](https://updato.com/firmware-archive-select-model/?record=9115ABEC80D911E69B2DFA163EE8F90B) for SM-G930F with PDA G930FXXU1BPIF. Also if I enter download mode the phone shows: PRODUCT NAME: SM-G930F !! I am not sure what to make of this. Is the phone a G930F or a G930FD? And what should match when I try to find an official firmware that should match this phone's hardware?<issue_comment>username_1: SM-G930FD and SM-G930FD are all models of the Samsung Galaxy S7. See [Samsung Galaxy S7 Specifications](https://www.gsmarena.com/samsung_galaxy_s7-7821.php). > > Versions: G930F (Global); G930FD (Global; Southeast Asia); G930W8 (Canada) > > > On the Misc section of the above link: > > Models: SM-G930F, SM-G930A, SM-G930P, SM-G930V, SM-G930T, SM-G930R, SM-G930F, SM-G930FD, SM-G930W8, SM-G930S, SM-G930L, SM-G930K, SM-G9300 > > > For firmwares, you can verify [here](https://www.sammobile.com/samsung/galaxy-s7/firmware/SM-G930FD/) for G930FD and [here](https://www.sammobile.com/samsung/galaxy-s7/firmware/SM-G930F/) for G930F. Check if your country is among those with new firmwares. Upvotes: 2 <issue_comment>username_2: `SM-G930F` is the single-SIM variant and `FD` the dual-SIM variant. If it says `FD` in Settings, and - as a more concrete proof - can also take/read 2 SIMs (`FD` has a different SIM tray), then you can be sure it's an `FD`. The two actually share the same hardware otherwise, hence you'll see `G930F` in Download Mode. In fact, 1) there had been users reporting that flashing `F` firmware on `FD` is possible and doesn't remove dual-SIM functionality (more on that in [this XDA thread](https://forum.xda-developers.com/galaxy-s7/how-to/galaxy-s7-dual-sim-discussion-t3316311)), and 2) it's even possible to convert an `F` to an `FD` with certain steps and swapping the SIM tray for one from `FD`. As for firmware, any [G930FD firmware](https://updato.com/firmware-archive-select-model/?q=SM-G930FD&rpp=15&order=date&dir=desc&exact=1) listed will work, though for the best customized experience you'll want to find one that matches or at least close to your geographical region. Upvotes: 2 [selected_answer]
2019/07/05
685
2,836
<issue_start>username_0: When I try to open the Setting app on my Meizu M6 (with Flyme 7.1.1.0G), it stays on for like a half a second and then closes. Usually when this happens to me, what I do is clear the cache or if that won't help, even the data of the application. So basically, Settings is not working, so go to Settings, Apps, Settings, and clear cache. I hope everyone sees the catch here. I've tried restarting the phone, but the Settings app still crashes. I've noticed that if I am fast enough, I can get into the submenu of the settings, so I've spent 30 minutes training my fingers to open settings, scroll down, and click Apps in less than half a second. I was lucky and managed to get into Apps (which didn't crash), found Settings app and when I tried to clear the cache, Apps crashed and Settings didn't work either. What can I do? I would love to avoid a factory reset.<issue_comment>username_1: You can try booting the phone into safe mode and see if the problem persists. If so, then you might have corrupted system files and you'll need to reflash the ROM to fix that. Upvotes: 1 <issue_comment>username_2: This may not be the solution for your problem but for others like me coming here from a search, my issue seems to be caused by my work profile. My workaround: * Swipe up from the bottom of your home screen (launcher) to open your app drawer. * Tap on the "Work" tab. * Tap on the "Turn off work apps" button. My Settings app stopped crashing when my work profile was temporarily disabled. I tried freezing one app at a time in my work profile (through Shelter), but it still crashes with all user apps frozen. It might be an issue with the actual profile. I recently enabled a lock screen PIN and fingerprint on my main profile, so that may have messed up something with my work profile. I found someone with a similar problem and he said disabling "Use one lock" in the Android security settings fixed his issue, but that doesn't seem to work for me. Upvotes: 0 <issue_comment>username_3: I just have experienced a very similar problem (the Settings app immediately crashes on opening, de-facto making any kind of access to phone settings impossible). Since this is the first hit for such a question on Google, I'll describe my case and the fix here: The problem in my case was that the Settings app somehow **depends on** the Google app and crashes when the Google app is up-to-date (at the time of writing this). It is certainly the case that my phone's Android version is rather ancient (9) and could be due to some oversight on the manufacturer's side, but this nevertheless is a fairly recent regression and Google will hopefully fix it in the future. As a **temporary fix**, resetting the Google app to factory via "uninstall" + prohibiting auto-updates for the Google app works. Upvotes: 0
2019/07/07
2,736
10,231
<issue_start>username_0: I'd like to programatically press another application's Quick Settings Tile, e.g. from the shell or Tasker. --- In this particular case, I'd like to press ProtonVPN's tile in order to automate connecting and disconnecting. After tearing apart the app, I found that I could reliably disconnect the VPN with: ``` su root -c am start-foreground-service -n com.protonvpn.android/org.strongswan.android.logic.CharonVpnService -a android.net.VpnService.DISCONNECT ``` I can sometimes connect with: ``` su root -c am start-foreground-service -n com.protonvpn.android/org.strongswan.android.logic.CharonVpnService -a android.net.VpnService ``` However, this is not very reliable as it's an internal mechanism that bypasses much of what the app does in the process of properly establishing a Quick Connect connection. If there's an intent that will simulate what occurs when an app's tile is pressed, it should provide a much cleaner solution. In this instance, the app has the service `com.protonvpn.android.components.QuickTileService` and an intent action filter of `android.service.quicksettings.action.QS_TILE` however I'm at a loss for where to go from there.<issue_comment>username_1: I'm stepping out of my comfort zone with this one, but seeing as no one else has had any input, I thought I may as well mention it for you to test: 1. Go to G Play Market and install [Nova Launcher](https://play.google.com/store/apps/details?id=com.teslacoilsw.launcher). 2. Skip all the setup and go straight to the Home screen with Nova as the default launcher (since you're just testing functionality at this point) 3. Long press your background and select `Widgets`, then scroll down to Nova Launcher and find the "Activity" widget (for me it's the second widget); long-press then drag to an empty space on Home Screen 4. Once you let go to set the widget, an overlay prompt will come into focus and start loading. Depending on your device and the number of apps installed, this may take a minute or two, so don't be alarmed. Once it finishes loading, scroll down to your app and locate the activity thread you're looking for and select it (you can long-press them one by one to test the function as well, it will return you back to the previous overlay prompt **if** the thread didn't cause a crash...if it does, you'll have to restart from step 3. I always thought it was a neat function but never got around to testing what it was capable of doing. Hope this works out for you! NOTE: I am enrolled in the Beta and have the Prime (paid) version, so I'm not sure if that might affect this specific function or not. You can likely purchase for testing and request a refund if necessary. Upvotes: 1 <issue_comment>username_2: In brief ======== ### Automating an already visible Quick Settings tile ``` # Click on a TileService of the specified component cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent # You may need to expand the status bar to show the quick settings # before it'll apply. Not sure why. cmd statusbar expand-settings sleep 0.25 # 250 ms or shorter may be enough cmd statusbar collapse ``` ### Adding a Quick Settings tile and removing it after clicking ``` # Expand, add tile, wait for it to initialize cmd statusbar expand-settings cmd statusbar add-tile com.package.name/.service.QuickSettingsTileComponent sleep 0.20 # Click tile, wait for it to react cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent sleep 0.35 # Remove tile, collapse cmd statusbar remove-tile com.package.name/.service.QuickSettingsTileComponent cmd statusbar collapse ``` Guided walkthrough ================== Finding package name and component ---------------------------------- *Skip this if you already know how to find the QuickSettings Tile service.* 1. Install an application like [apps\_Packages Info [F-Droid]](https://f-droid.org/en/packages/com.oF2pks.applicationsinfo/) to browse through the list of installed apps and all services. 2. Find the application whose tile you want to toggle and open the application details by tapping on it * *Example: `Digital Wellbeing` is `com.google.android.apps.wellbeing`* 3. Expand the `Services` dropdown in the application detail page 4. Find the tile service, which will have the permission `android.permission.BIND_QUICK_SETTINGS_TILE`, then note down the component name * *Example: `Bedtime mode` (formerly `Grayscale`) QS tile is `.screen.ui.GrayscaleTileService`* 5. Make note of the full package name and component name, and fill out the command below: ``` cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent ``` *Example 1: to toggle `Digital Wellbeing`'s `Bedtime mode` (formerly `Grayscale`) QS tile…* ``` cmd statusbar click-tile com.google.android.apps.wellbeing/.screen.ui.GrayscaleTileService ``` *Example 2: to toggle `Digital Wellbeing`'s `Focus Mode` QS tile…* ``` cmd statusbar click-tile com.google.android.apps.wellbeing/.focusmode.quicksettings.FocusModeTileService ``` Automating the Quick Settings tile ---------------------------------- On some versions of Android, toggling the Quick Settings tile via `click-tile` won't apply until the Quick Settings section is expanded. As soon as the Quick Settings section is revealed, it'll work, even if the tile itself is placed on a secondary page of quick settings tiles (e.g. page 2). This works even when the screen is locked if the QS tile doesn't require unlocking to toggle. However, the display must be on. Try without expanding the Quick Settings section first, and if that doesn't work, try the expanding method instead. ### General steps **If the Quick Settings tile is already added…** 1. Turn on screen if it's off 2. Expand Quick Settings via `cmd statusbar expand-settings` * This might not be needed for you - try without first 3. Run `cmd statusbar click-tile [component]` command discovered above 4. Wait a short delay, e.g. `250 ms` 5. Optionally, close status bar via `cmd statusbar collapse` 6. Optionally, turn screen off if it wasn't already on **If you don't want to keep the Quick Settings tile around…** 1. Turn on screen if it's off 2. Expand Quick Settings via `cmd statusbar expand-settings` * As before, this might not be needed - try without first 3. Add the Quick Settings tile via `cmd statusbar add-tile [component]` 4. Wait a short delay, e.g. `200 ms` 5. Run `cmd statusbar click-tile [component]` command discovered above 6. Wait a short delay, e.g. `350 ms` 7. Run `cmd statusbar remove-tile [component]` 8. Optionally, close status bar via `cmd statusbar collapse` 9. Optionally, turn screen off if it wasn't already on ### Example shell script (with Tasker counterpart) **If the Quick Settings tile is already added…** ``` # Wake up device input keyevent KEYCODE_WAKEUP # # Tasker: Add Action -> Display -> Turn On # Expand the Quick Settings section of the status bar cmd statusbar expand-settings # # Tasker: Add Action -> Code -> Run Shell, copy above # Click on a TileService of the specified component cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent # # Tasker: Add Action -> Code -> Run Shell, copy above, check "Use Root" # Wait for click to register, 350 ms or shorter may be enough sleep 0.35 # # Tasker: Add Action -> Task -> Wait, then set delay to 350 ms # Optional: collapse status bar # This won't work when on the lockscreen, but turning the screen off # also collapses the status bar for you. cmd statusbar collapse # # Tasker: Add Action -> Code -> Run Shell, copy above # Optional: put device to sleep # (Up to you: only turn off if the screen wasn't already on.) input keyevent KEYCODE_POWER # # Tasker: Add Action -> Display -> Turn Off, enabling "Lock" ``` **If you don't want to keep the Quick Settings tile around…** ``` # Wake up device input keyevent KEYCODE_WAKEUP # # Tasker: Add Action -> Display -> Turn On # Expand the Quick Settings section of the status bar cmd statusbar expand-settings # # Tasker: Add Action -> Code -> Run Shell, copy above # Add the TileService of the specified component, click on it, then # remove it # 'sleep' gives time for the tile to initialize and the click to # register, 200 ms or shorter may be enough cmd statusbar add-tile com.package.name/.service.QuickSettingsTileComponent sleep 0.20 cmd statusbar click-tile com.package.name/.service.QuickSettingsTileComponent sleep 0.35 cmd statusbar remove-tile com.package.name/.service.QuickSettingsTileComponent # # Tasker: Add Action -> Code -> Run Shell, copy above, check "Use Root" # No need to wait for click to register, waiting was done above # Optional: collapse status bar # This won't work when on the lockscreen, but turning the screen off # also collapses the status bar for you. cmd statusbar collapse # # Tasker: Add Action -> Code -> Run Shell, copy above # Optional: put device to sleep # (Up to you: only turn off if the screen wasn't already on.) input keyevent KEYCODE_POWER # # Tasker: Add Action -> Display -> Turn Off, enabling "Lock" ``` ### NOTE: root or ADB is required! If you are using an automation app rather than `adb shell`, `cmd statusbar add-tile/click-tile/remove-tile` must be run with root or via e.g. ADB WiFi actions. The other `cmd statusbar` commands may be run without root. Tasker/etc have non-root options for waking the screen and putting it to sleep. ### Other details `cmd statusbar click-tile` [appears to have been added with Android 7.0](https://cs.android.com/android/platform/superproject/+/android-7.0.0_r35:frameworks/base/services/core/java/com/android/server/statusbar/StatusBarShellCommand.java;l=49), so this should work ever since custom quick setting tiles were officially added to Android. I've not found any way to *read* the Quick Settings tile state, e.g. active/on or inactive/off. To work around this, I've checked `logcat` and app notifications via `dumpsys notification` to see what's running or paused. I've also not found out how to toggle the built-in Android System Quick Settings tiles; fortunately, most of them appear to be achievable via other means (secure settings, service calls, etc). Upvotes: 3
2019/07/07
297
902
<issue_start>username_0: I am relatively new in **[HavocOS](https://forum.xda-developers.com/oneplus-7-pro/development/rom-havoc-os-2-6-t3942337)**. I am seeing an update has arrived in my OS, it is downloaded already. But I can't find the files downloaded in the mobile. I want to manually update with **TWRP** recovery to install the Upgrade. But where does HavocOs store its downloaded upgrade files?<issue_comment>username_1: I have found a solution [***here***](https://forum.xda-developers.com/asus-zenfone-max-pro-m1/development/rom-havoc-os-t3852830/post79863428#post79863428). > > Hold **tap** near the **changelog button** and you'll see an **export option pop up**. > > > Click on it and it will export zip file in **internal storage** in a folder called ***Updates*** > > > Upvotes: 1 [selected_answer]<issue_comment>username_2: `/data/havoc_updates/` is the location. Upvotes: -1
2019/07/08
1,103
4,535
<issue_start>username_0: I have about 60 gigs of music on my Samsung Galaxy S8. I normally uses Pi Music Player, and am very happy with it. But that's not so convenient while driving, so I'd like to control my music through Google Assistant. However, when I ask Google assistant to say, "Play <NAME> from my library", it's hit or miss whether it starts playing my John Prine collection or whether it offers up some random John Prine video from YouTube. I can't seem to find any way to tell it reliably that I only want music from my phone. I was about to buy a new car and enjoy the pleasures of Bluetooth voice commands so I don't have to fiddle with my phone while driving (my existing ten-year-old car does not offer me this option). But it now appears that there's no way to do that; unless I pick up my phone and use the touch screen, the system is going to play whatever it feels like playing rather than the music that's right there on the phone. I've put the car purchase on hold until I figure out whether there's a solution to this. (I've also just spent an entire very frustrating day trying and failing to find settings I can adjust...) Is there in fact a solution?<issue_comment>username_1: I solved the problem by installing a different music player, namely Pulsar, which I believe is designed to play only local music. I also did a bunch of other stuff, like disabling YouTube and uninstalling Google Play Music, which might or might not have contributed to the solution. But Pi Music Player is still installed and the voice commands still fail to control it properly. I (once only) told Google Assistant to "play Steve Goodman on Pulsar", it did what I asked, and ever since, it's been defaulting to Pulsar for all of my music requests, just as I wanted it to. Following the exact same strategy with Pi Music Player does not work. Upvotes: 1 <issue_comment>username_2: Edit: 1/3 Music - Bose QC Buds - Google's Assistant - Android Enthusiast Website Solved the problem: I'm using Samsung Music Player I say, "Hey Google, Play Samsung Music " And it worked I shall have to split my answer into probably 3 posts because I will have to take more than 2,500 limit to properly deal with the topic. 1: Probably, the problem isn't what car you are driving, but the quality of the installed radio system, earbuds, earphones, headphones, and apps being used. 2: Google Assistant doesn't know what music player you want to use -unless you are inside the correct music player that you want to use, and also the music player will actually play the music and also is compatible with the Google's Assistant that are compatible with the latest voice commands. 3: If you weren't inside the correct music player - Google Assistant will probably have to guess, which place to go to, for example, to play the music requested. 4: I shall tell you how I managed to solve the problem eventually, but you should replace the things that I use with the ones that you use. 5: But I don't know if the things that you are using are good enough (have the latest software) for Google Assistant to take advantage of the voice recognition commands. 6: Make sure that you are using the latest updates with products. 7: Replace my items with the ones that you use. 8: I use the Samsung Galaxy S20 Ultra phone - You should replace it with your phone each time that I mention my phone, S20 Ultra. 9: I've got the latest Android 11 version that should be good enough to operate Google Assistant voice. 10: I've got plenty of spare storage space on my phone, because as far as possible I save data onto my relatively fast read and write SanDisk Extreme Plus, V30 128GB, MicroSDXC Card inside my S20 Ultra's Phone (Ccleaner app may help to increase storage space). 11: I transferred data from my phone using Myfile that either came with my S20 Ultra's Phone or that I installed from Google's Playstore. 12: I then moved (cut and paste) data using Myfile inside my S20 to the SanDisk Extreme Plus 128GB MicroSDXC Card. NB! (Note well)! NB! If necessary used Samsung's (phone's) Technicians to solve any compatible problems with; Samsung Music Player, and Myfile, to allow Google Assistant to be able to automatically find all the relevant music, and play them. I, shall check that commands work in 2 and 3. Divide notes in Google's Doc App into half and hope that both halves are within the limit - copy and paste into this forum. Hopefully, these 3 posts will help people to use voice commands within their products. Upvotes: -1
2019/07/09
564
2,257
<issue_start>username_0: Is there any way to prevent the YouTube app from translating (some) video titles from the original title (e.g. English) to the phone's configured language? (e.g. Spanish) It's really annoying as those translations look auto-generated and are often wrong, and also gives the impression that the video itself is in a different language than the one it is really in. In YouTube's web interface this does not happen, using the same Google account.<issue_comment>username_1: You can change it. Go to You Tube ---> Settings --->Subtitles --->You will be redirect to Google Subtitles(CC) ---> Under regular options you can find Language. --->And you can choose new default language. NOTE: In GS(CC) for language options default option is phone default language not Google Acc. language. Upvotes: 0 <issue_comment>username_2: There are many other people, [here](https://support.google.com/youtube/thread/1878493?hl=de) or [here](https://support.google.com/youtube/forum/AAAAiuErobUU1-1wGQgrmY/?hl=en&gpf=%23!topic%2Fyoutube%2FU1-1wGQgrmY) who are looking for the same option. Google has not yet offered a solution to disable the option while on mobile. Among the possible solutions posted on the second links is to: > > * Go to <https://myaccount.google.com/language> > * Add all the languages you understand in the list > * Reload whatever youtube page you were on > * Youtube shouldn't translate video titles anymore > Note that you may still have some video titles translated for some time because they were cached by your browser. > > > Also, if you watch videos in languages you don't understand, they will be translated (unless of course you select all languages). Another possible solution is to change the language of your device to be the same as the language of the video. But it not practical because you will to keep changing languages. Until Google decides to provide a proper solution, all the above solutions are hit and miss. They work for some and not others. Upvotes: 4 <issue_comment>username_3: I clicked on my profile picture on youtube and in the menu that breaks I went to languages and set my language to the language of the video in question. That worked for me, hopefully it works for you. Upvotes: 2
2019/07/10
1,119
3,990
<issue_start>username_0: I found the option to enable DNS over HTTPS for Firefox on the desktop but I can't find it on the Android version of the browser. Is it supported? How do I enable it?<issue_comment>username_1: Although I have not been able to prove it's really changing the routing of DNS queries, I have changed the settings on Firefox for Android: `network.trr.mode` to `2` (fail-over enabled) or `3` (fail-over not enabled) and `network.trr.uri` to `1.1.1.1` (Cloudflare) or `8.8.8.8` (Google) or 9.9.9.9 (Quad9). This came from [this Mozilla page](https://wiki.mozilla.org/Trusted_Recursive_Resolver) (not specific to Android Firefox). So you type `about:config` in the address bar, then search for and change the `network.trr*` settings. But as mentioned by Irfan, you can have all your DNS go to cloudflare by using [their 1.1.1.1 app](https://play.google.com/store/apps/details?id=com.cloudflare.onedotonedotonedotone), or if you're on the Android Pie, you can go to `Settings > Network & Internet > Private DNS` and select `Automatic` (I'm sure that's GOT to be Google's 9.9.9.9) or `Private DNS provider hostname` with `1dot1dot1dot1.cloudflare-dns.com`, for instance (credit to [this page on TechRepublic](https://www.techrepublic.com/article/how-to-enable-dns-over-tls-in-android-pie/)). Upvotes: 2 <issue_comment>username_2: I try to complete username_1 answer * Open Firefox and type: `about:config` * filter with: `network.trr.*` and set the following values: `network.trr.mode` value `3` `network.trr.bootstrapAddress` and set value as one ip from this [page](https://dns.google/query?name=mozilla.cloudflare-dns.com) (mine value is currently `104.16.249.249`) * now open a new tab to this [page](https://www.cloudflare.com/ssl/encrypted-sni/) used to verify if everything is working. You should have all green except `sni`. To make all green you should * switch tab and go back to config page * change filter with: `network.security.*` and set: `network.security.esni.enabled` value `true` * go back to previous tab and refresh. You should have all green. credits/references: * username_1 answer * [Mozilla Wiki Page](https://wiki.mozilla.org/Trusted_Recursive_Resolver#DNS-over-HTTPS_Settings_in_Firefox) * [u/SKITTLE\_LA Reddit answer](https://www.reddit.com/r/firefox/comments/acn9q2/til_firefox_for_android_supports_doh_dnsoverhttps/) Upvotes: 3 <issue_comment>username_3: Things have changed since the time most of the answers were written so here's an updated version: * The previous TRR (Trusted recursive resolver ) only encrypted the SNI(server name indication) which proved to be insufficient in masking your DNS queries. It has been shown that DNS queries , especially the SNI can still be leaked. So a new draft has been proposed which suggest to encrypt the entire 'Client Hello' message. This new draft (initially called draft 8) has been now referred to as ECH (encrypted client Hello). And it still under development, no browser have yet released it for production. This upgraded version would require all DNS servers to implement it for it to work properly. And as of date not many (I think none) have it working. Meanwhile firefox had removed Encrypt SNI since version 85. It would replaced by ECH in near future. Though one can still enable DoH (DNS over HTTPS) or TRR(Trusted Recursive Resolver ) as Mozilla calls it. From the firefox nightly version, go to `about:config` then turn `network.trr.mode` to 2 or 3 depending on whether you want to fail the request if TRR fails to resolve the address or use a fallback default (your ISP) as your resolver. firefox has cloudflare's 1.1.1.1 set as the default TRR so you don't have to change anything else. In the absence of Encrypted SNI, it won't be as secure but still be able to access some DNS blocked sites because most of the ISP's still don't have the means to find out. Some ISP that have advanced DPI( deep packet inspection) means would be able to detect it though Upvotes: 0
2019/07/10
798
3,096
<issue_start>username_0: I have, up to now always thought that Firefox for Android (codenamed **Fennec**) uses much of the same codebase as the Firefox for Desktop (Linux/Mac/etc...). However this [recent post](https://news.ycombinator.com/item?id=20391885) on HackerNews makes me think I might have got this wrong. > > This marks the last Android release with extensions/add-on support. > There will not be a 69 release of this edition of Firefox for Android > ("Fennec"). > > > I am of course concerned about the add-ons support, but also remain confused, to the best of my understanding Firefox on the Desktop systems has already been using the changed new Web-Extension API, has Fennec not supported this, and more importantly: is Fennec something different (if so how) to the Desktop Version of Firefox (which I suppose is gradually becoming more Quantum).?<issue_comment>username_1: Fennec (<=68) is being phased out in favour of Fenix (>=69). From that standpoint, Fennec will be "frozen" at version 68 and will not be updated to the engine used by the desktop version of Firefox 69. Fenix will, at some point in the future, replace the current version of Firefox Android and is slated to begin at version 69, with some overlap with version 68. Fenix features a largely rewritten architecture and engine and brings a lot of potential benefits, but the existing Fennec is pulling too much developer time away from it and causing problems in both camps. As a result it seems they want to draw a line in the sand, call an effective halt to Fennec and move over the majority or developers time. Android Police have [some more information detailing the change](https://www.androidpolice.com/2019/04/26/mozilla-outlines-plan-to-replace-firefox-for-android-with-fenix/). One of the things not currently supported in Fenix is extension support, and it is for that reason that the article you list states that Fennec is "the last Android release with extensions/add-on support." It is currently unclear, as far as I can see, as to what the intention actually is with regards to extension support in the future. It may well be that if we choose to upgrade in the meantime that extensions are lost temporarily but, short of Firefox following Googles lead with regard to crippling the extension system, I would expect them to return *at some point*. It does appear that there is [still some discussion going on](https://github.com/mozilla-mobile/fenix/issues/574) and that feature parity with the current version (Fennec/68) is intended. The mobilisation of developer time might actually turn this feature from "nice to have but low priority" to being actively worked on. Upvotes: 3 [selected_answer]<issue_comment>username_2: Fennec: Firefox for Android (based in FF version 68.x). Fenix: Firefox for Android (based in FF version above 69.x Fenix is based in Android Components and GeckoView (Firefox Quantum engine) Curiously the usage of names can be a little bit confusing because the app "Fennec" (from F-Droid) at the moment is based on the latest Firefox( Fenix). Upvotes: 0
2019/07/12
541
2,078
<issue_start>username_0: For a client I build a private app which their employees can download on their tablet and use. To get the app, the employee opens Chrome on his tablet and navigates to an URL to start the .apk download. This approach worked fine for the last few years, till a few weeks ago. Instead of installing the app, a folder is shown with the files of the .apk. The only difference I noticed is the source that's stated in the 'Downloads' screen. On June 16th everything worked fine, the source says 'chrome-native://newtab'. As of July 1th, the source changed to the domain where the .apk was downloaded and this problem occurs: [![](https://i.stack.imgur.com/j2l0W.png)](https://i.stack.imgur.com/j2l0W.png) The tablets are only used for this particular app. The company buys a tablet, navigates to the URL, downloads the .apk and installs it. It would like to keep it as simple as this. I've searched everywhere, but still have no clue what causes this problem. Any ideas? This problem occurs on Android 8.1.0, the upgrade form 8.0.0 to 8.1.0 may be the cause of the problem. But I still have no idea how to solve it.<issue_comment>username_1: I just had the same problem and was looking for an explanation. If you tap on an .apk in that list a message (Toast) pops up saying it can't open the file, right? A workaround I found is to open the file explorer app and manually navigate to the `Downloads` folder and tap on the .apk there. You'll be able to install the app without issues. Or you can just use another browser, like Firefox. My guess is that Google restricts Chrome from opening APKs. Funny enough you have to **explicitly allow** Chrome to ***download*** APKs but now you can't *install* them anymore… Still trying to wrap my head around this. I'll edit this answer if I find out more. Upvotes: 0 <issue_comment>username_2: The issue happens with an incorrect HTTP header. If the request has the right `Content-Type` header: `application/vnd.android.package-archive`, the APK will be installed correctly. Upvotes: 3 [selected_answer]
2019/07/12
281
1,107
<issue_start>username_0: I have a Nokia 6.1, and Android One phone, running Pie. Is there any way to tell if my SD card is already formatted for internal storage? Thanks<issue_comment>username_1: I just had the same problem and was looking for an explanation. If you tap on an .apk in that list a message (Toast) pops up saying it can't open the file, right? A workaround I found is to open the file explorer app and manually navigate to the `Downloads` folder and tap on the .apk there. You'll be able to install the app without issues. Or you can just use another browser, like Firefox. My guess is that Google restricts Chrome from opening APKs. Funny enough you have to **explicitly allow** Chrome to ***download*** APKs but now you can't *install* them anymore… Still trying to wrap my head around this. I'll edit this answer if I find out more. Upvotes: 0 <issue_comment>username_2: The issue happens with an incorrect HTTP header. If the request has the right `Content-Type` header: `application/vnd.android.package-archive`, the APK will be installed correctly. Upvotes: 3 [selected_answer]
2019/07/16
802
2,809
<issue_start>username_0: I purchased an XGody Mate 20, advertised as Android 9.0. Indeed, if you switch it on Settings -> About Phone reports Android 9.0: ![Android 9.0](https://i.stack.imgur.com/cj7PKl.png) However, when I plug the device in, Android Studio reports it to be Android 6.0: ![Android 6.0](https://i.stack.imgur.com/cvM8Zl.png) Also the DevCheck Android App also reports the device to be Android 6.0. Is there any way to find out which is it really? I bought this under the understanding it was an Android 9.0 device.<issue_comment>username_1: Pull down the notification shade. If it looks like this: [![Android 6.0](https://i.stack.imgur.com/dEshkl.png)](https://i.stack.imgur.com/dEshkl.png) It is android 6.0 If it looks like this: [![Android 9.0](https://i.stack.imgur.com/oLnSpl.jpg)](https://i.stack.imgur.com/oLnSpl.jpg) It is android 9.0 Upvotes: 5 <issue_comment>username_2: I wanted to turn some of the comments into an answer that can be used for additional verification in case someone else runs into a similar issue where the vendor also reskinned the notifications window. Android 9.0 was released in March 2018. The Security patch level is May 2017. This doesn't make sense at all. Would you trust it if the vaccination card for a 15 month old toddler says the most recent vaccinations were given 10 months before he was born? Not to mention that I'd really recommend against using a phone which is over 2 years out of date on security patches. The Kernel Version also doesn't match: Android 9.0 has one of 3 kernel version: 4.4, 4.9 or 4.14. The stated version, 3.18.19, matches that of Android 6.0. The Build Number also is cause for concern. MRA58K is related to the Android 6.0 ROM, and vendors are not supposed to use test keys for released products. Overall, these are all causes for concern. This device has been tampered with (either rooted and the build.prop edited, or a full ROM edit), and poorly at that, since if they were competent, chances are they'd have edited the above values as well to be less suspicious. There is no way to know what other changes they made. At best they're trying to mislead you. At worst they're spying on your and stealing your money. I urge you to get a refund. If that's not possible, I recommend you install a clean version of Android so you have less reason to worry about malicious intrusions. However, that might not be enough, because there might be intrusions in the device, either hardware or software, that can interfere with anything you do with the device. I agree with the others though that it's a security risk to use the device as-is. Upvotes: 7 [selected_answer]<issue_comment>username_3: this is not android pie you can tell this because the little circle at the bottom looks like O and not ◉ Upvotes: 0
2019/07/17
285
817
<issue_start>username_0: ``` adb shell input text 'Hindustan%sTrading%sCompany' ``` Gives `Company` in Gboard ``` adb shell input text 'Hindustan%s' ``` Just gives a space `adb shell input text '%sHindustan'` is working fine. so word before `%s` is missing ``` Android Debug Bridge version 1.0.40 Version 28.0.2-5303910 ```<issue_comment>username_1: Try separating the *input* lines like this: ``` adb shell input text 'Hindustan' adb shell input text '%s' adb shell input text 'Trading' adb shell input text '%s' adb shell input text 'Company' ``` Upvotes: 1 <issue_comment>username_2: Seems fixed ``` λ adb --version Android Debug Bridge version 1.0.41 Version 30.0.4-6686687 ``` The following works as expected ``` adb shell input text 'Hindustan%sTrading%sCompany' ``` Upvotes: 3 [selected_answer]
2019/07/17
428
1,750
<issue_start>username_0: I have some HTML files in the SD card in my phone, which I want to open in Chrome. But, when I am entering the URL of those files in the Chrome's address bar with the `file:///` prefix, Chrome says **Access to the file was denied**. But, I have checked that Chrome has access to the storage. See this screenshot: [![](https://i.stack.imgur.com/LVqNs.png)](https://i.stack.imgur.com/LVqNs.png) Please help me out. I have Android 7.0 Nougat and please ask if any more information is required.<issue_comment>username_1: Chrome can read file from the SD card folders it has access to. That folder, if you have set to download pages on the SD card, can be located by clicking Menu, then Downloads, then clicking on the gear. You have unrestricted access to that folder. But if you try to navigate to the parent folder, you will receive an `Access to the file was denied` message (if that folder is located on the SD card). You can copy your files in that folder and read it from there. Or you can copy them to the internal storage and access the internal storage by typing `file:///sdcard/` from Chrome's address bar. The internal storage is not restricted and you can navigate to any folder. Upvotes: 3 [selected_answer]<issue_comment>username_2: Am not a devloper but according to my experience - Actually after an update you can check in your Android Apps Manager Settings you will see Chrome is only allowed to read only MEDIA files not EXTERNAL files. To fix this those who have APK EDITORS in your PC, you can edit the MANIFEST file to change the permission (READ\_EXTERNAL\_STORAGE), otherwise please contact Google to inform this issue![enter image description here](https://i.stack.imgur.com/ro2Zk.jpg) Upvotes: 0
2019/07/17
622
2,048
<issue_start>username_0: I am trying to root my phone, * I unlocked bootloader * I have uploaded Magisk-v16.6 to internal storage * I flashed by many twrp versions (fastboot flash recovery TWRP\_3.2.3\_TRT-LX1\_by\_kiruha\_21.img/ twrp-3.2.3-4-land / boot-without-enciphering-data / twrp-3.3.1-0-CRO\_U00 / TRT-TWRP-3.1.1-0818 /TWRP\_3.2.2\_TREBLE\_TRT-LX1\_by\_kiruha\_21 / twrp-3.3.1-0-whyred but every time when I start phone i twrp mode - touchscreen not working * I read <https://forum.xda-developers.com/showpost.php?p=77597383&postcount=86> And I try to switch slot but when I run fastboot --set-active=a I get `error: Device does not support slots.` and when I run fastboot getvar current-slot I get current-slot: finished. total time: 0.002s my fastboot version `fastboot version 1:8.1.0+r23-5~18.04`<issue_comment>username_1: Chrome can read file from the SD card folders it has access to. That folder, if you have set to download pages on the SD card, can be located by clicking Menu, then Downloads, then clicking on the gear. You have unrestricted access to that folder. But if you try to navigate to the parent folder, you will receive an `Access to the file was denied` message (if that folder is located on the SD card). You can copy your files in that folder and read it from there. Or you can copy them to the internal storage and access the internal storage by typing `file:///sdcard/` from Chrome's address bar. The internal storage is not restricted and you can navigate to any folder. Upvotes: 3 [selected_answer]<issue_comment>username_2: Am not a devloper but according to my experience - Actually after an update you can check in your Android Apps Manager Settings you will see Chrome is only allowed to read only MEDIA files not EXTERNAL files. To fix this those who have APK EDITORS in your PC, you can edit the MANIFEST file to change the permission (READ\_EXTERNAL\_STORAGE), otherwise please contact Google to inform this issue![enter image description here](https://i.stack.imgur.com/ro2Zk.jpg) Upvotes: 0
2019/07/22
548
1,967
<issue_start>username_0: I am wondering if there is a method by which I can designate a WLAN/WiFi connection as "mobile network" based on its SSID for the sake data usage policies by apps or the Android system in general. Typically when you have a data plan with your mobile provider, your phone's LTE (or 3G ...) modem will connect to the provider to enable you to have internet access. Now if I am using a mobile LTE/WLAN router instead, my phone assumes that it's on an unmetered WiFi uplink and apps/the system will (mis)behave accordingly. Is there a way to tell the system that when it connects to a particular SSID it should treat that as "mobile network" in regards to how apps may use data? Phone: Samsung S9+ (SM-G965F), Android 9 NB: the settings [from this answer](https://android.stackexchange.com/a/144167/9993) don't exist on my phone.<issue_comment>username_1: I don't think WiFi can be designated as a Mobile Network, but stock Android provides option to set WiFi network as metered. When connected to the WiFi, go to that WiFi connection settings and you will find options to set the connection `metered` or `unmetered` (at least on Pie). [![](https://i.stack.imgur.com/frd1F.png)](https://i.stack.imgur.com/frd1F.png) OEMs might be removing the option from GUI. You can also try CLI method as stated [here](https://developer.android.com/training/basics/network-ops/data-saver#testing). From `adb shell` execute: ``` ~$ cmd netpolicy set metered-network true ``` Upvotes: 2 <issue_comment>username_2: This option actually exists and I have just tested it on Android 10 (AOSP). The trick is to set a custom DHCP option 43 with the text value "ANDROID\_METERED". What I find a bit confusion is that Android does not show you that it is on a metered Wi-Fi. I verified it with the [NetworkMonitor app](https://github.com/caarmen/network-monitor). Someone documented this further: <https://www.lorier.net/docs/android-metered.html> Upvotes: 3
2019/07/22
4,558
14,832
<issue_start>username_0: I am working on an application that needs root access and I have a device which is rooted but not with Magisk. This device has only `adb shell` root available. So, I need an alternative to call the required functionality without the use of Magisk or other tools. I did it by placing my executable inside system directory and run it as a daemon. This daemon required access on some location which is restricted by SELinux policies. I have injected the required policy with following commands: ``` sepolicy-inject -s init -t su -c process -p transition -l sepolicy-inject -s su -t system_file -c file -p entrypoint -l sepolicy-inject -s init -t su -c process -p rlimitinh -l sepolicy-inject -s init -t su -c process -p siginh -l sepolicy-inject -s su -t shell_exec -c file -p read -l sepolicy-inject -s su -t shell_exec -c file -p execute -l sepolicy-inject -s su -t shell_exec -c file -p getattr -l sepolicy-inject -s su -t vendor_toolbox_exec -c file -p execute_no_trans -l sepolicy-inject -s init -t su -c process -p noatsecure -l sepolicy-inject -s su -t toolbox_exec -c file -p getattr -l sepolicy-inject -s su -t toolbox_exec -c file -p execute -l sepolicy-inject -s su -t system_file -c file -p execute_no_trans -l sepolicy-inject -s su -t storage_file -c dir -p search -l sepolicy-inject -s su -t storage_file -c lnk_file -p read -l sepolicy-inject -s su -t tmpfs -c dir -p search -l sepolicy-inject -s su -t mnt_user_file -c dir -p search -l sepolicy-inject -s su -t mnt_user_file -c lnk_file -p read -l sepolicy-inject -s su -t sdcardfs -c dir -p search -l sepolicy-inject -s su -t sdcardfs -c file -p append -l sepolicy-inject -s su -t toolbox_exec -c file -p read -l sepolicy-inject -s su -t toolbox_exec -c file -p open -l sepolicy-inject -s su -t sdcardfs -c file -p read -l sepolicy-inject -s su -t sdcardfs -c file -p write -l sepolicy-inject -s su -t sdcardfs -c file -p open -l sepolicy-inject -s su -t media_rw_data_file -c file -p read -l sepolicy-inject -s su -t media_rw_data_file -c file -p write -l sepolicy-inject -s su -t media_rw_data_file -c file -p open -l sepolicy-inject -s su -t media_rw_data_file -c file -p append -l ``` The problem is that they are not persistent after reboot. I know I can extract boot.img and ramdisk, replace /sepolicy with new policy file copied from /sys/fs/selinux/policy, repack boot.img and flash back. I want to do it without reflashing `boot.img`. Is there any way with which I can execute above commands after Android finishes with generating SELinux files? I have tried following rc files: ``` #/etc/init/custom.rc # define service, use executable here if script not needed service custom /system/bin/custom.sh # don't start unless explicitly asked to disabled # Use `seclabel u:r:magisk:s0` to run with unrestricted SELinux context to avoid avc denials # can also use "u:r:su:s0" on userdebug / eng builds if no Magisk # it's required if SELinux is enforcing and service needs access # to some system resources not allowed by default sepolicy seclabel u:r:su:s0 # start the service when boot is completed on property:sys.boot_completed=1 sepolicy-inject -s init -t su -c process -p transition -l sepolicy-inject -s su -t system_file -c file -p entrypoint -l sepolicy-inject -s init -t su -c process -p rlimitinh -l sepolicy-inject -s init -t su -c process -p siginh -l sepolicy-inject -s su -t shell_exec -c file -p read -l sepolicy-inject -s su -t shell_exec -c file -p execute -l sepolicy-inject -s su -t shell_exec -c file -p getattr -l sepolicy-inject -s su -t vendor_toolbox_exec -c file -p execute_no_trans -l sepolicy-inject -s init -t su -c process -p noatsecure -l sepolicy-inject -s su -t toolbox_exec -c file -p getattr -l sepolicy-inject -s su -t toolbox_exec -c file -p execute -l sepolicy-inject -s su -t system_file -c file -p execute_no_trans -l sepolicy-inject -s su -t storage_file -c dir -p search -l sepolicy-inject -s su -t storage_file -c lnk_file -p read -l sepolicy-inject -s su -t tmpfs -c dir -p search -l sepolicy-inject -s su -t mnt_user_file -c dir -p search -l sepolicy-inject -s su -t mnt_user_file -c lnk_file -p read -l sepolicy-inject -s su -t sdcardfs -c dir -p search -l sepolicy-inject -s su -t sdcardfs -c file -p append -l sepolicy-inject -s su -t toolbox_exec -c file -p read -l sepolicy-inject -s su -t toolbox_exec -c file -p open -l sepolicy-inject -s su -t sdcardfs -c file -p read -l sepolicy-inject -s su -t sdcardfs -c file -p write -l sepolicy-inject -s su -t sdcardfs -c file -p open -l sepolicy-inject -s su -t media_rw_data_file -c file -p read -l sepolicy-inject -s su -t media_rw_data_file -c file -p write -l sepolicy-inject -s su -t media_rw_data_file -c file -p open -l sepolicy-inject -s su -t media_rw_data_file -c file -p append -l start custom ``` but it is not working because I think Android generates SELinux files after my custom service has been triggered. Also tried above commands on `onrestart` option of init service but failed. Any suggestion?<issue_comment>username_1: The `init` service you have defined won't inject SELinux policy rules because of two reasons: * The syntax of `sepolicy-inject` commands is incomplete; `.rc` files aren't shell scripts. The [correct syntax](https://android.googlesource.com/platform/system/core/+/master/init/README.md#commands) would be: ``` #/etc/init/custom.rc ... on property:sys.boot_completed=1 exec - -- /system/bin/sepolicy-inject -s init -t su -c process -p transition -l ... ``` * This will execute the statement with context `u:r:init.s0`. But modifying SELinux policy requires permission `load_policy` i.e. you need to inject rule `sepolicy-inject -s init -t kernel -c security -p load_policy -l` which again won't be allowed to `init`. Read [What sepolicy context will allow any other context to access it?](https://android.stackexchange.com/a/209374/218526) to know how SELinux is enforced on Android. So you are in the same *chicken or the egg* situation as you were at the start of your [previous question](https://android.stackexchange.com/q/214839/218526). SELinux policy can only be modified with context `u:r:su:s0` which is available only through `adb shell` on `userdebug` builds of ROMs. Or root the device e.g. with Magisk, or replace `/sepolicy` file in `boot.img`. **NOTE:** You don't need to define rules like `sepolicy-inject -s su ...` as `u:r:su:s0` is already [set permissive](https://android.googlesource.com/platform/system/sepolicy/+/android-9.0.0_r45/private/su.te#19) in policy. **`sepolicy` File Locations:** On pre-Treble Android releases, there are [two possible locations](https://android.googlesource.com/platform/external/libselinux/+/refs/tags/android-7.1.2_r33/src/android.c#56) defined for `sepolicy` file: ``` /sepolicy /data/security/current/sepolicy ``` As stated [here](https://selinuxproject.org/page/NB_SEforAndroid_1#SELinux_Policy_Files): > > The Android initialisation / reload process will first check for this file at: `/data/security/current/sepolicy`. If not present then check root directory: `/sepolicy`. > > > However `sepolicy` is loaded by `init` at very early boot process when `/data` is not mounted. As stated [here](https://hub.packtpub.com/booting-system/): > > Since only the root filesystem is mounted, it chooses `/sepolicy` at this time. The other path is for dynamic runtime reloads of policy. > > > So initially `/sepolicy` is loaded for sure. But you can put modified `sepolicy` at other locations to see if the previous policy is (or could possibly be) overwritten at some later boot stage. You might need to copy other files as well; [this post](https://forum.xda-developers.com/showpost.php?p=70470509&postcount=55) could be helpful. I never tried this. On Oreo+ a monolithic policy is loaded from `/sepolicy` if the device is not a Treble device (or if Magisk [patched](https://github.com/topjohnwu/Magisk/blob/v19.3/native/jni/init/rootfs.cpp#L51) `init` to force load `/sepolicy`). On Treble devices `/system`, `/vendor` and `/odm` are mounted by kernel before starting `init`, as configured in DTB. Here a pre-compiled split policy is loaded from `/vendor/etc/selinux/precompiled_sepolicy` if it matches with `/system`, or the policy is built from `.cil` files in `/system/etc/selinux` and `/vendor/etc/selinux` before loading. See details [here](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r45/init/selinux.cpp#24). In both situations things are far more complicated to try than simply replacing `/sepolicy` file in `boot.img`, which is not a big deal in my opinion. You can `dd` out a backup of your original `boot.img` to `/sdcard` which can be restored in a few seconds anytime. However bootloader needs to be unlocked to boot a modified `boot.img`. Please note that on devices with [system-as-root](https://source.android.com/devices/bootloader/system-as-root) (`A/B` or others) `ramdisk` is moved to `system.img`. So all files which were previously part of `boot.img` (except kernel and DTB) are now part of `system` partition. Upvotes: 3 [selected_answer]<issue_comment>username_2: I know the question was asked quite some time ago, but since I tried doing something similar recently and this post was one of the top hits on Google, I want to share my recent experience to help others. *Note that this answer will focus solely on Android 9 to 13 and Treble devices.* If we want to know how to modify the SELinux policies, I believe it is good to first understand how the policies are loaded in the first place. **SELinux in the boot process** At an early stage of the Android boot process and after mounting most of the partitions, `init` will attempt to load the SELinux policies from a monolithic sepolicy file found at either `/odm/etc/selinux/precompiled_sepolicy` or `/vendor/etc/selinux/precompiled_sepolicy`. If `init` notices that the device is updated out of sync, `init` will instead recompile the SELinux policies based on `.cil` files that can be found on several locations. You can find all the details in the comments of the [init/selinux.cpp](https://android.googlesource.com/platform/system/core/+/refs/heads/android11-release/init/selinux.cpp) source file and by looking at the implementation, but here is a summary of the exact steps taken by `init`: 1. Find the sepolicy file to use: * if `/odm/etc/selinux/precompiled_sepolicy` exists, use it as the sepolicy file to use * else, if `/vendor/etc/selinux/precompiled_sepolicy` exists, use it as the sepolicy file to use * else if neither of the above exists, stop here, recompile the policies based on the `.cil` files and load the newly compiled sepolicy file. 2. Check if device was updated out of sync: * Compare `/(odm|vendor)/etc/selinux/precompiled_sepolicy.plat_sepolicy_and_mapping.sha256` and `/system/etc/selinux/plat_sepolicy_and_mapping.sha256` * Compare `/(odm|vendor)/etc/selinux/precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256` and `/system_ext/etc/selinux/system_ext_sepolicy_and_mapping.sha256` * Compare `/(odm|vendor)/etc/selinux/precompiled_sepolicy.product_sepolicy_and_mapping.sha256` and `/product/etc/selinux/product_sepolicy_and_mapping.sha256` * (On Android 13) Compare `/(odm|vendor)/etc/selinux/precompiled_sepolicy.apex_sepolicy.sha256` and `/dev/selinux/apex_sepolicy.sha256` * if any of the above pair of files do not match, stop here, recompile the policies based on the `.cil` files and load the newly compiled sepolicy file. 3. If everything is ok, load the precompiled sepolicy file (`/odm/etc/selinux/precompiled_sepolicy` or `/vendor/etc/selinux/precompiled_sepolicy`) The compilation of the policies based on the `.cil` files is as follows: 1. Get the latest version of the policies that are compatible with the `vendor` version (`/vendor/etc/selinux/plat_sepolicy_vers.txt`, note that `init` does not look at the file in the `/odm` partition) 2. Gather the `.cil` files to compile: * `/system/etc/selinux/mapping/{vendor_version}.cil` * `/system/etc/selinux/mapping/{vendor_version}.compat.cil` * `/system_ext/etc/selinux/system_ext_sepolicy.cil` * `/system_ext/etc/selinux/mapping/{vendor_version}.cil` * `/product/etc/selinux/product_sepolicy.cil` * `/product/etc/selinux/mapping/{vendor_version}.cil` * `/vendor/etc/selinux/plat_pub_versioned.cil` * `/vendor/etc/selinux/vendor_sepolicy.cil` or if it does not exist: `/vendor/etc/selinux/nonplat_sepolicy.cil` * `/odm/etc/selinux/odm_sepolicy.cil` 3. Compile the above files with `secilc` to `/dev/sepolicy.XXXXXX` 4. Load policies from `/dev/sepolicy.XXXXXX` **Modifying SELinux policies permantently** Now that we understand how `init` loads the policies, it is easy to see how one could permanently add new policies to the system: * Directly add the policies to `/odm/etc/selinux/precompiled_sepolicy` or `/vendor/etc/selinux/precompiled_sepolicy` with `sepolicy-inject`: ``` sepolicy-inject -s su -t system_file -c file -p entrypoint -P /vendor/etc/selinux/precompiled_sepolicy -o /vendor/etc/selinux/precompiled_sepolicy ``` * Make `init` thinks the device is updated out of sync (By modifying one of the above `.sha256` files, or deleting the precompiled sepolicy files) and modify one of the above `.cil` files Note that in both cases, you will need to have a read-write access to the partition you want to modify (`/vendor`, `/odm`, and/or `/system`). These partitions are normally mounted as read-only, so you will have to either: * Remount them as read-write if you have root access (either because your device is rooted, or using `adb root` on a `userdebug` Android build) * Boot in recovery mode, mount the partitions as read-write and modify them in recovery + [This update-package template](https://github.com/username_2/android-flashable-zip) I made may interest you there If you do not want to have to remount the partitions every time you want to change the SELinux policies, you can add some SELinux rules to allow `init` to load new policies, thereby resolving the chicken and egg problem (as mentioned in [this excellent answer](https://android.stackexchange.com/questions/215010/how-to-make-selinux-injected-rules-persistent-without-unpacking-packing-boot-img/215395#215395)) you had with your `init` script. You can find which SELinux rules are needed by searching for SELinux violations (avc errors) in the device logs on startup: ``` adb logcat | grep avc ``` With this, you will be able to have an `init` script that loads new policies with `sepolicy-inject`. Upvotes: 2
2019/07/22
2,330
7,928
<issue_start>username_0: I have an Android tablet that has no SIM card and no cellular connection. Is it possible to set it up as a discoverable WiFi access point? I know when you have a cellular connection you can set up tethering and have an id and password that can be discovered by other devices. Is it possible to do this without any cellular connection? I don't actually need internet access at all. All I'm looking for is to set up a small WiFi LAN between an Android tablet and a small device running Debian Linux.<issue_comment>username_1: If you don't need internet access and just a local network, why not just use [WiFi Direct](https://en.m.wikipedia.org/wiki/Wi-Fi_Direct)? You should be able to access this through Settings > WiFi and set up an ad-hoc network between your tablet and Debian device. Upvotes: 1 <issue_comment>username_2: If you have root access and don't mind working on CLI, a shorter version of script used for [How to use Android in Wi-Fi repeater mode?](https://android.stackexchange.com/a/202336/218526) can be used to create a hotspot network provided that your WiFi interface supports AP mode: ``` #!/system/bin/sh set -e #set -x # this scripts creates a hotspot network [ "$(id -u)" = 0 ] || { echo 'Not running as root!' >&2; exit 1; } # check required binaries are on PATH for bin in iw ip iptables hostapd dnsmasq do ! which $bin >/dev/null || continue echo "$bin not found." >&2 exit 1 done #################### # define variables # #################### SSID=MyAP # set this to your desired string (avoid spaces and non-ascii characters) PASSCODE=<PASSWORD> # set this to your desired string (8 to 63 characters) WIFI_INTERFACE=wlan0 # set this according to your device (check with 'lshw' or 'ip link show') AP_INTERFACE=${WIFI_INTERFACE}-AP DIR=/data/local/tmp/$AP_INTERFACE SUBNET=192.168.43 IP=${SUBNET}.1 ########################## # start / stop tethering # ########################## STOP() ( echo 'Cleaning up...' # don't print error messages exec >/dev/null 2>&1 # hope there are no other instances of same daemons pkill -15 hostapd pkill -15 wpa_supplicant pkill -15 dnsmasq # remove RPDB rule and iptables rule ip rule del lookup main iptables -D INPUT -i $AP_INTERFACE -p udp -m udp --dport 67 -j ACCEPT # delete AP interface iw $AP_INTERFACE del rm -rf $DIR ) if [ "$1" = stop ] then STOP || true exit elif [ "$1" != start ] then echo 'Usage:' >&2 printf '\t%s\n' "$(basename "$0") start|stop" >&2 exit 1 fi ################ # basic checks # ################ if ! iw phy | grep -A10 'Supported interface modes:' | grep -q '\*[ ]*AP' then echo 'AP mode not supported.' >&2 exit 1 fi if ! iw dev $WIFI_INTERFACE link | grep -q '^Not connected' then echo 'First disconnect form Wi-Fi.' >&2 exit 1 fi ########################## # stop running instances # ########################## STOP || true ##################################### # create virtual wireless interface # ##################################### if ! iw dev $WIFI_INTERFACE interface add $AP_INTERFACE type __ap then echo "Couldn't create AP interface." >&2 exit 1 fi ##################################### # configure newly created interface # ##################################### echo 'Configuring network...' # activate the interface and add IP ip link set up dev $AP_INTERFACE ip addr add ${IP}/24 broadcast ${SUBNET}.255 dev $AP_INTERFACE # Android doesn't look up into main table by default ip rule add lookup main ####################### # access point daemon # ####################### # create configuration file mkdir -p "$DIR" cat <<-EOF >$DIR/hostapd.conf # network name ssid=$SSID # passphrase to use for protected access wpa_passphrase=$PASSCODE # network interface to listen on interface=$AP_INTERFACE # wi-fi driver driver=nl80211 # set operation mode, 'g' for 2.4GHz band hw_mode=g # WLAN frequency channel to use channel=1 # key management protocol; use pre-share key wpa_key_mgmt=WPA-PSK # enforce WPA2 wpa=2 EOF echo 'Starting hostapd...' hostapd -B $DIR/hostapd.conf ################################################ # run a dhcp server to assign IP's dynamically # ################################################ # create configuration file cat <<-EOF >$DIR/dnsmasq.conf # we dont want DNS server, only DHCP port=0 # nameservers to be sent to clients dhcp-option=6,1.1.1.1,1.0.0.1 # range of IPs to make available to wlan devices and when to renew IP dhcp-range=$IP,${SUBNET}.254,24h # where to save leases dhcp-leasefile=$DIR/dnsmasq.leases # respond to requests from a different IP broadcast subnet dhcp-authoritative # don't look for any hosts file and resolv file no-hosts no-resolv EOF # open listening port iptables -I INPUT -i $AP_INTERFACE -p udp -m udp --dport 67 -j ACCEPT echo 'Starting DHCP server...' dnsmasq -C $DIR/dnsmasq.conf ``` Now you can connect to Access Point `MyAP` using key `foobarfoobar`. `wpa_supplicant` can also be used in place of `hostapd` for simple cases like ours, but the one shipped with Android doesn't seem to work. You need to compile binary from source, or try [this one](https://www.androidfilehost.com/?fid=6006931924117931169). Configuration is even simpler: ``` ... ####################### # access point daemon # ####################### # create configuration file mkdir -p $DIR/wpa_supplicant cat <<-EOF >$DIR/wpa_supplicant.conf ctrl_interface=$DIR/wpa_supplicant network={ ssid="MyAP" psk="foobarfoobar" # force create AP network ap_scan=2 # key management protocol; use pre-share key key_mgmt=WPA-PSK # enforce WPA2 proto=RSA # set mode to AP mode=2 # channel frequency frequency=2412 } EOF echo 'Starting wpa_supplicant in AP mode...' wpa_supplicant -B -D nl80211 -i $AP_INTERFACE -c $DIR/wpa_supplicant.conf ... ``` * `hostapd`, `wpa_supplicant` and `dnsmasq` all are part of AOSP. `hostapd` is used for wireless tethering, `wpa_supplicant` for WiFi connections and `dnsmasq` as DHCP/DNS server (up to Pie). * `dnsmasq` isn't necessary if you prefer static IP configuration. * If your device doesn't contain `hostapd` binary, you can get one from some other device or compile from source, or try [this one](https://www.androidfilehost.com/?fid=6006931924117931168). * For more configuration options, see [`hostapd.conf`](https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf), [`dnsmasq.conf`](https://android.googlesource.com/platform/external/dnsmasq/+/refs/tags/android-9.0.0_r45/dnsmasq.conf.example) and [`wpa_supplicant.conf`](https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf). See WiFi channels detail [here](https://en.wikipedia.org/wiki/List_of_WLAN_channels). * Also make sure both `hostapd` (runs with UID `1010` [`AID_WIFI`](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r45/libcutils/include/private/android_filesystem_config.h#73)) and `dnsmasq` (drops to UID `9999` [`AID_NOBODY`](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r45/libcutils/include/private/android_filesystem_config.h#162)) are able to make outbound connections through firewall. * SELinux may also cause problems with this manual setup, so set `permissive` for testing purpose or define policy rules. * Since you don't intend to use internet, there is no need to configure NAT and packet forwarding. --- **PS:** In case if you have cellular connection, the only extra thing to be done is internet sharing. For extra steps see [How to create a WiFi hotspot from the terminal?](https://android.stackexchange.com/a/217896/218526) Upvotes: 2
2019/07/26
1,280
3,616
<issue_start>username_0: I installed the android-x86-8.1-r2.x86\_64.rpm package on Ubuntu 18.04 using the following commands as suggested by [Release Note 8.1-r2](https://www.android-x86.org/releases/releasenote-8-1-r2.html) but it didn't add boot entries to the grub2 menu. * sudo apt install alien * sudo alien -ci android-x86-8.1-r2.x86\_64.rpm --- > > **Question**: What are the definitions of the boot entries I need to add to the 40\_custom grub file in order to add android-x86-8.1-r2 to my grub2 boot menu? > > > --- Based on the answer below I tried adding the following menu entry to the 40\_custom grub file. I also tried changing system.img to system.sfs. --- menuentry "Android-x86 8.1-r2" --class android-x86 { insmod part\_gpt search --file --no-floppy --set=root /android-8.1-r2/system.img linux /android-8.1-r2/kernel root=/dev/ram0 androidboot.hardware=remix\_x86\_64 androidboot.selinux=permissive CMDLINE initrd /android-8.1-r2/initrd.img } --- Based on [How to Install Android in Dual Boot with Linux](https://linuxhint.com/install_android_dual_boot_linux/) I also tried adding the following menu entry to the 40\_custom grub file. --- menuentry "Android-x86 8.1-r2" { search --set=root --file /android-8.1-r2/kernel linux /android-8.1-r2/kernel quiet root=/dev/ram0 androidboot.selinux=permissive initrd /android-8.1-r2/initrd.img } --- Neither of the two menu entries above work. When I update grub it produces the following output which seems to indicate grub isn't recognizing the menu entry, and my computer continues to boot directly into Ubuntu 18.04. --- Sourcing file `/etc/default/grub' Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.18.0-25-generic Found initrd image: /boot/initrd.img-4.18.0-25-generic Found linux image: /boot/vmlinuz-4.18.0-15-generic Found initrd image: /boot/initrd.img-4.18.0-15-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin done --- My computer hard drive has a single Linux ext4 partition, and the contents of /android-8.1-r2 are as follows: --- drwxr-xr-x 2 root root 4096 Jul 21 09:40 data -rw-r--r-- 1 root root 1358699 Jun 13 02:11 initrd.img -rw-r--r-- 1 root root 7437056 Jun 13 02:11 kernel -rw-r--r-- 1 root root 1424814 Jun 13 02:11 ramdisk.img -rw-r--r-- 1 root root 877621248 Jun 13 02:11 system.sfs<issue_comment>username_1: In your case you must edit 40\_custom and write this into the file: ``` menuentry 'android' --class android-x86 { insmod part_gpt search --file --no-floppy --set=root /android-8.1-r2./system.sfs linux /android-8.1-r2./kernel root=/dev/ram0 androidboot.hardware=remix_x86_64 androidboot.selinux=permissive CMDLINE initrd /android-8.1-r2./initrd.img } ``` and then update your grub. Maybe you must change paths. Upvotes: 0 <issue_comment>username_2: I determined that grub was actually configured with an option to boot Android, but I wasn't seeing this option because grub was configured to automatically boot Ubuntu. I added the # to the beginning of the following lines in /etc/default/grub, ran "sudo update-grub", and now my computer gives me the option to boot Android. #GRUB\_TIMEOUT\_STYLE=hidden #GRUB\_TIMEOUT=0 I also determined the menu entry I added to 40\_custom wasn't necessary as it resulted in a redundant option to boot Android in the grub boot menu, so I deleted this menu entry (which I had manually added as described in my question above) from my 40\_custom file. Upvotes: 2 [selected_answer]
2019/07/31
577
2,276
<issue_start>username_0: My android phone's charging port died, so I am looking for a *semi-convenient* way to transfer files without [using any 3rd party apps](https://superuser.com/a/558301/207006). Is it possible? I already have an SMB share configured on my NAS, and a couple Windows computers. I have a WiFi network and a Bluetooth radio in my pc, but I'd much rather not use the latter as I've only seen abysmal transfer speeds from it. P.S. I can still transfer files with the microSD card, but accessing it is onerous. Fortunately, wireless charging still works on my Samsung Galaxy S8+<issue_comment>username_1: Bluetooth (Phone to PC) ======================= Enable Bluetooth (BT) on both devices, tick the checkbox on phone to make it visible (Phone BT settings), pair phone to PC (PC BT Settings, add new device). On Phone, View files in file explorer, if possible zip them, then share, *send via bluetooth* On PC, run `fsquirt`, recieve files On Phone, select your PC, and wait for the transfer to happen. *Tip: Laptops generally sit on their BT radios* *Note: Bluetooth speeds vary depending on devices - a colleague's S10 transfers faster than my J7P* Google Drive (Phone to PC via Cloud) ==================================== This involves google drive or any other cloud storage provider as a middleman. Suitable if you have a Hi-Speed internet connection Files By Google (Phone to Phone) ================================ *Note: This requires a second Android Phone, and assumes both came installed with Files (by google) - Mine did* On both phones, open Files, and go to Share Follow the steps to setup your name and send files! Upvotes: 1 <issue_comment>username_2: Phone to PC could be FTP which NEEDS third-party apps. Also, you can set up a network and turn on wifi-hotspot on PC. then access the network by entering the PC's IPV4 at chrome and accessing the HDD. you can Also use Upload and Download things like Google drive and Uploadboy. Furthermore, you can use remote control apps like Teamviewer or Anydesk. Bluetooth is not recommended because it is hardly slow and exhausting. Personally I love FTP because it is safe and fast. You can use Easyshare app to Use FTP too. But The best is to repair your charging socket ;) Upvotes: 0
2019/07/31
1,246
4,341
<issue_start>username_0: Yesterday when removing bloatware from my phone, I accidentally uninstalled an app using the adb command: ``` pm uninstall -k --user 0 ``` I suspect the culprit to be `com.sec.factory.camera`, as since that unfortunate event, the camera app crashes every time I try to launch it. I tried reinstalling it using either of these two commands ``` pm install com.sec.factory.camera pm install --user 0 com.sec.factory.camera ``` but they returned me a "can't open non-file" error message. I tried as well downloading the APK on my phone and installing it from Android, but at the end of the installation process, I got a "not installed application" message. Your help would be really appreciated to get my camera back. My phone is an unrooted Samsung s7 Edge running Oreo 8.0.<issue_comment>username_1: Technically the command `adb shell pm unistall -k --user 0` does not uninstall an app from the device. Instead it just removes it from a user. There are a couple of ways to get the removed app back to the user: one way is through an adb shell with the command: ``` adb shell cmd package install-existing ``` Or an extreme way would be through a factory reset of the device. Upvotes: 6 [selected_answer]<issue_comment>username_2: I had the same problem with my Android 6 phone. On Android 6, the `adb shell cmd ...` commands are not available. I fixed it the following way (needs root or custom recovery with full file system access): 1. Locate the APK file of the deleted package in the `/system/priv-app` folder 2. Move the APK file to a different location (e.g. `/data/app`) 3. Reboot phone 4. Move the APK file back to its original location 5. Reboot phone I hope this can help others who also don't have Android 7 or newer. Upvotes: 1 <issue_comment>username_3: My way 1. Install Solid Explorer 2. Open Settings 3. Enable Root Storage 4. Back to main 5. Open hamburger menu 6. Select root 7. Go to system 8. Go to app 9. Search your app 10. Install it Upvotes: 2 <issue_comment>username_4: I uninstalled the package "com.google.android.partnersetup" when I was going to uninstall other app. I couldn't recover it with username_1's method. Instead i found this way: ``` pm dump com.google.android.partnersetup | grep Path ``` This give us some paths. One of them is the one I'm going to use: *"**codePath=**/system/priv-app/GooglePartnerSetup"* Finally, I install the app which is in that direction. The app has the same name of the app folder, with ".apk" at the end: ``` pm install -r --user 0 /system/priv-app/GooglePartnerSetup/GooglePartnerSetup.apk ``` I hope this helps, but I don't know what exactly does this do. My source: [comment from Mac23](https://forum.xda-developers.com/t/how-to-get-install-back-uninstalled-apps-apks-with-adb.3894235/page-4#post-84291287) Upvotes: 2 <issue_comment>username_5: [username_1's answer](https://android.stackexchange.com/a/215316/44325) has worked perfectly and is the best answer for those without root access, this is what I did: Install the app again by: ``` adb shell cmd package install-existing ``` Then uninstall it by: ``` adb shell pm uninstall ``` Then install the app or its update from Google Play or from your browser. Upvotes: 1 <issue_comment>username_6: For those circumstances when `install-existing` solution is unavailable the [username_4's](https://android.stackexchange.com/a/236011/370150) method works. But I've found an easier way to look for the location of the existing APK. In ADB shell type: ``` pm list packages -f -u | grep ``` You will get the result in this format: ``` package:= ``` Example: ``` package:/system/app/Photos/Photos.apk=com.google.android.apps.photos ``` These are the useful optional parameters that `pm list packages` command accepts: ``` -f: See their associated file. -d: Filter to only show disabled packages. -e: Filter to only show enabled packages. -s: Filter to only show system packages. -3: Filter to only show third party packages. -i: See the installer for the packages. -u: Also include uninstalled packages. --user : The user space to query. ``` **Tip**: Using the above it might be a good idea to have variously filtered package lists saved for the future reference. Reference: <https://android-doc.github.io/tools/help/shell.html#pm> Upvotes: 1
2019/07/31
666
2,939
<issue_start>username_0: Whenever we want to install an application from Google Play, the application will ask permission to access to some things. The number of permissions are different from one to another application. Below is an example of application that requests permission to access. Then my question are, how that access work? Is the application will take our data for them? I.e: It ask to access images in the phone, will the application will copy and send all the images to the developer? Or, will the application copy the conversation as it has access to the microphone? And how long it will have the access one we granted and installed the application? [![Access permission's request](https://i.stack.imgur.com/DqdS8.png)](https://i.stack.imgur.com/DqdS8.png)<issue_comment>username_1: It means app requires to use those features of your mobile. For example, app may let you upload a photo from gallery, so for that it requires permission to access storage. Upvotes: -1 <issue_comment>username_2: > > Is the application will take our data for them? I.e: It ask to access images in the phone, will the application will copy and send all the images to the developer? Or, will the application copy the conversation as it has access to the microphone? > > > There is no authoritative answer to this in the absence of the source code of the software being available for review, and of course, one's ability to review the code themselves. The applications are written by actors, developer(s) technically. That actor may be benign and genuine and minding just their business, literally and figuratively, so they would mention it in their terms of use policy that to what extent and what category of data would be collected. However, a malicious actor would naturally want to have access to all the private data of yours, so their app may listen to your private conversations, use your camera, upload your photos and so on once you have granted access to the permissions it would have demanded. Some detection and preventive safeguards can be deployed, but that matter is beyond the scope of this question here. > > And how long it will have the access one we granted and installed the application? > > > Since Marshmallow, a user can revoke or grant certain dangerous permissions later in time even if they had been granted earlier, by going into Settings > Apps. The permissions stay as long as the app stays in the device. Once you uninstall an app, all granted accesses are lost, but not the data that it may have collected and uploaded somewhere else. A reinstallation is no different than a fresh installation in terms of permissions access. Upvotes: 3 [selected_answer]<issue_comment>username_3: When it requires access, it means everything. But it will not mention how the app uses it. For instance, app needs access to gallery. It can do anything possible with the photos. Send, delete, Edit... Upvotes: -1
2019/08/02
675
2,910
<issue_start>username_0: I have a Galaxy Tab A Wifi only version (SM-T580), running Android 8.1.0. It is unrooted. Every ten or fifteen minutes or so, the wifi drops out. After about 30 seconds or so, it reconnects. No other device on my network has this issue. Less frequently, the Bluetooth connection drops out, which I suspect might be an associated issue. I usually have the tablet connected to Bluetooth speakers, and every now and the sound will cut out for about twenty seconds, then return. I have searched online for solutions, and the general advice is to switch from DHCP to static, which I have done. Beyond that I can't get any more specific information. Is there any kind of test I can run to determine why this is happening?<issue_comment>username_1: It means app requires to use those features of your mobile. For example, app may let you upload a photo from gallery, so for that it requires permission to access storage. Upvotes: -1 <issue_comment>username_2: > > Is the application will take our data for them? I.e: It ask to access images in the phone, will the application will copy and send all the images to the developer? Or, will the application copy the conversation as it has access to the microphone? > > > There is no authoritative answer to this in the absence of the source code of the software being available for review, and of course, one's ability to review the code themselves. The applications are written by actors, developer(s) technically. That actor may be benign and genuine and minding just their business, literally and figuratively, so they would mention it in their terms of use policy that to what extent and what category of data would be collected. However, a malicious actor would naturally want to have access to all the private data of yours, so their app may listen to your private conversations, use your camera, upload your photos and so on once you have granted access to the permissions it would have demanded. Some detection and preventive safeguards can be deployed, but that matter is beyond the scope of this question here. > > And how long it will have the access one we granted and installed the application? > > > Since Marshmallow, a user can revoke or grant certain dangerous permissions later in time even if they had been granted earlier, by going into Settings > Apps. The permissions stay as long as the app stays in the device. Once you uninstall an app, all granted accesses are lost, but not the data that it may have collected and uploaded somewhere else. A reinstallation is no different than a fresh installation in terms of permissions access. Upvotes: 3 [selected_answer]<issue_comment>username_3: When it requires access, it means everything. But it will not mention how the app uses it. For instance, app needs access to gallery. It can do anything possible with the photos. Send, delete, Edit... Upvotes: -1
2019/08/02
605
2,651
<issue_start>username_0: With the "Google Podcasts" app, I have been downloading episodes of several podcasts that I listen to, but am months behind and the podcasts only leave a month's worth up. I thought that downloading them to my phone would keep them around even after they expired from the Podcast's stream, but apparently it doesn't, because the old, unlistened to, downloaded ones are not there. What the heck? How do I keep old episodes until I am ready to listen to them?<issue_comment>username_1: It means app requires to use those features of your mobile. For example, app may let you upload a photo from gallery, so for that it requires permission to access storage. Upvotes: -1 <issue_comment>username_2: > > Is the application will take our data for them? I.e: It ask to access images in the phone, will the application will copy and send all the images to the developer? Or, will the application copy the conversation as it has access to the microphone? > > > There is no authoritative answer to this in the absence of the source code of the software being available for review, and of course, one's ability to review the code themselves. The applications are written by actors, developer(s) technically. That actor may be benign and genuine and minding just their business, literally and figuratively, so they would mention it in their terms of use policy that to what extent and what category of data would be collected. However, a malicious actor would naturally want to have access to all the private data of yours, so their app may listen to your private conversations, use your camera, upload your photos and so on once you have granted access to the permissions it would have demanded. Some detection and preventive safeguards can be deployed, but that matter is beyond the scope of this question here. > > And how long it will have the access one we granted and installed the application? > > > Since Marshmallow, a user can revoke or grant certain dangerous permissions later in time even if they had been granted earlier, by going into Settings > Apps. The permissions stay as long as the app stays in the device. Once you uninstall an app, all granted accesses are lost, but not the data that it may have collected and uploaded somewhere else. A reinstallation is no different than a fresh installation in terms of permissions access. Upvotes: 3 [selected_answer]<issue_comment>username_3: When it requires access, it means everything. But it will not mention how the app uses it. For instance, app needs access to gallery. It can do anything possible with the photos. Send, delete, Edit... Upvotes: -1
2019/08/03
1,177
4,351
<issue_start>username_0: I want to install Python on an Android phone (the phone is connected to a Raspberry Pi so I don't have any GUI or physical access to the device). I can connect to the phone via `adb shell` and run/install packages via APK files easily. I want to install Python on the device to run `speedtest-cli` remotely via `adb shell`. <https://github.com/sivel/speedtest-cli> `speedtest-cli` requires Python. So far I have tried the following based on online articles. 1. Installed Termux app via APK. I can access the underlying files remotely. I tried to install python using `pkg` command but could not. Error below. ``` 1|:/data/data/com.termux/files/usr/bin # ./pkg install python This must NOT be run as root as it will break your environment (root will be required for nearly everything due to changed file permissions) 1|marlin:/data/data/com.termux/files/usr/bin # whoami root ``` 2. Installed Qpython on the device using adb. However, the issue is that when I launch adb command to launch Qpython, I see a prompt on the device - "Allow Qpython to access media Options - Accept or Deny". Since I don't have access to the device, I can't select either of the options. Is there a way to send a command via ADB to select - Accept? I would appreciate any other ideas as well. My end goal is to run the `speedtest-cli` utility via `adb shell` on a device that is not physically accessible.<issue_comment>username_1: Solved this eventually. Here is what I did - 1. Installed Termux via downloading the APK and performing `adb install com.termux.apk` 2. Remotely launched the Termux app via ADB (monkey) (this is needed to complete the installation on the device) `monkey -p com.termux -c android.intent.category.LAUNCHER` 3. Once Termux is installed, I installed `python` and `speedtest-cli` on the device using `adb input text` and `keyevents` - ``` adb input text "pkg install python" adb input keyevent "66" adb input text "pip install speedtest-cli" ``` 4. Then navigate to `/data/data/com.termux/files/usr/bin`. Here you should have the `speedtest-cli` script that you can invoke from `adb shell` ``` /data/data/com.termux/files/usr/bin # ./speedtest-cli Retrieving speedtest.net configuration... Testing from XXXXX Testing download speed................................................................................ Download: 20.18 Mbit/s Testing upload speed...................................................................................................... Upload: 3.98 Mbit/s ``` Upvotes: 3 [selected_answer]<issue_comment>username_2: I basically followed the solution given by [username_1](https://android.stackexchange.com/users/302363/username_1). But I had this error: > > could not find a version that satisfies the requirement speedtest-cli > (from versions: none) > > pip is configured with locations that require tls/ssl > > > [![enter image description here](https://i.stack.imgur.com/3rpOj.jpg)](https://i.stack.imgur.com/3rpOj.jpg) I solved installing `openssl` too on Termux, as follows: ``` # uninstall Termux adb uninstall com.termux sleep 2 # install the apk adb install -r ~/Desktop/Termux.apk sleep 2 # open the app adb shell monkey --pct-syskeys 0 -p com.termux 1 sleep 8 # install python adb shell input text 'pkg%sinstall%spython' sleep 2 # enter adb shell input keyevent 66 sleep 15 # yes adb shell input text 'Y' sleep 2 # enter adb shell input keyevent 66 sleep 60 # install openssl adb shell input text 'pkg%sinstall%sopenssl' sleep 2 # enter adb shell input keyevent 66 sleep 10 # yes adb shell input text 'Y' sleep 2 # enter adb shell input keyevent 66 sleep 15 # install speedtest-cli adb shell input text 'pip%sinstall%sspeedtest-cli' sleep 2 # enter adb shell input keyevent 66 sleep 30 # run speedtest-cli adb shell /data/data/com.termux/files/usr/bin/speedtest-cli # hide termux adb shell pm hide com.termux ``` You can run this script with a `sh .\this_script.sh` if you are already connected to the device with an `adb connect your_device_ip` Upvotes: 1
2019/08/09
650
2,527
<issue_start>username_0: Every once in a while my device get "stuck" - I send an SMS or Email, and they are received only after 10 minutes or later. The device can be "stuck" even when the phone is on, and running other apps. I tried installing Push Notification Fixer apps, but they do not help. When I send the test and the phone is not "stuck", I get a notification after about 10 seconds. However, I do receive notifications for Google Voice and WhatsApp when phone is in "stuck" phase, so it does seem app specific issue. Also I have noticed that these 2 apps have permission [receive data from Internet](http://androidpermissions.com/permission/com.google.android.c2dm.permission.RECEIVE) , which the Gmail app does not. Seems to be related to what type of push notification is used. see [documentation](https://developer.android.com/training/monitoring-device-state/doze-standby#using_fcm). Also I noticed the Google Play Store is unable to install/uninstall apps in this "stuck" phase.<issue_comment>username_1: Try this by order: 1. If you have any Power Safe App - turn it off 2. If you have any Power Safe Mod - turn it off and test will it works 3. Check for Wi-Fi sleep - go to Settinings >Connection > Wi-Fi > Advanced > ensure "Keep Wi-Fi on during sleep" option is set to Always 4. Check for properly syncing data in the background - Settings > Data Usage > make sure "Restrict app background data" feature is turned off 5. Try to delete Cache of app (SMS, email, gmail etc.) 6. With this app which you try set it to maximum amout of time. Upvotes: 0 <issue_comment>username_2: Here's a list of things you can try: * Make sure you haven't disabled the app by force quitting on it * Make sure power saving mode isn't on * Check Data usage to see if Background Data is enabled for the App * Turn off battery optimization from Battery Usage option for the App * Make sure that there isn't any third party overlayer that you've utilized which is utilizing the app sync permissions ( certain launchers/ addons may do so) * Clear cache for that particular App * Factory reset the Google app by selecting the Uninstall updates option * Install [this](https://play.google.com/store/apps/details?id=com.andqlimax.pushfixer.noroot&hl=en&rdid=com.andqlimax.pushfixer.noroot) app and set your heartbeat rate to 5 minutes. It's a quick fix for the issue. It's most probably a network driver issue which the company needs to patch up and in the meantime, you can use this app to ensure normal functionality Upvotes: 1
2019/08/10
1,197
4,066
<issue_start>username_0: First, I appreciate that there are lots of similar questions to this online, but they are often so specific that I haven't been able to solve this question myself (through online forums/questions/etc). I have a phone with 8GBs of internal storage, as can be seen from the first picture below. ~3GBs of this is used up by `Android OS`; ~5GBs remains, of which I am using ~4.5GBs. (This leads to issues with not being able to update, etc, due to lack of space.) [![Overview](https://i.stack.imgur.com/lgXR9m.png)](https://i.stack.imgur.com/lgXR9m.png) All reasonable so far. However, as the next picture shows, of that 4.5GBs used (separate to the 3GBs for `Android OS`), `Apps` uses ~2.1GBs and Cached data only ~33MBs. Hopefully my question is clear now: > > where is the remaining 2.4GBs? > > > [![Detailed](https://i.stack.imgur.com/5O34Qm.png)](https://i.stack.imgur.com/5O34Qm.png)<issue_comment>username_1: The remaining 2.4 gb is related to the cache section even it appears that the size is so low.. You need to use the app cleaner of Android in the Play Store to get the full information of where the data comes.. For Android like that situation, we don't have full information like statistics of apps usage.. Upvotes: 0 <issue_comment>username_2: You can examine storage usage from terminal with `du` * in your "about phone" settings, tap "build number" 7x (seven) times to unhide the hidden developer settings, then enable [USB-Debugging](http://thedroidguru.com/enable-developer-options-usb-debugging-oem-unlock-android) in developer settings * on PC download [platform\_tools](https://www.xda-developers.com/google-releases-separate-adb-and-fastboot-binary-downloads) and [busybox](https://www.busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl) binary for your phones cpu architecture (armv7l), rename file "`busybox`" and copy it to `platform_tools` folder (i realized `toybox` is buggy, `du` works best with `busybox`) * open `cmd.exe` and navigate with `cd` command to folder where `adb.exe` is. connect the phone to PC with USB cable, then type the following commands (each line for its own) ``` adb devices adb push busybox /data/local/tmp/ adb shell chmod a+x /data/local/tmp/busybox /data/local/tmp/busybox du -acxhd1 /storage/emulated/0 ``` * repeat the last command on different folder for your needs. the last digit in parameters controls the depth (see full list for usage) `du` is a command line utility for disk usage ``` CUBOT_KING_KONG:/ $ du --help BusyBox v1.29.2.YDS (2018-08-01 20:19:15 UTC) multi-call binary. Usage: du [-aHLdclsxhmk] [FILE]... Summarize disk space used for each FILE and/or directory -a Show file sizes too -L Follow all symlinks -H Follow symlinks on command line -d N Limit output to directories (and files with -a) of depth < N -c Show grand total -l Count sizes many times if hard linked -s Display only a total for each argument -x Skip directories on different filesystems -h Sizes in human readable format (e.g., 1K 243M 2G) -m Sizes in megabytes -k Sizes in kilobytes (default) ``` if you don't know your phones cpu architecture you can check the SoC from terminal ``` adb shell head /proc/cpuinfo ``` the busybox binary will remain at your phones temp folder until you delete it ``` adb shell rm /data/local/tmp/busybox ``` Upvotes: 2 <issue_comment>username_3: It's not clear what Android means by "Apps", which is 2.10 GB. Total size of an app includes its `apk` file + extra native libraries (if any) + Dalvik cache + obb files + app's data + cache. Data and cache can be on internal (`/data`) as well as shared private storage (`/sdcard/Android`). I think the missing 2.4 GB could be apps data if not included in "Apps", or it could be your personal files in `/sdcard`. For more details: [How disk space is used on Android device?](https://android.stackexchange.com/a/216132/218526) Upvotes: 1
2019/08/12
1,629
6,203
<issue_start>username_0: Sometimes I need to have my phone shut down as fast as possible. In older phones I was able to remove the battery, but after some "innovations" this feature is no longer present. Is there any better option than using casual shutdown and waiting for long seconds until it gets down? It is especially bad when I pour water on my phone and the touchscreen refuses to work. I am using Xiaomo Pocophone F1 with Android 9.0.<issue_comment>username_1: If you continue to press the power key, it will shut down without confirmation. That takes yet a few more seconds but doesn't require the touchscreen in the event you've described. p.s. Going on a tangent, I find that locking my screen and wiping it often works if a bit of water messes with the touch screen. But if it's drenched shutting it down would be better for the electronics. Upvotes: 0 <issue_comment>username_2: You can shut down your device by holding > > Volume Up + Power Button > > > simultaneously for several seconds. Upvotes: 1 <issue_comment>username_3: In fact without removing battery it's not possible to shut down a device ***completely*** in order to avoid the loss that could possibly occur due to short circuit caused by water. Let's have a brief look at what *shut down* means and what are possible options to achieve this. **HOW SHUTDOWN WORKS?** Android is based on Linux kernel which is the very first executable of operating system which is run during [boot process](https://forum.xda-developers.com/showpost.php?p=76407669&postcount=1). Kernel initializes necessary hardware and prepares a basic environment before executing `init`, the very first userspace process we can see. It's `init` which then starts and takes care of all services and processes. On shutdown, reverse of this happens. **`INIT`** When you tap `Power Off` from Power Menu, or when you issue `reboot -p` command from terminal app or `adb`, it sets Android property `sys.powerctl` to `shutdown` (with an optional reason for shutdown) which tells `init` it's time to save any unsaved work to persistent storage, stop all services and processes gracefully (or brutally), sync filesystem caches, un-mount filesystems and then hand over charge to kernel by making syscall [reboot](http://man7.org/linux/man-pages/man2/reboot.2.html) ([ref](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/init/reboot.cpp#193)). Kernel then makes sure all userspace processes are stopped including `init`, forcibly unmounts any stubborn filesystems and ultimately powers down hardware devices including CPUs and RAM. Android's `init` supports two modes: `shutdown` and `reboot`. Linux `init` has some more shutdown options including `halt` and `poweroff`. See [this answer](https://unix.stackexchange.com/a/196471/262728) for more details. **`KERNEL`** Most of the time during shut down is taken by `init`. In order to save time you can bypass `init` and ask kernel directly for a poweroff by making [syscall](https://android.googlesource.com/platform/bionic/+/refs/tags/android-9.0.0_r47/libc/bionic/reboot.cpp#35): ``` reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_POWER_OFF) ``` That's what `busybox poweroff -f` command or the [magic SysRq key](https://en.m.wikipedia.org/wiki/Magic_SysRq_key) `O` (equivalent to `Alt`-`SysRq`-`O` on a PC) would do ([ref](https://android.googlesource.com/kernel/common/+/refs/heads/android-4.19/kernel/power/poweroff.c)). Both should be preceded by `sync` to avoid damaging filesystems. From commandline we can do: ``` ~# echo 1 >/proc/sys/kernel/sysrq ~# echo s >/proc/sysrq-trigger ~# echo o >/proc/sysrq-trigger ``` This is the fastest way to shutdown OS on **rooted** device. **HARD REBOOT** But how to power down the device if even the kernel becomes non-responsive? Hardware can usually take care of this i.e. if you keep power button pressed for a fixed time interval. There's some hard-coded value (mostly 10 seconds) inside Power Management Unit (PMIC). No process will be stopped, no filesystem would be unmounted, no goodbye would be conveyed, just the power will be cut to CPU, RAM and other relevant hardware resources. Most SoCs (which have PMIC embedded inside) implement this as reboot, not shut down. --- So to summarize the above lines, there are two ways to shutdown device: through `init` or calling kernel directly. Both can be achieved through simple shell commands or can be mapped to some hardware key or special key combination. But water can make any hardware key useless, so this method can't be a universal solution. --- **POWER BUTTON** But the point is, your device isn't fully powered off whichever path you have chosen. During boot process there are things which are powered up before the OS loads (and possibly be powered up even when there is no OS on device). There must be a circuitry in PMIC (e.g. a microcontroller in low-power mode and may be some software stack too) which is always powered up so than it can listen to your request for switching on the device when you press power button for a few seconds, or even when you connect a charger to device in powered-off state. **COMMUNICATION PROCESSOR** Also the baseband processor (BP) - which runs modem and is responsible for all communication through mobile networks e.g. call, SMS and internet - is totally isolated from Application Processor (the one we call CPU) and is not governed by Android kernel; it runs an independent RTOS. And as [they say](https://mythoughtsontechnologyandjamaica.blogspot.com/2015/03/NSA-CIA-smartphone-hack-Baseband-Processor.html?m=1), government agencies may use it to track you even when you think your device is powered off. So it means it may possibly be (partially or fully or periodically) running when Android isn't running. --- If nothing else, at least battery terminals are always live, connected to some part of motherboard which may get short when got wet. So if your device isn't water resistant and the battery doesn't have some short-circuit protection built-in, you can never be dead sure your device won't get damaged when water poured on it. Upvotes: 4 [selected_answer]
2019/08/12
155
593
<issue_start>username_0: When looking on the storage option it just loads forever, and can't view the setting option. What do I do? I have a Moto E.<issue_comment>username_1: What works for me is first going to Settings > Apps & notifications, and clearing the cache for as many apps as I can. Upvotes: 3 [selected_answer]<issue_comment>username_2: I have found a solution to this problem. Just put your 'Sleep' functionality to 'After 10 minutes of inactivity' and then open storage. It will take approx 6 to 7 minutes to open. Once opened it will work fine. With Regards, Asif Upvotes: 0
2019/08/14
495
1,885
<issue_start>username_0: I have a Samsung Galaxy Tab 2 (actually, many of them) and I need to regularly push some files inside the **external physically removable** SD card of my tablets. Android handles internal and external storage as follows: ``` /storage ├ emulated/0/ /* this is the internal storage partition */ └ 9102-ABF4 /* this is the external removable SD card partition */ ``` I thought I could find this path by browsing to the folder which is not named `/emulated` inside `/storage` since the other one is the one I want. I want, using device's shell through adb, to navigate to (using command cd) a directory that I don't know the path of (`9102-ABF4` written above, located inside `/storage/`)<issue_comment>username_1: I don't believe adb shell supports tab completion. It makes reference to a directory in a command, but if you don't know the path you will need to use `adb shell ls` command to list the directory before using the path in an adb push command. For example, `adb shell ls storage/9102-ABF4` will let you explore the external SD card that is on your device. In terms of changing the working directory on your terminal, I don't believe you can do this because adb does not support interactive mode like nslookup. You are using a shell (adb shell) within a shell (bash, PowerShell, cmd, etc). Upvotes: 1 <issue_comment>username_2: If your Android is 6 or above, and if your are connected through USB cable and your Android have USB debugging enabled, and if you have installed: ``` sudo apt install adb perl ``` put in a Linux terminal: ``` adb shell sm list-volumes public | perl -lane 'print $F[-1]') ``` This will show the micro SD card identification, example: 9102-ABF4 I made several scripts to automate send and receive files from Linux to Android and from Android to Linux: <https://github.com/wachin/adb-send-files> Upvotes: 2
2019/08/14
3,413
10,621
<issue_start>username_0: I have One Plus 6T Android device which has a ROM of build type `user`. This device is rooted with Magisk and I want to disable `dm-verity` on this device. I have tried to run `adb disable-verity` but I got an error saying `verity cannot be disabled/enabled - USER build` Is there any way to disable this? Goal: Want to place customized `sepolicy` file under `system_root` directory. I have tried to do it with following commands: ``` C:\Users\GPU-Test>adb shell OnePlus6T:/ $ su OnePlus6T:/ # mount -o rw,remount /system_root OnePlus6T:/ # cp /sdcard/selinux_policy_modified /system_root/sepolicy cp: /system_root/sepolicy: Permission denied 1|OnePlus6T:/ # cp -f /sdcard/selinux_policy_modified /system_root/sepolicy cp: /system_root/sepolicy: No such file or directory 1|OnePlus6T:/ # ^C 130|OnePlus6T:/ # exit 130|OnePlus6T:/ $ exit C:\Users\GPU-Test>adb disable-verity verity cannot be disabled/enabled - USER build ``` Also tried to disable `Preserve force encryption` and `Preserve AVB 2.0/dm-verity` checkbox but still the above commands have same result. Also on reboot these check-boxes enables again automatically.<issue_comment>username_1: I'm going to give a general overview of how `dm-verity` and related things work on Android according to my limited knowledge. Situation might differ on different devices and ROMs. **HOW IS DM-VERITY ENFORCED?** `dm-verity` ([Verified Boot](https://source.android.com/security/verifiedboot/) and [AVB](https://source.android.com/security/verifiedboot/avb)) as well as `dm-crypt` ([FDE](https://source.android.com/security/encryption/full-disk)) are targets of [`device-mapper`](https://en.wikipedia.org/wiki/Device_mapper) feature of Linux kernel. `dm-verity` verifies the integrity of each block as they are read from block device; enforced by `init_first_stage` as per `fs_mgr_flags` set in fstab ([1](https://source.android.com/security/verifiedboot/dm-verity)). On [system-as-root](https://source.android.com/devices/bootloader/system-as-root) devices (`A/B` and `non-A/B`), kernel is [patched](https://source.android.com/devices/bootloader/system-as-root#setting-up-dm-verity) to force verity while mounting `/system` and `/vendor` if `verify`/`avb` flags are found in fstab device tree (dtb). `dm-crypt` decrypts/encrypts data transparently when read/written from/to block device. [FBE](https://source.android.com/security/encryption/file-based) is based on a different kernel framework `fscrypt`; but both are managed by [`vold`](http://oopsmonk.github.io/blog/2016/04/29/android-full-disk-encryption-workflow) (which runs as a native service) if `fs_mgr_flags` contain `voldmanaged`. **WHERE FSTAB IS?** `fstab` has traditionally been a file on Linux to specify filesystems to be mounted on boot. It's a core component of `fs_mgr` functionality on Android. On pre-Oreo releases `fstab` was in `ramdisk`. With Treble it was moved to `/vendor` (or `/system/vendor`) while the fstab entries for `system` and `vendor` (and `odm`) are moved to Device Tree Blob (`dtb`). Kernel exports `dtb fstab` entries in device tree directory at `/proc/device-tree/firmware/android`. Some OEMs also put `fstab` in `odm` or `nvdata` partitions. **Source:** [Android Storage Device Configuration](https://source.android.com/devices/storage/config) **WHERE DTB IS?** [Device Tree](https://www.devicetree.org/) is a data structure for describing hardware which is not discoverable to kernel. Device Tree Source (`dts`) can be converted to `dtb` (binary blob of DT) and vice versa using [`dtc`](https://git.kernel.org/pub/scm/utils/dtc/dtc.git). DTB is loaded by bootloader at boot time and passed to kernel so that it can discover hardware and create device nodes accordingly. DTB is either: * Appended to kernel `zImage` or `Image.gz` in `boot.img` ([2](https://source.android.com/devices/bootloader/partitions-images#kernel-images)). It can be split from `gzip` archive using [`split-appended-dtb (sadtb)`](https://github.com/dianlujitao/split-appended-dtb). * Or in `dtbo` partition as some OEMs do. This can be checked with: ``` ~# ls -l /dev/block/bootdevice/by-name/dtbo* ~# grep -C5 PARTNAME=dtbo /sys/dev/block/*/uevent | grep DEVNAME | sed 's/.*=//; s|^|/dev/block/&|' ``` * Or at the end of `boot.img` after 2nd stage, or in `odm` partition (rare, some OEMs do). Also if the device is `non-A/B`, `dtb` (from `boot.img` and/or `dtbo` partition) is also added to `recovery.img` in DTBO section after header, kernel, ramdisk and 2nd stage ([3](https://source.android.com/devices/bootloader/recovery-image)). However this doesn't matter for normal boot. But if the device is also `system-as-root`, Magisk needs to be installed in this recovery partition as the `boot.img` contains no `ramdisk` ([4](https://topjohnwu.github.io/Magisk/install.html#magisk-in-recovery)). In case if DTB is not appended to kernel, `dtb(s)` are converted to `dtb.img` using [`mkdtimg`](https://android.googlesource.com/platform/system/libufdt/+/refs/tags/android-9.0.0_r47/utils/README.md#mkdtimg). Same tool can dump back the image. **Source:** [Implementing DTO](https://source.android.com/devices/architecture/dto/implement) **HOW TO DISABLE DM-VERITY?** On `userdebug` ROMs, `dm-verity` can be disabled using `adb`. It modifies magic number of verity metadata block ([5](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/adb/set_verity_enable_state_service.cpp#191), [6](https://android.googlesource.com/platform/system/extras/+/refs/tags/android-9.0.0_r47/libfec/fec_private.h#54)) which is written after the last filesystem block on block device (`system` or `vendor`) ([7](https://www.kynetics.com/docs/2018/introduction-to-dm-verity-on-android/)). Quoted from [here](https://source.android.com/security/verifiedboot/dm-verity#metadata): > > the absence of this magic number will halt the verification process > > > In case of AVB, `adb` modifies `vbmeta header` to disable hashtree image verification ([8](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/adb/set_verity_enable_state_service.cpp#174), [9](https://android.googlesource.com/platform/external/avb/+/refs/tags/android-9.0.0_r47/libavb/avb_vbmeta_image.h#53)). Quoted from [here](https://android.googlesource.com/platform/external/avb/+/master/README.md#handling-dm_verity-errors): > > if the `AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED` flag is set in the top-level vbmeta, then `androidboot.veritymode` is set to **disabled** > > > On `user` builds `ro.debuggable` is `0` and `adbd` isn't running as root. Also there are other differences like that of [`ALLOW_ADBD_DISABLE_VERITY`](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/adb/Android.mk#349), so `adb` won't disable `dm-verity`. Other approach is to remove **`verify`** or **`avb`** ([10](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/fs_mgr/fs_mgr_fstab.cpp#96)) flag from `fstab`. Quoted from [here](https://source.android.com/security/verifiedboot/dm-verity#signing): > > To verify the partition... > > ... > > In the fstab for the relevant entry, add `verify` to the `fs_mgr` flags. > > > Similarly to remove encryption, `forceencrypt=`, `forcefdeorfbe=` or `fileencryption=` need to be replaced with `encryptable=`. However encryption cannot be removed without factory reset (FBE too?), so unchecking `Preserve force encryption` in Magisk app will do nothing. Some OEMs also use [`support_scfs`](https://forum.xda-developers.com/showpost.php?p=63209803&postcount=9) `fs_mgr` flag and `ro.config.dmverity=true` property on devices with `dm-verity` enabled. There are also some [exploits](https://www.xda-developers.com/exploit-qualcomm-edl-xiaomi-oneplus-nokia/) discovered in [bootloader](https://www.xda-developers.com/two-critical-oneplus-33t-bootloader-security-flaws-discovered-one-patched-and-other-being-addressed/) and [adb](https://www.xda-developers.com/oneplus-root-access-backdoor/) implementation of some OEMs which can be used to disable `dm-verity` on affected devices. However such security flaws usually get fixed over time with updates from OEMs. **OPTION 1** Set options in configuration file before installing Magisk: ``` ~# echo 'KEEPVERITY=false' >/cache/.magisk ~# echo 'KEEPFORCEENCRYPT=true' >>/cache/.magisk ``` If installed, after unchecking `Preserve AVB v2.0/dm-verity` in app, Magisk needs to be reinstalled. Quoted from [here](https://androbuggers.wordpress.com/2018/02/05/magisk-the-complete-root-manager-app/): > > in Magisk Manager, “Uninstall > Restore Images” to restore the images, check “Preserve AVB 2.0/dm-verity” box in Advanced Settings, then reinstall Magisk via the app. > > > **OPTION 2** Use some `dm-verity` disabler zips like [this](https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389). **OPTION 3** Figure out where the `fstab` entries of `/system` and `/vendor` are on your device. If in `ramdisk` (pre-Treble): * Extract `ramdisk`, modify `fstab` and repack. * Or patch `ramdisk` directly: ``` ~# magiskboot cpio ramdisk.cpio 'patch false true' ``` If in `dtb`: * If appended to kernel: + Extract `boot.img` + Split appended `dtb(s)` + Patch `dtb(s)`. + Append `dtb(s)` to kernel + Repack `boot.img` * If in `dtbo` partition or in `boot.img` after 2nd stage, patch `dtb.img` and write back to partition or `boot.img`. **How to Unpack / Repack Boot or Recovery image and Ramdisk?** Use [AIK](https://forum.xda-developers.com/showthread.php?t=2073775) or [`magiskboot`](https://topjohnwu.github.io/Magisk/tools.html#magiskboot). **How to Patch `dtb`?** Patch directly using `magiskboot` or manually convert `dtb` to `dts`, edit `dts` with any text editor to remove `dm-verity` flags, and convert `dts` back to `dtb`. **RELATED:** * [How Magisk works?](https://android.stackexchange.com/a/213344/218526) * [Android Device Partitions and Filesystems](https://forum.xda-developers.com/android/general/info-android-device-partitions-basic-t3586565) Upvotes: 5 [selected_answer]<issue_comment>username_2: You can just edit the Magisk root package to ONLY disable the dm-verity flag. It's literally just commenting out a few lines of Magisk scripts, since the functionality is inherently present in Magisk. Here's the link to such a package: [Download magisk-onlynoveritypatch.zip](https://4pda.ru/forum/index.php?showtopic=774072&st=30820#entry97055331) Boot into twrp, install from zip, and select this zip. Upvotes: 1
2019/08/15
3,262
10,155
<issue_start>username_0: I find the new Wallpaper app on Pie doesn't let you pick live wallpapers. Even [when I downloaded the APK](https://www.apkmirror.com/apk/google-inc/live-wallpaper-picker/live-wallpaper-picker-9-release/live-wallpaper-picker-9-2-android-apk-download/) and installed it, it says 'cannot install'. It's not as though 9 doesn't support them, the first time I installed a live wallpaper, I was able to click 'open' on the package installer and set it, but now since it doesn't provide an app icon I can't go back to it if I change to something else. I'm running the LineageOS 16 based [Resurrection Remix](https://www.resurrectionremix.com/) custom ROM on a OnePlus 3.<issue_comment>username_1: I'm going to give a general overview of how `dm-verity` and related things work on Android according to my limited knowledge. Situation might differ on different devices and ROMs. **HOW IS DM-VERITY ENFORCED?** `dm-verity` ([Verified Boot](https://source.android.com/security/verifiedboot/) and [AVB](https://source.android.com/security/verifiedboot/avb)) as well as `dm-crypt` ([FDE](https://source.android.com/security/encryption/full-disk)) are targets of [`device-mapper`](https://en.wikipedia.org/wiki/Device_mapper) feature of Linux kernel. `dm-verity` verifies the integrity of each block as they are read from block device; enforced by `init_first_stage` as per `fs_mgr_flags` set in fstab ([1](https://source.android.com/security/verifiedboot/dm-verity)). On [system-as-root](https://source.android.com/devices/bootloader/system-as-root) devices (`A/B` and `non-A/B`), kernel is [patched](https://source.android.com/devices/bootloader/system-as-root#setting-up-dm-verity) to force verity while mounting `/system` and `/vendor` if `verify`/`avb` flags are found in fstab device tree (dtb). `dm-crypt` decrypts/encrypts data transparently when read/written from/to block device. [FBE](https://source.android.com/security/encryption/file-based) is based on a different kernel framework `fscrypt`; but both are managed by [`vold`](http://oopsmonk.github.io/blog/2016/04/29/android-full-disk-encryption-workflow) (which runs as a native service) if `fs_mgr_flags` contain `voldmanaged`. **WHERE FSTAB IS?** `fstab` has traditionally been a file on Linux to specify filesystems to be mounted on boot. It's a core component of `fs_mgr` functionality on Android. On pre-Oreo releases `fstab` was in `ramdisk`. With Treble it was moved to `/vendor` (or `/system/vendor`) while the fstab entries for `system` and `vendor` (and `odm`) are moved to Device Tree Blob (`dtb`). Kernel exports `dtb fstab` entries in device tree directory at `/proc/device-tree/firmware/android`. Some OEMs also put `fstab` in `odm` or `nvdata` partitions. **Source:** [Android Storage Device Configuration](https://source.android.com/devices/storage/config) **WHERE DTB IS?** [Device Tree](https://www.devicetree.org/) is a data structure for describing hardware which is not discoverable to kernel. Device Tree Source (`dts`) can be converted to `dtb` (binary blob of DT) and vice versa using [`dtc`](https://git.kernel.org/pub/scm/utils/dtc/dtc.git). DTB is loaded by bootloader at boot time and passed to kernel so that it can discover hardware and create device nodes accordingly. DTB is either: * Appended to kernel `zImage` or `Image.gz` in `boot.img` ([2](https://source.android.com/devices/bootloader/partitions-images#kernel-images)). It can be split from `gzip` archive using [`split-appended-dtb (sadtb)`](https://github.com/dianlujitao/split-appended-dtb). * Or in `dtbo` partition as some OEMs do. This can be checked with: ``` ~# ls -l /dev/block/bootdevice/by-name/dtbo* ~# grep -C5 PARTNAME=dtbo /sys/dev/block/*/uevent | grep DEVNAME | sed 's/.*=//; s|^|/dev/block/&|' ``` * Or at the end of `boot.img` after 2nd stage, or in `odm` partition (rare, some OEMs do). Also if the device is `non-A/B`, `dtb` (from `boot.img` and/or `dtbo` partition) is also added to `recovery.img` in DTBO section after header, kernel, ramdisk and 2nd stage ([3](https://source.android.com/devices/bootloader/recovery-image)). However this doesn't matter for normal boot. But if the device is also `system-as-root`, Magisk needs to be installed in this recovery partition as the `boot.img` contains no `ramdisk` ([4](https://topjohnwu.github.io/Magisk/install.html#magisk-in-recovery)). In case if DTB is not appended to kernel, `dtb(s)` are converted to `dtb.img` using [`mkdtimg`](https://android.googlesource.com/platform/system/libufdt/+/refs/tags/android-9.0.0_r47/utils/README.md#mkdtimg). Same tool can dump back the image. **Source:** [Implementing DTO](https://source.android.com/devices/architecture/dto/implement) **HOW TO DISABLE DM-VERITY?** On `userdebug` ROMs, `dm-verity` can be disabled using `adb`. It modifies magic number of verity metadata block ([5](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/adb/set_verity_enable_state_service.cpp#191), [6](https://android.googlesource.com/platform/system/extras/+/refs/tags/android-9.0.0_r47/libfec/fec_private.h#54)) which is written after the last filesystem block on block device (`system` or `vendor`) ([7](https://www.kynetics.com/docs/2018/introduction-to-dm-verity-on-android/)). Quoted from [here](https://source.android.com/security/verifiedboot/dm-verity#metadata): > > the absence of this magic number will halt the verification process > > > In case of AVB, `adb` modifies `vbmeta header` to disable hashtree image verification ([8](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/adb/set_verity_enable_state_service.cpp#174), [9](https://android.googlesource.com/platform/external/avb/+/refs/tags/android-9.0.0_r47/libavb/avb_vbmeta_image.h#53)). Quoted from [here](https://android.googlesource.com/platform/external/avb/+/master/README.md#handling-dm_verity-errors): > > if the `AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED` flag is set in the top-level vbmeta, then `androidboot.veritymode` is set to **disabled** > > > On `user` builds `ro.debuggable` is `0` and `adbd` isn't running as root. Also there are other differences like that of [`ALLOW_ADBD_DISABLE_VERITY`](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/adb/Android.mk#349), so `adb` won't disable `dm-verity`. Other approach is to remove **`verify`** or **`avb`** ([10](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/fs_mgr/fs_mgr_fstab.cpp#96)) flag from `fstab`. Quoted from [here](https://source.android.com/security/verifiedboot/dm-verity#signing): > > To verify the partition... > > ... > > In the fstab for the relevant entry, add `verify` to the `fs_mgr` flags. > > > Similarly to remove encryption, `forceencrypt=`, `forcefdeorfbe=` or `fileencryption=` need to be replaced with `encryptable=`. However encryption cannot be removed without factory reset (FBE too?), so unchecking `Preserve force encryption` in Magisk app will do nothing. Some OEMs also use [`support_scfs`](https://forum.xda-developers.com/showpost.php?p=63209803&postcount=9) `fs_mgr` flag and `ro.config.dmverity=true` property on devices with `dm-verity` enabled. There are also some [exploits](https://www.xda-developers.com/exploit-qualcomm-edl-xiaomi-oneplus-nokia/) discovered in [bootloader](https://www.xda-developers.com/two-critical-oneplus-33t-bootloader-security-flaws-discovered-one-patched-and-other-being-addressed/) and [adb](https://www.xda-developers.com/oneplus-root-access-backdoor/) implementation of some OEMs which can be used to disable `dm-verity` on affected devices. However such security flaws usually get fixed over time with updates from OEMs. **OPTION 1** Set options in configuration file before installing Magisk: ``` ~# echo 'KEEPVERITY=false' >/cache/.magisk ~# echo 'KEEPFORCEENCRYPT=true' >>/cache/.magisk ``` If installed, after unchecking `Preserve AVB v2.0/dm-verity` in app, Magisk needs to be reinstalled. Quoted from [here](https://androbuggers.wordpress.com/2018/02/05/magisk-the-complete-root-manager-app/): > > in Magisk Manager, “Uninstall > Restore Images” to restore the images, check “Preserve AVB 2.0/dm-verity” box in Advanced Settings, then reinstall Magisk via the app. > > > **OPTION 2** Use some `dm-verity` disabler zips like [this](https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389). **OPTION 3** Figure out where the `fstab` entries of `/system` and `/vendor` are on your device. If in `ramdisk` (pre-Treble): * Extract `ramdisk`, modify `fstab` and repack. * Or patch `ramdisk` directly: ``` ~# magiskboot cpio ramdisk.cpio 'patch false true' ``` If in `dtb`: * If appended to kernel: + Extract `boot.img` + Split appended `dtb(s)` + Patch `dtb(s)`. + Append `dtb(s)` to kernel + Repack `boot.img` * If in `dtbo` partition or in `boot.img` after 2nd stage, patch `dtb.img` and write back to partition or `boot.img`. **How to Unpack / Repack Boot or Recovery image and Ramdisk?** Use [AIK](https://forum.xda-developers.com/showthread.php?t=2073775) or [`magiskboot`](https://topjohnwu.github.io/Magisk/tools.html#magiskboot). **How to Patch `dtb`?** Patch directly using `magiskboot` or manually convert `dtb` to `dts`, edit `dts` with any text editor to remove `dm-verity` flags, and convert `dts` back to `dtb`. **RELATED:** * [How Magisk works?](https://android.stackexchange.com/a/213344/218526) * [Android Device Partitions and Filesystems](https://forum.xda-developers.com/android/general/info-android-device-partitions-basic-t3586565) Upvotes: 5 [selected_answer]<issue_comment>username_2: You can just edit the Magisk root package to ONLY disable the dm-verity flag. It's literally just commenting out a few lines of Magisk scripts, since the functionality is inherently present in Magisk. Here's the link to such a package: [Download magisk-onlynoveritypatch.zip](https://4pda.ru/forum/index.php?showtopic=774072&st=30820#entry97055331) Boot into twrp, install from zip, and select this zip. Upvotes: 1
2019/08/15
3,128
9,733
<issue_start>username_0: Is there in Android an equivalent of the control + F search in texts and OCR PDF? In browser we have "find in page" options. But for PDF I didn't find such option. Is there shortcuts to make such search as we can make with the dashboard in PC?<issue_comment>username_1: I'm going to give a general overview of how `dm-verity` and related things work on Android according to my limited knowledge. Situation might differ on different devices and ROMs. **HOW IS DM-VERITY ENFORCED?** `dm-verity` ([Verified Boot](https://source.android.com/security/verifiedboot/) and [AVB](https://source.android.com/security/verifiedboot/avb)) as well as `dm-crypt` ([FDE](https://source.android.com/security/encryption/full-disk)) are targets of [`device-mapper`](https://en.wikipedia.org/wiki/Device_mapper) feature of Linux kernel. `dm-verity` verifies the integrity of each block as they are read from block device; enforced by `init_first_stage` as per `fs_mgr_flags` set in fstab ([1](https://source.android.com/security/verifiedboot/dm-verity)). On [system-as-root](https://source.android.com/devices/bootloader/system-as-root) devices (`A/B` and `non-A/B`), kernel is [patched](https://source.android.com/devices/bootloader/system-as-root#setting-up-dm-verity) to force verity while mounting `/system` and `/vendor` if `verify`/`avb` flags are found in fstab device tree (dtb). `dm-crypt` decrypts/encrypts data transparently when read/written from/to block device. [FBE](https://source.android.com/security/encryption/file-based) is based on a different kernel framework `fscrypt`; but both are managed by [`vold`](http://oopsmonk.github.io/blog/2016/04/29/android-full-disk-encryption-workflow) (which runs as a native service) if `fs_mgr_flags` contain `voldmanaged`. **WHERE FSTAB IS?** `fstab` has traditionally been a file on Linux to specify filesystems to be mounted on boot. It's a core component of `fs_mgr` functionality on Android. On pre-Oreo releases `fstab` was in `ramdisk`. With Treble it was moved to `/vendor` (or `/system/vendor`) while the fstab entries for `system` and `vendor` (and `odm`) are moved to Device Tree Blob (`dtb`). Kernel exports `dtb fstab` entries in device tree directory at `/proc/device-tree/firmware/android`. Some OEMs also put `fstab` in `odm` or `nvdata` partitions. **Source:** [Android Storage Device Configuration](https://source.android.com/devices/storage/config) **WHERE DTB IS?** [Device Tree](https://www.devicetree.org/) is a data structure for describing hardware which is not discoverable to kernel. Device Tree Source (`dts`) can be converted to `dtb` (binary blob of DT) and vice versa using [`dtc`](https://git.kernel.org/pub/scm/utils/dtc/dtc.git). DTB is loaded by bootloader at boot time and passed to kernel so that it can discover hardware and create device nodes accordingly. DTB is either: * Appended to kernel `zImage` or `Image.gz` in `boot.img` ([2](https://source.android.com/devices/bootloader/partitions-images#kernel-images)). It can be split from `gzip` archive using [`split-appended-dtb (sadtb)`](https://github.com/dianlujitao/split-appended-dtb). * Or in `dtbo` partition as some OEMs do. This can be checked with: ``` ~# ls -l /dev/block/bootdevice/by-name/dtbo* ~# grep -C5 PARTNAME=dtbo /sys/dev/block/*/uevent | grep DEVNAME | sed 's/.*=//; s|^|/dev/block/&|' ``` * Or at the end of `boot.img` after 2nd stage, or in `odm` partition (rare, some OEMs do). Also if the device is `non-A/B`, `dtb` (from `boot.img` and/or `dtbo` partition) is also added to `recovery.img` in DTBO section after header, kernel, ramdisk and 2nd stage ([3](https://source.android.com/devices/bootloader/recovery-image)). However this doesn't matter for normal boot. But if the device is also `system-as-root`, Magisk needs to be installed in this recovery partition as the `boot.img` contains no `ramdisk` ([4](https://topjohnwu.github.io/Magisk/install.html#magisk-in-recovery)). In case if DTB is not appended to kernel, `dtb(s)` are converted to `dtb.img` using [`mkdtimg`](https://android.googlesource.com/platform/system/libufdt/+/refs/tags/android-9.0.0_r47/utils/README.md#mkdtimg). Same tool can dump back the image. **Source:** [Implementing DTO](https://source.android.com/devices/architecture/dto/implement) **HOW TO DISABLE DM-VERITY?** On `userdebug` ROMs, `dm-verity` can be disabled using `adb`. It modifies magic number of verity metadata block ([5](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/adb/set_verity_enable_state_service.cpp#191), [6](https://android.googlesource.com/platform/system/extras/+/refs/tags/android-9.0.0_r47/libfec/fec_private.h#54)) which is written after the last filesystem block on block device (`system` or `vendor`) ([7](https://www.kynetics.com/docs/2018/introduction-to-dm-verity-on-android/)). Quoted from [here](https://source.android.com/security/verifiedboot/dm-verity#metadata): > > the absence of this magic number will halt the verification process > > > In case of AVB, `adb` modifies `vbmeta header` to disable hashtree image verification ([8](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/adb/set_verity_enable_state_service.cpp#174), [9](https://android.googlesource.com/platform/external/avb/+/refs/tags/android-9.0.0_r47/libavb/avb_vbmeta_image.h#53)). Quoted from [here](https://android.googlesource.com/platform/external/avb/+/master/README.md#handling-dm_verity-errors): > > if the `AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED` flag is set in the top-level vbmeta, then `androidboot.veritymode` is set to **disabled** > > > On `user` builds `ro.debuggable` is `0` and `adbd` isn't running as root. Also there are other differences like that of [`ALLOW_ADBD_DISABLE_VERITY`](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/adb/Android.mk#349), so `adb` won't disable `dm-verity`. Other approach is to remove **`verify`** or **`avb`** ([10](https://android.googlesource.com/platform/system/core/+/refs/tags/android-9.0.0_r47/fs_mgr/fs_mgr_fstab.cpp#96)) flag from `fstab`. Quoted from [here](https://source.android.com/security/verifiedboot/dm-verity#signing): > > To verify the partition... > > ... > > In the fstab for the relevant entry, add `verify` to the `fs_mgr` flags. > > > Similarly to remove encryption, `forceencrypt=`, `forcefdeorfbe=` or `fileencryption=` need to be replaced with `encryptable=`. However encryption cannot be removed without factory reset (FBE too?), so unchecking `Preserve force encryption` in Magisk app will do nothing. Some OEMs also use [`support_scfs`](https://forum.xda-developers.com/showpost.php?p=63209803&postcount=9) `fs_mgr` flag and `ro.config.dmverity=true` property on devices with `dm-verity` enabled. There are also some [exploits](https://www.xda-developers.com/exploit-qualcomm-edl-xiaomi-oneplus-nokia/) discovered in [bootloader](https://www.xda-developers.com/two-critical-oneplus-33t-bootloader-security-flaws-discovered-one-patched-and-other-being-addressed/) and [adb](https://www.xda-developers.com/oneplus-root-access-backdoor/) implementation of some OEMs which can be used to disable `dm-verity` on affected devices. However such security flaws usually get fixed over time with updates from OEMs. **OPTION 1** Set options in configuration file before installing Magisk: ``` ~# echo 'KEEPVERITY=false' >/cache/.magisk ~# echo 'KEEPFORCEENCRYPT=true' >>/cache/.magisk ``` If installed, after unchecking `Preserve AVB v2.0/dm-verity` in app, Magisk needs to be reinstalled. Quoted from [here](https://androbuggers.wordpress.com/2018/02/05/magisk-the-complete-root-manager-app/): > > in Magisk Manager, “Uninstall > Restore Images” to restore the images, check “Preserve AVB 2.0/dm-verity” box in Advanced Settings, then reinstall Magisk via the app. > > > **OPTION 2** Use some `dm-verity` disabler zips like [this](https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389). **OPTION 3** Figure out where the `fstab` entries of `/system` and `/vendor` are on your device. If in `ramdisk` (pre-Treble): * Extract `ramdisk`, modify `fstab` and repack. * Or patch `ramdisk` directly: ``` ~# magiskboot cpio ramdisk.cpio 'patch false true' ``` If in `dtb`: * If appended to kernel: + Extract `boot.img` + Split appended `dtb(s)` + Patch `dtb(s)`. + Append `dtb(s)` to kernel + Repack `boot.img` * If in `dtbo` partition or in `boot.img` after 2nd stage, patch `dtb.img` and write back to partition or `boot.img`. **How to Unpack / Repack Boot or Recovery image and Ramdisk?** Use [AIK](https://forum.xda-developers.com/showthread.php?t=2073775) or [`magiskboot`](https://topjohnwu.github.io/Magisk/tools.html#magiskboot). **How to Patch `dtb`?** Patch directly using `magiskboot` or manually convert `dtb` to `dts`, edit `dts` with any text editor to remove `dm-verity` flags, and convert `dts` back to `dtb`. **RELATED:** * [How Magisk works?](https://android.stackexchange.com/a/213344/218526) * [Android Device Partitions and Filesystems](https://forum.xda-developers.com/android/general/info-android-device-partitions-basic-t3586565) Upvotes: 5 [selected_answer]<issue_comment>username_2: You can just edit the Magisk root package to ONLY disable the dm-verity flag. It's literally just commenting out a few lines of Magisk scripts, since the functionality is inherently present in Magisk. Here's the link to such a package: [Download magisk-onlynoveritypatch.zip](https://4pda.ru/forum/index.php?showtopic=774072&st=30820#entry97055331) Boot into twrp, install from zip, and select this zip. Upvotes: 1
2019/08/16
2,532
6,961
<issue_start>username_0: I have OnePlus 6T device which has A/B partition system and has a ROM of user type i.e `[ro.build.type]: [user]`. This device is rooted with Magisk. I have a requirement([Want to place customized sepolicy file under system\_root directory](https://android.stackexchange.com/questions/215800/how-to-disable-dm-verity-on-android-with-user-type-rom?noredirect=1#comment276509_215800)) to modify `system.img`. I have tried different tools like: 1. [simg2img](https://www.china-devices.com/forum/index.php?threads/how-to-properly-unpack-and-repack-android-system-img-for-sp-flash-tool.18739/) : ``` OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/img-tools$ ./simg2img system.img sys.raw Invalid sparse file format at header magi Failed to read sparse file OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/img-tools$ ``` 2. [imgtools](http://newandroidbook.com/tools/imgtool.html) ``` OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/imgtool$ sudo ./imgtool system.img extract [sudo] password for OMEN: system.img is not a recognized image. Sorry OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/imgtool$ ``` 3. and more tools even on windows.. but none of them is capable of parsing my `system.img`. I have copied `system.img` directly from OnePlus6T ROM setup which installs Android 9 on this device without any issue. Any help on: 1. How to fix the system.img so it will be extracted and repacked fine? 2. Any command that can unpack/repack system.img? 3. Any working tool to accomplish this task? **Update 1**: I have run `file system.img` and I found that its ext2 image and the tools support ext4. ``` system.img: Linux rev 1.0 ext2 filesystem data, UUID=d09c08e9-628d-590e-a610-3a14de2a8db0 (extents) (large files) (huge files) ``` **Update 2**: Tried to find the magic number and have following result: ``` OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/imgtool$ xxd system.img | head 00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000010: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 00000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea/imgtool$ ``` **Update 3** Fing the image already unpacked. So to add the required file, I have mount the image as `sudo mount -o loop system.img system_mount` and then tried to copy the contents to another folder with `cp system_mount/* system/` so that I can add the required file and make new image out of it but I got following errors: ``` root@OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea# mkdir system && cp system_mount/* system/ cp: omitting directory 'system_mount/acct' cp: cannot stat 'system_mount/bin': No such file or directory cp: cannot stat 'system_mount/bt_firmware': No such file or directory cp: cannot stat 'system_mount/bugreports': No such file or directory cp: cannot stat 'system_mount/cache': No such file or directory cp: cannot stat 'system_mount/charger': No such file or directory cp: cannot stat 'system_mount/charger_log': No such file or directory cp: omitting directory 'system_mount/config' cp: omitting directory 'system_mount/d' cp: omitting directory 'system_mount/data' cp: omitting directory 'system_mount/dev' cp: cannot stat 'system_mount/dsp': No such file or directory cp: cannot stat 'system_mount/etc': No such file or directory cp: cannot stat 'system_mount/firmware': No such file or directory cp: omitting directory 'system_mount/lost+found' cp: omitting directory 'system_mount/mnt' cp: omitting directory 'system_mount/odm' cp: omitting directory 'system_mount/oem' cp: omitting directory 'system_mount/op1' cp: omitting directory 'system_mount/op2' cp: cannot stat 'system_mount/persist': No such file or directory cp: omitting directory 'system_mount/postinstall' cp: omitting directory 'system_mount/proc' cp: cannot stat 'system_mount/product': No such file or directory cp: omitting directory 'system_mount/res' cp: omitting directory 'system_mount/sbin' cp: cannot stat 'system_mount/sdcard': No such file or directory cp: omitting directory 'system_mount/storage' cp: omitting directory 'system_mount/sys' cp: omitting directory 'system_mount/system' cp: omitting directory 'system_mount/vendor' root@OMEN-by-HP-Laptop-15-dc0xxx:~/WorkArea# ```<issue_comment>username_1: Use this tool on linux, I was able to extract the image of my emulator using ext4 on vm running ubuntu. <https://github.com/qmfrederik/extfstools> Still figuring out a way to pack it back. Will update here once I am able to do it Upvotes: 0 <issue_comment>username_2: **These commands don't work always: sometimes the system\_new.img size becomes greater than system.img.ext4 and hence it doesn't flash on the device. As per my knowledge, the new image size should be equal to or less than the size of the original system image. ---- If anyone will be able to determine the new commands then please share it.** To Unpack-Modify-Pach the `system.img`, I have followed the following procedure: a) **Unpacking** * Run `file system.img` and make sure that `system.img` is Android Sparse Image. * Rename `system.img` to `system.img.ext4`. // Not required if you will use other name for raw image in below steps. * With `simg2img system.img.ext4 system.img`, you will get a raw image file named `system.img` * With `mkdir system`, create directory to mount system.img * With `sudo mount -t ext4 -o loop system.img system/` you will get all files of `system.img` in `system` folder b) **Modifying** * With `ls -l system/init.rc` note permissions: 750 * With `sudo chmod 777 system/init.rc` give write permissions * With `sudo echo "#MODIFICATION " >> system/init.rc` done some modification in `init.rc` * With `sudo chmod 750 init.rc` reset `init.rc` to the noted permissions c) **Calculate system sector size** * With `tune2fs -l system.img | grep "Block size\|Block count"` you will get block size and count * With `echo $((1553064 * 4096))` multiply both results. I got 6361350144 d) **Packing** * With `sudo make_ext4fs -s -l 6361350144 -a system system_new.img system/` you will get `system_new.img` “Android Sparse Image” that has all changes Upvotes: 3 <issue_comment>username_3: Easy and it works: ``` truncate --size=3000M system.img mke2fs -t ext4 -L system_rw system_rw.img sudo mount system_rw.img sudo cp -R --preserve=all /path_to_the_ronly_system.img_mountpoint/. /system_rw_mountpoint ``` Example for `cp`: `sudo cp -R --preserve=all /media/user/_/. /media/user/system_rw/` That's all folks. Upvotes: 0
2019/08/17
848
2,709
<issue_start>username_0: I have a p9 lite Huawei. I can boot into twrp with this command ``` adb reboot recovery ``` But without adb, I cannot enter in recovery mode. If I push `Volume Down`+`Power`, it goes into bootloader (I can see a green droid logo). If I push `Volume Up`+`Power`, it opens the EMUI recovery. How to get recovery mode with twrp?Is possible with fastboot? I have installed the twrp with ``` fastboot flash recovery twrp.img ```<issue_comment>username_1: Use this tool on linux, I was able to extract the image of my emulator using ext4 on vm running ubuntu. <https://github.com/qmfrederik/extfstools> Still figuring out a way to pack it back. Will update here once I am able to do it Upvotes: 0 <issue_comment>username_2: **These commands don't work always: sometimes the system\_new.img size becomes greater than system.img.ext4 and hence it doesn't flash on the device. As per my knowledge, the new image size should be equal to or less than the size of the original system image. ---- If anyone will be able to determine the new commands then please share it.** To Unpack-Modify-Pach the `system.img`, I have followed the following procedure: a) **Unpacking** * Run `file system.img` and make sure that `system.img` is Android Sparse Image. * Rename `system.img` to `system.img.ext4`. // Not required if you will use other name for raw image in below steps. * With `simg2img system.img.ext4 system.img`, you will get a raw image file named `system.img` * With `mkdir system`, create directory to mount system.img * With `sudo mount -t ext4 -o loop system.img system/` you will get all files of `system.img` in `system` folder b) **Modifying** * With `ls -l system/init.rc` note permissions: 750 * With `sudo chmod 777 system/init.rc` give write permissions * With `sudo echo "#MODIFICATION " >> system/init.rc` done some modification in `init.rc` * With `sudo chmod 750 init.rc` reset `init.rc` to the noted permissions c) **Calculate system sector size** * With `tune2fs -l system.img | grep "Block size\|Block count"` you will get block size and count * With `echo $((1553064 * 4096))` multiply both results. I got 6361350144 d) **Packing** * With `sudo make_ext4fs -s -l 6361350144 -a system system_new.img system/` you will get `system_new.img` “Android Sparse Image” that has all changes Upvotes: 3 <issue_comment>username_3: Easy and it works: ``` truncate --size=3000M system.img mke2fs -t ext4 -L system_rw system_rw.img sudo mount system_rw.img sudo cp -R --preserve=all /path_to_the_ronly_system.img_mountpoint/. /system_rw_mountpoint ``` Example for `cp`: `sudo cp -R --preserve=all /media/user/_/. /media/user/system_rw/` That's all folks. Upvotes: 0
2019/08/19
794
2,592
<issue_start>username_0: In the process of installing LineageOS on my OnePlus 6 A6003, I accidentally pressed "reboot to system" when there was no OS installed. How can I get back to TWRP? I've tried holding Power+Vol Down but it just boots with the oneplus logo then unlocked bootloader warning then black screen with the status LED on.<issue_comment>username_1: Use this tool on linux, I was able to extract the image of my emulator using ext4 on vm running ubuntu. <https://github.com/qmfrederik/extfstools> Still figuring out a way to pack it back. Will update here once I am able to do it Upvotes: 0 <issue_comment>username_2: **These commands don't work always: sometimes the system\_new.img size becomes greater than system.img.ext4 and hence it doesn't flash on the device. As per my knowledge, the new image size should be equal to or less than the size of the original system image. ---- If anyone will be able to determine the new commands then please share it.** To Unpack-Modify-Pach the `system.img`, I have followed the following procedure: a) **Unpacking** * Run `file system.img` and make sure that `system.img` is Android Sparse Image. * Rename `system.img` to `system.img.ext4`. // Not required if you will use other name for raw image in below steps. * With `simg2img system.img.ext4 system.img`, you will get a raw image file named `system.img` * With `mkdir system`, create directory to mount system.img * With `sudo mount -t ext4 -o loop system.img system/` you will get all files of `system.img` in `system` folder b) **Modifying** * With `ls -l system/init.rc` note permissions: 750 * With `sudo chmod 777 system/init.rc` give write permissions * With `sudo echo "#MODIFICATION " >> system/init.rc` done some modification in `init.rc` * With `sudo chmod 750 init.rc` reset `init.rc` to the noted permissions c) **Calculate system sector size** * With `tune2fs -l system.img | grep "Block size\|Block count"` you will get block size and count * With `echo $((1553064 * 4096))` multiply both results. I got 6361350144 d) **Packing** * With `sudo make_ext4fs -s -l 6361350144 -a system system_new.img system/` you will get `system_new.img` “Android Sparse Image” that has all changes Upvotes: 3 <issue_comment>username_3: Easy and it works: ``` truncate --size=3000M system.img mke2fs -t ext4 -L system_rw system_rw.img sudo mount system_rw.img sudo cp -R --preserve=all /path_to_the_ronly_system.img_mountpoint/. /system_rw_mountpoint ``` Example for `cp`: `sudo cp -R --preserve=all /media/user/_/. /media/user/system_rw/` That's all folks. Upvotes: 0
2019/08/19
439
1,489
<issue_start>username_0: I'm using a Moto G6. With the latest update to android 9, they removed the capability of using the built-in Dolby Audio equalizer for some stupid reason. I found this [Reddit post](https://www.reddit.com/r/MotoG/comments/b9ahmh/cant_turn_off_dolby_audio_on_g6_after_update_to/el4nebr?utm_source=share&utm_medium=web2x) that had a way to modify the APK to make this work. I followed all the steps. I decided to try the 20 band equalizer steps and made a backup of the previous work before starting. However, when I finally got to the ADB install DaxUI2.apk, it didn't work. I got this error: > > adb: failed to install DaxUI2.apk: Failure [INSTALL\_FAILED\_UPDATE\_INCOMPATIBLE: Package com.dolby.dax2appUI signatures do not match previously installed version; ignoring!] > > > This was saddening, but no biggie, right? Because I already had a backup. I renamed the DaxUI2 folder to DaxUI2broken, renamed my backup to DaxUI2, and I tried again, with just the first part (minus the appendix). Once I did this, though, I got the exact same error. I'd like to be able to fix this, so if anyone knows how, please tell me!<issue_comment>username_1: just uninstall the current app and then run it again. Upvotes: 2 <issue_comment>username_2: connect device to PC. Turn USB Debugging on Execute these command ``` adb shell pm list packages|grep ``` You'll get a package name for it which would look like `com.xyz.example` `adb shell pm uninstall` Upvotes: 1
2019/08/21
2,048
7,737
<issue_start>username_0: I use a VPN on my Galaxy S8+ and I am looking for a way to be able to share my ExpressVPN connection via hotspot to be able to connect devices such as Xbox One and a Smart TV. Currently cannot use a PC and my router is trash so my phone is the last resort. What can I do? What are some workarounds?<issue_comment>username_1: Android doesn't redirect hotspot traffic through VPN network as far as I have tested on Pie ROM (almost stock; custom ROMs might have different implementations or some specific settings). The reason is `VPNService API` works in Java framework of Android to redirect traffic to VPN's `tun` interface based on UIDs (and/or SOcket MARKs) of apps. While tethering works in native code; `dnsmasq` is the DNS server (up to Pie) while the rest of traffic is handled by kernel directly. Also using same internet connection or VPN for multiple devices may break terms of contract with service providers. So it's left disabled by default. A workaround is to modify routing table **but it requires root** and is a bit complex on Android. This works for me: ``` ~# ip rule add iif wlan0 lookup table 5000 ~# ip route add default dev tun0 table 5000 ~# ip rule add to 192.168.43.0/24 lookup table 5001 ~# ip route add default dev wlan0 table 5001 ``` * First command adds a rule to RPDB to send traffic coming on hotspot (WiFi) interface to table 5000. * Second command adds a route to routing table 5000 to send all traffic on `tun0` interface i.e. the one used by VPN app. * Third and fourth rules do inverse i.e. send traffic coming from VPN to tethered devices. Firewall works above routing policy. Forwarding rules and source NAT should already be set with hotspot but just to make sure: ``` ~# echo -n 1 >/proc/sys/net/ipv4/ip_forward ~# iptables -I FORWARD -o wlan0 -i tun0 -j ACCEPT ~# iptables -I FORWARD -i wlan0 -o tun0 -j ACCEPT ~# iptables -t nat -I POSTROUTING -o tun0 -j MASQUERADE ``` * First three commands instruct kernel/firewall to forward traffic in both directions in between VPN and hotspot interfaces. * Fourth command sets SNAT i.e. keeps track of hotspot traffic leaving VPN interface and coming back. Make sure interfaces names and IP address are correct as on your device. Also there is [VPN Hotspot](https://github.com/Mygod/VPNHotspot) but I haven't tried. For non-root devices there exist some Wi-Fi Direct (ad-hoc) based solutions like PdaNet which require setup on both sides. **RELATED:** [How to use Private DNS on Android Pie for tethering?](https://android.stackexchange.com/a/214690/218526) Upvotes: 2 <issue_comment>username_2: Another option would be to use a raspberry Pi as the router with one of its USB ports connected to your phone with the VPN-based internet connection. To provide the internet to other devices, the ethernet port of the Raspberry Pi can connect to a router/switch/bridge and/or also the Pi's own wifi could be used to broadcast it for wireless devices. Or a wireless access point could be added to the router attached to the Pi. Here is an answer for using a Raspberry Pi tethered to a phone to enable its mobile network to be provided as an internet connection other devices: [Answer to: 4G LTE Device [USB Tethering]--> Raspberry Pi [Ethernet]--> Router, is this possible?](https://superuser.com/a/1543551/21353) What this answer assumes is that your phone will support USB tethering and the VPN at the same time and that the VPN-based internet connection can be routed over that USB tethered connection to the USB host to which your phone is attatched. If that is possible, then I can't foresee any other blockers, assuming that the steps described in that answer are correct (I haven't yet tried them). If successful then that means you would not need to do any particular adjustments to your phone - *possible examples* of reduced hassle could be: less involved, less risk to 'bricking' the phone, less risk to banking apps stopping working due to rooting, also can use another phone without having to redo the steps on that. **Update** *(Following a [comment](https://android.stackexchange.com/questions/216033/how-to-share-vpn-connection-with-devices-on-hotspot/224371?noredirect=1#comment291329_224371) from @username_1 here, I added a [response comment](https://android.stackexchange.com/questions/216033/how-to-share-vpn-connection-with-devices-on-hotspot/224371?noredirect=1#comment291330_224371), and updated my answer with it, here):* However, if VPN is not supported at the same time as USB tethering on your phone, then the next option you could try is to run the [VPN on the Pi itself](https://www.expressvpn.com/support/vpn-setup/app-for-raspberry-pi/) Other VPN providers, such as [speedify.com also support the Raspberry Pi](https://speedify.com/blog/how-to/install-speedify-raspberry-pi/) - and [Speedify in particular can bond different network connections together should, say, the original poster want to use multiple phones etc as internet connection sources](https://speedify.com/features/). I don't work for ExpressVPN nor Speedify nor have a financial interest or affiliation with them. It's worth also noting that if you try this, then the settings in that [linked answer above](https://superuser.com/questions/1505796/4g-lte-device-usb-tethering-raspberry-pi-ethernet-router-is-this-poss/1543551#1543551) might need adjusting because they might have been written for a scenario that doesn't use a VPN. I say *might* - because they might still work - I don't know - I just want to bring your attention to it to minimise any frustration :) . With that in mind, the approach could be to get the steps working on your setup with the Raspberry Pi, without the VPN running. [Then install ExpressVPN on the Raspberry Pi](https://www.expressvpn.com/support/vpn-setup/app-for-raspberry-pi/) and see if it still works. By having tried without VPN first, you'll know that the Raspberry Pi *can* work as a router, so you have that and use that as the basis to get it working with the VPN. Maybe the VPN provider can support you, or at least they might be interested as there maybe others who want to do what you're aiming to achieve, so it saves them time supporting everyone on this as well giving them the edge on support and appealing to those who appreciate the adaptability - all good for their offering in the market. Upvotes: 1 <issue_comment>username_3: In my case I have a Samsung tab which got bricked and lost its mobile network functionality. Now I wanted to tether the vpn connection to the phone that that wifi hotspoted to me. Turns out android specialises tethered packets(I mean connections from tethered clients cant be connection tracked by the system itself or blocked by normal android firewall apps but iptables can block it) so I used this to my advantage. Turns out the solution is simple. Works on customizable vpns over tcp( for udp maybe u need to run a socks proxy server havent tried that). 1. Download any proxy server apps on playstore. 2. In my case I was using openvpn so you need a customisable openvpn client and go to the exclude routes options and enter the ip address of the phone that needs to connect to my proxy server. 3. Simply start the vpn connection and change wifi settings and add the ip an port of the proxy server and your are good to go or simply run a vpn over tcp using that proxy server on the phone you want to tether. Note: In step 2 excluding routes is for my case or simply when you want to tether to the access point but if you are the one tethering there is no need to change routes. Also In my case I was able to run a vpn on my access point with it not cutting off my connection on the client phone like a vpn over a vpn. Upvotes: 0
2019/08/22
853
3,139
<issue_start>username_0: On Android 8.1, If I go to `"Settings" > "Apps & Notifications" > "Advanced" > "Special App Access" > "Install unknown apps"`, what determines which app are in this list ? On my phone, I see : `Chrome, Drive, Files, GMail, Messanger, WhatsApp`. Yet I have a lot more apps installed and running.<issue_comment>username_1: It lists apps that have the permission to install other apps. The permission is found on the apps' manifest. For example, a file manager can install an apk, same case with a browser or Whatsapp if a contact sends an apk to you. They are labelled Unknown apps because the apps are not installed via Google Play Store, thus not trusted by Google (that does not mean that there is something wrong with the file). From @Andrew T's comment, the permission is [REQUEST\_INSTALL\_PACKAGES](https://developer.android.com/reference/android/Manifest.permission.html#REQUEST_INSTALL_PACKAGES) that: > > Allows an application to request installing packages. Apps targeting APIs greater than 25 must hold this permission in order to use Intent.ACTION\_INSTALL\_PACKAGE. > > > **Note:** API 25 is for Android 8. Upvotes: 3 [selected_answer]<issue_comment>username_2: Just to add some related details to @ReddyLutonadio's [answer](https://android.stackexchange.com/a/216086/218526), [`android.permission.REQUEST_INSTALL_PACKAGES`](https://developer.android.com/reference/android/Manifest.permission.html#REQUEST_INSTALL_PACKAGES) is the one which defines which apps would appear in the list you have mentioned, and it's [required](https://source.android.com/compatibility/8.0/android-8.0-cdd#4_application_packaging_compatibility) on Android 8+ to install apps from sources other than Google Play. But this permission alone doesn't define if the app is allowed to install unknown packages or not. It has protection level [`Signature`](https://developer.android.com/guide/topics/permissions/overview#signature_permissions): > > The system grants these app permissions at install time, but only when the app that attempts to use a permission is signed by the same certificate as the app that defines the permission. > > > It means that user apps will never be allowed this permission. The apps which are allowed in `"Settings" > "Apps & Notifications" > "Advanced" > "Special App Access" > "Install unknown apps"` are those which have AppOps operation [`OP_REQUEST_INSTALL_PACKAGES`](https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-9.0.0_r47/core/java/android/app/AppOpsManager.java#647) allowed. You can also check from `adb shell`: ``` ~$ appops query-op REQUEST_INSTALL_PACKAGES allow ``` Results must be same as in Settings. To deny any of the apps: ``` ~$ appops set org.fdroid.fdroid REQUEST_INSTALL_PACKAGES deny ``` And it will appear as `Not allowed` in Settings. Other permissions which are controlled with AppOps can be seen with `dumpsys package | grep -A100 'AppOp Permissions:' | sed '/^$/q'`. --- **RELATED:** * [How to grant an app a permission that isn't in its manifest?](https://android.stackexchange.com/a/217522/218526) Upvotes: 3
2019/08/22
4,555
12,966
<issue_start>username_0: I have critical low storage level and can't understand what takes much of it and how that's possible that the installed applications can use 7 GB? I only use a few social media clients without any games or soft like Photoshop. Also on the second screenshot it indicates that the apps are using just 1.13 GB and so I can't understand the situation. Also what is the "Other"? ![](https://i.stack.imgur.com/YFKdh.png)<issue_comment>username_1: The right screenshot seems to originate form an app named "Cleaner". Apps on Android can not access app-private data (files in the path `/app/data//`) of other apps, therefore an app can never estimate the data size correctly. I assume "App uninstall" shown in Cleaner is the pure size of all app APK files (those are visible to all apps). Therefore most of the files crate by apps are invisible to Cleaner. It can only see the files on the sdcard section. Upvotes: 1 <issue_comment>username_2: The fact that you don't use games has no bearing on the amount of storage space other apps use. You mentioned that you use social media apps. Then you should know that many (if not most) of them keep caches of files (mainly pictures, videos) you viewed to present them quickly in case you visit the same pages again. With time, the storage space they occupy grow more than many other apps. Other apps that can also use a lot of space are browsers. You should check the amount of storage used by individual apps to have better understanding of which among them use a lot of space. > > What is the "Other"? > > > It can be documents and any other files that does not fall under pictures, videos, apps, not found on the system partition. On my phone, Other is defined as: > > files downloaded from the internet or Bluetooth, Android files, and so on. > > > Upvotes: 0 <issue_comment>username_3: Android's filesystem hierarchy is a bit complex and people often find it difficult to grasp. A major reason for confusion is that Android isn't very expressive in explaining these things and it's not very clear which files Android put in which category. Another reason is that mostly devices are not rooted and users don't have access to filesystems to verify the things themselves. We can try to understand it from root. VIDEOS, PICTURES, AUDIO AND "OTHER": ------------------------------------ Android uses file extensions to decide if a file in Public [Shared / External Storage](https://developer.android.com/training/data-storage/files/external) (i.e. `/sdcard` [excluding](https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-9.0.0_r47/cmds/installd/InstalldNativeService.cpp#1819) the private directories of apps) is video, picture or audio. This [header file](https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-9.0.0_r47/cmds/installd/MatchExtensionGen.h) defines a mapping between file extensions and categories. Further details can be found in [this answer](https://android.stackexchange.com/a/210294/218526). Simply put, we can use file extensions to categorize files and calculate their size: ``` ~$ find -H /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.3g2$|\.3gp$|\.3gpp$|\.3gpp2$|\.asf$|\.asx$|\.avi$|\.dif$|\.dl$|\.dv$|\.fli$|\.lsf$|\.lsx$|\.m4v$|\.mkv$|\.mng$|\.mov$|\.movie$|\.mp4$|\.mpe$|\.mpeg$|\.mpg$|\.mxu$|\.qt$|\.ts$|\.vob$|\.webm$|\.wm$|\.wmv$|\.wmx$|\.wrf$|\.wvx$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}' ... 75696063 /sdcard/DCIM/Camera/VID_20190726_190531.mp4 97849262 /sdcard/DCIM/Camera/VID_20190721_142818.mp4 331238039 /sdcard/TIMELAPSE OF THE FUTURE_ A Journey to the End of Time (4K).mp4 1554180683 ``` So I have 1.55 GB of videos on my `/sdcard`. ``` ~$ find -H /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.art$|\.arw$|\.bmp$|\.cr2$|\.dng$|\.gif$|\.jng$|\.jpe$|\.jpeg$|\.jpg$|\.nef$|\.nrw$|\.orf$|\.pbm$|\.pcx$|\.pef$|\.pgm$|\.png$|\.pnm$|\.ppm$|\.psd$|\.ras$|\.rgb$|\.rw2$|\.srw$|\.svg$|\.svgz$|\.tif$|\.tiff$|\.wbmp$|\.webp$|\.xbm$|\.xpm$|\.xwd$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}' ... 31944 /sdcard/.recycle/1565980569828.3/2080952923/Screenshot_20190816-155104_Firefox.png 34099 /sdcard/OLD_sdcard/Download/iptables_overview.jpg 6839118 /sdcard/DCIM/Camera/PANO_20190421_132245.jpg 7726000 /sdcard/DCIM/Camera/IMG_20181123_144811.jpg 669063808 ``` And 669 MB of pictures. Combined with videos it becomes 2.22 GB. ``` ~$ find -H /sdcard/ -type f ! -path '/sdcard/Android*' | grep -iE '\.aac$|\.aif$|\.aifc$|\.aiff$|\.amr$|\.awb$|\.flac$|\.gsm$|\.m3u$|\.m4a$|\.mka$|\.mp2$|\.mp3$|\.mpega$|\.mpga$|\.oga$|\.ogg$|\.pls$|\.ra$|\.ram$|\.rm$|\.sd2$|\.snd$|\.wav$|\.wax$|\.wma$' | xargs -I {} du -b '{}' | sort -n | awk '{sum += $1} {print} END {print sum}' ... 196556 /sdcard/OLD_sdcard/Alarms/Freedom.ogg 451614 /sdcard/OLD_sdcard/CallRecordings/0507189091_190225_191938461.amr 5652322 /sdcard/.recycle/1564398739475.3/710629278/L'Orfeo(preview).mp3 186868393 ``` And 187 MB of audios. Now total space taken by files: ``` ~$ du -bs --exclude=/sdcard/Android /sdcard/ 5330784600 /sdcard/ ``` It's 5.3 GB. Subtracting video, pictures and audio, it's 2.89 GB which is the size of "Other"; shown as "Files" on my device: ![](https://i.stack.imgur.com/Ay9j2.png) --- Non-root part is over here. Next to explore the `/data` partition **you need root access**. First to make it clear, throughout the whole life of a device, a common user interacts only with one partition labeled `userdata`. But it's not very uncommon to have 50+ partitions on Android devices (details can be seen in [this thread](https://forum.xda-developers.com/android/general/info-android-device-partitions-basic-t3586565)). So here we are talking about the space usage on `userdata` partition which is mounted at `/data`. One of its sub-directory `/data/media/0` is the one we see in file explorers or at `/sdcard` or at `/storage/emulated/0`. See [What is /storage/emulated/0?](https://android.stackexchange.com/a/205494/218526) for details. TOTAL SPACE USAGE: ------------------ Now have a look at space usage reported by Android. It says 16.73 GB out of 32 GB are used. Let's analyze. ``` ~# cat /sys/block/mmcblk0/size 61071360 ~# df -B1 --output=size /data 1B-blocks 25762942976 ``` ***Note:*** Don't confuse the units. 61071360 sectors equal 31268536320 bytes, which equal 31.27 Gigabytes (GB) or 29.12 Gibibyte (GiB). Total available size of eMMC is 31.27 GB (ignoring e.g. RPMB and provisioned space etc.) and size of `/data` filesystem is 25.76 GB (See! I thought it would be 32.00 GiB). It means that 5.5 GB space was occupied when the device was shipped from the factory. It's mainly taken by the `system`, `vendor` and `cache` partitions, and a small part by other partitions. Partition table takes a few KBs but there are possibly a few MBs left free in between partitions, some space is wasted due to encryption, and so on. Following screenshot shows the complete partition table: [![](https://i.stack.imgur.com/3sezU.png)](https://i.stack.imgur.com/3sezU.png) (Click image for enlarged view) Now coming to the used space: ``` ~# df -B1 --output=used /data Used 10407436288 ~# du -b -d1 /data | sort -n ... 30932548 /data/system 89343105 /data/user_de 252376438 /data/dalvik-cache 1537995332 /data/app 1817762284 /data/data 5460784600 /data/media 9250761612 /data ``` Space usage reported by filesystem is 10.4 GB, while the apparent size of files is 9.25 GB. This difference of 1.15 GB could be variable and is used by the filesystem. Details can be found in [this answer](https://unix.stackexchange.com/a/120312/262728). May be a part of it is being used by `f2fs` log structure on my device. So total used space on device is 15.9 GB (5.5 and 10.4) out of 31.27 GB. Note the difference with the values in screenshot. The difference in total size could be because of [rounding-off](https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-9.0.0_r47/core/java/android/os/FileUtils.java#1036) the [sum](https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-9.0.0_r47/core/java/android/os/storage/StorageManager.java#1127) of `/data` and `/system` to the nearest power of 2. APPS SPACE USAGE: ----------------- 5.3 GB out of 9.25 GB is used by the public files in `/sdcard` as explained in the start. Rest of the 3.95 GB space is mainly taken by three categories of files. Keeping things simple, following are the major directories which sum up to total app size ([1](https://android.googlesource.com/platform/packages/apps/Settings/+/refs/tags/android-9.0.0_r47/src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java#102), [2](https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-9.0.0_r47/packages/SettingsLib/src/com/android/settingslib/applications/StorageStatsSource.java#54), [3](https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-9.0.0_r47/services/usage/java/com/android/server/usage/StorageStatsService.java#289), [4](https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-9.0.0_r47/cmds/installd/InstalldNativeService.cpp#1431)): ``` App size /data/app/\* /data/dalvik-cache// /storage/emulated//Android/obb/ /data/misc/profiles/ref/ Cache /data/user///\*cache /data/user\_de///\*cache /storage/emulated//Android/data//\*cache User data /data/user// /data/user\_de// /storage/emulated//Android/data/ /storage/emulated//Android/media/ /data/misc/profiles/cur// ``` * User data size should exclude Cache size. * For user apps compiled binary files are stored in installation directory (`/data/app//oat/`) since Lollipop. But for system apps those are saved to `/data/dalvik-cache` which is counted for apps size. Actual `.apk` files of system apps are [not counted](https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-9.0.0_r47/services/usage/java/com/android/server/usage/StorageStatsService.java#281), except if an app is updated. `.odex` files for Android's framework apps (`.apk`/`.jar`) however might be already stored in `/system/framework/` having only symlinks in `/data/dalvik-cache/`. Things have [changed](https://source.android.com/devices/tech/ota/ab/ab_faqs#how-did-you-halve-the-size-of-the-system-partition-without-squashfs) with A/B implementation. * For more details see [Where Android apps store data?](https://android.stackexchange.com/a/218507/218526) Taking sum of all these directories: ``` ~# du -sb /data/app /data/misc/profiles/ /data/dalvik-cache/ /storage/emulated/*/Android/ /data/user/*/ /data/user_de/ | sort -n | awk '{sum += $1} {printf "%-15s%s\n",$1,$2} END {print sum}' 94152 /storage/emulated/11/Android/ 611998 /data/misc/profiles/cur/10/ 837897 /storage/emulated/10/Android/ 1013850 /data/misc/profiles/cur/0/ 1109311 /storage/emulated/0/Android/ 1602419 /data/misc/profiles/ref/ 3294944 /data/user_de/10/ 10283019 /data/user/10/ 86048161 /data/user_de/0/ 252376438 /data/dalvik-cache/ 1537995332 /data/app 1817762284 /data/user/0/ 3713029805 ``` It's 3.7 GB, leaving only 250 MB behind, some of which is taken by the `/sdcard` of other two user profiles (`/data/media/`). The rest is used by system logs and configuration files, particularly in `/data/system*` and `/data/misc*` directories. This system usage is shown as "System" which excludes shared storage size ([5](https://android.googlesource.com/platform/packages/apps/Settings/+/refs/tags/android-9.0.0_r47/src/com/android/settings/deviceinfo/PrivateVolumeSettings.java#159), [6](https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-9.0.0_r47/services/core/java/com/android/server/storage/FileCollector.java#213)). Some figures differ from Android but after all we know how the space is actually used, and where it's being wasted. --- **RELATED:** * [Android's Storage Journey](https://android.stackexchange.com/a/218469/218526) Upvotes: 4 <issue_comment>username_4: As far as I understood the apps take so much space because of cache files, additional data, backups, photos, videos and etc. Size that shown in App Cleaner is just about the size of .apk files without any other related data and files to those apps. It is all cleanable but could cause the loss of the information and unpredicted behavior of an app. > > Originally question was made because I was looking for methods to free > up some space on my device so here is another way that I found: > > > **After clearing Download Manager's data my disk space on the phone got relief of 3.3GB.** And the interesting thing is that the apps and phone behavior is not affected after this, so much space were used in vain. Upvotes: 3 [selected_answer]
2019/08/23
1,181
3,509
<issue_start>username_0: A very bad situation I want to install the Lineage 16 OS on Nexus 5 Without apps it install Ok With google apps(I select pico package arm, wich is under 100 MB) not and give error system partition space not sufficient. This is the actual situation ``` Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 949772 28 949744 0% /dev tmpfs 949772 44 949728 0% /tmp /dev/block/mmcblk0p28 28061148 643132 27418016 2% /data /dev/block/mmcblk0p28 28061148 643132 27418016 2% /sdcard /dev/block/mmcblk0p27 706392 13084 693308 2% /cache /dev/block/mmcblk0p25 1045804 899652 146152 86% /system ``` I have tried a parted binary for resize but said ext4 is not supported! And with fdisk allow me to delete only the gpt partition(!) number 1 How to resize the partition n25 /dev/block/mmcblk0p25? My idea is to decrease sdcard of 2GB and increase system with 2GB is possible?<issue_comment>username_1: I have followed this method: shrink data and recreate system partition; which is not too "kind" but works. **Warning**: this method is ok for a fresh installation from scratch. You will lose all data, so follow it only if you're sure of what you're doing. I'm not responsible for data lost, bricked devices, etc. **You have been warned**. You must have TWRP installed, a USB connected smartphone and ADB, fastboot on PC: 1. Get `parted` and `gdisk` from [here](https://forum.xda-developers.com/android/help/how-to-boot-sd-card-qmobile-z8-bricked-t3712171) 2. Reboot in recovery mode ``` adb reboot recovery ``` 3. Push `gdisk` and `parted` ``` adb push parted / adb push gdisk / ``` 4. With `parted`, resize the data partition. In my case, it is 28 and we resize from 30G to 27G ``` adb shell umount /data parted /dev/block/mmc0blk0 resizepart 28 27G ``` 5. Now exit from `parted` and open `gdisk` ``` umount /system gdisk /dev/block/mmc0blk0 d #delete, select the system partition, in my case is 25 n #new,I select the new size of 3G for my system partition and 0700 as fsid w #write ``` 6. Now, reopen with `parted` and rename the partition `25` as `system` 7. Reboot in recovery mode from TWRP or ADB ``` adb reboot recovery ``` 8. The command ``` fdisk -l /dev/block/mmc0blk0 ``` must report correct sizes 9. Now, create the `ext4fs` ``` make_ext4fs /dev/block/mmc0blk0p25 ``` 10. Resize the `fs` ``` umount /system||echo ok e2fsck -f /dev/block/mmcblk0p25 resize2fs /dev/block/mmcblk0p25 ``` 11. Eventually, correct the `/etc/fstab`. The command `mount /system` must complete successfully. With TWRP, try to wipe the partitions `data`, `system`, etc. The command must complete successfully. 12. Install Android ROM or recover from a backup. --- I see my Lineage OS image resize automatically the partition to 1G (sic!) so I'm trying this workaround: 1. Install Lineage OS 2. Reboot and wait for Android OS 3. Reboot in TWRP 4. Resize the partition 5. Install the other zips Upvotes: 4 [selected_answer]<issue_comment>username_2: Another workaround to LOS resizing of the System partition during the install process: 1. resize the System partition (as described above, I shrinked the `cache` partition instead) 2. install LOS via ADB sideload 3. run `resize2fs /dev/block/mmcblk0p25` to resize the EXT4 partition again 4. install the GApps via sideload Upvotes: 2
2019/08/24
461
1,546
<issue_start>username_0: I am running the latest LineageOS 16.0, and have specified `SD Card` as my photo storage location for the built-in Camera app. When I was using LineageOS 15.1, the app saved photos on my SD card's "DCIM" directory, but in 16.0, the app now saves photos in "Android/data/org.lineageos.snap/files/" (also on my SD card). Is there a way to change the path back to "DCIM"? Thank you!<issue_comment>username_1: As of right now it is not possible for you to change the path. Android Pie does not allow apps to write/read SD Card public area and only allows apps to access the application private area. That being said inside of Lineage OS Gitlab Repository there are several discussions to fix this problem. Maybe it will be fixed in the future with an update of Lineage or the integrated camera App. Upvotes: 3 [selected_answer]<issue_comment>username_2: Know this was a couple of months ago, and you may have found the solution. But I came across this very problem and the above info is mostly correct, you need **Open Camera**; From <https://gitlab.com/LineageOS/issues/android/issues/268> > > I don't know why Snap can't do it but in Open Camera > Settings > More > Camera Controls > toggle on **Use Storage Access Framework** then navigate > to /storage/Micro SD card id/DCIM/Camera & Save Location. > > > That works on S5 G900M LineageOS 16.0 klte build 2019-04-02 + Open > GApps Pico + LineageOS Addonsu. > > > Works on my Samsung Galaxy Note 4 running LineageOS 16.0-20191129-UNOFFICIAL-trlte Upvotes: 2
2019/08/25
200
784
<issue_start>username_0: I seen something strange option in my Google calendar app in my realme mobile. There is account with name "NOBODY@LOCAL<EMAIL>" and with the check box option "nobody@localhost" I didn't seen before in my past mobile Any solution appreciated?<issue_comment>username_1: This mostly appears in Oppo/Realme phones or maybe all phones from China. Anyway,to remove it,install on your phone iCal from Google Play Store. Open the app, use it to look at the calendars on your phones, choose nobody@localhost and delete it using iCal. Job done. Hope this helped. Upvotes: 2 [selected_answer]<issue_comment>username_2: I couldn't find iCal in the play store, but you can also use CalendarSync trial to remove the nobody@localhost calendar from your device. Upvotes: 0
2019/08/25
539
2,341
<issue_start>username_0: Someone told me there's a way to disable all notifications from WhatsApp except for messages from specific people. How can I do this? (I own a Pixel 3)<issue_comment>username_1: The only way to achieve it is the following: 1. Open WhatsApp 2. On the main screen, long-press to select a contact 3. After the first contact is selected, tap on all the contacts you don't want to receive notifications from. You will have to select the contacts one by one because there is no "Select all contacts" button (if there are hundreds or thousands, then good luck selecting them) 4. Press the muted speaker icon. A pop-up will appear asking for how long the contacts should be muted. Select the time (don't enable "Show notifications" just in case). The selected contacts will be muted, their notifications won't be shown except only those that were not selected. Note that if a muted contact calls, you will still receive the notification. Upvotes: 3 [selected_answer]<issue_comment>username_2: Unfortunately, this is not possible. The basic M.O. of any "social media" including WhatsApp is that you are not supposed to be free to choose when and with whom you want to communicate even if you get the illusion of that. Upvotes: -1 <issue_comment>username_3: If you want to disable notifications for specific group except from specific people: 1. Navigate to a group or person. 2. Select group/person by long-press. 3. Press three dots menu. 4. Press *Group info* (if you have selected group) or *View contact* (if you have selected person). 5. Press *Custom notifications*. 6. Tick the *Use custom notifications* checkbox and start customising the notifications for this specific group/person. You should set *None* sound for *Notification tone* for the group to effectively disable notifications for the group and then you should set custom sound for all persons in the group whom you want to receive notifications for. Upvotes: 1 <issue_comment>username_4: One workaround only to not hear sounds from all contacts except from a specific contact is to set the notification tone as "None" in whatsapp notification settings. Now go to the specific contact on whatsapp and change their notification sound from default (none) to a required sound. This will not stop showing notifications on your display though. Upvotes: 2
2019/08/26
352
1,373
<issue_start>username_0: I use OpenVPN Connect. When VPN connection is active Google Play can show pages, pictures, video, but does not download the application: "pending...". To begin download I need to disable VPN, then it works. Tell me how to research a problem and make GPlay work over VPN?<issue_comment>username_1: "Since VPNs basically spoof your location, it may lead Google Play Store to think you aren’t in the country where you should be according to your device, and it can pause your downloads. If that’s the case, there really isn’t much you need to do to fix the issue. All you need to do is disable the VPN app on your phone and you should be good to go." [Source](https://helpdeskgeek.com/help-desk/how-to-resolve-the-play-store-download-pending-issue/) It is my experience that google play store DOES block your downloads if you are using VPN. (in my case openvpn) What you can do: 1. disconnect your VPN (you do not need to disable your app, only disconnect while you are downloading) 2. turn off mobile data (even if you are connected currently via WIFI, this can help too) Upvotes: 0 <issue_comment>username_2: After all, I found [Aurora Store](https://f-droid.org/en/packages/com.aurora.store/). It is like Google's Play Store, but has some cool features like anonymous apk download, sharing, version selection, etc. Upvotes: -1 [selected_answer]
2019/08/28
488
1,671
<issue_start>username_0: I'm running Android Pie on a rooted OnePlus 6, and I wanted to know how I can enable OTG with a shell command. I need this in order to automate some tasks. There is a setting that can toggle OTG, found in `settings > system > OTG storage`, so I figured something like this would work: ``` settings put global otg_enabled 1 ``` However I'm unsure what the setting for OTG is actually called; I tried a bunch of possibilities but none seemed to work. Also tried googling it, but found nothing. Anyone able to help me out here?<issue_comment>username_1: Note: the solution is tested on a rooted OnePlus 6 running OxygenOS (**Android 8, 9, 10**). --- The command I use is: ``` adb shell su -c 'setprop persist.sys.oem.otg_support true' ``` Some folks on some forums suggested to toggle the value for the global settings key `oneplus_otg_auto_disable`, but it never worked out for me. My solution survives reboot and OTG would work even when decryption password is not supplied. I automate the solution for fail-safe scenario (in case something disable the OTG) using [Tasker](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) app. My task is: Code → Run Shell: * `setprop persist.sys.oem.otg_support true` * enable *Use Root* I then assign the task to a boot event profile so that the task runs during startup. Upvotes: 3 [selected_answer]<issue_comment>username_2: This works for me : turn ON: ``` echo 1 > /sys/class/power_supply/usb/otg_switch ``` turn OFF: ``` echo 0 > /sys/class/power_supply/usb/otg_switch ``` This doesn't change the toggle button's state on OTG setting page though. Upvotes: 1
2019/08/29
95
313
<issue_start>username_0: I have a Nokia 6.1 that has some ringtones that aren't in the system/media/audio directory. Any idea where they'd be?<issue_comment>username_1: They are in system/media\_cust/audio Upvotes: 2 [selected_answer]<issue_comment>username_2: On Nokia 5.4 /system/product/media/audio Upvotes: 0
2019/08/17
198
838
<issue_start>username_0: I'm having the hardest time finding the name of Android's equivalent of the Unified Extensible Firmware Interface (UEFI). Maybe they are specific to each manufacturer? I am specifically looking for the one used with Samsung Galaxy phones. Is there an open source specification for interfacing with Android phone hardware, similar to how UEFI and BIOS work? The closest thing I have found is **[Replicant OS](https://replicant.us/)**. The description says "Replicant is a fully free Android distribution running on several devices". If it can run on many devices, would that mean it's using the same firmware 'interface' across many devices?<issue_comment>username_1: They are in system/media\_cust/audio Upvotes: 2 [selected_answer]<issue_comment>username_2: On Nokia 5.4 /system/product/media/audio Upvotes: 0
2019/08/30
276
1,187
<issue_start>username_0: My smartphone still works as a mobile phone. I would like to exploit it at its full potential but many applications don't support its "old" operating system `Gingerbread 2.3.6`. I do not want to buy a new phone because it works well. However, I would like to develop apps for my personal use on this phone but Google does not support Gingerbread since 2017. Can developers build applications for unsupported Android versions? **Note:** the question is also about programmed software obsolescence. Currently, we cannot make libre software distributions on all devices. Android is an *open source* operating system so there may be possibilities to maintain smartphones despite proprietary locks (hardware and software). The question allows you to see *what can be done* for a working device: why a working Android device is become unusable? From my point of view, the device is still usable if someone maintains a functional development environment which allows to develop new applications.<issue_comment>username_1: They are in system/media\_cust/audio Upvotes: 2 [selected_answer]<issue_comment>username_2: On Nokia 5.4 /system/product/media/audio Upvotes: 0
2019/08/30
276
1,088
<issue_start>username_0: New Moto G7 running Android Pie 9.0 Everything else works fine. The issue I'm having is with the Low Battery Warning sounds and notifications. Simply put, I want the most annoying low battery indicator in the world and it's just not doing that. All I get is the little red battery in the corner. And that's if I'm not watching videos or playing games. Otherwise, it just silently lets me use up the battery and then shuts down. I've already tried: * Exhaustively scouring the internet for any answers * Turning up the volume * Plugging and unplugging the charger * Enabling charging sounds * Checking all the boxes and radio buttons in App info/System UI * Turning the phone off and on again * Restarting the phone * Clearing the cache * Looking everywhere for more answers * Posting my issue on the Motorola Community website * Factory resetting the phone (a last resort that did not work)<issue_comment>username_1: They are in system/media\_cust/audio Upvotes: 2 [selected_answer]<issue_comment>username_2: On Nokia 5.4 /system/product/media/audio Upvotes: 0
2019/08/31
687
2,856
<issue_start>username_0: Due to unfortunate circumstances I need to use my old phone again (Huawei P8 Lite 2017 Emui 5.0.1). I did a factory reset a few days ago, and am now trying to install my most important apps. Unfortunately I keep running into space constraints. It seems there is a **2.4GB** file downloaded for a system update, but even before installing any apps my phone did not have enough free space to execute it. I am willing to accept being stuck on a lower version till I switch my phone, but I need to remove the huge file as the 2.4GB is blocking me from installing critical apps. I have already blocked new updates from being downloaded automatically, but am now stuck with the one that is already there. So hence my question: How can I remove the downloaded system update from my Huawei phone? =================================================================== What I tried so far: - Install a file browser and look for an OTA dir, I don't seem to have access to that - Go to the update and storage cleaning apps, but I did not see any way to clear this download I imagine I could do a factory reset and block automatic downloads before connecting to wifi, but as I just installed and configured 80% of my apps, I really don't want to do that.<issue_comment>username_1: I found that the update was actually not (fully?) downloaded on my phone yet. Perhaps this contributes to not finding a way to delete it, though I doubt that. The way you can validate this is by turning on the airplane mode and going to the upgrade. If you are in my situation, you should get an error message about downloading. --- This still leaves the mystery of why my 16GB phone with 6GB firmware and 1~2GB apps, content, cache etc. Complains about being 90% full, but that may be a separate question. Upvotes: 1 <issue_comment>username_2: Go to settings > apps and Clear Data for the Software Update app. Seems to work as the app takes up 3GB with an update downloaded. Upvotes: 2 <issue_comment>username_3: It happened the same to me in a Huawei Honor view 20. I managed do delete the file. What happens is that the system creates a ghost file to lock the required space for the update (in my case it was 4.27gb) before the update is actually downloaded. As a previous comment says, I went to settings > apps and Clear Data for the Software Update app, but the 4.27gb were still being used even after confirming the delete option there. What I did was disabling the auto download for system updates over wifi and actually accepting the download and installation in system > software update. When the download just starts, pause it. In this way the size of the update file will be actual downloaded size, which was interrupted and it's not going to be resumed. In my case I passed from a 4.27gb file to a 71mb file. Upvotes: 3 [selected_answer]
2019/08/31
802
2,654
<issue_start>username_0: Is there any way to switch Chrome profiles while using the Chrome mobile phone app?<issue_comment>username_1: There is no way to change Chrome profiles on Android/iOS as per Google Chrome Help [here](https://support.google.com/chrome/answer/2364824?co=GENIE.Platform%3DAndroid&hl=en-GB&oco=0). **But**, you can use apps like *Parallel Space* to have multiple chrome profiles. Upvotes: 4 [selected_answer]<issue_comment>username_2: There is supposed to be: If you open Chrome on Android, Menu, Settings, and select your account. But this just takes you on an endless loop. I wish changing your user on the phone settings would also change all your apps to log in as that user. Upvotes: 0 <issue_comment>username_3: I figured out how to do it. Go to settings on your android phone, Then select Chrome and "Clear All Data". When you switch on Chrome again, you can find an option to select a Primary account. Then you can select the account you want. Upvotes: 3 <issue_comment>username_4: Ugh. The closest I got was removing the account I didn't currently want to use, but then it took some finagling to get the account I wanted to use working properly. Very frustrating. Upvotes: 0 <issue_comment>username_5: I ran into this problem. I was able to solve it by downloading the Chrome Beta app from the Play store. You can then sign into one account via the beta app, and leave the other signed into the regular Chrome instance. Upvotes: 2 <issue_comment>username_6: To supplement [Amrita's answer](https://android.stackexchange.com/a/236675/44325), you do: 1. Open Android phone settings. 2. Go to **Apps**. ![Step 2](https://i.stack.imgur.com/fnQWA.jpg) 3. Find and select **Chrome** to open *App info*. ![Step 3](https://i.stack.imgur.com/zz7AD.jpg) 4. Click on **Storage** to view *storage details*. ![Step 4](https://i.stack.imgur.com/hSOFA.jpg) 5. Click on **Manage Storage** to manage the storage. ![Step 5](https://i.stack.imgur.com/Dw3da.jpg) 6. Click on **Clear all data** to wipe account details from the browser. ![Step 6](https://i.stack.imgur.com/kRxjw.jpg) 7. Relaunch Chrome, Accept & Continue. ![Step 7](https://i.stack.imgur.com/eRMDv.jpg) 8. Select desired account from the drop-down and click **Yes, I'm in**. ![Step 8 - 1](https://i.stack.imgur.com/YbGal.jpg) ![Step 8 - 2](https://i.stack.imgur.com/mUDuA.jpg) ![Step 8 - 3](https://i.stack.imgur.com/0WJRf.jpg) Upvotes: 0 <issue_comment>username_7: The only option for the time of writing this answer is to install addtional Chrome app from the above list: Chrome Stable, Beta, Dev, and Canary and login with a different google account Upvotes: 3
2019/08/31
565
2,015
<issue_start>username_0: I rooted on my S8+. I used the app root checker to check that it's rooted. I was attempting to block ads by hosts files with this [tutorial](https://www.howtogeek.com/140576/how-to-edit-the-hosts-file-on-android-and-block-web-sites/) I attempted to copy the hosts file to my pc, changed it, and pushed it back... got: ``` adb: error: failed to copy 'hosts' to '/system/etc/hosts': remote couldn't create file: Read-only file system hosts: 0 files pushed. 62.2 MB/s (456580 bytes in 0.007s) ``` I then attempted to do it by following this [tutorial](https://www.modmy.com/how-modify-hosts-file-your-android-device) which uses apps to change the files I did change the host file permissions to -rw-rw-rw- Then I tried to use the editor to add some DNS but I was unable to save the hosts files once again. When I tried to save it, I got a Toast saying root permissions were given to the text editor. Any ideas?<issue_comment>username_1: So I finally was able to come back to this issue. I was unable to mount the adb with write permissions either because i was not su or it would deny me to change the host files... I tried to write the text on the hosts file but it was a file with hundreds of lines... even seemed that android was not able to store it in the "copy/paste" So in the end I used Solid explorer 2 from play store. I wrote a hosts file... then i navigate to the /system/etc/ and I rename hosts to "hosts.old" and my "hosts.txt" to "hosts" until now it seems to be working fine I'm not considering this an answer because I was unable to write on hosts and someone can come up with a better solution Upvotes: 1 <issue_comment>username_2: i try to find some solution about this. but i found it my self. i go to recovery mode.at twrp you go setting. and (i forgot) try to find something that will give you checkbox list. and tick check box that called 'system'. niw i can easily replace my hosts file edit: sorry not setting.go to mount and tick system box Upvotes: 0
2019/09/04
368
1,394
<issue_start>username_0: How can I hide the message content in this "drop down menu -- I don't know what's its name". It is hidden when the phone is locked I want to hide it when the phone is unlocked as well. [![enter image description here](https://i.stack.imgur.com/cfzGp.jpg)](https://i.stack.imgur.com/cfzGp.jpg)<issue_comment>username_1: So I finally was able to come back to this issue. I was unable to mount the adb with write permissions either because i was not su or it would deny me to change the host files... I tried to write the text on the hosts file but it was a file with hundreds of lines... even seemed that android was not able to store it in the "copy/paste" So in the end I used Solid explorer 2 from play store. I wrote a hosts file... then i navigate to the /system/etc/ and I rename hosts to "hosts.old" and my "hosts.txt" to "hosts" until now it seems to be working fine I'm not considering this an answer because I was unable to write on hosts and someone can come up with a better solution Upvotes: 1 <issue_comment>username_2: i try to find some solution about this. but i found it my self. i go to recovery mode.at twrp you go setting. and (i forgot) try to find something that will give you checkbox list. and tick check box that called 'system'. niw i can easily replace my hosts file edit: sorry not setting.go to mount and tick system box Upvotes: 0
2019/09/05
823
2,665
<issue_start>username_0: On my Samsung S10e device I often get these notifications: > > Device care - Activate Anti-malware service > > > and > > Battery fully charged > > > When I try to turn one of them off, I am told: > > These notifications can't be turned off > > > Which raises the question: On my [rooted](https://android.stackexchange.com/a/215605/501) device, *how* can I turn them off? Solutions that only work for one of these notifications are OK.<issue_comment>username_1: Apparently I can't post comments yet, so here's my thoughts in an answer. Try searching for the package name of the app that's showing the notifications. [A quick Google search](https://www.google.com/search?gl=us&hl=en&ei=kQgTXr7TB4mCyAObmJPADg&q=these%20notifications%20can%27t%20be%20turned%20off%20root&oq=these%20notifications%20can%27t%20be%20turned%20off%20root&gs_l=psy-ab.3...15243.15585..15760...0.3..0.101.331.3j1......0....1..gws-wiz.......0i71j33i160.lZuNsztMJLk&ved=0ahUKEwj-3-Hr3u7mAhUJAXIKHRvMBOgQ4dUDCAo&uact=5) finds [this](https://play.google.com/store/apps/details?id=com.aboutmycode.NotificationsOff&hl=en_US) app which seems to do what you're looking for. Hope I helped. Upvotes: 1 <issue_comment>username_2: If you want to "flex your root muscle" so to speak, there are options using Xposed modules, but these options do not require it. Battery full notifications are a bit of a workaround: * Open Settings and select the Notifications option * Click See All under the Recently Sent list * Select All from the dropdown in the top left * Click the 3 dots in the top right and click Show system apps * Select System UI * Click the Battery full item * Edit the options as desired As for Device care, that is a little less of a workaround: * Open Settings and select the Device care option * Click the 3 dots in the upper right of this screen * Select Advanced * Slide the Notifications switch to off This option may have been part of the Android 10 update. If you do not have this option: * Open Settings and select the Notifications option * Click See All under the Recently Sent list * Select All from the dropdown in the top left * Click the 3 dots in the top right and click Show system apps * Select Settings * Click the Device care (Important) item * Edit the options as desired * Return to the previous list * Click the Device care item * Edit the options as desired Keep in mind that this will disable **all** Device care notifications. If you went with the second method, you may want to try disabling one at a time to remove the notification you want without necessarily removing all of them. Upvotes: 3 [selected_answer]
2019/09/10
540
2,017
<issue_start>username_0: [Android one](https://en.wikipedia.org/wiki/Android_One) phones are near stock version of Android. Starting Android 8 (or 9) [project treble](https://android-developers.googleblog.com/2017/05/here-comes-treble-modular-base-for.html) aims to deliver new version of Android without work from the OEM. Yet phones with Android one and treble don't get update right away, see for example the Nokia roadmap to Android Q: [![enter image description here](https://i.stack.imgur.com/ZhqGP.jpg)](https://i.stack.imgur.com/ZhqGP.jpg) For example, Nokia 2.2, Nokia 3.2 and Nokia 4.2 all have Android one and start with Android 9 (so they are treble ready) and have to wait until Q1 2020. Why can't they get the [GSI](https://source.android.com/setup/build/gsi) directly from Google servers to get update as fast as it's released by Google?<issue_comment>username_1: In Android one programme updates are provided by google itself and they give the pixel phone the higher priority as if all the phone will start having android 10 pixel will start losing edge. Android one updates are not necessarily the fastest. Even Huawei is providing P30pro with android 10 in coming December Upvotes: 0 <issue_comment>username_2: The updates are still required to be done by the OEM. And if you try flashing a GSI yourself, it will either not boot or be ridden with issues. The underlying vendor partition also needs an update along with new and updated drivers and HALs from the component vendors to make the hardware work properly with the new OS version. Hence, it takes time to merge, develop, test and then make the final market release. I wish updates were as easy as picking the Google system image and sending it to the phones. GSIs normally work ok if you're installing the version for which the installed vendor partition was built. But in my case they weren't fully smooth. For example, my Nokia 7 has a badly performing modem when on a GSI. And the Android 10 GSI just kept on bootlooping. Upvotes: 1
2019/09/12
262
1,017
<issue_start>username_0: I am using command line to install apk on devices and emulators. There is only one device at one time, so I don't have to specify the device's name. ``` adb install file.apk ``` output: ``` Performing Streamed Install Success ``` I check on the device (or emulator), but can't find the installed app. Could you please help?<issue_comment>username_1: I kid you not. In my case, I was comparing two apps(app1 and app2) and what I was actually doing was install the app2(adb install in app2 directory where the apk path and filename happened to be identical to app1), when I really meant to install app1, and it simply said "Install Success", which was true; the app2 was indeed installed. Upvotes: 0 <issue_comment>username_2: perform a full uninstall ``` adb uninstall ``` then try reinstall your app ``` adb install app.apk ``` I faced this issue on flutter release installation. This problem is caused because of different app signatures between debug and release Upvotes: 2
2019/09/12
463
1,873
<issue_start>username_0: I have a Huawei P20 Lite with Android 9, EMUI 9.1.0 and WhatsApp 2.19.253, which is the latest version. As I wrote in the title, I can't receive WhatsApp messages, after many hours of researching I didn't find any solution for my problem. This is the first time I face whit this problem, because I managed and configured variues P20 Lite but none of them gave me that headache. The things which I did: * Turn on every single option for WhatsApp's notifications; * Uninstall the application and install it again; * Remove the app from the battery optimization process; * Clear the cache; * Enabled automatic start, secondary start and running in background, following this steps Settings -> Battery -> app launch -> 3 vertical dots -> manage manually; * No limit for internet traffic and allow background data, following Settings -> networks and wireless -> data usage -> select WhatsApp -> enabled the varius option. Any idea or solution for this problem? EDIT When I send a message from my phone to this P20 Lite, on the message appears only 1 tick, such as the P20 is disconnected from wifi/mobile data, but the wifi is enabled and connected, the same behaviour with mobile data.<issue_comment>username_1: I kid you not. In my case, I was comparing two apps(app1 and app2) and what I was actually doing was install the app2(adb install in app2 directory where the apk path and filename happened to be identical to app1), when I really meant to install app1, and it simply said "Install Success", which was true; the app2 was indeed installed. Upvotes: 0 <issue_comment>username_2: perform a full uninstall ``` adb uninstall ``` then try reinstall your app ``` adb install app.apk ``` I faced this issue on flutter release installation. This problem is caused because of different app signatures between debug and release Upvotes: 2
2019/09/12
1,032
4,189
<issue_start>username_0: I have disabled WhatsApp's access to Internet by disabling both WLAN-usage and mobile network usage. I thought this should block WhatsApp from accessing the internet. But miraculously WhatsApp gives me a message with ominous content: "You might have new messages" When I open WA it does not show any messages. When I then give it back it's access rights wonder what, there are messages I received the same day! So to me it looks as if this app has found its way to sneak around my network restrictions. So the following questions arise: * Is my assumption about the effectiveness of restricting the "data usage" for apps wrong? * Does WhatsApp hack around the standard restrictions?<issue_comment>username_1: App developers can tell better but what I perceive is that many modern apps use [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/) - a proprietary service from Google, not part of AOSP - for push notifications. In fact developers are forced to use Google's proprietary products unnoticeably. Quoted from [here](https://developer.android.com/training/monitoring-device-state/doze-standby): > > The Doze restriction on network access is also likely to affect your app, especially if the app relies on real-time messages such as tickles or notifications. If your app requires a persistent connection to the network to receive messages, you should use [Firebase Cloud Messaging (FCM)](https://developer.android.com/training/monitoring-device-state/doze-standby#using_fcm) if possible. > > ... > > FCM is optimized to work with Doze and App Standby idle modes by means of [high-priority FCM messages](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message). > > > FCM is a part of Google Play Services ([1](https://developers.google.com/cloud-messaging/faq)): > > FCM SDK's only hard dependency is Google Play Services > > > Play Services is a set of apps which are injected to Android devices with highly privileged permissions, so they aren't subject to data/battery restrictions. Since you have blocked only the app and not Play Services, app may receive push notifications (though the actual data may not be delivered to the app). So block GMS in order to block push notifications. Or choose the apps which aren't fond of Google. **RELATED:** [What is the exact functionality of Google Play Services & Services Framework?](https://android.stackexchange.com/a/216646/218526) Upvotes: 6 [selected_answer]<issue_comment>username_2: As you have denied direct network access, WhatsApp can't access the Internet for directly sending/receiving data. However push notifications on Android are mostly not received by the apps. Instead all configured push notifications are received via Google Play Services. The Google Play Service is a different app on your device that still has Internet access. Those push messages mostly don't contain the actual message and instead are just used as a notification that new data is available. Whenever such a push notification message arrives WhatsApp knows that there are new messages and tries to contact the WhatsApp server to retrieve it. In your case the connection to the WhatsApp server fails and WhatsApp only displays you the message "You might have new messages". Upvotes: 4 <issue_comment>username_3: No, WhatsApp does not hack around the network restrictions. The app, after a certain amount not being able to connect to its server because you have disabled internet connection, is just guessing. That's why you get the message: "You may have new messages" from its Failure notifications channel. From [How to stop WhatsApp 'You may have new messages' notification](https://www.journeybytes.com/2019/04/stop-whatsapp-you-may-have-new-messages-notification.html?m=0): > > As such, though WhatsApp is running and mobile data is turned on, it may not be able to access the internet. > It's only recourse is therefore to throw this notification as a guess since I suspect it can’t tell the difference when a poor network is to blame and when its network rights are being micromanaged by the OS. > > > Upvotes: 3
2019/09/13
1,077
4,231
<issue_start>username_0: There are plenty of fast charge technologies out there, [now seemingly going up to 120W](https://www.theverge.com/2019/6/20/18692589/vivo-super-flashcharge-120w-fast-charging-time), which can supposedly: > > ... capable of fully charging a 4,000mAh phone battery in just 13 minutes ... > > > Now I am no expert in physics or material technologies, but intuitively thinking increasing the effect (without changing the input current) could result in wearing down the batteries on the long run, assuming that the batteries burst into flames first. I was wondering if there is any information out there available, with respect to how well the batteries hold in the long run, with these newer, high powered charging solutions.<issue_comment>username_1: App developers can tell better but what I perceive is that many modern apps use [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/) - a proprietary service from Google, not part of AOSP - for push notifications. In fact developers are forced to use Google's proprietary products unnoticeably. Quoted from [here](https://developer.android.com/training/monitoring-device-state/doze-standby): > > The Doze restriction on network access is also likely to affect your app, especially if the app relies on real-time messages such as tickles or notifications. If your app requires a persistent connection to the network to receive messages, you should use [Firebase Cloud Messaging (FCM)](https://developer.android.com/training/monitoring-device-state/doze-standby#using_fcm) if possible. > > ... > > FCM is optimized to work with Doze and App Standby idle modes by means of [high-priority FCM messages](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message). > > > FCM is a part of Google Play Services ([1](https://developers.google.com/cloud-messaging/faq)): > > FCM SDK's only hard dependency is Google Play Services > > > Play Services is a set of apps which are injected to Android devices with highly privileged permissions, so they aren't subject to data/battery restrictions. Since you have blocked only the app and not Play Services, app may receive push notifications (though the actual data may not be delivered to the app). So block GMS in order to block push notifications. Or choose the apps which aren't fond of Google. **RELATED:** [What is the exact functionality of Google Play Services & Services Framework?](https://android.stackexchange.com/a/216646/218526) Upvotes: 6 [selected_answer]<issue_comment>username_2: As you have denied direct network access, WhatsApp can't access the Internet for directly sending/receiving data. However push notifications on Android are mostly not received by the apps. Instead all configured push notifications are received via Google Play Services. The Google Play Service is a different app on your device that still has Internet access. Those push messages mostly don't contain the actual message and instead are just used as a notification that new data is available. Whenever such a push notification message arrives WhatsApp knows that there are new messages and tries to contact the WhatsApp server to retrieve it. In your case the connection to the WhatsApp server fails and WhatsApp only displays you the message "You might have new messages". Upvotes: 4 <issue_comment>username_3: No, WhatsApp does not hack around the network restrictions. The app, after a certain amount not being able to connect to its server because you have disabled internet connection, is just guessing. That's why you get the message: "You may have new messages" from its Failure notifications channel. From [How to stop WhatsApp 'You may have new messages' notification](https://www.journeybytes.com/2019/04/stop-whatsapp-you-may-have-new-messages-notification.html?m=0): > > As such, though WhatsApp is running and mobile data is turned on, it may not be able to access the internet. > It's only recourse is therefore to throw this notification as a guess since I suspect it can’t tell the difference when a poor network is to blame and when its network rights are being micromanaged by the OS. > > > Upvotes: 3
2019/09/14
268
1,057
<issue_start>username_0: To be clear, these are videos I have taken on the device using Instagram, not other peoples videos. Its videos I have taken then pressed the "save" button before sharing/posting. I have several videos over time I want to download to my PC. Seems to be the only way to even find them on the device is in the Instagram app where you go to post on story and it browses all the media on your device, if I scroll down a while I can see the videos, but it is not filtered or organized. I have browsed the device storage IE This PC\Pixel 3\Internal shared storage\Android\data\com.instagram.android To only find a few files there. They have to be on the device because I can search them when posting to timeline/story, but cant seem to find them.<issue_comment>username_1: Go into your gallery and find an album called *Instagram*. It should pop up. If not, what did you save, posts or stories? Upvotes: 0 <issue_comment>username_2: I have a Samsung. I found my saved instagram stories under [phone name]\Movies\Instagram Upvotes: 1
2019/09/16
524
1,974
<issue_start>username_0: I can't get any of my apps to work. I've tried clearing the data & restarting - works for 10 min then back to square one force stopping - won't let me uninstalling updates - it tells me it's unsuccessful Disabling google play, reenabling, then restarting - still nothing What else can I do? This is so frustrating.<issue_comment>username_1: I had the same problem today (just after updating my phone) and eventually found a way to uninstall Google Play Services updates, thanks to the thread in [Google Play Help Forum](https://support.google.com/googleplay/thread/3300947?msgid=9216460): > > I was able to fix the issue today, by uninstalling the Google Play Services updates. Could only do that after making sure 'Find My Phone' was no longer a device administrator. Steps I followed: > > > 1. Go to Settings -> Lock screen and security -> Other security settings -> Device Administrators > 2. Uncheck 'Find My Device' > 3. Go to Settings -> Apps -> Google Play Services > 4. Tap the vertical ellipsis (3 vertical dots) at the top right -> Uninstall updates > 5. Go to Settings -> Apps -> Google Play > 6. Tap the vertical ellipsis (3 vertical dots) at the top right -> Uninstall updates > 7. Restart phone. At this point the message "Google Play services keeps stopping" was gone. > 8. Open one of the Google apps (in my case Google Maps) > 9. It complains that "Google Play services" is outdated, click the popup to update it again. Problem solved. Really happy to have my phone back ;) > > > It worked for me (no more error messages, and now I can use again apps such as Google Play Store, Google Maps, etc) Upvotes: 2 <issue_comment>username_2: Thank you! I, too, had tried all the other fixes, and I couldn't get this one to work either for a while, until I found the right place to disable "Find my Phone." For me, it was here: Settings --> Biometrics and Security --> Other Security Settings --> Device Admin Apps Upvotes: 0
2019/09/19
521
1,872
<issue_start>username_0: I've a rooted phone along with FX File Explorer and Root add-on. I also have the following apps installed on the phone: * SB Game Hacker * Game Killer When trying to modify the values of gold/coins in game, I've come across 3 use cases so far. **Case 1:** * I open the game and note down the current value of coins I have. * Then I open the SB/GameKiller app and search for that value. * Then I go back into the game and decrease/increase the coins. * Back to the SB/GameKiller app and re-scan for the modified value. * I repeat the process until I'm down to about 5-10 results after which I modify the value in SB/GameKiller app to a value of my liking. * After this, when I go back into the game, the new value gets reflected * SUCCESS **Case 2:** * Case 1 fails (where the final modified value doesn't get reflected in the game). * So I go to `/data/data//` folder. * I usually find a `.json` file which contains the value of coins/gold. * I change the value and save the `.json` file and go back into the game. * SUCCESS **Case 3:** * Case 1 fails and I do not find any `.json` file * I try to look for a database folder/file inside the same `/data/data//` path but do not find one In this case, where can a game be possibly storing this value and fetching it from? It can't be a server because I play the game without being connected to the internet. So my best assumption is that the value is stored locally. Any suggestions?<issue_comment>username_1: In media,simcard,sdcard,data,dcim,plyprfs,appl.data,android,.profig.os, com.facebook.orca-katana,it's a virtual file there's a bunch of places it could be hiding ✌ Upvotes: -1 <issue_comment>username_2: I'd recommend decompiling the apk using apktool or any other tool. Then search in .java files for strings containing "\" or "/" . It's time taking but worth a try. Upvotes: 0
2019/09/20
235
841
<issue_start>username_0: i have xiaomi phone and forget mi account. so i try to restore it using factory reset. i try to enabling USB debuging then. but it says "developer option is not avaiable for this user". adb is active. my question is "is it possibe to activate usb debugging using adb command, and how?" thanks<issue_comment>username_1: If the usb debugging is off. Your device won't appear in `adb devices` list. So you cannot turn it on any other way than opening the developer options and manually enabling it. Upvotes: 1 <issue_comment>username_2: YES you can switch on USB debugging through ADB provided you bootlaoder is unlocked. Just have to pull few files ---> edit them ---> Push them back. It is explained on Github: <https://gist.github.com/pantasio/3d0eb4bb03a1e696aae8696f60730859#file-enable-usb-debug-adb> Upvotes: 0
2019/09/20
788
2,969
<issue_start>username_0: My old phone (Android 8 I believe) showed a little icon on bottom right side to allow switching keyboards, from Gboard to Hackers' keyboard or else. [![Android 8 keyboard](https://i.stack.imgur.com/P1LEa.png)](https://i.stack.imgur.com/P1LEa.png) My new phone on Android 9 (also a new brand, Xiaomi, MIUI) after installing several keyboards, does not show the switch. [![Android 9 keyboard](https://i.stack.imgur.com/P3tPf.jpg)](https://i.stack.imgur.com/P3tPf.jpg) Does someone know how to switch keyboards easily on Xiaomi's Android 9 (as I could do previously on older Android) without having to go everytime into Configuration menus.<issue_comment>username_1: **To switch between different languages in Gboard** (keyboard visible in the screenshot in the question) — * Long press on the spacebar (In much older versions of Gboard, you could also switch between different installed keyboards this way, but that feature disappeared long back.) * Use the language switch key (the globe-like icon on the left of the spacebar) **To switch to another installed keyboard** — * Go to Settings → Additional Settings → Languages & Input → Current Keyboard → Choose Keyboards * Make sure that the keyboard that you want to use is enabled. [![Enable keyboard in settings](https://i.stack.imgur.com/2ja2o.png)](https://i.stack.imgur.com/2ja2o.png) * Now, navigate to any text input and start typing with your current keyboard * You should see a notification from Android System, that says *Choose keyboard* (Note: This notification lasts only until your current keyboard is open, so you have to open the notification panel, without closing the keyboard, to see this notification.) [![Choose keyboard notification](https://i.stack.imgur.com/1Fcrb.png)](https://i.stack.imgur.com/1Fcrb.png) * Tap on this notification and you should be able to choose your other keyboard in the menu [![Choose keyboard menu](https://i.stack.imgur.com/fFvJ2.png)](https://i.stack.imgur.com/fFvJ2.png) Upvotes: 1 <issue_comment>username_2: Did you mean this? ![enter image description here](https://i.stack.imgur.com/2eDbOl.jpg) First, you go to Settings > Apps > Manage Apps > Select 3 dots on the top right corner > Show All Apps. Then find the Android System, search notification name "Virtual Keyboard." ![enter image description here](https://i.stack.imgur.com/Z9jWWl.jpg) Upvotes: 0 <issue_comment>username_3: Long press space. All keyboard options will display. Choose the one you want. Upvotes: -1 <issue_comment>username_4: I did not see the option to switch keyboards because **I forgot that I blocked the notification for keyboard input.** I fixed it by following these steps: * Go to Settings > Apps > Manage Apps * Tap on the three dots on the top right corner and select Show All Apps * Find and tap on Android System * Tap on Notifications and scroll down to Virtual Keyboard * Enable the notifications for Virtual Keyboard Upvotes: 0
2019/09/20
753
2,930
<issue_start>username_0: I installed the MirrorGo (Stream & Recorder) app from the Play Store to try but uninstalled it over privacy concerns in my Android 10. Everything looks fine, but recently I discovered it still left some traces in the device. When I checked the virtual keyboards in Language & input settings, I found the MirrorGo keyboard is still available. ![](https://i.stack.imgur.com/VGuTYl.png) I tried checking the list of all apps on the mobile and couldn't find anything related to that. How do I remove that from my device? Device: Pixel 3; Android Version: 10 / Android Q; Device status: Unrooted;<issue_comment>username_1: **To switch between different languages in Gboard** (keyboard visible in the screenshot in the question) — * Long press on the spacebar (In much older versions of Gboard, you could also switch between different installed keyboards this way, but that feature disappeared long back.) * Use the language switch key (the globe-like icon on the left of the spacebar) **To switch to another installed keyboard** — * Go to Settings → Additional Settings → Languages & Input → Current Keyboard → Choose Keyboards * Make sure that the keyboard that you want to use is enabled. [![Enable keyboard in settings](https://i.stack.imgur.com/2ja2o.png)](https://i.stack.imgur.com/2ja2o.png) * Now, navigate to any text input and start typing with your current keyboard * You should see a notification from Android System, that says *Choose keyboard* (Note: This notification lasts only until your current keyboard is open, so you have to open the notification panel, without closing the keyboard, to see this notification.) [![Choose keyboard notification](https://i.stack.imgur.com/1Fcrb.png)](https://i.stack.imgur.com/1Fcrb.png) * Tap on this notification and you should be able to choose your other keyboard in the menu [![Choose keyboard menu](https://i.stack.imgur.com/fFvJ2.png)](https://i.stack.imgur.com/fFvJ2.png) Upvotes: 1 <issue_comment>username_2: Did you mean this? ![enter image description here](https://i.stack.imgur.com/2eDbOl.jpg) First, you go to Settings > Apps > Manage Apps > Select 3 dots on the top right corner > Show All Apps. Then find the Android System, search notification name "Virtual Keyboard." ![enter image description here](https://i.stack.imgur.com/Z9jWWl.jpg) Upvotes: 0 <issue_comment>username_3: Long press space. All keyboard options will display. Choose the one you want. Upvotes: -1 <issue_comment>username_4: I did not see the option to switch keyboards because **I forgot that I blocked the notification for keyboard input.** I fixed it by following these steps: * Go to Settings > Apps > Manage Apps * Tap on the three dots on the top right corner and select Show All Apps * Find and tap on Android System * Tap on Notifications and scroll down to Virtual Keyboard * Enable the notifications for Virtual Keyboard Upvotes: 0
2019/09/22
701
2,690
<issue_start>username_0: I like this option on my old Android 4.2 Samsung Galaxy S3 mini. Especially when I am driving it's much easier to press a button instead of sliding... But I cannot find such option neither on Android 4.4 phones (different phones, from Motorola to Sona) nor on newer phones with Android 5.1 and 6.0. Is it 4.2 option that is not part of newer Android version?<issue_comment>username_1: **To switch between different languages in Gboard** (keyboard visible in the screenshot in the question) — * Long press on the spacebar (In much older versions of Gboard, you could also switch between different installed keyboards this way, but that feature disappeared long back.) * Use the language switch key (the globe-like icon on the left of the spacebar) **To switch to another installed keyboard** — * Go to Settings → Additional Settings → Languages & Input → Current Keyboard → Choose Keyboards * Make sure that the keyboard that you want to use is enabled. [![Enable keyboard in settings](https://i.stack.imgur.com/2ja2o.png)](https://i.stack.imgur.com/2ja2o.png) * Now, navigate to any text input and start typing with your current keyboard * You should see a notification from Android System, that says *Choose keyboard* (Note: This notification lasts only until your current keyboard is open, so you have to open the notification panel, without closing the keyboard, to see this notification.) [![Choose keyboard notification](https://i.stack.imgur.com/1Fcrb.png)](https://i.stack.imgur.com/1Fcrb.png) * Tap on this notification and you should be able to choose your other keyboard in the menu [![Choose keyboard menu](https://i.stack.imgur.com/fFvJ2.png)](https://i.stack.imgur.com/fFvJ2.png) Upvotes: 1 <issue_comment>username_2: Did you mean this? ![enter image description here](https://i.stack.imgur.com/2eDbOl.jpg) First, you go to Settings > Apps > Manage Apps > Select 3 dots on the top right corner > Show All Apps. Then find the Android System, search notification name "Virtual Keyboard." ![enter image description here](https://i.stack.imgur.com/Z9jWWl.jpg) Upvotes: 0 <issue_comment>username_3: Long press space. All keyboard options will display. Choose the one you want. Upvotes: -1 <issue_comment>username_4: I did not see the option to switch keyboards because **I forgot that I blocked the notification for keyboard input.** I fixed it by following these steps: * Go to Settings > Apps > Manage Apps * Tap on the three dots on the top right corner and select Show All Apps * Find and tap on Android System * Tap on Notifications and scroll down to Virtual Keyboard * Enable the notifications for Virtual Keyboard Upvotes: 0