ZeroAicy / AIDE-Plus

AIDE+
23 stars 4 forks source link

Support for binaries? #2

Open CamsShaft opened 1 month ago

CamsShaft commented 1 month ago

Hello, I'm looking forward to trying out your app and I know it's very new, I was just wondering if it will support the AIDE NDK Binaries addon eventually. I think it's because the package name is different than the other AIDE app so it doesn't recognize that it's even installed. Would it be okay if I just changed the package name and recompiled it if that's the case? Or if there's something else that needs to be done, with the right instructions I could do it myself. Thanks and hope things progress smoothly for you. Here's a picture for reference...

Screenshot_20240520_145425_One UI Home

CamsShaft commented 1 month ago

Tried swapping sharedUserId's to match but that didn't make a difference. I've had this happen before and never figured out how to do it. It feels like it would be a pretty easy fix but I don't have the years of experience in this.

ZeroAicy commented 1 month ago

Actually, the original Ndk support in AIDE is quite outdated. You can modify the installation script from https://github.com/MrIkso/AndroidIDE-NDK to achieve Ndk installation. Additionally, since the original target version is 29, the Ndk native executable projects are installed and run by compiling an executor (apk), which is quite cumbersome. Although I changed the target version to 28, other parts still need to be modified.

To simulate the AIDE Ndk structure using the ln command, you can do the following:

For example: rm -rf /data/user/0/${PackageName}/no_backup/ndksupport-1710240003 mkdir -p /data/user/0/${PackageName}/no_backup/ndksupport-1710240003

touch /data/user/0/${PackageName}/no_backup/ndksupport-1710240003/.installed

ln -s /data/user/0/${PackageName}/files/framework/android-sdk/ndk/24.0.8215888 /data/user/0/${PackageName}/no_backup/ndksupport-1710240003/android-ndk-aide

ln -s /data/user/0/${PackageName}/files/usr/bin/applets /data/user/0/${PackageName}/no_backup/ndksupport-1710240003/bin At the same time, you will need a busybox.

Please note that ${PackageName} should be replaced with the actual package name of your application. Also, make sure you have the necessary permissions to create and modify files in the /data/user/0/ directory.

ZeroAicy commented 1 month ago

You can also support cmake projects, but the gradle parsing does not have extensions, so the cmake configuration needs to be hardcoded. I have made modifications to this in other versions of AIDE [AIDE Pro], so I haven't included it in AIDE+. Additionally, I currently don't have a need for Ndk, and it's wasteful to install a separate Ndk for each AIDE. My vision is to utilize a standalone software to configure an Ndk environment, and then invoke and return information via broadcasts or other methods. This way, the Ndk can be reused instead of installing multiple Ndk instances.

CamsShaft commented 1 month ago

Well I certainly didn't expect you to go all out in your reply haha. I appreciate all the information and realize what a mess it is. Why does android keep using utilities and tools that, from the sounds of it, are outdated. Termux can be really annoying for what you mentioned here: "Additionally, I currently don't have a need for Ndk, and it's wasteful to install a separate Ndk for each AIDE." Trying to compile a simple C program and many other things typically don't work because clang isn't the right one, same with gcc or you have to manually hunt down the proper files for the includes folder. I like your idea a lot!

ZeroAicy commented 1 month ago

But this is not my main task. Actually, fixing the base package dex is what I need to do. I have fixed many classes, fields, and methods, such as AIDE's code analysis model [codemodel], so support for Ndk may be delayed for a long time

CamsShaft commented 1 month ago

Hey no worries. I'm just one guy, besides there's lot of other apps. I really just enjoy trying new (to me) apps out to see how they are and what differences there are between similar ones. Helps with efficiency shaving off a few extra minutes if someone did something a bit different with almost the same app.