APKEditor icon indicating copy to clipboard operation
APKEditor copied to clipboard

Replace prebuilt ARSCLib with git submodule

Open Surendrajat opened this issue 2 months ago • 4 comments

Removed the need to build and manually update the ARSCLib library. Only update the ARSCLib submodule instead. Submodule currently points to the https://github.com/REAndroid/ARSCLib/commit/b942b9b104e9287299022ef088395d13def698ec commit of main branch.

Auto release on tags can also be added to the workflow if the maintainer likes the idea.

Surendrajat avatar Nov 04 '25 18:11 Surendrajat

Thank you for this PR! This was our headache for years, I have a question for you:

  • How can we update submodules from git command (not from here github) ? Or is there a way to point specific commit hash on .gitmodules file, then later we edit the hash and push the commit but it should be able to auto update submodule

REAndroid avatar Nov 05 '25 10:11 REAndroid

  • How can we update submodules from git command (not from here github) ? Or is there a way to point specific commit hash on .gitmodules file, then later we edit the hash and push the commit but it should be able to auto update submodule

@REAndroid it's a repo in repo so git command works differently based on where you are. The git command from outer repo (APKEditor) sees only a commit reference in module/ARSClib not the content. Same git in module/ARSClib sees full ARSClib repo. So you can do this to update:

git clone --recurse-submodules https://github.com/REAndroid/APKEditor
cd APKEditor/module/ARSClib
git fetch
git checkout <whichever_commit_you_need>
cd ../..
git add -A && git commit -m "updated ARSClib"

Also can you approve the workflow so I can confirm if it builds alright?

Surendrajat avatar Nov 05 '25 13:11 Surendrajat

Looking at libs/smali.jar I got questions:

  1. Why not just use https://github.com/google/smali instead of maintaining yourself? I haven't looked at patches but can't those be upstreamed if they fix issues?
  2. If not, then do you want https://github.com/REAndroid/smali-lib as a git submodule too?
  3. Also what about JCommand? This also alright as a submodule?

Surendrajat avatar Nov 05 '25 13:11 Surendrajat

1. Why not just use https://github.com/google/smali instead of maintaining yourself? I haven't looked at patches but can't those be upstreamed if they fix issues?

I don't think they are going to maintain it, rather trying to kill it. Anyways we are deprecating dexlib2 with our lib and soon will be completely removed.

3. Also what about `JCommand`? This also alright as a submodule?

Let me merge this PR first

REAndroid avatar Nov 05 '25 15:11 REAndroid