[Q] Android automation - Android Q&A, Help & Troubleshooting

Is anyone aware of a program that would allow me to automate a series of "touch" events on Android to test an app I have written. Something controlled by ADB I would assume.
For example;
Touch @ X axis = 500 Y axis = 200;
Wait 0.5 seconds;
Release touch;
Wait 1.9 seconds;
Touch @ X axis = 300 Y axis = 400;
Wait 0.5 seconds;
Release touch;
etc.

Related

Do you believe my xda II total incoming time is 1193046hrs?

my xda II total incoming time is 1193046hrs,my god,it is 136 years!how to reset it? thanks!
Mine too!!!
This happened after a screwed up firmware upgrade..
--- Edit ---
Hmm..
1193045 dec = 123456 hex
But my phone says 1193046 hr 28 min 8 sec
1193046 hrs * 60 = 71582760 minutes
71582760 min + 28 min = 71582788 minutes
71582788 min * 60 = 4294967280 seconds
4294967280 sec + 8 sec = 4294967288 seconds
4294967288 dec = FFFFFFF8 hex = 11111111111111111111111111111000 bin
Now, this is strange..
Why not the last 7 seconds?
if Bonzo's calculation is correct, and I have no reason to doubt it,
Let someone call you for longer than 8 seconds and it will be OK
4294967288 sec = x'FFFFFFF8' = b'11111111111111111111111111111000' = -8 sec
x'FFFFFF8' + x'00000008' = x'100000000' but the 1 will overflow because it can only remember 4 bytes => x'00000000' = 0 sec
ha,it's ok!
Let someone call you for longer than 8 seconds and it will be OK
4294967288 sec = x'FFFFFFF8' = b'11111111111111111111111111111000' = -8 sec
x'FFFFFF8' + x'00000008' = x'100000000' but the 1 will overflow because it can only remember 4 bytes => x'00000000' = 0 sec
thanks very much,it's ok now!
Re: Do you believe my xda II total incoming time is 1193046h
xuanyuan said:
my xda II total incoming time is 1193046hrs,my god,it is 136 years!how to reset it? thanks!
Click to expand...
Click to collapse
try this link
"Call duration infos... how to reset counters?"
http://forum.xda-developers.com/viewtopic.php?t=15482
it works
Geese man you have alotta friends

[Q] Assistance with LMT ISAS setup on HTC EVO 4G LTE

I don't have sufficient posts to add a reply to the LMT Launcher thread since it's in the development section, so I'm posting here.
I'd really like to get ISAS working on the EVO 4g LTE, as it's a great feature. Here are my details:
Details
- State: rooted, s-off, TWRP 2.5 installed
- ROM: CM 10.2 nightly (2013-09-01)
- LMT v. 1.912 installed
LMT Settings
- Activate TouchService = on
- Autostart TouchService checked
- Set TouchService mode = Gestures, ISAS, and pie
- Set gesture input = 2 (see below)
- Relevant output of
Code:
getevent -p
Code:
add device 8: /dev/input/event2 # hence setting 2 in gesture input above
name "synaptics-rmi-touchscreen"
[...]
0035 : value 0, min 0, max 1100, fuzz 0, flat 0, resolution 0
0036 : value 0, min 0, max 1750, fuzz 0, flat 0, resolution 0
- Min bbox = 1
- Activation area thickness = 80
- According to the LMT thread, I should divide the max outputs above by my screen resolution (1280 x 720) to get the right x/y % settings for ISAS, which I've done:
--- Touchscreen to screen factor X = 1100 / 720 = 153%
--- Touchscreen to screen factor Y = 1750 / 1280 = 137%.
Lastly, I've set ISA 1 and ISA 2 (bottom left and bottom center) to open Apollo music player just to test things out. I can get it to work, but I have to hold the phone face up with one hand and violently flick the screen up from the bottom left with my index finger to get it to open. It is not a usable gesture in the least. Trying in vain with the speed I can produce with just my thumb while holding the phone produces no result.
Can someone chime in on any settings that might affect this?
Pie works properly, as do gestures (though if I have a gesture like two finger swipe to the left/right, it cycles my homescreen page at the same time as catching that I passed a gesture to LMT), so it would seem that the general configuration is sound. I just can't figure out why I need to swipe the ISA so darn fast. There's no way I could swipe that fast with my thumb; only holding in one hand and doing it at about 70% of my top possible speed gets the ISA to work.
Thanks for any input/suggestions! Feel free to ask for any other output.
jwhendy said:
I don't have sufficient posts to add a reply to the LMT Launcher thread since it's in the development section, so I'm posting here.
I'd really like to get ISAS working on the EVO 4g LTE, as it's a great feature. Here are my details:
Details
- State: rooted, s-off, TWRP 2.5 installed
- ROM: CM 10.2 nightly (2013-09-01)
- LMT v. 1.912 installed
LMT Settings
- Activate TouchService = on
- Autostart TouchService checked
- Set TouchService mode = Gestures, ISAS, and pie
- Set gesture input = 2 (see below)
- Relevant output of
Code:
getevent -p
Code:
add device 8: /dev/input/event2 # hence setting 2 in gesture input above
name "synaptics-rmi-touchscreen"
[...]
0035 : value 0, min 0, max 1100, fuzz 0, flat 0, resolution 0
0036 : value 0, min 0, max 1750, fuzz 0, flat 0, resolution 0
- Min bbox = 1
- Activation area thickness = 80
- According to the LMT thread, I should divide the max outputs above by my screen resolution (1280 x 720) to get the right x/y % settings for ISAS, which I've done:
--- Touchscreen to screen factor X = 1100 / 720 = 153%
--- Touchscreen to screen factor Y = 1750 / 1280 = 137%.
Lastly, I've set ISA 1 and ISA 2 (bottom left and bottom center) to open Apollo music player just to test things out. I can get it to work, but I have to hold the phone face up with one hand and violently flick the screen up from the bottom left with my index finger to get it to open. It is not a usable gesture in the least. Trying in vain with the speed I can produce with just my thumb while holding the phone produces no result.
Can someone chime in on any settings that might affect this?
Pie works properly, as do gestures (though if I have a gesture like two finger swipe to the left/right, it cycles my homescreen page at the same time as catching that I passed a gesture to LMT), so it would seem that the general configuration is sound. I just can't figure out why I need to swipe the ISA so darn fast. There's no way I could swipe that fast with my thumb; only holding in one hand and doing it at about 70% of my top possible speed gets the ISA to work.
Thanks for any input/suggestions! Feel free to ask for any other output.
Click to expand...
Click to collapse
Can you go into debug mode with 777 as described in the op? Then create a logcat containing starting the touchservice, doing some isas and stopping it again? Then just send me the log via pm and I can check what's wrong.
Btw: Min gesture score and min path length are also affecting isas. What did you configure for these?
Sent from my Nexus 4
@noname81: sorry, should have done the logcat from the beginning. I actually did look through it myself and couldn't figure out how to discern what LMT picked up from the unsuccessful ISA attempts. It seemed like it either worked (a line about a trigger event) or didn't.
In any case, yes, I should have just made one, and I'll send it along shortly.
With respect to any other settings, if they aren't mentioned, I left them alone. So min score was at 70% and min path was at 7. I changed the response to a debug overlay and anytime it activates, I've never seen a score of less than 95%. I did fiddle with making it something like 20% and setting the path at 2 to try and make it really easy to trigger; no luck.
I've now restored defaults, so my post is accurate for the logcat coming your way.
@noname81: links to logs sent (appears I can't attach files yet). Thanks for the assistance.

[ Need APP ] < Alarm app every 30 seconds

Hi all~!
I'm user of my Lumia 620 and I'm looking for free alarm app . The alarm must repeat every 30 seconds . Is there any app ? I need it , because I'm starting ABS for my chest
kukusiek97 said:
Hi all~!
I'm user of my Lumia 620 and I'm looking for free alarm app . The alarm must repeat every 30 seconds . Is there any app ? I need it , because I'm starting ABS for my chest
Click to expand...
Click to collapse
Hello,
What kind of sound would you like? Pick your own music? etc..
Sounds more like a repeative timer to me...this wouldn't even be that hard to make...
C#:
In App.xaml.cs input:
Code:
using System.Threading;
private static DispatcherTimer m_Timer;
private static bool RepeatTimer;
private static int m_Days, m_Hours, m_Minutes, m_Seconds;
public static void beginTiming(int Days, int Hours, int Minutes, int Seconds, bool Repeative)
{
RepeatTimer = Repeative; //Set repeat
m_Days = Days;
m_Hours = Hours;
m_Minutes = Minutes;
m_Seconds = Seconds;
m_Timer = new DispatcherTimer();
m_Timer.Tick += new EventHandler(m_Timer_Tick);
m_Timer.Interval = new TimeSpan(Days, Hours, Minutes, Seconds);
m_Timer.Start();
}
static void m_Timer_Tick(object sender, EventArgs e)
{
if (RepeatTimer == true)
beginTiming(m_Days, m_Hours, m_Minutes, m_Seconds);
//Play Sound Here (Max Limit 10 Seconds)
}
Then have a sound selector and button to begin timing the fields on the MainPage.xaml, if the user's phone turns off (due to WP8 lacking capability of real multitasking -- Thank you Microsoft!) use the background to set a timer to run every thirty seconds or disable screen powering off in the application.
That's basically how it can be created.
So, if anyone decides to do this really quick (5 minutes?) it's quite simple.
I'll give it a go if no one else completes this for you.
kuzcoed said:
Hello,
What kind of sound would you like? Pick your own music? etc..
Sounds more like a repeative timer to me...this wouldn't even be that hard to make...
C#:
In App.xaml.cs input:
Code:
using System.Threading;
private static DispatcherTimer m_Timer;
private static bool RepeatTimer;
private static int m_Days, m_Hours, m_Minutes, m_Seconds;
public static void beginTiming(int Days, int Hours, int Minutes, int Seconds, bool Repeative)
{
RepeatTimer = Repeative; //Set repeat
m_Days = Days;
m_Hours = Hours;
m_Minutes = Minutes;
m_Seconds = Seconds;
m_Timer = new DispatcherTimer();
m_Timer.Tick += new EventHandler(m_Timer_Tick);
m_Timer.Interval = new TimeSpan(Days, Hours, Minutes, Seconds);
m_Timer.Start();
}
static void m_Timer_Tick(object sender, EventArgs e)
{
if (RepeatTimer == true)
beginTiming(m_Days, m_Hours, m_Minutes, m_Seconds);
//Play Sound Here (Max Limit 10 Seconds)
}
Then have a sound selector and button to begin timing the fields on the MainPage.xaml, if the user's phone turns off (due to WP8 lacking capability of real multitasking -- Thank you Microsoft!) use the background to set a timer to run every thirty seconds or disable screen powering off in the application.
That's basically how it can be created.
So, if anyone decides to do this really quick (5 minutes?) it's quite simple.
I'll give it a go if no one else completes this for you.
Click to expand...
Click to collapse
For me something like this http://www.youtube.com/watch?v=uJ2SqGfURyY is enough . But could you give me more instructions ? I'm new user of my Lumia .
kukusiek97 said:
For me something like this http://www.youtube.com/watch?v=uJ2SqGfURyY is enough . But could you give me more instructions ? I'm new user of my Lumia .
Click to expand...
Click to collapse
Hi,
To play the sound you'll need some code that allows play music, in App.xaml.cs you can use multiple options, but, for what you're looking for I think this would work fine:
Code:
Stream musStr = TitleContainer.OpenStream("alarm.wav");
SoundEffect musEffect = SoundEffect.FromStream(musStr);
FrameworkDispatcher.Update();
musEffect.Play();
Put that code inside the "m_Timer_Tick" event or put another
Code:
private / public static void
in your code, then call it.
For example:
Code:
private static void playSound(string Sound)
{
Stream musStr = TitleContainer.OpenStream(Sound);
SoundEffect musEffect = SoundEffect.FromStream(musStr);
FrameworkDispatcher.Update();
musEffect.Play();
}
Call that with the m_Timer_Tick event using:
Code:
playSound(mysound.wav);
Requirements of doing this way is that:
1) Sample Rate must be between 8k Hz and 48k Hz
2) The audio file must be a PCM wave file
3) Can only be mono or stereo
4) Must be 8 or 16 bit

[Archos 97 Neon] fix for hardware-mirrored touch digitizer?

Hi everyone,
when trying to replace a damaged digitizer for this tablet, I only received a similar one that is wired inverse to the original, so that recognition of touch gestures is now flipped vertically (in landscape mode).
Got a refund from the Chinese seller, meanwhile ordered from another seller - got the same screen, a compatible replacement seems to no longer exist for this tablet, now it can only be used with an external mouse.
The device is Archos 97 Neon, running Android 4.2.2 on some Rockchip 31.., I also have root access by now.
After reading through source.android.com/devices/input/touch-devices.html#touch-device-configuration
there was only two .idc files I could find, but they do not (yet?) seem to contain much configuration for the touch screen:
qwerty.idc
Code:
#
# Emulator keyboard configuration file #1.
#
touch.deviceType = touchScreen
touch.orientationAware = 1
keyboard.layout = qwerty
keyboard.characterMap = qwerty
keyboard.orientationAware = 1
keyboard.builtIn = 1
cursor.mode = navigation
cursor.orientationAware = 1
and qwerty2.idc
Code:
#
# Emulator keyboard configuration file #2.
#
touch.deviceType = touchScreen
touch.orientationAware = 1
keyboard.layout = qwerty
keyboard.characterMap = qwerty2
keyboard.orientationAware = 1
keyboard.builtIn = 1
cursor.mode = navigation
cursor.orientationAware = 1
The calculations shown for reference in the Android docs seemed quite straightforward, so I guessed I could just add a few magic lines to those .idc files to have the digitizer input fixed?
But it seems to be more complicated, will I really need the touch driver and / or kernel source code to build a new driver / kernel when all I want to do is mapping the touchpoints to a different location on the screen?
Is there maybe some universal app for rooted devices that kind of sits in between the manufacturers driver and the Android input system? Only found commercial fake "calibration" tools on the Play Store that do not really do anything.
I will be pleased about any suggestions
(the bad thing is, I actually offered to repair the crackled but otherwise still working screen for someone... now that the original screen fell into even more pieces when ripping it out, and there is no more chance to get an exact replacement, I basically destroyed their tablet... feels quite bad )

RK3399 eDP display issues when compiling kernel

have a Firefly AIO-3399j board that I am attempting to run a BOE NV140XTM-N52 display directly from it's eDP interface. I'm a novice when it comes to compiling kernels so I'm having some issues getting this to work properly. I have verified that the physical pinout between the board and the display is correct, and I do get an image on the screen some.
First information about the display from the data sheet. The timing that I see from the display says a 269.5 MHz Clock and the EDID table gives the following information. The clock max is 275.6MHz and minimum is 220.5MHz. Hor Active = 3840, Hor Blanking =160, Ver Active = 1100, Ver Blanking = 48, Hor Sync offset = 48, H sync pulse width = 32, v sync offset = 3, and v sync pulse width = 5. That's where I would assume the following timing would be correct.
hactive = 3840
vactive = 1080
hsync-len = 32
hback-porch = 80
hfront-porch = 48
vsync-len = 5
vback-porch = 40
vfront-porch = 3
Now if I do a cvt modeline calculation I get Modeline "3840x1100_60.00" 353.18 3840 4088 4504 5168 1100 1101 1104 1139 -HSync +Vsync which is completely different on the porches and sync lengths.
Now, onto the board. According to the SDK, the display timing isn't set in the device tree files, it's set in the drivers at /kernel/drivers/gpu/drm/panel/panel-simple.c which I've tried the timing above that I assumed is correct from the datasheet and I've tried the timing from the modeline calculation. I've also put the display timing in the device tree file to see if that would work.
So far, I have gotten to where I get an image on the display and it will flicker from time to time sitting at the home screen of android, but then if I open the app menu, it will flicker even more until I exit it. I've tried adjusting the clock up and down with no resolution, and eventually I will either get a brief image on the screen and then it fades out, or the display will start looking like the porches are completely wrong. The display appears to have EDID information, but doesn't appear to get passed onto the kernel properly.
I've spent several hours recompiling and flashing firmwares to where I'm at a point I have no clue what to do anymore. Can someone help?

Categories

Resources