Related
Hi guys,
Since there seems to be some demand for this kind of thing, I decided to post instructions on a mod I made a while back. This gives you the option of choosing between Samsung's GlassLock (i.e. the default TW lockscreen) or the stock keyguard of Android 2.1.
The method involves de- and re-compiling /system/framework/android.policy.odex, and you should have some basic knowledge of the tools involved (i'm not gonna spell out every step). Before beginning, take a backup of android.policy.jar and android.policy.odex (or preferably the whole framework folder). You should issue the commands in recovery mode.
Required tools: rooted SGS (I've done this only with JM2, and the code *might* need modifying for other roms, though I doubt it), adb, smali/baksmali, dexopt-wrapper, text & hex editor, winrar (or any jar editor).
Here we go:
1. Use adb to pull out /system/framework/android.policy.odex and other framework .odexes (required for de-odexing). Might be wise to backup the whole /system/framework/ directory at this point.
2. Use baksmali to deodex the file (java -jar baksmali.jar -x android.policy.odex -o android.policy). Baksmali will let you know if you are missing any of the framework .odexes.
3. Open LockPatternKeyguardView.smali and find the method getLockScreenMode()Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
4. Replace the contents of this method with the attached file getLockScreenMode.txt.
5. Save LockPatternKeyguardView.smali.
6. Use smali to compile the files back to classes.dex (java -jar smali.jar android.policy -o classes.dex)
7. Pull /system/framework/android.policy.jar, add the newly created classes.dex to it, and push it back to the device.
8. On your phone, do:
# cd /system/framework
# dexopt-wrapper android.policy.jar patched.odex /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
Ouput should be:
--- BEGIN 'android.policy.jar' (bootstrap=0) ---
--- would reduce privs here
--- waiting for verify+opt, pid=3105
--- END 'android.policy.jar' (success) ---
9. You now have odexed the file into patched.odex. However, the signature of the file is not compatible with the other framework files, so you need to fix it. I think the proper way should be to re-odex all the framework files, but I haven't encountered any issues with just patching the signature.
10. Open the original android.policy.odex in a hex editor, and copy signature bytes from offsets 0x34-0x47 to the new patched.odex, and save it. Optionally, you can also do this on your device by issuing the command:
# dd if=original.android.policy.odex of=patched.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
Where if="..." is the original file, and of="..." is the file you want to patch.
11. Push the patched and hex-edited file to /system/framework/android.policy.odex and restore the original /system/framework/android.policy.jar.
12. Reboot and enjoy your good ol' keyguard
Some notes:
- If you want to revert back to Samsung's lock screen, just create a file called /data/local/enable_glass_lock ("adb touch /data/local/enable_glass_lock").
- By default, the menu button will also unlock the screen. To disable this behavior, you have to modify /res/values-hdpi-v4/bools.xml in /system/framework/framework-res.apk, and change the value of <bool name="config_disableMenuKeyInLockScreen">false</bool> to true. Can also be done by modifying code.
On a side note, the code for Smart Unlock (present in some Samsung phones) seems to be in there... it would be an interesting project to get that working
Great stuff, i've been waiting for someone to find out how to get rid of the glass screeen since first day.
Sadly i'm a real noob so it is useless for me.
Maybe someone can create an apk or a win program out of this.
thank you !
but could you explain it better ?
toca79 said:
Maybe someone can create an apk or a win program out of this.
Click to expand...
Click to collapse
+1 for an automated solution, provided method seems too hard for me.
Excellent post Ateisti! We need more of these advanced mods for SGS.
Ateisti said:
adb, smali/baksmali, dexopt-wrapper,
Click to expand...
Click to collapse
Could you provide links to this?
Or are those sw included in the Android SDK?
I want to do 6-step but I see:
Code:
C:\Users\Konrad>"C:\Program Files (x86)\Java\jre6\bin\java.exe" -jar "C
:\Users\Konrad\Desktop\smali.jar" android.policy -o classes.dex
android.policy\com\android\internal\policy\impl\LockPatternKeyguardView$LockScre
enMode.smali[0,-1] The file must contain a .class directive
What's wrong?
EDIT:
I've changed a wrong smali.
In step 10, how do i copy the signature bytes with my hex editor? I dont understand what offsets 0x34-0x57 is...
10. Open the original android.policy.odex and copy signature bytes from offsets 0x34-0x47 to the new patched.odex, and save it.
Click to expand...
Click to collapse
Can anyone who successfully coped with getting this done following the instructions above please do a video showing us how to do it, I think that might help us a lot... thanks a lot on behalf of us noobs
Stefanauss said:
Could you provide links to this?
Or are those sw included in the Android SDK?
Click to expand...
Click to collapse
ADB is included in the SDK, Smali and Baksmali can be downloaded here and dexopt-wrapper for example here.
qwas00 said:
In step 10, how do i copy the signature bytes with my hex editor? I dont understand what offsets 0x34-0x57 is...
Click to expand...
Click to collapse
It means to seek to the 52nd byte (or 0x34 in hex) of the file, and then copy and replace the following 20 bytes to the second file. But you can also do it on the device by issuing this command (I think busybox is required):
dd if=original.android.policy.odex of=patched.android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
...where "if=..." is the original file and "of=..." is the file you want to patch.
Ateisti said:
Hi guys,
Since there seems to be some demand for this kind of thing, I decided to post instructions on a mod I made a while back. This gives you the option of choosing between Samsung's GlassLock (i.e. the default TW lockscreen) or the stock keyguard of Android 2.1.
The method involves de- and re-compiling /system/framework/android.policy.odex, and you should have some basic knowledge of the tools involved (i'm not gonna spell out every step). Before beginning, take a backup of android.policy.jar and android.policy.odex (or preferably the whole framework folder). You should issue the commands in recovery mode.
Required tools: rooted SGS (I've done this only with JM2, and the code *might* need modifying for other roms, though I doubt it), adb, smali/baksmali, dexopt-wrapper, text & hex editor, winrar (or any jar editor).
Here we go:
1. Use adb to pull out /system/framework/android.policy.odex and other framework .odexes (required for de-odexing). Might be wise to backup the whole /system/framework/ directory at this point.
2. Use baksmali to deodex the file (java -jar baksmali.jar -x android.policy.odex -o android.policy). Baksmali will let you know if you are missing any of the framework .odexes.
3. Open LockPatternKeyguardView.smali and find the method getLockScreenMode()Lcom/android/internal/policy/impl/LockPatternKeyguardView$LockScreenMode;
4. Replace the contents of this method with the attached file getLockScreenMode.txt.
5. Save LockPatternKeyguardView.smali.
6. Use smali to compile the files back to classes.dex (java -jar smali.jar android.policy -o classes.dex)
7. Pull /system/framework/android.policy.jar, add the newly created classes.dex to it, and push it back to the device.
8. On your phone, do:
# cd /system/framework
# dexopt-wrapper android.policy.jar patched.odex /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
Ouput should be:
--- BEGIN 'android.policy.jar' (bootstrap=0) ---
--- would reduce privs here
--- waiting for verify+opt, pid=3105
--- END 'android.policy.jar' (success) ---
9. You now have odexed the file into patched.odex. However, the signature of the file is not compatible with the other framework files, so you need to fix it. I think the proper way should be to re-odex all the framework files, but I haven't encountered any issues with just patching the signature.
10. Open the original android.policy.odex and copy signature bytes from offsets 0x34-0x47 to the new patched.odex, and save it.
11. Push the patched and hex-edited file to /system/framework/android.policy.odex and restore the original /system/framework/android.policy.jar.
12. Reboot and enjoy your good ol' keyguard
Some notes:
- If you want to revert back to Samsung's lock screen, just create a file called /data/local/enable_glass_lock ("adb touch /data/local/enable_glass_lock").
- By default, the menu button will also unlock the screen. To disable this behavior, you have to modify /res/values-hdpi-v4/bools.xml in /system/framework/framework-res.apk, and change the value of <bool name="config_disableMenuKeyInLockScreen">false</bool> to true. Can also be done by modifying code.
On a side note, the code for Smart Unlock (present in some Samsung phones) seems to be in there... it would be an interesting project to get that working
Click to expand...
Click to collapse
THANX TO ALL YOUR EFFORTS........ can you please attach a screen shot of the lock what you are talking about.. and does it work flawlessly without any sort of a lag.. and is it 100% bugs free?????
Could you also choose any other lockscreen, like WidgetLocker or SimplyLockscreen?
That would be great
Ateisti said:
It means to seek to the 52nd byte (or 0x34 in hex) of the file, and then copy and replace the following 20 bytes to the second file. But you can also do it on the device by issuing this command (I think busybox is required):
dd if=original.android.policy.odex of=patched.android.policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
...where "if=..." is the original file and "of=..." is the file you want to patch.
Click to expand...
Click to collapse
Thanks, that worked fine
Thanks! This method worked like a charm. I hated that glass unlock thingy.
However my /system/framework/framework-res.apk doesn't have a value folder, so I can't remove the possibility to unlock with the menu button.
Couldn't find any bools.xml in there at all.
This is replacing the music player controls when the screen is locked, right? It's a nice functionality and would be a pity to loose it.
Otherwise its a great mod and it would be cool if someone can make the One Click LockScreen Changer ;-)
Sent from my GT-I9000 using Tapatalk
thE_29 said:
Could you also choose any other lockscreen, like WidgetLocker or SimplyLockscreen?
That would be great
Click to expand...
Click to collapse
Not as such, but technically it should be possible with some additional coding. I however don't have the time to undertake such a task.
Tharfrin said:
Thanks! This method worked like a charm. I hated that glass unlock thingy.
However my /system/framework/framework-res.apk doesn't have a value folder, so I can't remove the possibility to unlock with the menu button.
Couldn't find any bools.xml in there at all.
Click to expand...
Click to collapse
This might be a ROM version thingy. On my system there are actually two XML files with that same setting, but only one of them works (the one I mentioned in my original post). Just search all your framework-res xml files for "config_disableMenuKeyInLockScreen", and change every instance to true. Should do the trick.
Or if all else fails, just edit the file LockScreen.smali, method "shouldEnableMenuKey()", and make it always return 0 ("return v4" -> "return v6").
mobilx said:
This is replacing the music player controls when the screen is locked, right? It's a nice functionality and would be a pity to loose it.
Otherwise its a great mod and it would be cool if someone can make the One Click LockScreen Changer ;-)
Click to expand...
Click to collapse
That is unfortunately the case. The music controls (as well as the puzzle pieces) are coded into the GlassLock class, so it would required some additional reverse engineering to implement those in the stock keyguard.
4 hours working and it works (jm2).
I'm going to test on the jpc.
EDIT:
I put it on the jpc and it doesn't work.
Did not work with JPC I really want to use the stock lockscreen!
Sent from my GT-I9000 using XDA App
hi guy thanks for your instruction. However I'm using samset's 1.9f which has the ROM deodexed and i found no .odex files but .jar files. Is there a way to workaround this? I'd really love to revert back to stock eclair lockscreen~!
billytcf said:
hi guy thanks for your instruction. However I'm using samset's 1.9f which has the ROM deodexed and i found no .odex files but .jar files. Is there a way to workaround this? I'd really love to revert back to stock eclair lockscreen~!
Click to expand...
Click to collapse
same here no odex files...
'K, so'm new 2 android hacking, but I'd like 2 make a framework-res.apk that includes StarBurst's MotoBlur x-itions here, SAShady's CRT Off animation here, & Gingerbread's Overscroll & MotoBlur Orient8ion animations when they become available. How would I go about merging the MotoBlur x-itions w/ the CRT Off animation, as they're both framework-res.apk files? Also, where mite I extract Gingerbread's Overscroll & MotoBlur Orient8ion files, is it from a stock Gingerbread framework-res.apk & MotoBlur (possibly Photon 4G) framework-res.apk? &, how would I know which files 2 extract? Are there any particular s/w tools that I need?
Thnx.
That's going to be a bit of work. I just went through the learning process of decompiling, modifying, and recompiling .apks myself. I don't have the most efficient method down yet, but I can get you started.
First up, are you using an odexed or deodexed ROM?
Thnx 4 the help.
Sycobob said:
...I just went through the learning process of decompiling, modifying, and recompiling .apks...
Click to expand...
Click to collapse
I'd really dig a link(s) to these resources. &, I'd b usin' the Stock ROM, which I'd imagine is odex'd.
EDIT: Man do I feel foolish. I just typed out way more than I needed to, thinking framework-res.apk was odexed. *sigh*. Oh well, I guess I just started the tutorial I was thinking about posting.
This won't be too hard:
Pull your stock framework-res.apk from /system/framework/.
Gather the other modded .apks
Decompile each of the .apks (luckily framework-res.apk doesn't rely on other stuff, so decompiling is easier)
Drag the modified file(s) from one of the decompiled, modded .apks to the stock one overwriting the old file(s)
Repeat for each mod
Recompile the new uber-modded .apk
Push it back onto your phone
Decompiling
You're going to need Apk Manager for decompiling and recompiling.
Place the .apks you want to decompile in the 'to be modded' folder of Apk manager
Run the script in the Apk Manager folder
Enter 22 to 'Set Current Project'
Pick the .apk you want to decompile
Enter 9 to decompile (no dependencies)
Repeat 3-5 for each .apk
Recompiling
(In Apk Manager) Enter 22 to 'Set Current Project'
Enter 11 to compile
Enter y (this is a system app)
Enter y (I haven't been able to get it to work when I answer no here)
Follow the prompt and delete the files you've modified from the 'keep' folder
Go back to the command prompt and press a key to continue
As for actually finding the changes, you're on your own here. I guess you can look for files with different sizes/modified dates or try to search the forums to see if people mention what they had to change for the mod. If two mods change the same file, you're going to have to open the file and make both sets of changes then toss it into the .apk.
Pro tip: if you have Eclipse set up with the Android SDK, you can go to Window > Preferences > XML > XML Files > Editor and check "Split multiple attributes each on a new line" so that when you hit Ctrl+Shift+F while looking at the messy decompiled .xmls it will instantly format it into a more easily read form. <--This is why I love Eclipse
If you don't know how to push the file back into place, it's a bit of a pain without a modded boot.img that allows you to use 'adb remount'. Copy the .apk somewhere on your phone. From command prompt (with phone plugged in):
Code:
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /wherever/your/file/is/framework-res.apk /system/framework-res.apk
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
reboot
Unless you have CWM and know how to write/reuse an update.zip.
Thnx, Sycobob. I'm just afraid that there'll be an overlap in overwritten files. But'll c.
Sycobob said:
...and updating the archive...ext3
Click to expand...
Click to collapse
&, what d'ya mean by upd8ing the archive, is it signing? Also, I'd thought all of the E4GT partitions were ext4. Didn't even activ8 my E4GT, 'cause'm still tryin' 2 get my TP2 repaired, so I can flip it. Maybe u can help me w/ another Q - I've been lookin' all ovr 4 info on android OS, &'ve been able 2 find what each partition is, using adb cmds, but cannot find, 4 the life of me!, a glossary of sorts on all of androids system files, a la "framework-res.apk is..." I really wanna get n2 android hacking/modding w/o havin' 2 use an app 2 make any & every change that I'd wanna make 2 the OS. Comin' from WiMo, I was very familiar w/ the registry, exploring & hacking it, but there's no real equivalent n android. Also, do go here & vote 4 my Brushed Aluminum Barely There Case with Kickstand suggestion. We're already n 9th place. Thnx again 4 ur help.
System packages don't get signed. By updating, I mean dragging the file into the WinRAR archive which automatically replaces the existing file in the archive, therefor updating it.
All the partitions are ext4. This is where my newbishness shows, I have no idea why I have to use ext3. /dev/block/mmcblk1p21 isn't the correct path either, but it works. In one of ptfdmedics posts he uses the same options. If I use the 'correct' mount -o rw,remount -t ext4 /dev/block/mmcblk0p9 /system it doesn't work. *shrug*
Also, I just realized something I missed in my first post. If you modify an .xml the resources.arsc in the .apk needs to be regenerated. This is done when you decompile and recompile the package. I'll be editing my previous post to reflect this.
As far as a glossary, I have no idea where to find one. I would mind having access to something like that though. If you find something, please post it.
EDIT: don't worry too much about overlap. I'd imagine it'll be easy to find the changes you need to make, then you can just copy+paste the relevant lines. Pro tip: if you have Eclipse set up with the Android SDK, somewhere in Window > Preferences > XML > XML Files > Editor > Check "Split multiple attributes each on a new line" and when you hit Ctrl+Shift+F while looking at the messy decompiled .xmls it will instantly format it into a more easily read form. Adding this to previous post.
Thnx, 4 all of ur help. I've got a lotta wrk ahead of me 2 experiment w/ this stuff. Now, just gotta find the time.
OLD VERSION
NEW VERSION FOLLOW LINK BELOW
CLICK HERE for Updated Post and Application
==========OLD INFO BELOW THIS LINE===========================
Im leaving the old info here for reference and in case anyone still wishes to continue to use this version. The new version is beter in every way IMO. But the choice is yours.
===============================
FLASHEX and FLASHMOD script INFO 0.98beta
===============================
This is a new set of scripts I created, Flashex.sh and Flashmod.sh. They take advantage of the same old AND to WIN hex edit. The big difference is Flashex.sh will hex edit the file right on any android device that has busybox installed. I have only been able to test it on my 1 Android device the A100 works perfectly on it. I'm curious if anyone can run it on current rooted ICS since it only requires WRITE to /data, I'm fairly sure it will work just fine, and/or on other devices with flash and a decent enough CPU and memory to watch hulu.
What they do
==========
Flashex.sh will look at /data/data/com.adobe.flashplayer/lib/libflashplayer.so, find its version string, then make a copy of the file and hex edit the copy. It DOESNT require root since it only needs READ access. Flashex.sh only needs to be run once unless you delete the WIN_libflashplayer.so or your Flash Player gets an update.
Flashmod.sh will look for the WIN_libflashplayer.so(hex edited file), check for write access, then copy the file to /data/data/com.adobe.flashplayer/lib/libflashplayer.so.
They can both be run from Terminal, Script Manager, etc. I suggest Setting Flashmod.sh up with a Desktop Icon via Script Manager for an easy way to apply the fix before watching Hulu.
How To Install and Use
======================
1) Create a directory you want to run the script from. I suggest
/mnt/external_sd/FLASHEX but it can be anyplace as long as you
can find, and run the scripts.
2) Download FLASHEX_098b.tar.gz and place it inside the folder
3) cd into the directory
cd /pathtofolder/foldername (note: typically /mnt/external_sd/FLASHEX or /mnt/sdcard/FLASHEX)
4) run the following commands to extract Flashex.sh and Flashmod.sh
gzip -d FLASHEX_098b.tar.gz
tar -xvf FLASHEX_098b.tar.gz
5) Now "sh Flashex.sh" this will READ the original flash file, and hex edit the file.
it will place the edited file inside the default(same folder as script) directory.
The Edited file is named "WIN_libflashplayer.so"
6) Now "su" because Flashmod.sh will need root access to overwrite
/data/data/com.adobe.flashplayer/lib/libflashplayer.so with the edited version
7) Now "sh Flashmod.sh" This script will find WIN_libflashplayer.so and copy it to
/data/data/com.adobe.flashplayer/lib/libflashplayer.so
Note: You will also see "ORIG_libflashplayer.so" that is a backup of the original
that is made before the change. It can be used to restore in the even someone
edits and decides they want to go back, or in case of an unforseen event.
8) Now just make sure your web browser is set to view as "Desktop" and enjoy watching hulu.
That's about it. IF you have run Flashex.sh once you
DON'T need to run it again UNLESS you get a Flash
update, or you delete the WIN_libflashplayer.so.
If your Adobe Flash updates on you just rerun Flashex.sh
to edit the new file. Once edited it will store a copy of
the modded file the scripts home dir.
Then use as Flashmod.sh as normal.
THANKS TO:
===========
All the other people who make GNU open source
programs, the people who figured out how to get hulu to work
by hex editing the libflashplayer.so, and all the great folks
at XDA Developers for providing so much good information,
and for all the hard work to figure out root methods,
and all the other amazing stuff that goes on.
=========================================================
TESTING INFO FOR OTHER DEVICES
This should work on most any android flash in theory but that's UN-tested.
I wrote it to try and look for the same expected pattern for 10.x 11.x and even
12.x(taking a guess). It HAS been tested with Flash 11.x and works
great. It's written in such a way it should be safe to test. Either the Flashex.sh script will give you a properly edited libflashplayer.so or it should be able to tell you it couldnt edit the file. If you end up with an edited file it should be safe to copy over and should work. If you find it DOESN'T work with your version of flash you may contact me and make the .so file available and I will see if I can add support. Eventually I would like this to be universal and easy to use.
ALSO PLEASE!
If it does work for you, especially on other devices or other flash versions please post and let me know. It will help me improve the set of scripts.
Got it working on ICS took me abit of reading on google on how to cd to the directory but alls well that ends well!
/system/bin/sh: cd: /FLASHEX - No such file or directory
1|[email protected]:/mnt/sdcard $ tar -xvf FLASHEX_098b.tar.gz
tar: can't open 'FLASHEX_098b.tar.gz': No such file or directory
1|[email protected]:/mnt/sdcard $ tar -xvf FLASHEX_098b.tar.gz
Flashex.sh
Flashmod.sh
README.txt
[email protected]:/mnt/sdcard $ sh Flashex.sh
======================================================================
Cannot locate /mnt/external_sd/FLASHEX(configured path for Flashex.sh)
The script will attempt to adapt...
Flashex.sh is running from /mnt/sdcard
Flashex.sh has write access to /mnt/sdcard
attempting to use /mnt/sdcard instead...
To avoid this message in the future read the directions better
======================================================================
Detected READ access for /data/data/com.adobe.flashplayer/lib/libflashplayer.so
USING: /data/data/com.adobe.flashplayer/lib/libflashplayer.so
Created /mnt/sdcard/cache Sucessfully...
Found /data/data/com.adobe.flashplayer/lib/libflashplayer.so...Checking
grep: 1[0-2],[0-9]*: No such file or directory
grep: 1[0-2],[0-9]*: No such file or directory
ERROR: Can't figure out what version of Flash this is so it cant be edited.
Currently only tested with v11.1.111.x. It should work with about any version.
I can't test what I dont have. If you send a copy of the libflashplayer.so I will
add it to the Flash versions that are 100% tested and supported.
Contact me(NoSudo) and/or look for updates at forum.xda-developers.com
1|[email protected]:/mnt/sdcard $ su Flashmod.sh
[email protected]:/mnt/sdcard # sh Flashmod.sh
======================================================================
Cannot locate /mnt/external_sd/FLASHEX(configured path for Flashmod.sh)
The script will attempt to adapt...
Flashmod.sh is running from /mnt/sdcard
Flashmod.sh has write access to /mnt/sdcard
attempting to use /mnt/sdcard instead...
To avoid this message in the future read the directions better
======================================================================
ERROR: /mnt/sdcard/WIN_libflashplayer.so NOT FOUND
1|[email protected]:/mnt/sdcard #
Here is my outcome from the script. Searched files and could not find flash hex version.
Running Acer a100 ICS rooted
igwtapc said:
[email protected]:/mnt/sdcard $ sh Flashex.sh
===============================================
Cannot locate /mnt/external_sd/FLASHEX(configured path for Flashex.sh)
The script will attempt to adapt...
Flashex.sh is running from /mnt/sdcard
Flashex.sh has write access to /mnt/sdcard
attempting to use /mnt/sdcard instead...
To avoid this message in the future read the directions better
===============================================
Click to expand...
Click to collapse
You need to create a folder for the script still. It looks like you currently have the scripts located in /mnt/sdcard. You would need to make a folder called FLASHEX still inside /mnt/sdcard/ or /mnt/external_sd/ so the full path would be /mnt/external_sd/FLASHEX or /mnt/sdcard/FLASHEX. If you change the folder name you "may" have to edit the script. I will be releaseing an update soon and I will include a little more testing of that. It was an afterthought and was just added to help make it easier for people. Anyway try this...
First make a folder.
"mkdir /mnt/external_sd/FLASHEX"
Now move the 2 scripts into that folder from the current location
"mv /mnt/sdcard/Flashex.sh /mnt/external_sd/FLASHEX/Flashex.sh"
"mv /mnt/sdcard/Flashex.sh /mnt/external_sd/FLASHEX/Flashmod.sh"
Now you can run them
This will run the script once moved
"sh /mnt/external_sd/FLASHEX/Flashex.sh"
Now you should have WIN_libflashplayer.so inside the FLASHEX folder.
Next run
"su"
"sh /mnt/external_sd/FLASHEX/Flashmod.sh"
I suggest running this via script manager once you decide you like using it. I have mine setup to run at boot. Just be sure and turn off auto update for adobe flashplayer if you run Flashmod.sh at boot. The next version Im thinking about adding the ability to have it run the hex edit each time it detects an updated version. We will see. My main concern with that would be the amount of time the hex edit takes.
Anyway that should get you going on the Hulu. Remember to set your browser to "Desktop" too or it still wont work. I suggest Dolphin HD for a browser.
Let me know if you have any more issues and check back for an updated version in the next few days.
by igwtapc
Created /mnt/sdcard/cache Sucessfully...
Found /data/data/com.adobe.flashplayer/lib/libflashplayer.so...Checking
grep: 1[0-2],[0-9]*: No such file or directory
grep: 1[0-2],[0-9]*: No such file or directory
ERROR: Can't figure out what version of Flash this is so it cant be edited.
Currently only tested with v11.1.111.x. It should work with about any version.
I can't test what I dont have. If you send a copy of the libflashplayer.so I will
add it to the Flash versions that are 100% tested and supported.
Click to expand...
Click to collapse
After looking at your output a little closer. I noticed it did seem to create a cache folder inside your /mnt/sdcard. Can you confirm the existence of a cache folder at /mnt/sdcard/cache? Also did you edit the script or did you change the type of quotes around the strings used by grep? I'm going to do some testing and it would speed things up if I knew those two things.
The above(previous post) directions still apply and should work. However if the script has been edited even just a change from " to ' could break it so be careful.
If your not used to scripting I would not advise you change anything other then the HEXHOME="/mnt/external_sd/FLASHEX" inside the script, and don't change anything left of the = or change the " type. Only edit the directory path/name.
I just tried this and got the same error as above. I did notice that it created the cache folder in the same directory though. It just can't determined what the library file is.
Current flash player version is: 11.1.115.7 March 5, 2012
Edit: Here is the libflashplayer.so file:
http://dl.dropbox.com/u/24495685/libflashplayer.so
Sent from my A500 using XDA Premium HD app
does this works in ICS?
Update:
Yes it does.
But,,, the script gave me an error about "uncommon string' on line 228,, any ways what I did was just to open adb and run all commands in the script one by one. I copy the edited lib.so to the flash folder , restarted, watching hulu now.
Thanks for this.
Cool. Not sure what the error was(without a way to recreate it) but, I have a new version coming out in a few days that will work better. I will post it over in the app section so I can get more feedback posts and just link it back to here.
It's a single script solution that will do the hex edit when it detects an upgrade or downgrade of Flash to update the edited copy and write it over each boot. That way people don't have to worry about updates and such.
If I can find the time I'm going to upgrade to ICS this weekend. I haven't had time to do much the last few weeks and need my tablet so I have been waiting. I need to read up on the latest. It looks like we even have CWM now OMG! Nice work!
Once I'm running ICS I can test on it and make sure it's working on both.
Joecascio2000 said:
I just tried this and got the same error as above. I did notice that it created the cache folder in the same directory though. It just can't determined what the library file is.
Current flash player version is: 11.1.115.7 March 5, 2012
Edit: Here is the libflashplayer.so file:
http://dl.dropbox.com/u/24495685/libflashplayer.so
Sent from my A500 using XDA Premium HD app
Click to expand...
Click to collapse
That's very odd. My current version is 11.1.111.7. I will take a look at it in a few. For me so far I have seen 11.1.111.5-11.1.111.7 and all worked fine on my acer. I'm posting a new version that may already address the issue you are having. I will do some tests with the file you attached to see this evening.
Also might not be a bad idea to confirm the path for the libflashplayer.so is the same as the script is expecting. I havnt added anything in to search the system for alternate flash locations yet. It can be configured at the top of the script though.
I have also found some people are using an older BusyBox that seems to be mission a feature. Im using busybox v1.19.3 latest is 1.19.4 the installer I use is the one from JRummy. It's not a bad idea to confirm which Busybox you have if you run into issues with odd errors.
Looking at this right now. I will need to modify the pattern a little to make it work on this lib version. Thanks for bringing it to my attention. I'll PM you when I update with support for that version.
EDIT: New improved version here
Joecascio2000 said:
I just tried this and got the same error as above. I did notice that it created the cache folder in the same directory though. It just can't determined what the library file is.
Current flash player version is: 11.1.115.7 March 5, 2012
Edit: Here is the libflashplayer.so file:
http://dl.dropbox.com/u/24495685/libflashplayer.so
Sent from my A500 using XDA Premium HD app
Click to expand...
Click to collapse
I did a search but could not find a theme that changes all the notification icons in the notification bar (i.e. for talk/ gmail/ whatsapp etc etc) + the alarm clock & vibrate icon to ICS blue.
Is there a theme out there that does exactly that?
I already made a few of these for a widget, I can make a set and upload them. You would have to adb pull SystemUI.apk, replace the png's, and then push it back to system/app.
Thank you very much!
But before you go any length, let me please read up on what you just said
What rom are you using? I can throw them in for you.
Without doing it for me- that just deserves another thank you
At this moment I'm on AOKP b27 but that varies quite a bit
So instead of you doing all the work for me (may be it is best to learn it myself since I change ROMS fairly often), would you care to help me a bit?
This is what I've found:
1. Root is prerequisite. If you're using stock rom, you can obtain cf-root from here.
2. Install android sdk from here. Eclipse is optional. The essential stuff we need is the adb from the sdk.
3. Please make a backup using cwm in case you end up deleting or corrupting your phone.
4. Connect your phone to the pc.
5. Open cmd and type cd C:\android\tools . (Depends on where is your sdk tools folder)
6. type adb pull /system/app/SystemUI.apk (Status Bar Modding)
7. Alright, now edit the .apk to .zip in your tools folder.
8. Open up the zip and replace the mdpi files inside with the one you prepared.
9. After all the changes, change the .zip back to .apk
10. Open cmd and type cd C:\android\tools . (Depends on where is your sdk tools folder)
11. type adb push SystemUI.apk /system/app/SystemUI.apk
12. Reboot your phone.
Courtesy of terrymcnuggets in this topic.
My questions; regarding
7. Alright, now edit the .apk to .zip in your tools folder; and
9. After all the changes, change the .zip back to .apk
Do i rename the .apk to .zip or do I create a .zip?
AND
8. Open up the zip and replace the mdpi files inside with the one you prepared.
the files you would be prepared to share are mdpi files? not .png?
The icons I want in ICS blue (#FF33B5E5 - or same color as the time etc in te notifcation (top) bar) are: Bluetooth icon, Vibrate icon, Alarm icon, and all of the notication icons (talk/ gmail/ whatsapp etc)
If you'd rather point me out in the directio on how to change them myself that would be great too (Photoshop?)
Many many thanks for your time
Ti2 said:
Without doing it for me- that just deserves another thank you
At this moment I'm on AOKP b27 but that varies quite a bit
So instead of you doing all the work for me (may be it is best to learn it myself since I change ROMS fairly often), would you care to help me a bit?
This is what I've found:
1. Root is prerequisite. If you're using stock rom, you can obtain cf-root from here.
2. Install android sdk from here. Eclipse is optional. The essential stuff we need is the adb from the sdk.
3. Please make a backup using cwm in case you end up deleting or corrupting your phone.
4. Connect your phone to the pc.
5. Open cmd and type cd C:\android\tools . (Depends on where is your sdk tools folder)
6. type adb pull /system/app/SystemUI.apk (Status Bar Modding)
7. Alright, now edit the .apk to .zip in your tools folder.
8. Open up the zip and replace the mdpi files inside with the one you prepared.
9. After all the changes, change the .zip back to .apk
10. Open cmd and type cd C:\android\tools . (Depends on where is your sdk tools folder)
11. type adb push SystemUI.apk /system/app/SystemUI.apk
12. Reboot your phone.
Courtesy of terrymcnuggets in this topic.
My questions; regarding
7. Alright, now edit the .apk to .zip in your tools folder; and
9. After all the changes, change the .zip back to .apk
Do i rename the .apk to .zip or do I create a .zip?
AND
8. Open up the zip and replace the mdpi files inside with the one you prepared.
the files you would be prepared to share are mdpi files? not .png?
The icons I want in ICS blue (#FF33B5E5 - or same color as the time etc in te notifcation (top) bar) are: Bluetooth icon, Vibrate icon, Alarm icon, and all of the notication icons (talk/ gmail/ whatsapp etc)
If you'd rather point me out in the directio on how to change them myself that would be great too (Photoshop?)
Many many thanks for your time
Click to expand...
Click to collapse
7. Yes, change the extension to zip. Alternatively simply open it with 7zip/winrar or another archiver.
8. mdpi is the name of the folder. when you open the apk with the archiver you will see a folder called /res/ and inside a couple of drawable[xxx] folders. in theory you should only have to modify files in the drawable xhdpi folder (since the gnex is a xhdpi device). I would suggest extracting the whole /res/ folder and looking in it.
9. if you changed the extension to .zip, change it back to apk. otherwise simply drag and drop the modified files in the correct folders.
PS: make sure you save the original SystemUI.apk somewhere, in case the modifications don't work as expected and you want to revert to the original one
Good luck!
Ok, just to be safe.
1. I connect my phone with usb and type adb pull /system/app/SystemUI.apk in cmd
2. I copy that file to 2 different locations (1 to be sure I have the original in case I screw up , 1 to try and modify)
3. I type adb push /system/app/SystemUI.apk so that my phone is still in good state
Then I go to 1 of the saved SystemUI.apk and rename it to SystemUI.zip
I search for the folder /res/ and look for the notification icons etc which I would like to change the color
Change the color of the .png files with the ICS color in photoshop and replace them
Rename SystemUI.zip back to SystemUI.apk
In cmd I type adb push /system/app/SystemUI.apk and reboot
Did I understand it all correctly? Thanks
Ti2 said:
Without doing it for me- that just deserves another thank you
At this moment I'm on AOKP b27 but that varies quite a bit
So instead of you doing all the work for me (may be it is best to learn it myself since I change ROMS fairly often), would you care to help me a bit?
This is what I've found:
1. Root is prerequisite. If you're using stock rom, you can obtain cf-root from here.
2. Install android sdk from here. Eclipse is optional. The essential stuff we need is the adb from the sdk.
3. Please make a backup using cwm in case you end up deleting or corrupting your phone.
4. Connect your phone to the pc.
5. Open cmd and type cd C:\android\tools . (Depends on where is your sdk tools folder)
6. type adb pull /system/app/SystemUI.apk (Status Bar Modding)
7. Alright, now edit the .apk to .zip in your tools folder.
8. Open up the zip and replace the mdpi files inside with the one you prepared.
9. After all the changes, change the .zip back to .apk
10. Open cmd and type cd C:\android\tools . (Depends on where is your sdk tools folder)
11. type adb push SystemUI.apk /system/app/SystemUI.apk
12. Reboot your phone.
Courtesy of terrymcnuggets in this topic.
My questions; regarding
7. Alright, now edit the .apk to .zip in your tools folder; and
9. After all the changes, change the .zip back to .apk
Do i rename the .apk to .zip or do I create a .zip?
AND
8. Open up the zip and replace the mdpi files inside with the one you prepared.
the files you would be prepared to share are mdpi files? not .png?
The icons I want in ICS blue (#FF33B5E5 - or same color as the time etc in te notifcation (top) bar) are: Bluetooth icon, Vibrate icon, Alarm icon, and all of the notication icons (talk/ gmail/ whatsapp etc)
If you'd rather point me out in the directio on how to change them myself that would be great too (Photoshop?)
Many many thanks for your time
Click to expand...
Click to collapse
That's a great attitude!!! Good for you for taking it in your own hands!!!
Sent from my Galaxy Nexus using Tapatalk
Ti2 said:
Ok, just to be safe.
1. I connect my phone with usb and type adb pull /system/app/SystemUI.apk in cmd
2. I copy that file to 2 different locations (1 to be sure I have the original in case I screw up , 1 to try and modify)
3. I type adb push /system/app/SystemUI.apk so that my phone is still in good state
Then I go to 1 of the saved SystemUI.apk and rename it to SystemUI.zip
I search for the folder /res/ and look for the notification icons etc which I would like to change the color
Change the color of the .png files with the ICS color in photoshop and replace them
Rename SystemUI.zip back to SystemUI.apk
In cmd I type adb push /system/app/SystemUI.apk and reboot
Did I understand it all correctly? Thanks
Click to expand...
Click to collapse
1. the command is: adb pull /system/app/SystemUI.apk <location>
<location> would then be, for example, c:\temp
so, adb pull /system/app/SystemUI.apk c:\temp
2. then you create a copy of the SystemUI.apk from you c:\Temp folder
3. no need to push it back. adb pull simply copies a file from the filesystem
Then you go about and do all the other stuff (extract, edit, etc.)
Finally, when all is done you must do this:
In cmd type:
mount -o rw,remount /dev/block/mmcblk0p1 /system
adb push <location/SystemUI.apk> /system/app
where <location> is the place where you have the file. so the command would be, for example:
adb push c:\temp\SystemUI.apk /system/app
can you provide the zip with the png images. I would like it so i can install via root explorer. thanks in advance!
Hey guys, I finished the set, the download link is in my icon thread since that's where the rest of my holo themed/ics blue work is.
http://forum.xda-developers.com/showthread.php?p=22296313
mrfenyx said:
1. the command is: adb pull /system/app/SystemUI.apk <location>
<location> would then be, for example, c:\temp
so, adb pull /system/app/SystemUI.apk c:\temp
2. then you create a copy of the SystemUI.apk from you c:\Temp folder
3. no need to push it back. adb pull simply copies a file from the filesystem
Then you go about and do all the other stuff (extract, edit, etc.)
Finally, when all is done you must do this:
In cmd type:
mount -o rw,remount /dev/block/mmcblk0p1 /system
adb push <location/SystemUI.apk> /system/app
where <location> is the place where you have the file. so the command would be, for example:
adb push c:\temp\SystemUI.apk /system/app
Click to expand...
Click to collapse
I'll start from here (when I can find some time), when I have further questions I'll post them here. Thanks for your help mate
Ti2 said:
I'll start from here (when I can find some time), when I have further questions I'll post them here. Thanks for your help mate
Click to expand...
Click to collapse
No problem, good luck. Shoot me a pm if you get stuck somewhere, don't forget to make a nandroid, etc.
Zer0_Cool said:
Hey guys, I finished the set, the download link is in my icon thread since that's where the rest of my holo themed/ics blue work is.
http://forum.xda-developers.com/showthread.php?p=22296313
Click to expand...
Click to collapse
And also a thanks to you for your help!
So, besides pulling them from systemUI.apk and putting thenm back, what more can I do? You told me you could "put them in my ROM" of choice. Since I regularly flas a diff rom, could you please explain to me how to do this before I flash the new rom?
Ti2 said:
And also a thanks to you for your help!
So, besides pulling them from systemUI.apk and putting thenm back, what more can I do? You told me you could "put them in my ROM" of choice. Since I regularly flas a diff rom, could you please explain to me how to do this before I flash the new rom?
Click to expand...
Click to collapse
What I meant was that I could take the SystemUI.apk file from whatever rom you are currently running. Different roms have different tweaks done here and there, and that's one of the larger areas of change, so I wanted to give you the correct one to avoid any potential complications.
Ok so I managed to pull the systemUI.apk an rename it to zip.
I found the following .png I ould like to change to ICS blue:
C:\noticons\SystemUI.zip\res\drawable-sw600dp-xhdpi
stat_sys_alarm.png
stat_sys_data_bluetooth.png
C:\noticons\SystemUI.zip\res\drawable-xhdpi
stat_notify_image.png
stat_notify_image_error.png
stat_notify_more.png
stat_sys_alarm.png
stat_sys_ringer_silent.png
stat_sys_ringer_vibrate.png
Now what I couldn't find the notification icons for Gmail/ Gtal/ Whatsapp etc etc; where can I find these? As well as bluetooth connected/ usb debugging icon etc
Ti2 said:
Ok so I managed to pull the systemUI.apk an rename it to zip.
I found the following .png I ould like to change to ICS blue:
C:\noticons\SystemUI.zip\res\drawable-sw600dp-xhdpi
stat_sys_alarm.png
stat_sys_data_bluetooth.png
C:\noticons\SystemUI.zip\res\drawable-xhdpi
stat_notify_image.png
stat_notify_image_error.png
stat_notify_more.png
stat_sys_alarm.png
stat_sys_ringer_silent.png
stat_sys_ringer_vibrate.png
Now what I couldn't find the notification icons for Gmail/ Gtal/ Whatsapp etc etc; where can I find these? As well as bluetooth connected/ usb debugging icon etc
Click to expand...
Click to collapse
wild guess: in the gmail, gtalk, whatsapp apks...
good luck
PS: editing non-system apps (also called market apps) is a bit tricky
Why is that tricky please?
So how do I change those icons?
adb pull /system/app/Gmail.apk c:\temp
rename to .zip
search for the icon, change
rename to .apk
mount -o rw,remount /dev/block/mmcblk0p1 /system
adb push C:/temp/SystemUI.apk/system/app
like that? Or should I really leave that alone as a n00b?
Ti2 said:
Why is that tricky please?
So how do I change those icons?
adb pull /system/app/Gmail.apk c:\temp
rename to .zip
search for the icon, change
rename to .apk
mount -o rw,remount /dev/block/mmcblk0p1 /system
adb push C:/temp/SystemUI.apk/system/app
like that? Or should I really leave that alone as a n00b?
Click to expand...
Click to collapse
Those app's weren't included in the set provided by google. What I (or you) will have to do is download the application you want to modify, extract it and find the png that is going to be changed, edit it, name it the same thing as it was before. Then, double click and open the original apk with the archive manager (to avoid re-signing), navigate to the folder the image was in (probably /res/drawable_something) and then drag the new file over. It will overwrite the old image without needing to extract/re-sign/etc. then you adb push theapp.apk /data/app/ and see if it works.
*do you really need to rename it to a .zip to extract on windows?
Zer0_Cool said:
Those app's weren't included in the set provided by google. What I (or you) will have to do is download the application you want to modify, extract it and find the png that is going to be changed, edit it, name it the same thing as it was before. Then, double click and open the original apk with the archive manager (to avoid re-signing), navigate to the folder the image was in (probably /res/drawable_something) and then drag the new file over. It will overwrite the old image without needing to extract/re-sign/etc. then you adb push theapp.apk /data/app/ and see if it works.
Click to expand...
Click to collapse
can this be actually done without having to resign the apk? I remember trying to change the icon for facebook once. I simply copied the new icon inside the apk and overwrote the existing one (same name but obviously, different size). It seemed to work at first but then the app disappeared from the app drawer (it was still in /data/app/ but I could not use it anymore). had to manually delete it and download and install again from market...
In order to get it to work I had to resign it but we know that is not the optimal way to work...
So something very simple. Just a little batch file I made but I thought is useful.
NOTE: The point of this batch file is to be able to sign apk's and zips from anywhere in any of your directories, without needing to have the signapk.jar and key files in the same directory. It will not perform any magic and sign system apps with the system signature, or non-system apps with the system signature.
This will sign whatever you give to it...just put it somewhere that is in your path and edit the line that says this:
Code:
set signdir=[U][B]C:\eclipse-adt\cmdtools[/B][/U]
Change C:\eclipse-adt\cmdtools to the path of wherever your signapk.jar file is (your keys should be in that same folder, named publickey.x509.pem and privatekey.pk8).
Example:
Code:
set signdir=[U][B]C:\bill\android\signing-tools[/B][/U]
Anyway, usage for the batch file is as follows (also tells you usage if you pass no parameters to the batch file, e.g. just call signapk).
Code:
Signapk.bat: Sign files from anywhere
Usage: signapk inFile [outfile]
Examples:
signapk mod1.zip [implicit 2nd parameter of mod1-signed.zip]
signapk mod1.zip finalMod.zip
signapk frameworkTW.apk softkeyHack.apk
First example will output a mod1-signed.zip as the signed version of mod1.zip.
Second example will output finalMod.zip as the signed version of mod1.zip.
Third example will output fsoftkeyHack.apk as the signed version of frameworkTW.apk.
Note that if you only pass ONE parameter to the batch file (e.g. the file to sign), then the output file will ALWAYS be named <fileName>-signed.<extension>, as mod1.zip created a mod1-signed.zip output in the example above.
So yeah. Very simple, but I was getting tired of copying my files to my signapk directory and then copying back...so just thought I should share.
If you don't feel like downloading the file, you can create it yourself by copying the content from here: pastebin.com/u6Zj3rsH and pasting it into a file named "<FILE_NAME_HERE>.bat".
Download:
Code:
e1d7016e1b56aa32824974125a424869 *signapk.zip
Awesome man. I've heard in the past that there were methods to sign any apk. Just never knew how. Great share. :thumbup:
Sent from my SPH-L710 using Xparent Skyblue Tapatalk 2
No no, you're misunderstanding...this is to sign from anywhere without need the signapk.jar to be in the folder of the file you are trying to sign.
This will not allow you to sign system apps and such, but there are tricks to get the right signature on those (such as copying the META-INF folder from the original, signed system app zip [an apk is essentially a specialized zip file] to the newly compiled system app zip)
So if I unzipped a ROM on C:\ROM and edited it, zipped it again, but have this file in my Downloads folder, I can sign it so it will flash?
I have no idea what I'm doing.