Help Pulling EFI Firmware - General Questions and Answers

Hello,
I am trying to figure out how to either inject a custom bootloader like Clover onto my Nvidia Shield, or to Modify the existing EFI bootloader itself or with a modification to a Recovery program such as TWRP in order to be able to use a custom bootloader to select "Boot From Usb"
I figure I oughta make a backup, but I do not know how to backup my bootloader either....
I think I understand how to look at the shield's partitions now to find the one with the bootloader, I'm just nervous to proceed...
I have been researching for a week and have learned amazing tidbits of knowledge on the sublayers of the shield, and a lot of its partitions...
I was able to install a custom OS, modified GAPPS, and root on my shield, I am just hung up on this final part....
If anyone would care to share even a bread crumb where to start, I Would Be Ever So Grateful
Download Clover EFI Bootloader - MajorGeeks
Clover EFI Bootloader can boot OS X, Windows, and Linux on Mac or PC with UEFI or BIOS firmware.
www.majorgeeks.com
Root Nvidia Shield TV Pro 2019 Version
THIS IS OUTDATED https://forum.xda-developers.com/t/bootmod-root-your-shield-in-1-minute-2015-2017-2019.4524873/ REPLACES THIS IF YOU WANT ANDROID OR USE THIS GUIDE...
forum.xda-developers.com

I forgot to ask, IS THERE A PULL COMMAND FROM FASTBOOT, TO COPY PARTITIONS? MY GOOGLE FU IS SUPER BUT MAN I AM HAVING A HARD TIME FINDING EXACTLY WHAT I'M LOOKING FOR :-(

jenneh said:
I forgot to ask, IS THERE A PULL COMMAND FROM FASTBOOT, TO COPY PARTITIONS? MY GOOGLE FU IS SUPER BUT MAN I AM HAVING A HARD TIME FINDING EXACTLY WHAT I'M LOOKING FOR :-(
Click to expand...
Click to collapse
Typically partions get 1:1 bitwisely copied to PC by dd command ( AFAIK it's present in every Android distribution ) what can be achieved by means of ADB.
Example - for Windows PC only:
Code:
adb devices
adb exec-out "dd if=[BLOCK-NAME-OF-PARTITION-HERE] bs=4096" > C:\[NAME-OF-BACKUP-FILE-HERE]

jwoegerbauer said:
Typically partions get 1:1 bitwisely copied to PC by dd command ( AFAIK it's present in every Android distribution ) what can be achieved by means of ADB.
Example:
Code:
adb devices
adb exec-out "dd if=[BLOCK-NAME-OF-PARTITION-HERE] bs=4096" > C:\[NAME-OF-BACKUP-FILE-HERE]
Click to expand...
Click to collapse
Thank You! That is thinking outside the box haha I kept trying to do it through fastboot knowing there is very limited amount of commands, not realizing that Would Never Work. I appreciate Your Time! I will try adb now!!! It's so funny, it seems like such a simple answer but sometimes we see so many paths, it's hard to know which one to take...

jwoegerbauer said:
Typically partions get 1:1 bitwisely copied to PC by dd command ( AFAIK it's present in every Android distribution ) what can be achieved by means of ADB.
Example - for Windows PC only:
Code:
adb devices
adb exec-out "dd if=[BLOCK-NAME-OF-PARTITION-HERE] bs=4096" > C:\[NAME-OF-BACKUP-FILE-HERE]
Click to expand...
Click to collapse
Hello! May I pry your mind for a moment?
I ran this command on my shield "fastboot erase system" except instead of running it directly in the command line on windows,
I made a batch file for it, and when I ran the batch, it succeeded but it did something strange, it printed this message inside the batch
"
{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Riched20 10.0.19041}\viewkind4\uc1
\pard\sa200\sl276\slmult1\f0\fs22\lang9 fastboot erase system\par
fastboot erase boot\par
\par
}
"
It completely deleted the two commands i had in there and pasted that instead... do you know what that is by any chance or Why it did that? o.o It is fascinating!

I can not understand what you are doing: For me it is complete confusion.

jwoegerbauer said:
I can not understand what you are doing: For me it is complete confusion.
Click to expand...
Click to collapse
No worries, thank you for your time, Seriously. That ADB suggestion was Exactly what I Needed... Have a beautiful day!

Related

[Q] Fastboot Linux

Ive been trying to get TWRP loaded on to my TF300T on 4.2.1 using this guide but on the fastboot its stuck on waiting for device. The device is recognised in the Terminal but have no luck flashing the recovery. Is there any other methods for flashing a recovery I can use on linux or advice.
Im running Xubuntu 13.04
mackay508 said:
Ive been trying to get TWRP loaded on to my TF300T on 4.2.1 using this guide but on the fastboot its stuck on waiting for device. The device is recognised in the Terminal but have no luck flashing the recovery. Is there any other methods for flashing a recovery I can use on linux or advice.
Im running Xubuntu 13.04
Click to expand...
Click to collapse
Is your OS 32 or 64-bit? If it's 64, you may need to have both ia32-libs and ia32-libs-dev installed for fastboot to work properly. Also, did you get the android-tools packages from the repos? I'm not sure about the *buntus, but on Debian, they're in the unstable repos. Make sure you have the newest versions (trust me; it matters).
If you want to do it via ADB, you could do this:
Code:
adb shell
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p4
Make sure the recovery image is on your internal storage if you do it that way.
I recommend trying to get fastboot working, and use ADB as a last resort.
Its 32-bit, I used fastboot for my N4 so unsure why its not working just now. I tried the method you said but think i may ahve done it wrong it completed the operation but got the Android on its back with the red triangle :/
First time i got :-
1|[email protected]:/ # dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p4
12896+0 records in
12896+0 records out
6602752 bytes transferred in 5.185 secs (1273433 bytes/sec)
Then after that i got :-
127|[email protected]:/ $ dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p4
/dev/block/mmcblk0p4: cannot open for write: Permission denied
ry.img’: No such file or directory <
/system/bin/sh: dd:: not found
127|[email protected]:/ $ dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p4
/dev/block/mmcblk0p4: cannot open for write: Permission denied
1|[email protected]:/ $
mackay508 said:
Its 32-bit, I used fastboot for my N4 so unsure why its not working just now. I tried the method you said but think i may ahve done it wrong it completed the operation but got the Android on its back with the red triangle :/
First time i got :-
1|[email protected]:/ # dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p4
12896+0 records in
12896+0 records out
6602752 bytes transferred in 5.185 secs (1273433 bytes/sec)
Then after that i got :-
127|[email protected]:/ $ dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p4
/dev/block/mmcblk0p4: cannot open for write: Permission denied
ry.img’: No such file or directory <
/system/bin/sh: dd:: not found
127|[email protected]:/ $ dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p4
/dev/block/mmcblk0p4: cannot open for write: Permission denied
1|[email protected]:/ $
Click to expand...
Click to collapse
Stupid question probably, but is your tablet unlocked?
Also, for the second one, you weren't logged in as root. You need to be root to write the image.
Linux 101:
- If you see a dollar sign ($) in the terminal, you're a normal, unprivileged user
- If it's a pound sign (#), you're root.
Also, like I said before, the version of Fastboot matters. Way back in August, I soft-bricked my tablet, and fastboot gave me the same problem it's giving you, even though I had used fastboot on my tablet before that. Months later, I found the fastboot in the Debian repos. I'm not sure what the difference was between the versions, but the new one from the repos worked perfectly, and I was able to get my tablet working again.
EndlessDissent said:
Stupid question probably, but is your tablet unlocked?
Also, for the second one, you weren't logged in as root. You need to be root to write the image.
Linux 101:
- If you see a dollar sign ($) in the terminal, you're a normal, unprivileged user
- If it's a pound sign (#), you're root.
Also, like I said before, the version of Fastboot matters. Way back in August, I soft-bricked my tablet, and fastboot gave me the same problem it's giving you, even though I had used fastboot on my tablet before that. Months later, I found the fastboot in the Debian repos. I'm not sure what the difference was between the versions, but the new one from the repos worked perfectly, and I was able to get my tablet working again.
Click to expand...
Click to collapse
Yeah I unlocked it using the unlocker app and have the this device is unlocked at the boot screen. Forgot the su part :/ what i get for using the up button haha. Yeah it came up with grant superuser access on my tablet, I deleted and reinstalled fastboot the other day to see if it would help but it didnt. Might have to wait until i can access a Windows laptop :/
Sorry I couldn't help. Those are the most common problems/solutions I've seen and personally experienced. And I have no idea why dd didn't work in ADB Shell. I would check the recovery image and try again. Check out adb --help to see if there are any other options available. I'm not overly familiar with ADB.
You could also flash the recovery while booted into Android using Terminal Emulator. That's how I usually flash recoveries. Just use the dd method from the ADB Shell instructions. Just skip the first command, starting ADB Shell, and start at su.
Oh, and I completely missed it earlier, but make sure that the recovery you're using ends in -42.img or - 42.blob. If you use one with -JB, you could brick your tablet. I don't know why the guy giving instructions in your link said to use -JB, but there have literally been dozens of bricked tablet threads here because people flashed a -JB recovery on a 4.2 bootloader. -JB recoveries should only be used with the 4.1 bootloader.
EndlessDissent said:
Sorry I couldn't help. Those are the most common problems/solutions I've seen and personally experienced. And I have no idea why dd didn't work in ADB Shell. I would check the recovery image and try again. Check out adb --help to see if there are any other options available. I'm not overly familiar with ADB.
You could also flash the recovery while booted into Android using Terminal Emulator. That's how I usually flash recoveries. Just use the dd method from the ADB Shell instructions. Just skip the first command, starting ADB Shell, and start at su.
Oh, and I completely missed it earlier, but make sure that the recovery you're using ends in -42.img or - 42.blob. If you use one with -JB, you could brick your tablet. I don't know why the guy giving instructions in your link said to use -JB, but there have literally been dozens of bricked tablet threads here because people flashed a -JB recovery on a 4.2 bootloader. -JB recoveries should only be used with the 4.1 bootloader.
Click to expand...
Click to collapse
Thanks for the help anyway, yeah just glad i read up on the recoveries before hand incase it worked and i got bricked. Ill try using the terminal and see if that works

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.

Need to flash a TWRP backup with fastboot

Hi. I have to flash a TWRP backup and can't do it thorugh custom recovery due I have a Yotaphone (the phone with a LCD screen by one side and a eInk screen by the other side) and the LCD screen is broken, so I have to use fastboot or adb (as far I know). I cannot even install a ROM because it needs the LCD screen for the first start.
The question if I can do it, cause I know it could be problems with formats.
(I asked this on Yotaphone specific xda forum but no one answered)
Thanks
eReader Fan said:
Hi. I have to flash a TWRP backup and can't do it thorugh custom recovery due I have a Yotaphone (the phone with a LCD screen by one side and a eInk screen by the other side) and the LCD screen is broken, so I have to use fastboot or adb (as far I know). I cannot even install a ROM because it needs the LCD screen for the first start.
The question if I can do it, cause I know it could be problems with formats.
(I asked this on Yotaphone specific xda forum but no one answered)
Thanks
Click to expand...
Click to collapse
You would probably have better luck flashing the stock firmware or have someone with the same device create an adb backup then restore it via adb.
Or if you know which individual .img files you need, have them pull a copy of whichever individual .img files you need(for example: system, boot, etc) then fastboot flash them or use adb shell to dd the .imgs back onto your device in the partitions they belong in.
I DO NOT PROVIDE HELP IN PM, KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
@Droidriven ,you are right about it would be easy to fash a stock rom, but the LCD screen is necessary for that due the first boot. Maybe I am a little lucky 'cause I live with person who has the same device as me.
I tried the adb backup -all but it seems to just make a backup of the personal data.
Making a dd backup patition would be the better, but for some reason my device isn't recognized as a MTP device and can only connect in PTP. Tried to change the configuration on the phone but still only works with PTP, and I think in PTP mode doesn't have a mounted folder where I can make this stuff.
What I don't know how to do is the dd within the adb shell. It will work connected in PTP mode?
eReader Fan said:
@Droidriven ,you are right about it would be easy to fash a stock rom, but the LCD screen is necessary for that due the first boot. Maybe I am a little lucky 'cause I live with person who has the same device as me.
I tried the adb backup -all but it seems to just make a backup of the personal data.
Making a dd backup patition would be the better, but for some reason my device isn't recognized as a MTP device and can only connect in PTP. Tried to change the configuration on the phone but still only works with PTP, and I think in PTP mode doesn't have a mounted folder where I can make this stuff.
What I don't know how to do is the dd within the adb shell. It will work connected in PTP mode?
Click to expand...
Click to collapse
Is USB debugging enabled?
I DO NOT PROVIDE HELP IN PM, KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
Yes, debuggind mode is on. In PTP mode, adb sees my device correctly, in MTP mode appears like ???????
I think maybe the answer is where that you mentioned about "adb shell". As long as I can't see the phone mounted in MTP mode it's the only way I see. Now I am searching for the way on pointing the dd output file outside the adb shell. So the process is:
BACKUP:
-adb shell > dd partitions saving them outside the phone
FLASHING:
-fastboot partition by partition
Another problem I have is to know which partion is each, 'cause with "mount" I don't get so much information and with "cat /proc/partitions" only have 13 partitions with their size and no more info. I am looking what to "adb push" that can help me. Maybe install busybox.
Trying to backup&restore without MTP, without access to the recovery nor SDcard... Harder is impossible!!!
eReader Fan said:
I think maybe the answer is where that you mentioned about "adb shell". As long as I can't see the phone mounted in MTP mode it's the only way I see. Now I am searching for the way on pointing the dd output file outside the adb shell. So the process is:
BACKUP:
-adb shell > dd partitions saving them outside the phone
FLASHING:
-fastboot partition by partition
Another problem I have is to know which partion is each, 'cause with "mount" I don't get so much information and with "cat /proc/partitions" only have 13 partitions with their size and no more info. I am looking what to "adb push" that can help me. Maybe install busybox.
Trying to backup&restore without MTP, without access to the recovery nor SDcard... Harder is impossible!!!
Click to expand...
Click to collapse
This command in adb shell or Terminal Emulator should give you your partitions and names(obviously you'd type "su" then press enter then run this command)
ls -l /dev/block/platform/msm_sdcc.1/by-name/
The part with "msm.sdcc.1" might be different for your device. If that command doesn't work I'll help you find what needs to go in that part of the command for your device.
I DO NOT PROVIDE HELP IN PM, KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
su is not found inside the adb shell, and I found this is cause is not rooted. I have to do it through TWRP in android 6.
As I said, I have two devices of my model so I hope I find time tomorrow for doing it. I also hope to can flashing it to the other device in fastboot mode or some way it doesn't need the main screen (remember I have a LCD screen and a eInk)
I will say something when I do the root. Thanks
Finally did it!
It appears each partitions clearly with the "ls" command you give to me. The question now is how to dd outside the phone. Have I to mount the pc inside the shell or what?
eReader Fan said:
Finally did it!
It appears each partitions clearly with the "ls" command you give to me. The question now is how to dd outside the phone. Have I to mount the pc inside the shell or what?
Click to expand...
Click to collapse
adb shell should work to dd, you just need to make absolutely certain that you are dd-ing the correct .img to the correct partition(mmcblk0xx), the partition number would go where the xx is.
For example, my recovery.img would be flashed to mmcblk018(the number of my recovery partition.
If you dd an .img to the wrong partition, you'll brick the device, the command has to be exactly correct, no margin for error or easy fix if you get it wrong.
I DO NOT PROVIDE HELP IN PM, KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
I know all this stuff, but first I need to make the .img of each partition, and I though with adb shell I could do a dd to outside the phone. The TWRP backup I have isn't .img files, they are .win files.
I searched again if its possible to do that and all I found is the xda thread about doing a workaround with adb forward and busybox. If there is no more options I will do that.
What I thought to do is create a backup of the needed partitions and save them in the userdata free space. I think this have to be possible, but as I cannot use the LCD screen I have to do the backup where I do not have to pass thorugh the first boot configuration, cause it is did in the LCD screen. Which partitions have I to backup? Only system and boot? Or there is another tool for creating .img backups?
EDIT: Also found the twrp adb possibilities (http://www.pocketables.com/2014/10/using-twrps-new-adb-interface.html) but have the same problems than with dd
I frequently modify boot and recovery partitions from within terminal app. Here's what I do to grab the boot partition for example(you likely want BusyBox installed first)
cat /dev/block/bootdevice/by-name/boot >boot.img
or
dd if=/dev/block/bootdevice/by-name/boot of=boot.img
Make changes, then reverse the commands to write back. I think cat gives you a more verbatim copy for initially cloning a partition. I have had success with both.
The question that brought me here is what happens if i flash all partitions from a firmware archive and attempt to upgrade a whole system this way from twrp recovery.....

Need help pulling boot and recovery images.

I have a device that has not been officially released yet so no images are available. I am trying to pull the boot and recovery images from the device so I can root and build twrp for it. That way when it is officially released it will be available. From there I would like to build a custom ROM or GSI.
I have read a lot of information and cannot seam to locate the correct location of the boot or recovery images. I have a prerooted GSI so I have root access to pull the images. The GSI with root has problems on my device. I have found a working GSI but I need my boot image to root it.
If someone could help me out pulling the boot and recovery images I would be greatly appreciative. I mostly figure out a lot of things on my own by searching and trying. I just cannot seam to figure this one out. Location of the images is the biggest problem.
Well, the boot and recovery partitions aren't mounted when Android is actually running.
The location of both the recovery.img and the boot.img is partition-layout dependent: possible partiton layouts are MTD ( read: Memory Technology Device ), EMMC ( read: Embedded Multimedia Card ) and MMC ( read: Multimedia Card ).
jwoegerbauer said:
Well, the boot and recovery partitions aren't mounted when Android is actually running.
The location of both the recovery.img and the boot.img is partition-layout dependent: possible partiton layouts are MTD ( read: Memory Technology Device ), EMMC ( read: Embedded Multimedia Card ) and MMC ( read: Multimedia Card ).
Click to expand...
Click to collapse
Thanks for your reply. I believe I have read about payload dumpers that can do this? I have not been able to figure it out though. What would be the easiest way to pull them?
Can anyone explain how to go about this?
Never have occupied with payload ...
FYI:
A phone's NAND-flash chip is parted into physical blocks what are called block devices: hence you have to find out the name of the block device where recovery and/or boot is located. Take note these names ( e.g. /dev/block/XXX ) are different on phones.
Once you got the names, and IF PHONE IS ROOTED, and phone's internal memory got mounted as RW, then you can extract these to your computer utilizing ADB commands:
Code:
adb devices
adb exec-out "dd if=/dev/block/<BOOT> of=C:\COPY-of-BOOT.img bs=4096"
jwoegerbauer said:
Never have occupied with payload ...
FYI:
A phone's NAND-flash chip is parted into physical blocks what are called block devices: hence you have to find out the name of the block device where recovery and/or boot is located. Take note these names ( e.g. /dev/block/XXX ) are different on phones.
Once you got the names, and IF PHONE IS ROOTED, and phone's internal memory got mounted as RW, then you can extract these to your computer utilizing ADB commands:
Code:
adb devices
adb exec-out "dd if=/dev/block/<BOOT> of=C:\COPY-of-BOOT.img bs=4096"
[/cod
[/QUOTE]
Click to expand...
Click to collapse
jwoegerbauer said:
Never have occupied with payload ...
FYI:
A phone's NAND-flash chip is parted into physical blocks what are called block devices: hence you have to find out the name of the block device where recovery and/or boot is located. Take note these names ( e.g. /dev/block/XXX ) are different on phones.
Once you got the names, and IF PHONE IS ROOTED, and phone's internal memory got mounted as RW, then you can extract these to your computer utilizing ADB commands:
Code:
adb devices
adb exec-out "dd if=/dev/block/<BOOT> of=C:\COPY-of-BOOT.img bs=4096"
Click to expand...
Click to collapse
Awesome thank you. When I installed a roasted gsi I seen them. I just did not know which one was recovery and which was the boot img. If I reinstall the rooted gsi and take a screenshot of the directory can you help me with the proper commands to copy them? This is just above my knowledge. Once I get them I can figure out how to use them.
Look also inside here:
[Guide] Dumping boot.img & recovery.img using dd (for complicated partitions)
Hi there! i am new to forums as well as in developing. i have recently taken interest in making cyanogenmod for my device. So, i have been searching web for hours to dump boot.img and recovery.img for my device. As my device is a mediatek device...
forum.xda-developers.com
jwoegerbauer said:
Look also inside here:
[Guide] Dumping boot.img & recovery.img using dd (for complicated partitions)
Hi there! i am new to forums as well as in developing. i have recently taken interest in making cyanogenmod for my device. So, i have been searching web for hours to dump boot.img and recovery.img for my device. As my device is a mediatek device...
forum.xda-developers.com
Click to expand...
Click to collapse
Thank you for all your help. I will give this a try and see if I can figure it out. I appreciate you taking the time to show me and help me.

how to use "mount /system" in Android Recovery Mode?

Any article or tutorial on it would be helpful.
I spent like 5 hours reading every forum post on how to do it.
I'm going to make the bold claim that I don't think ANYBODY on the internet has used this feature. Happy to have anyone prove me wrong.
https://imgur.com/a/BEL1R5b
programmerhat said:
Any article or tutorial on it would be helpful.
I spent like 5 hours reading every forum post on how to do it.
I'm going to make the bold claim that I don't think ANYBODY on the internet has used this feature. Happy to have anyone prove me wrong.
https://imgur.com/a/BEL1R5b
Click to expand...
Click to collapse
You should have a look inside the AOSP:
Using adb under recovery​When running recovery image from debuggable builds (i.e. -eng or -userdebug build variants, or ro.debuggable=1 in /prop.default), adbd service is enabled and started by default, which allows adb communication. A device should be listed under adb devices, either in recovery or sideload state.
$ adb devices
List of devices attached
1234567890abcdef recovery
Although /system/bin/adbd is built from the same code base as the one in the normal boot, only a subset of adb commands are meaningful under recovery, such as adb root, adb shell, adb push, adb pull etc. Since Android Q, adb shell no longer requires manually mounting /system from recovery menu.​
Click to expand...
Click to collapse
source: https://android.googlesource.com/platform/bootable/recovery/

Categories

Resources