2

I migrated from Oneplus 3(Chinese android phone) to Galaxy Note 8 via Cloneit, since Samsung's stock migration tool didn't support Oneplus 3.

However, apps migrated(or preferably, cloned) on my new phone are recognized as 'app installed from unknown source' instead of 'installed from Google Play'.

It seems that Cloneit, the migration tool brought all apk files via connection and that's making all apps recognized as unknown source.

* So, I want to change their source property from unknown to installed from Google Play. *

My speculation is pretty pessimistic since it sounds like it's related to some security issues but I'm hoping some Superuser has an answer for this.

Thanks.

5
  • It's possible if you have root.
    – iBug
    Commented Sep 18, 2017 at 6:11
  • @iBug Long live TiBu.
    – Grimoire
    Commented Sep 18, 2017 at 10:12
  • @DeathMaskSalesman No need for TiBu. Just a matter of a shell command.
    – iBug
    Commented Sep 18, 2017 at 10:25
  • @iBug For you, me and a bunch of others, it's just a shell command. For many casual users, it's a (s)hell command.
    – Grimoire
    Commented Sep 18, 2017 at 10:32
  • @DeathMaskSalesman Your comment is accepted ✔. See my answer.
    – iBug
    Commented Sep 18, 2017 at 13:34

1 Answer 1

3

The solution is as simple as a few (s)hell commands. Requires root and BusyBox.

Open a terminal or an adb shell and type

su
sed -i 's/installer="[A-Za-z0-9._-]*"/installer="com.android.vending"/g' /data/system/packages.xml

If the command prompt tells you sed: not found, install BusyBox correctly and prepend busybox before sed.


Be aware that this is a highly dangerous action. It is strongly recommended that you backup the file before attempting to modify it. Also in some cases the file permission may get messed up, fix it by

chmod 0660 /data/system/packages.list
chown 1000.1000 /data/system/packages.list
9
  • Wait, with this you can trick the OS into treating arbitrary apps as coming from Play? What about within Play itself - does it then list and update such apps?
    – Andy Yan
    Commented Sep 18, 2017 at 11:01
  • Upvoted because I enjoy messing around with packages.xml.
    – Grimoire
    Commented Sep 18, 2017 at 11:03
  • @AndyYan Play updates any app you're eligible for - including those explicitly marked as "not installed by Play" - as long as you own it with your Google Account.
    – iBug
    Commented Sep 18, 2017 at 12:10
  • @AndyYan Play seems not to have a list of "installed by me" itself.
    – iBug
    Commented Sep 18, 2017 at 12:11
  • Well that "owned" list is pretty much what I was thinking of... How silly I was to have forgotten about that. Thanks and +1 for the explanation.
    – Andy Yan
    Commented Sep 18, 2017 at 12:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .