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 App: XiaoMi Tool #1314

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open

Add App: XiaoMi Tool #1314

wants to merge 35 commits into from

Conversation

JeromTWinL
Copy link

No description provided.

apps/MiUnlockTool/install Outdated Show resolved Hide resolved
apps/MiUnlockTool/install Outdated Show resolved Hide resolved
apps/MiUnlockTool/install Outdated Show resolved Hide resolved
Comment on lines 38 to 42
if [ ! -f /bin/bash ]; then
shell='sh -c'
else
shell='bash -c'
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need for this. sh is an alias to the default shell.

apps/MiUnlockTool/uninstall Outdated Show resolved Hide resolved
Copy link
Author

@JeromTWinL JeromTWinL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, only i can do is comment. (Approve option is greyed).

apps/MiUnlockTool/install Outdated Show resolved Hide resolved
apps/MiUnlockTool/install Outdated Show resolved Hide resolved
apps/MiUnlockTool/install Outdated Show resolved Hide resolved
@JeromTWinL
Copy link
Author

JeromTWinL commented Dec 28, 2021

I don't know about the functions were added

apps/MiUnlockTool/install Outdated Show resolved Hide resolved
@cycool29
Copy link
Contributor

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

Comment on lines 1 to 3
# MiUnlock Tool
A Tool helps you to unlock your xiaomi android phone bootloader without root!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# MiUnlock Tool
A Tool helps you to unlock your xiaomi android phone bootloader without root!
XiaoMiTool is an unofficial tool to manage your XiaoMi smartphone ROM and software easily.
XiaoMiTool will take care of most of the operations you would need to do, from when you connect the device to your PC until the desired ROM or piece of software is installed.
XiaoMiTool V2 can download the latest official ROMs, TWRP, root with magisk, and decide which is the best way to install them on your device.

Simplified from the official website.

@JeromTWinL
Copy link
Author

Done commiting changes

Copy link
Contributor

@cycool29 cycool29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix bugs.

apps/XiaoMiTool/install Outdated Show resolved Hide resolved
apps/XiaoMiTool/install Outdated Show resolved Hide resolved
apps/XiaoMiTool/install Outdated Show resolved Hide resolved
apps/XiaoMiTool/install Outdated Show resolved Hide resolved
apps/XiaoMiTool/install Outdated Show resolved Hide resolved
apps/XiaoMiTool/uninstall Outdated Show resolved Hide resolved
apps/XiaoMiTool/uninstall Outdated Show resolved Hide resolved
apps/XiaoMiTool/uninstall Outdated Show resolved Hide resolved
apps/XiaoMiTool/website Outdated Show resolved Hide resolved
apps/XiaoMiTool/install Outdated Show resolved Hide resolved
apps/XiaoMiTool/install Outdated Show resolved Hide resolved
@JeromTWinL
Copy link
Author

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

apps/XiaoMiTool/install Outdated Show resolved Hide resolved
@JeromTWinL
Copy link
Author

Yes!, to run as root

@Crilum
Copy link
Contributor

Crilum commented Dec 30, 2021

Yes!, to run as root

why not just use sudo?

@JeromTWinL
Copy link
Author

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

@Crilum
Copy link
Contributor

Crilum commented Dec 30, 2021

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

@cycool29
Copy link
Contributor

why not just use sudo?

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

@Crilum
Copy link
Contributor

Crilum commented Dec 30, 2021

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.

@JeromTWinL
Copy link
Author

JeromTWinL commented Dec 30, 2021

I don't know what is that.

@cycool29
Copy link
Contributor

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

@JeromTWinL
Copy link
Author

Ok.

@JeromTWinL
Copy link
Author

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

@Crilum
Copy link
Contributor

Crilum commented Dec 30, 2021

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

@JeromTWinL
Copy link
Author

there's no command run

@JeromTWinL
Copy link
Author

Or

run() {
bash -c $@
}

@JeromTWinL
Copy link
Author

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

@Crilum
Copy link
Contributor

Crilum commented Dec 30, 2021

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
Copy link
Contributor

Crilum commented Dec 30, 2021

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

Copy link
Contributor

@Crilum Crilum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions

apps/XiaoMiTool/install Outdated Show resolved Hide resolved
apps/XiaoMiTool/install Outdated Show resolved Hide resolved
apps/XiaoMiTool/install Outdated Show resolved Hide resolved
@JeromTWinL
Copy link
Author

Done.

@JeromTWinL
Copy link
Author

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

@Crilum
Copy link
Contributor

Crilum commented Dec 30, 2021

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

@JeromTWinL
Copy link
Author

Fixed to copy the adb, fastboot to overwrite x64 libraries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants