Ok, so I must admit I am still learning stuff. I have a deodexed KA5 that I would like to post but have been unable to add root to it. I have the su binary in /system/bin and the superuser.apk in /system/app, but when I flash the rom in recovery I get an su symlink error and the installation aborts. Any help would be appreciated. Thank you.
I may not be able to help, but if you post it... we can download and look in there.
I think I might have got it figured out. It has to do with how the update-script is set up and they weren't matching up. Gonna try repacking this and giving it another go. Really want to get this out to ppl.
Yay it boots!
is it odexed or deodexed?
Also, you need the su binary in /system/bin but it also needs to symlink to /system/xbin.
If you're doing an odexed rom, the recent releases haven't had enough room to add root and install busy box and keep everything the same. So you'll need to remove some bloat from the system file (which you can add to the data file) in order to have root with busy box.
Related
I've been building from AOSP for a few weeks now and have a decent product, but there's a couple things that I have yet to work out.
First is adding root permissions (i.e. changing the permissions to su) from source. Currently, I have pulled this[URL] code from ChainsDD's github into my tree and added the Superuser.apk via my [URL="http://github.com/rmgeren/android_vendor_rmg/blob/master/products/rmg_passion.mk"]vendor file. Some things work, others don't. Rommanager seems to be fine, but Titanium Backup isn't. I think the problem is that su is installed into /system/bin but not xbin. When I use dsixda's rom kitchen it installs to both places and sets the permissions for su in my update-script.
Second part is more of a "like to have." I make a nice ROM, install it via RomManager (like everyone should!) and, as soon as I boot, I'm back into RomManager installing the custom recovery image.
Here's the question part:
How do I get su to install to /system/bin with a symlink to /system/xbin?
Can I just pull koush's recovery image source into my build and have a nice, custom recovery?
Is it better to just somehow not build the recovery image? How would I make that happen?
RMGeren said:
I've been building from AOSP for a few weeks now and have a decent product, but there's a couple things that I have yet to work out.
First is adding root permissions (i.e. changing the permissions to su) from source. Currently, I have pulled this[URL] code from ChainsDD's github into my tree and added the Superuser.apk via my [URL="http://github.com/rmgeren/android_vendor_rmg/blob/master/products/rmg_passion.mk"]vendor file. Some things work, others don't. Rommanager seems to be fine, but Titanium Backup isn't. I think the problem is that su is installed into /system/bin but not xbin. When I use dsixda's rom kitchen it installs to both places and sets the permissions for su in my update-script.
Second part is more of a "like to have." I make a nice ROM, install it via RomManager (like everyone should!) and, as soon as I boot, I'm back into RomManager installing the custom recovery image.
Here's the question part:
How do I get su to install to /system/bin with a symlink to /system/xbin?
Can I just pull koush's recovery image source into my build and have a nice, custom recovery?
Is it better to just somehow not build the recovery image? How would I make that happen?
Click to expand...
Click to collapse
For the symlink, just add the following to your updater-script (assuming you're using a binary update) immediately after you extract the system partition.
Code:
symlink("../xbin/su", "/system/bin/su");
If you include a recovery image in your build you will overwrite the users' recovery image which isn't such a good idea for a rom... I'd leave that one alone to be honest. And problems writing the image and you could bork their phone. It's easy though, just create the .img, put it in the root of your update zip and install it using your updater-script as such:
Code:
assert(package_extract_file("recovery.img", "/tmp/recovery.img"),
write_raw_image("/tmp/recovery.img", "recovery"),
delete("/tmp/recovery.img"));
I don't understand your third question sorry...
Thanks for the response! I actually solved the problem by including busybox as a pre built package and pulling the su source from chainsdd
Before, I was including the binary su
By compiling from his source, it installs the symlink correctly.
Sent from my Nexus One using XDA App
So i Have been working on my new rom, now i Have it all AOSP as i can, and just have sense stuff we need, but now i have no root access, none of my root apps will work, i need help becuase i need root access to run a lot of helpful programs, i think i deleted someth ing in the sy stem folder that was important to root.
rtbluver said:
So i Have been working on my new rom, now i Have it all AOSP as i can, and just have sense stuff we need, but now i have no root access, none of my root apps will work, i need help becuase i need root access to run a lot of helpful programs, i think i deleted someth ing in the sy stem folder that was important to root.
Click to expand...
Click to collapse
my app root check, for free on the market, when run in advanced mode will give the technical details as to which files might be missing or configured incorrectly.
easiest solution is to download superuser.apk from the market or flash the superuser install .zip from recovery which should reconfigure the complete root setup.
hopefully that works, if not, let us know!
joeykrim said:
my app root check, for free on the market, when run in advanced mode will give the technical details as to which files might be missing or configured incorrectly.
easiest solution is to download superuser.apk from the market or flash the superuser install .zip from recovery which should reconfigure the complete root setup.
hopefully that works, if not, let us know!
Click to expand...
Click to collapse
Doin it all now, but it looks like i deleted something good, because my wifi is giving me errors too. So I mightve deleted some framework. Hmmm
rtbluver said:
Doin it all now, but it looks like i deleted something good, because my wifi is giving me errors too. So I mightve deleted some framework. Hmmm
Click to expand...
Click to collapse
Root Access is not properly configured or was not granted.
Superuser.apk - com.noshufou.android.su - version 2.3.6.3 is installed!
Standard su binary location: ls -l /system/bin/su:
null
Standard su binary location: ls -l /system/xbin/su:
null
Alternate su binary location: ls -l /sbin/su:
null
SU binary not found or not operating properly
Results provided by Root Checker version 3.4 from joeykrim in the Android Market - http://goo.gl/GgWae
Root checker stats when i run the advanced check, I just flashed su zip too. Is there something in the framework for editing root, becuase wifi is error too, hmm more flashing and checking.
rtbluver said:
Root Access is not properly configured or was not granted.
Superuser.apk - com.noshufou.android.su - version 2.3.6.3 is installed!
Standard su binary location: ls -l /system/bin/su:
null
Standard su binary location: ls -l /system/xbin/su:
null
Alternate su binary location: ls -l /sbin/su:
null
SU binary not found or not operating properly
Results provided by Root Checker version 3.4 from joeykrim in the Android Market - http://goo.gl/GgWae
Root checker stats when i run the advanced check, I just flashed su zip too. Is there something in the framework for editing root, becuase wifi is error too, hmm more flashing and checking.
Click to expand...
Click to collapse
i've never seen null in the results ... and you say you have a wifi error.
i would suggest reflashing whatever ROM you're currently on. when you flash a ROM, they generally wipe your /system and reload a full /system.
if you're on a custom kernel, i'd also reflash the kernel (kernel .zip files will include its required modules) as the kernel and modules, including wifi, in /system/lib/modules have to match.
as long as you flash the same ROM you're currently running, you *shouldn't* have to wipe data.
i'm not sure what you might have erased but making a nandroid backup for you venture into modifying system files is generally a good practice!
edit: i see in your signature you're running your own ROM. assuming you have more knowledge/experience than average, if you'd prefer not to flash over your current ROM and lose whatever changes you've made that you do want to keep, you could try swapping individual files from the original ROM back onto your current system as see if that fixes the issues.
although for the wifi issue, since your signature shows silverneedle, i'd just flash silverneedle and that should guarantee the wifi modules match up with the kernel and clear the wifi issue. if the wifi issue isnt cleared, then something else in /system might have been modified and you're back to swapping individual files from the known working rom.
hope that helps!
joeykrim said:
i've never seen null in the results ... and you say you have a wifi error.
i would suggest reflashing whatever ROM you're currently on. when you flash a ROM, they generally wipe your /system and reload a full /system.
if you're on a custom kernel, i'd also reflash the kernel (kernel .zip files will include its required modules) as the kernel and modules, including wifi, in /system/lib/modules have to match.
as long as you flash the same ROM you're currently running, you *shouldn't* have to wipe data.
i'm not sure what you might have erased but making a nandroid backup for you venture into modifying system files is generally a good practice!
edit: i see in your signature you're running your own ROM. assuming you have more knowledge/experience than average, if you'd prefer not to flash over your current ROM and lose whatever changes you've made that you do want to keep, you could try swapping individual files from the original ROM back onto your current system as see if that fixes the issues.
although for the wifi issue, since your signature shows silverneedle, i'd just flash silverneedle and that should guarantee the wifi modules match up with the kernel and clear the wifi issue. if the wifi issue isnt cleared, then something else in /system might have been modified and you're back to swapping individual files from the known working rom.
hope that helps!
Click to expand...
Click to collapse
Yah, Im trying files out, updated busybox, but my wifi problem may lie in the kernel change with the ROM, because i changed my ROMs kernels to RCmix and now im getting the wifi error, but Im trying to go into the rom system, to see what i screwed up, i will report back.
rtbluver said:
Yah, Im trying files out, updated busybox, but my wifi problem may lie in the kernel change with the ROM, because i changed my ROMs kernels to RCmix and now im getting the wifi error, but Im trying to go into the rom system, to see what i screwed up, i will report back.
Click to expand...
Click to collapse
Placed Busybox in wrong directory! Im all good now, thanks!
I'd like to try out ChainFire's SuperSU as I've heard good things about it...
I'm curious if I can just replace the SuperUser.apk in the root from recovery zip from Team Epic, put SuperSU.apk in its place and change the updater-script to install it, or if there is something else that I am totally missing..
Pretty new at all of this and want to make sure it'd work properly before I try it. :good:
no just install supersu
Install SuperSu, run it once, then delete the SuperUser.apk from /system/app. SuperSu will take over from there.
Thanks for the quick replies.
Im running ICS SlimROM 1.6 and (was) loving it. But:
Titanium Backup Pro prompted for an update, which I ran, then it barfed and told me to install BusyBox from the market
Installed BusyBox, which got TB to run
uninstalled WiFi tether ( not working, another issue.....)
Next full reboot of phone, its stuck at the Google Gears
Then:
I went into recovery, wiped cache, Dalvik and ran fix permissions
Reboot, stuck at Google Gears
Mounted SD in Recovery, copied my PH98img file to SD, fastboot and ran update
Still stuck at Google Gears
I need to get the file off of SD to get into Recovery again, but when I do, what next ? Full wipe ? Reflash ROM ?
Only thing I can think of is BusyBox broke the ROM......am I wrong ?
I was stuck doing a full reflash of the rom, fixes, updates etc.......only thing I can figure is that the supersu was gorked...... Superuser (chainsdd) from the market ended up on my phone after the busy box install and didn't want to work or be removed until reflash.
Sent from my ADR6425LVW using xda app-developers app
archalon said:
Im running ICS SlimROM 1.6 and (was) loving it. But:
Titanium Backup Pro prompted for an update, which I ran, then it barfed and told me to install BusyBox from the market
Installed BusyBox, which got TB to run
uninstalled WiFi tether ( not working, another issue.....)
Next full reboot of phone, its stuck at the Google Gears
Then:
I went into recovery, wiped cache, Dalvik and ran fix permissions
Reboot, stuck at Google Gears
Mounted SD in Recovery, copied my PH98img file to SD, fastboot and ran update
Still stuck at Google Gears
I need to get the file off of SD to get into Recovery again, but when I do, what next ? Full wipe ? Reflash ROM ?
Only thing I can think of is BusyBox broke the ROM......am I wrong ?
Click to expand...
Click to collapse
Most likely, you installed busybox to the /system/bin/ directory.
Uninstall it, restart your phone, then re-run the busybox installer, except this time make sure you select /system/xbin/ as the install path.
a.mcdear said:
Most likely, you installed busybox to the /system/bin/ directory.
Uninstall it, restart your phone, then re-run the busybox installer, except this time make sure you select /system/xbin/ as the install path.
Click to expand...
Click to collapse
I'm on CleanRom 4.4 and it runs fine. I have the BusyBox install app from the market. I currently have BusyBox 1.20.2 installed and it's installed in /system/bin. That's where it wanted to install it, so i let it. I have had no problems with it being there. Should I move it? What is the pros and cons of it being in /system/bin vs /system/xbin??
Thanks.
derek4484 said:
I'm on CleanRom 4.4 and it runs fine. I have the BusyBox install app from the market. I currently have BusyBox 1.20.2 installed and it's installed in /system/bin. That's where it wanted to install it, so i let it. I have had no problems with it being there. Should I move it? What is the pros and cons of it being in /system/bin vs /system/xbin??
Thanks.
Click to expand...
Click to collapse
If its working at /system/bin/ then its probably not an issue for you.
I have init.d scripts, and my init.rc calls for busybox to be located at /system/xbin/. If I accidentally installed busybox to /system/bin/, busybox and thus also my init.d scripts fail to load because the init.rc file still tries to load it all from /system/xbin/.
but, since its likely you didn't build your ROM yourself, you may not know exactly where its supposed to be installed. You could look at the original update script in the zip file that installed your ROM, because usually there will be an install path and associated symlinks in that script which you can then use to determine where busybox is supposed to be installed on your particular device. Or, if your ROM has init.d support, you can look in the /init.rc file for the lines where busybox is called to enable init.d support. Your install path for busybox should mimic whatever path is called in this file, meaning if its attempting to load busybox from /system/xbin/, then that is where you need to have busybox installed, and not /system/bin/.
a.mcdear said:
If its working at /system/bin/ then its probably not an issue for you.
I have init.d scripts, and my init.rc calls for busybox to be located at /system/xbin/. If I accidentally installed busybox to /system/bin/, busybox and thus also my init.d scripts fail to load because the init.rc file still tries to load it all from /system/xbin/.
but, since its likely you didn't build your ROM yourself, you may not know exactly where its supposed to be installed. You could look at the original update script in the zip file that installed your ROM, because usually there will be an install path and associated symlinks in that script which you can then use to determine where busybox is supposed to be installed on your particular device. Or, if your ROM has init.d support, you can look in the /init.rc file for the lines where busybox is called to enable init.d support. Your install path for busybox should mimic whatever path is called in this file, meaning if its attempting to load busybox from /system/xbin/, then that is where you need to have busybox installed, and not /system/bin/.
Click to expand...
Click to collapse
I'm running Scott's CleanRom 4.4. I've looked in the updater-script file inside the zip.
I see the line: symlink("/system/xbin/busybox","/system/bin/busybox");
So, I am assuming that it can be installed in either location. When I installed busybox using the busybox install app from the market, it has "Smart Install", it scans system memory and then recommends where to install everything so I just let it do that.
derek4484 said:
I'm running Scott's CleanRom 4.4. I've looked in the updater-script file inside the zip.
I see the line: symlink("/system/xbin/busybox","/system/bin/busybox");
So, I am assuming that it can be installed in either location. When I installed busybox using the busybox install app from the market, it has "Smart Install", it scans system memory and then recommends where to install everything so I just let it do that.
Click to expand...
Click to collapse
So, according to that symlink, the actual location of busybox should be in /system/xbin/, but has created a symbolic link to /system/bin/ because some applications look for it in that location as well.
on a linux system, the physical location is the first listed path, the symbolic link is created by the second path, which essentially allows you to run busybox from either location even though it is actually located in /system/xbin/ and not /system/bin/
make sense?
Hi,
I am Kit Blackheart, sorry this is my very first post here at XDA, hope you all are able to bear with my noob-ness
anyways,
I am building a custom stock-based rom for the lge google NEXUS 5, I am having some issues with the update-script part though...
*using flashable zips.
the problem is...i am trying to get the system to run a script, using run_program, but the binary requires SU, and it doesnt work when i run su through run_program inside the script itself....and it has to run the su command before running the script..
but even when i execute the SU binary before INSIDE the script *INSTEAD OF USING RUN_PROGRAM INSIDE THE UPDATE-SCRIPT , it doesnt work!
i have already chmodded both, the binary, the script and their dependencies...
and i know that this is the problem because the rom boots fine and i can execute the script perfectly from terminal emulator as long as i go SU before running it...
also can someone explain why many binaries just dont run or give any output when i run them with su?
does anyone have any idea?...x.x *sorry for being a noob...
also....just saying...i shall post the rom here in xda later! expect me again! xD