[Q] Cannot start Android L Preview in emulator - Android Q&A, Help & Troubleshooting

I am trying to set up an Android Virtual Device (AVD) running Android L Preview so that I can begin developing an app using the new Material Design theme. I already have AVDs set up running KitKat and Gingerbread, it is only the Android L Preview that is not working. I have tried both the AVD Manager built-in to Android Studio, as well as from a separate installation of the Android SDK.
Here is my config.ini:
Code:
avd.ini.encoding=ISO-8859-1
abi.type=armeabi-v7a
disk.dataPartition.size=1024M
hw.accelerometer=yes
hw.audioInput=yes
hw.battery=yes
hw.camera.back=webcam0
hw.camera.front=emulated
hw.cpu.arch=arm
hw.cpu.model=cortex-a8
hw.dPad=no
hw.device.hash2=MD5:2fa0e16c8cceb7d385183284107c0c88
hw.device.manufacturer=Google
hw.device.name=Nexus 5
hw.gps=yes
hw.keyboard=yes
hw.lcd.density=480
hw.mainKeys=no
hw.ramSize=2048
hw.sdCard=yes
hw.sensors.orientation=yes
hw.sensors.proximity=yes
hw.trackBall=no
image.sysdir.1=system-images\android-L\default\armeabi-v7a\
sdcard.size=1024M
skin.dynamic=no
skin.name=1080x1920
skin.path=1080x1920
tag.display=Default
tag.id=default
vm.heapSize=64
When I start the AVD I just get a black screen. I ended up letting it run for 5 hours and it never booted. Looking through the logcat, the following errors are repeated continuously:
Code:
06-27 13:32:31.945 319-319/? E/Netd﹕ Failed to open /proc/sys/net/ipv6/conf/default/accept_ra_rt_table: No such file or directory
06-27 13:32:31.945 319-319/? E/Netd﹕ Failed to open /proc/sys/net/ipv6/conf/eth0/accept_ra_rt_table: No such file or directory
06-27 13:32:31.945 319-319/? E/Netd﹕ Failed to open /proc/sys/net/ipv6/conf/lo/accept_ra_rt_table: No such file or directory
06-27 13:32:31.945 319-319/? E/Netd﹕ Failed to open /proc/sys/net/ipv6/conf/sit0/accept_ra_rt_table: No such file or directory
06-27 13:32:32.293 320-320/? E/SurfaceFlinger﹕ hwcomposer module not found
06-27 13:32:32.293 320-320/? E/SurfaceFlinger﹕ ERROR: failed to open framebuffer (No such file or directory), aborting
06-27 13:32:32.295 320-320/? A/libc﹕ Fatal signal 6 (SIGABRT), code -6 in tid 320 (surfaceflinger)
Here's the full logcat: http://pastebin.com/Ctjy5YLF
Does anyone have any idea what I did wrong or why the emulator isn't working? How can I get this up and running?
Thanks!

Same here
I'm having the exact same issue but not getting any errors in the LogCat. Hopefully someone has a solution. I've downloaded the new Android Studio and tried it but it didn't work. I also re-downloaded the ADT Eclipse bundle and tried it with that. Still no joy.

I had the same black screen until I enabled "Use Host GPU" under Emulation Options when creating the AVD.

Black screen with the emulator running android L
same problem here.. tried host GPU and no luck...

eddieringle said:
I had the same black screen until I enabled "Use Host GPU" under Emulation Options when creating the AVD.
Click to expand...
Click to collapse
Can confirm enabling 'Use Host GPU' has made the emulator work.

eddieringle said:
I had the same black screen until I enabled "Use Host GPU" under Emulation Options when creating the AVD.
Click to expand...
Click to collapse
Now I feel like an idiot. I initially had that selected for my Gingerbread AVD but it displayed an error when starting and disabled the message. I assumed my GPU wasn't compatible for whatever reason so I never tried it with the Android L AVD. Or perhaps it had something to do with trying it over an RDP remote desktop session before. Or my RAMDISK being full. Anyways, it's working now, so thank you.

GPU + Atom x86 has made the emulator go from a black screen to the android startup screen. And now, we wait
Edit: To be clear, I tried GPU + ARM, didn't work.
Edit2: It work, still slow as hell though

eddieringle said:
I had the same black screen until I enabled "Use Host GPU" under Emulation Options when creating the AVD.
Click to expand...
Click to collapse
That worked for me. Thanks a million. :good:

eddieringle said:
I had the same black screen until I enabled "Use Host GPU" under Emulation Options when creating the AVD.
Click to expand...
Click to collapse
This does work for me on Linux

Just an update - I discovered two things.
1 - this was not an issue with the L Preview, but rather with emulating a Nexus 5.
2 - there are two ways to solve the issue, one way is to use host GPU, the other is to select a skin rather than choosing no skin. The nice thing about the second method is that the snapshot feature can be used, greatly increasing the emulator start time.

FWIW.. I noticed..
So apparently the x86 version of Lollipop in the emulator requires the GPU or else you get a blank screen and missing hwcomposer module support files.. (I don't know if the files are in the preview .imgs but haven't gone looking).
If you create an arm (SLOW AS MOLASSES) arm image.. after the forever of booting you can do actual screenshots. It's 32-bit and the colors band, but there ya go.

Related

Mer Linux Port

I have been following the Android scene here pretty regularly but the os I have always really wanted is a full fledged Linux. I heard about, and wanted a N900 because of Maemo but I'm too poor to buy one . I then heard about the Mer project https://wiki.maemo.org/Mer to port Maemo to other devices and saw it booted on the kaiser http://forum.xda-developers.com/showthread.php?t=565480. On page two of that thread it is stated that someone (Mdrobnak) got it up and running pretty well on his Fuze with a couple tweaks to Xorg.conf, the kernel, and to the splash screen (resized to 640x480). I've been working over the past few days on getting it to start on my fuze but haret keeps giving errors about pc_clk_disable. I resized the splash, changed Xorg.conf to be 640x480 and did the rest of the directions on the Kaiser thread, but no luck. I would love to get a port of this going, as being able to use ~95% of Ubuntu packages working on my phone would be awesome. I wasn't quite sure how to patch the kernel; that would be the zImage, right? Any suggestions?
I'm going to be on #mer and #htc-linux irc on freenode quite a bit until we get this working well if anyone wants to discuss things, not that I can contribute much.
Would it be possible to create a rootfs.img file similar to how XDANDROID does it for people too lazy to partition their card or just plain suck like me?
Sounds interesting! Keep us updated!
Oh god! Ill be in 7th heaven if it's going to be done!
I think you can use the zImage of xdandroid, maybe it'll work
I tried the xdandroid zImage but it didn't work. This is really a call for help. I really don't know what I am doing, lol. I'm not even close to being a dev. Try out the steps on the Kaiser thread but use the stable 0.16 distribution as the testing links don't work. See if you can figure anything out.
Maemo on the Raph ? that would be great! maybe we could run it in dual boot with android and abandon WM for ever !
To get X working, use glemsom's kernel, and add msm_fb.fix_x=1 to cmdline.
For touchscreen, you might want to add msm_ts.raw=1 (but it can also work without it)
phhusson said:
To get X working, use glemsom's kernel, and add msm_fb.fix_x=1 to cmdline.
For touchscreen, you might want to add msm_ts.raw=1 (but it can also work without it)
Click to expand...
Click to collapse
Thanks, phh. Will try it when I get home.
that's the old and ugly msm_fb refresh hack.
I will update here once I have xorg working on kovsky and kaiser.
Man, I actually feel like this is getting places. Got Phhusson from XDANDROID and dcordes from the original Android on Diamond thread. Quite the star power.
@dcordes: What needs to be edited to use VGA; just the first screen resolution dimensions in Xorg.conf?
what image are you using?
I'm using the Smartq5 from here: http://wiki.maemo.org/Mer/Releases/0.16. My main problem is with the kernel though I think; haret hangs after about 15 seconds; I'm gonna create a log of it.
On my Raph300 I can login on the terminal using the Q5 image. I was using the latest zimage from gelmsom. But kernel is screaming some stuff a bout a clock not having an ena bit and something about an rpcrouter being blocked. When I try to start X, I get an error loading libpicacces.so.0
I get that same error, but Haret hangs when I get it. Please share what you did: e.g. editing xorg, exact zImage used, what you used to partition, your default.txt, whether you edited the splash screen image etc. I'd like to get a database of sorts of people's configurations. Good to know though. Did you add Phhusson's tip to default.txt?
"To get X working, use glemsom's kernel, and add msm_fb.fix_x=1 to cmdline.
For touchscreen, you might want to add msm_ts.raw=1 (but it can also work without it)"
Yes i added the msm_fb.fix_x=1 to the cmdline. Unfortunatly it is not the solution for this problem. We have got some trouble with the libraries. Maybe something is missing.
LordKiwi said:
Yes i added the msm_fb.fix_x=1 to the cmdline. Unfortunatly it is not the solution for this problem. We have got some trouble with the libraries. Maybe something is missing.
Click to expand...
Click to collapse
Last time I tried it worked automatically (I mean for X video output.) with msm_fb.fix_x=1
Sorry it works. JesusFreak and I extracted the tar file the wrong way.
I should have type tar -pxvf. I forgot the p which is very important.
Now it stops with a different error.
Code:
(**) FBDEV(0): using shadow framebuffer
(II) Loading sub module "shadow"
(II) LoadModule: "shadow"
(II) Loading /usr/lib/xorg/modules//libshadow.so
(II) Module shadow: vendor="X.Org Foundation"
compiled for 1.6.0, module version = 1.1.0
ABI class: X.Org ANSI C Emulation, version 0.4
(EE) FBDEV(0): FBIOPUT_VSCREENINFO: Invalid argument
(EE) FBDEV(0): mode initialization failed
Fatal server error:
AddScreen/ScreenInit failed for driver 0
Dang it; I just can't get it to work. I'm the thread starter and I can't do it, lol. Here's what I did:
1. Downloaded 0.16 stable smartq5 rootfs.
2. Extracted the tar to my home folder. (Now that I think of it; I did it with archive manager not the command line, so no -p setting or anything. That could be the problem.)
3. Edited the xorg.conf file to change the resolution to 640x480.
4. Changed the splash screen size to 640x480.
5. Formatted my sd card to ext2 for 1.5 gb and fat32 for .5 gb using command line following these directions for ext2: http://wiki.maemo.org/Mer/Documentation/SmartQ_Installation_for_the_Windows_user and gparted for fat32.
6. I then used the directions on the same pagee as before to copy the file, except using cp instead of mv.
7. I copied haret, a zImage, and the startup.txt that I renamed to default.txt and edited to the fat32 partition.
8. I started Haret.
I attached my default.txt.
The formatting is done correct. You should try to use the tar command line wich you can find on the same page. It should solve the problem of loading the library.
•Type sudo tar -pxzvf *.gz and press return. This will now untar the entire 'rootfs' to the card. (Install Mer).
LordKiwi said:
Sorry it works. JesusFreak and I extracted the tar file the wrong way.
I should have type tar -pxvf. I forgot the p which is very important.
Now it stops with a different error.
Code:
(**) FBDEV(0): using shadow framebuffer
(II) Loading sub module "shadow"
(II) LoadModule: "shadow"
(II) Loading /usr/lib/xorg/modules//libshadow.so
(II) Module shadow: vendor="X.Org Foundation"
compiled for 1.6.0, module version = 1.1.0
ABI class: X.Org ANSI C Emulation, version 0.4
(EE) FBDEV(0): FBIOPUT_VSCREENINFO: Invalid argument
(EE) FBDEV(0): mode initialization failed
Fatal server error:
AddScreen/ScreenInit failed for driver 0
Click to expand...
Click to collapse
I'm an idiot....... I saved my startup.txt as startup.doc. That's why X didn't start.
0.17 release
Is possible run the 0.17 realease in raphael more fast than in N810?

[Linux] Ubuntu 9.10 on nike

kaiser ubuntu port based on zubuntu by Omegamoon for Sharp Zaurus was successfully launched on HTC Nike!
Instructions:
1. download kernel
http://84.23.71.227/kerneloftheday/zImageUbuntu
2. download ubuntu basefiles and rootfs
3. place ubuntu.img, haret, initrd.gz and zImageUbuntu to Storage Card/ubuntu/
4. place this default.txt there too
Code:
set RAMADDR 0x10000000
set MTYPE 1724
set KERNEL zImageUbuntu
set initrd initrd.gz
set cmdline "pm.sleep_mode=1 mddi.width=320 mddi.height=480 lcd.density=160 board-htcnike-keypad.keypadlayout=1 board-htcnike-keypad.sticky_timer_time_ms=350 no_console_suspend"
boot
5. change board-htcnike-keypad.keypadlayout=1 to 0 if you have 20key nike.
6. run haret and press "Run", ubuntu & kernel will be loaded to login prompt, login with username root and no password, you will get root shell.
7. write
Code:
export TSLIB_TSDEVICE=/dev/input/event0
ts_calibrate
and calibrate your screen.
8. write startx and see LXDE running on your nike! you've got real linux box in pocket!
Note, rootfs for ubuntu needs 1GB of free space on your sdcard!
For now, you cannot work with screen, we have some difference from kaiser panel's, i.e. ubuntu gui is completely unusable, this thread were started to find out why.
based on this thread from kaiser forum.
Credits: dzo, Omegamoon, domy007, mblaster and guys from Rhodubuntu thread.
I dont get any response when i try to calibrate screen on niki 200
thats strange, it must work.
I will debug on touchscreen problems, but ubuntu running and that is great, now we have only input-devices problems, and this is more better than nothing.
Sounds great, but wouldn't it be better to try something smaller like puppylinux or Feather linux ?
zubuntu is only we have compiled for ARM and working with our hardware that starts X and tested on other htc's devices.
rzk333 said:
zubuntu is only we have compiled for ARM and working with our hardware that starts X and tested on other htc's devices.
Click to expand...
Click to collapse
Ok thanks for the information, did some reading before and was always wondering why they use ubuntu but this answer set things straight.
Greetz,
Great to see a full linux distro around for htc devices. I will fix the '_' tomorrow... Any other missing characters?
How is the speed of ubuntu? Is it very sluggish or usable?
'=' character maybe, for export line.
zImageUbuntu is updated (your link is still valid).
'=' and '-'are on '*'-button, '_' is Alt-
I have included the msm_fb_refresh and the keypad changes into my auto-updated-kernel, so you should be able to use the fresh kernels from my thread with ubuntu if you want recent updates (zImageUbuntu is not automatically updated).
got some progress,
1) msm refresh thread seems to disable sleep mode in android, thread polls framebuffer many times in second and drains battery.
2) linux logo on bootup must be disabled - logo gets over ts_calibrate's first crosshair point.
2) still trying to make touchscreen and tslib friends - i2c bus debug messages logs saying that touchscreen is connected and recieves data correctly.
found some data:
/dev/input/event0 - htcnike-kbd
/dev/input/event1 - htcnike-ts
but still no data from touchscreen...
rzk333 said:
got some progress,
1) msm refresh thread seems to disable sleep mode in android, thread polls framebuffer many times in second and drains battery.
2) linux logo on bootup must be disabled - logo gets over ts_calibrate's first crosshair point.
2) still trying to make touchscreen and tslib friends - i2c bus debug messages logs saying that touchscreen is connected and recieves data correctly.
found some data:
/dev/input/event0 - htcnike-kbd
/dev/input/event1 - htcnike-ts
but still no data from touchscreen...
Click to expand...
Click to collapse
Disabled msm refresh thread from the android kernels again. The kernel you linked in your first post is now automatically updated with anything new in the repository. Bootlogo is disabled, too. Good luck with tslib, let me know if when you need something else to be hacked into the kernel.
mblaster
I've just test the usb ether function in the zImage from the post
showthread.php?p=6675397
and it works just fine.
(Just when I had managed to make adbd works... but ssh is more reliable)
Thanks gTan64.
wow, that is good, now I can dump system state without hours of keyboard typing
I've managed to get internet by usb (cdc only) thanks to gTan64: just apply the patch from is post ("Debian on the vogue"), you can extract it from the download links.
And the TOUCHSCREEN WORK!!!!!!!
But you need to compile tslib from the tslib git (github.com/kergoth/tslib.git), the one in the rootfs from this post doesn't work.
Will make a more complete post later, I think.
Bye.
Ubuntu always shows me a black screen when I try to startup it!
What can I do make it work?
omg, I knew that something is wrong with tslib in this rootfs!
thanks for r&d, if you will make some packages & mans, I'll add them to first post.
Maybe you can upload some pics ?
But you need to compile tslib from the tslib git
Click to expand...
Click to collapse
I tried to compile - but no luck, autoconf fails to make configure...
I also uploaded debian rootfs and posted links in gTan's Debian on Vogue thread.
nothing happened last month?

SDK: Weird problem w/ GPU acceleration on aptosid and nVidia

Hi!
I just installed the Android SDK to run ICS. For the moment, it's just for a workshop on WebDAV, but later, I'd like to start developing, so guess this is relevant to this place ^^
Well, I followed the guides closely, but I was unable to get anything running at first, but at least, I can run software mode now. It's horribly slow, though, which is why I'd like to describe the symptoms.
- They are the same for any combination of version, resolution and hardware I tried.
- When I start emulator -avd <>, it just sits there as emulator-arm for half an hour and eats all my CPU.
- When I kill -SIGTERM the emulator-arm, it won't react.
- When I close the xterm governing the emulator, its window displays for a brief second.
- When I kill -SIGKILL the emulator-arm, it exit and leaves garbage in /tmp. (Normal, I guess.)
- When I run emulator-arm -avd <>, it boots and tells me
Code:
emulator: ERROR: Could not load OpenGLES emulation library: libOpenglRender.so: cannot open shared object file: No such file or directory
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
- As software mode is extremely slow, I tried copying libOpenglRenderer.so to /usr/lib/android-sdk, putting that into /etc/ld.so.conf, and running ldconfig. When I do that, emulator-arm displays the same symptoms as emulator.
What's happening?
I'm running a recent aptosid (Debian Unstable + patches), and I tried installing both nVidia's DKMS drivers and doing it manually by getting the .run package. No difference. Also, it does not seem to mean anything if I run with or without Compositing. (Tried KDE+Kwin, KDE+Compiz and Fluxbox.)
Also, I should mention that I was able to start the emulator binary ONCE. I have no idea what happened there, as I did not do anything differently. I had just set up a new AVD and started it as usual.
Is there some kind of log I could check out? Or anything else?
Thanks!
David
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums & Read the Forum Rules
Thanks ✟
Moving to Q&A

[Q] AVD Simulation Issues

Hey guys,
This is my first time developing apps for a device, please don't be too callous.
Prior to the release of Android Studio I was having a crack at eclipse with the android SDK and attempting to utilise the AVD simulator rather than the actual Galaxy Nexus I have right beside me. My issue was in fact the same as to when I converted to Android Studio, a rather consistent error:
Code:
Waiting for device.
C:\Android\android-studio\sdk\tools\emulator.exe -avd GalaxyNexus -netspeed full -netdelay none
Device connected: emulator-5554
Device is online: emulator-5554
Target device: emulator-5554 (GalaxyNexus)
Uploading file
local path: C:\Ryan\Android\MyFirstApp\build\apk\MyFirstApp-debug-unaligned.apk
remote path: /data/local/tmp/com.example.myfirstapp
Adb Transfer Protocol Error.
No such file or directory
The AVD Simulator boots up, Android Labels displays then fails after a matter of seconds. i understand the issue is obviously not related to the IDE hence why both eclipse and Android Studio are doing the same thing.
I Created an AVD with the following Properties:
Code:
Name: GalaxyNexus
Device: Galaxy Nexus (4.65"...etc
Target: Android 4.2.2 - API Level 17
CPU/ABI: greyed out as "ARM..."etc
Keyboard enabled
Skin enabled
Front Camera None
Rear Camera None
Memory options
- Ram: 512
- VM Heap: 64
- Internal Storage: 8 GiB
- SD 128MiB
Emulation options both left unchecked
Greyed out button for "Override the extisting AVD with the same name"
The basic default hello world app actually runs fine on my galaxy nexus on 4.2.2.
Not sure of my issue, I would assume configuration, though couldn't be sure.
Thanks ahead.
ryanspacef said:
Not sure of my issue, I would assume configuration, though couldn't be sure.
Thanks ahead.
Click to expand...
Click to collapse
Go to SDK Manager and hit the Install button. Mine still had 5 missing packages, including the ARM ABI, which would also explain why the AVD didn't boot. Hope this helps.
ryanspacef said:
Hey guys,
This is my first time developing apps for a device, please don't be too callous.
Prior to the release of Android Studio I was having a crack at eclipse with the android SDK and attempting to utilise the AVD simulator rather than the actual Galaxy Nexus I have right beside me. My issue was in fact the same as to when I converted to Android Studio, a rather consistent error:
Code:
Waiting for device.
C:\Android\android-studio\sdk\tools\emulator.exe -avd GalaxyNexus -netspeed full -netdelay none
Device connected: emulator-5554
Device is online: emulator-5554
Target device: emulator-5554 (GalaxyNexus)
Uploading file
local path: C:\Ryan\Android\MyFirstApp\build\apk\MyFirstApp-debug-unaligned.apk
remote path: /data/local/tmp/com.example.myfirstapp
Adb Transfer Protocol Error.
No such file or directory
The AVD Simulator boots up, Android Labels displays then fails after a matter of seconds. i understand the issue is obviously not related to the IDE hence why both eclipse and Android Studio are doing the same thing.
I Created an AVD with the following Properties:
Code:
Name: GalaxyNexus
Device: Galaxy Nexus (4.65"...etc
Target: Android 4.2.2 - API Level 17
CPU/ABI: greyed out as "ARM..."etc
Keyboard enabled
Skin enabled
Front Camera None
Rear Camera None
Memory options
- Ram: 512
- VM Heap: 64
- Internal Storage: 8 GiB
- SD 128MiB
Emulation options both left unchecked
Greyed out button for "Override the extisting AVD with the same name"
The basic default hello world app actually runs fine on my galaxy nexus on 4.2.2.
Not sure of my issue, I would assume configuration, though couldn't be sure.
Thanks ahead.
Click to expand...
Click to collapse
Have you tried to push your apps apk manually using the adb push command? If that does not work its probably a driver issue. Also you may try changing the sdcard size to >200mb or removing it altogether and only using internal. I would also use a much smaller internal size unless your app needs it. My AVD has an internal of 256mb and no sdcard and runs fine. The AVDs are very picky and have strange issues sometimes.

[Updated: JUN 15] Easier XMir Setup (Now with Libertine!)

EDIT: I bring you the new OFFICIAL way of installing X11 applications, I've been neglecting this thread way too much and need to give it some love.
The old instructions (OLD METHOD) are no longer needed as of April on the rc and rc-proposed channels, this should work on all channels however (tested up to latest devel-proposed image)
NOTE: You still need a writable image for the first parts of this, after you install the tools, it can go back to read-only.
1) Open Terminal
2) Install the following packages: libertine libertine-tools python3-libertine-chroot
3) Open the Ubuntu Store and install the scope: libertine-scope
4) Open the Libertine application that's now available in your launcher and follow instructions, it will set up a Ubuntu Vivid chroot in your home directory, install the components needed, and drop you at the package management screen. From here, you can update and add PPAs to the container via the Settings Icon -> Manage Container, Install packages via the plus icon, etc.
5) Favorite the Libertine XApps scope by swiping up on the home screen and hitting the star, then open the scope and you'll see any applications you installed there.
If you cannot install your container via the Libertine application (I know that it didn't have support for chroot until recently, not sure if that version has landed yet), you can install your container via the teminal, so open your terminal but DO NOT sudo su. All Libertine-container-manager commands MUST be done as phablet.
To create a container (this line will likely change when Xenial drops as Libertine will be switching to LXC on Xenial):
Code:
libertine-container-manager --create -i <container id> -n <friendly name (this shows up in the Libertine app)> -t chroot
Using this command, the system will build the new libertine container, wait until it's finished and then you can continue by using the installed Libertine application.
Onscreen Keyboard in Libertine Applications
THIS CAN FINALLY BE DONE! The only con to it, is that it is mostly unusable in applications that open dialog boxes along the bottom of the screen, the XMir window does not scroll up like native applications do to give a better viewing window. (I have been told that this will change in OTA-12 when the keyboard support drops for Libertine/Puritine apps)
To install on-screen keyboard:
Open Libertine and add ppa:brandontschaefer/maliit to your container. Then hit update in Manage Containers. Once done, install the following, maliit-inputcontext-gtk2, maliit-inputcontext-gtk3, maliit-framework. After that, setup is complete in your container, now we need to do some extra work outside the container to make it pass the GTK_IM_MODULE variable we need over to Libertine. To do this, add this line to your .bashrc or if you have a writable image, you can add this to the systemwide profile (not sure if this will be replaced on OTA though):
Code:
export GTK_IM_MODULE=maliitphablet
Restart the tablet OS, Open an application such as Libreoffice Writer and BEHOLD!
Notes
You can also manage your container via the terminal with libertine-container-manager. To get a root shell without installing mate terminal (You can't get a root shell via this method (installing a term), Proot acts like fakeroot all over your container's rootfs), you can use the following:
- l-c-m exec -c bash (This command does not mount any user directories (/home/phablet will not exist) and is best used for making changes to the container's rootfs)
or if you only need a user shell:
- DISPLAY= libertine-launch <containerid (default is vivid)> bash (This mounts user directories, but is no different than if you installed something like mate-terminal and ran it. The reason we are passing an empty DISPLAY variable is because libertine-launch will refuse to start if DISPLAY isn't set, even it if doesn't exist.)
- DPI Hacks: To change the DPI of applications in Libertine, you need a new way to make the .Xdefaults file as only the XDG User directories get mounted inside the libertine container, not your entire Home. To do this, install your favorite editor inside of the libertine container (I find nano to be the easiest for new users), and open Terminal, then follow these instructions:
1) Open your editor to ~/.local/share/libertine-container/user-data/[my container id, default = vivid]/.Xdefaults and fill it with the following:
Code:
Xft.dpi: 175
or what your preferred DPI is. On the Nexus 7 flo the comfortable DPI is 175 with an application font size of 14 (I use Liberation Sans which comes from Libreoffice).
- You can make your applications look great still, you don't have to be stuck with the default Raleigh GTK style. Download and install LXAppearance in your container and add ppa:noobslab/themes then start installing themes. Enjoy! The Ubuntu Touch Themes are wonderful and FlatPlat works well with the system UI as well.
Some cons to this:
- It requires at least 3GBs available in your internal storage (wherever your home folder resides) to store a full, non-touch Ubuntu Vivid container.
Pros:
- It survives OTAs, the only thing able to break this would be a change to XMir, PRoot, or Libertine. Which is landing in the images shortly by default so there's not much of a chance to break this.
- Nothing you do will break your UTouch system. Unlike the old method, this only installs the items needed to run the container, which are to become standard inside the images very soon.
OLD METHOD
--------------------
EDIT: I have not tested this in stable, rc, rc-proposed yet. Only the dev-proposed channel.
So there is some questioning I see going on about how to run things like Firefox efficiently and well. So I figured I'd write up a little something for it.
First you'll want to set your DPI in ~/.Xdefaults, as I have a Nexus 7, mine looks similar to this:
Xft.dpi: 240
Note that you may need to do some additional tweaking.
Now that you have Xdefaults made, install the ubuntu-pocket-desktop and matchbox-window-manager packages (along with the program you wish to use, for this tutorial, I'll use libreoffice).
Create a file in /bin called wm-wrapper.sh (or whatever you choose here, just remember the name), fill it with:
Code:
#!/bin/bash
matchbox-window-manager -use_titlebar no -use_dialog_mode const-horiz &
exec [email protected]
and save it, then chmod a+x it.
EDIT: For this next part, I recommend copying the .desktop to ~/.local/share/applications to avoid them being overwritten on package updates.
Now, navigate to /usr/share/applications/ and open the .desktop file for the application you are wanting to run. Add the following lines under [Desktop]:
Code:
X-Ubuntu-Touch=true
X-Ubuntu-XMir-Enable=true
Change the Exec line so that your wrapper (in my case wm-wrapper.sh) is in front of the executable, such that the line becomes (or similar):
Code:
Exec=/bin/wm-wrapper.sh libreoffice %U
Save it, then search for your application in the Unity Scopes. Open it up and you should see your application running as an XMir app easy. For future applications, you will simply need to do the changes to it's .desktop file.
EDIT: A helpful redditor gave me this tip to enable sending touch events over to Xmir. Setting the GTK_TEST_TOUCHSCREEN environment variable to 1 will apparently remove hover events and the like (events that are not normally sent with a touch screen, but with a mouse). I have not had time to take a look at this yet however so YMMV.
Thanks man, gonna try this on my n4 later today. ?
thumbzzzz said:
Thanks man, gonna try this on my n4 later today.
Click to expand...
Click to collapse
No problem, Like I said, not sure if it works on other channels, but it works great on the dev-proposed channel. You will also want to close applications using their menu items as closing the Xmir root window will cause the application to terminate without asking to save anything. Libreoffice can get around this via Document Recovery though.
I had been working on this for a good solid week testing applications and different ways to get X11 applications working so I could make it a full workstation, so I figured why not post my findings since the Ubuntu forum doesn't seem to get much love.
Thanks for the matchbox tip! It works quite nicely, especially, it brings a nice onscreen keyboard with it. I use the following setup now:
~/.local/share/applications/gedit-mb.desktop
Code:
[Desktop Entry]
Name=GEdit in Matchbox
Type=Application
Terminal=false
Icon=/usr/share/gedit/logo/gedit-logo.png
X-Ubuntu-Touch=true
#X-Ubuntu-XMir-Enable=true
Exec=/home/phablet/bin/matchbox-wrapper.sh gedit
~/bin/matchbox-wrapper.sh
Code:
#!/bin/bash
export DISPLAY=:1
Xmir $DISPLAY &
sleep 1
# xlogo
# xeyes
# x11vnc -forever -nopw -quiet -display $DISPLAY &
matchbox-window-manager &
sleep 1
matchbox-keyboard &
[email protected]
~/.matchbox/kbdconfig
Code:
# http://unix.stackexchange.com/questions/223110/what-are-the-keyboard-shortcuts-for-matchbox-window-manager
<ctrl><alt>p=prev
<ctrl><alt>n=next
<ctrl><alt>d=!matchbox-desktop
<ctrl><alt>x=!xterm
<ctrl><alt>f=!firefox
Together with the Xft.dpi setting (I use 220) this gives me a quite usable editor. If you have any other tips ShadowEO, I'd love to hear them!
One thing I'd like to figure out is how to modify the DPI for the Mir GDK Backend. Currently GTK3 applications started with the backend are way to small.
ShadowEO said:
One thing I'd like to figure out is how to modify the DPI for the Mir GDK Backend. Currently GTK3 applications started with the backend are way to small.
Click to expand...
Click to collapse
Do you have a specific example? Which application are you looking at?
doniks said:
Do you have a specific example? Which application are you looking at?
Click to expand...
Click to collapse
Sorry, for some reason I wasn't subscribed to this post (weird.)
Anyway the specific application I was looking at was gedit, when started with the native GDK Mir backend, it is almost unusable with touch as the elements are so small. GDK_SCALE doesn't work and neither does any of the GTK dconf settings for scaling.
Also, I have switched to using rc-proposed, so any more changes I do will likely be able to be installed without worrying about the snapshot channel.
Also messing with some touch-screen specific .gtk2.0-rc entries seem to help, but since I reformatted, I don't quite have those offhand at the moment. I'll have to look them up again.
Hi!
Thanks a lot for all these useful explanations! Finally I was able to run Firefox on my bq E4.5 (rc-proposed)! But I have a few questions:
1) I don't have any on-screen keyboard
2) it works like with a mouse (no touch scrolling for instance)
Is there something I can do about that?
takri said:
Hi!
Thanks a lot for all these useful explanations! Finally I was able to run Firefox on my bq E4.5 (rc-proposed)! But I have a few questions:
1) I don't have any on-screen keyboard
2) it works like with a mouse (no touch scrolling for instance)
Is there something I can do about that?
Click to expand...
Click to collapse
You could try the touchegg package for multi touch gestures, I haven't gotten around to testing it yet. As for keyboard, you can use onboard for most applications or if the application is a QT application, it will pop up the system keyboard (behavior was exhibited by calibre)
ShadowEO said:
You could try the touchegg package for multi touch gestures, I haven't gotten around to testing it yet. As for keyboard, you can use onboard for most applications or if the application is a QT application, it will pop up the system keyboard (behavior was exhibited by calibre)
Click to expand...
Click to collapse
Thanks a lot for your answer. Sorry I don't know much yet about all this so my questions might be silly!
1) I installed touchegg but I don't know how to make it work
2) I have no keyboard in any app I installed (caja, gedit, firefox, ...)
Another question: I have a bq E4.5 and although I have 3.5G of free space on my internal memory the space available for apt-get-ed apps is much smaller (I have 50M left after installing just those few apps above). So no way to try libreoffice or other heavier app. Do you know if there is a solution for that?
Thank you very much!
takri said:
2) I have no keyboard in any app I installed (caja, gedit, firefox, ...)
Click to expand...
Click to collapse
If you use the matchbox setup I described above then you should have a keyboard.
Another question: I have a bq E4.5 and although I have 3.5G of free space on my internal memory the space available for apt-get-ed apps is much smaller (I have 50M left after installing just those few apps above). So no way to try libreoffice or other heavier app. Do you know if there is a solution for that?
Click to expand...
Click to collapse
This website describes a tweak to put the apt cache on an external SD card. It's in German, but the command lines should be clear enough. Let us know how it goes.
https://wiki.ubuntuusers.de/Ubuntu_Touch/Terminal/#Freien-Speicher-beobachten
You would need to run touchegg in the wrapper. Sadly wth keyboard, the only applications that will get the system keyboard are QT based applications. GTK+ and other applications will require onboard to be installed. I messed around with trying to install maliit-context-gtk2 to get the system keyboard to show in all apps, but that broke the keyboard completely.
Remember XMir is better used with a physical keyboard since it doesn't trigger the Ubuntu keyboard for everything.
You can also make the system img bigger if using MultiROM: you simply run e2fsck -fp /path/to/Ubuntu.IMG and resize2fs <target size> /path/to/Ubuntu.IMG.
ShadowEO said:
You would need to run touchegg in the wrapper.
Click to expand...
Click to collapse
I've played around with this a bit, but I can't get touchegg to work. I start an xmir application, then log in via ssh from my desktop. After setting the DISPLAY variable, I can start more X applications ok. After starting touchegg I see an output like this:
Code:
Reading config from "/home/phablet/.config/touchegg/touchegg.conf"
Try to make a multitouch gesture. If everything goes well the information about the gesture must appear
[+] Avaliable gesture:
Name -> Flick
[+] Avaliable gesture:
Name -> Drag
[+] Avaliable gesture:
Name -> Pinch
[+] Avaliable gesture:
Name -> Rotate
[+] Avaliable gesture:
Name -> Tap
[+] Avaliable gesture:
Name -> Touch
I assume that I am supposed to see some more output when a touch gesture is recognised by touchegg, but nothing ever shows up.
I can see touch events with either xinput or evtest
Code:
$ xinput test "xmir-fake-touch-pointer:0"
motion a[0]=36317 a[1]=42290
button press 1
motion a[0]=36590 a[1]=41730
motion a[0]=36645 a[1]=41275
motion a[0]=36536 a[1]=40469
motion a[0]=36263 a[1]=39524
motion a[0]=35935 a[1]=39034
motion a[0]=34897 a[1]=38019
motion a[0]=33532 a[1]=36934
motion a[0]=32713 a[1]=36303
motion a[0]=31839 a[1]=35778
motion a[0]=31293 a[1]=35533
motion a[0]=30856 a[1]=35323
motion a[0]=30638 a[1]=35253
motion a[0]=30419 a[1]=35148
motion a[0]=30255 a[1]=35078
motion a[0]=29928 a[1]=34903
motion a[0]=29873 a[1]=34868
motion a[0]=29873 a[1]=34868
motion a[0]=29873 a[1]=34868
button release 1
Code:
$ evtest /dev/input/event0
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "elan-touchscreen"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event type 3 (EV_ABS)
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 9
Event code 48 (ABS_MT_TOUCH_MAJOR)
Value 0
Min 0
Max 31
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 1343
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 2239
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Event code 58 (ABS_MT_PRESSURE)
Value 0
Min 0
Max 255
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 9936.473027, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 1159
Event: time 9936.473088, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 12
Event: time 9936.473088, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 27
Event: time 9936.473118, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 338
Event: time 9936.473118, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1059
Event: time 9936.473149, -------------- SYN_REPORT ------------
Event: time 9936.509709, type 3 (EV_ABS), code 48 (ABS_MT_TOUCH_MAJOR), value 11
Event: time 9936.509709, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 43
Event: time 9936.509709, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 351
Event: time 9936.509739, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1061
Event: time 9936.509739, -------------- SYN_REPORT ------------
Event: time 9936.512791, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 46
Event: time 9936.512791, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 357
Event: time 9936.512791, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 1063
Some websites point to synclient for the configuration of touchegg, but that doesn't seem to work in Xmir:
Code:
$ synclient
Couldn't find synaptics properties. No synaptics driver loaded?
Does anyone else have more luck with touchegg?
While researching it, I stumbled over references to xSwipe, but I haven't looked into that any further.
ShadowEO said:
You would need to run touchegg in the wrapper. Sadly wth keyboard, the only applications that will get the system keyboard are QT based applications. GTK+ and other applications will require onboard to be installed. I messed around with trying to install maliit-context-gtk2 to get the system keyboard to show in all apps, but that broke the keyboard completely.
Click to expand...
Click to collapse
Just to reiterate, the matchbox-keyboard works fine for me!
Oh, and one thing I wanted to share: The firefox extension Grab and Drag allows a more natural touch screen style drag-to-scroll.
I completely forgot the matchbox keyboard while writing that reply, I'm not sure what's going on with touchegg as I haven't had a chance to play with it on Ubuntu touch. It could be that XMir isn't actually passing that much information about touch events.
matchbox-window-manager struggle
I am on the new Aquarius m10 Ubuntu tablet.
Tried to run tome applications and realized the X11 and Mir problem.
Came across your solution! Thank you for sharring!
Well, I dont seem to be able to install matchbox-window-manager
It shows a lot of missing dependencies and I am not abble to install them manually either..
The following packages have unmet dependencies:
matchbox-window-manager : Depends: libmatchbox1 (>= 1.7-1) but it is not going to be installed
Depends: libstartup-notification0 (>= 0.2) but it is not going to be installed
Depends: libxsettings-client0 but it is not going to be installed
Any light?? Thank you very much
eskizon said:
I am on the new Aquarius m10 Ubuntu tablet.
Tried to run tome applications and realized the X11 and Mir problem.
Came across your solution! Thank you for sharring!
Well, I dont seem to be able to install matchbox-window-manager
It shows a lot of missing dependencies and I am not abble to install them manually either..
The following packages have unmet dependencies:
matchbox-window-manager : Depends: libmatchbox1 (>= 1.7-1) but it is not going to be installed
Depends: libstartup-notification0 (>= 0.2) but it is not going to be installed
Depends: libxsettings-client0 but it is not going to be installed
Any light?? Thank you very much
Click to expand...
Click to collapse
Mhm, not sure. You do have set it to read-write and you did an apt update, right?
doniks said:
Mhm, not sure. You do have set it to read-write and you did an apt update, right?
Click to expand...
Click to collapse
Thanks for sharing this info! I also own the M10 ubuntu tablet and try to run some X11 apps.
I am able to apt-get matchbox-window-manager. But it won't start and says it can't find the display.
Running either:
Code:
matchbox-window-manager
matchbox-window-manager -d :0
as a normal user or root always returns: "can't open display! check your DISPLAY variable.".
ubuntu-pocket-desktop is up to date and I also set the DPI in ~/.Xdefaults.
What could be the reason it can't find the display? What could I try?
Tazard4 said:
What could be the reason it can't find the display?
Click to expand...
Click to collapse
You don't have an X server running. At least not at :0.
What could I try?
Click to expand...
Click to collapse
Follow the instructions in the original post or in my post #4.
Bumping this thread as I've edited the OP with the official instructions for running Legacy X Applications on Ubuntu Touch. As well as information about getting the system maliit-based OSK showing in X Applications (It's not that great though, you still may have better luck with matchbox-keyboard/on-board, but not sure how you'd even start those in Libertine.)

Categories

Resources