HChen
HChen

Reputation: 268

error: could not load android-info.txt

After I built the source code of android, I ran the following command and got the error.

#fastboot -w flashall
error: could not load android-info.txt

I had successfully built the source code for nexus one (build 5), and I found that there is a android-info.txt file in the directory out/target/passion/.

Also, I am sure that the phone is connected. When I run "fastboot devices", it shows the device.

Anybody know the reason?

Upvotes: 12

Views: 28117

Answers (4)

Akhil
Akhil

Reputation: 51

It depends on how the flash all script is organized. Try flashing into the partition directly.

Eg: fastboot flash system system.img

I observed this issue when trying to fastboot update an OTA package.

Eg: fastboot update xyz.zip.

Currect way to update via fastboot is

fastboot update updateImagename.img

Upvotes: 1

Shridutt Kothari
Shridutt Kothari

Reputation: 7394

As $fastboot flashall -w

flash the Rom on connected device it needs to know which Run/Device/Product you want to flash as there might be many products available in out/target/product directory, And so product is obtained by ANDROID_PRODUCT_OUT variable which should point to any product i.e.

/home/{usr name}/{build directory}/out/target/product/{taget}

And to set the ANDROID_PRODUCT_OUT we just need to do:

source build/envsetup.sh 
lunch

and choose your product in lunch menu, so that fastboot flashall -w would know which product you wanna flash.

Upvotes: 1

user1145813
user1145813

Reputation: 21

Call lunch to set the environment variables needed. For example, 'lunch aosp_flo-eng' can be called to make sure the environment is in order for the Nexus 7 [2013] tablet.

Upvotes: 0

andrew
andrew

Reputation: 797

Old thread so sorry for reactivating it, but it's still one of the top hits and it's unanswered. My fix was to ensure I had the ANDROID_PRODUCT_OUT environment variable, and that it was pointing to /home/{usr name}/{build directory}/out/target/product/{taget}

Again, sorry for resurrecting a dead post.

Upvotes: 24

Related Questions