Proposing yoga 530 81EK init.sh changes, and one enable_nativebridge change

166 views
Skip to first unread message

Katharine Chui

unread,
Jul 10, 2020, 3:20:04 AM7/10/20
to Android-x86
Hello

I propose two changes on init.sh for yoga 530 81EK (intel version)
https://pcsupport.lenovo.com/de/en/products/laptops-and-netbooks/yoga-series/yoga-530-14ikb/81ek

1. Adding *81EK* to the list of devices that activates create_pointercal
Touch screen and pen works out of the box but the pen is slightly off center using it right handed. Users should be allowed to manually calibrate it.

2. Upgrading from cm-14.1-r2 to cm-14.1-r4 brought me to the attention of  
https://groups.google.com/g/android-x86/c/fmGQyE4ZiOI/m/LyLP7OsFAwAJ
libcamera.so no longer recognizes the only camera as the back camera with the new camera probing process. Even through it seems to be more correct to recognize the only camera as the front camera, and I did try 9.0 r2, which has an updated camera app that recognizes front camera only devices, a lot of apps still look for back camera, such as telegram and jitsi meet, so set_prop_if_empty hal.camera.0 0,0 for 81EK in init_hal_camera for those apps to work.
This probably has to be done on all single camera laptops for a lot of apps to work properly, unless such issue has been properly brought to the attention of more app developers, that there exist devices that has front camera only.

Other than that, building houdini7_y.sfs and houdini7_z.sfs into /system/etc also made me realize that the current enable_nativebridge script tries to mount those sfs using a rw loop device, causing that to fail. Since houdini$v.sfs are read only anyway, and mount -o ro /system/etc/houdini$v.sfs $dest_dir works with read only system, I propose that ro should be supplied to the mount option

Below attaches init.sh in full and as a patch for cm-14.1-r4
init.sh
81ek_init_N.patch

Povilas Staniulis

unread,
Jul 10, 2020, 5:46:09 AM7/10/20
to andro...@googlegroups.com
On 2020-07-10 10:20, Katharine Chui wrote:
> Other than that, building houdini7_y.sfs and houdini7_z.sfs into
> /system/etc also made me realize that the current enable_nativebridge
> script tries to mount those sfs using a rw loop device, causing that
> to fail. Since houdini$v.sfs are read only anyway, and mount -o ro
> /system/etc/houdini$v.sfs $dest_dir works with read only system, I
> propose that ro should be supplied to the mount option
>
Kernel will automatically fall back to ro for read-only file systems,
like SquashFS or ISO9660 even if you don't specify ro during mount.

Katharine Chui

unread,
Jul 10, 2020, 6:17:50 AM7/10/20
to Android-x86

Hmm but it did not..
For example in android 9.0 r2 with kernel 4.19.110
If ro is not specified to mount, mount tries to use losetup without supplying -r, losetup fails complaining about file target being read only and refuses to map file to loop device



Povilas Staniulis

unread,
Jul 10, 2020, 6:37:51 AM7/10/20
to andro...@googlegroups.com
Odd. Mount command should work fine without any options for squashfs. At
least it does on my Ubuntu server.

Most likely a bug with whatever mount command is in your build. Does
busybox mount work for the same command ?

I never had any issues with Houdini not mounting in any of the builds
I've ever tried, both my custom ones and stock ones from the website.


On 2020-07-10 13:17, Katharine Chui wrote:
>
> Hmm but it did not..
> For example in android 9.0 r2 with kernel 4.19.110
> If ro is not specified to mount, mount tries to use losetup without
> supplying -r, losetup fails complaining about file target being read
> only and refuses to map file to loop device
>
>
>
> On Friday, July 10, 2020 at 11:46:09 AM UTC+2 wdmo...@gmail.com wrote:
>
> On 2020-07-10 10:20, Katharine Chui wrote:
> > Other than that, building houdini7_y.sfs and houdini7_z.sfs into
> > /system/etc also made me realize that the current
> enable_nativebridge
> > script tries to mount those sfs using a rw loop device, causing
> that
> > to fail. Since houdini$v.sfs are read only anyway, and mount -o ro
> > /system/etc/houdini$v.sfs $dest_dir works with read only system, I
> > propose that ro should be supplied to the mount option
> >
> Kernel will automatically fall back to ro for read-only file systems,
> like SquashFS or ISO9660 even if you don't specify ro during mount.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to android-x86...@googlegroups.com
> <mailto:android-x86...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-x86/61995aab-7a3f-496b-b296-c8fe256affc4n%40googlegroups.com
> <https://groups.google.com/d/msgid/android-x86/61995aab-7a3f-496b-b296-c8fe256affc4n%40googlegroups.com?utm_medium=email&utm_source=footer>.


Katharine Chui

unread,
Jul 10, 2020, 6:38:39 AM7/10/20
to Android-x86
Screenshot from 2020-07-10 12-38-14.png
Message has been deleted

Katharine Chui

unread,
Jul 10, 2020, 6:45:56 AM7/10/20
to Android-x86
Sorry for the scattered replies
busybox mount does work without specifying -o ro
however, the enable_nativebridge script uses /system/bin/mount, which is a pointer to /system/bin/toybox
https://osdn.net/projects/android-x86/scm/git/device-generic-common/blobs/pie-x86/nativebridge/bin/enable_nativebridge
mount_sfs()
{
       mount -o 'context="u:object_r:system_file:s0"' $1 $2
}

Mauro Rossi

unread,
Jul 11, 2020, 12:57:57 PM7/11/20
to Android-x86

On Friday, July 10, 2020 at 12:45:56 PM UTC+2, Katharine Chui wrote:
Sorry for the scattered replies
busybox mount does work without specifying -o ro
however, the enable_nativebridge script uses /system/bin/mount, which is a pointer to /system/bin/toybox
https://osdn.net/projects/android-x86/scm/git/device-generic-common/blobs/pie-x86/nativebridge/bin/enable_nativebridge
mount_sfs()
{
       mount -o 'context="u:object_r:system_file:s0"' $1 $2
}

On Friday, July 10, 2020 at 12:38:39 PM UTC+2 Katharine Chui wrote:
On Friday, July 10, 2020 at 12:17:50 PM UTC+2 Katharine Chui wrote:

Hmm but it did not..
For example in android 9.0 r2 with kernel 4.19.110
If ro is not specified to mount, mount tries to use losetup without supplying -r, losetup fails complaining about file target being read only and refuses to map file to loop device


Ah-ha!

You may have just found the reason why some apps do not to work anymore with enable_nativebridge

Do "Sky Force Reloaded" and "Clash Royale" apps work with your proposed change?

Mauro 

Katharine Chui

unread,
Jul 11, 2020, 3:38:56 PM7/11/20
to Android-x86
If you're on android 9.0 r2, you probably want to place houdini9_y.sfs (x86_64 only) manually into /sdcard/arm yourself
The current script doesn't auto-download nor works on x86 images

Mauro Rossi

unread,
Jul 12, 2020, 8:24:37 AM7/12/20
to Android-x86


On Saturday, July 11, 2020 at 9:38:56 PM UTC+2, Katharine Chui wrote:
If you're on android 9.0 r2, you probably want to place houdini9_y.sfs (x86_64 only) manually into /sdcard/arm yourself
The current script doesn't auto-download nor works on x86 images

 
On Saturday, July 11, 2020 at 4:57:57 PM UTC issor...@gmail.com wrote:

On Friday, July 10, 2020 at 12:45:56 PM UTC+2, Katharine Chui wrote:
Sorry for the scattered replies
busybox mount does work without specifying -o ro
however, the enable_nativebridge script uses /system/bin/mount, which is a pointer to /system/bin/toybox
https://osdn.net/projects/android-x86/scm/git/device-generic-common/blobs/pie-x86/nativebridge/bin/enable_nativebridge
mount_sfs()
{
       mount -o 'context="u:object_r:system_file:s0"' $1 $2
}

On Friday, July 10, 2020 at 12:38:39 PM UTC+2 Katharine Chui wrote:
On Friday, July 10, 2020 at 12:17:50 PM UTC+2 Katharine Chui wrote:

Hmm but it did not..
For example in android 9.0 r2 with kernel 4.19.110
If ro is not specified to mount, mount tries to use losetup without supplying -r, losetup fails complaining about file target being read only and refuses to map file to loop device


Ah-ha!

You may have just found the reason why some apps do not to work anymore with enable_nativebridge

Do "Sky Force Reloaded" and "Clash Royale" apps work with your proposed change?

Mauro

Do you have a patch to propose to Chih-Wei to fix the issue? 

Do "Sky Force Reloaded" and "Clash Royale" apps work with your proposed change?

Thanks for your confirmation about those apps working with your fix, 
I was completely clueless about "Sky Force Reloaded" and "Clash Royale" not working anymore with pie-x86, oreo-x86

Mauro

Katharine Chui

unread,
Jul 12, 2020, 12:32:02 PM7/12/20
to Android-x86
Nooo, I just meant running enable_nativebridge manually doesn't download the script anymore, but if you use the toggle in settings the download still happens.
I just meant if /system is read only, and houdini9_y.sfs is placed in /system/etc, mounting from the script will fail
As for the two apps you've mentioned, check if you have arm64 versions installed. With houdini9_y only arm apps work but not arm64 apps. If you really need arm64 apps support considering going nougat, cuz that's the lastest android version with existing arm64 houdini7_z extracted from existing intel android devices.

Chih-Wei Huang

unread,
Jul 15, 2020, 1:23:43 PM7/15/20
to Android-x86
Katharine Chui <kathari...@gmail.com> 於 2020年7月10日 週五 下午3:20寫道:
Though I think it's weird that mount fail without "-o ro" option,
it should be safe to add the option. Will do.

> Below attaches init.sh in full and as a patch for cm-14.1-r4

Applied. Thank you!

--
Chih-Wei
Android-x86 project
http://www.android-x86.org
Reply all
Reply to author
Forward
0 new messages