[DEV] Bootloader unlock procedure and software - Kindle Fire HDX 7" & 8.9" Original Android Develop

I get to unlock the bootloader of my kindle hdx 8.9
Prerequisite:
- Bootloader shipped with firmwareversion 1[34].3.1.0 <= x <= 1[34].3.2.4 (as we use the rsa bug)
- Rooted kindle
adb shell
cat /sys/block/mmcblk0/device/manfid
cat /sys/block/mmcblk0/device/serial
create a file unlock.img with following content:
0xmmssssssss
where mm=manfid and ss=serial
encrypt it with my vortox fork of signing tool at
https://github.com/dpeddi/Cuber
./cuber_unlockbl --sign ./unlock.img ./unlock.signed
connect the hdx to a linux box and do following command:
./fastboot -i 0x1949 devices
./fastboot -i 0x1949 flash unlock unlock.signed
./fastboot -i 0x1949 reboot
adb shell
idme print
[...]
unlock_code: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsv9S[...]WRUFx7FaA==
to get into fastboot mode you can press:
standby volume+ volume- at the same time and keep pressed
follows list of fastboot command:
fastboot -i 0x1949 getvar product
fastboot -i 0x1949 getvar version
fastboot -i 0x1949 getvar kernel
fastboot -i 0x1949 getvar serialno
fastboot -i 0x1949 getvar production
fastboot -i 0x1949 getvar partition-size:userdata|sytem|cache
fastboot -i 0x1949 getvar partition-type:userdata|sytem|cache
fastboot -i 0x1949 getvar max-download-size
fastboot -i 0x1949 boot (still untested by me)
fastboot -i 0x1949 verify (still untested by me)
fastboot -i 0x1949 flash (still untested by me)
fastboot -i 0x1949 erase (still untested by me)
fastboot -i 0x1949 continue
fastboot -i 0x1949 reboot
fastboot -i 0x1949 reboot-bootloader
fastboot -i 0x1949 oem device-info
fastboot -i 0x1949 oem idme ? (only if unlocked)
fastboot -i 0x1949 oem idme cl3an (untested by me but is destructive!)
fastboot -i 0x1949 oem idme v3rsion (untested by me but seems destructive!)
fastboot -i 0x1949 oem relock (i'm lazy to test it)
fastboot -i 0x1949 dump (don't work with current windows implementation of fastboot that i'm using now - try this)
you can use python only tool too :
http://forum.xda-developers.com/kin...tools-create-unlock-img-fix-boot-img-t3050689
http://forum.xda-developers.com/kin...e-software-t3030281/post58897784#post58897784
Regards and thank to all (ralekdev, jcase, Hashcode, Cpasjuste, Vortox, draxie...)

Congratulations! This is a huge breakthrough. Perhaps this will finally attract the developers these devices deserve.
Just to let you know, there are some errors upon compilation:
Code:
g++ -Wall -Wextra -Wno-unused-result -march=native -O2 -Iinclude cuber.cpp -o cuber -lcrypto
g++ -Wall -Wextra -Wno-unused-result -march=native -O2 -Iinclude cuber_unlockbl.cpp -o cuber_unlockbl -lcrypto
cuber_unlockbl.cpp:204:2: warning: "/*" within comment [-Wcomment]
/*
^
cuber_unlockbl.cpp: In function ‘int sign_image(char*, char*)’:
cuber_unlockbl.cpp:194:11: warning: variable ‘imagesize_actual’ set but not used [-Wunused-but-set-variable]
unsigned imagesize_actual;
^
cuber_unlockbl.cpp:250:16: warning: unused variable ‘hash’ [-Wunused-variable]
unsigned char hash[65];
^
cuber_unlockbl.cpp: At global scope:
cuber_unlockbl.cpp:322:33: warning: unused parameter ‘image_ptr’ [-Wunused-parameter]
int verify_image(unsigned char *image_ptr, unsigned char *signature_ptr, unsigned int image_size)
^
cuber_unlockbl.cpp:322:87: warning: unused parameter ‘image_size’ [-Wunused-parameter]
int verify_image(unsigned char *image_ptr, unsigned char *signature_ptr, unsigned int image_size)
^
cuber_unlockbl.cpp: In function ‘int check_image(char*)’:
cuber_unlockbl.cpp:135:64: warning: ‘imagesize_actual’ may be used uninitialized in this function [-Wmaybe-uninitialized]
verify_image(image, image + imagesize_actual, imagesize_actual);
^
Additionally, how exactly do we create the image file? (i.e. what format and all that)

This is great news! I'll take a further look tomorrow into trying this out. Getting late and time for bed.

As writtten before the unlock file is x9911223344 nothing more.
This file is encripted as well using similar method like the image files.
But is not hashed... just encripted with private key.
Image otherwise is hashed and just the hash is encripted.
I'm not interested in fixing code warning... if you want pull me the fix to github. I was interested only by unlock my device.

dpeddi said:
I get to unlock the bootloader of my kindle hdx 8.9
Prerequisite: 1[34].3.1.0 < x < 1[34].3.2.4 (as it use the rsa bug)
Rooted kindle
cat /sys/block/mmcblk0/device/manfid
cat /sys/block/mmcblk0/device/serial
create a file unlock.img with following content:
0xmmssssssss
where mm=manfid and ss=serial
encrypt it with my vortox fork of signing tool at
https://github.com/dpeddi/Cuber
./cuber_unlockbl --sign ./unlock.img ./unlock.signed
connect the hdx to a linux box and do following command:
./fastboot -i 0x1949 devices
./fastboot -i 0x1949 flash unlock unlock.signed
./fastboot -i 0x1949 reboot
adb shell
idme print
[...]
unlock_code: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsv9S[...]WRUFx7FaA==
Regards and thank to all (Hashcode, Cpasjuste, Vortox...)
Click to expand...
Click to collapse
Hearty congratulations @dpeddi !!!!
Can you let us know which sw ver is this applicable to ?
As amazon is again allowing the roll back process with almost no questions asked, if this implies to the downgrade they are allowing its a massive win and breakthrough in HDX DEVELOPMENT (i dont exactly remember the version they are downgrading to - its the one that has been patched with vulnerability)
Edit: its 14.3.2.8
Edit 2 : i believe the answer would be NO, just compared the version number you mentioned, can there be any possibility for 14.3.2.8 version kindles to get root or downgrade or any thing ?
To be honest it would be a shame that just on software version kindle has no future and other software versions have
Again cheers for your achievement

Should be up to 3.2.4. However wit unlocked bl.. development should be a little safer.
Inviato dal mio GT-I9505 utilizzando Tapatalk

dpeddi said:
Should be up to 3.2.4. However wit unlocked bl.. development should be a little safer.
Inviato dal mio GT-I9505 utilizzando Tapatalk
Click to expand...
Click to collapse
Yes true bit this clearly means that 14.3.2.8 will have no development right ?

Exactly. .. encrypted unlock file isn't valid with patched openssl vulnerability. However if you want you can give a try.. i've uploaded more time invalid unlock file with no issue.

I forgot to tell you that if you upgrade bootloader to newer image with fixed openssl you lost unlock.

@dpeddi
I get an error message when I sign the file
I assume that this message is not normal.
My OS is Ubuntu 14.4 x64 and my HDX Modell is Thor 32GB (Bootloaderversion 3.2.3)
./cuber_unlockbl --sign ./unlock.img ./unlock.signed
[ STATUS ] Signing image... ./unlock.img
debug: imagefilesize, :13
debug: image 0x3312345678
[ STATUS ] Checking created signature...
[ STATUS ] Checking created image...
debug: plain_text 0x3312345678
[ ERROR ] Invalid signature
Click to expand...
Click to collapse

rubinho said:
@dpeddi
I get an error message when I sign the file
I assume that this message is not normal.
My OS is Ubuntu 14.4 x64 and my HDX Modell is Thor 32GB (Bootloaderversion 3.2.3)
Click to expand...
Click to collapse
Ok I'll fix the program. However if you have a signed image not empty it should be good.
Please ignore that error...
3am work not always is without stupid warning

fixed error, pull code again. . I confirm the error is not a true error

Is this work on 14.3.1.0?I am little confused cause you said x>14.3.1.0
Sent from my MI 2C using XDA Free mobile app

mxzwhx said:
Is this work on 14.3.1.0?I am little confused cause you said x>14.3.1.0
Sent from my MI 2C using XDA Free mobile app
Click to expand...
Click to collapse
Sure, my wrong... I correct first post

Thanks ,I've noticed one of step need a Linux box,but I just have a Windows PC as I think many people just like me as well,how do we fulfill that step?
Sent from my MI 2C using XDA Free mobile app

mxzwhx said:
Thanks ,I've noticed one of step need a Linux box,but I just have a Windows PC as I think many people just like me as well,how do we fulfill that step?
Click to expand...
Click to collapse
You need linux for all steps (both fastboot and signing).
I read here (at xda) that windows fastboot can't run with Kindle hdx.

dpeddi said:
You need linux for all steps (both fastboot and signing).
I read here (at xda) that windows fastboot can't run with Kindle hdx.
Click to expand...
Click to collapse
Fastboot works fine on my Windows 8.1 x64
I use following Amazon adb/fastboot drivers.... https://mega.co.nz/#!8JtUkSyZ!UbWCYyHVlfpk51FMYzQ5wR89CLWu9gTccJFVEx0lhjI
I have the unlock procedure now been successfully completed. I think at least. (thx @dpeddi)
Do you know a command that I can query the bootloader status ? "oem unlock" does not work
with "fastboot -i 0x1949 oem device-info" comes following message ... Device tampered: false. (whatever that means)

rubinho said:
Fastboot works fine on my Windows 8.1 x64
I use following Amazon adb/fastboot drivers.... https://mega.co.nz/#!8JtUkSyZ!UbWCYyHVlfpk51FMYzQ5wR89CLWu9gTccJFVEx0lhjI
I have the unlock procedure now been successfully completed. I think at least. (thx @dpeddi)
Do you know a command that I can query the bootloader status ? "oem unlock" does not work
with "fastboot -i 0x1949 oem device-info" comes following message ... Device tampered: false. (whatever that means)
Click to expand...
Click to collapse
Look at photo attached on my first post.
You should see unlock successful. Fastballs one unlock doesn't exist on our device.
Adb shell idme print should show you if unlock is ok.
You should see unlock code set with as ascii

OK thx for the info.
The result was exactly as you described it have.
Thus my bootloader should be unlocked.

Hello,can you teach me step by step to unlock the bootloader on Windows 8.1 64bit version ?I am afriad something would go wrong if I do it myself .
Sent from my Nexus HDX 8.9 using XDA Free mobile app
---------- Post added at 02:21 PM ---------- Previous post was at 02:18 PM ----------
rubinho said:
OK thx for the info.
The result was exactly as you described it have.
Thus my bootloader should be unlocked.
Click to expand...
Click to collapse
@rubinho, is that okay ?
Sent from my Nexus HDX 8.9 using XDA Free mobile app

Related

fastboot can't find devices in ubuntu 10.4

Hi
I'm having issues with fastboot.
since i clean install my Ubuntu 10.4 I can't find devices with "fastboot devices"
However i can find with "adb devices"
Here is log
Code:
[email protected]:~$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
[email protected]:~$ lsusb
...
Bus 001 Device 010: ID 0bb4:0c02 High Tech Computer Corp.
....
[email protected]:~$ adb devices
List of devices attached
HT95NKF01331 device
[email protected]:~$ fastboot devices
However this setting was working on 9.10. Am I only one and doing something wrong or i missed something?
Fastboot requires elevated privileges. Did you run it with sudo or as root?
ammm... it worked in 9.10 without root
anyway, i tried with root and nothing happen... any more clues?
Code:
[email protected]:~/X$ sudo `pwd`/fastboot devices
[email protected]:~/X$
On 9.10 I have this exact same problem.. but apparently fastboot does what it is supposed to do:
I can fastboot flash all partitions and reboot (I downgraded my radio on 9.10), only the 'devices' option doesn't do anything.
Hey u guys.
[prefix]I'm a n00b [/prefix]
I have the same problem here..
Sincererly I had it also on windows, so I'm guessing it's something about my phone.
I have a Magic Vodafone (32B) from Italy and using
I' using Ubuntu 9.04 (jaunty Jackalope).
If I go:
Code:
[email protected]:~$ adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT93XKF07203 device
[email protected]:~$
So all good.
Then Power off my phone, VOL-DOWN + POWER, attach the USB cable.
On my Phone I get FASTBOOT-USB.. Kewl. So I go:
Code:
[email protected]:~$fastboot devices
[email protected]:~$
Otherwise it remain stuck
Code:
[email protected]:~$fastboot devices
[]
What the helll?
Just want to throw my phone in the pc screen....!
Any help would be muuccch appreciated.
I hate my 32B Vodafone.... I have it for more then 1 year and still cannot put a cooked ROM on it..
Left to try only the GOLDCARD method..
Anyway..
Cheers from Italy.
Ciao
hmmm ill have to think about this one...
Hey Man..
Thanks for ur prompt reply.. Appreciated.
I really hope you can figure out something
**OFFTOPIC**
I never even read about GOLDCARD.. How does it work.. But I think I need an additional sdcard..
Mybe that could resolve my problem and help me flashing a cooked rom...
I'm sure there'll be plenty of topics about that on this HUUUGE forum
Cheers fm Italy,
jgz [HTCMagic - Donut]
·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.·.
SAPPHIRE PVT 32B SHIP S-ON G
HBOOT-1.33.0004 (SAPP10000)
CPLD-10
RADIO-2.22.19.26I
Apr 9 2009, 23:30:40
This works for me:
sudo ./fastboot devices
I can then go on to do
sudo ./fastboot erase system -w
sudo ./fastboot erase boot
... and so on.
****NOTE: DON'T enter the "erase" commands unless you want to delete everything on your phone.
Zoltair Wright said:
This works for me:
sudo ./fastboot devices
I can then go on to do
sudo ./fastboot erase system -w
sudo ./fastboot erase boot
... and so on.
****NOTE: DON'T enter the "erase" commands unless you want to delete everything on your phone.
Click to expand...
Click to collapse
This worked fr me. thank u

[BOOTLOADER] 2nd-bootloader for Custom ROMs on KFireHD 7" [06/24 CM12.1/TWRP 2.8.7.0]

[BOOTLOADER] 2nd-bootloader for Custom ROMs on KFireHD 7" [06/24 CM12.1/TWRP 2.8.7.0]
Introducing: Kindle Fire 2nd-bootloader + TWRP 2.8.x.x for the Kindle Fire HD 7
*** USE AT YOUR OWN RISK! WHILE I TRY MY BEST TO PROVIDE WORKING KERNELS/ROMS, I AM NOT RESPONSIBLE IF THIS SOFTWARE OR ANYTHING I'VE WORKED ON SUDDENLY FRIES YOUR DEVICE. ***
** THESE FILES WILL ONLY WORK ON A KINDLE FIRE HD 7 **
** WHEN MODDING THE KFIRE HD YOU SHOULD HAVE WORKING FASTBOOT DRIVERS/ACCESS ON YOUR PC. **
LOOKS LIKE NOT ALL FASTBOOT CABLES WILL AUTOMATICALLY PLACE YOU IN FASTBOOT MODE ON THE KINDLE FIRE HD 7. DOWNLOAD THE ANDROID SDK AND GO FROM THERE.
http://developer.android.com/sdk/index.html
Here's 1 website you can purchase a FASTBOOT adapter from (works with your normal USB cable)
http://shop.teamblackhat.info/Factory-Adapters-motadapt.htm
** I don't make any commission or fee from the sales of these devices, I just know they have them on stock most of the time and ship in a reasonable time frame unlike the Chinese variants found on ebay.
Q: How do I know if my fastboot works?
A: With the Kindle powered down, type the following command into a cmd/terminal window on your PC (should return with: < waiting for device> ):
fastboot -i 0x1949 getvar product
Then connect your fastboot cable to the Kindle and reboot. It *SHOULD* show a Fastboot screen and your terminal window should show something like:
product: Tate-XXX-XX (something here)
Type this to reboot out of fastboot mode:
fastboot -i 0x1949 reboot
** IF YOU HAVE QUESTIONS, RE-READ THROUGH THE THREAD FOR ANSWERS. WHEN YOU'RE ABSOLUTELY SURE NO ONE HAS ASKED YOUR QUESTION, GO AHEAD AND RE-READ THE THREAD AGAIN AND USE THE SEARCH FEATURE. THEN POST YOUR QUESTION IF YOU STILL CAN'T FIND THE ANSWER **
INSTRUCTIONS FOR INSTALLING A 2ND-BOOTLOADER TO LOAD CUSTOM KERNELS / ROMS / RECOVERY:
*** BE SURE YOU HAVE A GOOD CHARGE ON THE DEVICE ***
STEP 1. Backup your stock partitions to your own HD for later if you need disaster recovery:
Code:
adb shell su -c "dd if=/dev/block/mmcblk0boot0 of=/sdcard/boot0block.img"
adb shell su -c "dd if=/dev/block/platform/omap/omap_hsmmc.1/by-name/boot of=/sdcard/stock-boot.img"
adb shell su -c "dd if=/dev/block/platform/omap/omap_hsmmc.1/by-name/recovery of=/sdcard/stock-recovery.img"
adb shell su -c "dd if=/dev/block/platform/omap/omap_hsmmc.1/by-name/system of=/sdcard/stock-system.img" # This will take a few minutes
adb pull /sdcard/boot0block.img
adb pull /sdcard/stock-boot.img
adb pull /sdcard/stock-recovery.img
adb pull /sdcard/stock-system.img # This will take a few minutes
Take those files and put them somewhere safe.
**** MAC USERS MAY NEED TO SPARSE THE FILES FOR RE-FLASHING TO THE DEVICE. I NEED A MAC USER TO PROBABLY WORK THROUGH THAT PROCESS AND POST BACKUP COPIES OF THE STOCK PARTITIONS FOR DISASTER RECOVERY ****
STEP 2: Download the files you will need to install 2nd-bootloader, TWRP and CM:
ON THE FOLLOWING DEV-HOST LINKS
USE THE BLUE "DOWNLOAD NOW" BUTTON
-- DO NOT INSTALL AN EXECUTABLE DOWNLOADER TO YOUR SYSTEM! --
I'LL LOOK FOR A BETTER HOST WHEN I GET MORE TIME.
Stack override file:
Mirror 1: Download "stack" from Dev-Host
[12/09] kfhd7-freedom-boot-7.4.6.img (USED ONLY THE FIRST TIME -- .zip files will have their own boot.img's from now on):
Mirror 1: Download "kfhd7-freedom-boot-7.4.6.img" from Dev-Host
md5sum: 1628fc4750d0d49cbce41ab616a9d732
[06/24] TWRP 2.8.7.0 recovery flash Image:
Mirror 1: Download TWRP from Dev-Host
CM-12.1 for the Kindle Fire HD 7 (choose the latest version from):
Mirror 1: Downloads CM
Google Apps from Android File Host:
https://www.androidfilehost.com/?w=files&flid=25361 (Use 5.1 version!)
Download the older 7.2.3 bootloader file and flash to your device via fastboot:
Mirror 1: Download bootloader from Dev-Host
md5sum bb029673d8f186db4dff6d38f4aa28cf
(You SHOULD check the md5sum before using fastboot -- downloads CAN be corrupted)
Place the CM-12.1 ROM and the gapps .zip on your device in the /sdcard area
STEP 3. Install the stack override in /system:
ADB commands entered while booted up into STOCK *rooted* Amazon Kindle OS -- May need to enable ADB debugging in Settings:
[2013-08-21] edited the location where stack is placed on device due to permissions changes
Code:
adb push stack /sdcard/
adb shell su -c "dd if=/sdcard/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"
STEP 4. Stop the auto recovery update script (this file may or may not be present):
Code:
adb shell su -c "mount -o remount,rw ext4 /system"
adb shell su -c "mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak"
adb shell su -c "mount -o remount,ro ext4 /system"
STEP 5:
[ With the device powered off: connect your FASTBOOT USB cable to the Kindle which should cause it to power on and enter "FASTBOOT" mode. Issue the following commands into your command/terminal window on your PC 1 at a time. ]
Code:
fastboot -i 0x1949 flash bootloader kfhd7-u-boot-prod-7.2.3.bin
fastboot -i 0x1949 flash boot kfhd7-freedom-boot-7.4.6.img
fastboot -i 0x1949 flash recovery kfhd7-twrp-2.8.7.0-recovery.img
fastboot -i 0x1949 reboot
*DONT RE-FLASH FREEDOM-BOOT.IMG LATER AFTER FLASHING CUSTOM ROMS -- IT'S FOR STOCK AMAZON OS ONLY / FIRST INSTALL ONLY*
** If everything was done correctly your Kindle will reboot and you will at first see the normal Kindle Fire ORANGE logo and then it will fade and come back as a BLUE logo. **
TO ENTER RECOVERY:
Press the left volume button (volume up) while the logo is still YELLOW and keep pressing until the logo turns BLUE. Wait a moment and you should enter recovery.
STEP 6:
CM-12.1 AND GAPPS INSTALLATION:
(OPTIONAL) Make a backup by selecting "Backup" and then slide your finger to the right on the "Swipe to Back Up"
Once complete use the pentagon "Home" icon in the lower left corner of the screen
Now, select "Wipe"
Swipe the "Swipe to Factory Reset"
Use the "Home" icon
Select "Install"
Browse to the location on your device where you saved the CM-12.1 / GAPPS .ZIP files
Select the CM12.1 ZIP file in the list by touching it, then confirm it says the name of the CM-12.1 .ZIP file on the next screen under "File to flash:"
Select "Add More Zips"
Select the GAPPS ZIP file in the list by touching it -- make sure it says the name of the .ZIP again under "File to flash:"
Swipe the "Swipe to Confirm Flash", and wait for it to finish.
If the screen is blank at any time you can hit the power button to "wake up" the device
Once the flash is done, you'll see a "Home" and "Reboot" buttons at the bottom of the screen
Select "Reboot"
CONGRATULATIONS YOU NOW HAVE THE ABILITY TO INSTALL CUSTOM KERNELS / RECOVERY AND ROMS.
FLASHING BACK TO STOCK:
** FIND THE FILES WE BACKED UP IN STEP #1: ** OR Follow this thread's instructions:
http://forum.xda-developers.com/showthread.php?t=1951254
**** MAC USERS MAY NEED TO SPARSE THE FILES FOR RE-FLASHING TO THE DEVICE. I NEED A MAC USER TO PROBABLY WORK THROUGH THAT PROCESS AND POST BACKUP COPIES OF THE STOCK PARTITIONS FOR DISASTER RECOVERY ****
Plug in your fastboot cable and reboot so that you see the fastboot screen. On your computer go into a prompt and change to the directory where your stock backups are and enter the following commands:
Code:
fastboot -i 0x1949 flash boot [B]stock-boot.img[/B]
fastboot -i 0x1949 flash recovery [B]stock-recovery.img[/B]
fastboot -i 0x1949 flash system [B]stock-system.img[/B] # This one will take a few minutes
fastboot -i 0x1949 reboot
THANKS TO:
fattire for finding the original bootloader exploit
verygreen for doing some initial work on the 2nd-bootloader and fixing bugs (and letting me copy some of his bootloader installation instructions)
Changelog: updated 2013-07-08
freedom boot.img (for use w/ stock Amazon OS + 2nd-bootloader):
[07/08] Updated w/ kernel from 7.4.3 release
Amazon OS .zip:
[07/08] Rebuilt on version 7.4.3 from Amazon
TeamWin Recovery (TWRP) 2.6.0.0
[*][07/08] USB Vendor ID / Product ID in recovery now matches stock Amazon OS
[07/08] Fixed long pause before recovery entry
[07/08] Based on 7.4.3 stock kernel
[07/08] Fixed recovery bootloop issue
[07/08] Screen timeout feature currently disabled due to screen blanking bug
[07/08] TWRP 2.6.0.0 update
[07/08] Added "EFS" partition backup option. Normally, don't need to make too many backups of this, but having a backup will enable you to recover HDMI keys, and some other data.
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"
Can I use install this and still use stock os?
Sent from my KFTT using XDA Premium HD app
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"
Shawnsch said:
Can I use install this and still use stock os?
Sent from my KFTT using XDA Premium HD app
Click to expand...
Click to collapse
Yes, that's how the initial install is setup.
Sent from my DROID RAZR HD using Tapatalk 2
For those using this, for some reason that moment waiting for the device to boot into recovery can seem like eternity. It does take a bit to finally enter recovery but it will eventually do so. You'll see the BLUE logo for a little while so just be patient.
Hashcode said:
Yes, that's how the initial install is setup.
Sent from my DROID RAZR HD using Tapatalk 2
Click to expand...
Click to collapse
hashcode, what are the methods to make a kernel ?
and the startup time increase?
your work is increadible, you dont have a 7" but you made this.
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"
I am looking into a loaner device so that I can setup the kernel for the HD7. So while this new bootloader may seem useless at the moment, that may change.
I am still very busy, of course so it may take time.
Sent from my DROID RAZR HD using Tapatalk 2
Hashcode said:
I am looking into a loaner device so that I can setup the kernel for the HD7. So while this new bootloader may seem useless at the moment, that may change.
I am still very busy, of course so it may take time.
Sent from my DROID RAZR HD using Tapatalk 2
Click to expand...
Click to collapse
start up time of device xD. you are the best rom kernel here. thanks for your beautiful job.
if you need any help or something i can help you with all
I added a missing step where the auto recovery updater runs in the OS on stock boot:
To disable this auto recovery installer do this via adb:
Code:
adb shell su -c "mount -o remount,rw ext4 /system"
adb shell su -c "mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak"
adb shell su -c "mount -o remount,ro ext4 /system"
Safestrap will it remove it
Awesome! I Had 1 small glitch.....
Thanks!! This is awesome. I've been trying to get my Kindle backed up since I got it. I had it rooted the next day and have been toying with it being extra careful not to go too far. Now the fun begins.
One thing....I had to rename kfhd7-twrp-2.3.3.0-recovery.img to get it to flash. I just renamed it to recovery.img
In case anyone else runs into this error
Code:
C:\>fastboot -i 0x1949 flash boot kfhd7-freedom-boot.img
target reported max download size of 1006632960 bytes
sending 'boot' (8145 KB)...
OKAY [ 2.794s]
writing 'boot'...
OKAY [ 0.681s]
finished. total time: 3.475s
C:\>fastboot -i 0x1949 flash recovery kdh7-twrp-2.3.3.0-recovery.img
target reported max download size of 1006632960 bytes
error: cannot load 'kdh7-twrp-2.3.3.0-recovery.img': Unknown error
C:\>fastboot -i 0x1949 flash recovery recovery.img
target reported max download size of 1006632960 bytes
sending 'recovery' (8145 KB)...
OKAY [ 2.804s]
writing 'recovery'...
OKAY [ 0.671s]
finished. total time: 3.475s
C:\>fastboot -i 0x1949 reboot
rebooting...
finished. total time: 0.010s
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"
I cant wait til i get a factory cable thank you to whoever participated in getting this going.
Sent from my KFTT using Tapatalk HD
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"
etom: thank you for bringing this up. i fixed the typo.
Sent from my DROID RAZR HD using Tapatalk 2
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"
etom said:
Thanks!! This is awesome. I've been trying to get my Kindle backed up since I got it. I had it rooted the next day and have been toying with it being extra careful not to go too far. Now the fun begins.
One thing....I had to rename kfhd7-twrp-2.3.3.0-recovery.img to get it to flash. I just renamed it to recovery.img
In case anyone else runs into this error
Code:
C:\>fastboot -i 0x1949 flash boot kfhd7-freedom-boot.img
target reported max download size of 1006632960 bytes
sending 'boot' (8145 KB)...
OKAY [ 2.794s]
writing 'boot'...
OKAY [ 0.681s]
finished. total time: 3.475s
C:\>fastboot -i 0x1949 flash recovery kdh7-twrp-2.3.3.0-recovery.img
target reported max download size of 1006632960 bytes
error: cannot load 'kdh7-twrp-2.3.3.0-recovery.img': Unknown error
C:\>fastboot -i 0x1949 flash recovery recovery.img
target reported max download size of 1006632960 bytes
sending 'recovery' (8145 KB)...
OKAY [ 2.804s]
writing 'recovery'...
OKAY [ 0.671s]
finished. total time: 3.475s
C:\>fastboot -i 0x1949 reboot
rebooting...
finished. total time: 0.010s
Click to expand...
Click to collapse
Thank you i soft bricked my kindle trying flash recovery. Once i changed to recovery.img it worked great
Sent from my KFTT using xda app-developers app
worked like a charm thanks for all your hard work hashcode. so with this i can now flash flashable zips right?
Hashcode said:
I am looking into a loaner device so that I can setup the kernel for the HD7. So while this new bootloader may seem useless at the moment, that may change.
I am still very busy, of course so it may take time.
Sent from my DROID RAZR HD using Tapatalk 2
Click to expand...
Click to collapse
I'm so happy to hear that you finally decided to work on kfhd 7 too, doesn't matter how long it takes, it's good to know we'll get it after all.
Thanks
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"
Hashcode said:
etom: thank you for bringing this up. i fixed the typo.
Sent from my DROID RAZR HD using Tapatalk 2
Click to expand...
Click to collapse
Can i install team win recovery only? I want to flash some files only for now
Sent From My Super Modded KFHD
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"
awesome! guess I gotta go get the kfhd from my dad n do some testing. great news for the community. on the old kf1 it all started with a bootloader. the rest is sure to follow!
Sent from my Nexus 4 using xda premium
kindle
i managed to flash the recovery fine in fastboot but now i am stuck in a bootloop and unable to run the stock os is this normal or have i done somthing wrong
Rob:good:
EDIT: okie so i tried from a clean fresh system using the restore images, i have managed to install the recovery bootloader no problem and i can access it, but if i leave the kindle and want to boot stock it goes orange and the texts flashes like normal and just when you think its going to boot it reboots and does the same thing over and over and over only way to get it to boot is wacking in the fastboot usb and then flashing the stock boot.img i also tried flashing revs beta rom and in twrp it always says error status 7 dunno if that is becasue its not the finished thing or not i am bit stuck now
Re: [BOOTLOADER] Install 2nd-bootloader for Custom ROMs on KFireHD 7"
try wiping data/cache? (factory reset)
Sent from my DROID RAZR HD using Tapatalk 2

ADB Command/HBOOT Changes in recent OTA enhancement for 4.1.2

So it has become prudent to me that I update this info to the general public within the home of our One SV. Most of you may already be aware of the recent OTA Enhancement that the k2_cl has been receiving or already received. I have just learned after trying some modifications within my device that some commands were changed. I have not been able to figure out what all commands have been changed however one that I am aware of and the very one I constantly use as a safety hazard on my own device is booting vice flashing while in fastboot usb. Originally you all may have known the command to be fastboot boot recovery recovery.img (as an example). Its common for people to flash being the command: fastboot flash recovery recovery.img. As for me I ALWAYS BOOT before I flash to insure it's integrity while operating on my device. Thank of it as running within a virtual window to dumb this down for the less understanding individuals. Back on track, this command has been changed. fastboot boot boot boot.img (as an example) no longer works. They changed the command to: fastboot -c "lge.kcal=0|0|0|x" boot customrecovery.img. That code functions respectively no different than as we would use to type: fastboot boot recovery customrecovery.img. Why they made such changes I am not sure. So be cautious of these changes. I made this thread to all who may come to learn about other changes with other commands and if so then please come back here and shar this knowledge as it will be VERY USEFUL TO US ALL. Thanks.
EDIT:
"fastboot boot" command DOESN'T work with the recent 4.1.2 OTA enhancement so you need to SPECIFY a kernel commandline to use "fastboot boot" command.
A list of commands with a quick summary on them.
/boot
This is the boot partition of your Android device, as the name suggests. It includes the android kernel and the ramdisk. The device will not boot without this partition. Wiping this partition from recovery should only be done if absolutely required and once done, the device must NOT be rebooted before installing a new one, which can be done by installing a ROM that includes a /boot partition.
/system
As the name suggests, this partition contains the entire Android OS, other than the kernel and the ramdisk. This includes the Android GUI and all the system applications that come pre-installed on the device. Wiping this partition will remove Android from the device without rendering it unbootable, and you will still be able to put the phone into recovery or bootloader mode to install a new ROM.
/recovery
This is specially designed for backup. The recovery partition can be considered as an alternative boot partition, that lets the device boot into a recovery console for performing advanced recovery and maintenance operations on it.
/data
Again as the name suggest, it is called userdata partition. This partition contains the user’s data like your contacts, sms, settings and all android applications that you have installed. While you are doing factory reset on your device, this partition will wipe out, Then your device will be in the state, when you use for he first time, or the way it was after the last official or custom ROM installation.
/cache
I hope you have some idea about cache, as you are expert on internet browsing. This is the partition where Android stores frequently accessed data and app components. Wiping the cache doesn’t effect your personal data but simply gets rid of the existing data there, which gets automatically rebuilt as you continue using the device.
/misc
This partition contains miscellaneous system settings in form of on/off switches. These settings may include CID (Carrier or Region ID), USB configuration and certain hardware settings etc. This is an important partition and if it is corrupt or missing, several of the device’s features will will not function normally.
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​ 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​
options:
-w erase userdata and cache​ -s <serial number> specify device serial number​ -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​ -n <page size> specify the nand page size. default:​
Edit
---------- Post added at 06:30 PM ---------- Previous post was at 06:21 PM ----------
V1sual1mpact said:
That code functions respectively no different than as we would use to type: fastboot boot recovery customrecovery.img.
EDIT:
"fastboot boot" command DOESN'T work with the recent 4.1.2 OTA enhancement so you need to SPECIFY a kernel commandline to use "fastboot boot" command.
Click to expand...
Click to collapse
The correct cmd to boot a recovery.img before flashing is :
Code:
fastboot boot recovery.img
NOT fastboot boot recovery recovery.img
:thumbup:
russellvone said:
Edit
---------- Post added at 06:30 PM ---------- Previous post was at 06:21 PM ----------
The correct cmd to boot a recovery.img before flashing is :
Code:
fastboot boot recovery.img
NOT fastboot boot recovery recovery.img
:thumbup:
Click to expand...
Click to collapse
Actually, the command I gave is also correct (it's based on optional command) . But thanks for the input. The command has always been the command which I used. However, since that OTA I can not use it anymore.
help
V1sual1mpact said:
Actually, the command I gave is also correct (it's based on optional command) . But thanks for the input. The command has always been the command which I used. However, since that OTA I can not use it anymore.
Click to expand...
Click to collapse
OK, so I'm a bit confused here....What would be the proper command line to actually flash custom recovery....I keep getting an unknown error message using fast flash recovery custom recovery.img...
Rename the recovery.img to recovery.img.
Code:
fastboot flash recovery recovery.img
http://forum.xda-developers.com/showthread.php?p=47471643
Sent from my C525c using XDA Premium 4 mobile app

Requesting assisstance with semi-brick issue.

Hello everyone,
I have unlocked my ASUS TF700T and then attempted to TWRP and a custom ROM. Once I did this, I began having issues. It wouldn't boot. I couldn't restore from TWRP backup. I can't seem to write to the system partition for some reason via fastboot but I seem to be able to do this just fine when in CWM or TWRP. Can anyone suggest what I may try from here? I can only get into recovery via VOL DOWN when booting and then selecting the wipe option. Right now I have two major issues. One is that for the life of me, I have never been able to get fastboot to show the actual serial of the device. It has always shown a single question mark. I have gone as far as building a Linux mint box just to get ADP and FASTBOOT drivers to install correctly on a 32-bit machine with USB 2.0. No luck, save result. My second issue is that I am unable to write to the system partition via fastboot. It gives me a remote () error message on fastboot and a could not process the command error in red on my tablet. I will have the exact error message for you shortly but right now I just wanted to get this posted. Any suggestions?
I can't flash the stock blob via fastboot and I can't seem to install a custom ROM via TWRP or CWM. Please advise.
I suspect me not being able to use ADB is my biggest problem. I can't see a serial number when I use fastboot devices. I have tried endlessly to get this resolved and I can't get it to change, AT ALL. I have installed google drivers, 32-bit fresh Linux OS, and plenty of utilities to auto install. No luck. If anyone can help with this, I'd appreciate it.
Here are my issues in a nutshell.
1.) I am unable to boot into recovery directly. I have to go into fastboot and select wipe, it then reboots and starts up in the recovery kernel. TWRP simply executes a command and then restarts and CWM actually boots and allows me to use it.
2.) No matter what I've tried, I have not been able to get the serial number to come up via fastboot. It simply shows a single questionmark. I have tried many solutions for this, but nothing changes.
3.) I am not sure but I believe the bootloader may be the problem. I can currently use fastboot but adb does not recognize the device.
Any assistance would be greatly appreciated. Thank you! I have tried different version of TWRP and clockwork mod but all seem to have the same result. I also attempted to install another custom rom just for good measure and CWM states that
-Tony
Boy oh boy! Mate, your post is one of the most confusing (and confused) posts I have read in a long time. I think you need to go back to the drawing board, forget everything you think you know and start fresh.
Let's clear some of it up:
1) CWM is a recovery (ClockWorkMod), I think you mean your rom is CM (CyanogenMod)
2) When you boot with Volume Down and Power you are booting into the bootloader, you see the bootloader menu and the tablet is in fastboot mode. The bootloader menu consists of 3 icons (if you are on a 4.2 bootloader):
RCK (recovery),
Android (system),
Wipe Data (stay away - it's a small miracle that you are not hard bricked already if you used this)
Are you saying you don't have those three in the BL menu????
RCK should be flashing and pushing Volume Up should boot you into recovery. There is no way to boot directly into it unless your rom has a modified restart menu.
3) adb and fastboot are two different protocols to connect PC and tablet. You use adb when Android is running, you use fastboot when the tablet is in fastboot mode.
Don't know what you tried to get the correct drivers working, but you probably have to go back to square 1 here too. If you use Windows check in Device Manager if your tablet is recognized at all:
Open Device Manager, boot the tablet int the bootloader and connect it via original USB cable to the PC. Do you see any change in Device Manager?
You left out the most important bits:
What bootloader version are you on?
Which version of TWRP?
How did you install TWRP if you don't have fastboot working?
What CM version are you running?
Thanks for the reply. I'll try and be more concise...
Hello,
First of all, I'd like to say thank you. I am all over the place. I will attempt to be more detailed and concise with my wording. Here are my responses below:
berndblb said:
Boy oh boy! Mate, your post is one of the most confusing (and confused) posts I have read in a long time. I think you need to go back to the drawing board, forget everything you think you know and start fresh.
Let's clear some of it up:
1) CWM is a recovery (ClockWorkMod), I think you mean your rom is CM (CyanogenMod)
Click to expand...
Click to collapse
I am familiar with the difference. I have not used nor flashed CyanogenMod. I have indeed installed CWM on recovery and can still do so. I just can't boot into recovery without using the dreded WIPE option on my bootloader. Once I use this, it restarts in CWM and I can use it (still fails to install anything on system though.)
berndblb said:
2) When you boot with Volume Down and Power you are booting into the bootloader, you see the bootloader menu and the tablet is in fastboot mode. The bootloader menu consists of 3 icons (if you are on a 4.2 bootloader):
RCK (recovery),
Android (system),
Wipe Data (stay away - it's a small miracle that you are not hard bricked already if you used this)
Click to expand...
Click to collapse
I have 2 options for my bootloader when I boot into it, fastboot(USB Icon) and wipe (I think we all know this one.) That's it. This is part of the reason why I can't get to recovery mode without using the WIPE option. (I stayed away from the wipe optoin for weeks until I was convince there was nothing else to try. Once I tried this, I was able to boot into recover with CWM or TWRP. TWRP however ONLY runs some sort of script and then reboots again. CWM allows me to use it. Hope this makes sense. Please let me know if I should clarify further.
berndblb said:
Are you saying you don't have those three in the BL menu????
RCK should be flashing and pushing Volume Up should boot you into recovery. There is no way to boot directly into it unless your rom has a modified restart menu.
Click to expand...
Click to collapse
I do not. Since I first installed TWRP, ran a TWRP backup and installed the custom 4.4.2 (I believe) rom I have not seen any other options.
berndblb said:
3) adb and fastboot are two different protocols to connect PC and tablet. You use adb when Android is running, you use fastboot when the tablet is in fastboot mode.
Don't know what you tried to get the correct drivers working, but you probably have to go back to square 1 here too. If you use Windows check in Device Manager if your tablet is recognized at all:
Open Device Manager, boot the tablet int the bootloader and connect it via original USB cable to the PC. Do you see any change in Device Manager?
Click to expand...
Click to collapse
I have gone over multiple times but I am willing to start again. I show ASUS Android Device in Device Manager for Windows 8.1 64-bit. (I have tried flashing many times on Windows 7 32-bit and Linux 32-bit both on USB 2.0. No luck, same issues, same results.
berndblb said:
You left out the most important bits:
What bootloader version are you on?
Which version of TWRP?
How did you install TWRP if you don't have fastboot working?
What CM version are you running?
Click to expand...
Click to collapse
I have no clue how to check the bootloader version without getting into Android. My bootloader doesn't seem to show it on the upper left hand side. Do you know how I can get it?
I have tried TWRP 3.2.1.0, TWRP 2.6.3.2, CWM 6.0.4.7 and Phil's CWM based recovery for the TF700. So far, none have been able to flash a custom ROM again nor the stock rom when I use recovery GUI for them. Please advise.
Also, it seems I am able to write to any partition with fastboot except for system. When I write to the system partition my tablet shows red text on the screen that states "the command flash:system failed 0x170003 or something similar. Fastboot shows a failed: (remote() error after trying to write to the partition. Someone told me my boot loader was the problem, but I have no idea how to change it without using the 'staging' or 'flash system commands.'
I'm not sure if this matters but I thought I'd post it. When I run fastboot -w it fails saying that the file system is not supported. When I run fastboot erase userdata or cache. It seems to work without any issues. Here is a sample of the output I get:
Code:
c:\adb>fastboot erase userdata
erasing 'userdata'...
OKAY [ 10.093s]
finished. total time: 10.093s
c:\adb>erase cache
Could Not Find c:\adb\cache
c:\adb>fastboot erase cache
erasing 'cache'...
OKAY [ 1.980s]
finished. total time: 1.980s
c:\adb>fastboot -w
erasing 'userdata'...
OKAY [ 10.031s]
formatting 'userdata' partition...
Erase successful, but not automatically formatting.
File system type not supported.
OKAY [ 0.001s]
erasing 'cache'...
OKAY [ 1.972s]
formatting 'cache' partition...
Erase successful, but not automatically formatting.
File system type not supported.
OKAY [ 0.001s]
finished. total time: 12.006s
c:\adb>
When I try to use fastboot to flash the stock firmware using the staging command, I get this on my command prompt:
Code:
c:\adb>fastboot -w flash staging blob
sending 'staging' (800927 KB)...
OKAY [139.757s]
writing 'staging'...
FAILED (remote: ()
finished. total time: 140.900s
c:\adb>
on my tablet it reads in red text failed to process command flash:staging error 0x170003. I have to do a cold boot to get it back up to fastboot mode.
-Tony
qzmicro said:
Hello,
When I try to use fastboot to flash the stock firmware using the staging command, I get this on my command prompt:
Code:
c:\adb>fastboot -w flash staging blob
sending 'staging' (800927 KB)...
OKAY [139.757s]
writing 'staging'...
FAILED (remote: ()
finished. total time: 140.900s
c:\adb>
on my tablet it reads in red text failed to process command flash:staging error 0x170003. I have to do a cold boot to get it back up to fastboot mode.
-Tony
Click to expand...
Click to collapse
Tony try this instead:
Code:
fastboot -i 0x0B05 flash system blob
I have tried it with -i 0x0B05 but it never has different results
sbdags said:
Tony try this instead:
Code:
fastboot -i 0x0B05 flash system blob
Click to expand...
Click to collapse
Exact same results:
Code:
c:\adb>fastboot -i 0x0B05 flash system blob
sending 'system' (800927 KB)...
OKAY [141.843s]
writing 'system'...
FAILED (remote: ()
finished. total time: 143.016s
c:\adb>
Thanks for the advise though.
-Tony
qzmicro said:
I have 2 options for my bootloader when I boot into it, fastboot(USB Icon) and wipe (I think we all know this one.) That's it.
I have no clue how to check the bootloader version without getting into Android. My bootloader doesn't seem to show it on the upper left hand side. Do you know how I can get it?
Click to expand...
Click to collapse
What does your bootloader show? Can you post a photo?
qzmicro said:
I have tried TWRP 3.2.1.0, TWRP 2.6.3.2, CWM 6.0.4.7 and Phil's CWM based recovery for the TF700. So far, none have been able to flash a custom ROM again nor the stock rom when I use recovery GUI for them.
Click to expand...
Click to collapse
So you can still flash different recoveries via fastboot and enter them from the bootloader. That means you should also be able to use "adb shell" to connect to your recovery (when it is running). What does the recovery do when you try to flash a ROM?
If adb shell to your recovery works, exit it again and run these commands to assess your situation:
adb shell ls -l /dev/block > devblock.txt
adb shell dmesg > dmesg.txt
adb shell hexdump -C /dev/block/mmcblk0p3 -n 64 > mmcblk0p3.txt
and post the resulting files.
Tony - consider yourself lucky since you caught the attention of two of the best people in this business. Do try to get the info _that was asking for.
I am just trying to clarify things:
Do you remember what stock rom you had before you started this adventure?
It sounds as if you were on pre-JB 4.2 stock rom, then flashed some TWRP version and then a KitKat rom?
If you can flash recoveries, you do have fastboot access to the tablet.
@_that, @sbdags Would it be an option for Tony to flash a CWM recovery that "let him use it" and try to flash sbdags' bootloader/TWRP package?
Tony - don't do anything before you get their advice.
OS
Tony I see that your using a windows PC.. I would highly recommend a Linux Mint OS... There are to many bugs in windows when you are working with low level Android/SoC platforms .... Im not going to say it will fix your issues, but I have seen it do just that for lots of users.... Just let me know if this sound like something for you, when and if your ready, the community with be here to help you out....As always thx lj
I am getting my Linux mint 32-bit OS on my laptop with USB 2.0... again.
Hi guys,
I thank you deeply for your time. I have learned so much trying to un-brick this thing, and yet have had no results. I will be putting together my mint box in just an hour or so and then testing/trying your suggestions. Please check back in an hour or two. Cheers.
-Tony
Here is what my bootloader looks like.
_that said:
What does your bootloader show? Can you post a photo?
Click to expand...
Click to collapse
I have attached the screenshot below.
_that said:
So you can still flash different recoveries via fastboot and enter them from the bootloader. That means you should also be able to use "adb shell" to connect to your recovery (when it is running). What does the recovery do when you try to flash a ROM?
Click to expand...
Click to collapse
It usually fails when it tries to write to the system partition. Please refer to the posts above. It tends to show the FAILED (Remote() error after the write command. My tablet also shows an error saying it could not process the command.
_that said:
If adb shell to your recovery works, exit it again and run these commands to assess your situation:
adb shell ls -l /dev/block > devblock.txt
adb shell dmesg > dmesg.txt
adb shell hexdump -C /dev/block/mmcblk0p3 -n 64 > mmcblk0p3.txt
and post the resulting files.
Click to expand...
Click to collapse
Giving it a try now, I'll let you known what happens.
-Tony
I do not recall. At the time I knew, but not anymore.
berndblb said:
Tony - consider yourself lucky since you caught the attention of two of the best people in this business. Do try to get the info _that was asking for.
I am just trying to clarify things:
Do you remember what stock rom you had before you started this adventure?
It sounds as if you were on pre-JB 4.2 stock rom, then flashed some TWRP version and then a KitKat rom?
If you can flash recoveries, you do have fastboot access to the tablet.
@_that, @sbdags Would it be an option for Tony to flash a CWM recovery that "let him use it" and try to flash sbdags' bootloader/TWRP package?
Tony - don't do anything before you get their advice.
Click to expand...
Click to collapse
I do not recall the stock ROM but I DO KNOW I updated to the latest firmware right after I opened it (Big mistake I know... now.) So, I had no choice but to factory unlcok it with the ASUS TOOL. This was for X-Mas two months ago, so I should be the latest I'd immagine.
I did indeed install a kit kat rom on my first attempt and someone told me I forgot to put the proper bootloader prior and that is why I bricked it. So, I think you are dead on about that but can't confirm.
I do indeed... only problem is that I always get a damn ? for my serial number. I do not believe it has ever shown anything but.... though I didn't check until after I had this problem. I do not recall checking prior to using TWRP to install the kit kat rom zip files.
I will wait. i am very greatful to have help, especially from the top dawgs. xP Cheers!
-Tony
I'm on mint 32-bit OS.
lj50036 said:
Tony I see that your using a windows PC.. I would highly recommend a Linux Mint OS... There are to many bugs in windows when you are working with low level Android/SoC platforms .... Im not going to say it will fix your issues, but I have seen it do just that for lots of users.... Just let me know if this sound like something for you, when and if your ready, the community with be here to help you out....As always thx lj
Click to expand...
Click to collapse
I'm on it. I installed mint on my laptop and am using a USB 2.0 interface. I am willing and able to try whatever you might suggest. Cheers.
-Tony
I get a permissions error when using adb shell in CWM recovery...
_that said:
If adb shell to your recovery works, exit it again and run these commands to assess your situation:
adb shell ls -l /dev/block > devblock.txt
adb shell dmesg > dmesg.txt
adb shell hexdump -C /dev/block/mmcblk0p3 -n 64 > mmcblk0p3.txt
and post the resulting files.
Click to expand...
Click to collapse
After the first command I received:
Code:
Tonys-Mint antonio # adb shell ls -l /dev/block > devblock.txt
error: insufficient permissions for device
This is the error I get when running the first command you asked for _that. Please advise, thank you! Is this something we can fix? Thanks.
Code:
Tonys-Mint antonio # adb shell ls -l /dev/block > devblock.txt
error: insufficient permissions for device
Tonys-Mint antonio # adb shell dmesg > dmesg.txt
error: insufficient permissions for device
Tonys-Mint antonio # adb shell hexdump -C /dev/block/mmcblk0p3 -n 64 > mmcblk0p3.txt
error: insufficient permissions for device
Tonys-Mint antonio #
They all basically told me I have no permissions to my device. Any thoughts? If anyone can/wants to assist outside these forums, please just let me know. I can't offer to pay but I can offer a free pizza at your house no matter where you live! LOL. Cheers fellas!
-Tony
qzmicro said:
I do not recall the stock ROM but I DO KNOW I updated to the latest firmware right after I opened it
Click to expand...
Click to collapse
Your photos show a 9.4.5.x bootloader (and I'm 100% sure about this), which is strange because normally the bootloader is updated together with the stock firmware - so if you updated to the latest firmware, you should also have the latest bootloader (10.6.1.14.x).
qzmicro said:
After the first command I received:
Code:
Tonys-Mint antonio # adb shell ls -l /dev/block > devblock.txt
error: insufficient permissions for device
This is the error I get when running the first command you asked for _that. Please advise, thank you! Is this something we can fix? Thanks.
Click to expand...
Click to collapse
What did the tablet screen show while you ran these commands? The recovery's menu? Which recovery (and version) do you currently have installed?
_that said:
Your photos show a 9.4.5.x bootloader (and I'm 100% sure about this), which is strange because normally the bootloader is updated together with the stock firmware - so if you updated to the latest firmware, you should also have the latest bootloader (10.6.1.14.x).
What did the tablet screen show while you ran these commands? The recovery's menu? Which recovery (and version) do you currently have installed?
Click to expand...
Click to collapse
It just sits there on the main screen as if nothing has happened. Here is a screenie...
-Tony
qzmicro said:
It just sits there on the main screen as if nothing has happened. Here is a screenie...
Click to expand...
Click to collapse
hmm... ok. Try running these commands:
Code:
adb kill-server
adb devices
and post the output.
For the first time EVER, I see the serial number!
_that said:
hmm... ok. Try running these commands:
Code:
adb kill-server
adb devices
and post the output.
Click to expand...
Click to collapse
Here is the output:
Code:
Tonys-Mint antonio # adb kill-server
Tonys-Mint antonio # adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
015d2a50692c0a08 recovery
Tonys-Mint antonio #
Please note that this is the first time the device has EVER shown it's serial number since this all started. Usually it just shows a single question mark. Good sign?! Please advise.
-Tony :fingers-crossed:
qzmicro said:
Here is the output:
Code:
Tonys-Mint antonio # adb kill-server
Tonys-Mint antonio # adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
015d2a50692c0a08 recovery
Tonys-Mint antonio #
Click to expand...
Click to collapse
That looks good so far. Try
Code:
adb shell
and see if you get a shell prompt from the tablet. If you do, type "exit" to get out again, then run the 3 commands I posted earlier.
_that said:
That looks good so far. Try
Code:
adb shell
and see if you get a shell prompt from the tablet. If you do, type "exit" to get out again, then run the 3 commands I posted earlier.
Click to expand...
Click to collapse
Hello, this is what I get...
Code:
Tonys-Mint antonio # adb shell
~ # adb shell ls -l /dev/block > devblock.txt
/sbin/sh: adb: not found
~ # adb shell dmesg > dmesg.txt
/sbin/sh: adb: not found
~ # adb shell hexdump -C /dev/block/mmcblk0p3 -n 64 > mmcblk0p3.txt
/sbin/sh: adb: not found
~ #
I am getting excited, I had not made any leway in over 4 weeks. Those commands seem to have failed though. I kindly await your response. Cheers.
-Tony :cyclops:
qzmicro said:
I am getting excited, I had not made any leway in over 4 weeks. Those commands seem to have failed though. I kindly await your response. Cheers.
Click to expand...
Click to collapse
You forgot to type "exit". But adb shell is working now, that is good. Type "exit" now, then run the 3 commands again, then post the 3 resulting files.

Returning to stock, where can I find the stock image?

I need to warranty a phone but I need to turn it back to stock. I am using an older version of TWRP, I am guessing here but do I just download the factory image and flash it and I am done? It seems like everything I get when searching is geared towards the Pixel XL and using ADB rather than TWRP.
Thanks in advance.
Beacuse I part time as an internet troll, I have to chastise you for not reading threw this forum, because well that's why it's there, but hey we all can't use our Brian's all the time, but yes download the factory image for your phone Marlin for Pixel XL and Sailfish for Pixel unzip the file, make sure you have lastest usb drivers installed and click the flash all.bat.
Fastboot and flash factory image.
A wonderful guide: https://forum.xda-developers.com/pixel-xl/how-to/guide-how-to-unlock-root-flash-pixel-xl-t3507886
jerryhou85 said:
Fastboot and flash factory image.
A wonderful guide: https://forum.xda-developers.com/pixel-xl/how-to/guide-how-to-unlock-root-flash-pixel-xl-t3507886
Click to expand...
Click to collapse
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
I'm not a good developer so I cannot answer you that question, but on Google official page, it is recommended to use fastboot or adb to flash factory images...
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
Because recovery and boot are sort of intermingled now. You would be writing over twrp at the same time you are trying to use it to flash.
Use the flashall bat file. If you want to save data edit out the -w from the bat file.
twilk73 said:
why do I have to fastboot or ADB cant I just boot into twrp and flash factory image?
Click to expand...
Click to collapse
I am on linux let me just get that out of the way.
So I used adb to fastboot the factory image but nothing happens
the file is in downloads and in the fastboot file. So I type cd Downloads, cd fastboot, fastboot sailfish-nmf260 it all looks good and you can tell adm is working but nothing happens on the phone.
I am current only able to get the phone into fastboot mode I dont know what I messed up but I can no longer even boot into TWRP.
I must have succesfully removed the twrp recovery because no i get the no command screen. If I hold power and press up I can get into the stock android recovery. Is there a way to install the factory image still? Or is the process still the same and I need to adb fastboot? I might need to just do the abd fastboot on a windows computer at work tomorrow.
twilk73 said:
I must have succesfully removed the twrp recovery because no i get the no command screen. If I hold power and press up I can get into the stock android recovery. Is there a way to install the factory image still? Or is the process still the same and I need to adb fastboot? I might need to just do the abd fastboot on a windows computer at work tomorrow.
Click to expand...
Click to collapse
Download the factory image you want here. Unzip the entire contents to the same folder fastboot is located in. Then boot the phone to the bootloader, then plug it in to you computer. Then, if you're using Linux, double click the flash-all.sh file that got unzipped to your fastboot folder. If you're using a Windows computer, double click on the flash-all. bat file instead of the flash-all.sh file. Then sit back and wait. That's about all there is to it. One note. If you want to save your data, open the script you're going to use in a text editor and remove the -w toward the end of the script (remember to save your changes). If you want the phone wiped clean and like new again, just leave it as is.
robocuff said:
Download the factory image you want here. Unzip the entire contents to the same folder fastboot is located in. Then boot the phone to the bootloader, then plug it in to you computer. Then, if you're using Linux, double click the flash-all.sh file that got unzipped to your fastboot folder. If you're using a Windows computer, double click on the flash-all. bat file instead of the flash-all.sh file. Then sit back and wait. That's about all there is to it. One note. If you want to save your data, open the script you're going to use in a text editor and remove the -w toward the end of the script (remember to save your changes). If you want the phone wiped clean and like new again, just leave it as is.
Click to expand...
Click to collapse
ive done these steps but its failing to work. This is exactly what I am doing.
1. Download factory image.
2. Extract factory image into fastboot file.
the fast boot file is in the dowloads folder so I type.
cd Downloads
cd fastboot
fastboot flash-all.sh
iv also tried fastboot the sailfish-nmf260.img and boot.img and flashall. Ive tried several different ways this is what happens no mater what I type.
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> [ <second> ] ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] 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
Click to expand...
Click to collapse
On the phone nothing happens. It appears that all I am getting is a list of options but none of the options seem to be working either.
I might add that the fastboot folder I am using was downloaded back when I installed twrp is it possible my fastboot file doesnt have the correct files to get the job done?
twilk73 said:
ive done these steps but its failing to work. This is exactly what I am doing.
1. Download factory image.
2. Extract factory image into fastboot file.
the fast boot file is in the dowloads folder so I type.
cd Downloads
cd fastboot
fastboot flash-all.sh
iv also tried fastboot the sailfish-nmf260.img and boot.img and flashall. Ive tried several different ways this is what happens no mater what I type.
On the phone nothing happens. It appears that all I am getting is a list of options but none of the options seem to be working either.
I might add that the fastboot folder I am using was downloaded back when I installed twrp is it possible my fastboot file doesnt have the correct files to get the job done?
Click to expand...
Click to collapse
Have you tried putting phone in fastboot mode and doubble click the flash all.sh file? That's how it is done on Windows.
Sent from my Google Pixel using XDA Labs
Sgace said:
Have you tried putting phone in fastboot mode and doubble click the flash all.sh file? That's how it is done on Windows.
Sent from my Google Pixel using XDA Labs
Click to expand...
Click to collapse
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
twilk73 said:
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
Click to expand...
Click to collapse
I don't think you can flash it with fastboot. In Windows, at the command prompt, you just type flash-all.bat and the batch file will run. It contains all the necessary fastboot commands. Perhaps that's where you're going wrong. Try just typing flash-all.sh. Leave the fastboot out.
twilk73 said:
Basically yes. But with linux you cant just double click. So in terminal I typed "cd Download, cd fastboot, fastboot flash-all.sh" that command will attempt to launch that file.
I feel like the issue is with adb on my laptop I tried making sure its updated but i got nothing so ill try to do it on a work computer when I get free time.
Its pretty crappy right now because I am without a phone but heck I pet the dog today during lunch instead of reading the news feed off my phone so I guess the dog is happy lol.
Click to expand...
Click to collapse
Try this for sailfish (fix accordingly if marlin, username of course is common sense, if still confused, you shouldn't be using linux)
I build and use debian sid
Code:
cd /home/username/Downloads
tar xvf sailfish-opr3.170623.008-factory-bb8bb3a3.zip -C /home/username
cd /home/username/sailfish-opr3.170623.008
tar xvf image-sailfish-opr3.170623.008.zip
cd /home/username/sailfish-opr3.170623.008
./flash-all.sh
If you need the latest adb/fastboot name it something like google.sh
Code:
#!/bin/bash
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
cp platform-tools/adb /usr/bin/adb
cp platform-tools/fastboot /usr/bin/fastboot
piperx said:
Try this for sailfish (fix accordingly if marlin, username of course is common sense, if still confused, you shouldn't be using linux)
I build and use debian sid
Code:
cd /home/username/Downloads
tar xvf sailfish-opr3.170623.008-factory-bb8bb3a3.zip -C /home/username
cd /home/username/sailfish-opr3.170623.008
tar xvf image-sailfish-opr3.170623.008.zip
cd /home/username/sailfish-opr3.170623.008
./flash-all.sh
If you need the latest adb/fastboot name it something like google.sh
Code:
#!/bin/bash
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
unzip \platform-tools-latest-linux.zip
cp platform-tools/adb /usr/bin/adb
cp platform-tools/fastboot /usr/bin/fastboot
Click to expand...
Click to collapse
Sorry I wish I could try this. I had access to a windows computer at work and I was able to get everything done. After doing it at work I have a feeling I wasnt placing the files in the correct folder together to get it to start the update. It can be hard doing this on something other than windows for a dummy like me because most of the tutorials for things like this seem to be windows oriented. Regardless its done. I couldnt lock the boot loader on the windows computer though oddly but no big deal because I can do it on my laptop.
Thanks for all the help guys.

Categories

Resources