I found this Windows application on this thread http://forum.xda-developers.com/showthread.php?p=23291051 I think its a valuable software to install all our apk in one time to save time after each ROM flash.
Windows? Owwww. I have linux mint. imo I don't like windows
sent from my x8 running sde ROM
Click THANKS if I helped
wilbso said:
Windows? Owwww. I have linux mint. imo I don't like windows
Click to expand...
Click to collapse
Let me help you with a very basic script then...
Code:
#!/bin/sh
for apk in `ls $1 | grep .apk`
do
adb install $apk
done
Copy/Paste into gedit, save in, for example, ~/bin, as apkbatch, make the script executable.
For example, run it as...
apkbatch ~/Android/APKs
Of course this is just a skeleton ... you could refine the script with:
- a check to see if adb even exists in the search path
- a check if adb is already running or not - and if not starting it up
- checking back with the user about to either WiFi connect or USB connect
Hint: Modify and extend the skeleton script from above to learn a bit about shell scripting and surprise us with a fully-fledged APK batch installer script for Linux.
APK batch installer
Based on B.Jay's answer, I believe the best thing for linux is to do this.
install android-tools-adb, nautilus-actions
Save the following code to $HOME/bin/apk_batch_install and make it executable.
Code:
#!/bin/sh
which adb || { notify-send 'Please install android-tools-adb before using this script.' ; exit 1; }
echo "APK install log:" > /tmp/apk_batch_install_log
echo "" >> /tmp/apk_batch_install_log
count=1
(
adb start-server
echo "#Waiting for device ..."
adb wait-for-device
for file in "[email protected]"
do
echo "#Installing $count/$#: $(basename "$file")"
adb install "$file" 1>> /tmp/apk_batch_install_log
echo "" >> /tmp/apk_batch_install_log
count=$(( count+1 ))
echo "$(echo "scale=0; $count*100/$#" | bc)"
done
) | zenity --progress \
--title="APK installation" \
--text="Starting adb server ..." --percentage=0 --auto-close --no-cancel
notify-send "APK installation completed"
zenity --info --text="$(cat /tmp/apk_batch_install_log)"
rm /tmp/apk_batch_install_log
and use "Nautilus Actions" to put it to context menu.
After that just select the files you want to install -> right click -> APK install !!
To configure "Nautilus Actions"
1) Add new Action
2) Name it "APK install"
Command Tab
3) Command Path: /home/.../bin/apk_batch_install
4) Command Parameters: %F
Mimetype Tab
5) Add a mimetype filter with mimetype: application/vnd.android.package-archive
6) Remove the filter with * in mimetype
Save
Well done for reviving a year old thread
Sent from my X8 using xda app-developers app
Can anyone write an .sh script so i can use it on android device to install apk from storage
Thanks in advance
Kellwa said:
Can anyone write an .sh script so i can use it on android device to install apk from storage
Thanks in advance
Click to expand...
Click to collapse
Why would you need one? Simply use the relevant xposed module to suppress install notifications and click through them once.
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 learned about this here... http://fieldeffect.info/w/NativeCompileSDK
You can install an i386/x86_64 chroot within your existing Debian chroot using qemu-user-static to run the Android SDK on your Android phone/tablet/phablet.
1.
Get yourself a debian chroot, I recommend at least 2gb. I use DebianKit from market.
2.
You will need a X11 desktop environment and a VNC client on your device. I use androidVNC from market.
Here is my working example...
Start your Debian chroot/environment and do...
apt-get install openbox openbox-themes obmenu obconf menu menu-xdg xdg-utils xfonts-base xfonts-terminus* nautilus terminator lxappearance gmrun leafpad man-db hicolor-icon-theme tightvncserver tint2
That gives you a window manager, fonts, filebrowser, terminal emulator, text editor, theme manager, taskbar, and a VNC server.
Now lets get some GTK engines and libraries....
apt-get install gtk2-engines-auroa gtk2-engines-murrine gtk2-engines-oxygen gtk2-engines-pixbuf libgtk2.0-bin gtk3-engines-oxygen gtk3-engines-unico libgtk-3-bin
Now 7zip to handle zips and archives comfortably(put non-free in your apt sources.list)...
apt-get install p7zip p7zip-full p7zip-rar zip unzip
##The Android SDK manager, qemu, and multistrap##
apt-get install ant file openjdk-6-jre openjdk-6-jdk qemu-user-static libswt-gtk-3-java libswt-cairo-gtk-3-jni
3.
Now we can build a small x86_64 rootfs using multistrap
multistrap can use a config, have mine...
http://db.tt/hS5j3wg
Copy multistrap.conf straight into your working(pwd) directory....
cp /sdcard/Download/multistrap.conf .
Do this to avoid multistrap complaining later...
cat multistrap.conf >mstrap
mkdir /data/mnt
Determine size of rootfs for loop image..
du -hs /data/mnt/
Now make an image for x86_64 chroot
dd if=/dev/zero of=/sdcard/64bit.img bs=$(( 0x100000 )) count=YOUR IMAGE SIZE
That byte size makes your image slightly larger than the count value in Mb, for example count=78 will write 82Mb image.
mkfs.ext2 /sdcard/64bit.img
tune2fs -c0 /sdcard/64bit.img
mkdir /data/tmp
busybox mount -o loop /sdcard/64bit.img /data/tmp/
cp -r /data/mnt/* /data/tmp/
umount /data/tmp
rm -r /data/tmp/
rm -r /data/mnt/
mkdir /data/mnt
busybox mount -o loop /sdcard/64bit.img /data/mnt/
5.
Now the environment is set up and mounted, at this point install the SDK
Aim your browser to http://developer.android.com/sdk/index.html
Select "Linux" from "SDK Tools Only", thats the last thing at the bottom of the list.
cp /sdcard/Download/android-sdk_r21.0.1-linux.tgz .
7z x android-sdk_r21.0.1-linux.tgz russosv
7z x android-sdk_r21.0.1-linux.tar
Now we need a couple goodies from http://fieldeffect.info/w/NativeCompileAPK ##--Thanks to russosv from FeildEffect
These are edited from original....
#!/bin/bash
QEMU=/usr/bin/qemu-x86_64-static
64CHROOT=/data/mnt/
case "$1" in
mklinks)
if [ ! -e "./64BIT" ]; then
mkdir ./64BIT
fi
for i in $(file ./* | grep "ELF 32" | awk '{print $1}' | sed s/://g | sed s/[./]//g); do
echo "Moving $i..."
mv $i ./64BIT
ln -s ~/bin/run-64-link $i
done-
;;
*)
$QEMU $64CHROOT/lib64/ld-linux-x86_64.so.2 --library-path $64CHROOT/lib:$64CHROOT/usr/lib:$64CHROOT/usr/share/perl/5.12.4/unicore/lib:$64CHROOT/var/lib:$64CHROOT/lib/x86_64-linux-gnu:$64CHROOT/usr/lib/x86_64-linux-gnu [email protected]
;;
esac
Copy that to run-64, then...
chmod 755 run64
cp run-64 /usr/bin/
One more...
echo $(dirname $0)/64BIT/$(basename $0) [email protected]
/usr/bin/run-i386 $(dirname $0)/64BIT/$(basename $0) [email protected]
Make that run-64-link
chmod 755 run-64-link
cp run-64-link /usr/bin/
5b.
Now launch VNC server
tightvncpasswd
tightvncserver
killall Xtightvnc
cat >.vnc/xstartup<<EOF
tint2 &
terminator &
openbox-session
EOF
tightvncserver
export DISPLAY=:1
6.
Now launch the VNC client I mentioned earlier, should connect with 127.0.0.1:5901 and your password you set.
Go back to terminal or use the one launched on X11 to do...
sh android-sdk-linux/tools/android
Install at least one api.
If all went well you can now go around "debugging" yours and your friends Android devices over wifi now.
For an example, and to see it work do....
svc wifi disable(or enable) ##this turns off/on wifi
setprop service.adb.tcp.port 5555(or -1) ##this turns on/off adb over network
stop adbd
start adbd
adb connect 127.0.0.1(yours) or any other adbd addy listening on your network,
Have fun
Never did a "how to" before, go easy and I'll make corrections and answer things. Thanks for reading. Leave feedback.
Potential necro post but I believe the information is still currently valid and not readily available on searches. I've looked variations of this up for years with no luck until I hit the right search terms.
bump, and thanks.
can't believe there's no comments.
I know it's a slower than real-64-bit-pc method but not all of us have access to new hardware... or pc's. Maybe a novelty, still cool and useful if you've got the time to let the slower hardware compile.
you have preserved the scripts, original link is dead.
here is the Internet Wayback Machine cache of the original circa 2012 for reference.
http://web.archive.org/web/20120502044700/http://fieldeffect.info/w/NativeCompileAPK
appreciate you sharing.
Hi, if possible how can I change directory in a terminal window in ubuntu using a short command such as 'croot' instead of using 'cd ~/android/system' ??
wassupasian said:
Hi, if possible how can I change directory in a terminal window in ubuntu using a short command such as 'croot' instead of using 'cd ~/android/system' ??
Click to expand...
Click to collapse
not sure what "croot" is? You mean "chroot root:root /to/destination?" "cd ~/ take your logins home folder. You can always cd / for root or cd /etc /bin /sbin or whatever root subfolder from anywhere. but i am unaware of any true short cuts.
hope that helps,
dfl
If the bash stuff is equal to Ubuntu Desktop systems you can do something like this:
in terminal:
Code:
$ echo "alias croot='cd ~/android/system'" >> $HOME/.bash_aliases
logout -> login (reboot i guess)
Hacking android, got "system" user, but not root, how to escalate privilege?
Hello, i am new to XDA. I am trying to jail-break my android device:
Android 5.1.1, Linux 3.10.49
This device is a rare brand and have no any unlock & flash mechanism.
Currently i have successfully got "system" user (UID 1000) by using a preinstalled DEBUGGABLE system app.
This user can only change /data directory etc, it can not change any file owned by root.
So any help to escalate "system" user to root user will be very appreciate.
the result of command "id":
Code:
uid=1000(system)
gid=1000(system)
groups=1000(system)
1007(log)
1010(wifi)
1015(sdcard_rw)
1021(gps)
1023(media_rw)
1028(sdcard_r)
3001(net_bt_admin)
3002(net_bt)
3003(inet)
3004(net_raw)
3005(net_admin)
3006(net_bw_stats)
3009(qcom_diag)
9997(everybody)
41000(u0_a31000)
context=u:r:system_app:s0
This account can change /data/system/packages.xml etc, but can not change /system/*, nor chown/mount.....
It's CapBound is 0, too strict. And also can not disable SELinux.
Can anyone help me?
----------------------- PS: share how i get system user privilege, maybe helpful to others -----------------------
In a word, just use jdb to attache to the app then print new java.lang.Runtime().exec("sh /sdcard/my.sh").
First, i found a package appeared in Android Device Monitor's debuggable app list, e.x. com.example.app.
Then i use
Code:
pm dump com.example.app
got confirmed it use system UID, then
Code:
run-as com.example.app
but failed due to "Package not found", i don't know why.
Then i try to use JDWP way.
Get the debuggable process ID:
Code:
$ adb jdwp
9424
$ adb forward tcp:8600 jdwp:9424
$ jdb -attach localhost:8600
> threads
group system:
(java.lang.Thread)0x2a86 Signal Catcher ...
(java.lang.Thread)0x2a87 FinalizerWatchdogDaemon ...
...
group main:
(java.lang.Thread)0x2a8d main ...
(java.lang.Thread)0x2a8e Binder_1 ...
...
> thread 0x2a8d
main[1] stepi
>
stepi completed: "thread=main", android.os.MessageQueue.next()、row=145 bci=22
main[1] > print new java.lang.Runtime().exec("sh /sdcard/qj.sh")
There are some files need be upload(adb push .... ) before run the last command.
/sdcard/qj.sh:
Code:
date > /sdcard/log
cp -f /sdcard/busybox /data/ 2>> /sdcard/log || exit 1
chmod 4777 /data/busybox 2>> /sdcard/log || exit 1
(while true; do /data/busybox nc -l -p 7777 -e sh; done) >> /sdcard/log 2>&1 &
echo server OK >> /sdcard/log
/sdcard/busybox:
this file can be found at busybox.net/downloads/binaries/latest, choose ARM7v.
The above jdb command "print new java.lang.Runtime().exec("sh /sdcard/qj.sh")" will create a shell server listening at 7777 port, bridge input/output to sh.
So, to connect to the shell server,
Code:
adb forward tcp:7777 tcp:7777
nc localhost 7777
then in this connection, input shell command.
Sorry: i forgot a very important step: to run the "print new ...." statement, i have to turn on screen, even touch the app so can be trapped into jdb.
---------That's all------------