I am trying to connect a fire stick 4k max to a 5.5 inch 4k lcd (where the hdmi interface is provided by a MI-PI board). However, here's what i get :
While booting :
and a few seconds later :
The lcd is working on windows. Also, after struggling with display configuration, I managed to make the lcd work on a RPI 4, at the desired resolution (i.e. 3840x2160#30). I am pretty sure that it should also work with a fire tv 4k max, regarding to the first image which is in 4k (I think), but with rotation and wrong pixel positionning issues; I had something very similar on RPI4 before changing some parameters in /boot/config.txt file.
I am a total noob at android. I tried however to set the resolution and the density via adb shell,
but it didn't work...
I also tried to force the rotation using
adb shell settings put system user_rotation 1
but still havig the same problems... Any Ideas or suggestions? I can send some logs if needed. Thank you in advance.
Related
Since I upgraded my monitor to 4k, I have a problem with the Android emulator. On my system (KDE neon 5.15) the AVD does not scale the display of the device, but only the device itself, as it can be seen here: Display of Android device not scaled. So it's almost impossible for me to click on the right area on the display, as the input field of the touch gestures is also scaled correctly, but only the display itself is not. I already checked similiar problems on stack overflow like 4k display & Android emulator: fail, but non of them seem to have the same problem. Does any one else have experienced a similiar problem on Linux and 4k monitors?
I experienced the same problem with my Windows 10 computer. Here is a solution that works for me:
Switch your screen resolution to 1920 x 1080
Start the android emulator
While the emulator is running, switch your resolution back to 3840 x 2160 and it should be scaled properly
You will have to do this every time you start the emulator.
Once you have it running properly in 4k DO NOT close the emulator because you will have to repeat the above steps.
This worked for me on my Windows 10 machine. I am not sure how it would respond on Linux.
I've succeeded to screen mirror the RPI running android things. What I did is:
installed TeamViewer_Host.apk via adb
Ran it on the RPI and login to my account(needed a display connected by HDMI)
connected to it by my laptop TeamViewer application
then got a very nice 1080p resolution mirrored screen
But the problem appeared when I tried to do the same thing but without the HDMI display connected and then suddenly got a poor 32x32 tiny screen on the laptop!
I tried it with Vysor app too but got the same result
My guess is that Android Things somehow detects automatically the resolution of the display and fits itself with it but when there's no display connected, it gives us a 32x32 one!
You guys have any ideas for this one?
Okay. I finally got the right way to do this.
The only thing you need to do is to adjust the resolution(while your Pi is connected to an HDMI display). After that you dont need the physical display any more and can connect to the Pi via TeamViewer.
For adjusting the resolution use this command in ADB:adb shell wm size 1080x1920 or any other resolution.
My android device behaves in a strange manner when I connect a 1366 X 768 lvds display. The UI is different from what I was getting with HDMI connected. I'm getting a different home screen with some other wallpaper and more than that the navigation keys at the bottom are missing.
It looks like based on the hardware display configuration the UI is configured.
Is there a way to override this behaviour? Please suggest some ways to tackle this..
Android Version : Lollipop 5.0.1
issue was due to a hard coded display density parameter. It was hard coded to 240. Issue is resolved when the density value is changed to 160.
$adb shell "echo qemu.sf.lcd_density=160 >> /system/build.prop"
Thanks,
Arjun.
I've several comments in my android wear applications which says that my app doesn't look good on two devices:
ZenWatch and Sony SmartWatch3.
I've gathered DPI and resolution of both:
ZenWatch - 320x320 round 278dpi 1.63 inches
SmartWatch3 - 320x320 square 283dpi 1.6 inches.
Now, I'm trying to run the APP further than the basic emulator. However, there are just two configurations I can use:
I've tried editing it's config files, with no luck.
in config files I couldn't manage to find screen size. Just DPI and looks like any configuration changed, is ignored.
The following is all the configuration I've found interesting:
hw.lcd.density=240
No screen size, no resolution. Just lcd density, which for me looks like DPI, but now I'm not sure. So I cannot mimic any of the two above mentioned devices.
Any tips about this?
Edit 6 June 2015:
I cannot run the device I configurated:
As you can see, a yellow warning is shown, which says the following
So I'm not able to run any device I created.
Click Button of AVD Manager, then click Create Virtual Device..., then click New Hardware Profile, then you can in the new window customize settings of a hardware, like Device Name, Device Type, Screen(ScreenSize, Resolution), Memory, Input, Supported Device states, Camera and Sensors.
After finishing these, you can select this Hardware Profile to create your AVD.
If I understood you correctly, you need to click on the "New Hardware Profile" button on the buttom left corner and then you can change the size of the screen, it's resolution and more.
Just for the sake of answering some other users... What I've been actually facing, was that there's a different DPI used in an AsusZenwatch on 4.4W and 5.1.1... Weird but true. Be sure to test on both APIs
Currently, I'm using below code to get current screen brightness
...
// for HTC Nexus One and HTC Desire
String cmd = "cat /sys/class/leds/lcd-backlight/brightness";
java.lang.Process p = Runtime.getRuntime().exec(cmd);
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()),cmd.length());
...
It's ok when I use to get the brightness in HTC devices(Nexus One, Desire). But when run this code on Samsung Galaxy S, this code is invalid because the path in "cmd" is wrong on this device. The problem is I don't have Samsung Galaxy S to find out the correct path of brightness.
So could you please tell me the correct path on Samsung Galaxy S device or other ways to do this task!
Thanks,
The simplest one I could find, to get the screen brightness, using adb:
adb shell settings get system screen_brightness
I know people have given you better ways to do device brightness. Not denying that, but just out of curiosity, if you want to find the relevant files where brightness is stored, here they are:
Nexus S: /sys/devices/platform/s3cfb/spi_gpio.3/spi3.0/backlight/s5p_bl/brightness
Galaxy Y: /sys/devices/platform/aat1401-backlight.0/backlight/aat1401-backlight/brightness
Galaxy S: /sys/devices/platform/omap2_mcspi.1/spi1.0/backlight/omap_bl/actual_brightness
On the Galaxy S, there also seems to be a file named brightness, but actual_brightness seems more accurate. It is capturing the device's screen going half-bright after a certain idle time.
In a nutshell, there does not seem to be a standard path/file on Samsung devices. Of course, this is not the best way to get the brightness, but if you're curious, the above are some of the files.
The best way to figure out is from your desktop, run
adb shell ls -R /sys/devices >files.txt
and then
grep -i bright files.txt
:-)
Is there a particular reason you're not using the System.Settings class?
Like in:
Can't apply system screen brightness programmatically in Android
Adding screen brightness controls to android application