yashsingh1/xdaforums huggingface dataset:
[Android Software Development] rerraw:
Yes I tested recompiled framework-res.apk with stock ROM every time show FAIL in Odin

Info: but I don't Sign the framework-res.apk after the recompile. Just I Replaced the old version of framework-res.apk within system/framework/framework-res.apk to the edited recompiled version. Then I recompiled system.img and put it to stock ROM, I used it with ODIN then show me FAIL error

Also, i used file_contexts from boot.img/ramdisk/file_contexts with system.img during compile by using Tool Unpack Repack DAT + IMG V3

Does must I resign framework-res.apk?

Does must recompile boot.img because I compiled it fro get file_contexts from ramdisk.img?
[Android Software Development] :
Because Odin flashes tar files and I believe your system image is wrong format. And maybe needs to be signed
[Android Software Development] rerraw:
How do you know my system.img the wrong format? I formatted it without any error I think the error due to framework-res.apk please lead me to correct my error explain to me how I can assign the framework-res.apk?
[Android Software Development] :
I don't think u can flash a modified system.img in Odin. Better to use twrp if it's available
[Android Software Development] Thebear j koss:
You shouldn't be modifying system img unless you are building a ROM from source, and even then it should only be used to create a ROM that you would flash in recovery. ZIP format. Proprietary img files will not boot after modifying due to security features and checks to prevent them from being changed.

To all the amazing, smart, strong females that continue to change the world... Thank you.
[Android Software Development] djdarkknight96:
^^^^^ this
[Android Software Development] rerraw:
Also, I used TWRP fo installing modified system.img as zip file also show error or Fail

Info: I don't add or remove any file from System.img, only compiled it and then recompiled it, Then put it into zipping file then try to install it from TWRP also show error

Please Help me only I want to add the Arabic language to framework-res.apk I do all steps without error but after recompile system.img I can flash it by TWRP, ODIN, and z3x pro
[Android Software Development] Spannaa:
Maybe try just adb pushing the modified framework-res.apk to your device and seeing if it works before attempting to add it to system.img
[Android Software Development] Thebear j koss:
Can't use a system image. You need a ROM to flash. Go to your device forums and look for a stock ROM to modify. Most devices have devs that take stock system imgs and turn them into flashable ROMs. If none are available there are programs that can turn imgs into modifiable apps, like android kitchen. You cannot use or flash an img file at all. You will wind up bricking your device as you will either fry you dfuse or destroy your partitions.

To all the amazing, smart, strong females that continue to change the world... Thank you.
[Android Software Development] [] AL []:
And with all the news about flaming phones, I for one would rather not play with a Samsung's efuse...

?
[Android Software Development] rerraw:
Thanks, i tried this method also say framework-res.apk read only

But Problem, not this! because I try to overwrite the framework-res.apk by root explorer I success in this step but device stop on boot loop I tried to wipe cache data but show error dm-verity verification failed.

---------- Post added at 09:14 AM ---------- Previous post was at 09:08 AM ----------

Thanks, i now Know that can't use img files to flash with ODIN and custom recoveries. Also, i tried some scripts to modify system.img to flashable file by Odin and recovery but also fail

Now I overwrite framework-res.apk by using root explorer but my device stopped on boot loop and don't power on. also try to wipe cache data and partitions but in recovery show me dm-verity verification failed
[Android Software Development] djdarkknight96:
Try this, take your edited resources.arsc and drop it in untouched framework then flash it in recovery with an update zip. That's should work if your edits are fine.
[Android Software Development] :
You can use a system.img to flash u just need to convert it before flash using simg2img then you can mount it and replace the framework-res so u can use system.img that isn't the issue [emoji14] just direct to the proper path and you're done
[Android Software Development] rerraw:
I Transfered the resources.arsc and res folder from modified version to original version

1- I used put modified framework-res.apk into update.zip folder and installed with TWRP installation successfully complete but after reboot every time the phone return to recovery TWRP mode

2- Then I flashed my phone by stock ROM (now pine work without any problem) The installed TWRP gain and put the Original framework-res.apk into update folder also the same problem after reboot phone return to TWRP recovery mode

Now I have the problem with modified and original framework-res.apk.

---------- Post added at 10:59 PM ---------- Previous post was at 10:55 PM ----------

Thanks now only I want to install or flash framework-res.apk my problem with this file. I want to find the right method to flash framework-res.apk without cause any problem I tried more methods but every time show me errors like dm-verity verification failed , Fail to flash and stuck on boot loop
[Android Software Development] djdarkknight96:
Well you didn't need to include res, all values folders are in resources.arsc. Some things in xml or raw don't compile without bugs so to eliminate that only move resources.
[Android Software Development] :
Looks like u have dm-verity enabled that cause the bootloop :)

And to cause it to not flash
[Android Software Development] [] AL []:
I don't have a Samsung phone, but I do replace my phones' framework-res. apk all the time.

DJ is right in saying that you don't need to replace the "res" folder IF you didn't change any png files. The "resources.arsc" files basically covers all xml changes and "classes.dex" for smalj changes. But personally, I always delete the res folder from a copy of the original and paste in the built one anyway.

The most important thing here is though that (unlike res folder and classes.dex) the resources.arsc file HAS TO be pasted in (using 7-zip) with the function "Add to archive..." and making sure that "Compression level" is set to "Store".

Then simply make yourself a recovery flashable zip (which obviously needs signing) and you should be all set.

Last advice: ALWAYS also make yourself and UNDO zip with the original framework-res. apk so if you boot loop, you can recover.
[Android Software Development] showofdeth:
I'm scared to ask due to the stern warning about what to/not to post here but f*ck it. Can this tool be used to disable ads in apps not purchased from the Play Store? Not all ads just the annoying ones that blast ad sound even when the app was closed. Also I'd like to change the theme from dark to light. Is that possible also?
[Android Software Development] djdarkknight96:
All possibilities, theming it only possible if not webview app. Means loads a site for UI. Many do, then you can't change theme. Otherwise for sure you can! AD blockers work, use those. Hacking to block ads have a lot of involvement. Can be done yes, easy no!
[Android Software Development] showofdeth:
That's somewhat good news I guess. Thanks. Looks like I'll be spending the weekend learning as much as I can to get it done. Thanks again.
[Android Software Development] Mr_Happy:
I have the same issue, were you able to resolve it?
[Android Software Development] Train88:
[MENTION=3924617]iBotPeaches[/MENTION] i would not bother you unless i could figure something out, but starting with YouTube 12.09.57 there are some things occurring that are preventing me from doing my thing. In both styles and colors xmls, there is an equal number of apktool dummy lines as missing styles/colors. I took the time to copy/paste the colors and apktool dummies to txt files to illustrate what I mean, and I zipped up the last "good" YouTube decompile, messed up decompile, fw used, etc. I hope it is of some use to you

https://www.dropbox.com/sh/eekkdkbt8t3jwz6/AADV9LuIgPGpwPG7EVz7q1D7a?dl=0
[Android Software Development] ctakah27:
Please delete post sorry wrong thread
[Android Software Development] xdagee:
Maybe this too early but...

Maybe this is too early but this is the error I encountered when I tried to install framework-res.apk of the Android O developer preview 1 from the system dump of the sailfish device.

C:\apktool>apktool.bat if framework-res.apk
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 111
at java.lang.String.substring(Unknown Source)
at brut.androlib.res.decoder.StringBlock.getHTML(StringBlock.java:162)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:315)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:241)
at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:226)
at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:156)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:118)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:80)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:39)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:640)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:622)
at brut.androlib.Androlib.installFramework(Androlib.java:683)
at brut.apktool.Main.cmdInstallFramework(Main.java:241)
at brut.apktool.Main.main(Main.java:87)

C:\apktool>
[Android Software Development] MatiasLopezxD:
same for me :c
[Android Software Development] rerraw:
Thanks so much my Bro you helped me more until my problem solved

Tow day I try in two ways with new correct upddate.zip

First: Only deleted the resources.arsc and installed from TWRP without any problem and not stuck on boot loop

Second: I deleted box resources.arsc and res folder also installed successfully without stop on boot loop

But don't appear Arabic (العربية) language name until I select it from Settings>Lnguage and input>Language!

Is the language names array in framework-res.apk? or in SecSettings2.apk? or in SystemUI.apk?

If the language names array doesn't appear from above apk 's after translation how to can add new language name until appearing in Settings>Lnguage and input>Language?

---------- Post added at 04:05 AM ---------- Previous post was at 03:59 AM ----------

Thanks my Bro also I try your way from TWRP and installed without any problem and not stop on boot loop I thin my error from update.zip folder
[Android Software Development] dimm0k:
trying to edit the AndroidManifest.xml for the Human Japanese app so that I can change the app to open up only in portrait mode, but after the edit, attempts to recompile keep failing. any suggestions?

WARNING: linker: Warning: unable to normalize ""
../../../../storage/emulated/0/Download/base_src/smali/o/iF$?.smali[50,0] missing EOF at 'ethod'
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: o/iF$?.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:77)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:61)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:38)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:405)
at brut.androlib.Androlib.buildSources(Androlib.java:336)
at brut.androlib.Androlib.build(Androlib.java:292)
at brut.androlib.Androlib.build(Androlib.java:264)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)
I: Using Apktool 2.2.2-Black
I: Smaling smali folder into classes.dex...
[Android Software Development] djdarkknight96:
Looks like a warning....

Also--

Editing manifest will have many issues, it most likely will not install once modified. Even if you push it to system it will not survive a reboot.
[Android Software Development] dimm0k:
ugh, figures there is no easy way to get this app to display properly... thanks for explaining
[Android Software Development] djdarkknight96:
Email the dev, unless it's discontinued?
[Android Software Development] dimm0k:
I've tried... in fact I contacted them more than a year ago and again recently only to be told he's working on something else at the moment so his hands are tied. not sure how much time is needed for a change like this, but I was hoping to make a change like this more permanently... instead I've tried to Take and Rotation Locker, which works but it's not perfect
[Android Software Development] djdarkknight96:
Ah, that's kinda why I started using android studio. Started making my own apps from the ones I loved were discontinued. Mostly widget apps. Tons of tutorials and libraries you can port in. Might try creating your own. Not sure how involved that app is though.
[Android Software Development] MatiasLopezxD:
Any update with support for android O?
[Android Software Development] zelendel:
Not until the source code is posted. Which should be some time around October.
[Android Software Development] Thebear j koss:
Lol. Wonder when people will just start asking for support for P or Q...

The stupid leading the dumb.
[Android Software Development] zelendel:
Excuse me?
[Android Software Development] Ticklefish:
Generally it's best to wait until nearer the official release. Google could still change so many things with the next version that there's really no point making a tool to decompile it. That tool could stop working the very next day.

It's always the way though. Us modders are an eager lot. :D
[Android Software Development] Thebear j koss:
I'm thinking you are taking offense to my sig. Not at all directed at you. Tapatalk uses sig across all forums... If not, i was just stating that people get a bit overzealous and ahead of what is physically capable of devs.

The stupid leading the dumb.
[Android Software Development] zelendel:
Yeah it looked like your sig was a reply to my post that you quoted. No worries
[Android Software Development] Ticklefish:
Ah, yes. I remember having this issue ages ago. It's worth putting some sort of line just before your signature perhaps. It could make it clearer that it is your signature and not part of your text.

Just a suggestion, it's up to you. :)
[Android Software Development] Thebear j koss:
Good idea. Sorry for the confusion [MENTION=1140856]zelendel[/MENTION]

The stupid leading the dumb.
[Android Software Development] djdarkknight96:
I almost died laughing......eating popcorn waiting on funny reply from Bear. Lol
[Android Software Development] Thebear j koss:
I mellowed in my old age. Plus i know Zelendel from plenty of threads i visit often too, last thing i am calling him is stupid or dumb. Lol. Still need to fix my sig, i keep forgetting.

================================================

The stupid leading the dumb.
[Android Software Development] seanskiT!:
I like the sig, it applies in this day and time more than ever.

Just keep it separated like you have it now.
[Android Software Development] Thebear j koss:
Agreed.

=============================================

The stupid leading the dumb.
[Android Software Development] Gmistick:
Recompiled apk contain unresolved dependencies

Hi,

I have a recompiled apk that sometimes crash due to unresolved classes.. am i missing some fundamental step in the rebuild process?

1. Decompile with apktool -d

2. Modify relevant parts, localization etc.

3. Rebuild using apktool -b

4, install apk
[Android Software Development] [] AL []:
5. Sign the apk (if it is not a system app)
[Android Software Development] Gmistick:
Obviously i sign the APK, but signing can't be related to "unresolved class" exceptions that crash my localized app...
[Android Software Development] bovirus:
[MENTION=3924617]iBotPeaches[/MENTION]

Any news (from 23.01.2017) about apktool developing?
[Android Software Development] Thebear j koss:
Post a log. Nobody can tell what your crash is or why.

=============================================

The stupid leading the dumb.
[Android Software Development] bovirus:
[MENTION=3924617]iBotPeaches[/MENTION]

Warning during apktool compilation with JDK 1.8.x (64bit) in Windows 10 x64.

-------------------------------------------------------------------------------------------------

:brut.j.common:compileJava

warning: [options] bootstrap class path not set in conjunction with -source 1.7

1 warning

:brut.j.util:compileJava

warning: [options] bootstrap class path not set in conjunction with -source 1.7

Note: D:\GIT\Apktool\brut.j.util\src\main\java\brut\util\Duo.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

1 warning

:brut.j.dir:compileJava

warning: [options] bootstrap class path not set in conjunction with -source 1.7

1 warning

:brut.apktool:apktool-lib:compileJava

warning: [options] bootstrap class path not set in conjunction with -source 1.7

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

1 warning

:brut.apktool:apktool-cli:compileJava

warning: [options] bootstrap class path not set in conjunction with -source 1.7

Note: D:\GIT\Apktool\brut.apktool\apktool-cli\src\main\java\brut\apktool\Main.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

1 warning

:brut.apktool:apktool-lib:compileTestJava

warning: [options] bootstrap class path not set in conjunction with -source 1.7

1 warning

-------------------------------------------------------------------------------------------------

What's about theese warnings with JDK 1.8.x (1.8.121) x64?

There are no warnings with JDK 1.7.x. (1.7.0.80) x64. But JDK 1.7.x is quite old and in many other projects is reuired JDK 1.8.x..

Could you please source code to have a compilation without warnings with JDK 1.8.x? Thanks.
[Android Software Development] iBotPeaches:
Ignore the warnings. I put a source compatibility limit on Java 7, so it can run on 7. For some reason, building with 8 wants the source to be compatible with 8. I do not want that, as I want to keep the minimum java version to 7. You are welcome to investigate why Gradle is doing that and submit a fix. I'm busy working on Android O and other tickets to look at a warning.
[Android Software Development] deadlock9x:
I can not decomplie and recomplie this APK

Hi [MENTION=3924617]iBotPeaches[/MENTION], thank you for your great tool. It was help me so much. But I have some issue with this APK, can you let me know why I can not decomplie and recomplie this apk: http://www.mediafire.com/file/pxzpavuknkuds39/Launcher.apk
[Android Software Development] Thebear j koss:
Need to update the smali/baksmali I believe. If that is google's new launcher for O builds, no code is available yet.

=============================================

The stupid leading the dumb.
[Android Software Development] toole:
Please can anyone tell me what files I need to edit to change the way an app shows notifications and to change the app name universally.
[Android Software Development] Ather:
I'm trying to recompile systemui from Nougat rom for tab s2, but i keep getting this same error, with apktool 2.2.2, 2.2.1

I've attached the log, can't seem to figure out what the problem is, I've installed Java 1.7 and disabled 1.8 aswell.
[Android Software Development] djdarkknight96:
You have N framework installed? Also check those styles it says are missing. I didn't look but looks like TouchWiz framework styles. Need that installed to apktool as well.
[Android Software Development] Ather:
Yes N framwork-res is installed, those styles are just warning, they're common in Nougat apks for samsung, its the error thats causing the issue
[Android Software Development] Ticklefish:
Try installing samsung-framework-res.apk as well before you decompile. That might fix it.
[Android Software Development] bill_kevin:
someone help me what is going on, framework-res is not compiled i just change some code in res/value: styles.xml and colors.xml

C:\apktool test 2>apktool b framework-res
I: Using Apktool 2.2.2
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'bixby_edgecase_carmode' has no default translation.
W: warning: string 'bixby_edgecase_dexmode' has no default translation.
W: warning: string 'bixby_edgecase_dexstation' has no default translation.
W: warning: string 'bixby_edgecase_emergencymode' has no default translation.
W: warning: string 'bixby_edgecase_kidsmode' has no default translation.
W: warning: string 'bixby_edgecase_mirrorlink' has no default translation.
W: warning: string 'bixby_edgecase_mpsm' has no default translation.
W: warning: string 'device_storage_low_htap_here_to_view_related_settings_m_stat
us' has no default translation.
W: warning: string 'multisound_app_uninstalled_toast' has no default translation
.
W: warning: string 'multisound_sound_via_bluetooth' has no default translation.
W: warning: string 'multisound_sound_via_headphone' has no default translation.
W: warning: string 'multisound_sound_via_phone_speaker' has no default translati
on.
W: warning: string 'multisound_sound_via_usb_audio' has no default translation.
W: warning: string 'sec_next_button_label' has no default translation.
W: warning: string 'sem_colorpicker_gradient_color_seekbar_string_brightness' ha
s no default translation.
W: warning: string 'sem_colorpicker_gradient_color_seekbar_string_slider' has no
default translation.
W: warning: string 'sem_colorpicker_gradient_color_wheel_string_color_wheel' has
no default translation.
W: warning: string 'sem_colorpicker_gradient_color_wheel_string_hue_and_saturati
on' has no default translation.
W: warning: string 'sem_colorpicker_recent_color_view_string_double_tap_to_apply
' has no default translation.
W: warning: string 'sem_colorpicker_recent_color_view_string_fifth' has no defau
lt translation.
W: warning: string 'sem_colorpicker_recent_color_view_string_first' has no defau
lt translation.
W: warning: string 'sem_colorpicker_recent_color_view_string_fourth' has no defa
ult translation.
W: warning: string 'sem_colorpicker_recent_color_view_string_option' has no defa
ult translation.
W: warning: string 'sem_colorpicker_recent_color_view_string_second' has no defa
ult translation.
W: warning: string 'sem_colorpicker_recent_color_view_string_sixth' has no defau
lt translation.
W: warning: string 'sem_colorpicker_recent_color_view_string_third' has no defau
lt translation.
W: warning: string 'smart_glow_m_application_name' has no default translation.
W: warning: string 'smartglow_low_battery_notification_text' has no default tran
slation.
W: warning: string 'tethered_notification_title_mtr' has no default translation.

W: warning: string 'tethered_notification_title_tmo' has no default translation.

W: warning: string 'wfcSpnFormat' has no default translation.
I: Building apk file...
I: Copying unknown files/dir...
[Android Software Development] Thebear j koss:
It built. Those are warnings. Ignore them.

=============================================

The stupid leading the dumb.
[Android Software Development] bill_kevin:
yes it is compiled but with big size
[Android Software Development] Ticklefish:
I'm guessing the original is on the left and the compiled on the right? The only significant difference in size I can see is that you don't have the META-INF folder in the right APK. All you need to do is drag and drop the res folder and resources.arsc from your compiled APK to the original APK using 7Zip. Your modified original APK should install.
[Android Software Development] deadlock9x:
Thank you for your answer, but it's the launcher of Android 5 Lollipop, I don't know why I can decomplie other launcher when I can not do that with it
[Android Software Development] Thebear j koss:
Try updating your smali/baksmali tool. I think it is located in the link of the OP of thus thread.

=============================================

The stupid leading the dumb.
[Android Software Development] deadlock9x:
Hi, can you let me know how to update smali/baksmali tool? I see this topic but I don't know how to use: https://xdaforums.com/showthread.php?t=2311766