title: Albums disappears from gallery

text:
# Question
Title: Albums disappears from gallery
Some time back I was asked by the PHOTOS app to move photos to my account. When I confirmed the same I have found to my dismay that they have been removed from my albums in gallery. Now how do I retrieve those photos back to my albums

# Answer
Verify the photos are on your google account by going to https://photos.google.com. (sign in if needed) then verify they are there.

If they are then:

Go to accounts and sync. add account. allow 5 minutes to sync in background. open accounts and sync and sync now by hitting menu or 3 lines/dots and hitting sync. Update/install google photos app and then open it. change account under the google photos app to correct account if needed. See if photos are there, if not, after checking wait 3 minutes and check again.

Another option is too use the website to download all the photos to your sdcard by clicking on the "photos" section and then hitting the 3 dot menu in top right and hit "select photos", select the ones you want, then 3 dot menu again and hit download photos.
> 0 votes

---
Tags: photos
---


# Question
Title: Restored "App+Data" with Titanium Backup for com.android.providers.telephony and now Messaging is crashing
I have a Moto G 4th Edition (harpia) running LineageOS 14.1 nightly. I was trying to debug some issues with its MMS and I used Titanium Backup to take a backup of the APN settings because I was about to follow some tutorials and I wanted to know I could certainly undo them if I needed to. I wasn't able to fix the problem, so I tried to restore using Titanium Backup. When I was restoring the settings, it asked me if I wanted to restore App, Data, or App+Data. Without thinking too much about it, I clicked "App+Data". Then, I went back to the APN settings page to see if the APN settings I had were restored. When I clicked on an APN, it crashed. I think the exception in question is:

```
06-27 18:44:22.454  2067  3374 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading com.android.providers.telephony.TelephonyProvider uri content://telephony/carriers/1265 from pid=4901, uid=1000 requires the provider be exported, or grantUriPermission()
06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:608)
06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:483)
06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.content.ContentProvider$Transport.query(ContentProvider.java:212)
06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.os.Binder.execTransact(Binder.java:565)

```

(But another suspicious-looking message I see is `06-27 18:44:20.760 2067 5631 W ContextImpl: Failed to ensure /data/user_de/0/com.android.settings/databases: mkdir failed: EACCES (Permission denied)`.) I reached out to Titanium Track via their "Contact Us" page but haven't gotten a response so far (it's only been about 36 hours). In the meantime, I noticed that I also can't even use the Messaging app on my phone. When I try to enter an SMS conversation, it crashes. I think the exception for that is:

```
06-27 18:43:54.101  1141  2774 W ActivityManager: Permission Denial: opening provider com.android.providers.telephony.SmsProvider from ProcessRecord{890eeb3 3530:com.android.messaging/u0a73} (pid=3530, uid=10073) that is not exported from uid 1001
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel: wtf
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel: SyncMessagesAction: unexpected failure in scan
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.telephony.SmsProvider from ProcessRecord{890eeb3 3530:com.android.messaging/u0a73} (pid=3530, uid=10073) that is not exported from uid 1001
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.Parcel.readException(Parcel.java:1684)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.Parcel.readException(Parcel.java:1637)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4199)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.app.ActivityThread.acquireProvider(ActivityThread.java:5534)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2239)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1520)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.content.ContentResolver.query(ContentResolver.java:518)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.content.ContentResolver.query(ContentResolver.java:475)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.mmslib.a.VL(SourceFile:40)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.sms.i.ahs(SourceFile:1498)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.sms.DatabaseMessages$SmsMessage.getProjection(SourceFile:120)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.q.<init>(SourceFile:450)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.m.Lg(SourceFile:131)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.SyncMessagesAction.Jf(SourceFile:293)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.SyncMessagesAction.IU(SourceFile:244)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.BackgroundWorkerService.Kk(SourceFile:146)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.BackgroundWorkerService.onHandleIntent(SourceFile:123)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:68)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.Handler.dispatchMessage(Handler.java:102)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.Looper.loop(Looper.java:154)
06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.HandlerThread.run(HandlerThread.java:61)
06-27 18:43:54.103  3530  3843 E MessagingAppDataModel: SyncMessagesAction: unexpected failure in scan

```

Based on these two exceptions, I'm guessing that I shouldn't have restored the app but just the data, and some important metadata of the app got lost or wasn't restored correctly. However I'm not sure where I would find that metadata or what it should be.

* I tried TWRP "Restore Contexts".
* Someone on the `/r/Android` Discourse suggested I dirty load the same ROM. Unfortunately support for LineageOS on my handset is discontinued and there's no images to download. I tried re-using the latest update from `/data/lineageos_updates`, but that didn't fix my problem.
* I took a backup of my phone in its current (semi-working) state and I've tried wiping data for the messaging app, the telephony provider, the settings app, but I still have the same crashes.

Has anyone seen these exceptions before? What are these providers? Where are they kept on a normal Android system? What creates them, and is there a way to manually cause them to be created?

# Answer
OK, so I figured it out. For posterity, here's the process I went through.

* I took a complete backup using TWRP before I made anything any worse.
* I was fortunate in that I had a pretty clear idea what I had done to make everything go wrong (restore "App+Data"). That meant I could do it again and try to get a sense of what the app had done. I used `find` on the device to get a list of all the files that got changed when I did the bad restore. (busybox find doesn't have `-mmin` so I did `touch somefile; [do the bad thing]; find . -newer somefile`.) This gave me a list of "suspect" files: some stuff in the data partition `/data/data`, some stuff in `/data/misc/profiles` that I couldn't figure out; some stuff in `/data/app` incl. an APK and ODEX stuff; and a handful of files in `/data/system`: `users/0/runtime-permissions.xml`, `users/0/package-restrictions.xml`, `packages.xml`, `packages.list`, and a few others.
* In Titanium Backup, the thing that was being restored ("Phone and Messaging") seems actually to be an alias for `com.android.providers.telephony` -- when you click "Open system details", that is the "App" that comes up. This sorta matches the errors from the logs.
* I found https://github.com/TilesOrganization/support/wiki/How-to-use-ADB-to-grant-permissions and https://gist.github.com/Arinerron/1bcaadc7b1cbeae77de0263f4e15156f which were interesting. When I tried to `adb pm dump` the `com.android.providers.telephony` package, I saw that it had `WRITE_APN_SETTINGS: granted=true`. This increased my confidence that the permissions weren't really the issue.
* I also looked through the `/data/data` for the `com.android.providers.telephony` package. Everything was owned by `system` rather than by an app-specific account, but maybe that was OK. `restorecon` didn't do anything on any of those files either.
* Among the things that I tried in order to get stuff working again was to flash LineageOS 15.1 from a random post on XDA-Developers. That led to other problems but at least my messaging app didn't crash any more. This gave me a "known good" state. From this I `adb pull`ed a bunch of stuff from `/data`: `system`, `misc`, `app`, `user_de`, `data`.
* I grepped through all the files looking for `telephony` since I was pretty sure that was the thing that had been restored wrong. Nothing in `runtime-permissions.xml` had `telephony` in it (and I didn't really suspect permissions anyhow because of the `WRITE_APN_SETTINGS` thing, above). `package-restrictions.xml` seemed OK -- there was only one entry that referenced the `providers` package and there was nothing in it except `stopped="true"`. (`telephony` occurred in some other entries for other packages, but always under `enabled-components`, so that seemed OK to me.) `telephony` did show up in `packages.xml` but I didn't understand enough of the data format to know what it was saying. (Attributes present include `ft`, `it`, `ut`, and `isOrphaned`.)
* By comparing the `packages.xml` from the "broken" 14.1 install and the one from the "working" 15.1 install, I made some progress. From the 14.1 version:

```
    <package name="com.android.providers.telephony" codePath="/data/app/com.android.providers.telephony-2" nativeLibraryPath="/data/app/com.android.providers.telephony-2/lib" publicFlags="1007402629" privateFlags="8" ft="16b952851c0" it="11e8f7d4c00" ut="16b95285980" version="25" sharedUserId="1001" installer="com.android.vending" isOrphaned="true">
        <sigs count="1">
            <cert index="1" />
        </sigs>
        <perms>
        <!-- Some stuff that I disregarded because again I didn't think this was a permissions issue -->
        </perms>
        <proper-signing-keyset identifier="1" />
    </package>
<!-- much later... -->
    <updated-package name="com.android.providers.telephony" codePath="/system/priv-app/TelephonyProvider" ft="11e8f7d4c00" it="11e8f7d4c00" ut="11e8f7d4c00" version="25" nativeLibraryPath="/system/priv-app/TelephonyProvider/lib" sharedUserId="1001" />

```

From the 15.1 "working" version:

```
    <package name="com.android.providers.telephony" codePath="/system/priv-app/TelephonyProvider" nativeLibraryPath="/system/priv-app/TelephonyProvider/lib" publicFlags="1007402501" privateFlags="8" ft="11e8e4f2c40" it="11e8e4f2c40" ut="11e8e4f2c40" version="27" sharedUserId="1001" isOrphaned="true">
        <sigs count="1">
            <cert index="1" />
        </sigs>
        <perms>
        <!-- snip -->
        </perms>
        <proper-signing-keyset identifier="97" />
    </package>

```

OK! It seems like the `codePath` and `nativeLibraryPath` are screwed up. Possibly the `ft`, `it`, and `ut` fields too. I still don't really know what those are for, but they correspond to fields in other apps in the `packages.xml` file. Maybe they represent some kind of cross-application sharing. Anyhow, I used vim on the device to make some changes -- first removing `stopped` from `package-restrictions.xml`, and (when that didn't work) editing `packages.xml` to merge the two entries into one `<package>` entry with the `codePath`, `nativeLibraryPath`, `ft`, `it`, and `ut` fields from the `<updated-package>` element (and then deleting `<updated-package>`). I restarted the phone after each change to see if it worked. I can edit APNs/read SMS messages again so that's nice.

I was able to find https://dzone.com/articles/depth-android-package-manager which says that the `ft`, `it`, and `ut` fields represent timestamps so probably they don't correspond to anything in particular. Probably the paths were the essential change.

Overall I would say that I think Android could one day become as approachable and user-friendly as Linux, given enough effort. I don't even think it would require anything difficult -- just more effort documenting how things work from the user/system administrator's perspective (to balance out all the extant documentation about how things work from the app developer's perspective). A good example would be "What is the package.xml file and what do ft, it, and ut stand for". Also it would be great if the source of truth for Android distributions wasn't an ad-encrusted forum like XDA, but hey, one step at a time.
> 3 votes

# Answer
Today, I made the same mistake (restoring the whole 'Phone and SMS Storage' app with Titanium Backup) and solved it by

* uninstalling it from within TitaniumBackup (a warning appeared, but it was safe to ignore for me and uninstalling the update is not possible via the normal Android app settings)
* and restoring my SMS from an XML file afterward (Titanium Backup -\> Menu Button -\> Restore Data from XML...).
> 0 votes

---
Tags: 7.1-nougat, titanium-backup
---


# Question
Title: How to backup contacts to Google from Samsung devices which don't export vcf file?
The Contact apps that ships with Samsung devices does not seem to have a function to reliably backup *all* contacts on the phone and SIM storage to Google accounts.

Is there any third-party app that'd let me reliably do so? Bonus points if it'd let me sort which contact goes to which Google accounts registered on the device.

As a last resort, if there's no such app, I don't mind if I can get to backup to storage with which I can transfer the contacts to a different device.

**PS** I intentionally point to a specific model because I need to do so from two different Samsung devices and both their contact apps did not let me move all contacts to Google account. One of them does have `.vcf` export, but the other doesn't. I want a more universal solution if at all possible.

**PPS** The device that can do `.vcf` export has Google accounts correctly setup on both the new and old devices but all contacts has not been synced, hence the question.

# Answer
> 2 votes
Most of the contacts backup apps lack one feature or the other e.g. they don't backup high resolution photo when creating `.vcf` file. So I prefer CLI method to extract contacts data directly from database file using some scripting, but ***it requires root***. That's how I do scheduled back up of my contacts without Google account.

The following script doesn't save Google sync account information to `.vcf` file but you can extend the script to include/exclude any data if the concept is perceived.

Original credits to dump-contacts2db.sh.

```
#!/system/bin/bash -e

# dumps following fields of contacts from Android's sqlite database to vcf:
# Name, Phone Number, Email, Address, Photo, Title, Organization, Notes, Website
# required binaries: sqlite3, base64, xxd (all included with Android)

# contacts directory, database file and photos directory
CONT_PROVIDER='/data/user/0/com.android.providers.contacts'
DB="$CONT_PROVIDER/databases/contacts2.db"
PHOTO_DIR="$CONT_PROVIDER/files/photos"

# vcf file
VCF="/data/media/0/contacts_$(date '+%d-%b-%y_%H-%M-%S').vcf"

# delete backup file if error occurs
trap '[ $? -eq 0 ] || rm -f $VCF' EXIT

GEN_VCARD()
{
    # skip blank contact for first time
    [ -n "$name" ] || return 0

    # count number of contacts
    n=$((n+1))

    vcard="${name}${tel}${adr}${email}${url}${note}${org}${title}${photo}"
    vcard="BEGIN:VCARD"$'\n'"VERSION:3.0"$'\n'"${vcard}""END:VCARD"
    echo "$vcard" >>$VCF
    echo >>$VCF
}

# fetch contacts data from different columns of 'view_entities' table of contacts sqlite database
ROWS="$(
sqlite3 $DB "
SELECT
    view_entities._id, view_entities.mimetype_id, view_entities.data1, view_entities.data2, view_entities.data3,
    view_entities.data4, view_entities.data5, view_entities.data6, quote(view_entities.data15), view_entities.photo_uri
FROM view_entities
WHERE view_entities.deleted = 0
ORDER BY view_entities._id, view_entities.mimetype_id
")"

# to parse rows
IFS=$'\n'

# iterate through contacts data rows
for ROW in $ROWS
do
    # to parse columns from a row
    IFS="|"
    i=0

    # iterate through columns
    for COL in $ROW
    do
        i=$((i+1))

        # data included in each column
        case $i in
            1)  # Contact ID
                id=$COL;;

            2)  # Mime Type ID
                mime_id=$COL;;

            3)  # Phone Number, Website, Email, Notes, Address, Organization
                data=$COL;;

            4)  # Type ID of Phone No. / Email / Address, First Name
                first_name=$COL; type_id=$COL;;

            5)  # Name of Custom Phone No. Type / Email Type / Address Type, Last Name
                last_name=$COL; type=$COL;;

            6)  # Name Prefix, Title
                name_prefix=$COL; tytle=$COL;;

            7)  # Middle Name
                middle_name=$COL;;

            8)  # Name Suffix
                name_suffix=$COL;;

            9)  # Photo thumbnail hex data
                photo_hex=$COL;;

            10) # Full resolution Photo URI
                photo_uri=$COL;;
        esac
    done

    # start new contact when all rows of same contact ID are parsed
    if [ "$prev_id" != "$id" ]
    then
        # echo current vcard prior to resetting variables
        GEN_VCARD

        # init new vcard
        for i in name tel adr email url note photo org title; do eval "$i=''"; done
    fi

    # add current row to current vcard, 'mimetype' determines data type on every row
    case $mime_id in
        1)
            # Email
            case $type_id in
                0)  email_type=X-$type;;
                1)  email_type=HOME;;
                2)  email_type=WORK;;
                3)  email_type="";;
                4)  email_type=CELL;;
                *)  echo "Unknown email type of '$data'" >&2; exit 1;;
            esac

            email=$email'EMAIL;TYPE='$email_type':'$data$'\n';;

        4)
            # Organization, Title
            org='ORG:'$data$'\n'
            title='TITLE:'$tytle$'\n';;
        5)
            # Phone No.
            case $type_id in
                0)  tel_type=X-$type;;
                1)  tel_type=HOME;;
                2)  tel_type=CELL;;
                3)  tel_type=WORK;;
                7)  tel_type=VOICE;;
                12) tel_type=PREF;;
                *)  echo "Unknown phone no. type of '$data'" >&2; exit 1;;
            esac

            tel=$tel'TEL;TYPE='$tel_type':'$data$'\n';;

        7)
            # Name
            name="$name_prefix $first_name $middle_name $last_name $name_suffix"

            # remove leading/trailing spaces
            IFS=' ' read name <<<"$name"

            # always add complete name as First Name
            name="N:;"$name";;;"$'\n'"FN:"$name$'\n';;
        8)
            # Postal Address
            case $type_id in
                0)  adr_type=X-$type;;
                1)  adr_type=HOME;;
                2)  adr_type=WORK;;
                *)  echo "Unknown address type of '$data'" >&2; exit 1;;
            esac

            adr=$adr'ADR;TYPE='$adr_type':;;'$data';;;;'$'\n';;

        10)
            # Photo
            if [ $photo_hex != "NULL" ]
            then
                # look for high-resolution photo instead of thumbnail
                uri=$(echo $photo_uri | sed 's|content://com.android.contacts/display_photo|'"$PHOTO_DIR"'|')
                if [ -f $uri ]
                then
                    # convert binary to base64
                    foto="$(base64 -w 0 $uri)"
                else
                    # remove prefix/suffix from hex output, convert hex to binary to base64
                    foto=$(echo $photo_hex | sed "s/^X'//; s/'$//" | tr '[:upper:]' '[:lower:]' | xxd -pr | base64 -w 0)
                fi

                photo="PHOTO;ENCODING=BASE64;JPEG:"$foto$'\n'
            fi;;

        12)
            # Note
            note="NOTE:"$data$'\n';;

        14)
            # Website
            url=$url"URL:"$data$'\n';;

        *)  echo "Unknown mime type: '$(sqlite3 $DB "SELECT view_entities.mimetype FROM view_entities WHERE view_entities.mimetype_id = $mime_id" | head -n1)'" >&2; exit 1;;

    esac

    # preserve current ID to compare with next row
    prev_id=$id

    # reset IFS for parent loop to parse rows
    IFS=$'\n'
done

# echo last vcard, loop is done
GEN_VCARD

echo "Backed up $n contacts."

```

If you prefer GUI or don't have root, you can use some app like Contacts VCF.

# Answer
> 0 votes
This is what I did when I need to have a backup of my contacts. Because I lost most of them in a factory reset. But some contacts were there in my gmail account and sim card. So I did,

1. I copy all the contacts to the gmail account I have connected.(copied to 2 accounts)
2. Using google contacts app I remove duplicated and empty contacts.
3. I have selected my gmail account as the default contact saving place (not the phone or sim card. Its directly save to the google)

Now I can use google contacts app on any device or just contacts.google.com using any web browser on pc or mobile to access my contacts anywhere anytime.

---
Tags: contacts, google-contacts, google-backup
---


# Question
Title: How to get data off a completely dead Android phone?
Phone worked perfectly. Then one day completely dead, nothing at all. It may have been that "one day" was after some time of laying around, cannot recall.

Model: Android AT&T Samsung Galaxy S3 (SGH-i747 SKU S9255)

Already tried;

* Charging phone: no visual output at all, no leds
* Removing battery while charging: no visual output at all, no leds
* Removing SIM and SD card: no visual output at all, no leds
* Attempt to turn on: no visual output at all, no leds

I need to get our family photo's off this phone (stored on internal memory). I care less about the hardware/phone itself.

Thank you for any help you can offer!

# Answer
It seems like a hardware issue (not directly related to storage), better try to get fixed. Unless the device boots at least to some bootloader stage (like `fastboot` or `odin` or `edl`) you can't access its memory. Or if the data is extremely important, contact some professional data recovery service which usually do one of the two:

* Access eMMC directly using some low level protocol like `JTAG`. Special equipment - usually called some kind of ***box*** e.g EasyJtag \- is used to make communication with eMMC.
* Or using a chip-off method i.e. by removing eMMC chip from board.

Most devices built in the last few years use `eMMC` flash devices as their persistent storage. Usually eMMC and RAM are bundled in a single package; `eMCP`. So a compatible eMMC/eMCP reader can be used to recover data by connecting it to PC. A range of such readers/sockets is available on online stores from a number of chinese manufacturers - e.g. Allsocket and KZT \- to match with different sizes and shapes of BGA packages.

Please note that there are other factors as well which may define the destiny of data recovery through JTAG or a chip-off method. Data recovery is very less probable or impossible if:

* `eMMC` is dead i.e. it has reached the limit of `E/P` cycles it was designed for.
* You were using encryption (`FDE`/`FBE`) on your device. Starting with Android 5.0 encryption is hardware-backed. Quoted from here:
> By default, the decryption key is stored in the hardware-backed storage
> ...
> bear in mind that extracting the decryption key via chip-off or any other low-level method is not possible, so if you do a chip-off you won’t get the decryption key and won’t be able to decrypt the data.

**RELATED:**
> 7 votes

---
Tags: samsung, hardware
---


# Question
Title: Local Phone contacts not syncing with google
I have a OnePlus one mobile. The contacts that I store are getting stored in the Local Phone (I am able to see this when I select "Show Contacts from phone alone"). Those new contacts are not visible in my google contacts and these new contacts are also not visible in Whatsapp.

What should I do to resolve this?

# Answer
My solution was to migrate contacts from local storage to the Google account via an export and an import.

* contacts app \> manage contacts \> Export
* contacts app \> manage contacts \> Import =\> destination: Google =\> source: exported file

Also make sure to make Google your default contacts storage

* contacts app \> settings \> Default Storage Location =\> Google

And turn on sync of contacts.

Unfortunately Export and Import won't bring across the local storage groups. Groups entered in Google do sync across back to the phone.
> 0 votes

# Answer
Try saving all contacts you want to sync to Google. This should fix the problem. You do this by opening the contact page, tapping edit, and then tapping on the "Location" text box. This will open another window and you should be able to change where the contact is stored. You also need to go to Google Account settings (in the *Accounts* section of *Settings*), and ticking *Contacts* under *What to sync*.
> 0 votes

# Answer
Best way: Sure way with back up

Idea: Save your contacts to a file (.vcf) from your phone. Then transfer that file to your computer. Log on from your computer to Google account, go to contact page, then chose IMPORT option using that .vcf file.

If you can plug in a chip (USB) to your phone to copy the .vcf file, that works flawlessly when you plug the same chip to your computer.
> 0 votes

# Answer
Try re syncing your contacts. I had this same problem and re syncing my contacts work.
> -2 votes

---
Tags: google-play-store, contacts
---


title: audio jack issue

text:
# Question
Title: audio jack issue
I am facing issues with my audio jack: I can only hear on the right-sided earphone. How can I activate both sides? I'm using a Lenovo a7000, in case that's relevant.

# Answer
Make sure there's nothing in the audio jack that could be disrupting the connection. Use a can of pressurized air to blow anything out that might be stuck inside. That's always my first action when the audio jack doesn't work well.

Also, make sure twisting the headphones jack or pushing it sideways a little doesn't cause the sound to play properly. If twisting or pushing it the right way sometimes fixes the issue, and you're sure there's nothing stuck in the jack, your phone's jack or your headphones' plug might be damaged.
> 0 votes

# Answer
First, This may be the issue of smartphone jack issue or may be the headphones issue previously. Second, please check and sure there is nothing in phone Jack or not damaged the jack of headphones. Third, Also check the wire of headphone may be cut somewhere or damaged. If above second and third issue is not there then it must be the first case I mentioned above.
> 0 votes

---
Tags: settings, headphone-jack
---


# Question
Title: The issue with the Fingerprint unlocking
I've got this Android device I bought recently. It is Huawei Y9 Prime. But I discovered yesterday there is an issue with the fingerprint ID. The lock can be unlocked by anyone!!! the device unlocks for all the fingerprints of all the people. So what should I do now? Is this a common error?

# Answer
> 0 votes
Assuming you bought the Huawei Y9 Prime, the phone is so new that its possible you have found a software bug/flaw or have a malfunctioning unit. Or it could be user error.

Based on your post history, the purchase is a few days old. I have a few options:

* Contact Huawei and notify them that there is a problem. They will probably recommend...
* Returning it to the seller for exchange with another unit. If you bought it in a physical store, you can show the clerk who can then verify that the fingerprint sensor is behaving incorrectly.
* If the second unit is bad, you can either return it for refund, or live with PIN lock with the hope that it is a software problem that can be patched.

Personally before returning/exchanging the unit, I would record a video setting up a freshly reset device, show the software version in the video, setup a fingerprint unlock and have a different user unlock it. It may just a manufacturing defect in the early production run or the software itself isn't the final consumer version. Either way, video proof can improve the odds of a fix if the problem is real.

---
Tags: huawei
---


# Question
Title: Disabling Download Manager notifications
I have a Pixel 3 XL with Android P, and for the last 3 days, my phone started vibrating almost every hour, at exactly hh:10m, but without showing any notifications.

After much time, I found some sites indicating how to find the origin of the notification: adding a Settings widget to my Home screen, with a Notification log (otherwise I couldn't find the entire log anywhere else). This revealed the cause is Download Manager, informing me at 3:10 AM that I downloaded a file 3 days ago.

Now, I don't remember if I tried uninstalling it from the phone, but the fact is that there is **no** such app in the Settings -\> Apps & notifications menu, so I cannot change its notification settings.

I tried going to the Files app (as some sites mentioned), which states "Notifications: on", but when I select it, the Categories part is empty, so there is nothing to disable.

So, **which app is actually emitting the Download Manager notifications, and how can I disable them?**

# Answer
> 9 votes
When searching for Download Manager under Settings -\> Apps & Notifications you missed listing out the system apps. List them by tapping on the three dots line in the upper right corner and choosing show system apps. Download Manager is a system app and you would find it apps list.

To disable the notifications from that app, tap on that app in the list, then Notifications, and choose an option there that fits your needs.

# Answer
> 4 votes
Just wanted to add an answer for this that I found on Reddit, in case it disappears.

This issue seemed to be fixed for a few people by doing the following: Go to settings -\> Apps and Notifications -\> see all apps -\> three dot menu -\> show system. Scroll to *Download Manager*. Clear cache, clear storage, force stop, disable, enable.

Of course, your download history will be cleared if you do this, but it's up to you to decide if that's worth it :)

---
Tags: notifications, 9.0-pie, google-pixel-3-xl
---


# Question
Title: What is the small hole on the top of the pixel 3a?
Many reviews note the pixel 3a has a headphone jack on top. Yes, I like it, too. But I can't find anywhere that describes the other little hole, the one on the right in this picture. What is it?

# Answer
> 2 votes
If you look at the specs for the Pixel 3a and open up the Media & Audio section you'll see:

> Stereo speakers
>
> 2 microphones
>
> Noise suppression

The small holes are for microphones, usually multiple ones are used to improve call quality, i.e. suppressing background noise.

---
Tags: google-pixel
---


title: Stop notifications from chrome spam

text:
# Question
Title: Stop notifications from chrome spam
My new Android device is full of spams. I get chrome notifications continuously from a website I did not even visit once. looks like a gossip site. Are there any methods to stop these annoying notifications?

# Answer
> 1 votes
Try the following:

1. Open Chrome, then Settings,select Site Settings
2. Click on Notifications. Check if that website is listed among the Allowed sites.
3. If yes, Click on it. Remove or block the permissions given to it by clicking on the permissions

---
Tags: applications
---


# Question
Title: How to use Android device as router without cellular connection?
I have an Android tablet that has no SIM card and no cellular connection. Is it possible to set it up as a discoverable WiFi access point? I know when you have a cellular connection you can set up tethering and have an id and password that can be discovered by other devices. Is it possible to do this without any cellular connection?

I don't actually need internet access at all. All I'm looking for is to set up a small WiFi LAN between an Android tablet and a small device running Debian Linux.

# Answer
> 3 votes
If you have root access and don't mind working on CLI, a shorter version of script used for How to use Android in Wi-Fi repeater mode? can be used to create a hotspot network provided that your WiFi interface supports AP mode:

```
#!/system/bin/sh
set -e
#set -x

# this scripts creates a hotspot network

[ "$(id -u)" = 0 ] || { echo 'Not running as root!' >&2; exit 1; }

# check required binaries are on PATH
for bin in iw ip iptables hostapd dnsmasq
do
    ! which $bin >/dev/null || continue
    echo "$bin not found." >&2
    exit 1
done

####################
# define variables #
####################
SSID=MyAP                           # set this to your desired string (avoid spaces and non-ascii characters)
PASSCODE=foobarfoobar               # set this to your desired string (8 to 63 characters)
WIFI_INTERFACE=wlan0                # set this according to your device (check with 'lshw' or 'ip link show')
AP_INTERFACE=${WIFI_INTERFACE}-AP
DIR=/data/local/tmp/$AP_INTERFACE
SUBNET=192.168.43
IP=${SUBNET}.1

##########################
# start / stop tethering #
##########################
STOP()
(
    echo 'Cleaning up...'

    # don't print error messages
    exec >/dev/null 2>&1

    # hope there are no other instances of same daemons
    pkill -15 hostapd
    pkill -15 wpa_supplicant
    pkill -15 dnsmasq
    # remove RPDB rule and iptables rule
    ip rule del lookup main
    iptables -D INPUT -i $AP_INTERFACE -p udp -m udp --dport 67 -j ACCEPT
    # delete AP interface
    iw $AP_INTERFACE del
    rm -rf $DIR
)

if [ "$1" = stop ]
then
    STOP || true
    exit
elif [ "$1" != start ]
then
    echo 'Usage:' >&2
    printf '\t%s\n' "$(basename "$0") start|stop" >&2
    exit 1
fi

################
# basic checks #
################
if ! iw phy | grep -A10 'Supported interface modes:' | grep -q '\*[ ]*AP'
then
    echo 'AP mode not supported.' >&2
    exit 1
fi

if ! iw dev $WIFI_INTERFACE link | grep -q '^Not connected'
then
    echo 'First disconnect form Wi-Fi.' >&2
    exit 1
fi

##########################
# stop running instances #
##########################
STOP || true

#####################################
# create virtual wireless interface #
#####################################
if ! iw dev $WIFI_INTERFACE interface add $AP_INTERFACE type __ap
then
    echo "Couldn't create AP interface." >&2
    exit 1
fi

#####################################
# configure newly created interface #
#####################################
echo 'Configuring network...'

# activate the interface and add IP
ip link set up dev $AP_INTERFACE
ip addr add ${IP}/24 broadcast ${SUBNET}.255 dev $AP_INTERFACE

# Android doesn't look up into main table by default
ip rule add lookup main

#######################
# access point daemon #
#######################
# create configuration file
mkdir -p "$DIR"
cat <<-EOF >$DIR/hostapd.conf
    # network name
    ssid=$SSID
    # passphrase to use for protected access
    wpa_passphrase=$PASSCODE

    # network interface to listen on
    interface=$AP_INTERFACE
    # wi-fi driver
    driver=nl80211

    # set operation mode, 'g' for 2.4GHz band
    hw_mode=g
    # WLAN frequency channel to use
    channel=1

    # key management protocol; use pre-share key
    wpa_key_mgmt=WPA-PSK
    # enforce WPA2
    wpa=2
EOF

echo 'Starting hostapd...'
hostapd -B $DIR/hostapd.conf

################################################
# run a dhcp server to assign IP's dynamically #
################################################
# create configuration file
cat <<-EOF >$DIR/dnsmasq.conf
    # we dont want DNS server, only DHCP
    port=0

    # nameservers to be sent to clients
    dhcp-option=6,1.1.1.1,1.0.0.1

    # range of IPs to make available to wlan devices and when to renew IP
    dhcp-range=$IP,${SUBNET}.254,24h
    # where to save leases
    dhcp-leasefile=$DIR/dnsmasq.leases

    # respond to requests from a different IP broadcast subnet
    dhcp-authoritative
    # don't look for any hosts file and resolv file
    no-hosts
    no-resolv
EOF

# open listening port
iptables -I INPUT -i $AP_INTERFACE -p udp -m udp --dport 67 -j ACCEPT

echo 'Starting DHCP server...'
dnsmasq -C $DIR/dnsmasq.conf </dev/null

echo Done.

```

Now you can connect to Access Point `MyAP` using key `foobarfoobar`.

`wpa_supplicant` can also be used in place of `hostapd` for simple cases like ours, but the one shipped with Android doesn't seem to work. You need to compile binary from source, or try this one. Configuration is even simpler:

```
...

#######################
# access point daemon #
#######################
# create configuration file
mkdir -p $DIR/wpa_supplicant
cat <<-EOF >$DIR/wpa_supplicant.conf
    ctrl_interface=$DIR/wpa_supplicant

    network={
        ssid="MyAP"
        psk="foobarfoobar"

        # force create AP network
        ap_scan=2

        # key management protocol; use pre-share key
        key_mgmt=WPA-PSK
        # enforce WPA2
        proto=RSA

        # set mode to AP
        mode=2

        # channel frequency
        frequency=2412
    }
EOF

echo 'Starting wpa_supplicant in AP mode...'
wpa_supplicant -B -D nl80211 -i $AP_INTERFACE -c $DIR/wpa_supplicant.conf

...

```
* `hostapd`, `wpa_supplicant` and `dnsmasq` all are part of AOSP. `hostapd` is used for wireless tethering, `wpa_supplicant` for WiFi connections and `dnsmasq` as DHCP/DNS server (up to Pie).
* `dnsmasq` isn't necessary if you prefer static IP configuration.
* If your device doesn't contain `hostapd` binary, you can get one from some other device or compile from source, or try this one.
* For more configuration options, see `hostapd.conf`, `dnsmasq.conf` and `wpa_supplicant.conf`. See WiFi channels detail here.
* Also make sure both `hostapd` (runs with UID `1010` `AID_WIFI`) and `dnsmasq` (drops to UID `9999` `AID_NOBODY`) are able to make outbound connections through firewall.
* SELinux may also cause problems with this manual setup, so set `permissive` for testing purpose or define policy rules.
* Since you don't intend to use internet, there is no need to configure NAT and packet forwarding.

---

**PS:**

In case if you have cellular connection, the only extra thing to be done is internet sharing. For extra steps see How to create a WiFi hotspot from the terminal?

# Answer
> 1 votes
If you don't need internet access and just a local network, why not just use WiFi Direct?

You should be able to access this through Settings \> WiFi and set up an ad-hoc network between your tablet and Debian device.

---
Tags: wi-fi, wifi-hotspot, tethering, wifi-tethering, lan
---


# Question
Title: Twrp recovery for mtk6763 (a/b) infinix note 5
Please i need help so much. My device dont have developers, and we don't have any custom recovery for this device, i don't have any idea to port twrp since recovery included in boot.img, also i don't know anything about compiling from source, i finind smaller guide to port but didnt find tool working well. So please if someone may help to build or port. There kernel source available for our device but no device tree. Thanks so much

# Answer
> 0 votes
I recommend following this tutorial to create a ROM dump of your device. Take the recovery.img from that dump and create a TWRP using this.

If you already have the recovery.img you can proceed right to the second link.

---
Tags: recovery-mode, data-recovery, clockworkmod-recovery, mediatek
---


title: “agrep” for Android Terminal?

text:
# Question
Title: “agrep” for Android Terminal?
How can I do this *(agrep)* in the Android Terminal?

This program allows elastic text searching, which means that `searchqwery` would match `searchquery`, and searching `Android` would also match `Anfroid` or `Androis`.

How can I install it so that it can be run from the Android Terminal?

# Answer
> 0 votes
As commented by @Izzy, Termux has a wide repository of Linux packages, but `agrep` isn't among them so far. So you have to go for compiling the binary from source, or you may give this one a try. It's a static binary for `aarch64` architecture.

---
Tags: installation, terminal, command-line
---


# Question
Title: Can my phone be monitored by my family members without them ever accessing it?
It is actually for a friend, so less info. But she suspects that one of her family members know what she is watching on youtube and maybe also about Whatsapp messages. Do you think that is possible? The family member has is in a foreign country and has never accessed her phone. And she has not installed any apps that the family member has sent. What do you think?

# Answer
> 1 votes
Only if they have the password to her Google Account or her device is set in the Family Friendly mode (which I find very difficult to happen, otherwise she wouldn't be able to use WhatsApp), tell her to try changing her Google Account password, also, she can install Kaspersky Internet Security (https://play.google.com/store/apps/details?id=com.kms.free) to check if her device contains any Spyware or related software. I hope this helps her, if you have any doubts or want further information please let me know by commenting.

---
Tags: data-monitoring
---


title: Google Podcast App and Expired Episodes

text:
# Question
Title: Google Podcast App and Expired Episodes
With the "Google Podcasts" app, I have been downloading episodes of several podcasts that I listen to, but am months behind and the podcasts only leave a month's worth up.

I thought that downloading them to my phone would keep them around even after they expired from the Podcast's stream, but apparently it doesn't, because the old, unlistened to, downloaded ones are not there.

What the heck? How do I keep old episodes until I am ready to listen to them?

# Answer
This is definitely something under the control of the podcast app. I have found "Castbox" which keeps all of the old episodes, as well as allowing you to download and listen to expired episodes.

I'll be switching from Google Podcast app to this one. I'm sure there are others that do the same thing, but I got tired of looking for something that should be basic and built into the Google Podcast app.
> 0 votes

# Answer
This may be a feature to ensure continued payment, many Pay-Per-View services will block viewing after a certain period, DMR or Digital Media Rights licensing is applied to the files, these are only licensed for a certain period of time and usually as soon as the license has expired, you'll need to download a new licensed file.

Sometimes DMR is not the case, sometimes this is a programming limit set by the developers.

Usually the correct way to update the XML List View, would be to increment an array by each addition and display the total items in the array.

However, some developers take in to consideration - the time it takes to select each item for removal..

If you saved 500 items, the list would take hours to navigate and also take forever to clean up/remove items, it is easier to limit the list length than to have search functions alongside multi-select items.

Some ROOT Access applications will let you stream your system audio into an mp3 file, this would let you Back them Up.
> 0 votes

---
Tags: google, podcast
---


# Question
Title: Detail information on running scripts on the recovery screen
I am looking for more detail information regarding the process mentioned here:

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

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

(1) says that selecting "apply zip from sdcard" in the recovery screen will run the script and perform the mentioned commands. I suppose at this point there is no concept of android OS's root user? Is this correct? Am I allowed full access to all the files and folders in the sdcard and phone memory at this point?

The script in (1) also mentions BusyBox. I know there is an app called busybox which provides some tools, but since the android OS has not loaded up to this point, I guess the busybox in the script represents something else? Wikipedia says busybox is an old set of linux tools, so does this mean it is present by default in all android phone firmware?

The zip file containing the script in (2) contains a file called "busybox" in the zip file root (no extension, binary file) and the one in (1) doesn't. What does this mean? (1) and (2) seem to be for different phone models, but shouldn't all phones have the run\_program() and delete() commands mentioned in those scripts? Would these scripts work on a different phone model? How much chance is there of the phone getting bricked? (I have stock firmware + Odin for my test phone and I am ready to format and reinstall if needed, I just want to know if there is a possibility of bricking it so badly that even Odin wouldn't recognize it)

Regardless of whether I am able to mount the sdcard/phone memory and run programs on the sdcard or not, I suppose the commands in the script such as ui\_print() should work on any phone. Where can I find more commands that can be used in such a script file, and more details on how such scripts actually work? The answer can be limited to samsung phones if there are no general answers.

# Answer
Yes, from custom recovery there is generally a high risk of deleting everything in theory. Your data security is completely dependent on the developer's coding ability and your trust in him. Luckily a full backup should be sufficient enough to restore everything in case of damage.

A flashable zip is usually pretty generic. in your example it's only purpose is modifying device specific things, so the reason is not the script language itself but simply the content of which apps will be removed. The first link is for indian apps, the second link is for samsung apps. Samsung is a good example because it has a separate partition for its bloatware - you need a flashable zip which delete apps from /preload instead from /system.

linux executables doesn't have file extensions like \*.exe - busybox/toybox/toolbox are just such executables. busybox is a multicall binary wich emulates most of linux commands like (ls cat dd grep find ...) in a single file. it's main purpose was to safe disk space. if you see any busybox app in Playstore it is always just a install helper for this binary.
android default is toybox (same as busybox but under apache license)
http://landley.net/toybox/faq.html

Edify is a very limited script language only used in flashable zips
https://source.android.com/devices/tech/ota/nonab/inside\_packages
> 0 votes

---
Tags: samsung, recovery-mode, scripts
---


title: Is there an easy way to invert colors?

text:
# Question
Title: Is there an easy way to invert colors?
iOS has a nice option in the accessibility menu that allows you to invert the screen colors. Does Android have anything like this?

# Answer
> 7 votes
Since Android 5.0 Lollipop, the feature is built-in as one of accessibility options.

1. Open **Settings**
2. Select **Accessibility**
3. Below **Display** section, toggle **Color inversion**.

After toggling it for the first time, the "Invert colors" toggle will be added to the quick settings menu.

# Answer
> 2 votes
It's not a built-in feature on Nexus devices, but Samsung devices have this in the accessibility settings.

Inverting all colours isn't much use, as some apps have light text on a dark background, and some apps have dark text on a light background. Making text easier to read is better achieved by increasing the text size, which is an option on all Android devices (also in the accessibility settings).

# Answer
> 1 votes
If your device is **rooted** and your Android version is at least **Android 4.4 KitKat**, you could try CF.lumen (free, pro version also available). The app is actually a screen filter which supports automation based on time/brightness, but it also supports color inversion.

> **Color filters**
>
> Several filters are provided. Those named after a color (red, green, blue, amber, salmon) do not limit the display to those colors, but convert the displayed image to grayscale first, then display that image in levels of the selected color. This preserves details that would otherwise be lost. Grayscale, **invert colors**, temperature adjustment and custom R/G/B adjustment filters are also provided.

(Emphasis mine)

For basic usage, set the **Master filter mode** to **Invert**.

Disclaimer: I don't have any relation with the app, its company and their developers. I just found this when trying to answer the same issue on KitKat.

# Answer
> 0 votes
I use Automate with this flow. It needs to set some permissions via ADB.

# Answer
> -1 votes
## For Samsung devices with Android Lollipop 5.1.1:

Settings → Personalization → Accessibility → Vision → Negative colors

---
Tags: screen, accessibility
---


title: UDP stream capture and replay

text:
# Question
Title: UDP stream capture and replay
I am capturing audio from a radio device to my android using tcpdump. How can I take this cap file and replay the UDP stream within it? As I want to replay the audio I got from the radio.

# Answer
UDP usually uses dynamical port numbers on client side, therefore just replaying will not work.

Note: The following bases on the assumption that the audio stream is transmitted using a common standardized protocol and is not encrypted or otherwise protected like it is on streaming apps like Spotify, Dezzer, ...

Instead you need to extract the UDP data stream from the created packet dump (usually in pcap file format). See for example this question.

Then you need a streaming server software that allows to stream the data you have extracted. The server can run on a PC that can be accessed via network from your Android phone or on the Android device itself. I assume that the client software on your Android device allows to specify the audio streaming server.
> 0 votes

---
Tags: udp
---


# Question
Title: How to organize photos from Camera folder in to folders sorted by month names?
For various reasons, I often end up pulling photos of my phones by connecting the USB connection to a computer and extracting what I need.

The problem I am facing is that my `DCIM/100ANDRO` folder is now **huge**, and simply loading the full list of files takes considerable time. Is there some way (ideally in basic Android 7.1.1, but additional apps are acceptable) to sort these in to separate folders possibly by month of taking or similar. Onus points if this happens dynamically as photos are taken.

I'd also be interested in alternatives to the USB -\> browse device options, but I'd want something that does full resolution, doesn't upload to an internet location first, and doesn't require bluetooth.

# Answer
There must be apps to facilitate what you want to achieve, but one of very straight forward method (for me at least) is to use a shell script as suggested by @alecxs in comment. We can read date of Photo Taken using `exiv2` commandline tool. You can build from source or try this one. Or get Modified Time of photo using `stat` command, but the former is usually more accurate because some programs like file explorers badly change the modified date e.g. during copy/move operation.

Once the month of photo is known, create respective folder and move photo there:

```
#!/system/bin/sh
set -e

DIR='/sdcard/DCIM/100ANDRO'

find $DIR -maxdepth 1 -type f -iname '*.jp*g' -o -iname '*.png' |
while read -r photo
do
    month=$(exiv2 -q pr "$photo" | busybox awk -v c=1 -F '[: ]' '/timestamp.*[0-9]{4}:[0-9]{2}:[0-9]{2}/{print $5"_"$6; c=0} END{exit c}') ||
    month=$(busybox stat -c %y "$photo" | busybox awk -v c=1 -F '[- ]' '/[0-9]{4}-[0-9]{2}-[0-9]{2}/{print $1"_"$2; c=0} END{exit c}') ||
    { echo "Couldn't find month for $photo" >&2; continue; }

    mkdir -p "$DIR/$month"
    mv -n "$photo" "$DIR/$month/"
done

echo Done.

```

Android's `awk` and `stat` are buggy or show non-standard behavior. Better use busybox.

Let's name the script `sort.sh`. This is how it works:

```
~$ find /sdcard/DCIM/100ANDRO/ -type f
/sdcard/DCIM/100ANDRO/00100sPORTRAIT_00100_BURST20190222182032908_COVER.jpg
/sdcard/DCIM/100ANDRO/IMG_20170312_013609.jpg
/sdcard/DCIM/100ANDRO/IMG_20180818_180827_HDR.jpg
/sdcard/DCIM/100ANDRO/IMG_20190222_164812.jpg
/sdcard/DCIM/100ANDRO/PANO_20190421_132245.jpg

~$ sort.sh
Done.

~$ find /sdcard/DCIM/100ANDRO/ -type f
/sdcard/DCIM/100ANDRO/2017_03/IMG_20170312_013609.jpg
/sdcard/DCIM/100ANDRO/2018_08/IMG_20180818_180827_HDR.jpg
/sdcard/DCIM/100ANDRO/2019_04/PANO_20190421_132245.jpg
/sdcard/DCIM/100ANDRO/2019_02/00100sPORTRAIT_00100_BURST20190222182032908_COVER.jpg
/sdcard/DCIM/100ANDRO/2019_02/IMG_20190222_164812.jpg

```

Additionally you may use `file` command (instead of relying on file extensions) to only move photos and not videos or other files. But again Android's `/system/bin/file` is very limited. Either use one from Termux, or build from source, or try this one.

You can run this script manually or on a regular basis using some automation app. `crond` is also an option if you have root.

> I'd also be interested in alternatives to the USB -\> browse device options

This part is itself a separate question. If you want to browse files from PC you can go for `adbfs`, SSHFS/SFTP, FTP, WebDAV, SMB etc. Or to simply transfer files `adb pull` will suffice and is reasonably faster. If you have root and the volume of data to be transferred is high, consider using USB Mass Storage (UMS) from custom recovery. It's very high speed and reliable method.
> 2 votes

---
Tags: usb, external-sd, camera, photos, file-management
---


# Question
Title: How do I connect a Samsung Original Stylus Touch S Pen to a Samsung Galaxy Tab 4?
I recently bought my wife a new tablet - she is an artist and is looking to draw on the new screened tablet. I also got her a pen so that she could do this.

The Tablet I got her was a Samsung Galaxy Tab 4 and the pen I got her was a Samsung Original Stylus Touch S Pen for Samsung Galaxy Note 4.

Is there any way for me to connect this pen to the tablet? Or do I need to get a different pen?

# Answer
> 1 votes
# Nope.

## A Samsung Original Stylus Touch S Pen for Samsung Galaxy Note 4 will not work on a Samsung Galaxy Tab 4

The Samsung Galaxy Tab 4 has a capacitive digitizer; not an active digitizer that the Samsung Original Stylus Touch S Pen requires.

This review states the issue; bold emphasis is mine:

> **The S Pen is an inductive stylus. The display on the Note has what's called an active digitizer under the glass.** When the S Pen gets close to the screen, the magnetic field of the active digitizer induces a current that powers its internal circuitry. Power is passed here just like a wireless charging mat and phone that supports its work, it's just not inducing nearly as much power.

And this too; again bold emphasis is mine:

> This is far more accurate than a capacitive stylus could ever be. **It's why the S Pen won't work as a stylus on any other phone — it's not an electrical conductor.** It's also why the S Pen, or Apple Pen, or Pixel Pen, or Surface Pen, etc. work so much better than a "regular" stylus.

---
Tags: tablet
---


# Question
Title: How can Android be made to stop showing Google Contacts information?
How can Android be made to stop showing Google Contacts information? The title is sufficient to describe the problem.

# Answer
> 0 votes
One way is to prevent turn off the "Contact Sync" off Goto Settings -\> Goto Sync -\> Select Google -\> Select the Google Account email id if you have multiple accounts logged in.

Uncheck the Contacts so that it would not sync.

Now open Contacts App and open Settings of Contact app. Select Hide Incomplete Numbers (As most google synced contact would have only email id not numbers so they will be hidden)

That's how I guess it can be achieved

---
Tags: google-contacts
---


# Question
Title: How to root Samsung Galaxy S10/S10e/S10+
Samsung Galaxy S10 unfortunately comes up with apps that I don't need:

> Unfortunately \[...\] the South Korean smartphone maker decided to bundle tons of apps inside the firmware of their flagship phone.
>
> Majority of the bundled apps inside S10 are part of the Samsung ecosystem, although third party apps like Facebook can also be found there. Some of them can be disabled from the Settings, but not all.

I also want to use a few root-only apps, and need write access to `/data/data/` for backup/restore purposes.

**Question**: How can I root my Samsung Galaxy S10e as easily and risk-free as possible?
*(I generalized the question to all S10 variants, but please let me know if methods differ enough that separate question are required)*

# Answer
I managed to root my Samsung S10e using topjohnwu's Magisk-based work. Here is the procedure, it also works for S10 and S10+:

https://topjohnwu.github.io/Magisk/install.html#samsung-system-as-root

The procedure is rather complex, but fortunately a YouTuber has made an easy-to-follow video:

https://www.youtube.com/watch?v=o3a8YnWT3yk

The video is directly based on John's instructions, so I recommend reading/watching both before each operation to make sure you understand correctly before executing.

The only drawback of this method is that when you want to reboot your device, you will always need to press simultaneously Bitxby+Power+Volume Up until the logo appears. If you boot normally, it will start normally but you won't have root.

Dedicated xda thread (including donation links for John): https://forum.xda-developers.com/galaxy-s10/development/magisk-root-galaxy-s10-series-t3918699
> 2 votes

---
Tags: rooting, samsung-galaxy-s-10
---


# Question
Title: Chrome Remote Desktop with external mouse?
I've been googling for hours and all I can find are a few years old pages saying the only way to do a right click is double touch on the screen...

Has anyone found any better solution since? Maybe with External Keyboard Helper or some similar app??

Also, there seems to be no way to scroll. I've tried the browser version on Android tablet, and it works faster and you can scroll, but there is absolutely no way to press a right click.

It seems imposible that google would not adress this issue for years, since it's really frustrating.

# Answer
> 1 votes
I found an acceptable solution on my Huawei tablet... if I switch to "desktop mode", right mouse click starts working like on PC, so I then connect throug browser client. I don't know if that is possible on other tablets.

Hope this helps anyone.

---
Tags: external-keyboard, remote-access
---


title: Factory reset, will the os revert?

text:
# Question
Title: Factory reset, will the os revert?
Hi I just purchased an Android phone that came with Android Oreo. It's replacing a phone that had Android Pie. Shortly after I set up the new Android Oreo phone It upgraded to Android Pie, but because the old phone was on a newer version of the operating system than the new phone when I did the initial set up none of my system backups were restored to the new phone when I was setting it up.

I'm thinking of doing a recovery mode or a factory reset on the new phone to see if it will bring over my backups and I'm wondering if this phone will revert to Android Oreo or if it will restore to Android Pie which would then restore my backup

# Answer
> 3 votes
A factory reset deletes all the userdata that has been stored by the user and apps, including your personal files in internal storage.

A factory reset does not make any changes to the system and boot partition (where the underlying OS is stored) or any other non-userdata partition. During a system update, it is mostly the boot and system partition which gets updated and the update doesn't keep the earlier state of Android saved, so a new update overwrites the earlier updates.

In short, a factory reset wouldn't bring your device back to Android Oreo anymore. If the backup was stored in the cloud, the restore may be triggered during Setup Wizard post the factory reset so you can try that.

---
Tags: backup, recovery-mode, factory-reset, 9.0-pie, 8.1-oreo
---


# Question
Title: How to fix Hangouts not working for one gmail account
My Hangouts had two email accounts associated with it. One stopped working. I tried deleting and re-installing Hangouts. I tried deleting and reinstalling the email account that was not working with Hangouts.

Now when I try to add this second email account to Hangouts, I get the error message that the account already exists on the device.

I did delete that email account and before adding it via the phone's accounts manager, I tried to add it from Hangouts. It then added it as an email account but not associated with Hangouts.

# Answer
Sorry - I got it fixed. I tried deleting the email account and then before re-adding it, I restarted the phone. Then when I added the account to Hangouts it worked.
> 1 votes

---
Tags: google-hangouts
---


# Question
Title: Factory reset (Software repair) Sony Xperia XCompact (and all other Xperia smartphones) that have software issues like a boot loop
I'd like to share how you can reset your Xperia even if it doesn't boot (start) anymore! It not only helps to break a boot loop, it also helps to unlock the phone if you forgot your smartphone lock credentials. Of course, your data on the phone will be erased.

I will answer my question right away which is allowed by stack exchange rules (at least it used to be)

# Answer
> 1 votes
Sony has gotten really good with their software suppport for their Xperia line up. Their software actually works to get bricked phones alive again.

The method I describe below doesn't require an unlocked bootloader and doesn't unlock it as well. Which is a good thing since you keep your warranty and you won't loose DRM rights that are for example used for the noise reduction software of your Xperia camera.

1. Your phone should be charged at least 80%.
2. Keep your smartphone turned off and disconnected until I say so! Otherwise it won't work.
3. Get the Xperia Companion: https://support.sonymobile.com/de/xperia-companion/
4.
5.
6.
7.
8.
9. Now you can connect your smartphone to your computer while pressing volume down:
10.
11.
12.

---
Tags: factory-reset, boot-loop, sony-xperia
---


# Question
Title: How to use ADB to list remote directories?
I used `adb push lol.png /storage/sdcard0/` to push a test file to my Galaxy S6, and the file was transferred successfully while failed to show up in my Android File Transfer. This is probably due to the fact that S6 doesn't have sdcard0 directory.

I like to remove the file I transferred (and the sdcard0 directory I accidentally created. But I don't know how to list remote directory via ADB. Is that possible? And How?

# Answer
Easy to do – as in any Linux system:

1. Connect your device as usual
2. log into it using `adb shell`
3. use the `ls` command to list files in the current directory, and the `cd` command to change directories (i.e. walk the tree / navigate through directories)

For details on the commands, check for the corresponding Linux man pages – e.g. man ls and man cd.

**Edit:** If you're "afraid" of the command line, you can also use an ADB file manager (see here for examples).
> 41 votes

# Answer
For rooted device (having the `su` binary):

```
adb shell su -c ls -R *

```

This will list all folders with their contents and their subfolders.
> 3 votes

---
Tags: adb
---


# Question
Title: When using Google Payments for an in-app purchase, does the App admin see any information identifying or associated with your google account?
For example,

Let's say I have 2 play store accounts signed in on android:

> alice@gmail.com
>
> bob@gmail.com

Event 1: I sign into the app using alice@g, and then make a payment in the app using the Google Play Payment Method (GPPM) associated with alice@g's account, and which is then assigned order: GPA.111...

Event 2: I then delete the app's data in settings and remove then reinstall it on the same device, but sign into it using bob@g. I then make a payment in the app using the GPPM associated with alice@g (since it is available and already on the phone), which is assigned order: GPA.222...

My question is (under the assumption that the app is not given the unique device id) for Event 2, is there anyway for the App-admin to associate bob@g's login with the alice@g login (for example, does the GPPM send the app admin an e-mail address such as alice@g or an id, such as gppm-id-alice, or gppm-randomId-associated-with-alice) or is each payment with GPPM fully anonymous?

# Answer
> 1 votes
It is not fully anonymous. Google Payments Privacy Notice under the "Information that we collect" section states that:

> For example, when you make a purchase or transaction using Google Payments, we make certain personal information about you available to the company or individual you purchase from or transact with. This includes sharing your personal information with the developer from whom you purchased when you use Google Payments to make a purchase on Google Play. When you add a third party form of payment to your Google Payments Account, we may exchange certain personal information about you, such as your name, profile image, email, IP and billing address, phone number, device info, location and Google Account activity info, with the third-party payment provider as necessary to provide the service.

Information about the account used for the payment is shared. If that information is an email address like in your example, the app's developer receives Alice's information not Bob's.

---
Tags: google-play-store
---


title: Android won't turn on at all

text:
# Question
Title: Android won't turn on at all
Basically the phone won't turn on at all, not normal boot, not recovery mode, not even the battery percentage show up while charging (just the battery icon with lightning, that's it). it stucks on one screen (battery icon/logo) and stucks there until it ran out of battery again.

But strangely, download mode is accessible, and when i tried to boot from that, the screen is stuck at the logo my phone is Samsung Galaxy Tab S2 8.0 Inch

Help

# Answer
It seems that you have bricked your phone. Download and unzip Odin on your computer. Then download the Stock firmware: https://forum.xda-developers.com/tab-s2/help/tab-s2-stock-rom-t3199363 Then flash it using Odin. You can easily find a guide to flashing using Odin online.
> 0 votes

---
Tags: charging, power-on, samsung-galaxy-tab-s-2
---


# Question
Title: How do you fix "adb locksettings not found"?
I have a J3 Eclipse running Android 7.0 plugged into my computer and try to view the locksettings by typing `adb shell locksettings`. This returns `/system/bin/sh: locksettings: not found`. How can I fix this?

# Answer
I tried updating the phone to Android 8.1 and 9.0 and the issue seems to have been solved in both releases. If you're facing this issue try updating the OS and see if the problem still persists.
> 0 votes

---
Tags: 7.0-nougat
---


# Question
Title: Should the Dalvik cache on Android phones be cleared periodically?
Recently, I rooted my phone (Samsung Galaxy On7, Android 6.0.1) using Magisk systemless root using TWRP. After the flashing was over, I also cleared the Dalvik cache, not knowing that this was not necessary. When I rebooted the phone, it took a long time to boot. It was showing, "Optimizing apps". I thought I had cracked the phone up and it was a boot loop. But later I found that everything was fine. In addition, clearing of the Dalvik cache actually freed up the internal memory by about 1GB.

I read on Stack Overflow that Dalvik cache is actually the optimized dex files that the dex compiler builds to ensure the smooth running of applications. Now, the last official update to this phone was back in April 2018. Is it possible that the phone retained the cache of all apps since then, including the ones I had uninstalled? It seems so, otherwise how could I recover about 1GB of memory simply by clearing the Dalvik cache?

If I am correct that clearing the Dalvik cache freed up space, does it make sense to clear the Dalvik cache periodically, say annually, so as to prevent misuse of the "precious" internal memory?

# Answer
> 1 votes
If you have the habit of removing apps on a regular basis, then you can clear it regularly. Once a year or once every 6 months should be fine. If you have root, then you can use Titanium backup as stated on this answer to remove dex files not link to apps.

---
Tags: twrp, dalvik-cache
---


# Question
Title: How do I disable the missed phone call notification light?
The green flashing light whenever I miss a call is really annoying. I'd like to turn that off while keeping the purplish voicemail indicator light. I'm not finding a clear way to do it in the phone app nor in general settings. The similar questions I've seen have actually been about the call log or other notifications which are not the same.

# Answer
> 0 votes
it is impossible to change it in setting(you can only completly turn it off or on). But you have some apps for that. For most of them,you need root. But I found this one in link(article about it) for which you do not need it. It is Led Blinker(avaiable in Google Play Store)You have lite and pro version, but lite should be more than enought.

LINK WITH INSTRUCTIONS HOW TO USE IT: https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.guidingtech.com/23212/customize-disable-led-notifications-android/&ved=2ahUKEwig0IfSvvbjAhVG2KQKHSndB48QFjASegQIBxAB&usg=AOvVaw3YIcmp9EWQpzvCGuaCwlLU&cshid=1565378157374

---
Tags: calls, 9.0-pie, samsung-galaxy-s-9
---


# Question
Title: After flashing from SP Flash tool, phone won't boot up
**Device: Huawei Honor Hol-U19**

It was bootloop so I tried flashing the firmware sing SP Flash tool. But now, the phone won't even start/boot to it's logo. I can't feel any vibration afte pressing the power button or any of the buttons. Can someone help me?

# Answer
> 1 votes
LG hold both volume button and power button same time fir about 20 seconds, worked for me tho cricket had no clue.

---
Tags: huawei, device-firmware
---


# Question
Title: How to determine which app is causing vibration?
I have a Moto G6 Play that vibrates like it is getting notifications but it's not. The vibration is inconsistent and seems random so I would like to know if there is a logcat or something I can run to log which app is calling the vibration so that I can shut it off? The same thing happens on my wife's phone, same model, and it does my head in. The device is running Android 9.

# Answer
> 6 votes
In addition to the `dumpsys` method explained in the other answer, you can use Android's hidden (kind of) permission manager `appops` to get recently allowed vibrator requests, e.g. in last minute. From `adb shell`:

```
for pkg in $(pm list packages | sed 's/package://')
do
    echo "$pkg $(appops get $pkg VIBRATE)" | grep 'time=+[0-9]*s'
done

```

`pm` is the package manager which lists all installed packages. `appops` determines when last time each package made a vibration request and if it was allowed or rejected.

Result can be further filtered by piping output through `awk '{printf "%-12s%-20s%s\n",$3,$4,$1}'`:

```
allow;      time=+15s659ms      com.termux
allow;      time=+6s458ms       com.google.android.inputmethod.latin

```

Termux made a vibration 15 seconds back. Also the request can be denied:

```
~$ appops set com.termux VIBRATE deny

```

Now the output will be like this:

```
deny;       time=+9s500ms       com.termux
allow;      time=+6s392ms       com.google.android.inputmethod.latin

```

And a shameless self-promotion. If not comfortable with CLI, you can use my open-source app Permission Manager X to get and set AppOps:

# Answer
> 5 votes
The next time your device vibrates, connect it to a PC with already setup, and issue this command:

```
adb shell dumpsys vibrator

```

In the output, along with the pattern of vibration you would be able to see the UID and package name of the app that caused the vibration in the device recently. For example, in my OnePlus 6 (Android 8.1.0) device it showed this output:

```
Previous vibrations:
  , startTime: 95325556, effect: Waveform{mTimings=[0, 250], mAmplitudes=[0, -1], mRepeat=-1}, usageHint: 5, uid: 10122, opPkg: **com.textra**
  , startTime: 95346005, effect: Waveform{mTimings=[0, 250], mAmplitudes=[0, -1], mRepeat=-1}, usageHint: 5, uid: 10122, opPkg: com.textra
  , startTime: 95428005, effect: Waveform{mTimings=[0, 250], mAmplitudes=[0, -1], mRepeat=-1}, usageHint: 5, uid: 10122, opPkg: com.textra
  , startTime: 95516412, effect: OneShot{mTiming=50, mAmplitude=-1}, usageHint: 0, uid: 1001, opPkg: **com.android.incallui**
  , startTime: 95572994, effect: Waveform{mTimings=[0, 250], mAmplitudes=[0, -1], mRepeat=-1}, usageHint: 5, uid: 10122, opPkg: com.textra
  , startTime: 96868723, effect: Waveform{mTimings=[0, 250], mAmplitudes=[0, -1], mRepeat=-1}, usageHint: 0, uid: 1000, opPkg: **android**
  , startTime: 97144598, effect: OneShot{mTiming=200, mAmplitude=-1}, usageHint: 0, uid: 10130, opPkg: com.phonepe.app
  , startTime: 97187986, effect: OneShot{mTiming=200, mAmplitude=-1}, usageHint: 0, uid: 10130, opPkg: **com.phonepe.app**
  , startTime: 98229901, effect: Waveform{mTimings=[0, 300], mAmplitudes=[0, -1], mRepeat=-1}, usageHint: 0, uid: 10133, opPkg: **com.arlosoft.macrodroid**

```

The string next to `opPkg:` is the package name of the app that caused the vibration at a certain time. The list is in chronological order with the most recent entry at the bottom. To get the app's name out of the package name, see my answer here.

---
Tags: vibration
---


# Question
Title: Advanced "Find in page" in Google Chrome mobile?
Regarding the "Find in page" feature of Android's default and/or Google Chrome web browsers:

Is there a way to fine-tune the search parameters in order to search for strings with more precision or specificity (i.e. inclusivity/exclusivity)?

I've tried using regular expressions to narrow results, but they don't appear to be supported.

# Answer
> 1 votes
With Chrome for Android, you can't perform "advanced" search for example using regular expression. There are extensions such as Chrome Regex Search or find+ | Regex Find-in-Page Tool that allow to fine tune your searches on a page, but Chrome for Android does not support extensions.

If you are not opposed to the use of other browsers than Chrome, you can use Yandex browser or Kiwi browser (they are both based on Chromium. Install one of the extensions mentioned above as you will on your PC, then you will be able to narrow searches on a page.

---
Tags: chrome-for-android, google, search, stock-browser, browser-add-ons
---


# Question
Title: How can I force a website to provide its mobile page?
I'm trying to access the following page using Chrome on my Galaxy S10+, but the website always returns the desktop page, even with the *Desktop site* check box unchecked.

Facebook's built-in browser seems to have no issue displaying the correct page.

# Answer
> 1 votes
I recently had a problem with gmail.com trying to get the desktop site to display (setting rules anđ labels requires the desktop site). Somehow, the act of typing gmail.com into the browser does not show the desktop site but following the link from google.com works. I know this is backwards from your problem, but the presence or absence of extra data in the link or cookie can cause this behavior on certain sites. You can try deleting cookies for this site and try différent links from other sources.

I'm a web developer too and there are libraries like bootstrap that can switch to a mobile format that depends solely on the width of the page. It completely ignores the desktop checkbox and uses CSS and js to reformat the page even on a desktop computer if the window is resized. In this case, there really is no 'mobile site'. Viewing with your phone in portrait mode should work but landscape may or may not.

Facebook's browser may be a different size window, or may not be standardized to detect screen size with bootstrap, You could also have a chrome plugin that is causing an issue. If I had to guess, I'd say that you need to delete the cookies (which will delete some login info) and try again. Just keep in minđ that not every site responds to the checkbox in chrome. That only works if there are separate pages for mobile and desktop which is not the way that bootstrap works.

BTW, I just saw your link and tried it. I can use the checkbox on chrome on my s10e and I can switch from mobile to \`desktop without issue.

# Answer
> 0 votes
probably you have turn on some dev feature on chrome. It is working fine on chrome...

---
Tags: chrome-for-android
---


# Question
Title: Is it possible to install an FM Radio application to get local frequencies?
Samsung Galaxy S10 has a built-in radio application. But it catches only USA and Canada frequencies. I do not live in USA nor in Canada. So is it possible to install an FM Radio application from Google PlayStore to get locale FM radio frequencies in my country ?

# Answer
> 1 votes
That really depends on if there is an app to stream stations from your country, unless you are talking about a real FM radio receiver function in the phone.

My s10e doesn't have an FM radio function, so the only way for me to get 'FM stations' is by streaming the station over the Internet with an app. I assume yours is the same. If not, read below. Carriers like to disable the FM radio to force you to use your data.

So if some company has built an app to stream stations like 'Iheartradio' in the US, then you can use it. Also, some US stations have websites that allow you to stream their station using a web browser. You might try that.

If you are talking about an actual FM rađio receiver app that uses 88Mhz to 108Mhz and your country doesn't use those frequencies, all I can tell you is you can try to find an app for your country. But if the radio in the phone is the US format, changing the app probably won't change the frequency capability of the hardware radio inside the phone.

As far as I know, the only areas that haven't switched to the 88-108Mhz band is Japan and Eastern Europe so Samsung may not make hardware specifically for your region.

---
Tags: applications, fm-radio
---


# Question
Title: Lenovo tab 3 7" TB3-710F Android 5.0.1 won't start after installing wrong TWRP
Basically I wanted to root it and every TWRP I tried came up an error that the file was too big,. moments later I tried different versions..many other versions btw,, scaling down to the smallest in size was 2.0.1.2 I think..

Anyway, it got stuck in a bootloop for about 2 hours. Mind you the computer makes the beep everytime I connected it and reconnected, so I thought it's still alive. Now, it won't turn on and I've tried most of the method's to get it flashed but nothing even lights it up... brick

I have tried most XDA and Google without any possible fix.

# Answer
Thanks for that really detailled answer, dear alecxs.. At first it didnt work because i had the wrong ROM , than i take the correct one , followed the tutorial really exactly from 1-20 and what should i say , i reanimated this Tablet which stucked in a bootloop a long while. Workes well now .. I struggled a little bit with Google Play Services which i cant update but i kicked them after i rooted the tablet and reinstalled them manually again..

Thanks for this great tutorial
> 1 votes

# Answer
\- download the latest ADB and Fastboot binaries

\- install MediaTek MT65xx USB VCOM Preloader USB Drivers

enlarge view
Note: This driver does only appear for less a second (and during flash/ readback) watch video

\- install MediaTek SP Flash Tool

\- install 7-zip

\- download Stock ROM, extract it

6 - remove the checksum at end of (Stock ROM) MT8127\_Android\_scatter.txt (last two lines):

```
# [huaqin]
# checkSum = 0x0f5e

```

7 - open the (Stock ROM) MT8127\_Android\_scatter.txt file in SP Flash Tool -\> Download
(and SP\_Flash\_Tool\MTK\_AllInOne\_DA.bin as Download Agent, if not already selected)
WARNING: Make sure not to "Format All + Download" **devices with secure boot** or flash using "Firmware Upgrade" option. This will damage/hard brick your device

8 - **de-select** the check box **"preloader"** (EMMC\_BOOT)

\- remove the battery

10 - click **Download** in SP Flash Tool

enlarge view

11 - **connect** Tablet to PC using USB Cable
(Note: the flashing starts immediately when connected. if nothing happens, wait for the drivers recognized first time, disconnect and repeat from step 7)

12 - wait for green checkmark **Download Ok**

13 - insert the battery

14 - press and **hold** Volume Up Button

15 - disconnect the USB Cable (still **holding** Volume Up)

16 - reconnect the USB Cable (still holding)
(Note: you may hear multiple connecting sounds - don't release the Volume Up Button yet)

17 - when Android system recovery appears, **release** Volume Up Button

18 - select **Reboot to bootloader** with Volume Down, confirm with Power (or Volume Up sometimes)

19 - open the platform\_tools folder from **cmd.exe** (as Administrator)

20 - unlock the bootloader by typing following commands:

```
fastboot oem unlock
fastboot reboot

```

Note: If you want to flash custom recovery with SP Flash Tool, recovery.img must fit the size 16 MiB.
If the bootloader is unlocked, you can test the recovery before flashing, then flash from fastboot instead:

```
fastboot boot "C:\Users\Admin\Downloads\recovery_twrp302_Lenovo_TB3-710F.img"
fastboot flash recovery "C:\Users\Admin\Downloads\recovery_twrp302_Lenovo_TB3-710F.img"

```
> 0 votes

---
Tags: twrp, tablet, lenovo
---


# Question
Title: Heimdall Error Protocol initialisation failed! on Ubuntu
I want to install CyanogenMod on my Samsung Galaxy S5. I'd downloaded the version and did the excact steps from the wiki. But when I try to flash with Heimdall I get this error:

```
Ubuntu-Laptop:~/Downloads/cm-12.1-20151007-SNAPSHOT-YOG4PAO333-klte$ sudo heimdall flash --RECOVERY boot.img --no-reboot
Heimdall v1.4.1

Copyright (c) 2010-2014 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
ERROR: Protocol initialisation failed!

Releasing device interface...

```

I didn't find anything with Google. Please help.

Thanks.

# Answer
> 9 votes
I also had a similar problem. I added the udev rule as suggested in GitHub (link above), but the phone still wouldn't download. Then I found another simple solution on GitHub:

1. Disconnect the USB cable.
2. Setup the flash in Heimdall Frontend or command line.
3. Boot the phone into Download Mode.
4. AFTER it's in Download Mode plug in the USB and flash immediately.

It worked like a charm.

# Answer
> 7 votes
I was experiencing the same problem, and I found a solution that worked for me in a comment on Heimdall issue #228.

The problem for me was that udev was reserving the phone as a modem when I plugged it in. If you run dmesg and see a line that says "This device cannot do calls on its own. It is not a modem.", then this could work for you.

As root, create a file named /etc/udev/rules.d/79-samsung.rules with the following content:

```
ATTRS{idVendor}=="04e8", ENV{ID_MM_DEVICE_IGNORE}="1"

```

Then restart udev with "sudo service udev restart", and unplug/replug the device, and you can try to install again.

If that doesn't work or if it's a different problem, you can edit your question to add the output of these commands:

```
heimdall detect --verbose --usb-log-level debug
sudo heimdall print-pit --verbose --no-reboot

```

# Answer
> 2 votes
If none of the answers above worked, the answer might be as silly as it turned out to be for me.

Two things you might need to try before bumping your head into your screen:

**Potential Fix 1:** Reboot in download mode without having the USB plugged in and only plug it in after having pressed the button that allows you to continue embarking on this dangerous journey (Volume Up button I presume). Afterwards, if you haven't already done so, replace the drivers with Zadig and Heimdall might work. I'm guessing this was the fix for me, but it might aswell have been...

**Potential Fix 2:** Reboot your mobile device after replacing the drivers with Zadig. Yeah, super silly, but this might have easily been the fix (as the first fix required me to reboot).

Hope no one cracks a skull.

# Answer
> 2 votes
I had similar issues, it turned out thet it only worked with heimdall v1.4.2 on my linux mint 19 system

THE SITUATION WITH HEIMDALL 1.4.0:

OS:LinuxMint 19 (tara) Kernel 4.20.0-042000-generic

```
heimdall flash --REOVERY /home/user/Downloads/twrp-3.3.1-0-gts210vewifi.img --pit /home/user/s2a.pit --no-reboot --verbose
Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
      Manufacturer: "Sasmsung"
           Product: "MSM8952"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 82
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 01
           max packet size: 0200
          polling interval: 00
Claiming interface...
Setting up interface...

Initialising protocol...
WARNING: Control transfer #1 failed. Result: -9
WARNING: Control transfer #2 failed. Result: -9
WARNING: Control transfer #3 failed. Result: -9
WARNING: Control transfer #4 failed. Result: -9
WARNING: Control transfer #5 failed. Result: -9
WARNING: Control transfer #6 failed. Result: -9
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet.
ERROR: Failed to send request to end PIT file transfer!
ERROR: Failed to download PIT file!
Ending session...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet. Retrying...
ERROR: libusb error -7 whilst sending packet.
ERROR: Failed to send end session packet!
Releasing device interface...

    heimdall download-pit --output s2.pit --verbose
    Heimdall v1.4.0

    Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna
    http://www.glassechidna.com.au/

    This software is provided free of charge. Copying and redistribution is
    encouraged.

    If you appreciate this software and you would like to support future
    development please consider donating:
    http://www.glassechidna.com.au/donate/

    Initialising connection...
    Detecting device...
          Manufacturer: "Sasmsung"
               Product: "MSM8952"

                length: 18
          device class: 2
                   S/N: 0
               VID:PID: 04E8:685D
             bcdDevice: 0100
       iMan:iProd:iSer: 1:2:0
              nb confs: 1

    interface[0].altsetting[0]: num endpoints = 1
       Class.SubClass.Protocol: 02.02.01
           endpoint[0].address: 82
               max packet size: 0010
              polling interval: 09

    interface[1].altsetting[0]: num endpoints = 2
       Class.SubClass.Protocol: 0A.00.00
           endpoint[0].address: 81
               max packet size: 0200
              polling interval: 00
           endpoint[1].address: 01
               max packet size: 0200
              polling interval: 00
    Claiming interface...
    Setting up interface...

    Initialising protocol...
    WARNING: Control transfer #1 failed. Result: -9
    WARNING: Control transfer #2 failed. Result: -9
    WARNING: Control transfer #3 failed. Result: -9
    WARNING: Control transfer #4 failed. Result: -9
    WARNING: Control transfer #5 failed. Result: -9
    WARNING: Control transfer #6 failed. Result: -9
    ERROR: Failed to receive handshake response. Retrying...
    ERROR: Failed to receive handshake response. Retrying...
    ERROR: Failed to receive handshake response. Retrying...
    ERROR: Failed to receive handshake response. Retrying...
    ERROR: Failed to receive handshake response.
    ERROR: Protocol initialisation failed!

    Releasing device interface...

```

THE FIX:

...found this helpfull article and installed Heimdall v1.4.2

HOW TO INSTALL HEIMDALL VERSION 1.4.2 ON UBUNTU 16 AND UP

to install ver. 1.4.2 do the following:

```
sudo apt purge heimdall-flash
sudo apt install build-essential cmake zlib1g-dev qt5-default libusb-1.0-0-dev libgl1-mesa-glx libgl1-mesa-dev
cd ~
wget https://gitlab.com/BenjaminDobell/Heimdall/-/archive/master/Heimdall-master.tar.gz
tar -xvf Heimdall-master.tar.gz
cd Heimdall-master/
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo mv ./bin/heimdall* /usr/local/bin

```

check success with

```
heimdall version
v1.4.2

```

After this operation the bahavior changed as follows:

```
heimdall flash --RECOVERY /home/user/Downloads/twrp-3.3.1-0-gts210vewifi.img --pit /home/chris/s2.pit --no-reboot --verbose
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
      Manufacturer: "Sasmsung"
           Product: "MSM8952"

            length: 18
      device class: 2
               S/N: 0
           VID:PID: 04E8:685D
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 02.02.01
       endpoint[0].address: 82
           max packet size: 0010
          polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
   Class.SubClass.Protocol: 0A.00.00
       endpoint[0].address: 81
           max packet size: 0200
          polling interval: 00
       endpoint[1].address: 01
           max packet size: 0200
          polling interval: 00
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...

Some devices may take up to 2 minutes to respond.
Please be patient!

WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
Session begun.

WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
Downloading device's PIT file...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
PIT file download successful.

Uploading RECOVERY
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
0%WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...

7%

14%

21%

28%

35%

42%

49%

56%

63%

70%

77%

85%

92%

99%

100%
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
RECOVERY upload successful

Ending session...
WARNING: Empty bulk transfer after sending packet failed. Continuing anyway...
ERROR: libusb error -7 whilst receiving bulk transfer. Retrying...

Releasing device interface...

```

before the operation I unplugged and replugged the Tablet

so I could flash the TWRP

HAPPY

# Answer
> 1 votes
This happened for me on v1.4.1. There's a few ways to fix it:

1. Ensure you have the latest & greatest version of Heimdall
2. Install all this:

```
sudo apt-get install build-essential cmake zlib1g-dev qt5-default libusb-1.0-0-dev libgl1-mesa-glx libgl1-mesa-dev
```
3. Reboot your computer
4. Try connecting on a different USB port - 3 of my USB ports didn't work, and one did!

---
Tags: cyanogenmod, samsung-galaxy-s-5, heimdall
---


# Question
Title: Trying to understand the options in TWRP backup
This is a screenshot of the twrp screen after you choose "Backup":

I have the following questions:

1. What is the difference between the options "Boot, System and Data" on one hand, and "System Image" on the other?
2. Is the "Data" option for data of system apps and user apps, or only system apps?
3. I want to take a backup so that I can get a file that I can flash with Odin (that is, without requiring twrp). Which option should I use?
4. What is "Vendor Image", and how does it differ from "System Image"?
5. What is the difference between "Vendor" and "Vendor Image"?

# Answer
> 3 votes
1. as Irfan pointed out in his comment, "Image" means creating a partition image (using `dd`). Normally, TWRP creates tar archives with all the files *located on* a given partition, which then is much smaller.
2. "Data" contains *all* data – i.e. data & configuration from system apps as well as user apps. As the `/system` partition is mounted read-only during normal operation, that's where all "variable data" go (apart from files you store to the SD card).
3. Probably none of those. It's unlikely Odin understands any of the TWRP backups (you can try, and I stand corrected if you find out it can – but no guarantees from my side, including that it doesn't "brick" your device – I'm not a Samsung user)
4. Vendor is stuff very specific to your device provided by the "vendor", i.e. usually the manufacturer (including customizations) – while System is the "Android base" (though this separation is rarely absolute)
5. Same as between "System" and "System Image" (see 1.)

---
Tags: twrp
---


# Question
Title: Can someone say how can I get to this network management window in my android device
My device is vivo 1718 android 8.1. I have found this Network Management window when I didn't turn on mobile data access for one app. That app pops up an alert to change the network access and when I press to change it, I am directed to this window:

network management window (click to enlarge)

But after that I can't find it anywhere in my settings.

# Answer
> 0 votes
As in @dewey's comment that is located inside iManager App 'Network management' section. Here is the path.

iManager -\> Data Monitor -\> Network Management

---
Tags: wi-fi, mobile-network, android-device-manager, application-manager
---