text:
Where can I run a .sh script on Android without root?
Lately I've been playing around with .sh scripting in Android. At first I used BusyBox and it's integrated scripting utility, though I quickly realised that coding on the phone isn't the best, so I switched over to my desktop and started using ADB to push my scripts to my device. It all worked well for about two weeks, until recently the exact same scripts that used to work perfectly, tell me some : not found[0]: syntax error: '{ Error. I've copied the exact same code from my script and used BusyBox to create it for me, and that way it works just fine. So the code is fine.
After some digging, I think it's either because of permissions, because of encoding possibly, or also because of the location of the scripts. I've tried many different locations (because I want to be able to run the scripts without root), and ended up choosing /storage/emulated/0. If I understood correctly, this is a symlink to the internal storage, which is read/write-able without root. But maybe sometimes executable and sometimes not? I don't know.
So my question is as following: What is the best location on an Android Device to run scripts without root from? Preferably a path that works on any android device.
Info:

Rooted Samsung S7 SM-G930F
Android 8.0.0
I'm using #!/system/bin/sh inside the .sh files
I'm running the scripts with sh script.sh
When trying to run it as an executable ./script.sh, I get a Permission denied error. With or without root.

PS: And if anyone has a clue to why the exact same scripts stopped working out of nowhere, I'd be happy to know!
UPDATE: Thanks to @IrfanLatif, I've managed to fix the : not found[0]: syntax error: '{ Error! I was using Visual Studio Code as my editor for the scripts, which was saving them with the End of Line Sequence CRLF, which Android doesn't like. For an easy fix, just change your Line Endings to LF, problem solved. Check the comments out for more info.

@IrfanLatif Yup, that was exactly the case. Thank you so much! I was using VSCode and I had to change the End of Line Sequence from CRLF to LF. Thank you so much, really!

Without root you don't have too many choices to run a script from. If you want to run from adb shell, it can be either /sdcard or /data/local/tmp. If you want to run from a terminal emulator app, it can be either /sdcard or app's private directory in /data/data. There is no criteria to decide the best location. It depends on your specific requirements or comfort level.

Try termux from Play Store

@IrfanLatif Don't forget that you can't call a script directly (using ./myscript.sh) if it resides on a FAT32 file system, as it does not support file permissions. (SD cards are always formatted to FAT32) However, you can still use the format sh myscript.sh

/storage/emulated/0 is usually mounted in a way that prevents execution of programs from this location.
Therefore even with a set executable bit for your script you won't be able to execute it directly. Of course you can still execute it via sh:
/system/bin/sh /storage/emulated/0/test.sh

Alternatively there is the directory /data/local/tmp which is writable without root (e.g. via adb). There you can place a script and execute it directly.
Note: Listing the content of /data and /data/local is denied for non-root users, but in /data/local/tmp you have permissions again.

Thank you for your answer! I've tried /data/local/tmp already, and unfortunately it didn't work. But I do see that its permissions are set to executable so the answer to my question might be just that!
I've always executed my scripts with sh script.sh. If I'm understanding you correctly, you're saying running sh /storage/emulated/0/script.sh should work? Because that's what used to work, and suddenly stopped working.

@Zebiano /system/bin/sh /storage/emulated/0/script.sh definitely works on my Android 9 system (non-rooted). May be you accidentally installed a second sh executable that is now used instead of /system/bin/sh?

I just tried it on my system again and unfortunately had no luck. I doubt I installed a second one because I don't even know how to. I haven't installed anything on my phone besides BusyBox. Could switching between Mac and Windows with adb affect something?

@Zebiano No switching between Mac/Windows can not cause this effect. Adb is just a remote connector just like an ssh client.

Now that I've managed to get my scripts to run again, and after deciding that I want to execute my scripts (rather than sourcing them) by reading this, would you still recommend /data/local/tmp as a directory? Or should I pick another one?

@Zebiano With root permissions you have the free choice where to save the script (except the sdcard section). Just use the location you prefer on the user-data partition.

I am using the Pydroid3 app over the same device configuration.
sh script.sh seems to work in it.

I am using a Samsung A52 (SM-A525F/DS) with Termux installed from Google Play. The home directory, where you can write scripts and set the execute bit, is:

/data/data /com.termux/files/home

You cannot browse this directory from a file manager on the phone, so a workaround is required to put your scripts there. I have created sub-directories from the home Termux directory, so it looks like this:

/data/data /com.termux/files/home/myname/scripts

This is the only place where you can execute scripts directly using:
./myscript.sh

although you can call bash in a new shell and feed its commands from a text file, which does not need to be executable, as in:
bash myscript.sh

The first line of the scripts must be
#!/data/data/com.termux/files/usr/bin/bash

Termux provides links to the standard directories DCIM, Download, Movies, Music, Pictures and one to the parent directory of all of the above, which is:

$HOME/storage/shared

However, from here, you can access all the standard directories with read and write permissions (as well as create your own, of course). Here is the output from the tree command run from the home directory on my phone, which explains it better than words:
$HOME
├── myname
│   └── scripts
└── storage
    ├── dcim -> /storage/emulated/0/DCIM
    ├── downloads -> /storage/emulated/0/Download
    ├── movies -> /storage/emulated/0/Movies
    ├── music -> /storage/emulated/0/Music
    ├── pictures -> /storage/emulated/0/Pictures
    └── shared -> /storage/emulated/0
        ├── Alarms
        ├── Android
        ├── Audiobooks
        ├── DCIM
        │   ├── Camera
        │   ├── Screenshots
        │   └── mei
        ├── Dashcam
        ├── Documents
        │   ├── Termux
        │   └── 2024-02-02_scripts
        ├── Download
        │   └── .scripts (Latest versions go here using get.sh/put.sh)
        ├── GIFs
        ├── Movies
        │   ├── Whatsapp
        │   └── Downloaded_Videos
        ├── Music
        │   └── Downloaded_MP3s
        ├── Notes
        ├── Notifications
        ├── Podcasts
        ├── Recordings
        └── Ringtones
27 directories

From my scripts directory I have written scripts called get.sh and put.sh to help move files between my PC and the phone, as it's easier to script on a PC's big screen. I use a hidden directory in the Download directory called ".scripts" as the point to access files on both my cable-connected PC and from Termux. All I have to do is make them executable once they are in the scripts directory.
In Documents, I transfer copies of the current scripts, the Termux setup files and my $HOME/.profile in directories called Termux and scripts. This is how I maintain back up files.
I hope this helps someone.


text:
What config file specifies which services load on startup?
I'm using ADB and have full access to the filesystem.
I run ps and see a process running called com.Something.Service. I can kill the process but it restarts most of the time.
It's not a visible app, it's some kind of background service.
I want to stop it from running on startup.
I can't find the setting that causes it to run on startup. What file determines which processes like these run on startup or how can I find it?
I've tried grepping some common directories for the name of the service. I'd hope to find it in /etc/init.d but it's not there.

There is no configuration file to control apps/services on startup. Apps, Java services (in system_server process) and native services (managed by init), all three have different behaviors. Please narrow down the scope of your question mentioning what exactly you want to achieve.

Does this answer your question? Disable autostart on boot. If it's a Google Play Services process, also see this answer: https://android.stackexchange.com/a/216646/218526. /etc/init/*.rc files control native services behavior, not the processes running as virtual machines under Zygote.

source: Stack Exchange

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

sort: votes


text:
Does sending images on Google Hangouts count towards my Google account storage space?
Does sending images on Google Hangouts (Android application) count towards my Google account storage space?
I don't see why it would, but right after sending some images via Google Hangouts I received an email regarding my Google account storage, so I wonder whether this is a coincidence:

When I interpret the Hangout help (see the "Delete photos and videos" section) it seems like sent images are saved in the "Photos from Hangouts" album on your device. And if this album is automatically synced via Google Photos it may have an effect on the GDrive storage. You should check this album on your phone.

Yes, all the images which are sent via google hangouts are stored in your account storage. Refer this link to see all of your account storage on Google Dashboard. Click on Gmail to see stats. Click on chats to see all of your images.
Take this image as a reference.

This doesn't really answer the question. Yes, they are stored in you account, but your account storage is not negatively affected at all by photos stored in your account if they are "high quality" as opposed to "original quality".

Come June 2021 and the answer is actually correct. All pictures now count towards the drive size.

@oᴉɹǝɥɔ Do you know any way to check how much storage is used by images uploaded to Hangouts?

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


text:
Hear myself in headset during call?
I have this issue when using earbuds. When I talk on the phone, since the buds are plugged into my ears, I can't hear my own voice and I find myself shouting.
Is there a way to configure Android so that I can hear my own voice thru the headset?
I'm on a Samsung Galaxy Note 9, with Android 10.

I doubt it, and you wouldn't want it anyway. Hearing your own voice as an echo in the phone is very annoying for most people. Simply remember to not scream... Most people manage it these days.


text:
How to send SMS from terminal in background on Android?
I'm trying to send text message (SMS) from my Android terminal app in background (sim 1 or 2).
I can send message in foreground using this command:
am start -a android.intent.action.SENDTO -d sms:121 --es sms_body "test text" --ez exit_on_sent true;
input keyevent 22;
input keyevent 66;

But this command don't work in background.
So, how can I send message in background from my terminal?
Note: Android version 6.0. Rooted device

With "terminal" you mean an app like Termux or do you mean adb? If it is an terminal app does it have the permission SEND_SMS?

app like termux and permission set ok!

The syntax that appears to work as attested over at our sister site stackoverflow is and is explains in detail:
adb shell service call isms 7 i32 0 s16 "com.android.mms.service" s16 "+1234567890" s16 "null" s16 "Hey\ you\ !" s16 "null" s16 "null"

"Isms method number (5 and 7 above) may change with the android version . Read full explanation to understand it."

It's not working. just display Result: Parsel(00000000, '....')

Firstly, you need to get the actual Service/package name for the service you are trying to call. You can get a list of Your devices Services by throwing the command: adb shell dumpsys -l. Look, for the Service'(s) with mms it will have a syntax of something com.whatevs mms.service. located use that in your command instead of just coping and pasting. Also inform me of the actual name and I will edit the answer. Lastly, reading the extremely detailed answer by @Taknok expailing the what's going on the subid is could be wrong too.

In my terminal dumpsys -l show nothing. But if I run service list it's showing imms com.android.internal.telephony.IMms and another one isms.

Try both but first try the isms one just because that's the command your throwing. If that is a no go then try the Imms one. Also if you can look at the manifest you can most likely get the subid along with the service you need to utilize to send an SMS.

also not working. However I build an apk for solving my problem. Thank you for your answer.


text:
Private one-way automatic photo upload solution?
I'm looking for something to automatically upload/sync photos from my phone to my PC or server.
Anybody knows of something that could fit my use case?

My requirements:

upload only files older than some date - I just want new photos, not all the old stuff that I already have
don't reupload files I've deleted on the server/PC - I put the photos in different folders after putting them on the PC
private / open source / FOSS - I don't want for them to get in Google's (or some other company's) hands.

What I've tried:

syncthing - can't choose to upload stuff starting from a date, reuploads things I delete from the sync folder
NextCloud - doesn't have one-way upload feature

I've been thinking about writing something that runs periodically on my phone and just pushes the photos to some S3-compatible storage, and a PC component that pulls them. The problem is that without rooting you can't have reliable cron. Even if I would make it work with Termux somehow, Android could deny network access.
I know that paid Dropbox can do exactly what I want, but l'm hesitant to give them access to all my photos.

Have you checked the sync apps at F-Droid such as https://f-droid.org/en/packages/com.github.catfriend1.syncthingandroid/?

@Robert after applying some formatting to the question (actually, just inserting a line break so the list comes out as list): Yes, OP has. See second-to-last bullet point.

I actually have a python program that does this.  I just run an ssh server from my Android (SSHelper) and my script connects to that server and downloads photos from folders I specify.  I'd post a git link but I don't have one and it's a bit kludgy. But it works, I put the script on a raspberry pi which I connect to an SSD and it runs every hour.

Oh, all the SSH servers I used couldn't interact properly with the external SD card after some Android update (in Android 6 or 7)

rclone is a very flexible solution if you don't mind CLI. I use it with crond but that requires root. Without root you can consider Termux Tasker or some similar solution. Related: Offline safe sync directory on sd card on non-rooted Android with Ubuntu PC

@IrfanLatif I haven't heard of Termux Tasker - it might be just the thing I need.

Ever have any luck finding this?

Well, what I have right now is a script (https://github.com/butla/configs_and_scripts/blob/master/home/bin/phone_media_transfer.py) that I run every now and then that goes over to my main computer (I have to be in the same WiFi network), checks what's the latest photo there and uploads (with rsync) everything that's newer on the phone.
I can't run that with Termux and Tasker just now, because my SSH key requires a password. But I am planning on configuring SFTP (with a proper chroot jail) on my computer to enable automated upload from the phone with a passwordless key.


text:
Unable to flash custom ROM using TWRP, successfully installing AOSP extended, rebooting the device. Upon reboot it boots to TWRP instead of ROM
Successfully installed the AOSP Extended image for 'nicklaus'. Whenever I reboot my device to boot my device, instead of booting to  the custom ROM my device automatically boot itself into TWRP recovery, as if like there is no ROM installed at all.

I'm trying to flash AOSP extended or any other custom ROM to my device ('nicklaus' Motorola E4 Plus). After wiping the internal storage (dalvik & cache) and then successfully install the custom ROM.
Actually I flashed .zip file, GApps, and then reboot the device, the device automatically boot itself into TWRP recovery mode. Previously, I fixed my file system problem and then tried multiple times to install compatible ROMs. However, nothing helped at all.
After uninstalling stock ROM. I actually flashed ViperOS,
Lineage, Remix OS and AOSP extended as well. But after fixing the file
system issue nothing helped me to flash any ROMs.

custom rom needs working full stock rom as base

Can't get it. Can you please elaborate?

install working stock rom. when phone is in good condition, wipe only system and format data before flashing custom rom. don't wipe vendor modem etc because it's not included in custom rom. don't flash gapps

No I also tried to flash the stock ROM but it's also not working at all.

you need firmware for exact model. E4+ comes with different chipsets Qualcomm or Mediatek. watch youtube how to flash stock rom

just to be clear, full stock ROM means all partitions including stock recovery. unmodified stock ROM won't boot along with TWRP (flash it together with modified vbmeta/dtbo after phone is working again)

I flashed full stock ROM recently but my phone's problem isn't solved totally bTW. Now my SIM cards are not working and fingerprint gestures aren't working and don't even mentioned in the moto's dedicated app. Also unable to flash TWRP recovery.

maybe the "fixed file system problem" has overwritten important partition which is not included in stock ROM

So what I have to do now to resolve this network related issue?

if device is on stock rom but factory reset does not fix it, you have serious issue. we don't know the history what you have done so far. open thread on xda or ask in lenovo forum, this cannot be answered as Q&A


text:
fastboot oem off-mode-charge 0 Ressetting back to "1"
Using "Gzosp-rolex-riva-8.1.0.Stable.1.0-UNOFFICIAL-20180622-1133" on "Redmi 4A"
Upon Using fastboot oem off-mode-charge 0 its working for ONE TIME only,
Once the phone powered on, its getting back to fastboot oem off-mode-charge 1
Can Anyone please solve this ??
( OEM Unlocked & Rooted )

Is there any way to boot android when plugged in with any custom rom or kernal ??

tried few ,methods on Ground Zero, Havoc and pixel experience on REDMI 4A

https://android.stackexchange.com/a/221384


text:
Rooting and updating the OS for ZTE ZFIVE C LTE
How to root a ZTE ZFIVE C LTE (Z558VL) with build number Z558VLHWV1.0?

Honestly, a quick Google search answers this pretty much through deduction, the Tracfone ZFive is not rootable as it has a locked bootloader and it cannot be unlocked. Although the answer is not given directly, looking at the information (locked bootloader and carrier locked) and understanding modern Android devices, one can deduce that this phone cannot be rooted by normal means. There is some (unverifiable) referenced to Kingroot or WunderShare Tunesgo rooting of this, but those are mostly just C&P spam sites looking for clicks and could find no verifiable example of one that had been done.

In the modern Android world, rooting is becoming significantly less frequent as it is getting extremely more difficult to do without having a device with an "official" method of doing so, such as a Google Pixel or OnePlus device. The effort involved in creating a rooting method just isn't worth the investment for low-end devices today either, so the ones that do have a root method that isn't "official" are very common, highly sold, devices like mid to upper tier Samsungs or LG's, and root methods are almost unheard of for low-end, locked devices. Sorry.


text:
Command has different output when running in a shell or in script
I'm trying to run a script on the Nox emulator through adb. After connecting to Nox via adb with adb connect localhost:62001 and copying a script into a /data/scripts/script.sh folder, executing it gives me different outputs. The script contains the following:
#!/system/bin/sh
dd if="/data/scripts/screen.dump" bs=4 skip=540503 count=1 | hd

# Expected output: 00000000  08 04 1D FF

Now, here is the problem: I'm getting different results depending where/how I run the script. For it to work, I need to open the shell first with adb shell, and any of the following commands work from within it:

dd if="/data/scripts/screen.dump" bs=4 skip=540503 count=1 | hd
. ./data/scripts/script.sh

But I need to be able to run the commands from within a script without having to type them. All of these don't work:

adb shell sh ./data/scripts/script.sh
adb shell . ./data/scripts/script.sh
adb shell 'dd if="/data/scripts/screen.dump" bs=4 skip=540503 count=1 | hd'

The main error I'm getting is Usage: hd [-b base] [-c count] [-r delay] file (which is weird because I know it's correct), and occasionally also dd: stdout: Broken pipe. I've spent about 5 hours today trying only to solve this and I'm out of ideas... If anyone has one let me know!

adb shell cannot access directories in /data/ without root access. Are you running with root privileges? What's the ownership of /data/scripts? What's SELinux status?

@IrfanLatif I'm not sure if I'm answering your question correctly, but running ls -ld /data gave me back system.

What's the output of adb shell id, adb shell ls -l /data/scripts and adb shell getenforce? From where did you get hd binary? Did you try hexdump?

uid=0(root) gid=0(root) (I've shortened the output)
All of them are root
getenforce is Disabled
I have BusyBox installed under /xbin, and I just tested using hexdump instead of hd and it worked... Why though?

For anyone working with hd, take care that replacing it with hexdump won't return the same results as hd! Instead use hexdump -C, more about it here.


text:
Send a notification (or just vibrate) to phone via ADB/shell
I would like to be able to send some kind of notification to my android using a remote shell script (SimpleSSHD running as root, so basically the same as an adb shell).
On an iOS device I can use the commands cvibrate to make the device vibrate and sbalert to display a notification via SSH. I would like to do the same, but on android.
It would be great if it could be an actual notification like any other app would invoke, but a way to just vibrate it would suffice aswell if both isn't possible on android.
This seems like a very simple task, but I've not been able to find a solution...

For Termux there is the Termux-vibrate and the Termux-notification package. Not sure how make those calls available in a stand-alone sshd. Also relevant: https://android.stackexchange.com/questions/207411

@Robert Looking at the source code of NotificationAPI.java and VibrateAPI.java - This is an app-based solution (that I'd like to avoid) that only works with Termux, using the Termux API app to control notifications/vibration/etc.

@Robert - HOWEVER: I've tried echo 200 > /sys/class/timed_output/vibrator/enable from the comments of the Q you linked: And it worked! I'd like to keep the qusetion open because I'd prefer notifications or some sort of alert/pop-up on the screen aswell, but if nothing else is possible without the Termux app + API that would be good enough of an answer for me. (Note for others: That command requires root (at least over SSH), which for me is not an issue though.)

Also see Notify4Scripts

Use cmd notification:
cmd notification post [flags] <tag> <text>

If you are root notification will not be displayed:
su -lp 2000 -c "cmd notification post -S bigtext -t 'Title' 'Tag' 'Multiline text'"

Nice. I was able to post notification with root. It still showed as being posted from Shell though. Android 10 on a OnePlus 6 using Termux.

What is even more annoying for me: I found no way to send without triggering the notification sound

Which Android versions does/should this work on?

@confetti Android 10: https://android.googlesource.com/platform/frameworks/base/+/7647f1d1b8189a6d7ab321ce67f60d115cb3598b

Simple example: adb shell cmd notification post -S bigtext -t 'Title' 'Tag' 'Multiline text'

You can setup a Task in Tasker which you can invoke from command-line. The task can be setup with actions of your liking in combination, such as show a notification and vibrate with XYZ pattern. When setting up a task in Tasker, setup the action like this: Alert → Notify
Fill up the fields as you like. Make sure to enable Allow External Access setting under Preferences →  Misc, accessible from three-dots line on the right edge of top bar in Tasker's homescreen.
As for invoking the task from command line, run:
su -c am broadcast -a net.dinglisch.android.taskerm.ACTION_TASK --es "task_name" "YOUR_TASK"

Replace YOUR_TASK with your task's name.
Tip: you can setup Tasker to show text of your liking in your notification  by a bit more tricks. Setup a task to watch for a file for changes and assign an action to change the value of a tasker variable to the contents of that file. In your aforesaid vibration/notification task, when filling up the field for "text", assign that local variable instead. So next time, when invoking the task, change the contents of the file for a custom text notification before sending that command.
Tip2: it is also possible that send variable directly to a task using command-line, but I don't have much experience with it so you've got to ask uncle web.

Thank you for the answer, +1 especially for the tips. I would much prefer a solution that doesn't require an external application. Seems not possible though, but I'll probably go with notify4scripts since it seems more lightweight and easier to customize.

@confetti every notification is sent by an app, so there isn't a way to create otherwise. System apps don't provide a method to send notification from commandline, so a 3rd party app is needed. I once tried to create some surfaces/windows directly dealing with SurfaceFlinger, but due to lack of knowledge couldn't figure out where to proceed. I don't think creating notifications natively without involving Android's Java framework would be a feasible solution (if possible at all). There is a mishmash of APIs and IPCs, at lower level closed source as well.

@IrfanLatif Thanks for the input. I guess I'll just stick with the vibrate-only solution then as it's the most simple and sufficient for my alert system. Maybe you want to add that to your answer so I can accept it? I'm sure the app-based solution will be helpful to others aswell.

@confetti yes the app based solution is helpful, I have been using it since long to send notifications from Linux environment. Notify4Scripts has a wiki page: https://github.com/halnovemila/Notify4Scripts/wiki and mentioned in an answer already: https://android.stackexchange.com/questions/155338/how-to-send-notifications-to-an-android-device-from-a-pc-via-usb/173562#173562. So I don't think it needs any further input. You may please self answer your question if you want to.

@IrfanLatif Oh, thank you, I was talking to Firelord though asking to add the echo 200 > /sys/class/timed_output/vibrator/enable command to the answer because both solutions are great and would be ideal for different scenarios and people so I feel like both deserve to be the accepted answer.


text:
Android Update Results in "Hash of data does not match digest in descriptor" error
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?

shame on samsung hope you got all your data in cloud

Fortunately, yes. Tempted to flash it with odin as there are suggestions this might work.

Partition TZ sounds like TrustZone; Trusted Execution Environment (TEE) on ARM processors. Vendors keep the pre-kernel boot stages completely closed-source. So I don't think there would be any documented support related to the issue.

@IrfanLatif thank. So does this support an assumption that this is an issue closer related to hardware?

@JamesWiseman "closed-source" software component is a more probable assumption. It's not about Android OS but totally related to SoC, bootloaders etc. So you can say related to hardware.

I realise this isn't maybe the most helpful of answers, but I thought I'd post it anyway in case someone else finds it useful.
The phone was under warranty, so took it to the local Samsung store. The support assistants commented that they'd "never seen this error before". It went in for repair and emerged fully working again.
When I asked what the problem one, I got a vague "they replaced some hardware component".
Again, not the most helpful, but enough to say that it looks like something beyond the help of a software re-install.

I had the same issue and Odin firmware flash did the trick.
For the next unlucky soul to stumble on this thread for help I'll add some more info.
Download Odin - https://samsungodin.com/how-to-use-odin/
Download Firmware - https://www.sammobile.com/samsung/ - make sure to download the files for you phone and more specifically your carrier!
For some reason Samgsung.com doesn't have the firmware for the S10+ and I didn't check other phones. Sammobile allows you to get the files for free but they have add timers on the download links. You need to turn off adblock otherwise you will never see the download link pop up. Took me like 20 minutes to figure this out. I can't vouch for this site but there's a very angry commenter on the how to page so at least he believes in it.
If you arrived at the error the same way I did you will then want to update you phone from the Samsung Switch application. I received a shitty refurb to replace my original that bricked so I've had to only update from this application. (Thanks Samsung/Verizon)
Smart Switch - https://www.samsung.com/us/smart-switch/
You plug in your phone after turning on this app and it will prompt to update. Idk if this application can fail like the normal downloading over the network but its got me past two update errors now.


text:
Airdots distorted audio while calling
I have a Xiaomi Redmi Note 6 pro and a pair of black Xiaomi AirDots but every time I call and play music together, the music is as distorted as the call itself like the music's coming from the caller.
How can I undistort the audio?

You can't.
Bluetooth has many profiles, ie. modes that have different capabilities. When you're just playing music, the phone is using A2DP profile which is optimized for unidirectional high-quality sound. When you're calling someone, the phone switches to HSP profile, which offers bidirectional sound - but allocating some of the bandwidth for microphone reduces bandwidth available for incoming audio, degrading quality. You can't have both because there's not enough bandwidth.


text:
How to remotely log into google account?
I lost my phone and the person who found it, logged out of my google account. Is there a way to make my devive log into google account? (so that i can use "find my phone" to find it.)

I am sorry but if the Google account has been removed from the phone it is now no longer related to you.
That is the reason you should protect your phone at least with a PIN code. Then your Google account can't be removed from the device that easily. Of course a factory reset can still be performed but then the "finder" of your device runs into the Factory reset Protection (FRP).

Thanks for your answer.


text:
How to avoid or track phone usage overnight
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.

ask your parents to set up Digital Wellbeing

@Spatrico You might want to see this: https://play.google.com/store/apps/details?id=com.teqtic.lockmeout&hl=en

Ok so I answered my own question, I found this app: https://play.google.com/store/apps/details?id=com.hash.ar.systemlog that generates a readable log of every event that happens on the phone. This, partnered with the app mentioned in a comment by @Natsu Kage achieves both things that I hoped to achieve


text:
How to access /storage/emulated/10 (multi-users env) in adb shell on Android 9+ without root access?
I have two Android system users configured.
$ pm list users
Users:
    UserInfo{0:Owner:13} running
    UserInfo{10:security space:13} running
    UserInfo{999:XSpace:800010} running

When the mobile is running at Android 8.1, I can access the secondary user's space /storage/emulated/10 easily in adb shell.
But after I upgrade to Android 9, I can no longer do it:
$ ls /storage/emulated/10
ls: /storage/emulated/10: Permission denied

Any ideas how I can access my second user's space in adb shell?
Btw, my /sdcard/ always points to the first user's space /storage/emulated/0 at adb shell regardless what my current user is at mobile UI. The adb shell connection remains the same when I switch users at mobile UI too.
When I switch users at mobile UI level, my adb connection remains the same. And I do see the current user changes with the following command:
$ dumpsys activity | grep mCurrentUser
    mCurrentUser=0
$ dumpsys activity | grep mCurrentUser
    mCurrentUser=10

WHY IS ADB DENIED ACCESS TO MULTI-USER STORAGE?
Access to /storage/emulated/10 is denied from adb shell due to this change in Android 9:

Add "default_normal" support to vold.
  This new flag isolates each user on a multi-user device for security reasons.

What the mount option default_normal does in sdcardfs is explained here:

The default_normal option causes mounts with the gid set to AID_SDCARD_RW to have user specific gids, as in the normal case.

The whole story is about Android's filesystem emulation in order to have a permission-less directory (/sdcard) which makes file sharing among multiple UNIX users (apps) possible. It's achieved through mount namespaces and different VIEWs of /data/media mounted in /mnt/runtime/. Apps belonging to secondary as well as primary user have isolated mount namespaces. For details please see What is the “u#_everybody” UID? and What is /storage/emulated/0/?.

Btw, my /sdcard/ always points to the first user's space /storage/emulated/0 at adb shell regardless what my current user is at mobile UI.

For all native processes running in root mount namespace (including adbd), /sdcard is a symlink to /storage/emulated/0 and /storage/emulated is bind mounted from /mnt/runtime/default. The device owner's (User_ID: 0) files in /storage/emulated/0 have ownership root:sdcard_rw (0:1015) and permission mode 0771, while secondary profile/user's (say with User_ID: 10) files in /storage/emulated/10 have ownership 0:1001015.
It means that non-root processes can read the directories only if they are members of supplementary groups: 0001015, 1001015, 11001015 and so on, "others" can only traverse the directories. Since adbd is member of only 1015 GID, it can read only device owner's files, not of secondary users.
However up to Android 8 there was an exception to the above rule: to all the processes running in root mount namespace (non-app processes), sdcardfs always returned the directories /storage/emulated/[N] owned by GID 1015. So adb was able to read these directories. However the exception has been removed in Android 9 using mount option default_normal.

HOW TO ACCESS MULTIPLE-USERS FILES FROM ADB?
WITH ROOT ACCESS:
You can mount the emulated filesystem without default_normal option:
~# umount /mnt/runtime/*/emulated
~# /system/bin/sdcard -u 1023 -g 1023 -m -w -G /data/media emulated

Or to make changes permanent, replace sdcard binary with a shell script:
~# cd /system/bin/; mv sdcard sdcard.bin; touch sdcard
~# chown 0.2000 sdcard*; chmod 0755 sdcard*
~# chcon u:object_r:system_file:s0 sdcard
~# chcon u:object_r:sdcardd_exec:s0 sdcard.bin

/system/bin/sdcard (remove -i argument passed by vold):
#!/system/bin/sh

set -- $(echo "$*" | sed 's/-i //')
/system/bin/sdcard.bin $*

After reboot you should be able to read files in /storage/emulated/10 from adb shell.
WITHOUT ROOT ACCESS:
On Android 9+ filesystem level access to secondary users/profiles is not possible from adb on user builds of ROMs (i.e. without root). Only interaction through adb commands which support --user option (am, pm, content etc.) is possible. Documented in What’s in Android 9 for enterprise apps:

"To help keep work data in the work profile, the Android Debug Bridge (adb) tool can’t access directories and files in the work profile."

If the files owned by secondary users are accessible to primary user (through adb or any other means, except through Device/Work Policy Controller app), it breaks the intended isolation between users/profiles which is controlled through Android APIs. See more details in How to share files between regular account and work account?
It should be noted that Android Debugging Bridge (adb) is meant to be used by developers for debugging, not by end users. That's why a fully-managed device owner can completely disable adb.
There's a suggested workaround to transfer data with secondary users/profiles as explained in Testing Multiple Users:

"adb (or more accurately the adbd daemon) always runs as the system user (user ID = 0) regardless of which user is current. Therefore device paths that are user dependent (such as /sdcard/) always resolve as the system user."
  ...
  "Access to /sdcard paths of secondary users is denied starting in Android 9."
  ...
  "Because adb runs as the system user and data is sandboxed in Android 9 and higher, you must use content providers to push or pull any test data from a nonsystem user."

For instance to transfer test.jpg file to /storage/emulated/10/Pictures/ run the following commands from adb shell:
~$ content insert --user 10 --uri content://media/external/images/media/ --bind _display_name:s:test.jpg
~$ ID=$(content query --user 10 --projection _id --uri content://media/external/images/media/ --where _display_name=\'test.jpg\' | grep -o '_id=[0-9]*' | cut -d= -f2)
~$ content write --user 10 --uri content://media/external/images/media/$ID < test.jpg

However it's not a practical approach for bulk data transfers on a regular basis.

Thanks a lot for this answer. I have upvoted it because it provides very detail explanation about this problem. But due to I want to access the directory without root access, I can not mark it as the answer for now. In theory, I know the 2nd user password (I am the 2nd user), I should be able to access my own files/photos. If there is no way to achieve it, google did something extremely wrong here. Thanks.

@sgon00 personally I neither use adb for data transfer, nor Work Profiles. Also I'm not sure what's Google's stance on this issue. But in my opinion if the files owned by secondary user are accessible to primary user (through adb or any other means, except through Device/Work Policy Controller app), it nullifies the whole purpose of Work Profile. Note that the Work Profiles are not to use duplicate apps, but for isolation. So this enhanced isolation in Android 9 is justified. I wanted to write a few lines on this in my answer but keeping in view the length of the answer I didn't.

Just saw this good answer. So I cannot mkdir to emulated/10 too?

@user12158726 yes. If /storage/emulated/10 isn't accessible, you can't read or write anything.

So i must root the phone. It is nothing to do with It policy setup?

Shared folder for all users is /storage/emulated/*/Android/obb
where * = userid


text:
Websites suddenly inaccessible but Google search works
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 had a similar effect (not on android, though) when I was in a network which only provided IPv6 access, not IPv4.

At the moment a large number of popular website are dropping support for all SSL/TLS versions below TLS1.2 because of the known vulnerabilities in TLS1.1/TLS1.0 and older.
Your device is very very old and does not support TLS1.2 therefore you can't connect to certain sites like https://wikipedia.org which requires TLS 1.2 according to the test of SSLLabs.
If you use extreme/compressing mode of Opera Mini you connect to a proxy at Opera instead that compresses and re-encrypts the traffic. Therefore using this redirection you can still access those sites as long as Opera not also increases the minimum TLS version on this proxy.
Some Webbrowsers may also include their own TLS implementation with TLS1.2 support. But usually they have dropped support for Android 2.x long time ago.
Conclusion: Your device finally comes to an end. If there is no newer custom ROM available (AFAIR for TLS1.2 Android 4.2/4.4 is required) allow it to rest in peace and get a new phone.

So does that mean, it would soon stop displaying even google.com ? (if google also implemented that in future)

@user152435 Earlier or later yes. For Google I don't know a concrete date but this site (Stackexchange) will drop TLS1.0/1.1 support on Feb 12th.

It looks like there were unofficial CyanogenMod/Lineage releases that could bring this device up to Android 7 Nougat.  Performance would likely be awful and the device would still be exposed to a large number of known security vulnerabilities, so I would not recommend doing it.

If anyone ever wondered why I'm against mandatory TLS, I'll point them to this post. (TLS is fine, there should just be an off switch somewhere). Maybe there's a way to make it work with a TLS 1.1 proxy server.

something similar happened to windows XP like last year - you had 2 chances - use the last working firefox ... or give up on the https-part of the web. Interesting was that google itself worked up to the point that you saw the google-doodle and search field - but when you used it - it couldnt deliver the results since those came from a different server


text:
Connecting Phone to PC...USB socket seems to be dirty
It used to work.
I could connect my phone to my PC with a USB cable and then browse the phone, like a mounted USB drive, with Windows explorer.   Moving files back and forth was easy.
Then it stopped working.  I used a wooden toothpick to dig some lint and dirt out of the phone's USB port.  I also hit it with compressed air.
It helped but it is really intermittent...I have to wiggle and jiggle the USB cable to get the drive to mount.  And it's not reliable.   I tried another cable with the same result.
So...what is the best way to clean a phone's USB port?

Are you sure the port is still dirty? The mechanical force you used for (un)plugging and cleaning may have caused a loose connection between the USB socket and the phone mainboard.

the only solution is resoldering and replace new usb jack for ~ 30 bucks. or if you're lucky you can replace usb connector board DIY (much cheaper). watch on youtube, buy on aliexpress

First, I powered off the phone.
Then, I took some contact cleaner (the kind used to clean old TV tuners and potentiometers) and sprayed it into the female USB port.  I plugged and unplugged the male USB plug several times.  I blew out the port with compressed air and powered the phone back on.
Success!
(thanks for the suggestions and comments)


text:
How to use Google apps with VPN on? (Android 10)
I am using VPN because Google apps only work via proxied connections but recently all of the Google apps stop working if I have the VPN mode on (if I switch to NAT mode they works). I think Google detects VPN and disable its apps' network requests.
P.S. the servers work. The same phone running Android 9 works. Also other devices running Android 5 / 6 /7 works too.

What type of VPN are you talking about? A corporate VPN or one of the free/paid VPN providers?

VPN mode, not a specific VPN, any VPN will rely on VPN mode (or NAT mode). Read about what it is here: https://developer.android.com/reference/android/net/VpnService

Here is an additional documentation on this API: https://developer.android.com/guide/topics/connectivity/vpn

The reason I was asking is not the on-device part but but the network the VPN endpoint is located in. If there is a SSL/TLS interception proxy active (aka Man-in-the-Middle attack) Google Playstore does not work because it performs certificate pinning.

The server isn't an issue, I own the servers - if I use the NAT mode it works. Also older devices work too (Android 5 / 6).

I still don't understand what you mean with NAT mode. Usually the VPN just connects the client to a different network and it is not providing any routing services. You should edit your question and give more details on your set-up. Which VPN server you use what VPN settings you have on the device and so on.

NAT (network address translation) mode is a mode that doesn't rely on the VPN interface provided by android but rather directly taking over the TUN. I am not adding any of the server side information because it is clearly a client side issue - because all other devices running older versions of Android connecting via the same VPN works. If you care to know the servers are a bunch of computers in the US and they provide routing services.

"I think Google detects VPN" isn't that already an answer? google coorporates with government

@alecxs how do we cripple the detection?

idk. do we need google apps?

It's funny google apps just work again today even with the vpn on, I then restart the phone and they still work with the vpn on, I restarted a few more times and they kept working...


text:
What is the best way to get my Samsung Note 3 SM-N900V to at least Nougat 7.0?
The step by step examples have holes in their solution for one reason or another.
I need to:
a. USB debug (easy)
b. Root w/o KNOX violation
c. Install TWRP
d. Flash a ROM like Apply a custom ROM like RR-N-v5.8.2
Has anyone done this in 2020? It seems like links for these solutions vanish for some reason. This like  ArabicTools and Root_de_la_Vega-SM-N900V.7z seemed to have vanished.

never heard about b. but still learning..

found a non corrupt Root_de_la_Vega-SM-N900V.7z here:
http://rootjunkysdl.com/files/?dir=Galaxy%20Note%203/MI9%20build%20root
http://rootjunkysdl.com/files/Galaxy%20Note%203/MI9%20build%20root/Root_de_la_Vega-SM-N900V.7z
I am about to give it a go myself.


text:
"Blocked by your IT admin" Samsung Galaxy 8
I'm trying to install Android Auto from apk but I get the message "Blocked by your IT admin. Unknown apps can't be installed on this device." In the last 18 months I have downloaded that app already 2x without any problems.
I have already given permission to install unknown apps from Chrome and My files. Deactivated Play Secure and any device admin apps (the only one I saw was Find my location).
I do have work e-mail app but according to my employer "Our Mobile Device Management platform (MobileIron) doesn't block any installation on your private device, as a completely separate Workspace is created and managed by us, which doesn't interfere with your private configuration".
What else can I try doing before I ask them to remove MobileIron?

Had the same issue. For me it was only fixed by disabling Google Play Store in personal profile. It wasn't easy process as it depends on Google Play services which can be disabled only after stopping Work profile. So the flow was: 1) Stop Work profile from top menu, 2) Force Stop and disable Google Play Services in Personal Profile, 3) Disable and stop Google Play Store in personal profile. After this I started Work profile again.
Hope this will help.


text:
Writing Script to add eth0 interface on S7 edge
can someone take a look over this script? I want to add it in a sh file. When I connect my ethernet adapter I don't want enter all commands again. I just want to execute it from shell. Is this correct?
#!/bin/sh
ip link set eth0 up
sleep 1;
ip addr add 192.168.178.50/24 dev eth0
sleep 1;
ip route add default via 192.168.178.1 dev eth0
sleep 1;
ndc network create 1
sleep 1;
ndc network interface add 1 eth0
sleep 1;
ndc resolver setnetdns 1 8.8.8.8 8.8.4.4
sleep 1;
ndc network default set 1

When I enter the commands directly into terminal emulator ir works, when I execute the script with #sh filename.sh I get error.
The second problem is, my file in root folder isn't here anymore after reboot.

question can be answered by testing yourself. shebang is #!/system/bin/sh for android

@alecxs /bin can be a symlink: https://android.googlesource.com/platform/system/core/+/ff1ef9f2b10d98131ea8945c642dd8388d9b0250

it does not work as espected. when I enter the commands directly into terminal emulator ir works, when I execute the script with #sh filename.sh I get error. The second problem is, my file in root folder isn't here anymore after reboot.

Answered here: Any changes to files in root directory (/) are gone after reboot and Commands run on terminal but throw errors in shell script

Irfan Latif, thanks for your help. But If I use ethernet seldom, so its enough to copy and paste the commands over ADB Wifi. The ndc commands work, but with ifconfig you only configure your IP and netmask. The gateway works also over ndc, the command is ndc network route add  eth0 0.0.0.0/0 0.0.0.0 (the last 0.0.0.0 stands for your gateway IP).


text:
W/ziparchive Zip: unable to allocate X bites at offset 0 : No space left on device while flashing factory image on angler (Nexus 6P)
I was trying to do flash factory image on angler on my Nexus 6P. There is some No space left on device error:
./flash-all.sh # added set -x to script
+ fastboot flash bootloader bootloader-angler-angler-03.68.img
target reported max download size of 494927872 bytes
sending 'bootloader' (3544 KB)...
OKAY [  0.127s]
writing 'bootloader'...
OKAY [  0.208s]
finished. total time: 0.335s
+ fastboot reboot-bootloader
rebooting into bootloader...
OKAY [  0.022s]
finished. total time: 0.073s
+ sleep 5
+ fastboot flash radio radio-angler-angler-03.81.img
< waiting for any device >
target reported max download size of 494927872 bytes
sending 'radio' (48728 KB)...
OKAY [  1.283s]
writing 'radio'...
OKAY [  2.174s]
finished. total time: 3.457s
+ fastboot reboot-bootloader
rebooting into bootloader...
OKAY [  0.022s]
finished. total time: 0.072s
+ sleep 5
+ fastboot -w update image-angler-n2g48c.zip
extracting android-info.txt (0 MB)...
extracting boot.img (12 MB)...
target reported max download size of 494927872 bytes
archive does not contain 'boot.sig'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
extracting recovery.img (17 MB)...
archive does not contain 'recovery.sig'
extracting system.img (2727 MB)...
W/ziparchive(66399): Zip: unable to allocate  2860210996 bytes at offset 0 : \
   No space left on device
failed to extract 'system.img': I/O error

(space inserted by myself for better readability)
I suppose this is lacking space on the phone.
shell@angler: $ df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                     1.4G    484.0K      1.4G   0% /dev
tmpfs                     1.4G         0      1.4G   0% /mnt
/dev/block/dm-0           3.0G      1.8G      1.1G  62% /system
/dev/block/dm-1         196.6M    184.7M      8.0M  96% /vendor
/dev/block/platform/soc.0/f9824900.sdhci/by-name/cache
                         92.9M      1.8M     88.0M   2% /cache
/dev/block/platform/soc.0/f9824900.sdhci/by-name/persist
                          3.9M    740.0K      3.0M  20% /persist
/dev/block/platform/soc.0/f9824900.sdhci/by-name/modem
                         80.0M     47.5M     32.4M  59% /firmware
tmpfs                     1.4G         0      1.4G   0% /storage
/dev/block/dm-2          53.5G    132.9M     52.9G   0% /data
df: /mnt/runtime/default/emulated: Permission denied
/data/media              53.5G    132.9M     52.9G   0% /storage/emulated

Using fastboot version 1:8.1.0+r23-5 from Debian, Android is angler:8.1.0.
Any idea what could be the problem?
Searching in the sources, it fails in static void* unzip_file(ZipArchiveHandle zip, const char* entry_name, int64_t* sz)
int error = ExtractToMemory(zip, &zip_entry, data, zip_entry.uncompressed_length);
if (error != 0) {
    fprintf(stderr, "failed to extract '%s': %s\n", entry_name, ErrorCodeString(error));
    free(data);
    return 0;
}

https://android.googlesource.com/platform/system/core/+/android-8.1.0_r73/fastboot/fastboot.cpp#505
or in static int unzip_to_file(ZipArchiveHandle zip, const char* entry_name)
int error = ExtractEntryToFile(zip, &zip_entry, fd);
if (error != 0) {
    fprintf(stderr, "failed to extract '%s': %s\n", entry_name, ErrorCodeString(error));
    return -1;
}

https://android.googlesource.com/platform/system/core/+/android-8.1.0_r73/fastboot/fastboot.cpp#628
UPDATE: it looks like it's really lack of space on the laptop. Previously I had about 8GB, which I considered enough. After clear to have 17GB and trying to update different image image-angler-nmf26f.zip I got different error (probably related /tmp being tmpfs):
strace -o strace.log fastboot -w update image-angler-nmf26f.zip
extracting android-info.txt (0 MB)...
extracting boot.img (12 MB)...
target reported max download size of 494927872 bytes
archive does not contain 'boot.sig'
archive does not contain 'dtbo.img'
archive does not contain 'dt.img'
extracting recovery.img (17 MB)...
archive does not contain 'recovery.sig'
extracting system.img (2691 MB)...
archive does not contain 'system.sig'
archive does not contain 'vbmeta.img'
extracting vendor.img (194 MB)...
W/ziparchive(109113): Zip: unable to allocate  204079852 bytes at offset 0 : No space left on device
failed to extract 'vendor.img': I/O error
wiping userdata...
Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.
mke2fs 1.45.5 (07-Jan-2020)
/tmp/TemporaryFile-xaoMGH: Unimplemented ext2 library function while setting up superblock
/usr/lib/android-sdk/platform-tools/mke2fs failed with status 1
mke2fs failed: 1
error: Cannot generate image for userdata

On Linux you can do TMPDIR=<DIR WITH MORE SPACE THAN /tmp> ./flash-all.sh to override where fastboot unzips to.

According to the others is -w option is somehow broken and should be replaced with fastboot erase <partition>, e.g.:
fastboot oem unlock
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot erase userdata
fastboot flash bootloader bootloader-angler-angler-03.68.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-angler-angler-03.81.img

I the end I followed Firelord suggestion to unpack image-angler-nmf26f.zip (instead of flashing it) and flash all partitions manually:
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash vendor vendor.img

NOTE: running commands fastboot erase <partition> is not needed as fastboot flash erase system.


text:
Factory reset a Panasonic Lumix DMC-CM1 - can't start settings to enable USB debugging
A recent update to the Panasonic Lumix DMC-CM1 seems to have broken something fundamental.
System apps will load but the screen will stay blank. e.g. Settings loads up and shows the header with 'Settings' but the rest of the screen is white. I have left it 30 mins and it stays that way. It frequently stalls and has to be rebooted, sometimes you see Launcher3/Settings/etc is not responding, neither wait nor close help. Same in safe mode. I have turned on airplane mode, turned off basically everything I can, removed SD card and SIM etc. Still the same. Google Play wont load so I can't load any apps that might help.
Unfortunately that means I can't turn on Enable USB Debugging, and so I am limited in my options. It seems like the only options are the following:

Using a 'secret code': *#06# works (shows IMEI num) but nothing else seems to, though I did find an info window in the background one time (I think must have been *#*#4636#*#*). I am going off a list of codes I found here.
Using Recovery Mode: There seem to be a lot of different ideas on how to get into recovery on this phone, but none of them work for me. It seems like it's possible to get into a fastboot mode and from there you can do adb reboot recovery but only if Enable USB Debugging is on! :/

Is there anything else I can do?  I am not even sure what version of Android is on it, perhaps 4.4

the linked post descripes how to enter fastboot mode without usb-debugging. however, you can not boot straight into recovery from fastboot mode. but you can try to unlock bootloader for factory reset (fastboot boot recovery.img from pc will also work after this)

Recent update? Android version 5.0.2 with android security patch level 2015-12-01 is the latest I can get. That last updated happened maybe 3 year ago.


text:
SHELL Command works fine as a standalone command, but fails when put into a shell script?
Android 8.1 PIXEL 2 with root access.
I have seen this asked here once before but the only solution didn't help me at all. I am going to try and make this as simple as I can for the example.
If I run the following command in terminal emulator or adb shell:
am force-stop com.myapp.frustrated

It will quit the app just fine. But when I run it in this shell script:
#!/bin/sh
am force-stop com.myapp.frustrated

Nothing happens. It is odd to me that I can do many other commands just fine in a script, but a handful of them do not work.
Any suggestions you have are much appreciated.

Make sure that shell exists at path /bin/sh or use /system/bin/sh. Also take care of line endings in script: Commands run on terminal but throw errors in shell script

Are you running the script from within a adb shell or just from the command prompt with adb?

Removing #!/bin/sh fixed my issue. Thanks

Replacing it by /system/bin/sh would most likely have worked as well. Background: That line specifies the binary ("interpreter") to run this script with. As there is no /bin/sh on Android, the specified interpreter wasn't found and thus the script not run. Could you please verify that – and then integrate these facts with your answer? When done please ping me, so I can remove my comment again.

As a side note: on recent Android versions /bin is a symlink to /system/bin.


text:
Google email forgotten after hard reset
My father did a hard reset on his Samsung A10 to give to me as a gift, but he forgot his password and Google email.
I checked the RootJunky video mentioned in this topic but it seems that is not working anymore.
Is there another way to bypass the "Verify the account"? The A10 is unrooted and I don't want to do it.

check SIM method i posted in comments

You can recover the Google user name by using the phone number or a recovery e-mail address set in the account: https://accounts.google.com/signin/v2/usernamerecovery?hl=en&flowName=GlifWebSignIn&flowEntry=ServiceLogin

@Robert It was not any SIM card in that A10 because my father fixed his old phone before change the SIM card to the new phone. So it is not possible to recover his account by the phone number.

@alecxs I will check that video, thank you for replying. However, as I said to Robert, this A10 never has a SIM card inside. Is still possible to use that method with another SIM card?

@alecxs IT WORKS!!!! If you post the link on the answer here I will accept it.


text:
Bypass FRP on RCA Tablet
My friend recently purchased a second-hand RCA tablet running Android 6.0 Marshmallow. He came to me to root the device as I have helped him before. Although I have made a mistake this time. I factory reset the device with a Google account still on the device. My friend can no longer get in contact with the original owner.
I've looked everywhere and other FRP bypass guides don't work because they have all been patched.

I managed to bypass setup and open settings, but when pressing on build number many times, nothing happened
I installed an app that would pull up developer options, but it just says that it's not available for this user
I've factory reset via settings, no luck
I've force-killed the setup application, home button reappears but doesn't do anything when pressed
I disabled Google in an attempt to prevent it from asking for an account to be set up, still no luck

I've now run out of ideas, and I'm wondering if anyone can help me.

I brought the RCA tablet DVD combos from eBay in Feb 2021 and with with same issue with PIN code or needs to enter previous gmail been synced. After spending one day research on how to bypass the FRP code. I found this YouTub video works. Be aware of it needs to have a second language to make it works. https://youtu.be/kqiRw-6HRxQ. Once it works, be sure you uninstall the two software from their server.

I figured it out!
Step 1:

First, boot up normally
Sign in to a network
Allow it to check the connection
Then when it asks you to verify your account, press the back button until you get back to networking
Choose a different network, type a bunch of random letters/numbers then press show password select it, press assist.
Then Google will open
Search for Settings
From Settings, go to Backup/reset
Reset the device
Boot normally once again

Step 2:

You will be asked to verify again. Turn your device off
Reboot into safe mode
Then re-bypass into Settings
Head to Device info
Enable developer mode (press build number 7 times)
You can't enable dev mode unless you are in safe mode as there is protection for it
Once you have dev mode enabled, you need to turn on USB debugging and OEM unlock

Whatever you do, don't press the home button. If it works, all of the settings will be unapplied and setup will restart
Step 3:

Now, reboot to recovery (power off, then hold the volume up button while turning the device back on)
Next, we need to scroll to <Reboot to Bootloader>
Press the power button to select it. You will boot into fastboot

Now you will need a PC

First, let's check if OEM unlocking is enabled. Run fastboot flashing get_unlock_ability from CMD/terminal (you have to have ADB/fastboot installed).
You will get (bootloader) unlock_ability = 0 if it isn't enabled. But if it is, you will get (bootloader) unlock_ability = 1XXXXXXX

If it's enabled, we have to unlock the bootloader (this will void your warranty). We have to do this as OEM unlock isn't really enabled. What we've done is made it so the system sees that it's both enabled and disabled. This means the only command that will work is fastboot oem unlock

We're going to run this command. When you do, spam the volume up button to select yes.

Now we're almost done. We have to unlock it from flashing too and unlock system critical (in the security update from 2016, the FRP partition was marked as critical and unless we unlock critical partitions, the FRP lock won't ever go away)

First, flashing unlock. Run fastboot flashing unlock

Spam the volume up again

Then run fastboot flashing unlock_critical

Spam volume up again

Now close ADB/fastboot on your PC

And unplug your device

Since security is still enabled, fastboot reboot doesn't work. So we have to wait for the device to drain completely.

Then charge it a bit and turn it back on. It will wipe the FRP partition alone with all the other ones, except for the /boot partition.

FRP is disabled now.
This will work on any Android device with fastboot. Did this from an RCA tablet, so it does.

Yes it works, tested with rca-rct6873w42mkc. Many thanks to OMG(user)

What if I I click on a different network after pressing back and input the random letter/numbers. Then show password and select, but all that comes up after it's selected is "Cut, Copy, Paste" no assist. What do I do then.


text:
Log ADB Commands?
I have an application that uses the ADB interface as communication with my Android phone. When I run the application and press the button, the application somehow sends commands to my android, to activate special features that exist on the android application.
My question is, can I save what action the application does? especially commands related to ADB? How does it work? What are the references and commands?
For Example, there is an app called "Gamesir World" installed on Android device, this app should be activated special feature called "remapper", with pc help, the name of pc app is "xiaoji-vtouch.exe". Between this platform, I see on '%temp%'  windows folder, that xiaoji app have a folder that contains ADB, then I assumed this app called some of ADB shell to activate the "Gamesir World, Remapper Special feature". I want to know what the xiaoji do with the ADB, because there another options to activate this feature using there device product called A3 remapper, but I want to pass this, perhaps I can activate this feature without another device.
Link of Applications
Android, https://www.xiaoji.com/gsw/index_en.html
Windows, https://www.xiaoji.com/download/vtouch/xiaoji-vtouch-1.2.0.zip
Documentations, https://www.xiaoji.com/help/gw/2274.html

If it runs adb commands locally... you can trick it.
Assuming it s a rooted android - Make a adb binary which calls the original one. What you would be doing is just a tee, send the command to the adb and log it somewhere too.

what is runs adb commands locally ? its from the phone its self ? , sadly my android was not rooted :)

This might be a legit question of "logging ADB commands on Android-side" (if it's even possible), but there's also reverse-engineering the .exe file (which is not about Android at all, even though it calls ADB commands). I've tried opening the .exe file using Notepad++ and found some ADB commands but hard to decipher. That said, we also have a sister site for [reverseengineering.se].

There are several solutions:
1. Replace adb binary (see comments by Curious Mind)
Replace the adb executable on the PC with one that calls the original adb executable and print all commands. This variant is pretty limited as it only works if the program calls every command in the staly adb shell commandxyz. If it opens a shell and sends multiple commands in the shell stream you will not be able to trace them.
2. Use an adb binary with trace activated
ADB has some trace capabilities in it's source code. by default it is not active, but using a self-compiled version of adb and a patch that activates this capabilities you would be able t see all commands.
See this question for details: https://stackoverflow.com/questions/5791722/how-do-i-enable-adb-tracing
3. Use ADB over IP and capture the data via Wireshark:
Connect to your device via IP: adb tcpip 5555 and the use the IP instead of the USB connection. The IP connection can the be captured by Wireshark (set the capture filter to tcp port 5555).
The main problem is that adb does not transit commands but individual characters. Therefore reconstructing the command is pretty complicated, even when decoding the TCP traffic to port 5555 as ADB protocol (while running select "Decode As" in the context menu).
Then you can filter the traffic for outgoing adb commands: ip.src==<your PC IP> && adb.data
The main problem is that usually every character is sent as individual ADB DATA packet with it's data as 4 bytes length + 4 bytes character (ASCII character decoded as integer).
The following sample screenshot shows the capture of the command hello world 12345 typed in on open adb shell (see the last column and in it the last character of each data packet):


text:
Unexpected rooted alert?
I got a call from my company's Google Suite administrator that they got an alert about my phone (a Samsung S10 running Android 10) getting rooted this morning.
Google's support site isn't really helpful with this, stating only that they consider my device compromised because it's rooted.
All additional information I got about the alert is:

Summary:         An Android device was rooted. (Device ID xxxxxxxxxxxxxxxx)
Date:            Feb 12, 2020, 09:23 AM CET (2020-02-12T09:23:17+01:00)
Device owner:    firstname.lastname@company.com

As I'm pretty sure that I didn't root my company phone (especially not this morning, I was in a meeting). As I understand some apps installed can (?) root my phone, but I also don't have apps installed from untrusted sources, and I didn't install any apps in the last two days even from Google Play.
I also tried it with Root Checker, and it seems like that the phone is not rooted.
The SafetyNet Test status is

Basic Integrity: Success
CTS Profile Match: Success
Response Signature Verification: Success

Is there a way that I can check on my phone what exactly causes Google to think that the device is compromised / rooted?

this user reported similar situation, device is most likely unmodified but detected as rooted (just for reference, please ignore suggestions in comments) https://android.stackexchange.com/q/221031

You should also ask the person who called you to get some more details what was written in the alert and include that in your question.

No, Google will never call you without you first reaching out to them. They do not use live or direct analytics from your device. Unless some sort of exploit is used you cannot root a device with a locked bootloader. Upon boot the security checks would flag and prevent the device from booting. You can check if it is root with the `id' command through either a adb shell or a terminal emulator.

This might be not very helpful, but just for reference: Compromised device events report. Also, this is an interesting topic, but I'm afraid only Google knows the answer. At the very least, I feel this is a false alarm. Also, are you sure the device ID of the report is the same with your device? Perhaps you have more than 1 company phones unknowingly?

I got this same thing. I have Google for business and my devices that access the business accounts are managed by the google system. It is a SM-P610 Samsung, and I have personal and work accounts on it. It alerted "An Android device was rooted" at 7:23AM then later at 8:32 alerted that "An Android device was recovered from rooted state".
The alerts are from google.admin.com, through the Google for Business account.


text:
How to get a list (scan) of all available Wi-Fi networks/APs via ADB without root?
Non-root solutions only.
I found a bunch of questions and answers on how to connect to specific WiFi manually, but surprisingly none about gathering network info (without requiring root or some custom packages/apps). I don't think there is legit aircrack-ng for Android, all I've seen are some shady ports and regardless, it will require root.
What I want is a built-in way to list detected networks/APS (including placeholder entries for hidden) via default ADB.

You can call o  WifiManager.startScan()
adb shell su 0 service call wifi 11

I already said I dont have root

Termux has a package that can retrieve the Wifi list from the last Wifi scan:https://wiki.termux.com/wiki/Termux-wifi-scaninfo

@Robert thats an API not package


text:
I want to use my bluetooth headset (Sennheiser MB660 UC MS) with an app that doesn't support bluetooth
I work as a freelance consultant using a platform that aggregates my clients who buy hours from me in blocks. Billing is done per minute when a client makes a voice/video call. Voice clarity and noise cancellation is of the utmost importance. Clients are able to leave reviews after a call.
The problem is that the platform (two versions exist: Android and iOS) was built by a small startup who haven't invested in Bluetooth support (yet). As a result, headsets have to be plugged in to the the headphone jack of the device.
I invested in the rather expensive Sennheiser MB 660 since I was looking for the ultimate purpose built headset for knowledge workers. The trouble: I had assumed that all of its built-in noise cancelling microphones will continue to work even if I had a wired connection, and could live with that until the app added Bluetooth support.
HOWEVER, I belatedly discovered the MB 660's are designed such that Bluetooth AND the noise cancelling mics are switched off as soon as a wire is plugged in (some German engineering choices I find perplexing), and the only active microphone is then the one on the audio cable itself (not noise cancelling). Which beats the purpose of having such a sophisticated headset in possession.
Now that I have this headset anyway, and love it otherwise, I want to find a way to indirectly connect it to my Android device in a way that I am able to use it without connecting the wire. The only way to do that seems to be to plug something (henceforth, SOMETHING) in to my Android device's 3.5mm headphone jack. That SOMETHING will be a two-way Bluetooth contraption of some sort that can send and receive audio and able to pair with my headset too.
Does this SOMETHING already exist in the market, or will I have to make one? If I must make one, what components do I need and how to do I put them together?
Thank you so much!

I only know Bluetooth Transceiver that sends the audio to the headphone, but they usually have no reverse channel for the microphone.

The MB 660 can be used in 3 different ways
Bluetooth: Here we are powered by ourself and handle NC using 3 microphones build in to the right earcup
USB: Here we offer the same performance as Bluetooth and could be used as an alternative for the customer smartphone
Analogue: Here we force OFF the Bluetooth and only drive the ANC circuitry for the speakers. Only the in-line omni dir microphone on the cable can be used for communications


text:
Oneplus 6 gets stuck on Fastboot Mode when booting to TWRP after system update
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?

follow install instructions on xda support thread https://twrp.me/oneplus/oneplus6.html

Does this answer your question? What is the difference between twrp-[version]-[phone].img and twrp-installer-[version]-[phone].zip?

No - I know the difference between the .img and .zip and I am trying to boot from the .img file

I fixed the problem by using the TWRP link from this website which I got to from this xda page. It got past fastboot mode and into TWRP.


text:
How to install xapk, apks, or multiple-apks via adb?
xapk, apks, or multiple-apks is the new standard for apps that is basically one folder and multiple apks in it.
I know there are apps like apkpure or SAI that can do it, but I want to know how to it manually.
I know we can use adb install-multiple to install signed apks but if they are unsigned how can I do it if I have the root?
I used to be able to copy and paste single apk to /system/priv-app/${folder} to bypass the signature check but simply copying and pasting multiple apks under the same folder doesn't seem to work in this case.

AFAIK XAPK is no official format by Google, it is more a community driven package format. The official format is "Android App Bundle" (aab) which is installed using the tool bundletool (by Google).

@Robert ok, so if i have multiple apks, is it possible to put them in /system/priv-app/${folder} and get it to work, if not, how can I make an aab a system app?

What do you mean by but if they are unsigned how can I do it if I have the root? APK files always have to be signed if you want to install them.

For those who are trying to install XAPK files through adb because their XAPK Installer does not work on their Android phone, I've got you covered.
You must have Android Debug Bridge (ADB) set up and working.
XAPK files are basically ZIP Archive files (described by their PK header at the beginning of the file)
This means we are able to open/extract those files using any ZIP tool that we have (I prefer 7-Zip)
Once we have extracted the files from the archive, we are only interested in .APK files.
Open the Command Prompt/Terminal in the folder where you've extracted the archive,
and type the following command: adb install-multiple "AppName.apk" "ConfigA.apk" "ConfigB.apk"
Notes

The order of files in the command does not matter.
AppName, ConfigA and ConfigB are examples, they will differ depending on the package.
There might be more APK files, make sure to include them all.
If there are several APK files with different architectures, make sure to check your phones CPU architecture before proceeding with installing the APK.

Here is a guide on how to install an XAPK file to your Android device via adb on a Windows machine:

Rename your .xapk file to .zip.
Unzip the file to a new folder.
In the new folder, you will see a few .apk files, and sometimes also a folder Android which includes a .obb file (you can ignore the following files: icon.png and manifast.json).
Open a Command Prompt from within the new folder and run adb install-multiple "com.application.name.apk" "config.one.apk" "config.xxhdpi.apk" (these apk names are just an example; replace them with the apk names you see in your folder).
if your XAPK file contains a .obb file (you should see a folder named Android), then run also the following: adb push Android\obb\com.application.name /storage/emulated/0/Android/obb/ (replace com.application.name with the name of the apk you are installing).
Done!

I also include a few notes from @user337422's excellent answer:

There might be more APK files, make sure to include them all.
If there are several APK files with different architectures (example: config.arm64_v8a.apk), make sure to check your phone's CPU architecture before proceeding with installing the APK.


text:
Changes in data at Google Drive in WhatsApp backup
I have scheduled WhatsApp Auto-backup at Google Drive using WhatsApp.

Apart from this, I delete unwanted media files (image & video) from the WhatsApp Folder in Gallery.
Will backup file at Google Drive keep deleted media file or it will be deleted in next schedule?
And in case of Restore backup file, will I get all deleted media files?
Please check and clarify.
Thank you in advance.
Regards
FewL

afaik google drive backups are just snapshots and not merged but replaced


text:
System Application was uninstalled and could not be recovered in android
I have rooted my device. I have installed crDroid-7.1.2-20171202-j5nlte-v3.8.3 and android 7.1.2
I am using j5nlte model of samsung.
I have accidentally uninstalled contact and contact storage applications since my device was already rooted.
After the uninstall process, I have installed simple contacts application from f-Droid
When I am willing to create a new contact I could not create the contact and the system says
No app from this device

As I think, the problem was "contact storage application was uninstalled".
I have downloaded below application to install the contact storage application. I could not installed and the error was
The package conflicts with an existing package by the same name

I can restore the device to get my system apps but I can't restore since I have some other issues.
Is there any way to get my system apps back. Do I have any method to save contacts without contact storage apk?

Afraid you need to re-install your ROM. Until you can do that, you can e.g. use OpenContacts from F-Droid. This is an addressbook/dialer that comes with its own contacts storage no other app has access to (privacy-focused), so it should work in your current situation.

Open contact app was installed but could not open. It always says "keep stopping"

Sad to read that – but I don't know why that happens. Maybe ask the dev in the app's issue tracker? Ah, here's the issue, someone else experienced this as well. Maybe join in there, as the original reporter didn't respond anymore? The app is actively maintained and the author seems very "responsive".

thanks, @lzzy for the help


text:
How do I get Facebook Live mobile app to use the wide angle camera?
Many phones today have more then one camera with many of those having wide angle lens. I'm specifically interested in LG v30+ but it can apply to most modern smartphones now.
How can I get Facebook mobile app to recognise the other rear cameras and use them?

Have asked elsewhere: How can you use wide angle on phones that have more then 1 camera? | Facebook Help Community and Ask Facebook to support wide angle for Facebook Live on LG V30 : lgv30


text:
I'm trying to disable hotspot but I can't find hostapd on android 9
I'm trying to permanently disable hotspot on my phone. I saw this answer here
How do I disable the Mobile Hotspot feature?
I've connected my phone (ulefone armor 6e) to adb  but I can't find hostapd in system/bin/ does anyone know where it is in Android 9? ( I can find it easily in an android 7 phone)
   or another file to delete that will do job without damaging anything else?
I've not yet rooted my phone and I know I will have to try to do this to delete system files.  But i would like to at least find the file i need to delete first.
Or is there an easier way?:D

In /vendor/bin/. Or /odm/bin/. Since Android 8 hardware-specific vendor code is isolated from generic AOSP code in separate partition(s).

Thanks for the reply.   It doesn't seem to be in vendor/bin.  I when i change directory to odm it lists bin as being there but when I type 'cd bin' I get  '/system/bin/sh: cd:  /odm/bin: No such file or directory'

It can be in some subdirectory e.g. /vendor/bin/hw/hostapd. You can run adb shell find /system /vendor /odm /product -name hostapd 2>/dev/null. Or adb shell grep -I hostapd /*/etc/init/*.rc. Or adb shell ps -A -o cmdline | grep hostapd. And so on. If you still cannot find the binary then SELinux might not be allowing adb to access vendor stuff. But hostapd is definitely there. Just root your phone and you'll have access to everything. And sorry but your query is about basic usage of shell, not Android.


text:
How do I find out how much an Android device output power is?
I have a SM-T510 in which I want to cast video to a Asus ZenScreen MB16AC using the Android DisplayLink Presenter app.
It's not working and I'm trying to figure out if the Galaxy is supplying enough power or if it's another issue.
I've plugged both devices into my laptop which has Ubuntu 18.04 installed and updated.
This command gives me the device id's when they are plugged in:
lsusb

I use this device id with these commands to get max power:
ZenScreen:
lsusb -v -d 17e9:4374

Power Result: MaxPower 500mA
Galaxy:
lsusb -v -d 04e8:6860

Power Result: MaxPower 64mA
The problem is I don't know if this is max input or max output or both. Or if this number is dependent upon some other influencing factor.
How do I get the max power out so I know if my ZenScreen can be powered by the Galaxy?

The commands you present cover AFAIK only the old wold before USB power delivery. Therefore they are totally irrelevant to you. At the moment it looks like power delivery profiles are automatically negotiated between the two devices and the cable in between but the result and the profiles are not accessible from outside. You may need need additional hardware to sniff the negotiation to get the data you want.

@Robert Do you know of any device that can test the input/ouput. It seems if they are doing this on their own that a tool should be able to query the device.


text:
How to recover deleted .zip files through TWRP?
I deleted internal storage and forgot that my .zip backups was there. I have no OS installed, only access via TWRP. How can I restore my .zip files?

make a (decrypted) partition dump and inspect the image with linux tools on pc

Thanks, found month older backup before you commented. Didn't think that it's so difficult. Just noticed that softwares on Windows doesn't detect my device.


text:
'|' types '\' instead
I recently got a Logitech K380 (Turkish Q layout).
When I type '|' (Alt Gr + <) it types '\' instead.
I've already checked for:

Mismatched layouts: but all other keys (including '\', which is bound to AltGr + *) type properly.
Defective Keyboard: but keyboard works fine on a Windows PC.

I've tested it on two different devices, one with KitKat and another with Lineage 16. Both have the problem.
A possibly useful thing I found was that if I were on the UK layout, the keys I pressed would print '\'.
How can I fix this?

Minutes after asking this question, I started trying random combinations in order to see if anything else was out of place.
Turns out, Android decided that AltGr + - was a better shortcut for '|'.


text:
Do I need to factory reset?
I have downloaded a bunch of apps on my 3-year-old Lenovo Android tablet. Lately, several of the app icons have been turned into little green android images. Also, the books I've downloaded to Acrobat Reader are inaccessible. Do I need a factory reset? If I do, how can I get back the great books that I was looking forward to reading?

Did you remove your micro Sd card from the device?


text:
Couldn't move content, try again
I have a Motorola G6 with Android 9 and a 32 GB mSD card (a good Sandisk one) formatted as internal storage and encrypted.
When I first used the card, I used the content migration utility to move some content onto the card and it worked fine.
Now I'm running out of space on the mSD card but I have some 10 gigs free in the phone.
So I tried to use the utility again in reverse: In Settings > Storage > Internal shared storage I tap the 3 dots > Migrate data. The screen says it will move about 4.5 gigs of stuff from the mSD into the phone.
I confirm, it shows a progress bar that jumps to 80% immediately and then I get the notification "Couldn't move content. Try moving content again".
It's been like this for weeks. I've tried rebooting many times, I've moved all the apps into the phone storage but whenever I download something, make a picture or whatever it's stored on the card and I can't affect it.
Any clue what's going on?
As a side note: say I'd want to upgrade the card to 64GB... How would I proceed, considering the current card is formatted as internal and encrypted?
Thanks
Edit: I realized a strange thing. The mSD card shows there's 13 gigs of apps even tho there are no apps on the card. There are 13 gigs of apps in the phone however. Methinks the system is confused about what is where.

you can try to move each app for it's own from settings

I've already moved all the apps manually.


text:
galaxy note 4 sm910c PIT partition error
i  tried to flash the latest firmware, but after i press the start button,it says PIT partition error,so i installed a PIT partition for note 4 and then tried,still it says PIT  partition error.....can ypu help mewith it?


text:
Does Android send Wi-Fi probe requests to saved hidden networks?
Let's put this scenario:
I manually add an existing Wi-Fi network that does not broadcast SSID. For some reason the encryption passphrase doesn't match, so authentication is impossible. Previously hidden SSID is now shown in Wi-Fi networks list.
Click on hidden SSID that is now shown and forget its settings. Click on the same hidden SSID now presented on the list and set a correct passphrase. Authentication is done successfully.
My question is if the network is still considered a hidden network on wpa_supplicant.conf?
In the future if Android client does not send a direct probe request for a specific hidden SSID and instead sends a broadcast probe, will it be unable to detect the network?

A hidden or non-broadcast WiFi Access Point remains always hidden i.e. it always sets SSID to null in beacon frames it sends. However once you manually add its SSID to a supplicant, it depends on the latter whether it explicitly scans the former in future or not. Android's WiFi client is wpa_supplicant, the same is most commonly used on other Linux-based OSes. From wpa_supplicnat configuration manpage:

scan_ssid
  SSID scan technique; 0 (default) or 1.  Technique 0 scans for the SSID using a broadcast Probe Request frame while 1 uses a directed Probe Request frame.  Access points that cloak themselves by not broadcasting their SSID require technique 1

So scan_ssid=1 is usually the default behavior on most OSes. Also Windows built-in supplicant can "connect even if the network is not broadcasting".

In the future if Android client does not send a direct probe request for a specific hidden SSID and instead sends a broadcast probe, will it be unable to detect the network?

Yes definitely. But scanning hidden networks is default setting up to Android 8. In Android 9 a new configuration was added to allow explicitly setting the behavior:

My question is if the network is still considered a hidden network on wpa_supplicant.conf

In Android whole configuration is not added to wpa_supplicant.conf file but retained by Android framework. Since Android 8 it's stored in WifiConfigStore.xml files located under /data/misc* directories. According to user selection, scan_ssid=[0|1] - along with other configurations - is passed to wpa_supplicant process over HIDL - an Android specific IPC - or possibly over global ctrl_interface.
To summarize, yes Android (by default or optionally) sends direct probe requests to saved non-broadcast WiFi networks.


text:
Random Media Pauses
I have a strange problem that started recently where media I'm listening to/watching will randomly pause. It happens both when playing on my phone and when playing over bluetooth to my car or headphones. Sometimes it happens when my phone is sitting on the counter and I'm not touching it. I've had it happen in both Pocket Casts and Youtube Vanced, but those are the only two media apps I use regularly. Sometimes it happens shortly after media starts, sometimes it's after I've been watching/listening for a long time.
I was able to grab a logcat where I started a podcast and then it paused a second or two after it started. I've tried to read through it but I can't really make sense of it. Here are two sections I think might be relevant, but I'm not really sure what it means:
02-14 17:19:29.537  5612  5612 V MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
02-14 17:19:29.537  5612  5612 V MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null
02-14 17:19:29.538  1119  2261 D NuPlayerDriver: reset(0xeab4a500) at state 4
02-14 17:19:29.539  1223  4542 I AS.AudioService: releasePlayer: 39 currentPackageName:com.android.chrome
02-14 17:19:29.539  1119  7508 W AMessage: failed to post message as target looper for handler 0 is gone.
02-14 17:19:29.539  1223  4542 I OpAudioMonitor: MDM,stop.
02-14 17:19:29.540  1119  7508 D NuPlayerDriver: notifyResetComplete(0xeab4a500)

and
02-14 17:19:32.091  3918  3918 D TouchInteractionService: onInputEvent# ev: MotionEvent { action=ACTION_DOWN, actionButton=0, id[0]=0, x[0]=614.0, y[0]=715.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, classification=NONE, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=109664, downTime=109664, deviceId=6, source=0x1002, displayId=0 }
02-14 17:19:32.096  3918  3918 I Surface : opservice is null false
02-14 17:19:32.096  3894  3894 I Surface : opservice is null false
02-14 17:19:32.097   921  1000 I SurfaceFlinger: surface flinger receiver command 20001 .....
02-14 17:19:32.098   921  1000 I SurfaceFlinger: surface flinger receiver command 20001 .....
02-14 17:19:32.123   816  2840 I vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE
02-14 17:19:32.159  4019  4019 D MediaBrowserCompat: Connecting to a MediaBrowserService.
02-14 17:19:32.162   566   566 E SELinux : avc:  denied  { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1223 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
02-14 17:19:32.184  1223  4920 I MediaFocusControl: abandonAudioFocus() from uid/pid 10118/4019 clientId=android.media.AudioManager@7c6e8dcau.com.shiftyjelly.pocketcasts.core.player.d@cc5de5
02-14 17:19:32.197   566   566 E SELinux : avc:  denied  { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1223 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
02-14 17:19:32.205  4019 14234 D AudioTrack: ClientUid 10118 AudioTrack::pause
02-14 17:19:32.207  1223  4920 I AS.AudioService: playerEvent: 63 event: 3 isMusicActive:true device:2 currentPackageName:au.com.shiftyjelly.pocketcasts
02-14 17:19:32.207  1223  4920 I OpAudioMonitor: MDM,stop.
02-14 17:19:32.207  1223  4920 I OpAudioMonitor: MDM,stop startTime:1581729563 endTime:1581729572
02-14 17:19:32.208  1223  4920 I OpAudioMonitor: MDM, playing,device:5 lapse:9
02-14 17:19:32.208  1223  4920 I OpAudioMonitor: MDM,device:2 lapse:9 packageName:au.com.shiftyjelly.pocketcasts
02-14 17:19:32.208  1223  4920 I OpAudioMonitor: MDM,stop remove start time for:au.com.shiftyjelly.pocketcasts
02-14 17:19:32.208  1223  1786 I OpAudioMonitor: logMdm run preserveOsData tag:audio_connect

If anyone wants to look at the full log it's here: https://drive.google.com/open?id=1S30aOzaIg3CqdDKqSr88N-QDIADm2HeV
If anyone has any ideas as to what would be causing this I'd love to hear!
Thanks!

Are these apps in the foreground when they stutter? Or let's say you are driving with Goggle Maps or Waze and these streaming apps are in the background? What kind of phone?

It stopped happening at some point, not sure what changed.
When it happened to Youtube Vanced it was in the foreground. With Pocketcasts it may have been in the background. Phone is a OnePlus 6T.

I'm with a OnePlus 6, and I was asking because background process and service killing is a not fully specified and the heuristic is up to the manufacturer. OnePlus is very aggressive in this sense: https://dontkillmyapp.com/ But if it's in the foreground then killing should not happen. How many apps do you usually have running at the same time. I try to keep at 4-5 at max.

I don't think it was so much killing the app as it was just pausing the media. Like I'd be watching a video and then it would pause. It would still be up on the screen, and I'd just hit the play button to resume it.

it can be indirect: maybe some related service gets whacked, then you see unexpected null, reset, abandon, denied and similar in LogCat. It'll be hard to tell.


text:
How to get installation log (either from adb install or manual install)
The question is what to grep/filter?
adb logcat | grep what?
adb install file.apk

tried with grep apk and manual install, but it contains no useful information:
01-25 17:29:05.721  4241  6322 I ActivityManager: START u0 {dat=file:///data/user_de/0/com.google.android.packageinstaller/no_backup/package7763548981090696460.apk flg=0x2000000 cmp=com.google.android.packageinstaller/com.android.packageinstaller.InstallInstalling (has extras)} from uid 10020, pid 24521
01-25 17:29:08.660  4241  5058 I ActivityManager: START u0 {dat=file:///data/user_de/0/com.google.android.packageinstaller/no_backup/package7763548981090696460.apk flg=0x2000000 cmp=com.google.android.packageinstaller/com.android.packageinstaller.InstallFailed (has extras)} from uid 10020, pid 24521

tried with grep apk and adb install nothing captured (stuck), how can i know what part causes the installation failure?

@Robert whoa nice, that shows the real problem Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113], btw you can make your comment as an answer, i'll upvote and mark it.

Most likely this means your device is older and supports only ARMv7 (ARM 32bit) or has an x86 cpu but the APK file requires an ARMv8 (ARM 64bit) system. In that case you can only search for a different APK file that supports the CPU type of your device (BTW: as I always say you should always write the device name and vendor into the question when posting a question here).

Sometimes errors are getting lost when using adb. Effectively adb install does nothing more than uploading the apk file to the the device and then executing the command pm install <file.apk>.
Therefore in case of problems you can perform those steps manually and see the complete log of the package manager pm when installing the apk file.
Therefore I would suggest doing the following:

Upload the apk file to your device (e.g. via adb push, MTP, direct download to the device, ...)
Open an adb shell by executing adb shell
Install the apk file:  pm install <path_to_the_apk_file_on_the_device.apk>

Then you should get the most details log and all (error) messages.