[Q] Link2SD and launcher stop to work? - Galaxy Ace S5830i Q&A, Help & Troubleshooting
Greetings!
I have tried some ROMs -Ace I SCAPE, REINCARNATION, simplicity v5- and kernels -bieltv 3.0 for cm7, rafael 201211201515- but no matter what, after a few reboots my launcher -that is in the internal memory- and link2SD -that is in the internal memory too- just disappear, I don't know how could I track this since is not consistent -is like after 8-11 reboots-.
I don't have a clue of how to prevent this or what could be triggering it.
PS: Everytime I tried any of the above ROMs with their Kernels, I got back to the stock in ODIN 3.07 then did a fresh clean installation.
Logcat says it all
Try re-creating the case scenario, then using a PC, connect your phone (make sure to enable USB Debugging after the flash) and open a command line (Start->Run->cmd.exe if on windows)
Once open, try the instructions on this thread and upload the logcat here, try to make it as short as possible, I suggest you prepare it all before taking the logcat and once you find the issue, immediately do logcat
Good luck!
El_Dark said:
Logcat says it all
Try re-creating the case scenario, then using a PC, connect your phone (make sure to enable USB Debugging after the flash) and open a command line (Start->Run->cmd.exe if on windows)
Once open, try the instructions on this thread and upload the logcat here, try to make it as short as possible, I suggest you prepare it all before taking the logcat and once you find the issue, immediately do logcat
Good luck!
Click to expand...
Click to collapse
Right after the bug right? Because I wasn't sure if the logcat would explain why is after some reboots and not in the first one.
I'll be updating this post as it happens -usually is "conviently" when I finish installing all of my previous apps, then after 8-10 boots happens-.
sgdva said:
Right after the bug right? Because I wasn't sure if the logcat would explain why is after some reboots and not in the first one.
I'll be updating this post as it happens -usually is "conviently" when I finish installing all of my previous apps, then after 8-10 boots happens-.
Click to expand...
Click to collapse
it's a possible way, but note that it's useless after a reboot lol so it has to be right before you install your apps
El_Dark said:
it's a possible way, but note that it's useless after a reboot lol so it has to be right before you install your apps
Click to expand...
Click to collapse
I installed some apps to see if because I'm installing too many of them are making the phone to cause this -not quite sure if link2SD is working properly-. I had 140 apps before the upgrade -before switching between/roms kernels-, the reason why I upgrade was that I couldn't upgrade from the store the installed apps -it always told me I was running out of memory-.
Anyways, I have tried these days to recrate the scenario , one of the random reboots -when suddenly a message telling Link2SD was not responding- my launcher got out again, when I tried to logcat this by rebooting it worked again
But my whatsapp was gone
Here's the logcat available at paste bin of what I think are the problems:
http://pastebin.com/3jMNX7LV
If needed, I upload the whole thing in box:
https://app.box.com/s/i66rfop429c0wgwldqv4
Anyways I attach the logcat in pastebin
PS: I have read that VFY is missing / replacing in the logcat, for what I have read here
Could be superuser got messed up while flashing the cm7 kernel?
sgdva said:
I installed some apps to see if because I'm installing too many of them are making the phone to cause this -not quite sure if link2SD is working properly-. I had 140 apps before the upgrade -before switching between/roms kernels-, the reason why I upgrade was that I couldn't upgrade from the store the installed apps -it always told me I was running out of memory-.
Anyways, I have tried these days to recrate the scenario , one of the random reboots -when suddenly a message telling Link2SD was not responding- my launcher got out again, when I tried to logcat this by rebooting it worked again
But my whatsapp was gone
Here's the logcat available at paste bin of what I think are the problems:
http://pastebin.com/3jMNX7LV
If needed, I upload the whole thing in box:
https://app.box.com/s/i66rfop429c0wgwldqv4
Anyways I attach the logcat in pastebin
PS: I have read that VFY is missing / replacing in the logcat, for what I have read here
Could be superuser got messed up while flashing the cm7 kernel?
Click to expand...
Click to collapse
Try reflashing... Although the issues I've experienced with Link2SD are usually related to /data/ partition getting full when having too many apps..
If after reflashing, installing Link2SD and linking your apps again you still have issues, download Link2SD again from the Play store, you could also try the following after installing Link2SD and linking your apps: connect your phone to a PC and use adb shell, while the phone boots, once shell is up, do:
Code:
su
cd /data/
ls (make sure here that you have an sdext2 directory, if not, it means Link2SD is not installed properly)
cd sdext2
ls (make sure that you have a dalvik-cache directory in this place, if not, start Link2SD for a
cd /data/dalvik-cache/
for file in data*
do
if [! -h $file] (we make sure it's not a symlink already, you don't want looping links!!!)
cp $file /data/sdext2/dalvik-cache/
rm $file
ln -s /data/sdext2/dalvik-cache/$file $file
fi
done
try that without the text in the parenthesis lol
hope that helps, it could help anyone with space issues in /data/!!
El_Dark said:
All the post above
Click to expand...
Click to collapse
Thanks for being up with this issue!
Well this install is fresh new -is like 2 days long-, I tried the commands you told me but this is what I get
Code:
C:\android-sdk-windows\platform-tools>adb shell
# su
su
# ls
ls
efs
config
cache
sd-ext
sdcard
acct
mnt
vendor
devices
d
etc
fota.rc
init
init.charge.rc
ueventd.rc
data
init.rc
ueventd.goldfish.rc
sbin
lib
init.bcm21553.rc
sys
init.goldfish.rc
proc
recovery.rc
tmp
default.prop
system
res
root
dev
# cd sdext2
cd sdext2
cd: can't cd to sdext2
#
Also I'm not quite sure I understood this line?
El_Dark said:
installing Link2SD and linking your apps again you still have issues, download Link2SD again from the Play store,
Click to expand...
Click to collapse
Do I uninstall and re Install?
sgdva said:
Thanks for being up with this issue!
Well this install is fresh new -is like 2 days long-, I tried the commands you told me but this is what I get
Code:
C:\android-sdk-windows\platform-tools>adb shell
# su
su
[COLOR="Red"]you missed the "cd /data/" part lol[/COLOR]
# ls
ls
efs
config
<<intentionally snipped>>
Also I'm not quite sure I understood this line? Do I uninstall and re Install?
Click to expand...
Click to collapse
Yep, from the Play itself, just in case you're using some local/downloaded version lol, although I doubt it
El_Dark said:
Yep, from the Play itself, just in case you're using some local/downloaded version lol, although I doubt it
Click to expand...
Click to collapse
Ok Thanks for remarking my bad, lol.
Ok I got the dalvik cache folder as you state, though I get an error when typing this line
> ln -s /data/sdext2/dalvik-cache/$file $file
ln -s /data/sdext2/dalvik-cache/$file $file
> fi
fi
Syntax error: "fi" unexpected (expecting "then")
I thought maybe it was an if, but yeah, isn't a "then" missing for the "if [! -h $file]" that we typed before?
Full code:
Code:
C:\android-sdk-windows\platform-tools>adb shell
# su
su
# cd /data/
cd /data/
# ls
ls
log
dontpanic
cache
misc
local
data
app-private
app
property
fota
anr
dalvik-cache
lost+found
brcm
vt
gps
lcs.socket
rilgps.socket
link2sd-debuggerd.log
link2sd-11link2sd.log
zipalign.db
zipalign.log
aeqcoe.txt
soundbooster.txt
system
secure
backup
cp_data.txt
sdext2
tombstones
# cd sdext2
cd sdext2
# ls
ls
lost+found
data
dalvik-cache
com.whatsapp-1.apk
com.jb.gosms-1.apk
com.opera.mini.android-1.apk
com.imo.android.imoim-1.apk
com.urbandroid.sleep-1.apk
com.urbandroid.sleep.full.key-1.apk
je.fit-1.apk
com.jb.gosms.widget-1.apk
jp.co.johospace.jorte-1.apk
com.c2call.app.android.friendcaller-1.apk
com.skype.raider-1.apk
com.viber.voip-1.apk
com.sds.android.ttpod-1.apk
com.facebook.katana-1.apk
com.google.android.apps.plus-1.apk
com.megacloud.android-1.apk
com.google.android.apps.maps-1.apk
com.plaincode.clinometer-1.apk
org.exobel.routerkeygen-1.apk
es.pulimento.wifi-1.apk
# cd /data/dalvik-cache/
cd /data/dalvik-cache/
# for file in data*
for file in data*
> do
do
> if [! -h $file]
if [! -h $file]
> cp $file /data/sdext2/dalvik-cache/
cp $file /data/sdext2/dalvik-cache/
> rm $file
rm $file
> ln -s /data/sdext2/dalvik-cache/$file $file
ln -s /data/sdext2/dalvik-cache/$file $file
> fi
fi
Syntax error: "fi" unexpected (expecting "then")
sgdva said:
Ok Thanks for remarking my bad, lol.
Ok I got the dalvik cache folder as you state, though I get an error when typing this line
> ln -s /data/sdext2/dalvik-cache/$file $file
ln -s /data/sdext2/dalvik-cache/$file $file
> fi
fi
Syntax error: "fi" unexpected (expecting "then")
I thought maybe it was an if, but yeah, isn't a "then" missing for the "if [! -h $file]" that we typed before?
Full code:
Code:
C:\android-sdk-windows\platform-tools>adb shell
# su
su
# cd /data/
cd /data/
# ls
ls
log
dontpanic
cache
misc
local
data
app-private
app
property
fota
anr
dalvik-cache
lost+found
brcm
vt
gps
lcs.socket
rilgps.socket
link2sd-debuggerd.log
link2sd-11link2sd.log
zipalign.db
zipalign.log
aeqcoe.txt
soundbooster.txt
system
secure
backup
cp_data.txt
sdext2
tombstones
# cd sdext2
cd sdext2
# ls
ls
lost+found
data
dalvik-cache
com.whatsapp-1.apk
com.jb.gosms-1.apk
com.opera.mini.android-1.apk
com.imo.android.imoim-1.apk
com.urbandroid.sleep-1.apk
com.urbandroid.sleep.full.key-1.apk
je.fit-1.apk
com.jb.gosms.widget-1.apk
jp.co.johospace.jorte-1.apk
com.c2call.app.android.friendcaller-1.apk
com.skype.raider-1.apk
com.viber.voip-1.apk
com.sds.android.ttpod-1.apk
com.facebook.katana-1.apk
com.google.android.apps.plus-1.apk
com.megacloud.android-1.apk
com.google.android.apps.maps-1.apk
com.plaincode.clinometer-1.apk
org.exobel.routerkeygen-1.apk
es.pulimento.wifi-1.apk
# cd /data/dalvik-cache/
cd /data/dalvik-cache/
# for file in data*
for file in data*
> do
do
> if [! -h $file]
if [! -h $file]
> cp $file /data/sdext2/dalvik-cache/
cp $file /data/sdext2/dalvik-cache/
> rm $file
rm $file
> ln -s /data/sdext2/dalvik-cache/$file $file
ln -s /data/sdext2/dalvik-cache/$file $file
> fi
fi
Syntax error: "fi" unexpected (expecting "then")
Click to expand...
Click to collapse
heh, nice one, indeed I was missing the "then" after the "if" :silly:
El_Dark said:
heh, nice one, indeed I was missing the "then" after the "if" :silly:
Click to expand...
Click to collapse
So then, lol, is like this?
rm $file
ln -s /data/sdext2/dalvik-cache/$file $file
then
done
sgdva said:
So then, lol, is like this?
rm $file
ln -s /data/sdext2/dalvik-cache/$file $file
then
done
Click to expand...
Click to collapse
nope, it's like this:
Code:
for file in somefile*
do
if [ blablabla ]
then
some actions
fi
done
that's it
El_Dark said:
nope, it's like this:
Code:
for file in somefile*
do
if [ blablabla ]
then
some actions
fi
done
that's it
Click to expand...
Click to collapse
I'm not quite sure what you mean by "some actions" is this a command?
This is how I typed it
> if [! -h $file]
if [! -h $file]
> cp $file /data/sdext2/dalvik-cache/
cp $file /data/sdext2/dalvik-cache/
> rm $file
rm $file
> ln -s /data/sdext2/dalvik-cache/$file $file
ln -s /data/sdext2/dalvik-cache/$file $file
> then
then
> some actions
some actions
> fi
fi
> done
done
[!: not found
some: not found
[!: not found
cp: '[email protected]@[email protected]' and '/data/
sdext2/dalvik-cache/[email protected]@[email protected]
ex' are the same file
El_Dark said:
Code:
su
cd /data/
ls (make sure here that you have an sdext2 directory, if not, it means Link2SD is not installed properly)
cd sdext2
ls (make sure that you have a dalvik-cache directory in this place, if not, start Link2SD for a
cd /data/dalvik-cache/
for file in data*
do
if [! -h $file] (we make sure it's not a symlink already, you don't want looping links!!!)
[U][B]then[/B][/U]
cp $file /data/sdext2/dalvik-cache/
rm $file
ln -s /data/sdext2/dalvik-cache/$file $file
fi
done
Click to expand...
Click to collapse
quoting myself
El_Dark said:
quoting myself
Click to expand...
Click to collapse
Oh ok, done
For what I can understand everything is supposed to be linked right? hence this is shown "! not found"?
But I'm still not getting why randomly the SSlauncher is not working in some reboots -and when this happens my link2SD gets vanished too and the message low storage is shown-.
Should I make this everytime that happens? -if it happens again?-
Code:
> if [! -h $file]
if [! -h $file]
> then
then
> cp $file /data/sdext2/dalvik-cache/
cp $file /data/sdext2/dalvik-cache/
> rm $file
rm $file
> ln -s /data/sdext2/dalvik-cache/$file $file
ln -s /data/sdext2/dalvik-cache/$file $file
> fi
fi
> done
done
[!: not found
sgdva said:
Oh ok, done
For what I can understand everything is supposed to be linked right? hence this is shown "! not found"?
But I'm still not getting why randomly the SSlauncher is not working in some reboots -and when this happens my link2SD gets vanished too and the message low storage is shown-.
Should I make this everytime that happens? -if it happens again?-
Code:
> if [! -h $file]
if [! -h $file]
> then
then
> cp $file /data/sdext2/dalvik-cache/
cp $file /data/sdext2/dalvik-cache/
> rm $file
rm $file
> ln -s /data/sdext2/dalvik-cache/$file $file
ln -s /data/sdext2/dalvik-cache/$file $file
> fi
fi
> done
done
[!: not found
Click to expand...
Click to collapse
you shouldn't need to do it every time, mainly when you install new apps, alternatively, you can check the apps' data directories to see which one is consuming a lot of space, you can do that by issuing the commands below:
Code:
su
cd /data/data
du -hc
that should tell you how much space every dir is using (I think, lol)
PS: HIGHLY IMPORTANT!!! You should no longer link dalvik-cache via link2sd with this, or you might experience Force Closes due to the apps' dalvik cache being missing, and I say being missing because if you link a dalvik-cache file that's already linked, Link2SD might move the link and overwrite the physical file, and you'll have a symlink loop
Related
[WIP] [DEV] [HOWTO] Ubuntu on Nook Color! UPDATE 1/5/11
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?
[Request] Dev Help Pretty Please!
Ok I'm on the OTA 2.3.4 from a fresh unlocked 4.1.83 no problems what soever and I'm looking to make a few mods when I saw the link posted for the 2.3.4 HDMI Mirror over at http://forum.xda-developers.com/showthread.php?t=1169457 I went ahead and ran adb shell su mount -o remount,rw /dev/block/mmcblk0p12 /system sed -ie s/ro.hdmi.mirror.enable=false/ro.hdmi.mirror.enable=true/g /system/build.prop mount -o remount,ro /dev/block/mmcblk0p12 /system cd /etc/init.d cp startXServer.sh startXServer.bak (head -n 40 startXServer.bak; echo "if [ ! -e /var/run/noWebtop ]; then"; tail -n 12 startXServer.bak; echo "fi") > startXServer.sh restart your phone I read through the command and seemed pretty safe and was excited because the post listed the HDMI Mirror as being in "landscape" mode. Hell yeah right! Well it wasn't, it was the same portrait so I was looking to revert back. Go change the build.prop back for the ro.hdmi.mirror to equal false. No big deal that's easy enough with root explorer. Read through the commands and saw that the startXServer.sh was cp to startXServer.bak. Easy enough just delete the startXServer.sh and rename startXServer.bak to .sh. Well there is the problem. When i ran the commands the first time didn't work so i went into the build.prop and did a manual change. Then re-ran the bottom half. It seems doing that I over wrote the .bak agan and now both files are exactly the same and have no way of reverting. I have the system, boot, and webtop backed up with an .img but that didn't fix my entertainment center when I plug in an HDMI to the TV. The original commands did a back-up so I didn't double back-up the file.lol I was wondering if a dev that has a little more command line knowledge, maybe the orginal contents of startXServer.sh, or the actual file could help me out with the revert back and a working entertainment center. The current contents are if [ ! -e /var/run/noWebtop ] fi I'm pretty sure that's the problem, unless someone else sees something I'm missing. **Edit** This was solved under the Q&A Section from a earlier post yesterday afternoon. Mods please close if necessary. In case any one needs it see below. I just rewrote the startXServer.sh to contain the following. #!/bin/sh # # startX.sh # # This script starts the X server # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin NAME=startX DESC="OSH X Server" . /lib/lsb/init-functions #umask 002 log_begin_msg "Starting $DESC: $NAME" rm -f /tmp/serverauth.* rm -f /tmp/.X0-lock rm -fr /tmp/.X11-unix rm -fr /tmp/.ICE-unix if [ ! -e /home/adas/.tag_master_reset_ls ]; then /usr/local/sbin/update-language.pl "en_US.UTF-8" echo 1 > /home/adas/.tag_master_reset_ls fi . /etc/environment export PATH export LANG export DISPLAY export LD_LIBRARY_PATH export USER=adas export HOME=/home/$USER # new way of starting if [ $1 = "webtop" ] then sudo -u adas -i /usr/bin/startx -- -nolisten tcp -layout HDMI vt2 & else sudo -u adas -i /usr/bin/startx /usr/local/bin/xnull -- -nolisten tcp -layout HDMI vt2 & fi
[Q] Can someone please help me run this script?
Hi everyone I am trying to run a script on my android that extracts asec files back to apk's on my phone. The scripts works fine when i put in every line manually into terminal though obviously that is a pain in the ass. So i put it into a .sh file and put the .sh file in system root for ease of execution.. i then do: su sh deasec.sh though it returns: unexpected syntax error: do can someone tell me what i am doing wrong? - thank you kindly! (will press thanks!) Code is below Code: #!/system/xbin/sh LD_LIBRARY_PATH="/system/lib" PATH="/system/xbin:/system/sbin:/system/bin" for ASEC in $(find /data/app-asec/ -name '*.asec') do echo "Deasec $ASEC" PKG=$(basename $ASEC|cut -d'-' -f1) echo "Package name $PKG" if [ -d /mnt/asec/$PKG*/lib ] then echo "Relocate libs" find /data/data/$PKG/ -type l -name lib -exec rm {} \; cp -r /mnt/asec/$PKG*/lib /data/data/$PKG/ echo "Fix libs permissions" chown -R system:system /data/data/$PKG/lib chmod -R 755 /data/data/$PKG/lib fi APK=$(pm path $PKG|cut -d':' -f2) echo "APK location $APK" cp $APK /data/local/tmp/pkg.apk chmod 644 /data/local/tmp/pkg.apk pm install -r -f /data/local/tmp/pkg.apk && rm /data/local/tmp/pkg.apk done
Have you done the script under Windows, you don't? You need to write the script under Linux. You can also write the script directly in your phone: Open Terminal Emulator, and write the lines one by one this way: Code: echo line1 >> /sdcard/script.sh echo line2 >> /sdcard/script.sh echo line3 >> /sdcard/script.sh ... Then move the script to its final location, and give it permissions (if needed).
nice one mate Thankyou
[Q] adb works but not extract-files.sh
I am trying to extract vendor files from an i8730 phone using extract-files.sh I have Linux Mint 14 with android-tools-adb installed as the adb adb works fine to a point [email protected] ~ $ adb devices * daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached 333398202BDF00EC device adb shell and ls shows files on the phone including the vendor folder If I run ls from my working directly I can see extract-files.sh Think the solution is in .bashrc but believe I am not doing it right. When I run extract-files.sh I get this [email protected] ~ $ ./extract-files.sh bash: ./extract-files.sh: Permission denied [email protected] ~ $ sudo extract-files.sh [sudo] password for megan: sudo: extract-files.sh: command not found [email protected] ~ $ sudo./extract-files.sh bash: sudo./extract-files.sh: No such file or directory location adb shows /usr/share/doc/android-tools-adb location bashrc shows /etc/bash.bashrc I have edit bashrc [email protected] ~ $ sudo gedit /etc/bash.bashrc [sudo] password for megan: Have added this to the end export PATH=${PATH}:/home/megan/usr/share/doc/android-tools-adb Think this is where I have gone wrong. Any suggestions? Thanks Bazzan
http://forum.xda-developers.com/showpost.php?p=7146410&postcount=5
unable to create 99-android.rules MoonBlade said: http://forum.xda-developers.com/showpost.php?p=7146410&postcount=5 Click to expand... Click to collapse Thanks MoonBlade. Think you are suggesting the version on the link so have been working through it. Had to source the files elsewhere as original link is dead. May or may not be a problem. Got as far as creating the file in /etc/udev/rules.d/ but am unable to create a file in that folder. I am logged in as root. I can view the folder through GUI but not able to create 99-android.rules Get this mess in terminal [email protected] ~ $ su Password: megan-901 megan # cd /etc/udev/rules.d/ megan-901 rules.d # ls Traceback (most recent call last): File "/usr/lib/command-not-found", line 21, in <module> os.execvp("python3", [sys.argv[0]] + sys.argv) File "/usr/lib/python2.7/os.py", line 344, in execvp _execvpe(file, args) File "/usr/lib/python2.7/os.py", line 380, in _execvpe func(fullname, *argrest) OSError: [Errno 2] No such file or directory megan-901 rules.d # Not sure the above is anything to do with not being able to write to that folder. Any ideas? Bazzan
ok im not sure exactly what youre trying to do but it sounds like you want to get files from your phones /vendor/ directory and copy them to a directory on your computer. if this is correct then you need to stop playiing around with your .bashrc and your $PATH appends. all you need to use is adb you dont have to adb shell. once you run adb shell it opens up a terminal inside your device so if youre trying to run a shell script on your computer from inside an adb shell it just wont work. a simpler way to put this is, if you want to get /vendor/firmware/bcm4329.bin from your phone and put it on your computer in a folder on your desktop you would run it like this $adb pull /vendor/firmware/bcm4329.bin /home/megan/Desktop/phonevendorfirmware/bcm439.bin and the directory and file will automatically be created on your computer. from there you can do what ever you wanted to do to the files that you pulled from the phone. the same works in reverse if you want to move a file to the phone using $adb push
bazzan said: [email protected] ~ $ ./extract-files.sh bash: ./extract-files.sh: Permission denied Click to expand... Click to collapse You need to give execution permissions to the script, this way: Code: chmod +x extract-files.sh And then, run your script like this (if the script doesn't need root permissions, run it without sudo): Code: sudo ./extract-files.sh
Many thanks haxin and RoberGalarga I was given the extract-files.sh by a developer to extract vendor files for ROM development - i8730. He did not have the phone (I don't at the moment as has been wrapped for the kids to give to me for my birthday - practicing on an a Galaxy S) From peeking inside the file it looks like a batch file that grabs all the content from the vendor folder. Did SQL 10 years ago and looks like that. Essentially does what you gave me haxim, but pulls the content of the entire folder. What is the best way to do that with adb pull? Gave chmod +x extract-files.sh a try. Without sudo I get bash:./extract-files.sh : /bin/sh^M: bad interpreter: No such file or directory With sudo sudo: unable to execute ./extract-files.sh: No such file or directory. Remember I am running this against a i9000, not the phone that I was given the sh file to run against. Get that back the begining of September. Not sure if that makes a difference but if it does not obvious to me.Seems to be falling over on the first line as that appears in the non sudo error message. Have copied the content of extract-files.sh below. Thanks again guys. Learning heaps and loving it. Bazzan #!/bin/sh set -e export DEVICE=express export VENDOR=samsung if [ $# -eq 0 ]; then SRC=adb else if [ $# -eq 1 ]; then SRC=$1 else echo "$0: bad number of arguments" echo "" echo "usage: $0 [PATH_TO_EXPANDED_ROM]" echo "" echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" echo "the device using adb pull." exit 1 fi fi BASE=../../../vendor/$VENDOR/$DEVICE/proprietary rm -rf $BASE/* for FILE in `egrep -v '(^#|^$)' ../$DEVICE/proprietary-files.txt`; do echo "Extracting /system/$FILE ..." DIR=`dirname $FILE` if [ ! -d $BASE/$DIR ]; then mkdir -p $BASE/$DIR fi if [ "$SRC" = "adb" ]; then adb pull /system/$FILE $BASE/$FILE else cp $SRC/system/$FILE $BASE/$FILE fi done ./setup-makefiles.sh
Where did you get the script? This error: bazzan said: bash:./extract-files.sh : /bin/sh^M: bad interpreter: No such file or directory Click to expand... Click to collapse is caused by a bad formatting in the file (Window$ editing... pfff....), so, make a new file using Gedit and paste this directly (don't copy&paste from the original script!!): bazzan said: #!/bin/sh set -e export DEVICE=express export VENDOR=samsung if [ $# -eq 0 ]; then SRC=adb else if [ $# -eq 1 ]; then SRC=$1 else echo "$0: bad number of arguments" echo "" echo "usage: $0 [PATH_TO_EXPANDED_ROM]" echo "" echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from" echo "the device using adb pull." exit 1 fi fi BASE=../../../vendor/$VENDOR/$DEVICE/proprietary rm -rf $BASE/* for FILE in `egrep -v '(^#|^$)' ../$DEVICE/proprietary-files.txt`; do echo "Extracting /system/$FILE ..." DIR=`dirname $FILE` if [ ! -d $BASE/$DIR ]; then mkdir -p $BASE/$DIR fi if [ "$SRC" = "adb" ]; then adb pull /system/$FILE $BASE/$FILE else cp $SRC/system/$FILE $BASE/$FILE fi done Click to expand... Click to collapse Delete the old file, and try the new one (you can use any filename, it doesn't matter).
Many thanks RoberGalarga. Got the script off a recognised developer along with proprietary-files.txt and setup-makefiles.sh He is working a CWM and a rom for owners of the i8730 - he does not have the phone so community feed in content. Get the impression he is not a Windows user (he did not have a Windows script for this) so reckon I might have corrupted it. I did as you advised and made some real progress. Now we get the following: [email protected] ~ $ sudo ./extract-files.sh [sudo] password for megan: egrep: ../express/proprietary-files.txt: No such file or directory : not foundefiles.sh: 3: ./setup-makefiles.sh: : Directory nonexistentk ./setup-makefiles.sh: cannot create ../../../vendor/samsung/express [email protected] ~ $ It breaks further down the script. In the home folder there is proprietary-files.txt which list the files to be extracted along with their file path. Does that message indicate it is looking for proprietary-files.txt in /home/express? Setup-makefiles.sh is in the home folder as well and appears to be a Cyanogenmod Project file to create a blob from the the results of extract-files.sh Bazzan
bazzan said: Does that message indicate it is looking for proprietary-files.txt in /home/express? Click to expand... Click to collapse Yes, that's it. Check again, seems like something is missing yet.
Thanks again. Got it to work by building the folder structure /home/vendor/Samsung/express And then running the files from there Bazzan
Guide: Fix WhatsApp Images mess after restoring backup
Hey there Thought this might help some of you finding yourself in a huge mess because WhatApp restores all its media with the date the restore takes place. I wrote a little shellscript you can run in "adb shell". Just paste it into the shell and run it inside WhatsApps Folders. In "WhatsApp Images" and it's subfolder "Sent" use this: Code: for file in *; do if [ -f "$file" ]; then timestamp=$(echo "$file" | sed 's/^IMG-\(.*\)-WA\(...\)\(.\)\..*/\10\2\.0\3/g') echo $timestamp echo $file touch -m -t $timestamp $file fi done For "WhatsApp Animated Gifs" and "WhatsApp Video" use this: Code: for file in *; do if [ -f "$file" ]; then timestamp=$(echo "$file" | sed 's/^VID-\(.*\)-WA\(...\)\(.\)\..*/\10\2\.0\3/g') echo $timestamp echo $file touch -m -t $timestamp $file fi done Keep the following in mind: - This code works only if your version of Android allows you to change the modified date of files without root. As far as I know this is the case since Andoid 9 - This code doesn't work if you have files with a WA-Number higher than 0599 as my script doesn't take care to match the number with a proper timeformat. - This code changes the last modified date of your files like this: Filename: IMG-20190915-WA0039.jpg Timestamp: 201909150003.09 -> 20190915 00:03:09 Feedbacks and comments welcome Greets Air