This is a thread that will allow you to ask specific questions and get some help with any dev work you may be attempting.
This will be a community effort between enewman17, loserskater, stratatak7, and myself. It would be great if other devs want to join in.
Acceptable questions
"I am trying to recompile X using APK Tool and I get this error. What am I doing wrong?".
"I am trying to flash the ROM I just built and I keep getting a status 0 error. Any thoughts?".
Unacceptable questions
"How do I compile/decompile apks?"
"How do I mod a kernel"
Theming questions go here.
Thread Rules
Do not post unless you have searched the thread.
Only post specific questions.
Only post long sections of code using the code or hide tags.
Your question may not be answered immediately. Be patient.
Use the thanks button (even if you don't get the answer you want).
Many thanks to kennyglass123 for the sticky!
Re: So you want to be a dev?
Just wanted to comment about questions.
The more info the better!
Bad comment: "I can't get X mod to work."
Better: "I'm trying to get X mod to work, and settings keeps FCing. Here's my modified files and a logcat."
Sent from my SAMSUNG-SGH-I747
Anyone feel free to PM me and I'll help you get the ball rolling if you feel your question does not meet thread criteria and you're looking to start development. I realize everyone has to start somewhere. Just be prepared for work.
mine
Now that we have thoroughly thanked each other, maybe someone will stop by with some questions. :silly:
upndwn4par said:
Now that we have thoroughly thanked each other, maybe someone will stop by with some questions. :silly:
Click to expand...
Click to collapse
LOL. I sure hope so.
For those of you reading this, feel free to ask any questions you have about Android development-related modification. I'm sure between the four of us and anyone else who wants to help out that knows what they are doing will know. I'm happy to help out with anything I can.
How do you double the hours in a day so you have enough time to actually do this stuff
Seriously though, this is a great thread and nice to see 4 of the top devs working together and willing to help.
If I ever do find the time I'm sure I'll be back.
Sent from my SGH-I747 using xda premium
jde984 said:
How do you double the hours in a day so you have enough time to actually do this stuff
Click to expand...
Click to collapse
A (somewhat) valid question: For me, it requires a very understanding wife and sleep deprivation.
______________
OK, now let's keep this thread clean and on topic. Thanks!
See in my sig a guide how to decompile apks, edit, and recompile apks! link: http://forum.xda-developers.com/showthread.php?t=2147425
My question: I'm attempting to edit smali for the first time. However, it's pretty foreign. Any guides or tutorials out there? I've searched, but nothing substantive (just some pages on the nomenclature for the dalvik bytecode). My issue is that the instructions for the mod have different registers than me and I can't figure out how to adjust the changes.
It's difficult to answer generic questions like that.
Post up what you are trying to do and maybe we can all work it our together.
headsest control for AOSP
Ok... Team LiquidSmooth is stumped as am I, and I've spent about 8-10 hours searching all in all, through Google, CM threads, Android General/q&a and githubs... I'm still looking but wondering if I could get some help before their team or I pull any more hair out. Basically just what my title says, need the code for controlling music and phone calls from headset controls. The capacitive keys light up when the buttons are pressed but no actions are performed. It's as if the rom is just missing the path for them or something. Any help on where to search or anything, I'm game. Thanks guys.
SOLVED, thanks anyways guys :good:
upndwn4par said:
It's difficult to answer generic questions like that.
Post up what you are trying to do and maybe we can all work it our together.
Click to expand...
Click to collapse
Got it. I'll write up my issues...but, I've been having some trouble with adb and think that might be a bigger issue, haha:
I'm trying to allow adb to run as root. I decompiled boot.img, changed ro.secure to 0, recompiled boot.img, and pushed. Default.prop now shows ro.secure=0. But, I tried running adb remount and I still get permission denied? Someone said there may be other edits required, but I can't seem to find any.
Here's what I changed it to:
{
"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"
}
Here's what ADB is telling me:
Code:
[email protected]:/ $ getprop ro.secure
getprop ro.secure
0
[email protected]:/ $ exit
exit
adb remount
[B]remount failed: Operation not permitted[/B]
ikjadoon said:
Got it. I'll write up my issues...but, I've been having some trouble with adb and think that might be a bigger issue, haha:
I'm trying to allow adb to run as root. I decompiled boot.img, changed ro.secure to 0, recompiled boot.img, and pushed. Default.prop now shows ro.secure=0. But, I tried running adb remount and I still get permission denied? Someone said there may be other edits required, but I can't seem to find any.
Here's what I changed it to:
Here's what ADB is telling me:
Code:
[email protected]:/ $ getprop ro.secure
getprop ro.secure
0
[email protected]:/ $ exit
exit
adb remount
[B]remount failed: Operation not permitted[/B]
Click to expand...
Click to collapse
Try this in terminal...
adb root
Then
adb remount
That should do it for ya.
task650 said:
Try this in terminal...
adb root
Then
adb remount
That should do it for ya.
Click to expand...
Click to collapse
Thanks for the reply! Right: I should probably be root before I try that command. Unfortunately, I tried "adb root" and it said: "adbd cannot run as root in production builds." I did some Google'ing and a few threads said that I should have changed ro.debuggable to 1 as well in default.prop.
So, I changed ro.debuggable=1 and, right, ro.secure=0 still. Then the oddest thing happened: I typed "adb root" into terminal and it went to a new line, no message. And then it disconnected my phone from ADB (I heard the little "ding ding" noise of disconnection). Unfettered, I typed in "adb remount," but of course then it complained that no devices were attached! I thought it was a fluke, so I tried it a few more times. It happened again and again.
In an ostensibly unrelated problem, I couldn't get SecSettings.apk to push back (even though android.policy.jar pushed fine), so I tried a Nandroid. TWRP seemingly did not like my changes to default.prop, as it went crazy (froze a few times) saying "cannot unmount /system" every time I tried a restore and then "Restore failed." Hmm...I pushed back my backed up boot.img and it restored fine.
I'm messing up somehow. So, I'm using VTS to unpack and repack the image. I saw that the output boot.img's are about 6MB, while the default ones I pulled are 10.1MB. Dev said it was probably just compression? Also, I'm pulling the boot.img via adb dd if=/dev/mnt/mmcblk0p7 of=/sdcard/boot.img. Are either of these too weird/wrong?
ikjadoon said:
Thanks for the reply! Right: I should probably be root before I try that command. Unfortunately, I tried "adb root" and it said: "adbd cannot run as root in production builds." I did some Google'ing and a few threads said that I should have changed ro.debuggable to 1 as well in default.prop.
So, I changed ro.debuggable=1 and, right, ro.secure=0 still. Then the oddest thing happened: I typed "adb root" into terminal and it went to a new line, no message. And then it disconnected my phone from ADB (I heard the little "ding ding" noise of disconnection). Unfettered, I typed in "adb remount," but of course then it complained that no devices were attached! I thought it was a fluke, so I tried it a few more times. It happened again and again.
In an ostensibly unrelated problem, I couldn't get SecSettings.apk to push back (even though android.policy.jar pushed fine), so I tried a Nandroid. TWRP seemingly did not like my changes to default.prop, as it went crazy (froze a few times) saying "cannot unmount /system" every time I tried a restore and then "Restore failed." Hmm...I pushed back my backed up boot.img and it restored fine.
I'm messing up somehow. So, I'm using VTS to unpack and repack the image. I saw that the output boot.img's are about 6MB, while the default ones I pulled are 10.1MB. Dev said it was probably just compression? Also, I'm pulling the boot.img via adb dd if=/dev/mnt/mmcblk0p7 of=/sdcard/boot.img. Are either of these too weird/wrong?
Click to expand...
Click to collapse
Are you running adb shell as superuser?
Try:
adb shell
su
adb remount
After typing su you will need to grant superuser permission on your device.
Things to check when pushing with adb:
System, app, and framework folders are mounted r/w in root explorer.
USB debugging is enabled.
I am lazy so I use Eclipse for pushing and pulling files.
Repacked boot images are almost always smaller than the original (sometimes a lot smaller).
upndwn4par said:
Are you running adb shell as superuser?
Try:
adb shell
su
adb remount
After typing su you will need to grant superuser permission on your device.
Things to check when pushing with adb:
System, app, and framework folders are mounted r/w in root explorer.
USB debugging is enabled.
I am lazy so I use Eclipse for pushing and pulling files.
Repacked boot images are almost always smaller than the original (sometimes a lot smaller).
Click to expand...
Click to collapse
EDIT: I gave up, haha. Thank you guys, though. I just copied and pasted both files onto /sdcard and then used the good 'ole adb shell mount -o remount,rw /system and then busybox cp of the files over. Copy worked. And the mod worked. And, honestly, I don't flash enough to make adb root worth it. It's a few extra seconds of my life to type the extra commands instead of taking 2 days to figure out this boot.img....
----
I re-did the ro.secure=0 edit in the boot.img through dsixda's kitchen, just to be sure it wasn't VTS. I also "flashed" it via adb dd in recovery this time instead of in Android. I also left ro.debuggable=0 as that does not seem pertinent to allowing adb to run as root, but simply to debug system apps, etc. Does anyone know any actual information on whether ro.debuggable=0 is required to allow adbd to run as root?
1) ADB shell as superuser: um, I didn't think about that! I thought adb root and adb remount were ADB commands, not shell commands? But, I tried it anyways, but it simply said "error: device not found". See http://prntscr.com/wvjmq
2) Right, ADB shell has SU rights as "always grant" per the SuperSU app.
3) Pushing with ADB: oh, huh! So, adb remount or mount -o remount,rw /system are not recursive? Meaning they only apply to the top-level directory? I think that's what you're saying, but that has never been a problem in the past...I think. And, technically, that doesn't explain why when I didn't mount /system/framework specifically android.policy.jar pushed fine. Pushing SecSettings.apk to /system/app causes a "Permission denied" error. Can Android reject apks? I did a few minor edits to SecSettings.apk, from this mod: http://forum.xda-developers.com/showthread.php?t=2002620
4) Thanks for the boot.img size clarification; got a little worried after having "lost" 40% of the image, haha!
tl;dr:
1) Using either VTS or dsixda's kitchen to modify boot.img to ro.secure=0 and running "adb root" = "adbd cannot run as root in production builds." Pulled and flashed boot.img via adb dd.
2) Unrelated to issue 1 (I think): after mounting system via adb shell (mount -o remount,rw /system), I cannot push SecSettings.apk into /system/app ("Permission denied"), while android.policy.jar pushes just fine /system/framework.
I appreciate everyone's help here. I think it's something really little that I've missed and I just can't figure it out.
ikjadoon said:
EDIT: I gave up, haha. Thank you guys, though. I just copied and pasted both files onto /sdcard and then used the good 'ole adb shell mount -o remount,rw /system and then busybox cp of the files over. Copy worked. And the mod worked. And, honestly, I don't flash enough to make adb root worth it. It's a few extra seconds of my life to type the extra commands instead of taking 2 days to figure out this boot.img....
----
I re-did the ro.secure=0 edit in the boot.img through dsixda's kitchen, just to be sure it wasn't VTS. I also "flashed" it via adb dd in recovery this time instead of in Android. I also left ro.debuggable=0 as that does not seem pertinent to allowing adb to run as root, but simply to debug system apps, etc. Does anyone know any actual information on whether ro.debuggable=0 is required to allow adbd to run as root?
1) ADB shell as superuser: um, I didn't think about that! I thought adb root and adb remount were ADB commands, not shell commands? But, I tried it anyways, but it simply said "error: device not found". See http://prntscr.com/wvjmq
2) Right, ADB shell has SU rights as "always grant" per the SuperSU app.
3) Pushing with ADB: oh, huh! So, adb remount or mount -o remount,rw /system are not recursive? Meaning they only apply to the top-level directory? I think that's what you're saying, but that has never been a problem in the past...I think. And, technically, that doesn't explain why when I didn't mount /system/framework specifically android.policy.jar pushed fine. Pushing SecSettings.apk to /system/app causes a "Permission denied" error. Can Android reject apks? I did a few minor edits to SecSettings.apk, from this mod: http://forum.xda-developers.com/showthread.php?t=2002620
4) Thanks for the boot.img size clarification; got a little worried after having "lost" 40% of the image, haha!
tl;dr:
1) Using either VTS or dsixda's kitchen to modify boot.img to ro.secure=0 and running "adb root" = "adbd cannot run as root in production builds." Pulled and flashed boot.img via adb dd.
2) Unrelated to issue 1 (I think): after mounting system via adb shell (mount -o remount,rw /system), I cannot push SecSettings.apk into /system/app ("Permission denied"), while android.policy.jar pushes just fine /system/framework.
I appreciate everyone's help here. I think it's something really little that I've missed and I just can't figure it out.
Click to expand...
Click to collapse
If you post the kernel (untouched) for me. I will go through the process myself. That when when/if it works I can tell you my exact steps so that you can try it out for yourself. Let me know exactly what you are trying to accomplish also.
task650 said:
If you post the kernel (untouched) for me. I will go through the process myself. That when when/if it works I can tell you my exact steps so that you can try it out for yourself. Let me know exactly what you are trying to accomplish also.
Click to expand...
Click to collapse
You guys are too kind. I feel like you have more important things to do than help a sucker like me. If you're very bored, go ahead.
Attached is my stock, unadulterated boot.img inside a zip. What I am trying to accomplish: push system files from ADB (without going into the shell). I think you need adbd to run as root to do that, right? So, an "insecure" kernel. Thus, I should be able to type "adb root" and then "adb remount" to make /system rw instead of ro and then type "adb push SystemUI.apk /system/app/SystemUI.apk" and it work. I thought I just needed to make ro.secure=0 in the boot.img's default.prop, but it looks like that is not enough.
But, honestly, if it looks like it takes too much time (I'm serious; I honestly think Samsung sent me a borked phone), it's all good. ADB shell and Busybox cp will suffice. I'm just more curious of what I am doing wrong here.
~Ibrahim~
Interesting. I am getting the same error (yes, ro.secure=0 and ro.debuggable=1).
As soon as I am finished with the update I am working on I will look in to this - unless Task figures it out first. If for no other reason, just because I want to know.
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Me>cd c:\android
c:\Android>adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
041b9c2b device
c:\Android>adb shell
[email protected]:/ $ adb root
adb root
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ $ su
su
[email protected]:/ # adb remount
adb remount
error: device not found
1|[email protected]:/ # adb root
adb root
error: device not found
1|[email protected]:/ #WTF?
upndwn4par said:
Interesting. I am getting the same error (yes, ro.secure=0 and ro.debuggable=1).
As soon as I am finished with the update I am working on I will look in to this - unless Task figures it out first. If for no other reason, just because I want to know.
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Me>cd c:\android
c:\Android>adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
041b9c2b device
c:\Android>adb shell
[email protected]:/ $ adb root
adb root
* daemon not running. starting it now on port 5038 *
* daemon started successfully *
error: device not found
1|[email protected]:/ $ su
su
[email protected]:/ # adb remount
adb remount
error: device not found
1|[email protected]:/ # adb root
adb root
error: device not found
1|[email protected]:/ #WTF?
Click to expand...
Click to collapse
You shouldn't be running adb root inside of a shell. You're running two instances of adb and only need the first connection. The reason you're getting device not found is because you're running an instance of adb on the device and it's looking for other devices. Try it again without running adb shell.
Sent from my SAMSUNG-SGH-I747
Related
Philosophical issues aside, how does one get this working? A crucial barcode program i use has amazingly annoying religious ads.
Here is what I have tried:
Rooted with Unrevoked / Nandroid Backup / Titanium Backup / wifiTether /Led flashlight. Stock otherwise.
Install adfree, ran it, phone rebooted.
Boot into clockwork recovery and launch adb shell.
Execute the following:
Code:
2. Install and run
3. allow it to download and install new hosts file, it will copy it to your sdcard and try to replace /system/etc/hosts but fail (it should reboot the phone shortly)
4. Power off the phone and hold Volume Down and power.
5. Use volume down to select recovery
6. In clockwork recovery volume down to "partitions menu" and hit the track pad to select
7. Select "mount /system" and "mount /sdcard" "mount /data"
8. Plug in your usb cord and open a command line on your pc
9. enter adb shell and type the following commands
cp /sdcard/hosts /data/data/hosts
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
On reboot, no change, and adfree fails trying to update. Help?
heliotropeUCSD said:
Code:
cp /sdcard/hosts /data/data/hosts
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
Click to expand...
Click to collapse
I found a post earlier that changes the paths. It has worked for me on every Rom I have tried.
Code:
cp /sdcard/hosts /data/hosts
rm /system/etc/hosts
ln -s /data/hosts /system/etc/hosts
Sent from my ADR6300
Hmmm, still didn't work. Can you go into a little bit more detail? I'm stock everything, just rooted.
The philosophical struggle goes deeper than what you think! Another method (frowned upon by most uninformed members of this forum but endorsed by some of the experts) is to do a tempoary nand unlock using the unrevoked tool.
Run the tool like normal, then unplug after the "running pre-boot sequence" and during "waiting for reboot". I've done it plenty of times perfectly, it allows you to run adfree normally without any special tricks (just default settings). I have no idea what happens if you unplugged at the wrong time (you have a like 20-second window ffs) but I hear it's bad.
Do it at your own risk
I'd just like to point out that I think the above suggestion is actually INTENDED to brick phones. I wouldn't recommend anyone try it. Does anyone have any real suggestions? I have a serious problem with religious ads on my f***ing telephone.
heliotropeUCSD said:
I'd just like to point out that I think the above suggestion is actually INTENDED to brick phones. I wouldn't recommend anyone try it. Does anyone have any real suggestions? I have a serious problem with religious ads on my f***ing telephone.
Click to expand...
Click to collapse
Listen bro, this method works just fine.
Run unrevoked 3.1 when you are in the OS, then it will reboot your phone to hboot and then it unlocks your nand, it will reboot and you will see the white incredible screen, at this time you can unplug your USB cable, I just suggest doing it before it gets back to the OS so you don't pull it when it is flashing your recovery, but if you do it at the white incredible screen or during the bootanimation. Then when you get back to the OS, run adfree and update your hosts, success, profit?
I can confirm that it will work 100% without bricking your phone. Anyone who said it has is full of ****. Don't listen to those **** smoking noobs out there that are hanging on to unrevoked teams ballsacks. This will not brick your phone if you do as I said above. If this bricked your phone then it would not be safe to use the unrevoked program period. So don't listen to the noobs out there, this method works 100% without issue. I posted this method awhile back and everyone got upset like I did something wrong, but people did verify it did work if you want to find the post I made look for it.
Hmm, well. I have no idea, it sounds like you may be right, but it isn't the type of solution that i am looking for.
I'd like to find a way to use the symbolic link method to store the hosts file somewhere where adfree can write to it. Does anyone else have an idea?
heliotropeUCSD said:
Hmm, well. I have no idea, it sounds like you may be right, but it isn't the type of solution that i am looking for.
I'd like to find a way to use the symbolic link method to store the hosts file somewhere where adfree can write to it. Does anyone else have an idea?
Click to expand...
Click to collapse
sym link doesnt work for me, um, I would just do what I stated above if all else you tried has failed.
I used the above method in the #1st Post on an 2.2 ROM with no issue! I can update Adfree at any point after completing those directions...
here is where I found those directions... http://www.jonamerica.com/technology/howto-root-the-htc-droid-incredible/
Hmm. I am really, genuinely scared of the method posted by TNS201. I believe him that it may work, but I simply don't understand the mechanism. Is he suggesting that this successfully unlocks the NAND memory? Or does it allow it to be unlocked for one boot cycle, in which case I can't update adfree?
heliotropeUCSD said:
Hmm. I am really, genuinely scared of the method posted by TNS201. I believe him that it may work, but I simply don't understand the mechanism. Is he suggesting that this successfully unlocks the NAND memory? Or does it allow it to be unlocked for one boot cycle, in which case I can't update adfree?
Click to expand...
Click to collapse
Why do say that it "may" work. I can confirm it works 100%, I wouldn't tell you something that doesn't. It unlocks the NAND for one boot. So you can write to system and such during this time. The duration of this lasts until you power off or reboot your phone. This stays active until next reboot. You can update adfree and reboot if you want.
TNS201 said:
Listen bro, this method works just fine.
Run unrevoked 3.1 when you are in the OS, then it will reboot your phone to hboot and then it unlocks your nand, it will reboot and you will see the white incredible screen, at this time you can unplug your USB cable, I just suggest doing it before it gets back to the OS so you don't pull it when it is flashing your recovery, but if you do it at the white incredible screen or during the bootanimation. Then when you get back to the OS, run adfree and update your hosts, success, profit?
I can confirm that it will work 100% without bricking your phone. Anyone who said it has is full of ****. Don't listen to those **** smoking noobs out there that are hanging on to unrevoked teams ballsacks. This will not brick your phone if you do as I said above. If this bricked your phone then it would not be safe to use the unrevoked program period. So don't listen to the noobs out there, this method works 100% without issue. I posted this method awhile back and everyone got upset like I did something wrong, but people did verify it did work if you want to find the post I made look for it.
Click to expand...
Click to collapse
...eloquently said, sir...
Anyway OP, if you don't wanna do it, that's fine. And I think it's wonderful that you don't care whether anyone questions your sexual orientation
(FUTURAMA REFERENCE, DON'T FLAME ME.)
Seriously, why are the uninformed so cocksure?
Yeah, but somebody must have gotten the symlink method to work. I'm not willing to risk bricking my phone in any way to do this- like I said, there are philosophical issues here. I'd rather just see the ads.
So, again- has anyone with an Incredible, rooted, stock rom, used the symlink method to install adfree?
heliotropeUCSD said:
Hmm. I am really, genuinely scared of the method posted by TNS201. I believe him that it may work, but I simply don't understand the mechanism. Is he suggesting that this successfully unlocks the NAND memory? Or does it allow it to be unlocked for one boot cycle, in which case I can't update adfree?
Click to expand...
Click to collapse
As stated in my earlier post, I have it working on my Incredible and it has worked for me on 4 different ROMS.
This may not work for you, but it does work for me. I found these tips awhile ago and don't remember where I found them.
NOTE: Notice the paths in the commands below - They differ from the original post.
Boot into clockwork recovery and launch adb shell.
Execute the following:
Code:
2. Install and run
3. allow it to download and install new hosts file, it will copy it to your sdcard and try to replace /system/etc/hosts but fail (it should reboot the phone shortly)
4. Power off the phone and hold Volume Down and power.
5. Use volume down to select recovery
6. In clockwork recovery volume down to "partitions menu" and hit the track pad to select
7. Select "mount /system" and "mount /sdcard" "mount /data"
8. Plug in your usb cord and open a command line on your pc
9. enter adb shell and type the following commands
cp /sdcard/hosts /data/hosts
rm /system/etc/hosts
ln -s /data/hosts /system/etc/hosts
Note the last command, that it a lowercase L not an I
a couple of others have made that mistake (for best results copy each command to your clipboard and paste it into your command prompt).
Reboot the phone and it should work now.
Use BTC IP and do not check symlink from /data/data/hosts
{
"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"
}
gadget!
heliotropeUCSD said:
Yeah, but somebody must have gotten the symlink method to work. I'm not willing to risk bricking my phone in any way to do this- like I said, there are philosophical issues here. I'd rather just see the ads.
So, again- has anyone with an Incredible, rooted, stock rom, used the symlink method to install adfree?
Click to expand...
Click to collapse
Are you getting any errors in the shell when you type the commands?
should look like this when you enter a command
Code:
# ln -s /data/data/hosts /system/etc/hosts <--hit enter
ln -s /data/data/hosts /system/etc/hosts
#
First, can you go into recovery, and let me know if this command returns hosts
Code:
ls /data/data | grep hosts
This lists the directory and "filters" out everything but the text after grep.
output should look like:
Code:
# ls /data/data | grep hosts
ls /data/data | grep hosts
hosts
#
I need to know, because I think that adfree might not have made a hosts file on your sdcard when you ran before starting, thus there was no hosts file to "cp" form /sdcard to /data/data/.
If that is the case, and since you have rm'ed your hosts file from /system/etc/, you will have to recreate the file with the touch command.
My $.02
***********************************
It is NOT necessary to run or even install adfree before getting your hosts files setup in the system.
Here is the method I use:
1. copy the existing hosts file to /data/data
Code:
cp /system/etc/hosts /data/data/hosts
2. rename hosts to hosts.bak
Code:
mv /system/etc/hosts /system/etc/hosts.bak
3. symlink the hosts files
Code:
ln -s /data/data/hosts /system/etc/hosts
At that point, your system is setup to run adfree. On the first run of adfree, it will see the hosts file in /data/data and uses it.
I have use this method at least 10 times while trying out different roms:
Hell to the yes. gadget!'s method worked for me- I did not know NOT to use local IP and to NOT check the symlink button. Maybe someone can educate me on what those options mean?
Glad it worked out for you =). j/w, is the app that kept giving you religious ads "Android System Info"? For some reason the people behind that app have decided to lock the ad into messages about "Jesus" or "prayers"... I always thought that was kind of odd.
Adfree works without issue after running unrevoked forever. No symlink needed.
Sent from my ADR6300 using XDA App
bhazard451 said:
Adfree works without issue after running unrevoked forever. No symlink needed.
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Thanks for the info, came here to ask this question. Do I need to check symlink in the adfree setup?
gadget! said:
As stated in my earlier post, I have it working on my Incredible and it has worked for me on 4 different ROMS.
This may not work for you, but it does work for me. I found these tips awhile ago and don't remember where I found them.
NOTE: Notice the paths in the commands below - They differ from the original post.
Boot into clockwork recovery and launch adb shell.
Execute the following:
Code:
2. Install and run
3. allow it to download and install new hosts file, it will copy it to your sdcard and try to replace /system/etc/hosts but fail (it should reboot the phone shortly)
4. Power off the phone and hold Volume Down and power.
5. Use volume down to select recovery
6. In clockwork recovery volume down to "partitions menu" and hit the track pad to select
7. Select "mount /system" and "mount /sdcard" "mount /data"
8. Plug in your usb cord and open a command line on your pc
9. enter adb shell and type the following commands
cp /sdcard/hosts /data/hosts
rm /system/etc/hosts
ln -s /data/hosts /system/etc/hosts
Note the last command, that it a lowercase L not an I
a couple of others have made that mistake (for best results copy each command to your clipboard and paste it into your command prompt).
Reboot the phone and it should work now.
Use BTC IP and do not check symlink from /data/data/hosts
gadget!
Click to expand...
Click to collapse
This worked perfectly for me. Thanks.
There's already a guide here for obtaining permanent root using VISIONary, but some folks in #G2ROOT are having issues with the way that VISIONary modifies parititons. Using rage directly is a bit cleaner, since you know exactly what it's going to touch at each step of the way. I did NOT come up with any of this on my own, I'm building completely off of work that others have done. Speaking of which-
None of this would be possible without the tireless work that scotty2 put in. He stayed with the project for well over a month, through lots of smashed hopes and dead ends, until the solution was finally found. Were it not for his work, as well as the help of a few other key folks- we wouldn't be here. He deserves our thanks and some donations! We're talking hundreds of hours of work here, a couple bucks is not too much for that. His paypal is:
[email protected]Send him some love! I'm not asking for anything myself, because I spent a half hour putting this together, and that doesn't deserve any donations!
[size=+2]G2 ROOT INSTRUCTIONS[/size]
=================================================
These are modified instructions based on the ones posted at http://bit.ly/g2root that use Visionary. A number of people have run into issues with the way that Visionary juggles around temporary partitions, and using the original root exploit is a much easier, and cleaner method for achieving permanent root. This tutorial will walk you through the rooting process by first achieving temporary root, and moving on to permanent root.
[size=+1]REQUIREMENTS[/size]
=================================================
Visionary disabled at boot or uninstalled completely
Android Terminal Emulator app
ADB
vision-combined-root.zip (Attached to this post, OR these two files: )
G2TempRoot.zip (http://forum.xda-developers.com/showthread.php?t=797042) NOTE: only download the files! Don't follow these instructions yet
vision-perm-root.zip (http://forum.xda-developers.com/showthread.php?t=833965) NOTE: again, just download the files from the thread.
In the commands to run below, $ or # represent the prompt and should NOT be entered as part of the commands.
[size=+2]VERY IMPORTANT![/size]Visionary has caused filesystem corruption for some users during the rooting process. Before attempting the instructions below, make sure that you have "auto run on boot" turned OFF, and reboot your system. Since you will not need visionary anyway after this, you might as well just uninstall visionary and reboot NOW before doing anything.
[size=+1]TEMP ROOT[/size]
=================================================
ON YOUR PC:
Unzip the G2TempRoot files to a folder. From a cmd window or terminal, navigate to that folder and execute these commands:
Code:
$ adb push su /sdcard/su
$ adb push Superuser.apk /sdcard/Superuser.apk
$ adb push rage /data/local/tmp/rage
$ adb push busybox /data/local/tmp/busybox
$ adb push root /data/local/tmp/root
$ adb shell chmod 0755 /data/local/tmp/*
ON YOUR PHONE:
Launch Terminal Emulator
/data/local/tmp/rage
Wait for the message: "Forked #### childs."
Menu > Reset Term - Terminal Emulator will exit.
Launch Terminal Emulator, it Force Closes. Launch a second time, and you'll have a root shell
**NOTE**: in the original directions from the XDA thread, you are instructed to run the /data/local/tmp/root script here. DON'T do this
just yet. Leave the terminal window open.
[size=+1]PERM ROOT[/size]
=================================================
ON YOUR PC:
unzip the vision-perm-root.zip and navigate to that folder. There will be four files. You will need to push two of these to your phone- hboot-eng.img, and one of the wpthis-[..].ko files.
If you HAVE applied the OTA update, push wpthis-OTA.ko.
If you HAVE NOT applied the OTA update, push wpthis-pre-OTA.ko.
Code:
$ adb push hboot-eng.img /data/local
$ adb push wpthis-OTA.ko /data/local
ON YOUR PHONE:
You should still have terminal emulator up, at a root prompt. Now run:
Code:
# insmod /data/local/wpthis-OTA.ko
You should see:
Code:
init_module 'wpthis-OTA.ko' failed (Function not implemented)
That means it worked. This next step is CRUCIAL. You must make sure that you are writing to the proper partition here or you could brick your phone. To be absolutely clear- the partition is mmcblk(zero)p(one)(eight)
Code:
dd if=/data/local/hboot-eng.img of=/dev/block/mmcblk0p18
You should see some messages indicating that it was written. Next, run:
Code:
# /data/local/tmp/root
This will lock in root, and give you 'su' access in the future. Next, run:
Code:
# sync
Now wait at least a minute, just to be safe. After waiting, reboot your phone using the power button. After it finishes starting up, launch the terminal emulator, and type 'su'. You should get the prompt asking you to grant permissions. If you got the prompt, congratulations! You have permanent root!
I used these instructions and they worked brilliantly.
Sounds like it's a little safer than using VISIONary, which some people in the thread are reporting can get confused and not let you root because it thinks you already have root, etc.
I love it when a plan comes together. Perma-root. thanks man, i never had much luck getting visonary to work so this was spot on. worked like a charm
*not smart enough*
*leaves thread*
I really try to leave ADB out of the equation since I'm not comfortable navigating it.... I suppose I could dedicate my time to learning it, but it's not worth it since I would only use it once every two years to root my phone. In 16 hours I'm sure there will probably be a one click perm root method out anyway.
It worked flawlessly!
I always get so stressed when I root my phones, especially without tutorial vids.
I first did my G1 and that worked perfectly fine.
My second attempt at rooting was with my MT3G and that resulted in a bricked device because one of the lines of code was incorrect in the thread.
This, however, was clearly and plainly spelled out exactly to what happened to my phone.
I give you my thanks.
Awesome- glad to hear it's working well for people. If anybody sees areas that I could improve in the description just let me know.
sinistersai4d4d said:
I really try to leave ADB out of the equation since I'm not comfortable navigating it....
Click to expand...
Click to collapse
ADB is worth it IMHO because it makes moving files around easy, whether you're rooted or not. You don't have to turn on SD card storage, you can just do adb pull/push etc to grab or put files when you need them. Worth the effort. The one click root should be out within the next couple days though, you are right about that one.
trigeek,
I already perm rooted earlier, but just wanted to say you gave a very nicely detailed explanation that anyone should be able to follow. Well done!
Great guide. I liked it a lot more than Unforgivens just because it doesn't rely on VisionARY which might mess things up.
Guide worked absolutely great, no problems. I did not try the visionary method first, but for some reason I just felt safer doing it in adb.
Thank you!
Sorry for the noob question...? but does this mean we have fully rooted to G2 and now we can load ROMS on it when they come out ????
Edit: Nevermind I didnt see the sticky
RaffieKol said:
Sorry for the noob question...? but does this mean we have fully rooted to G2 and now we can load ROMS on it when they come out ????
Click to expand...
Click to collapse
You got it!
RaffieKol said:
Sorry for the noob question...? but does this mean we have fully rooted to G2 and now we can load ROMS on it when they come out ????
Edit: Nevermind I didnt see the sticky
Click to expand...
Click to collapse
Custome ROMs, custom Recovery...the whole 9 yards
Thanks for posting this, it was so easy!
Thank you so very much it was a success
this is my first rooting on an android device... im freaking out... but here i go.... if something happens i will just report my phone lost and get a new one i guess ahahah still... im scared.
Issues
I was temp rooted before using rage and then thru Visionary. But I decided to go back to stock till we have permanent root. I perm rooted today using this method. But I'm having the following issues:
1) adb remount
- remount failed: Operation not permitted
2) when using Root Explorer in /system, toggling Mount R/W does not work
- the only way to mount it R/O is thru terminal/adb shell. Once mounted R/O, the only way to mount R/W again is thru a reboot. Issuing mount -o remount ro /system either in terminal or adb shell does not work.
i actually changed my mind... im going to wait for a one click untended root i guess.... to scary...
joackie27 said:
I was temp rooted before using rage and then thru Visionary. But I decided to go back to stock till we have permanent root. I perm rooted today using this method. But I'm having the following issues:
1) adb remount
- remount failed: Operation not permitted
2) when using Root Explorer in /system, toggling Mount R/W does not work
- the only way to mount it R/O is thru terminal/adb shell. Once mounted R/O, the only way to mount R/W again is thru a reboot. Issuing mount -o remount ro /system either in terminal or adb shell does not work.
Click to expand...
Click to collapse
make sure you have debugging enabled.
juanshop said:
i actually changed my mind... im going to wait for a one click untended root i guess.... to scary...
Click to expand...
Click to collapse
Not gonna happen.
then i guess.... im going to jump in it.... wish me luck...
This thread is copied and modified from the G2 thread by trigeek for the Desire Z:
http://forum.xda-developers.com/showthread.php?t=834228
Apart from the changed hboot and wpthis-Z kernel module for the Desire Z instead of the G2, I have also updated the su-binary and SuperUser.apk to the latest version by ChainsDD
In no way I can be held responsible for any bricks to your phone. You are using this guide at your own risk!! I did test this guide on my own, and also on a friend's Desire Z.
As there was no manual rooting guide for the Desire Z, I posted it myself in order to help others that do not like visionary and like to do it 'the clean way'.
[GUIDE] Temp to permanent root on Desire Z, using rage instead of visionary
=================================================
There's already a guide here for obtaining permanent root using VISIONary, but some folks in #G2ROOT are having issues with the way that VISIONary modifies parititons. Using rage directly is a bit cleaner, since you know exactly what it's going to touch at each step of the way. I did NOT come up with any of this on my own, I'm building completely off of work that others have done. Speaking of which-
None of this would be possible without the tireless work that scotty2 put in. He stayed with the project for well over a month, through lots of smashed hopes and dead ends, until the solution was finally found. Were it not for his work, as well as the help of a few other key folks- we wouldn't be here. He deserves our thanks and some donations! We're talking hundreds of hours of work here, a couple bucks is not too much for that. His paypal is:
[email protected]
Send him some love! I'm not asking for anything myself, because I spent a half hour putting this together, and that doesn't deserve any donations!
DESIRE Z ROOT INSTRUCTIONS
=================================================
These are modified instructions based on the ones posted at http://bit.ly/g2root that use Visionary. A number of people have run into issues with the way that Visionary juggles around temporary partitions, and using the original root exploit is a much easier, and cleaner method for achieving permanent root. This tutorial will walk you through the rooting process by first achieving temporary root, and moving on to permanent root.
REQUIREMENTS
=================================================
•Visionary disabled at boot or uninstalled completely
•Android Terminal Emulator app
•ADB
•desirez-combined-root.zip (Attached to this post)
In the commands to run below, $ or # represent the prompt and should NOT be entered as part of the commands.
VERY IMPORTANT!
Visionary has caused filesystem corruption for some users during the rooting process. Before attempting the instructions below, make sure that you have "auto run on boot" turned OFF, and reboot your system. Since you will not need visionary anyway after this, you might as well just uninstall visionary and reboot NOW before doing anything.
TEMP ROOT
=================================================
ON YOUR PC:
Unzip the z-temp-root files to a folder. From a cmd window or terminal, navigate to that folder and execute these commands:
Code:
$ adb push su /sdcard/su
$ adb push Superuser.apk /sdcard/Superuser.apk
$ adb push rage /data/local/tmp/rage
$ adb push busybox /data/local/tmp/busybox
$ adb push root /data/local/tmp/root
$ adb shell chmod 0755 /data/local/tmp/*
ON YOUR PHONE:
1.Launch Terminal Emulator
2.
Code:
/data/local/tmp/rage
3.Wait for the message: "Forked #### childs."
4.Menu > Reset Term - Terminal Emulator will exit.
5.Launch Terminal Emulator, it Force Closes. Launch a second time, and you'll have a root shell
6.**NOTE**: in the original directions from the XDA thread, you are instructed to run the /data/local/tmp/root script here. DON'T do this just yet. Leave the terminal window open.
PERM ROOT
=================================================
ON YOUR PC:
unzip z-perm-root and navigate to that folder. There will be four files. You will need to push two of these to your phone: hboot_7230_0.84.2000_100908.nb0 and wpthis-Z.ko. The other two files are optional for checksum verification.
Code:
$ adb push hboot_7230_0.84.2000_100908.nb0 /data/local
$ adb push wpthis-Z.ko /data/local
Optional but might came in handy:
Code:
$ adb push md5checksum /sdcard/md5checksum
ON YOUR PHONE:
You should still have terminal emulator up, at a root prompt. Now run:
Optional but recommended:
Code:
# /data/local/tmp/busybox md5sum /data/local/*
You should see:
hboot_7230_0.84.2000_100908.nb0 2ce1bdd5e4c1119ccfcecb938710d742
wpthis-Z.ko c73c5e77c91d306c418983c002b60b93
In case your hboot or wpthis-Z.ko file do not have the same md5hash as shown above, DO NOT CONTINUE. This means your file is corrupt or you are using a different file, for example the one for the G2 instead of Desire Z.
Now, let's turn off security for permanent flashing:
Code:
# insmod /data/local/wpthis-Z.ko
init_module 'wpthis-Z.ko' failed (Function not implemented)
That means it worked. This next step is CRUCIAL. You must make sure that you are writing to the proper partition here or you could brick your phone. To be absolutely clear- the partition is mmcblk(zero)p(one)(eight)
# dd if=/data/local/hboot_7230_0.84.2000_100908.nb0 of=/dev/block/mmcblk0p18
Click to expand...
Click to collapse
You should see some messages indicating that it was written.
Code:
# /data/local/tmp/root
This will lock in root, and give you 'su' access in the future. Next, run:
Code:
# sync
Now wait at least a minute, just to be safe. After waiting, reboot your phone using the power button. After it finishes starting up, launch the terminal emulator, and type 'su'. You should get the prompt asking you to grant permissions. If you got the prompt, congratulations! You have permanent root!
Nice guide, thanks
Thank you Mr Q. works like a charm!
first of all.. thanks for this great guide. Everything went perfect until I came to the step to lock in root. After the command "/data/local/tmp/root" I get this error:
mkdir failed for /system/xbin, File exists
when I just ignore it and type sync after that I have no root acces after a reboot.
Does anybody have a solution for it? I have already done a hardreset with the same results.
thanks in advance...
So this only roots your phone? Or does it s-off as well? From what I understand this s-offs as well because you're pushing the hboot as well.
EDIT: Nevermind. I read the thread again and it does indeed s-off as well.
MarDor said:
first of all.. thanks for this great guide. Everything went perfect until I came to the step to lock in root. After the command "/data/local/tmp/root" I get this error:
mkdir failed for /system/xbin, File exists
when I just ignore it and type sync after that I have no root acces after a reboot.
Does anybody have a solution for it? I have already done a hardreset with the same results.
thanks in advance...
Click to expand...
Click to collapse
Everything was fine up until this point. So i restarted the phone and phone is stuck on the "quietly brilliant" screen
ssyed said:
Everything was fine up until this point. So i restarted the phone and phone is stuck on the "quietly brilliant" screen
Click to expand...
Click to collapse
having the same issue here
So I'm looking into these S-OFF and rooting threads and here is two bricks too. Does anyone have an answer for these two or should I skip this? Did the hboot do this or was it due to some problem in inserted kernel module? (I.E. the reboot of the emmc controller resulted in a ****ed up file system?)
yelti said:
having the same issue here
Click to expand...
Click to collapse
AnyDone said:
So I'm looking into these S-OFF and rooting threads and here is two bricks too. Does anyone have an answer for these two or should I skip this? Did the hboot do this or was it due to some problem in inserted kernel module? (I.E. the reboot of the emmc controller resulted in a ****ed up file system?)
Click to expand...
Click to collapse
Ok, so I have figured out how to get out of this "quietly brilliant" loop.
First of all, this isn't a brick and all that is needed to fix this is a quick factory reset from the bootloader.
ssyed said:
First of all, this isn't a brick and all that is needed to fix this is a quick factory reset from the bootloader.
Click to expand...
Click to collapse
Ok, so does any one have an explanation why this happened?
1. It wasn't wrong or screwed hboot, otherwise we would be facing a real brick?
Was it the root method? Was it the wpthis-Z.ko?
It might have been the kernel module, but I can't be sure about that with so little knowledge I have. (sure not the module itself but the kick to the emmc?) Just that it seems to be more likely option than a rooting attempt on a cached r-o file system?
I'm not complaining about the guide, it is specific and easy to follow but I would really love to have these semi bricks etc inspected more closely. It is not really helping to encourage ppl to root and try safe-off when we have unexplained bricks and semi-bricks around
MarDor said:
first of all.. thanks for this great guide. Everything went perfect until I came to the step to lock in root. After the command "/data/local/tmp/root" I get this error:
mkdir failed for /system/xbin, File exists
Click to expand...
Click to collapse
ssyed said:
Everything was fine up until this point. So i restarted the phone and phone is stuck on the "quietly brilliant" screen
Click to expand...
Click to collapse
yelti said:
having the same issue here
Click to expand...
Click to collapse
Did you guys run Visionary before trying this "rage" method of rooting ?
steviewevie said:
Did you guys run Visionary before trying this "rage" method of rooting ?
Click to expand...
Click to collapse
I don't know about others, but I didn't on mine. I was rooting it for the first time. Also, I don't know if this has anything to do with it, but I have the Bell version from Canada.
The root script threw an error for me too, so just to be safe I opened the script and typed in the commands manually. If you have problems with the script, just run these commands from the root terminal on your phone:
Code:
/data/local/tmp/busybox killall rage
mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
mkdir /system/xbin
/data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox
chmod 4755 /system/xbin/busybox
/system/xbin/busybox --install -s /system/bin
cp /sdcard/Superuser.apk /system/app/Superuser.apk
cp /sdcard/su /system/bin/su
chmod 4755 /system/bin/su
mount -o ro,remount -t ext3 /dev/block/mmcblk0p25 /system
sync
"mkdir /system/xbin" just creates a directory, if it already exists you can ignore this command and proceed.
Hope this helps someone.. Thanks to the OP for the scripts.
Have a quick look, /system/xbin already seems to exist on my phone too.
So is there an error in the script ? e.g. needs to ignore if the directory already exists ? Or am I (we ?) missing something ?
goldenarmZ said:
"mkdir /system/xbin" just creates a directory, if it already exists you can ignore this command and proceed.
Click to expand...
Click to collapse
Good info, thanks. Perhaps just comment out that line of the script, to save running it all by hand (and therefore be prone to more error ?) ?
steviewevie said:
Good info, thanks. Perhaps just comment out that line of the script, to save running it all by hand (and therefore be prone to more error ?) ?
Click to expand...
Click to collapse
I did that first.. it threw more errors with the mount commands because I'd already run the script once, so some of the commands were repated. If it's your first run through, commenting it out would be fine.
I only did it line by line so I could see any more errors for myself and decide if they were important. As it turns out the script is very simple and only involves moving files around and changing their permissions.. anything that goes wrong should be immediately apparent even if you have no experience with shell commands.
goldenarmZ said:
I only did it line by line so I could see any more errors for myself and decide if they were important. As it turns out the script is very simple and only involves moving files around and changing their permissions.. anything that goes wrong should be immediately apparent even if you have no experience with shell commands.
Click to expand...
Click to collapse
Thanks, I was starting to worry about the bad experiences outlined above, given that this method appeared to be a more reliable one than VISIONary, and a route I was going to go down. But I'm pretty comfortable with shell scripts, so your input makes me feel a whole lot better !
goldenarmZ said:
The root script threw an error for me too, so just to be safe I opened the script and typed in the commands manually. If you have problems with the script, just run these commands from the root terminal on your phone:
-code-
"mkdir /system/xbin" just creates a directory, if it already exists you can ignore this command and proceed.
Hope this helps someone.. Thanks to the OP for the scripts.
Click to expand...
Click to collapse
thanks for this... I will give it a try
Yay, I just perma-rooted my phone using this method, many thanks to those who came up with the method in the first place, plus this handy guide too.
I got the message about /system/xbin already existing, but you can just ignore that message, it runs the rest of the script anyway.
ssyed said:
Ok, so I have figured out how to get out of this "quietly brilliant" loop.
First of all, this isn't a brick and all that is needed to fix this is a quick factory reset from the bootloader.
Click to expand...
Click to collapse
So after doing the guide you simply reeboot your phone into bootloader and select factory reset?
And then will the device be perm root and s-off???
I'm trying the rage root method after reading up on all the stuff. I managed to get adb installed and connected, but i can't use adb actions.
I type in c\androidsdk\tools\adb shell
$ su
$ SUermission denied
even without su, if i try to type "adb push su /sdcard/su" it says adb permission denied.
I have kept my phone screen on as per another thread, but i do not get a prompt that asks for adb permissions. Am i missing an app or something? I do have debugging and screen awke both on.
I have placed the g2 root folder in the androidsdk\tools\ folder, both just the files and the entire folder just to be sure.
Obviously I'm new to adb, so If i'm doing something completely wrong just let me know.
as long as you're not rooted (temp or perma) you can't use "su" in adb-commands... If you tell a little more about what you're trying to push, then I can help some more
Im just trying to root the phone with rage since visionary seems unreliable.
Im trying to adb push the su/ sdcard/su as per the first line of instruction in the rage temp root guide
hehe... I used the visionary root, and it have worked good for me btw, I think you should've posted in the rage-thread instead of opening a new topic, but now it's already opened so here it goes
firstly... are you sure you're in the right folder, and have the folder "su" in there?
If so, don't go into "adb shell"... use the lines exactly as stated in the OP. adb inside an adb shell won't give the results you want... Post back if it doesn't work
$ adb push su /sdcard/su
$ adb push Superuser.apk /sdcard/Superuser.apk
$ adb push rage /data/local/tmp/rage
$ adb push busybox /data/local/tmp/busybox
$ adb push root /data/local/tmp/root
$ adb shell chmod 0755 /data/local/tmp/*
Click to expand...
Click to collapse
I don't think Im using adb right then, how do I just type in "adb push ...?" If I do that, it just says that the command is not recognized internally or externally.
For example,
Adb push su/ sdcard/su
gives me that error.
I've tried to set a path directly to adb, but that didn't work, so I was manually going
AndroidSKD\tools\ Adb push su/ sdcard/su but that also didnt work.
I don't have the $ prompt without shell, is that wrong?
I'm pretty sure Im in the right folder, as androidsdk\tools\adb gives me the adb directory, just nothing else works. What exactly does SU folder mean? I have the su file in the tools folder, dont know about the su folder.
Ok, my adb stuff is in c:\tools .. so when I first open command prompt, I have to type this:
cd c:\tools
That puts me into the correct folder. If yours is in C, then you'd probably have to do this:
cd c:\androidsdk\tools
Then type:
adb devices
It should at least give you SOME sort of output, either with your device number (if it's connected, and adb is working properly), or just say devices, with no numbers (incorrectly)
dwang93 said:
I don't think Im using adb right then, how do I just type in "adb push ...?" If I do that, it just says that the command is not recognized internally or externally.
For example,
Adb push su/ sdcard/su
gives me that error.
I've tried to set a path directly to adb, but that didn't work, so I was manually going
AndroidSKD\tools\ Adb push su/ sdcard/su but that also didnt work.
I don't have the $ prompt without shell, is that wrong?
I'm pretty sure Im in the right folder, as androidsdk\tools\adb gives me the adb directory, just nothing else works. What exactly does SU folder mean? I have the su file in the tools folder, dont know about the su folder.
Click to expand...
Click to collapse
You, apparently, need to read some more.
Do it exactly as written here
http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2
FYI you will not see the $ symbol. that just indicated the next line you have to enter in commnad prompt. Each time you see $ just mean you type that line then press enter. Wait to see a result of transfer from prompt then enter next line and so on.
rsxtypes72 said:
You, apparently, need to read some more.
Do it exactly as written here
http://forum.xda-developers.com/wiki/index.php?title=HTC_Vision#Rooting_the_G2
Click to expand...
Click to collapse
This!! I'll be kind though.
Make your life easy. Unzip the contents of g2TempRoot, to your tools folder, in sdk. So, unzip the g2temproot to your desktop. Go into that folder. Copy all, and move them to c:\androidsdk\tools. Now, once that's done, go into command prompt. cd c:\androidsdk\tools. Then, do as follows, as per that link
$ adb push su /sdcard/su
$ adb push Superuser.apk /sdcard/Superuser.apk
$ adb push rage /data/local/tmp/rage
$ adb push busybox /data/local/tmp/busybox
$ adb push root /data/local/tmp/root
$ adb shell chmod 0755 /data/local/tmp/*
(Sorry I couldn't be of more help, as I used VisionaryR12 and it worked fine for me.)
One more word of advise...
I would recommend you try temp root first.
Become used to using adb then try to get full root.
When you use temp root everything you do is temporary only.
Rebooting will reset everything back to stock so its good practice.
thanks for the help guys, but i figured it out. I just wasn't in the right directories from the get go.
Edit: Just finished the perm root! And it didn't brick.
dwang93 said:
thanks for the help guys, but i figured it out. I just wasn't in the right directories from the get go.
any tips on going onto the perm root?
Click to expand...
Click to collapse
Read .. research .. double check .. triple check .. and right before you do it .. check again. As you're doing it, go over every letter, space, and character to make sure it's as it should be.
On the subject of adb, I have it installed, but when I run adb devices to find my phone, I get "???????????? no permissions". What am I doing wrong here?
Daughain said:
On the subject of adb, I have it installed, but when I run adb devices to find my phone, I get "???????????? no permissions". What am I doing wrong here?
Click to expand...
Click to collapse
Upload a screen shot of your command window
with the error
dwang93 said:
thanks for the help guys, but i figured it out. I just wasn't in the right directories from the get go.
Edit: Just finished the perm root! And it didn't brick.
Click to expand...
Click to collapse
dude..I think I am doing something like you...could you please post what you did....I think is an issue of directories..but I'm not that familiar with adb and i have not been able to figure this out.....
Thanks!!!
I'm coming from a long time being on Windows 7 and regular shell. I'm trying to transition to powershell but cannot find a way to get root permission to android /system via ADB script. This worked formally:
adb shell su -c "mount -o rw,remount /system"
This no longer works. When trying to set chmod or copy systemui.apk to system in bash script I get "Read Only file system".
Any help with this would be extremely helpful and I would be grateful. I've googled and googled and nothing seems to work.
Well, kind of cheating but you could put. cmd.exe /c in front of it. May need to quote the rest.
I am assuming you right clicked and ran power shell as administrator then input your commands?
I always just type cmd before doing anything to switch back over to traditional command prompt for the rest of the session.
Tulsadiver said:
I'm coming from a long time being on Windows 7 and regular shell. I'm trying to transition to powershell but cannot find a way to get root permission to android /system via ADB script. This worked formally:
adb shell su -c "mount -o rw,remount /system"
This no longer works. When trying to set chmod or copy systemui.apk to system in bash script I get "Read Only file system".
Any help with this would be extremely helpful and I would be grateful. I've googled and googled and nothing seems to work.
Click to expand...
Click to collapse
You may already know that in Windows settings you can revert to the old CMD window instead of PS if you like, and also add a right-click context menu item to "open a new command window here" which is handy. You can easily find both these tips online. BUT I'm not sure if Windows has anything to do with your issue... I think this is due to Android security and the kernel. I ran into this earlier trying to modify contents in the Program folder. Terminal with su, nor root file explorers can change permissions either. There are a couple of threads discussing this this on XDA. The jist of it was that the kernel would have to be modified and I don't know of any custom kernels that have been (or whether it is possible). I know it was requested for EX Kernel but I never saw a follow up.
I appreciate all the responses. I've tried so many things I'm just a little worn out. I believe I'll just abandon my ADB mod Installer for now. My Zip method is better anyway (in my opinion) but it would be nice to still have the ADB Installer method working in those cases where TWRP isn't working.