Help needed to exec...
 
Notifications
Clear all

Help needed to execute nanddump (cross-compiled for ARM) on

10 Posts
5 Users
0 Likes
653 Views
(@apurva-rustagi)
Posts: 18
Active Member
Topic starter
 

Hi All,

I need your help regarding executing nanddump on Nexus One.
I achieved root access after booting unsecured boot image on the phone. I verified this root access by accessing /data/data directory on the phone. Also after executing adb shell i get # prompt instead of usual $ prompt.
I cross compiled MTD-UTILS for arm architecture using guide at http//elinux. org/CompilingMTD Utils.
I then transferred nanddump tool onto SD card and trying to execute in the adb shell but i keep getting error "permission denied". I then tried to do chmod 777 nanddump which passes out without any warning/errors. But the nanddump command still fails with permission denied error.
Can anyone help me out with this issue?

Regards,
Apurva R

 
Posted : 20/07/2010 8:41 am
(@chad131)
Posts: 63
Trusted Member
 

Complete stab in the dark… But have you set execute permissions on the binary? Chmod +x filename

 
Posted : 20/07/2010 9:29 am
(@apurva-rustagi)
Posts: 18
Active Member
Topic starter
 

I did execute chmod 777 which means rwxrwxrwx permissions on the executable. This command passes out without warnings/errors. However the nanddumpstill fails.

 
Posted : 20/07/2010 9:39 am
(@patrick4n6)
Posts: 650
Honorable Member
 

sudo?

 
Posted : 20/07/2010 10:30 am
(@apurva-rustagi)
Posts: 18
Active Member
Topic starter
 

sudo and su binaries are not available on android platform (

 
Posted : 20/07/2010 10:33 am
(@alexc)
Posts: 301
Reputable Member
 

I wonder if the issue is coming from running it from the SD card? But if you have root you should be able to do what the hell you want - that's the point right?

Is the "permission denied" coming from the shell (saying that you don't have permission to execute the file - although this shouldn't be the case), or is it an error message being passed out by nanddump?

 
Posted : 20/07/2010 4:09 pm
(@apurva-rustagi)
Posts: 18
Active Member
Topic starter
 

Its the shell who is giving the error. Following is the screenshot.

cd /sdcard/mtdutils-arm
# ls
ls
bin2nand
docfdisk
doc_loadbios
flashcp
flash_erase
flash_info
flash_lock
flash_otp_dump
flash_otp_info
flash_unlock
ftl_check
ftl_format
mkbootenv
mkpfi
mtdinfo
mtd_debug
nand2bin
nanddump
nandtest
nandwrite
nftldump
nftl_format
pddcustomize
pfi2bin
pfiflash
rfddump
rfdformat
ubiattach
ubicrc32
ubicrc32.pl
ubidetach
ubiformat
ubigen
ubimirror
ubimkvol
ubinfo
ubinize
ubirename
ubirmvol
ubirsvol
ubiupdatevol
unubi
# ./nanddump
./nanddump
./nanddump permission denied

 
Posted : 20/07/2010 5:46 pm
(@apurva-rustagi)
Posts: 18
Active Member
Topic starter
 

The binaries can be downloaded at http//www.4shared.com/file/MFrQFpYY/mtdutils-arm.html

It would be a great help if someone else can verify if the binaries are compiled correctly or not.

I verified the ELF file signature by doing the cat. So i do not think that this is probably the case.

 
Posted : 20/07/2010 5:52 pm
(@apurva-rustagi)
Posts: 18
Active Member
Topic starter
 

Andrew Hoog kindly replied to my email and suggested the following
Apurva,

Congrats on your progress so far. I suspect your issue is that Android went to great lengths to make sure the /sdcard has the “noexec” option set. I believe you can check with a simple “mount” command. The solution is to put the file somewhere on the file system where the “noexec” option is not set. With root, it’s practically anywhere but /sdcard. Hope this helps, let us know.

Andrew Hoog
Chief Investigative Officer
tel 312-878-1100
ahoog@viaforensics.com

However I am facing similar problem when I place it in /system/bin folder. (

 
Posted : 25/07/2010 10:12 am
tdaitoku
(@tdaitoku)
Posts: 1
New Member
 

I think your nanddump is dynamically linked program.
So, Try statically linking. D

Tad

 
Posted : 12/08/2011 7:47 am
Share: