2016-04-01 11 views
1

ich mein System-App aktualisieren mit:Android: Update-System App

adb install -r app.apk 

Und das funktioniert. Wenn stattdessen I-Typ:

adb shell 
pm install -r app.apk 

(die apk Push in das Gerät entfällt) kehrt:

Fehler [INSTALL_FAILED_INVALID_URI]

Jede Idee des Grundes, warum? Der adb-Befehl, was macht das eigentlich im System?

Antwort

3

Die Antwort ist, dass Sie die Datei in das temporäre Verzeichnis hochladen müssen (keine Ahnung, warum).

So:

adb push app.apk /data/local/tmp/app.apk 

, verfahren Sie dann wie gewohnt:

adb shell pm install -r /data/local/tmp/app.apk 

Und alles funktioniert normal.

+0

Ich bekomme den folgenden Fehler Fehler [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE] –

+0

vielleicht sind Sie Probleme mit Berechtigungen. Wie Sie es als root ausführen (oder Sie sind nicht root). – Filnik

+0

Würde es die Updates nicht im Verzeichnis/data/app/installieren? – Jaydev