Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce pocket judge/lock #7

Open
wants to merge 51 commits into
base: eleven
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
01d8705
pocket: introduce pocket judge/lock
kaluoshi Oct 23, 2016
10ee40d
Pocket lock: Improve on fod devices
jhenrique09 Sep 12, 2020
e0e6d21
PocketJudge: allow register vendor pocket sensor
DennySPB May 28, 2020
e2136a6
PocketLock: Add config_pocketModeSupported overlay
jhenrique09 May 3, 2019
0284693
PocketLock: Make using light sensor optional
Laker87 Feb 5, 2021
a8401da
PocketJudge: Allow to register vendor proximity sensor
Hikari-no-Tenshi Jul 10, 2021
a96e828
Revert "Pocket lock: Improve on fod devices"
darknius09 Sep 30, 2022
76ec3e3
base: Remove PixelPropsUtils
palaych Sep 1, 2022
e26f2a3
base: Spoof build fingerprint for Google Play Services [1/2]
kdrag0n Oct 12, 2021
9479f0d
base: Alter model name to avoid SafetyNet HW attestation enforcement
kdrag0n Oct 12, 2021
0987076
base: Limit SafetyNet workarounds to unstable GMS process
kdrag0n Nov 2, 2021
5537264
core: pm: Wipe package cache on upgrade
krasCGQ Aug 27, 2022
25d6e8d
Fix duplicate permission privilege escalation
Apr 28, 2022
7499947
Parcel: recycle recycles
smore-lore Mar 30, 2022
bc142d8
Remove package name from SafetyNet logs
Jun 30, 2022
a79deb9
base: AttestationHooks: Spoof device as Pixel XL for Google Photos
adithya2306 Sep 8, 2022
869be13
Network Traffic [1/2]
Haus1 Jan 4, 2017
0c51001
Statusbar net monitor: stop the handler if screen is off
ezio84 Apr 9, 2018
a07bf6d
Move net monitor to expanded statusbar header
ezio84 Dec 9, 2018
73ed204
Net monitor: fix text color on light theme
ezio84 Dec 12, 2018
ffda1d6
Network traffic: fix indicator not hiding on lost connection
SpiritCroc Dec 24, 2018
e0440bc
Make sure that Network Traffic is disabled by default
nychitman1 Dec 19, 2019
1c21612
Network Traffic: Bring back traffic indicator for all
Jan 13, 2019
f8cc58f
Network Traffic: Move network indicator to the right
Miccia94 Dec 18, 2018
10c0d85
Network Traffic: OOS style network traffic indicator
ganeshi4u Mar 12, 2019
e421276
Network Traffic: Refactor text formatting
ganeshi4u Feb 6, 2020
c8ac0cf
Network Traffic: Adjust size/text style for extended statusbar
Feb 6, 2020
feb67f1
Traffic indicators: code cleanup and improvements
ezio84 Feb 9, 2020
32b4cae
Traffic indicators: use smaller and bold fonts in expanded statusbar
ezio84 Feb 9, 2020
535291b
Traffic indicators: add properly to statusbar icons
SpiritCroc Feb 11, 2020
6d629f9
Traffic indicators: hide in the keyguard
Feb 12, 2020
f243241
Traffic indicators: don't show two instances in expanded statusbar
ezio84 Feb 12, 2020
87b16a4
Traffic indicators: Prevent logspam caused by improperly calling requ…
ezio84 Feb 14, 2020
4ac7aa1
NetworkTraffic: Fix speed format for 10*KB
neobuddy89 Jun 14, 2020
ad323e3
Traffic indicators: Switch quick statusbar header to LinearLayout
ganeshi4u Oct 24, 2020
c52b0bf
SystemUI: NetworkTraffic: Add notch check and allow devices to override
adithya2306 Feb 13, 2021
f7f0f86
SystemUI: NetworkTraffic: Minor refinements
adithya2306 Feb 13, 2021
50b778b
SystemUI: Reduce statusbar network speed margins
adithya2306 Feb 24, 2021
12c4dbd
SystemUI: NetworkTrafficSB: Reduce font size a bit
adithya2306 Apr 10, 2021
1388e80
base: add MAC address firewall [1/2]
cjybyjk Jan 22, 2021
53e4d66
base: Add support for application downgrade
libxzr Mar 17, 2022
147cffa
base: Add support for window ignore secure
libxzr Mar 18, 2022
9b0c793
ResolveActivity scroll not Smooth
binhongwang Aug 2, 2022
685b9d8
SystemUI: Fix QS expand lag when VoLTE/VoWiFi icons are enabled
timjosten Jul 28, 2022
914450f
InputMethodUtils: Fix system bootloop when no IME found
neobuddy89 Dec 31, 2021
0827e7c
[1/2] Statusbar Clock background chip
StarkDroid Apr 9, 2023
390f116
ThemeOverlayManager: Apply wifi and signal icon styles last
neobuddy89 Jan 18, 2022
464804b
base: import ThemeUtils
darknius09 May 27, 2023
fcd92e7
base: Custom Statusbar Signal & Wi-Fi icons
darknius09 May 28, 2023
9ca83ee
Revert "ThemeOverlayManager: Apply wifi and signal icon styles last"
darknius09 May 28, 2023
fcf8867
Network Traffic: Fix up padding
darknius09 May 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
base: Spoof build fingerprint for Google Play Services [1/2]
SafetyNet's CTS profile attestation checks whether Build.FINGERPRINT
matches that of the device's stock OS, which has passed CTS testing.
Spoof the fingerprint for Google Play Services to help pass SafetyNet.

NB: This code is under the gmscompat package, but it does not depend on
any code from gmscompat.

arrow edits:
 - Correct prop name for our logic. We are planning to use fp for different devices (like old oreo or follow new Pixel's).

Signed-off-by: palaych <palaych@arrowos.net>
Change-Id: I26a2498eb2e2163933303b03f6d516e5fb30fe51
  • Loading branch information
kdrag0n authored and darknius09 committed Oct 25, 2022
commit e26f2a313b23a442b2d1c2bc8493717eaf584667
3 changes: 3 additions & 0 deletions core/java/android/app/Instrumentation.java
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@
import android.view.WindowManagerGlobal;

import com.android.internal.content.ReferrerIntent;
import com.android.internal.gmscompat.AttestationHooks;

import java.io.File;
import java.lang.annotation.Retention;
@@ -1157,6 +1158,7 @@ public Application newApplication(ClassLoader cl, String className, Context cont
Application app = getFactory(context.getPackageName())
.instantiateApplication(cl, className);
app.attach(context);
AttestationHooks.initApplicationBeforeOnCreate(app);
return app;
}

@@ -1174,6 +1176,7 @@ static public Application newApplication(Class<?> clazz, Context context)
ClassNotFoundException {
Application app = (Application)clazz.newInstance();
app.attach(context);
AttestationHooks.initApplicationBeforeOnCreate(app);
return app;
}

65 changes: 65 additions & 0 deletions core/java/com/android/internal/gmscompat/AttestationHooks.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.android.internal.gmscompat;

import android.app.Application;
import android.os.Build;
import android.os.SystemProperties;
import android.util.Log;

import java.lang.reflect.Field;

/** @hide */
public final class AttestationHooks {
private static final String TAG = "GmsCompat/Attestation";

private static final String PACKAGE_GMS = "com.google.android.gms";

private static final String PRODUCT_GMS_SPOOFING_FINGERPRINT =
SystemProperties.get("ro.build.gms_fingerprint");

private AttestationHooks() { }

private static void setBuildField(String key, String value) {
try {
// Unlock
Field field = Build.class.getDeclaredField(key);
field.setAccessible(true);

// Edit
field.set(null, value);

// Lock
field.setAccessible(false);
} catch (NoSuchFieldException | IllegalAccessException e) {
Log.e(TAG, "Failed to spoof Build." + key, e);
}
}

private static void spoofBuildGms() {
// Set fingerprint for SafetyNet CTS profile
if (PRODUCT_GMS_SPOOFING_FINGERPRINT.length() > 0) {
setBuildField("FINGERPRINT", PRODUCT_GMS_SPOOFING_FINGERPRINT);
}
}

public static void initApplicationBeforeOnCreate(Application app) {
if (PACKAGE_GMS.equals(app.getPackageName())) {
spoofBuildGms();
}
}
}