android-6.0.1_r45 error: could not load boot.img - android

I have build the android-6.0.1_r45 system successful.But when I tried to flash it to nexus 5x, I found an error could not load boot.img.I checked my /generic fold,there is ramdisk.img,system.img and userdata.img. Where is the boot.img?
WHY it is not exist in my build version.
I used this "lunch aosp_arm-eng"

I found the answer.
"lunch aosp_arm-eng" refers to a complete build for the emulator,it is ONLY for emulator. And I want to falsh NEXUS 5X,so I MUST build with "aosp_bullhead-userdebug".OH,HOLYSHIT

I got the same error when I was ready to flash the Neuxs 5X in a new terminal.
$ fastboot flashall -w
error: could not load boot.img
Here's my solution, the key step is to run "lunch" cmd bofore you run "fastboot flashall -w". hope it helps.
$ cd android-7.1.1_r14/
$ lunch #select 21. aosp_bullhead-userdebug
$ cd out/target/product/bullhead
$ fastboot flashall -w
And I guess, we don't need to run lunch first when we just run fastboot flashall -w in the same terminal where we build the android system.

Related

ubuntu phonegap run android error 1

I'm trying to run the Hello-World app of Phonegap on Ubuntu 16.
"/my-app# phonegap --verbose run android"
But no matter what it always takes very long and finishes with an error:
"Running adb shell command "getprop dev.bootcomplete" on target emulator-5584..."
"Running command: adb -s emulator-5584 shell getprop dev.bootcomplete"
"Command finished with error code 1: adb -s,emulator-5584,shell,getprop,dev.bootcomplete"
I've creating different avds and running everything as root user but no change.
Any suggestion what this "error code 1" means would be highly appreciated - I could only find other error codes with the search.
Try running adb kill-server and restart doing all the process again.
EDIT:
Try starting emulator with ubuntu cmd:
LD_PRELOAD='/usr/lib/x8stdc++.so.6' ~/Android/Sdk/tools/emulator -netdelay none -netspeed full -avd Nexus_5X_API_21
where Nexus_5X_API_21 is your emulator name
~/Android/Sdk/tools/emulator is your path where emulator is stored
Do this after adb kill-server, then on another cmd tab, try running
phonegap emulate android --verbose

Android UI testing: "adb shell uiautomator" throws error, "uiautomator" in "adb shell" works

I would like to compile and run Android UI black-box tests using only command-line tools on Windows. I wrote an UiAutomatorTestCase, built it, and uploaded it into /data/local/tmp/. I verified that the jar file was copied into the latter directory.
If I type
adb shell
and then type
uiautomator runtest MyTest.jar –c com.example.MyTest
at the adb shell prompt, the test runs successfully. So far so good.
The problem is if I combine these two steps and type
adb shell uiautomator runtest MyTest.jar –c com.example.MyTest
then I get the following error:
Error: /data/local/tmp/ľc does not exist
According to the documentation, this should work. The error is the same on Windows 7 Pro 32-bit HUN and on Windows 8.1 Pro 64-bit ENG. The device is a Samsung Galaxy S3 Mini (GT-I8190), running Android 4.1.2 (API level 16).
What am I doing wrong?
I strongly suppose,
adb shell
$ <command> is same as adb shell <command>. I've never encountered any discrepancy in this regards.
Please try adb kill-server and adb start-server
Please also try adb -s <device_id> shell <command> you can find <device_id> from adb devices
Can you also please let us know what is the output of adb version?

Batch file to run an Android app in emulator

compile.bat:
set PATH=%PATH%;H:\Source\Program\sdk\tools;
set PATH=%PATH%;H:\Source\Program\sdk\platform-tools;
cd sdk\tools
emulator -avd emulator2
adb wait-for-device
cd sdk\platform-tools
adb install -r SP.apk
Here is my batch file to run a .apk into an emulator. It is from a CD, my adviser wants to run my app in his computer using my CD. My SDK folder is also in the CD and is the same directory with my compile.bat. Is my setting of path correct? Also there is an error when I test the compile.bat from the cd, it says too many files specified; only take APK file and verifier file.
The adb install command also become like this adb install -r SP.apk apk P.apk T_ROOTPROJECT_NAME-debug.apk. I only want to install SP.apk in the emulator.
When I run the commands in cmd, not in a batch file it is working.
Also I want to know how to enable the camera in my laptop to the emulator. My app requires the camera to run.
Can someone help me please? I am begging you. I need this tomorrow its for my graduation. Thank you.

android-info.txt file is not generated while building android source

I have run the following commands -
I cleaned up the existing build using command - make clean
source build/envsetup.sh OR . build/envsetup.sh
lunch full_crespo-userdebug
make -j4 (make fastboot adb)
adb reboot bootloader
fastboot -w flashall
I did these in my MAC OSX 10.9.1 and for the phone Nexus S (crespo). I have no clue why it is not generating the android-info.txt file. Every time I run fastboot command, it says it's missing. However, I have also set up the path ANDROID_PRODUCT_OUT in my .bash_profile file. Still no luck. Can anyone suggest anything?

Running AOSP tests

I am trying to run some AOSP tests, but I can't run any test except for the cts. I mention that I am trying to do this with an emulator. This is the output from my terminal:
manuel#banstyle:~/aosp/development/testrunner$ ./runtest.py -v core
Building tests...
about to run adb shell cat /data/local.prop
about to run adb shell ls -l /data/local.prop
about to run adb root
ONE_SHOT_MAKEFILE="frameworks/base/tests/CoreTests/Android.mk" make -j16 -C "/home/manuel/aosp" all_modules
about to run adb shell pm list instrumentation | grep android.core/android.test.InstrumentationTestRunner
Error: adb shell pm list instrumentation | grep android.core/android.test.InstrumentationTestRunner returned 1 error code
Could not find instrumentation android.core/android.test.InstrumentationTestRunner on device. Try forcing a rebuild by updating a source file, and re-executing runtest.
Exiting due to AbortError...
manuel#banstyle:~/aosp/development/testrunner$ ./runtest.py -v calculator
Building tests...
about to run adb root
ONE_SHOT_MAKEFILE="packages/apps/Calculator/Android.mk" make -j16 -C "/home/manuel/aosp" all_modules
adb push /home/manuel/aosp/out/target/product/generic/data/app/CalculatorTests.odex data/app/CalculatorTests.odex
about to run adb push /home/manuel/aosp/out/target/product/generic/data/app/CalculatorTests.odex data/app/CalculatorTests.odex
adb install -r /home/manuel/aosp/out/target/product/generic/data/app/CalculatorTests.apk
about to run adb install -r /home/manuel/aosp/out/target/product/generic/data/app/CalculatorTests.apk
32 KB/s (2699 bytes in 0.080s)
pkg: /data/local/tmp/CalculatorTests.apk
Failure [INSTALL_FAILED_DEXOPT]
about to run adb shell pm list instrumentation | grep com.android.calculator2.tests/android.test.InstrumentationTestRunner
Error: adb shell pm list instrumentation | grep com.android.calculator2.tests/android.test.InstrumentationTestRunner returned 1 error code
Could not find instrumentation com.android.calculator2.tests/android.test.InstrumentationTestRunner on device. Try forcing a rebuild by updating a source file, and re-executing runtest.
Exiting due to AbortError...
manuel#banstyle:~/aosp/development/testrunner$
Can anyone help?
I also have the same issue when I try 4.2.2. However, I don't have the problem when I work on 4.3. After googling, I realize the problem is caused by apk and odex. In 4.2.2, tests are compiled into apk and odex, which means, the apk doesn't contain the classes.dex. The odex file contains all classes. This actually cause the failure when you only "adb install apk", because pm cannot find the classes.dex.
The way to solve this is to add LOCAL_DEX_PREOPT := false in the Android.mk. This will put the dex back to the apk. I have tried this in 4.2.2 full-eng.
This thread also gives some info. https://groups.google.com/forum/#!topic/android-building/OrBJsS2J3sw

Categories

Resources