Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36858799 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Update

- Add support for ProviderInstaller (fake)
- Add support for Auth (insecure)
- Update to latest version of osmdroid
parent 00138473
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	package="com.google.android.gms"
	android:versionCode="4452036">
	android:versionCode="5089036">

	<uses-sdk android:minSdkVersion="16" />

@@ -27,6 +27,8 @@
	<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
	<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
	<uses-permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE" />
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />

	<application
		android:label="@string/gms_app_name">
@@ -116,5 +118,16 @@
				<action android:name="com.google.android.location.internal.GoogleLocationManagerService.START" />
			</intent-filter>
		</service>

        <activity android:name="org.microg.tools.AccountPickerActivity" android:exported="true"
            android:excludeFromRecents="true" android:theme="@android:style/Theme.Holo.Dialog">
            <intent-filter>
                <action android:name="com.google.android.gms.common.account.CHOOSE_ACCOUNT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <service android:name=".auth.GetToken" android:exported="true" />
        <activity android:name=".auth.TokenActivity" android:exported="true" />
	</application>
</manifest>
+5 −0
Original line number Diff line number Diff line
@@ -3,3 +3,8 @@

# Keep dynamically loaded GMS classes
-keep public class com.google.android.gms.maps.internal.CreatorImpl
-keep public class com.google.android.gms.common.security.ProviderInstallerImpl

-keepclassmembers class com.google.android.gms.common.security.ProviderInstallerImpl {
	public *;
}
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
package com.google.android.auth;

interface IAuthManagerService {
	Bundle getToken(String accountName, String scope, in Bundle extras);
	Bundle clearToken(String token, in Bundle extras);
}
+31 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014 μg Project Team
 *
 * 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.google.android.gms.auth;

import android.app.Service;
import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
import android.util.Log;
import org.microg.gms.auth.AuthManagerServiceImpl;

public class GetToken extends Service {
    @Override
    public IBinder onBind(Intent intent) {
        return new AuthManagerServiceImpl(this);
    }
}
+56 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014 μg Project Team
 *
 * 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.google.android.gms.auth;

import android.accounts.*;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;

import java.io.IOException;

public class TokenActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Bundle extras = getIntent().getExtras();
        extras.get("KEY");
        Log.d("TokenActivity", extras.toString());
        AccountManager accountManager = AccountManager.get(this);
        accountManager.getAuthToken(new Account(extras.getString("authAccount"), "com.google"), extras.getString("service"), extras.getBundle("callerExtras"), this, new AccountManagerCallback<Bundle>() {
            @Override
            public void run(AccountManagerFuture<Bundle> future) {
                try {
                    Bundle result = future.getResult();
                    if (result != null) {
                        result.get("KEY");
                        Log.d("TokenActivity", result.toString());
                    } else {
                        Log.d("TokenActivity", "null-result");
                    }
                } catch (OperationCanceledException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (AuthenticatorException e) {
                    e.printStackTrace();
                }
            }
        }, new Handler(getMainLooper()));
    }
}
Loading