We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

Unwanted vestiges of Android in the file system

asked 2015-09-29 17:29:59 +0300

pichlo gravatar image

updated 2016-06-21 11:22:31 +0300

Question reopened rather than creating a new thread. See my follow-up for details.


My Jolla has never seen Android*), yet I find references to it all over the file system. How safe is it to delete those? And/or remove aliendalvik from the ssu list?

*) As far as I know anyway - it is a second-hand unit but the previous owner has reset the device before passing it to me, so presumably even if he had used Android, the FS would have been wiped to the factory default, right?

EDIT: I did not want to flood the screen with long lists which is why I was originally so terse in my question. I assumed that everyone who understands the question is savvy enough to find the same results by themselves. But, on a popular request, here is what I am talking about:

[nemo@Dinghy ~]$ devel-su find / -iname *android*
Password:
/dev/android_adb
/dev/android_mbim
/etc/usb-moded/dyn-modes/developer_mode-android.ini
/etc/usb-moded/dyn-modes/pc_suite-android.ini
/etc/usb-moded/android-usb-values.ini
/sys/bus/platform/devices/android_usb
/sys/bus/platform/drivers/android_usb
/sys/bus/platform/drivers/android_usb/android_usb
/sys/bus/platform/drivers/android_pmem
/sys/devices/virtual/misc/android_adb
/sys/devices/virtual/misc/android_mbim
/sys/devices/virtual/android_usb
/sys/devices/virtual/android_usb/android0
/sys/devices/platform/android_usb
/sys/class/misc/android_adb
/sys/class/misc/android_mbim
/sys/class/android_usb
/sys/class/android_usb/android0
/sys/kernel/debug/android_usb
/sys/kernel/debug/debuglevel/android_usb_dll
/sys/module/g_android
/usr/share/themes/jolla-ambient/meegotouch/z1.0/icons/com_android_browser.png
/usr/share/themes/jolla-ambient/meegotouch/z1.0/icons/icon-m-android.png
/usr/share/themes/jolla-ambient/meegotouch/z1.0/icons/icon-s-android-label.png
/usr/share/themes/jolla-ambient/meegotouch/z1.0/icons/icon-s-android.png
/usr/share/mime/application/vnd.android.package-archive.xml
/usr/share/qt5/mkspecs/features/android
/usr/share/qt5/mkspecs/features/android/android.prf
/usr/share/qt5/mkspecs/features/android/android_deployment_settings.prf
/usr/share/qt5/mkspecs/features/data/android
/usr/share/qt5/mkspecs/features/qt_android_deps.prf
/usr/share/qt5/mkspecs/common/android
/usr/share/qt5/mkspecs/common/linux-android.conf
/usr/share/qt5/mkspecs/unsupported/android-g++
/usr/share/qt5/mkspecs/android-g++
/usr/share/lipstick/androidnotificationpriorities
/usr/share/sailfish-utilities/plugins/RestartAndroid.qml
/usr/share/sailfish-utilities/plugins/StopAndroid.qml
/usr/include/qt5/QtWidgets/5.2.2/QtWidgets/private/qandroidstyle_p.h
/usr/include/droid-sbj/android
/usr/include/droid-sbj/android/android
/usr/lib/qt5/qml/Sailfish/Tutorial/AndroidLauncherPulleyLesson.qml
/usr/lib/qt5/qml/com/jolla/startupwizard/AndroidApplicationDelegate.qml
/usr/lib/qt5/qml/com/jolla/startupwizard/AndroidInstallationDialog.qml
/usr/lib/gcc/armv7hl-meego-linux-gnueabi/4.8.3/plugin/include/config/linux-android.h
/usr/lib/libandroid-properties.so.1
/usr/lib/libandroid-properties.so.1.0.0
/usr/libexec/droid/android-permission-fixup.sh
/lib/udev/rules.d/999-android-system.rules
/system/etc/permissions/android.hardware.camera.flash-autofocus.xml
/system/etc/permissions/android.hardware.camera.front.xml
/system/etc/permissions/android.hardware.location.gps.xml
/system/etc/permissions/android.hardware.nfc.xml
/system/etc/permissions/android.hardware.sensor.gyroscope.xml
/system/etc/permissions/android.hardware.sensor.light.xml
/system/etc/permissions/android.hardware.sensor.proximity.xml
/system/etc/permissions/android.hardware.telephony.gsm.xml
/system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
/system/etc/permissions/android.hardware.usb.accessory.xml
/system/etc/permissions/android.hardware.wifi.direct.xml
/system/etc/permissions/android.hardware.wifi.xml
/system/etc/permissions/android.software.live_wallpaper.xml
/system/etc/permissions/android.software.sip.voip.xml
/system/etc/permissions/com.android.location.provider.xml
/system/lib/egl/eglsubAndroid.so
/system/lib/egl/libGLES_android.so
/system/lib/libandroid.so
/system/lib/libandroid_runtime.so
/system/lib/libandroid_servers.so
/system/lib/libandroidfw.so
[nemo@Dinghy ~]$

(devel-su used to avoid find complaining about folders it cannot access when run as nemo)

[nemo@Dinghy ~]$ devel-su find / -iname *dalvik*
Password:
/etc/pki/rpm-gpg/RPM-GPG-KEY-aliendalvik-1.0.0.5
/var/cache/zypp/solv/aliendalvik
/var/cache/zypp/raw/aliendalvik
/system/bin/dalvikvm
/data/dalvik-cache
[nemo@Dinghy ~]$

Plus, of course, aliendalvik on the ssu list.

edit retag flag offensive close delete

Comments

My preliminary results so far: ssu rr aliendalvik does nothing at all. I can do ssu dr aliendalvik to move it to disabled but not get rid of it altogether. Why?

pichlo ( 2015-09-29 19:20:34 +0300 )edit

Why you want to get rid of the aliendalvik repository? It's required to install the Android Support from the Jolla store, but if you don't have it installed it doesn't store anything on-device (except the package list, of course).

I guess editing the sales domain in /usr/share/ssu/repos.ini should be enough to get rid of it, though.

g7 ( 2015-09-29 19:57:21 +0300 )edit

Why? Because I don't use it, of course.

To each his own. For me, the default should be off: unless I explicitly and consciously decide I want it, then it should not be there.

I am not sure about editing the repos.ini file. It warns in the header against it. The next OS update will try to put it back and mess up my system.

pichlo ( 2015-09-29 20:16:22 +0300 )edit

Well, the default is "off" - the Android Support is not installed by default. But to make it installable, it must be available somewhere, and that's why the "aliendalvik" repository is enabled.

If it wasn't an external licensed product requiring authentication, probably it may even be integrated in for example the "jolla-apps" repository and you wouldn't have noticed this thing :)

The Android bits that I would rather see removed are the blobs required for the phone to work, but that won't - of course, and that's not Jolla's fault - happen unfortunately.

g7 ( 2015-09-29 21:55:05 +0300 )edit

There is more than one definition of "off", my friend ;-)

I do not keep empty shoe boxes, empty folders in my PC and I do not want empty placeholders on my phone either, thank you very much. As I said, to each his own.

Now, can we please get back to the question what can be safely removed and how, without questioning why?

pichlo ( 2015-09-29 23:31:24 +0300 )edit

2 Answers

Sort by » oldest newest most voted
13

answered 2015-09-30 12:31:19 +0300

Philippe De Swert gravatar image

A number of the things you see are due to having to use the android drivers for certain functionality. Maybe you have heard of libhybris. This is due to the fact virtually no hw manufacturer wants to open up part of the drivers, nor deliver any pure linux drivers. It is either work around the problem or have no hw at all. These would be related to that:

/system/etc/permissions/android.hardware.camera.flash-autofocus.xml
/system/etc/permissions/android.hardware.camera.front.xml
/system/etc/permissions/android.hardware.location.gps.xml
/system/etc/permissions/android.hardware.nfc.xml
/system/etc/permissions/android.hardware.sensor.gyroscope.xml
/system/etc/permissions/android.hardware.sensor.light.xml
/system/etc/permissions/android.hardware.sensor.proximity.xml
/system/etc/permissions/android.hardware.telephony.gsm.xml
/system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
/system/etc/permissions/android.hardware.usb.accessory.xml
/system/etc/permissions/android.hardware.wifi.direct.xml
/system/etc/permissions/android.hardware.wifi.xml
/system/etc/permissions/android.software.live_wallpaper.xml
/system/etc/permissions/android.software.sip.voip.xml
/system/etc/permissions/com.android.location.provider.xml
/system/lib/egl/eglsubAndroid.so
/system/lib/egl/libGLES_android.so
/system/lib/libandroid.so
/system/lib/libandroid_runtime.so
/system/lib/libandroid_servers.so
/system/lib/libandroidfw.so

Also a number of those references you found can be found on a regular linux system. As qt5 and gcc have support for android builds for example. For example these files:

/usr/share/qt5/mkspecs/features/android
/usr/share/qt5/mkspecs/features/android/android.prf
/usr/share/qt5/mkspecs/features/android/android_deployment_settings.prf
/usr/share/qt5/mkspecs/features/data/android
/usr/share/qt5/mkspecs/features/qt_android_deps.prf
/usr/share/qt5/mkspecs/common/android
/usr/share/qt5/mkspecs/common/linux-android.conf 
/usr/share/qt5/mkspecs/unsupported/android-g++
/usr/share/qt5/mkspecs/android-g++
/usr/include/qt5/QtWidgets/5.2.2/QtWidgets/private/qandroidstyle_p.h
/usr/lib/qt5/qml/Sailfish/Tutorial/AndroidLauncherPulleyLesson.qml
/usr/lib/qt5/qml/com/jolla/startupwizard/AndroidApplicationDelegate.qml
/usr/lib/qt5/qml/com/jolla/startupwizard/AndroidInstallationDialog.qml
/usr/lib/gcc/armv7hl-meego-linux-gnueabi/4.8.3/plugin/include/config/linux-android.h

All these are related to the fact that Jolla uses the android usb gadget driver (due to the way how things are done at the odm when manufacturing as usb-moded works perfectly fine with the regular Linux usb gadgets too) The /sys files are from the kernel and are used to expose data to userspace and do configuration.

/etc/usb-moded/dyn-modes/developer_mode-android.ini
/etc/usb-moded/dyn-modes/pc_suite-android.ini
/etc/usb-moded/android-usb-values.ini
/sys/bus/platform/devices/android_usb
/sys/bus/platform/drivers/android_usb
/sys/bus/platform/drivers/android_usb/android_usb
/sys/bus/platform/drivers/android_pmem
/sys/devices/virtual/misc/android_adb
/sys/devices/virtual/misc/android_mbim
/sys/devices/virtual/android_usb
/sys/devices/virtual/android_usb/android0
/sys/devices/platform/android_usb
/sys/class/misc/android_adb
/sys/class/misc/android_mbim
/sys/class/android_usb
/sys/class/android_usb/android0
/sys/kernel/debug/android_usb
/sys/kernel/debug/debuglevel/android_usb_dll
/sys/module/g_android

And the remaining are mostly related to the os being prepared to be used with the android support.

Removing them however would not be very safe.

edit flag offensive delete publish link more

Comments

1

Thanks, Philippe. An excellent answer! Exactly what I was after.

Oh and to answer some of your and others' concerns, yes, I knew about libhybris. That's why I used the word "safely" :)

pichlo ( 2015-09-30 13:21:39 +0300 )edit
4

answered 2016-06-21 11:19:48 +0300

pichlo gravatar image

2.0.2.45 created a new folder in /home/nemo called android_storage. It belongs to root and, on my device at least, has a single, empty sub-folder in it called priv-app.

I do not have Alien Dalvik installed, a use case that apparently even Jolla itself never expected. I think they should be a bit more confident and not automatically assume that everyone uses Android on their devices ;) The folder should only exist if the user explicitly installs Android support.

edit flag offensive delete publish link more

Comments

Well, it is 8kB wasted in the filesystem... versus having to handle another special case. Well they could bring this in when installing the alien dalvik packages, but, really, life is too short to worry about that, IMHO.

mikelima ( 2016-06-21 16:01:22 +0300 )edit
1

Exactly. Bring it in when installing AD.

You are right, life is short. Which is why I just deleted it :)

pichlo ( 2016-06-21 16:26:27 +0300 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2015-09-29 17:29:59 +0300

Seen: 774 times

Last updated: Jun 21 '16