Hey guys, I didn't make this guide, nor did I contribute to it at all. This is in no way an attempt to toot my own horn.
I am linking this guide because I have followed it with my HTC Incredible at it worked flawlessly and figure some of you might be interested in running Ubuntu on your phones too.
Here is the guide, it was written for the Nexus One but works great for the Incredible too.
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
Some things to note, I am running Cyanogen 6.0 RC3. You must run an android with a modified kernel that supports loopback devices. Cyanogen 6.0 RC3 has loopback devices enabled. Also it goes without saying, but I will say it any way, you need to have a rooted phone. A quick down and dirty of what you need to do to get started is as follows.
**** MAKE SURE YOU HAVE YOUR PHONE PLUGGED IN FOR ALL OF THIS!!! YOU DON'T WANT YOUR PHONE DYING AT ANY POINT IN THIS QUICKY GUIDE****
Go here: http://unrevoked.com/#inc
Download both Unrevoked3 and Unrevoked Forever. Connect your phone to your computer and run unrevoked3. This will root your phone.
Once rebooted go to the market and find and install "Rom Manager" by ClockworkMod. When you open this up it will ask for root permissions, give it. then use the "Flash ClockworkMod Recovery"
Now place unrevoked forever zip on your sdcard.
Open up Rom Manager again and select Reboot into Recovery.
Once in recover select "Install zip from sdcard" locate the unrevoked forever zip file and install it.
Now reboot your phone. Your phone is now completely rooted and nand unlocked. Congrats!! (Oh by the way, now that you have finished you might want to know you just voided your phones warranty. Should you ever need to return your phone make sure you revert all of these changes and go back to an unrooted phone before sending it in. There are guides for that, just look for them.)
Now we need to update your radio but first lets do a nandroid backup! These backups are great as they can save you countless hours of trying to return your phone to operable status after you screw it up (trust me, I found out about nandroid backup WAY WAY WAY after I should have, you should start with it earlier than I did)
Go back into Rom manager and find the "Backup current Rom" selection, select it. Now change the name of the backup to something like "stock rooted rom" that way you know what it is, the date and time stamped names never help me. Now click ok and let it do it's backup. This will take a minute. Once it is finished take a deep breath and relax, you likely just saved your future self many hours of frustration. Now reboot the phone it's time to update the radio.
Attention!!! DO NOT SCREW THIS SECTION UP!!! IF YOU DO, YOU WILL BRICK YOUR PHONE!!!!
(by the way, I am not responsible for any bricking that may occur due to not following this guide to the "T" Also I am not responsible for any bricking that may occur due to following this guide to the "T" You assume ALL of the risk for attempting any of this stuff)
Download the following radio update: http://adrynalyne.stfuthxbye.net/radio/2.15.00.07.28/PB31IMG.zip
Place it on your sdcard in the bottom directory.
Now shutdown your phone. Once your phone is powered off hold down the volume down button and the power on button. A white screen should appear and say something about HBOOT.
It will locate the PB31IMG.zip file on your sdcard and ask you if you wish to update with it, answer yes. (If it does not find the file then you need to shut your phone off, take the sdcard out and put it in your computer and save the contents off of the sdcard into a folder on your computer and format the card to fat32 then replace the contents back onto the sdcard, put it back in your phone and boot back into HBOOT and let it find the update and get to the point we are at now)
DO NOT, DO NOT, I REPEAT, DO NOT RUN THIS UPDATE MORE THAN ONCE!! IF YOU SCREW THIS UP AND RUN THE UPDATE TWICE, YOU WILL BRICK YOUR PHONE.
Once it is finished press the power button, this should change the list of options, you should now see a reboot option, reboot your phone. Congrats you now have an updated radio (and hopefully a phone that isn't bricked)
No go back into Rom Manager and select "Download Rom" Find the Cyanogen rom and download it. Make sure if it asks, you select to download google apps too, don't wana be stuck without those! Also when it asks, you need to do a wipe too, a backup isn't needed but if you are scared, you can do another backup anyway.
Once it is done downloading it should ask to finish or reboot, once you send it on it's way, it will do it's thing and reboot your phone and flash it with the Cyanogen rom. Reboot the phone and you now have Android Froyo 2.2, rooted, with loopback support, overclocked kernel with tons of optimization. Cyanogen's roms are VERY excellent, so enjoy.
Once all of that is done, you are ready to follow the guide at nexusonehacks.net to get ubuntu linux running on your phone.
Also if you have any SIMPLE questions, I may be able to help you with them, however if they are in any way complex, please be sure to scan the comments posted in his guide to find a solution and post your own comment in his guide should you be unable to find a solution already there. I am in no way able to provide complex support to help you get this working on your system.
Don't get me wrong, I do think it's cool but what will it do for me? I can't imagine navigating the gui on the incredible's small screen. Maybe the netbook remix. I've done quite a bit of terminal work and ssh on my Incredible and it sucks. I just don't see the advantage of it. I still need a device that is very user friendly and I can efficiently use as a phone.
I'll keep an eye on it and see how it develops but for now it's a no go for me. I would rather just carry my netbook around, even an ipad would be a better option. Ubuntu on an Ipad would be very cool to play with. I wish the ipad competition would hurry up and get here.
Thanks for an intriguing post and link.
gedster314 said:
Don't get me wrong, I do think it's cool but what will it do for me? I can't imagine navigating the gui on the incredible's small screen. Maybe the netbook remix. I've done quite a bit of terminal work and ssh on my Incredible and it sucks. I just don't see the advantage of it. I still need a device that is very user friendly and I can efficiently use as a phone.
I'll keep an eye on it and see how it develops but for now it's a no go for me. I would rather just carry my netbook around, even an ipad would be a better option. Ubuntu on an Ipad would be very cool to play with. I wish the ipad competition would hurry up and get here.
Thanks for an intriguing post and link.
Click to expand...
Click to collapse
Cuz ubuntu is the ****
sent from jdfroyo v2.0 EVO-lution
Well there are tons of Ubuntu programs that you could then run on your phone. For devs and such this could be invaluable, granted devs would already know how to install ubuntu on their phones and not need this guide, but meh. Personally for the rest of us, I am not sure what I am going to use my ubuntu for yet, but I like having the option there.
It is also a cool parlor trick to pull on iphone users. "Can your iphone run a full fledged desktop operating system? Hmmm... that's too bad, my android phone can."
It's especially helpful against those people you told to get an android phone over an iphone because of all of the advantages of the android phone and they got an iphone anyway because they are more concerned about making a status statement than actually getting the best. Just another log on the fire.
But really really, why do I run Ubuntu on my mobile phone? BECAUSE I CAN!!! Seriously, just because I can. Isn't that why a lot of us do these kinds of things?
Does it work or is camera worked?
sent from jdfroyo v2.0 EVO-lution
I am running the same ROM as you and when I tried to install it I get the following.
sh ./ubuntu.sh
modprobe: chdir(2.6.32.15-g936f68f): No such file or directory
←[H←[Jmkdir failed for /data/local/mnt, File exists
←[H←[Junknown option -- /BusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) mu
lti-call binary.
Usage: rm [OPTIONS] FILE...
Remove (unlink) FILEs
Options:
-i Always prompt before removing
-f Never prompt
-R,-r Recurse
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net
To enter the Debian Linux console just type 'bootubuntu'
Make sure you have the latest busybox installed. Also make sure you do an su command before you do the sh ./ubuntu.sh.
One other thing, you have done the unrevoked forever right?
To update your busybox install the busybox app from the market and run it.
Sent from my Incredible.
Yes I have the newest busy box and yes I did type the SU before. Here is everything that I typed.
C:\android\tools>adb shell
# su
su
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: chdir(2.6.32.15-g936f68f): No such file or directory
←[H←[J←[H←[Jrm: can't remove '/system/bin/fsrw': No such file or directory
rm: can't remove '/system/bin/bootubuntu': No such file or directory
rm: can't remove '/system/bin/unionfs': No such file or directory
unknown option -- /BusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-ca
ll binary.
Usage: rm [OPTIONS] FILE...
Remove (unlink) FILEs
Options:
-i Always prompt before removing
-f Never prompt
-R,-r Recurse
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net
To enter the Debian Linux console just type 'bootubuntu'
Make sure when you install busybox to your phone with the app that you install it to /system/xbin.
Sent from my Incredible.
Yes busybox has been installed to /system/xbin. I just looked into that directory and I see alot of busybox files.
Ignore the error messages. Now make sure you are still in root and type bootubuntu.
Sent from my Incredible.
If you look at the screenshot in his guide, the one of the command prompt you will notice he gets the same exact errors, apparently they don't matter.
Sent from my Incredible.
This is what I get when I type that.
# bootubuntu
bootubuntu
mount: can't setup loop device: No such file or directory
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or direct
ory
mount: mounting proc on /data/local/mnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/mnt/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
umount: can't umount /data/local/mnt/dev/pts: No such file or directory
umount: can't umount /data/local/mnt/proc: No such file or directory
umount: can't umount /data/local/mnt/sys: No such file or directory
umount: can't umount /data/local/mnt: Invalid argument
dadicus said:
If you look at the screenshot in his guide, the one of the command prompt you will notice he gets the same exact errors, apparently they don't matter.
Sent from my Incredible.
Click to expand...
Click to collapse
My errors are not exactly like his. He does not have these in his screen shot.
BusyBox v1.16.1 (2010-03-29 11:50:09 CDT) multi-call binary.
Usage: rm [OPTIONS] FILE...
Remove (unlink) FILEs
Options:
-i Always prompt before removing
-f Never prompt
-R,-r Recurse
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Please tell me your kernel version. Almost looks like your kernel doesn't support loopback devices in that first part. The rest almost looks like a permissions problem. Also just a quick confirmation here, you did do a full nand unlock right, with unrevoked forever? I doubt this would make much of a difference but what baseband are you running? Please answer each question.
Sent from my Incredible.
Well I do see one problem, you are running an older version of busybox than I am. Please download that busybox app from the market and update your busybox with it. Don't forget to make sure it installs it in /system/xbin it will give you a choice. Once done your busybox should be 1.18.0
Sent from my Incredible.
I gotta go finish my workout. I will be back in 15 minutes, please get that info for me, thanks.
Sent from my Incredible.
I am running 2.6.32.15-g936g68g the one that comes with CyanogemMOd 6 RC3
I just installed the new busybox into the location that you said and I got the same error. Yes I did the unrevoked forever so I do have S-off
Attempt to do the following again now that you have the new busybox.
su
sh ./ubuntu.sh
Sent from my Incredible.
This is what I get same thing. It is like it does not like the rm -f that is in the .sh file.
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: chdir(/lib/modules): No such file or directory
←[H←[Jmkdir failed for /data/local/mnt, File exists
←[H←[Jrm: invalid option -- /
BusyBox v1.18.0.git (2010-08-11 01:17:17 CDT) multi-call binary.
Usage: rm [OPTIONS] FILE...
Remove (unlink) FILEs
Options:
-i Always prompt before removing
-f Never prompt
-R,-r Recurse
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Value too large for defined data type
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net
Related
I am running custom rom Rooted 2.1 v0.3.
Ever since flashing to the custom rom, when i try to push a file, such as:
adb push bootanimation.zip /system/media
I get the error:
Failed to copy.... Read-only file system.
I didn't have this error before flashing to the rom. Does this have something to do with superuser whitelist?
I have tired:
mount -oremount,rw /dev/block/mtdblock3 /system
and it didn't work and I tired:
adb remount
winch returned:
Operation not permitted.
This is ticking me off since I didn't have this problem until flashing the rom.
EDIT: Now if I try:
adb push bootanimation.zip /system/media,
I get:
Permission denied.
This is crazy.
I need help also. Rooting for first time and trying to get recovery.img on and keep getting read only errors. Tried remount to no avail. Help please
su
mount -o rw,remount /Dev/block/mtdblock3 /system
file system is case sensitive!
if anyone know what command to execute an install or push of "any.apk" via Android Terminal Emulator. It would help me greatly.
p.s.
make sure you have developer mode enabled "settings" and accept su permissions. Also have BusyBox
fKngFtd said:
su
mount -o rw,remount /Dev/block/mtdblock3 /system
file system is case sensitive!
if anyone know what command to execute an install or push of "any.apk" via Android Terminal Emulator. It would help me greatly.
p.s.
make sure you have developer mode enabled "settings" and accept su permissions. Also have BusyBox
Click to expand...
Click to collapse
...it's a lowercase d in dev.
mount -o rw,remount /dev/block/mtdblock3 /system
n2imagination said:
I need help also. Rooting for first time and trying to get recovery.img on and keep getting read only errors. Tried remount to no avail. Help please
Click to expand...
Click to collapse
I had the same problem. From what I could tell, I had the wrong ADB driver somehow. So I downloaded the drivers from the HTC website and went to device manager (Win7) and updated the driver software which fixed the problem. But I think i just lucked out when i stumbled onto that, I feel a blind retard with epilepsy trying to draw a circle on an etch-a-sketch when I'm doing things like rooting. But, it couldn't hurt to try it.
fKngFtd said:
su
if anyone know what command to execute an install or push of "any.apk" via Android Terminal Emulator. It would help me greatly.
Click to expand...
Click to collapse
adb install -l whatever.apk (from tools dir in sdk)
`mods said:
I am running custom rom Rooted 2.1 v0.3.
Ever since flashing to the custom rom, when i try to push a file, such as:
adb push bootanimation.zip /system/media
I get the error:
Failed to copy.... Read-only file system.
I didn't have this error before flashing to the rom. Does this have something to do with superuser whitelist?
I have tired:
mount -oremount,rw /dev/block/mtdblock3 /system
and it didn't work and I tired:
adb remount
winch returned:
Operation not permitted.
This is ticking me off since I didn't have this problem until flashing the rom.
EDIT: Now if I try:
adb push bootanimation.zip /system/media,
I get:
Permission denied.
This is crazy.
Click to expand...
Click to collapse
Did you ever get this fixed? I have the same problem!
I have the same problem also. I've been using SDK just fine for over a month or two, and now that I'm on V3, no worky. Somethings obviously going on. But what?!
LexusBrian400 said:
I have the same problem also. I've been using SDK just fine for over a month or two, and now that I'm on V3, no worky. Somethings obviously going on. But what?!
Click to expand...
Click to collapse
I think the proper permissions were not set for this ROM. Hopefully jcase can modify the file and re-upload the ROM =)
at least that's what I've gathered... someone PLEASE correct me if I'm wrong
edit: I looked at the script file and it seems like rw permissions are set properly???
jcase - any insight?
I personally get a bunch of "Out of memory" errors when trying to follow the recovery walk-through.
post baleeted
This is the latest release of my fix (June 14, 2011). This version addresses the Market ID and Moto Blur issue.
I have not had a chance to test the latest version, aside from verifying the awk command works as exptected. The rest is a strong educated guess, mixed with a re-tooling of it to just use Android Debug Bridge to do what I was having scripts do in the past. Should be much more reliable.
IF YOU DECIDE TO USE THESE INSTRUCTIONS: PLEASE, read through this page entirely from top to bottom at least once prior to doing anything. This way, if you are unsure on anything, you can ask the questions you need answers to. I am not liable for anybody messing up their phone because they didn't think to read the F'n manual prior to following these steps.
If you don't read this through completely before starting, and you brick your system, Don't come crying to me. I warned you.
This version makes it close to impossible to brick the system, but I left that bit in to cover my arse.
Earlier today, I wrote instructions on how to root the flipside. Now, I have Unknown Sources enabled. Here's how you can do it.
First, if you don't have root, follow these directions:
http://forum.xda-developers.com/showpost.php?p=9702394&postcount=4
Next, you will need to run a script, but for the script to work you will need to install busybox to your rooted flipside. You can either get it from the market, or download it somewhere on the web. I tried installing it from the market, but it just timed out on download for some reason.
Once you have busybox, you have an environment ready for enabling Unknown Sources. Lets do it:
Latest version installs busybox for you]
I have not tested it, so you may still need to tell it to install, but it installs the apk.
1. Download the attachment located in this post.
Unzip to a folder on your desktop.
PLUG IN YOUR PHONE NOW!!!
Double click on the batch file ("enable_unknown_sources.bat"). You may have to run as administrator, but I don't think so. Built on Windows XP (I'm a linux guy who wrote this at work in a couple minutes)
When it prompts for you to OK the super user for "unknown", look at your phone. It should have a prompt. If not, it may be ok. We will see....
once your phone has rebooted, you phone will have "unknown sources" enabled already. Don't worry about rebooting. The batch file did that for you.
Quite a bit less work than before. Good news: it's done! never to worry about it again...unless you upgrade....
DISCLAIMER:
DO NOT FOLLOW ANY OF MY STEPS IF YOU ARE UNSURE OF WHAT YOU ARE DOING! I have done my best to ensure that the instructions are accurate, but I made mistakes in the first revision, so who's to say that I didn't miss something this go 'round as well? If you decide to follow this walk-through, your actions are an agreement to not hold me liable if your phone becomes a pretty brick. I am not responsible for what you do with this information. If you have no idea how to do any portion of these instructions, you can either walk away (best idea), or ask for help here.
I am also not the 2nd shooter on the grassy knoll, nor am I the cause of all your woes throughout life. I always wanted to say that in a disclaimer.
run_second.sh
i get errors when i attempt to run your run_second
though for the life of me... i can't figure out what's wrong with it?
What error do you get?
on all 4 of the cp commands... i get a return of
cp: (destination directory): Invalid argument
EDIT: tried the run.sh script... got an invalid file/folder error on the mount... on one of the cp's... and on the chmod of the same
EDIT: i manually edited the 2 files in the system directory using notepad++ and droid explorer...
couldn't find the 2 databases anywhere on the phone? hidden?
Odd. I did this:
Code:
ls /data/data/com.motorola.android.providers.settings/databases
and I get this back:
Code:
settings.db
The only time I cannot do that is if I don't have super user.
DOH! just realized the issue. once you type "SU", go to your phone, and tell it to allow application "unknown" super user.
Forgot about that part.
well... here's one for you then... i have nothing in my /data/ directory...
never did...
EDIT: wait... droid explorer lied to me... now if i could just get into that file... i could hard change them without having to deal with all the scripting
script typo
Thanks for the script. I have managed to enable it by following your script.
However there are a few typo in your script that caused errors. I have corrected them. You may check attached script.
jonsjava said:
What error do you get?
Click to expand...
Click to collapse
I get an error when I exicute run.sh
: No such file or directory
monho said:
I get an error when I exicute run.sh
: No such file or directory
Click to expand...
Click to collapse
Did you install busybox? Please, run through what you have done so far. My goal is to get a comprehensive how-to together, and any and all input I can get will assist me to that end.
i'm getting read only file errors on the script now... i assume some file attributes need adjusting... not sure how to do that...
Did you remount /system/ in rw mode, as mentioned in the walkthrough? /system is read only by default, but part of my how-to explains how to re-mount it in read/write
all 5 chmod statements return no file found....
EDIT: even reboot is no found
that sounds like you don't have super user, or busybox isn't installed.
i have super user access... i used z4root... this also installs busybox... or so i'm told...
rignfool said:
i have super user access... i used z4root... this also installs busybox... or so i'm told...
Click to expand...
Click to collapse
That does not install busybox. As stated in my how-to, you will need to either download busybox from the market, or get it from the web.
I know it says it does, but I didn't have busybox features until I installed it manually myself.
root explorer FTW
so... after using root explorer to manually edit the mkitso files... and copy the databases from the /ab/ directory....
i made it work...
Hallo there. Please I would appreciate if you can help me. When you say:
1.Look for the one that says "/system". Mine says "/dev/block/mtdblock7"
- Mine says the same too, is that right? Could it be different? Why sould we care where it says 'system'?
2.'type this in (changing the /dev/ as needed)':
-When you say 'as needed' that means changing the /dev/ is not neccesary? What does ir depends? If it's neccesary, what should I type instead of /dev/?
3. 'Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock7 /system'
-Must that line be typed exactly as it's shown? I've done so and after running the commands:
cd /sdcard/
sh run.sh
-This error message appears:
No such file or directory
I've rooted with z4. I've already installed BusyBox from the market, altought I can see it's not an app that appears like the others: I've just got an Icon named 'busyBox Installer' and after all it says 'busybox is successfully installed'.
Please excuse my bad english and thank you very much in advance for your help
1. I wrote it that way just in case it was different anywhere else. It shouldn't be.
2. when I said "change /dev/..." It was in reference to 1. above
If /system is /dev/block/mtdblock7 as listed, you don't need to change it.
If /system is /dev/block/mtdblock21 (example), you would need to change my command to read:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock21 /system
That's what I mean when I said change /dev as needed. Seeing how yours is the same as mine, that is not necessary.
3. the command to mount /system will not affect the sdcard. Make sure the /sdcard isn't mounted on your computer. In windows, look in "My Computer", or your languages equivelant, and if you see the phone there, right click and tell it to unmount. Wait a few seconds for the phone to access the SD card, and try again.
so, I too have problems running run.sh
I tried both the one in the original post and the typo fix in the other post. Both didn't work. I get file not found errors.
Yeah, I have z4root done and busybox installed no problem.
For some reason it's not seeing the files when I run run.sh.
Here's a copy paste just to prove what I am seeing:
Unable to chmod /system/etc/motorola/com.android.providers.settings/secure.mkitso
: No such file or directory
Unable to chmod /system/etc/motorola/com.android.providers.settings/system.mkitso
: No such file or directory
I verified that my sdcard has /ab/ folder copied over, and all the subfolders and files from the original archive are moved over.
What gives?
This workshop was held in #android-learning on irc.freenode.net by XDA Member Adrynalyne. All credit to him for this guide, I simply am taking it and turning it into a guide. Here we go!
You can find the raw IRC log here
Good evening folks, and welcome to my ADB workshop. This is by no means a full explanation on the subject, but more of a crash course to help folks get up to speed, and get more from their devices. There may be some things you already know here, so please be patient and respect those who do not.
Reference Files
http://adrynalyne.us/files/How to install adb.pdf
http://adrynalyne.us/files/Using ADB.pdf
So, lets just start with the basics.
What is ADB?
ADB stands for the android debugging bridge and is used for testing and debugging purposes by developers.
However, we like to get more out of our devices, and its a great way to fix things.
Knowing adb can mean the difference between a paperweight and a working phone.
So, to start with, we will look at installing ADB.
Generally speaking, the Sun/Oracle JDK is required to run all SDK functions.
ADB is but one tool in the SDK arsenal.
So, we begin by downloading and installing the JDK. This can be found here:
https://cds.sun.com/is-bin/[email protected]_Developer
Choose your OS, download and install. I recommend that 64 bit users use the regular x86/32 bit version as well.
Moving ahead, we download the Windows sdk from here:
http://dl.google.com/android/installer_r08-windows.exe
Due to already installing JDK, you won't be stopped by the install process.
Now, if you notice, I installed it to:
C:\android-sdk-windows
I did this because it makes things easier when setting up path variables.
I encourage everyone to do the same, but obviously it is not required.
So, this SDK is handy, but is only good up to 2.2. We want the latest and greatest! (Well I do)
So, we navigate to:
C:\android-sdk-windows\
and we run SDK Manager.exe
If you notice in your PDF file for installing adb, you will notice that you can update, and I made a choice not to include earlier sdk versions.
I won't go into full detail on that, but depending on the version of SDK you have, 8 or 9, it WILL make a difference in using adb.
By default, for version 8 adb.exe resides in C:\android-sdk-windows\tools
By default, for version 9 adb.exe resides in C:\android-sdk-windows\platform-tools
We will assume version 9 in this guide
Really, the SDK is installed and adb is usable right now, but in my humble opinion, its not enough
I like the ability to use adb in ANY directory on my machine.
To do this, we edit Windows's environment variables.
Specifically, the system path.
To do this, we click on start, or the orb (depending on OS), and right click on Computer, left clicking on properties in the menu.
If its windows XP, I believe it brings you into advanced system properties immediatly. Vista and 7 need a second step.
On the left hand side, as you notice I have highlighted in the pdf, left click advanced system settings.
Under advanced tab, we left click environment variables...
There are two boxes here.
We are concerned with system variables, however.
So we scroll down the list and highlight path and click edit.
Ignoring all the extra stuff in here, make sure you are at the end of the line, and type
Code:
;C:\android-sdk-windows\platform-tools
The semicolon allows us to separate it
from the previous path statement.
Click ok all the way out.
We now have ADB setup globally. We can use cmd.exe (I use powershell) and no matter what directory we are in, adb is recognized.
If it is not, make certain you entered the path into system variables, and made no typos.
If you installed to a different location, you will need to adjust the path accordingly.
This concludes the section on installing the Android SDK to use ADB.
This next section will be on using ADB, so please open that pdf now.
Now, this applies to any OS, not just Windows.
Well, with the exception of the USB drivers.
I will not go too much into that, but if you take a look at the PDF, it goes through installing usb drivers for the sdk, and how to download them.
Fiarly straightforward, in that rspect.
Now, to setup our phones to use with the SDK and ADB, we must change some settings.
First, we go to menu softkey, then settings.
We scroll down to Applications and tap it.
Under Development, we will check Enable USB Debugging. Please note the SGS phones are different in this respect.
The USB cable must be unplugged before enabling or disabling this setting.
Once this is done, we are now ready to play with adb
One quick note: If you get device not found/conencted, please reboot your phone. DJ05 has a quirk in it where ADBD randomly crashes on boot.
A reboot will fix this
ADBD= ADB Daemon
Ok, continuing on.
Lets look at installing applications. This is also known as sideloading.
Unlike installing from the SD card, it does not require unknown sources to be enabled.
The command for this is
Code:
adb install packagename
This assumes that you are working from the directory where the file is located.
This will install the application to /data/app.
It will also show sometimes useful errors if install fails.
That is not something you will see from the Android GUI.
Now, a lot of us have probably deleted files with apps like Root Explorer. While this isn't really a bad thing, it leaves behind databases and data for the application removed.
This is where the 0kb applicaiton entries come from.
If you take that application entry name, you can uninstall the extra data via adb.
First we go to the adb shell which logs into the phone.
Code:
adb shell
If we end up with a $, we will want admin rights, in many cases. This is not one of them, I don't beleive.
To get admin rights, you want to type
Code:
su
Look at your phone if this is the first time, it may prompt you to allow access. Else you will get permission denied.
If you are not rooted, this will not work either.
Ok, now that we are logged in, we will type
Code:
pm uninstall packagename
where packagename is the name of the 0kb listing.
Now this seems like a pain in the a** and I agree.
HOWEVER
There will be a time where Manage applications crashes when you try to uninstall it from the phone. In this case, a factory reset, or this method is the only effective way to fix the problem.
Moving on.
How many of us have removed system applications or renamed them? Did you know that you can simply disable them from the system?
Code:
adb shell
su
pm disable appllicationname
This will disable it, and the system will ignore it.
This can be seen as safer than deleting or renaming things, but your mileage may vary.
On the other hand, you can also re-enable these applications.
Code:
adb shell
su
pm enable applicationname
Please note: Not all applications will properly re-enable. I believe a factory reset or reinstall of said application will fix the issue.
Also, application names are absolutely case sensitive.
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Ok, a lot of us tweak and mod our phones and turning off the device to get to clockwork recovery, or battery pulls, or multiple button holds to get into Download mode are troublesome and annoying at best.
ADB can help us here.
Here, we do not need to be logged into the shell
If we want to merely reboot the phone:
Code:
adb reboot
If we want to go to recovery (works well with voodoo5)
Code:
adb reboot recovery
If we want to go to Download Mode because we need Odin, heaven forbid:
Code:
adb reboot download
Its instant. No waiting on animations or anything else.
Its also handy if Android has locked up, but yet still works in adb.
I for one hate taking my case off to battery pull.
So now we move on to pushing and pulling files.
Sometimes, I don't feel like mounting my sd card to copy a file over to my phone.
I can use this command to push a file straight to my sd card:
Code:
adb push filename /pathtodirectoryonphone
So for instance, if I have test.txt that I want to send, I would type:
Code:
adb push test.txt /sdcard/
and there it goes.
Ok moving on
Pushing files can be done to any directory, however, some are protected.
For instance, /system is going to give you a permission denied or a read only filesystem error.
To get around this, the easiest thing to do is push the file to your sdcard, then log into the shell:
Code:
adb shell
Code:
su
We will then mount the system as writable
Code:
mount -o rw,remount /dev/block/stl9 /system
Then we can use something like
Code:
cp /sdcard/test.txt /system/app/test.txt
cp stands for copy
and it requires the path of the file and destination path. The name of the file is optional
When you copy it, you can rename it to whatever you like.
For instance, if we wanted to backup a file
Code:
cp /sdcard/test.txt /sdcard/backuptest.txt
Now, lets assume you do not have busybox installed.
You non rooted users will not.
Then you must use a slightly more complicated command called dd
This is used like this:
Code:
dd if=/sdcard/test.txt of=/system/app/test.txt
if is for inputfile
of= output file
Not every user friendly, but probably one of the safer copy commands.
Ok, moving on to pulling files.
Lets say you want to get a file from your phone, to modify, backup, etc.
To do this, we simply use adb in this manner:
Code:
adb pull /pathtofile/filename destinationname
For instance, if I wanted to backup ADW launcher in system/app
I would do this
Code:
adb pull /system/app/ADWLaucnher.apk ADWLauncher.apk
And it will pull the file from the phone and put it in the current directory.
Like above, you can specifcy where it goes.
pushing files to the sdcard, it seems prudent to talk about changing permissions.
sdcards are typically fat32, which destroys permisisons, and Android is heavily permission based.
So if you push an application to your sd card, then try to copy it to /system/app/ bad things are going to happen, or the app may not even show up.
So in that case, we use something called chmod.
This is used in this manner
Code:
adb shell
su
chmod 755 /pathtoapplication/applicationname
Keep in mind
you dont want to do this while its still on your sd card.
an example
Code:
adb shell
su
chmod 755 /system/app/ADWLauncher.apk
755 is good for applications and script files.
Just a couple more topics to cover.
Lets go over deleting files.
This becomes especially handy for removing rogue applications.
To do this, we must be in the adb shell.
Code:
adb shell
su
rm /system/app/ADWLauncher.apk
You may need to remount system as writable with:
Code:
mount -o rw,remount /dev/block/stl9 /system
That applies when using chmod as well.
So what I did above was delete ADW Launcher from system/app
However, what if I wanted to delete the entire contents of a directory?
Same thing as before, except
Code:
adb shell
rm -f /data/dalvik-cache/*.*
I just cleared my dalvik-cache with that command
very quick, very effective.
If you just tried that, please reboot your phone now
Ok....this leaves us with the final topic: logcat
logcat allows us to log what the OS is doing, and possibly delve information for when things are not working
its quite simple Reading it is another.
To use logcat
Code:
adb shell
logcat
To logcat to a certain file do
Code:
adb shell
logcat > /sdcard/logcat.txt
Now we let the log settle down to a reasonable amount of data coming in and not a wall of scrolling, then start the app in question. When it gives an error, we hit ctrl-C and kill the adb shell session.
This should have captured enough data to see the error. Now, I prepared an example. A user came to me on IRC, and Google Maps was force closing. Clearing data didnt fix it, Clearing dalvik-cache, and fix permissions did not fix it. In this case, the user did not know how to use adb So I had him grab an app called alogcat from the market and email me the log. This is also a very valid method.
this file explains what the problem was, and highlights what to look for as an example.
http://adrynalyne.us/files/logcat.pdf
___________________________________________________________________
This concludes the guide from Adrynalyne, there will be more workshops such as this one in irc.freenode.net #android-learning.
Thanks to everyone in #samsung-fascinate !
Reserved for possible extension of topic
Great, saves a lot of questions/answers & search
Every new user should read this!!
Thread stuck as valuable reference thread
Just to add, if I may, a little about the permissions...
============================================================
File permissions for Unix... which Android is based, just so those who tinker with the file permissions may know what they are getting into.
============================================================
Use the chmod command to set file permissions.
The chmod command uses a three-digit code as an argument.
The three digits of the chmod code set permissions for these groups in this order:
1.Owner (you)
2.Group (a group of other users that you set up)
3.World (anyone else browsing around on the file system)
Each digit of this code sets permissions for one of these groups as follows. Read is 4. Write is 2. Execute is 1.
The sums of these numbers give combinations of these permissions:
0 = no permissions whatsoever; this person cannot read, write, or execute the file
1 = execute only
2 = write only
3 = write and execute (1+2)
4 = read only
5 = read and execute (4+1)
6 = read and write (4+2)
7 = read and write and execute (4+2+1)
Chmod commands on file apple.txt (use wildcards to include more files)
Command Purpose
chmod 700 apple.txt Only you can read, write to, or execute apple.txt
chmod 777 apple.txt Everybody can read, write to, or execute apple.txt
chmod 744 apple.txt Only you can read, write to, or execute apple.txt Everybody can read apple.txt;
chmod 444 apple.txt You can only read apple.txt, as everyone else.
Detecting File Permissions
You can use the ls command with the -l option to show the file permissions set. For example, for apple.txt, I can do this:
$ ls -l apple.txt
-rwxr--r-- 1 december december 81 Feb 12 12:45 apple.txt
$
The sequence -rwxr--r-- tells the permissions set for the file apple.txt. The first - tells that apple.txt is a file. The next three letters, rwx, show that the owner has read, write, and execute permissions. Then the next three symbols, r--, show that the group permissions are read only. The final three symbols, r--, show that the world permissions are read only.
Compliments and full credit from:
http://www.december.com/unix/ref/chmod.html
Amazing thread just what I needed lol thanks!
cooolone2 said:
Just to add, if I may, a little about the permissions...
============================================================
File permissions for Unix... which Android is based, just so those who tinker with the file permissions may know what they are getting into.
============================================================
Use the chmod command to set file permissions.
The chmod command uses a three-digit code as an argument.
The three digits of the chmod code set permissions for these groups in this order:
1.Owner (you)
2.Group (a group of other users that you set up)
3.World (anyone else browsing around on the file system)
Each digit of this code sets permissions for one of these groups as follows. Read is 4. Write is 2. Execute is 1.
The sums of these numbers give combinations of these permissions:
0 = no permissions whatsoever; this person cannot read, write, or execute the file
1 = execute only
2 = write only
3 = write and execute (1+2)
4 = read only
5 = read and execute (4+1)
6 = read and write (4+2)
7 = read and write and execute (4+2+1)
Chmod commands on file apple.txt (use wildcards to include more files)
Command Purpose
chmod 700 apple.txt Only you can read, write to, or execute apple.txt
chmod 777 apple.txt Everybody can read, write to, or execute apple.txt
chmod 744 apple.txt Only you can read, write to, or execute apple.txt Everybody can read apple.txt;
chmod 444 apple.txt You can only read apple.txt, as everyone else.
Detecting File Permissions
You can use the ls command with the -l option to show the file permissions set. For example, for apple.txt, I can do this:
$ ls -l apple.txt
-rwxr--r-- 1 december december 81 Feb 12 12:45 apple.txt
$
The sequence -rwxr--r-- tells the permissions set for the file apple.txt. The first - tells that apple.txt is a file. The next three letters, rwx, show that the owner has read, write, and execute permissions. Then the next three symbols, r--, show that the group permissions are read only. The final three symbols, r--, show that the world permissions are read only.
Compliments and full credit from:
http://www.december.com/unix/ref/chmod.html
Click to expand...
Click to collapse
Thanks! Added
ih4ckback said:
Amazing thread just what I needed lol thanks!
Click to expand...
Click to collapse
Thanks, all goes to Adrynalyne
Thanks for the guide. Helped me pick out the stupid stupid mistakes I was making...so just a problem. I'm able to use fastboot easily but I seem to be unable to use ADB still on my windows 7. It says there are no devices and I'm dang well sure I have USB debugging on. Is it because Windows 7 is missing drivers for the nexus one or something else?
wonderful guide. I would like to add it to the guides thread.
Really awesome work, thumbs up.
But we should also take a guide on installing adb with Ubuntu/Linux, which isn't a very difficult thing...
mm7490 said:
Really awesome work, thumbs up.
But we should also take a guide on installing adb with Ubuntu/Linux, which isn't a very difficult thing...
Click to expand...
Click to collapse
If I got time tomorrow I could do that. I work primarily in Linux also
Sent from my Samsung Fascinate using Tapatalk Pro
This is good but I have a problem, when I try to remove an .apk file from /system/app it fails and says 'rm failed, Directory not empty'
I have followed exact instructions many time but never succeeded :s any help!!
(I am runnging these commands in device mod)
when I am in recovery mod I get this prompt ~ # and I am not able to enter su mod. how to get rid of this??
Well when the $ changes to # it means you have SU access
mustafa.aziz said:
This is good but I have a problem, when I try to remove an .apk file from /system/app it fails and says 'rm failed, Directory not empty'
Click to expand...
Click to collapse
Please give us the exact command(s) you entered
Here are the commands I entered after adb shell;
su
mount -o rw,remount /dev/block/stl9 /system
rm /system/app/mytouchmusic-signed.apk
exact message returned is 'rm failed for mytouchmusic-signed.apk, Directory not empty'
mustafa.aziz said:
Here are the commands I entered after adb shell;
su
mount -o rw,remount /dev/block/stl9 /system
rm /system/app/mytouchmusic-signed.apk
exact message returned is 'rm failed for mytouchmusic-signed.apk, Directory not empty'
Click to expand...
Click to collapse
Ok i think you need to do a recursive force delete which should be rf but i am not too sure! could somebody please confirm/ correct this?
Well, I don't think so ^^ As he doesn't want to erase a whole directory, but only a file.
What surprises me the most is the returned message... You're trying to delete an apk, and it says it's a directory :/
Could you please give us the output of this :
Code:
su
mount -o rw,remount /dev/block/stl9 /system
ls -l /system/app/mytouch*
Perhaps you don't even need the su and mount lines, but I'm not sure about that, and that can't harm your system ^^
Khoral said:
Well, I don't think so ^^ As he doesn't want to erase a whole directory, but only a file.
Click to expand...
Click to collapse
I know he doesn't want to delete a whole directory, but since the apk isn't compressed perhaps android looks at is as a directory and not a file? i don't know since what was returned suggested that it was a directory i presumed it was a directory! :S
mustafa.aziz said:
Here are the commands I entered after adb shell;
su
mount -o rw,remount /dev/block/stl9 /system
rm /system/app/mytouchmusic-signed.apk
exact message returned is 'rm failed for mytouchmusic-signed.apk, Directory not empty'
Click to expand...
Click to collapse
rm -rf /blah/blah
here is your desired output:
sh-3.2# su
su
sh-3.2# mount -o rw,remount /dev/block/stl9 /system
mount -o rw,remount /dev/block/stl9 /system
sh-3.2# ls -l /system/app/mytouch*
ls -l /system/app/mytouch*
-rw-r--r-- root root 299838 2008-08-01 18:00 mytouchmusic-signed.apk
sh-3.2#
I was looking for a command line ssh program for Android, and was surprised that I couldn't find anything. I didn't want to install a chroot environment, but then I found Optware for Android. I've used it before on other devices and it's VERY useful for getting a more complete unix environment on otherwise stripped down linux devices.
The version on that page was built for a rooted Nook Color, but I only had to make minor changes to get it to run on an Epic running SRF:
1. Extract miniunz from Barnes and Noble's Nook Color 1.2 update zip and put it somewhere in the path - I put mine at /system/bin. You can get it from the first link here http://www.google.com/search?q=nook+color+1.2+update.
2. Make sure /system has at least 2MB or so free. Mine was full... I deleted a few ringtones from /system/media/audio/ringtones/
3. run this:
mount -o remount,rw /
ln -s /data/tmp /tmp
4. Follow the instructions from the Optware for Android page
Optware will now be installed, but pretty much nothing will run at the moment. I'm VERY new to Android, so I don't know that this is the right way to fix it, but here's what I did to get it working:
1. mount -o remount,rw /system
create /system/xbin/optlinks.sh with these contents:
#!/bin/sh
if [ ! -L /tmp ]; then
mount -o remount,rw /
ln -s /data/opt/lib/ld-linux.so.3 /lib/ld-linux.so.3
ln -s /data/opt /opt
ln -s /data/tmp /tmp
mount -o remount,ro /
fi
create /system/xbin/shell.sh with these contents:
#!/bin/sh
/system/bin/su -c /system/xbin/optlinks.sh
/system/bin/su -c "/opt/bin/bash --login"
2. chmod 755 shell.sh and optlinks.sh
3. Edit /etc/profile and add :/opt/sbin:/opt/bin to the PATH export and :/opt/lib to the LD_LIBRARY_PATH export.
4. Install Jack Palevich's Terminal Emulator from the Market
5. In Terminal Emulator's Prefs, set Initial Command to shell.sh.
I had to put the optlinks.sh part in because that's what optware expects - the Nook has those locations, SRF doesn't. Symlinks seem to work fine, but they disappear on reboot - no idea why - so that's why I run it every time.
Now, when I launch Terminal Emulator, I get a root shell, and can use ipkg install to get anything optware provides. It would be really cool if I the shell was run as a normal (non-root) user, and even better if the optware installer didn't need all the workarounds. Anybody have any ideas?
Tried this on CM 7
First off, thanks!
I tried this on CM 7 nightly (nexus one) and here is what I found:
- Most importantly, it broke root access to other apps on the phone. Not sure if this is due to not being able to update init.rc, may try to sort this out later.
- The goal of the install is to be able to run an SSH server and in addition to that you will have access to optware.
- The default busybox that is included with CM7 does not include adduser, addgroup or passwd applets which will cause things to fail once the install script tries to add a new user. Also, there is an app called "busybox installer" on the market that *will* update busybox, however it depends on libraries that CM7 does not include by default. The result is none of the busybox applets can reach the internet due to not being able to resolve domain names.
If you open the optware-bootstrap-0.0.1.shar file with 7zip, you will see there is a busybox executable included. It's an older version, however it includes what you need. I copied that version to /system/xbin and I was able to use the aforementioned applets
- At the end of my install I received an error that it was unable to edit the ram disk while trying to update init.rc. I think the solution is to add a script to /system/etc/init.d/ . Still working that out.
- I'm probably going to try combining this method with this one: http://android.modaco.com/topic/312...cripts-installing-bash-dropbear-mc-nano-opkg/ Since this is more of a manual method, however it's connecting to a custom optware feed that only has a few packages.
I dont suppose you got anywhere with this?
Looking to install optware on my desire hd running miui rom.
I tried today to upgrade from 4.1.2 to 4.2.2 but it failed about 30% of the way through the upgrade and ended with the Droid on his back with a red x.
Its rooted but got stock recovery.
I did the same upgrade for my Nexus 4 to 4.2.2 from 4.2.1 and that upgraded fine.
What's causing the upgrade to fail?
Any help would be much appreciated.
Thanks
Jon
Sent from my Nexus 7 using XDA Premium HD app
look for the error message in /cache/recovery/recovery.log
If you comb thru the bigger threads on the 4.2.2 update....every imaginable problem and solutions are in there.
Sent from my cell phone telephone....
This is part of the log that shows the failure.
Any help would be much appreciated.
Thanks
Verifying current system...
failed to stat "/system/xbin/bttest": No such file or directory
file "/system/xbin/bttest" doesn't have any of expected sha1 sums; checking cache
failed to stat "/cache/saved.file": No such file or directory
failed to load cache file
script aborted: assert failed: apply_patch_check("/system/xbin/bttest", "07168ec97de36a7cca8b6867ad66937c6c6c1f4d", "2bb363a3f434d165d1167d915c2ba44967e22071")
assert failed: apply_patch_check("/system/xbin/bttest", "07168ec97de36a7cca8b6867ad66937c6c6c1f4d", "2bb363a3f434d165d1167d915c2ba44967e22071")
E:Error in /cache/da55f917feee.signed-nakasi-JDQ39-from-JZO54K.da55f917.zip
Sent from my Nexus 7 using XDA Premium HD app
OK jonchill I will try to help out.
But only because you inadvertently disclosed a new OTA download (JZO54K->JDQ39) for nakasi.
Here's the deal:
The OTA process performs checksums on hundreds of individual files (and even partitions e.g. boot partition) before it begins any work. 100% of checksums must pass before anything gets changed by the OTA.
It's a safety feature meant to protect people from applying the wrong files to their tablets/phones. More importantly, the reason that it is done is because the OTA does not contain "replacement" files - it only has small binary "patch" files which can be used only in conjunction with the original file to create the intended replacement file. This is how OTAs can be so much smaller than a full ROM - the files already present are "patched" to create their replacements.
But the bottom line is that if *you* removed or altered any single file which is a target of the OTA patching process, these pre-installation checks will fail. (Even worse, it stops immediately - it is possible that you have more than one file involved in this. Because of this stop-on-first-fail behavior, you don't know yet whether or not there are more to come.)
When I say *you* I mean you personally plus any root-using apps which you installed and ran on your tablet. Could have been an app.
OK, now for the good news. I downloaded the OTA - thanks for providing the file name - and looked at the installer script; that installer script for JZO54K-> JDQ39 is shown here on pastebin. The file which your OTA is complaining about is "bttest" - and as it turns out, this check occurs on line 1040 - it is the third from last file checked. The only thing which comes after that is a check of
/system/xbin/dexdump
and
the boot partition ( EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX )
Now I don't have any idea what might have caused "bttest" to disappear from your ROM. On the off-chance that "dexdump" got deleted too, attached is a zip of those two files from the JZO54K distro.
This is not a flashable zip - it's just the two files. It's your responsibility to get them into /system/xbin/
Note their ownership info:
Code:
-rwxr-xr-x 1 root 2000 5448 Oct 2 14:49 /system/xbin/bttest
-rwxr-xr-x 1 root 2000 59828 Oct 2 14:49 /system/xbin/dexdump
If you restore them to /system/xbin/ make sure you
Code:
chown 0.2000 /system/xbin/bttest /system/xbin/dexdump
chmod 755 /system/xbin/bttest /system/xbin/dexdump
I verified their SHA1 checksums (note these are the 2nd string of digits in the failing assert_check).
2bb363a3f434d165d1167d915c2ba44967e22071 bttest
e5e4d35038ed3e32a15194275806d90e64e003c6 dexdump
good luck.
I've downloaded the files and tried transferring them across to XBIN but it fails saying the folder isn't writable, I've tried changing the permissions on the folder but it errors saying can't set permissions.
What am I doing wrong?
Thanks
The /system partition is typically mounted "ro" - Read Only.
Root-aware file browsers typically have a toggle in their (root-related) menu to remount /system in rw mode, but you can easily do it yourself from the command line. (using a terminal emulator or adb). You just need to be root to do this. (Or you can just do everything in the custom recovery, in which case the /system mount point will be in "rw" mode by default)
C:\foo> adb shell
$ su
# mount -o remount,rw /system
(copy files into place, do chmods , etc)
# mount -o remount,ro /system
Just tried a you suggested and it doesn't seem to want to put the system into RW. I've also tried changing the permissions through the file manager I've got installed and get the same result.
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]:/ $ su
su
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
mount: Read-only file system
255|[email protected]:/ #
Thanks
jonchill said:
Just tried a you suggested and it doesn't seem to want to put the system into RW. I've also tried changing the permissions through the file manager I've got installed and get the same result.
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]:/ $ su
su
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
mount: Read-only file system
255|[email protected]:/ #
Thanks
Click to expand...
Click to collapse
Well, that's odd. I'm not really sure why that is happening. You could fool around with the mount command a little bit or just avoid all this nonsense and do what you need via adb in the custom recovery.
If your bootloader is unlocked, but you don't want to *flash* a custom recovery (I see you said you have stock recovery), you can nevertheless temporarily *boot* one, and just that temporarily booted custom recovery as in:
- put device in bootloader mode
C:\fubar> fastboot boot name-of-custom-recovery-image.img
(wait until it is booted)
C:\fubar> adb shell
# mount /system
# cp /sdcard/wherever/bttest /system/xbin/bttest
# cp /sdcard/wherever/dexdump /system/xbin/bttest
# chown 0.2000 /system/xbin/bttest /system/xbin/dexdump
# chmod 755 /system/xbin/bttest /system/xbin/dexdump
# sync
# umount /system
reboot
I don't know how you originally rooted, but generally the adb connection from either custom recovery (TWRP/CWM) needs an additional USB driver (yes, even though you "already have ADB working with the normal OS"). I suppose most lazy folks use either a toolkit or the XDA Universal Naked driver for this. (No support will be given by me on driver installs - I need to draw the line someplace.)
good luck
Tried booting to a temp custom recovery (TWRP) and followed your instructions but still getting the Read-Only file system. At this stage would it be better to take a backup and re-flash a full image?
C:\NRT\data>adb shell
~ # ←[6n
~ # ←[6nmount /system
mount /system
~ # ←[6ncp /sdcard/bttest /system/xbin/bttest
cp /sdcard/bttest /system/xbin/bttest
cp: can't create '/system/xbin/bttest': I/O error
~ # ←[6ncp /sdcard/dexdump /system/xbin/dexdump
cp /sdcard/dexdump /system/xbin/dexdump
cp: can't create '/system/xbin/dexdump': Read-only file system
Thanks
Well that is bizarre.
Some boot kernel/ramdisk configurations use a "errors=remount-ro" mount option with ext4 filesystem that automatically prevents a "rw" mount if corruption was detected in the ext4 filesystem meta-data.
Although when the mount of /system succeeds in 4.2.2 stock I don't see that - this is what you get:
Code:
adb shell cat /proc/mounts | grep system
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
I also don't see that option in use with TWRP 2.4.1.0 either:
Code:
adb shell cat /proc/mounts | grep system
/dev/block/mmcblk0p3 /system ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
It's just a hypothesis - but perhaps somehow your /system partition got damaged?
I am reluctant to continue giving advice since your device is behaving non-nominally. (I never used JZO54K, so I can't say for sure.)
It is possible that doing a dirty overflash of factory 4.2.2 (of only the boot partition & system partition) via fastboot would succeed, but I would feel a lot more comfortable about doing that in the sequence JOP40C->JOP40D->JDQ39 where you are converting a 4.2.x ROM to a later version. In your case though, coming from a 4.1.x ROM (JZO54K), that seems like there could be downstream problems.
The conservative route would be to take as many backups as you feel are appropriate, e.g. Nandroid + TiBu or Carbon, reinstall the full factory 4.2.2 stock (including bootloader!), re-root, and then restore your market apps & data (TiBu or Carbon). Note that because we have no idea what the changes/bug fixes were in the 4.18 bootloader update, you probably want to make sure you install the 4.18 bootloader first (and make sure to reboot to it!) before doing any of the subsequent steps (partition erasures & formatting, in particular).
I wouldn't do anything at all, though until I had succeeded making a full Nandroid backup and making sure I had a copy of it off of the tablet. Do your Nandroid backups succeed?
bftb0 said:
Well that is bizarre.
Some boot kernel/ramdisk configurations use a "errors=remount-ro" mount option with ext4 filesystem that automatically prevents a "rw" mount if corruption was detected in the ext4 filesystem meta-data.
Although when the mount of /system succeeds in 4.2.2 stock I don't see that - this is what you get:
Code:
adb shell cat /proc/mounts | grep system
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
I also don't see that option in use with TWRP 2.4.1.0 either:
Code:
adb shell cat /proc/mounts | grep system
/dev/block/mmcblk0p3 /system ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
It's just a hypothesis - but perhaps somehow your /system partition got damaged?
I am reluctant to continue giving advice since your device is behaving non-nominally. (I never used JZO54K, so I can't say for sure.)
It is possible that doing a dirty overflash of factory 4.2.2 (of only the boot partition & system partition) via fastboot would succeed, but I would feel a lot more comfortable about doing that in the sequence JOP40C->JOP40D->JDQ39 where you are converting a 4.2.x ROM to a later version. In your case though, coming from a 4.1.x ROM (JZO54K), that seems like there could be downstream problems.
The conservative route would be to take as many backups as you feel are appropriate, e.g. Nandroid + TiBu or Carbon, reinstall the full factory 4.2.2 stock (including bootloader!), re-root, and then restore your market apps & data (TiBu or Carbon). Note that because we have no idea what the changes/bug fixes were in the 4.18 bootloader update, you probably want to make sure you install the 4.18 bootloader first (and make sure to reboot to it!) before doing any of the subsequent steps (partition erasures & formatting, in particular).
I wouldn't do anything at all, though until I had succeeded making a full Nandroid backup and making sure I had a copy of it off of the tablet. Do your Nandroid backups succeed?
Click to expand...
Click to collapse
Thanks for all your help, as this is going to be quite a bit more complex than first thought I'm going to leave the above until I come back from holiday.
Thanks again.
You can always tell when there's a technical guru around... they use wonderful phrases like "...since your device is behaving non-nominally...".
bftb0, your posts, as ever, continue to be hugely informative and a delight to read...
----------
Hi, jonchill... (when you return from your holiday)...
Here's what I would try...
When I'm poking around in /system (usually for something more prosaic, like changing the BOOTANIMATION.ZIP), I use X-Plore File Manager (http://play.google.com/store/apps/details?id=com.lonelycatgames.Xplore&hl=en).
It's a ROOT capable DUAL pane file manager... so you should be able to copy the files directly into /SYSTEM/XBIN (setting one pane as your SOURCE, the other as your DESTINATION TARGET).
Once copied there, LONG PRESS on the respective files just copied, select PERMISSIONs from the context menu that appears, and set accordingly.
But first, you will have to go into CONFIGURATION>ROOT ACCESS and set X-Plore File Manager to SUPERUSER+MOUNT WRITABLE...
I have both these files (bttest and dexdump) in my xbin folder... and permissions for both are 755.
See my screenshots appended to this post.
Hope this helps...
Rgrds,
Ged.
-----------
PS. where did you get the OTA updater ZIP nakasi-JDQ39-from-JZO54K.da55f917.zip from? I've Googled around for it, but can't find it anywhere. Would be nice to have it in my collection.
GedBlake said:
You can always tell when there's a technical guru around... they use wonderful phrases like "...since your device is behaving non-nominally...".
bftb0, your posts, as ever, continue to be hugely informative and a delight to read...
----------
Hi, jonchill... (when you return from your holiday)...
Here's what I would try...
When I'm poking around in /system (usually for something more prosaic, like changing the BOOTANIMATION.ZIP), I use X-Plore File Manager (http://play.google.com/store/apps/details?id=com.lonelycatgames.Xplore&hl=en).
It's a ROOT capable DUAL pane file manager... so you should be able to copy the files directly into /SYSTEM/XBIN (setting one pane as your SOURCE, the other as your DESTINATION TARGET).
Once copied there, LONG PRESS on the respective files just copied, select PERMISSIONs from the context menu that appears, and set accordingly.
But first, you will have to go into CONFIGURATION>ROOT ACCESS and set X-Plore File Manager to SUPERUSER+MOUNT WRITABLE...
I have both these files (bttest and dexdump) in my xbin folder... and permissions for both are 755.
See my screenshots appended to this post.
Hope this helps...
Rgrds,
Ged.
-----------
PS. where did you get the OTA updater ZIP nakasi-JDQ39-from-JZO54K.da55f917.zip from? I've Googled around for it, but can't find it anywhere. Would be nice to have it in my collection.
Click to expand...
Click to collapse
Ged
The OTA was what I received automatically.
I've already got XPlore and have tried what you suggested but get Can't write to file /system/xbin/bttest can't move temp file to /system/xbin/bttest.
Thanks