Looking to hire tech $upport for Moto G7 Play --> /e/ Project Conversion - Moto G7 Play Questions & Answers

Money. $$$$$$$$$$$$$$$$$$$$$$
I need HELP in de-soft-bricking my Moto Play G7 and installing the /e/ project (or perhaps other Linux-based build), and I am willing to PAY for tech support to walk me through it (ideally via Skype or Zoom platform). Here are a few more specifics:
I bought a used Moto G7 Play that was updated by a developer from Android 9 to Android 10. I followed tutorials to unlock the phone and install TWRP via ADB but ran into problems, as far as I can tell, due to the Motorola A-B slot issue (it says "No bootable A/B slot, failed to boot Linux, falling back to fastboot" when I try to reboot). I can no longer recover the phone to Android or reset it to "factory" settings via the bare-bones Android and Motorola phone menus, but I remain able to issue commands via ADB / USB and also navigate to the G7's bootloader menus by using the buttons on the side of the phone. As for my PC platforms, I am running Win 10 (with ADB) but I also have Ubuntu running (so I could format SD cards to ext4 if that would help), and I have Android studio installed (not as if I know what to do with it), if that would be of any help. As far as I can tell, ADB and the Motorola USB drivers are working fine, and I USUALLY get positive indication when I type "adb devices", and I can always get the phone to acknowledge that the USB is connected/disconnected.
I don't know if this will help, but as I try to do the ADB sideload for copy-partitions.zip, this is where things don't work, as my Moto G7 play screen says:
Finding update package…
Opening update package…
Verifying update package…
E:footer is wrong
Update package verification too 0.2 s (result 1).
E: Signature verification failed
E: error:21
Installation aborted.
From there, it seems I can't go on to flash the TWRP image. Any ideas how I can work past these problems? Let me know how I can contact you via the forum and we can work $omething out. I'm guessing that this is a fast fix for someone who knows what they are doing. I'm sick of google and don't want to accept defeat! Thanks, -Andrew

Try the motorola rescue assistant
When it not workling download for your device the firmware

Instead of flashing TWRP, have you tried just booting TWRP w/o flashing?
fastboot boot twrp.img

I ran into some problems with my Moto G7 Play; I didn't softbrick it, but several things fought back, so I'll pass along what may get you back on track. First of all, I cannot use Linux to connect via fastboot, so I had to use a Mac, you can use your Windows box. Secondly, TWRP does not officially have a version for the G7 Play. I used an unofficial one from an XDA forum member HERE. It only offers a black screen unless you flash dtmo.img. I didn't want to flash dtmo.img, so I just used the black screen and used adb commands to install Lineage (and /e/) via TWRP command line.
The steps are pulled from another XDA posting showing how to use TWRP command line:
1. Connect the phone in fastboot mode to the PC, run fastboot devices to make sure it is connected.
2. Type: fastboot set_active b
Then: fastboot boot <your_recovery.img>, e.g. fastboot boot twrp.img
<phone will reboot, the screen will be black>
<wait to Windows new device sound>
3. Type: adb shell
twrp wipe cache << will not work on Moto G7 Play, but won't hurt anything.
twrp wipe dalvik
twrp wipe system
twrp wipe data <- NOW YOUR DATA WILL BE REMOVED, SO MAKE A BACKUP BEFORE!
twrp sideload
adb sideload <location_of_your_ROM.zip>, e.g. adb sideload C:\lineage-xyz.zip
IF THE TWRP commands do not work and hang saying something about "starting TWRP", I discovered by looking at the log in /tmp that /sdcard is encrypted. You will need to unencrypt /sdcard and I'm not sure how to do that without recovery; I'm sure there is way, though.
If I were you, I would see if you can flash LineageOS (or lineageOS + microG) with this method to get your phone back working, then you can move on to /e/. Note that if this works, you will have a recovery program available (the standard Lineage recovery), which has some basic tools. You CAN ONLY load Lineage-signed roms with this recovery. So if you want to switch from lineage to /e/ or to lineage+microG, you will need to use the twrp method above to switch to the other rom. Then you can use the lineage or /e/ recovery to install lineage or /e/ updates from the same publisher.
Also, if you install stock lineage, don't use a bleeding edge version. Pick one from mid-October so if you decide to switch to /e/ or Lineage+microG you will not be downgrading because they don't make nightly builds. It probably won't hurt since downgrading a week probably has few changes, but just in case.
Hope this helps.

maw1 said:
Try the motorola rescue assistant
When it not workling download for your device the firmware
Click to expand...
Click to collapse
I tried the Motorola Device Manager tool. Not sure if I made a good backup to begin with, and now I try to open the tool it doesn't seem to do anything.

xtermmin said:
Instead of flashing TWRP, have you tried just booting TWRP w/o flashing?
fastboot boot twrp.img
Click to expand...
Click to collapse
Tried that... It says it FAILED.
C:\adb>fastboot boot twrp.img
downloading 'boot.img'...
OKAY [ 0.427s]
booting...
FAILED (remote failure)
finished. total time: 1.054s

Exinu said:
I ran into some problems with my Moto G7 Play; I didn't softbrick it, but several things fought back, so I'll pass along what may get you back on track. First of all, I cannot use Linux to connect via fastboot, so I had to use a Mac, you can use your Windows box. Secondly, TWRP does not officially have a version for the G7 Play. I used an unofficial one from an XDA forum member HERE. It only offers a black screen unless you flash dtmo.img. I didn't want to flash dtmo.img, so I just used the black screen and used adb commands to install Lineage (and /e/) via TWRP command line.
The steps are pulled from another XDA posting showing how to use TWRP command line:
1. Connect the phone in fastboot mode to the PC, run fastboot devices to make sure it is connected.
2. Type: fastboot set_active b
Then: fastboot boot <your_recovery.img>, e.g. fastboot boot twrp.img
<phone will reboot, the screen will be black>
<wait to Windows new device sound>
3. Type: adb shell
twrp wipe cache << will not work on Moto G7 Play, but won't hurt anything.
twrp wipe dalvik
twrp wipe system
twrp wipe data <- NOW YOUR DATA WILL BE REMOVED, SO MAKE A BACKUP BEFORE!
twrp sideload
adb sideload <location_of_your_ROM.zip>, e.g. adb sideload C:\lineage-xyz.zip
IF THE TWRP commands do not work and hang saying something about "starting TWRP", I discovered by looking at the log in /tmp that /sdcard is encrypted. You will need to unencrypt /sdcard and I'm not sure how to do that without recovery; I'm sure there is way, though.
If I were you, I would see if you can flash LineageOS (or lineageOS + microG) with this method to get your phone back working, then you can move on to /e/. Note that if this works, you will have a recovery program available (the standard Lineage recovery), which has some basic tools. You CAN ONLY load Lineage-signed roms with this recovery. So if you want to switch from lineage to /e/ or to lineage+microG, you will need to use the twrp method above to switch to the other rom. Then you can use the lineage or /e/ recovery to install lineage or /e/ updates from the same publisher.
Also, if you install stock lineage, don't use a bleeding edge version. Pick one from mid-October so if you decide to switch to /e/ or Lineage+microG you will not be downgrading because they don't make nightly builds. It probably won't hurt since downgrading a week probably has few changes, but just in case.
Hope this helps.
Click to expand...
Click to collapse
Thanks for the effort, Exinu, but it seems to not fully recognize the command or is looking for another flag or operand. The "set_active b" command that you proposed just results in making a list like for a "help" or unspecified command. As you can see below, I tried other variations of the command after I tried searching out more details. I also tried "fastboot set_active=b" and it does the same thing with the listing. I'm assuming that it's not accepting this command. I did try the twrp-dirtyport image as well, but as you can see below, that created an error as well:
C:\adb>fastboot --set_active b
fastboot: unknown option -- set_active
C:\adb>fastboot --set-active=b
fastboot: unknown option -- set-active=b
C:\adb>fastboot set_active b
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
flashing lock locks the device. Prevents flashing partitions
flashing unlock unlocks the device. Allows user to flash any partition except the ones that are related to bootloader
flashing lock_critical Prevents flashing bootloader related partitions
flashing unlock_critical Enables flashing bootloader related partitions
flashing get_unlock_ability Queries bootloader to see if the device is unlocked
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> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot [bootloader] reboot device, optionally into bootloader
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
C:\adb>​
I did try the next step with the dirtyboot but that seem to have failed as well.
C:\adb>fastboot boot twrp-dirtyport-g7play.img
downloading 'boot.img'...
OKAY [ 0.570s]
booting...
FAILED (status read failed (Too many links))
finished. total time: 1.566s​
On my phone on the "Bootloader logs" screen, it said (before I began)
Start Up Failed:​Your device didn't stat up successfully.
Use the Software Repair Assistant on computer to repair your device.
Connect your device to your computer to get
the Software Repair Assistant.
AP Fastboot Flash Mode (Secure)
No bootable A/B slot
Failed to boot Linux, falling back to fastboot
Fastboot Reason: Fall-through from normal boot mode
USB Connected​
I then typed fastboot devices from my windows C:\ADB prompt and it showed me it was connected.
After running the stuff mentioned above, it said:
cmd: download:01348000
cmd: boot
Incomplete boot image for booting.
I disconnected and reconnect the USB and then I tried the fastloading of the dirtyport image again. The screen went blank and said the same stuff again with no bootable A/B slot, which leaves me to believe this is where my problem starts.
Any other ideas?
Any ideas

I think you may have several issues that need to be fixed one step at a time. First, I think you have an old fastboot if it doesn't recognize the set_active command. Go to this link: https://developer.android.com/studio/ and scroll down to the section labeled "Command Line tools only" and download the command line tools. Make sure you are in that directory in Windows so you are running the newer version and not the old version installed. If you run "fastboot --help" you should see set_active as an option.
Next, where did you get the TWRP? Go to the link I provided, which has a (black screen) TWRP that I have used and it works. Start from there and see how things proceed.

Exinu said:
I think you may have several issues that need to be fixed one step at a time. First, I think you have an old fastboot if it doesn't recognize the set_active command. Go to this link: https://developer.android.com/studio/ and scroll down to the section labeled "Command Line tools only" and download the command line tools. Make sure you are in that directory in Windows so you are running the newer version and not the old version installed. If you run "fastboot --help" you should see set_active as an option.
Next, where did you get the TWRP? Go to the link I provided, which has a (black screen) TWRP that I have used and it works. Start from there and see how things proceed.
Click to expand...
Click to collapse
I got the TWRP from the link that you provided. As for running "fastboot --help", I did not see the "set_active" flag listed as an option (results pasted below). I also tried to download the command line tools as suggested, but not positive as to which directory they are to reside in, or which of the files I should launch. I unzipped the commandlinetools directory (in my adb directory) and tried running the sdkmanager.bat batch file which was nested in one of the subdirectories (it briefly opened and flashed a window but seemed to do nothing more). Not sure if this matters, but I also have android studio installed, although I am not sure how or where the "set_active" command comes from. I tried downloading windows latest PowerShell, and have also tried CMD as adminstrator. From my searching, I see people using "--set-active" with android commands as well, but I really don't know if this is a MS/DOS based command that is used for controlling drives and partitions on the Windows system, or if it's an adhock SDK - Linux add-on command of sorts. I can't seem to find much info on the command.
This is how it reads:
PS C:\adb> fastboot --help
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
flashing lock locks the device. Prevents flashing
partitions
flashing unlock unlocks the device. Allows user to
flash any partition except the ones that are related to bootloader
flashing lock_critical Prevents flashing bootloader related
partitions
flashing unlock_critical Enables flashing bootloader related
partitions
flashing get_unlock_ability Queries bootloader to see if the device is unlocked
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> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot [bootloader] reboot device, optionally into bootloader
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
PS C:\adb>​
PS C:\adb> set_active
set_active : The term 'set_active' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ set_active
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (set_active:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Any other ideas?

The command-line tools download should not require any installation; at least, the Mac version did not. Unzip the file to your desktop. Then open a command prompt which should open in c:\Users\your_user . Enter "cd Desktop" to change to the Desktop folder, then cd <foldername> to change into the folder you unzipped the files into. Windows will sometimes unzip a folder into a second folder, so you may need to cd <foldername> once more. In any case, enter "dir" to make sure you see files like fastboot.exe, adb.exe, etc.
In Windows, when you type a command it will first look to your current directory and run the exe file that exists there, if it exists. If it does not, then it starts looking for the command in your %PATH% environment variable. That's why you need to "cd" to the tools directory: when you run "fastboot", you want it to run fastboot.exe in that directory, and not the old fastboot.exe that is installed somewhere on your system.
It sounds like you haven't worked with the command line much; I suggest you go through some tutorials on basic command line usage for both Windows and Linux; it will make tinkering with computers and phones much easier. And set_active is not a DOS/Windows command, it is parameter you are passing to fastboot.exe to tell it what action you want it to do; it just also calls these actions "commands". So when you typed c:>set_active, you told Windows to find a file called set_active.exe and run it. That file does does not exist, so it did not work.
Quick note: the Unix command line will not run a command from the current directory for multiuser security reasons; you need to specify the current directory (dot) and a slash on the command like this: ./fastboot
This will also work with DOS/Windows, but usually the backslash is used instead of the forward slash, for very old historical reasons.

Exinu said:
The command-line tools download should not require any installation; at least, the Mac version did not. Unzip the file to your desktop. Then open a command prompt which should open in c:\Users\your_user . Enter "cd Desktop" to change to the Desktop folder, then cd <foldername> to change into the folder you unzipped the files into. Windows will sometimes unzip a folder into a second folder, so you may need to cd <foldername> once more. In any case, enter "dir" to make sure you see files like fastboot.exe, adb.exe, etc.
In Windows, when you type a command it will first look to your current directory and run the exe file that exists there, if it exists. If it does not, then it starts looking for the command in your %PATH% environment variable. That's why you need to "cd" to the tools directory: when you run "fastboot", you want it to run fastboot.exe in that directory, and not the old fastboot.exe that is installed somewhere on your system.
It sounds like you haven't worked with the command line much; I suggest you go through some tutorials on basic command line usage for both Windows and Linux; it will make tinkering with computers and phones much easier. And set_active is not a DOS/Windows command, it is parameter you are passing to fastboot.exe to tell it what action you want it to do; it just also calls these actions "commands". So when you typed c:>set_active, you told Windows to find a file called set_active.exe and run it. That file does does not exist, so it did not work.
Quick note: the Unix command line will not run a command from the current directory for multiuser security reasons; you need to specify the current directory (dot) and a slash on the command like this: ./fastboot
This will also work with DOS/Windows, but usually the backslash is used instead of the forward slash, for very old historical reasons.
Click to expand...
Click to collapse
Exinu, thanks for your continued assistance. As it turns out the fastboot/adb version I was using didn't include the "set_active" command (I don't think it was a path problem as I was always typing commands from the in directory where the ADB software was downloaded). As I had tried to follow a number of different tutorials of the course of several weeks, some for the G7 play, and perhaps some for the G7 and others generic, I think the place on the web that I went for the original ADB package (or the ADB version) was the problem. I also found another copy of ADB on my drive (downloaded weeks ago) that was titled "Minimal ADB and Fastboot", and as it turns out, that version DID support the set_active operand (from the fastboot --help command). So, I was able to return to your initial directions to set the active partion to b as initially instructed (see below, but the phone also shows that the set_active:b command seemed to process without error). However, I was not able to do the next step of flashing the TWRP. I tried the TWRP version you suggested and linked to (the dirtyport version) and then also the "channel" version, which I understand to be designed for the G7 play, unlike the "river" version. In either case (dirtyport or channel) I get a new/different "usage: unknown command" error, as seen in text pasted below:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot set_active b
Setting current slot to 'b'...
OKAY [ 0.176s]
finished. total time: 0.178s
C:\Program Files (x86)\Minimal ADB and Fastboot>dir
Volume in drive C has no label.
Volume Serial Number is EC2B-BC54
Directory of C:\Program Files (x86)\Minimal ADB and Fastboot
2020-11-27 01:42 PM <DIR> .
2020-11-27 01:42 PM <DIR> ..
2018-01-11 06:53 PM 1,784,320 adb.exe
2018-01-11 06:53 PM 97,792 AdbWinApi.dll
2018-01-11 06:53 PM 62,976 AdbWinUsbApi.dll
2015-08-09 01:50 PM 29,882 cmd-here.exe
2018-01-11 06:53 PM 853,504 fastboot.exe
2020-08-17 02:31 AM 1,456,678 logo.bin
2020-08-15 11:25 PM 27,848,704 twrp
2020-09-03 02:52 AM 27,133,952 twrp-dirtyport-g7play.img
2020-08-16 01:12 AM 17,307,289 twrp-installer-3.4.0-0-river.zip
2020-11-17 04:21 AM 23,298,048 twrp-moto-g7-play-channel-android-10.img
2020-08-15 11:25 PM 27,848,704 twrp.img
2020-11-27 01:27 PM 5,004 unins000.dat
2020-11-27 01:26 PM 717,985 unins000.exe
13 File(s) 128,444,838 bytes
2 Dir(s) 28,010,246,144 bytes free
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot twrp-dirtyport-g7play.img
fastboot: usage: unknown command twrp-dirtyport-g7play.img
Granted, I'm not a command line expert, but I have been playing with computers since the TRS-80 and the C64 and Apple IIe, and 8086 DOS stuff, and used to do QBasic programming as a kid, so in most cases, I can usually navigate myself through some hairy computer instructions to do whatever I need to do, unless the instructions themselves are hairy. I find that the Android Dev forums are predicated upon some knowledge of those platforms and are a rude awakening for those unfamiliar with the development history and architecture. Obviously, I'm going to extremes to try to de-google an Android phone (frankly I would be happier if there was more stuff on the market that already was preinstalled), as this google censorship and proposed contract tracing stuff is just getting out of hand and going too far... so this is my way of fighting back. I'd rather know nothing about ADB, but here I am.
Is there any chance you know how or why I am getting the "fastboot: usage: unknown command twrp..." error above, or how I can resolve it?

You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.

Exinu said:
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Click to expand...
Click to collapse
OK, so that was a head-slapping "duh" moment on my end (using fastboot filename.img instead of fastboot boot filename.img). However, now that I've entered the right command I'm still having problems. As you indicate in your post above, the "fastboot boot" command did initiate the sequence, and the screen did go black, however, one of the screens that it went to only said "bad key" at the upper left hand corner.
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp-dirtyport-g7play.img
downloading 'boot.img'...
OKAY [ 0.575s]
booting...
FAILED (status read failed (Too many links))
finished. total time: 1.580s​
As for my phone screen, it goes black and cycles saying "bad key" a few times, and after a few attempts it reverts to the Bootload logs screen, giving the same message it did that I started with.
Start Up Failed​
Your device didn't start up successfully.
Use the Software Repair Assistant on computer
to repair your device.
Connect you device to your computer to get
the Software Repair Assistant. ​AP Fastboot Flash Mode (Secure)
No bootable A/B slot
Failed to boot Linux, falling back to fastboot
Fastboot Reason: Fall-through from normal boot mode
USB Connected​

Exinu said:
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Click to expand...
Click to collapse
OK, I after the "dirtyport" image didn't work, I went out on a limb and tried to flash a different img file, (first doing the set_active b command), typing:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp-moto-g7-play-channel-android-10.img
downloading 'boot.img'...
OKAY [ 0.496s]
booting...
OKAY [ 0.178s]
finished. total time: 0.679s​It briefly flashed the Moto screen and then went black. After this, with the black screen, it seemed like it was able to the "adb shell" command, although it seemed to not be able to take the TWRP commands:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
channel:/ # twrp wipe cache
Unable to find partition for path '/cache'
Done processing script file
channel:/ # twrp wipe dalvik
Failed to mount '/data' (Invalid argument)
Done processing script file
channel:/ # twrp wipe system
E:Error with wipe command value: 'system'
Done processing script file
channel:/ # twrp wipe data
Failed to mount '/data' (Invalid argument)
Done processing script file
channel:/ # twrp sideload
C:\Program Files (x86)\Minimal ADB and Fastboot>adb sideload lineage-17.1-20201129-nightly-channel-signed.zip
Total xfer: 1.00x​
After this point it went back to the "bad key" and return to the Bootloger logs screen.
I'm assuming at this point if there is a failure in the TWRP command sequence (as suggested above) I shouldn't expect the latter commands to work. I also attempted to use the moto g7's built-in recovery menu that is available from pushing and holding the power and upper volume button. When I tried to "apply update from ADB" using the phone to initiate the effort, and then typed, C:\Program Files (x86)\Minimal ADB and Fastboot>adb sideload lineage-17.1-20201129-nightly-channel-signed.zip, the phone screen read as follows:
Supported APR: 3
Stopping adbd...
Now send the package you want to apply to the device with the "adb sideload ,filename"...
Finding update package...
Opening update package...
Verifying update package...
E: failed to verify whole-file signature Update package verification took 45.2 s (result 1).
E: Signature verification failed
E: error: 21
Installation aborted. ​

Exinu said:
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Click to expand...
Click to collapse
Even though I was getting errors after the "WIPE" command, it seems like the adb shell is bringing about a linux-esque terminal of the channel image and I can see the files/directories. Using the LS command it seems that the folders you are mentioned are empty, with the exception that there is no "dalvik" directory:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
channel:/ # twrp
TWRP openrecoveryscript command line tool, TWRP version 3.3.1-0
Allows command line usage of TWRP via openrecoveryscript commands.
Some common commands include:
install /path/to/update.zip
backup <SDCRBAEM> [backupname]
restore <SDCRBAEM> [backupname]
wipe <partition name>
sideload
set <variable> [value]
decrypt <password>
remountrw
fixperms
mount <path>
unmount <path>
print <value>
mkdir <directory>
reboot [recovery|poweroff|bootloader|download|edl]
See more documentation at https://twrp.me/faq/openrecoveryscript.html
channel:/ # ls
acct config etc init.rc init.recovery.usb.rc persist plat_service_contexts res sideload tmp vendor_file_contexts vndservice_contexts
bin d external_sd init.recovery.hlthchrg.rc license plat_file_contexts postinstall root storage twres vendor_hwservice_contexts
bugreports data file_contexts.bin init.recovery.mksh.rc mnt plat_hwservice_contexts proc sbin sys ueventd.rc vendor_property_contexts
cache default.prop firmware init.recovery.qcom.rc odm plat_property_contexts product sdcard system usb_otg vendor_seapp_contexts
charger dev init init.recovery.service.rc oem plat_seapp_contexts prop.default sepolicy system_root vendor vendor_service_contexts​
Here are the directory contents:
channel:/ # cd data
channel:/data # ls
channel:/data # cd /
channel:/ # cd cache
channel:/cache # ls
channel:/cache # cd /
channel:/ # cd system
channel:/system # ls
channel:/system # cd /
channel:/ # cd dalvik
/sbin/sh: cd: /dalvik: No such file or directory​

When you went into recovery mode, was it Motorola's stock recovery or LineageOS's recovery (with the Lineage logo (the three circles))?
In any case, at least you have a working recovery. Error 21 simply means that the signature is on the firmware file is not what it was expecting. If you have a Motorola recovery, then it expects a Motorola-signed firmware. If it is the Lineage recovery, then it will only flash Lineage-signed firmware.
Your TWRP sideload command sure looks like it worked when it loaded the firmware, but if it had worked, you would have LineageOS recovery and it would say current slot: a. I don't remember if the stock Motorola recovery displays the current slot. When you tell fastboot to set_active b, it sets the current slot to b and then when you install the firmware it installs the firmware to slot a.

Exinu said:
When you went into recovery mode, was it Motorola's stock recovery or LineageOS's recovery (with the Lineage logo (the three circles))?
In any case, at least you have a working recovery. Error 21 simply means that the signature is on the firmware file is not what it was expecting. If you have a Motorola recovery, then it expects a Motorola-signed firmware. If it is the Lineage recovery, then it will only flash Lineage-signed firmware.
Your TWRP sideload command sure looks like it worked when it loaded the firmware, but if it had worked, you would have LineageOS recovery and it would say current slot: a. I don't remember if the stock Motorola recovery displays the current slot. When you tell fastboot to set_active b, it sets the current slot to b and then when you install the firmware it installs the firmware to slot a.
Click to expand...
Click to collapse
Exinu,
It looks like the fastboot set_active b command worked, in that my phone acknowledged it did, and the command prompt seemed to indicate the same. As for the phone screen, the Moto splash screen that flashed quickly (probably less than 1 second) did not have any hint of Lineage logo. I tried repeating the process and saw the logo a total of 3x. It was the C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp-moto-g7-play-channel-android-10.img command that got me there (the "dirtyport" image you suggested didn't work) and it was before the attempt to flash the lineage image.
However, as for the ADB SHELL commands that you recommended, it didn't seem like they were doing what one might expect. Subsequent to the attempted TWRP commands in the shell, I tried to sideload the lineage system but it would not take, saying "bad key" on the upper LH side of the screen.
Is it possible that prior image flashing attempts have left some incompatible clutter on my phone (perhaps visible by means of exploring other folders or folder names via the ADB SHELL)? I've been working with Raspberry PI's and PC based OMV / Nextcloud servers in recent months and perceive that new installs seem inclined to revert to old files on occasion if not thoroughly formatted.

One thing I forgot to mention: since you are installing Lineage, you can use the Lineage recovery to install it. TWRP is only necessary for /e/ or other roms that do not have their own recovery. Try "fastboot boot" but specify the lineage recovery file.

Also, now that I review things again, I may have used this TWRP instead of the "dirty port" version. I don't know if it will make a difference, but it might be worth a try. Sorry, I guess I have too many irons in the fire right now and got it mixed up. Scroll down to abou t the third or forth comment and there is a google drive link. You just need the recovery.img. Do not flash the dtmo.img, just fastboot/boot the recovery image: https://forum.xda-developers.com/t/...y-custom-recovery-kernel-source-code.3933680/

Related

[GUIDE] ADB and Fastboot

ADB
What is ADB?
Android Debug Bridge (ADB) is a command-line tool to control your device with a computer. ADB is part of google's free android sdk (android software developers kit). Once it's set up, you are able to modifiy the device's internal memory (what you usually cannot do if you are not s-off) and some other things.​
Installation
Windows:
The Installation for Windows is not difficult. Just download this file here and you will get ADB and fastboot (thx to _thalamus):
http://thalamus.ineige.org/misc/adb_fastboot_win32.zip​
You do not need the whole SDK any more. But in Cyanogenmod Wiki one can find a very good guide to install it (in case you need it):
Howto: Install the Android SDK​
Linux / Mac:
If you use ubuntu (or linux in general) or mac, you have to do some more work:
Set up ADB and Fastboot on Ubuntu
[GUIDE]Set up ADB and Fastboot on Mac​
How to use adb?​
Preparations:
Set up your phone for debugging (Settings > Applications > Development > check “USB Debugging”).
Now open terminal (for ubuntu/mac: change to platform-tools folder of android-sdk) and enter
Code:
adb shell
Getting logcat to work out problems
Code:
adb logcat
Copy & Save the output to a text file.​
Modify /system partition:
When you want to modify the /system partition from internal memory, it's recommend to boot into recovery, connect the phone to computer via usb connection and then start adb shell. There is a good guide about adding / removing apps from the /system partition:
[GUIDE]Add/remove system apps​
A complete list of commands for adb shell would blast this guide, so I feel free to refer to the android developers site:
List of adb commands​
There also exists a software for adb: QtADB. Never used it, so I cannot recommend it personally.​
Fastboot
Fastboot is command-line tool to control the filesystem and the firmware (also called radio) of android devices. You access it, when and turn off your phone, and then press and hold first the back and afterwards the power button.​
WARNING:
Flashing filesystems and firmwares is a dangerous thing. When you do not know what you are doing, you can brick your phone. To make sure this doesn't happen, there is a security barrier. This barrier is better known as S-ON, which means “Security on”. If you are in this state, you cannot use fastboot. You have to get S-OFF (Security off) before:
http://alpharev.nl
http://revolutionary.io
To find out wether you are S-ON or S-OFF, boot into fastboot (aka bootloader) and read the first line.
It is also very important to ensure the flashing is not interrupted by power loss or usb disconnections, to avoid your phones gets bricked.​
How do I use fastboot?
Boot into fastboot as guided above, connect your phone to your computer over usb and open terminal, (and change to folder as with ADB). Now you can flash what you want.
Code:
fastboot <command> <location of the file you want to flash>
Available commands
Typical partition layout​
Examples:
I assume one is using windows and the stored file is on partition C:\.
Code:
fastboot flash hboot C:\hboot.img
fastboot reboot-bootloader
fastboot erase chache
Code:
fastboot flash radio C:\radio.img
Code:
fastboot flash recovery C:\recovery.img
If you want to flash bootanimation, hboot, radio, recovery or splash, you could use android flasher instead:
[UTILITY]Android Flasher(Rec,splash,Radio,HBOOT,bootanim)(USB-Brick FIX)(12/06/11)
Used it sometimes, never had any problems.​
Reason to flash new hboot
If you decided to use one of alpharev's partition tables, you flash it as a hboot to change the partition sizes of the internal memory.​
Reasons to flash radio via fastboot
First of all, you are s-off. So it's very probable you changed the hboot. When you flash a radio over a recovery, the recovery extracts the downloaded radio.zip into /cache partition. So the radio.img is stored there temporary. For this operation the /cache partition needs as many as 25 mb. If it hasn't, they might occur big problems.​
Furthermore, it's better to do it, because there isn't any software (e.g. recovery) which could go wrong.​
Credits:
Code:
rootSU
_thalamus
schiznik
Thanks for the credit. It means a lot

[Q] SERIOUS PROBLEM! Save Me...

Okay, here's what happened,
2 days ago, i installed ARHD ROM, works perfectly fine,
next day, i saw a kernel by franco. installed it, then after rebooting.... baamm! my unit is not working anymore, stuck in boot screen,
i tried different ways, followed different forums, like Tutorial Disaster. still to no avail,
the sad thing is, i forgot to back it up before doing the upgrades, i know its my fault..
i tried to erase everything via recovery, still not working,
Just today, went to HTC service center, i'm from the Philippines, but i bought my unit from online selling. as per HTC service center its from indonesia, they tried to re-flash something but they said its not working, so they said that they will need to change the mother board, and it will cost me 14,000 pesos or $350.. i don't want to spend that much, feels like i bought a new one..
can someone please enlighten me?
?!
You can erase everything in recovery, but you have to flash something afterwards, maybe like ARHD.
There's nothing wrong with your device, don't panic. Just do a wipe, then flash the ROM as the directions are given.
if you can still get into recovery
relock it
flash stock recovery
flash stock RUU
done
Download ARHD and CWM Recovery
Rename ARHD to update.zip and CWM to recovery.img
Place update.zip and recovery.img into a folder with fastboot and adb
Extract boot.img from update.zip and place in your fastboot folder
Put your phone into fastboot mode with unlocked bootloader
Flash boot with command 'fastboot flash boot boot.img'
Boot recovery using 'fastboot boot recovery.img' command
Use command 'adb push update.zip /sdcard/update.zip' to send ARHD to phone
Then install rom from update.zip in recovery
It's nothing serious with your phone. It is easily can be recovered. Just don't run here and there so the XDA community can assist you.
There are two ways to recover your phone.
1) flash RUU
2) push xxx_rom.zip to your device.
Already tell you about flashing RUU in the disaster thread.
well, i would like to give thanks to all of you, who answered my questions, helped a lot. trying to read more here before doing another run in fixing my device.
where can i get stock RUU? my device is from indonesia. and one more thing, how to flash RUU?
djpoe said:
Download ARHD and CWM Recovery
Rename ARHD to update.zip and CWM to recovery.img
Place update.zip and recovery.img into a folder with fastboot and adb
Extract boot.img from update.zip and place in your fastboot folder
Put your phone into fastboot mode with unlocked bootloader
Flash boot with command 'fastboot flash boot boot.img'
Boot recovery using 'fastboot boot recovery.img' command
Use command 'adb push update.zip /sdcard/update.zip' to send ARHD to phone
Then install rom from update.zip in recovery
Click to expand...
Click to collapse
very detailed instruction here
where can i get adb BTW?
wintermute000 said:
if you can still get into recovery
relock it
flash stock recovery
flash stock RUU
done
Click to expand...
Click to collapse
This and finish with: fastboot erase cache
Sent from my HTC One X using XDA
wolfraim said:
This and finish with: fastboot erase cache
Sent from my HTC One X using XDA
Click to expand...
Click to collapse
thanks man.. where can i get the stock RUU and stock recovery? and also why do we have to re lock the device?
EDIT: i almost forgot, because this problem started after installing a new kernel by franco, so i guess i need to install a stock kernel? where can i get it?
mikey0105 said:
thanks man.. where can i get the stock RUU and stock recovery? and also why do we have to re lock the device?
EDIT: i almost forgot, because this problem started after installing a new kernel by franco, so i guess i need to install a stock kernel? where can i get it?
Click to expand...
Click to collapse
I had the same problem with franco's kernel, what I did was, go to recovery and re-flash my xx_rom.zip, then it boots ok. You should try the same, provided you still have the ARHD.zip in your sdcard.
Your device from Indonesia ? I believe this is the RUU for you (same for me too):http://hoxroms.serveftp.com/RUU_END...Radio_1.1204.103.14_release_257076_signed.exe
ckpv5 said:
I had the same problem with franco's kernel, what I did was, go to recovery and re-flash my xx_rom.zip, then it boots ok. You should try the same, provided you still have the ARHD.zip in your sdcard.
Your device from Indonesia ? I believe this is the RUU for you (same for me too):http://hoxroms.serveftp.com/RUU_END...Radio_1.1204.103.14_release_257076_signed.exe
Click to expand...
Click to collapse
thanks ill try it later.. i don't have it on my sdcard, as i've said i erased everything already..
but i guess i'll try the step on top provided by "djpoe" to put the ARHD inside my SD card. hope everything will work..
1 Download ARHD and CWM Recovery
2 Rename ARHD to update.zip and CWM to recovery.img
3 Place update.zip and recovery.img into a folder with fastboot and adb
4 Extract boot.img from update.zip and place in your fastboot folder
5 Put your phone into fastboot mode with unlocked bootloader
6 Flash boot with command 'fastboot flash boot boot.img'
7 Boot recovery using 'fastboot boot recovery.img' command
8 Use command 'adb push update.zip /sdcard/update.zip' to send ARHD to phone
9 Then install rom from update.zip in recovery
For item 7 & 8, maybe you like a safe-proof guide that I posted here
Just replace "D:\HTC\One X\HTC Dev.com unlock\android-sdk\platform-tools>" to your own fastboot/adb folder path
and "recovery-clockwork-touch-5.8.3.1-endeavoru.img" to "recovery.img" if you renamed it.
and "xxx.zip" to "update.zip"
thanks, i'm downloading the files now...
quick question, if i erased all data/cache, the kernel that i installed? will it be deleted as well? because i need to have a stock kernel and i can't see one?
erase all data/system/cache will not delete the installed kernel.
As you said you will follow djpoe's guide, see no. 4 & no. 6 regarding kernel flashing.
Remember the ROM.zip that you have earlier (see Disaster thread), inside the ROM.zip there is a boot_signed.img, that is the stock kernel. But you don't really need the stock kernel, what you need is the AHRD's kernel (see. no.4).
ohhh i see! now that good to know thanks... waiting for the files to be downloaded.. will give you feedback later... fingers cross...
additional question, just wondering, why is it important to re-lock the device before flashing ruu?
i tried to copy the update.zip by doing this
adb push update.zip/sdcard/update.zip
then there are lots of command on the CMD.. see below
C:\fastboot>adb push update.zip/sdcard/update.zip
Android Debug Bridge version 1.0.29
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number. Overrides ANDROID_SERI
AL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devic
es.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosy
stem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is wr
itten
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks
themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the
device's
shared storage / SD card contents; the defau
lt is noshared.)
(-all means to back up all installed applicatio
ns)
(-system|-nosystem toggles whether -all automat
ically includes
system applications; the default is to inclu
de system apps)
(<packages...> is the list of applications to b
e backed up. If
the -all or -shared flags are passed, then t
he package
list is optional. Applications explicitly g
iven on the
command line will be included even if -nosys
tem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup
archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.
-------------------------------
then tried to install it via CWM, apply /sdcard/update.zip
it says
finding update
opening update
E: Can't open sdcard/update.zip
(No such file or directory)
Installation aborted
It should be C:\fastboot>adb push update.zip /sdcard not C:\fastboot>adb push update.zip/sdcard/update.zip
where is your adb files ? In the fastboot folder too ? If yes, try this:
1. C:\fastboot>fastboot boot recovery-clockwork-touch-5.8.3.1-endeavoru.img
2. C:\fastboot>adb devices
enter
C:\fastboot>adb shell
enter then type after ~ # mount sdcard
3. don't close anything, open another cmd prompt
C:\fastboot>adb push update.zip /sdcard
then enter
once completed, choose install from sdcard - choose zip from sdcard, the update.zip should be there
here whats happening. see attachment
mikey0105 said:
here whats happening. see attachment
Click to expand...
Click to collapse
There is no AdbWinUsb.dll in your folder ?
GUYS!!! AT LAST!!!! I'm so happy!!! its all okay now! oh man! this is crazy! hahaha! thank you so much to all!. the feeling is really great! WOOOOOWWWWW!!!!

[REF] efrant's "Android for Galaxy Nexus" 101 & FAQs

The popularity of Nexus devices has increased significantly since the launch of the Nexus One in January 2010. Along with this popularity, forums such as xda-developers have also had an influx of new users, most of which are not developers, and are not well versed in the intricacies of Android.
After much thought (and some discussion on this thread), I’ve decided to create this thread as a compilation of FAQs, 101s, and “How-To’s” in the hopes that those coming to Android who want to learn will have another resource to help them learn. With that in mind, this thread is NOT meant to explain the quickest way to do things (you will NOT see toolkits or shortcuts discussed in this thread), nor is it meant to be a “fix-my-device” thread. It is created with for a purpose of learning, in order to expand users’ knowledge of Nexus devices and Android in general. See this post by kyphur for the general philosophy of this site, which I share.
I do not take myself to be an Android guru or developer. However, I do have a bit of knowledge to share. If you think things are missing or not accurate, I will be more than happy to add or revise anything. I will try to cover most of the basic topics related to Android, including drivers, ADB, fastboot, partitions, recoveries, bootloaders, root and reverting to stock. Again, I will not discuss toolkits, nor will I cover custom ROMs. Those have their own threads.
This will be an ongoing work-in-progress, as it takes considerable time to try and capture everything properly, and my time is limited. The order of the information will also change, as I haven't quite figured out the best way to present everything. (Currently there are some FAQs, including fastboot and ADB commands, followed by a list of reference and how-to threads.)
So, without further delay:
Frequently Asked Questions
What is Android?
Android is an open-source operating system for mobile devices. It is basically a java virtual machine running on a Linux-based kernel.
What is the Android SDK and do I need it?
SDK stands for "software development kit. Do you need it? If you are developing, then yes (but then you probably would be reading this thread now would you... ). If you are not developing, then no, you do NOT need to install it. It is just a waste of space. The only files you need (to interface with your PC) that comes from the SDK are the fastboot and adb files, and they can be found here for Windows, Linux, and MacOS.
Why do I need a driver for my Windows PC to recognize my device?
As with all hardware, Windows requires device drivers for it to be able to interface with the OS. Drivers are not required if you are using Linux or MacOS.
Where do I get the driver for my PC?
For previous Nexus devices (the Nexus One and Nexus S) the driver included in the Android SDK was the one needed. However, with the Galaxy Nexus, that driver no longer works. The driver is now provided by Samsung, and can be found from various locations. However, I recommend using this package by 1wayjonny. It works perfectly and, unlike most other packages, 1wayjonny’s repack does not install any crapware along with it. That said, it doesn’t include an .exe file, so it needs to be installed manually from the .inf file. If you do not now how to do that, see here for instructions. Note: If you are using Windows 8, you will need to do this before you can install the driver.
Why do I need to install the driver twice?
Nexus devices use two main interfaces (there are actually a few more, but I will cover them later) to communicate with a PC. These are ADB (Android debug bridge) and fastboot, both of which will be covered later. The fastboot interface requires the GNex to be booted in fastboot (i.e., bootloader) mode. Thus, in order to install the fastboot driver, you need to boot your GNex into the bootloader. The ADB interface requires an Android kernel to be booted, i.e., your device needs to be booted normally, or in recovery (covered later). Additionally, if your device is booted normally, you need to have USB Debugging set to enabled in settings (i.e., Settings->Developer options->USB debugging).
How do I boot my device into the bootloader (i.e., fastboot mode)?
Turn off your device, hold volume up and volume down, and press and hold the power button.
What is a command prompt?
A command prompt in Windows (or terminal in Linux/MacOS) is a command line window in which you can enter commands. To open a command prompt in Windows, you can hold the shift key and right click in the directory in which you want your command prompt open. Or, in a Windows Explorer window you can go to File-><name-of-window>->Open command window here.
What is a bootloader?
Without getting into too many technicalities, the bootloader is essentially the program that gets loaded first when starting your device, and it is responsible for booting the Android kernel. Think of the bootloader as the BIOS of a computer.
What does it mean if my bootloader is locked/unlocked?
Most (if not all) devices are shipped from the manufacturer with locked bootloaders. This is for security reasons. A locked bootloader does not allow easy flashing of images, which means that it is difficult to change or modify the operating system. Unlocking a bootloader (using fastboot) on a most Galaxy Nexus devices results in a complete loss of all personal data from the device. Having a locked or unlocked bootloader has no bearing on the functioning of the device. Unlocking it gives you more options to play around with the OS. Additionally, an unlocked bootloader means that you can easily root your device no matter what -- unlike most non-Nexus devices, if you lose root, it is trivial to get it back.
What is “root”?
Root essentially means that you have root (or superuser) access to the file system on Android. It is similar to being “administrator” on a Windows PC. It has nothing to do with your device or the bootloader, it has to do with the Android OS (i.e., you cannot “root” your device – you root the Andoid build that you are running). To have root, you need to be booted into the Android OS that you have rooted. If you are in fastboot mode, root is irrelevant.
How do I get “root”?
If you are booted into a custom recovery (recoveries will be covered later), root is enabled by default. If you want root while booted into Android, you will need to place two files on your system partition: an “su” binary which grants root access, and a superuser app that manages that access. The two that are available are ChainsDD’s Superuser and Chainfire’s SuperSU. Usually these files are packaged up in a zip file that is flashable using a custom recovery, but they can be flashed manually using ADB. Both of these methods will be described below.
If I unlock my bootloader, is that the same as root?
No, as was mentioned above, unlocking the bootloader allows you to (among a few other things) flash images easily to the device when not booted into the Android OS. Root allows you access to manipulate the files WITHIN the Android OS.
If I unlock my bootloader, does that mean that I have to root?
No.
If I unlock my bootloader, do I have to flash a custom ROM?
No.
Do I need to root to flash a ROM?
No.
What is a ROM?
A ROM is slang for an mobile OS build.
What are the different versions of Android, and is there a difference between say 4.2 and JOP40C?
Have a look at this link for an explanation of what (for example) JOP40C means, and what version of Android that is.
What is the difference between a stock ROM and a custom ROM?
A stock ROM is a ROM that is either built by Google (like any yakju/takju/mysid build) or built by Samsung (like all the yakju** variants and mysidpr) and is signed by Google’s (or Samsung’s) platform keys. Everything else is a custom ROM.
What is this AOSP I keep hearing about?
AOSP stands for Android Open Source Project, and is a repository for the source code for Android. You can build your own ROM from AOSP. Details can be found on http://source.android.com/ or here.
What is fastboot?
Fastboot can refer to three things: the actual interface between your PC and phone; the fastboot.exe file; or the “mode” of your device. For you to be able to use fastboot commands: your device has to be booted in fastboot mode, the fastboot driver for your PC needs to be installed, and the fastboot.exe file needs to be on your PC.
What are the fastboot commands?
The list of fastboot commands can be seen by typing “fastboot” (without the quotes) in a command prompt opened in the directory where you fastboot.exe file is located. See below.
Code:
fastboot
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot + recovery + system
flash <partition> [ <filename> ] write a file to a flash partition
erase <partition> erase a flash partition
format <partition> format a flash partition
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot reboot device normally
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache
-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: 2048
Along with these commands, there is an additional one: oem. For now, I will only cover the following commands: devices, flash, boot, erase, reboot, reboot-bootloader and oem.
These commands will work in fastboot mode, whether your bootloader is lock or unlocked:
oem: with a shipping bootloader (like what most of us have on our devices) there are two “oem” commands: “oem unlock” and “oem lock”. These commands are used to unlock and lock your bootloader, e.g., “fastboot oem unlock” will unlock your bootloader.
devices: this command checks to see if your device is properly connected to your PC in fastboot mode, e.g., “fastboot devices”
reboot: this command will reboot your device, e.g., “fastboot reboot”
reboot-bootloader: this command will reboot your device into fastboot mode, e.g., “fastboot reboot-bootloader”
These commands will only work in fastboot mode IFF your bootloader is unlocked:
flash: this command is used to flash images to partitions (partitions will be covered later) on your device. It cannot be used to “flash” individual files or .zips. For example, to flash the system partition, the command would be “fastboot flash system system.img”
boot: this command boots a kernel without flashing it to your device. For example, to boot an insecure kernel called “test.img”, the command would be “fastboot boot test.img”
erase: this command erases a specified partition. For example, to erase the cache partition, the command would be “fastboot erase cache”
The above mentioned commands are the basics for flashing your device. You should get familiar with them.
What is ADB?
ADB can refer to two things: the actual interface between your PC and phone, or the adb files (the .exe and two .dll files for Windows). For you to be able to use adb commands: the adb driver needs to be installed on your PC, the adb files need to be on your PC, and your device has to be booted either in recovery mode or booted normally into Android. Additionally, USB debugging needs to be enabled if booted into Android.
What are the ADB commands?
The list of ADB commands can be seen by typing “adb” (without the quotes) in a command prompt opened in the directory where your adb.exe file is located. See below.
Code:
Android Debug Bridge version 1.0.29
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
copkay has written up a great guide on the use of the “backup” and “restore” commands in this thread, so I will not cover those commands here.
For now, I will only cover the following commands: devices, reboot, reboot bootloader, push, pull and shell.
devices: this command checks to see if your device is properly connected to your PC in ADB mode, e.g., “adb devices”
reboot: this command will reboot your device, e.g., “adb reboot”
reboot-bootloader: this command will reboot your device into fastboot mode, e.g., “adb reboot bootloader”
push: this command copies a file (or directory) to your device from your PC. For example, say you wanted to copy to your /sdcard folder on your device a file called junk.jpg, which is stored on your PC in c:\. The command would be “adb push c:\junk.jpg /sdcard/” (assuming the folder is mounted – to be covered later). Petrovski80 has added more details on copying files to your device in his thread here.
pull: this command copies a file (or directory) to your PC from your device. For example, say you wanted to copy to your c:\ directory on your PC a file called junk.jpg, which is stored in the /sdcard folder on your device. The command would be “adb pull /sdcard/junk.jpg c:\” (assuming the folder is mounted – to be covered later).
shell: this command opens a “shell” to your device so you can issue commands directly to the Android OS. The command is “adb shell”. Your prompt will change to “$” which means that you are now issuing commands to Android, not to your PC. (At some point, I will try to put together a list of commonly used commands, but for anyone that has used Linux, they are essentially the same.)
What are the partitions on a Galaxy Nexus?
A Galaxy Nexus has the following 13 partitions:
boot <-- this is where the kernel and ramdisk are stored
cache <-- this is, well, the cache, i.e., a temporary storage area
dgs <-- I have no idea what this is for
efs <-- this is where your IMEI number is stored, among other things
metadata <-- I have no idea what this is for
misc <-- I have no idea what this is for
param <-- this is where the lock state of the bootloader is stored
radio <-- this is where the radio (i.e., baseband) is stored
recovery <-- this is where the recovery is stored
sbl <-- this is part of the bootloader, and is loaded by the xloader. This is what provides the odin and fastboot interfaces.
system <-- this is where the Android OS resides
userdata <-- this is where your data, including /sdcard resides
xloader <-- this is part of the bootloader, and loads up first.
See this thread or this one for the offsets and sizes.
What does mounting mean?
In order for a device to have access to files, the partition on which those files reside needs to be “mounted”. If you are in recovery, you can easily do this by going to the mounts menu and mounting the appropriate partition. If you are booted in Android, you will need to mount the partition yourself. The /sdcard folder is already mounted by default, however.
How do I mount the system partition?
In recovery: go to the mount menu and mount /system
In Android, on your device: you need root, and a file explorer with root access
In Android, connected via ADB (root required): you need to type the following command in a command prompt:
adb shell
su
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
To explain this a bit:
-o remount,rw <== this remounts a partition that is already mounted (as read-only), as read-write
-t ext4 <== this specifies to mount it as ext4
/dev/block/mmcblk0p1 <== this is the system partition
/system <== this is what you are mounting it as
What is recovery?
Recovery is like a mini OS, which allows you to perform various functions, usually related to flashing files to your device, or updating files, or backing things up, etc. The stock image has a recovery included, but its functionality is very limited. There are a number of custom recoveries available, but the two most popular for the Galaxy Nexus are CWM and TWRP. There are various versions of each. More details to come in this section.
I see an Android lying on its back when I boot into recovery. Why?
What you see is the main screen of the Galaxy Nexus stock recovery. To access the menu, you need to push and hold power and press volume up.
I just flashed CWM, but every time I try to boot into CWM, I keep seeing the stock recovery. Why?
If you updated your Android build using an OTA update file (either manually or over-the-air), the update placed two files on your device that re-flash the stock recovery every time you reboot your device. These two files are:
/system/etc/install-recovery.sh <== this is the script that installs the patch file
/system/recovery-from-boot.p <== this is the patch
You have to rename (or delete) one or both of them, then re-flash your custom recovery. Now it will stick.
What is an insecure boot image?
An insecure boot image is one that has root enabled for the shell user (i.e, ADB) by default on boot. This means that if you have booted or flashed an insecure image, when you connect your device to a computer, and open a shell via ADB, you will be userid 0 (or root) without having to "request" root access via the su binary. This makes somethings easier -- for example, you can now use the "remount" command in ADB to mount /system without having to type the full mount command in a shell. (More to add later.)
How do I root?
As was mentioned earlier, you need to place the su binary and the superuser app into the right spots on your device. In order to do this, you need to already have root access. There are two ways: flash a root package in recovery (instructions here), or manually place the files in the appropriate spots (I will add instructions on how to do this at a later time).
Useful Galaxy Nexus Guides and Reference Threads
Useful Galaxy Nexus Guides and Reference Threads
Galaxy Nexus drivers: http://forum.xda-developers.com/showthread.php?t=1379875
Jubakuba Galaxy Nexus guide: http://forum.xda-developers.com/showthread.php?t=1529058
Difference between yakju/takju and the other builds: http://forum.xda-developers.com/showthread.php?t=1728555
How to back up your device using ADB – no root needed: http://forum.xda-developers.com/showthread.php?t=1420351
How to copy files to/from your device using ADB: http://forum.xda-developers.com/showthread.php?t=1869380
How to return your device to Google’s stock images: http://forum.xda-developers.com/showthread.php?t=1626895
How to root: http://forum.xda-developers.com/showpost.php?p=26328017&postcount=123
How to unlock the bootloader WITHOUT root and WITHOUT wiping data: http://forum.xda-developers.com/showthread.php?t=2016628
List of all OTA update files and links, including instructions on how to update: http://forum.xda-developers.com/showthread.php?t=1419170
List of all GSM radios: http://forum.xda-developers.com/showpost.php?p=20569003
List of most GSM RILs: http://forum.xda-developers.com/showpost.php?p=27441945
List of all bootloaders: http://forum.xda-developers.com/showthread.php?t=1587498
List of all toro (i.e., Verizon) radios: http://forum.xda-developers.com/showthread.php?t=1890585
How to unlock your bootloader without wiping data and without being connected to a PC – root required: http://forum.xda-developers.com/showthread.php?t=1731993
How to root without unlocking your bootloader – for builds from 4.0.1 to 4.1.1, : http://forum.xda-developers.com/showthread.php?p=31751966
How to root without unlocking your bootloader – for 4.0.1 and 4.0.2 builds only: http://forum.xda-developers.com/showthread.php?t=1531865
CWM recovery (latest for maguro, toro, toroplus): http://www.clockworkmod.com/rommanager/
CWM recovery (5.5.0.2 for maguro): http://forum.xda-developers.com/showthread.php?t=1357642
CWM recovery (5.5.0.4 for toro): http://forum.xda-developers.com/showthread.php?t=1392336
TWRP recovery (latest for maguro, toro, toroplus): http://forum.xda-developers.com/showthread.php?t=1592689
Edify scripting: How to create recovery-flashable zips: http://forum.xda-developers.com/showthread.php?p=29735133
Odin: How to flash your device if you cannot get into fastboot mode: http://forum.xda-developers.com/showthread.php?t=1586807
OMAP_Flash: How to flash your device if you cannot get into fastboot mode and you cannot get into download mode: http://forum.xda-developers.com/showthread.php?t=1760787
How to compile your own ROM from source: http://forum.xda-developers.com/showthread.php?t=1386615
How to remove a carrier SIM lock (proper method): http://forum.xda-developers.com/showthread.php?t=1606982
How to remove a carrier SIM lock (easy but you will lose you IMEI): http://forum.xda-developers.com/showthread.php?t=1548210
Information on bootloader security: http://forum.xda-developers.com/showthread.php?t=1898664
How to recovery deleted files: http://forum.xda-developers.com/showthread.php?p=34185439
How to nandroid directly to your computer: http://forum.xda-developers.com/showthread.php?t=1818321
reserved 2
reserved 3
purely awesome thread.
Added to bookmarks!
Good!:good::good:
Thanks man, voted 5stars on this. I hope this gets sticky.
:good:
Bravo!
Sent from my Galaxy Nexus using xda premium
great stuff, wish i had such summary when jumped into android!
Sent from my Galaxy Nexus using xda app-developers app
Good work man! I was thinking about doing something similar this weekend but this is much better.
Edit: This needs to be stickied ASAP
Sent from my Galaxy Nexus using xda premium
El Daddy said:
Good work man! I was thinking about doing something similar this weekend but this is much better.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Thanks (to all).
It is far from complete though, and it will be an on-going work-in-progress. It's not as easy to write up general info as it is to write up a step-by-step guide...
Awesome post. This should see a few overwhelmed users right
Top work!
Sent from my Galaxy Nexus using xda app-developers app
Incredibly useful and much needed thread, really well done, efrant. Information desk and referral center for new users. Wish it was here when I came onboard. You should make a "N00b Lighthouse" graphic for it. I think this will help reduce and untangle a lot of the repetitive new-user threads.
Awesome source of information. This needs a sticky ASAP.
Sent from my Galaxy Nexus using xda premium
this is one of the best guides i've seen. great work efrant. i hope this would be stickied for all
toro partitions
Great thread, efrant. Thanks for the effort. I'd love to see this stickied.
You mentioned toro/toroplus having a "radio-cdma" partition. I can't find it; perhaps it is a virtual partition that recovery and the fastboot know about that does not exist separately in storage. Perhaps it's hidden inside another one.
I'd like to contribute the partition list from my "toro" (Verizon Galaxy Nexus) in case is is useful. In addition to the named partitions listed in the OP, there 5 more unnamed ones. I don't know yet what they are used for.
Code:
mtdblock0 - (don't know)
mmcblk0 - (don't know but it looks big; like the entire eMMC)
mmcblk0p1 - xloader
mmcblk0p2 - sbl
mmcblk0p3 - efs
mmcblk0p4 - param
mmcblk0p5 - misc
mmcblk0p6 - dgs
mmcblk0p7 - boot
mmcblk0p8 - recovery
mmcblk0p9 - radio
mmcblk0p10 - system
mmcblk0p11 - cache
mmcblk0p12 - userdata
mmcblk0p13 - metadata
mmcblk0boot1 - (don't know - blank on Galaxy Nexus, but other devices use this)
mmcblk0boot0 - (don't know - blank on Galaxy Nexus, but other devices use this)
I would love to learn more about the bootchain, as I'm sure several of our unknown partitions are involved.
Great job on this efrant, thread has been stickied.
We have too many stickies in general as is so I just added a redirect for it in Q&A.
Damn man. This is fantastic.
Thanks for taking the time!
segv11 said:
Great thread, efrant. Thanks for the effort. I'd love to see this stickied.
You mentioned toro/toroplus having a "radio-cdma" partition. I can't find it; perhaps it is a virtual partition that recovery and the fastboot know about that does not exist separately in storage. Perhaps it's hidden inside another one.
I'd like to contribute the partition list from my "toro" (Verizon Galaxy Nexus) in case is is useful. In addition to the named partitions listed in the OP, there 5 more unnamed ones. I don't know yet what they are used for.
Code:
mtdblock0 - (don't know)
mmcblk0 - (don't know but it looks big; like the entire eMMC)
mmcblk0p1 - xloader
mmcblk0p2 - sbl
mmcblk0p3 - efs
mmcblk0p4 - param
mmcblk0p5 - misc
mmcblk0p6 - dgs
mmcblk0p7 - boot
mmcblk0p8 - recovery
mmcblk0p9 - radio
mmcblk0p10 - system
mmcblk0p11 - cache
mmcblk0p12 - userdata
mmcblk0p13 - metadata
mmcblk0boot1 - (don't know - blank on Galaxy Nexus, but other devices use this)
mmcblk0boot0 - (don't know - blank on Galaxy Nexus, but other devices use this)
I would love to learn more about the bootchain, as I'm sure several of our unknown partitions are involved.
Click to expand...
Click to collapse
Thanks for the correction. Post edited. I wasn't entirely sure (as I don't have a toro or toroplus devices). Based on what I've read, I'm gathering that the LTE radio likely resides on the radio partition, along with the 3G radio.
And yes, I'm pretty sure you are correct: the mmcblk0 is just the entire NAND. Not sure what mmcblk0boot0, mmcblk0boot1 and mtdblock0 are.
I would also like to know more about the boot chain. I will try to do some research as time permits. From what I've read so far (and most of it is from AdamOutler -- see this thread), there is a chip that is not flashable which contains the intial boot program, which then loads the xloader, which in turn loads the sbl (which provides the odin and fastboot interfaces), which then loads the kernel.
..great work efrant, as always.
If I had a dollar for every time this thread gets a link reference in answering questions...
Sent from my Galaxy Nexus using xda premium

problems rooting

I have KFHD 8.9 v8.3. I am having problems getting fastboot working. I have read threads that there are specific "fastboot drivers" and then I have seen other threads where fastboot drivers are a part of the Kindle Fire drivers installed by ...\sdk\extras\amazon\kindle_fire_usb_driver\KindleDrivers.exe. No matter what I do I am unable to get "fastboot -i 0x1949 getvar product" to work. At one point I had it rooted with validation from suchecker, still couldnt get fastboot to work, but factory restored to 8.3 to validate steps and instructions and it is a nogo at the moment.
Any help would be appreciated.
So, is your device rooted or not? Your post in another forum seems to contradict what you are saying here.
Liek Soupmagnet said are you positive that your device has root access? If so, I would try wipe the drivers and start from scratch.
As far as I know and it worked for me, fastboot drivers are loaded when you install Android SDK on your PC. See picture bellow.
However in case you need the fastboot drivers you can download here: https://docs.google.com/folder/d/0B4lZEJI5lYeMdzJobG5jSk9QSEk/edit?pli=1 as referenced here: http://forum.xda-developers.com/showpost.php?p=34589184&postcount=6
These ADB drivers worked for me: http://forum.xda-developers.com/showthread.php?t=1890413
For Kindle drivers and Amazon drivers for Windows 8 (if the case),please take a look here: http://forum.xda-developers.com/showthread.php?t=2185402 however I did need not need them.
Is your Kindle showing up when you type the command ADB Devices cmd/terminal window?
I hope it helps.
soupmaget,
I responded to your PM and I said I would try the SoupKit tonight. Calling me out in forums doesn't help you or me and dont know why you keep doing that. I am trying many things but it boils down to the same specific commands. I have even tried the below downloads manually grabbing the commands and typing them in manually.
Last night I refreshed my env following the amazon tutorials step by step. I finally got root by running Root_with_Restore_by_Bin4ry_v25 twice and then Kindle_Fire_Utility_v0.9.6 rooting via recommended option twice. ADB does work, I can "adb reboot", "adb shell" push files, mv files, etc. SUCheck validates I have root.
When I continue to hashchodes TWRP and 2nd bootloader tutorial it states that "you should have working fastboot drivers" which to me means that there is a separate download/driver to install for it to work. I know fastboot.exe is included in the ADK and tried using the other tools for getting fastboot working but its not working.
I do run these with administrative rights....
D:\android\sdk\platform-tools>adb devices
List of devices attached
B0CA060424841KF0 device
So technically this thread is specific to rooting and can be closed as I am passed rooting now and on to fastboot issue...
rwideman said:
So technically this thread is specific to rooting and can be closed as I am passed rooting now and on to fastboot issue...
Click to expand...
Click to collapse
You are blowing my mind right now with your refusal to be helped. Why are you so hell bent on making this difficult for yourself? You have a $300 device that doesn't work and you're being resistant to someone who can most likely help you get it working again. Why? I don't get it...
From what I gather in your various posts, your device is rooted but you cannot access fastboot via the traditional method of entering "fastboot -i 0x1949 getvar product" in the terminal and powering the device up.
Assuming you have a usb/adb/fastboot connection problem with your Mac, you can use SoupKit, but only in certain VMs. But if you have had a previous connection with either fastboot or adb, that probably isn't the case.
Theres a good chance that you can install the Android Terminal Emulator, enter 'su' to gain root privileges and enter "reboot bootloader". That should boot your device into fastboot so you can enter fastboot commands. But, as I told you before, if there is a usb connection problem, and you cannot send fastboot commands to your device, you will be stuck in fastboot. If you have another non-Mac computer available to you, it would be best to boot it into Linux and install soupkit to make sure that doesn't happen. BTW, that is nearly verbatim to what I told you via the first PM.
Are you looking at the timestamps of my postings? Things change over time....
Did you read my PM response? I will try SoupKit tonight, I mentioned this after you told me to try it.
Thank you for your efforts.
My wife took the MBP for the night so I tried 2 old laptops with win7 x64 on them. copied over files and installed the kindle drivers as normal, got KFHD working with adb and then fastboot sits at the prompt waiting just like on my other env, even installed latest jdk 6 and nogo. I am SOL for the day so I will have a drink or 2 tonight and take one of those old laptops to work and install ubuntu 12.10 tomorrow and try again.
Thanks for the help.
FYI, I tried installing the terminal emu and runing "reboot bootloader" with a few fastboot command tries and nogo. I was able to hold the power button and get it to shut off once I got to fastboot mode.
FYI #2, under my previous env with vmware workstation 9 running unbuntu 12.04 in a vm I could not get fastboot to recognize the device but adb was recognizing it perfectly. Trying native ubuntu tomorrow.
FYI #3, In the professional world it is better to stick to non-psychologist bashing, what someone is and is not doing/thinking/acting, and sticking to the issue at hand. I have been in the IT world for 15 years and troubleshooting is my day job (windows, vmware, SAP, *nix, .net, java, j2ee, storage, UCS, routers, switches, nexus, cloud automation, orchestration, etc). Professionalism frowns upon psychologist speak.
rwideman said:
My wife took the MBP for the night so I tried 2 old laptops with win7 x64 on them. copied over files and installed the kindle drivers as normal, got KFHD working with adb and then fastboot sits at the prompt waiting just like on my other env, even installed latest jdk 6 and nogo. I am SOL for the day so I will have a drink or 2 tonight and take one of those old laptops to work and install ubuntu 12.10 tomorrow and try again.
Thanks for the help.
FYI, I tried installing the terminal emu and runing "reboot bootloader" with a few fastboot command tries and nogo. I was able to hold the power button and get it to shut off once I got to fastboot mode.
FYI #2, under my previous env with vmware workstation 9 running unbuntu 12.04 in a vm I could not get fastboot to recognize the device but adb was recognizing it perfectly. Trying native ubuntu tomorrow.
Click to expand...
Click to collapse
You're most likely looking at a driver issue. You might still be able to get them working in Windows. What did you use to install your drivers? Did you use an install package or did you do it manually?
I think I have the same problem. twrp installed on my device, but no OS running, and it can't be recognized on my computer, said driver incorrect, tried so many times, but can't get adb and fastboot work without driver supported. Don't know how to do.
soupmagnet said:
You're most likely looking at a driver issue. You might still be able to get them working in Windows. What did you use to install your drivers? Did you use an install package or did you do it manually?
Click to expand...
Click to collapse
I used these instructions:
https://developer.amazon.com/sdk/fire/connect-adb.html
using ...\sdk\extras\amazon\kindle_fire_usb_driver\KindleDrivers.exe
I tried a few different driver sets/packages by different places on the XDA threads but they all ended up being the same driver or detected the KDFHD89 exactly the same.
rwideman said:
I used these instructions:
https://developer.amazon.com/sdk/fire/connect-adb.html
using ...\sdk\extras\amazon\kindle_fire_usb_driver\KindleDrivers.exe
I tried a few different driver sets/packages by different places on the XDA threads but they all ended up being the same driver or detected the KDFHD89 exactly the same.
Click to expand...
Click to collapse
When it's in fastboot, do you see anything show up in the device manager?
soupmagnet said:
When it's in fastboot, do you see anything show up in the device manager?
Click to expand...
Click to collapse
Unfortunately no. I haven't had time doing linux with soupkit yet.
I had exactly the.problem still can't get fastboot too see my kindle8.9.
used amrzon driver from sdk.
Adb devices is fine i see the kfhd serial number. .but once use fastboot cmd waiting for device then.never boot in fastboot mode. just boot back to lock screen .This is rooted 8.9 with 8.3 os.
maybe i should do a factory reset.
in order to install a 2nd bootloader and tw-recovery u have to have a rooted kindle hd8.9?
jonahy said:
I had exactly the.problem still can't get fastboot too see my kindle8.9.
used amrzon driver from sdk.
Adb devices is fine i see the kfhd serial number. .but once use fastboot cmd waiting for device then.never boot in fastboot mode. just boot back to lock screen .This is rooted 8.9 with 8.3 os.
maybe i should do a factory reset.
in order to install a 2nd bootloader and tw-recovery u have to have a rooted kindle hd8.9?
Click to expand...
Click to collapse
Yes, you have to be rooted to install the 2nd bootloader and TWRP. I put together the SoupKit so people with driver issues such as yourself can use Linux without much trouble because it is 100 times more reliable than Windows. You should look into it. You can use RootPlus to get root but don't use it to install the 2nd bootloader on 8.3.0 or you will be bricked, likely permanently. But you will be able to use fastboot without any problem to do it manually.
soupkit Folder Empty out
soupmagnet said:
Yes, you have to be rooted to install the 2nd bootloader and TWRP. I put together the SoupKit so people with driver issues such as yourself can use Linux without much trouble because it is 100 times more reliable than Windows. You should look into it. You can use RootPlus to get root but don't use it to install the 2nd bootloader on 8.3.0 or you will be bricked, likely permanently. But you will be able to use fastboot without any problem to do it manually.
Click to expand...
Click to collapse
Hi Thank you for the direction.
I made a Ubuntu 12.10 usbkey booted
then copied ur soupkit folder on desktop Run install.sh ( have to go into permisions check the allow excute)
Run in terminal then terminal show 2 " closed then all the file in soupkit is gone..ha.
didnt see option 1 and 2.
Then i try in Ubuntu termal do abd and fastboot but same as in window 7 KFHD89 just boot into lock screen.
(adb devices it can see devices though
Setting up android-tools-adb (4.1.1+git20120801-1) ...
[email protected]:~$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
B0C9100425160LG8 device)
fastboot not
([email protected]:~$ sudo apt-get install android-tools-fastboot
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
android-tools-fastboot
0 upgraded, 1 newly installed, 0 to remove and 337 not upgraded.
Need to get 48.6 kB of archives.
After this operation, 129 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ quantal/universe android-tools-fastboot i386 4.1.1+git20120801-1 [48.6 kB]
Fetched 48.6 kB in 0s (105 kB/s)
Selecting previously unselected package android-tools-fastboot.
(Reading database ... 161214 files and directories currently installed.)
Unpacking android-tools-fastboot (from .../android-tools-fastboot_4.1.1+git20120801-1_i386.deb) ...
Setting up android-tools-fastboot (4.1.1+git20120801-1) ...
[email protected]:~$ fastboot -i 0x1949 getvar product
< waiting for device >
I was thinking maybe its the Root_with_Restore_by_Bin4ry_v26 mess up somthing? I know my KFHD is rooted it by, but if i load any app need root never show the window ask me if i allow this app in superuser massege.
anyway any tips abot that soupkit Folder Empty out issue?
(just got this tablet last friday, good device so far but put a recovery on it seems a bit harder then my other tablets...But hey I guess thats part of fun too right? )
Thank you in advance.
I think you're confused in how fastboot works. The device must be in fastboot (display says fastboot) in order for fastboot commands to work. There was no need to install android tools. There's a possibility that in doing so you may have made things worse, but we'll see...
Since you have access to adb, try the following command to boot into fastboot:
Code:
adb shell su -c "reboot bootloader"
This, of course, assumes your device is already rooted.
[Edit:] Also, to access Root Plus after installation, enter "rootplus" (without quotes) in the terminal.
Installed 2ND-BOOTLOADER
soupmagnet said:
I think you're confused in how fastboot works. The device must be in fastboot (display says fastboot) in order for fastboot commands to work. There was no need to install android tools. There's a possibility that in doing so you may have made things worse, but we'll see...
Since you have access to adb, try the following command to boot into fastboot:
Code:
adb shell su -c "reboot bootloader"
This, of course, assumes your device is already rooted.
[Edit:] Also, to access Root Plus after installation, enter "rootplus" (without quotes) in the terminal.
Click to expand...
Click to collapse
Great! Got Installed the 2nd bootloader and recovery .
adb shell su -c "reboot bootloader" boot device to fastboot mode.
thanks a lot! SoupMagnet.
Share steps:
D:\sdk\sdk\platform-tools>adb devices
List of devices attached
B0C9100425160LG8 device
D:\sdk\sdk\platform-tools>adb shell su -c "reboot bootloader"
D:\sdk\sdk\platform-tools>fastboot -i 0x1949 getvar product
product: Jem-PVT-Prod-04
finished. total time: 0.006s
D:\sdk\sdk\platform-tools>fastboot -i 0x1949 reboot
rebooting...
finished. total time: 0.003s
D:\sdk\sdk\platform-tools>adb shell su -c "dd if=/dev/block/platform/omap/omap_h
smmc.1/by-name/boot of=/sdcard/stock-boot.img"
16384+0 records in
16384+0 records out
8388608 bytes transferred in 0.939 secs (8933554 bytes/sec)
D:\sdk\sdk\platform-tools>adb shell su -c "dd if=/dev/block/platform/omap/omap_h
smmc.1/by-name/recovery of=/sdcard/stock-recovery.img"
16384+0 records in
16384+0 records out
8388608 bytes transferred in 0.937 secs (8952623 bytes/sec)
D:\sdk\sdk\platform-tools>adb shell su -c "dd if=/dev/block/platform/omap/omap_h
smmc.1/by-name/system of=/sdcard/stock-system.img"
1814528+0 records in
1814528+0 records out
929038336 bytes transferred in 116.782 secs (7955321 bytes/sec)
D:\sdk\sdk\platform-tools>adb pull /sdcard/stock-boot.img
2794 KB/s (8388608 bytes in 2.931s)
D:\sdk\sdk\platform-tools>adb pull /sdcard/stock-recovery.img
3008 KB/s (8388608 bytes in 2.723s)
D:\sdk\sdk\platform-tools>adb pull /sdcard/stock-system.img
3004 KB/s (929038336 bytes in 301.978s)
D:\sdk\sdk\platform-tools>adb push stack /data/local/tmp/
571 KB/s (4096 bytes in 0.007s)
D:\sdk\sdk\platform-tools>adb shell su -c "dd if=/data/local/tmp/stack of=/dev/b
lock/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"
0+1 records in
0+1 records out
4096 bytes transferred in 0.001 secs (4096000 bytes/sec)
D:\sdk\sdk\platform-tools>adb shell su -c "mount -o remount,rw ext4 /system"
D:\sdk\sdk\platform-tools>adb shell su -c "mv /system/etc/install-recovery.sh /s
ystem/etc/install-recovery.sh.bak"
D:\sdk\sdk\platform-tools>adb shell su -c "mount -o remount,ro ext4 /system"
D:\sdk\sdk\platform-tools>fastboot -i 0x1949 flash bootloader kfhd8-u-boot-prod-
8.1.4.bin
< waiting for device >
target reported max download size of 1006632960 bytes
sending 'bootloader' (243 KB)...
OKAY [ 0.026s]
writing 'bootloader'...
OKAY [ 0.045s]
finished. total time: 0.075s
D:\sdk\sdk\platform-tools>fastboot -i 0x1949 flash boot kfhd8-freedom-boot-8.3.0
.img
target reported max download size of 1006632960 bytes
sending 'boot' (8173 KB)...
OKAY [ 0.455s]
writing 'boot'...
OKAY [ 0.567s]
finished. total time: 1.030s
D:\sdk\sdk\platform-tools>fastboot -i 0x1949 flash recovery kfhd8-twrp-2.4.4.0-r
ecovery.img
target reported max download size of 1006632960 bytes
sending 'recovery' (8173 KB)...
OKAY [ 0.454s]
writing 'recovery'...
OKAY [ 0.567s]
finished. total time: 1.029s
D:\sdk\sdk\platform-tools>fastboot -i 0x1949 reboot
rebooting...
finished. total time: 0.004s
D:\sdk\sdk\platform-tools>
FIXED
soupmagnet,
Finally had time to install ubuntu 12.10 on my laptop. I used soupkit for KFHD89 and root-plus from the same posting you had. This worked like a charm. rootplus' version of the play store actually worked compared to other versions I had installed, same for youtube and a few other google apps.
I will toy with TWRP tomorrow. Just glad I got normal google apps installed now.

ADB help

By Hashcode, Senior Recognized Developer on 1st February 2013, 10:57 AM over 5 years ago
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
with that being said here is what happens, i can see adb is working
C:\adb>adb devices
List of devices attached
B0CC060324930545 device
C:\adb>adb shell su -c "dd if=/dev/block/mmcblk0boot0 of=/sdcard/boot0block.img"
/system/bin/sh: su: not found
C:\adb>
I could go on on but, that would be more gibberish.
So, what is wrong? Did the commands change? Is my path set wrong on my pc? Is there a updated thread i just have not come across yet? Anyone?
I'll thank you now for any help
Nothing changed. If you get the device to show up with the adb devices command, then everything's theoretically set up. The only reason you're getting an error with su not being found is that you aren't rooted. Here's a quick way to get root (like actually super simple, considering you already have ADB working):
1) download the attached 8.1.4 bootloader file (this is ripped straight from my Kindle before I "upgraded" to 8.5.1 to test this out). you may consider placing it in the same folder as the adb program. Also download SuperSU and the latest TWRP build for this device.
2) shut down the kindle and make sure it's plugged in.
3) run fastboot -i 0x1949 getvar product, then power the kindle on. when you see "fastboot mode" on the kindle, you should see something in the command prompt that begins with "Jem". if you do, then it's working.
4) type fastboot -i 0x1949 flash bootloader jem_8-1-4_bootloader.img to flash the 8.1.4 bootloader. this is ESSENTIAL because the kindle won't boot custom (unsigned) images otherwise. more explanation below...
5) next, type fastboot -i 0x1949 flash recovery twrp.img, where twrp.img is the file name of the TWRP image you downloaded earlier.
6) type fastboot -i 0x1949 oem recovery to kick the Kindle into recovery mode. if all goes well, you should see "TWRP" on your device after a few moments.
7) copy the SuperSU zip you downloaded to the kindle's internal storage. then on the kindle, tap Install. Next, on the side menu to the left, swipe up from the bottom and tap "sdcard" (referring to the internal storage that you see on the computer when the kindle's plugged in). Tap the SuperSU .zip, and then swipe where indicated. Feel free to reboot the system, and then voila, you're rooted. You should be able to run those backup commands. As a bonus, you won't have to download TWRP or the bootloader image from that virus-laden d-h.st site - avoid it like the plague.
8) Because TWRP's already flashed, you can type adb reboot recovery from the stock OS to begin flashing a new ROM right away.
A couple side notes...
1) Because you've flashed TWRP, a custom recovery, there is no need whatsoever to run the stock recovery backup command. It's already been overwritten, and if you really need it (which, again, is highly doubted because it only lets you run a factory reset), you can actually extract the recovery image from the system partition. Just run adb pull /system/recovery-prod.img stock-recovery.img instead of the adb shell su... stock-recovery.img one.
2) You have to flash the 8.1.4 bootloader because the one you currently have is more than likely a newer version. Custom ROMs (and even recoveries like TWRP) rely on an exploit in the 8.1.4 bootloader in order to trick the device into running the image (and newer bootloaders have this exploit patched already). So technically, because the exploit has to be run every time, the bootloader is never "unlocked" - merely tricked. Without the older bootloader in place, you get what is referred to as the "red screen of death". It's not pretty, but it's not permanent either. (Just power off the kindle, and then run the fastboot command involving "getvar product" to get it to the bootloader so you can flash the 8.1.4 bootloader and go forward.)
Hope this helps!

Categories

Resources