Apktool problem MIUI v5 - Nexus 4 Q&A, Help & Troubleshooting

Hello to all devs
If someone can help me I would be very gratefull.
What I`m trying to do is to edit the values for screen brightness in framework-res.apk .
The problem is that after decompiling ,edit the values (values/array.xml) ,compiling and push to system/framework, after reboot the phone won`t boot anymore.It just stucks at the finish of the bootanimation.
So...please...can someone help me?

Do you get any warnings/errors while compiling? You could also try vrtheme instead of modding the apk.
Sent from my Nexus⁴ using Tapatalk 4 Beta

TToivanen said:
Do you get any warnings/errors while compiling? You could also try vrtheme instead of modding the apk.
Sent from my Nexus⁴ using Tapatalk 4 Beta
Click to expand...
Click to collapse
I installed the miui framework and other dependecies and succsessfully compile a new framework-res.apk.
The problem is that after I push the modded framework to system/framework and reboot the system won`t boot anymore.I don`t like how MIUI Team set the values for brightness.It`s too dark for me.And I wanted to "light" the display without any 3rd app from market.

aresbv2000 said:
I installed the miui framework and other dependecies and succsessfully compile a new framework-res.apk.
The problem is that after I push the modded framework to system/framework and reboot the system won`t boot anymore.I don`t like how MIUI Team set the values for brightness.It`s too dark for me.And I wanted to "light" the display without any 3rd app from market.
Click to expand...
Click to collapse
Did you set permissions after pushing? Making a flashable zip may be a good idea.
Sent from my Nexus⁴ using Tapatalk 4 Beta

TToivanen said:
Did you set permissions after pushing? Making a flashable zip may be a good idea.
Sent from my Nexus⁴ using Tapatalk 4 Beta
Click to expand...
Click to collapse
The permissions were set like this:
adb shell
cd system/framework/framework-res.apk
chmod 644 framework-res.apk
Before restart i`ve checked if the permissions were right and they do.
I don`t know where the problem is

aresbv2000 said:
The permissions were set like this:
adb shell
cd system/framework/framework-res.apk
chmod 644 framework-res.apk
Before restart i`ve checked if the permissions were right and they do.
I don`t know where the problem is
Click to expand...
Click to collapse
Hm, seems fine to me.
Can you please upload the modded apk and tell me which file you edited? Imma make a vrtheme zip for you to try.
Sent from my Nexus⁴ using Tapatalk 4 Beta

Here is the two files (framework-res.apk and framework-miui-res.apk). If you have free time and want to give a try,maybe you will manage to do it right.Edit anything in the values/array.xml and I will test to see if it works.
framework-res.apk
framework-miui-res.apk
I run on my laptop Windows 7 x64.Maybe this is the problem.But if the compiling is fine...i think this is not the problem.Maybe the signature of the apk or something like that would be the problem.
Thank you for your interest.

@aresbv2000
Here you go
The zip does not replace the entire apk. It sorta injects the arrays.xml into frameworks-res.apk. I've set every auto brightness step to 250 in order to easily find out if it works. If your screen lights up 100% after enabling autobrightness, the zip worked.
Then you must open the zip using and replace my proof-of-concept arrays.xml with your own.
Cheers!

TToivanen said:
@aresbv2000
Here you go
The zip does not replace the entire apk. It sorta injects the arrays.xml into frameworks-res.apk. I've set every auto brightness step to 250 in order to easily find out if it works. If your screen lights up 100% after enabling autobrightness, the zip worked.
Then you must open the zip using and replace my proof-of-concept arrays.xml with your own.
Cheers!
Click to expand...
Click to collapse
ok....thank you so much.i will install the zip as you made it.i will report to you if it worked.
please if you have time check this thread later to see if i posted any question for you.
thank you again

it is not working my friend
the screen stays the same as usual....too dimm.
i don`t know why but if i use velis autobrightness it seems that the color tones are changing also.and i spent a week just to calibrate my display the way I like it .thank you so much for your effort.i appreciate your efforts.

After a few hours and a lot of nervs i`ve succsessfully edited the values in array.xml, compile....and VOILA>>>it worked.
It took me some time to figure out what values should I set, but now is way better than was before.
All the credis goes to this and to you for your tips.
Thank you.
Forum moderator can delete this thread as the problem is solved

aresbv2000 said:
After a few hours and a lot of nervs i`ve succsessfully edited the values in array.xml, compile....and VOILA>>>it worked.
It took me some time to figure out what values should I set, but now is way better than was before.
All the credis goes to this and to you for your tips.
Thank you.
Forum moderator can delete this thread as the problem is solved
Click to expand...
Click to collapse
Sweet. I'm glad you figured it out
Sent from my Nexus⁴ using Tapatalk 4 Beta

Related

[REQ] Pays black bar and icons for CM 5.0.8

Now that we have a CyanogenMOD 5.0.8 on Desire, I am missing black bar and great icons from Pays...
I tried editing framework-res.apk myself but for some reason, after editing, signing, pushing and rebooting, I get FC on every single app on my phone. I don't have problems signing other apks.
Could somebody please edit this, shouldn't be too much work with the right procedure...
THANKS!
you don't have to sign it actually if you adb push it, I never sign it. Just be careful that images are the same resolution and especially look at the 9.png files cause they're not that simple to edit. Is the rom deodexed?
nikosrs4 said:
you don't have to sign it actually if you adb push it, I never sign it. Just be careful that images are the same resolution and especially look at the 9.png files cause they're not that simple to edit. Is the rom deodexed?
Click to expand...
Click to collapse
End up in a boot cycle if I don't sign. Didn't touch *.9.png's
Yes, rom is deodexed. Could signer be the problem? This is not the first ROM i had problems with framework-res....
did you change the permissions? chmod etc?
could you post the stock framework-res.apk?
No, m8, no chmod, chown or anything, just pushed it... Does it have to have specific permissions? I am just about to upload it...
EDIT: Uploaded
View attachment framework-res.apk
well, I use chmod 644.
also check this, I found it now. http://forum.xda-developers.com/showthread.php?t=695701
I changed the battery icons with some I know that work on mine. plz chmod 644 after you adb push it, then we'll know..
http://forum.xda-developers.com/showpost.php?p=6456982&postcount=14
Sorry for responding so late. Will give it a go this weekend (hopefully) and will let you know the results. Thanks!
Thank you! Finally got chance to try it and yes, right permissions was the cause for my trouble.

Flashlight Preinstalled in Vodafone Froyo release

Hi,
Can anybody extract the APK for the LED Torch app preinstalled in Froyo?
I saw that the one include with Froyo on the Desire works with a Desire with Eclair. (But doesn't work with my Legend) So I would like to check if the one included in Froyo for the Legend will also work with the Legend on Eclair.
The package name is com.htc.flashlight
Thanks!
U don't have to wait....
Try this APP: Lamppu
But first u have to (Soft)root your Legend with (Universal Androot)
After that, install superuser APP. Now start Lamppu and allow superuser rights...
Now u can use your LED as torch.
Tried it self on my legend v.2.1
Sure about the name?
The only thing I found in the Modaco ROM was Flashlight.apk
Then again...I have no clue what I am doing
above file is not working
Yeah it doesn't install
Ok gentlemen, one more try.
Extracted, re-zipped and signed the apk using apk-manager.
Removed the system app from my phone using TitaniumBackup and installed the signed apk through Root Explorer.
Works for me. No guarantee that it does for any other ROM or Android version though.
Sorry for the video but I just found out how to do screencasts and love it
Its German but you should be able to understand it.
Notice that it is now uninstallable and listed as downloaded app.
denisman said:
Ok gentlemen, one more try.
Extracted, re-zipped and signed the apk using apk-manager.
Removed the system app from my phone using TitaniumBackup and installed the signed apk through Root Explorer.
Works for me. No guarantee that it does for any other ROM or Android version though.
Click to expand...
Click to collapse
Installed and ran for me in stock 2.1 but it didn't do anything with the flash when playing with it
Thanks for trying!
This one is installing correctly, and also loading correctly, but it doesn't light up the LED.
So it isn't working
Are you phones rooted?
First of all, you have to have deodexed apk and second, you need to set right permissions in sysfs.
Sent from my HTC Legend
BlaY0 said:
First of all, you have to have deodexed apk and second, you need to set right permissions in sysfs.
Sent from my HTC Legend
Click to expand...
Click to collapse
The apk is deodexed. As for the permissions. No clue how to set them right
Had to read up an hour last night just to learn enough to extract it. Big newbie here hehe. Guess I'll check some threads about sysfs permissions and try it again later.
Sysfs is everything under /sys directory. File /sys/class/leds/flashlight/brightnes should have read-write permission set for everyone.
Sent from my HTC Legend
BlaY0 said:
Sysfs is everything under /sys directory. File /sys/class/leds/flashlight/brightnes should have read-write permission set for everyone.
Sent from my HTC Legend
Click to expand...
Click to collapse
Ahhh thanks! I guess I understand now.
Ok I just flashed whitetigerdk's rev03 ROM which is a rooted 2.03 ROM.
Than I did the following in adb shell:
Code:
chmod 777 /sys/class/leds/flashlight/brightness
checked permissions with:
Code:
cd /sys/class/leds/flashlight
ls -l
and it has rw permission for everyone now.
Code:
-rwxrwxrwx root root 4096 2010-12-01 16:29 brightness
Problem is, that booting the phone resets the permissions.
EDIT:
I just repeated the procedure while the phone was booted in normal mode.
Permissions successfully changed AND flashlight is working correctly, including all three different light settings!
Still, a reboot resets the permissions.
Guess I have to find a way to make this change permanent now and all is done
Hah so cool. Never used chmod or any other linux command until today. Had to google everything while I was testing. Nice how much one can learn here.
Another EDIT:
Found something else that is interesting.
http://developer.android.com/reference/android/Manifest.permission.html#FLASHLIGHT
Would adding this to the AndroidManifest.xml help aswell? I'd do it myself but I have to work soon. Just tried it decoding the xml with AXMLPrinter and adding it. Unfortunatly I don't know how to save the xml in the right format again and just saving it corrupts the apk. If noone else wants to give it a try I'll check back after work.
denisman said:
Still, a reboot resets the permissions.
Click to expand...
Click to collapse
Yeah... this is done via init.rc which is inside initrd image. So you have two options... tweak init.rc (you would need to unpack boot.img image and extract initrd image, edit init.rc, make new initrd image and construct back boot.img... this can all be done in one swoop with dsixda's kitchen) or make a script that is run every boot (we are doing it via run-parts which also requires editing of init.rc... once again dsixda's kitchen can add this functionality in a single swoop)...
As for "android.permission.FLASHLIGHT" I'm not sure about it as I can see that HTC is doing it avoiding it (setting permissions to 666 by default in FroYo)...
If you want decoding/encoding xmls use ApkManager. It's a nice CLI tool that can decompile and compile apks back...
You are quite a fast learner, congrats.
Back home Got pretty late.
I don't actually need this since I am running a rooted Froyo ROM anyways but thought it would be an interesting task to get this working for others to easily use it and for me to learn more about Android. The first option sounds like it would require a bit too much end-user activity and would be limited to a certain set of ROMs if I understand it correctly.
Leaving the second and third option as the most user-friendly ones I guess.
I will read up more on init.rc and ways to script for it tomorrow. Sounds like a very powerful "tool" to know.
For now I will concentrate on the XML. Might be the most comfortable and ROM-independent way if I get it to work.
BlaY0 said:
As for "android.permission.FLASHLIGHT" I'm not sure about it as I can see that HTC is doing it avoiding it (setting permissions to 666 by default in FroYo)...
If you want decoding/encoding xmls use ApkManager. It's a nice CLI tool that can decompile and compile apks back...
Click to expand...
Click to collapse
Used Apk Manager to extract, zip and sign the apk in the first place. Really nice tool. Just didn't find an option to convert the xml from binary to readable, that's why I used AXMLPrinter2.jar which can do the conversion one-way but not back to binary.
I'll find a way
Thanks again for the input! Helped me a lot!

[Guide] Expanding the limit of multitouch points (root needed)

Let's cut the crap. Seems like somebody on a Chinese forum figured out the way to apply the mod to MM2. I just translate it into English.
1. Download the attachment and unzip milestone2_more.ko to the root of sd
2. mount /system/ r/w
3. copy milestone2_more.ko to /system/lib/modules/
4. open terminal emulator
5. input the following command
su
chmod 644 /system/lib/modules/milestone2_more.ko
insmod /system/lib/modules/milestone2_more.ko touch_num=6
(the guy said if you choose a number greater than 6 the system will crash)
now you should get a 6-point-multitouch
original thread: http://bbs.gfan.com/android-1997547-1-1.html
Thank you soooooooo much! )))
Works but MT is still buggy...
oh my god.. thank you, it works.
5 is more than enough
OMG!! You made my day!
Sent from my A953 using XDA Premium App
Is this permanent? Or it'll go away when we reboot?
Sent from my A953 using XDA App
It will go away when you reboot, but its not a big deal to use the command again
Sent from my A953 using XDA Premium App
Just make a init.d script to load it up when the system boots and you won't have to worry about it again..
Just did this, but I think i wrote it wrong. Please correct me
I created a blank file and wrote inside it:
insmod /system/lib/modules/multitouchfix.ko (I replaced the name)
And saved the file as 99multitouchfix inside /system/etc/init.d/
I also fixed permissions for both files
Sent from my A953
Is it working Aragorn?
Thank you. I'll try it when I get home!
inheme said:
Is it working Aragorn?
Click to expand...
Click to collapse
Nope. The module works, but not the init.d script
you can use autostart from Market
AragornPE said:
Nope. The module works, but not the init.d script
Click to expand...
Click to collapse
Try this script:
Code:
#!/system/bin/sh
# Load 5 finger multitouch module
insmod /system/lib/modules/defy_more.ko
Also note that the first touch after reboot is delayed.
dangpzanco said:
Try this script:
Code:
#!/system/bin/sh
# Load 5 finger multitouch module
insmod /system/lib/modules/defy_more.ko
Also note that the first touch after reboot is delayed.
Click to expand...
Click to collapse
I'll try that as soon as my M2 wakes up, long day for it today =P
Actually,the patch is developed by korean , the XDA thread is http://forum.xda-developers.com/showthread.php?t=1162327
Autoload after reboot: copy install-recovery.sh to /system/etc and set rwxr-xr-x .
If you wanna change the touch point limit , open install-recovery.sh with text editor , change the number that follows "touch_num=". The range is 1~10.
My own test shows more than 6 touch points will NOT lead to system crash , but make it back to 2 points...orz. Since the same patch on D2/D2G/DEFY enable up to 10 points, why
m2 cound not
Ah, forgot to say , the autoload patch is ported from http://bbs.gfan.com/android-1997547-1-1.html
Neither autostart or init.d script worked. Going to try the install recovery
Sent from my A953
Install recovery didn't work either
Maybe I'm doing something wrong?
Sent from my A953
AragornPE said:
Neither autostart or init.d script worked. Going to try the install recovery
Sent from my A953
Click to expand...
Click to collapse
Did you set the permission properly,both milestone2_more.ko and install.sh.
All works fine, both the milestone2_more.ko and the install recovery, no problem at all, have 4 MT points now

Stock ROM's bootanimation...

I have a special request. Is there a way to retain the bootanimation of the NookColor's 1.2 Stock ROM? Or at least can someone create a bootanimation.zip that has the Stock ROM's boot animation? I can provide you an original nandroid of the STOCK ROM if it's needed. I hope someone can do this.
Here... extract this zip file, remount /system/ rw and adb the bootanimation (NOT the zip) to /system/bin/ and you will have B&N's 1.2 stock animation.
DizzyDen said:
Here... extract this zip file, remount /system/ rw and adb the bootanimation (NOT the zip) to /system/bin/ and you will have B&N's 1.2 stock animation.
Click to expand...
Click to collapse
This. Is. Wicked. Thanks a lot!
UPDATE:
erm... it didn't work for me. Once I placed the content of the zip (bootanimation), in the system/bin it just gave me a blank screen then it went straight to my homescreen. What am I doing wrong? well maybe because I placed the file manually using root explorer. can you tell me how to do it using adb in windows and adb wireless on the nook? what commands should I put on the adb?
UPDATE 2:
I was able to push the file using adb. It still didn't work for me. Maybe we're missing some files? I remember when I'm putting custom bootanimations, I also place a bootanimation.zip in the /system/media directory of the nook...
les02jen17 said:
This. Is. Wicked. Thanks a lot!
UPDATE:
erm... it didn't work for me. Once I placed the content of the zip (bootanimation), in the system/bin it just gave me a blank screen then it went straight to my homescreen. What am I doing wrong? well maybe because I placed the file manually using root explorer. can you tell me how to do it using adb in windows and adb wireless on the nook? what commands should I put on the adb?
UPDATE 2:
I was able to push the file using adb. It still didn't work for me. Maybe we're missing some files? I remember when I'm putting custom bootanimations, I also place a bootanimation.zip in the /system/media directory of the nook...
Click to expand...
Click to collapse
I know most had a zip in /system/media.... but the stock 1.2 didn't have anything related.... looking through the file I posted, it references some .png files that also are not present... I assumed they were contained as data in the file itself... I will look some more and get this setup for you... Sorry for shorting the research on this one.
Maybe the way Root Tools works will show the way.
Similar discussion here.
I hope we can have an update on this one soon... :'(
les02jen17 said:
I hope we can have an update on this one soon... :'(
Click to expand...
Click to collapse
We will... sorry got busy with some stuff on the IMEI Generator... will track it down for you.
Is there some reason this needs to be done? Deviating from the CM7 code is bound to cause issues....
patruns said:
Is there some reason this needs to be done? Deviating from the CM7 code is bound to cause issues....
Click to expand...
Click to collapse
Just thought it would be cool to retain the stock bootanimation, that's all. The device is still a NookColor after all, even after installing a CyanogenMod ROM in it. It would be nice if the device would say 'NookColor' when it boots. Just my opinion, though.
Sent from my NookColor using Tapatalk
It needs to be in the correct format. If you can break it down, it will work:
http://nookdevs.com/NookColor_Boot_Animation_editing_and_replacement
So maybe play it in the SDK, and record the screen?
EDIT: Or try pushing it to data/local
Also, read through this: http://forum.xda-developers.com/showthread.php?t=863439
When all hope seems lost...
When I thought that all hope seems lost on my desire to get the NC's stock bootanimation, in my NC running cyanogenmod, I came across this amazing stock-that-has-been-rooted bootanimation in YouTube... I think it's fate. LOL.
Pretty neat stuff, courtesy of Suteru. On the YouTube page is a link to the bootanimation.zip
Yup, I installed the bootanimation and it's wicked cool. (^_^)
les02jen17 said:
Just thought it would be cool to retain the stock bootanimation, that's all. The device is still a NookColor after all, even after installing a CyanogenMod ROM in it. It would be nice if the device would say 'NookColor' when it boots. Just my opinion, though.
Sent from my NookColor using Tapatalk
Click to expand...
Click to collapse
Put the bootanimation.zip file in the /data/local folder. It will override the bootanimation in the system/bin as long as it's there. If you delete it, the stock animation in /system/bin will show. FWIW, I like this animation from NookDevs which is a variation on the stock animation:
http://www.youtube.com/watch?v=apy-ZcdqZFA&feature=related

Enabling just Night Light in framework-res

Hello everyone, I was looking to just enable Night Light on our 6P instead of having the whole Pixel experience.
So I read a few things about implementing night light, https://source.android.com/devices/tech/display/night-light
I found that config xml and edited from the android-7.1.2_r4 AOSP repo and made a modified framework-res.apk.
When I push the apk to my phone it gets stuck at the boot animation. I've tried both 755 and 644 file permissions on it.
I suppose this might not be the way to do it, but are there more specific changes I need to do instead when I want to build the framework-res.apk for the 6P?
Also, I didn't change the default manifest XML before syncing the repo.
And entered: lunch aosp_angler-userdebug
Any insight is very much appreciated!
Okey, so I definitely overlooked this, but all you need to do is decompile framework-res.apk and goto values/bool.xml and then locate the 2nd line regarding 'night' and change from false to true. Then recompile, push and reboot!
Do you mind doing a step by step?
Sent from my Nexus 6P using XDA-Developers Legacy app
+1 for step-by-step. Root is needed or no?
lilgrass71 said:
Do you mind doing a step by step?
Click to expand...
Click to collapse
forzdaZE96 said:
+1 for step-by-step. Root is needed or no?
Click to expand...
Click to collapse
His last post is a step by step. There's plenty of guides on XDA on how to decompile an app. If you're not sure where to look, just Google "XDA how to decompile an app."
Not trying to be rude, but you're basically asking OP to write up an entire guide here for you when plenty of them already exist. Good luck.
Sorry, this may be a dumb question...
If I were to make this modification, would this prevent me from applying system updates via FlashFire? Or will a system update via FlashFire just remove this modification and require me to apply it again?

Categories

Resources