Nook Glowlight 3 - Stuck at infinite startup loading screen - Nook Touch General

So here's my issue. I transfered an epub file to my Nook Glowlight 3 using calibre, but when i ejected the device and started using the Nook. Not only did it not recognize my Epub file, the device slowed to a crawl! I restarted my Nook to see if this would fix the issue and now it's stuck at an infinite loading screen. I have tried hard resetting by holding the power button, but it keeps rebooting to an infinite loading screen. Could my device be possibly bricked? I think the issue might have been that I transfered a wrong type of epub file into the nook (the file was imported using calibre), which is incompatible with the nook software.
Any help would be appreciated, how do i get out of this infinite loading screen! I just want to be able to use my device again :/
Thanks.

No, it sounds like you did something else.
Do you have ADB working? Do:
Code:
# ps|grep u0 [color="red"]<- that's a zero[/color]
Do you see a bunch of processes?
That means that the Android subsystem is mostly running ok.
Is your launcher listed?
Code:
# getprop|grep bootanim
What does bn.bootanim.exit and service.bootanim.exit say?
You can disable the bootanimation entirely:
Code:
# mount -o rw,remount /system
# cd /system/bin
# mv bootanimation bootanimation.bak
# reboot
Can you start stuff?
Code:
# am start -n com.android.settings/.Settings

I'm actually having a *very* similar problem *only* when i have a 'real' launcher installed. In this case i'm using ReLaunchX, a launcher/file manager built for epaper devices. During boot the screen seems to be stuck on the boot animation. Here are some of the values from the commands you've reccomended to the OP:
Code:
[email protected]_6sl:/ $ ps|grep u0
u0_a2 2501 2080 321148 24152 ffffffff 00000000 S com.android.systemui
u0_a3 2517 2080 449348 87660 ffffffff 00000000 S com.nook.partner
u0_a0 2588 2080 319964 24852 ffffffff 00000000 S android.process.media
[email protected]_6sl:/ $ getprop|grep bootanim
[init.svc.bootanim]: [running]
[service.bootanim.exit]: [1]
[email protected]_6sl:/ $ am start -n com.android.settings/.Settings
Starting: Intent { cmp=com.android.settings/.Settings }
I have gone through the process of installing the launcher, rebooting, waiting for boot anim to finish (for up to 15-20 minutes), removing my launcher through adb, rebooting then re-installing the launcher. The launcher is the only thing that i've been chaning and it gets stuck on reboot *everytime* with the launcher installed.
P.S. I don't have root and i'm not interested in root, just the launcher and my safari queue app

If you have something taking over the Home intent, then the B&N stuff doesn't run.
The B&N stuff has the bootanimation termination hijacked.
Therefore the bootanimation will run for ever.
This will stop the bootanimation (just as a test).
Code:
$ setprop bn.bootanim.exit 1
You could write an app to do this.
You could modify the Glow3 bootanimation.
You could replace the Glow3 bootanimation with the Glow2 bootanimation.
You could delete the bootanimation.

You could write an app to do this.
You could modify the Glow3 bootanimation.
You could replace the Glow3 bootanimation with the Glow2 bootanimation.
You could delete the bootanimation.
Click to expand...
Click to collapse
Wouldn't these options require root?

Well, writing an app wouldn't need any special privilege, but it would be a round-about way to do it.
There's root & root & root. There's different degrees:
Disable all security on your normal boot image
Install a "superuser" app on your normal boot image to allow some apps to run as root
Set ro.secure to 0 to allow root ADB access
Set ro.debuggable to 1 to allow ADB to reconnect as root
Use a rooted recovery image to allow modification of your normal boot image
Load a rooted image over fastboot to allow modification of your normal boot image
Use the hardware root console that's already inside the Nook case
I wouldn't do #1, #2.
The other options don't really undermine security.
#7 requires opening the case.

Renate NST said:
[*]Set ro.secure to 0 to allow root ADB access
[*]Set ro.debuggable to 1 to allow ADB to reconnect as root
Click to expand...
Click to collapse
Hi Renate! I've tried to set these settings on a Glowlight 3, but as they don't seem to have effect might they require a pre-existing root to run them?
Code:
DESKTOP:~$ adb shell
[email protected]_6sl:/ $ setprop ro.secure 0
[email protected]_6sl:/ $ setprop ro.debuggable 1
[email protected]_6sl:/ $ mount -o rw,remount /system
mount: Operation not permitted
255|[email protected]_6sl:/ $
And just for good measure:
Code:
DESKTOP:~$ adb shell
[email protected]_6sl:/ $ su
/system/bin/sh: su: not found
Thank you for pointing me in any direction.

dotancohen said:
I've tried to set these settings on a Glowlight 3, but as they don't seem to have effect...
Click to expand...
Click to collapse
All the "ro.whatever" properties are read-only. They can only be set once.
They are usually already set in init.rc, default.prop or /system/build.prop.
ro.secure is in default.prop which is packed in the ramdisk of the image.
To modify it manually (vs. whatever scripts some people use), you need to pull the image, extract default.prop, text edit it, replace it, push the image.

Renate NST said:
To modify it manually (vs. whatever scripts some people use), you need to pull the image, extract default.prop, text edit it, replace it, push the image.
Click to expand...
Click to collapse
Thank you, I will try to pull and push the files directly. Have a great week!

Related

Dealing with busybox LS output in Windows

If you are using ADB Shell on a Windows machine and try to LS with busybox on your phone it will add color coding along with directory and file names.
To get rid of this you need only need to type [1] in the command prompt.
If you would like an LL type function added you can also put in [2].
[1] alias ls='ls --color=never'
[2] alias ll='ls -la --color=never'
Is there any way to get these aliases to stick?
The aliases go away every time I open a new ADB Shell. :\
##########edit1
I found that you can use PuTTYcyg to properly display the colors if you have Cygwin installed on your machine.
I just selected "Cygterm" for "Connection type" and put "adb shell" in "Command (use - for login shell)".
I would still like to have an alias for LL at least if we can figure out a way to get the aliases to stick.
Thanks!
##########edit2
In case people have no idea what I'm talking about.
Busybox LS output with color in Windows CMD:
Code:
# ls
ls
←[1;34mcache←[0m ←[1;36metc←[0m ←[1;34mroot←[0m
←[1;34mconfig←[0m ←[1;32minit←[0m ←[1;34msbin←[0m
←[1;36md←[0m ←[1;32minit.desirec.rc←[0m ←[1;34msdcard←[0m
←[1;34mdata←[0m ←[1;32minit.goldfish.rc←[0m ←[1;34msqlite_stmt_journals←[0m
←[0;0mdefault.prop←[0m ←[1;32minit.rc←[0m ←[1;34msys←[0m
←[1;34mdev←[0m ←[0;0mlogo.rle←[0m ←[1;34msystem←[0m
←[1;34memmc←[0m ←[1;34mproc←[0m
Busybox LS output without color in Windows CMD:
Code:
# ls --color=never
ls --color=never
cache etc root
config init sbin
d init.desirec.rc sdcard
data init.goldfish.rc sqlite_stmt_journals
default.prop init.rc sys
dev logo.rle system
emmc proc
And now color just looks like one of the weirdest words to me after looking at it for so long....
COLOR.
I got an LL going if anyone is interested. Basically using this guys instructions but making it for ll instead of dir.
1) Create a file named ll in /system/xbin
With this in it [NO COLOR]:
Code:
#!/system/xbin/sh
ll(){
ls -la --color=never [email protected]
}
ll [email protected]
OR
With this in it [COLOR]:
Code:
#!/system/xbin/sh
ll(){
ls -la [email protected]
}
ll [email protected]
2) Set file ownership/permissions
Get an ADB Shell:
Code:
cd /system/xbin
chown 0 ll
chmod 755 ll
The LL command will work immediately after setting ownership/permissions on the LL file. It's a workaround for now but works great.
Updated first post.
Not at all
The shortest way to do it is:
Code:
# alias ls="ls --color=never"
What I wonder is how to get rid of the annoying ECHO..
Long term fix?
Any better ways to fix this? I never used to have this problem, but all of a sudden, after messing with ADB over WiFi, now I do have this problem
http://forum.xda-developers.com/showthread.php?p=14564633
The alias only works for a single cmd session
update
ScottHW said:
Any better ways to fix this? I never used to have this problem, but all of a sudden, after messing with ADB over WiFi, now I do have this problem
Click to expand...
Click to collapse
Small update: I noticed that I actually only have the problems with ls -al when the phone is fully booted. When I use adb booted in Recovery (CWM) the file listings are fine.
It's possible that I have never used adb while the phone is fully booted before, and just assumed that the Recovery behavior was universal and when I got the funky behavior, it wasn't messing around with ADB, it was just because I didn't know what "normal" was.
Short term fix is still just to use an alias for ls
But you have to redo it every time you restart adb

[HOWTO] Loop mount

OK, I spent a couple of hours figuring out how loop mounting works. The problem is that the mount command in both toolbox and busybox supports only one loop device. I modified the toolbox version to allow the specification of a new loop device.
Here is how to make a 500mb loop-mounted ext2 system at /mnt/myloop , with the system being stored in /storage/sdcard/myext2system.img
Step 1. Make sure you have root. Download bettermount*.zip to your PC from here. Copy the "bettermount" file from the zip file to /data/local/ (or some other location). One way of doing that is with:
Code:
adb push bettermount /data/local
on the PC. Or you can mount your device to USB, copy bettermount to storage, and then in a root shell copy it to /data/local. Or if you have RW root, you can install bettermount in /bin or some other convenient location.
Start a shell on the device, either via adb or an on-device terminal (not recommended unless you have an external keyboard). Switch to root:
Code:
su
Then make bettermount executable:
Code:
chmod 755 /data/local/bettermount
The following steps assume you're still in your root shell.
Step 2. Create ext2 file system in a file. (Skip this if you already have one.)
Code:
dd if=/dev/zero of=/storage/sdcard/myext2system.img bs=1M count=500
mke2fs /storage/sdcard/myext2system.img
mke2fs will give you a warning that this isn't a block special device, but just press "y" and "enter".
Step 3. Create a loop device node for the ext2 file system. The problem here is that the OS uses loop device nodes for apps moved to external storage and one for the system squashfs, and it only has enough loop device nodes for those purposes--any loop device nodes in /dev/block are already in use. On the assumption that you aren't going to have more than 253 apps moved to storage, we're going to create a loop device node numbered 255. If you like, you can check that there isn't already one with that number with
Code:
ls /dev/block/loop*
So, let's create the loop device node:
Code:
mknod -m640 /dev/block/loop255 b 7 255
Step 4. Create a mount point:
Code:
mkdir /mnt/myloop
Step 5. Mount myext2filesystem.img:
Code:
/data/local/bettermount -t ext2 -orw,exec,noatime,nodiratime,sync,loop=/dev/block/loop255 /storage/sdcard/myext2system.img /mnt/myloop
Enjoy your new file system at /mnt/myloop !
You will have to repeat Steps 3-5 after every boot, or else you can make a script that runs every time you boot. You could simply put the commands for 3-5 into a Script Manager script set to run on boot, or there may be some better, more unixy way (but I haven't had any luck editing startup scripts).
What to do with your shiny new filesystem? Well, you could move not just apps but also their libraries to external storage (you can also do that by remounting your external storage in exec mode).
arpruss said:
OK, I spent a couple of hours figuring out how loop mounting works. The problem is that the mount command in both toolbox and busybox supports only one loop device. I modified the toolbox version to allow the specification of a new loop device.
Here is how to make a 500mb loop-mounted ext2 system at /mnt/myloop , with the system being stored in /storage/sdcard/myext2system.img
Step 1. Make sure you have root. Download bettermount*.zip to your PC from here. Copy the "bettermount" file from the zip file to /data/local/ (or some other location). One way of doing that is with:
Code:
adb push bettermount /data/local
on the PC. Or you can mount your device to USB, copy bettermount to storage, and then in a root shell copy it to /data/local. Or if you have RW root, you can install bettermount in /bin or some other convenient location.
Start a shell on the device, either via adb or an on-device terminal (not recommended unless you have an external keyboard). Switch to root:
Code:
su
Then make bettermount executable:
Code:
chmod 755 /data/local/bettermount
The following steps assume you're still in your root shell.
Step 2. Create ext2 file system in a file. (Skip this if you already have one.)
Code:
dd if=/dev/zero of=/storage/sdcard/myext2system.img bs=1M count=500
mke2fs /storage/sdcard/myext2system.img
mke2fs will give you a warning that this isn't a block special device, but just press "y" and "enter".
Step 3. Create a loop device node for the ext2 file system. The problem here is that the OS uses loop device nodes for apps moved to external storage and one for the system squashfs, and it only has enough loop device nodes for those purposes--any loop device nodes in /dev/block are already in use. On the assumption that you aren't going to have more than 253 apps moved to storage, we're going to create a loop device node numbered 255. If you like, you can check that there isn't already one with that number with
Code:
ls /dev/block/loop*
So, let's create the loop device node:
Code:
mknod -m640 /dev/block/loop255 b 7 255
Step 4. Create a mount point:
Code:
mkdir /mnt/myloop
Step 5. Mount myext2filesystem.img:
Code:
/data/local/bettermount -t ext2 -orw,exec,noatime,nodiratime,sync,loop=/dev/block/loop255 /storage/sdcard/myext2filesystem.img /mnt/myloop
Enjoy your new file system at /mnt/myloop !
You will have to repeat Steps 3-5 after every boot, or else you can make a script that runs every time you boot. You could simply put the commands for 3-5 into a Script Manager script set to run on boot, or there may be some better, more unixy way (but I haven't had any luck editing startup scripts).
What to do with your shiny new filesystem? Well, you could move not just apps but also their libraries to external storage (you can also do that by remounting your external storage in exec mode).
Click to expand...
Click to collapse
Which version of busybox were you testing with? I haven't had a problem with multiple loop devices...
I've been using the stock busybox: 1.7.2.
Do you use -oloop=/dev/block/loopNN to specify the device?
I just tried 1.16.0 from the Titanium Backup website. No luck. I created /dev/block/loop222. Then:
Code:
# /tmp/busybox mount -t ext2 -oloop=/dev/block/loop222 /storage/10.img /mnt/myloop
mount: can't setup loop device: No such file or directory
# bettermount -t ext2 -oloop=/dev/block/loop222 /storage/10.img /mnt/myloop
# (works!)
I also tried just plain -oloop, without the =/dev/block/loop222, and it didn't work.
arpruss said:
I've been using the stock busybox: 1.7.2.
Do you use -oloop=/dev/block/loopNN to specify the device?
I just tried 1.16.0 from the Titanium Backup website. No luck. I created /dev/block/loop222. Then:
Code:
# /tmp/busybox mount -t ext2 -oloop=/dev/block/loop222 /storage/10.img /mnt/myloop
mount: can't setup loop device: No such file or directory
# bettermount -t ext2 -oloop=/dev/block/loop222 /storage/10.img /mnt/myloop
# (works!)
I also tried just plain -oloop, without the =/dev/block/loop222, and it didn't work.
Click to expand...
Click to collapse
I can't remember if mount was symlinked to busybox at the time, but I just used the standard "mount -o loop disk1.img /mnt/disk". I may have even been on a custom kernel and had a crosscompiled mount, so good work, this is probably going to be a common problem for people.
The problem with busybox seems to be that it thinks /dev/block/loop0 is free, but it's not. Doing losetup -f returns /dev/block/loop0.
If you could mount the loopdevice in init.rc this would be the easiest way to expand the 300MB /data problem with archos.
Also it might be the best way in CM7 until its stable for the persistent Data between revisions.
fzelle said:
If you could mount the loopdevice in init.rc this would be the easiest way to expand the 300MB /data problem with archos.
Also it might be the best way in CM7 until its stable for the persistent Data between revisions.
Click to expand...
Click to collapse
I have had no luck adding anything to init.rc with the rw root.
Moreover, /storage and /storage/sdcard get mounted quite late in the boot process--late enough that I think one can't just move the /data directory there. I suppose one might be able to mount them earlier in the process, but I haven't been able to figure out how to run anything in an init script. If anybody knows how to do it, please speak up!
What one could do, however, is mount the loop from an app's on-boot notification, and then symlink individual app files.
It looks like with a better busybox than the one included with the device, one can also use losetup to specify the loop device--see here.
I built a full 1.18.5 version of Busybox, and it does loop mounting just right. You can replace Step 1 of my HOWTO with fetching my modified busybox and putting it in /data/local, from http://code.google.com/p/busybox-for-android/downloads/list
Then step 3 is not needed.
Step 4 should be replaceable with the very simple:
Code:
/data/local/busybox mount -orw,exec,noatime,nodiratime,sync,loop /storage/sdcard/myext2system.img /mnt/myloop
Or if you're pressed for time, and want to use default mount options:
Code:
/data/local/busybox mount -oloop /storage/sdcard/myext2system.img /mnt/myloop
But if you want to implement this is inside an app, depending on your license needs, you may want to use the longer method, since busybox is GPL while bettermount is Apache 2.

[REF][DEV]Terminal Emulator Commands

Always wondered what the terminal emulator app does? Dont now what commands to type? Well this thread is all about that
ALERT!!! ALERT!!
BELOW ARE THE COMMANDS AND THE PROCESSES THAT WILL HAPPEN BY TYPING THE COMMANDS!!!
IF YOU DO NOT UNDERSTAND SOMETHING PLEASE SO NOT TRY IT.. IT IS RISKY AND WILL POTENTIALLY HARM YOUR DEVICE!!
DO NOT BLAME ME THEN!!
THIS IS A REFERENCE AND DEV THREAD. NOOBS SHOULD NOT LINGER AROUND HERE
The Android Shell
A "shell" is a program that listens to keyboard input from a user and performs actions as directed by the user. Android devices come with a simple shell program. This shell program is mostly undocumented. Since many people are curious about it I thought I'd write up some documentation for it.
Currently this documentation is incomplete, sorry!
Click to expand...
Click to collapse
Common problems
The built-in shell has very limited error handling. When you type a command name incorrectly it will say "permission denied", even though the real problem is that it couldn't find the command:
Click to expand...
Click to collapse
Code:
$ dir
dir: permission denied <---- this is a misleading error message, should say 'dir: not found'
$ ls
... listing of current directory
The PATH variable
The Android shell will run any program it finds in its PATH. The PATH is a list of directories. You can find out what your shell's PATH is set to by using the built-in echo command:
Code:
$ echo $PATH
/data/local/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
Depending upon your shell, you may see a different result.
Built in Commands
Every shell has a few built-in commands. Some common built-in commands are:
echo -- prints text to stdout.
set -- sets shell variables
export -- makes shell variables available to command-line programs
cd -- change the current directory.
pwd -- print name of the current directory.
Commands
To find out what commands you have available to you, use the "ls" command on each of the directories in the PATH variable.
Click to expand...
Click to collapse
Finding documentation for the Android commands.
Many of the Android commands are based on standard Linux (or bsd) commands. If you're curious about a command, you can sometimes learn how it works by using the "man" command on a desktop Linux or OSX (Apple Macintosh) computer. The Linux or OSX version of the command may be different in details, but much of the documentation will still apply to the Android version of the command.
Another source of documentation for people without a Linux or OSX machine handy is to use a web browser and use a web search engine to search for the text: "man Linux command-name".
List of commands
The following is a list of the commands that are present on a Nexus S phone running an Android 2.3.3 "user-debug" build. Many of these commands are not present on a "user" phone. (They are missing from a "user" phone because they are specific to developing or debugging the Android operating system.)
Code:
$ ls /data/local/bin
/data/local/bin: No such file or directory
Notice that by default there is no /data/local/bin directory. You can create this directory using the "mkdir" command if you like.
Code:
$ ls /sbin
opendir failed, Permission denied
The /sbin directory exists, but you don't have permission to access it. You need root access. If you have a developer phone, or otherwise have root access to your phone you can see what's in this directory.
Code:
$ su
# ls /sbin
ueventd
adbd
# exit
$
Notice that the shell prompt changes from a '$' to a '#' to indicate that you have root access.
Click to expand...
Click to collapse
Notice also that neither of the /sbin commands are useful to the shell -- the adb and ueventd files are 'daemon' programs used to implement the Android Debugger "adb" program that is used by developers.
Code:
$ ls /vendor/bin
gpsd
pvrsrvinit
Vendor/bin is where device vendors can put device-specific executables. These files are from a Nexus S.
Code:
$ ls /system/sbin
/system/sbin: No such file or directory
This directory does not exist on a Nexus S.
Code:
$ ls /system/bin
am
am is the Android Activity Manager. It's used to start and stop Android activities (e.g. applications) from the command line. Type am by itself to get a list of options.
Click to expand...
Click to collapse
Code:
amix
aplay
Command line audio file player.
Code:
app_process
applypatch
Used to apply patches to android files.
Code:
arec
Command line audio recorder.
Code:
audioloop
bluetoothd
BlueTooth daemon
Code:
bmgr
Backup manager - type command by itself to get documentation.
Code:
bootanimation
Draws the boot animation. You may have to reset your phone to get out of this.
Code:
brcm_patchram_plus
bugreport
cat
Copy the contents of a file to standard output.
Code:
chmod
Change the mode of a file (e.g. whether it can be read or written.)
Code:
chown
Change the owner of a file.
Code:
cmp
Compare two files byte-by-byte
Code:
dalvikvm
The dalvik virtual machine. (Used to run Android applications.)
Code:
date
Prints the current date and time
Code:
dbus-daemon
dd
Convert and copy a file. By default copies standard in to standard out.
Code:
debuggerd
dexopt
df
Shows how much space is free on different file systems on your device.
Code:
dhcpcd
dmesg
dnsmasq
dumpstate
dumpsys
dvz
fsck_msdos
gdbserver
getevent
getprop
gzip
hciattach
hd
id
ifconfig
iftop
ime
input
insmod
installd
ioctl
ionice
iptables
keystore
keystore_cli
kill
Send signals to processes.
Code:
linker
ln
Used to set up a file system link.
Code:
log
logcat
Prints the Android runtime log.
Code:
logwrapper
ls
Lists files.
Code:
lsmod
lsof
make_ext4fs
mediaserver
mkdir
Make a directory.
Code:
monkey
A program that sends random events, used to test applications. (Like having a monkey playing with the device.)
Code:
mount
mtpd
mv
Move a file from one directory to another. (Only on the same file system. Use "cat a > b" to copy a file between file systems.
Code:
nandread
ndc
netcfg
netd
netstat
newfs_msdos
notify
omx_tests
pand
ping
pm
pppd
printenv
ps
List active processes.
Code:
qemu-props
qemud
racoon
radiooptions
reboot
Reboot the device.
Code:
record
renice
rild
rm
Remove a file.
Code:
rmdir
Remove a directory.
Code:
rmmod
route
rtp_test
run-as
schedtest
schedtop
sdcard
sdptool
sendevent
service
servicemanager
setconsole
setprop
setup_fs
sh
showlease
sleep
smd
stagefright
start
Starts the Android runtime.
Code:
stop
Stops the Android runtime.
Code:
surfaceflinger
svc
sync
system_server
tc
testid3
toolbox
top
Shows which processes are currently using the most CPU time.
Code:
umount
uptime
Prints how long your device has been running since it was last booted.
Code:
vdc
vmstat
vold
watchprops
wipe
wpa_cli
wpa_supplicant
$ ls /system/xbin
add-property-tag
btool
check-lost+found
dexdump
dhdutil
hcidump
latencytop
librank
opcontrol
oprofiled
procmem
procrank
rawbu
scp
Secure copy program. (Used to copy files over the network.)
Code:
showmap
showslab
sqlite3
Used to administer SQLite databases.
Code:
strace
System trace command - use to see what system calls a program makes.
Code:
su
Start a shell with root privileges.
Versions of the Android Shell
Android 1.0 used a shell that had no tab completion or history editing.
Android 2.3 added history editing. You can for example use the up/down arrows to edit previous commands.
Other shells
Busybox
Busybox is a program that contains a shell and a set of command line utilities. Search Android Market for "Busybox" and you should find some versions you can install. The Busybox shell includes tab completion and history editing. Some versions of Busybox for Android do not require that you root your phone.
Debian utilities
You can install the full Debian shell and utilities. (Debian is a popular desktop Linux distribution.) I don't know the details, and it may require a "rooted" phone. Try a web search for "Debian Android install".
Custom ROMs
Some custom ROMs come with their own shells and utilities. If you are using a custom ROM, check its documentation to find out what's available.
How can I view stdout outputs in terminal emulator window?
For example with dd command, not specifying output should display it at current terminal, like in linux, but actually doesn't. Any ideas?
Hey wanna troll someone's phone
Type in terminal "stop" lololol
Sent from my E15i using xda premium
Similar to linux terminal commands I use
Nice work though, great guide, thanks dude
W!LßSO @ XDA
Great guide, but you have forgot a very useful command: grep
It allows to apply filters to the output of the commands. The syntax is:
Code:
command | grep filter
For example, to list only the apk files inside a folder:
Code:
ls /folder/to/list | grep .apk
Great guide!
IMO dmesg is also important. Maybe you should add in a description for it?
Dmesg --> prints the Linux kernel output, which is different from the Android system output, logcat. Useful for checking hardware and to see if modules started up succesfully. Also useful for debugging in conjunction with logcat.
Code:
cat /proc/kmsg > /sdcard/dmesg.txt
Copies the dmesg output to a file fled dmesg.txt on the sdcard
And
Code:
cat /dev/log/system > /sdcard/logcat.txt
Copies the logcat output to a file named logcat.txt on your sdcard.
Also, you missed out the parted and e2fsck commands, used for partitioning and checking filesystem integrity.
Also, the command free (display free ram/swap) is not included.
Sent from my E15i using Tapatalk 2
Is there a command for check disk utility as in windows.. chkdsk...
my memory card is not working hence thought of running the check disk if possible...
dspPunk said:
Is there a command for check disk utility as in windows.. chkdsk...
my memory card is not working hence thought of running the check disk if possible...
Click to expand...
Click to collapse
Code:
su
fsck_msdos /dev/block/yourdevice
For ext4 there's e2fsck
scandiun said:
Code:
su
fsck_msdos /dev/block/yourdevice
For ext4 there's e2fsck
Click to expand...
Click to collapse
Dint get it... Sorry i am a so not into commands...
Kindly tell me the step wise solution... How can i see my device [yourdevice] which you have specified...
dspPunk said:
Dint get it... Sorry i am a so not into commands...
Kindly tell me the step wise solution... How can i see my device [yourdevice] which you have specified...
Click to expand...
Click to collapse
I don't have a Xperia X8 actually, does it support mass storage mode for internal sdcard?
http://www.jayceooi.com/2012/03/14/...storage-on-android-4-0-ics-samsung-galaxy-s2/
scandiun said:
I don't have a Xperia X8 actually, does it support mass storage mode for internal sdcard?
http://www.jayceooi.com/2012/03/14/...storage-on-android-4-0-ics-samsung-galaxy-s2/
Click to expand...
Click to collapse
I am having SGS2 and yes it supports mass storage for internal sdcard...
When i connect to my computer it shows only internal sdcard and not external card which is present in the external sdcard slot...
actually the problem is that my sdcard gets detected some times and sometimes it doesnt...
i searched a lot and many of them told that it is a kernel version issue.. i updated kernel still no luck..
then i got one thread which gave me the solution of check disk so was thinking whether terminal emulator has any commands for check disk..
Hi hetunandu, great guide,
but still I don't understand few things:
1: how to run a specific action of an app?
2: how to KNOW the exact sintax of possible actions of an app?
3: is it possible to launch these commands via SSH (through an SSH server)?
eg: I want to start a audio-recording app on my phone from my computer, AND start recording from remote. Is it possible?
Thank you
(and sorry for my english..)
JFI - Never run fsck on a mounted partition.. You will corrupt your data!
CtrlAltDelIrl said:
JFI - Never run fsck on a mounted partition.. You will corrupt your data!
Click to expand...
Click to collapse
Usually fsck won't run on that case and you warn you, you will have to use the force option in that case.
reading traffic stats
I am trying to get the traffic stat getMobileRxBytes (or any other traffic stat) to output a usable result in the terminal emulator. The goal is simply to be able to copy the rx bytes total to be used in Tasker. However, I can't seem to be able to get any output. I would appreciate it if anybody knows the proper command/syntax to show this traffic data. Thanks.
I am on a stock rooted 4.1.1 Galaxy Nexus.
[Q] Is there a command to show some configuration ?
I have run this command on terminal emulator:
[email protected]:/ $ su
[email protected]:/ #setprop net.cdma.rstp.proxy.addr 0.0.0.0;
[email protected]:/ #setprop net.cdma.rstp.proxy.port 0;
[email protected]:/ #setprop net.cdma.httppd.proxy.addr 0.0.0.0;
[email protected]:/ #setprop net.cdma.httppd.proxy.port 0;
Is above command right..???
after that i ran "getprop" i don't see effect of that command.
Can you tell me the right way or command to change my rstp & httppd setting...? cause my Epic4G cannot play video streaming after flashing CM10 nightly.
thanks,
adit
permission denied
china telecom infotmic m7206 not root because no usb i want to root tablet pc
terminal is boot "permission denied" why
help me please ???
Any way to check Camera firmware version per http://forum.xda-developers.com/showthread.php?t=2006128 ?
rooted Verizon SG3 on CM10.0
Hi... Before this I have rooted my phone since yesterday when I accidentally copy su file from "/system" to "/system/bin/" andnow I can't get root access because on Superuser I check the su version was 3.1.1 but there got red words maybe it try saying that I put su file in wrong location and I can't move it back because my root explorer can't get root access and it just show Root Explorer acess denied by Superuser. Terminal emulator also access denied. One more I'm using Sony Ericsson W8 and it can't unlock bootloader. Could someone help me to remove su file from "/system/bin". Thanks You
PutraMasyers97 said:
Hi... Before this I have rooted my phone since yesterday when I accidentally copy su file from "/system" to "/system/bin/" andnow I can't get root access because on Superuser I check the su version was 3.1.1 but there got red words maybe it try saying that I put su file in wrong location and I can't move it back because my root explorer can't get root access and it just show Root Explorer acess denied by Superuser. Terminal emulator also access denied. One more I'm using Sony Ericsson W8 and it can't unlock bootloader. Could someone help me to remove su file from "/system/bin". Thanks You
Click to expand...
Click to collapse
Just root ur W8 again as u did before
see boot animation without rebooting

[HOWTO] Add init.d to stock ROM + a few other goodies

I have been resisting the urge to flash a custom ROM for a bit, but I really miss having init.d support. So I read a few threads for other phones and rolled my own.
Warnings
I borrowed bits and pieces from various places. If you don't know what init.d is, you probably don't want to do this. If you aren't willing to take responsibility for bricking your tablet, don't do this. Seriously, the risk of bricking is very low, but if you aren't comfortable booting into an adb shell from recovery, maybe this is not for you. Strongly suggest a nandroid backup before you get started so if you totally bork things you can just hit rewind.
Note: The latest CWM may prompt you on a reboot that the ROM may overwrite the bootloader and offer to fix it for you. Don't do that. The init.d hack takes over the bootloader install script, but does not change your bootloader! If you accidentally do let it fix things for you, just rebuild the install-bootloader.sh file. The other steps should be fine.
Prerequisites
First, you need root, busybox, and some sort of terminal (either adb, or some terminal you like using on the tablet).
I have found that I like Busybox Installer (from the market; https://play.google.com/store/apps/details?id=com.jrummy.busybox.installer) but for some reason it doesn't create new symlinks unless you click advanced install.
Let's get to it!
In the shell (don't type # or anything after #):
Code:
su # get root
mount -o remount,rw /system # get access to /system (4.04 seems to mount ro as is usual; seems like the original mounted rw)
which run-parts # if you don't see /system/xbin/run-parts you need to install/reinstall busybox; if it is somewhere else, note it
mkdir /system/etc/init.d
Create a file called sysinit -- we are going to put it in /system/bin. You can edit it in place with vi, mount your tablet and edit it on your computer, or create it on the computer and push it via adb. Whatever.
Here's the file (you do need the # and the things after it in the file!):
Code:
#!/system/bin/sh
export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper /system/xbin/run-parts /system/etc/init.d
Note that if your run-parts is not in /system/xbin (from the which command) then fix the above to reflect your reality.
In the shell, make it executable
Code:
chmod 755 /system/bin/sysinit
Now go in the init.d directory and create some things you want to run at start up. For example:
Code:
cd /system/etc/init.d
echo '#!/system/bin/sh' >99test # note: you do need the first # in this line but not the 2nd!
echo 'date >>/data/tmp/init.d-log.txt' >>99test
chmod 755 99test
Here's a more practical one (yes, you need the # signs). Name it something like 10diskperf -- don't forget to chmod it.
Code:
#!/system/bin/sh
# Set disk read aheads to 1024
chmod 777 /sys/block/mmcblk0/queue/read_ahead_kb
echo "1024" > /sys/block/mmcblk0/queue/read_ahead_kb
chmod 777 /sys/block/mmcblk1/queue/read_ahead_kb
echo "1024" > /sys/block/mmcblk1/queue/read_ahead_kb
chmod 777 /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo "1024" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
Or here is one to tweak some TCP parameters (25sysctl):
Code:
#!/system/bin/sh
sysctl -w net.core.rmem_max=524288
sysctl -w net.core.wmem_max=524288
sysctl -w net.ipv4.tcp_rmem=6144 87380 524288
sysctl -w net.ipv4.tcp_wmem=6144 87380 524288
Whatever files you put in, you need to remember to make them executable (chmod 755).
Finally, you need to kick it all off at start up. The hack for that is we are going to create /system/etc/install-recovery.sh which apparently runs on each boot.
Code:
cd /system/etc
echo '#!/system/bin/sh' >install-recovery.sh
echo '/system/bin/sysinit' >>install-recovery.sh
chmod 755 install-recovery.sh
Tips and troubleshooting
If you are too lazy to cut and paste I have the files here (View attachment init.d-support.zip) that you can just move to the right places and change permission. If you are really lazy there is lightly tested install script below.
I like to try running the whole thing before a reboot to see if I get any errors:
Code:
/system/etc/install-recovery.sh
I'd suggest putting the 99test file in first. Verify that you get the expected file in /data/tmp and then reboot and check again. Then you can remove 99test.
Same goes for adding new scripts. Try running them from the shell to see if they throw errors before you reboot!
If you have trouble, see if this looks right:
Code:
ls -ld /system/etc/install-recovery.sh /system/bin/sysinit /system/etc/init.d /system/xbin/run-parts
-rwxr-xr-x root root 39 2012-07-14 10:00 install-recovery.sh
-rwxr-xr-x root root 140 2012-07-14 10:01 sysinit
drwxrwxrwx root root 2012-07-14 10:10 init.d
lrwxrwxrwx root root 2012-07-14 09:55 run-parts -> /system/xbin/busybox
For the brave
The install-init.d zip file (View attachment install-init.d.zip) contains a lightly tested script that SHOULD do the install steps for you.
Send the file to your android to someplace that can execute code (e.g., /system/xbin; I had to use adb to put it on the sdcard and then move it to /systemxbin in the shell since I don't have the adb root kernel installed).
Code:
cd /system/xbin # or wherever you have it
chmod 755 install-init.d
./install-init.d
It performs rude checks to see if init.d exists, and tries to handle moving or missing busybox. It only installs 99test as a script.
Let me know if this works or doesn't work for you.
For the extra brave: There is no reason this should only work on the Samsung. This ought to work on pretty much most stock ROMs as long as they execute install-recovery.sh on start up.
Scripts
What do you put in your init.d? If you post anything cool I'll put it up here in the op.
One that gave me some real gains in I/O performance required a new version of the tune2fs executable. By default, it is part of busybox but the busybox one only has a few simple options. I've included a stand alone version and the script 10disktune here View attachment disktune.zip. Unpack the zip and put the 10disktune in /system/etc/init.d (don't forget to chmod) and put tune2fs in /system/bin (chmod that too). Note that busybox has one in /system/xbin but the script specifically calls out the one in /system/bin.
Here's one that will zipalign your apks on each boot
Code:
#!/system/bin/sh
for apk in /data/app/*.apk ; do
zipalign -c 4 $apk
ZCHECK=$?
if [ $ZCHECK -eq 1 ]; then
zipalign -f 4 $apk /cache/$(basename $apk)
if [ -e /cache/$(basename $apk) ]; then
cp -p -f /cache/$(basename $apk) $apk
rm /cache/$(basename $apk)
fi;
fi;
done;
Fin
Corrections welcome. I considered using exec or . to load some of this into one shell but given that it runs once at startup, I figured it is fine as is.
All files for reference
View attachment init.d-support.zip
View attachment install-init.d.zip
View attachment disktune.zip
Great guide, gonna try it tonight.
Sent from a GNote, hell yeah!
SirRhor said:
Great guide, gonna try it tonight.
Sent from a GNote, hell yeah!
Click to expand...
Click to collapse
I'm curious how it went. If you ran into any issues, let me know so I can update the op. Thanks!
Hmm did anyone get this to work?
wd5gnr said:
Hmm did anyone get this to work?
Click to expand...
Click to collapse
I did it on my Galaxy Nexus.
It works great, I had a bit of problem with the sysinit file, but when I downloaded your zip file and used your sysinit, it worked, so it must be a problem from my side
Thanks for this, I can finally use "Odex Me"
aavan said:
I did it on my Galaxy Nexus.
It works great, I had a bit of problem with the sysinit file, but when I downloaded your zip file and used your sysinit, it worked, so it must be a problem from my side
Thanks for this, I can finally use "Odex Me"
Click to expand...
Click to collapse
Great, just wanted to be sure I hadn't made any typos/errors in the guide.
A lot of init.d files collected here: http://forum.xda-developers.com/showthread.php?t=1227269
Also build.prop things, etc.
Thanks, I use your guide and worksperfect for my RK3066 devices. Very simple to understand all steps and what we are doing to our system, perfect for me. Thanks again dude
Melch1zedeK said:
Thanks, I use your guide and worksperfect for my RK3066 devices. Very simple to understand all steps and what we are doing to our system, perfect for me. Thanks again dude
Click to expand...
Click to collapse
Glad to help!
What is thhe utility of this?
moliverac8 said:
What is thhe utility of this?
Click to expand...
Click to collapse
Init.d is how Linux and many Android (which is kind of Linux, after all) systems manage executing commands on boot up.
The /etc/init.d files run in numerical order as root and you can do things like change system settings, manipulate the file system, etc.
See the init.d section linked below for some ideas.
http://forum.xda-developers.com/showthread.php?t=1227269
Question? what is the difference in this method and running a script?
wd5gnr said:
Init.d is how Linux and many Android (which is kind of Linux, after all) systems manage executing commands on boot up.
The /etc/init.d files run in numerical order as root and you can do things like change system settings, manipulate the file system, etc.
See the init.d section linked below for some ideas.
http://forum.xda-developers.com/showthread.php?t=1227269
Click to expand...
Click to collapse
I use the "swap memory script" and was wondering if it would also work this way with the init.d If so would there be any benefit this way over the current way of running it one way or the other? One drawback I see running the script as is is that I have to wait once the system has fully booted until the script has run and I see the Smanager screen to let me know that my memory has been remounted.
Thanks for the info and the learning process.
Here is the script and the link.
http://forum.xda-developers.com/showthread.php?t=1961097
Code:
sleep 5
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:25 /mnt/sdcard
sleep 5
mount -o bind /data/media /mnt/extSdCard
As long as the device is ready to mount at boot time and doesn't get remounted, ought to work. Backup and try it
External memory wasn't ready
wd5gnr said:
As long as the device is ready to mount at boot time and doesn't get remounted, ought to work. Backup and try it
Click to expand...
Click to collapse
Thanks for the guide, but I think that the external memory was not ready to be mounted at that time. it didn't see the card till after boot. It was worth a shot, Reverted back to the script in /data and all worked again,
Note: I didn't find /system/xbin/run-parts however, I did find /system/bin/run-parts and changed the path to reflect that, I don't think this was an issue but I'm not 100% sure.

[ROOT] <Generic topic about verified root exploit>

Sparkym3 released an automated tool for this, please see here http://forum.xda-developers.com/showpost.php?p=31730134&postcount=1
Please DO NOT donate to nor credit me me for this matter, this was not my find, we just tried an existing exploit on the device.
Dear bloggers, source this when copying:
http://www.androidpolice.com/2012/09/17/amazon-kindle-fire-hd-7-already-rooted-heres-how-to-do-it/
Amazon failed to fix the bug sparkym3 (http://forum.xda-developers.com/member.php?u=4411543) found in ICS, whoops.
http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip
unzip the zip, get su from /system/bin/ and Superuser.apk from /system/app/ and put them in your current directory
adb shell
rm -r /data/local/tmp
ln -s /data/ /data/local/tmp
exit
adb reboot
adb shell
echo 'ro.kernel.qemu=1' > /data/local.prop
exit
adb reboot
adb shell mount -o remount,rw /system
adb push su /system/xbin/su
adb shell
chown 0.0 /system/xbin/su
chmod 06755 /system/xbin/su
rm /data/local.prop
exit
adb reboot
adb install Superuser.apk
SWEET!
jcase said:
Please DO NOT donate to nor credit me me for this matter, this was not my find, we just tried an existing exploit on the device.
Dear bloggers, source this when copying:
http://www.androidpolice.com/2012/09/17/amazon-kindle-fire-hd-7-already-rooted-heres-how-to-do-it/
Amazon failed to fix the bug sparkym3 (http://forum.xda-developers.com/member.php?u=4411543) found in ICS, whoops.
http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip
unzip the zip, get su from /system/bin/ and Superuser.apk from /system/app/ and put them in your current directory
adb shell
rm /data/local/tmp
ln -s /data/ /data/local/tmp
exit
adb reboot
adb shell
echo 'ro.kernel.qemu=1' > /data/local.prop
exit
adb reboot
adb shell mount -o remount,rw /system
adb push su /system/xbin/su
adb shell
chown 0.0 /system/xbin/su
chmod 06755 /system/xbin/su
rm /data/local.prop
exit
adb reboot
adb install Superuser.apk
Click to expand...
Click to collapse
This is really exciting news! Been hoping for some good news on this front! Just got my new Fire over the weekend. Looking forward to getting the play store working.
Was there a way with the old fires to block Amazon's automatic updates?
As always thanks for your work man!!
ThaPirato said:
As always thanks for your work man!!
Click to expand...
Click to collapse
Not my work, thank sparkym3. We just went testing older exploits before releasing a new one, and this worked.
Jcase , you love these kindles don't you. Thanks for helping us out
Sent from my Nexus 7 using Tapatalk 2
how do i get my kindle to be recognized when i type "adb shell" in the command line? I enabled adb in the security settings
stu5797 said:
how do i get my kindle to be recognized when i type "adb shell" in the command line? I enabled adb in the security settings
Click to expand...
Click to collapse
If you have the SDK installed and you get "error: device not found" you need to do the following steps. This worked for me.
Navigate to the [your user name]/.android folder. It is under C:\Users
Edit the adb_usb.ini file, adding the following line of code at the end:
0×1949
Close and save that file.
Now find the folder where your SDK is installed, and open the usb_driver folder. In that folder, find the file android_winusb.inf and add the following code to both the [Google.NTx86] and [Google.NTamd64] sections:
;Kindle Fire
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01
Reboot and then run adb shell again. It should recognize your device.
Jcase is the android locksmith. Just about every device I have seen he has atleast helped unlock. Now if a working recovery can get made, I can see my self getting one of these puppies down the road.
sent from my Nokia 5110 using t9
jcase said:
Please DO NOT donate to nor credit me me for this matter, this was not my find, we just tried an existing exploit on the device.
Dear bloggers, source this when copying:
http://www.androidpolice.com/2012/09/17/amazon-kindle-fire-hd-7-already-rooted-heres-how-to-do-it/
Amazon failed to fix the bug sparkym3 (http://forum.xda-developers.com/member.php?u=4411543) found in ICS, whoops.
http://downloads.noshufou.netdna-cdn.com/superuser/Superuser-3.1.3-arm-signed.zip
unzip the zip, get su from /system/bin/ and Superuser.apk from /system/app/ and put them in your current directory
adb shell
rm /data/local/tmp
ln -s /data/ /data/local/tmp
exit
adb reboot
adb shell
echo 'ro.kernel.qemu=1' > /data/local.prop
exit
adb reboot
adb shell mount -o remount,rw /system
adb push su /system/xbin/su
adb shell
chown 0.0 /system/xbin/su
chmod 06755 /system/xbin/su
rm /data/local.prop
exit
adb reboot
adb install Superuser.apk
Click to expand...
Click to collapse
Thanks for your sharing!
Thanks Cameron Summerson!
Awesome work guys, especially for jcase and sparkym3...
Qemu automated root problem
Kindle Fire HD 7.2.1 using the Qemu auto - thing keeps stalling at step 3 "looking for access"
The filename, directory name, or volume label syntax is incorrect.
It's leaving me an unstable device that requires a factory reset to operate. Any insight would be appreciated.
BELASCO said:
Kindle Fire HD 7.2.1 using the Qemu auto - thing keeps stalling at step 3 "looking for access"
The filename, directory name, or volume label syntax is incorrect.
It's leaving me an unstable device that requires a factory reset to operate. Any insight would be appreciated.
Click to expand...
Click to collapse
Mine did the same, simply ignore it..
CTRL c
to stop
restart the script and start with step 4 --> it will stall again but will work..
Scsi
scs1man said:
Mine did the same, simply ignore it..
CTRL c
to stop
restart the script and start with step 4 --> it will stall again but will work..
Scsi
Click to expand...
Click to collapse
Happily rooted and hunting through Gplay.
Root works great with KFHD7 (firmware 7.2.1)
someonhe has sucessfuly rooted a 7.2.2 version?
7.2.2
So my system updated to 7.2.2 - darn!
So what's the current status...
- Google Chrome, Play store and frameworks still present - and working.
- ES Explorer is not able to enable Root Explorer, so root obviously shorted.
- The Superuser app remains, but is useless without the 'su' file.
- GoLauncher was completely removed.
- The Qemu exploit is not working. Gives error on cmd line: echo 'ro.kernel.qemu=1' > /data/local.prop
Hope everyone still on 7.2.1 puts up their firewalls. And :angel: praying that our developer legends work something out on what Amazon did to lock 7.2.2.
Also, an additional warning about the 7.2.2 update... I don't know if this happened to anyone else, but I had the Swype Beta installed on my rooted KFHD. The new update also came with Swype, and for some reason, instead of overwriting mine, there's this bizarre conflict with the two. When attempting to type, Swype tells me have an incorrect license, and refuses to work and tells me to redownload the beta. On top of that, attempts at removal or reinstallation are impossible since I no longer have root (Swype is in the system/apps directory).
Just about everything else works (minus apps needing root), including Nova Launcher Prime. I still can't type though. Yay Amazon.
I had Swype too, but I used nook tools to choose the Amazon keyboard and it works fine.
Sent from my KFTT using Tapatalk 2
VbSin said:
So my system updated to 7.2.2 - darn!
- GoLauncher was completely removed.
Click to expand...
Click to collapse
That's interesting. I had ADWLauncher before the update and it stayed. I've lost my desktop layout, I can't bind it to the home button and I can't add widgets but otherwise it works OK.
No root yet for 7.2.2
maxx1985 said:
someonhe has sucessfuly rooted a 7.2.2 version?
Click to expand...
Click to collapse
I tried and tried, but no success. With the automatic procedure I get always the same error ( screenshot attached) and it sends me to NOROOT-
Going to try the cmd one, let's hope!

Categories

Resources