[kvm][android][windows]does anyone run windows ok on Android based on qemu + kvm - General Questions and Answers

I run linux ok based on qemu + kvm.I test many Linux distribution(ubuntu、rocky、anolios、opensuse),All of them run ok。
But when I run windows(I tried many different versions of window arm64 version),it will appear BOSD before enter installation UI,I'll appreciate it if anyone can help me
below is my command to start windows
taskset f /data/data/com.termux/files/usr/bin/qemu-system-aarch64 \
-M virt \
-vnc 127.0.0.1:1 -monitor vc \
-cpu host \
-enable-kvm \
-m 10G \
-bios QEMU_EFI.fd \
-device VGA \
-device nec-usb-xhci \
-device usb-kbd \
-device usb-mouse \
-cdrom 22478.1000.211008-1414.RS_PRERELEASE_CLIENTMULTI_A64FRE_ZH-CN.ISO \
-device usb-storage,drive=drivers \
-drive if=none,id=drivers,readonly=on,file=Drivers.vhdx \
-device virtio-blk,drive=system \
-drive if=none,id=system,format=qcow2,file=win10.qcow2 \
-boot order=cd \
-serial stdio
Click to expand...
Click to collapse
below is my bsod
KVM (Kernel Virtual Machine) on Samsung Galaxy A6 (Exynos 7870)
I have an Galaxy A6 which has the Exynos 7870 CPU. I downloaded the kernel source from the Samsung source page, and when I typed make menuconfig it has the Virtualization option. So does that mean the CPU itself support KVM? Thanks! I just...
forum.xda-developers.com
my kernel version is 4.14.186+
my chip is MTK MT6891

Related

Opera Mini 4.2 and Write user data...

Firstly, I'm using an AT&T Fuze, stock ROM and I'd like to keep it stock.
I installed the signed version of Opera Mini 4.2 and, under permissions, it doesn't allow me to change the permission for "Write user data" as well as "Read user data". I've looked through the forums trying to find a solution that doesn't involve flashing the device.
I took a look at the selector.utf file and here's what it looked like after I installed OM (I haven't uninstalled any of the stock apps as yet):
Code:
nextroot=9
suite=Brain Challenge 2 DEMO, \
icon=/i.png, \
vendor=Gameloft SA, \
root=s0_, \
num=1, \
preinstalled=N, \
domain=cingular_preferred, \
removable=Y, \
rootCertHash=+sWuMjMvveQMkjVi4unVDQHNYnA=, \
signingInfo=Divertissement Gameloft\, CA, \
permissions=XXXXDXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210061499, \
drmProtected=N, \
drmRenewable=N
midlet=Brain Challenge 2 DEMO, \
icon=/i.png, \
class=GloftMBRC
suite=Bubble Bash DEMO, \
icon=/icon.png, \
vendor=Gameloft SA, \
root=s1_, \
num=1, \
preinstalled=N, \
domain=cingular_preferred, \
removable=Y, \
rootCertHash=+sWuMjMvveQMkjVi4unVDQHNYnA=, \
signingInfo=Divertissement Gameloft\, CA, \
permissions=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210096643, \
drmProtected=N, \
drmRenewable=N
midlet=Bubble Bash DEMO, \
icon=/icon.png, \
class=GloftBUBA
suite=My-Cast 5 Weather, \
icon=16_app.png, \
vendor=Digital Cyclone\, Inc., \
root=s2_, \
num=1, \
preinstalled=N, \
domain=cingular_preferred, \
removable=Y, \
rootCertHash=+sWuMjMvveQMkjVi4unVDQHNYnA=, \
signingInfo=Digital Cyclone Inc\, US, \
permissions=XXXXDXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210138627, \
drmProtected=N, \
drmRenewable=N
midlet=My-Cast 5 Weather, \
icon=16_app.png, \
class=phone.MyCastMidlet
suite=WikiMobile, \
icon=/allimages/icon15x15.png, \
vendor=BonfireMedia, \
root=s3_, \
num=1, \
preinstalled=N, \
domain=cingular_preferred, \
removable=Y, \
rootCertHash=+sWuMjMvveQMkjVi4unVDQHNYnA=, \
signingInfo=Bonfire Media Inc.\, US, \
permissions=XXXXDXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210177708, \
drmProtected=N, \
drmRenewable=N
midlet=WikiMobile, \
icon=/allimages/icon15x15.png, \
class=wikimobileMidlet
suite=Billboard, \
icon=icon.png, \
vendor=Hands-On Mobile\, Inc., \
root=s4_, \
num=1, \
preinstalled=N, \
domain=cingular_trusted, \
removable=Y, \
rootCertHash=2qeXj3fAwOWA4ZcvYdmTmJrCoxM=, \
signingInfo=Hands-On Mobile Inc.\, US, \
permissions=XXXXDXXXXXXXXXXXXXXXXXXXXXXXXX, \
install_time=1221210474866, \
drmProtected=N, \
drmRenewable=N
midlet=Billboard, \
icon=icon.png, \
class=Billboard
suite=Opera Mini, \
icon=/i.png, \
vendor=Opera Software ASA, \
root=s8_, \
num=1, \
preinstalled=N, \
domain=trusted, \
removable=Y, \
rootCertHash=dCwxkuYH5CTrRUlUK+G7xT5hdOI=, \
signingInfo=Opera Software ASA\, NO, \
permissions=XDDDDDXXXXXXXDDXXXXXXXXXDDDDDX, \
fg_permissions=DDDDDDDD, \
install_time=1246652430205, \
drmProtected=N, \
drmRenewable=N
midlet=Opera Mini, \
icon=/i.png, \
class=Browser
Initially, I thought I could just copy the permissions from, say, Wikimobile to the OM permissions line, but this makes no difference, the options to read and write data are still unchangeable and locked to 'Never Allow.' I also don't know what the fg_permissions is for, but removing that makes none of my applets show up in the manager.
I forgot to mention, on my Tornado (using Intent's java), I can install the unsigned version and, tho I get annoying confirmation messages, am able to save and read data from the phone. Is the esmertec manager on the Fuze just kinda broken and useless? Why do some apps have permission and others don't?
In looking through the s8_suite.utf (the one associated with Opera Mini on my device) I see a section for permissions and even listings for javax.microedition.io.Connector.file.write and read. Seeing these permissions listed would suggest (to me) they should show up under the permission list...
Sadly, I don't know enough about hex editing to tweak it. I looked at the wikimobile .utf file and it doesn't look much like the Opera one (obviously)...
I hate to bump my own thread, but I'd really like to know if anyone has gotten this to work. I really like using Opera Mini over Mobile and terribly miss the ability to save pages/images with it.
I've read through the Midlet Bible post and found nothing helpful (short of installing a different midlet manager).

[Q]

I'm building some common gnu/linux console utilities for my Android phone but so far I have only been able to build them statically, with quite a size penalty. Can someone walk me through the steps or point me to a howto for dynamic compiles using arm shared libraries?
Here's the script(s) I'm using for configuration:
Code:
./configure --host=arm-none-linux-gnueabi \
CC="arm-none-linux-gnueabi-gcc" \
CROSS_COMPILE="arm-none-linux-gnueabi-" \
CFLAGS=" -static $_XXFLAGS" \
for shared:
Code:
./configure --host=arm-none-linux-gnueabi \
CC="arm-none-linux-gnueabi-gcc" \
CROSS_COMPILE="arm-none-linux-gnueabi-" \
--enable-shared=yes --enable-static=no
Do I need to make the libs on my android phone avaiable to my cross-compiler? Google isn't helping me here.
Bump. Anyone?
Never mind on this. I learned that using the cross-compiler supplied by Google is the way to go.

ATRIX™ 2 ME865 Kernal downloads Maybe useful

This may be of use to some devs here. but I came across a few links that may be old news or maybe not...
here are the files and source
RAZR XT910 Developer Edition 698 MB
RAZR-XT910-DE_01.6.5.1-167_SPU-15-M2-1-DE .zip
http://developer.motorola.com/products/software/
kernel_omap4.tar.gz
http://sourceforge.net/projects/me865.motorola/
http://sourceforge.net/projects/me865.motorola/files/ME865/5.5.1-1_GC-109/
PHP:
1. Create a workspace containing "vanilla" gingerbread release from Google. You may need to apply the following change in build repo to prevent the build from aborting when unexpected user tag is found on some modules:
diff --git a/core/base_rules.mk b/core/base_rules.mk
index 3c11673..ecf611d 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -99,7 +99,7 @@ ifneq ($(filter $(LOCAL_MODULE_TAGS),user),)
$(warning * PRODUCT_PACKAGES section of)
$(warning * build/target/product/core.mk)
$(warning * )
- $(error user tag detected on new module - user tags are only supported on legacy modules)
+ $(warning user tag detected on new module - user tags are only supported on legacy modules)
endif
endif
2. Overlay Motorola-provided published repos on top of original Google versions.
3. Build user space components:
cd <workspace>
. build/envsetup.sh
lunch generic-user
make BOARD_HAVE_BLUETOOTH=true TARGET_BOARD_PLATFORM=omap4 <target>
Where is something like out/target/product/generic/system/bin/bluetoothd
4. Building kernel and kernel modules.
# set this to the top of your android workspace
my_top_dir=....
# set this to where you want kernel intermediates written to
kernel_out_dir=...
# cross compiler
cross=$my_top_dir/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make -j1 -C $my_top_dir/kernel/omap4 ARCH=arm \
CROSS_COMPILE=$cross \
O=$kernel_out_dir \
KBUILD_DEFCONFIG=mapphone_defconfig \
defconfig modules_prepare
make -C $my_top_dir/kernel/omap4 ARCH=arm \
CROSS_COMPILE=$cross \
O=$kernel_out_dir \
INSTALL_MOD_PATH=$kernel_out_dir \
modules 2>&1
make -C $my_top_dir/kernel/omap4 ARCH=arm \
CROSS_COMPILE=$cross \
O=$kernel_out_dir \
INSTALL_MOD_PATH=$kernel_out_dir \
modules_install
make -C $my_top_dir/kernel/omap4 ARCH=arm \
CROSS_COMPILE=$cross \
O=$kernel_out_dir zImage
make PREFIX=$kernel_out_dir CROSS=$cross CROSS_COMPILE=$cross \
PROCFAMILY=OMAP4430 PROJROOT= HOST_PLATFORM=sdc4430 \
KRNLSRC=$my_top_dir/kernel/omap4 KERNEL_DIR=$kernel_out_dir \
-C $my_top_dir/hardware/ti/wlan/wl1283/platforms/os/linux
# newly built module in $my_top_dir/hardware/ti/wlan/wl1283/platforms/os/linux/tiwlan_drv.ko
make PREFIX=$kernel_out_dir CROSS=$cross CROSS_COMPILE=$cross \
PROCFAMILY=OMAP4430 PROJROOT= HOST_PLATFORM=sdc4430 \
KRNLSRC=$my_top_dir/kernel/omap4 KERNEL_DIR=$kernel_out_dir \
-C $my_top_dir/hardware/ti/wlan/wl1283_softAP/platforms/os/linux
# newly built module in $my_top_dir/hardware/ti/wlan/wl1283_softAP/platforms/os/linux/tiap_drv.ko
make PREFIX=$kernel_out_dir CROSS=$cross CROSS_COMPILE=$cross \
PROCFAMILY=OMAP4430 PROJROOT= HOST_PLATFORM=sdc4430 \
KRNLSRC=$my_top_dir/kernel/omap4 KERNEL_DIR=$kernel_out_dir \
-C $my_top_dir/kernel/omap4 ARCH=arm \
O=$kernel_out_dir \
M=$my_top_dir/vendor/authentec/safenet/vpndriver modules
# newly built module in $my_top_dir/vendor/authentec/safenet/vpndriver/vpnclient.ko
5. Building lbl:
make -f motorola/external/lbl/Makefile all \
LBL_OUT=out/target/product/generic/obj/PARTITIONS/lbl_intermediates HOST_PREBUILT_TAG=linux-x86

[Q] Add GApps to AOSP build

Hi all,
I had a look at other threads but am still lost. I'm building AOSP for a variscite board and would like to include the gapps at build time. So I've downloaded the zip and in device/variscite/varsom/varsom.mk I added
PRODUCT_COPY_FILES += \
$(foreach f,$(wildcard vendor/google/addon.d/*),$(f):system/addon.d/$(notdir $(f))) \
$(foreach f,$(wildcard vendor/google/framework/*),$(f):system/framework/$(notdir $(f))) \
$(foreach f,$(wildcard vendor/google/lib/*),$(f):system/lib/$(notdir $(f))) \
vendor/google/etc/g.prop:system/etc/g.prop \
$(foreach f,$(wildcard vendor/google/etc/permissions/*),$(f):system/etc/permissions/$(notdir $(f))) \
$(foreach f,$(wildcard vendor/google/etc/preferred-apps/*),$(f):system/etc/preferred-apps/$(notdir $(f))) \
The thing is I'm stuck as to how I copy the apks in system/app. When I add them to PRODUCT_COPY_FILES it throws an error saying I should use BUILD_PREBUILT but I'm not sure what I means, thanks for any help!

Repacked boot.img with my compiled Poco M3 kernel won't boot

I compiled the Xiaomi poco M3 kernel from
https://github.com/MiCode/Xiaomi_Kernel_OpenSource
on branch
lime-q-oss
with commands
export ARCH=arm64 && export SUBARCH=arm64
export CROSS_COMPILE=/opt/aosp_prebuilts/aarch64-linux-android-4.9/bin/aarch64-linux-android-
export DTC_EXT=
make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- vendor/citrus-perf_defconfig
make ARCH=arm64 CC=clang CLANG_TRIPLE=aarch64-linux-gnu- EXTRA_CFLAGS="-I $PWD/techpack/display/pll/ -I $PWD/techpack/camera/drivers/cam_sensor_module/cam_cci/ -I $PWD/techpack/camera/drivers/cam_req_mgr -DSDCARDFS_VERSION= -I $PWD/" -j$(nproc --all)
I unpacked the original boot.img from the official ROM from the xiaomi's website, which is the exact ROM I have on my phone:
unpackbootimg -i boot.img -o boot_img_unpacked
Then I repacked with the new kernel:
mkbootimg --kernel "$SCRIPT_DIR/devices/$DEVICE/kernel/k/arch/arm64/boot/Image" \
--ramdisk boot.img-ramdisk \
--dtb boot.img-dtb \
--cmdline "$(< boot.img-cmdline)" \
--base "$(< boot.img-base)" \
--kernel_offset "$(< boot.img-kernel_offset)" \
--ramdisk_offset "$(< boot.img-ramdisk_offset)" \
--tags_offset "$(< boot.img-tags_offset)" \
--dtb_offset "$(< boot.img-dtb_offset)" \
--os_version "$(< boot.img-os_version)" \
--os_patch_level "$(< boot.img-os_patch_level)" \
--pagesize "$(< boot.img-pagesize)" \
--header_version "$(< boot.img-header_version)" \
--hashtype "$(< boot.img-hashtype)" \
--board "$(< boot.img-board)" \
--ramdisk_offset "$(< boot.img-ramdisk_offset)" \
-o ../boot.img
then the phone won't boot. I repacked with the official kernel from boot.img just to see if my repacking method was working, and with the original kernel, it boots. So the problem is probably on the kernel.
Do I have to update some offset? Like, is the dtb offset the same in this kernel as in the official one? I don't know why the dtb offset since the dtb is also in the ramdisk. How do I know if the dtb is being picked from inside the kernel or from the ramdisk?
One thing to notice is that my phone is on Android 11, which uses 4.19.113 while my kernel is 4.19.95 (the latest available on xiaomi's website), which I think was meant for Android 10. However, I think I should at least boot, even if with an older kernel. At least see some error.
I tried fastboot oem enable uart but this option is not supported by the Poco M3, so I guess there's no way to debug over usb like in the Pixel phones. Is there any way to know what's happening? I found some methods for debugging but they all require a kernel that at least boots, but I don't even know if mine is booting. Maybe it is but can't start any graphics?
I made a docker container that facilitates downloading, hacking the kernel and etc: https://github.com/lucaszanella/and...tree/18fbd933094f8ad6e63e65b2795ce80c377f8dc6 so if anyone wants to try, I'd be really glad. I'm working on tutorials to bring more people to kernel hacking, that's why I bought the Poco M3.

Categories

Resources