Notices



What is Riru, and what can you do with it on your Android device?

AVN News Feed

Post New ThreadReply
 
Thread Tools
  #1  
Old 04-24-2022, 11:15 AM
phillynewsnow's Avatar
phillynewsnow phillynewsnow is offline   Thread Starter  
Site Moderator - Staff

 
Join Date: October 11th, 2009
Posts: 4,640
Thanks: 0
Thanked 668 Times in 568 Posts
Downloads: 0
Uploads: 0


View phillynewsnow's Profile   Edit Options Edit Profile Picture View phillynewsnow's Photo Album Add phillynewsnow's to Your Contacts Show Groups Edit Avatar Subscribed Threads Private Messages
What is Riru, and what can you do with it on your Android device?

What is Riru, and what can you do with it on your Android device?



Before Magisk became a thing, it was Xposed Framework that vastly shaped the device-agnostic Android modding approach. Rather than having to decompile applications, modify bits and pieces, recompile, and push the modded files back to our devices, we can replace any method in any class at runtime using Xposed and a purpose-built module. The framework is essentially a modification of /system/bin/app_process to load additional JAR files on startup, which allows developers to hook into the Zygote process and can act in its context.

Since Magisk offers an overlay-based modding mechanism (often referred to as “systemless”), one can theoretically create a Magisk module to tinker with the Zygote process without physically modifying the app_process executable. This is where Riru comes in.

What is Riru?

Created by two developers named Rikka and yujincheng08, Riru is a specially crafted Magisk module that offers Xposed-esque functionalities without the need of installing the old school Xposed Framework. It injects into Zygote in order to allow other modules to run their codes in apps or the system server.

How does Riru work?

The initial implementation of Riru relied on the replacement of a particular system library called libmemtrack. However, the method was later abandoned in favor of a system property known as the “native bridge” (ro.dalvik.vm.native.bridge). By exploiting the property, the developers can dynamically load and unload shared libraries of their choice, which ultimately leads to injecting into the Zygote process.

How to download and install Riru?

As mentioned earlier, Riru is available as a Magisk module. Due to the fact that the Magisk app no longer comes with a built-in module browser, you need to download Riru straight from its GitHub repository.


After downloading the release ZIP file, you can install it using the Magisk app.

  1. If you?re downloading on a PC or a Mac, then connect your Android device to it and copy the downloaded ZIP file to the internal memory of the target device.
  2. Open the Magisk app on your phone and switch to the Modules tab using the bottom navigation menu.
  3. Tap on the button named Install from storage.
  4. Browse and select the module ZIP you downloaded earlier.
  5. Magisk will now install the module and prompt you to restart.
If everything goes right, you can see Riru listed under the Modules tab of the Magisk app after rebooting.

What can I do with Riru?

Riru itself is just a doorway for other modules to hook into the Zygote process. As such, you need to install Riru-compatible modules via the Magisk app, just like any other Magisk modules. After a successful installation, Riru modules will be listed alongside Magisk modules in the Magisk app. You can then open the module-specific configuration front-end to modify its parameters. For the modules that have no interface, you can simply continue using your modded Android instance and Riru will take care of everything in the background.



What is the difference between Riru and Zygisk?

On newer versions of Magisk, you may face a situation where Riru is disabled after installation due to the presence of Zygisk.



The reason behind this conflict is rather simple, though. Zygisk (e.g. Magisk in Zygote) is the spiritual successor to Riru. It’s the evolution of the systemless interface that XDA Senior Recognized Developer topjohnwu (i.e. the creator of Magisk) and several other developers have been working on for a while. As both Riru and Zygisk target the Android Zygote process, these two can’t exist simultaneously. However, you can disable Zygisk from Magisk’s setting, reboot the device, and then enable Riru.

As a matter of fact, the maintainers of Riru practically stopped developing the project a while ago. They suggested module developers switch to Zygisk in the future. However, Zygisk is still in a nascent stage and there is a lot of scope for improvement, hence the migration will take time. Meanwhile, you can continue to use Riru and its modules.


The post What is Riru, and what can you do with it on your Android device? appeared first on xda-developers.



More...
Reply With Quote
Post New ThreadReply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Android 13 Custom ROM List: Unofficially update your Android device! phillynewsnow AVN News Feed 0 10-28-2022 11:07 AM
Top 5 Essential Android Apps to Install After Rooting Your Android Device phillynewsnow AVN News Feed 0 08-17-2022 11:34 AM
What is Shizuku, and what can you do with it on your Android device? phillynewsnow AVN News Feed 0 06-28-2022 02:09 AM
What is EdXposed, and what can you do with it on your Android device? phillynewsnow AVN News Feed 0 05-07-2022 04:23 PM
The How To Root-Android Device puertoblack2003 Article 1 01-04-2010 11:51 AM


All times are GMT -5. The time now is 05:48 AM.

Layout Options | Width: Fixed
Contact Us - SPJ Bulletin - Archive - Privacy Statement - Terms of Service - Top