Skip to content

wsxyeah/HarmonySU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HarmonySU

鸿蒙模拟器 root 工具,方便调试。

使用方法

  1. 编译 su
# 指定鸿蒙 NDK 路径
export HARMONY_NDK_HOME=/path/to/your/harmony-ndk/native

# 编译
./build.sh

# 查看编译结果
ls -l build/*/su
  1. Patch 系统镜像
sudo ./patch_system_img.sh /path/to/your/system.img build/arm64-v8a/su

Note

脚本目前仅支持 Linux 环境下运行

system.img 位置:

  • ~/Library/Huawei/Sdk/hmscore/{版本号}/system-image/phone_arm/system.img
  • ~/Library/Huawei/Sdk/system-image/{版本号}/phone_arm/system.img
  1. 启动模拟器,切换 root 用户
# 启动 hdc shell
hdc shell

# 切换到 root 用户
su

# 这下就可以为所欲为了 😄
whomai

About

鸿蒙模拟器 root 工具,方便调试。

Resources

License

Stars

Watchers

Forks

Releases

No releases published