[Q] Using fastboot -c - Fire HD 6 and 7 Q&A, Help & Troubleshooting

Hello everybody. I need help figuring out what command line configuration to put inside of the parentheses of
Code:
fastboot -c " "
How can I find out what command line to put in so that I can use
Code:
fastboot boot
Apparently since Android 4.4 you can no longer simply do the command
Code:
fastboot boot img.mg
and you have to do it something like
Code:
fastboot -c "console=ttyHSL0,115200,n8 androidboot.hardware=mako lge.kcal=0|0|0|x" img.img
or
Code:
fastboot -c "lge.kcal=0|0|0|x" boot img.img
or else it won't boot. The above commands work for the nexus 4. I do not have the source for my device but I do have the boot.img and zimage. I need this info to help me root the HD6!

can you put the boot and zimage somewhere so i can download them.

HT123 said:
can you put the boot and zimage somewhere so i can download them.
Click to expand...
Click to collapse
Yes I will do that later today

[quote name="AdamOutler" post=57883049]So that is your CMDLINE. You can get the default CMDLINE from the stock boot.img. If you are on Ubuntu, you can
apt-get install abootimg
Click to expand...
Click to collapse
, then
abootimg -x path/to/boot.img
Click to expand...
Click to collapse
The file named something.cfg will contain the stock CMDLINE. Hope that helps.[/QUOTE]
I appreciate your reply. Neat tool. Before I was using unpackbootimg and it would create a blank boot.img-cmdline file. I just tried out your method and got similar results:
bootsize = 0x51f100
pagesize = 0x800
kerneladdr = 0x10008000
ramdiskaddr = 0x11000000
secondaddr = 0x10f00000
tagsaddr = 0x10000100
name =
cmdline =
Click to expand...
Click to collapse
I am guessing that the image should not require an additional command line param. But I am unable to boot even the stock boot img with fastboot boot. Is this a result of a locked bootloader?

kernel
Any progress? may be you can give us the kernel binary, so we can also test together

senzhk said:
Any progress? may be you can give us the kernel binary, so we can also test together
Click to expand...
Click to collapse
HT123 said:
can you put the boot and zimage somewhere so i can download them.
Click to expand...
Click to collapse
https://drive.google.com/open?id=0Bx_94ujbh0qoTm5rd0R5a041Ymc&authuser=0

Tried fastboot boot boot.img. It said Downloaded, and booting, but nothing happened.
I remember you have UART output, do you get any output whille 'booting'?

senzhk said:
Tried fastboot boot boot.img. It said Downloaded, and booting, but nothing happened.
I remember you have UART output, do you get any output whille 'booting'?
Click to expand...
Click to collapse
It shows some log about kernel size and ram size and then stops loging

Related

error: cannot load 'unlock_code.bin'

I get this error every time when using htc dev boot unlocker. error: cannot load 'unlock_code.bin'
any ideas please
Is the unlock_code.bin file in the same directory as all the other unlock files?
still wont work
My Unlock_code.bin file is in the same file as the fastboot, yet it still wont load...
UPDATE
FIXED: had to change the directory in Command Prompt from c:\user to the location of the .bin file.
Duckvdm said:
My Unlock_code.bin file is in the same file as the fastboot, yet it still wont load...
UPDATE
FIXED: had to change the directory in Command Prompt from c:\user to the location of the .bin file.
Click to expand...
Click to collapse
finally something worked for me
blackbolo said:
finally something worked for me
Click to expand...
Click to collapse
I have the same problem, exactly like the op posted, but I did change the directory to the same one where the unlock bin file was which also included the 3 files that htcdev.com/bootloader told me to put in there (such as fastboot)
But still doesn't work. In fact I can provide a screenshot clearly showing the directory where the unlock file and other files are, aswell as my command prompts and errors.
Please help me don't disregard my post : P I have been trying to figure this out for hours, I even called htcdev support and they couldn't help, told me to ask in forums LOL? why is there a support number if they won't help?
pontypool said:
I have the same problem, exactly like the op posted, but I did change the directory to the same one where the unlock bin file was which also included the 3 files that htcdev.com/bootloader told me to put in there (such as fastboot)
But still doesn't work. In fact I can provide a screenshot clearly showing the directory where the unlock file and other files are, aswell as my command prompts and errors.
Please help me don't disregard my post : P I have been trying to figure this out for hours, I even called htcdev support and they couldn't help, told me to ask in forums LOL? why is there a support number if they won't help?
Click to expand...
Click to collapse
*facepalm* Um Sir, if your fastboot, adb, and UNLOCK_TOKEN files are all in the folder "aaa" why are you directing your command prompts to the non-existent "abd" folder? In your case the very first thing you should be typing into the command prompt is: cd E:\aaa Now you can actually execute fastboot commands because that is where all the files are.
JnNn98 said:
*facepalm* Um Sir, if your fastboot, adb, and UNLOCK_TOKEN files are all in the folder "aaa" why are you directing your command prompts to the non-existent "abd" folder? In your case the very first thing you should be typing into the command prompt is: cd E:\aaa Now you can actually execute fastboot commands because that is where all the files are.
Click to expand...
Click to collapse
my mistake. i had two folders aaa and abd with identical files. but the error still remains nevertheless, as seen in the new screenshot
it's just a stupid mistake of mine. i didnt put the CD part in.. i assume that was for people who had the files on a cd.
* walks away in shame *
pontypool said:
my mistake. i had two folders aaa and abd with identical files. but the error still remains nevertheless, as seen in the new screenshot
it's just a stupid mistake of mine. i didnt put the CD part in.. i assume that was for people who had the files on a cd.
* walks away in shame *
Click to expand...
Click to collapse
So does it work now? BTW "cd" is just something you would type when you have to change the directory in the cmd, it actually has nothing to do with actual CD's (Compact Discs)
---------- Post added at 03:38 PM ---------- Previous post was at 03:22 PM ----------
pontypool said:
my mistake. i had two folders aaa and abd with identical files. but the error still remains nevertheless, as seen in the new screenshot
it's just a stupid mistake of mine. i didnt put the CD part in.. i assume that was for people who had the files on a cd.
* walks away in shame *
Click to expand...
Click to collapse
So does it work now? BTW "cd" is just something you would type when you have to change the directory in the cmd, it actually has nothing to do with actual CD's (Compact Discs)
JnNn98 said:
So does it work now? BTW "cd" is just something you would type when you have to change the directory in the cmd, it actually has nothing to do with actual CD's (Compact Discs)
---------- Post added at 03:38 PM ---------- Previous post was at 03:22 PM ----------
So does it work now? BTW "cd" is just something you would type when you have to change the directory in the cmd, it actually has nothing to do with actual CD's (Compact Discs)
Click to expand...
Click to collapse
yes it works now. I realise now, but at the time I assumed it was a suggested directory if the files are stored on a cd.
Unknown error
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
E:\Documents and Settings\MovilSol#2\Desktop>fastboot flash unlocktoken unlock_code.bin
error: cannot load 'unlock_code.bin': Unknown error
Please help me! D:
That should be a capital U in Unlock_code.bin
Sent from my Evo 3D CDMA using xda premium
xion009 said:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
E:\Documents and Settings\MovilSol#2\Desktop>fastboot flash unlocktoken unlock_code.bin
error: cannot load 'unlock_code.bin': Unknown error
Please help me! D:
Click to expand...
Click to collapse
Try to generate the Unclock_code.bin from htcdev website again.
Replace the new file in the fastboot directory . It should work .
XDA-Dev. said:
Try to generate the Unclock_code.bin from htcdev website again.
Replace the new file in the fastboot directory . It should work .
Click to expand...
Click to collapse
I already tried to generate the unlock_code.bin alot of times in htcdev and none works /:
error
Duckvdm said:
My Unlock_code.bin file is in the same file as the fastboot, yet it still wont load...
UPDATE
FIXED: had to change the directory in Command Prompt from c:\user to the location of the .bin file.
Click to expand...
Click to collapse
yes thanks for that mate was getting same eror so i dropped the 2 files into the path that command prompt was displaying
Help Im having the same problem
Im using a window pc runing windows 8. I have done everthing gotten the .bin file and now i get cannot load 'unlock_code.bin
Thank you! This fixed my issue, though it was a small blow to my ego (seems obvious in retrospect). Still having trouble actually rooting my phone, but at least I'm closer now?
Use kingoroot in fastboot mode no need unlock code.bin
Try it
Can't get my Unlock_code.bin to initiate
I have all my files in one folder and I still cannot get this last step to initiate and I am meet with the following
Johns-MacBook-Pro:~ johnsummersjr$ Users/johnsummersjr/Desktop/Android/fastboot flash unlocktoken Unlock_code.bin
-bash: Users/johnsummersjr/Desktop/Android/fastboot: No such file or directory
Johns-MacBook-Pro:~ johnsummersjr$
/Users/johnsummersjr/Desktop/Screen Shot 2015-11-30 at 9.59.55 PM.png
HTC BootLoader Via Macbook pro
JohnSnow2015 said:
I have all my files in one folder and I still cannot get this last step to initiate and I am meet with the following
Johns-MacBook-Pro:~ johnsummersjr$ Users/johnsummersjr/Desktop/Android/fastboot flash unlocktoken Unlock_code.bin
-bash: Users/johnsummersjr/Desktop/Android/fastboot: No such file or directory
Johns-MacBook-Pro:~ johnsummersjr$
/Users/johnsummersjr/Desktop/Screen Shot 2015-11-30 at 9.59.55 PM.png
Click to expand...
Click to collapse
UPDATE 12/3/15
I got everything into one directory and entered: /Users/johnsummersjr/Desktop/HTC\ Unlock\ BootLoader/adt-bundle-mac-x86_64-20140321/sdk/platform-tools/fastboot unlocktoken Unlock_code.bin. Yet I am met with the following
Johns-MacBook-Pro:~ johnsummersjr$ /Users/johnsummersjr/Desktop/HTC\ Unlock\ BootLoader/adt-bundle-mac-x86_64-20140321/sdk/platform-tools/fastboot unlocktoken Unlock_code.bin
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot + recovery + system
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format <partition> format a flash partition
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address. default: 0x10000000
-n <page size> specify the nand page size. default: 2048
-S <size>[K|M|G] automatically sparse files greater than
size. 0 to disable
Fixed
cal4877 said:
I get this error every time when using htc dev boot unlocker. error: cannot load 'unlock_code.bin'
any ideas please
Click to expand...
Click to collapse
use fastboot folder provided by htc
you can find it on htc site
first select your device for unlocking bootloder then on next page there have given steps 1,2,3..
on the last there will be fastboot downloading links :good:
It will absolutely solve your problem

[Tool] lsplash - Linux splash screen flasher

Hello everyone,
This is lsplash, a linux port of EZ Splash Screen Flasher by TrueBlue_Drew + small additions.
You can use this script to convert picture file to image and flash this image as splash screen.
I added some crop feature to create multiple .img from a larger picture.
I think this script should work on Mac OSX but I did not test it...
Thanks
TrueBlue_Drew! Most of the command to convert / flash are coming from his script.
Original script and thread : http://forum.xda-developers.com/showthread.php?t=956434
xda dev and community. Learning each day with you guys!
YOU ARE USING THIS TOOL AT YOUR OWN RISK AND I AM NOT RESPONSABLE
FOR ANY DAMAGE THAT MAY OCCUR FROM YOU MODIFYING YOUR PHONE.
Dependencies
ffmpeg
imagemagick
android SDK / adb
fastboot
lsplash is not shipped with any dependencies. You must use your package manager to install them.
You can find fastboot here : http://koushikdutta.blurryfox.com/G1/
Info : http://wiki.cyanogenmod.com/wiki/Fastboot
* Using i386 on 64 bits system is fine
Usage
lsplash is a command line utilities. Use ./lsplash -h to print help.
You can find the result of each command in workdir/. lsplash create a copy of your picture and always work in this sub folder.
Convert an picture :
./lsplash.sh -i glacier.png -o mycustom.img
Click to expand...
Click to collapse
Crop large picture :
./lsplash.sh -i One_Piece_wall.jpg -c 480x800
Click to expand...
Click to collapse
Result :
$:>ls workdir
ffmpeg.log
One_Piece_wall.CROP-0.jpg
One_Piece_wall.CROP-0.jpg.img
One_Piece_wall.CROP-1.jpg
One_Piece_wall.CROP-1.jpg.img
One_Piece_wall.CROP-2.jpg
One_Piece_wall.CROP-2.jpg.img
One_Piece_wall.CROP-3.jpg
One_Piece_wall.CROP-3.jpg.img
One_Piece_wall.CROP-4.jpg
One_Piece_wall.CROP-4.jpg.img
One_Piece_wall.CROP-5.jpg
One_Piece_wall.CROP-5.jpg.img
One_Piece_wall.CROP-6.jpg
One_Piece_wall.CROP-6.jpg.img
One_Piece_wall.CROP-7.jpg
One_Piece_wall.CROP-7.jpg.img
One_Piece_wall.jpg
Click to expand...
Click to collapse
You can also use the -c option with a smaller image. Black border will be added.
Backup your current splash screen :
./lsplash.sh -b
Click to expand...
Click to collapse
Flash image to your phone :
./lsplash.sh -f workdir/mycustom.img
Click to expand...
Click to collapse
Download
http://4nakama.net/share/dev/lsplash-1.0.tar.bz
Note
I'm a J2EE developer; not a bash developer. If you spot any error or if you want to contribute, feel free to contact me or to submit your suggestion here.
This script is available under wtfpl licence
Click Thanks button if you like it
Regards.

[Q] View kernel messages on Transformer Prime

Is it possible to see the messages of my CM kernel while booting, either on the tablet screen, or in some other way (e.g. USB serial terminal)? I am trying to find why a kernel doesn't boot (and I suspect that it is flashed correctly but it panics for some reason), so dmesg-after-the-fact is not useful.
The /proc/cmdline of the current CM running on the tablet contains some properties that sound relevant (like 'console' and 'debug_uartport'):
Code:
$ cat /proc/cmdine
tegraid=... [email protected] vmalloc=256M androidboot.serialno=... video=tegrafb no_console_suspend=1 console=none debug_uartport=hsport usbcore.old_scheme_first=1 [email protected] [email protected] core_edp_mv=1300 audio_codec=wm8903 tegraboot=sdmmc gpt gpt_sector=60415999 androidboot.product=TF201 androidboot.carrier=wifi-only
(I have replaced some stuff with ... in the output above)
What I do:
1. Recompile the kernel from its sources, to build a zImage.
2. Get a boot.img from a nandroid backup.
3. Unpack it using the AndroidRoot BootTools.
4. Use the zImage from step 1 with the ramdisk from step 3 and a cmdline like the one at /proc/cmdline to build a boot.img.
5. Boot tablet into fastboot and fastboot -i 0x0b05 boot boot.img to test the new kernel.
But step 5 fails silently, no output is shown (except from the fastboot message "Booting downloaded image"). According to http://bootloader.wikidot.com/linux:android:kmsg, setting console=tty0 should show the messages on the screen, but it doesn't (and neither do "=tty" or "=/dev/tty0").
For step 5... the command should be fastboot -i 0x0b05 boot boot.img
Perhaps this post might help.
http://forum.xda-developers.com/showpost.php?p=27658214&postcount=157
Basically, run your kernel, then flash the file from attachment in above post, then flash a known working kernel. The /proc/last_kmsg from your kernel should be in the /sdcard.
craigacgomez said:
For step 5... the command should be fastboot -i 0x0b05 boot boot.img
Click to expand...
Click to collapse
That was a typo, fixed it in my post, thank you!

[HOWTO][AOSP] Build Nexus 9 volantis target from sources

Building image for Nexus 9 (volantis)
$ lunch aosp_flounder-userdebug
$ make
Building kernel:
Get sources:
$ git clone https://android.googlesource.com/kernel/tegra kernel/tegra
$ git checkout origin/android-tegra-flounder-3.10-lollipop-release
Configuring:
$ make ARCH=arm64 flounder_defconfig
Building:
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android-
Copying to default place:
$ cp kernel/tegra/arch/arm64/boot/Image.gz-dtb device/htc/flounder-kernel/
Then build the whole image with new kernel
$ make
or build only boot.img with:
$ make bootimage
finikorg said:
Hi All,
I want to build Nexus 9 image from sources myself. Is it correct sequence:
$ lunch aosp_flounder-userdebug
$ make
I also read that there is somewhere target aosp_flounder64-userdebug. Which one is better?
Click to expand...
Click to collapse
You'll need to decide that for yourself. If you do the 64-bit version, be sure to have 64-bit gapps ready to flash.
But are those targets multiarch targets? So it shall be fine to run 32bit apps.
Nexus stops on 'Android' start-up screen after reflash my built image
Hi, I tried to build aosp code and it successes.
Now I failed in flashing all my built image into the Nexus 9.
What I did are :
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot reboot
Then my Nexus 9 has reboot and it stops on the screen of 'android' ......
One more question, please... how can I generate the vender.img ?
Regards,
Tonie Huang said:
Hi, I tried to build aosp code and it successes.
Now I failed in flashing all my built image into the Nexus 9.
What I did are :
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot reboot
Then my Nexus 9 has reboot and it stops on the screen of 'android' ......
One more question, please... how can I generate the vender.img ?
Regards,
Click to expand...
Click to collapse
I used
$ fastboot flashall -w
Hi, Thank for your reply.
But my question is if I download all source code from Google.
And build all on my side.
How can I flash all built images into Nexus 9.
Thanks.
Tonie Huang said:
Hi, Thank for your reply.
But my question is if I download all source code from Google.
And build all on my side.
How can I flash all built images into Nexus 9.
Thanks.
Click to expand...
Click to collapse
fastboot flashall should do this. vendor images you shall extract from factory images.
Hi, I did try it.
What I did were :
~$ lunch aosp_flounder-userdebug
Then ~$ make -j4
Then I copy out/target/product/flounder/
1. boot.img
2. cache.img
3. system.img
4. recovery.img
to the folder that Google released factory image : volantis-lrx22c
Then I've tried to:
1. zip those 4 files shown above and also add vender.img into my own image-my.zip
Then follow official steps to flash the system.
It stopped on 'android' logo after rebooting up.
I also tried to use 'fastboot flash boot boot.img' commands to flash each files.
It also halt on 'android' logo after flashing all files and rebooted.
Any other thing I didn't know ? please advise.
Regards,:crying:
Hi, now it works.
What I did are :
Re-created my own Image zip files (within android-info.txt, boot.img, cache.img, recovery.img, system.img and vender.img), and then using fastboot -w update MyImages.zip...
It works...
Thanks.

Question Troubleshooting re-locking bootloader on Pixel 6 Pro with a self-signed build of AOSP

Trying to re-lock a Pixel 6 Pro using the vanilla AOSP, while some progress has been made since I last posted (link) it still isn't working. I'm at the point to where it "should" let me lock it and instead I'm getting this error message:
fastboot flashing lock
FAILED (remote: 'invalid android images, skip locking')
Click to expand...
Click to collapse
Other than that, it boots just fine. My best guess is that something went wrong when signing. I'm following instructions from here for signing the build with some customization below. Here's a summary of the entire process.
Checkout the source code:
repo init -u https://android.googlesource.com/platform/manifest -b android-13.0.0_r37 --depth=1
repo sync -j1 --fail-fast
wget https://dl.google.com/dl/android/aosp/google_devices-raven-tq2a.230305.008.f1-54772b94.tgz
tar -xzf google_devices-raven-tq2a.230305.008.f1-54772b94.tgz
./extract-google_devices-raven.sh
source build/envsetup.sh
lunch aosp_raven-user
Click to expand...
Click to collapse
Generating the self signed keys:
export PATH=~/Android/Sdk/platform-tools/:$PATH
subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=[email protected]'
mkdir ~/.android-certs
for x in releasekey platform shared media networkstack; do \
./development/tools/make_key ~/.android-certs/$x "$subject"; \
done
openssl pkcs8 -in ~/.android-certs/releasekey.pk8 -inform DER -out ~/.android-certs/releasekey.key -nocrypt
Click to expand...
Click to collapse
Patch sign_target_files_apks.py so that it doesn't die when it can't find vendor.img
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 6f96d8f6a..aacd0fd83 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -534,7 +534,7 @@ def ProcessTargetFiles(input_tf_zip, output_tf_zip, misc_info,
for info in input_tf_zip.infolist():
filename = info.filename
- if filename.startswith("IMAGES/"):
+ if filename.startswith("IMAGES/") and not filename.endswith(("vendor.img" , "vendor_dlkm.img")):
continue
Click to expand...
Click to collapse
Build the code and sign it
make dist
sign_target_files_apks -o --default_key_mappings ~/.android-certs out/dist/*-target_files-*.zip signed-target-files.zip
img_from_target_files signed-target-files.zip signed-img.zip
./external/avb/avbtool.py extract_public_key --key ~/.android-certs/releasekey.key --output pkmd.bin
Click to expand...
Click to collapse
Flash your Pixel 6 Pro, but first put it into fastboot mode
fastboot update signed-img.zip
Click to expand...
Click to collapse
Wait for it to boot, then shut it down and go back into Fastboot Mode. Now we flast our self-signed key
fastboot erase avb_custom_key
fastboot flash avb_custom_key pkmd.bin
fastboot reboot bootloader
fastboot flashing lock
Click to expand...
Click to collapse
Then cry when it doesn't work. I am suspicious that it might not be signing the images correctly, however I can't figure out how to check to see if my keys have been used to sign the images. Any idea how to verify that? Anything else I can check to eliminate potential problems? I've also flashed both A and B slots which did nothing.
I am aware of the guide for LineageOS. Did try a few suggestions from there, like patching the Makefile, and it didn't make any difference.

Categories

Resources