Quick Question for Rooting - Android Software Development

I have a MT4G and I'm using the Cyanogenmod rooting technique. I'm at the part where i'm pushing certain files to the /data/local path.
adb push psneuter /data/local/tmp/
adb push gfree /data/local/tmp/
adb push busybox /data/local/tmp/
adb push hboot-eng.img /data/local/tmp/
adb push root_psn /data/local/tmp/
adb push flash_image /data/local/tmp/
adb push su /sdcard/
adb push Superuser.apk /sdcard/
adb shell chmod 755 /data/local/tmp/*
When i get to "root_psn", I get the error that I cannot push due to being read only...I dont understand because this is the same path as the rest of the files, and I have no problem with them.
I don't want to go any further until I know what's going on.

Are you sure your not just running out of space on your data partition?

Gene Poole said:
Are you sure your not just running out of space on your data partition?
Click to expand...
Click to collapse
It was actually a mistake on my part. I was typing only /data/tmp for some reason...
Anyway, I moved on from there, having trouble here:
adb push su /sdcard/
failed to copy 'su' to /sdcard//su': permission denied
Same error goes for Superuser.apk, and once i get into the adb shell I get permission errors for /data/local/tmp/psneuter.
I didnt go any further than this. My phone is still fine, I also do NOT have visionary installed. I also got rid of the superuser app that was already on my phone.
Kind of stuck.

ugh, wtf. More trouble.
Moved passed the previous error, now i have a new one:
./gfree -f -b hboot-eng.img -y recovery.img
"Error opening backup file"
I tried the next step, then get the error saying how Superuser.spk and SU cannot be found. I placed them directly on the SD card via usb cable since I got the error of write protected SD card.

Related

Downgrade from 1.72 issues with cmd

Android SDK installed in programfiles
ADB in this folder : C:\Program Files\Android\android-sdk-windows\platform-tools
written in cmd, with USB debugging activated and charge only.
C:\Users\any\adb devices. my device shows!
Is this the right thing to insert to cmd or the one below
1. Answers!
adb push psneuter /data/local/tmp : A bunch adb commands shows
adb push misc_version /data/local/tmp : A bunch adb commands shows
adb shell chmod 777 /data/local/tmp/psneuter :unable to chmod, no such file
adb shell chmod 777 /data/local/tmp/misc_version :unable to chmod no such file
adb shell /data/local/tmp/psneuter : Not found
adb shell :$
or this
2.
adb push psneuter C:\Program Files\Android\android-sdk-windows\platform-tools
adb push misc_version C:\Program Files\Android\android-sdk-windows\platform-tools
adb shell chmod 777 C:\Program Files\Android\android-sdk-windows\platform-tools/psneuter
adb shell chmod 777 C:\Program Files\Android\android-sdk-windows\platform-toolsmisc_version
adb shell C:\Program Files\Android\android-sdk-windows\platform-toolspsneuter
adb shell :$
Have I installed the Android SDK in the wrong folder or what is thats going wrong?
First is correct, but you have to have psneuter & change_misc files in current directory so adb push could find them.
Whats the current directory?
Probably C:\Program Files\Android\android-sdk-windows\platform-tools.
You can also use it like this: adb push c:\some_directory\psneuter /data/local/tmp
Syntax is: adb push [what you want to push] [where you want it to go]
istopp said:
Whats the current directory?
Click to expand...
Click to collapse
Current directoty is the folder you are in.
Could you resolved the above problem?
because even i am not able to use adb shell chmod 777 command, its shows the same result.
Any help will be appreciated.
Thanks.
Thanks a lot, i just copied the content of the C:\Program Files\Android\android-sdk-windows\platform-tools directory to C:\Users\any\ and tried then, work perfect, finally got the # instead of $
What are the instructions im suppose to follow in the bootloader? fastboot,recovery,factory reset,simlock or image CRC?
istopp said:
Thanks a lot, i just copied the content of the C:\Program Files\Android\android-sdk-windows\platform-tools directory to C:\Users\any\ and tried then, work perfect, finally got the # instead of $
What are the instructions im suppose to follow in the bootloader? fastboot,recovery,factory reset,simlock or image CRC?
Click to expand...
Click to collapse
None of the above. If you've done it correctly, the phone should find PD98IMG.zip on its own. Is your device branded? If so, make sure you have correctly created your Goldcard.

EVO Shift Temp Root for 2.3.3 and HBoot Downgrade

To downgrade your HBOOT to go back to 2.2 visit this link http://forum.xda-developers.com/showthread.php?t=1255474
This will allow you to flash 2.2 to perm root the phone
If you wish to help with perm root status for Android 2.3.3, please visit this thread http://forum.xda-developers.com/showthread.php?t=1218580
Thanks to everyone in this post who has helped get this far. You will need to have the Android SDK installed and working knowledge of ADB and basic file system structure.
Major help from minneyar
TEMP ROOT Instructions:
Download http://tinyw.in/1lI
Unzip if required and put in your ADB folder
Launch command prompt and navigate to your ADB folder
adb push fre3vo /data/local/tmp/
adb shell
chmod 777 /data/local/tmp/fre3vo
/data/local/tmp/fre3vo -debug -start fbb58a00 -end FFFFFFFF (if this doesn't work, try rebooting phone)
Download these 2 files here and put them in your ADB directory: http://forum.xda-developers.com/showthread.php?p=14927732#post14927732
exit back to command prompt if you aren't there already
adb push Superuser3-beta1.apk /data/app/
adb push su-3.0-alpha7 /data/local/tmp
adb shell (should now see # instead of $)
cd /data/local/tmp
chmod 777 su-3.0-alpha7
./su-3.0-alpha7
cd /
mount -o remount,rw -t rootfs rootfs /
rm vendor
mkdir vendor
mkdir vendor/bin
cat /data/local/tmp/su-3.0-alpha7 > /vendor/bin/su
chmod 4755 /vendor/bin/su
You now have temp root. Disregard any notification about outdated SU binary. Root will go away if you reboot. If you reboot your phone you can obtain root again by just running the following
adb shell
chmod 777 /data/local/tmp/fre3vo
/data/local/tmp/fre3vo -debug -start fbb58a00 -end FFFFFFFF
adb shell (should now see # instead of $)
cd /data/local/tmp
chmod 777 su-3.0-alpha7
./su-3.0-alpha7
cd /
mount -o remount,rw -t rootfs rootfs /
rm vendor
mkdir vendor
mkdir vendor/bin
cat /data/local/tmp/su-3.0-alpha7 > /vendor/bin/su
chmod 4755 /vendor/bin/su
I haven't found a way to re-root after rebooting without connecting to a PC
Type su and see if it gives you root permissions
Sent from my MiuiSpeedy
says su: not found.
You are saying you cannot install the superuser app? From reading in the Evo3D forums, you could install Superuser, even without being rooted, but it obviously won't allow root access, until you run a root exploit.
Try rebooting the phone, installing superuser, run fre3vo, and then try the adb shell, and su method.
This is getting interesting. Hopefully you are on to something.
Stuke00 said:
See screenshot. Doesn't the # mean temp rooted? Tho I cannot install SU and Root Explorer isn't working. Anything else I need to do first or something?
Click to expand...
Click to collapse
Looks hopeful!
tokuzumi said:
You are saying you cannot install the superuser app? From reading in the Evo3D forums, you could install Superuser, even without being rooted, but it obviously won't allow root access, until you run a root exploit.
Try rebooting the phone, installing superuser, run fre3vo, and then try the adb shell, and su method.
This is getting interesting. Hopefully you are on to something.
Click to expand...
Click to collapse
Okay let me clarify
I can install SU but it wouldn't install the binaries. I did all of the above. Says su: not found.
I then tried something else.
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cat /system/bin/sh > /system/bin/su
# chmod 4755 /system/bin/su
I was then able to get the SU binaries to install but Titanium Backup says:
"Busybox works but the "su" command does not elevate to root: "whoami" reports "app_135" instead of root/uid 0.
then su from the command prompt was saying "link_image[1935]: 3160 missing essential tablesCANNOT LINK EXECUTABLE" and now back to su: not found again....
I don't know enough about linux commands to give you any real info. Like in the other thread, talk to agrabren, to see what he has to say.
tokuzumi said:
I don't know enough about linux commands to give you any real info. Like in the other thread, talk to agrabren, to see what he has to say.
Click to expand...
Click to collapse
Yeah I tweeted him with what I could provide with 160 characters. Just waiting now.
Well here's a tweet he put out a couple of hours ago.
@agrabren: For those with the SHIFT, it's a known bug in my code that we missed the address. One too many zeroes in the list. I'll try to fix it soon.
Sent from my PG06100 using XDA App
crump84 said:
Well here's a tweet he put out a couple of hours ago.
@agrabren: For those with the SHIFT, it's a known bug in my code that we missed the address. One too many zeroes in the list. I'll try to fix it soon.
Sent from my PG06100 using XDA App
Click to expand...
Click to collapse
Yeah he posted that right after I gave him the memory address for the exploit. Just means that I did it the manual way through debugging. At least I think so... hopefully soon!
Good news, everybody! I have successfully acquired temp root on my Shift!
First, fre3vo has to be pointed at the right address. After copying it over to my phone, I did "adb shell" and then ran it like so:
/data/local/tmp/fre3vo -debug -start fbb58a00 -end FFFFFFFF
That printed out a message that it found an exploit and kicked me out of the shell. After doing "adb shell" again, I got a command prompt. I tried installing the 2.3.6.3 version of Superuser, but it complained about being unable to install "su"; I tried to find a separate su binary and copy it over manually, but it didn't work due to a linker error.
After searching around, I found a beta version of Superuser 3:
http://forum.xda-developers.com/showthread.php?p=14927732#post14927732
First I uninstalled the old version of Superuser and then used adb to install the new one from that thread. I ran it and it said it was unable to install su, so I downloaded the version of su provided there and installed it manually. The process went something like:
Code:
adb push su-3.0-alpha7 /data/local/tmp
adb shell
# cd /data/local/tmp
# chmod 4755 su-3.0-alpha7
# ./su-3.0-alpha7
# mount -o remount,rw -t ext3 /dev/block/mmcblk0p26 /system
# cat su-3.0-alpha7 > /system/bin/su
# chmod 4755 /system/bin/su
I don't know if explicitly running "./su-3.0-alpha7" is necessary, it just seemed like a good idea at the time. I don't know if everybody's block device will be named "mmcblk0p26", I used "mount" to figure out what was mounted at /system.
Anyway, after all that was done, I ran Superuser again and it didn't complain. To test it out, I started up Wireless Tether. It asked me for superuser permissions, which I granted it, and it's working fine.
Root successful!
Good job!!
Sent from my Speedy HTC EVO shift on XDA Premium app
I followed those steps exactly and got what I would call a partial root. Some of the 'you need root' errors are gone but "su" still results in 'not found' even though "mkdir su" results in 'file exists.'
mmcblk0p26 exists on this unit.
The weirdest part is that Adfree will accept the device as rooted and with superuser but says it can't find a partition to modify. And after a reboot root is definitely gone.
I think you're on to it but it isn't quite there yet.
It seems to be fully temprooted to me; I have to redo it if I reboot, but otherwise it's working perfectly. After following the steps I listed above, running "ls -l /system/bin/su" should produce this output:
Code:
# ls -l /system/bin/su
ls -l /system/bin/su
-rwsr-xr-x root root 22228 2011-07-25 19:14 su
If it says "No such file or directory" instead, then the su binary isn't in the right place.
Looking back over what I wrote, I think I left out a step -- if you were following what I listed exactly, it probably won't work, because I forgot to change to the /data/local/tmp directory. I'll update that...
Update: after playing around with it for a while, something is definitely not quite right. Everything works fine at first; I've tested Wireless Tether and Titanium Backup and they're both fine. After leaving my phone for a while and coming back, though, applications that try to get root access mysteriously fail. The dialog prompt doesn't even appear.
Going back into the adb shell, /system/bin/su is still there, but trying to run "su" causes this to happen:
Code:
# su
su
link_image[1935]: 3802 missing essential tablesCANNOT LINK EXECUTABLE
But if I use cat to overwrite su and then chmod it again, everything works. su must somehow be getting modified by something else and replaced with a bad version... but I'm not sure where to look.
I caught something like that.
I think there should be a chmod 777 su-3.0-alpha7 after cd /data/local/tmp
minneyar said:
It seems to be fully temprooted to me; I have to redo it if I reboot, but otherwise it's working perfectly. After following the steps I listed above, running "ls -l /system/bin/su" should produce this output:
Code:
# ls -l /system/bin/su
ls -l /system/bin/su
-rwsr-xr-x root root 22228 2011-07-25 19:14 su
If it says "No such file or directory" instead, then the su binary isn't in the right place.
Looking back over what I wrote, I think I left out a step -- if you were following what I listed exactly, it probably won't work, because I forgot to change to the /data/local/tmp directory. I'll update that...
Update: after playing around with it for a while, something is definitely not quite right. Everything works fine at first; I've tested Wireless Tether and Titanium Backup and they're both fine. After leaving my phone for a while and coming back, though, applications that try to get root access mysteriously fail. The dialog prompt doesn't even appear.
Going back into the adb shell, /system/bin/su is still there, but trying to run "su" causes this to happen:
Code:
# su
su
link_image[1935]: 3802 missing essential tablesCANNOT LINK EXECUTABLE
But if I use cat to overwrite su and then chmod it again, everything works. su must somehow be getting modified by something else and replaced with a bad version... but I'm not sure where to look.
Click to expand...
Click to collapse
YES! I have root! I was able to install a screenshot app and test it this is amazing progress! Thanks for that.
So now when I reboot, you have to do the entire thing again? SU and all?
Stuke00 said:
So now when I reboot, you have to do the entire thing again? SU and all?
Click to expand...
Click to collapse
Yes, every time you reboot you'll have to redo the whole process, including running fre3vo and then copying su into /system/bin. Hopefully somebody will figure out a permanent root soon.
Wow those SU binaries are disappearing before I even reboot! Already gone and I haven't rebooted the phone
I think I had that issue too. I just couldn't believe the files just disappeared and thought I did something wrong somewhere.
Would a logcat help anyone at all? Anything I should look for?

Trouble rooting 3.2 wifi xoom

Hi guys I can't post in the xoom root thread yet so I had to start a new thread. I am following this guide to root my xoom http://forum.xda-developers.com/showthread.php?t=1170760. I had no trouble up until this point
In the command window on your PC type; adb remount
Type; adb push su /system/bin
Type; adb shell
Type; ln -s /system/bin/su /system/xbin/su (this line starts with lower case "L", like llama)
Type; chmod 4755 /system/bin/su
Type; exit
Type; adb push Superuser.apk /system/app
I remounted the xoom but then when I type "adb push su /system/bin" it says "cannot stat "su' no such file or directory" and nothing works after that. Does anyone have a solution?
Update: SOLVED! To anyone else having this problem I figured it out. Make sure the su and superuser apk files are OUTSIDE of the original folder and in the platform tools folder.

[Q] need help rooting mytouch 4g 2.3.4

Ok after about 11 hrs I need help I cant get past cd /data/local/tmp says it cant find path and ./misc_version -s 1.00.000.0 cant find path. PLEASE HELP.. Ive rooted my evo's but this is giving me trouble
C:\Users\Josh>adb shell
^C
C:\Users\Josh>adb push fre3vo /data/local/tmp
C:\Users\Josh>adb shell
C:\Users\Josh>adb push misc_version /data/local/tmp/misc_version
C:\Users\Josh>adb push flashgc /data/local/tmp/flashgc
C:\Users\Josh>adb shell chmod 777 /data/local/tmp/*
C:\Users\Josh>adb shell chmod 777 /data/local/tmp/misc_version -s 1.00.000.0
C:\Users\Josh>adb push misc_version -s 1.00.000.0 /data/local/tmp
C:\Users\Josh>adb shell
^C
C:\Users\Josh>./flashgc
'.' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Josh>adb push ./flashgc
C:\Users\Josh>./flashgc
'.' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Josh>cd\adb
The system cannot find the path specified.
C:\Users\Josh>
Why on earth are you Ctrl-Breaking the ADB shell? You're supposed to work in it.
Im lost in it. Ive never really use adb..
When you write "adb shell" you get "$" sign, right? Just keep writing the commands after this sign, as if nothing happened.
Follow the guide exactly. Look at my signature, go to Glacier Wiki, section "Root", subsection "Gingerbread", guide for downgrading. It's written in the most understandable way possible. If you still don't understand - please reconsider rooting until you get familiar with ADB, which is not hard to do - there are guides all over the internet that show how to work with ADB, including video guides.
No when I adb Shell I get #. I did figure out you can get SU permission on terminal emulator when you use Super Tool V3. To me thats a easier temp root.
If you get "#" - it means you're getting a root shell, and good to go.
Just write the ADB commands in it.
Ya I found out what I was doing wrong. I placed a data folder then a local folder and tmp in SD card. Then I got it. But I used super V tool 3 to get temp shell root access. It gave me a better shell root.

Failed to copy to /data using adb push

Hi,
I am trying to push
Code:
$ adb push androidvncserver /data/androidvncserver
failed to copy 'androidvncserver' to '/data/androidvncserver': Permission denied
When I do 'su' in 'adb shell', i get a root prompt , that means I have rooted my device, right?
Code:
$ adb shell
$ su
#
If so, how can I push to /data?
Thank you.
Your default shell is secured - means, when you're executing ADB command without executing something through SU, you're going through the regular permissions.
To enable insecure boot, set ro.secure to 0 in your build.prop. I'm not sure if it's enough, though, or if you need a kernel compiled with security off to take full advantage of insecure adb commands.
You can push the file to sdcard, enter shell, enter su, and in root shell copy the file where you want it to be.
And you're posting in the wrong section. There is Q&A for questions, please move there.

Categories

Resources