Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Commit 6a6e9f3

Browse files
committed
Initial commit
0 parents  commit 6a6e9f3

File tree

9 files changed

+118
-0
lines changed

9 files changed

+118
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto eol=lf
2+
*.pk8 binary

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- '*.md'
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Build
13+
runs-on: ubuntu-24.04
14+
steps:
15+
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Set environments
20+
run: |
21+
{
22+
echo "commit=$(echo ${{ github.sha }} | cut -c -7)"
23+
echo "repo=$(echo ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/})"
24+
} >> $GITHUB_ENV
25+
26+
- name: Build
27+
run: |
28+
export PATH=$PATH:$ANDROID_SDK_ROOT/build-tools/35.0.1
29+
./build.sh
30+
31+
- name: Upload
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: ${{ env.repo }}@${{ env.commit }}
35+
path: DhizukuOverlay.apk

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.apk
2+
*.apk.idsig
3+
*.zip

AndroidManifest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.rosan.dhizuku.overlay">
4+
<application android:hasCode="false" />
5+
<overlay android:targetPackage="android" android:priority="0" android:isStatic="true" />
6+
</manifest>

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Dhizuku Overlay
2+
3+
Make [**Dhizuku**](https://github.com/iamr0s/Dhizuku) the default profile owner.
4+
5+
### Info
6+
7+
`minSdk`: `26`
8+
9+
`targetSdk`: `29`
10+
11+
The `targetSdk` is set low for signing reasons.

build.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Remove built artifacts
4+
echo "Removing old files..."
5+
rm -v -f res.zip DhizukuOverlay-unaligned.apk DhizukuOverlay.apk DhizukuOverlay.apk.idsig
6+
echo
7+
8+
# Build APK
9+
echo "Building APK..."
10+
#aapt package -v -M AndroidManifest.xml -S res -I $ANDROID_HOME/platforms/android-35/android.jar --min-sdk-version 26 --target-sdk-version 29 -F DhizukuOverlay-unaligned.apk
11+
aapt2 compile -v --dir res -o res.zip
12+
aapt2 link -v --manifest AndroidManifest.xml -I $ANDROID_HOME/platforms/android-35/android.jar -R res.zip --min-sdk-version 26 --target-sdk-version 29 --version-name "1.0" --version-code 1 --auto-add-overlay -o DhizukuOverlay-unaligned.apk
13+
rm res.zip
14+
echo
15+
16+
# Align APK
17+
echo "Aligning APK..."
18+
zipalign -pvf 4 DhizukuOverlay-unaligned.apk DhizukuOverlay.apk
19+
rm DhizukuOverlay-unaligned.apk
20+
echo
21+
22+
# Sign APK
23+
echo "Signing APK..."
24+
apksigner sign -v --v1-signing-enabled true --v2-signing-enabled false --v3-signing-enabled false --key cert/cert.pk8 --cert cert/cert.pem DhizukuOverlay.apk
25+
apksigner verify -v --print-certs DhizukuOverlay.apk
26+
#rm DhizukuOverlay.apk.idsig
27+
echo
28+
29+
# Show file info
30+
echo "Done!!"
31+
ls -lZ DhizukuOverlay.apk

cert/cert.pem

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIIEADCCAuigAwIBAgIJAN/FvjYzGNOKMA0G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WcClDJwqkNLN4yeVVYzkRMGA8/XqOiYrW4zh0mKDLfr6OeU1C
19+
AKwZBLhhql59Po25r4gcwPiTN2DkoCfb3T59XG8J54PAgTQjIAZ3J+mGZplnmuD3
20+
wj+UGUpPe0qTr33ZPoJfwxVo4RVnOt/UCsIGXch0HS/BIdpechqP0w4rOHUbq6EA
21+
8UEi5irKSDOU9b/5rD/tX2f4nGwJlKQEHWrsj9LLKlaL7fX36ghoSxN/pBJOhedg
22+
/VjT6xbaEwfyhC6Zj9av5Xl7UdpYt+rBMroAGenz0OSxKhIphdcx4ZMhvfkBoYG9
23+
Crupdqe+kUsfg2RlPb5grQ3klMo=
24+
-----END CERTIFICATE-----

cert/cert.pk8

1.19 KB
Binary file not shown.

res/values/strings.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
2+
<!-- The component name for the default profile supervisor, which can be set as a profile owner
3+
even after user setup is complete. The defined component should be used for supervision purposes
4+
only. The component must be part of a system app. -->
5+
<string name="config_defaultSupervisionProfileOwnerComponent" translatable="false">com.rosan.dhizuku/com.rosan.dhizuku.server.DhizukuDAReceiver</string>
6+
</resources>

0 commit comments

Comments
 (0)