Related
DISCLAIMER: You know the risks, bricking, breaking etc. I'm not, nor is anyone else responsible if something goes wrong with your device, especially should it turn into a cave troll and bludgeon someone to death.
You will have to be rooted for this to work.
Update 1/5/11
Changed the install and loader scripts re-compressed and uploaded, new download link. Stream lined the installation process (removed 5 steps)
Update 1/4/11
reflect changes to ubuntu.sh and bootubuntu scripts and streamlining the process. Added screenshots
_________________________
I was over at nexusonehacks.net and looking at the ubuntu on nexus one hack and was thinking that this could be ported to the nook color. The idea is to run ubuntu from an img on the sd card.
The following is a modified version of the "how to" orginally posted here
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
Credits
The guys at NexusOneHacks
xda user munday who has modified the scripts to work for the nook color
Devs at XDA Developer for the Ubuntu ARM image for HTC HD2
Saurik (Jay Freeman) for the Debian G1 script, which was hacked for Ubuntu on Nexus One! and then re-hacked for the Nook Color by munday
Here we go:
1) Go download the ubuntu file here: http://www.megaupload.com/?d=67BU4Y3T
2) Extract the contents using 7zip http://www.7-zip.org/download.html
3) Copy the extracted folder "ubuntu" to the root of your SD card
4) Unmount the nook from your pc, go into the app NookColor Tools (if you don't have it download it here courtesy of Ben 74 and click All Settings->Development then uncheck Auto Mount. This will prevent the SD card from being mounted automatically when plugged into the PC
5) Plug the Nook back into your pc and open a command line then navigate to your android sdk folder ie C:\android-sdk or wherever you have it and type
Code:
adb devices
Hit enter and make sure that the nook color comes up (should be the SN of your Nook)
Note: This can also be done from terminal emulator instead of adb...but it is kind of a pain
6) Now we want to go into the command line on the nook so type
Code:
adb shell
Hit enter and this should bring up a "#" sign.
7) Type
Code:
su
hit enter (I do this just as a force of habit)
8) Now we navigate to the ubuntu folder we just copied to our sd card by entering
Code:
cd /sdcard/ubuntu
hit enter. To confirm you are where you want to be you can type
Code:
ls
and it should list the contents of the ubuntu folder.
9) Run the setup script ubuntu.sh by entering the following:
Code:
sh ./ubuntu.sh
hit enter
10) Now type
Code:
bootubuntu
and hit enter
11) So now we have ubuntu command line up and running which should look like:
Code:
[email protected]:/#
We will need to get some packages to run a gui and then connect to it via VNC client. So we need to update a few things first. Type:
Code:
apt-get update
then
Code:
apt-get install tightvncserver
now we need the gui elements so enter this:
Code:
apt-get install lxde
12) Type the following:
Code:
export USER=root
vncserver -geometry 1024×600
this sets the resolution...you can change it to play around, but the native resolution for the nook is 1024x600. This is also where you will set the password for your vnc server...make sure to remember it
13) Next, we are going to add the following to /root/.vnc/xstartup file using cat command: (hit enter after each line and ignore the fact that it looks like it does it twice)
Code:
cat > /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
After hitting enter after the last line press "Ctrl+D" twice then press enter
14) We need the vnc server to start every time we start ubuntu, type this:
Code:
cat > front
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1024×600
Same as before, hit enter after each line then after hitting enter for the last line press "Ctrl+D" twice then press enter.
15) Enter this
Code:
cat front /root/.bashrc > temp
Then
Code:
cp temp /root/.bashrc
16) Now on the nook open up your vnc viewer app (android vnc viewer or PocketCloud...or whatever you use)
Use the following settings:
Host Address: 127.0.0.1 (some don't require this)
Password: the password you set up in step 16
Port: 5901
Save and then click connect and you should be up and running on ubuntu! To leave ubuntu type exit from adb. This should kill ubuntu. Exit adb and then you can disconnect the nook from your pc.
To start ubuntu from the nook open up a terminal emulater and type:
Code:
bootubuntu
Hit enter, this should bring up the [email protected], hhen press "Home" key and open up your vnc app. Now you are ready to rock your Linux tablet!
You could also use gscript lite to automate the process of starting ubuntu so you don't have to type it in the terminal everytime. You can get gscript lite from the market or download the file I have attached.
It does seem a little laggy..just a little...for now anyway
To exit ubuntu: Disconnect the vnc client then hold the "Home" key (I use button savior which brings up a nice little task manager) and click the Terminal emulator when it pops up under running tasks. Once you are back in the terminal you can type:
Code:
exit
to shut down ubuntu.
Enjoy and make sure you thank munday and the guys at nexusonehacks and all the devs who helped make it possible.
-devastator
EDIT:
I noticed that after rebooting the nook would hang at the "Future of reading" screen....if this happens turn the device off remove the sd card the turn the nook back on. It should boot fine. After it's finished you can return the sd card and mount it. This is strange and I'm looking into it. I'm not sure if this is limited to me or if it is universal to all nooks. It also still fails at shutting ubuntu down for some reason. I'm still looking into this.g into this.
I got it going, just needed a few "busybox"-es here and there . It needs some work, right now to get X you have to use VNC.
It's sluggish but a bit more work might just yield something a bit more usable. I'll play more tomorrow night.
Here's my scripts:
ubuntu.sh
Code:
mount -o remount,rw /dev/block/mmcblk0p5 /system
busybox modprobe ext2
rm -f /data/local/bin/fsrw
rm -f /data/local/bin/bootubuntu
rm -f /data/local/bin/unionfs
rm -f /data/local/bin/installer.sh
rm -f /data/local/bin/mountonly
mkdir /data/local/mnt
#busybox clear
rm /system/bin/fsrw
rm /system/bin/bootubuntu
rm /system/bin/unionfs
rm -/system/bin/mountonly
busybox cp -f fsrw /system/bin
busybox cp -f bootubuntu /system/bin
busybox cp -f unionfs /system/bin
busybox cp -f mountonly /system/bin
cd /sdcard/ubuntu
busybox chmod 4777 *
cd /system/bin/
busybox chmod 4777 *
cd /
#busybox clear
echo " "
echo "Ubuntu Chroot Bootloader v0.1"
echo "Ubuntu Bootloader is now installed!"
echo "This process does NOT damage Android OS!"
echo " "
echo "Original Installer by Charan Singh"
echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
echo " "
echo "To enter the Debian Linux console just type 'bootubuntu'"
bootubuntu
Code:
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox mknod /dev/loop2 b 7 0
mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
busybox chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Then just followed the instructions at nexusonehacks.
note: to run bootubuntu i had to use sh and the use the full path:
Code:
# sh /system/bin/bootubuntu
other note: I was using adb not a term app on the nook.
Obligatory video
I can't post links yet so check: youtube.com/watch?v=TnXfZ6aagn8 for a really boring video
EDIT: switched the names, DOH!
I also had to use sh and the full path also. Thanks for the update on the script...gonna try it in the morning (it's 2am here) will also see if I can help to get it running smoother. What class SD card are you using? I imagine a class 4 or higher would yeild better results as far as responsiveness goes.
The sd is a class 2 that came in one of my dev phones. I'll pick up a faster one tomorrow after work and test it out.
It's just about 3am here now, we must be in the same time zone.
I'm going to bed now, but first here's a modded version of the script you had originally posted that also works now.
bootubuntu
Code:
#!/bin/sh
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
busybox [ ! -d /data/local/ubuntu ] && mkdir /data/local/ubuntu
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox mknod /dev/loop1 b 7 0
busybox losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop1 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
busybox chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
busybox losetup -d /dev/loop1
#unregistering the loopback device just seems to die. need to fix or remove.
I'll look at the N1 formus tomorrow too and see if they have made progress in getting X to run fast or without need for VNC.
Nice work, I am addicted in seeing the crazy crap people are doing everyday.
Couldn't sleep so I'm messing around with it now...I'm using a class 4 and have it up and running. It does seem to be a little laggy, but I don't have a class 2 to compare it to. Let me know what you find out, I'll keep playing with it also to see if I can get it to be more responsive...but we are definately on our way to having a great little linux tablet in addition to android. You should also be able to use this for other builds of linux also by just changing out the .img file to a flavor of your choosing. I'm excited
I have also updated the OP with the how to and credits. Really appreciate your help munday.
I noticed that after rebooting the nook would hang at the "Future of reading" screen....if this happens turn the device off remove the sd card the turn the nook back on. It should boot fine. After it's finished you can return the sd card and mount it. This is strange and I'm looking into it. I'm not sure if this is limited to me or if it is universal to all nooks.
Edit:
Running into some strange occurrences...it appears that when you type exit from the terminal to kill ubuntu, I believe ubuntu stays running...anyway, I'm going to bed and will work on it more tomorrow.
devastatorx said:
You should also be able to use this for other builds of linux also by just changing out the .img file to a flavor of your choosing. I'm excited
Click to expand...
Click to collapse
Are there any increased risks with changing the version you use?
Well, you will want to make sure that the build supports ARM based devices.
munday said:
Then just followed the instructions at nexusonehacks.
note: to run bootubuntu i had to use sh and the use the full path:
Code:
# sh /system/bin/bootubuntu
Click to expand...
Click to collapse
I fixed this, the scripts were backwards, I have updated the OP to reflect the changes and bootubuntu now works
devastatorx said:
I fixed this, the scripts were backwards, I have updated the OP to reflect the changes and bootubuntu now works
Click to expand...
Click to collapse
sweet, i can't wait to get home to play more!!!
I've tried running ubuntu.sh from the terminal emulator (With su) and from ADB, and have not had success with either.
The readout is:
Code:
': File existste '/system/bin
': File existste '/system/bin
': File existste '/system/bin
: not found
: not found
cd: can't cd to /sdcard/ubuntu
: not found
: No such file or directory
: not found
cd: can't cd to /system/bin
: not found
: No such file or directory
: not found
cd: can't cd to /
: not found
: not found
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
etc., etc.
Is there a problem with how I copied the script? I assume the first part about the file existing is due to this being the third or fourth time I've tried running the script (Unsuccessfully), but I've no idea how to interpret the rest.
Thanks
munday said:
sweet, i can't wait to get home to play more!!!
Click to expand...
Click to collapse
I sent you a message
Link3737 said:
I've tried running ubuntu.sh from the terminal emulator (With su) and from ADB, and have not had success with either.
The readout is:
Code:
': File existste '/system/bin
': File existste '/system/bin
': File existste '/system/bin
: not found
: not found
cd: can't cd to /sdcard/ubuntu
: not found
: No such file or directory
: not found
cd: can't cd to /system/bin
: not found
: No such file or directory
: not found
cd: can't cd to /
: not found
: not found
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
etc., etc.
Is there a problem with how I copied the script? I assume the first part about the file existing is due to this being the third or fourth time I've tried running the script (Unsuccessfully), but I've no idea how to interpret the rest.
Thanks
Click to expand...
Click to collapse
Try using these, just unrar and then copy them in your ubuntu folder, if it asks to overwrite just click yes...also you have autmounting of the sd card turnned off in nook color tools settings right?
Yeah, it must have been an error on my end. Using the updated scripts you posted worked like a charm.
Thanks!
Link3737 said:
Yeah, it must have been an error on my end. Using the updated scripts you posted worked like a charm.
Thanks!
Click to expand...
Click to collapse
Good to hear!
I'm currently working on making this a port to the SD card so that with the sd card in it boots into ubuntu from power off, and with the sd card out it boots to android then you replace the sd and use it for storage like normal. It will also run a lot snappier....well that's the idea anyway.
devastatorx said:
Good to hear!
I'm currently working on making this a port to the SD card so that with the sd card in it boots into android from power off, and with the sd card out it boots to android then you replace the sd and use it for storage like normal. It will also run a lot snappier....well that's the idea anyway.
Click to expand...
Click to collapse
Booting from SD in the same fashion as Nookie Froyo? That sounds like it would give a huge performance boost over the current method, I can't wait to see what you come up with.
This should be acheivable using the method mentioned in this topic:
http://forum.xda-developers.com/showthread.php?t=873243 thanks to clockworx.
Currently looking into this
devastatorx said:
This should be acheivable using the method mentioned in this topic:
http://forum.xda-developers.com/showthread.php?t=873243 thanks to clockworx.
Currently looking into this
Click to expand...
Click to collapse
I was thinking the exact same thing, the nook seems to like booting from sd, so we should be able to set up the partitions like the foryo sd and edit the init.rc and env.txt to boot ubuntu instead of android. Just a theory though. It's my plan for tonight anyway.
munday said:
I was thinking the exact same thing, the nook seems to like booting from sd, so we should be able to set up the partitions like the foryo sd and edit the init.rc and env.txt to boot ubuntu instead of android. Just a theory though. It's my plan for tonight anyway.
Click to expand...
Click to collapse
I also stumbled across this: http://androix.org/ Which talks about a native android xserver which does a way with the vnc aspect altogether. I downloaded and attempted to install but I get the error "There is a problem parsing the package" and I haven't had any luck plus there isn't much documentation.
Let me know how it goes munday, I'll be working on the same thing later (have to take the fiance out for dinner)
question
I was just curious, after installing ubuntu can we install flash as we would had we booted linux from netbook?
Attached, Just run the blockupdates.bat file then sit back and relax. Obviously you need the Nook plugged in and ADB access enabled.
Code:
echo off
cls
echo *****************************************
echo * We will create the directory .Android *
echo * We will also create the adb_usb.ini *
echo *****************************************
md "%USERPROFILE%\.Android"
echo 0x2080 > "%USERPROFILE%\.Android\adb_usb.ini"
echo Success
adb kill-server
adb devices
echo ************************
echo * Blocking OTA Updates *
echo ************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
sqlite3 devicemanager.db "update registry set value='manual' where name='com.bn.device.fota.mode';"
adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
del devicemanager.db
ping -n 2 127.0.0.1 >NUL
echo Success
adb reboot
adb kill-server
echo *****************************
echo * You nook is rebooting! *
echo * Disconnect the USB cable! *
echo * Done :) *
echo * *
echo * www.thexboxexpert.com *
echo *****************************
pause
exit
To allow access to updated run the following script the same way above was ran.
Code:
echo off
cls
echo *****************************************
echo * We will create the directory .Android *
echo * We will also create the adb_usb.ini *
echo *****************************************
md "%USERPROFILE%\.Android"
echo 0x2080 > "%USERPROFILE%\.Android\adb_usb.ini"
echo Success
adb kill-server
adb devices
echo ************************
echo * Allowing OTA Updates *
echo ************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
sqlite3 devicemanager.db "update registry set value='auto' where name='com.bn.device.fota.mode';"
adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
del devicemanager.db
ping -n 2 127.0.0.1 >NUL
echo Success
adb reboot
adb kill-server
echo *****************************
echo * You nook is rebooting! *
echo * Disconnect the USB cable! *
echo * Done :) *
echo * *
echo * www.thexboxexpert.com *
echo *****************************
pause
exit
Thanks xbox, your a scripting genius, I'm not worthy.......
Do we need "shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system" in the script? I'm a noob and I don't know what this does...
Because the other thread (http://forum.xda-developers.com/showthread.php?t=933291) doesn't mention this.
redking79 said:
Do we need "shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system" in the script? I'm a noob and I don't know what this does...
Because the other thread (http://forum.xda-developers.com/showthread.php?t=933291) doesn't mention this.
Click to expand...
Click to collapse
Just run the script and stop asking questions - j/k
That sets rw to the system folder until reboot. Eliminating any errors that might occur. To successfully answer your question, no you do not need it in the script but it doesn't effect anything negatively either.
xboxexpert said:
Just run the script and stop asking questions
That sets rw to the system folder until reboot. Eliminating any errors that might occur. To successfully answer your question, no you do not need it in the script but why are you editing my scrip in the first place :/
Click to expand...
Click to collapse
I am not editing your script nor doubting your abilities, but I'm asking because I want to learn.
redking79 said:
I am not editing your script nor doubting your abilities, but I'm asking because I want to learn.
Click to expand...
Click to collapse
Edited my response due to the fact that I've been working for 13 hours and am edgy I know you wanted to learn sorry for that read my edited post up top
redking79 said:
Do we need "shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system" in the script? I'm a noob and I don't know what this does...
Because the other thread (http://forum.xda-developers.com/showthread.php?t=933291) doesn't mention this.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=933291 is where this came from, of course.... So probably better to ask there.
xbox just likes reposting things.. I guess he's making it slightly more user friendly so he can sell it on ebay.
I try running this script and keep getting "sqlite3 is not an internal or external file " and will not complete. I just installed the combo adb driver pack and everything installed fine. Can anyone help?
xboxexpert said:
Attached, Just run the blockupdates.bat file then sit back and relax. Obviously you need the Nook plugged in and ADB access enabled.
Code:
echo off
cls
echo *****************************************
echo * We will create the directory .Android *
echo * We will also create the adb_usb.ini *
echo *****************************************
md "%USERPROFILE%\.Android"
echo 0x2080 > "%USERPROFILE%\.Android\adb_usb.ini"
echo Success
adb kill-server
adb devices
echo ************************
echo * Blocking OTA Updates *
echo ************************
adb shell mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
sqlite3 devicemanager.db "update registry set value='manual' where name='com.bn.device.fota.mode';"
adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
del devicemanager.db
ping -n 2 127.0.0.1 >NUL
echo Success
adb reboot
adb kill-server
echo *****************************
echo * You nook is rebooting! *
echo * Disconnect the USB cable! *
echo * Done :) *
echo * *
echo * www.thexboxexpert.com *
echo *****************************
pause
exit
Click to expand...
Click to collapse
khaytsus said:
http://forum.xda-developers.com/showthread.php?t=933291 is where this came from, of course.... So probably better to ask there.
xbox just likes reposting things.. I guess he's making it slightly more user friendly so he can sell it on ebay.
Click to expand...
Click to collapse
ebay got suspended months ago
Are there any sqlite apps in market to edit DBs on nook itself?
Jf-ws6. You likely need to install the android sdk on your PC.
bonzer2u said:
Jf-ws6. You likely need to install the android sdk on your PC.
Click to expand...
Click to collapse
I do have android sdk on my PC. i used this link and downloaded the combo sdk and driver.
http://forum.xda-developers.com/showthread.php?t=910008
JF-WS6 said:
I do have android sdk on my PC. i used this link and downloaded the combo sdk and driver.
http://forum.xda-developers.com/showthread.php?t=910008
Click to expand...
Click to collapse
Ahhh, did u edit/add to your path in windows?????????
# This step is optional but makes using ADB a lot easier
1. Start > Right-Click Computer > Properties > Advanced > Environment Variables
2. Under 'System Variables', scroll down to 'Path' and double click it
3. In 'Variable Value', scroll to the end and add ";C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools" (without the quotes)
Read more: http://nookdevs.com/NookColor_USB_ADB#ixzz1CpsmBNGE
Under Creative Commons License: Attribution Non-Commercial Share Alike
bonzer2u said:
Ahhh, did u edit/add to your path in windows?????????
# This step is optional but makes using ADB a lot easier
1. Start > Right-Click Computer > Properties > Advanced > Environment Variables
2. Under 'System Variables', scroll down to 'Path' and double click it
3. In 'Variable Value', scroll to the end and add ";C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools" (without the quotes)
Read more: http://nookdevs.com/NookColor_USB_ADB#ixzz1CpsmBNGE
Under Creative Commons License: Attribution Non-Commercial Share Alike
Click to expand...
Click to collapse
I'll try this tonight. Hope it works
confirmation of being run?
Since this was a Windows .bat file I ended up running the commands manually at a Linux shell prompt. The NC definitely rebooted, but is there an easy way to tell if the OTA updates were actually turned off?
Thanks!
Robert
Robertjm said:
Since this was a Windows .bat file I ended up running the commands manually at a Linux shell prompt. The NC definitely rebooted, but is there an easy way to tell if the OTA updates were actually turned off?
Thanks!
Robert
Click to expand...
Click to collapse
Unfortunately no. That's why I prefered to do it manually. Nothing wrong with the script but I just felt more confident doing each step myself and typing it in and making sure everything was what I expected. I did the block two days ago on my AutoNootered 1.01 NC and have used it extensively and haven't received any updates.
redking79 said:
Unfortunately no. That's why I prefered to do it manually. Nothing wrong with the script but I just felt more confident doing each step myself and typing it in and making sure everything was what I expected. I did the block two days ago on my AutoNootered 1.01 NC and have used it extensively and haven't received any updates.
Click to expand...
Click to collapse
You should never get updated as long as you maintain the 'manual' setting as described. I also do it manually but thats a personal preference, I asked xbox to script it as a courtesy to others that have asked since he is a scripin kinda guy....
bonzer2u said:
Ahhh, did u edit/add to your path in windows?????????
# This step is optional but makes using ADB a lot easier
1. Start > Right-Click Computer > Properties > Advanced > Environment Variables
2. Under 'System Variables', scroll down to 'Path' and double click it
3. In 'Variable Value', scroll to the end and add ";C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools" (without the quotes)
Read more: http://nookdevs.com/NookColor_USB_ADB#ixzz1CpsmBNGE
Under Creative Commons License: Attribution Non-Commercial Share Alike
Click to expand...
Click to collapse
Ok, did the path edit and still no luck. still says "sqlite3 is not recognized as an internal or external command, operable program or batch file"
I'm starting to get very frustrated!!!!! anymore ideas? i really dont want the update and each day goes by my chances go up. my wife's got updated yesterday. hers is stock though. please help....
ADB Wireless
I edited the bat file and added an "adb connect IPORT" for wireless ADB (app in market). This is a much simpler method than trying to install the USB driver.
Thanks worked
For me!
Sent from my LogicPD Zoom2 using XDA App
I've been building a list of commands that gets executed into froyo.user.conf. Use this as a reference, as I won't be responsible for your Rhodium exploding.
# Dealing with incomplete swapfile support in userinit.sh
swapon /sdcard/swapfile
# busybox /bin/sh is 10000x better than what's in /system
mount --bind /bin/sh /system/bin/sh
# I use F22's b1home setup, not only do I get needed symbols, it doesn't do idiotic stuff like define SMS to GRAVE, then redefine GRAVE to 0x03 (Ctrl-C) in the kcm file - read my post below on how to do this
mkdir -p /init.etc/keymaps/custom
cp -a /sdcard/*.kcm* /sdcard/*.kl /init.etc/keymaps/custom
# Create /data/local if it doesn't exist, then symlink bin to /sdcard/bin if that doesn't exist
mkdir -p /data/local
[ -e /data/local/bin ] || ln -s /sdcard/bin /data/local/bin
There is now a file that is called /sdcard/local.prop that gets copied on boot. Anything related to setprop can be set there, ie. I have:
dalvik.vm.execution-mode = int:jit
dalvik.vm.heapsize = 32m
ro.cdma.home.operator.alpha seems unnecessary now, but you must still have a valid eri.xml (again residing in /sdcard) to get the system to show you the provider.
-- Starfox
---
This is for legacy FRX06 or earlier, kept as reference:
# Readahead for /sdcard as per hyc
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
# Dealing with incomplete swapfile support in userinit.sh, I use a 32mb file
swapon /sdcard/swapfile
# CDMA stuff, /etc gets rebuilt on every boot for now
echo "ro.cdma.home.operator.alpha = Sprint" >> /etc/default.prop
echo "ro.cdma.home.operator.numeric = 31000" >> /etc/default.prop
# CDMA stuff since I keep the Sprint SIM in & changing dalvik to jit
sed -e 's/default_network = 0/default_network = 4/' -e 's/vm.execution-mode = int:fast/vm.execution-mode = int:jit/' /system/build.prop > /sdcard/build.prop
# Bigger heapsize
echo "dalvik.vm.heapsize = 32m" >> /sdcard/build.prop
# /system/build.prop is mounted from /tmp, bindmount mine instead
umount -f /system/build.prop; mount --bind /sdcard/build.prop /system/build.prop
# GPS (0,0) fix
umount -f /system/lib/libhardware_legacy.so; mount --bind /sdcard/libhardware_legacy.so /system/lib/libhardware_legacy.so
# Using hyc RIL
mount --bind /sdcard/libhtcgeneric-ril.so /lib/froyo/libhtcgeneric-ril.so
# hyc's injection RIL lib
mount --bind /sdcard/libril.so /system/lib/libril.so
# Use /bin/sh (Busybox) over statically compiled sh, esp. for arrow key support
mount --bind /bin/sh /system/bin/sh
# I keep eri.xml and serialno in /sdcard/conf, and an empty dir called local
cp -a /sdcard/conf/* /data
# Term emu puts /data/local/bin in path first, I keep some binaries in /sdcard/bin, need to /data/local first
ln -s /sdcard/bin /data/local/bin
Nice. May want to note that the GPS 0,0 fix requires a fixed library.
Two sources for this:
1) Use the one on my testing thread
2) Extract it from system.ext2 of FRX06 (It may be difficult to do this with a running system due to the bindmounts. Although I see you're effectively unmounting the existing bindmount prior to mounting the new one - I should try this weekend to see if that is enough to get the fix to work with FRX06.)
2) is preferable as it's the official release, although it should be identical to mine.
Thanks alot for doing this.
Any chance you could attach the files you are showing to replace in some of your commands? Like some I see are 'build.prop', 'libhardware_legacy.so', 'libhtcgeneric-ril.so' and 'libril.so'.
Or possibly link to the original thread/post you got this from?
where do we put these in froyo.user.conf
anish88 said:
where do we put these in froyo.user.conf
Click to expand...
Click to collapse
Most go in CustomCommands...
Starfox said:
I've been building a list of commands that gets executed into froyo.user.conf. Use this as a reference, as I won't be responsible for your Rhodium exploding.
Click to expand...
Click to collapse
I hope to see most of these already incorporated in the next release...
# Readahead for /sdcard as per hyc
echo 2048 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
Click to expand...
Click to collapse
I've requested this readahead patch to be merged.
# Dealing with incomplete swapfile support in userinit.sh, I use a 32mb file
swapon /sdcard/swapfile
Click to expand...
Click to collapse
Current Android system_server is too stupid to work well with swap. And I think our low_memory_killer settings need to be tweaked to work well with it. I haven't spent any time investigating but it definitely slows down too much. I would recommend against using swap for now.
# CDMA stuff, /etc gets rebuilt on every boot for now
echo "ro.cdma.home.operator.alpha = Sprint" >> /etc/default.prop
echo "ro.cdma.home.operator.numeric = 31000" >> /etc/default.prop
# CDMA stuff since I keep the Sprint SIM in & changing dalvik to jit
sed -e 's/default_network = 0/default_network = 4/' -e 's/vm.execution-mode = int:fast/vm.execution-mode = int:jit/' /system/build.prop > /sdcard/build.prop
Click to expand...
Click to collapse
CDMA stuff is going to be automated in next ril. No more manual prop settings needed.
# Bigger heapsize
echo "dalvik.vm.heapsize = 32m" >> /sdcard/build.prop
Click to expand...
Click to collapse
Good idea.
# GPS (0,0) fix
umount -f /system/lib/libhardware_legacy.so; mount --bind /sdcard/libhardware_legacy.so /system/lib/libhardware_legacy.so
# Using hyc RIL
mount --bind /sdcard/libhtcgeneric-ril.so /lib/froyo/libhtcgeneric-ril.so
Click to expand...
Click to collapse
These should no longer be needed when my rootfs requests are merged.
# hyc's injection RIL lib
mount --bind /sdcard/libril.so /system/lib/libril.so
Click to expand...
Click to collapse
I've requested that this be merged too.
# I keep eri.xml and serialno in /sdcard/conf, and an empty dir called local
cp -a /sdcard/conf/* /data
Click to expand...
Click to collapse
New system image will have a nicer default eri.xml ...
Does this look right? It's hard tell because it's all a jumble in notepad. I highlighted the two items I added in red.
Code:
# General parameters
general{
renice=1 # Run the renice script to inprove call answering
}
#compcache related parameters
compcache{
compcache_en=1 # enable(1) or disable(0)20 compcache
cc_disksize=100 # Ram swap disksize - any number between 1 to 98 should
work; default is 1/4 of the RAM (24)
cc_memlimit=64 # Limit the memory usage for backing swap (cc .5x known issue-defaults to
15% of total RAM)
cc_backingswap_en=0 # enable(1) or disable(0) backing swap
cc_backingswap=/dev/block/mmcblk0p4 # pointing to
the backingswap partition device, swap
}
#create swap file for compcache or linux swap
swap_file{
swap_file_en=0 # set to 1 to
create swap file
# set to 0 to del the swap file
linux_swap_file_size=32 # swap file size in MB
linux_swap_file=/sdcard/swapfile # pointing to the swap file location ( must be /system/sd/)
}
#Linux swap parameters
#
# linux
swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=0 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p4 # swap partition device
}
#virtual memory
sys_vm{
sys_vm_en=1 # enable(1) or disable(0)
virtual memory configurations
swappiness=0 # default 60
page_cluster=0 # default 3, (0 since CM3.9.6+)
laptop_mode=5 #
default 0
dirty_expire_centisecs=3000 # default 3000
dirty_writeback_centisecs=1500 # default 500
dirty_background_ratio=3 #
default 5
dirty_ratio=5 # default 10
vfs_cache_pressure=200 # default 100 (tendency of the kernel to reclaim cache memory)
overcommit_memory=1 # default 0 (0=Heuristic 1=Always overcommit 2=Don't overcommit)
overcommit_ratio=80 # default 50 (% of
Physical+Virtual memory to allow allocation)
}
# custom shell commands, these commands run last
custom_shells{
chmod 777
/etc/dbus.conf
#echo 2 > /sys/devices/platform/msm_hsusb/usb_function_switch
rm -f /sdcard/fsck*.rec
modprobe ipv6
mount --bind
/sdcard/Android/libhtcgeneric-ril.so /lib/froyo/libhtcgeneric-ril.so
[COLOR=Red]# Bigger heapsize
echo "dalvik.vm.heapsize = 32m" >> /sdcard/build.prop# /system/build.prop is mounted from /tmp, bindmount mine instead
umount -f /system/build.prop; mount --bind /sdcard/build.prop /system/build.prop[/COLOR]#echo "Hello!!!" # example
#echo "You can create
your own commands here" # example
}
Avatar28 said:
Does this look right? It's hard tell because it's all a jumble in notepad. I highlighted the two items I added in red.
Click to expand...
Click to collapse
Looks fine - use Notepad++ if you're on Windows.
arrrghhh said:
Looks fine - use Notepad++ if you're on Windows.
Click to expand...
Click to collapse
Hmm, you're right. MUCH better.
System wouldn't boot into Android at first. Just went black when it should load the animated xdandroid splash screen. Finally realized that I wasn't thinking and needed to copy the build.prop file from the system folder to the SD card before I could call it. Oops.
would anyone care to provide some info on what each command does? benefits?
manny05 said:
would anyone care to provide some info on what each command does? benefits?
Click to expand...
Click to collapse
He's commented each line... if you're not sure then don't use it. highlandsun also went thru them pretty thoroughly.
I think the only thing that isn't in the category of "soon to be obsolete" or "explained by highlandsun" is the vm.heapsize tweak
I believe that vm.heapsize sets the maximum amount of memory a single app can use. As a result, it can sometimes fix applications that claim to be running out of memory when there is plenty of system RAM. (Traffic features in Google Maps are one thing that frequently breaks with the default setting of 12-16M)
Entropy512 said:
I think the only thing that isn't in the category of "soon to be obsolete" or "explained by highlandsun" is the vm.heapsize tweak
I believe that vm.heapsize sets the maximum amount of memory a single app can use. As a result, it can sometimes fix applications that claim to be running out of memory when there is plenty of system RAM. (Traffic features in Google Maps are one thing that frequently breaks with the default setting of 12-16M)
Click to expand...
Click to collapse
how much memory do you think an app needs? i mean how would i know what to set it to.
manny05 said:
how much memory do you think an app needs? i mean how would i know what to set it to.
Click to expand...
Click to collapse
If you read the OP, that value seems good. AFAIK the default is 12, in the OP it's set to 32.
manny05 said:
how much memory do you think an app needs? i mean how would i know what to set it to.
Click to expand...
Click to collapse
Most of the Android forums I've read seem to recommend 32m - which seems to be more than enough for any app I am aware of. I think the majority of cooked Android ROMs for other devices use that value.
Added support for bluetooth:
sed -e "s% /system/bin/hciattach % /data/local/bin/brcm_patchram_plus -r --enable_hci %" -e "s%-n -s 115200 /dev/ttyHS1 texas 115200 flow%--enable_lpm --baudrate 4000000 --patchram /sdcard/BCM4325.hcd /dev/ttyHS1%" -i /etc/init.rc
This of course assumes you have patchram and the hcd files in their respective place.
-- Starfox
Starfox said:
# Bigger heapsize
echo "dalvik.vm.heapsize = 32m" >> /sdcard/build.prop
Click to expand...
Click to collapse
If this heapsize line is all I want to use from the thread, should I omit the ">> /sdcard/build.prop"? This stuff is all over my head, but I'm thinking that portion might refer to other commands I'm not using and a file I might not have. Any illumination would be appreciated.
___________________
The following two commands from elsewhere (as pulled from manekineko's custom conf) enable droidwall. This seemed like a good thread for them to be in.
modprobe xt_owner
modprobe ipt_REJECT
Click to expand...
Click to collapse
For those using F22's rootfs with the new keymaps and would like to use it over the somewhat braindead one residing in FRX07, these commands will help you keep the mappings:
1) While using F22's rootfs with the correct physkeyboard, copy raph_navi_pad.* and microp-keypad.* from /etc/keymaps to /sdcard
2) Rename raph_navi_pad.kl to qwerty.kl
3) Switch over to FRX07, and add these lines to froyo.user.conf
cp -a /sdcard/*.kcm.bin /sdcard/*.kl /init.etc/keymaps/default
4) Then go to startup.txt, and delete any reference to physkeyboard=
This prevents the init from overwriting "our" keymaps with theirs, as keylayout processing occurs after parsing froyo.user.conf. The init copies whatever is in /init.etc/keymaps/default to the proper place in /system/usr/key*, then checks /init.etc/keymaps/$physkeyboard/ exist, then does the same for that directory.
If you want to preserve the default keymaps directory for some reason, you could also do:
mkdir -p /init.etc/keymaps/custom
cp -a /sdcard/*.kcm.bin /sdcard/*.kl /init.etc/keymaps/custom
And use physkeyboard=custom for steps 3 and 4.
Now time for a rant:
Really why even bother defining a key to GRAVE (microp*.kl) then defining GRAVE as 0x03 (aka Ctrl-C) in the .kcm file. You can see the generated .kcm.bin has that included, by hd microp*.kcm.bin, at the bottom. Also why take away a useable SYM popup with 0x09 (aka Ctrl-I or TAB), again in the .kcm file.
Also, the choice of b1home vs b4home. IMHO Android is too unstable to lose ENDCALL. I can recall a number of times the system became unusable with an active phone call. Relying on touch screen interaction to end a call, on a what is still an unstable port, is quite idiotic. Not to mention you lose that nice end button feature in Spare Parts. You still need the same keypress to get to the dialer with either (as pressing takes you to either the home or contact list, and another to go to dialer).
-- Starfox
Updated post for FRX07, first and last post has been edited.
-- Starfox
Well the script should be working, it is 'ettin.sh' now. To get VNC to work on separate device just change 'eth0' to 'wlan0' or whatever other interface you know how to configure, like usb maybe, in the 'init.sh' script that resides in ~/ on the images you can download from http://linuxonandroid.org/downloads/. Cool. If anyone can help with the usb configuring that would be cool.
Also on the different roms your storage might be different so just change that to what suites your environment,
BAD NEWS, After my first launch and exiting the VNC on my laptop (Ubuntu) My phones home button and a few other functions stopped working, a reboot remounts the root and system partitions and it goes back to normal essentially, I haven't noticed any adverse affects after the reboot.
Good luck.
EDIT: If you can't help me, you probably shouldn't attempt any of this.
I want to connect to backtrack over usb from Ubuntu on my laptop instead of from my phone. Is there a good way of doing this?
The thing is, I didn't chroot, I mounted the image, copied the contents of '/etc/*' and '/sbin/*' to the '*/etc' '*/sbin' dirs of the mounted image. and then mounted it's (the image's) contents to Androids rootfs '/' then I set up a little script to set up the environment and execute '/bin/bash -i init.sh' and again reset PATH to include /system/*.
Then in the init.sh script I want to set up a way to 'vnc' through' usb to backt4acks desktop. How would I do this?
EDIT: I started this script blelow, its not complete, feel free to use it however you like.
If anyone is good with bash I need help with loops in Bash or shell, ksh, or ash. So if you change it at all share those changes here. I haven't tested any of the loops, I wrote this here and need to do some reading on shell scripting, peace out.
Just NOTE that I would not execute this script yet, it is NOT YET COMPLETE.
I will be making minor changes as I learn and test things out, Also this was inspired by the autobootscrip (sp?) that the Linux on Android Installer app uses.
mintberrycrunch revision
I need a little help with the mounting part, "is there anybody out there?"
EDIT: Maybe escape '\' characters...
Maybe this will work? 'if [ ! -d "/$d" -a "$d" \!= "dev" -o "$d \!= "mnt" ]; then ' I want it to test whether the directory does not already exists in / and if it is not named dev or named mnt then mount it. Do you think this is a decent way to do it? Any suggestions?
Sorry, I still haven't tested this script yet, so if you brave and see any changes that will make it work I am not resposible. But it is getting close to when I will run it for the first time. The difference between this and the one I wrote for Kali is this should be a one stop shop so to speak for getting into a non chroot enviroment where you can access Bt's tools from Android directly. Apperently about a year ago someone was trying something similar called "debian installer" or something, I haven't tried it out so maybe that actually works, idk, I am happy with this.
LOL
LMFAO!
I just realized I don't think I needed to worry about testing if the variable $d was named 'dev' or 'mnt' because they should get skipped by already being mounted. If not I guess if it works as is, may be extra precaution.
Done! Almost ;{)-
Uhmm.... hope you can see the screenshot...
its over wifi though, I had to edit the init.sh script just eth0 to wlan0 in 2 lines, duh! where is eth0 on phone?
Check out the filesystem
Bada bing, bada doom, dare ya goes`a for ya.
V-0.021
This should support args, if your using different image or location such as external sdcard or want to mount to a different location
Notes: 'ettin.sh' [/IMAGE/LOCATION] [IMAGENAME] [MOUNT/POINT]'
1) Don't add a trailing forward slash for image location, the first argument. Doing so may conflict with the script.
2) Don't add suffix to image name ( second argument), the script uses a wild card period wild card syntax to account for .iso, .raw, or .img aswell as version numbers, so if its backtrack-v-r5.img all you need is 'backtrack'.
3) Default mount is "/data/local/mnt"
for example:
Code:
ettin.sh /storage/extSdCard/ubuntufolder ubuntu /mnt/myLinux
That ^^^ will use a ubuntu image on the external sdcard and mount it to a folder called "myLinux" within the "/mnt" directory.
The script below...
Code:
#!/system/bin/sh
# ettin.sh v-0.021, "Two heads are better than one."
# Written by 'Edge-Case' @ 'forum.xda-developers.com'
# This version is attempting to use symbolic linking to correct some issues.
## The purpose of ettin.sh is to merge a Linux system with Android
## hopefully allowing both systems to run in synch with each other.
## It is probably best to be ran on devices with multi-core processors.
##"""Notes on Backtrack and Kali Linux Distributions:
##"""1) Postgresql needs to be configured in order for metasploit to connect to
##""" the database. This might be possible within the script. Perhaps
##""" it is simply a matter of configuring SSH? I don't know.
##"""2) The Kernel needs to be patched to allow for packet injection and
##""" monitor mode for an external 'wi-fi' card as the factory hardware
##""" does not support monitor mode, at least on Samsung Galaxy SIII.
#########
# Prep ##
#########
mount -wo remount systemfs /system
mount -wo remount rootfs /
imloc=${1:-"/storage/sdcard0/backtrack"}
imname=${2:-"backtrack"}
subset=${3:-"/data/local/mnt"}
#Check for root!
if [ ! -d "$subset" ]; then mkdir "$subset"; fi
busybox mount -wo loop ${imloc}*/${imname}*.* ${subset}
check_mnt="`echo $?`"
if [ ${check_mnt} != 0 ]; then echo "Something is wrong with mounting, check the situation!" && exit; fi
##################################################
# Copy contents of special directories to image ##
##################################################
if [ ! -f "${imloc}/success.txt" ] ; then cp -ai /sbin/* ${subset}/sbin && echo "Files have been copied on `date`." > ${imloc}/success.txt; fi
if [ -e "/root/*" ]; then cp ai /root/* ${subset}/root; fi
######################################################
# Make directories needed and mount the file-system ##
######################################################
cd ${subset}
for d in `ls` ; do if [ ! -d "/${d}" ] ; then mkdir /${d} && busybox mount --rbind ${subset}/${d} /${d} ; fi ; done
busybox mount --rbind ${subset}/root /root
busybox mount --rbind ${subset}/sbin /sbin
busybox cp -rspi ${subset}/etc/* /etc # We'll try making symbolic links from the image to Android's /etc instead.
# Add any directories as needed.
###############################
# be safe before we continue ##
###############################
mount -ro remount systemfs /system
mount -ro remount rootfs /
######################################
# continue building the environment ##
######################################
export PATH="/system/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/system/xbin:/usr/games"
export TERM=linux
export HOME="/root"
#################################
# further down the rabbit hole ##
#################################
/bin/bash -i ~/init.sh
Pretty happy with it now, so far. Touch FIXED
Well, I am tethered from my phone to my laptop, running ubuntu, this is how I am on the internet, so my phone is doing that...
I ran 'ettin.sh /storage/sdcard0/ubuntu ubuntu' using V-0.022 and only had two files that needed overwriting.
The touch is working....check
adb is working...check
Everything is mounted ...check
Apps like browser and dsploit are working on the phone as usual...check
'apt-get update && apt-get upgrade'....check (over adb, no chroot, as [email protected] using bin/bash)
'which nmap' .....check ("
[email protected]:~# which nmap
/usr/bin/nmap
")
Well **** ya'll looks like this might work... I am now going to consider modifying a stock rom to support users and login that meshes with debian and its "shadow" file etc etc, also I need to work out permissions and enviroment variables...
I'm happy...
Also for pentesting distro's "modifying Android kernel" tutorials would be nice, anybody able to point me to one?
[SIZE="4']Note : I'm just sharing the work of the XDA Member.Here's a little introduction by him :[/B][/U][/SIZE]
[QUOTE="makers_mark, post: 0"]This is a tool to capture screenshots while in Recovery or the Aroma Installer.
One big problem people are having when trying to capture screenshots in recovery is the extra framebuffer info that is tacked on to the end of each pixel row. Through a lot of digging and not finding too much information on it, I've finally found a way to determine what dimensions to use for, I believe, all android devices.
Fb2png is a great program, but unfortunately it only works with framebuffers that don't have a stride. FFmpeg is what I use here. That is a major problem with fb2png but it seems like it would be an easy thing to fix. The only thing to get it working, besides some random pixel formats maybe, is taking care of this stride.
I found that if you divide your width, for the nexus 7 2013 it's 1200, by 32, your stride will equal the value to add to 1200 to go up and make it evenly divisible by 32, that is your stride. Look at a bunch of resolutions and the width; the short side, think portrait mode; is usually evenly divisible by 32. Not all the time though, like the case of the Nexus 7 2013, Nexus 5 with 1080, and many more devices nowadays, AND those are the devices fb2png gives distorted screenshots with. Maybe @Phil3759 knows how to fix this for fb2png.
By the way the Nexus 5's stride is 8
1080/32 = 33 with a remainder of 24. 32-24 = 8
Anyways I made this batch script that takes into account your stride, if you have one. If your width is 768 for example, you won't have one because 32 goes into 768 an even 24 times.
Instructions:
Download the RS_all.rar file
Extract it to a new folder.
You will have the programs FFmpeg & ADB. Two .dll files for ADB. And the batch script RUNrs.bat
I assume you have your ADB drivers squared away.
Reboot into your recovery.
Run RUNrs.bat and it will ask you for you screen width in pixels, and your height. Input them.
It will then pull your framebuffer and make a bunch of viewable pngs with different pixel formats.
Don't close the program or anything, but go look in the folder you unzipped everything, and go through the images until you find one that is exactly like you screen, don't settle for close. Look at the filename of the one, and input that into the next prompt for your pixel format.
If I get any feedback I will change the first set of pixel formats to more common ones only, then some rarer ones if the first set didn't work.
Feel free to run 'ffmpeg -pix_fmts' and put in any of the other input-able pixel formats when you are asked to select which one you want to use.
Your set from there, all of that will be saved into settings.cfg.
If you change your recovery, you may have to clear the settings. You can do so easily in the program, or you can just delete settings.cfg
Same thing if you try a different device.
I am severely limited in devices to test. But I'd like to find a universal way with all android devices to pull the screen resolution from the phone/tablet and..
- add a check for the framebuffer in /dev/fb0 instead of just /dev/graphics/fb0. For now, if you get errors and it won't pull the framebuffer. Just change the code in the batch, two different places, from 'adb pull /dev/graphics/fb0 frmbfr' to 'adb pull /dev/fb0 frmbfr'
- make folders for screenshots to go into, and also a temp folder that gets deleted, for the pixel format test images.
- add the double frame buffer, two images. I have already done it, but am a little baffled as some devices seem to have six; or at least room for six raw fb0 NUL 2>&1
ADB pull /dev/graphics/fb0 frmbfr > nul
IF ERRORLEVEL 1 (cls
SET TS="NOGOOD"
ECHO ______________________________________________________
ECHO Adb is not properly connected.
ECHO Try "Safely Removing" your device from your computer
ECHO Then unplug your usb cable, and reinsert it.
ECHO ______________________________________________________
ECHO[
ECHO[
ECHO Press any key to try again.
ECHO[
ECHO[
PAUSE >nul
CLS
GOTO SETTINGS
)
CLS
REM ECHO The width of your framebuffer is %widthwithstride%
SET line=
ECHO %widthwithstride% > temp.tmp
FOR /F "delims=" %%A IN (temp.tmp) DO SET line=%%A
ECHO %width% > temp.tmp
FOR /F "delims=" %%A IN (temp.tmp) DO SET line=%line% %%A
ECHO %height% > temp.tmp
FOR /F "delims=" %%A IN (temp.tmp) DO SET line=%line% %%A
REM echo %width% %height% %stride% %widthwithstride%
REM echo %framebufferpixels% %bytespp%
REM echo %fb0size%
SET TS=%_%.png
FOR /D %%A IN (%pixfmt%) DO call FFMPEG %ffshowb% %ffdebug% -f rawvideo -vcodec rawvideo -pix_fmt %%A -s %widthwithstride%x%height% -i frmbfr -vframes 1 -vf crop=%width%:%height%:0:0 -y %%A%TS%
ECHO Check in the folder you ran this program in and there
ECHO should be several images. If any are a 'correct'
ECHO screenshot, make a note of what pixel format is in
ECHO the start of the filename.
ECHO[
ECHO YOU MUST USE LOWERCASE LETTERS!
ECHO[
ECHO Example: file that is correct color is rgb565.png
ECHO then you would enter 'rgb565'
SET /p pixfmt=Pixel format?
REM IF %pixfmt%=none GOTO SORRY
ECHO %pixfmt% > temp.tmp
FOR /F "delims=" %%A IN (temp.tmp) DO SET line=%line% %%A
ECHO %line% > settings.cfg
DEL frmbfr
DEL temp.tmp
CLS
GOTO START
:FINISH
ADB kill-server -d
SET width=""
SET height=""
SET widthwithstride=""
SET framebufferpixels=""
SET bytespp=""
SET fb0size=""
SET TS=""
EXIT
ROCESS
SET widthwithstride=%1
SET width=%2
SET height=%3
SET pixfmt=%4
GOTO GOTPARAMETERS
:SORRY
REM SLIM DOWN ORIGIANL PIXEL FORMATS, AND SOME RARER ONES HERE
GOTO FINISH
[/CODE][/HIDE]
[/QUOTE]
Original Thread : http://forum.xda-developers.com/showthread.php?t=2635736