yashsingh1/xdaforums huggingface dataset:
[Android Software Development] aydin.gsm1:
hi bro,

First I could not root properly this non-standard device (g6000) and I had to flash with edited system.img .

But today I found a correct twrp kernel an root that.

I was replace apk via rootbrowser and I seen apk doesn't have any problem.

Now my problem is replacing :crying::crying::crying:

sudo rm /home/riza/Desktop/p/sys/priv-app/SecSettings2/SecSettings2.apk
sudo cp /home/riza/Desktop/p/SecSettings2.apk /home/riza/Desktop/p/sys/priv-app/SecSettings2/SecSettings2.apk
[Android Software Development] anees02:
But some system apps have their libs inside apk package not a separate lib folder.

So what is the difference?

Could I move the lib folder from inside apk package to a separate folder like the photo you have posted without problems?
[Android Software Development] djdarkknight96:
Yes but leave them in the apk too. What apps have libs only in the apk? Not all apk's have libs though.

System/app/appname/libs/arm/

System/app/appname/libs/arm64/
[Android Software Development] anees02:
I mean that for example SamsungIME.apk

I found a ported SamsungIME and its lib like this /system/app/SamsungIME/SamsungIME.apk/lib

(If you open the apk using 7zip you will see lib folder inside)

But the stock app I have as follows

/system/SamsungIME/lib

So what is the difference between 2 apps?

One it's lib inside the apk package and another its lib outside apk package.
[Android Software Development] djdarkknight96:
You need the libs inside for sure so leave it, it depends on the app. System apps are not going to matter because they are already system. Just replace the apk, they must already have the library set. I was speaking mostly converting playstore data installed apps to work on system. You don't need to worry about libs if the apk is already system.
[Android Software Development] Ticklefish:
You could use testsign.jar. That works for most things.

Just remember that, if you're modifying a system app (like framework-res.apk, SystemUI.apk, etc) you'll need to either sign all the other system APK and JAR files the same way or disable signature verification on your device.

If you're using Nougat, disabling signature verification is pretty much essential.

I'm sorry but I don't really understand what your problem is. You said that you replaced the APK with rootbroswer and it worked but now you have a problem 'replacing'?
[Android Software Development] L4zyD0g:
Where can I download testsign.jar ? Is it a single file that I need to paste on the folder of my apktool?
[Android Software Development] Ticklefish:
If you Google "testsign.jar" the very first result has a link to download the file and a quick guide to using it. It's a very simple tool to use.
[Android Software Development] aydin.gsm1:
it is ok when replace it via rootbrowser, but I want to modify a flashable binary.

I replace apk in linux on mounted sisyem.img file but after flashing nothing shown on Settings folder!
[Android Software Development] :
To use deodex you need permissive kernel on Samsung ?

---------- Post added at 11:00 AM ---------- Previous post was at 10:56 AM ----------

So you can't use it on a modified system image? Strange i use Huawei but I can do for sure replace files in system apps and priv-app folder without issues. Are you being able to parse the file without getting parse error? If not that's the cause

Check if it isn't corrupt I had similar issues when I worked with g3
[Android Software Development] WILMANS2M:
Mmh I use a Deodexed MM rom with enforcing kernel without problems

Envoyé de mon GT-I9505 en utilisant Tapatalk
[Android Software Development] aydin.gsm1:
when I replace it manually I dont get error.

when I remove and copy again Official APK in linux (2 version of linux mint that before used for other model, tested) it is corrupt.
[Android Software Development] :
Well that's why it doesn't work. I know Huawei can run with "corrupt" packages but I don't believe Samsung can. If you modified manifest.xml or androidmanifest you'll need to re sign the application. If not you haven't gotten the old meta-inf to be copied properly. I had exactly same issue with my G3 ux 4 rom it worked if I copy pasted it but not when I made a flash zip. So you'll have to fix that.

It's a data bug or dalvik cache bug.
[Android Software Development] aydin.gsm1:
after modding and creating image I flash it and get error on device.

riza-virtual-machine SecSettings2 # ls -l
total 12404
drwxr-xr-x. 2 root root 4096 Oct 17 2015 arm
-rw-r--r-- 1 root root 12693632 Nov 2 16:23 SecSettings2.apk
riza-virtual-machine SecSettings2 #

---------- Post added at 02:56 PM ---------- Previous post was at 02:46 PM ----------

no problem about apk, because I replace it via rootbrowser ant it worked fine.

I want to modify a flashable image file, my issue is this,

when I copy SecSettings2.apk on SecSettings2 folder and repack the image and flash it, after device booting up I get error about settings,

this issue happened about both modified & official apk

It occurs when I replace the apk!!!!
[Android Software Development] :
Yes as I said it's because of a bug in dalvik cache or data. If you wipe factory reset it won't work. Try it
[Android Software Development] ivan_sengir:
Do you know if is possible to rebuild an apk with APKtool but using Proguard or any other tool to obfuscate the code?
[Android Software Development] iBotPeaches:
Proguard is pretty easy to rebuild with since it usually is just minification and obfuscation at the java level. If you step up into the enterprise Dexguard, then it becomes far more difficult. Android only cares about the resourceId in the pair of (resourceId, name). So if you have "button_submit" - 0x7f00001. Android doesn't care at all about the word "button_submit", it just wants the resourceId so it can find/load/reference that resource. So Dexguard and a few more tools now automatically set all names to the same value like "a". So now we have thousands of resources with the same name, but different resourceIds. When going back to human readable code, we have to assign some value that is unique to these resources so during compilation we can assign the proper resourceIds, because if you decode and have thousands of resources all called "a" it will be difficult to do anything.

So we make fake resource names to allow decode, but this paired with the non-standard characters used makes rebuilding quite difficult.

Also PS, please don't email me and ask the same exact question here. I deal with enough notifications, bug reports, chats and more to deal with duplicate questions.
[Android Software Development] 2111002640:
hi guys, i have a file i decompile it okay, but when in recompile it make an error

i'm try to install file framework.apk same with this file but it's still error,

then i'm try to remove "qihoo" in manifest, it recompile okay, but app can't open,

so everybody can help me, please ?? :(

https://mega.nz/#!UZp3HQrT!Lb1MZIJWWDxDPtB7NdvXN6zMYbxgM__NDvSZ-uK1J-M
[Android Software Development] Thebear j koss:
Using 7 zip drag original manifest from original apk into the rebuilt apk.
[Android Software Development] 2111002640:
thank you sir, i'm tried it, but when i install apk file, it's have error, attachment
[Android Software Development] Ibuprophen:
That looks more like an issue with permissions involving the package installer and not the app.

Parsing errors within the package installer usually points to package installer permissions and not the app itself.

Though, I have been wrong but, i have been right too... LMAO!
[Android Software Development] 2111002640:
so how can i fix it bro????
[Android Software Development] Thebear j koss:
Sign the apk after dragging original manifest. Or flash the apk to your system partition.

World peace can't be done. It just can't exist...
[Android Software Development] 2111002640:
Im signed apk file and flash it to system, but it not work :(
[Android Software Development] Thebear j koss:
Don't flash it after it is signed. Sign and install as a regular app OR after dragging the manifest over, just flash it. Don't sign it. Flash it afterwards. Not sure what app this is, and need more info than it not works. Does it show in app drawer? Does it f/c? Is it a system app or data app? Can you post a system log after installing or trying to open it?

World peace can't be done. It just can't exist...
[Android Software Development] 2111002640:
here my logcat, :(
[Android Software Development] Ibuprophen:
When it comes to Parsing Errors involving the Package Installer, there are 5 things to check/try out that is normally the culprit.

I tried to list them, the best i could, in order of severity...

1) The app may not be compatible with your android version AND/OR the app file may be corrupted where you may need to try downloading it again OR from an alternate source OR a newer/older version (depending on the app version and your android version compatibility).

2) If step 1 doesn't work or address the issue and the app is located on your external MicroSD, and giving the parsing error, try copying the app to an internal location (for example... your download folder), then try to install the app from there. If the app is located within your devices internal location, then do the opposite... Copy and paste the app to an external MicroSD location, then try installing it from there.

3) If step 2 doesn't work or address the issue then go to your settings -> security and make sure the "Unknown Sources" option is selected/turned on. This allows the installation of 3rd party/manually installing apps. If this is not selected/turned on, this would definitely cause issues some, most or all the time an app is being installed/updated.

4) For MM (Android v6.x), and If step 3 doesn't work or address the issue then go to your settings -> apps then select the 3 dotted menu (on the top right) and select "show system." Scroll down and locate "Package installer" and select it. Then select "Permissions" and see to it that all permissions are granted (which there is usually just 1 named "storage") that is indicated by the circle being to the right of the oval. If the permission(s) are not granted to the "package installer", then that would definitely cause parsing errors some, most or all the time an app is being installed/updated.

5) Lastly, If step 4 doesn't work or address the issue, and all else fails, you may need to Reset the device...

I really hope one of the above steps helps.

Also, if someone else has any suggestions that I may have missed or provided an error in any of the information, please chime in.

Good Luck!
[Android Software Development] djdarkknight96:
I'm almost positive it's not these issues assuming he's taking this from his device to mod.

I've never seen issues installing from sd card or internal. Shouldn't matter!

Unknown resources error isn't the same

Assuming stock installs he's got the right Android version apk

Usual Causes:

-Signature missing/mismatch

-bad manifest

Note: I didn't see anything in his log pertaining to install
[Android Software Development] Ibuprophen:
I understand you completely but, with all do respect to you as a Recognized Themer, i am not a noob nor an expert in this specific field but, with that said, i have seen this specific issue regarding app installation errors that had stemmed from installing apps within a devices internal storage and/or the devices external MicroSD storage as well as the other steps i had outlined.

Though I did state at the beginning of my post...

Also, in regards to this...

Please refer to Step 1 in which i had stated...

You actually stated the same thing but, in a different way...

Peace and Love!

Peace and Love!
[Android Software Development] djdarkknight96:
Pertaining to building apps these tips aren't what he needs, he caused the error. It's not from downloading someone else's issue. I've been editing apk's since eclair sir and he needs developer troubleshooting not user. You did not direct him to the manifest for the issue and that's where it lies. Nothing in your post says this sir! You have speculation only! Good day sir!
[Android Software Development] Ibuprophen:
I was under the impression that his error was specific to installing the Apktool app itself.

I apologize deeply for misunderstanding this issue.

Peace and Love!

Peace and Love!
[Android Software Development] evildog1:
Hi. Does apktool have ZipAlign feature?
[Android Software Development] Spannaa:
No, you need to use zipalign.exe after you've compiled your apk.
[Android Software Development] evildog1:
ok thanks
[Android Software Development] Claris2000:
Hello everyone,

I am trying to create a .bat file to build and align the apk like this:

@echo off
apktool b app
zipalign -v 4 app/dist/app.apk app-align-ok.apk

The application compiles fine, but at the end of compiling the cmd is closed and does not execute the command to align.

If I do it in two different .bat files there is no problem, but could it be done all in one .bat file?

Thank you,
[Android Software Development] djdarkknight96:
You must sign the app, if not a system app, before zip align will work correctly to my understanding.
[Android Software Development] Claris2000:
You're right. What I would like is in a single .bat file, build, signer and align.

@echo off
apktool b app
jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore my.keystore -storepass xxxxxxx -keypass xxxxxx app/dist/app.apk my
zipalign -v 4 app/dist/app.apk app-align-ok.apk

The problem is that when the build finishes, the cmd is closed and the application is not signed and aligned. The same process in three differents .bat files works perfectly.

Thanks,
[Android Software Development] djdarkknight96:
Google search is a wonderful thing lol

http://stackoverflow.com/questions/197976/executing-multiple-commands-from-a-windows-cmd-script

Scroll down to see a few different ways. [emoji1]
[Android Software Development] Ibuprophen:
I am just wondering...

This app is a great idea and Kudos for the efforts in improving it...

but, if the output file requires a signature to complete the process... Why not have that feature built in or create/refer to one?

It seems that a great portion of the feedback Post's are signature related.

Just wondering... I may be wrong but, for all I know you may be right... :laugh:

Peace and Love!

Peace and Love!
[Android Software Development] Spannaa:
Apktool decompiles and builds apks.

Signing/zipaligning etc. are additional processes with their own tools that can be used if/when necessary.

You could use a batch script to combine everything.
[Android Software Development] moluntic:
hi guys,i seriously need help,i cant recompile modified apks correctly, i share this problem before but not fixed.

my step:

decompiled secsetting2.apk of oem Rom (A7 2016)

just changed a string in res/value/string.xml

recompiled with original signiture

- the recompiled apk was just same as default one with no changes

i decompiled the final apk but that change in string.xml that i made was gone

i dont know where is the problem but it has no problem in other roms secsetting.apk and works correctly

here is the log when recompiling :

With Tickle My Android 14.1.0.0.

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

I: Using Apktool 2.2.0

I: Smaling smali folder into classes.dex...

I: Building resources...

W: E/ResourceType( 1592): Failed resolving ResTable_map name at 3048 with ident 0x02040076

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

W: warning: Package not found for resource #02010052

I: Copy original files...

I: Copy AndroidManifest.xml...

I: Copy META-INF...

I: Building apk file...

I: Copying unknown files/dir...

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

i used apktool v2.2.1 too byt same problem,please help

thanks
[Android Software Development] djdarkknight96:
Mostly because it's an apk tool thread and there are many ways to sign apps. Tutorials etc....

---------- Post added at 05:06 AM ---------- Previous post was at 05:05 AM ----------

And again these are not errors just warnings, search the thread a little you can find W: warning has been explained.
[Android Software Development] boostermbkking:
Recompiling "services.jar" With Original Signature,

in work area "_WorkArea1", using "apktool_2.2.1.jar"

With Tickle My Android 14.2.0.0.

(tinyurl.com\ticklemyandroid)

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

I: Using Apktool 2.2.1

I: Smaling smali folder into classes.dex...

Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65541

at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)

at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:329)

at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1027)

at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)

at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)

at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:63)

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)

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

Recompile Not Successful!

how to fix this error ??

recompiling service.jar of samsung s7 edge nougat beta android 7
[Android Software Development] Ticklefish:
Did you change any smali files? Apktool is unable to convert something in your smali.

My concern is those two warnings I've highlighted in red. Default translation warnings you can safely ignore but those two look a bit more serious.

Secsetting2 would be a Samsung file, right? Did you install both your framework files before decompiling? If so I would suggest searching for that ident "0x02040076" and seeing if you can work out what the problem is with it.
[Android Software Development] moluntic:
bro thanks for replying but i find the solution. the problem was tw-framework.apk and i used N7 rom's tw-framework and it worked
[Android Software Development] Ticklefish:
That's always good to hear. :good:
[Android Software Development] AndyShutler:
ETA for fixes of UTF8 characters in android names

I notice that one of the current issues being worked on is the issue of DexGuard obsfuscating classnames using UTF8 characters.

This is an issue that I am experiencing at the moment. I was wondering if I could get an idea how this is progressing (if at all)?

Thanks!
[Android Software Development] EMSpilot:
How did you disable signature verification in Nougat?

Cheers
[Android Software Development] Ibuprophen:
This XPosed Module is supposed to be able to do that...

http://xdaforums.com/xposed/modules/xposed-disablesignaturecheck-t2783480

Or i could be wrong.
[Android Software Development] Thebear j koss:
Holy crap!!! I haven't seen an EMSpilot post in forever...man you early Team nOObz guys were killing it on the s3. Good to see you still around. What device are you on? Most signature verification is a small edit or 2 in 1 of the jar files, like policy.jar or something. There are some great mods and easy to follow steps for samsung if you look at [MENTION=1042140]tdunham[/MENTION] 's threads. Hope you have a safe and happy holiday.

All common sense is gone. All that is left is stupidity.
[Android Software Development] EMSpilot:
HaHa I am on an LG V20 US996 Verizon. Fully rooted with TWRP.

Nice to hear from you. I finally got a new phone and dove back in LOL Keep in touch.

I guess my question is if I modify services.odex will Nougat see it as a bad signature? Or maybe I have to build the mod in a whole new Rom to make it work.

Cheers
[Android Software Development] Thebear j koss:
I am not 100% certain, but i believe you would need to deodex the rom to make it work, i know the new nougat builds that are deodexed are few and far between, but i know guys like [MENTION=4315551]Ticklefish[/MENTION] have been working on deodexing methods and the signature verification headaches new builds are causing. Maybe [MENTION=4315551]Ticklefish[/MENTION] will chime in, or in the meantime look in his profile for his thread which may have some better answers for you.

All common sense is gone. All that is left is stupidity.
[Android Software Development] Ticklefish:
That is a very good question. Sadly, I just don't know.

If you can turn services.odex into smali, modify it and turn it back into a Nougat-suitable OAT file it should theoretically work. I don't know any suitable tools for making ODEX files that work past KitKat though.

I've been experimenting with a tool called apksigner that Google have included in their latest SDK. Its supposed to be able to sign a file with the new, v2-style signature. I haven't been able to get it to work though..

So I don't know. Give it a try and let us know what happens. :)
[Android Software Development] EMSpilot:
Well we need the mod to disable signature verification check in Nougat. Then I believe we need to add the modded jar to the kitchen prior to building and signing the Rom.

Not sure how else to get a V2 verification that matches the Rom.

Cheers
[Android Software Development] iBotPeaches:
Short version - its difficult.

Long version - rebuilding Dexguard Enterprise applications is becoming seemingly more difficult to complete, due to changes required in both the aapt layer and apktool. In addition to random Nougat changes, Samsung problems and the continued cat n mouse battle of Dexguard its all very overwhelming to work on, so progress is slow.
[Android Software Development] Thebear j koss:
Users need to have patience, your continued support of apktool is much appreciated. Without you, no one would be doing any modding on android.

All common sense is gone. All that is left is stupidity.
[Android Software Development] VigneshS007:
When i try to open the .jar file it shows could not find the main class

Noob here
[Android Software Development] Ticklefish:
You're decompiling it with apktool?
[Android Software Development] VigneshS007:
i double clicked the apktool.jar file to open it...but i think its not the right procedure.... can u give me link to how to use apk tool?

Thank you bro
[Android Software Development] Ibuprophen:
You do know that the answer to your question is on the very first post...

This link is to answer your question i had grabbed from the first post in question:

https://ibotpeaches.github.io/Apktool/documentation/

Good Luck!
[Android Software Development] Sensible_Smarty:
can I use apktool 2.2.1 to decompile nougat apps, because i heared there's a new security checks on nougat apps