MiuiCamera Port for Beryllium
Self sufficient repository to decompile to smali, recompile, sign, decompile to java, push to device app port.
miui_POCOF1Global_9.4.26_146a17240f_9.0 was used as src.
Recommended to open this Repository in VSCode
This repository requires git-lfs
Get it from https://git-lfs.github.com/
Follow Step 1 of Getting Started. i.e. run once git lfs install
Then clone this repository. If you have already cloned, run clone once again.
Also requires Java 1.7 or 1.8, and 7-zip.
Instructions for Development:
Instructions for Testing:
zip
from https://camera.aeonax.com/zip
with Magisk, or Unity zip
with recoverySpecial Thanks to Abhishek Aggarwal (https://github.com/TheScarastic) for bringing this up to Beta version Mustang_ssc (https://github.com/Mustang-ssc) for his help in adding support for other devices Amogha Maiya (https://github.com/amog787) for sponsoring, and all-round help Sandeep (https://github.com/CodeElixir) for help with the libs Psygarden (https://forum.xda-developers.com/member.php?u=7645131) for his general help.
Steps to Port MiuiCamera from scratch:
java -jar ..\ANXMiuiPortTools\apktool.jar if -p ..\ANXMiuiPortTools\MiuiFrameworks .\orig\MiuiFrameworks\framework-res.apk
java -jar ..\ANXMiuiPortTools\apktool.jar if -p ..\ANXMiuiPortTools\MiuiFrameworks .\orig\MiuiFrameworks\miui.apk
java -jar ..\ANXMiuiPortTools\apktool.jar if -p ..\ANXMiuiPortTools\MiuiFrameworks .\orig\MiuiFrameworks\framework-ext-res.apk
java -jar ..\ANXMiuiPortTools\apktool.jar if -p ..\ANXMiuiPortTools\MiuiFrameworks .\orig\MiuiFrameworks\miuisystem.apk
java -jar ..\ANXMiuiPortTools\apktool.jar d -p ..\ANXMiuiPortTools\MiuiFrameworks -f -b -o .\src\ANXCamera .\orig\MiuiCamera.apk
src\ANXCamera\AndroidManifest.xml
and format the documentrecompile.bat
just to check whether we are able to recompile without any modificationsign.bat
to sign and zipalignjadx.bat
to create java code from compiled apk. This fails, don't worry, it does whatever it can$ /<path to vdexExtractor>/tools/deodex/run.sh -i /<path to system>/framework -o /<path to deodex destination>/framework
<path to deodex destination>
src\ANXCamera\AndroidManifest.xml
uses-library
XML Nodes. We need to decompile thesemiui-stat.jar
as we will disable miui-stats from sending data to miui.<path to deodex destination>
folder. And run the following:
java -jar baksmali-2.2.7.jar d -o android-support-v7-recyclerview .\framework\vdexExtractor_deodexed\android-support-v7-recyclerview\android-support-v7-recyclerview_classes.dex.dex
java -jar baksmali-2.2.7.jar d -o android-support-v13 .\framework\vdexExtractor_deodexed\android-support-v13\android-support-v13_classes.dex.dex
java -jar baksmali-2.2.7.jar d -o boot-framework .\framework\vdexExtractor_deodexed\boot-framework\boot-framework_classes.dex
java -jar baksmali-2.2.7.jar d -o boot-framework2 .\framework\vdexExtractor_deodexed\boot-framework\boot-framework_classes2.dex
java -jar baksmali-2.2.7.jar d -o boot-framework3 .\framework\vdexExtractor_deodexed\boot-framework\boot-framework_classes3.dex
java -jar baksmali-2.2.7.jar d -o boot-miui .\framework\vdexExtractor_deodexed\boot-miui\boot-miui_classes.dex
java -jar baksmali-2.2.7.jar d -o boot-miuisystem .\framework\vdexExtractor_deodexed\boot-miuisystem\boot-miuisystem_classes.dex
java -jar baksmali-2.2.7.jar d -o gson .\framework\vdexExtractor_deodexed\gson\gson_classes.dex.dex
java -jar baksmali-2.2.7.jar d -o volley .\framework\vdexExtractor_deodexed\volley\volley_classes.dex.dex
java -jar baksmali-2.2.7.jar d -o zxing .\framework\vdexExtractor_deodexed\zxing\zxing_classes.dex.dex
src\ANXCamera\smali_classes2
<path to deodex destination>\android-support-v7-recyclerview
<path to deodex destination>\android-support-v13
<path to deodex destination>\gson
<path to deodex destination>\volley
<path to deodex destination>\zxing
src\ANXCamera\smali_classes2
. It should finally contain two folders
android
and com