1

The company I am with is developing a custom version of android which is to be used in our products. My team is developing applications which will be included in this custom android at the time of building the image. We used plastic scm to track changesets in our apps, but this information is not readily available on the android system. My goal is to have a text file included in the android build which will detail which of our apps are included and which plastic scm change sets they are at. I need to know where I would put this file in the AOSP before building the image in order to make it accessible from the device after flashing.

The output text file might look something like this: ChangeSet text File

AOSP File System

The above image shows the AOSP file system, I would like to know in which of these directories and sub directories I can place a text file so it will be in the image when I make the distribution. I appreciate your help in locating the appropiate place to put this file to make it available on the device after building the image!

Thanks in advance!

G_V
  • 2,396
  • 29
  • 44
LazyTitan
  • 43
  • 9
  • If the file is just text and structured in some way, you should be able to use an inputstream from your app's allocated storage without any additional permissions I think. I'm not sure how to avoid it being packaged inside the APK itself, and whether that really matters for being able to access it. Interesting problem. – G_V Feb 02 '18 at 12:53
  • 1
    The text file is meant to be included in Android's default Documents folder. This is not a single app but an entire build of Android. The goal is to put this file in the build during the build process, before flashing hardware with the image. – LazyTitan Feb 02 '18 at 13:52
  • Somehow I missed AOSP and there isn't an existing tag for it yet. So you basically want a changelog in the MyDocuments folder of your custom Android build? Isn't there a built-in structure for this? Android to my knowledge has version checking to a custom repository for your specific version, with changelogs. That's what I saw with Cyanogenmod at any rate. 'will tell what changes were made to this specific build.' I interpret this as a changelog, unless you want to have externally made changes to your build reported. – G_V Feb 02 '18 at 14:23
  • Yes it would be a changelog. The idea would be to have it accessible from the device by preferably in android's documents folder. But only being accessible from adb would be acceptable, just not ideal. The biggest goal is for the file to be included in the build so when a device is flashed it is still accessible – LazyTitan Feb 02 '18 at 14:33
  • Wait, you want it to persist when someone changes from your build to another? I don't understand the scenario where someone wants to read your changelog after flashing their internal storage with your build, inside a document you've placed somewhere that isn't standard or expected. Wouldn't you normally read the changelog on the website BEFORE you install it? I'm asking this because you are specifying how you want to do something, but it's not really clear to me what exactly you hope to achieve and why. – G_V Feb 02 '18 at 14:38
  • My apologies G_V I should have been more clear, I'm new to stackoverflow and to development! I am a freshmen co-op student and am not very experienced. I realize that I may have been misleading in my description. The company I am with is developing a custom version of android which is to be used in our products. My team is developing apps which will go into that version of android. Change log was not the appropriate word. The actual goal is to have a file which shows the the apps that we include and their plastic scm changset. The file does not need to persist on the device after re flash – LazyTitan Feb 02 '18 at 14:48
  • Ah yes, on StackOverflow you generally speaking only get answers when you ask very specific, well-defined questions where you show what you've tried so far and what didn't work. Maybe you can round up some seniors, sit down, really dig down to what you specifically need/want and update the original question? – G_V Feb 02 '18 at 15:08
  • 1
    @G_V I believe this is better and more clear. Thank you for your help in teaching me how to use StackOverflow! And hopefully you can help with my problem :) – LazyTitan Feb 02 '18 at 16:01
  • 1
    This should be something you can relatively easily do with the android build system's ability to copy files to the target system image, and in ordinary Makefile fashion, to run external commands or scripts. See for an example with different but not dissimilar goals https://stackoverflow.com/questions/38142121/in-an-aosp-android-mk-file-how-do-i-execute-a-command-and-fail-the-build-if-the Do not however that the nature of the AOSP build system appears to be changing so there may be some version specificity. Ideally **try to find a similar existing requirement** and copy from that. – Chris Stratton Feb 04 '18 at 03:09

1 Answers1

0

Turns out this can be done by adding the following line to an android make file:
PRODUCT_COPY_FILES+=File_Path_on_System:Desired_Location_On_Device

LazyTitan
  • 43
  • 9