text:
How does Android treat files bigger than free space remaining while recording?
I've spent the entire day trying to solve this issue, it seems paranormal but (sadly) it's true and I didn't find a way to solve it.
Yesterday I recorded a very important video using my Xiaomi and Quick Video Recorder (I used it more than once and everything has always been great), I had something like 3Gb of free space but I didn't check it and I was recording with high quality.
Android told me that was running out of space, so I suddenly stopped recording.
I checked the video and used VLC to replay it and everything seemed to work fine.
After about 30 minutes, the file was missing. I checked everywhere, rooted the phone and tried with recovery applications such as Dr.Fone, but the file is completely disappeared.
To be 100% sure I didn't dream it I also checked on Google Takeout and it confirmed I actually used the camera during that time and suddenly opened VLC to replay it...
How's that possible? Does Android delete an entire video when it's too large? Is there a way to recover even a small portion or to show logs of camera activity to understand where's the file?
I didn't know what to do so I opened adb shell and tried with ls -Rlat | grep '2019-12-18\ 17:' (I was recording around 5pm) and that's the result:
drwxrwx--x   3 u0_a187 sdcard_rw 4096 2019-12-18 17:07 files
drwxrwx--x 3 u0_a187 sdcard_rw 4096 2019-12-18 17:07 .
drwxrwx--x 3 u0_a187 sdcard_rw   4096 2019-12-18 17:07 ..
drwxrwx--x 3 u0_a187 sdcard_rw   4096 2019-12-18 17:07 playlists
drwxrwx--x 3 u0_a187 sdcard_rw 4096 2019-12-18 17:07 .
drwxrwx--x 2 u0_a187 sdcard_rw 4096 2019-12-18 17:07 1576685265
drwxrwx--x 2 u0_a187 sdcard_rw 4096 2019-12-18 17:07 .
drwxrwx--x 3 u0_a187 sdcard_rw 4096 2019-12-18 17:07 ..
-rw-------  1 system system     0 2019-12-18 17:50 event_data@1576687815456.lost
-rw-------  1 system system     0 2019-12-18 17:08 event_data@1576685305699.lost
-rw-------  1 system system     0 2019-12-18 17:08 platform_stats_bookmark@1576685305937.lost
-rw-------  1 system system     0 2019-12-18 17:02 system_server_wtf@1576684937890.lost
drwx------  3 system system 4096 2019-12-18 17:34 org.videolan.vlc
drwx------  3 system system 4096 2019-12-18 17:24 com.kimcy929.secretvideorecorder
drwx------  3 system system 4096 2019-12-18 17:08 com.android.incallui
drwx------  3 system system 4096 2019-12-18 17:02 com.android.contacts
-rw------- 1 system system  897 2019-12-18 17:02 total
drwx------  3 system system 4096 2019-12-18 17:34 .
drwx------  2 system system 4096 2019-12-18 17:34 13020307
drwx------ 2 system system 4096 2019-12-18 17:34 .
drwx------ 3 system system 4096 2019-12-18 17:34 ..
drwx------  3 system system 4096 2019-12-18 17:24 .
drwx------  2 system system 4096 2019-12-18 17:24 245
drwx------ 2 system system 4096 2019-12-18 17:24 .
drwx------ 3 system system 4096 2019-12-18 17:24 ..
drwx------  3 system system 4096 2019-12-18 17:08 .
drwx------  2 system system 4096 2019-12-18 17:08 27
drwx------ 2 system system 4096 2019-12-18 17:08 .
drwx------ 3 system system 4096 2019-12-18 17:08 ..
drwx------  3 system system 4096 2019-12-18 17:02 .
drwx------  2 system system 4096 2019-12-18 17:02 100
drwx------ 2 system system 4096 2019-12-18 17:02 .
drwx------ 3 system system 4096 2019-12-18 17:02 ..
-rw-------  1 u0_a131 u0_a131     0 2019-12-18 17:33 com.facebook.katana_3c8406f3-3e8a-80cd-85cb-0c1211088d8d.v3.txt_anr
-rw-------  1 u0_a131 u0_a131     0 2019-12-18 17:33 com.facebook.katana_3c8406f3-3e8a-80cd-85cb-0c1211088d8d.v3.txt_native
-rw-------  1 u0_a131 u0_a131     0 2019-12-18 17:33 com.facebook.katana_3c8406f3-3e8a-80cd-85cb-0c1211088d8d.v3.txt_wrotedump
-rw-------  1 u0_a131 u0_a131   250 2019-12-18 17:33 com.facebook.katana_3c8406f3-3e8a-80cd-85cb-0c1211088d8d.v3.txt_static
drwx------   3 u0_a87 u0_a87        4096 2019-12-18 17:04 app_webview
drwxrws--x   4 u0_a87 u0_a87_cache  4096 2019-12-18 17:03 cache
drwxrwx--x   2 u0_a87 u0_a87        4096 2019-12-18 17:03 shared_prefs
drwx------  3 u0_a87 u0_a87 4096 2019-12-18 17:04 .
-rw-------  1 u0_a87 u0_a87  270 2019-12-18 17:04 pref_store
-rw-------  1 u0_a87 u0_a87 4885 2019-12-18 17:03 variations_seed_new
drwx------  3 u0_a87 u0_a87 4096 2019-12-18 17:03 Default
-rw-------  1 u0_a87 u0_a87    0 2019-12-18 17:03 variations_stamp
drwx------ 3 u0_a87 u0_a87  4096 2019-12-18 17:04 ..
drwx------ 3 u0_a87 u0_a87  4096 2019-12-18 17:03 .
-rw------- 1 u0_a87 u0_a87 61440 2019-12-18 17:03 Web Data
-rw------- 1 u0_a87 u0_a87     0 2019-12-18 17:03 Web Data-journal
drwx------ 3 u0_a87 u0_a87  4096 2019-12-18 17:03 blob_storage
drwx------ 3 u0_a87 u0_a87 4096 2019-12-18 17:03 .
drwx------ 3 u0_a87 u0_a87 4096 2019-12-18 17:03 ..
drwx------ 2 u0_a87 u0_a87 4096 2019-12-18 17:03 aa41e68b-5b8c-4030-ab9b-9fd7dfb95ee8
drwx------ 2 u0_a87 u0_a87 4096 2019-12-18 17:03 .
drwx------ 3 u0_a87 u0_a87 4096 2019-12-18 17:03 ..
drwxrws--x  6 u0_a87 u0_a87_cache  4096 2019-12-18 17:03 WebView
drwxrws--x  4 u0_a87 u0_a87_cache  4096 2019-12-18 17:03 .
drwxrws--x 6 u0_a87 u0_a87_cache  4096 2019-12-18 17:03 .
-rw------- 1 u0_a87 u0_a87_cache 19900 2019-12-18 17:03 font_unique_name_table.pb
drwxrws--x 4 u0_a87 u0_a87_cache  4096 2019-12-18 17:03 ..
drwx--S--- 3 u0_a87 u0_a87_cache  4096 2019-12-18 17:03 Default
drwxrws--x 6 u0_a87 u0_a87_cache 4096 2019-12-18 17:03 ..
drwx--S--- 3 u0_a87 u0_a87_cache 4096 2019-12-18 17:03 .
drwx--S--- 3 u0_a87 u0_a87_cache 4096 2019-12-18 17:03 ..
drwxrws--x 6 u0_a87 u0_a87_cache 4096 2019-12-18 17:03 ..
drwxrws--x 6 u0_a87 u0_a87_cache 4096 2019-12-18 17:03 ..
drwxrws--x 6 u0_a87 u0_a87_cache 4096 2019-12-18 17:03 ..
-rw------- 1 u0_a87 u0_a87_cache   40 2019-12-18 17:03 settings.dat
drwxrws--x 4 u0_a87 u0_a87_cache    4096 2019-12-18 17:03 ..
drwxrwx--x  2 u0_a87 u0_a87 4096 2019-12-18 17:03 .
-rw-rw----  1 u0_a87 u0_a87  127 2019-12-18 17:03 WebViewChromiumPrefs.xml
drwx--S---  2 u0_a16 u0_a16_cache   4096 2019-12-18 17:50 android_pay_temp_files
drwx--S---  2 u0_a16 u0_a16_cache   4096 2019-12-18 17:50 token_selector_anim
drwx--S---  6 u0_a16 u0_a16_cache   4096 2019-12-18 17:34 WebView
drwx--x--x  3 u0_a16 u0_a16_cache   4096 2019-12-18 17:14 oat
-rw-------  1 u0_a16 u0_a16_cache       0 2019-12-18 17:34 5Pvideo5Nmedia19I637855801993076728-1570660531011
-rw-------  1 u0_a16 u0_a16_cache       0 2019-12-18 17:34 5Pvideo5Nmedia20I4589217858447806657-1570753081747
-rw-------  1 u0_a16 u0_a16_cache       0 2019-12-18 17:34 5Pvideo5Nmedia20I5819926639731977934-1570751273785
drwx--S---  2 u0_a16 u0_a16_cache 4096 2019-12-18 17:50 .
drwx--S---  2 u0_a16 u0_a16_cache  4096 2019-12-18 17:50 .
-rw-------  1 u0_a16 u0_a16_cache 24641 2019-12-18 17:50 07e11acfb6ad0a8825abe06d691f5a7c
drwx--S---  6 u0_a16 u0_a16_cache  4096 2019-12-18 17:34 .
drwx--S---  2 u0_a16 u0_a16_cache  4096 2019-12-18 17:34 Crash Reports
drwx--S---  6 u0_a16 u0_a16_cache  4096 2019-12-18 17:34 Crashpad
drwx--S---  2 u0_a16 u0_a16_cache  4096 2019-12-18 17:34 SafeBrowsing
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 .
drwx--S--- 6 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
drwx--S--- 6 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
drwx--S--- 6 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 .
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 attachments
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 completed
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 new
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 pending
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 .
drwx--S--- 6 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 .
drwx--S--- 6 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 .
drwx--S--- 6 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 .
drwx--S--- 6 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
drwx--S--- 6 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
drwx--S--- 2 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 .
drwx--S--- 4 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 HTTP Cache
drwx--S--- 6 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
drwx--S--- 4 u0_a16 u0_a16_cache   4096 2019-12-18 17:34 .
-rw------- 1 u0_a16 u0_a16_cache 109082 2019-12-18 17:34 d495fa4a78df46ba_0
-rw------- 1 u0_a16 u0_a16_cache   5555 2019-12-18 17:34 dfe6b2497a7513ba_0
-rw------- 1 u0_a16 u0_a16_cache     24 2019-12-18 17:34 index
drwx--S--- 4 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
drwx--S--- 4 u0_a16 u0_a16_cache 4096 2019-12-18 17:34 ..
-rw------- 1 u0_a16 u0_a16_cache  280 2019-12-18 17:34 6aaed60636ee0201_0
-rw------- 1 u0_a16 u0_a16_cache   24 2019-12-18 17:34 index
drwx--x--x  3 u0_a16 u0_a16_cache 4096 2019-12-18 17:14 .
drwx--x--x  2 u0_a16 u0_a16       4096 2019-12-18 17:14 arm64
drwx--x--x 2 u0_a16 u0_a16        4096 2019-12-18 17:14 .
drwx--x--x 3 u0_a16 u0_a16_cache  4096 2019-12-18 17:14 ..
drwx------ 2 u0_a16 u0_a16 4096 2019-12-18 17:34 leveldb
drwx------ 2 u0_a16 u0_a16 4096 2019-12-18 17:34 .
-rw------- 1 u0_a16 u0_a16  322 2019-12-18 17:34 LOG
drwx--S---  2 u0_a305 u0_a305_cache 122880 2019-12-18 17:14 picasso-cache
drwx--S--- 2 u0_a305 u0_a305_cache  122880 2019-12-18 17:14 .
-rw-rw----  1 u0_a190 u0_a190 2511 2019-12-18 17:02 com.google.android.gms.appid.xml
-rw-rw----  1 u0_a190 u0_a190  168 2019-12-18 17:02 io.fabric.sdk.android:fabric:io.fabric.sdk.android.l.xml
-rw------- 1 u0_a190 u0_a190_cache  917285 2019-12-18 17:07 ded7ae5db1953d37df58cda73b06c144b288976c03223f6912a34c6b5180e8a2.0
drwxrws--x  10 u0_a143 u0_a143_cache  4096 2019-12-18 17:14 cache
drwxrws--x 10 u0_a143 u0_a143_cache  4096 2019-12-18 17:14 .
drwx--S---  4 u0_a143 u0_a143_cache 53248 2019-12-18 17:14 org.chromium.android_webview
drwx--S---  2 u0_a143 u0_a143_cache 24576 2019-12-18 17:14 picasso-cache
drwx--S---  3 u0_a143 u0_a143_cache  4096 2019-12-18 17:14 WebView
drwx--S---  4 u0_a143 u0_a143_cache  53248 2019-12-18 17:14 .
drwxrws--x 10 u0_a143 u0_a143_cache   4096 2019-12-18 17:14 ..
drwx--S--- 4 u0_a143 u0_a143_cache 53248 2019-12-18 17:14 ..
drwx--S--- 3 u0_a143 u0_a143_cache  8192 2019-12-18 17:14 js
drwx--S--- 4 u0_a143 u0_a143_cache 53248 2019-12-18 17:14 ..
drwx--S--- 3 u0_a143 u0_a143_cache   8192 2019-12-18 17:14 .
drwx--S--- 3 u0_a143 u0_a143_cache 8192 2019-12-18 17:14 ..
drwx--S---  2 u0_a143 u0_a143_cache 24576 2019-12-18 17:14 .
drwxrws--x 10 u0_a143 u0_a143_cache  4096 2019-12-18 17:14 ..
drwxrws--x 10 u0_a143 u0_a143_cache 4096 2019-12-18 17:14 ..
drwx--S---  3 u0_a143 u0_a143_cache 4096 2019-12-18 17:14 .
drwx--S---  2 u0_a143 u0_a143_cache 4096 2019-12-18 17:14 Crashpad
drwx--S--- 2 u0_a143 u0_a143_cache 4096 2019-12-18 17:14 .
drwx--S--- 3 u0_a143 u0_a143_cache 4096 2019-12-18 17:14 ..
drwxrws--x 10 u0_a143 u0_a143_cache  4096 2019-12-18 17:14 ..
drwxrws--x 10 u0_a143 u0_a143_cache 4096 2019-12-18 17:14 ..
drwxrws--x 10 u0_a143 u0_a143_cache 4096 2019-12-18 17:14 ..
drwxrws--x 10 u0_a143 u0_a143_cache  4096 2019-12-18 17:14 ..
drwxrws--x 10 u0_a143 u0_a143_cache 4096 2019-12-18 17:14 ..
drwxrws--x   7 u0_a118 u0_a118_cache  4096 2019-12-18 17:14 cache
drwx--S---  2 u0_a118 u0_a118_cache 12288 2019-12-18 17:14 fragment
drwx--S---  2 u0_a118 u0_a118_cache  8192 2019-12-18 17:14 header
drwx--S---  2 u0_a118 u0_a118_cache 28672 2019-12-18 17:14 volley
drwx--S---  2 u0_a118 u0_a118_cache 20480 2019-12-18 17:14 downloads
drwxrws--x  7 u0_a118 u0_a118_cache  4096 2019-12-18 17:14 .
drwx--S---  3 u0_a118 u0_a118_cache  4096 2019-12-18 17:14 cronet
drwx--S--- 2 u0_a118 u0_a118_cache   12288 2019-12-18 17:14 .
drwxrws--x 7 u0_a118 u0_a118_cache    4096 2019-12-18 17:14 ..
drwx--S--- 2 u0_a118 u0_a118_cache  8192 2019-12-18 17:14 .
drwxrws--x 7 u0_a118 u0_a118_cache  4096 2019-12-18 17:14 ..
drwx--S--- 2 u0_a118 u0_a118_cache   28672 2019-12-18 17:14 .
drwxrws--x 7 u0_a118 u0_a118_cache    4096 2019-12-18 17:14 ..
drwx--S--- 2 u0_a118 u0_a118_cache  20480 2019-12-18 17:14 .
drwxrws--x 7 u0_a118 u0_a118_cache   4096 2019-12-18 17:14 ..
drwx--S--- 3 u0_a118 u0_a118_cache 4096 2019-12-18 17:14 .
drwxrws--x 7 u0_a118 u0_a118_cache 4096 2019-12-18 17:14 ..
drwx--S--- 3 u0_a118 u0_a118_cache 4096 2019-12-18 17:14 ..
-rw-rw----  1 u0_a139 u0_a139   2513 2019-12-18 17:34 com.google.android.gms.appid.xml
-rw-rw----  1 u0_a139 u0_a139    411 2019-12-18 17:33 FBAdPrefs.xml
-rw-rw----  1 u0_a139 u0_a139    168 2019-12-18 17:33 io.fabric.sdk.android:fabric:io.fabric.sdk.android.l.xml
-rw------- 1 u0_a139 u0_a139_cache   49670 2019-12-18 17:34 20f9fcfcbe9fdb98_0
-rw------- 1 u0_a139 u0_a139_cache  109037 2019-12-18 17:34 f038e94cb33282ab_0
-rw-------  1 u0_a139 u0_a139 4885 2019-12-18 17:34 variations_seed
-rw-------  1 u0_a139 u0_a139    0 2019-12-18 17:34 variations_stamp
-rw------- 1 u0_a139 u0_a139 1467 2019-12-18 17:33 com.crashlytics.settings.json
drwxrwxr-x   3 media_rw u0_a20187 4096 2019-12-18 17:07 files
drwxrwxr-x 3 media_rw u0_a20187 4096 2019-12-18 17:07 .
drwxrwxr-x 3 media_rw u0_a20187   4096 2019-12-18 17:07 ..
drwxrwxr-x 3 media_rw u0_a20187   4096 2019-12-18 17:07 playlists
drwxrwxr-x 3 media_rw u0_a20187 4096 2019-12-18 17:07 .
drwxrwxr-x 2 media_rw u0_a20187 4096 2019-12-18 17:07 1576685265
drwxrwxr-x 2 media_rw u0_a20187 4096 2019-12-18 17:07 .
drwxrwxr-x 3 media_rw u0_a20187 4096 2019-12-18 17:07 ..
drwxrws--x   2 u0_a16 u0_a16_cache  4096 2019-12-18 17:22 cache
drwxrws--x  2 u0_a16 u0_a16_cache 4096 2019-12-18 17:22 .
-rw-------  1 u0_a16 u0_a16_cache    0 2019-12-18 17:22 .lib.lock
drwxrwx--x   3 u0_a187 sdcard_rw 4096 2019-12-18 17:07 files
drwxrwx--x 3 u0_a187 sdcard_rw 4096 2019-12-18 17:07 .
drwxrwx--x 3 u0_a187 sdcard_rw   4096 2019-12-18 17:07 ..
drwxrwx--x 3 u0_a187 sdcard_rw   4096 2019-12-18 17:07 playlists
drwxrwx--x 3 u0_a187 sdcard_rw 4096 2019-12-18 17:07 .
drwxrwx--x 2 u0_a187 sdcard_rw 4096 2019-12-18 17:07 1576685265
drwxrwx--x 2 u0_a187 sdcard_rw 4096 2019-12-18 17:07 .
drwxrwx--x 3 u0_a187 sdcard_rw 4096 2019-12-18 17:07 ..
drwxr-x---   3 u0_a187 everybody 4096 2019-12-18 17:07 files
drwxr-x--- 3 u0_a187 everybody 4096 2019-12-18 17:07 .
drwxr-x--- 3 u0_a187 everybody   4096 2019-12-18 17:07 ..
drwxr-x--- 3 u0_a187 everybody   4096 2019-12-18 17:07 playlists
drwxr-x--- 3 u0_a187 everybody 4096 2019-12-18 17:07 .
drwxr-x--- 2 u0_a187 everybody 4096 2019-12-18 17:07 1576685265
drwxr-x--- 2 u0_a187 everybody 4096 2019-12-18 17:07 .
drwxr-x--- 3 u0_a187 everybody 4096 2019-12-18 17:07 ..
drwxrwx---   3 u0_a187 everybody 4096 2019-12-18 17:07 files
drwxrwx--- 3 u0_a187 everybody 4096 2019-12-18 17:07 .
drwxrwx--- 3 u0_a187 everybody   4096 2019-12-18 17:07 ..
drwxrwx--- 3 u0_a187 everybody   4096 2019-12-18 17:07 playlists
drwxrwx--- 3 u0_a187 everybody 4096 2019-12-18 17:07 .
drwxrwx--- 2 u0_a187 everybody 4096 2019-12-18 17:07 1576685265
drwxrwx--- 2 u0_a187 everybody 4096 2019-12-18 17:07 .
drwxrwx--- 3 u0_a187 everybody 4096 2019-12-18 17:07 ..


text:
Unable to encrypt my Note 5 anymore (data partition is corrupt)
It all started with a factory reset on the stock Samsung ROM (Android 7.0).
After I booted into the factory reset system I couldn't get the phone encryption to work: it failed with the message saying that the data partition is corrupt which effectively factory reset my phone again (forcefully).

Reflashing the official Samsung ROM didn't help, the phone kept showing me the same message about the corruption of the data partition.
Reformatting the partition in the TWRP didn't help either.

Any ideas how to fix it? It could also be a hardware failure.
I posted the same question on XDA but unfortunately got no response so far.

@alecxs what would I get from knowing if the problem is related to EFS or DATA?

idea behind was to figure out if problem just related to encryption and not wear-out of userdata partition itself,
and see if you still may use device unencrypted. but turns out the encryption key is located at end of userdata partition and not EFS (forceencrypt=footer;length=-20480)

@alecxs the device is perfectly usable without encryption. Could it be wear-out after 3.5 years of usage?

if it is perfectly usable then it's most likely not wear-out. maybe it runs out of memory during encryption, or too much data on it (even after reset?)

I don't know why this shoud make a difference, but some people recommend to perform factory reset from stock android system recovery (instead twrp)

@alecxs how it is possible that there is too much data after a reset? The first reset I did was made even from the system, not from TWRP.

you ask for ideas. idk when exactly encryption starts but all the /system apps (and carrier bloat /preload apps) are extracted into /data on first boot. you could try to reduce apps, or manually wipe other partitions (EFS?) like stock recovery does

did you reflash official Samsung ROM from Odin/completely stock (even stock boot/recovery)?

@alexcs I flashed with heimdall since there is no Odin build for GNU/Linux. I believe I flashed everything except the stock recovery.

so in order to get successfully booted with custom recovery you probably disabled dm-verity? on the other hand in forum some people reported encryption won't work after flashing dm-verity disabler, so give complete stock a try

@alexcx I don't remember disabling it and I also don't remember the exact order of my actions but I think I first did a factory reset from the system and after that installed TWRP. So you believe I should try flashing all the stock images?

@alexcs after flashing all the stock .bin's the phone encrypted itself without any problems. Thank you so much for the help. Do you think I can bring back the TWRP now? Also, I can't upvote your comments for some reason.

@alecxs I flashed TWRP through heimdall (as recovery, not boot) and it worked, BUT the system became unbootable (probably because of dm-verity that detected  the change to recovery) and TWRP couldn't mount the encrypted internal storage. By flashing the stock recovery image I got the system to work again. I think I could live without a custom recovery but I want to root my phone again. Flashing a Magisk patched boot.img made the system unbootable again. Anything else I can do here?

@alecxs TWRP 3.2.3 still shows /sdcard as an empty partition. Tried 3.2.2 - no luck.

open issue on github

@alexcs I considered moving to Lineage OS. In fact, I even like it more than the stock Samsung bloatware. But I am worried because it's an unofficial build.

@alecxs just flashed https://forum.xda-developers.com/note5/orig-development/rom-lineageos-15-1-note-5-android-8-1-t3737405 and even with this ROM I have troubles encrypting the phone. It just goes into boot loop after I enable encryption.

try combination of LineageOS and stock recovery (+ factory reset from stock recovery) and try older (stable) LineageOS 14 based on Android 7

it seems that Magisk Manager has a bug since v7.3.5 as workaround you must "keep force encryption" and flash no-verity-opt-encrypt instead https://build.nethunter.com/android-tools/no-verity-opt-encrypt

Flashing complete stock ROM including stock recovery will fix encryption, if you factory reset from stock recovery.
To make your ROM boot along with TWRP you need to flash no-verity-opt-encrypt or universal disable dm-verity.
Due some bug in TWRP, decryption dialog fails to open because EFS is not mounted at the time that TWRP checks for device encryption. TWRP is working along with stock ROM encryption if you swap entries in /etc/recovery.fstab and one of these flags for USERDATA:
flags=encryptable=footer
flags=encryptable=footer,length=-16384
flags=encryptable=footer,length=-20480
flags=encryptable=/efs/metadata
flags=encryptable=/dev/block/bootdevice/by-name/metadata
flags=encryptable=/dev/block/platform/15570000.ufs/by-name/EFS/metadata
flags=fileencryption=aes-256-xts:aes-256-cts
flags=fileencryption=ice:aes-256-cts
flags=fileencryption=ice:aes-256-cts;keydirectory=/metadata/vold/metadata_encryption

source: source.android.com/security/encryption

@alexcs Unfortunately, none of those flags worked. Tried with both TWRP 3.2.3 and TWRP 3.3.1

source: Stack Exchange

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

sort: votes


text:
How can you display a Unicode character on Android that otherwise appears as ☒?
I want to display the character ⮚ on my phone. However, whenever I open any app containing this character, it is displayed as ☒. I am aware that this is due to the font limitations of Android. Is there any way to resolve this?

What device and are you rooted? Have you seen this: https://medium.com/@droidbyme/special-character-in-android-c7f10a490911

I am on Samsung Galaxy A5 2017 without root. Isn't that link just for app developers?

Let experiment a bit. Try this keyboard. Search for "white space" when you open it. Copy the character and paste in a another app. Is it displayed corectly or not?

Have you try those: ➢ or ➢

As of now there is no way to install fonts globally for all applications. I would advice you to write to app developer.
Also this character should be displayed correctly in your web browser.
In conclusion best way is to approach your application developer by following a feedback channel or writing a review if no feedback or support channel is provided.
Apps like
WPS Office support this

I encounter the same problem. Just open this Question url in Chrome browser in Android... this sign ⮚ will not be displayed... :(

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


text:
Fix ERR_PROXY_CONNECTION_FAILED due to a change in global proxy by mobile security framework through adb shell on non rooted phone
The problem in a non rooted Samsung Galaxy S7 smartphone:

ERR_PROXY_CONNECTION_FAILED in Google Chrome
No internet access on cellphone wireless settings
No internet access on cellphone mobile data setting
only working Whatsapp or Google Duo

The cause

I was working with Mobily Security Framework (https://github.com/MobSF/Mobile-Security-Framework-MobSF). It is a set of tools to analyse mobile apps.
In the option of dynamic analysis, my cellphone was connected to the PC through USB. The tool works with genymotion emulators (https://www.genymotion.com/fun-zone/) but if the device is connected, MobSF starts to setup a testing environment in the smartphone.

[INFO] Creating Dynamic Analysis Environment
[ERROR] Error Running ADB Command
[INFO] Android Version identified as 8.0
[INFO] Environment MobSFyed Check
[WARNING] This Android instance is not MobSfyed.
MobSFying the android runtime environment
[INFO] Android Version identified as 8.0
[ERROR] Make sure a Genymotion Android x86instance is running
[INFO] Installing MobSF RootCA
[ERROR] Error Running ADB Command
[INFO] Installing MobSF Clipboard Dumper
[ERROR] Error Running ADB Command
[INFO] MobSFying Completed!
[INFO] Starting HTTPs Proxy on 1337
[INFO] Enabling ADB Reverse TCP on 1337
[INFO] Setting Global Proxy for Android VM
[INFO] Starting Clipboard Monitor
[INFO] Getting screen resolution
[INFO] Testing Environment is Ready!

As non rooted device, MobSF fails ([ERROR] Error Running ADB Command) but it succedded in changing the global proxy setting ([INFO] Setting Global Proxy for Android VM)

The solution

It is explained in How to set Wi-Fi HTTPS proxy, not HTTP, via adb shell? The command is running in adb shell:

adb shell settings put global http_proxy :0

In spite of the wifi configuration or mobile data configuration (through APN) is set to proxy none, this global configuration is onlye change through adb shell


text:
Changing icon shape - Samsung Galaxy J7
I would like to change my icon shape on my Android 9 Pie - Samsung Galaxy J7 from the default to the circle.
How can I do that? (attach steps with images, if possible)
Home screen screenshot: https://drive.google.com/file/d/1MVUtpkfkReZ-hc1ISQS9fHbTvzqcEkMi/view?usp=drivesdk
https://drive.google.com/file/d/1McqRNbxOFZG98JMHbrqZ3pqXvvh49oaX/view?usp=drivesdk

The default icon is circle in Android 9 pie. Please have a screen shot of your home screen and device name, so that we can determine what was the real issue.

@RahulGopi I've now added screenshot links in the question. My default icon shape is a curved square, not a perfect circle like I want it.

Samsung uses squircle shape (curved edged square) which is the default for samsung devices. You need to change the launcher, to have adaptive icons. Install any launchers like Nova launcher, action launcher from play store, and apply adaptive icons from launcher's settings.

@RahulGopi Thank you!


text:
Installed LineageOs16 on oneplus5 but I get black due to wrong firmware update how I can fix it?
On my Oneplus5 I attempted to install twrp and lineageOS rom. The steps I followed were:

Unlocked my bootloader
Installed latest twrp (3.3.x)
Installed firmware version 3.1.4
Installed lineage OS 16

But instead of installing the firmware for lineageos16 I installed the firmware for lineageos 15 (firmware 5.4.1), so on boot I get a black screen.
How I can reset my phone in order to get it back and start all over again?
If there's a way without reset back to square one I would appriciate that.
Edit1:
After managing to boot into revovery again by using an older twrp version, I installed the firmware version 9.0.9 and rebooted though I still get black screen.
I managed to boot into recovery following these steps:

I downloaded the oldest twrp version I could find (v 3.1.1)
By pressing Power Up+Start button I placed the device into fastboot mode.
I run fastboot boot twrp-3.1.1-0-cheeseburger.img ( twrp-3.1.1-0-cheeseburger.img is the twrp version 3.1.1) I temporarily booted into the older version of twrp.
I side loaded the firmware version 9.0.9.

You are close to fix the issue and have the lineageOS in your device. The only thing left to do in order to fix the issue is to boot into the recovery once again ( As far as I understand the twrp v3.3.1 is installed and temporaly booted into the oldest one).
Please follow the following steps:

Boot into recovery mode via pressig Volume Down + Power
Then on twrp enable the sideload.
Run adb sideload lineage-16.0-20191220-nightly-cheeseburger-signed.zip (lineage-16.0-20191220-nightly-cheeseburger-signed.zip is the latest one for now please replace it with the build of lineageos you desire as long as it is the version 16 of it)

So in other words you just need to reflash the lineageos using the latest twrp version you installed.


text:
Data on 4G only with 3g access without data
My provider has special 4G only bundles at more GB/$ but has no VoLTE support, I was looking for a solution to block mobile data when and after i get a call or for other reasons when I drop to 3G/H+. It opens the taps on my balance when it sits on H+ and i have only one solution for now is to block out my calls which isn't a very  great solution. any help to this is highly appreciated

Welcome to Android Enthusiasts! You can try to automate the process. But root access will be required for the automation app(s).


text:
How can I turn on google maps speedometer alerts on exceeding the speed limits?
How can I turn on google maps speedometer alerts on exceeding the speed limits?
waze has a good system , it shows your speed and puts a red circle around it if you go over the speed limit.
But I don't see it on google maps
I am in the Uk and have read that google maps has rolled out that feature for the UK..
https://www.slashgear.com/google-maps-on-screen-speedometer-will-warn-you-if-youre-speeding-06579422/
"Aside from not being available on Android Auto yet, this new Google Maps feature is rolling out to users in limited markets rather slowly. Those include Argentina, Australia, Belgium, Brazil, Canada, Czech Republic, Germany, India, the Netherlands, Poland, Portugal, Sweden, the UK, and the US. No need to update anything as it seems to be a server-side switch that only Google can flip.
The on-screen speedometer is just the most recent Waze feature added to Google Maps"
I see the speedometer, just not the alert when over the speed limit.
I see pictures on google images like

But not on my phone
I have gone to settings..navigation setings..driver options.. and I have speedometer turned on and 'driving notifications' turned on, they were on anyway by default. But still it doesn't show me speed limit.
As a workaround I wouldn't mine an app that shows the speed limit in the corner of the screen but I don't know of such a thing either. The closest I have is Waze which has the speedometer with alerts, and I can make google maps small and sit it in the middle of a waze window. But then google maps is very small. I don't like waze that much i'd rather not have to use it just for that.

I would love an answser which actually gives the solution in google maps, not some other app. OP is in the UK and I would love answers also covering The Netherlands and Germany as mentioned in the question as upcoming rollouts.

@MartinZaske the accepted answer is Google maps and would work in whatever country. The apps were written in the USA

@MartinZaske the solution is giving an overlay over google maps. So if google maps is misbehaving and not showing speed, then those overlay programs are.

So basically Google Maps still does not provide this feature. So imagine I buy a nice Mercedes from a genuine dealership and have some expert apply leopard fur and bunny ears. Then people will stop me in the streets and ask "What is that? Where can I get one too?". Then I answer "It is Mercedes." And they rise an eyebrow and wait. And then I go "All right, it is a Mercedes! With an overlay. But no side effects. My Mercedes garage just loves it when I show up for regular maintenance..." Thanks guys for clarifying. Seems Google just wants to stay clear from the legal pitfalls in this context.

@MartinZaske  This doesn't look like leopard fur and bunny ears. It looks like something that anybody looking might think is part of google maps. And there's actually a lot of flexibility to the concept. It's good that android allows for that.  And it means people aren't too at the mercy of google. It'd be better if google maps were open source.

Both these apps appear to meet the requirements (not tested by me). I have requested OP to add/edit based on their tests.

You can try Velociraptor - Speed Limits & Speedometer, which is free and links to Open Street Maps (OSM) as also appears as an overlay  on Google Maps (select auto Launch in advanced settings). It is free & Open Source

Features:
• Automatically displays in any apps you choose (e.g. Google Maps)
• Intelligent caching & fast refresh of speed limits
• Sound alert when speed limit is exceeded
• Speed limit tolerance: % and integer amounts
• Transparency, size, and tap to hide setting

Alternatively, app Maps speed limits . It's a paid app with one week free trial

Maps Speed Limits shows the current speed limit in Google Maps or any other app.
Speed limit alert: play a sound when speeding

Barlop / OP adds
Looking at the screenshot below, you see on the left of the screenshot. (red circle aside), Velociraptor showing speed limit and speed.
Also on the left, you see the red circle, that's map speed limits. (not so necessary as Velociraptor shows both speed and speed limit anyway).
The speed mentioned on the very bottom is google maps saying that, google maps suddenly decided to state the speed!
I don't mind having both, sometimes the speed limits reported can differ, as the speed limits use a different database and they can update at different positions on the road. Velociraptor makes clear it uses OSM, and i'm not sure what database map speed limits uses.
They work internationally and have an option to switch between kph and mph.
Velocirapter also has quite comprehensive settings too and is pretty easy to navigate. And the google play app velociraptor page shows some screenshots of the settings it has too.
It is an overlay so google maps is open there, and any app showing the speed or speed limit is showing it as a floating  overlay over it.

Here is another pic from here incase anybody doesn't believe that the above is google maps (it is). As is the pic below. And since its google maps it applies to works for whatever country you are in.

The question asked about google maps, it seems this answer is proposing a totally different app - or is this velocirapter some kind of plug-in to google maps?

@MartinZaske It's a workaround. Please see last paragraph of question

@beeshyams no it is google maps!

@MartinZaske it is an overlay, but it's very quick to try so if you tried it you'd se for yourself. And this answer stated about it being an overlay

#barlop Of course it is. My bad in not being clear. What I was referring to as "workaround" was in the context of an alternative means super imposed on Google maps, in the non availability of native means

@beeshyams you say " It(Velociraptor) is free & Open Source"  <-- Free yes, but where did you get 'open source' from?   And don't say me 'cos I don't think I wrote that (and perhaps at your suggestion, my comments were deleted so I can't prove I didn't, but I didn't!).   OSM stands for open street maps, and OSM happens to be open source.(though OSM being open source isn't that relevant to the question),

@barlop it's on the Github. For a moment, I was foxed too, wondering why I said that :-)


text:
Can you show advanced settings in android by default?
In almost all settings sub-menus in newer android versions, there is a item in the list called "Advanced" closest to the bottom, that shows additional settings when pressed. This is apparently a design goal called Progressive disclosure, according to Android Settings Design Guidelines
I am wondering if the "Progressive disclosure" feature can be disabled somehow, so that I am shown all settings in sub-menus by default.

It is how the developer of that Android ROM designs the settings screen. There is no user-end setting to decide how the settings show up and /or to sort them in different ways. As it is a Google instruction to hide less used settings inside the "Advanced" menu, most developers will decide on pushing additional settings behind that menu item. In fact my current phone did that even when there weren't at least 3 items in the advanced menu.
Short answer: It  is not possible to show the settings outside of the "Advanced" sub-menu. There's no way for users to disable the use of Progressive Disclosures.
Root and modification can help in adjusting the priority/place of that setting item. But that's probably too much effort to achieve much lesser.


text:
Android 9 Pie says 'encrypted', but phone can receive calls after reboot (before entering screen lock password)?
I have a new Optus branded ZTE phone (Android 9 Pie). I added a screen lock password. Apparently it is now automatically encrypted -
Settings / Security & location / Advanced / Encryption & credentials / Encrypt phone = "encrypted"
When I reboot the phone, I had expected for the phone to request my password before it got to my home screen (my older phone did this). However, to my surprise, upon reboot... the phone boots to the home screen. How can it know what my home screen looks like before I even enter the password?
In addition, it can receive calls? Further, if I swipe down and click 'Screenshot'... it will perform the screenshot and add it to Local / Phone / Pictures / Screenshots
What am I missing?

That's how File Based Encryption (FBE) works. What you are expecting is Full Disk Encryption (FDE), being replaced with FBE by most of the OEMs.

To further add to what @IrfanLatif said, see this https://stackoverflow.com/q/38632977

Also see this https://android.stackexchange.com/q/195713/131553

@ajjwjajatt please use comments or edit your question to add further details. // Does your screenshot persist after you unlock the screen? If so, your OEM encrypted the internal SD card directory (/data/media) as Device Encrypted (DE), not Credential Encrypted (CE), though that doesn't make much sense. You need a rooted phone to fully explore the details of encryption.

+1 for making your own thoughs about


text:
Unable to archive IMAP email with GMail app
I'm using the Gmail app on a Pixel 2 running Android 10. I'm connecting to a private IMAP server (despite the app name, "Gmail" is a general-purpose mail client, not just for Google Mail).
How can I get it to recognize my Archive folder?
My IMAP server (Dovecot) offers an Archive folder, which is honored by all other IMAP clients (Roundcube, Windows 10 Mail). The Andoid Gmail app, however, does not show an archive button when reading the mail, and swiping will delete—rather than archive—the message.
When I'm reading Google Mail, it works as expected; there's an archive button next to the trash, and swiping archives the message. With my Dovecot account, the archive button isn't shown, and swiping moves it to the Trash folder.
Here's what the IMAP server returns for available folders:
d list "" *
* LIST (\HasNoChildren \Archive) "." Archive
* LIST (\HasNoChildren \Sent) "." Sent
* LIST (\HasNoChildren \Drafts) "." Drafts
* LIST (\HasNoChildren \Junk) "." Junk
* LIST (\HasNoChildren \Trash) "." Trash
* LIST (\HasNoChildren) "." INBOX
d OK List completed (0.001 + 0.000 secs).

This is correct, and is honored by other clients.
In the Gmail app, if I click on the hamburger menu when viewing a message, I can select "Move to", and it shows an Archive folder there (in fact, Archive is the only folder listed there). Selecting this does move it to the Archive folder. This is unworkable, though; I need the Archive button while reading, and I need swiping to archive instead of deleting.

I need the Archive button while reading, and I need swiping to archive instead of deleting- since you are referring to a generic mail client, have a look at FairEmail, a privacy focused mail client that can do much, much more

I am not familiar with other parts of your question

Thanks for the pointer, @beeshyams. I like that alternative. I found a small bug in it, and the author already fixed it. The free version was good enough for me, but I'm buying it to support him.

At this point, after trying five different Android IMAP clients—all of which work fine—I can confidently say that the Gmail app is not fully implementing the folder specification. Perhaps it's intentionally crippled, but either way, it doesn't appear to be usable for my needs.

Glad it helped. Please self answer to help others in future :)


text:
Displaying the saved name for self-phone number in WhatsApp
I have my own WhatsApp account's number stored as a contact in my mobile.
Theoretically, WhatsApp should detect my own number from the contacts list and show the name of the contact as set in the list of chats if I send myself a message.
The following screenshot shows the chat thread with my own phone number even though it's already saved in the contact.

Is it possible to display the name from the saved contact instead?

Theoretically, it should. However, WhatsApp doesn't allow that. So, whilst you can still somehow start a chat with your own number and send messages, there's no way to make WhatsApp see it as a contact and show it with a name. I have tried saving it in different ways to no avail.
I often use the self chat to save important messages and to take notes without having to send the message to a random contact. And for that I just type in my number to quickly get it there.


text:
LineageOS / bardockpro / recent LineageOS installation package do not work
I have been happily using and occasionally upgrading a bardockpro device for many months.
However, in summer 2019 the device stopped booting into upgrades that were released after July. The most recent build that works, insofar as I know, is the 20190710 nightly build.
Since then occasionally I tried newer builds - never successfully. I habve also flashed stock rom. and then retried recent lineageos builds. No success.
The problem, in my reading of an issue  is that the device is not critically unlocked. Therefore not all parts can effectively can be flashed.
so, one question was: how to
get
Device critical unlocked: false

to
Device critical unlocked: true

?
However, my reading of the issue was misleading - and this was not the question. The question was way less specific: how to get the device working with the updated builds?

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

Well, the solution emerged in a conversation in the German Android-Hilfe. The solution was to

flash an older Stock ROM version.
let the Stock ROM update itself, and in that process, seemingly, get all the partitions "right".

Afterwards I was able to install recent Lineage OS builds following the standard installation instructions.


text:
Samsung device isn't connecting via USB cable for file transferring
I am using a Samsung Galaxy J8 device . My phone doesn't have any SD card. I was able to browse files of phone from my PC(ubuntu os) , even I could debug my app from android studio.  But suddenly I am not able to do so. When I connect my phone via USB to my PC , it is only charging . What I did so far is following.

Enable developer option and usb debugging , changed default usb configuration to file transfer and image transfer and MIDI .
Restarted my phone.
Restarted my PC .
Change of USB cable and port .
At last factory reset .

After trying all above things , still I can't connect to phone via usb cable .
I think my pc , usb cable , usb port are working fine . Because when I connected another device , it shows me the following dialog .

I used to see the same dialog for my phone, but right now,as I mentioned, my phone doesn't show me such dialog.


text:
Is it allowed to offer incentives for 5 star ratings on the Google Play app store?
I started using an Android app that is offering in-app incentives (unlocks) in return for 5 star ratings on the Google Play app store. Is this against Google Play's terms of service?

It's worth mentioning that apps can't see what rating you gave them. So if an app says that it'll give you a reward for a 5-star review, just leave it a 1-star review and you'll still get the reward.

Whether it is allowed or not, do you consider it to be morally acceptable? Consider your motivations and the effect on people who are misled (lied to) to get them to install your app. If it is worthy of 5 stars, it will receive them.

Oh, I really love that: A perfect 5 star worth app asks me to give a 5 star review. That's a very good reason to be give a 1 star review.

@Pikamander2 You can even just let it direct you to the Google Play page and don't leave any review at all, the app can't notice that.

I can confirm that you don't need to leave a rating having done this and still received the bonus. However, the result of the app making such a request is that I do not trust the existing ratings. It breaks the trust between the user and the ratings system so I can clearly see why Google bans it.

It is a violation of Google Policy

Highlighting one part of policy violation, related to what you say

Here are some examples of common violations:
Asking users to rate your app while offering an incentive

Edit:

For other violations see Google Play Content Policies

For reporting use Report Inappropriate Apps

Is there even a direct mechanism to be able to tell outside of cross-referncing user name's?

@zero298 nope, there isn’t

As Pikamander2 commented, just give them a rating of 1. Add a  comment if you're not afraid to be identified. If you don't, maybe they'll still figure out the reason and stop doing this.

I decided to leave 1-star review with a comment about their bad practice hoping that it would prompt them to update the app. I do like the app (not enough for 5 stars) so I don't want it removed from the app store but false reviews mislead people and is unfair on other developers. If they don't change the app soon I will report it.

It is against Google Policy, and also against The United States Federal Communications Commission's (FCC) advertising rules.
How to report such an app- You may have some luck by creating a post in https://support.google.com/googleplay/community. Don't be afraid to mention the app's name in there. The matter will be looked into by a moderator there who will then escalate the issue to Google staff.
I did the same thing in the Google Maps forum after an oil change place offered me a $10 discount for a 5 star review.  He was taking the customer's cell phones and writing those reviews himself.  He had over 500 reviews and after about a week they all disappeared.

He was taking the customer's cell phones and writing those reviews himself. shocking that anyone would hand over their unlocked cell phone to a complete stranger for just about any reason, much less to get a measly $10 discount.

shocked that there are ppl who would do about anything for a $10 discount? welcome to the real world :/


text:
What is actually occupying the internal storage for the apps, and how to get rid of it?
I have a Huawei P8 Lite, but this should not be related to the actual device. For a while, the free space on the internal flash just keeps vanishing without installing any new applications. I am storing the media files on the SD card, which is confirmed in the file manager. The file manager says, that my apps take 9.5GB from the internal storage. When I select all the apps in the Google Play application, those take only half of this - not speaking about the fact that most of them is already moved to the SD card (I got that some portion still remains in the internal storage). It can't be the firmware, as that is shown separately in the file manager.
So selectin all apps from which most part is not even there yields only half of the occupied space. What the heck is the mysterious other half? I can't imagine that cache and application-specific data could be that much, as the application widget in the settings is not confirming that.
Is there any app, that actually shows in a spreadsheet all installed apps, the associated storage capacity occupied on each storage device?

Answered here: How disk space is used on Android device? and here: Where Android apps store data?

@IrfanLatif so you are suggesting, that I either root my phone to see in depth, or save all, make a factory reset, resintall all, and hope for the best?

Yes. Otherwise you have to rely on space usage reported by Android. There is no other way to find out exact space usage details.


text:
SD applications return to Internal Memory
I have a Samsung J7 prime with Android 8.1, the issue is that my applications can be moved normally to external storage, but then it appears again in the internal memory. (when google play store updates the apps). Is there any way to avoid that?

To avoid updating apps it can be changed in settings when updating is allowed. Or u can shut it down all together then manually run scans to pick and choose which app you want to update.


text:
Gaining real su permission on GNURoot Debian instead of proot env
I'm running a Samsung Galaxy J110H, Android KitKat 4.4.4, rooted.
Is it possible to attain real superuser privilege on GNURoot Debian instead of fakerootfs? Is there any way as in when I type in su; there is an actual su prompt asking me to allow it? This is the outcome when I type in su:
root@localhost:/# su
setgid: Permission denied
root@localhost:/#
- - snip - -

Also apt-get update && apt-get upgrade returns:
unpacking python (from .../python_2.7.3-4+deb7u1_all.deb) ...
Processing triggers for man-db ...
/usr/bin/mandb: can't set effective uid: Permission denied
Setting up libexpat1:armel (2.1.0-1+deb7u2) ...
Setting up python2.7-minimal (2.7.3-6+deb7u2) ...
- - snip - -

You don't need proot if your device is rooted. And you don't need any app to run some Linux distro on Android. Just download the rootfs and create a simple shell script to start and stop Linux environment from adb shell or any terminal emulator app. I've been using Ubuntu, ArchLinux and Void Linux the same way on Termux and ssh for years. All that you need to do is a few bind mounts and chroot. Mount namesapce adds further isolation. I've built my kernel with support for network, pid and uts namespaces as well to further isolate both environments.

Damn I need a tutorial on that!!

i am not sure why you get permission denied. but sudo apt-get runs fine here (i am using Linux Deploy app via dropbearmulti ssh on terminal emulator, Android 7, settings: global namespaces in root app, permissive in SelinuxModeChanger app)

I too am getting this error in GNURoot. Search google and saw your question posted in many stack forums. I wanted to change from armel to armhf and followed the instructions on the Debian website but came to the error you stated. What I had to do was chown u+s /usr/bin/mandb. The error still popped up but everything worked like a charm.
I think you need to chmod dpkg again and then everything will run well. Btw I too am still running KitKat.
Edit:
After further testing and usage of gnuroot, it turns out that the method i stated above on bypassing the permission denied error does not solve all problems. After looking at /etc/fstab in the proot environment, there are no mount points. If you run the command mount from the gnuroot terminal you will notice that it will show mount points of the host system. Also you will notice that running chmod 4777 / or chmod u+s / the permission denied error will appear. If yoy run ls -l /acct it will list the /acct of the host system not of the proot.
I havent tested this but since the proot environment needs the suid flags you will need to unpack the booting image of you android device edit the fstab  and change the mount options removing nosuid option, repack and flash the boot image to solve your problem. Remounting in the terminal as root (not proot) does not solve the problem because even after remounting, the fstab file remains the same.
By the way this is just my theory and i will edit the answer if it works perfectly.
A quote extracted from an answer in reddit

If you have root, chroot. In a nutshell, a chroot will spawn processes straight in the Linux userland whereas a proot will do it from the Android environment and be limited by Android resource limitations.
A chroot can also run more closely to a desktop environment; full blown window managers, browsers and what not. Can even run Java and Android Studio.

Linux Deploy is different from Gnuroot because Linux deploy uses chroot while gnuroot uses proot thats the reason they work differently.
Edit2:
After even futher testing, i discovered that i needed to run apt-get install fakeroot then fakeroot /bin/bash
After running these commands, the error disappeared. Chmoding turned out to not solve entirely the error.
Also if you get installation errors try doing fakeroot /bin/sh or fakeroot /bin/dash
Proof that fakeroot works
am now in debian 10(buster) after patient upgrades.
Gnu root debian is like Termux but for old android versions.Regarding the su matter of calling su binary from inside proot, you need to install the tsu binary. Since gnuroot does not have pkg in termux, the same binary can be install via python2. So first install Python pip then run pip install tsu then run the tsu binary and maybe you will be lucky and gain real root permissions. It wont work on stock wheezy (have tested it) debian but try upgrading to jessie or stretch and maybe you will be lucky.

I think i should post the tutorial somewhere and maybe someone out there is searching for it.

Alternatively, you could use Another Term an updated maintained Gnu terminal in proot environment with updated proot binary which in my opinion can also be an alternaive to Termux. It supports as low as android version 4.0 and no root is needed. Here and here are links to the project to get more infor.
Some screenshot i took on my android 4.4.4 Tab Running on Buster:

And

I havent tested it but i think you can VNC and get a desktop environment.


text:
Xposed Framework
What framework is better to put on this device?
build.prop file
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=V417IR
ro.build.display.id=V417IR release-keys
ro.build.version.incremental=eng.root.20191017.113722
ro.build.version.sdk=23
ro.build.version.preview_sdk=0
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=6.0.1
ro.build.version.security_patch=2017-02-01
ro.build.version.base_os=
ro.build.date=Thu Oct 17 11:39:08 UTC 2019
ro.build.date.utc=1571312348
ro.build.type=user
ro.build.user=root
ro.build.host=f1c1db3625fe
ro.build.tags=release-keys
ro.build.flavor=cancro_x64-user
ro.bootloader=U-Boot
ro.bootmode=normal
ro.baseband=msm
ro.product.model=MuMu
ro.product.brand=Android
ro.product.name=cancro_x64
ro.product.device=x86_64
ro.product.board=
# ro.product.cpu.abi and ro.product.cpu.abi2 are obsolete,
# use ro.product.cpu.abilist instead.
ro.product.cpu.abi=x86_64
ro.product.cpu.abilist=x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi
ro.product.cpu.abilist64=x86_64,arm64-v8a
ro.product.manufacturer=Netease
ro.wifi.channels=
ro.board.platform=
# ro.build.product is obsolete; use ro.product.device
ro.build.product=x86_64
# Do not try to parse description, fingerprint, or thumbprint
ro.build.description=cancro_x64-user 6.0.1 V417IR eng.root.20191017.113722 release-keys
ro.build.fingerprint=OnePlus/OnePlus2/OnePlus2:6.0.1/MMB29M/1447841200:user/release-keys
ro.build.characteristics=tablet
# end build properties
#
# from device/generic/x86_64/system.prop
#
# system.prop for lollipop-x86
#poweroff.doubleclick=1

ro.sf.lcd_density=240
qemu.hw.mainkeys=1
debug.sf.nobootanimation=1

ro.kernel.android.checkjni=0
dalvik.vm.checkjni=false

ro.product.locale=zh-CN
persist.sys.timezone=Asia/Shanghai

ro.build.version.x64=true

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.com.android.dateformat=MM-dd-yyyy
ro.ril.hsxpa=1
ro.ril.gprsclass=10
keyguard.no_require_sim=true
ro.com.android.dataroaming=true
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=192m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=8m
ro.dalvik.vm.isa.arm=x86
ro.enable.native.bridge.exec=1
ro.dalvik.vm.isa.arm64=x86_64
ro.enable.native.bridge.exec64=1
ro.carrier=unknown
ro.config.notification_sound=FadeIn.ogg
ro.config.alarm_alert=Alarm_Classic.ogg
persist.sys.dalvik.vm.lib.2=libart
dalvik.vm.isa.x86_64.variant=x86_64
dalvik.vm.isa.x86_64.features=default
dalvik.vm.isa.x86.variant=dalvik.vm.isa.x86.features=default
ro.kernel.android.checkjni=0
dalvik.vm.lockprof.threshold=500
dalvik.vm.image-dex2oat-filter=verify-at-runtime
dalvik.vm.dex2oat-filter=verify-at-runtime
dalvik.vm.usejit=true
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt

xposed-v86.1-sdk23-arm64-systemless-by-romracer-20160928 not work
xposed-v86-sdk23-arm64 not work
xposed-v85-sdk23-x86_64-MIUI-edition-by-SolarWarez-20160610 work
But after activating any module in Xposed, the device does not load

Did you try the rovo version? https://dl-xda.xposed.info/framework/

Hi
I tried
x86 writes that there is no lib86 folder
arm 64 device does not boot.
Here is the error screen https://cloud.mail.ru/public/sFEV/4JyZ2iEyQ

Sorry, can't help with that


text:
Stopping auto upload to dropbox for specific folders
From the dropbox android app you can select folders to monitor and auto upload to Camera Roll folder in dropbox. Now I selected other folders besides the camera photos (e.g. screenshots). How can I select again which folders to auto sync so I can remove some folders from the list? I do not seem to find it

Are you on Dropbox plus?

This app let's you chose what folders you want to sync with more options than Dropbox. It's very good - I have been using it for many years till I moved away from Dropbox recently. Only catch is free version let's you sync one folder whereas paid version can sync entire Dropbox

Use rclone if you don't mind CLI. Free, open-source and with a lot of flexibility.

@beeshyams yes I am

I only have free Dropbox so can't help with settings or how to. Anyway, you have a couple of alternatives proposed above

@beeshyams why use another app?

It's because I don't know how DropBox Plus works. Maybe some one who has that can answer


text:
Android TV full screen on 21:9 display
Is there a way to display full screen video on Android TV on a wide screen 21:9 monitor?
I'm using the Xiaomi Mi box, if that's relevant in any way, as my understanding is that it must be a feature supported by the OS, not hardware.
This is a screenshot illustrating the problem.

Clunky workarounds
Given that there is no support on the OS side, here is a the workaround applicable only for local/LAN and network-streamable 21:9 videos that can be opened with VLC (or kodi):

In the monitor settings on-screen menu accessible via the physical buttons on the display select Ratio -> Wide — this will distort the UI and stretch everything to take the full display width.
Open the video file/URL in VLC and in the three-dot menu repeatedly tap Resize until the FILL mode is selected. Given that VLC can browse LAN hosts over samba/FTP/SFTP/FTPS/NFS this can cover some but not all use cases.

Kodi can also be configured to change the video aspect ratio for videos so a similar effect can be achieved via the cogwheel click -> Video Settings -> View Mode.
With this workaround you get full-screen video with the correct aspect ratio, but horizontally over-stretched UI.


text:
Can an android phone be tracked on find my phone app etc if the sim has been removed and had an factory reset?
Can an android phone be tracked last location on find my phone app etc if the sim has been removed and had an factory reset?

Google help says

To find, lock, or erase an Android phone, that phone must:
Be turned on
Be signed in to a Google Account
Be connected to mobile data or Wi-Fi
Be visible on Google Play
Have Location turned on
Have Find My Device turned on

After a factory reset, your account is removed from the phone and without SIM it's not connected to internet.
So no, it can't

is this true for FRP where google account remains bonded after reset?

My understanding is that all conditions need to be met. After a factory reset, wifi credentials are wiped, you can't enter the device to activate wifi, no SIM, so I think the logic holds that find my device won't work. But yes to be sure one needs to test @alecxs

@alecxs Í assume you mean factory reset protection. After resetting the device, you are not really logged in the Google accout, probably just the connection between phone ID and device ID is remembered somewhere (on the phone or at Google). Maybe Google could implement Find my phone even for your case, but this assumes that the thief in quite inexperienced, so the impact is questionable. Also, it could bring some negative PR like “Google tracks you even after factory reset”, regardless of good intentions.


text:
Applications don't recognise internal storage partition 2 mounted as external sd card
So I have a Chuwi Hi10 Plus running RemixOS 2.0 (Android 5.1.1). This was originally a dual boot tablet, but I deleted Windows, so now the device has 45 gigs of storage free on the drive. I formatted this part as Fat32, because I wanted to mount it as an sd card. I modified the fstab file in the boot image, to mount this new partition where normally an external sd card would get mounted. The partition gets correctly mounted, I can read and write it with Root Explorer, but the applications don't see it, so I can't really use it. What else do I have to do so that all the applications on the device recognise it?
The original fstab file (I included only the relevant part):
##############################################################
# Source: device/intel/mixins/groups/storage/sdcard-mmcblk1-4xUSB-sda-emulated/fstab
##############################################################
*/block/sda*                            auto             vfat    defaults                                   voldmanaged=usbdisk:auto
*/block/sdb*                            auto             vfat    defaults                                   voldmanaged=usbdisk2:auto
*/block/sdc*                            auto             vfat    defaults                                   voldmanaged=usbdisk3:auto
*/block/sdd*                            auto             vfat    defaults                                   voldmanaged=usbdisk4:auto
*/block/mmcblk1*                        auto             vfat    defaults                                   voldmanaged=sdcard1:auto
/dev/block/mmcblk1p1                    /sdcard          vfat    defaults                                   recoveryonly

The modified version (last 2 lines):
##############################################################
# Source: device/intel/mixins/groups/storage/sdcard-mmcblk1-4xUSB-sda-emulated/fstab
##############################################################
*/block/sda*                            auto                 vfat    defaults                                   voldmanaged=usbdisk:auto
*/block/sdb*                            auto                 vfat    defaults                                   voldmanaged=usbdisk2:auto
*/block/sdc*                            auto                 vfat    defaults                                   voldmanaged=usbdisk3:auto
dev/block/mmcblk1p1                     /mnt/media_rw/usbdisk4    vfat    defaults                                   defaults
dev/block/mmcblk0p12                    /mnt/media_rw/sdcard1     vfat    defaults                                   defaults

As you can see, I also modified the second to last line, because I wanted to have the actual external sd card mounted at usbdisk4, since the new partition would be mounted in its place. I set the flag to defaults, because the voldmanaged option wasn't working. Below you can see a screenshot of the partition succesfuly mounted:

App see only voldmanaged partitions.

But it didn't mount in that mode, so I don't know what else I can do.

it's stupid behaviour of stock android (and windows) to mount first partition only, maybe try another rom (if there is any alternative to RemixOS)? for example LineageOS does mount all partitions (not sure about the voldmanaged stuff)

Try /dev/block/mmcblk0p12 auto vfat defaults voldmanaged=sdcard2:auto or /dev/block/mmcblk0p12 auto vfat defaults voldmanaged=sdcard1:auto or */block/mmcblk0* auto vfat defaults voldmanaged=sdcard1:12 etc. But storage configuration before Android 6 was a bit complex. So you may additionally need to define an sdcard init service and modify framework-res.apk. See references here: https://source.android.com/devices/storage/config-example. An easy but limited way is to not rely on vold and mount the filesystem with correct permissions from fstab or init.d script or init service


text:
Samsung Galaxy S10+ Will not boot into Recovery mode from Download Mode
for the first time ever i'v tried to root my samsung device
I am running a Samsung Galaxy S10+ SM-G975F
I started by making sure OEM was unlocked + USB debugging put the phone into bootloader mode and unlocked it, then i proceeded to copy the AP firmware file across from my PC to the phone, Then used The Magisk Manager app to create the patched file, Copied this back over to my PC and flashed with ODIN v3.13
After the flash was complete for the root, the video i was watching mentioned you have to boot into recovery mode from download mode,
via
Hold Volume Down + Power button until the device restarts
Quickly Hold Volume Up + Bixby Button + Powerbutton, Until you see the bootloader warning flash then release all buttons except the Volume Up, until you boot into recovery mode.
Now I'v tried absolutely everything possible combination wise
Does anyone here have any solutions that may be of assistance as to me doing something incorrect?
the video i followed was this one. https://www.youtube.com/watch?v=o3a8YnWT3yk
I can enter Download mode still with the Key Combinations, just i'm unable to reach Recovery mode with the combinations that are explained to use
Thank you.

Community bump prevention: this question was closed because the question seems to have been abandoned (OP hasn't visited the site anymore after 2 years and existing answers have no votes). If anyone can evaluate the existing answers, feel free to vote accordingly and reopen the question (or mod-flag the question requesting for reopening). For anyone else having the same issue, please post a new question and refer to this question as additional context.

The problem with the S10 is that you cannot shut it down from "out of the Android OS".
Then you can only boot into the recovery with the (hard-ass) key combination when your phone is completely shut down. So if you miss the tricky key combination one time after shutdown or odin-flash you're stuck in some kind of boot loop between the "bootloader" and the "security warning". The only solution seems to be to let the battery drain so the phone is completely off and then use of one of the following methods:

Booting Into Different Modes
Even though you have rooted your Samsung Galaxy S10, you still have to
keep in mind that both the recovery and the Magisk will be in the same
partition. Which means that you will have to use a different method to
root into the rooted system.
Note: The following steps are to be followed when your phone is
completely powered off.
Unrooted System: Simply hold the power button as you would normally and your phone will boot into an unrooted system.
Rooted System: Hold the Power, Bixby, and Volume Up buttons together, and release them once the Bootloader Warning screen appears
and that will boot your phone into the rooted system.
Stock Recovery: In order to do that, you will have to hold the Power, Bixby, and Volume Up buttons together, and release the Power
and Bixby buttons when the Bootloader Warning screen appears and keep
holding the Volume Up button to boot your device into the stock
recovery.

In your case it will be the last option which is the most tricky key combination ever. I also failed it several times, it needs practice! (I suppose Samsung did this on purpose).
Check this guide, it's the best I found out there:
Root Samsung S10 Guide


text:
How can I change the storage location of a contact in Android?
How can I change the storage location of a contact in Android?
I don't see any option when editing a contact:

I use a Samsung Galaxy S9 with Android 9.

Do you mean SIM card?

@beeshyams storage location for contacts can be SIM card, Google account, Samsung account, etc.

For Google, Samsung or any cloud account, you need to sign in and enable sync-you don't "change" the location. For SIM card, if the OEM didn't provide an option, you could use a third party app

@beeshyams thanks, assuming I'm assigned in, which app allows to change the location of a given contact?

Once you are signed in and synced say with Samsung, you can either enable or disable sync, not change the location.. For transfer to SIM cards there are many apps available (search for SIM contacts) picked one at random - https://play.google.com/store/apps/details?id=com.dev.simcontactsmanager

Once you move to SIM you can delete from signed in accounts if that is your aim

@beeshyams thanks in my case I wanted to move between two different Google accounts . I'll give a shot to the application you mentioned

Moving between Google accounts - https://www.howtogeek.com/265006/how-to-transfer-contacts-between-google-accounts/

Login to both Google accounts at the same time and sync both. Then logout from the account you don't need anymore. I haven't tested it recently but it should work.

@IrfanLatif thanks I don't want to sync all contacts, but just move one contact

@FranckDernoncourt right. Then a simple approach can be to directly save to web UI

@IrfanLatif thanks what do you mean by save to web UI?

@FranckDernoncourt login to Google account on a web browser and create a new contact.


text:
How to attend my phone call from android phone in Mac?
I am using Asus Zenfone Max M1 Pro with Android 9.0
I wanted to attend my phone calls from mobile in Mac machine running 10.15.1 macOS Catalina,
I have tried, Airdroid, it doesn't support.
Any help will be appreciated. Thanks

https://apple.stackexchange.com/a/111194

https://www.xda-developers.com/scrcpy-control-android-on-pc

http://gizmostorm.com/how-to-receive-calls-on-mac-from-android


text:
Wipe data from dead Android phone
I have Samsung Galaxy A10s. Now its dead. No power on. I tried lots of combinations. I don't want anybody to get the data, messages or media files which is in internal memory. But as its not charging and not showing drive after connect through USB to PC, I can't delete data directly.
How can I delete media files specially from internal phone memory from my dead phone?

Related: How to make a complete factory reset, without anyone being able to retrieve my data and How to get data off a completely dead Android phone?

what @IrfanLatif wants to say is, your files are secure. it's nearly "impossible" to recover files from locked down/encrypted phone (except for bruteforcing/social engineering)

@IrfanLatif the thing is phone is not detected by computer

@alecxs 100% sure data is secured?,I heard it read by odin or other?

@DeanRox How to get data off a completely dead Android phone? exactly covers the case when phone is not detected by computer. If it's encrypted, the chances of data recovery are nearly zero. In other case it's very probable.

Further to what has already been suggested in the comments, if you're only interested in destroying the data and not recovering it, you could drill through eMMc to completely destroy it.
It is HIGHLY unadvised to do this without careful consideration as your phone contains a lithium ion battery and I shouldn't have to explain the dangers of damaging a battery.
You can follow this guide to remove the "motherboard" from the phone.
I'm not certain where the eMMc is located on the chip (the protective casing covers all the components and I've never done a teardown on the phone myself) but, at this point you can sort of just go crazy and destroy the whole thing.

i guess the purpose of wiping data is giving device to repair shop, not destroying it!

@x1ras I bought phone in one month ago.Has warranty period,if i tear down warranty will cancel.what can I do?

@DeanRox My apologies, you're question didn't clarify that you wanted to send the phone for repair or replacement so I answer strictly in terms of making the data unrecoverable.
Have you tried using a different cable to charge you're phone or connect it to your computer?
It may seem like an obvious thing but you be surprised by how many people wouldn't think of this.

@x1ras I tried,no response

you run latest (bootloader locked) android with all security features, there is no way to access data with any tools. Only way is try-and-error pin/pattern/password guessing. I don't think repair shop have time for this. there is Rate limiting one have to wait 30 secs after 10 unsuccessful tries. if attacker manage to repair your device, he could bruteforce a 4 digit pin in ~8 hours. security depends on weakness of your screen lock. a long alphanumeric password would take years. if screen lock is a pattern, data is wiped after 30x unsuccessful attempts.
you can remotely wipe your device/or change screen lock from Find My Device. as soon as it is connected to internet the changes will apply.

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


text:
Are there ways wherein an app would think it's operating on a different phone?
That means the device ID, and IMEI and every information the app would be able to gather would be what I've pre-set.
It would, for all intents and purposes, be as if it's installed on a different phone and it wouldn't know anything about the phone where it's actually installed in.
Obviously this will require a phone to be rooted, which is the case already.

XprivacyLua an Xposed module can do that. See How to hide or spoof bootloader info from any app?
for an example but bear in mind that if the app in question uses Java code , then this module will fail. For a detailed view of module, read module description. Salient features which you seem to be looking for:

Read identifiers (fake build serial number, Android ID, advertising ID, GSF ID)

Read network data (hide cell info, Wi-Fi networks, fake Wi-Fi network name)

Read telephony data (fake IMEI, MEI, SIM serial number, voicemail number, etc)

Read account name (fake name, mostly e-mail address)

You can also use this Magisk module MagiskHide Props Config in addition to Xprivacy Lua if needed as a supplement . Primary purpose of the module is different and it is less potent compared to Xprivacy Lua because it is a Magisk module and unlike Xprivacy Lua cannot hook into app API's. I haven't used it , instead use Xprivacy Lua


text:
How to use Viber simultanously on two phones but same account
Is there a way to use synchronized Viber installs on multiple (android) phones?
I know that Viber does not support simultaneous usage of the same account on two phones. Yet I can think of workarounds: I can install Linux on an android phone, and install Viber for Linux. Or remotely control a PC or tablet where Viber is installed. Anybody came up will a less tedious solution?


text:
missing 3gb of internal storage on samsung galaxy grand 2
I have a samsung galaxy grand 2 which uses android version 4.4.2.
My phone says that i am running out of space and it keeps notifying me about it which is quite disturbing. In settings > storage tab, it says in somewhere there are 2.37 gb of misc file but i cannot find them.

I have nearly tried every cleaning apps in google play and i am sure that my problem is not just simple as removing junk files or cleaning caches. After that , i used DiskUsage app to analyze and things get more interesting. It says there is only 5.17 gb internal storage in my phone, including system data.

There are no more photo to delete or no more app to clear. I just wonder where is my nearly 3gb of internal storage or what is this 2.37 gb of misc file. How can i regain that 3gb ?
Can the reason of all this thing some sort of physical damage on my phone that i could never fix instead of software problems ?

See my answer to How disk space is used on Android device?

Files like downloads are included in misc. Try to click on misc the to view them. The misc items can also be seen from any file explorer. In the second image attached, the total storage is more than 5.17 gib. If you add the values visible, the total is 5.78 gib. From what I have seen, there is no missing storage.


text:
Mounting portable SD card folder to internal folder (WhatsApp)
I am trying to mount WhatsApp media directory from portable SD to internal "SD", as the phone internal storage is very limited.
My phone:
Sony Xperia XZ1 Compact (32GB internal storage, 128GB external SD card), Pie 9.0, stock image, bootloader unlocked, dm-verity, and SElinux enforcing. Magisk 20.1 (mount Namespace Mode= Global Namespace). bindfs v.1.14.2.
I have read and tried what is shown in these threads:

How to bind-mount "data" and "obb" folders from external SD card in "/sdcard/Android"?
How can I make a symlink (or equivalent) inside /storage/emulated/0?
How to bind mount a folder inside /sdcard with correct permissions?
Why can't WhatsApp write to bind mounts?

Output of /proc/filesystems
nodev   sysfs
nodev   rootfs
nodev   ramfs
nodev   bdev
nodev   proc
nodev   cpuset
nodev   cgroup
nodev   cgroup2
nodev   tmpfs
nodev   configfs
nodev   debugfs
nodev   tracefs
nodev   sockfs
nodev   pipefs
nodev   devpts
        ext3
        ext2
        ext4
        vfat
        msdos
nodev   ecryptfs
nodev   sdcardfs
        fuseblk
nodev   fuse
nodev   fusectl
        f2fs
nodev   pstore
nodev   selinuxfs
        texfat
nodev   functionfs

The last relevant lines of output from mount -r
....
/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
/data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
/dev/block/sda60 on /mnt/qns type ext4 (rw,seclabel,nosuid,nodev,noexec,noatime,discard,data=ordered)
/dev/block/vold/public:179,1 on /mnt/media_rw/6534-3933 type texfat (rw,dirsync,nosuid,nodev,noexec,noatime,uid=1023,gid=1023,umask=0007,allow_utime=0020,utf8,min_prealloc_size=64k,max_prealloc_size=121910k,writeback_boundary=4M,readahead=4M,fail_safe,discard,hidden=show,errors=continue)
/mnt/media_rw/6534-3933 on /mnt/runtime/default/6534-3933 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6,nocache)
/mnt/media_rw/6534-3933 on /storage/6534-3933 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6,nocache)
/mnt/media_rw/6534-3933 on /mnt/runtime/read/6534-3933 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18,nocache)
/mnt/media_rw/6534-3933 on /mnt/runtime/write/6534-3933 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18,nocache)

The output of proposed command:
bindfs -u u0_a195 -g 9997 -p a-rwx,ug+rw,ug+X /mnt/media_rw/6534-3933/WhatsApp/Media /mnt/runtime/write/emulated/0/WhatsApp/Media

Gives me the following error:
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option

I then add the nonempty string to the command, and then the external SD card directory mounts as "internal".
The new lines from mount -r now reads:
/mnt/media_rw/6534-3933/WhatsApp/Media on /mnt/runtime/write/emulated/0/WhatsApp/Media type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
/mnt/media_rw/6534-3933/WhatsApp/Media on /storage/emulated/0/WhatsApp/Media type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
/mnt/media_rw/6534-3933/WhatsApp/Media on /mnt/runtime/default/emulated/0/WhatsApp/Media type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
/mnt/media_rw/6534-3933/WhatsApp/Media on /mnt/runtime/read/emulated/0/WhatsApp/Media type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)

WhatsApp does READ all the files correctly, however I cannot download anything new to the drive. This is frustrating as hell, as I have come to this stage before.
I just can seem to find out how to make WhatsApp being able to WRITE to the directory.
I have used apps like apps2sd, ts-bind, fbind, mount options. Anything under the sun. I can never reach a stage longer than WhatsApp being "tricked" to read from external SD, but never being able to write to external SD.
The only working solution, is not a viable solution, is to install experimental xposed, install old module xinternalSD, and magisk module "ExSDCard Access Enabler". Then WhatsApp works perfectly, but I believe this is a very unstable for the rest of my system and my phone. And I would really like to have a more clean solution to this problem, like the one you are proposing.
Please assist in this great great headache.
Last note, also tried the command as given from your other post:
bindfs -o nosuid,nodev,noexec,noatime,context=u:object_r:sdcardfs:s0 -u 0 -g 9997 -p a-rwx,ug+rw,ugo+X --create-with-perms=a-rwx,ug+rw,ugo+X --xattr-none --chown-ignore --chgrp-ignore --chmod-ignore /mnt/media_rw/6534-3933/WhatsApp/Media /mnt/runtime/write/emulated/0/WhatsApp/Media

Same result after adding nonempty option, WhatsApp can read from external SD, but cannot write to it.

Duplicate of How to bind mount a folder inside /sdcard with correct permissions?

Hi @Irfan,
You seem to be the most knowledgeable person about this issue.
I followed your guides to the letter, but they don't seem to work for me.
If you see what I have done, it should be OK, no?
I was not allowed to comment on the other threads though.   Also what difference would it make, if its the whole whatsapp folder or simply the media folder? The result should be the same no?

Thank you so much for your active assistence and help.
The reason why I dont believe that is the case as you suggest, is if I open the internal SD card, and browse to the folder I have mounted from external/portable SD card, I can read the folder, but cannot write into the folder. This is by 3rd party fole explorer on android (x-plore). This strengtens my suspicion, that there is something fundamentally wrong.
Could it be something with SELINUX being set to enforced. Believe someone sugested that on xda forum.

Ok.
I have tried your suggestion of mounting the whole WhatsApp folder and not the WhatsApp/Media folder. No luck.
I also tried mounting via sdcarsfs command given from your other post:
bindfs -o nosuid,nodev,noexec,noatime,context=u:object_r:sdcardfs:s0 -u 0 -g 9997 -p a-rwx,ug+rw,ugo+X --create-with-perms=a-rwx,ug+rw,ugo+X --xattr-none --chown-ignore --chgrp-ignore --chmod-ignore /mnt/media_rw/6534-3933/WhatsApp /mnt/runtime/write/emulated/0/WhatsApp
So i have tried both the sdcardfs and the vfat mounting.

Also may I mind you, that also the file explore can only read the mounted folder, but cannot write to them. Could it be that the context is not the same for all android phones. So for example: context=u:object_r:sdcardfs:s0   should be something else?

Off course.
I have made exactly what you wished for.
https://pastebin.com/gZm5LPd3

Based on the comment and the self-answer by OP:

This is the main outcome of this thread, and how it was made to work.

WhatsApp will not work if you only bind mount the Media folder in WhatsApp. I have no idea why. I.e. you must bind /WhatsApp and not /WhatsApp/Media
There is a difference if running commands from ADB shell or running from within a terminal app on the phone itself. I never paid attention to this detail before, as I thought they were the same.
bindfs did not work from terminal app on the phone. Somehow it would not load. It would work from ADB shell, but then it would not work properly. Therefore, I used the bind sdcardfs option instead. I.e. full command is:
mount -t sdcardfs -o nosuid,nodev,noexec,noatime,mask=7,gid=9997 /mnt/media_rw/6534-3933/WhatsApp /mnt/runtime/write/emulated/0/WhatsApp

Thanks for above but it does not work on Android Q. Any way we can bind mount WhatsApp on Android Q with root

actually I tried this very above approach a long time ago. It sounds like /mnt/runtime/write/emulated/0/WhatsApp won't quite point to /Storage/emulated/0/WhatsApp' Unless you maybe unmount whats already mounted 1st. .  The latter will keep writing to internal storage so I  wonder if / how the above helped ?

& I of course WhatsApp's storage is hard coded to /Storage/emulated/0/WhatsApp' . So whatever mischief you do under the hood... the final result should affect this path '/Storage/emulated/0/WhatsApp


text:
Android Emulator appears in strange UI
I am trying to create and run an AVD from command line using Android's Command line tools.
This means I used the sdkmanager to download the following modules:

platform-tools
emulator
build-tools;29.0.2
platforms;android-29
system-images;android-29;default;x86_64

Afterwards I created an AVD using call avdmanager create avd --name android29 --package "system-images;android-29;default;x86_64" where I selected no for Do you wish to create a custom hardware profile? [no].
When launching the AVD using emulator @android29 and booting it up afterwards I get an old-fashioned bootscreen followed by an old-fashioned homescreen. The settings page however shows that Android 10 is in use.
What is the meaning or the reason of the old-fashioned looking UI?

This can be solved by using system-images;android-29;google_apis;x86_64 instead of "system-images;android-29;default;x86_64".


text:
How to efficiently install same apps on 2 phones?
I have a main phone and a backup phone. Main phone is functional and has a bunch of apps installed. How do I install all the same apps on the second phone while using same Google account?

Back up from first phone apps to Google backup. Factory reset second phone and set it up afresh with same account. It would prompt you to restore apps, accept that and you would have most if not all apps restored. Download missing apps from Play Store. All this is possible if you are talking of Marshmallow and above- please [edit] your question to mention Android versions of both devices (note that data will not be restored in all cases)

If both devices are rooted, most efficient and fool proof way would be to use Titanium Backup to restore apps with data.

Transfer all apk files of apps to backup phone using any transfer app or Bluetooth. And install all that apk files in backup phone.
There is not required any internet data.

While the question doesn't say anything about root, I believe this method requires root access though since APK files are located in internal storage.


text:
How to install a firmware without losing your data and restore the previous one in case it goes wrong?
I have a OnePlus 5T and I can't install OTA updates anymore because my firmware is too old. In addition to that I don't have a full backup of my device because I'm using encryption and TWRP doesn't understand it.
I would like to simply try the new firmware and revert in case anyhting goes wrong without losing any data. Is that possible?
I'm not exactly sure what firmware means in this context and where to get it, but looking at the website, there is this download for a zip file with the following contents:

I'm pretty sure that this is the complete stock ROM, meaning if I were to install it, it would wipe everything and replace my LineageOS with the stock ROM.
What I would like to do is to simply flash "the firmware" and only the firmware without losing data on my internal storage and also not my app data, contacts, sms, wifi passwords, bluetooth pairings etc etc.
And before that I would like to create a backup of my old firmware so that I can go back in case it goes wrong.
Can this be done? Can it be done with fastboot?
Maybe using fastboot flash PARTITION [FILENAME] and some other command to do the backup?
Edit:
The updater-script in META-INF/com/google/android/update-script contains the following code:
getprop("ro.display.series") == "OnePlus 5T" || abort("E3004: This package is for \"OnePlus 5T\" devices; this is a \"" + getprop("ro.display.series") + "\".");
is_part_existed("/dev/block/bootdevice/by-name/vendor") || abort("vendor partition is not existed, exit ota!!");
show_progress(0.650000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
  abort("E1001: Failed to update system image.");
show_progress(0.100000, 0);
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat", "vendor.patch.dat") ||
  abort("E2001: Failed to update vendor image.");
show_progress(0.050000, 10);
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.200000, 10);
ui_print("Writing static_nvbk image...");
package_extract_file("RADIO/static_nvbk.bin", "/dev/block/bootdevice/by-name/oem_stanvbk");

# ---- radio update tasks ----

ui_print("Patching firmware images...");
ifelse(msm.boot_update("main"), (
package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64");
package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlib");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hyp");
package_extract_file("firmware-update/pmic.elf", "/dev/block/bootdevice/by-name/pmic");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tz");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/abl");
package_extract_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfg");
package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymaster");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xbl");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpm");
), "");
ifelse(msm.boot_update("backup"), (
package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64bak");
package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlibbak");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hypbak");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tzbak");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/ablbak");
package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymasterbak");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xblbak");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpmbak");
), "");
msm.boot_update("finalize");
package_extract_file("firmware-update/logo.bin", "/dev/block/bootdevice/by-name/LOGO");
package_extract_file("firmware-update/NON-HLOS.bin", "/dev/block/bootdevice/by-name/modem");
package_extract_file("firmware-update/adspso.bin", "/dev/block/bootdevice/by-name/dsp");
package_extract_file("firmware-update/BTFM.bin", "/dev/block/bootdevice/by-name/bluetooth");
set_progress(1.000000);

Should I just take the msm.boot_update("main"), and the msm.boot_update("finalize"), part and flash them like this?
# main
fastboot flash cmnlib64 ./firmware-update/cmnlib64.mbn
fastboot flash cmnlib ./firmware-update/cmnlib.mbn
fastboot flash hyp ./firmware-update/hyp.mbn
fastboot flash pmic ./firmware-update/pmic.mbn
fastboot flash tz ./firmware-update/tz.mbn
fastboot flash abl ./firmware-update/abl.elf
fastboot flash keymaster ./firmware-update/keymaster.mbn
fastboot flash xbl ./firmware-update/xbl.elf
fastboot flash rpm ./firmware-update/rpm.mbn

# finalize
fastboot flash LOGO ./firmware-update/logo.bin
fastboot flash modem ./firmware-update/NON-HLOS.bin
fastboot flash dsp ./firmware-update/adspso.bin
fastboot flash bluetooth ./firmware-update/BTFM.bin

Or would this already overwrite a partition that contains some sort of user data? Can I make a backup of these partitions first?
And what about RADIO/static_nvbk.bin, boot.bin, system.transfer.list, vendor.transfer.list and all that msm.boot_update("backup"), stuff?
Edit:
I ended up not being able to flash those firmware files via fastboot because it requires more than a "normal" unlocked bootloader. If I had done the necessary step to unlock the bootloader further it would have wiped all my data.
Fortunately you can bypass that by creating a zip with the firmware files and a custom OpenRecoveryScript (updater-script).
I found an awesome GitHub project that automates the whole process: https://github.com/angela-d/firmware_oneplus
I simply sideloaded the generated zip via adb sideload firmware-update-oneplus5T.zip and finally I was able to install my OTA updates.
https://github.com/angela-d/firmware_oneplus

Comments are not for extended discussion; this conversation has been moved to chat.

1) You can boot into TWRP recovery from fastboot
fastboot boot twrp.img

2) Then you can backup your whole emmc from adb
adb pull /dev/block/mmcblk0

Does /dev/block/mmcblk0 include my internal storage, my app data, contacts, sms, wifi passwords, bluetooth pairings, system settings etc? Have you personally tried that method on an encrypted device?

It is all stored in userdata partition. If TWRP is able to decrypt, you should pull /dev/block/dm-0 (=userdata) to get the unencrypted backup.
Otherwise, you still can separate encrypted USERDATA partition (and correlated partition EFS/METADATA required for decryption) from mmcblk0
Do a research how encryption works for your device, i can't help with which partitions are required!
3) print partition table with start/size
parted mmcblk0 unit B print
Warning: Not all of the space available to mmcblk0 appears to be used, you can fix the GPT to use all of the space (an extra 991 blocks) or continue with the current setting?
Fix/Ignore? i
Model:  (file)
Disk mmcblk0: 15300820992
Sector size (logical/physical): 512/512
Partition Table: gpt
Disk Flags:

Number  Start         End           Size          File system  Name         Flags
 1      524288        3670015       3145728                    proinfo      msftdata
 2      3670016       8912895       5242880                    nvram        msftdata
 3      8912896       19398655      10485760      ext4         protect1     msftdata
 4      19398656      29884415      10485760      ext4         protect2     msftdata
 5      29884416      30146559      262144                     seccfg       msftdata
 6      30146560      30539775      393216                     lk           msftdata
 7      30539776      47316991      16777216                   boot         msftdata
 8      47316992      64094207      16777216                   recovery     msftdata
 9      64094208      64618495      524288                     para         msftdata
10      64618496      73007103      8388608                    logo         msftdata
11      73007104      83492863      10485760                   expdb        msftdata
12      83492864      84541439      1048576                    frp          msftdata
13      84541440      118095871     33554432      ext4         nvdata       msftdata
14      118095872     159383551     41287680                   metadata     msftdata
15      159383552     161480703     2097152                    oemkeystore  msftdata
16      161480704     167772159     6291456                    secro        msftdata
17      167772160     176160767     8388608                    keystore     msftdata
18      176160768     2801795071    2625634304    ext4         system       msftdata
19      2801795072    3070230527    268435456     ext4         cache        msftdata
20      3070230528    15283519487   12213288960   ext4         userdata     msftdata
21      15283519488   15300296703   16777216                   flashinfo    msftdata

4) copy the partitions into single files (partitions vary for each device model, this is just example for FDE. sometimes metadata is a file located at EFS partition, sometimes encryption footer is concatenated to userdata partition itself)
dd if=mmcblk0 of=metadata.bin skip=118095872 count=41287680 bs=1
dd if=mmcblk0 of=userdata.img skip=3070230528 count=12213288960 bs=1

this is just example for better understanding and is very slow (10 kB/s). of course dd will copy faster when we increase block size, so calculate bytes into 8k blocks
12213288960 / 8192 = 1490880
dd if=mmcblk0 of=metadata.bin skip=14416 count=5040 bs=8k
dd if=mmcblk0 of=userdata.img skip=374784 count=1490880 bs=8k

5) repeat this for all required partitions. for successful decryption system and vendor may required too. beware you can only decrypt with correlating rom on this unique device itself. decryption on other device (even same model won't work)
6) for restoring you can flash this partition dumps from fastboot
fastboot flash userdata userdata.img
fastboot flash metadata metadata.bin

another method is restoring from adb
adb push userdata.img /dev/block/bootdevice/by-name/userdata
adb push metadata.bin /dev/block/bootdevice/by-name/metadata

or even from within twrp terminal
dd if=/external_sd/userdata.img of=/dev/block/bootdevice/by-name/userdata
dd if=/external_sd/metadata.bin of=/dev/block/bootdevice/by-name/metadata

FIRMWARE UPDATE
for firmware update i recommend to flash complete stock rom (you will lose all data), then flash LineageOS, then restore twrp backup data.ext4.win* (which of course you have created from working TWRP before)
another method is using sdat2img to convert system.new.dat and vendor.new.dat into ext4 images system.img and vendor.img, which you can flash along with other partitions from fastboot
please also read the questions from Android Enthusiasts Linked and Related section

The OpenRecoveryScript that https://github.com/angela-d/firmware_oneplus put in the zip that I flashed in order to update the firmware+radio looks like this: https://github.com/angela-d/firmware_oneplus/blob/master/update/op5t/updater-script So the partitions are oem_stanvbk, cmnlib64, cmnlib, hyp, pmic, tz, abl, devcfg, keymaster, xbl, rpm, LOGO, modem, dsp and bluetooth. Manual flashing via fastboot requires fastboot flashing unlock_critical (wipes your data), so I flashed the generated zip file to bypass that..

nice script! so you was right with just flashing everything except system vendor boot


text:
Preventing the screen going on on power connection
Whenever my phone is connected to the power source the screen goes on, I would really like to disable this feature, but cannot find any relevant option.
In case you want to know why this causes me problems I have disabled automatic screen off and the roads are very bumpy and regardless how many new cables I buy they cannot prevent power cable reconnecting.
HTC U11 Android 9.

Activate developer options by tapping about phone /build seven times or more and look for something like stay awake and toggle that. See this for developer options activation https://www.htc.com/sea/support/htc-u11/faq/enable-developer-options.html

I'm afraid it misunderstood my question, I love stay awake feature, that's why I do not want automatic wake up on power connection.

HTC U11 has AFAIK a USB-C connector. If the usb connection is unstable I would assume that the USB plug on the phone has a loose connection and should be fixed by replacing or soldering.


text:
Google still detects my voice when I turn off Assistant
After I have disabled Google Assistant in the Google settings the phone continues to show a black bar displayed with an icon of a microphone, with the words:

Say "Hey Google"

If I say "Hey Google" it detects my voice and shows a new window. I was just wondering why this is happening if Assistant has been disabled.

Android Police blog fully disable OK Google listening android phone suggests a couple of ways :

Disable the Google Assistant and Voice Match

.... doesn't actually stop your phone from listening for commands; it only prevents it from reacting to them

Deny Google microphone permission, which is a better option. Depending on your Android version, it will take some searching to find the app setting. It will throw up a warning, but that can be ignored. Note that Google related functionality using microphone may be affected.