im building new device and have to provide CTS review results,
unfortunately upon running java -cp ddmlib-prebuilt.jar;tradefed-prebuilt.jar;hosttestlib.jar;cts-tradefed.jar -DCTS_ROOT=D:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\android-cts\tools\cts com.android.cts.tradefed.command.CtsConsole
and then running a list devices command, tradefed returns empty list.
Can anyone advice if there are any hard pre-requisites for execution of tradefed?
Or any other guess as to what exactly may be the problem?
ps. Running a tests leaves immediate empty reply without no error code.
ps2. target is 4.4.4 kitkat
Resolution found, problem was in PATH incorrectly set in windows and in executing command (must lead to main directory of CTS not to tradefed directory)
Related
I have a C library to be integrated with my project, but upon working, I got a stack corruption error. I decided that a malloc debug might help in my case, but can't seemed to configure it properly.
I have tried to follow this tutorial : https://developer.android.com/ndk/guides/wrap-script
I wrote my wrap script, which just contains the following line (I don't even add the malloc debug options yet) :
#!/system/bin/sh
exec "$#"
I put the script on the default resources/lib/{arch} folder and verified that it is indeed got packaged correctly into the apk in the lib folder.
But upon launching the app, it seemed to stuck, and just displayed an empty white screen (I have verified the app working properly without the wrapping shell script, at least until the stack corruption occurred).
I have noticed that the logcat print the following lines :
2019-05-24 16:35:00.524 1927-1942/? W/ActivityManager: Launch timeout has expired, giving up wake lock!
2019-05-24 16:35:00.680 1927-1942/? W/ActivityManager: Process ProcessRecord{e1f6d50 6975:my.package.name/u0a85} failed to attach
2019-05-24 16:35:00.681 1927-1942/? I/ActivityManager: Killing 6975:my.package.name/u0a85 (adj -10000): start time
I had tried using non rooted android 8.1 device, Android Pie, even with Pixel on Android Q, but the result is the same. I tried to move to emulator, but no avail, it fails with the same result. I had tried using both NDK 17c and NDK 19, both produced the same result. I'm working on windows, if that might relevant.
Any help is appreciated.
After trying various alternative, turns out the problem happened because of the different EOL format between windows (my workstation) and linux (the android device). After converting my wrap.sh file EOL fromat from Windows (CR LF) to Unix EOL format (LF), I managed to get it running.
I am trying to build a custom rom in AOSP angler-debug (Nexus6p, 8.0).
Full build works fine.Then I change some code in
framework/base/core/java/..
and run
mmma framework/base
to rebuild the framework.
Here is the problem :
When I use adb sync to update framework, it leads to boot failure:
"didn't find class "com.android.providers.settings.SettingsProvider on path: ...."
"No original dex files found for dex location /system/priv-app/SettingsProvider/SettingsProvider.apk"
When I use make snod and fastboot flashall to flash system image, the device can boot correctly and the modified code effects.
Question :
Is there something different between these two commands?
There are some mechanisms in framework to make sure the framework.jar is the original one when device is flashed. It seems that other parts of framework does not have this limitation.
In my experience, if your change codes other than framework/base, adb sync is fine, otherwise flash system image to avoid weird things.
You should feel lucky that building speed is way faster in AOSP 8, when I worked with AOSP 5, build the framework/base is a disaster.
I'm going to use the strace -p <myPid> command between two applications.
However, strace command does not work with other applications (it works well for itself).
This is the error message:
attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
If the command error occurs because of the difference of uid, can I fix modifies the uid?
Or is there any other solutions?
I did not exactly resolve on this issue, there are some problems figured out.
This issue is associated with setUid permission and android SE.
First of all, then build a android version 4.0.3, so I flashed an image file to a reference Phone.
And after giving the permission of setUid STRACE, it works well.(android SE was released above 4.3)
However, version 4.4.2 android SE were blocking the access process.
(Galaxy series can not be released because the android SE and KNOX interact with each other.)
Unfortunately, now I don't have an extra reference phone, turn off the android SE, I can't try running the command STRACE.(I'll update as soon as possible.)
I have this application which I'm testing. I use a script which automatically installs the app but I also want to restart the device. This is important as after the installation I run a monkey-test on the device and all kind of quirks and bugs may arise. To get rid of these I want to restart the phone to get it into some kind of "known state". (These bugs are not only in the app as the phone has been known to suddenly shutdown during the tests)
My installation script is run with jython and I know of the device.reboot() command but this takes almost no time at all (which makes me suspicious) and doesn't work very well. I know there's three arguments: "bootloader", "recovery" and "None" but I can't find the impact these would have on the device.
So my question is, is device.reboot() the right command to use? If yes, what happens when I don't use any arguments with the device.reboot() command and what is the effects of the arguments.
It may be worth mentioning that I run the jython script from a batch command prompt in jenkins. So any batch commands using adb or similar would work just as fine.
device.reboot("None") works on my device
Can anyone tell me how to resolve the following issue, or what tools may be available for me to try to resolve this. I get this error when I try to start a Jelly Bean VM.
Starting emulator for AVD 'Nexus_7'
createRenderThread failed to connect
Failed to allocate memory: 8
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I've tried executing it from the command line as:
C:\Program Files (x86)\Android\android-sdk\tools>emulator -avd Nexus_7 -memory 1024
And still no-go. I can't see any way to get more detailed information. And I really don't know where the 8 comes from from memory allocation.
Here's my virtual device set-up:
Any help is appreciated.
In my case this was caused by blocking some of the traffic/ports in my firewall.
It appears that this message is shown also when the emulator can not be reached (e.g. by Eclipse). When this is the case, the following happens:
the message (create render thread failed to connect) appears also while starting the emulator from AVD
Eclipse does not 'see' running emulators and starts a new one for each run of the program
Eclipse never manages to load apk into the emulator
I believe this post can help you to solve this issue. Just download tools_r19-windows.zip zip file and replace the tools folder in your sdk with the one provided in the zip file. Later when you launch Eclipse, ignore the ADT version warning message and you are good to go.
I also had the same issue and this technique helped me to solve the problem.