Add App: XiaoMi Tool
I don't know about the functions were added
The app should be named XiaoMi Tool. It is not only to unlock XiaoMi's phone.
Done commiting changes
Is that everything?
Done.
Fixed: Total 27 commits.
@cycool29 Done with your commit.
Why there is no response from you @Botspot @theofficialgman @cycool29 @Itai-Nelken ?
Yes!, to run as root
Yes!, to run as root
why not just use sudo?
I tried, but not worked in desktop file, so i have to make it to install package gksu
sudo didn't work???? That seems really odd...
why not just use
sudo?
We need to consider non-passwordless sudo users. That's why I ask if root access is really needed.
The build hasn't failed, but I get this error..
┏━━━┓
┏━━┻━━━┻━━┓
┃ ⬛⬛⬛ ┃ ▕ᑐ • ▁ ʌ
┃ ⬛⬛⬛ ┃ ▕ │ ╱‾╲▕ᑐ ▕ᑐ S
┃ ⬛⬛⬛ ┃ ▕ ▕
╰━━━━━━━━━╯
Installing XiaoMiTool...
Will install these packages: openjfx adb android-tools-fastboot openjdk-11-jdk
Running sudo apt update...
Hit:1 https://itai-nelken.github.io/weekly-box86-debs/debian InRelease
Hit:2 http://archive.raspberrypi.org/debian bullseye InRelease
Ign:4 https://download.puffinbrowser.com/repo stable InRelease
Hit:6 https://download.puffinbrowser.com/repo stable Release
Ign:7 https://repo.vivaldi.com/archive/deb stable InRelease
Ign:8 https://repo.vivaldi.com/stable/deb stable InRelease
Hit:9 https://repo.vivaldi.com/archive/deb stable Release
Hit:10 https://repo.vivaldi.com/stable/deb stable Release
28 packages can be upgraded. Run 'apt list --upgradable' to see them.
apt update complete.
Some packages can be upgraded. Please consider running sudo apt full-upgrade.
Creating an empty apt-package to install the necessary apt packages...
It will be named: pi-apps-208a0e3d
Depends: adb, android-tools-fastboot, openjdk-11-jdk, openjfx
Installing the pi-apps-208a0e3d package...
The following additional packages will be installed:
adb android-libadb android-libbase android-libboringssl
android-libcrypto-utils android-libcutils android-libext4-utils
android-liblog android-libsparse android-libunwind android-libziparchive
android-sdk-platform-tools-common fastboot p7zip p7zip-full
Suggested packages:
android-sdk-platform-tools p7zip-rar
The following NEW packages will be installed:
adb android-libadb android-libbase android-libboringssl
android-libcrypto-utils android-libcutils android-libext4-utils
android-liblog android-libsparse android-libunwind android-libziparchive
android-sdk-platform-tools-common fastboot p7zip p7zip-full pi-apps-208a0e3d
0 upgraded, 16 newly installed, 0 to remove and 28 not upgraded.
(Reading database ... 300112 files and directories currently installed.)
Apt finished.
Package installation complete.
Downloading XiaoMiToolV2 repository... Done
Building XiaoMi Tool...
Downloading https://services.gradle.org/distributions/gradle-6.5-bin.zip
.........10%..........20%..........30%..........40%.........50%..........60%..........70%..........80%.........90%..........100%
Welcome to Gradle 6.5!
Here are the highlights of this release:
- Experimental file-system watching
- Improved version ordering
- New samples
For more details see https://docs.gradle.org/6.5/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
\/\/\/
> Configure project :
Project : => no module-info.java found
^^^
> Task :compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
I don't know what is that.
The app needs more testing... The binaries in ./res/tools are for x64, we need to change them all to armhf or arm64 ones.
Ok.
@cycool29 This might work:
# From 'echo "Building XiaoMiToolV2..."'
sudo cp -r $(which adb) ./res/tools/adb || error "Failed to copy adb!"
sudo cp -r $(which fastboot) ./res/tools/fastboot || error "Failed to copy fastboot!"
# continue
But, idk what about libc++.so.
Having any idea?
RPiOS repositories don't have gksu..
I get this error when trying to run with sudo or without, and it might be something to do with those x64 libs:
bash: run: command not found
there's no command run
Or
run() {
bash -c $@
}
There's no command run only exec
I ran command run without any args. It didn't work yet.
I think run is a function inside the gradle script, I got it to run like this:
JAVA_HOME=$JAVA_HOME /home/pi/XiaoMiToolV2/gradlew run
With copied adb and fastboot libraries:
[08:24:46][PSTA ][19cfa02] Start process (60): "./res/tools/adb" "devices"
[08:24:46][PSTA ][19cfa02] Start process (61): "./res/tools/fastboot" "devices"
[08:24:46][ERROR ][19cfa02] Cannot execute fastboot command "fastboot devices", reason: Cannot run program "./res/tools/fastboot": error=2, No such file or directory
Without:
[08:22:03][PROC ][13242bc] Process (51) output: ./res/tools/fastboot: 23: ���
[08:22:03][PROC ][13242bc] Process (51) output: �: not found
[08:22:03][PROC ][13242bc] Process (51) output: ./res/tools/fastboot: 1: Syntax error: Unterminated quoted string
Done.
With copied adb and fastboot libraries:
[08:24:46][PSTA ][19cfa02] Start process (60): "./res/tools/adb" "devices" [08:24:46][PSTA ][19cfa02] Start process (61): "./res/tools/fastboot" "devices" [08:24:46][ERROR ][19cfa02] Cannot execute fastboot command "fastboot devices", reason: Cannot run program "./res/tools/fastboot": error=2, No such file or directoryWithout:
[08:22:03][PROC ][13242bc] Process (51) output: ./res/tools/fastboot: 23: ��� [08:22:03][PROC ][13242bc] Process (51) output: �: not found [08:22:03][PROC ][13242bc] Process (51) output: ./res/tools/fastboot: 1: Syntax error: Unterminated quoted string
With copied: it might not copied or something problem.
Without copying: there is x64 binaries, cannot able to run on armhf or arm64
With copied adb and fastboot libraries:
[08:24:46][PSTA ][19cfa02] Start process (60): "./res/tools/adb" "devices" [08:24:46][PSTA ][19cfa02] Start process (61): "./res/tools/fastboot" "devices" [08:24:46][ERROR ][19cfa02] Cannot execute fastboot command "fastboot devices", reason: Cannot run program "./res/tools/fastboot": error=2, No such file or directoryWithout:
[08:22:03][PROC ][13242bc] Process (51) output: ./res/tools/fastboot: 23: ��� [08:22:03][PROC ][13242bc] Process (51) output: �: not found [08:22:03][PROC ][13242bc] Process (51) output: ./res/tools/fastboot: 1: Syntax error: Unterminated quoted stringWith copied: it might not copied or something problem.
Without copying: there is x64 binaries, cannot able to run on armhf or arm64
It did copy, as a sym-link.
Yes, the x64 libs don't work on arm.. Just saying what happened..
Fixed to copy the adb, fastboot to overwrite x64 libraries