pi-apps icon indicating copy to clipboard operation
pi-apps copied to clipboard

Add App: XiaoMi Tool

Open JeromTWinL opened this issue 4 years ago • 28 comments

JeromTWinL avatar Dec 28 '21 13:12 JeromTWinL

I don't know about the functions were added

JeromTWinL avatar Dec 28 '21 14:12 JeromTWinL

The app should be named XiaoMi Tool. It is not only to unlock XiaoMi's phone.

cycool29 avatar Dec 28 '21 14:12 cycool29

Done commiting changes

JeromTWinL avatar Dec 28 '21 14:12 JeromTWinL

Is that everything?

JeromTWinL avatar Dec 28 '21 15:12 JeromTWinL

Done.

JeromTWinL avatar Dec 29 '21 06:12 JeromTWinL

Fixed: Total 27 commits.

JeromTWinL avatar Dec 29 '21 06:12 JeromTWinL

@cycool29 Done with your commit.

JeromTWinL avatar Dec 29 '21 06:12 JeromTWinL

Why there is no response from you @Botspot @theofficialgman @cycool29 @Itai-Nelken ?

JeromTWinL avatar Dec 30 '21 10:12 JeromTWinL

Yes!, to run as root

JeromTWinL avatar Dec 30 '21 14:12 JeromTWinL

Yes!, to run as root

why not just use sudo?

Crilum avatar Dec 30 '21 14:12 Crilum

I tried, but not worked in desktop file, so i have to make it to install package gksu

JeromTWinL avatar Dec 30 '21 14:12 JeromTWinL

sudo didn't work???? That seems really odd...

Crilum avatar Dec 30 '21 14:12 Crilum

why not just use sudo?

We need to consider non-passwordless sudo users. That's why I ask if root access is really needed.

cycool29 avatar Dec 30 '21 14:12 cycool29

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.

Crilum avatar Dec 30 '21 14:12 Crilum

I don't know what is that.

JeromTWinL avatar Dec 30 '21 14:12 JeromTWinL

The app needs more testing... The binaries in ./res/tools are for x64, we need to change them all to armhf or arm64 ones.

cycool29 avatar Dec 30 '21 14:12 cycool29

Ok.

JeromTWinL avatar Dec 30 '21 14:12 JeromTWinL

@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?

JeromTWinL avatar Dec 30 '21 15:12 JeromTWinL

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

Crilum avatar Dec 30 '21 15:12 Crilum

there's no command run

JeromTWinL avatar Dec 30 '21 15:12 JeromTWinL

Or

run() {
bash -c $@
}

JeromTWinL avatar Dec 30 '21 15:12 JeromTWinL

There's no command run only exec I ran command run without any args. It didn't work yet.

JeromTWinL avatar Dec 30 '21 15:12 JeromTWinL

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

Crilum avatar Dec 30 '21 15:12 Crilum

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

Crilum avatar Dec 30 '21 15:12 Crilum

Done.

JeromTWinL avatar Dec 30 '21 15:12 JeromTWinL

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

With copied: it might not copied or something problem.

Without copying: there is x64 binaries, cannot able to run on armhf or arm64

JeromTWinL avatar Dec 30 '21 15:12 JeromTWinL

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

With 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..

Crilum avatar Dec 30 '21 16:12 Crilum

Fixed to copy the adb, fastboot to overwrite x64 libraries

JeromTWinL avatar Dec 30 '21 16:12 JeromTWinL