For creating an AVD off your platform build, currently there aren't good
happy paths for it yet (we're working on it). A stopgap solution is to
setup some default AVD in Studio (doesn't matter what the name is, let's
call it 'someAvd' for now), note the path to the system image in
$ANDROID_SDK_ROOT/system-images/..../x86 or x86_64, in
~/.android/avd/someAvd.avd/config.ini

Then, we can produce a img.zip in the Android build tree that contains a
set of files that can replace the files in any
$ANDROID_SDK_ROOT/system-images/..../x86, x86_64 folder:

echo $ANDROID_PRODUCT_OUT
MYPACKEDIMG=$1

mkdir -p $MYPACKEDIMG/img
rm -rf $MYPACKEDIMG/img/*
cd $MYPACKEDIMG/img
cp $ANDROID_PRODUCT_OUT/system-qemu.img system.img
cp $ANDROID_PRODUCT_OUT/vendor-qemu.img vendor.img
cp $ANDROID_PRODUCT_OUT/ramdisk-qemu.img ramdisk.img
if [ -f $ANDROID_PRODUCT_OUT/kernel-ranchu-64 ]; then
    cp $ANDROID_PRODUCT_OUT/kernel-ranchu-64 kernel-ranchu-64
else
    cp $ANDROID_PRODUCT_OUT/kernel-ranchu kernel-ranchu
fi;
cp -rf $ANDROID_PRODUCT_OUT/data .
cp -rf $ANDROID_PRODUCT_OUT/advancedFeatures.ini advancedFeatures.ini
cp -rf $ANDROID_PRODUCT_OUT/userdata.img .
cp -rf $ANDROID_PRODUCT_OUT/encryptionkey.img .
cp -rf $ANDROID_PRODUCT_OUT/system/build.prop .
cp -rf $ANDROID_PRODUCT_OUT/VerifiedBootParams.textproto .
cp -rf $ANDROID_PRODUCT_OUT/source.properties .

cd ..
zip -1rq img.zip img/*
ls -l img.zip

After replacing the files there, wiping AVD data and launching the AVD
'someAvd' from Studio should work.

On Wed, Aug 5, 2020 at 7:50 AM Bastien Chanot <[email protected]>
wrote:

> Hi everyone ! I hope you are all good =)
>
> I am talking to you today for asking you something. I don't find any
> answer on internet, so maybe some of you got it !
>
> I just built a AOSP build, successfully, and i wish to add it to my
> android studio emulator. (on Ubuntu !)
>
> I tried to follow the link https://source.android.com/setup/create/avd, i
> followed the process correctly, added the link ( like this
> file:///home/bchanot/Custom/repo-sys-img.xml)
> But when i am trying to create an AVD through the Android Virtual Device
> software, i cannot find the image i specified in link.
>
> Can someone help me ?
>
> Thanks for all and sorry if i am not clear enough, ask me some questions !
>
> Best regards,
> Bastien.
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/1bea0c3e-2068-4f15-9701-fbd2cc5d8c41o%40googlegroups.com
> <https://groups.google.com/d/msgid/android-building/1bea0c3e-2068-4f15-9701-fbd2cc5d8c41o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAEkmjvXb1V9-FbRN3aamy54BxAXPHroUZvWPfOx%2BseR%3D1hX26w%40mail.gmail.com.

Reply via email to