android add new files and ringtones

Fun things for Huawei ideos.

 vi  /etc/udev/rules.d/99-android.rules
#Huawei
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"



chmod a+r /etc/udev/rules.d/99-android.rules



service udev restart
adb kill-server


adb start-server  

username@host:~ > adb devices                                                                                                              
List of devices attached                                                                                                                    
5C4CA9XXXXX    device                                                                                                                      

adb -s  5C4CA9XXXXX shell
$
$ su


Now allow permissions in the device for superuser
(the prompt changes)
#  
# mount                                                                                                                                    
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0              
sysfs /sys sysfs rw,relatime 0 0         
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0 
/dev/block/mtdblock4 /system yaffs2 ro,relatime 0 0    
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev,relatime 0 0                                                
/dev/block/mtdblock7 /cust yaffs2 ro,relatime 0 0                                                              
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev,relatime 0 0                                                
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0               
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0                                                              
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0                                        
                 

# mount -o remount,rw /dev/block/mtdblock7 /cust

# cd /mnt/sdcard/ogg
#pwd
/mnt/sdcard/ogg                                                                                                                            

# cat /mnt/sdcard/ogg/wallpaper2.jpg > wallpaper2.jpg

# cd ..
# cd media
# ls                                                     

audio                                                                                                                                      
bootanimation.zip                                                                                                                          
# cd audio
# ls                                                                                                           
ui                                                                                                                                         
notifications                                                                                                                              
alarms                                                                                                                                     
ringtones                                                                                                                                  
# cd ringtones                                                     

# cat /mnt/sdcard/ogg/marketplace-loud.ogg > marketplace-loud.ogg
# mount -o remount,ro /dev/block/mtdblock7 /cust                                                                                           
# mount                                                                                                                                    
rootfs / rootfs ro,relatime 0 0                           
tmpfs /dev tmpfs rw,relatime,mode=755 0 0 
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/mtdblock4 /system yaffs2 ro,relatime 0 0
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/mtdblock7 /cust yaffs2 ro,relatime 0 0       
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev,relatime 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0   
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0         


Power off and power on.



#  pm path com.huawei.SimpleLink
# pm disable  com.twitter.android
Package com.twitter.android new state: disabled

#  pm path com.huawei.SimpleLink
package:/data/cust/app/SimpleLink.apk

# ls /data/cust/app/

UpdataOnline.apk.bak                                                                                                 
SimpleLink.apk                                    
FMRadio.apk                                                                                                          
NotePad.apk

# pm disable   com.huawei.SimpleLink                                                                                 
Package com.huawei.SimpleLink new state: disabled                                                                    

http://wiki.cyanogenmod.com/wiki/Barebones
  • Manual backup with adb pull /system/app/ ~/Desktop/app/

How to find applications

To find what apps are installed on the device, you will need to run the following, either in adb shell, or the device's term:
ls /system/app or ls /data/app
You can also list installed packages using the package manager, either in Terminal Emulator or via adb shell:
pm list packages
To see a list of installed packages along with their associated files:
pm list packages -f
At a lower level, you can pull the packages.xml and the packages.list files using adb and examine them directly to determine what is installed and what the related .apk file is called and where it is stored. packages.xml will show you the package name and the .apk file installation path and name. In packages.list you can look up the package name and locate the data path. Both of these files will tell you a great deal more, these are the things that pertain to the present article.
adb pull /data/system/packages.xml
adb pull /data/system/packages.list
Generally, any apps you install from the market or otherwise manually install will be in /data/app, while any apps that come pre-installed will be in /system/app.

How to remove applications

Remember to watch the case of all files, directories, apk names, and package names!
Case matters. Example.apk and example.apk are two different things.

ADB

/system apps /data apps
adb remount
adb shell rm -f /system/app/.apk
adb uninstall

Term (on device)

/system apps /data apps
su
mount -o rw,remount /system
rm -f /system/app/.apk
su
mount -o rw,remount /data
rm -f /data/app/.apk
pm uninstall


How to ADD applications

Become root first.
# cd /mnt                                                                                                                    
# cd sdcard                                                                                                                  
# cd Apps  
 this folder contains all the new apks that you want.


# pm install org.openintents.filemanager_20.apk                                                                             
        pkg: org.openintents.filemanager_20.apk                 
Success                                                                                                                      
# pm   path org.openintents.filemanager                                               
package:/data/app/org.openintents.filemanager-1.apk            
# ls /data/app                                                                                                               
org.openintents.filemanager-1.apk                                    

       The above installs to /data/app. Upon a reset of device everything is lost!
                
mount /cust  as rw. Now cd to the app folder. Yes /data and /cust are inside one another.
cat net.osmand_49.apk > /data/cust/app/net.osmand_49.apk                                                                                            
This must survive a reset of android phone.
                                                                                                       
These two apps are installed by Aircel for update and pocketapps.in. Remove this for better performance.          
UpdataOnline.apk.bak   SimpleLink.bak


 Change the default language and browser settings:


# pwd
/cust/aircel/in/xml
# cat hw_defaults.xml




    en_GB,es_ES,es_US,hu_HU,sk_SK,sv_SE,nb_NO,da_DK,de_DE,cs_CZ,pl_PL,ro_RO,el_GR,sr_RS,bg_BG,fi_FI,lt_LT,fr_FR,id_ID,pt_PT,pt_BR,ja_JP,ko_KR,it_IT,ru_RU,zh_TW,zh_CN"/>

# cat browser_config.xml

   
   

   
   
   
   
   
   
   


Customise boot animation



# cd /cust/aircel/in/media
# ls
audio
bootanimation.zip
# cp bootanimation.zip /mnt/sdcard/               
unzip bootanimation.zip
Archive:  bootanimation.zip
 extracting: part1/IN_240X320_81.png 
 extracting: desc.txt               
 extracting: part0/IN_240X320_01.png  and many more files.
Copy it back to /cust/aircel/in/media folder