...
 
Commits (3)
/*
* Copyright (C) 2015 Dominik Schürmann <dominik@dominikschuermann.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.privileged;
interface IPrivilegedCallback {
void handleResult(in String packageName, in int returnCode);
}
\ No newline at end of file
/*
* Copyright (C) 2015 Dominik Schürmann <dominik@dominikschuermann.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.privileged;
import org.fdroid.fdroid.privileged.IPrivilegedCallback;
interface IPrivilegedService {
boolean hasPrivilegedPermissions();
/**
* - Docs based on PackageManager.installPackage()
* - Asynchronous (oneway) IPC calls!
*
* Install a package. Since this may take a little while, the result will
* be posted back to the given callback. An installation will fail if the
* package named in the package file's manifest is already installed, or if there's no space
* available on the device.
*
* @param packageURI The location of the package file to install. This can be a 'file:' or a
* 'content:' URI.
* @param flags - possible values: {@link #INSTALL_FORWARD_LOCK},
* {@link #INSTALL_REPLACE_EXISTING}, {@link #INSTALL_ALLOW_TEST}.
* @param installerPackageName Optional package name of the application that is performing the
* installation. This identifies which market the package came from.
* @param callback An callback to get notified when the package installation is
* complete.
*/
oneway void installPackage(in Uri packageURI, in int flags, in String installerPackageName,
in IPrivilegedCallback callback);
/**
* - Docs based on PackageManager.deletePackage()
* - Asynchronous (oneway) IPC calls!
*
* Attempts to delete a package. Since this may take a little while, the result will
* be posted back to the given observer. A deletion will fail if the
* named package cannot be found, or if the named package is a "system package".
*
* @param packageName The name of the package to delete
* @param flags - possible values: {@link #DELETE_KEEP_DATA},
* {@link #DELETE_ALL_USERS}.
* @param callback An callback to get notified when the package deletion is
* complete.
*/
oneway void deletePackage(in String packageName, in int flags, in IPrivilegedCallback callback);
}
\ No newline at end of file
......@@ -18,7 +18,6 @@
package org.gdroid.gdroid;
import android.app.Activity;
import android.app.DownloadManager;
import android.content.Context;
import android.content.Intent;
......@@ -57,6 +56,7 @@ import org.gdroid.gdroid.beans.CategoryBean;
import org.gdroid.gdroid.beans.TagBean;
import org.gdroid.gdroid.perm.AppDiff;
import org.gdroid.gdroid.perm.AppSecurityPermissions;
import org.gdroid.gdroid.stolen.PrivilegedInstaller;
import org.json.JSONException;
import org.json.JSONObject;
......@@ -573,6 +573,13 @@ public class AppDetailActivity extends AppCompatActivity {
}
}
if (PrivilegedInstaller.isDefault(mContext))
{
PrivilegedInstaller pi = new PrivilegedInstaller(mContext, mApp);
pi.installPackageInternal(uri, uri);
break;
}
if (Build.VERSION.SDK_INT < 14) {
intent.setAction(Intent.ACTION_VIEW);
intent.setDataAndType(uri, "application/vnd.android.package-archive");
......
......@@ -35,4 +35,5 @@
<string name="action_install">Installeer</string>
<string name="action_upgrade">Opgradering</string>
<string name="action_launch">Begin</string>
<string name="system_install_denied_permissions">Die voorreg toestemming is nie toegestaan vir die uitbreiding nie!</string>
</resources>
......@@ -35,4 +35,5 @@
<string name="action_install">Instalar</string>
<string name="action_upgrade">Anovar</string>
<string name="action_launch">Executar</string>
<string name="system_install_denied_permissions">¡Nun s\'otorgaron permisos root pa la estensión! ¡Por favor, crea</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Усталяваць</string>
<string name="action_upgrade">Абнавіць</string>
<string name="action_launch">Запусціць</string>
<string name="system_install_denied_permissions">Прывілеяваныя дазволы не былі нададзены дадатаку! Калі ласка,</string>
</resources>
......@@ -35,4 +35,5 @@
<string name="action_install">Инсталиране</string>
<string name="action_upgrade">Обновяване</string>
<string name="action_launch">Пускане</string>
<string name="system_install_denied_permissions">Разширените пълномощия не бяха предоставени на плъгина! Моля</string>
</resources>
......@@ -35,4 +35,5 @@
<string name="action_install">འགྲིག་བཅུག</string>
<string name="action_upgrade">རིམ་སྤར།</string>
<string name="action_launch">འཁོར་སྐྱོད།</string>
<string name="system_install_denied_permissions">མཇུག་མཐུད་དེ་ལ་ཁེ་ཕན་ཆོག་མཆན་སྤྲད་མེད། སྐྱོན་ཅན་ཡིན་པའི་བརྡ་གཏོང་རོགས།!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Instal·la</string>
<string name="action_upgrade">Actualitza</string>
<string name="action_launch">Executa</string>
<string name="system_install_denied_permissions">No s\'han concedit els permisos de sistema a l\'extensió! Si podeu,</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Nainstalovat</string>
<string name="action_upgrade">Aktualizovat</string>
<string name="action_launch">Spustit</string>
<string name="system_install_denied_permissions">Privilegovaná oprávnění nebyla tomuto rozšíření udělena! Nahlašte</string>
</resources>
......@@ -37,4 +37,5 @@
<string name="action_install">Installer</string>
<string name="action_upgrade">Opgrader</string>
<string name="action_launch">Kør</string>
<string name="system_install_denied_permissions">De privilegerede tilladelser er ikke blevet givet til udvidelsen!</string>
</resources>
......@@ -36,4 +36,5 @@
<string name="action_install">Installieren</string>
<string name="action_upgrade">Aktualisieren</string>
<string name="action_launch">Starten</string>
<string name="system_install_denied_permissions">Die Genehmigungen für die Sonderrechte der Erweiterung wurden nicht erteilt! Bitte einen Fehlerbericht erstellen!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Εγκατάσταση</string>
<string name="action_upgrade">Αναβάθμιση</string>
<string name="action_launch">Εκτέλεση</string>
<string name="system_install_denied_permissions">Τα δικαιώματα συστήματος δεν έχουν χορηγηθεί στην επέκταση!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Instali</string>
<string name="action_upgrade">Ĝisdatigi</string>
<string name="action_launch">Lanĉi</string>
<string name="system_install_denied_permissions">La privilegia aldonaĵo ne akiris ĉefuzantan permeson! Bonvolu krei</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Instalar</string>
<string name="action_upgrade">Actualización (a nueva versión)</string>
<string name="action_launch">Ejecutar</string>
<string name="system_install_denied_permissions">¡No se han concedido permisos de sistema a la extensión! ¡Por</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Paigalda</string>
<string name="action_upgrade">Uuenda</string>
<string name="action_launch">Käivita</string>
<string name="system_install_denied_permissions">Laiendusele ei ole antud priviligeeritud õiguseid! Palun saada</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Instalatu</string>
<string name="action_upgrade">Bertsio-berritu</string>
<string name="action_launch">Exekutatu</string>
<string name="system_install_denied_permissions">Ez zaizkio pribilegiodun baimenak eman luzapenari! Mesedez eman</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">نصب</string>
<string name="action_upgrade">ارتقا</string>
<string name="action_launch">اجرا</string>
<string name="system_install_denied_permissions">دسترسی های مجاز به افزونه داده نشده است! لطفاً یک گزارش خطا ایجاد کنید!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Asenna</string>
<string name="action_upgrade">Päivitä</string>
<string name="action_launch">Suorita</string>
<string name="system_install_denied_permissions">Laajennukselle ei ole myönnetty etuoikeutettuja käyttöoikeuksia!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Installer</string>
<string name="action_upgrade">Mettre à jour</string>
<string name="action_launch">Lancer</string>
<string name="system_install_denied_permissions">Les autorisations privilégiées n\'ont pas été accordées à l\'application ! Veuillez signaler ce bug !</string>
</resources>
......@@ -37,4 +37,5 @@
<string name="action_install">Instalar</string>
<string name="action_upgrade">Actualizar</string>
<string name="action_launch">Executar</string>
<string name="system_install_denied_permissions">Os permisos con privilexios non foron garantizados para a</string>
</resources>
......@@ -34,4 +34,5 @@
<string name="action_install">Instaliraj</string>
<string name="action_upgrade">Nadogradi</string>
<string name="action_launch">Pokreni</string>
<string name="system_install_denied_permissions">Proširenju nisu dodjeljene privilegirane ovlasti! Molimo stvorite</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Telepítés</string>
<string name="action_upgrade">Frissítés</string>
<string name="action_launch">Indítás</string>
<string name="system_install_denied_permissions">A privilegizált engedélyek nem lettek megadva ehhez a kiterjesztéshez! Küldjön be hibajelentést!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Pasang</string>
<string name="action_upgrade">Tingkatkan</string>
<string name="action_launch">Jalankan</string>
<string name="system_install_denied_permissions">Izin istimewa belum diberikan ke ekstensi! Harap buat laporan</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Pasang</string>
<string name="action_upgrade">Tingkatkan</string>
<string name="action_launch">Jalankan</string>
<string name="system_install_denied_permissions">Izin istimewa belum diberikan ke ekstensi! Harap buat laporan</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Setja inn</string>
<string name="action_upgrade">Uppfæra</string>
<string name="action_launch">Keyra</string>
<string name="system_install_denied_permissions">Forgangsheimildum hefur ekki verið úthlutað til viðbótarinnar!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Installa</string>
<string name="action_upgrade">Aggiorna</string>
<string name="action_launch">Avvia</string>
<string name="system_install_denied_permissions">I privilegi non sono stati concessi all\'estensione! Per favore</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">התקנה</string>
<string name="action_upgrade">שדרוג</string>
<string name="action_launch">הפעלה</string>
<string name="system_install_denied_permissions">ההרשאות המיוחדות לא הוענקו להרחבה! נא לדווח על באג!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">インストール</string>
<string name="action_upgrade">アップグレード</string>
<string name="action_launch">開く</string>
<string name="system_install_denied_permissions">特権が拡張機能に付与されていません!バグレポートを送ってください!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">설치</string>
<string name="action_upgrade">업그레이드</string>
<string name="action_launch">실행</string>
<string name="system_install_denied_permissions">특별 권한이 확장 기능에 부여되지 않았습니다! 버그 보고를 작성해주세요!</string>
</resources>
......@@ -35,4 +35,5 @@
<string name="action_install">സ്ഥാപിക്കുക</string>
<string name="action_upgrade">പുതുക്കുക</string>
<string name="action_launch">തുടങ്ങുക</string>
<string name="system_install_denied_permissions">പ്രത്യേക അനുമതികൾ വിപുലീകരണത്തിന് നൽകിയിട്ടില്ല! ഒരു ബഗ് റിപ്പോർട്ട് സൃഷ്ടിക്കുക!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Installer</string>
<string name="action_upgrade">Oppgrader</string>
<string name="action_launch">Kjør</string>
<string name="system_install_denied_permissions">Tillegget har ikke blitt gitt priviligert tilgang. Send en</string>
</resources>
......@@ -37,4 +37,5 @@
<string name="action_install">Installeren</string>
<string name="action_upgrade">Bijwerken</string>
<string name="action_launch">Uitvoeren</string>
<string name="system_install_denied_permissions">De extensie heeft geen systeemrechten gekregen! Dient een bugmelding in!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Installeren</string>
<string name="action_upgrade">Bijwerken</string>
<string name="action_launch">Uitvoeren</string>
<string name="system_install_denied_permissions">De extensie heeft geen systeemrechten gekregen! Maak een bugrapport</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Zainstaluj</string>
<string name="action_upgrade">Zaktualizuj</string>
<string name="action_launch">Uruchom</string>
<string name="system_install_denied_permissions">Uprzywilejowanemu dodatkowi nie zostały przyznane wymagane</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Instalar</string>
<string name="action_upgrade">Atualizar</string>
<string name="action_launch">Executar</string>
<string name="system_install_denied_permissions">Não foram concedidas as permissões privilegiadas para a extensão!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Instalar</string>
<string name="action_upgrade">Atualizar</string>
<string name="action_launch">Executar</string>
<string name="system_install_denied_permissions">Não foram concedidas as permissões necessárias para a extensão. Por</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Instalează</string>
<string name="action_upgrade">Actualizează</string>
<string name="action_launch">Porneste</string>
<string name="system_install_denied_permissions">Nu au fost date permisiuni privilegiate extensiei! Vă rugăm să creeați un raport de eroare!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Установить</string>
<string name="action_upgrade">Обновить</string>
<string name="action_launch">Запустить</string>
<string name="system_install_denied_permissions">Расширению не был предоставлен привилегированный доступ! Создайте отчет об ошибке!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Installa</string>
<string name="action_upgrade">Agiorna</string>
<string name="action_launch">Allughe</string>
<string name="system_install_denied_permissions">Sos permissos de sistema non sunt istados cuntzessos a</string>
</resources>
......@@ -35,4 +35,5 @@
<string name="action_install">Inštalovať</string>
<string name="action_upgrade">Inovovať</string>
<string name="action_launch">Spustiť</string>
<string name="system_install_denied_permissions">Oprávnené povolenia neboli rozšíreniu udelené! Prosím vytvorte</string>
</resources>
......@@ -34,4 +34,5 @@
<string name="action_install">Vakirira</string>
<string name="action_upgrade">Kwidziridza</string>
<string name="action_launch">Ita</string>
<string name="system_install_denied_permissions">Mibvumo ine tambanudzo haina kupihwa kuchihesvuro! Chikumbiro, sika</string>
</resources>
......@@ -35,4 +35,5 @@
<string name="action_install">Инсталирај</string>
<string name="action_upgrade">Надогради</string>
<string name="action_launch">Покрени</string>
<string name="system_install_denied_permissions">Повлашћене дозволе нису одобрене за проширење! Пријавите грешку!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Installera</string>
<string name="action_upgrade">Uppgradera</string>
<string name="action_launch">Kör</string>
<string name="system_install_denied_permissions">De privilegierade tillstånden har inte beviljats utökningen! Skapa en felrapport!</string>
</resources>
......@@ -34,4 +34,5 @@
<string name="action_install">ติดตั้ง</string>
<string name="action_upgrade">อัพเกรด</string>
<string name="action_launch">เริ่มโปรแกรม</string>
<string name="system_install_denied_permissions">ส่วนขยายช่วยติดตั้งทำงาน</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Kur</string>
<string name="action_upgrade">Yükselt</string>
<string name="action_launch">Çalıştır</string>
<string name="system_install_denied_permissions">Uzantıya ayrıcalıklı izinler verilmemiştir! Lütfen bir hata bildirimi oluşturun!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">Встановити</string>
<string name="action_upgrade">Оновити</string>
<string name="action_launch">Запустити</string>
<string name="system_install_denied_permissions">Привілейовані дозволи на розширення не надано! Будь ласка, створіть звіт про помилку!</string>
</resources>
......@@ -37,4 +37,5 @@
<string name="action_install">Cài đặt</string>
<string name="action_upgrade">Nâng cấp</string>
<string name="action_launch">Chạy</string>
<string name="system_install_denied_permissions">Phần mở rộng chưa được cấp quyền nâng cao! Hãy thông báo lỗi này</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">安装</string>
<string name="action_upgrade">更新</string>
<string name="action_launch">运行</string>
<string name="system_install_denied_permissions">该扩展没有获得超级权限!请报BUG!</string>
</resources>
......@@ -35,4 +35,5 @@
<string name="action_install">安裝</string>
<string name="action_upgrade">升級</string>
<string name="action_launch">開啟</string>
<string name="system_install_denied_permissions">套件尚未得到系統權限!</string>
</resources>
......@@ -38,4 +38,5 @@
<string name="action_install">安裝</string>
<string name="action_upgrade">更新</string>
<string name="action_launch">執行</string>
<string name="system_install_denied_permissions">擴充未被授予特權權限!請建立一份錯誤報告!</string>
</resources>
......@@ -178,4 +178,5 @@
<string name="pref_title_ratings_summary">Assign a number from 0 to 10 to each metric. Higher number means higher importance.</string>
<string name="pref_title_updated_in_2_years">last update in recent 2 years</string>
<string name="pref_title_release_cycle_time">Release cycle time</string>
<string name="system_install_denied_permissions">The privileged permissions have not been granted to the extension!</string>
</resources>