Skip to content

Commit

Permalink
Merge pull request #4 from ICTrust/dev
Browse files Browse the repository at this point in the history
Dev 1.4
  • Loading branch information
A-YATTA authored Apr 2, 2023
2 parents 7d74dba + 864470c commit 2bbb379
Show file tree
Hide file tree
Showing 157 changed files with 3,714 additions and 1,761 deletions.
45 changes: 31 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
# PObY-A
PObY-A, Privacy Owned by You - Android, is an application which aim to help Android users to improve security and privacy of their devices.


## Features
- Check and help to enforce settings privacy based on some CIS (Center of Internet Security) recommendations
- List installed applications and list their granted permissions
- Malware scan using the same database as [AMDH](https://github.com/a-yatta/AMDH)

| PObY-A Features | |
|----------------------------------------------------------------|-----|
| 🚫 No Ads or Purchases ||
| 📙 Translations (FR/EN) ||
| 🪲 Malware scan ||
| ⏱️ Live monitoring (v1.4: install/uninstall) ||
| 🔐 Enforce settings privacy based on some CIS* recommendations ||
| ⚠️ Warn apps with dangerous* permissions ||
| ⚡ Many more coming... ||

**CIS:** Center of Internet Security

**dangerous**: "A higher-risk permission that would give a requesting application access to private user data or control over the device that can negatively impact the user" [permission element](https://developer.android.com/guide/topics/manifest/permission-element)

## Support
Android versions from **8.0 (API 26)**

## Needed permissions
- Write system settings
- "force-lock" admin permission
- Bluetooth permission: needed to automate disable bluetooth
- Wifi permission: needed to automate disable Wifi
- Foreground service permission: needed for live monitoring

## Screnshots
<img src="screenshots/splash_1.png" alt="drawing" width="300"/>
<img src="screenshots/splash_2.png" alt="drawing" width="300"/>
<img src="screenshots/Device_admin.png" alt="drawing" width="300"/>
<img src="screenshots/settings_permission.png" alt="drawing" width="300"/>
<img src="screenshots/sidemenu.png" alt="drawing" width="300"/>
<img src="screenshots/Applications_list.png" alt="drawing" width="300"/>
<img src="screenshots/privacy_settings.png" alt="drawing" width="300"/>
<img src="screenshots/option_settings.png" alt="drawing" width="300"/>
<img src="screenshots/malware_scan.png" alt="drawing" width="300"/>
<img src="screenshots/malware_scan_result.png" alt="drawing" width="300"/>
<div style="display: block; margin: auto; margin-left: auto; margin-right: auto;" >
<img src="screenshots/sidemenu.jpg" alt="drawing" width="200"/>
<img src="screenshots/dashboard.jpg" alt="drawing" width="200"/>
<img src="screenshots/AppsMenu.jpg" alt="drawing" width="225"/>
<img src="screenshots/AppPermissions.jpg" alt="drawing" width="215"/>
<img src="screenshots/MalwareScan.jpg" alt="drawing" width="200"/>
<img src="screenshots/noThreatFound.jpg" alt="drawing" width="215"/>
<img src="screenshots/PossibleMalwareFound.jpg" alt="drawing" width="200"/>
<img src="screenshots/settings.jpg" alt="drawing" width="200"/>
<img src="screenshots/ActionSettings.jpg" alt="drawing" width="200"/>
</div>
30 changes: 26 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,30 @@ apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'

apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 33
defaultConfig {
applicationId "ch.ictrust.pobya"
minSdkVersion 21
minSdkVersion 26
targetSdkVersion 33
versionCode 5
versionName "1.3"
versionCode 6
versionName "1.4"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas".toString())
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
debuggable false
jniDebuggable false
}
}
compileOptions {
Expand Down Expand Up @@ -93,6 +101,20 @@ dependencies {

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0")

def room_version = "2.5.1"

implementation("androidx.room:room-runtime:$room_version")
kapt "androidx.room:room-compiler:$room_version"
implementation("androidx.room:room-ktx:$room_version")


implementation 'com.google.android.flexbox:flexbox:3.0.0'


implementation 'com.google.android.material:material:1.8.0'



}

apply plugin: 'com.google.gms.google-services'
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package ch.ictrust

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

Expand All @@ -13,12 +11,11 @@ import org.junit.Assert.*
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.ictrust", appContext.packageName)
assertEquals("ch.ictrust.pobya", appContext.packageName)
}
}
Binary file added app/src/debug/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
Binary file added app/src/debug/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/src/debug/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#00FFFFFF</color>
</resources>
46 changes: 32 additions & 14 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="1"
>
android:versionCode="1">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
<uses-permission android:name="android.permission.DELETE_PACKAGES" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.WHITELIST_RESTRICTED_PERMISSIONS" />
<uses-permission android:name="android.permission.WHITELIST_RESTRICTED_PERMISSIONS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<application
android:allowBackup="true"
android:icon="@mipmap/poby"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/poby"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
Expand All @@ -35,26 +41,38 @@
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar" />
<activity android:name=".activity.WalkthroughActivity" />
<activity
android:name=".activity.InstalledAppsActivity"/>
<activity
android:name=".activity.AppDetailActivity"/>
<activity
android:name=".activity.MalwareScanActivity"
android:screenOrientation="portrait" />

<receiver
android:name="ch.ictrust.pobya.Utillies.AppAdminReceiver"
android:name="ch.ictrust.pobya.utillies.AppAdminReceiver"
android:permission="android.permission.BIND_DEVICE_ADMIN"
android:exported="false">
<meta-data
android:name="android.app.device_admin"
android:resource="@xml/device_admin_receiver" />

<intent-filter>
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
</intent-filter>
</receiver>
<service android:name=".service.ApplicationsService"
android:enabled="true"
android:exported="false"
android:process="ch.ictrust.pobya.ApplicationsService"
android:stopWithTask="false">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_INSTALL" />
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package"/>
</intent-filter>
</service>
<service android:name=".service.MalwareScanService"
android:enabled="true"
android:exported="false">
</service>
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
</application>

</manifest>
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
package ch.ictrust.pobya.Utillies;
package ch.ictrust.pobya.utillies;

import android.app.admin.DeviceAdminReceiver;
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.UserHandle;
import android.widget.Toast;
import androidx.annotation.RequiresApi;
import ch.ictrust.pobya.activity.MainActivity;



public class AppAdminReceiver extends DeviceAdminReceiver {

private static final String TAG = "AppAdminReceiver";
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public void onProfileProvisioningComplete(Context context, Intent intent) {
// Enable the profile
DevicePolicyManager manager =
(DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE);
ComponentName componentName = getComponentName(context);
manager.setProfileName(componentName, "PObY-A");

// Open the main screen
Intent launch = new Intent(context, MainActivity.class);
launch.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(launch);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ch.ictrust.pobya.Utillies
package ch.ictrust.pobya.utillies

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
Expand Down
Loading

0 comments on commit 2bbb379

Please sign in to comment.