Skip to content

Conversation

@LukasMod
Copy link
Contributor

@LukasMod LukasMod commented Dec 4, 2025

No description provided.

@vercel
Copy link

vercel bot commented Dec 4, 2025

@LukasMod is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

Looks good! would love to see a video of a working demo :)

@LukasMod
Copy link
Contributor Author

LukasMod commented Dec 5, 2025

I tested with fork LukasMod#1 (same as this one + dist and some changes in package.json to make it executable from project after referencing it in package.json).

Test command: AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... npx rock remote-cache upload --name rock-android-Adhoc-9e4710ed8a88da2b491feb31700abf16687eaa66 --binary-path Expensify-adhoc.apk --ad-hoc with .apk placed in root folder.

terminal logs:

◇  Uploaded APK, index.html to S3
│
◇  Artifact information:
│  - name: rock-android-Adhoc-9e4710ed8a88da2b491feb31700abf16687eaa66
│  - url: https://exp-demo-bucket-lm-1.s3.eu-central-1.amazonaws.com/rock-artifacts/ad-hoc/rock-android-Adhoc-9e4710ed8a88da2b491feb31700abf16687eaa66/index.html
android.adhoc.mp4

Additionally I updated link to rock docs in index template (old one: https://rockjs.dev/docs/cli#ad-hoc-distribution).
If this will be fine, we should mention this in docs properly too.
And its just rock side, android gh action needs to be updated also to reflect these changes and allow for ad-hoc flag.

I used private bucket for tests only (bucket with public access), its already removed to avoid extra costs.

@LukasMod
Copy link
Contributor Author

LukasMod commented Dec 8, 2025

Here is example with expensify app: Expensify/App#76061 (comment)
Working solution requires some additional changes:

  1. iOS gh actions:
  1. Android gh actions:
  1. Rock

@LukasMod LukasMod marked this pull request as ready for review December 8, 2025 07:11
@LukasMod LukasMod changed the title feat/Allow adhoc for android feat: allow adhoc for android Dec 15, 2025
Comment on lines 355 to 359
const nodeApk = await import('node-apk');
const { Apk } = nodeApk.default || nodeApk;
const apk = new Apk(binaryPath);
const manifest = await apk.getManifestInfo();
apk.close();
Copy link
Contributor

Choose a reason for hiding this comment

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

node-apk adds a lot of install size: https://packagephobia.com/result?p=node-apk. Can we instead use zip command to get the manifest? similar to how we use it in re-sign

Copy link
Contributor

Choose a reason for hiding this comment

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

we could use fast-xml-parser (one we use in apple platform) to parse the manifest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will test aapt (locally works). zip + fast-xml-parser was not working because AndroidManifest is binary in this case.

Copy link
Contributor

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for contributing that. I left a comment to consider, but no biggie

try {
const aaptPath = findAapt();

const output = execFileSync(aaptPath, ['dump', 'badging', binaryPath], {
Copy link
Contributor

Choose a reason for hiding this comment

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

we have spawn for running commands, let's use that

Copy link
Contributor

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

🚀

@thymikee thymikee merged commit b0282a5 into callstackincubator:main Dec 18, 2025
3 of 4 checks passed
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.

2 participants