Jump to content

Welcome to CyanogenMod

Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

Rooting stock Tattoo: su: permission denied


  • Please log in to reply
9 replies to this topic

#1 mkwan

mkwan
  • Members
  • 4 posts
  • Device Model:
    HTC Tattoo
  • CM Version:
    0
  • Recovery Image:
    TWRP

Posted 13 October 2011 - 06:40 AM

I have been unable to flash my HTC Tattoo using the instructions on the wiki - http://wiki.cyanogen...ll_Update_Guide

The device is a stock unlocked HTC Tattoo.
Kernel: 2.6.29-g6561203 htc-kernel@and18-2 #131
Build # 1.67.710.71

The section of the wiki "Rooting the HTC Tattoo" works fine. At the end I have the root prompt.

However, I am having problems in the section "Installing the ClockworkMod Recovery".

When I run the "su" command within the adb shell I get the error "su: permission denied". That's a nuisance, but I can still gain root using m7, so it's not a show-stopper.

But then I try to run (as root) "./flash_image recovery /sdcard/recovery-clockwork-3.0.2.7-click.img" and get the following error:
[1]   Illegal instruction ./flash_image recovery /sdcard/recovery-clockwork-3.0.2.7-click.img

Also, the directory /sdcard is empty.

How do I get su to work, and more importantly how do I get flash_image to work?

#2 mkwan

mkwan
  • Members
  • 4 posts
  • Device Model:
    HTC Tattoo
  • CM Version:
    0
  • Recovery Image:
    TWRP

Posted 14 October 2011 - 03:30 AM

OK, I got su and flash_image to work.

The su package linked from the CyanogenMod wiki doesn't work with my Tattoo, so I tried the "su" from the zip file attached to this post. That gets root every time without errors. Note that you have to run the command "/data/local/bin/su", not "su" as the wiki states.

Similarly, if you use the "flash_image" from this rar file instead of the one linked from the wiki you no longer get the "illegal instruction" error.

The next problem is that /sdcard is empty when accessed from the adb shell, so flash_image can't access the recovery clockwork img file.

How do I make the contents of /sdcard visible?

#3 mkwan

mkwan
  • Members
  • 4 posts
  • Device Model:
    HTC Tattoo
  • CM Version:
    0
  • Recovery Image:
    TWRP

Posted 17 October 2011 - 12:38 AM

I figured out why /sdcard was empty. It was automatically mounted as a USB drive by my Linux PC, which makes it unreadable by the Tattoo. Anyway, I disabled that and /sdcard started working.

Next step was to flash the recovery file. And yet again the wiki was wrong.

When I ran "./flash_image recovery /sdcard/recovery-clockwork-3.0.2.7-click.img" (note it's "./flash_image", not "flash_image" as the wiki states), I got

flashing recovery from /sdcard/recovery-clockwork-3.0.2.7-click.img
mtd: erase failure at 0x00000000 (Input/output error)
mtd: erase failure at 0x00000000 (Input/output error)
mtd: skipping write block at 0x00000000
mtd: erase failure at 0x00020000 (Input/output error)
mtd: erase failure at 0x00020000 (Input/output error)
mtd: skipping write block at 0x00020000
... and so on until

mtd: erase failure at 0x004e0000 (Input/output error)
mtd: erase failure at 0x004e0000 (Input/output error)
mtd: skipping write block at 0x004e0000
error writing recovery: No space left on device
What the wiki neglected to mention was that you need to "insmod tattoo-hack.ko" first.

Finding a suitable tattoo-hack.ko file was a hassle. It has to be compiled for each particular version of the Android kernel. Luckily a suitable one was posted here.

After installing that module the flashing went smoothly.

#4 finnk

finnk
  • Members
  • 24 posts
  • Country:
    dk - Denmark
  • Location:
    Copenhagen
  • Device Model:
    HTC Click/Tattoo
  • CM Version:
    CM7.1 nightly
  • Recovery Image:
    ClockworkMod

Posted 17 October 2011 - 10:03 AM

It would be good if you could put your findings on the talk page for the wiki entry for the update guide. I tried, but the moderator thinks the update guide is fine without tattoo-hack. Maybe if he hears it from enough people it willl be changed.

(And don´t change the wiki entry yourself, he will just change it back without comment)

#5 mkwan

mkwan
  • Members
  • 4 posts
  • Device Model:
    HTC Tattoo
  • CM Version:
    0
  • Recovery Image:
    TWRP

Posted 25 October 2011 - 02:48 AM

The rest of the upgrade went smoothly. But there are some things the wiki could have done better ...

The instruction "Boot into the ClockworkMod Recovery" should have mentioned the relevant command, i.e. adb shell "reboot recovery"
The best place to find the latest version of CyanogenMod is here rather than the "Latest version" wiki page, since it's updated more often.

#6 ckjboy2003

ckjboy2003
  • Members
  • 5 posts
  • Country:
    us - United States
  • Device Model:
    HTC Tattoo
  • CM Version:
    7
  • Recovery Image:
    Cyanogen

Posted 05 April 2012 - 03:07 AM

Thanks Mkwan. Your additional instruction gets my Tattoo back!

#7 runeks

runeks
  • Members
  • 3 posts
  • Country:
    dk - Denmark
  • Device Model:
    HTC Tattoo
  • CM Version:
    None so far
  • Recovery Image:
    TWRP

Posted 10 April 2012 - 04:12 AM

View Postmkwan, on 17 October 2011 - 12:38 AM, said:

I figured out why /sdcard was empty. It was automatically mounted as a USB drive by my Linux PC, which makes it unreadable by the Tattoo. Anyway, I disabled that and /sdcard started working.

Next step was to flash the recovery file. And yet again the wiki was wrong.

When I ran "./flash_image recovery /sdcard/recovery-clockwork-3.0.2.7-click.img" (note it's "./flash_image", not "flash_image" as the wiki states), I got

flashing recovery from /sdcard/recovery-clockwork-3.0.2.7-click.img
mtd: erase failure at 0x00000000 (Input/output error)
mtd: erase failure at 0x00000000 (Input/output error)
mtd: skipping write block at 0x00000000
mtd: erase failure at 0x00020000 (Input/output error)
mtd: erase failure at 0x00020000 (Input/output error)
mtd: skipping write block at 0x00020000
... and so on until

mtd: erase failure at 0x004e0000 (Input/output error)
mtd: erase failure at 0x004e0000 (Input/output error)
mtd: skipping write block at 0x004e0000
error writing recovery: No space left on device
What the wiki neglected to mention was that you need to "insmod tattoo-hack.ko" first.

Finding a suitable tattoo-hack.ko file was a hassle. It has to be compiled for each particular version of the Android kernel. Luckily a suitable one was posted here.

After installing that module the flashing went smoothly.
I'm having problems moving the tattoo-hack.ko file to /system/lib/modules/ which, as far as I can tell, is where it needs to be in order to insmod it. Is this correct? Remounting /system as rw doesn't seem to work. I get an error saying
# cat tattoo-hack.ko > /system/lib/modules/tattoo-hack.ko				
cannot create /system/lib/modules/tattoo-hack.ko: not enough memory

Other guides say I need to boot the phone into recovery mode. But I can't get fastboot to recognize my Tattoo (nothing is output when I run the command "fastboot devices").

Also (I'm mentioning this because it might be relevant), after running while ./m7 ; do : ; done I have problems exit'ing from root: text keeps scrolling when I type exit and I'm still in a root shell:

# cd /data/local/bin
# while ./m7 ; do : ; done
reroc/1088/cmdline[ WIN! 1088
EIP: b00021bc Instruction executed: e8bd0090
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb00021bc
# exit
exit!
reroc/1090/cmdline[ WIN! 1090
EIP: b000217c Instruction executed: e8bd0090
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb000217c
# exit
exit!
reroc/1093/cmdline[ WIN! 1093
EIP: b000217c Instruction executed: e8bd0090
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb000217c
# exit
exit!
reroc/1095/cmdline[ WIN! 1095
EIP: b000217c Instruction executed: e8bd0090
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb000217c
# exit
exit!
reroc/1097/cmdline[ WIN! 1097
EIP: b000125e Instruction executed: e0316001
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb000125e
exit!
./roc/1099/cmdlineexit!
reroc/1101/cmdline[ WIN! 1101
EIP: b0009064 Instruction executed: e8bd00f0
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb0009064
# usage: reboot [-n] [-p] [rebootcommand]
# exit
exit!
reroc/1121/cmdline[ WIN! 1121
EIP: b0004f66 Instruction executed: 34044aa0
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb0004f66
exit!
reroc/1123/cmdline[ WIN! 1123
EIP: afe118f0 Instruction executed: b500b40e
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xafe118f0
exit!
reroc/1125/cmdline[ WIN! 1125
EIP: b0009064 Instruction executed: e8bd00f0
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb0009064
# exit
exit!
reroc/1127/cmdline[ WIN! 1127
EIP: b00021bc Instruction executed: e8bd0090
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb00021bc
# exit
exit!
reroc/1129/cmdline[ WIN! 1129
EIP: b00021bc Instruction executed: e8bd0090
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb00021bc
# exit
exit!
reroc/1131/cmdline[ WIN! 1131
EIP: b00040c0 Instruction executed: b510b40c
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb00040c0
exit!
reroc/1133/cmdline[ WIN! 1133
EIP: b00016e4 Instruction executed: 50c860e5
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb00016e4
link_image[1526]:	 0 missing PT_DYNAMIC?!CANNOT LINK EXECUTABLE
error detach!
exit!
reroc/1135/cmdline[ WIN! 1135
EIP: b00054dc Instruction executed: 1b549a17
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb00054dc
exit!
./roc/1137/cmdlineexit!
reroc/1139/cmdline[ WIN! 1139
EIP: b0009064 Instruction executed: e8bd00f0
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb0009064
# usage: reboot [-n] [-p] [rebootcommand]
# exit
exit!
reroc/1141/cmdline[ WIN! 1141
EIP: b0002300 Instruction executed: 28a000f0
Wrote shellcode e0400000 line 0
Wrote shellcode e3a07023 line 1
Wrote shellcode ef000000 line 2
Wrote shellcode e0400000 line 3
Wrote shellcode e3a07017 line 4
Wrote shellcode ef000000 line 5
Wrote shellcode e0433003 line 6
Wrote shellcode e28f0014 line 7
Wrote shellcode e50d0008 line 8
Wrote shellcode e50d3004 line 9
Wrote shellcode e24d1008 line 10
Wrote shellcode e24d2004 line 11
Wrote shellcode e3a0700b line 12
Wrote shellcode ef000000 line 13
Wrote shellcode 7379732f line 14
Wrote shellcode 2f6d6574 line 15
Wrote shellcode 2f6e6962 line 16
Wrote shellcode 6873 line 17
Wrote shellcode 0 line 18
[ Overwritten 0xb0002300
#
#
#

Any ideas?

#8 sol77

sol77
  • Members
  • 3 posts
  • Country:
    se - Sweden
  • Device Model:
    HTC Tattoo
  • CM Version:
    none
  • Recovery Image:
    Cyanogen

Posted 02 August 2012 - 08:02 PM

Did you ever figure it out, Runeks? I'm having the same problem...

#9 Bluemaxx

Bluemaxx
  • Members
  • 2 posts
  • Country:
    uk - United Kingdom
  • Device Model:
    HTC One X
  • CM Version:
    10.2.1
  • Recovery Image:
    ClockworkMod

Posted 15 September 2012 - 11:07 PM

I had an HTC Tattoo laying about and decided to give it the Cyanogenmod treatment, I had the same problems you guys have been having. I think I found a solution, when you are chmodding the files. Use 777 instead of 755, I know it is rather inelegant but that should get you all moving forward.

#10 oswi54

oswi54
  • Members
  • 2 posts
  • Country:
    pl - Poland
  • Device Model:
    HTC Tattoo
  • CM Version:
    None
  • Recovery Image:
    Stock

Posted 15 January 2013 - 03:47 PM

When yout Tattoo is connected via usb unmount SD (option) try again. If not mount SD again and try. Worked for me :D