Advanced Information about the Desire - Desire Q&A, Help & Troubleshooting

I will try to include certain advanced commands and details about the HTC Desire in a bid to maintain a useful information repertoire for debugging..
Adb premier:
ADB Quick Reference
Advanced adb commands for displaying information about the Desire:
A lot of useful information can be obtained as a list with the following command:
Code:
cat /proc/cmdline
MID of the device
This identifies the device with a particular code which is unique for the phone:
Code:
cat /proc/cmdline|grep -o mid=[A-Za-z0-9]*|sed 's/mid=//'
It is PB9920000 for the Desire
2. Size and Erase size of MTDs
Code:
[B]cat /proc/mtd[/B]
This will display info like:
dev: size erasesize name
mtd0: 000a0000 00020000 "misc"
mtd1: 00480000 00020000 "recovery"
mtd2: 00300000 00020000 "boot"
mtd3: 0fa00000 00020000 "system"
mtd4: 02800000 00020000 "cache"
mtd5: 093a0000 00020000 "userdata"
Click to expand...
Click to collapse
This command can be seen in conjunction with the above:
Code:
cat /proc/partitions
Displays a list of all partitions on your device, along with the ? block address
major minor #blocks name
31 0 640 mtdblock0
31 1 4608 mtdblock1
31 2 3072 mtdblock2
31 3 256000 mtdblock3
31 4 40960 mtdblock4
31 5 151168 mtdblock5
179 0 15558144 mmcblk0
179 1 13161472 mmcblk0p1
179 2 2395136 mmcblk0p2
Click to expand...
Click to collapse
3. Bootloader version
Code:
cat /proc/cmdline|grep -o bootloader=[0-9.]*|sed 's/bootloader=//'
4. Now, the important CID of your device:
Code:
cat /proc/cmdline|grep -o cid=[A-Za-z0-9_]*|sed 's/cid=//'
This displays a code like HTC__038. HTC__038 is the code for India
Kernel version information:
Code:
cat /proc/version
Eg:
cat /proc/version
Code:
Linux version 2.6.35.10-g3f43272 ([v06]-snq-is-still) (gcc version 4.4.0 (GCC) )
#1 PREEMPT Tue Jun 14 21:11:23 CST 2011
[More being added]
Make Nandroid Backups (Recovery backups) without rebooting to recovery (on a booted up phone):
See my thread here
Credits:
Alpharev Team for their advanced S-off scripts (Many of these commands can be found in their script)

Nice infos as usual..
U could link also this thread (still in my bookmarks )
I like to know this kinds of things

andQlimax said:
Nice infos as usual..
U could link also this thread (still in my bookmarks )
I like to know this kinds of things
Click to expand...
Click to collapse
Thanks. I've added the link to OP.
There's a lot more stuff that I'd like to add.. Time's an issue..

Adb Commands Quick Reference
ADB (android debug bridge) Commands Quick Review Guide:
Source: Here
With the adb command you can communicate with connected android devices and emulators.
Note: Windows and Linux users may require USB drivers for certain devices.
To list all connected devices:
adb devices
List of devices attached
HT093H5031X5 device
if you have trouble seeing all the devices (especially avds) use the following command to kill the local adb server:
adb kill-server
and then run adb devices again to restart the local adb server:
adb devices
List of devices attached
HT093H5031X5 device
emulator-5554 device
emulator-5556 device
You can install apks to a currently connected device with the adb command:
(useful for devices that do not allow installing from an sd card)
adb install myapp.apk
If you have more than one device connected specify if it's a device or an emulator using -d or -e for example:
adb -d install myapp.apk
If you have more than one emulator or more than one device, specify the serial number:
adb -s HT093H503195 install myapp.apk
To uninstall an application you do not specify the apk file but the package name:
adb uninstall my.package.name
To view package name, permissions, and features that an apk uses:
aapt dump badging myapp.apk
To run an application using adb you must specify the activity you wish to start:
adb shell am start -a android.intent.action.MAIN -n my.package.name/my.package.name.MyActivity
To view the running log from the device:
adb logcat
you can subsequently save the logs to a local file:
adb logcat > out.txt
To copy files to and from a device use adb push and adb pull for example:
adb push myfile.zip /mnt/sdcard/update.zip
You can also boot into the bootloader (for installing new roms) using adb:
adb reboot-bootloader

Related

Is there an easy way to unpack system.img and modify it?

I am using ubuntu 12.04.
I am trying following step.
1. compile yaffs2 kernel module and insmod yaffs2multi.ko
2. Simulate NAND
sudo modprobe mtd
sudo modprobe mtdblock
# Simulate a 1024MB 2048-byte erase-block sized MTD device backed by a file on disk,
sudo modprobe nandsim first_id_byte=0xec second_id_byte=0xd3 third_id_byte=0x51 fourth_id_byte=0x95
cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00020000 "mtdram test device"
mtd1: 40000000 00020000 "NAND simulator partition 0"
3. dd if=./system.img of=/dev/mtdblock1
4. mount sytem.img
mount -t yaffs2 /dev/mtdblock1 /tmp/system
ls /tmp/system/
lost+found
But there are no files in /tmp/system/.
What's wrong?
Is there an easy way to unpack system.img and modify it?

[Q] Please help me with 2nd-Bootloader/Recovery unlock process for KFire 2

Hello
I'm having problems following the post [BOOTLOADER] 2nd-Bootloader/Recovery unlock process for KFire 2 [TWRP 2.6.3.0]
I tried several ways during several days but I'm totally stuck, I don't know what i should do more. My KF is 10.5.0, from 2012, not HD, without camera, so I'm sure that is KF2, second generation. And I'm working with Mac OSx.
Here what i did;
STEP 1. Backup your stock partitions to your own HD for later if you need disaster recovery >>> i cannot make it
myname-MacBook-Pro:~ myname$ adb pull /dev/block/mmcblk0boot0 failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
So i didn't make backup and go direct to STEP 2 and 3.
I placed all the files on my device in the sdcard area.
STEP 3. Install the stack override in /system: It looked it worked, i used factory cable;
myname-MacBook-Pro:~ myname$ adb push stack/download
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.
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 priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
Silvia-Kozakura-no-MacBook-Pro:~ silviakozakura$ adb shell su -c "dd if=/sdcard/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"
And then the STEP 4, where I'm stuck "Flash the OLD bootloader, new otter2-freedom-boot.img and TWRP recovery" I used factory cable to enter in Fastboot mode but always i get this error;
myname-MacBook-Pro:~ myname$ fastboot -i 0x1949 flash bootloader otter2-u-boot-prod-10.2.4.bin
error: cannot load 'otter2-u-boot-prod-10.2.4.bin'
- Cannot load any file, I put all the files at sdcard/download, I don't know what i did wrong.
I'm willing to pay money to who will help me.
KindleRooteado said:
Hello
I'm having problems following the post [BOOTLOADER] 2nd-Bootloader/Recovery unlock process for KFire 2 [TWRP 2.6.3.0]
I tried several ways during several days but I'm totally stuck, I don't know what i should do more. My KF is 10.5.0, from 2012, not HD, without camera, so I'm sure that is KF2, second generation. And I'm working with Mac OSx.
Here what i did;
STEP 1. Backup your stock partitions to your own HD for later if you need disaster recovery >>> i cannot make it
myname-MacBook-Pro:~ myname$ adb pull /dev/block/mmcblk0boot0 failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
So i didn't make backup and go direct to STEP 2 and 3.
I placed all the files on my device in the sdcard area.
STEP 3. Install the stack override in /system: It looked it worked, i used factory cable;
myname-MacBook-Pro:~ myname$ adb push stack/download
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.
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 priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
Silvia-Kozakura-no-MacBook-Pro:~ silviakozakura$ adb shell su -c "dd if=/sdcard/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"
And then the STEP 4, where I'm stuck "Flash the OLD bootloader, new otter2-freedom-boot.img and TWRP recovery" I used factory cable to enter in Fastboot mode but always i get this error;
myname-MacBook-Pro:~ myname$ fastboot -i 0x1949 flash bootloader otter2-u-boot-prod-10.2.4.bin
error: cannot load 'otter2-u-boot-prod-10.2.4.bin'
- Cannot load any file, I put all the files at sdcard/download, I don't know what i did wrong.
I'm willing to pay money to who will help me.
Click to expand...
Click to collapse
You have to keep the files on your PC, not the Kindle. Execute the commands from where you kept the files. I'll write you a full tutorial when I have time.
Sent from my device running CyanogenMod 11
SafinWasi said:
You have to keep the files on your PC, not the Kindle. Execute the commands from where you kept the files. I'll write you a full tutorial when I have time.
Sent from my device running CyanogenMod 11
Click to expand...
Click to collapse
That makes sense, thank you! I will try
Well, now I don't understand anything, I'm making the same i did yestarday but without the same results, with different errors.
I've relocated the factory settings in KF and I checked if the root is ok.
So now says;
STEP 1. Backup
myname-no-MacBook-Pro:~ myname$ adb pull /dev/block/mmcblk0boot0
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: device not found
STEP 3. Install the stack override in /system
myname-no-MacBook-Pro:~ myname$ adb push stack/download
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.
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 priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
myname-no-MacBook-Pro:~ myname$ adb shell su -c "dd if=/sdcard/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"error: device not found
myname-no-MacBook-Pro:~ myname$ adb shell su -c "dd if=/download/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"
error: device not found
myname-no-MacBook-Pro:~ myname$ adb shell su -c "dd if=/download/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"
error: device not found
I tryed to run "stack" placed on sdcard of the device and placed on my computer, nothing worked.
I think is better don't do anything else, i will wait for help...
KindleRooteado said:
Well, now I don't understand anything, I'm making the same i did yestarday but without the same results, with different errors.
I've relocated the factory settings in KF and I checked if the root is ok.
So now says;
(post edited due to large size_
I tryed to run "stack" placed on sdcard of the device and placed on my computer, nothing worked.
I think is better don't do anything else, i will wait for help...
Click to expand...
Click to collapse
Okay,first off,download the files to your PC,not the Kindle. Connect the Kindle to your PC with USB debugging enabled. Then,open a command window and cd to the directory where you kept the files.
Now issue the following commands to backup partitions:
Code:
adb pull /dev/block/mmcblk0boot0
adb pull /dev/block/platform/omap/omap_hsmmc.1/by-name/boot
adb pull /dev/block/platform/omap/omap_hsmmc.1/by-name/recovery
adb pull /dev/block/platform/omap/omap_hsmmc.1/by-name/system
Note:If you get "permission denied" error,use the following command:
Code:
adb remount
If you still get the error,ensure that you have root.
Next,install the stack override:
Code:
adb push stack /sdcard/
adb shell su -c "dd if=/sdcard/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"
And flash the old bootloader with 2nd bootloader and Team Win Recovery: (use factory cable to boot into fastboot)
Code:
fastboot -i 0x1949 flash bootloader otter2-u-boot-prod-10.2.4.bin
fastboot -i 0x1949 flash boot otter2-freedom-boot-10.4.6.img
fastboot -i 0x1949 flash recovery otter2-twrp-2.6.3.0-recovery.img
fastboot -i 0x1949 reboot
SafinWasi said:
Okay,first off,download the files to your PC,not the Kindle. Connect the Kindle to your PC with USB debugging enabled. Then,open a command window and cd to the directory where you kept the files.
Now issue the following commands to backup partitions:
Code:
adb pull /dev/block/mmcblk0boot0
adb pull /dev/block/platform/omap/omap_hsmmc.1/by-name/boot
adb pull /dev/block/platform/omap/omap_hsmmc.1/by-name/recovery
adb pull /dev/block/platform/omap/omap_hsmmc.1/by-name/system
Note:If you get "permission denied" error,use the following command:
Code:
adb remount
If you still get the error,ensure that you have root.
Next,install the stack override:
Code:
adb push stack /sdcard/
adb shell su -c "dd if=/sdcard/stack of=/dev/block/platform/omap/omap_hsmmc.1/by-name/system bs=6519488 seek=1"
And flash the old bootloader with 2nd bootloader and Team Win Recovery: (use factory cable to boot into fastboot)
Code:
fastboot -i 0x1949 flash bootloader otter2-u-boot-prod-10.2.4.bin
fastboot -i 0x1949 flash boot otter2-freedom-boot-10.4.6.img
fastboot -i 0x1949 flash recovery otter2-twrp-2.6.3.0-recovery.img
fastboot -i 0x1949 reboot
Click to expand...
Click to collapse
Hello, I really appreciate your help. I followed your instructions but I'm still stuck... I got:
Permission denied
remount failed: Operation not permitted
And Superuser is enabled for sure.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

			
				
Can you try mounting system from ES file explorer?
Sent from my device running CyanogenMod 11
SafinWasi said:
Can you try mounting system from ES file explorer?
Sent from my device running CyanogenMod 11
Click to expand...
Click to collapse
thanks, i will do tomorrow
Still doesn't work... I mounted system with ES file explorer and after I tried again to do the backup:
Code:
Last login: Sat Sep 6 09:24:20 on console
myname-no-MacBook-Pro:~ myname$ cd desktop
myname-no-MacBook-Pro:desktop myname$ adb pull /dev/block/mmcblk0boot0
failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
myname-no-MacBook-Pro:desktop myname$ ./adb pull /dev/block/mmcblk0boot0
-bash: ./adb: No such file or directory
myname-no-MacBook-Pro:desktop myname$ adb remount
remount failed: Operation not permitted
myname-no-MacBook-Pro:desktop myname$ ./adb remount
-bash: ./adb: No such file or directory
myname-no-MacBook-Pro:desktop myname$
KindleRooteado said:
Still doesn't work... I mounted system with ES file explorer and after I tried again to do the backup:
Code:
Last login: Sat Sep 6 09:24:20 on console
myname-no-MacBook-Pro:~ myname$ cd desktop
myname-no-MacBook-Pro:desktop myname$ adb pull /dev/block/mmcblk0boot0
failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
myname-no-MacBook-Pro:desktop myname$ ./adb pull /dev/block/mmcblk0boot0
-bash: ./adb: No such file or directory
myname-no-MacBook-Pro:desktop myname$ adb remount
remount failed: Operation not permitted
myname-no-MacBook-Pro:desktop myname$ ./adb remount
-bash: ./adb: No such file or directory
myname-no-MacBook-Pro:desktop myname$
Click to expand...
Click to collapse
Ok,try running "adb root" and then issue the commands
I think where can be my mistake. When I installed the android sdk adb I never got the list of my devices, my KF2 didn't appear, but i didn't think that was so important...
Then i thought that i didn't need to do anything else to connect the Kindle to my computer with USB debugging enabled, sorry. Now I'm trying to do USB debugging enabled following this guide: https://developer.amazon.com/appsan...etting-up-your-kindle-fire-tablet-for-testing
And again I'm stuck. I don't understand the meaning of this errors, any idea? I'm working with mac OSX, no Windows PC available in 10.424 Km...
Code:
myname-no-MacBook-Pro:SDK tools myname$
myname-no-MacBook-Pro:SDK tools myname$ ./android update adb
Unable to access jarfile /Users/myname/desktop/SDK tools/archquery.jar
Unable to access jarfile /Users/myname/desktop/SDK tools/archquery.jar
Exception in thread "Thread-1" java.lang.NoClassDefFoundError: com/android/utils/ILogger
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
SafinWasi said:
Ok,try running "adb root" and then issue the commands
Click to expand...
Click to collapse
I'm a really pain, sorry.
I guest i cannot run any adb command until l fix the USB debugging enabled.
Code:
myname-no-MacBook-Pro:desktop myname$ adb root
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
adbd cannot run as root in production builds
I think i finally enabled USB debugging, but I'm not sure. I have made ​​my device appears in the list, but the other .adb commands are not working still. The fact that my device appears in the list is a good sign or not?
Code:
myname-no-MacBook-Pro:desktop myname$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
D026A0A02494022P device
myname-no-MacBook-Pro:desktop myname$ adb pull /dev/block/mmcblk0boot0
failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
myname-no-MacBook-Pro:desktop myname$ adb remount
remount failed: Operation not permitted
myname-no-MacBook-Pro:desktop myname$ adb root
adbd cannot run as root in production builds
myname-no-MacBook-Pro:desktop myname$
KindleRooteado said:
I think i finally enabled USB debugging, but I'm not sure. I have made ​​my device appears in the list, but the other .adb commands are not working still. The fact that my device appears in the list is a good sign or not?
Code:
myname-no-MacBook-Pro:desktop myname$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
D026A0A02494022Pdevice
myname-no-MacBook-Pro:desktop myname$ adb pull /dev/block/mmcblk0boot0
failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
myname-no-MacBook-Pro:desktop myname$ adb remount
remount failed: Operation not permitted
myname-no-MacBook-Pro:desktop myname$ adb root
adbd cannot run as root in production builds
myname-no-MacBook-Pro:desktop myname$
Click to expand...
Click to collapse
Its definitely a good sign. I'll keep digging.
Sent from my device running CyanogenMod 11
---------- Post added at 08:43 PM ---------- Previous post was at 08:39 PM ----------
OK,found something. Try this:
Code:
adb shell su -c "dd if=/dev/block/mmcblk0boot0 of=/sdcard/boot0block.IMG"
adb pull /Edvard/boot0block.IMG
Try this with other commands as well. And if it prompts SuperSU,say grant.
Sent from my device running CyanogenMod 11
SafinWasi said:
Its definitely a good sign. I'll keep digging.
Sent from my device running CyanogenMod 11
---------- Post added at 08:43 PM ---------- Previous post was at 08:39 PM ----------
OK,found something. Try this:
Code:
adb shell su -c "dd if=/dev/block/mmcblk0boot0 of=/sdcard/boot0block.IMG"
adb pull /Edvard/boot0block.IMG
Try this with other commands as well. And if it prompts SuperSU,say grant.
Sent from my device running CyanogenMod 11
Click to expand...
Click to collapse
Thank you very much again. The first command works, it asked me to grant SuperSu and i did, but nothing else.
Is Edvard/boot0block.IMG a file i have to download?
Code:
myname-no-MacBook-Pro:~ myname$ cd desktop
myname-no-MacBook-Pro:desktop myname$ adb shell su -c "dd if=/dev/block/mmcblk0boot0 of=/sdcard/boot0block.IMG"
4096+0 records in
4096+0 records out
2097152 bytes transferred in 0.459 secs (4568958 bytes/sec)
myname-no-MacBook-Pro:desktop myname$ adb pull /Edvard/boot0block.IMG
[B]remote object '/Edvard/boot0block.IMG' does not exist
[/B]myname-no-MacBook-Pro:desktop myname$ adb pull /dev/block/mmcblk0boot0
failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
myname-no-MacBook-Pro:desktop myname$
Why it's so complicated?
KindleRooteado said:
Thank you very much again. The first command works, it asked me to grant SuperSu and i did, but nothing else.
Is Edvard/boot0block.IMG a file i have to download?
Code:
myname-no-MacBook-Pro:~ myname$ cd desktop
myname-no-MacBook-Pro:desktop myname$ adb shell su -c "dd if=/dev/block/mmcblk0boot0 of=/sdcard/boot0block.IMG"
4096+0 records in
4096+0 records out
2097152 bytes transferred in 0.459 secs (4568958 bytes/sec)
myname-no-MacBook-Pro:desktop myname$ adb pull /Edvard/boot0block.IMG
[B]remote object '/Edvard/boot0block.IMG' does not exist
[/B]myname-no-MacBook-Pro:desktop myname$ adb pull /dev/block/mmcblk0boot0
failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
myname-no-MacBook-Pro:desktop myname$
Why it's so complicated?
Click to expand...
Click to collapse
Lol,it should be:
adb pull /sdcard/boot0block.img
SafinWasi said:
Lol,it should be:
adb pull /sdcard/boot0block.img
Click to expand...
Click to collapse
Lol, I am about to give up.
The last command that you give me worked but again I couldn't make backup, cause i got the same error.
Silvia-Kozakura-no-MacBook-Pro:~ silviakozakura$ adb pull /sdcard/boot0block.img6366 KB/s (2097152 bytes in 0.321s)
So, i had the brilliant idea to skip that step and go ahead to install the stack and then to flash bootloader.
And now I'm stuck at the second command, my computer is sending 'boot' for 40 minutes, not sure if this is normal, but i suppose it is not...
I'm going to sleep, tomorrow i will see what to do or not. Thanks for your time.
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ adb pull /sdcard/boot0block.img
6245 KB/s (2097152 bytes in 0.327s)
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ adb pull /dev/block/mmcblk0boot0
failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ adb push stack /sdcard/
204 KB/s (4096 bytes in 0.019s)
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ adb shell su -c "dd if=/sdcard/stack of=/dev/block/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.002 secs (2048000 bytes/sec)
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ fastboot -i 0x1949 flash bootloader otter2-u-boot-prod-10.2.4.bin
sending 'bootloader' (227 KB)...
OKAY [ 0.129s]
writing 'bootloader'...
OKAY [ 0.057s]
finished. total time: 0.186s
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ fastboot -i 0x1949 flash boot otter2-freedom-boot-10.4.6.img
sending 'boot' (8153 KB)...
KindleRooteado said:
Lol, I am about to give up.
The last command that you give me worked but again I couldn't make backup, cause i got the same error.
Silvia-Kozakura-no-MacBook-Pro:~ silviakozakura$ adb pull /sdcard/boot0block.img6366 KB/s (2097152 bytes in 0.321s)
So, i had the brilliant idea to skip that step and go ahead to install the stack and then to flash bootloader.
And now I'm stuck at the second command, my computer is sending 'boot' for 40 minutes, not sure if this is normal, but i suppose it is not...
I'm going to sleep, tomorrow i will see what to do or not. Thanks for your time.
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ adb pull /sdcard/boot0block.img
6245 KB/s (2097152 bytes in 0.327s)
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ adb pull /dev/block/mmcblk0boot0
failed to copy '/dev/block/mmcblk0boot0' to './mmcblk0boot0': Permission denied
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ adb push stack /sdcard/
204 KB/s (4096 bytes in 0.019s)
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ adb shell su -c "dd if=/sdcard/stack of=/dev/block/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.002 secs (2048000 bytes/sec)
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ fastboot -i 0x1949 flash bootloader otter2-u-boot-prod-10.2.4.bin
sending 'bootloader' (227 KB)...
OKAY [ 0.129s]
writing 'bootloader'...
OKAY [ 0.057s]
finished. total time: 0.186s
Silvia-Kozakura-no-MacBook-Pro:desktop silviakozakura$ fastboot -i 0x1949 flash boot otter2-freedom-boot-10.4.6.img
sending 'boot' (8153 KB)...
Click to expand...
Click to collapse
What the… it should not ta take more than 10 seconds
Sent from my device running CyanogenMod 11
Hi, i was trying to to restore my kindle to 10.2.3 firmware cause i was told that it was the only way to flash a new rom and something didn't work.
Now shows this red triangle all the time. I cannot reboot, restore and my computer doesn't recognizes it.
Please help me, what i can do.
(It can enter to fastboot)

Lauch App per adb (no root)

Hello,
I would like to start an app installed on a non rooted fire tv (generic solution, and as an example for xbmc) by adb. I found some examples, which all don't work... (I am able to start the adb shell and launch other commands...)
eg:
Code:
am start -a android.intent.action.MAIN -n org.xbmc.xbmc/android.app.NativeActivity
returns
Code:
Error type 3
Error: Activity class {org.xbmc.xbmc/android.app.NativeActivity} does not exist
.
Is this not possible on non rooted fire tv's?
Or do I just use a wrong syntax?
I am working on some remote conrtrol options, so launchers are not a solution for me.
Thanks for support.
adb shell am start -n org.xbmc.xbmc/.Splash
Kramar111 said:
adb shell am start -n org.xbmc.xbmc/.Splash
Click to expand...
Click to collapse
Works, thanks a lot!
Is there any way to get this for other apps out of the system?
eg: if I want to start netflix the same way, can I get the parameters from anywhre in the system or is "google my friend""?
with aapt (part of Android SDK):
run
Code:
aapt dump badging name.apk
and search line "launchable-activity"
or in GNU/Linux run
Code:
./aapt dump badging name.apk | grep "launchable-activity"
Kramar111 said:
with aapt (part of Android SDK):
run
Code:
aapt dump badging name.apk
and search line "launchable-activity"
or in GNU/Linux run
Code:
./aapt dump badging name.apk | grep "launchable-activity"
Click to expand...
Click to collapse
adb shell am start -n ir.hamgam.mobile/.Splash
for doesn't work plz help me

size partition for BoardConfig.mk

Hi
this is from the BoardConfig.mk
Code:
# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_FLASH_BLOCK_SIZE := 131072
I want to find the actual size partition adb shell cat /proc/mtd" or "adb shell cat /proc/emmc" or "adb shell cat /proc/dumchar_info" doesn't work !
Steps:
*root your device;
*install TWRP or CWM for your device ;
*install busybox tools ( Busybox Free Goolge Play);
After this, enter to recovery mode. Mount /system into TWRP or CWM.
Plug USB cabe, and in your computer input these commands:
adb devices --> verify if device is connected
Now, install parted into /system/bin:
adb push <path-to-file>/parted /system/bin
Now, insert this command:
parted /dev/block/mmcblk0 unit B print
The output is similar :
Code:
~ # parted /dev/block/mmcblk0 unit B print
Model: MMC 008GE0 (sd/mmc)
Disk /dev/block/mmcblk0: 7818182656B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194304B 6291455B 2097152B MRD
2 6291456B 8388607B 2097152B MRD_BK
3 8388608B 10485759B 2097152B MEP2
4 10485760B 31457279B 20971520B ext4 EFS
5 31457280B 46137343B 14680064B Reserved
6 46661632B 48234495B 1572864B LOKE_2ND
7 48758784B 50331647B 1572864B LOKE_1ST
8 50331648B 67108863B 16777216B PARAM
9 67108864B 83886079B 16777216B RECOVERY
10 83886080B 100663295B 16777216B KERNEL
11 100663296B 125829119B 25165824B MODEM
12 125829120B 142606335B 16777216B ext4 NVM
13 142606336B 352321535B 209715200B ext4 HIDDEN
14 352321536B 713031679B 360710144B ext4 CACHE
15 713031680B 2307915775B 1594884096B ext4 SYSTEM
16 2307915776B 7817134079B 5509218304B ext4 USER
Use the column size to fill in the BoardConfig values.
The first column it refers to the mount point.
Ex.: the kernel partition has 16.777.216 bytes mounted in /dev/block/mmcblk0p10
Links references:
http://forum.xda-developers.com/showthread.php?t=2450045
http://stackoverflow.com/questions/...ormation-for-android-device/15639867#15639867
http://forum.xda-developers.com/attachment.php?attachmentid=2397268&d=1384688569
naufragoweb said:
Now, install parted into /system/bin:
adb push <path-to-file>/parted /system/bin
Click to expand...
Click to collapse
Path to.. what file?
Nicofisi said:
Path to.. what file?
Click to expand...
Click to collapse
Path to the "parted" file in your PC

How Can I Extract The Recovery Image Over adb?

How can I extract the recovery image from my phone over adb?
I was thinking something like
Code:
adb pull /dev/block/mmcblkXXX recovery.img
However, I can't work out which is the recovery.
Code:
[email protected]:/ # cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00001000 "w25q80"
[email protected]:/ #
Note: I'm only interested in adb and not via custom recovery or other apps on the phone.
It seems like I wasn't searching hard enough!
The "by-name" file was a level down further than expected and I didn't spot it initially when browsing.
Code:
1|[email protected]:/ # find /dev/block/ -name by-name
/dev/block/platform/omap/omap_hsmmc.0/by-name
Code:
[email protected]:/ # ls -l /dev/block/platform/omap/omap_hsmmc.0/by-name|grep recovery
lrwxrwxrwx root root 2017-01-20 04:46 recovery -> /dev/block/mmcblk0p8
[email protected]:/ # exit
~ $ adb pull /dev/block/mmcblk0p8 recovery.img

Categories

Resources