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

Add Nexus 5X (bullhead) repository #102

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Built application files
*.apk
*.ap_

# Files for the dex VM
*.dex

Expand Down
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

3 changes: 2 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 0 additions & 91 deletions MultiROMMgr/MultiROMMgr.iml

This file was deleted.

19 changes: 11 additions & 8 deletions MultiROMMgr/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
apply plugin: 'com.android.application'

repositories {
mavenCentral()
google()
}

android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
compileSdkVersion 27
buildToolsVersion '27.0.2'

defaultConfig {
minSdkVersion 16
targetSdkVersion 23
targetSdkVersion 27
}
buildTypes {
debug {
applicationIdSuffix 'debug'
applicationIdSuffix '.debug'
versionNameSuffix '-debug'
}
release {
Expand All @@ -32,12 +35,12 @@ android {
}

dependencies {
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'
}

android {
lintOptions {
abortOnError false
checkReleaseBuilds false
}
}
Binary file added MultiROMMgr/release/MultiROMMgr-release.apk
Binary file not shown.
1 change: 1 addition & 0 deletions MultiROMMgr/release/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":188},"path":"MultiROMMgr-release.apk","properties":{"packageId":"com.tassadar.multirommgr","split":"","minSdkVersion":"16"}}]
6 changes: 4 additions & 2 deletions MultiROMMgr/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.tassadar.multirommgr"
android:versionCode="188"
android:versionName="1.188" >
Expand All @@ -15,7 +16,8 @@
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down Expand Up @@ -67,7 +69,7 @@
android:exported="false"/>
<provider android:name=".romlistwidget.RomListDataProvider"
android:authorities="${applicationId}.provider"
android:exported="true"/>
android:exported="false"/>

<activity
android:name=".romlistfragment.RomBootActivity"
Expand Down
25 changes: 24 additions & 1 deletion MultiROMMgr/src/main/assets/devices.json
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@
"devices": [
{
"name": "recovery",
"path": "/data/media/0/multirom/roms/TWRP/boot.img"
"path": "/data/media/0/MultiROM/multirom/roms/TWRP/boot.img"
},
{
"name": "boot",
Expand Down Expand Up @@ -698,6 +698,29 @@
"path": "/dev/block/platform/soc.0/f9824900.sdhci/by-name/cache"
}
]
},
{
"names": [ "bullhead" ],
"manifest_url": "http://tp.jollaman999.com/jolla-kernel_AIO-bullhead/MultiROM_Only/manifest.json",
"check_gpg": false,
"kexec_check_path": "/sys/kernel/kexec_loaded",
"ubuntu_touch": {
"enabled": false
},
"devices": [
{
"name": "recovery",
"path": "/dev/block/platform/soc.0/f9824900.sdhci/by-name/recovery"
},
{
"name": "boot",
"path": "/dev/block/platform/soc.0/f9824900.sdhci/by-name/boot"
},
{
"name": "cache",
"path": "/dev/block/platform/soc.0/f9824900.sdhci/by-name/cache"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.text.SpannableString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class InstallationFile {
public String type;
public String version;
public String url;
public String md5;
public String sha256;
public long size;
public JSONObject extra;

Expand Down Expand Up @@ -161,7 +161,7 @@ private void getFileList(JSONArray files) throws JSONException {
file.type = f.getString("type").toLowerCase();
file.version = f.getString("version");
file.url = f.getString("url");
file.md5 = f.getString("md5");
file.sha256 = f.getString("sha256");
file.size = f.getLong("size");
file.extra = f.optJSONObject("extra");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class MultiROM {

public boolean findMultiROMDir() {
List<String> out = Shell.SU.run(
"folders=\"/data/media/0/multirom/ /data/media/multirom/\";" +
"folders=\"/data/media/0/MultiROM/multirom/ /data/media/MultiROM/multirom/\";" +
"for f in $folders; do" +
" if [ -d \"$f\" ]; then" +
" echo \"$f\";" +
Expand Down Expand Up @@ -399,7 +399,7 @@ public void setRomIcon(Rom rom, String path) {
}
}

public void setRomIcon(Rom rom, BufferedInputStream in) throws IOException {
private void setRomIcon(Rom rom, BufferedInputStream in) throws IOException {
in.mark(Integer.MAX_VALUE);
String hash = Utils.calculateChecksumStream(in, "SHA-256");
if(hash == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package com.tassadar.multirommgr;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ protected void applyResult() {
if(man != null && man.hasCommand("NOTICE")) {
String text = man.getCommandArg("NOTICE");
if(text != null) {
String hash = Utils.calculateChecksum(text.getBytes(), "MD5");
String hash = Utils.calculateChecksum(text.getBytes(), "SHA-256");
SharedPreferences p = MgrApp.getPreferences();
final Set<String> shownHashes = p.getStringSet("shownNotices", null);
if(shownHashes == null || !shownHashes.contains(hash)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class UpdateChecker {
private static final int REQ_UPDATE_CHECK = 1;
private static final int UPDATE_NOTIFICATION_ID = 1;

public static void setVersions(Device d, MultiROM m, Recovery r) {
static void setVersions(Device d, MultiROM m, Recovery r) {
SharedPreferences.Editor p = MgrApp.getPreferences().edit();
if(m != null && r != null) {
p.putBoolean("has_versions", true);
Expand All @@ -44,7 +44,7 @@ public static void setVersions(Device d, MultiROM m, Recovery r) {
} else {
p.putBoolean("has_versions", false);
}
p.commit();
p.apply();

updateAlarmStatus();
}
Expand All @@ -63,7 +63,7 @@ public static void lazyUpdateVersions(Device d, String m_ver, String r_ver) {
if(r_ver != null)
e.putString("last_recovery_ver", r_ver);

e.commit();
e.apply();
}

public static boolean isEnabled() {
Expand All @@ -76,7 +76,7 @@ private static PendingIntent getIntent(Context ctx, int flags) {
return PendingIntent.getBroadcast(ctx, REQ_UPDATE_CHECK, i, flags);
}

public static void updateAlarmStatus() {
static void updateAlarmStatus() {
Context ctx = MgrApp.getAppContext();
SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(ctx);
PendingIntent i = getIntent(ctx, PendingIntent.FLAG_NO_CREATE);
Expand Down
12 changes: 0 additions & 12 deletions MultiROMMgr/src/main/java/com/tassadar/multirommgr/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,6 @@ public static String getFilenameFromUrl(String url) {
return url.substring(idx+1);
}

public static String calculateMD5(String file) {
return calculateMD5(new File(file));
}

public static String calculateMD5(File file) {
return calculateChecksum(file, "MD5");
}

public static String calculateSHA256(String file) {
return calculateSHA256(new File(file));
}

public static String calculateSHA256(File file) {
return calculateChecksum(file, "SHA-256");
}
Expand Down
Loading