• Development
  • Flash a development ROM to update the platform app

Hi,

In the build instruction, there's an option "Faster builds for development use only" which produces images signed with the default public keys, generated by the command

m

However it is unclear how to flash the resulting images to the device for development purposes.

My plan is to build the 'eng' ROM and flash it on the device. After that, I'm planning to update and debug the platform application by the following workflow:

  1. Rebuild the application module by using the mmm command;
  2. Copy the updated APK to /system/priv-app/ (as the eng variant is rooted and I presume the APK is signed with the same "default public keys").

Can you please advise how to flash the "faster development build" on the device, and is there any best practice for the platform app development?

Also, I found this sentence in the build manual: "For an emulator build, always use the development build approach below". Is it possible to install a developer variant of GrapheneOS on the emulator? If yes, is there an instruction?

Thank you for your guide!

Once the development (eng) rom is installed on a device, is there an easy way to update a single system application?

I would like to update the application SetupWizard2 which is installed on a device in the /system_ext/priv-app/SetupWizard2/ directory. Can I do that without rebuilding and reflashing the whole ROM? Probably there's some workflow to prepare an OTA update from a single system application, which is installable by adb or fastboot?

  • de0u replied to this.

    headwind-mdm This might not be the easiest way, but the OTA system has delta updates, and I expect a delta update for one app would be small. I think the build instructions cover generating and serving delta updates.

      de0u Thank you for the suggestion.

      The script script/finalize.sh uses the BUILD_NUMBER environment variable, which needs to be changed to generate a delta. How do I change this variable? Should I simply set it in the shell console, or it must be updated elsewhere?

      • de0u replied to this.

        headwind-mdm The script script/finalize.sh uses the BUILD_NUMBER environment variable, which needs to be changed to generate a delta. How do I change this variable?

        I don't know -- I haven't generated delta updates. This seems like the sort of question that might be better handled by the development chat room.

        But it appears that BUILD_NUMBER is set by build/envsetup.sh. I can imagine that the standard workflow would involve building a new release (hence the environment variables set by build/envsetup.sh would be in effect) followed by generating the complete OTA image and then generating the delta image. So I can imagine that the tools would all expect BUILD_NUMBER to be present in the environment, and set to the value of the just-completed new build. Does that make sense?