Related
If I wanted to add all of my apps to the Rom package to avoid reinstalling them one by one where would I add them before resigning it and flashing?
rom116 said:
If I wanted to add all of my apps to the Rom package to avoid reinstalling them one by one where would I add them before resigning it and flashing?
Click to expand...
Click to collapse
/data/app
if the folder isnt there then make it
10 char
data/app
Do you mean system/app?
He means /data/app/
What about adding system apps (Mobile Defense or PDFViewer)? Do you have to do anything different?
If you search my posts in replies, there is a script that I used to install all my apps when I reflash.
...
..
.
jcase
The phone looks for apps in /data/app as well as /system/app
Disk space on the system image is very limited though, so if you're sticking a bunch of apps in there you'll run out of space though, which is why you'll want them in /data/app instead.
I keep a backup of all of my programs in a folder on my sd card called apps. I can install all my apps after a flash in under a minute and its a lot easier to keep the folder up to date than to edit every rom package to put them in there.
Either from a terminal downloaded from the market or adb on your pc use:
su
cd sdcard/apps(or folder name if apps is not used)
busybox install *.apk /data/app
You will need to add the following to lines to the update script as well If you do not Set_Perm it will not allow you to install new apps on a clean format, Also if a app crashes on launch install it manually then go into the data/dalvik-cache folder and copy the corrosponding .odex file and have it install to the data/dalvik-cache Enjoy.
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
pjsockett said:
I keep a backup of all of my programs in a folder on my sd card called apps. I can install all my apps after a flash in under a minute and its a lot easier to keep the folder up to date than to edit every rom package to put them in there.
Either from a terminal downloaded from the market or adb on your pc use:
su
cd sdcard/apps(or folder name if apps is not used)
busybox install *.apk /data/app
Click to expand...
Click to collapse
Where do you download the apk files so that you can do this? I'm sorry, but Im new to this and your idea sounds very easy to do.
Make a folder called data. Put a folder called 'app' inside of it.
Add to update script:
copy_dir PACKAGE:data DATA:
Or, just do it (as i do) in a seperate update.zip. The update script is META-INF\com\google\android\update-script.
Thanks
xtremeskier97 said:
Where do you download the apk files so that you can do this? I'm sorry, but Im new to this and your idea sounds very easy to do.
Click to expand...
Click to collapse
Probably the most user friendly way to get your apps would be to download astro file manager and use the apps backup feature. It puts all of the apps into a backup folder on your sd card. Other wise you could do
cp data\app\* \sdcard\apps
from an adb shell which would be the faster option but trickier if your not familiar with it
FireSokar said:
You will need to add the following to lines to the update script as well If you do not Set_Perm it will not allow you to install new apps on a clean format, Also if a app crashes on launch install it manually then go into the data/dalvik-cache folder and copy the corrosponding .odex file and have it install to the data/dalvik-cache Enjoy.
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
set_perm 1000 1000 0771 DATA:data
set_perm 1000 1000 0771 DATA:dalvik-cache
**EDIT*** Also if your app Force Closes find /data/data folder and find the folder that matches your app and copy it to /data/data of your rom folder before packaging and add it.
Click to expand...
Click to collapse
Re-Read the entire quoted post its been corrected to help with any issue you will run into during this.
Instead of
cd sdcard/(folder)
busybox install *.apk /data/app
is there a command such as
install sdcard/(folder)/*.apk /data/app
Or should I just try and find out and hope my phone won't blow up. Not home at the moment to test it.
When i add a folder named data/app to a rom and try flashing it it says no digest for the apps i tried to add anyone help?
pjsockett said:
Probably the most user friendly way to get your apps would be to download astro file manager and use the apps backup feature. It puts all of the apps into a backup folder on your sd card. Other wise you could do
cp data\app\* \sdcard\apps
from an adb shell which would be the faster option but trickier if your not familiar with it
Click to expand...
Click to collapse
I just tried that and and it was giving me some errors.
what i found to work was to do:
1. make sure there is a folder called "apps"
2. adb shell
3. cp data/app/* /sdcard/apps
(notice the difference in the slashes (forward vs backwards)
pjsockett said:
I keep a backup of all of my programs in a folder on my sd card called apps. I can install all my apps after a flash in under a minute and its a lot easier to keep the folder up to date than to edit every rom package to put them in there.
Either from a terminal downloaded from the market or adb on your pc use:
su
cd sdcard/apps(or folder name if apps is not used)
busybox install *.apk /data/app
Click to expand...
Click to collapse
+1
Thank you this has come in handy, and you still get Market Update Notifications!!
Hi. Can someone tell me the easiest way to remove bloatware like soundhound, amazon mp3 etc. My phone is rooted BTW.
Thanks
You'll need the android sdk installed on your computer but then:
adb remount
adb shell
cd system/app
rm whateveryoulike.apk
It goes without saying that a backup is a good idea before you start deleting stuff. Some things you can delete no worries but others may be dependencies etc. But as far as bloatware is concerned you shouldn't have a problem.
Or if you don't have the sdk installed you could install a file manager like astro file manager from the market and browse and delete the apk's directly on your phone. They're in /system/app/ anyway.
For sometime now I have been meaning to write-up some of my notes and share some of the things I found can be done with webtop. I have a lapdock that I use it with my Atrix, I also have a HD dock connected to a monitor/keyboard/mouse/speakers.
Much of the following is just documenting the linux programs that are installed on the webtop and how they can be configured. You will need to have a terminal program to do most things covered in this post (not the android terminal program, but either lxterminal or xterm) and a text editor.
I use SystemR89's webtopMod to run a full debian distribution in a chooted jail (http://forum.xda-developers.com/showthread.php?t=1093790), this is not necessary for most of what this post will cover but it does install lxterminal and a lightweight text editor (leafpad) into your webtop.
AWN (the menu at the bottom of the webtop screen)
awn-manager is included in webtop and it allows you add/delete programs from the menu at the bottom of the screen. Before you use awn-manager the first time you will need to type the following command at the terminal prompt:
sudo chmod 777 /usr/share/applications/*
Then you can just type in awn-manager and click on launchers and start changing/adding/deleting things. Alternatively you can modify the appropriate files manually.
The configuration file that has the list of menu items is:
~/.gconf/apps/avant-window-navigator/window_manager/%gconf.xml
If you make manual changes to this file you will need to reboot for the changes to take effect (if you use awn-manager all changes take effect immediately).
As you will notice the menu configuration file references “.desktop” files. I am not going to cover the structure of the desktop files, there are a lot of good references out there covering this, just take a look at what is in them, the structure it is pretty straightforward. A number of the desktop files are found here:
/usr/share/applications
but the ones created by awn-manager will be put here:
~/.config/awn/launchers
If the program or command will only be run from the awn menu this directory is probably the best place to put the desktop file. If you are going to associate the program with a file type (more on this latter) you may want to put the desktop files in the following directory:
~/.local/share/applications
any weblinks that you create by using the plus in the right hand side of the bottom awn menu bar will be put here:
~/.config/webtop-icon
and a good place to stick any custom icons that you are going to be using is here:
~/.config/awn/custom-icons
the default set of icons that awn-manager accesses are found here
/usr/share/pixmaps//usr/share/icons
to launch an android program in the mobileview window (aka aiw) you will need to use androidlauncher, here are a couple examples of how to do this:
androidlauncher --action "android.intent.action.VIEW" --uri "content://com.android.contacts/contacts"/usr/local/bin/androidlauncher --action "android.intent.action.MAIN" --cmp "uk.co.nickfines.RealCalc/.Calculator"
you can look in the desktop files found in the /usr/share/applications directory to see some examples of how to launch various android programs you can also use the android app alogcat from the market to see what command is executed when you launch an android app on your phone.
Nautilus (the file manager)
Nautilus is filemanager used by webtop, it has been significnatly modified by Motorola so don't expect all of the normal features to work. If you look at the entry for the file manager using awn-manager you will see that the following command is used to launch the program:
nautilus --no-desktop --browser /mnt/sdcard
In webtop the default preferences for nautilus are set up so that you can leave out the -no-desktop and -browser switches if you want. The /mnt/sdcard entry specifies which directory nautilus should start in. You can specify nautilus to start in the root (/) directory, but it won't have root privileges, so it is not a replacement for root explorer (or similar). If gksu was included in webtop you should have been able to run nautilus with root privileges by typing in:
gksu nautilus --no-desktop --browser /
but when I installed gksu and tried this it did not work.
If you want to have additional directories listed on the left panel in nautilius you can edit the file:
~/.gtk-bookmarks
You can add some functionallity to nautilus by creating scripts. After you create a script an option to run the script will appear under the files menu and come up when you right click. The scripts files are kept in the following directory:
~/.gnome2/nautilus-scripts
I have attached a couple of scripts that I use, you can also check out:
http://linux.about.com/library/gnome/blgnome6n13a.htm
http://g-scripts.sourceforge.net/faq.php
You can view the preferences that are set for nautilus by using:
gconftool-2 -R /apps/nautilus/preferences
I played around with changing some of the preferences, I tried to turn on an address bar but the bread crumbs disappeared instead, I found that you can enable move-to-trash but it only works for linux filesystems (i.e. it works for your home directory but not for FAT filesystems like sdcard or sdcard-ext, although you might be able to fix this by putting appropriate entries in fstab with uid=1000 in the entry, I wrote a move to trash script instead)
It does not appear that the motorola webtop nautilus directly supports accessing network files, but if you are using a kernel with cifs support (or cifs manager from the market) you can mount network directories and then access them through nautilus.
Nautilus has saved searches built in (ctrl-f), search by name works but search by filetype does not work (you can search by file name, such as mp3, but it you tell it to find all audio files it does nothing). I guess they figured they have their smartfolders for that (Phone Music, Phone Images, Phone Video). By the way if you freeze or remove webtop connector then items will no longer be added to the smartfolders.
pcmanfm (an alternative filemanager in webtop)
There is a lightweight alternative to the nautilus file manager included in webtop called pcmanfm. To launch it with the sdcard directory showing type the following:
pcmanfm --no-desktop /mnt/sdcard
if you want to launch it with root privileges in the root directory type the following
sudo pcmanfm --no-desktop /
(I know you should be using gksu instead of sudo, but this works and gksu is not included with webtop).
Some of the nice features of pcmanfm:
It can run with root privileges (see above)
It has an address bar, so you can just type in the directory you want to instead of navigating the directory tree
It has an open terminal window here function built in (tool – open terminal)
There is a bookmarks menu where you can change the directories shown in the left pannel without having to edit ~/.gtk-bookmarks
File associations
If you want a specific application to launch when you double click on an item in the file manager you can change the entries in the following files:
~/.local/share/applications/defaults.list
~/.local/share/applications/mimeapps.list
To have several “open with” options when you right click on a file you can put several entries on a line. The following is an example of an entry:
image/jpeg=gpicview.desktop;MobileView.desktop;firefox.desktop
This enrty is telling the file manager to use gpicview.desktop to open the file if you double click on a jpep and to offer the options “open with gpicview”, “open with Mobile View” and “open with firefox” if you were to right click on a jpeg file.
The file manager will use gpicview.desktop that is found in /usr/share/applications/ unless there is a gpicview.desktop file in ~/.local/share/applications/
I have attached the files that I use for
~/.local/share/applications/defaults.list
~/.local/share/applications/mimeapps.list
You will probably have to edit these file because some of the file associations I have set up launch programs in the chrooted linux environment.
Linux applications included with webtop
Functional and useful linux programs included in webtop
nautilus: file manager
pcmanfm: file manager
firefox: web browser
awn-manager: menu editor
xarchiver: file archive manager (zip/tar)
gpicview: a simple image viewer
epdfview: pdf viewer
Gnome programs - most of the gnome programs are crippled/semi-functional, but the following two seem to work well:
gnome-dictionary: online dictionary
gnome-screenshot: screenshot/capture utility
If you look at the "exec" entry in the desktop files located in /usr/share/applications you can see what other programs are included in the webtop distribution.
Swap
I am not certain if the stock atrix kernel has swap support, I am using faux123's kernel, perhaps someone could comment on if the stock kernel's swap support.
I find that I need to set up swap space if I want to use the webtop for anything more than occasional web browsing. Before I enabled swap webtop was regularly warning me that I had low memory (and you can't close the warning message, which is really annoying).
The first thing I tried was using zram for swap (fuax123's kernel supports this). I DO NOT recommend using zram for swap.
BEWARE, ZRAM CAUSES YOUR PHONE TO CRASH REGULARLY
Next I looked into setting up a swap partition; however, after a little research I found out that the complexity of setting up a swap partition is a waste of time, you can get the same performance using a swapfile. Accordng to Wikipedia (http://en.wikipedia.org/wiki/Paging#Linux):
From a software point of view with the 2.6 Linux kernel, swap files are just as fast[14][15] as swap partitions. The kernel keeps a map of where the swap file exists, and accesses the disk directly, bypassing caching and filesystem overhead.[15] Red Hat recommends using a swap partition.[16] With a swap partition one can choose where on the disk it resides and place it where the disk throughput is highest. The administrative flexibility of swap files can outweigh the other advantages of swap partitions. For example, a swap file can be placed on any drive, can be set to any desired size, and can be added or changed as needed. A swap partition, however, requires that it be set for the entire hard drive, and once the size of a swap partition is set, it can't be changed without using tools to resize the entire drive.
To create a 512MB swapfile, type the following commands in the terminal:
dd if=/dev/zero of=/sdcard-ext/.swapfile bs=1M count=512
sudo mkswap /sdcard-ext/.swapfile
This is probably bigger than I need, I don't think I have ever used more than 100MB of swap. I use a "." as the first part of the filename, this makes the file a "hidden" file in linux and therefore the file is less likely to get accidentally deleted or moved.
Next, turn on the swap:
sudo swapon /sdcard-ext/.swapfile
and make sure it is working:
free
You will want to add the following line to the file /etc/fstab:
/sdcard-ext/.swapfile swap swap defaults 0 0
and the following line to /etc/sysctl.conf
vm.swappiness=10
(you may actually want to try a value less than 10, the lower the value the less the phone will swap)
Running full debian in a chooted jail (webtopMod)
As I mentioned in the first post I use SystemR89's webtopMod to run a full debian distribution in a chooted jail (http://forum.xda-developers.com/showthread.php?t=1093790)
You can install a number of very useful and fully functional linux programs in the chrooted environment and then access them from the awn menu (or if you have the file associations set up properly in defualts.list and mimeapps.list you can launch the files by double clicking on a file in the file manager).
*IMPORTANT* Some of the commands must be executed in the chrooted environment and some must be executed in the non-chrooted environment (i.e. the normal webtop environment). The following instructions tell you which environment you need to use for each command.
Once you have webtopMod installed I would recommend that the first thing you do is open an xterm window in the chrooted environment (click on the penguin and select the proper menu item for xterm) and install synaptic in the chrooted environment:
apt-get install synaptic
You can then use synaptic to install other linux programs/packages, such as lxterminal, OpenOffice, mtpaint (gimp runs but it is really slow).
I have modified the script that SytemR89 uses to launch the chrooted environment (attached), you can replace the original script by following these steps in the non-chrooted environment:
Save the attached file,
Rename it from linux.txt to linux
Copy it to /usr/sbin
Set the permissions properly (sudo chmod +x /usr/sbin/linux)
If you want to launch a program in the chrooted environment you can do it by typing the following in the non-chrooted environment:
linux oocalc
where oocalc is the name of a program that you have installed in the chrooted environment.
A couple of final things, you may want to setup a symlink in the chrooted environment for /sdcard (and sdcard-ext). If I recall correctly, SytemR89 was just mounting /sdcard (and /sdcard-ext) in the chrooted environment and I changed the script to mount /mnt/sdcard instead (why? so that the chrooted directories would be set up the same as the non-chrooted environment). To make a symlink between /mnt/sdcard and /sdcard in the chrooted environment. First launch an xterm window for the chrooted environment, then type in the following commands:
sudo umount /sdcard
sudo umount /mnt/sdcard
sudo mkdir /sdcard
sudo mkdir /mnt/sdcard
sudo ln -s /mnt/sdcard /sdcard
sudo umount /sdcard-ext
sudo umount /mnt/sdcard-ext
sudo mkdir /sdcard-ext
sudo mkdir /mnt/sdcard-ext
sudo ln -s /mnt/sdcard-ext /sdcard-ext
You may get some errors telling you that something was not mounted or that a directory exists, just ignore the error(s).
Then reboot.
I also created a directory /usbdrive in the chroot'd linux environment and use the following command to mount a usb drive so that the chrooted environment can access it (run this command from the non-chooted environment)
sudo mount -t vfat /dev/block/sda1 /osh/opt/WebTopMOD/root/usbdrive
Many thanks for posting this, it's an excellent guide.
tamuin said:
I am not certain if the stock atrix kernel has swap support, I am using faux123's kernel, perhaps someone could comment on if the stock kernel's swap support.
I find that I need to set up swap space if I want to use the webtop for anything more than occasional web browsing. Before I enabled swap webtop was regularly warning me that I had low memory (and you can't close the warning message, which is really annoying).
The first thing I tried was using zram for swap (fuax123's kernel supports this). I DO NOT recommend using zram for swap.
BEWARE, ZRAM CAUSES YOUR PHONE TO CRASH REGULARLY
Next I looked into setting up a swap partition; however, after a little research I found out that the complexity of setting up a swap partition is a waste of time, you can get the same performance using a swapfile. Accordng to Wikipedia (http://en.wikipedia.org/wiki/Paging#Linux):
From a software point of view with the 2.6 Linux kernel, swap files are just as fast[14][15] as swap partitions. The kernel keeps a map of where the swap file exists, and accesses the disk directly, bypassing caching and filesystem overhead.[15] Red Hat recommends using a swap partition.[16] With a swap partition one can choose where on the disk it resides and place it where the disk throughput is highest. The administrative flexibility of swap files can outweigh the other advantages of swap partitions. For example, a swap file can be placed on any drive, can be set to any desired size, and can be added or changed as needed. A swap partition, however, requires that it be set for the entire hard drive, and once the size of a swap partition is set, it can't be changed without using tools to resize the entire drive.
To create a 512MB swapfile, type the following commands in the terminal:
dd if=/dev/zero of=/sdcard-ext/.swapfile bs=1M count=512
sudo mkswap /sdcard-ext/.swapfile
This is probably bigger than I need, I don't think I have ever used more than 100MB of swap. I use a "." as the first part of the filename, this makes the file a "hidden" file in linux and therefore the file is less likely to get accidentally deleted or moved.
Next, turn on the swap:
sudo swapon /sdcard-ext/.swapfile
and make sure it is working:
free
You will want to add the following line to the file /etc/fstab:
/sdcard-ext/.swapfile swap swap defaults 0 0
and the following line to /etc/sysctl.conf
vm.swappiness=10
(you may actually want to try a value less than 10, the lower the value the less the phone will swap)
Click to expand...
Click to collapse
Thanks a lot, I was just starting to configure zram right before reading your post. :good:
Please explain just two things to me:
- Did you automated this to always enable swap? If so, how (init.d scripting)? EDIT: forget about... I didn't realize what changes in /etc/fstab will do...
- You've created the swap file in the external SDCard. Isn't better to create it on EMMC? EDIT: I've created the file on EMMC cause it's much faster and seems to be Ok!!!
Regards...
I will be using this thread to post my scripts and link them to other threads as needed. For this thread, I am assuming you know what you're doing. You don't need mad hacking skills and you don't need to be an expert (I'm sure as hell not), but knowing your way around the file system and basic shell scripting are helpful.
Some background: I am using the stock ROM and kernel (SGS2 - GB27, SGS4 - MDC), so all of my tips revolve around using stock and all of my scripts (even the flashable ones) will work without flashing from recovery (just extract the script from the ZIP and execute it while the phone is in phone-mode - you know... powered on ).
You are welcome to use my scripts in your apps. I only ask that you give me some credit.
I am not responsible for bricking your phone. I have only tested my scripts on my personal Samsung Galaxy S2 and S4 from Sprint. You are welcome to try on your phone, but I offer no warranties or guarantees as to whether they will work or not. Back up your ****!
All of this requires root!
Below is a list of the scripts I have written for y'alls. Enjoy.
Custom df: Shows where irregular mounts ("mount -o bind") are mounted. [ Forum post | Download ]
Currently doesn't work on my SGS4.
Easily move Phonesky.apk and GoogleServicesFramework.apk to /system or /preload for Multi DPI Play Store. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work.
Use your SGS2's internal SD card for Link2SD instead of making a second partition on your external SD card (although, depending on the setup, you may still need to make a tiny partition on your external SD card) and your external SD card as your internal SD card [ Forum post ]
Untested on my SGS4. I have no need for it.
Clean up Link2SD: Delete files associated with Link2SD when uninstalling it. It does not revert the links Link2SD makes. It only deletes the mount scripts. [ Forum post | Download ]
If you use the debuggerd script to enable init.d, running this script will cause you to lose init.d.
Untested on my SGS4, but there's no reason to think that it won't work.
Delete Samsung's bloatware from the Sprint SGS2. [ Forum post | Download ]
Untested on my SGS4, but there's no reason to think that it won't work; however, it was written specifically for the SGS2's bloatware. See thread S4 System Apps Safe To Remove for a list of SGS4 bloatware apps.
Google Home Launcher (from Kit Kat).
Works on Jelly Bean.
Below are some other tweaks.
You can use custom boot animations with the stock ROM. All you need to do is swipe a "/system/bin/bootanimation" binary file from another ROM (such as @rujelus22's Blu Kuban FL24 (ICS) or Blu Kuban GB27 (JB 4.1.2)), paste it into "/system/bin", and make it executable.
For JB 4.2.2, make sure the user and group are root and shell respectively. This doesn't seem to be a problem with JB 4.1.2 and below. It's also possible that my initial testing involved a boot animation that didn't work on my SGS4, so if it works with root as both user and group, then roll with it. :good:
Also for JB 4.2.2, use the file from a JB 4.2.2 ROM, such as The Blu Kuban S4.
You can enable init.d scripts very easily by renaming "/system/bin/debuggerd" to "/system/bin/debuggerd.bin", replace it with the following, and make both files executable. If "/system/bin/debugger.bin" already exists, then edit "/system/xbin/busybox run-parts /system/etc/init.d" into "/system/bin/debuggerd".
As with the above, make sure the user and group are root and shell.
Code:
[color=green]#!/system/bin/sh[/color]
LOG=/data/debuggerd.log
echo "$(date)" > $LOG
echo "init.d" >> $LOG
/system/xbin/busybox run-parts /system/etc/init.d 1>>$LOG 2>>$LOG
echo "$(date) finished" >> $LOG
echo debuggerd.bin launched >> $LOG
exec /system/bin/debuggerd.bin
Below are some tips.
Most of the things you can do with a custom kernel, you can do with the stock kernel, it just requires more work and more risk.
If you replace an odexed system app with a deodexed system app, make sure you delete the app's ODEX file (it's the same file name except with the extension .odex).
Conversely: if you replace a deodexed system app with an odexed system app, you better have the ODEX file to go with it.
You can clear the dalvik-cache without a custom kernel by deleting the contents of "/data/dalvik-cache". You can even delete an individual app's dalvik-cache by finding the file "/data/dalvik-cache/[email protected]@[email protected]" or "/data/dalvik-cache/[email protected]@[email protected]" and delete it.
You can manually uninstall a system app's update by finding the file "/data/app/.apk" and delete it.
You can manually delete all user data by deleting the contents of "/data/data". You can even delete an individual app's data by finding the folder "/data/data/" and delete it.
Making scripts and binaries executable:
They must be on an EXT formatted filesystem (e.g. /data, /system, /preload).
They must be at least readable and executable by the user 'shell' (755 (read/execute for all, write only for user - "u=rwx,a=rx" if your busybox supports that method) is what I usually use).
Code:
chown root:shell ""
chmod 755 ""
chmod u=rwx,a=rx "" # busybox must support symbolic modes
Changing file permissions requires read/write access to the filesystem on which the file resides:
Code:
mount -o remount,rw /system # make the /system partition read/write
mount -o remount,ro /system # make the /system partition read only
The stock kernel is considered "production" whether or not it's rooted; therefore, you cannot use ADB to push or pull files directly to or from protected partitions, nor run ADB as root, nor use ADB's remount command, so you have to use unprotected partitions as a sort of buffer. You can, however, access the ADB shell and issue the "su" command wherein you can use "cp" to copy files to or from protected partitions prior to using ADB to push or pull the desired file. However, there is an app aptly named [root] adbd Insecure by @Chainfire that patches the ADB daemon to get around this limitation.
Example:
Code:
c:/android-sdk> adb shell
[email protected]:/ $ su
[email protected]:/ # cp /system/bin/debuggerd /sdcard/debuggerd
[COLOR="green"]-- open a new command prompt window --[/COLOR]
c:\android-sdk> adb pull /sdcard/debuggerd debuggerd
c:\android-sdk> adb push debuggerd /sdcard/debuggerd
[COLOR="green"]-- switch to the first command prompt window --[/color]
[email protected]:/ # mount -o remount,rw /system
[email protected]:/ # cp /sdcard/debuggerd /system/bin/debuggerd
[email protected]:/ # chown root:shell /system/bin/debuggerd
[email protected]:/ # chmod 755 /system/bin/debuggerd
[email protected]:/ # mount -o remount,ro /system
Some noteworthy files and folders:
/proc/self/mountinfo: If you can read it, it tells you where your partitions and folder binds are mounted.
/proc/partitions: Shows all of your SD card's partitions, how many blocks each has, and their vold numbers (eg "179 1 30578964 mmcnlk0p1").
/dev/block/platform/dw_mmc/by-name: This folder contains symlinks to your internal eMMC's partitions indexed by what they are for (eg UMS for your internal SD card - "realpath /dev/block/platform/dw_mmc/by-name/UMS" will print out the device path (ie "/dev/block/mmcblk0p11")).
/dev/block/platform/dw_mmc/by-num: This folder is like the previous except that they are indexed by partition number (eg "p11").
/proc/version: Shows what version of Linux is currently being used.
/data/system/batterystats.bin: Delete this when your battery is fully charged and still plugged in to recalibrate it.
Footnotes:
For "/data/app", "/data/data", and "/data/dalvik-cache" files you need to know the package name. There are various apps that will tell you, including Link2SD (mentioned above), Titanium Backup, and the web URL of the app in the Play Store (ex: https://play.google.com/store/apps/details?id=com.devname.appname).
More:
Random boot sound using your notification sounds
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
Stock ROM - SGS4 - init.d
No-data restore tips
SGS4 Bloatware Remover
Make apps run faster and increase battery life
Random boot sound using your notification sounds
The attached ZIP contains a script that can be run pre or post boot. It just needs to be executable.
Preboot requires init.d. See the OP for enabling it if you are on a stock rooted ROM and requires the file to be readable and executable ("chmod 755" works fine).
Postboot requires an app such as Scripter (ROM Toolbox) or Script Manager to execute the script at boot.
Requires the variable $RANDOM. You can make sure it's available from the command line ("echo $RANDOM").
Use this script at your own risk. I provide no warranties or guarantees.
What does this script do?
Check for carrier boot up sounds (sub folders in the "/system/media/audio/ui" folder) and moves them to "/system/media/audio/notifications" renaming them as needed.
Create symlinks in the above folders to "/system/media/audio/ui/PowerOn.ogg".
Check if "/system/media/audio/notifications/PowerOn.ogg" is present and copy it to "/system/media/audio/ui/PowerOn.ogg" it's not.
Count the number of files in "/system/media/audio/notifications".
Grab a random number between 1 and the number of files found inclusive (math notation: "[1, numFiles]").
Go through "/system/media/audio/notifications" and copy the file at index random to "/system/media/audio/ui/PowerOn.ogg".
Notes:
The stock file is included. If you want a different sound in its place, you can either comment out that line in the script and delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications" or just replace "/system/media/audio/notifications/PowerOn.ogg" with some other sound file and still delete the "/system/media/audio/notifications/<subfolder>_PowerOn.ogg" files from "/system/media/audio/notifications".
If you want more sounds, just copy them to "/system/media/audio/notifications" (OGG files only).
The script does not check for valid files and blindly renames the destination file to "PowerOn.ogg".
It does not look in "/sdcard/media/audio/notifications" or anywhere else for audio files.
I do not recommend using alarms or ringtones files as they are usually looped which can cause the media scanner to get stuck and overheat your phone or tablet - those files may continue to play even if you can't hear them.
If you can't hear a sound on boot, it is likely that the file is either invalid or has no audio (ex: my /system/media/audio/ui/BST/PowerOn.ogg has no audio).
It was tested and works on a Samsung Galaxy S2 (stock JB 4.1.2) and a Samsung Galaxy S4 (stock JB 4.2.2) both from Sprint and using stock kernels.
There's no obvious reason it won't work on other phones and tablets with other ROMs from other carriers.
Nice work E.
cerj said:
Nice work E.
Click to expand...
Click to collapse
:good:
Make ADB work for all users - Jelly Bean 4.2.2 (Updated 07/15/13 00:35 MST)
With Android 4.2.2, ADB now requires RSA keys. This poses a problem when attempting to connect to the device's ADB server from the device itself and the device won't ask for authorization unless it's connected via USB. Well, there's hope, yet.
For the following, I'm assuming you used my method for adding init.d support to your device.
Use these scripts at your own risk. I provide no warranties or guarantees.
Add the following script to /system/bin/debuggerd. If you use an alternate method, please note that it must be executed by the debugger daemon. You must do this first or you'll have to manually restart the debugger daemon after editing this file and executing the run-once script (next step), so edit this file first and save it.
Code:
if [ ! -e "/.android" ]; then
busybox mount -o rw,remount /
mkdir /.android
mount -o bind /data/.android /.android
busybox mount -o ro,remount /
fi
Then run this script once from the device (not over ADB on your PC).
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
HOME=/data
adb kill-server
adb start-server
stop adbd
cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys
echo "" >> /data/misc/adb/adb_keys # Add a blank line at the end of the file
start adbd
HOME=/
adb kill-server
stop debuggerd
start debuggerd
Notes:
You can also find the abdkey.pub file on your Windows' PC here, C:\Users\<user name>\.android\adbkey.pub. Copy it to your device by whatever means necessary, then append it to /data/misc/adb/adb_keys and you won't need to initially use the USB to allow the PC connection. Not really necessary unless your PC has no USB or you've broken your USB cable.
This may have inadvertently corrected the mounting issue introduced in Jelly Bean 4.2.2.
You can also allow other Android 4.2.2 devices, but it requires ADB version 1.0.31 and for you to manually append the contents of /data/.android/adbkey.pub from device A (the one you want to use to ADB on) to /data/misc/adb/adb_keys on device B (the target device).
Don't delete /data/.android
This won't fix apps. Just allow you to use ADB to connect to your device from itself.
Tested on my SGS4. No reason it won't work on other devices.
If you already have a /data/.android directory, you may not need to do this. On my SGS4, HOME defaults to "/" which the ADB daemon can't write to, so it can't make the RSA key.
The run-once script temporarily changes HOME to "/data", a writable directory, so the ADB daemon can write the RSA key then it append it to the allowed clients file then restarts the debugger daemon thus binding /data/.android to the /.android directory allowing all Linux users ADB access to the device.
Reassigning HOME to a new value on one user only changes its value for that user which is why I'm binding /data/.android to /.android.
Code:
# Example
[email protected]:/ $ echo $HOME
/
[email protected]:/ $ HOME=/data
[email protected]:/ $ echo $HOME
/data
[email protected]:/ $ su 1000
[email protected]:/ $ echo $HOME
/
Alternatively (much easier):
Make the .android folder in /data (mkdir /data/.android).
Add the script, the first code block in this post, to your debuggerd file or an init.d script.
Restart the debugger (stop debuggerd; start debuggerd) or reboot the phone.
Restart ADB (stop adbd; start adbd).
Copy the newly created public key to the allowed clients (cat /data/.android/adbkey.pub >> /data/misc/adb/adb_keys; echo "" >> /data/misc/adb/adb_keys).
Restart the ADB server (adb kill-server; adb start-server).
SGS4 Bloatware Remover
I have written a live-script to delete all of the SGS4 bloatware except GoogleContactsSycAdapter and SecLauncher3. If you want to delete those, remove the "#" from that line in the script. If you want to exclude an app, add a "#" to that line and put the app name in quotes (ie AppName / becomes "#AppName" / (including the forward slash) or just remove that line. If you remove the last item (YouTube in this case), remove the forward slash from the previous line.
Use this scripts at your own risk. I provide no warranties or guarantees.
What this script does:
Move the app's APK and ODEX to /sdcard/SystemAppsBackup.
Delete its dalvik-cache.
Reboot the phone. If it doesn't reboot, you'll have to do this yourself.
What this script does not do:
Delete the app's data. Because the script doesn't know the package name.
Delete its Play Store update (located in /data/app). Because the script doesn't know the package name.
Mount the SD card if it's not mounted. If you want backups, make sure the SD card is mounted.
Care if you delete a system app you wanted to keep. Most apps that you would want to keep may be available in the Play Store.
Restore apps.
Notes:
Apps will crash left and right when you execute this script in running mode. Don't fret, this is normal.
This is a live-script which means you have to manually execute the script either with a terminal emulator, a script executor like Scripter, or ADB.
This is not flashable.
If executing via ADB in Recovery mode, you may need to mount the SD card to /storage/sdcard0 manually or settle for no backups.
If you restore an app from /sdcard/SystemAppsBackup, make sure you get the ODEX file if present and set the permissions for both to 644.
This list is based off the list in the thread, S4 System Apps Safe To Remove.
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
bigtobitobs said:
Here You Go Guys, I took me about 30 mins, but I have successfully added all the app in the Op to a flashable Zip.
The Zip is base of TrulyClean v1.6 script code, I just deleted his ;delete/system/...apk and replaced it with all the ones from the OP
Click to expand...
Click to collapse
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
egingell said:
Looks like you're deleting bloatware, perhaps you should post that in the right thread... or at least a more appropriate thread.
Sent from my SGS4.
Click to expand...
Click to collapse
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
bigtobitobs said:
LOL OMG I am so sorry, I had multiple tabs open and put this in the wrong forum. Please Delete
Click to expand...
Click to collapse
Would that I could.
Sent from my SGS4.
Make apps run faster and increase battery life using Xposed App Settings.
Did you install GravityBox on your SGS4 then uninstall it and now you can't hear your games or music?
I think it has to do with GravityBox's "Volume Steps" option not undoing when GB is uninstalled. This is how I fixed it (forum post).
Stock ROM - SGS4 - init.d
I recently found out that my debuggerd hack to enable init.d support on my stock SGS4 wasn't working. So, I did this and now it works.
Make a file named "install-recovery.sh" and drop it into /system/etc. Whatever script you put in here will execute at boot up so long as the user/permissions are correct.
Code:
chown shell:shell "/system/etc/install-recovery.sh"
chmod 755 "/system/etc/install-recovery.sh"
chmod u=rwx,a=rx "/system/etc/install-recovery.sh" # busybox must support symbolic modes
Use this script at your own risk. I provide no warranties or guarantees.
My "/system/etc/install-recovery.sh" script:
Code:
[COLOR="Green"]#!/system/bin/sh[/COLOR]
LOG="/data/install-recovery.log";
echo "Executing install-recovery.sh" > $LOG;
echo "" >> $LOG;
echo "$(date) install-recovery hack..." > $LOG
echo "" >> $LOG
echo "init.d" >> $LOG
[COLOR="green"]# I can't get run-parts to work for some reason, but this will run every *.sh script in /system/etc/init.d as root.[/COLOR]
for N in /system/etc/init.d/*.sh; do
su -c "$N" 1>>$LOG 2>>$LOG
done;
Notes:
Mount binding (in JB 4.2.2+) seems to work. E.g. mount -o bind /folder1 /folder2
$(date) does not provide the correct date (mine said: "Wed Apr 15 13:24:13 MST 1970").
The Package Manager is not available. (There may be other unavailabilities, but I don't intend to test it thoroughly.)
Somethings I discovered recently while doing a no-data system restore for the second time in the same night and some tips relating to system restores:
* When doing a no-data restore, disabled/frozen system apps remain disabled.
* Apps that can't be disabled even with Titanium Backup will not remain disabled after a reboot and will sometimes crash/FC repeatedly until uninstalled.
* If an app won't open or FCs, try converting it to a system app and back to user app or vice versa.
* Don't integrate system app updates into the ROM. In the event that you have to do a no-data restore, those updates will be retained.
* Don't convert user apps to system apps for the same reason.
* Disregard the previous two tips if disk space is a problem. It's just more time consuming (redownloading updates, reintegrating, and reinstalling) after a restore.
* Save all modified system files, such as /system/bin/debuggerd, /system/build.prop, /system/etc/install-recovery.sh, and if your ROM uses /system/etc/unit.d, any modified or extra files there. If you use them, you'll need them after a restore.
* For a smoother post no-data restore, use Titanium Backup's labels so you can batch-uninstall those pesky system apps you don't want.
SGS2 - JB 4.1.2 GB27
SGS4 - JB 4.2.2 MF9
any command for updater script to make directory in root of android ??
HassanMirza01 said:
any command for updater script to make directory in root of android ??
Click to expand...
Click to collapse
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
egingell said:
Creating directories in / and all the files contained therein must be redone on every boot. That said, you just need to make root writable and make the directory.
mount -o remount,rw /
mkdir /whatever
mount -o remount,ro /
Note: Every time you wish to create, modify, or delete files you'll have to make root writable.
Sent from my LG-H811 using Tapatalk
Click to expand...
Click to collapse
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
HassanMirza01 said:
Actually.... I wanna add some files within folder in root of android root... So i need to use above three commands nd then after making directory, i should extract files to that folder ??
Click to expand...
Click to collapse
Yes.
Sent from my LG-H811 using Tapatalk
:good:
DEODEXED APPS
Here is the stock app and framework files from new firmware I8200NXXUAOA1 for Samsung Galaxy VE (I8200N).It have all apps so and the bloatware.After install you can delete any bloatware you want.Maybe it is safe for all versions!!!
What is Odex and Deodex ROM
What is an ODEX file?
In Android file system, applications come in packages with the extension .apk.
These application packages, or APKs contain certain .odex files whose supposed function is to save space.
These ‘odex’ files are actually collections of parts of an application that are optimized before booting.
Doing so speeds up the boot process, as it preloads part of an application.
On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
What is an DEODEX file?
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files.
By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
So, Deodexed ROMs (or APKs) have all their application packages put back together in one place,
allowing for easy modification such as theming. Since no pieces of code are coming from any external location,
custom ROMs or APKs are always deodexed to ensure integrity.
all apps are full working and not yet any bugs
Code:
[COLOR="red"][B][U]* I can give ABSOLUTLEY no gurantee!!
All you do with your phone will be on your own.
I'm not responsible if your phone will brick or whatever...[/U][/B][/COLOR]
Code:
[B][COLOR="Red"]Rrequirements :[/COLOR][/B]
[B]Root [URL="http://forum.xda-developers.com/galaxy-s3-mini/general/s-iii-mini-ve-i8200-n-t2826565"]Hot To Root[/URL]
Adb [URL="http://forum.xda-developers.com/showthread.php?t=2588979"]How to Install[/URL]
Phone drivers[/B]
How To Install :
1. download the zip file
2. extract it
3. connect your phone
4. usb debugging on
3. paste the app and framework file into
GT-I8200N\Card folder which you find it on your computer
4 .install adb drivers
5. open cmd and type
Code:
adb shell
[COLOR="red"][I][SIZE="3"](if you are using adb shell in su for the first time,
keep phone screen on.
After entering "su" code, super user request prompt in phone.
Press allow )[/SIZE][/I][/COLOR]
su
stop
mount -o rw,remount /system/ /system/
cp /storage/extSdCard/app/* /system/app/ (wait...)
rm /system/app/*.odex (wait...)
cp /storage/extSdCard/framework/* /system/framework/ (wait...)
rm /system/framework/*.odex (wait...)
mount -o ro,remount /system/ /system/
reboot
How To check if you done
1. open cmd and type
Code:
adb shell
su
cd /system/app
or
cd /system/framework
ls
2. now you see all your system apps.if doesnt exist .odex file and you dont have any errors or bugs your ok
DOWNLOAD:
the file
credits:
@Snoop05 for adb installer
@j.posarekar70 for deodex guide
This work for the version i8200L?
Nice all ok
Test done
SAMSUNG
GALAXY S3 MINI
GT-I8200N
Willian182 said:
This work for the version i8200L?
Click to expand...
Click to collapse
try it i dont know.take a backup first.maybe you have error with nfc you can delete the apk .try it and tell me please
..................
Como lo descargo soy nuevo en esto.
Sent from my GT-I8200N using XDA Free mobile app
Thanks for this apps pack! It saves my phone. Best regards.
download link
download link is broken
Is it possible to unroot the deodexed stock rom?
I got some Apps which refuse to work if they detect a rooted phone...