Motorola CHARM flac support - Android Software/Hacking General [Developers Only]

Hi.
Im added FLAC support for Motorola Charm T-Mobile.
This is modified framework.jar via smali\backsmali
Flac *.so files here
put framework jar and *.so in /sdcard/flac/
than copy script
Code:
#!/system/bin/sh
mount -o remount,rw /dev/mtd/mtdblock7 /system
echo "remounting done"
cp -f /sdcard/flac/framework.jar /system/framework
cp -f /sdcard/flac/libFLAC.so /system/lib
cp -f /sdcard/flac/libmediaplayerservice.so /system/lib
cp -f /sdcard/flac/libopencore_player.so /system/lib
echo "files was copied"
chmod 644 /system/framework/framework.jar
chmod 644 /system/lib/libFLAC.so
chmod 644 /system/lib/libmediaplayerservice.so
chmod 644 /system/lib/libopencore_player.so
echo "remounting RO"
mount -o remount,ro /dev/mtd/mtdblock7 /system
in /sdcard/
execute it
chmod 777 script.sh
sh script.sh
reboot your phone
play flac
Dont forget backup own framework.jar and other files.
Admin, plz, add forum for MOTOROLA CHARM

Links are dead.
Can you please upload these files again?

Related

T989 Users Need YOU! for a system dump.

Perform a system dump and share the ICS love.
1 root your phone [guide in dev section]
2 install busybox [app on market to do it for you]
3 enter these commands from terminal
Code:
su
cd /sdcard
mount -o rw,remount -t ext4 /dev/block/mmcblk1p21 /system
chmod 777 /system/xbin/busybox
/system/xbin/busybox tar czvf dump.tar /system
I will donate 9 dollars to first person posting a working dump
Can't wait, come on some kind skyrocket soul share the wealth to our beloved t989.
Sent from my SGH-T989 using Tapatalk
Yes please! This would be very helpful!
About to start the dump, hold on guys.
Unable to chmod /system/xbin/busybox: No such file or directory
10|[email protected]:/sdcard # chmod 777 /system/xbin/busybox
thats what im getting with the commands
cdshepherd said:
Unable to chmod /system/xbin/busybox: No such file or directory
10|[email protected]:/sdcard # chmod 777 /system/xbin/busybox
thats what im getting with the commands
Click to expand...
Click to collapse
is busybox installed?
try
chmod 777 /system/bin/busybox
starskyrob said:
is busybox installed?
try
chmod 777 /system/bin/busybox
Click to expand...
Click to collapse
[email protected]:/sdcard # chmod 777 /system/xbin/busybox
Unable to chmod /system/xbin/busybox: Read-only file system
thats with busy box installed
cdshepherd said:
[email protected]:/sdcard # chmod 777 /system/xbin/busybox
Unable to chmod /system/xbin/busybox: Read-only file system
thats with busy box installed
Click to expand...
Click to collapse
ok so before you chmod,
type this
mount -o rw,remount -t ext4 /dev/block/mmcblk1p21 /system
and btw, thank you. so so much
starskyrob said:
ok so before you chmod,
type this
mount -o rw,remount -t ext4 /dev/block/mmcblk1p21 /system
and btw, thank you. so so much
Click to expand...
Click to collapse
I'm doing the same thing, so whoever dumps first dumps first.
starskyrob said:
is busybox installed?
try
chmod 777 /system/bin/busybox
Click to expand...
Click to collapse
wouldnt he need su to be able to chmod a system file?
starskyrob said:
ok so before you chmod,
type this
mount -o rw,remount -t ext4 /dev/block/mmcblk1p21 /system
and btw, thank you. so so much
Click to expand...
Click to collapse
your welcome.
1|[email protected]:/mnt/sdcard # /system/bin/busybox tar czvf dump.tar /system
sh: /system/bin/busybox: not found
127|[email protected]:/mnt/sdcard #
strange
I can get past everything, but when I type the command to start the dump, this happens.
/system/xbin/busybox tar czvf dump.tar /system
tar: invalid option -- z
Longcat14 said:
I can get past everything, but when I type the command to start the dump, this happens.
/system/xbin/busybox tar czvf dump.tar /system
tar: invalid option -- z
Click to expand...
Click to collapse
same here
127|[email protected]:/sdcard # /system/xbin/busybox tar czvf dump.tar /system
tar: invalid option -- z
BusyBox v1.19.4-Stericson (2012-02-20 19:30:32 CST) multi-call binary.
Usage: tar -[cxtZhmvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]...

[Q] Can any one help me ! about deodex and use adb shell ..

I used the xUltimate-v2.3.3 to make deodex.
Then it comes to two folders "done_app" & "done_frame"
I copy the two folders into my sdcard, and I want to use adb shell to push & replace
files to system/app /frams
down are my situation.
===========================
C:\android-sdk-windows\tools>adb shell
[email protected]:/$ su
su
[email protected]:/# stop
.................................then it stop...I can't do anything
===========================
down are the sample code from internet
============================
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
reboot
=====================================
Can you help me ?
I did wrong on what step....
My OS system is windows7 x64 in command line.
dickluo said:
i used the xultimate-v2.3.3 to make deodex.
Then it comes to two folders "done_app" & "done_frame"
i copy the two folders into my sdcard, and i want to use adb shell to push & replace
files to system/app /frams
down are my situation.
===========================
c:\android-sdk-windows\tools>adb shell
[email protected]:/$ su
su
[email protected]:/# stop
.................................then it stop...i can't do anything
===========================
down are the sample code from internet
============================
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
reboot
=====================================
can you help me ?
I did wrong on what step....
My os system is windows7 x64 in command line.
Click to expand...
Click to collapse
記得右鍵點擊cmd圖標,選擇 以管理員身份運行。 看看你是不是忘記了這一步~
No use about that.
Maybe I'll try it on winxp system.
Sent from my ME865 using xda premium

[Q] how to cook room or delete folder ADB?

I have just cooked my rom( update.zip) and successful installation. But when I restart my mobile, I can't find my settings in bootanimation.zip, Build.prop...
I open Root Explorer and find folder ADB. This Folder has: adb.sh, bootanimation.zip, Build.prop… I can delete this folder but when I restart my mobile, I see it again.
I open file: adb.sh. It has content:
mount -o rw,remount -t ext4 /dev/block/mmcblk0p6 /system
mount -o rw,remount -t ext4 /dev/block/mmcblk0p3 /data
mkdir /data/app
cat /adb/gotiengviet3.apk>/data/app/gotiengviet3.apk
chmod 0644 /data/app/gotiengviet3.apk
mkdir /system
cat /adb/build.prop>/system/build.prop
chmod 0644 /system/build.prop
mkdir /system/media
cat /adb/bootanimation.zip>/system/media/bootanimation.zip
chmod 0644 /system/media/bootanimation.zip
mkdir /system/etc/permissions
cat /adb/com.google.android.features.vendor.xml>/system/etc/permissions/com.google.android.features.vendor.xml
chmod 0644 /system/etc/permissions/com.google.android.features.vendor.xml
rm /adb/gotiengviet3.apk
rm /adb/build.prop
rm /adb/bootanimation.zip
rm /adb/com.google.android.features.vendor.xml
how to cook room or delete folder ADB?

[SCRIPT / TOOL] zro's ultimate permission fixer script v1.0

Do I need to explain what a permission fixer script is supposed to do?
It fixes all the permissions (currently only for /system) and removes some knox bloatware folders along the way.
Root and busybox is required.
---
NOTE: This is the first step for a "rom installer script".
Please let me know if you find any errors or want any folders added to the additional permission fixes.
Or if you know any enhancements too off course.
There might be some redundancy within the script, but I wanted to better be safe
---.
So here it goes (download attached below):
Copy it to wherever you like and make it runnable (chmod 755) to execute.
I just copied it to my /system/xbin folder so I just have to type "fix_permissions.sh" when I want to fix em.
(could even get rid of the ".sh" to get the fix_permission command back kind of)
Code:
#!/system/bin/sh
echo
echo zro\'s ultimate permission fixer script v1.0
echo ============================================
echo
echo Step 1: Mounting /system writable
echo ---------------------------------
mount -o rw,remount /system
# >>> STOCK PERMISSIONS >>>
echo
echo Step 2: Fixing stock permissions
echo --------------------------------
# /system
echo fixing permissions for /system
busybox chown 0.0 /system
busybox chown 0.0 /system/*
busybox chown 0.2000 /system/bin
busybox chown 0.2000 /system/vendor
busybox chown 0.2000 /system/xbin
busybox chmod 755 /system/*
find /system -type f -maxdepth 1 -exec busybox chmod 644 {} \;
# /system/app
echo fixing permissions for /system/app
busybox chown 0.0 /system/app/*
busybox chmod 644 /system/app/*
# /system/cameradata
echo fixing permissions for /system/cameradata
busybox chown -R 0.0 /system/cameradata
find /system/cameradata \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# /system/bin
echo fixing permissions for /system/bin
busybox chmod 755 /system/bin/*
busybox chown 0.2000 /system/bin/*
busybox chown -h 0.2000 /system/bin/*
busybox chown 0.0 /system/bin/log /system/bin/ping /system/bin/sysinit
busybox chmod 777 /system/bin/log
busybox chown 0.3003 /system/bin/netcfg
busybox chmod 2750 /system/bin/netcfg
busybox chmod 750 /system/bin/run-as
busybox chown 0.0 /system/bin/su
busybox chmod 6755 /system/bin/su
busybox chown 0.0 /system/bin/daemonsu
busybox chmod 6755 /system/bin/daemonsu
# /system/containers - Knox Bloatware (will be removed)
echo fixing permissions for /system/containers - Knox Bloatware - will be removed
rm -r /system/containers
# /system/csc
echo fixing permissions for /system/csc
busybox chown -R 0.0 /system/csc
find /system/csc \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# /system/etc
echo fixing permissions for /system/etc
busybox chown -R 0.0 /system/etc
find /system/etc \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
busybox chown 0.2000 /system/etc/init.goldfish.sh
busybox chmod 550 /system/etc/init.goldfish.sh
busybox chmod 664 /system/etc/boot_fixup
busybox chown 1014.2000 /system/etc/dhcpcd/dhcpcd-run-hooks
busybox chmod 550 /system/etc/dhcpcd/dhcpcd-run-hooks
busybox chmod 755 /system/etc/init.d/*
busybox chmod 6755 /system/etc/install-recovery.sh
# /system/finder_cp
echo fixing permissions for /system/finder_cp
busybox chown 0.0 /system/finder_cp/*
busybox chmod 644 /system/finder_cp/*
# /system/fonts
echo fixing permissions for /system/fonts
busybox chown 0.0 /system/fonts/*
busybox chmod 644 /system/fonts/*
# /system/framework
echo fixing permissions for /system/framework
busybox chown 0.0 /system/framework/*
busybox chmod 644 /system/framework/*
# /system/lib
echo fixing permissions for /system/lib
busybox chown -R 0:0 /system/lib
find /system/lib \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# /system/media
echo fixing permissions for /system/media
busybox chown -R 0:0 /system/media
find /system/media \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# /system/preloadedkiosk - Bloatware (will be removed)
echo fixing permissions for /system/preloadedkiosk - Bloatware - will be removed
rm -r /system/preloadedkiosk
# /system/preloadedsso - Knox Bloatware (will be removed)
echo fixing permissions for /system/preloadedsso - Knox Bloatware - will be removed
rm -r /system/preloadedsso
# /system/sipdb
echo fixing permissions for /system/sipdb
busybox chown 0.0 /system/sipdb/*
busybox chmod 655 /system/sipdb/*
# /system/tts
echo fixing permissions for /system/tts
busybox chown -R 0:0 /system/tts
find /system/tts \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# /system/usr
echo fixing permissions for /system/usr
busybox chown -R 0:0 /system/usr
find /system/usr \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# /system/vendor
echo fixing permissions for /system/vendor
find /system/vendor \( -type d -exec busybox chown 0.2000 {} + \) -o \( -type f -exec busybox chown 0.0 {} + \)
find /system/vendor \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# /system/voicebargeindata
echo fixing permissions for /system/voicebargeindata
busybox chown -R 0:0 /system/voicebargeindata
find /system/voicebargeindata \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# /system/vold
echo fixing permissions for /system/vold
busybox chown 0.0 /system/vold/*
busybox chmod 644 /system/vold/*
# /system/wakeupdata
echo fixing permissions for /system/wakeupdata
busybox chown -R 0:0 /system/wakeupdata
find /system/wakeupdata \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# /system/wallpaper
echo fixing permissions for /system/wallpaper
busybox chown 0.0 /system/wallpaper/*
busybox chmod 644 /system/wallpaper/*
# /system/xbin
echo fixing permissions for /system/xbin
busybox chmod 755 /system/xbin/*
busybox chown 0.2000 /system/xbin/*
busybox chown -h 0.2000 /system/xbin/*
busybox chown 0.0 /system/xbin/su
busybox chmod 6755 /system/xbin/su
busybox chown 0.0 /system/xbin/daemonsu
busybox chmod 6755 /system/xbin/daemonsu
# <<< STOCK PERMISSIONS END <<<
# ==============================
# >>> ADDITIONAL PERMISSIONS >>>
echo
echo Step 3: Fixing additional permissions
echo -------------------------------------
# /system/photoreader
echo fixing permissions for /system/photoreader
busybox chown -R 0.2000 /system/photoreader/*
find /system/photoreader/ \( -type d -exec busybox chmod 755 {} + \) -o \( -type f -exec busybox chmod 644 {} + \)
# <<< ADDITIONAL PERMISSIONS END <<<
RESERVED
zroice said:
RESERVED
Click to expand...
Click to collapse
Thanks for this, just what is was needing on my N3...
The thing is, I cannot boot the system... can you help me to run it on CWM recovery? Maybe converting it into a 'flashable script'?
this stuff is old - the kn0x0ut toolbox includes the current version of the fix permission script.
This should also work over adb on recovery. But you need some adb skills.
zroice said:
...
There might be some redundancy within the script, but I wanted to better be safe
...
Click to expand...
Click to collapse
I wonder if (for max safety) you might need to add selinux refresh stuff in some places?

Randomise Bootanimation with init.d script

Below is the script to randomise bootanimations on every boot with a shell script...
Bash:
#!/system/bin/sh
mount -o remount,rw /system
min=1
max=5
number=0
while [ "$number" -lt $min ]
do
number=$RANDOM
let "number %= $max"
done
cd /system/media
mv bootanimation.zip bootanimation.temp
mv bootanimation${number}.zip bootanimation.zip
mv bootanimation.temp bootanimation${number}.zip
chmod 644 bootanimation.zip
mount -o remount,ro /system
for this you need to place 4 bootanimations with names
bootanimation1.zip
bootanimation2.zip
bootanimation3.zip
bootanimation4.zip
in /system/media
You can also do this by using ROM Toolbox...
For now you have 5 bootanimation...
If you want more then place extra bootanimation.zip's then change max according to your preference and those file names in the format bootanimation{max-1}.zip as last bootanimation...
HemanthJabalpuri said:
Below is the script to randomise bootanimations on every boot with a shell script...
Code:
#!/system/bin/sh
mount -o remount,rw /system
min=1
max=5
number=0
while [ "$number" -lt $min ]
do
number=$RANDOM
let "number %= $max"
done
cd /system/media
mv bootanimation.zip bootanimation.temp
mv bootanimation${number}.zip bootanimation.zip
mv bootanimation.temp bootanimation${number}.zip
chmod 644 bootanimation.zip
mount -o remount,ro /system
for this you need to place 4 bootanimations with names
bootanimation1.zip
bootanimation2.zip
bootanimation3.zip
bootanimation4.zip
in /system/media
You can also do this by using ROM Toolbox...
For now you have 5 bootanimation...
If you want more then place extra bootanimation.zip's then change max according to your preference and those file names in the format bootanimation{max-1}.zip as last bootanimation...
Click to expand...
Click to collapse
This don't work, neither for rom toolbox. At least for LG V20

Categories

Resources