Re: [android-building] Re: android10.0.0_rxx : lunch qemu_trusty_arm64-userdebug fails

2020-03-02 Thread 'Matthew Maurer' via Android Building
This target is a testing target used for evaluating our reference TrustZone
implementation. "storageproxyd" is continuously resetting there because it
is not being launched by our test script

which
would attach a virtual RPMB resource.

A few notes about this target:
* It does not have a GUI
* Running Java is not supported and unlikely to work
* It requires a custom EL3 and Trusty running alongside it to work

The manifest for these components is at
https://android.googlesource.com/trusty/manifest, and that manifest
contains a checked in prebuilt of the qemu_trusty_arm64-userdebug target
that we are currently testing against.

If you tell me more about what you're trying to make the target do, I may
be able to give you further help with getting it to do what you want. If
you aren't trying to use or inspect the Trusty TZ implementation, this
target probably isn't the one you're looking for.

On Mon, Mar 2, 2020 at 1:34 PM Dan Willemsen  wrote:

> +Matthew Maurer  Do we have any documentation on this
> target? I think the last time we talked about this target it was only
> minimally functional.
>
> - Dan
>
> On Mon, Mar 2, 2020 at 12:51 PM Julien Robin 
> wrote:
>
>> I succeeded to find a workaround for the issue I signaled here, editing
>> device/generic/trusty/BoardConfig.mk and putting BUILD_QEMU_IMAGES to
>> false, which still gives vendor.img, system.img and userdata.img
>>
>> I then found this kernel
>> https://android.googlesource.com/kernel/common/+/refs/heads/android-trusty-4.19,
>> and using arch/arm64/configs/trusty_qemu_defconfig, I successfully built it.
>>
>> Also, I'm able to start most of this Android build on Debian 10 provided
>> qemu-system-aarch64 the following way :
>>
>> qemu-system-aarch64
>> -M virt
>> -cpu cortex-a57
>> -smp 1
>> -m 2048
>> -monitor none
>> -parallel none
>> -serial mon:stdio
>> -kernel Image -append "root=/dev/vda rootfstype=ext4 ro init=/init
>> loglevel=8 selinux=1 checkreqprot=1 androidboot.selinux=permissive
>> androidboot.hardware=qemu_trusty console=ttyAMA0"
>> -device virtio-gpu-pci
>> -drive format=raw,file=system-custom.img
>> -drive format=raw,file=userdata-custom.img
>>
>> userdata-custom.img is just a bigger userdata.img (1024MB instead of 4)
>> in which I used resize2fs, system-custom.img is just a system.img in which
>> the placeholder folder "vendor" now embeds the content of vendor.img,
>> copied by "cp -a". Finally, still into system-custom.img, fstab.qemu_trusty
>> only contains
>> LABEL=data  /data   ext4  noatime,nosuid,
>> nodev,errors=panicwait
>> So that /data (available at /dev/vdb) is mounted by its label, while
>> system-custom.img embeding root system and vendor is already mounted by
>> kernel cmdline (by /dev/vda). ramdisk.img is not used as system.img already
>> contains everything needed to start init.
>>
>> However, I guess I should use a slightly modified version of qemu,
>> available here
>> https://android.googlesource.com/trusty/external/qemu/+/refs/heads/master
>> Because using Debian 10 qemu version, I get the following output, and no
>> display :
>>
>> init: init first stage started!
>> [...]
>> init: Loading SELinux policy
>> [...]
>> selinux: SELinux: Loaded policy from /vendor/etc/selinux/
>> precompiled_sepolicy
>>
>> selinux: SELinux: Loaded file_contexts
>>
>> random: init: uninitialized urandom read (40 bytes read)
>> random: init: uninitialized urandom read (40 bytes read)
>> init: init second stage started!
>> [...]
>> ueventd: Coldboot took 1.344 seconds
>> [...]
>> init: starting service 'storageproxyd'...
>> libprocessgroup: CgroupMap::FindController called for [1] failed, RC
>> file was not initialized properly
>> libprocessgroup: Failed to make and chown /uid_0: Read-only file system
>> libprocessgroup: CgroupMap::FindController called for [829] failed, RC
>> file was not initialized properly
>> init: createProcessGroup(0, 829) failed for service 'storageproxyd': Read
>> -only file system
>> init: cpuset cgroup controller is not mounted!
>> init: Service 'storageproxyd' (pid 829) exited with status 1
>> init: Sending signal 9 to service 'storageproxyd' (pid 829) process group
>> ...
>> libprocessgroup: CgroupMap::FindController called for [1] failed, RC
>> file was not initialized properly
>> libprocessgroup: CgroupMap::FindController called for [1] failed, RC
>> file was not initialized properly
>>
>>
>> init: starting service 'storageproxyd'...
>> libprocessgroup: CgroupMap::FindController called for [1] failed, RC
>> file was not initialized properly
>> libprocessgroup: Failed to make and chown /uid_0: Read-only file system
>> init: createProcessGroup(0, 830) failed for service 'storageproxyd': Read
>> -only file system
>> libprocessgroup: CgroupMap::FindController called for [830] failed, RC
>> file was not initialized properly

[android-building] Build failure in local environment

2020-03-02 Thread GUNASEELAN N
Hi,
  I tried to build the Aosp Launcher3 application in my local environment i am 
getting the error in IconLoader package. I am new to this process first time i 
am doing the AOSP android build. Is there any procedure to build the code or 
any guidelines to follow please help me to solve this error.
I am using master branch to build but i dont know how to solve this issue 
please anyone help me.
I need to know,
Which os i need to use?
Whether i can able to build the code directly using Android studio?
Whether i need to use any other configuration to build the launcher code 
separately?
Is it possible to build the Launcher3 code separately?
Is there any rules or guidelines to follow for build ?

Error:

could not resolve androidx.core.core:1.0.0.beta01

-- 
-- 
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/dd4a4fae-c8d7-433f-aba4-0c866224c7e3%40googlegroups.com.


Re: [android-building] Generate external/llvm Intrinsics.gen and Attributes.inc on android10

2020-03-02 Thread 'Colin Cross' via Android Building
Those files are generated by the llvm_tblgen modules in
external/llvm/Android.bp.  You'll find their outputs at:
out/soong/.intermediates/external/llvm/llvm-gen-attributes/gen/llvm/IR/Attributes.inc
out/soong/.intermediates/external/llvm/llvm-gen-intrinsics/gen/llvm/IR/Intrinsics.gen

As a hack you could copy those files to the places where the Android.mk
files create them, just be aware they will not be updated if you make
changes to the source files and rebuild.  You could also try reverting the
change that removed generating those files in Make:
commit 7ebb1e3516ebd630aa3fe94f9b4cca2c2dbb09ae
Author: Dan Willemsen 
Date:   Thu Nov 1 00:16:34 2018 -0700

Disable tblgen in Make

The last user of these have been removed. simpleperf is still using
LLVM_HOST_BUILD_MK and LLVM_DEVICE_BUILD_MK, so these can't all be
removed yet.

Test: treehugger
Change-Id: I0b3966fa5630e9795a1e7d7b9658f9a2bcad5271

You'll likely have better success building opt, llvm-link and llc using
Android.bp files than trying to get the old Android.mk files to work though.

On Mon, Mar 2, 2020 at 12:49 PM Paschalis Mpeis 
wrote:

> Hi there,
>
> I am building some tools from *external/llvm*, specifically *opt*,
> *llvm-link*, and* llc*.
> For this, I revived the relevant Android.mk from previous commits
> (for each of the tools, and a relevant portion at
> external/llvm/Android.mk).
> They are normally picked up by the soong build system, and I can for
> example call: `m opt`.
>
> However, these tools depend on *two intermediates*:
>
>-
>
> target/product//gen/EXECUTABLES/opt_intermediates/llvm/IR/Attributes.inc
>-
>
> target/product//gen/EXECUTABLES/opt_intermediates/llvm/IR/Intrinsics.gen
>
> I have enabled FORCE_BUILD_LLVM_COMPONENTS (see here
> 
> )
> and I can see there are relevant entries for what I want at lines: 148
> 
>  and  154
> 
> .
>
> So, is my question is: is there a way to generate those 2 intermediate
> files using the existing Android.bp setup on android10-release branch
> 
> ?
>
> Cheers,
> Paschalis
>
> --
> --
> 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/6e937488-80cb-42c8-b15c-087cafb7c400%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/CAMbhsRT279w0e%2BT%2B3o2zEQBc0JFEo6gEjfgrJjiLq%3DSXpZ25MQ%40mail.gmail.com.


Re: [android-building] Using device/generic/qemu/qemu_x86_64.mk files for QEMU

2020-03-02 Thread 'Dan Willemsen' via Android Building
These are the instructions on how to use the android emulator (with qemu):
https://source.android.com/setup/create/avd

- Dan

On Mon, Feb 24, 2020 at 1:58 PM Julien Robin 
wrote:

> Hi folks,
>
> I need a little bit of help on building something working on QEMU (on any
> architecture but let's start with x86_64). And yes as strange at it may
> seems, I have a professional need of being able to run untouched (or almost
> untouched) AOSP on QEMU platform ;)
>
> I noticed those files : AOSP_SOURCE_DIRECTORY/device/generic/qemu/
> qemu_x86_64.mk (and others architectures). Looked like the Holy Grail
>
> I successfully added a vendorsetup.sh file to show both qemu_x86_64-eng
> and qemu_x86-eng configurations into lunch menu, and built successfully.
>
> But I have troubles running this build on QEMU, be it with the given
> kernel, or using a self built 4.14-goldfish kernel (working both with the
> AVD emulator, Android-x86 and Debian, embedding all the drivers : the
> perfect kernel! It took me some time to have the good kernel build config)
> or even using the Android-x86 boot structure to boot the resulting built
> (after having replaced and placed everything in the right place, system
> files vendor files and ramdisk content with fstab about /cache needed by
> android-x86 structure...
>
> Android is sure booting but does nothing more after the following init
> output :
>
> init: init first stage started!
>
> [..]
>
> ueventd: Coldboot took 0.03 secondslogd.auditd: start
> logd.klogd: 42157422826
> healthd: No battery devices found
> healthd: battery none chg=
>
> Is this normal from the qemu_x86_64-eng build?
> How to use the AOSP_SOURCE_DIRECTORY/device/generic/qemu/qemu_x86_64.mk
> files available into AOSP to get some Android build working with QEMU?
>
> Thank you very much in advance
> Best regards,
>
> Julien ROBIN
>
> --
> --
> 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/c31b97c5-7642-4a5e-a770-897d3e6a4f07%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/CALQgHdnJ218o-A0rR-_smmQqJQRR32S%2BkR6tQULWD5%2Bi1rdM_A%40mail.gmail.com.


Re: [android-building] Re: android10.0.0_rxx : lunch qemu_trusty_arm64-userdebug fails

2020-03-02 Thread 'Dan Willemsen' via Android Building
+Matthew Maurer  Do we have any documentation on this
target? I think the last time we talked about this target it was only
minimally functional.

- Dan

On Mon, Mar 2, 2020 at 12:51 PM Julien Robin 
wrote:

> I succeeded to find a workaround for the issue I signaled here, editing
> device/generic/trusty/BoardConfig.mk and putting BUILD_QEMU_IMAGES to
> false, which still gives vendor.img, system.img and userdata.img
>
> I then found this kernel
> https://android.googlesource.com/kernel/common/+/refs/heads/android-trusty-4.19,
> and using arch/arm64/configs/trusty_qemu_defconfig, I successfully built it.
>
> Also, I'm able to start most of this Android build on Debian 10 provided
> qemu-system-aarch64 the following way :
>
> qemu-system-aarch64
> -M virt
> -cpu cortex-a57
> -smp 1
> -m 2048
> -monitor none
> -parallel none
> -serial mon:stdio
> -kernel Image -append "root=/dev/vda rootfstype=ext4 ro init=/init
> loglevel=8 selinux=1 checkreqprot=1 androidboot.selinux=permissive
> androidboot.hardware=qemu_trusty console=ttyAMA0"
> -device virtio-gpu-pci
> -drive format=raw,file=system-custom.img
> -drive format=raw,file=userdata-custom.img
>
> userdata-custom.img is just a bigger userdata.img (1024MB instead of 4) in
> which I used resize2fs, system-custom.img is just a system.img in which the
> placeholder folder "vendor" now embeds the content of vendor.img, copied by
> "cp -a". Finally, still into system-custom.img, fstab.qemu_trusty only
> contains
> LABEL=data  /data   ext4  noatime,nosuid,nodev
> ,errors=panicwait
> So that /data (available at /dev/vdb) is mounted by its label, while
> system-custom.img embeding root system and vendor is already mounted by
> kernel cmdline (by /dev/vda). ramdisk.img is not used as system.img already
> contains everything needed to start init.
>
> However, I guess I should use a slightly modified version of qemu,
> available here
> https://android.googlesource.com/trusty/external/qemu/+/refs/heads/master
> Because using Debian 10 qemu version, I get the following output, and no
> display :
>
> init: init first stage started!
> [...]
> init: Loading SELinux policy
> [...]
> selinux: SELinux: Loaded policy from /vendor/etc/selinux/
> precompiled_sepolicy
>
> selinux: SELinux: Loaded file_contexts
>
> random: init: uninitialized urandom read (40 bytes read)
> random: init: uninitialized urandom read (40 bytes read)
> init: init second stage started!
> [...]
> ueventd: Coldboot took 1.344 seconds
> [...]
> init: starting service 'storageproxyd'...
> libprocessgroup: CgroupMap::FindController called for [1] failed, RC file
> was not initialized properly
> libprocessgroup: Failed to make and chown /uid_0: Read-only file system
> libprocessgroup: CgroupMap::FindController called for [829] failed, RC
> file was not initialized properly
> init: createProcessGroup(0, 829) failed for service 'storageproxyd': Read-only
> file system
> init: cpuset cgroup controller is not mounted!
> init: Service 'storageproxyd' (pid 829) exited with status 1
> init: Sending signal 9 to service 'storageproxyd' (pid 829) process group
> ...
> libprocessgroup: CgroupMap::FindController called for [1] failed, RC file
> was not initialized properly
> libprocessgroup: CgroupMap::FindController called for [1] failed, RC file
> was not initialized properly
>
>
> init: starting service 'storageproxyd'...
> libprocessgroup: CgroupMap::FindController called for [1] failed, RC file
> was not initialized properly
> libprocessgroup: Failed to make and chown /uid_0: Read-only file system
> init: createProcessGroup(0, 830) failed for service 'storageproxyd': Read-only
> file system
> libprocessgroup: CgroupMap::FindController called for [830] failed, RC
> file was not initialized properly
> init: cpuset cgroup controller is not mounted!
> init: Service 'storageproxyd' (pid 830) exited with status 1
> init: Sending signal 9 to service 'storageproxyd' (pid 830) process group
> ...
>
> ...and so on in loop
>
> However I'm still not sure to proceed correctly, as I'm doing everything
> alone with no documentation (I may have missed it?)
>
> Is here some documentation available? If there isn't, is someone able to
> provide an example of working qemu command line (even old or unoptimized),
> or just few explanations so that I can be placed on the right track?
>
> Thank you very much in advance
>
>
> On 3/1/20 2:14 PM, Julien Robin wrote:
>>
>> Hi there,
>>
>> I see that starting from branch android-10.0.0_r1, lunch offers a choice
>> called qemu_trusty_arm64-userdebug, in which I'm interested
>>
>> However, I got the following error, no matter which OS I'm using for
>> building (be it Ubuntu 18.048 or Debian 10). I have this error on r1, r20
>> and r29.
>>
>> [ 62% 16150/26047] Create system-qemu.img now
>> FAILED: out/target/product/trusty/system-qemu.img
>> /bin/bash -c "(export SGDISK=out/host/linux-x86/bin/sgdisk
>> 

[android-building] Installation Android Test Station en local

2020-03-02 Thread Amani Rekik
Bonjour les amis,

Je voudrais installer Installation Android Test Station en local. J'ai 
cherché les étapes pour l'installer en local, mais je ne les ai pas trouvé. 
J'ai pu lancer l'application en utilisant l'image mtt, mais maintenant je 
voudrai modifier le code c'est pourquoi il faut que je l'installe en local. 
Vous trouverez le code souce dans ces deux lien:

   - Android Test Station 
   

 
   source code
   - TradeFed Cluster 
   

 
   source code

Je les ai trouvé dans cette page: 
https://source.android.com/compatibility/tests/development/android-test-station#advanced-features
Merci pour votre aide,

-- 
-- 
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/8bb5cb6d-9ddb-4280-a8a3-a82489d82b74%40googlegroups.com.


[android-building] Re: android10.0.0_rxx : lunch qemu_trusty_arm64-userdebug fails

2020-03-02 Thread Julien Robin
I succeeded to find a workaround for the issue I signaled here, editing 
device/generic/trusty/BoardConfig.mk and putting BUILD_QEMU_IMAGES to 
false, which still gives vendor.img, system.img and userdata.img

I then found this kernel 
https://android.googlesource.com/kernel/common/+/refs/heads/android-trusty-4.19,
 
and using arch/arm64/configs/trusty_qemu_defconfig, I successfully built it.

Also, I'm able to start most of this Android build on Debian 10 provided 
qemu-system-aarch64 the following way :

qemu-system-aarch64
-M virt
-cpu cortex-a57
-smp 1
-m 2048
-monitor none
-parallel none
-serial mon:stdio
-kernel Image -append "root=/dev/vda rootfstype=ext4 ro init=/init 
loglevel=8 selinux=1 checkreqprot=1 androidboot.selinux=permissive 
androidboot.hardware=qemu_trusty console=ttyAMA0"
-device virtio-gpu-pci
-drive format=raw,file=system-custom.img
-drive format=raw,file=userdata-custom.img

userdata-custom.img is just a bigger userdata.img (1024MB instead of 4) in 
which I used resize2fs, system-custom.img is just a system.img in which the 
placeholder folder "vendor" now embeds the content of vendor.img, copied by 
"cp -a". Finally, still into system-custom.img, fstab.qemu_trusty only 
contains 
LABEL=data  /data   ext4  noatime,nosuid,nodev,
errors=panicwait
So that /data (available at /dev/vdb) is mounted by its label, while 
system-custom.img embeding root system and vendor is already mounted by 
kernel cmdline (by /dev/vda). ramdisk.img is not used as system.img already 
contains everything needed to start init.

However, I guess I should use a slightly modified version of qemu, 
available here 
https://android.googlesource.com/trusty/external/qemu/+/refs/heads/master
Because using Debian 10 qemu version, I get the following output, and no 
display :

init: init first stage started!
[...]
init: Loading SELinux policy
[...]
selinux: SELinux: Loaded policy from /vendor/etc/selinux/
precompiled_sepolicy

selinux: SELinux: Loaded file_contexts

random: init: uninitialized urandom read (40 bytes read)
random: init: uninitialized urandom read (40 bytes read)
init: init second stage started!
[...]
ueventd: Coldboot took 1.344 seconds
[...]
init: starting service 'storageproxyd'...
libprocessgroup: CgroupMap::FindController called for [1] failed, RC file 
was not initialized properly
libprocessgroup: Failed to make and chown /uid_0: Read-only file system
libprocessgroup: CgroupMap::FindController called for [829] failed, RC file 
was not initialized properly
init: createProcessGroup(0, 829) failed for service 'storageproxyd': Read-only 
file system
init: cpuset cgroup controller is not mounted!
init: Service 'storageproxyd' (pid 829) exited with status 1
init: Sending signal 9 to service 'storageproxyd' (pid 829) process group...
libprocessgroup: CgroupMap::FindController called for [1] failed, RC file 
was not initialized properly
libprocessgroup: CgroupMap::FindController called for [1] failed, RC file 
was not initialized properly


init: starting service 'storageproxyd'...
libprocessgroup: CgroupMap::FindController called for [1] failed, RC file 
was not initialized properly
libprocessgroup: Failed to make and chown /uid_0: Read-only file system
init: createProcessGroup(0, 830) failed for service 'storageproxyd': Read-only 
file system
libprocessgroup: CgroupMap::FindController called for [830] failed, RC file 
was not initialized properly
init: cpuset cgroup controller is not mounted!
init: Service 'storageproxyd' (pid 830) exited with status 1
init: Sending signal 9 to service 'storageproxyd' (pid 830) process group...

...and so on in loop

However I'm still not sure to proceed correctly, as I'm doing everything 
alone with no documentation (I may have missed it?)

Is here some documentation available? If there isn't, is someone able to 
provide an example of working qemu command line (even old or unoptimized), 
or just few explanations so that I can be placed on the right track?

Thank you very much in advance


On 3/1/20 2:14 PM, Julien Robin wrote:
>
> Hi there,
>
> I see that starting from branch android-10.0.0_r1, lunch offers a choice 
> called qemu_trusty_arm64-userdebug, in which I'm interested
>
> However, I got the following error, no matter which OS I'm using for 
> building (be it Ubuntu 18.048 or Debian 10). I have this error on r1, r20 
> and r29.
>
> [ 62% 16150/26047] Create system-qemu.img now
> FAILED: out/target/product/trusty/system-qemu.img
> /bin/bash -c "(export SGDISK=out/host/linux-x86/bin/sgdisk 
> SIMG2IMG=out/host/linux-x86/bin/simg2img; 
>  device/generic/goldfish/tools/mk_combined_img.py -i 
> out/target/product/trusty/system-qemu-config.txt -o 
> out/target/product/trusty/system-qemu.img)"
> 1+0 records in
> 2048+0 records out
> 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0063128 s, 166 MB/s
> Traceback (most recent call last):
>   File 

[android-building] Modify and install dex2oat in android10 (apex issues)

2020-03-02 Thread Paschalis Mpeis
Hello,


In part of my development cycle I want to be able to compile and test the 
*dex2oat* utility relatively easy.

I am using android10-release 
 
on 
*sailfish*, and I am having some issues since the apex introduction.
Previously just building and pushing dex2oat to /system/bin/ was enough.

*dex2oat* utility belongs to the runtime apex, which comes in two variants:
- com.android.runtime.release, and 
- com.android.runtime.debug

For example, *libart.so* and* libart-compiler.so* on a user-debug build are 
put on this directory:
*/system/apex/com.android.runtime.debug/*
So I can mount* /system*, push the above libraries, and on reboot my 
changes are on effect.
I know it is not supposed to be done like that, but for development 
purposes is fine and fast.

*dex2oat* however, for some reason on the user-debug build is put on: 
*/apex/com.android.runtime/*
Since it is not under* /system*, it cannot be mounted as r/w using 
instructions found here 

.
I know */apex* it is already a mountpoint from an installed apex, but I 
wasn't able to generate just the runtime .apex file from aosp.


*Attempt1:* Put dex2oat out of runtime.release apex:
I've tried to remove it from release and put it in the debug by modifying 
art/build/apex/Android.bp 

.
The idea was to use the same workflow that I've used for* libart.so*, but 
the phone won't boot.
Specifically, I moved it from art_runtime_base_binaries_prefer32 

 
to art_runtime_debug_binaries_prefer32_device 
.
 
f 
I've also exported this DISABLE_APEX_LIBS_ABSENCE_CHECK to true, so 
build/make wont complain.
But I am sure that I am missing something somewhere..

*Attempt2:* Generate a new apex
The proper way would be to generate a new apex, with some instructions here 
,
 
and then install it to the device.
The instructions mention however that apex is under development, and it 
does not mention how to create the apex_payload.img for example.
Also here 

 it 
says that the runtime apex is not update-able on android10. I assume on 
release builds with an OTA mechanism,
but still it is not clear whether it is possible without building each time 
the whole system.img and then flash it (which is quite inconvenient).

I've tried the following:
*1. m com.android.runtime.release.dex2oat_32*
This builds and puts dex2oat at:
/system/apex/com.android.runtime.release/bin/

I guess this is a quick way of updating the apex with the new version of 
*dex2oat*.

*2. m com.android.runtime.release*
This does take a lot of time, and it builds everything from the apex.
I should run this once, and then proceed update with step 1.

*Questions:*
*1. *What is the best way to modify and push dex2oat for quick develop/test 
cycle.
Is the attempt1 a viable approach? Or any other approach that does not 
require reflashing the
whole system.img?

*2.* If I have to generate a new runtime release apex: is there any make 
target that generates and signs it in the soong build system?
For my attempt2, what is the instruction to generate the apex_payload.img 
on a user-debug build? 


Thanks for your time,
Paschalis


-- 
-- 
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/1b9e5e9e-3bfb-47e6-9a61-8425000cd2f8%40googlegroups.com.


[android-building] Debug kernel pixel 2

2020-03-02 Thread Cao Hoc Nguyen
Hi everyone,

I want to debug kernel on pixel 2,
I flashed userdebug onto pixel2,
how to debug kernel ?

Best regrards,
lofiboy

-- 
-- 
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/f5b65ca4-f624-4b10-b891-3932fab98ef6%40googlegroups.com.


[android-building] Generate external/llvm Intrinsics.gen and Attributes.inc on android10

2020-03-02 Thread Paschalis Mpeis
Hi there,

I am building some tools from *external/llvm*, specifically *opt*, 
*llvm-link*, and* llc*.
For this, I revived the relevant Android.mk from previous commits
(for each of the tools, and a relevant portion at external/llvm/Android.mk).
They are normally picked up by the soong build system, and I can for 
example call: `m opt`.

However, these tools depend on *two intermediates*:

   - 
   
target/product//gen/EXECUTABLES/opt_intermediates/llvm/IR/Attributes.inc
   - 
   
target/product//gen/EXECUTABLES/opt_intermediates/llvm/IR/Intrinsics.gen

I have enabled FORCE_BUILD_LLVM_COMPONENTS (see here 

)
and I can see there are relevant entries for what I want at lines: 148 

 and  154 

.

So, is my question is: is there a way to generate those 2 intermediate 
files using the existing Android.bp setup on android10-release branch 

?

Cheers,
Paschalis

-- 
-- 
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/6e937488-80cb-42c8-b15c-087cafb7c400%40googlegroups.com.