Repository: Xposed-Modules-Repo/balti.xposed.pixelifygooglephotos Branch: main Commit: 5c47617d69fa Files: 47 Total size: 117.2 KB Directory structure: gitextract_63__q8nw/ ├── .gitignore ├── .idea/ │ ├── .gitignore │ ├── .name │ ├── compiler.xml │ └── misc.xml ├── LICENSE ├── README.md ├── app/ │ ├── .gitignore │ ├── build.gradle │ ├── proguard-rules.pro │ └── src/ │ └── main/ │ ├── AndroidManifest.xml │ ├── assets/ │ │ └── xposed_init │ ├── java/ │ │ └── balti/ │ │ └── xposed/ │ │ └── pixelifygooglephotos/ │ │ ├── ActivityMain.kt │ │ ├── AdvancedOptionsActivity.kt │ │ ├── Constants.kt │ │ ├── DeviceProps.kt │ │ ├── DeviceSpoofer.kt │ │ ├── FeatureCustomize.kt │ │ ├── FeatureSpoofer.kt │ │ └── Utils.kt │ └── res/ │ ├── drawable/ │ │ ├── ic_export.xml │ │ ├── ic_import.xml │ │ ├── ic_info.xml │ │ ├── ic_launcher_background.xml │ │ └── ic_open.xml │ ├── drawable-v24/ │ │ └── ic_launcher_foreground.xml │ ├── layout/ │ │ ├── activity_main.xml │ │ ├── advanced_options_activity.xml │ │ └── feature_customize.xml │ ├── menu/ │ │ └── menu_activity_main.xml │ ├── mipmap-anydpi-v26/ │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ ├── values/ │ │ ├── colors.xml │ │ ├── module_scope.xml │ │ ├── strings.xml │ │ └── themes.xml │ ├── values-night/ │ │ └── themes.xml │ ├── values-zh-rTW/ │ │ └── strings.xml │ └── xml/ │ └── provider_paths.xml ├── build.gradle ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradle.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── update_info.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ *.iml .gradle /local.properties /.idea/caches /.idea/libraries /.idea/modules.xml /.idea/workspace.xml /.idea/navEditor.xml /.idea/assetWizardSettings.xml .DS_Store /build /captures .externalNativeBuild .cxx local.properties ### Android template # Built application files *.apk *.aar *.ap_ *.aab # Files for the ART/Dalvik VM *.dex # Java class files *.class # Generated files bin/ gen/ out/ # Uncomment the following line in case you need and you don't have the release build type files in your app # release/ # Gradle files .gradle/ build/ # Local configuration file (sdk path, etc) local.properties # Proguard folder generated by Eclipse proguard/ # Log Files *.log # Android Studio Navigation editor temp files .navigation/ # Android Studio captures folder captures/ # IntelliJ *.iml .idea/workspace.xml .idea/tasks.xml .idea/gradle.xml .idea/assetWizardSettings.xml .idea/dictionaries .idea/libraries # Android Studio 3 in .gitignore file. .idea/caches .idea/modules.xml # Comment next line if keeping position of elements in Navigation Editor is relevant for you .idea/navEditor.xml # Keystore files # Uncomment the following lines if you do not want to check your keystore files in. #*.jks #*.keystore # External native build folder generated in Android Studio 2.2 and later .externalNativeBuild .cxx/ # Google Services (e.g. APIs or Firebase) # google-services.json # Freeline freeline.py freeline/ freeline_project_description.json # fastlane fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output fastlane/readme.md # Version control vcs.xml # lint lint/intermediates/ lint/generated/ lint/outputs/ lint/tmp/ # lint/reports/ # Android Profiling *.hprof ================================================ FILE: .idea/.gitignore ================================================ # Default ignored files /shelf/ /workspace.xml ================================================ FILE: .idea/.name ================================================ Pixelify Google Photos ================================================ FILE: .idea/compiler.xml ================================================ ================================================ FILE: .idea/misc.xml ================================================ ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2021 BaltiApps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # Pixelify-Google-Photos LSPosed / EdXposed module to add Google Pixel features on Google Photos for any device. Tested on EdXposed by [Jim Wu](https://github.com/MlgmXyysd) [LSPosed module repo](https://github.com/Xposed-Modules-Repo/balti.xposed.pixelifygooglephotos.git) [Development repo](https://github.com/BaltiApps/Pixelify-Google-Photos.git) [Telegram group link](https://t.me/pixelifyGooglePhotos) ### Steps to use: 1. Install Magisk, [LSPosed](https://github.com/LSPosed/LSPosed) Or [EdXposed](https://github.com/ElderDrivers/EdXposed). 2. Install the apk of this app (available from [Releases](https://github.com/BaltiApps/Pixelify-Google-Photos/releases) page.) 3. Open LSPosed / EdXposed app and enable the module. For LSPosed, Google Photos will be automatically selected. 4. Reboot. Enjoy. (If needed, you might need to clear data of Google Photos app). ### How does this module work? It simply hooks on to `hasSystemFeature()` method under `android.app.ApplicationPackageManager` class. Then when Google Photos checks the relevant features which are expected only on Pixel devices, the module passes `true`. Thus Google Photos enables Pixel-Exclusive features. The features being "spoofed" can be found from: [Dot OS sources](https://github.com/DotOS/android_vendor_dot/blob/55f1c26bb6dbb1175d96cf538ae113618caf7d06/prebuilt/common/etc/pixel_2016_exclusive.xml) [PixelFeatureDrops magisk module](https://github.com/ayush5harma/PixelFeatureDrops/tree/master/system/etc/sysconfig) This module can also spoof some of the `build.prop` information like `BRAND`, `MANUFACTURER`, `MODEL`, `FINGERPRINT` of some Pixel devices. ### Disclaimer!! The user takes sole responsibility for any damage that might arise due to use of this module. This includes physical damage (to device), injury, data loss, and also legal matters. This project was made as a learning initiative and the developer cannot be held liable in any way for the use of it. ================================================ FILE: app/.gitignore ================================================ /build ================================================ FILE: app/build.gradle ================================================ plugins { id 'com.android.application' id 'kotlin-android' } android { compileSdk 31 defaultConfig { applicationId "balti.xposed.pixelifygooglephotos" minSdk 21 targetSdk 31 versionCode 5 versionName "4.1" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'com.google.android.material:material:1.5.0' // Xposed API compileOnly 'de.robv.android.xposed:api:82' compileOnly 'de.robv.android.xposed:api:82:sources' } ================================================ FILE: app/proguard-rules.pro ================================================ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the # proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} # Uncomment this to preserve the line number information for # debugging stack traces. #-keepattributes SourceFile,LineNumberTable # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile ================================================ FILE: app/src/main/AndroidManifest.xml ================================================ ================================================ FILE: app/src/main/assets/xposed_init ================================================ balti.xposed.pixelifygooglephotos.FeatureSpoofer balti.xposed.pixelifygooglephotos.DeviceSpoofer ================================================ FILE: app/src/main/java/balti/xposed/pixelifygooglephotos/ActivityMain.kt ================================================ package balti.xposed.pixelifygooglephotos import android.app.Activity import android.content.Intent import android.graphics.Paint import android.net.Uri import android.os.AsyncTask import android.os.Build import android.os.Bundle import android.view.Menu import android.view.MenuItem import android.view.View import android.widget.* import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.SwitchCompat import androidx.core.content.FileProvider import balti.xposed.pixelifygooglephotos.Constants.CONF_EXPORT_NAME import balti.xposed.pixelifygooglephotos.Constants.FIELD_LATEST_VERSION_CODE import balti.xposed.pixelifygooglephotos.Constants.PREF_DEVICE_TO_SPOOF import balti.xposed.pixelifygooglephotos.Constants.PREF_ENABLE_VERBOSE_LOGS import balti.xposed.pixelifygooglephotos.Constants.PREF_LAST_VERSION import balti.xposed.pixelifygooglephotos.Constants.PREF_OVERRIDE_ROM_FEATURE_LEVELS import balti.xposed.pixelifygooglephotos.Constants.PREF_SPOOF_ANDROID_VERSION_FOLLOW_DEVICE import balti.xposed.pixelifygooglephotos.Constants.PREF_SPOOF_ANDROID_VERSION_MANUAL import balti.xposed.pixelifygooglephotos.Constants.PREF_SPOOF_FEATURES_LIST import balti.xposed.pixelifygooglephotos.Constants.PREF_STRICTLY_CHECK_GOOGLE_PHOTOS import balti.xposed.pixelifygooglephotos.Constants.RELEASES_URL import balti.xposed.pixelifygooglephotos.Constants.RELEASES_URL2 import balti.xposed.pixelifygooglephotos.Constants.SHARED_PREF_FILE_NAME import balti.xposed.pixelifygooglephotos.Constants.TELEGRAM_GROUP import balti.xposed.pixelifygooglephotos.Constants.UPDATE_INFO_URL import balti.xposed.pixelifygooglephotos.Constants.UPDATE_INFO_URL2 import com.google.android.material.snackbar.Snackbar import org.json.JSONObject import java.io.ByteArrayOutputStream import java.io.File import java.net.URL class ActivityMain: AppCompatActivity(R.layout.activity_main) { /** * Normally [MODE_WORLD_READABLE] causes a crash. * But if "xposedsharedprefs" flag is present in AndroidManifest, * then the file is accordingly taken care by lsposed framework. * * If an exception is thrown, means module is not enabled, * hence Android throws a security exception. */ private val pref by lazy { try { getSharedPreferences(SHARED_PREF_FILE_NAME, MODE_WORLD_READABLE) } catch (_: Exception){ null } } private fun showRebootSnack(){ if (pref == null) return // don't display snackbar if module not active. val rootView = findViewById(R.id.root_view_for_snackbar) Snackbar.make(rootView, R.string.please_force_stop_google_photos, Snackbar.LENGTH_SHORT).show() } /** * Animate the "Feature flags changed" textview and hide it after showing for sometime. */ private fun peekFeatureFlagsChanged(textView: TextView){ textView.run { alpha = 1.0f animate().alpha(0.0f).apply { duration = 1000 startDelay = 3000 }.start() } } private val utils by lazy { Utils() } /** * Activity launcher for [FeatureCustomize] activity. * If user presses "Save" on [FeatureCustomize] activity, then result code is RESULT_OK. * Then show prompt to force stop Google Photos. */ private val childActivityLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { if (it.resultCode == Activity.RESULT_OK) { showRebootSnack() } } /** * Close and reopen the activity. * For some reason, invalidate or recreate() does not refresh the switches. */ private fun restartActivity(){ finish() startActivity(intent) } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) /** * Check if [pref] is not null. If it is, then module is not enabled. */ if (pref == null){ AlertDialog.Builder(this) .setMessage(R.string.module_not_enabled) .setPositiveButton(R.string.close) {_, _ -> finish() } .setCancelable(false) .show() } /** * Link to xml views. */ val resetSettings = findViewById