[android-building] Re: Editing Android device init.rc file

2021-10-08 Thread Abhayadev S
Hi,

I think what you are trying to achieve is an init script. for that you need 
to have root level permissions.
do you have access to the source of the device?

some pointer to start with is 
https://android.googlesource.com/platform/system/core/+/master/init/README.md

you can listen for system properties as triggeres for your script to run.

On Friday, October 8, 2021 at 9:54:45 AM UTC+5:30 pima...@gmail.com wrote:

> Hi, I am a newbie in embedded Linux, I am able to toggle a gpio pin, as 
> well as initialize an i2c module on an android running device. I used adb 
> shell to access the device shell, and manage to initialise this module 
> manually, I want this to happen at startup/boot up, however, I cant edit 
> the init.rc for my android device since there is no Vim or nano editor, or 
> gedit to open the file so that I can add a new file to be executed at 
> startup.
>
>  
>
> I manage to push a bash file to the android device using adb push, but I 
> can only run it manually eg: ./file.sh inside the device.
>
>  
>
> I am thinking of building the adroid files and include the file that I 
> want to use to initialize the i2c device, but I don't know how to achieve 
> this. 
>
>  
>
> Any help would be appreciated.
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/9ed6104a-3f30-48b9-aaa1-41ed745c6b1dn%40googlegroups.com.


Re: [android-building] post install step for cc_binary

2021-10-08 Thread Abhayadev S
Dan,
I was just trying out the "LOCAL_POST_INSTALL_CMD" (to execute some short 
shell scripts) and it works now in the Android.mk.
I could not find an equivalent for Android.bp though, do you know of any?

any way it works for now :)

cheers.
On Tuesday, October 5, 2021 at 4:08:25 AM UTC+5:30 Dan Willemsen wrote:

> No, the source tree should be considered read-only from within the build. 
> I'd suggest doing this as a wrapper around the build, rather than inside 
> the build. You can set up `dist` options so that `m ... dist` builds will 
> copy artifacts (and logs -- it's meant to be used on build servers) to 
> $DIST_DIR (defaults to out/dist/) after a build, but you'd still need 
> something wrapping the build to put them where you wanted, so that may or 
> may not simplify things.
>
> - Dan
>
> On Mon, Oct 4, 2021 at 12:13 PM Abhayadev S  wrote:
>
>>
>> Hi, 
>>
>> I have a cc_binary module (name myBin) defined in in a/b/Android.bp which 
>> is building fine and installs the binary in to out//system/bin/myBin
>>
>> Now, every time the binary is built, i need to copy this binary in to 
>> another git repo project cloned in a/b/bins/ to keep the prebuilts
>>
>> so, is there post build/install options i can use inside the Android.bp ?
>>
>> regards,
>> abhay
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the "Android 
>> Building" mailing list.
>> To post to this group, send email to android-...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-buildi...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-buildi...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-building/2edbc3a5-816e-4e12-8528-1cc0f0a7e841n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/c9a737f3-8cf5-4e90-8665-0d870b530ea7n%40googlegroups.com.


Re: [android-building] cc_binary module name and binary name

2021-10-08 Thread Abhayadev S
Thanks Dan, appreciate the support.
I will explore the namespace options...

On Tuesday, October 5, 2021 at 4:05:18 AM UTC+5:30 Dan Willemsen wrote:

> No, that's not possible, as the installation system still sets up the 
> install rules for every module, so that the user can request a module to be 
> installed even if it isn't in PRODUCT_PACKAGES.
>
> Either have them named differently on the device, or use soong namespaces 
> 
>  and 
> the same module name(myBin) so that only one will ever be exported to Make 
> at a time, that can be chosen through PRODUCT_SOONG_NAMESPACES 
> (PRODUCT_PACKAGES would just have myBin in either case).
>
> - Dan
>
> On Mon, Oct 4, 2021 at 12:14 PM Abhayadev S  wrote:
>
>> Hi,
>>
>> usually the name of the installed binary will be same as the module 
>> "name" but can we have 2 cc_binary modules defined to install a binary of 
>> same name but on a conditional PRODUCT_PACKAGES definition?
>>
>> like a/Android.bp will define cc_binary with name : mymodule and it shall 
>> install myBin
>> and b/Android.bp will define cc_binary with name mymodule2 and it shall 
>> install myBin 
>> and this will be controlled by a conditional PRODUCT_PACKAGES definition
>> PRODUCT_PACKAGES += mymodule  OR PRODUCT_PACKAGES += mymodule2
>>
>> this is the install a binary (with same name) from 2 partners but based 
>> on a build condition/rule.
>>
>> regards,
>> abhay
>>
>>
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the "Android 
>> Building" mailing list.
>> To post to this group, send email to android-...@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-buildi...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-building?hl=en
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Building" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-buildi...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-building/697400b2-6362-430e-99f2-9e5bce018996n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/4975d516-791d-4be2-b94f-3e71d09c3d00n%40googlegroups.com.


[android-building] Re: Android 12 Released

2021-10-08 Thread 'del...@google.com' via Android Building
We have merged Android 12 to AOSP master.

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/f52133b6-2284-4610-8f06-830f5c6ea903n%40googlegroups.com.