[DEV] Root question, 1.5 ROM - myTouch 3G, Magic Android Development

Hi all,
I have a question about setting up root for the new 3.03 Sense UI ROM.
I know how to get root access by typing
Code:
adb shell
su
But most ROM's that I've ever used allowed 'adb shell' to go straight to a root shell.
How do I make this work properly?
And also, when I type 'adb root', I get
Code:
adbd cannot run as root in production builds
I'm in the process of building the android environment on Ubuntu so that I can change ro.secure=1 to ro.secure=0. Will that help the other 2 issues that I'm having.
Excuse my extreme noobness here, but any help at all would be awesome!
Thanks!

Nevermind, I think I got it...
I changed ro.secure from 1 to 0 in default.prop, repacked the boot.img and now I've got root!

Related

Rooting the emulator

Does someone knows how to allow the root access on android emulator?
I have root while connecting via adb, but I want to debug my application's features which require the root access.
When I type "su" in the ConnectBot terminal application I got:
$ su
su: uid 10036 not allowed to su
I tried to execute from adb shell:
# chmod 4755 busybox
but the busybox did not become root neither.
Please help!
+1 Funny.. was going to ask the same question today!
stanglx said:
+1 Funny.. was going to ask the same question today!
Click to expand...
Click to collapse
Good. If you find the answer, post it here please.
So, no answer to this?
I ended up by running Android-x86 on the Oracle's VirtualBox emulator. There is a stable Donut and even Froyo available for download. The image is rooted, but does not let me remount the system partition, though.

[Q] ADB Segmentation Fault

Hi all...when in adb shell I can't seem to access certain commands without a segmentation fault occuring.
Specifically:
ls
chmod
and I'm sure there are others.
Running
Droid 1 - Motorola
CyanogenMod v6 (latest stable release)
Android SDK on my PC
I am trying to get busybox installed. I have it copied into /data/local and can CD to that directory but cannot chmod the file to 755 perms nor can I do an ls.
I opened the terminal emulator in this ROM and I have the same problem too. So...not likely an issue with ADB.
I've made it this far and am most decidedly STUCK. Done a lot of hunting and can't find anywhere anyone has run into this. Any help appreciated.
i have. did you lose root? thats why mine says it. i was unrooted and now my permission are only read only so i dont think i can get root back.

[Q] LG Optimus V: Stuck on "Waiting for device..." on SuperOneClick

Hey guys, this is my first post, and I just wanted to say first off that all of you who have figured out how to root phones are awesome! Because of xda-developers and androidforums, I helped a friend root and put cyanogenmod 6 on his HTC Hero (cdma).
Anyway, I'm trying to put Zefie's CM7 on my LG Optimus V, and I'm stuck. First off I'm trying to root my phone. I'm following this guide: [How-To] Root the LG Optimus V on Android Central (I'd post the link, but the system won't let me since I'm a new user.). Usually I'd follow the instructions step by step, but I had to make some changes. I see this guide is written for Windows, but I'm running Ubuntu 10.10. After doing a lot of searching I was able to figure out that I had to install the Linux version of the Android SDK and use mono to run SuperOneClick.exe. That part was easy since I have a good knowledge of Linux and how it runs. The part that I'm stuck at is performing a Shell Root. When I click on Shell Root, SuperOneClick is stuck at "Waiting for device..." It's been like this for a while. If I click on Root, it gets stuck at "chmod psneuter..." Either way it's stuck and I don't know what to do.
Just to let you guys know, I have USB Debugging turned on, and I'm running Android version 2.2.1.
When I rooted my friend's HTC Hero, all I had to do was run a downloaded apk onto his SD card and run it, and then it would instantly root it. Is there a similar apk for the Optimus V? If not, is there a way I can manually root it via the terminal? Anyway, I'm stuck and would appreciate any suggestions or comments. Don't forget, I'm running Ubuntu 10.10, so some issues may arise since the tutorial was meant to be run on Windows machines.
Later tonight I'm going to try to root my phone at my friend's house since he has a computer running Windows XP. Hopefully I can get some better progress on his computer instead of mine. Thanks in advance for all your help!
Okay, nevermind. I did a little more searching and found a way to root my phone without running SuperOneClick.exe. I'll post if I have any more problems.
Well I spoke too soon. Here are the steps I followed to get to a # prompt in adb:
./adb push psneuter /data/local/tmp
./adb shell chmod 777 /data/local/tmp/psneuter
./adb shell /data/local/tmp/psneuter
I then did the following commands:
adb shell
mount -o remount,rw -t yaffs2 /system /system
exit
adb push su /system/bin
adb push busybox /system/bin
adb shell
cd /system/bin
chmod 4755 su
chmod 555 busybox
exit
adb reboot
After rebooting the phone, I installed Superuser and TitaniumBackup. I opened TitaniumBackup and it gave me an error stating that it could not acquire root privileges. I know for a fact that my phone has su and Busybox installed on it and have the correct permissions.
What bugs me even more is that when I run su via the adb shell root prompt or a terminal emulator on my phone, it returns the following error:
link_image[1997]: failed to link su
CANNOT LINK EXECUTABLE
What's up with that? I did find out that some people have had issues with Android 2.2.1 on their phone, and unfortunately that's what my phone had when I bought it about a month ago.
Okay, I figured it out finally and have my phone rooted. I had to run SuperOneClick.exe on my buddy's Windows computer. Instead of doing a Shell Root, I just clicked Root and it rooted. Now I'm stuck at figuring out how to do a Nandroid backup. I backed up everything using Titanium Backup, but I know I want to make a backup rom in case something goes wrong during the flash. What are the steps to performing a Nandroid backup?
Lol nevermind. I got Zefie's CM7 up and running this morning.
Nandroid is made using recovery. Glad you got it working
Sent from my VM670 using XDA App
bhambalek said:
Okay, nevermind. I did a little more searching and found a way to root my phone without running SuperOneClick.exe. I'll post if I have any more problems.
Click to expand...
Click to collapse
I am having the same problem as you, can you link me the other method?
EDIT: I do see the instructions in the next post, however where did you find them and get the files?

broken /sbin/sh

Hello,
There are other unanswered posts that deal with this -- so either this is an issue that stumps or it is a simple fix that I cannot find.
Other posts --
http://forum.xda-developers.com/showthread.php?t=953119
http://forum.xda-developers.com/showthread.php?t=2075580
http://forum.xda-developers.com/showthread.php?t=743778
My posts dealing with this --
http://androidforums.com/one-s-all-things-root/705046-s-off-fail.html
I have done something to /sbin/sh it is no longer a directory -- it is still listed in /sbin but you cannot cd to it.
When trying to install apps with "adb install xxxx.apk" I get /sbin/sh pm not found
When trying to do S-off I get a similar error but saying /sbin/sh su not found.
Does anyone know can this be re written? What happens if I delete SH and attempt to recreate? How do i get the proper SH directory for T-mobile HTC one-s
rooted and super CID
As far as I know I am in a place where I cannot go back to stock because of ruu and radios versions ??? It has been awhile since exploring that route.
I am on Viper V2.1
There is most likely nothing wrong with your sh.
It is supposed to be an executable, not a directory.
Are you doing this in recovery or while fully booted?
I bet you're in recovery and I bet you have to be booted in Android.
An adb shell in recovery is already root. You don't need/have su. Both pm and su are in /system/bin/ when booted in Android, as is sh by the way. In recovery your shell is /sbin/sh (like yours is) and you have no su or pm.
That first and third one probably did the same thing you did. getprop is also in /system/bin/ when booted, and not on the recovery root fs. Their shell is /sbin/sh and not /system/bin/sh so probably in recovery. The second one actually replaced his sh executable with something else.
Thank you.
That is what I was doing and now I have S-off.

ZTE Grand X 4 - Rooting Progress

This thread is made in an effort to root the ZTE Grand X 4 (Z957). At this point I've made some progress by using the Dirty Cow exploit to access a root shell via ADB, but have been unable to install su to the system partition.
Notes: stock rom, no custom recovery.
Exploit method:
Follow the instructions posted by Arinerron on GitHub regarding CVE-2016-5195 (under 10 posts, cannot share direct link)
When successful you will see "[email protected]:/ #" as your shell prompt, however the session will hang after any command. That said, /system/run-as is still updated allowing you to do the following:
$ adb shell
[email protected]:/ $ run-as
uid run-as 2000
uid 0
0 u:r:runas:s0
context 0 u:r:shell:s0
[email protected]:/ # id
uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats) context=u:r:shell:s0
you have access to the android system as root within this shell, but this is where I'm getting stuck. I'm not able to find a way to mount the system partition as read/write, and as such unable to install su. Also note that you will need to run the exploit again anytime you reboot the device. I have tried the following methods:
$ adb shell cp /sdcard/Download/su /system/bin/su
cp: /system/bin/su: Read-only file system
[email protected]:/ # mount -o rw,remount /system
mount: Permission denied
adb reboot disemmcwp
#still unable to remount the system partition
At this point I'll share what I've been able to do so far and see if anyone else has ideas for a next step.
Have you figured out how to root the z957.
This worked on my ZTE GrandX Max Plus to permanently disable the write protection on the system partition.
Good luck!!
reboot disemmcwp
If you ever want to re-enable being blocked from mounting system rw:
reboot emmcwpenab
Any luck on this root? I am looking to buy a phone on Cricket, but I need one that I can root.
Bump? Would love to see root here!
Bump, I've tried but I also get stuck on the same three methods:
$ adb shell cp /sdcard/Download/su /system/bin/su
cp: /system/bin/su: Read-only file system
[email protected]:/ # mount -o rw,remount /system
mount: Permission denied
adb reboot disemmcwp
#still unable to remount the system partition
Grand X 4
has anyone successfully rooted the grand x ?!
Thought I would post an update: Still no success on my end.
"Rooting" is easy, but breaking out of the selinux context to do anything is hard. ie. I expanded on timwr/CVE-2016-5195 by trying to use vikiroot to break out of the u:r:shell:s0 context. To do this adb push the vikiroot exploit to /data/local/tmp and then use the timwr method to run that exploit as root:
[email protected]:/ # /data/local/tmp/exploit
Unfortunately I could only get the reverse shell to work as a glorified echo. If anyone knows where I could find some c++ code for running a shell in android for me to work off of I'm willing to see how much further I can get in that direction.
As disemmcwp doesn't work I'm wondering if ZTE found a different way to lock down the system partition? Interestingly there is an OEM-specific settings button that is greyed out (find it at *#*#4636#*#*).
I'm running firmware from Wind/Freedom Mobile so I can access the bootloader and unlock it, but I can't install SU or anything from stock. Additionally, there is no TWRP released for this phone yet. I have no idea where to find the board config files for this phone. Without a custom bootloader I'm not sure how to make permanent changes to the rom at this point.
Thanks for your work on this. Stock Rom is pretty clean, but root would be great on this.
I've tried many different ways to root this phone. For weeks, I've tried. Nothing. I personally think that there is no way to, not now at least.
Don't know if this will help but​, I found that they lock the bootloader under the developer settings!
Has anyone tried a one click root application like KingoRoot ?
Or is this more for doing it on your own without a service like that?
Previously I had tried a series of one click solutions but I haven't found any that support this device yet. Typically they use the same exploits we've tried to use the hard way
After slacking for awhile I was finally able to poke around some of the internals of the phone in FTM mode using qualcomm developer tools. Lots of nifty things in the embedded file system and plenty of opportunities to flash new boot loaders and roms to the device for those of you who have a locked bootloader, but unfortunately I haven't been able to extract a copy of the stock rom or bootloaders. I'm still lacking the information I need to compile a new one for the phone.
Where I stand:
Can create a root shell, cannot remount system as read/write for permanent root in stock rom.
Can install new boot loader, no twrp or other found for this hardware.
Can compile new twrp, no boardconfig files (handy to avoid bricking your phone)
Can explore EFS and access chip via FTM, not sure how or if possible to download current rom / bootloader from here.
Happy for any tips on what to try next!
Can you tell me which tools you used? I looked at the Qualcomm site and there are plenty to choose from.
If you can get those tools off of the site maybe I'll message you about grabbing a few items on my Christmas list! QPST includes the tools necessary, and the tools to backup the 425 should you accidentally brick your phone (basically impossible to truly brick a qualcomm if you have the right tools). Archive.org has a copy, don't remember where to find the driver pack but you'll need that too (and a windows build).
Read through some notes on marshmellow and sounds like you have to remount system from recovery. I'm camping for the next month but will try talking to the TWRP team about porting a bootloader to the phone when I get back.
Let me know if you make any headway!
try this adb command and see if you get a qualcomm serial port after reboot
Code:
adb reboot edl
if that doesnt work try
Code:
adb reboot bootloader
then run the attached
How did you get into diag mode? Just do the temp root method and setprop sys.usb.config diag,adb?
https://freeandroidroot.com/root-zte-grand-x-4/
This page claims to have a root method but does it actually work? I've tried twice with no success.
How's everyone here? I also am awaiting root for this device. It really needs some shine on it's mid levelness. So here is my friend's​ zte warp 7 work for root. He also got some killer roms for the Huawei ascend XT. He does great work. I'm sure if he had a grand x 4 he could move this along. Just a suggestion. This man can this done. Just a suggestion for all of us. https://forum.xda-developers.com/showpost.php?p=72560392&postcount=246
---------- Post added at 11:31 PM ---------- Previous post was at 11:10 PM ----------
https://forum.xda-developers.com/member.php?u=7934375
Anyone root this phone yet?
Sent from my Z956 using XDA-Developers Legacy app

Categories

Resources