Question and Answer about Android from Stack Exchange network.
Phone is a Samsung Note 9 SM-960F model. The phone is running Android 10. And I never experienced this problem on any other phone, model or Android version before.
Basically I am logged into my Google account. Every Google service works great. Except two-step verification.
- I get the "notification" in Chrome for example when I sign in on a new PC. All great.
- The phone makes a notification sound, the two step verification pops up.
- I tap "Yes", I get a toast notification "Approved".... and nothing happens.
What could cause this and how could I fix this?
I'm trying to install a Node.js
module in a folder, for example, /data/data/com.termux/files/home/storage/shared/documents/projects/code/js/test-npm
, from Termux on rooted Android 6 running npm install
. Installation starts, but never succeeds, throwing errors and warnings like npm ERR! cb() never called!
and WARN tar EPERM: operation not permitted, futime
.
Which permissions should I grant to npm
and how?
Update 1: tried running npm install
in /storage/emulated/0/Documents/projects/code/js/test-npm
, got the same errors. Termux has Storage access permission in Android installed apps manager.
How to fix mount errors when trying to mount the raw image that converted from android sparse image?
I have sparse.img
image with the following properties:
$ file sparse.img
sparse.img: Android sparse image, version: 1.0, Total of 2512896 4096-byte output blocks in 60 input chunks.
I want to see its contents so
- I have converted it into raw image.
- Created a new directory
- Trying to mount the raw image on to the directory
using the following commands:
$ simg2img sparse.img sparse_raw.img
$ mkdir raw
$ sudo mount -t ext4 -o loop sparse_raw.img raw
First two commands run fine and I can see sparse_raw.img
generated of size larger than sparse.img
.
Last command failed with an error:
wrong fs type, bad option, bad superblock on /dev/loop27, missing codepage or helper program, or other error.
I think that may be the sparse_raw.img
is not an ext4
image but how can I sure about it?
I have tried to mount it as
- ext2, ext3 or without -t
- without -o loop but nothing works.
Please suggest a way to fix it.
My Pixel XL phone rencently always turns off by itself. Most times it turned off just after starting up, a few times it worked longer and everything looks fine. when it happend, a "phone is shuting down"(maybe not exactly these words because my phone is not in english) dialog pop up and then shut down in a few seconds.
I tried restoring it to factory image, and tried replace a new battery, and had not fix this.
I got the log using "adb logcat", here is it : full log file
Now I think its because of a hardware part, but seems not battery. I want to find out which hardware part is it from the log file, but I don't know much about the log messages, can anyone help to find some clues about what cause the auto-shutdown? Thank you very much!
John.
I am trying to figure out if my Android (Pie) is encrypted.
Per Is there a way for a user to tell if their Android device is encrypted or not?, it says my phone will be reported as phone encrypted
.
However, when I go Settings
--> Lock screen & security
--> Encryption & credentials
, here is what I can see:
One can see that:
- My SD card is encrypted
- Credential protection:
Hardware-backed
I see no mention of phone encrypted
.
Does this mean my phone's contents (not my SD card) is actually encrypted?
My Phone Specifics
- LG-G710VM (aka LG G7 ThinQ for Verizon)
- Android 9 (Pie)
- Secure start-up is enabled
**2/24/2020 Edit**
In an answer below, @beeshyams suggested verifying encryption by following the answer to this question: How can I find out if my device uses FBE or FDE?
Using Termux I ran getprop ro.crypto.type
.
It output: block
, which means my device uses Full Disk Encryption.
I have been using FreeOTP by Redhat/Fedora for a few years now as my main two way authentication app. However, I have realised that the current version (1.5) is quite a few years old (having been released in 2016).
https://f-droid.org/packages/org.fedorahosted.freeotp/
There is however a forked version; FreeOTP+. This fork's latest update (1.7) came out in December of 2019, making it far more up to date than the upstream app.
https://f-droid.org/en/packages/org.liberty.android.freeotpplus/
I am however concerned about security, due to the app playing a very important role in account security. I am also unsure as I am not too familiar with the work/trustworthiness of the developer of the fork (I mean him/her no offence when I say this, I'm just cautious when it comes to account security), where as I know Redhat to be a secure and freedom respecting company.
So which would be the safer option? Should I stick with the older FreeOTP? Do two way authentication apps need to have up to date security patches? Or can I trust the more up to date FreeOTP+?
Also, even though I appreciate the help and good intentions of people who would recommend this; but please don't recommend that I use the Google or Microsoft authenticators instead. I want to use a Free/Open Source authentication app rather than a proprietary one.
What do I want?
I want to push some directories from my desktop to my android phone. The directories are empty, but the folder name contains important meta-data. The structure is not changeable.
What is the Issue?
If I try to push via adb, I get the following warning:
adb: warning: skipping empty directory
What have I tried?
As a workaround I could use the MTP protocol. But this protocol is not stable and crashes a lot, especially if you want to copy multiple files. I can't get it work on linux anyways, so adb seems to be the best choice.
My Questions
What is the reasoning to skip empty directories? It seems like an arbitrary (and annoying) design choice for me.
Is there a flag to NOT skip empty directories?
Is there a workaround?
Short version:
Why is my bash script (running in the background, started via SSHD) not running every ~30 seconds when it should? (NOTE: SSHD and the script are running as root!)
I have a script that I start using nohup bash script.sh &
so that it runs in the background.
The script is supposed to check whether a specific app is connected using netstat
and if not it automatically reconnects using am start
and input keyevent
. (This turns out to be irrelevant though).
I've noticed that even though the script should check every 30 seconds (roughly of course), sometimes it takes minutes to check. I couldn't really figure out why and it seemed completely random (note that the phone's screen is off most of the time and everything is running in the background.), so I made a testscript which is what the question should focus on for simplicity:
#!/bin/sh
while : ; do
echo "$(date +'%Y-%m-%d %H:%M:%S')"
sleep 30
done
That's it. Started via nohup bash script.sh &
using SSHD. The script does nothing but print the current datetime and thanks to nohup writes it to a file. I left this running for a while and then wrote another script to check on the results and print the amount of seconds whenever it's above 30. Result:
134
127
115
127
88
113
116
99
110
116
54
44
70
75
62
82
94
68
429
62
81
126
144
39
467
71
62
This is from the output of a script that ran for only 4:20 hours, so quite a lot of times where execution must have been delayed, the sleep was longer than 30 seconds, or whatever is going on....
Can someone explain this? And is there a solution to this?
I suspect this might have something to do with memory or power management pausing the script but really it shouldn't happen and I would like my script to run in the background and to sleep for exactly 30 seconds and not be paused or delayed. In this testrun, the highest was 467 seconds, but the highest I've seen with the main script so far was a little over 20 minutes. This is rare, but 5-10 minutes of a delay happens a few times a day.
I am looking for a SOCKS proxy server I can run on my Android phone. I could only find some commercial apps, but would prefer a FOSS alternative.
It does not need to be an app: a binary I can run from adb shell
would work as well, but I'd prefer it if it does not require root.
I just received a notification from Samsungs "Find My Mobile" service, without having triggered anything. The same thing happened to my work mate today morning.
As I almost never use my Samsung account, and never even configured this service, I assume one of the following:
- Someone hijacked my Samsung account
- Someone hijacked the Samsung system, affecting multiple user accounts
- The responsible api call is lacking a permission check
- Samsung itself did a test which went wrong
Does anyone know more about this?
I got the inspiration here. It looks like AFWall+ is able to create a NAT forwarding policy to keep all traffic going through a SOCKS5 proxy and fool Google apps into thinking they are not connected via a VPN (Google apps implement additional security measures when connecting via VPNService
and if you are in China you will not pass the security check - the security check requests don't go through VPN, so they will EOF because GFW will kill these requests, read more here).
So my question is, if let's say I have a socks5 server running at 192.168.1.1:1088
which tunnels all connections via vmess
protocol (aka V2Ray
) to remote servers in the US, how do I create my custom script? I have tried:
IP6TABLES=/system/bin/ip6tables
IPTABLES=/system/bin/iptables
ULIMIT=/system/bin/ulimit
PORT=1088
SERVER=192.168.1.1
$ULIMIT -n 4096
$IP6TABLES -F
$IP6TABLES -A INPUT -j DROP
$IP6TABLES -A OUTPUT -j DROP
$IPTABLES -t nat -F OUTPUT
$IPTABLES -t nat -A OUTPUT -o lo -j RETURN
$IPTABLES -t nat -A OUTPUT -d 127.0.0.1 -j RETURN
$IPTABLES -t nat -A OUTPUT -p tcp --dport 53 -j DNAT --to-destination $SERVER:$PORT
$IPTABLES -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination $SERVER:$PORT
$IPTABLES -t nat -A OUTPUT -p tcp -j DNAT --to-destination $SERVER:$PORT
$IPTABLES -t nat -A OUTPUT -p udp -j DNAT --to-destination $SERVER:$PORT
This does not work. So:
- Did I create a wrong script? How do I create a script that does what I want to do?
- Are there other settings that I should enable first? I didn't tick any app so I assume that means all app go through custom script, right?
I've read this question:
How can I change the default browser?
but the instructions there don't fit my Xiaomi phone, which has the MIUI 10 interface. How can I change the default browser there?
After I have repartitioned my tablet I wonder what would happen if I flashed the stock ROM again.
I have unlocked the bootloader and enabled USB debugging. I can launch TWRP over fastboot and use the interface.
To root the phone, I tried the following:
- Push the TWRP zip onto the device
adb push ~/Downloads/SuperSU-v2.82-201705271822.zip /tmp
- In the TWRP interface do: Install -> Add Zip ->
/tmp/SuperSU-v2.82-201705271822.zip
> Swipe to continue - Process finishes and Phone reboots
- Open Root Checker Basic
"Sorry! Root access in not properly installed on this device. "
My goal is to be able to run su
in adb shell
.
What have I done wrong here?
On the web application for desktop this is accomplished by navigating to the file, clicking on it, and pressing Shift + Z.
Is there a way to accomplish the same functionality on Android? Either within the Google Drive app or thru some other means?
NOTE: When I go to a file that's in multiple locations on the Google Drive app and go to: Options -> Details, then I can see all the locations the file is in, and also remove locations, but I can't seem to add locations from this menu.
I am using OsmAnd+ 3.5.5 from F-Droid on my Samsung A3 2016 running LineageOS 16 (Android 9).
It all seems to working fine, but for whatever reason the voice navigation will not work, making me have to constantly look at the directions rather than listen.
What am I missing here? Is there a way of making it speak to me?
After upgrading my Oneplus 6 to Android 10 from Android Pie using the System Updater, I tried to reinstall TWRP using the both the most up to date image from https://dl.twrp.me/enchilada/. I tried both the most up to date image and the one I had used previously to install TWRP.
When I run fastboot boot twrp.img
in the bootloader, it gets stuck on "Fastboot Mode". If I hold the power button, the phone turns off and I can boot it again normally. How do I boot to TWRP properly?
I'm using a Sony Ericsson Xperia Arc S running Android 2.3.4 as a secondary phone. I used to surf internet until recently without so much hassle (using WiFi, not mobile data). But recently, some strange issue showed up.
I can Google search anything. But when I try to browse certain websites from search results, I get the error "Web page is not available". However, this happens when browsing only some of the websites, including Wikipedia (strangely, when I turn the Extreme mode in the Opera Mini I can browse the website).
I tried force stopping the browsers, cleared their data and cache, even did a reinstall of the two browsers, UC mini and Opera Mini. It is to be noted that I did root the phone sometime ago, but I was able to surf the web with this rooted device before this issue occurred.
The problem persists on other WiFi networks as well so this couldn't be an issue with my network. That said, other devices on the network works fine.
I have an unrooted Samsung Galaxy s10 that I need to find a way of keeping myself from using overnight or at least track what I do.
The problem here is that I sleepwalk on a fairly regular basis, I have ended up at the bus stop a few times, made breakfast, just generally some pretty scary things. My fear is that at some point during the night I will turn on my phone and text someone or something similar (eg. snapchat someone or something) and I would like a way of making that impossible, or at least know if that does happen. My current procedure is pulling up my activity logs from every social media site I'm on and going through my phone log, but this isn't ideal as A) it takes a really long time and b) theres still a chance that I sent a text and then deleted it, therefore making it invisible from my end. Is there anyway that I can set a mandatory shut down time on my phone, like tell it to not let me turn it on until a certain time the next day or something like that? Or even better is there a way of tracking my activity? In my research it didnt seem possible to generate a log of when i power my phone on or off, but maybe theres another way of going about this.
Also worth noting, I have tried puzzle lock type things in the past (like where I have to solve a math problem to unlock my phone) but apperantly my subconscious is just as good as I am at problem solving so that wont work.
My Samsung Galaxy A70 prompted for a software update this morning. I dutifully complied and left it to get on with it.
Upon return, I was presented with the following error:
partition tz
Reason tz: Hash of data does not match digest in descriptor.2nd
Plus some other stuff about hash, firmware version, etc.
To clarify, all I did was select to update. I didn't plug any cables in (as the image indicates), and I wasn't trying any manual firmware/software install.
It's still under warranty, so I'll probably just be taking back to the retailer, but I thought i'd ask here in the hope that there's a quick fix that won't invalidate the warranty.
Any suggestions?
Topics
2D Engines 3D Engines 9-Patch Action Bars Activities ADB Advertisements Analytics Animations ANR AOP API APK APT Architecture Audio Autocomplete Background Processing Backward Compatibility Badges Bar Codes Benchmarking Bitmaps Bluetooth Blur Effects Bread Crumbs BRMS Browser Extensions Build Systems Bundles Buttons Caching Camera Canvas Cards Carousels Changelog Checkboxes Cloud Storages Color Analysis Color Pickers Colors Comet/Push Compass Sensors Conferences Content Providers Continuous Integration Crash Reports Credit Cards Credits CSV Curl/Flip Data Binding Data Generators Data Structures Database Database Browsers Date & Debugging Decompilers Deep Links Dependency Injections Design Design Patterns Dex Dialogs Distributed Computing Distribution Platforms Download Managers Drawables Emoji Emulators EPUB Equalizers & Event Buses Exception Handling Face Recognition Feedback & File System File/Directory Fingerprint Floating Action Fonts Forms Fragments FRP FSM Functional Programming Gamepads Games Geocaching Gestures GIF Glow Pad Gradle Plugins Graphics Grid Views Highlighting HTML HTTP Mocking Icons IDE IDE Plugins Image Croppers Image Loaders Image Pickers Image Processing Image Views Instrumentation Intents Job Schedulers JSON Keyboard Kotlin Layouts Library Demos List View List Views Localization Location Lock Patterns Logcat Logging Mails Maps Markdown Mathematics Maven Plugins MBaaS Media Menus Messaging MIME Mobile Web Native Image Navigation NDK Networking NFC NoSQL Number Pickers OAuth Object Mocking OCR Engines OpenGL ORM Other Pickers Parallax List Parcelables Particle Systems Password Inputs PDF Permissions Physics Engines Platforms Plugin Frameworks Preferences Progress Indicators ProGuard Properties Protocol Buffer Pull To Purchases Push/Pull QR Codes Quick Return Radio Buttons Range Bars Ratings Recycler Views Resources REST Ripple Effects RSS Screenshots Scripting Scroll Views SDK Search Inputs Security Sensors Services Showcase Views Signatures Sliding Panels Snackbars SOAP Social Networks Spannable Spinners Splash Screens SSH Static Analysis Status Bars Styling SVG System Tags Task Managers TDD & Template Engines Testing Testing Tools Text Formatting Text Views Text Watchers Text-to Toasts Toolkits For Tools Tooltips Trainings TV Twitter Updaters USB User Stories Utils Validation Video View Adapters View Pagers Views Watch Face Wearable Data Wearables Weather Web Tools Web Views WebRTC WebSockets Wheel Widgets Wi-Fi Widgets Windows Wizards XML XMPP YAML ZIP Codes