Wart Unexpected Cpu Variant for X86 Using Defaults X8664
OS Customization for XR Device
XR devices demand OS customization to support the enterprise's needs. Sharing my feel of edifice a custom android image.
The Operating System of XR devices is mostly customized to the hardware of the device, and not only that the OS level customizations are needed to meet the enterprise needs such every bit integration with Enterprise MDM (Mobile Device Management) solutions (such as Intune, MobileIron, Airwatch, and Soti), 3D lock screen, idle-timeout, custom home/launcher screen, custom settings, security, as so on.
Most organizations currently using traditional hardware and software assets such as mobile devices, laptops, and desktops, and the processes and policies for managing these devices are quite stable and straightforward by now. Now the expectation is to follow the same/similar process for managing the organization's XR devices. Most enterprise MDM supports standard Bone (Windows, Mac, Linux, and Android), but mostly these are not well aligned to 3D user experience.
There are a number of XR devices based on Android, eg Oculus, Google Glass, Vuzix, and ARCore/VR supported Smart Phones. This article is a first step toward building a custom Android OS and modest customizations. We will use the Android Open Source Projection (AOSP) to build the custom image equally per our needs.
Have a deep jiff, this will be a lengthy chore, you need to expect for hours and hours to finish the steps, and plan your fourth dimension ahead.
Allow's start …
Earlier you lot start
Expect, before y'all start. Information technology needs 230GB plus free disk space, and a decent Linux based environment. I was able to go a spare Mac Book Pro with 230 GB available infinite, I thought of setting the environment post-obit the guide from https://medium.com/@christopherney/building-android-o-with-a-mac-da07e8bd94f9
Just later, I found that after bones build software installations and IDE setup, space bachelor is less than 220 GB. Luckily I was in touch with an Android skilful Ashish Pathak, he suggested not to take a risk and find other PC.
And here we go, found a Windows 10 PC with 380GB gratuitous infinite.
Let'south first gear up a Linux environment from scratch. Retrieve Virtual Box etc are not the option here, let's non complicate things.
Ok, allow'southward get-go now…
Setup a Linux based Evolution Environment
Follow the steps below to set upward a Linux environment from scratch on a Windows PC.
- Free up the memory space — Open Deejay Managing director and choose the Shrink deejay/delete an unused drive, and let space comes as unallocated, no need to format it, while installation the unallocated space will be formatted every bit per the Linux OS.
- Download Ubuntu Desktop Os Epitome — https://releases.ubuntu.com/16.04/
- Create a Bootable image — Download Rufus from https://rufus.ie/, insert a USB pen drive (I used one of size 8GB), select the downloaded Ubuntu ISO image, and starting time creating the image bootable prototype.
- It will some minutes and in one case you see "Ready" squirt the USB safely.
- Kick from the Pen Drive — On windows Bone, choose restart, and printing F9 while starting (for me information technology worked, try to look at what does your PC back up to meet boot bill of fare), it will show a boot menu, choose the pen drive selection. It will first the Ubuntu installation. Become with the default options.
- Setup Ubuntu — During installation, it will reboot, and cull Ubuntu pick from the kick menu, and and then choose the timezone, linguistic communication, and prepare a user account (think credentials please for later login). You lot will encounter the Ubuntu dwelling house screen, and see keyboard shortcuts. Call back these.
Congratulations! it's ready now.
Setup Android Build Environs
Follow the beneath steps to set up a build environment for AOSP. Detailed steps are hither
- Install Git — https://git-scm.com/downloads — Linux version
- Install Repo Tool — https://gerrit.googlesource.com/git-repo/+/refs/heads/master/README.md
$ sudo apt-get install repo - Install Java 8 —
$ sudo apt-go install openjdk-eight-jdk - Create a working directory
arvr@arvr-pc:/$ cd ~
arvr@arvr-pc:~$ mkdir aosp
arvr@arvr-pc:~$ cd aosp
arvr@arvr-pc:~/aosp$ Download AOSP Source Lawmaking
- Initialize the AOSP repository source code (the default is master): I fetched from the android-8.1.0_r18 co-operative to build for my old Android device, You may want to go for the latest.
arvr@arvr-pc:~/aosp$ repo init -u https://android.googlesource.com/platform/manifest -b android-8.1.0_r18 --depth=1 - Yous need to ready the correct username and email in git config, to make the above succeed.
git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "MY_NAME@example.com" - Sync the Repo
arvr@arvr-pc:~/aosp$ repo sync -cdj16 --no-tags Checking out files: 100% (9633/9633), done.
Checking out files: 100% (777/777), done.tform/system/coreChecking out files: 23% (181/777)
Checking out files: 100% (34/34), done.latform/exam/vts-testcase/performanceChecking out files: 32% (eleven/34)
Checking out projects: 100% (592/592), done.
repo sync has finished successfully.
arvr@arvr-pc:~/aosp$
It takes a couple of hours to complete, I let information technology run in the night, with caffeine ON.
Parallel to this, I take also started downloading Android Studio, with SDK, emulators or then. — Follow the steps
Good night!
Build the source code
Practiced morning time, source code is downloaded, the Android Studio is too prepare.
Allow'southward exercise another big chunk, building the source lawmaking
- Set up the environment
arvr@arvr-pc:~/aosp$ source build/envsetup.sh
including device/asus/fugu/vendorsetup.sh
including device/generic/car/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips64/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/uml/vendorsetup.sh
including device/google/dragon/vendorsetup.sh
including device/google/marlin/vendorsetup.sh
including device/google/muskie/vendorsetup.sh
including device/google/taimen/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/linaro/hikey/vendorsetup.sh
including sdk/bash_completion/adb.bash - Now luncheon control is available for yous, laissez passer an x86 target to it, arm ones are quite slow. lunch command without whatsoever parameter lists the options, choose one of them
arvr@arvr-pc:~/aosp$ tiffin You're building on Linux Tiffin menu... option a philharmonic:
1. aosp_arm-eng
two. aosp_arm64-eng
iii. aosp_mips-eng
four. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
seven. full_fugu-userdebug arvr@arvr-pc:~/aosp$ tiffin five ============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=viii.1.0
TARGET_PRODUCT=aosp_x86
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPM1
TARGET_BUILD_APPS=
...
OUT_DIR=out
AUX_OS_VARIANT_LIST=
============================================
- Run make command — "brand" or "1000" with parallelization 16.
arvr@arvr-pc:~/aosp$ make -j16 REALLY setting name!
Alarm: The kernel is however using the old partition table.
The new table will exist used at the side by side reboot.
The functioning has completed successfully. #### build completed successfully (01:43:31 (hh:mm:ss)) ####
This command took skillful two hours, and your emulator is ready now. Good noon!
Run the emulator
At present the emulator is fix, let's run information technology.
arvr@arvr-pc:~/aosp$ emulator &
[1] 11121
arvr@arvr-pc:~/aosp$ emulator: Alarm: system sectionalisation size adjusted to match image file (2562 MB > 200 MB) emulator: Warning: cannot read adb public fundamental file: /home/arvr/.android/adbkey.pub
qemu-organisation-i386: -device goldfish_pstore,addr=0xff018000,size=0x10000,file=/home/arvr/aosp/out/target/product/generic_x86/data/misc/pstore/pstore.bin: Unable to open /home/arvr/aosp/out/target/product/generic_x86/data/misc/pstore/pstore.bin: No such file or directory
Your emulator is out of engagement, please update by launching Android Studio:
- Showtime Android Studio
- Select menu "Tools > Android > SDK Manager"
- Click "SDK Tools" tab
- Cheque "Android Emulator" checkbox
- Click "OK"
Your fresh android image is running. Congratulations. You should see information technology in the list of connected devices in ADB.
arvr@arvr-pc :~/aosp$ adb devices
List of devices fastened
emulator-5554 device You tin install applications on this emulator but like any other.
Customizing the Settings App
Permit's presume, we want to customize the Settings app for our XR need. Let'south open the settings I wanted to customize a settings app.
Oops! the settings app is failing to load.
Logcat tied to look through the logs using logcat.
arvr@arvr-pc :~/aosp$ adb logcat
05–10 eleven:21:10.091 1640 1651 I ActivityManager: Outset u0 {human action=android.intent.action.Master true cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.settings/.Settings (has extras)} from uid 10015 05–10 xi:21:10.092 1604 2569 West audio_hw_generic: Not supplying plenty data to HAL, expected position 895044 , merely wrote 894994 05–10 11:21:x.126 1383 1383 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 1540096 05–ten 11:21:10.130 2782 2782 Westward zygote : Unexpected CPU variant for X86 using defaults: x86 05–10 11:21:10.132 1640 1759 I ActivityManager: Start proc 2782:com.android.settings/1000 for activity com.android.settings/.Settings 05–i This issue may exist related to the branch Android 8.i that I checked out, I tried to rebuild "thou clean" and "chiliad" simply no luck. Adept evening!
Luckily I am non the only one facing this, I found this.
Now I got 2 suggestions and go to either get and change WifiDisplaySettings.java in the AOSP packages or just clean build with the user-debug target. I volition go with the first selection.
Open the Settings App in Android Studio
Locate the settings in /packages/apps/Settings and open in Android Studio.
Open up /src/com/android/settings/wfd/WifiDisplaySettings.java
Change the code snippet
public static boolean isAvailable(Context context) {
return context.getSystemService(Context.DISPLAY_SERVICE) !=
null && context.getSystemService(Context.WIFI_P2P_SERVICE) != null;
} To
public static boolean isAvailable(Context context) {
return false;
} Let's build again, some other few hours? No, don't worry this time it won't take long, it will build simply what yous have changed. Run the make command over again.
arvr@arvr-pc :~/aosp$ m -j16 The operation has completed successfully.
[1]+ Done emulator (wd: ~/aosp)
(wd now: ~/aosp/packages/apps/Settings/src/com/android/settings/wfd)
#### build completed successfully (02:44 (mm:ss)) #### arvr@arvr-pc :~/aosp$ emulator &
The emulator is now built with changes, run the emulator at present. And here you go, Settings app is working!
Customize the Settings App
Hay! you know, you accept already customized the android epitome. Not excited plenty, let'south do one more exercise to customize the Settings Bill of fare options.
Open /res/values/strings.xml and change some menu titles eg. change "Battery" title to "Kuldeep Power" and "Network & Internet" to "K Network & Internet".
<string name="power_usage_summary_title">Kuldeep Power</cord>
<cord name="network_dashboard_title">K Network & Cyberspace</string> Build the image (thou command) and run the emulator every bit described in the last step, expect for a few minutes and you take your customized android menu.
With this, I would close the article, and say y'all expert dark. I will write about flashing this image to a device afterward, the spare phone for which I am edifice this image, is not working, looks like my son has experimented with that old phone.
In the futurity, nosotros will talk over how to customize native users managements in android based XR devices, and also how to handle device-specific options that are non supported in the regular phone.
Read another article to build and deploy organisation apps for AOSP.
Good Nighttime, continue learning! go along sharing!
Source: https://medium.com/xrpractices/os-customization-for-xr-device-27f0989bd960
0 Response to "Wart Unexpected Cpu Variant for X86 Using Defaults X8664"
Post a Comment