From 27d8f87c7dd28c8f02980b592a033ad537567466 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 18 Feb 2014 13:29:40 +0100 Subject: [PATCH] Added option to fake GSM CID/LAC Closes #1289 --- CHANGELOG.md | 2 ++ res/layout/settings.xml | 32 +++++++++++++++++++ res/values-ar/strings.xml | 2 ++ res/values-bg/strings.xml | 2 ++ res/values-ca/strings.xml | 2 ++ res/values-cs/strings.xml | 2 ++ res/values-da/strings.xml | 2 ++ res/values-de/strings.xml | 2 ++ res/values-ee/strings.xml | 2 ++ res/values-el/strings.xml | 2 ++ res/values-es/strings.xml | 2 ++ res/values-fa/strings.xml | 2 ++ res/values-fi/strings.xml | 2 ++ res/values-fr/strings.xml | 2 ++ res/values-ga/strings.xml | 2 ++ res/values-he/strings.xml | 2 ++ res/values-hi/strings.xml | 2 ++ res/values-hu/strings.xml | 2 ++ res/values-it/strings.xml | 2 ++ res/values-iw/strings.xml | 2 ++ res/values-ja/strings.xml | 2 ++ res/values-ku-rIQ/strings.xml | 2 ++ res/values-ku-rIR/strings.xml | 2 ++ res/values-lt/strings.xml | 2 ++ res/values-ms/strings.xml | 2 ++ res/values-nb-rNO/strings.xml | 2 ++ res/values-nl/strings.xml | 2 ++ res/values-nn-rNO/strings.xml | 2 ++ res/values-no-rNO/strings.xml | 2 ++ res/values-pl/strings.xml | 2 ++ res/values-pt/strings.xml | 2 ++ res/values-ro/strings.xml | 2 ++ res/values-ru/strings.xml | 2 ++ res/values-sk/strings.xml | 2 ++ res/values-sl/strings.xml | 2 ++ res/values-sr/strings.xml | 2 ++ res/values-sv/strings.xml | 2 ++ res/values-tl-rPH/strings.xml | 2 ++ res/values-tr/strings.xml | 2 ++ res/values-ua/strings.xml | 2 ++ res/values-vi/strings.xml | 2 ++ res/values-zh-rCN/strings.xml | 2 ++ res/values-zh-rTW/strings.xml | 2 ++ res/values/strings.xml | 2 ++ src/biz/bokhorst/xprivacy/PrivacyManager.java | 16 ++++++++++ src/biz/bokhorst/xprivacy/SettingsDialog.java | 8 ++++- .../bokhorst/xprivacy/XTelephonyManager.java | 16 ++++++++-- tools/addstring.sh | 2 +- 48 files changed, 156 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd5ee340a..7fc9a75bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Changelog **Next release** * White list */proc/cpuinfo* and */proc/meminfo* ([issue](/../../issues/1320)) +* Added option to fake [GSM CID/LAC](http://en.wikipedia.org/wiki/Cell_ID) ([issue](/../../issues/1289)) + * Note: only [cell locations](http://developer.android.com/reference/android/telephony/CellLocation.html) can be faked, not [cell info](http://developer.android.com/reference/android/telephony/CellInfo.html) * Updated Slovak translation [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) diff --git a/res/layout/settings.xml b/res/layout/settings.xml index 3e2533248..e0a86c66b 100644 --- a/res/layout/settings.xml +++ b/res/layout/settings.xml @@ -469,6 +469,38 @@ tools:ignore="HardcodedText" /> + + + + + + + + + + + + + + + + + + diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index 9d1f96f28..4224d0eb4 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -147,6 +147,8 @@ إستخدم الإتصال الآمن تقييد مكونات نظام (أندرويد) (يتطلب إعادة التشغيل) إظهار بيانات استخدام التطبيق (يتطلب إعادة التشغيل) + GSM Cell ID + GSM LAC ضغطة طويلة في الإسم لتحديده سوف يتم السؤال عن القيود التطبيق diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml index f8cb9fcd7..f6c401fc0 100644 --- a/res/values-bg/strings.xml +++ b/res/values-bg/strings.xml @@ -147,6 +147,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Приложение diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index 7168e0334..80c640e17 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -145,6 +145,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Aplicació diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 3c94febab..603f8c028 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -147,6 +147,8 @@ nicméně je nemožné zaručit bezchybnou funkčnost na všech zařízeních a Použít zabezpečené připojení Omezit systémové komponenty (Android) (vyžaduje restart) Zobrazit využítí dat aplikace (vyžaduje restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Aplikace diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index 8be174e3d..1eefdfd70 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -145,6 +145,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked App diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 903e66445..ee57d2240 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -147,6 +147,8 @@ Benutze sichere Verbindung Beschränke Systemkomponenten (Android) (erfordert Geräteneustart) Zeige App Nutzungsdaten\n (erfordert Geräteneustart) + GSM Cell ID + GSM LAC Für Auswahl App-Name drücken und kurz halten Beschränkungen nach Aufforderung festlegen App diff --git a/res/values-ee/strings.xml b/res/values-ee/strings.xml index d9a48fc4d..aea8f60fd 100644 --- a/res/values-ee/strings.xml +++ b/res/values-ee/strings.xml @@ -148,6 +148,8 @@ kuid on võimatu garanteerida, et see töötab igal seadmel ja iga rakendusega. Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Rakendus diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml index 5ea351ecf..bfaaf9f73 100644 --- a/res/values-el/strings.xml +++ b/res/values-el/strings.xml @@ -147,6 +147,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Εφαρμογή diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 19c70a35f..6e68172fd 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -147,6 +147,8 @@ sin embargo no puedo garantizar que funcione sin ningún fallo para cada disposi Usar conexiones seguras Restringir componentes del sistema (Android) (requiere reinicio) Mostrar uso de datos de las aplicaciones (requires restart) + GSM Cell ID + GSM LAC Click largo sobre un nombre selecciona la aplicación Se le preguntará por las restricciones Aplicación diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml index 6536c46bf..ea3dd9193 100644 --- a/res/values-fa/strings.xml +++ b/res/values-fa/strings.xml @@ -149,6 +149,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked برنامه های کاربردی diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml index 0c5f669fd..df10b7d38 100644 --- a/res/values-fi/strings.xml +++ b/res/values-fi/strings.xml @@ -146,6 +146,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Applikaatio diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index d8ba46a17..0ef40d243 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -147,6 +147,8 @@ il est impossible de garantir un fonctionnement parfait sur chaque appareil et p Utiliser des connexions sécurisée Restreindre composants système (Android) (redémarrage requis) Montrer les données d\'usage pour chaque application (redémarrage requis) + GSM Cell ID + GSM LAC Maintenez appuyé le nom de l\'appli pour le selectionner Détermination des restrictions sur demande Application diff --git a/res/values-ga/strings.xml b/res/values-ga/strings.xml index 975f072a4..45dfb3471 100644 --- a/res/values-ga/strings.xml +++ b/res/values-ga/strings.xml @@ -147,6 +147,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Iarratais diff --git a/res/values-he/strings.xml b/res/values-he/strings.xml index 2461f9e84..794bcfa58 100644 --- a/res/values-he/strings.xml +++ b/res/values-he/strings.xml @@ -147,6 +147,8 @@ however it is impossible to guarantee it will work flawless on each and every de Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked יישום diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml index 29164610b..f90a96c0d 100644 --- a/res/values-hi/strings.xml +++ b/res/values-hi/strings.xml @@ -147,6 +147,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Application diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index e5c089c3e..e737917b1 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -147,6 +147,8 @@ de lehetetlen garantálni hogy tökéletesen működjön az összes eszközön Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Alkalmazás diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index af35db34a..bba695aa6 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -147,6 +147,8 @@ ma è impossibile garantire che funzionerà in modo impeccabile su ogni disposit Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Applicazione diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml index 2461f9e84..794bcfa58 100644 --- a/res/values-iw/strings.xml +++ b/res/values-iw/strings.xml @@ -147,6 +147,8 @@ however it is impossible to guarantee it will work flawless on each and every de Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked יישום diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index 792d3a00a..f48e88d4f 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -147,6 +147,8 @@ セキュリティーで保護された接続を使用する システムのコンポーネントにアクセスを制限する (アンドロイド)(再起動が必要となります) 使用状況データを登録する(再起動が必要) + GSM Cell ID + GSM LAC タイトルを押してれば、選択ができます restrictions will be asked アプリ diff --git a/res/values-ku-rIQ/strings.xml b/res/values-ku-rIQ/strings.xml index bc9d9f2d2..0cf672b61 100644 --- a/res/values-ku-rIQ/strings.xml +++ b/res/values-ku-rIQ/strings.xml @@ -146,6 +146,8 @@ به کارهینانی هیلی پاریزراو سنوردار کردنی شته بنچینه یه کانی سیسته مه که ت (موبایله که ت) پیشاندنی ئه و زانياريانه ى به كارهينراون + GSM Cell ID + GSM LAC په نجه ت دابگره له سه ر ئه و ناوه ى كه ده ته ویت هه لی بژیریت داوات لیده کریت بو سنوردار کردن به رنامه کان diff --git a/res/values-ku-rIR/strings.xml b/res/values-ku-rIR/strings.xml index bc9d9f2d2..0cf672b61 100644 --- a/res/values-ku-rIR/strings.xml +++ b/res/values-ku-rIR/strings.xml @@ -146,6 +146,8 @@ به کارهینانی هیلی پاریزراو سنوردار کردنی شته بنچینه یه کانی سیسته مه که ت (موبایله که ت) پیشاندنی ئه و زانياريانه ى به كارهينراون + GSM Cell ID + GSM LAC په نجه ت دابگره له سه ر ئه و ناوه ى كه ده ته ویت هه لی بژیریت داوات لیده کریت بو سنوردار کردن به رنامه کان diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml index 5c59faa33..7563a68a5 100644 --- a/res/values-lt/strings.xml +++ b/res/values-lt/strings.xml @@ -147,6 +147,8 @@ Tačiau neįmanoma garantuoti, kad dirbs nepriekaištingai su kiekvienu prietais Naudojamas saugus ryšys Riboti sistemos komponentus (Android) (reikia perkrauti) Rodyti programos duomenų naudojimą (reikia perkrauti) + GSM Cell ID + GSM LAC Ilgai spausti ant programos pavadinimo, norint ją pasirinti apribojimai bus paprašyti Programa diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml index 156abfbc1..792eb2d17 100644 --- a/res/values-ms/strings.xml +++ b/res/values-ms/strings.xml @@ -147,6 +147,8 @@ namun ia adalah mustahil untuk menjaminkan penggunaan sempurna untuk setiap pera Guna sambungan terjamin Sekat komponen sistem (Android) Tunjuk penggunaan data aplikasi + GSM Cell ID + GSM LAC Tekan lama pada nama untuk pilih sekatan akan diminta Aplikasi diff --git a/res/values-nb-rNO/strings.xml b/res/values-nb-rNO/strings.xml index 8fbf1d54f..b514f29a0 100644 --- a/res/values-nb-rNO/strings.xml +++ b/res/values-nb-rNO/strings.xml @@ -145,6 +145,8 @@ Bruk trygg forbindelse Blokker systemkomponenter (Android) (omstart nødvendig) Vis brukerdata til apper (omstart nødvendig) + GSM Cell ID + GSM LAC >Trykk lenge på navnet som skal markeres apper spør om tillatelse App diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index d65b3f2e8..bd0695653 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -147,6 +147,8 @@ maar het is onmogelijk om te garanderen dat het op elk apparaat en voor elke app Gebruik veilige verbindingen Beperk systemcomponenten (Android) Toon gebruiksgegevens + GSM Cell ID + GSM LAC Druk lang om te selecteren beperkingen worden gevraagd Applicatie diff --git a/res/values-nn-rNO/strings.xml b/res/values-nn-rNO/strings.xml index 8fbf1d54f..b514f29a0 100644 --- a/res/values-nn-rNO/strings.xml +++ b/res/values-nn-rNO/strings.xml @@ -145,6 +145,8 @@ Bruk trygg forbindelse Blokker systemkomponenter (Android) (omstart nødvendig) Vis brukerdata til apper (omstart nødvendig) + GSM Cell ID + GSM LAC >Trykk lenge på navnet som skal markeres apper spør om tillatelse App diff --git a/res/values-no-rNO/strings.xml b/res/values-no-rNO/strings.xml index 8fbf1d54f..b514f29a0 100644 --- a/res/values-no-rNO/strings.xml +++ b/res/values-no-rNO/strings.xml @@ -145,6 +145,8 @@ Bruk trygg forbindelse Blokker systemkomponenter (Android) (omstart nødvendig) Vis brukerdata til apper (omstart nødvendig) + GSM Cell ID + GSM LAC >Trykk lenge på navnet som skal markeres apper spør om tillatelse App diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index ab13814c9..d27a9e2ee 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -147,6 +147,8 @@ Użyj bezpiecznych połaczeń Ogranicz komponenty systemowe (Android) (wymaga restartu) Pokaż użycie danych przez aplikacje (wymaga restartu) + GSM Cell ID + GSM LAC Przytrzymaj na nazwie aby wybrać będą pytania o ograniczenia Aplikacja diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index a42d7d280..8581bc1c7 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -147,6 +147,8 @@ porém é impossível garantir que irá funcionar sem problemas em todos os disp Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Aplicação diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index e3b7a1b6e..047be6baa 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -147,6 +147,8 @@ however it is impossible to guarantee it will work flawless on each and every de Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Aplicatie diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 9a0483cea..724a2790f 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -147,6 +147,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Приложение diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml index 86e8b9408..189becb8b 100644 --- a/res/values-sk/strings.xml +++ b/res/values-sk/strings.xml @@ -147,6 +147,8 @@ avšak nie je nemožné zaručiť, že bude fungovať bezchybne na každom zaria Použiť zabezpečené pripojenie Obmedziť systémové komponenty (Android) (vyžadovaný reštart) Zobraziť využitie dát aplikácie (vyžadovaný reštart) + GSM Cell ID + GSM LAC Vybrať dlhým stlačením názvu obmedzenia budú požadované Aplikácia diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml index 542efe92b..580a85762 100644 --- a/res/values-sl/strings.xml +++ b/res/values-sl/strings.xml @@ -147,6 +147,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Program diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml index db15fdf52..1ab7ccbea 100644 --- a/res/values-sr/strings.xml +++ b/res/values-sr/strings.xml @@ -147,6 +147,8 @@ however it is impossible to guarantee it will work flawless on each and every de Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Апликација diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index 6d29d59dd..a5b5439c7 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -147,6 +147,8 @@ Det är emellertid omöjligt att garantera att appen fungerar på alla enheter o Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Applikation diff --git a/res/values-tl-rPH/strings.xml b/res/values-tl-rPH/strings.xml index 6eefb0189..7cffb49ba 100644 --- a/res/values-tl-rPH/strings.xml +++ b/res/values-tl-rPH/strings.xml @@ -147,6 +147,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Mga Applications diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 309eb7da6..a99b68872 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -146,6 +146,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Uygulama diff --git a/res/values-ua/strings.xml b/res/values-ua/strings.xml index 8c121de60..9200b380c 100644 --- a/res/values-ua/strings.xml +++ b/res/values-ua/strings.xml @@ -147,6 +147,8 @@ Use secure connections Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Програма diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index ce4607846..7df639cda 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -146,6 +146,8 @@ Sử dụng các kết nối được bảo mật Restrict system components (Android) (requires restart) Show application usage data (requires restart) + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Ứng dụng diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index cfe411ed9..1fb4638aa 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -147,6 +147,8 @@ 使用安全连接(https) 限制系统组件 (Android) (需要重启) 显示应用权限使用情况 (需要重启) + GSM Cell ID + GSM LAC 长按名称进行选择 限制将被请求 请输入应用名称 diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml index f79510dc3..c4934ac9b 100644 --- a/res/values-zh-rTW/strings.xml +++ b/res/values-zh-rTW/strings.xml @@ -147,6 +147,8 @@ 使用加密連線 (HTTPS) 可限制安卓系統元件(需重新啟動) 開啟操作記錄(需重新啟動) + GSM Cell ID + GSM LAC 長按程式名稱可選取 存取該權限時詢問 程式名稱 diff --git a/res/values/strings.xml b/res/values/strings.xml index de5900d55..d37b4eee7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -161,6 +161,8 @@ however it is impossible to guarantee it will work flawlessly on each and every Use secure connections Restrict system components (Android) Show application usage data + GSM Cell ID + GSM LAC Long press name to select restrictions will be asked Application diff --git a/src/biz/bokhorst/xprivacy/PrivacyManager.java b/src/biz/bokhorst/xprivacy/PrivacyManager.java index 4d146fa8f..79315ecfa 100644 --- a/src/biz/bokhorst/xprivacy/PrivacyManager.java +++ b/src/biz/bokhorst/xprivacy/PrivacyManager.java @@ -117,6 +117,8 @@ public class PrivacyManager { public final static String cSettingRestricted = "Retricted"; public final static String cSettingOnDemand = "OnDemand"; public final static String cSettingMigrated = "Migrated"; + public final static String cSettingCid = "Cid"; + public final static String cSettingLac = "Lac"; public final static String cSettingTemplate = "Template"; public final static String cSettingAccount = "Account."; @@ -750,6 +752,20 @@ public static Object getDefacedProp(int uid, String name) { if (name.equals("MNC")) return getSetting(uid, cSettingMnc, "01", true); + if (name.equals("CID")) + try { + return Integer.parseInt(getSetting(uid, cSettingCid, "0", true)) & 0xFFFF; + } catch (Throwable ignored) { + return -1; + } + + if (name.equals("LAC")) + try { + return Integer.parseInt(getSetting(uid, cSettingLac, "0", true)) & 0xFFFF; + } catch (Throwable ignored) { + return -1; + } + // Fallback Util.log(null, Log.WARN, "Fallback value name=" + name); return cDeface; diff --git a/src/biz/bokhorst/xprivacy/SettingsDialog.java b/src/biz/bokhorst/xprivacy/SettingsDialog.java index 4a092326b..1bd8cdfff 100644 --- a/src/biz/bokhorst/xprivacy/SettingsDialog.java +++ b/src/biz/bokhorst/xprivacy/SettingsDialog.java @@ -72,6 +72,8 @@ public static void edit(final ActivityBase context, ApplicationInfoEx appInfo) { final EditText etCountry = (EditText) dlgSettings.findViewById(R.id.etCountry); final EditText etOperator = (EditText) dlgSettings.findViewById(R.id.etOperator); final EditText etIccId = (EditText) dlgSettings.findViewById(R.id.etIccId); + final EditText etCid = (EditText) dlgSettings.findViewById(R.id.etCid); + final EditText etLac = (EditText) dlgSettings.findViewById(R.id.etLac); final EditText etSubscriber = (EditText) dlgSettings.findViewById(R.id.etSubscriber); final EditText etSSID = (EditText) dlgSettings.findViewById(R.id.etSSID); final EditText etUa = (EditText) dlgSettings.findViewById(R.id.etUa); @@ -94,7 +96,7 @@ public static void edit(final ActivityBase context, ApplicationInfoEx appInfo) { Button btnCancel = (Button) dlgSettings.findViewById(R.id.btnCancel); final EditText[] edits = new EditText[] { etSerial, etLat, etLon, etAlt, etMac, etIP, etImei, etPhone, etId, - etGsfId, etAdId, etMcc, etMnc, etCountry, etOperator, etIccId, etSubscriber, etSSID, etUa }; + etGsfId, etAdId, etMcc, etMnc, etCountry, etOperator, etIccId, etCid, etLac, etSubscriber, etSSID, etUa }; final CheckBox[] boxes = new CheckBox[] { cbSerial, cbLat, cbLon, cbAlt, cbMac, cbImei, cbPhone, cbId, cbGsfId, cbAdId, cbCountry, cbSubscriber, cbSSID }; @@ -346,6 +348,8 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { etMnc.setText(PrivacyManager.getSetting(-uid, PrivacyManager.cSettingMnc, "", false)); etOperator.setText(PrivacyManager.getSetting(-uid, PrivacyManager.cSettingOperator, "", false)); etIccId.setText(PrivacyManager.getSetting(-uid, PrivacyManager.cSettingIccId, "", false)); + etCid.setText(PrivacyManager.getSetting(-uid, PrivacyManager.cSettingCid, "", false)); + etLac.setText(PrivacyManager.getSetting(-uid, PrivacyManager.cSettingLac, "", false)); etUa.setText(PrivacyManager.getSetting(-uid, PrivacyManager.cSettingUa, "", false)); // Handle search @@ -514,6 +518,8 @@ public void onClick(View view) { PrivacyManager.setSetting(uid, PrivacyManager.cSettingCountry, getValue(cbCountry, etCountry)); PrivacyManager.setSetting(uid, PrivacyManager.cSettingOperator, getValue(null, etOperator)); PrivacyManager.setSetting(uid, PrivacyManager.cSettingIccId, getValue(null, etIccId)); + PrivacyManager.setSetting(uid, PrivacyManager.cSettingCid, getValue(null, etCid)); + PrivacyManager.setSetting(uid, PrivacyManager.cSettingLac, getValue(null, etLac)); PrivacyManager.setSetting(uid, PrivacyManager.cSettingSubscriber, getValue(cbSubscriber, etSubscriber)); PrivacyManager.setSetting(uid, PrivacyManager.cSettingSSID, getValue(cbSSID, etSSID)); PrivacyManager.setSetting(uid, PrivacyManager.cSettingUa, getValue(null, etUa)); diff --git a/src/biz/bokhorst/xprivacy/XTelephonyManager.java b/src/biz/bokhorst/xprivacy/XTelephonyManager.java index 7d528de6c..41fe47e9a 100644 --- a/src/biz/bokhorst/xprivacy/XTelephonyManager.java +++ b/src/biz/bokhorst/xprivacy/XTelephonyManager.java @@ -13,6 +13,7 @@ import android.telephony.SignalStrength; import android.telephony.CellInfo; import android.telephony.TelephonyManager; +import android.telephony.gsm.GsmCellLocation; import android.util.Log; import de.robv.android.xposed.XC_MethodHook.MethodHookParam; @@ -178,7 +179,7 @@ protected void after(MethodHookParam param) throws Throwable { } else if (mMethod == Methods.getCellLocation) { if (param.getResult() != null && isRestricted(param)) - param.setResult(CellLocation.getEmpty()); + param.setResult(getDefacedCellLocation(Binder.getCallingUid())); } else if (mMethod == Methods.getIsimImpu) { if (param.getResult() != null && isRestricted(param)) @@ -202,6 +203,17 @@ protected void after(MethodHookParam param) throws Throwable { } } + private static CellLocation getDefacedCellLocation(int uid) { + int cid = (Integer) PrivacyManager.getDefacedProp(uid, "CID"); + int lac = (Integer) PrivacyManager.getDefacedProp(uid, "LAC"); + if (cid > 0 && lac > 0) { + GsmCellLocation cellLocation = new GsmCellLocation(); + cellLocation.setLacAndCid(lac, cid); + return cellLocation; + } else + return CellLocation.getEmpty(); + } + private class XPhoneStateListener extends PhoneStateListener { private PhoneStateListener mListener; @@ -227,7 +239,7 @@ public void onCellInfoChanged(List cellInfo) { @Override public void onCellLocationChanged(CellLocation location) { - mListener.onCellLocationChanged(CellLocation.getEmpty()); + mListener.onCellLocationChanged(getDefacedCellLocation(Binder.getCallingUid())); } @Override diff --git a/tools/addstring.sh b/tools/addstring.sh index 758553522..e38e85693 100755 --- a/tools/addstring.sh +++ b/tools/addstring.sh @@ -3,4 +3,4 @@ grep -RIl "\Licensed, thanks for your support!' #grep -RIl "\