yashsingh1/xdaforums huggingface dataset:
[Fire HD 8 and HD 10 General] DragonFire1024:
I still have some things to try before I make a final assessment. Amazon did a real good job at mucking it up. I've had 3 of these tablets so far. The first one was a success. The second one was a mess and didn't work at all. The one I have now I haven't tried to mess around with it too much yet because I've been getting ready to move. Once I get settled I'll be able to resume more of my work. Until then I'm a little limited.
[Fire HD 8 and HD 10 General] smam1338:
I can't figure out what is going on. I can decompile the apk just fine, and then edit/save the files, but every time I try to rebuild the apk it freaks out and says "could not find sources".

It then goes to rebuild and throws several hundred lines of errors. I don't get a dist folder, but it does create a build folder with a folder called apk in side, however, that folder is empty.

No confirm of a rebuilt apk in cmd.

I get a manifest xml, but I definitely can't interpret that.

I gave myself absolute full control and ownership of framework-res folder (or verified, just to be sure).

If I put the apktool files in C:\Windows like the APKtool site dictates I can't even decompile the apk because of Windows permission restrictions of a protected OS folder.

Java installer would not allow me to install them in the same location, if that matters. I've uninstalled and reinstalled them twice, with reboots.

I attached an image of what I'm looking at.
[Fire HD 8 and HD 10 General] DragonFire1024:
The cannot find resources doesn't matter. You need to install java with administrative access. Don't forget to install the framework in apktool:

apktool if framework-res.apk

Aside from that, not sure what you did. I've never seen those errors before, even before I figured out how to do this. I'll need more info. Also this is likely to work only on 5.6.0.1.

Edit: it will work on other versions of FireOS as long as have a copy of the framework from other versions.
[Fire HD 8 and HD 10 General] smam1338:
Ah, okay. Didn't install JDK/JRE as admin.

I never ran the if command either.

I'll give it a go tomorrow, I'm sure it will work. I'm on 5.6.0.1.

Will update.
[Fire HD 8 and HD 10 General] smam1338:
:(

I guess I'm just going to use the apk you provided for 5.6.0.1 because I can't get this to work. Which is fine, but I'm frustrated that I can't figure this out.

I've reinstalled SDK, JDK, JRE (which is installed with the JDK installer), and APKtool.

I've added apktool.bat and apktool.jar to PATH, as they are not in C:\Windows. I even added C:\APKtool to PATH.

I've executed the following commands:

- to get the apk

adb pull /system/framework/framework-res.apk C:\APKtool

No problem there.

- install the framework-res.apk (2 ways)

apktool if framework-res.apk

Gives me some storage error (not available?) and saves 1.apk to \Users\<user>\AppData\Local\Temp

apktool if framework-res.apk --frame-path C:\APKtool

Saves 1.apk to \APKtool.

- to decompile

apktool d framework-res.apk

No problems.

- I made the edits to bools.xml and arrays.xml (so many times I've remembered them).

- and now to unsuccessfully recompile framework-res (2 ways)

#1 using cmd in \APKtool

apktool b framework-res

I get

and then about 300 lines of what appears to be nothing but various png files.

#2 using cmd as Admin and running the following from \system32

java -jar /APKtool/apktool.jar b /APKtool/framework-res

Again,

followed by the same several hundred png references.

The only thing being created is \APKtool\build\apk\<null>, and \APKtool\framework-res\AndroidManifest.xml,AndroidManifest.xml.original,apktool.yml. I attached the AndroidManifest.xml in case it means anything.
[Fire HD 8 and HD 10 General] DragonFire1024:
Alright. I have some work to do then. I'll go ahead and make all the WiFi and daydream edits in one lump and post the apk. It may take me a bit, but look for it in the next 12 hours or so.

If anyone on 5.6.1.0 or 5.6.2.0 wants the screen saver activated, please upload your framework-res and I'll do magic.
[Fire HD 8 and HD 10 General] DragonFire1024:
Here you go. 5.6.0.1. Has all the goodies including day dream activation and wifi optimization. Also improved AGPS. With a root explorer, paste the framework-res.apk into /system/framework to overwrite the existing one. Set permissions to rw-r--r-- but be aware you might get a forced reboot before you can set the permissions. Don't worry if this happens. Just go back to it and make sure the permissions were set. If not, set them and reboot.
[Fire HD 8 and HD 10 General] smam1338:
Awesome! Thank you so much. Forced a reboot, permissions were auto-set. Everything works!

Still frustrated that I couldn't get it done myself.

Again, thank you! :D
[Fire HD 8 and HD 10 General] DragonFire1024:
Anytime I can help ?
[Fire HD 8 and HD 10 General] haiti525:
Allow hotspot?

Hi;

Do you know if there is a framework-red mod that would open up the fairly common Android option for Hotspot & Tethering on the Fire HD 10 (5.6.0.1)?

As it turns out, Sony action cams use the tablet's hotspot capability when there is more than one active cam, so as far as I can see, there is no way to use multiple action cams simultaneously in the Sony PlayMemories mobile app when running on a Fire tablet.

Thanks for any insight you might have on this...
[Fire HD 8 and HD 10 General] DragonFire1024:
Look at the development forum in for my FireTabletfSettings.apk
[Fire HD 8 and HD 10 General] MeetFace:
I'm confused, do we need to follow this or do we go to the new thread for the Wi-Fi tweaks?

I'm a bit leary of going through all the steps. I can probably sideload an APK that you modified as I've already rooted with Kingo and loaded the Play Store, I'm on 5.6.1.0.

Thanks in advance for your help and time.
[Fire HD 8 and HD 10 General] MeetFace:
Here is the framework from my brand new 5.6.1.0 just received in the mail today.

Only thing I've done is Kingo Root, installed play store, and a few optimization apps L Speed and Apps2SD.
[Fire HD 8 and HD 10 General] DragonFire1024:
I'll let you know when I've modified it.
[Fire HD 8 and HD 10 General] MeetFace:
Thanks Mate.
[Fire HD 8 and HD 10 General] DragonFire1024:
In the mean time, while I don't have an HD 10 at the moment, I do have a 8.9. so been messing with that and just figured out how to edit the values of the CM framework too :) hopefully now I can incorporate some of that into a FireOS framework.
[Fire HD 8 and HD 10 General] dronga:
Error in Fire OS 5.6.2.0

i had error when run this cmd:

here is error's log.

C:\APKtool>apktool b framework-res

I: Using Apktool 2.3.3

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

brut.androlib.AndrolibException: brut.common.BrutException: could not exec: [C:\Users\TRINHT~1\AppData\Local\Temp\brut_util_Jar_9559791671459310780.tmp, p, --forced-package-id, 1, --min-sdk-version, 22, --target-sdk-version, 22, --version-code, 22, --version-name, 5.1.1-40.6.1.2_user_612496320, --no-version-vectors, -F, C:\Users\TRINHT~1\AppData\Local\Temp\APKTOOL12847848394437901885.tmp, -x, -0, arsc, -0, png, -0, res/drawable-hdpi-v4/ab_bottom_solid_dark_holo.9.png, -0, res/drawable-hdpi-v4/ab_bottom_solid_inverse_holo.9.png, -0, res/drawable-hdpi-v4/ab_bottom_solid_light_holo.9.png, -0, res/drawable-hdpi-v4/ab_bottom_transparent_dark_holo.9.png, -0, res/drawable-hdpi-v4/ab_bottom_transparent_light_holo.9.png, -0, res/drawable-hdpi-v4/ab_share_pack

...

...

Can you help me?
[Fire HD 8 and HD 10 General] DragonFire1024:
Have to install the framework into APKtool

apktool if framework-res.apk
[Fire HD 8 and HD 10 General] dronga:
Thank you

Thank you.

:((

But

Because it not work with 5.6.2.0 so i tried to downgrade to 5.6.1.0.

And after downgrade it was bricked.

now i cant turn it on. black screen.

Do you know any method to unbrick it. :( :(
[Fire HD 8 and HD 10 General] DragonFire1024:
Once on FireOS 5.6.1.0 you can't downgrade anymore. Unfortunately there is no know method or tool to unbrick at this time. I also learned the hard way a couple weeks ago. Mine wasn't under warranty either so I had to get a new one.
[Fire HD 8 and HD 10 General] MeetFace:
Does your firesettings mod have this wifi tweak included?

If so, I should be able to just run that, right?
[Fire HD 8 and HD 10 General] DragonFire1024:
The Wi-Fi frequency band settings won't appear unless its activated in the framework. Primarily the big mod is the frequency band. Amazon doesn't like 2.4GHZ and added a framework setting that tells the system the "preference" is for 5GHZ. So I changed the preference of 5GHZ to false. I am currently working on an all-in-one framework apk so it includes all my mods.
[Fire HD 8 and HD 10 General] KIMmunity:
Hello dev. Is there an undated APK coming up for 5.6.2.0 by any chance?
[Fire HD 8 and HD 10 General] DragonFire1024:
I will need someone to upload a copy of the framework from 5.6.2.0.
[Fire HD 8 and HD 10 General] tylerhole:
I can grab it from my friend's hd 10 tomorrow evening if no one else gets to it first.
[Fire HD 8 and HD 10 General] MeetFace:
I uploaded it on August 1, fwiw
[Fire HD 8 and HD 10 General] tylerhole:
That was 5.6.1.0 you uploaded.
[Fire HD 8 and HD 10 General] DragonFire1024:
I will need ones from at least 5.6.0.0 and 0.1 and 5.6.2.0. I'm on 5.6.1.0.
[Fire HD 8 and HD 10 General] tylerhole:
Tomorrow night my buddy is coming over and I can get 5.6.2.0 for you and MeetFace uploaded 5.6.1.0 in this thread August 1st. There's 2 down.
[Fire HD 8 and HD 10 General] MeetFace:
I eat crow ;)

For some reason I thought it was .2.
[Fire HD 8 and HD 10 General] DragonFire1024:
I am on 5.6.1.0.

I need framework-res from: 5.6.0.0, 5.6.0.1, 5.6.2.0.
[Fire HD 8 and HD 10 General] tylerhole:
No worries, everyone makes mistakes lol. I'll be able to get the 5.6.2.0 one tonight, already told my friend to bring his tablet over today so I could haha.

---------- Post added at 02:13 PM ---------- Previous post was at 02:11 PM ----------

And there was my misreading things, haha. I'm on 5.6.1.0 too so hopefully someone else can chime in for the other two.

Edit: And now I'm kicking myself because at one point I had the framework-res from 5.6.0.1 but I think I deleted it not thinking I'd need it. Dang.
[Fire HD 8 and HD 10 General] tylerhole:
5.6.2.0 framework-res.apk attached.
[Fire HD 8 and HD 10 General] DragonFire1024:
Awesome. I'll post it when done. I might male a new thread or I may just post it in the Daydream thread along with a total rewrite. I will be combining all the modifications I've done so far in the APK so no one has to go through the steps of editing the framework themselves. Please note it will be FireOS specific so don't download the wrong one.
[Fire HD 8 and HD 10 General] tylerhole:
Awesome [emoji869] can't wait for it, love all the things you share for these tablets. Thank you for all you give us!
[Fire HD 8 and HD 10 General] DragonFire1024:
Thank you :D I have a bit of news. Going to take a little longer than I thought. I wanted to perform an experiment. I have been trying to figure out how to change the permissions in the AndroidManifest.xml of the framework. I have tried various methods and all had failed...until now.

I took a framework-res.apk from a Lineage ROM and another AOSP ROM to compare the permissions of the manifest. Turns out, the permissions I wanted to change, were just commented out. I copied the lines of code from the AOSP ROM and overwrote the commented out codes in the FireOS framework with them. Guess what, after recompiling, the framework installed successfully :D Now I have to go back into the framework and look at the strings and compare the AOSP ROM with the fireOS ROM and see if I missed anything.

The permissions I am trying to edit/restore are the WiFi Display control permissions so an Application can control the launch and settings of Wifi Display (Hopefully the original Miracast). I been having some underlying, unrelated issues the past several days that caused me to reflash stock. Not that big of a deal though. It needed it. Anyways, if the next round boots successfully, we might have the original screen mirroring much sooner!
[Fire HD 8 and HD 10 General] tylerhole:
That is awesome! Congrats on figuring that out and I hope testing goes well! I'll be keeping an eye out for your update on it.

Edit: Also feel free to hit me up if you need any help with getting any files from 5.6.2.0 (I can always stop by my buddy's place and pull files if needed) or need any help testing anything on 5.6.1.0 which is what I'm on.
[Fire HD 8 and HD 10 General] DragonFire1024:
Round one: fail

But I think I know what I did wrong. Also in the framework manifest for Amazon, none of the permissions are labeled android:protection level="normal" (I edited 2 permissions by recommenting them and setting protection as normal). The aosp ROM has them at protection level 'signature'. These may pose a problem. Especially the signature level. I would need to sign the apk with the same signature as the system. If that's not a test key, then there is nothing further I can do right now, but Amazon may have helped a little. On the HD 10 OTAs are signed with a platform key and a test key (standard test key). Amazon left an app on the device that would allow me to disable either one of those keys. I have not been bold enough to test this.

That above is assuming test two fails.
[Fire HD 8 and HD 10 General] tylerhole:
So test 2 is trying again after you fix what you think you did wrong?
[Fire HD 8 and HD 10 General] DragonFire1024:
Correct. Also I may be able to use one of the Android protection values instead, which would be a lot easier. There are only a few permissions that are valued at 'signatureOrSystem' and looks like Amazon used it for a few of their personal apps permissions. This value is no longer used...on Marshmallow and later ;)

I believe this is what allows us, with root, to mount APKs into system folders and directories (the mounting method bypasses signature checking in the package installer).

EDIT: on the account I won't get to rewriting my thread today, I attached your framework-res.apk. You will need to install my settings APK for some of the modifications. Search for my Daydream thread and download the screensaver because that's enabled too.
[Fire HD 8 and HD 10 General] tylerhole:
That's awesome. Fingers crossed they work for ya!
[Fire HD 8 and HD 10 General] DragonFire1024:
On the account I won't get to rewriting my thread today, I attached your framework-res.apk. You will need to install my settings APK for some of the modifications. Search for my Daydream thread and download the screensaver because that's enabled too.
[Fire HD 8 and HD 10 General] tylerhole:
Cool, thank you. This is the 5.6.2.0 framework-res?
[Fire HD 8 and HD 10 General] DragonFire1024:
Yes.
[Fire HD 8 and HD 10 General] tylerhole:
Ok. I'll see if I can get my buddy to put it on his tonight when he's home from work... Unless I decide to update mine to 5.6.2.0 first since you are on 5.6.1.0. I'd be able to help out more if I'm on 5.6.2.0.
[Fire HD 8 and HD 10 General] DragonFire1024:
You don't need to be on 5.6.2.0. If rooted, install Rooted Activity Launcher and this will be a start. Open it and scroll to and tap Amazon Device Settings. Long press either of the two options and select launch activity. I need another set of eyes to really take a long, hard look at that app and tell me what they see or find.
[Fire HD 8 and HD 10 General] DragonFire1024:
In the next day or two, you will finally get to see how much battery power your Android services use. I have fixed the 'power usage summary'. After a full battery drain then a full charge, you will see things build in the list. I can't yet do anything about the colors though. You will need activity launcher to make a shortcut to the feature.. I have also been able to add the missing values for WiFi batched scan support. I'm experimenting with a few more things and I'll upload the hack by the end of the day tomorrow. The screenshot was from an earlier revision so there are more things on the list now. :D

Also have another surprise. I found a really good stock wallpaper cropper that sizes wallpapers pretty good. Works great with Nova Launcher. Also, something else I did broke Amazon photos for setting wallpapers. I think it was installing Google Photos as a system app is what did it, but I'm not sure yet. I'm just warning you now so no one blames be for broken things lol.
[Fire HD 8 and HD 10 General] tylerhole:
Awesome [MENTION=8165603]DragonFire1024[/MENTION] ! You always keep coming up with new surprises.
[Fire HD 8 and HD 10 General] DragonFire1024:
I've been working on the power usage summary for a long time. And all Amazon did, and I couldn't tell you why, was delete a bunch of stuff from the power_profile.xml in the framework-res. Which is dumb because they aren't supposed to. They even deleted the values for some of the CPU enteries. That will take some time to figure out. The rest is/was easier to find.

Speaking of finding...I took a wallpaper cropper from another ROM and it's pretty accurate. I haven't figured out the Amazon photo weirdness, but I did discover flashing the stock boot.img from the update.bin fixed it...for now.
[Fire HD 8 and HD 10 General] tylerhole:
That is odd...Amazon sure did take lollipop and hack it up to make the fireos. All sorts of lil weird stuff they've done lol.

What Amazon photo weirdness are you referring to exactly?
[Fire HD 8 and HD 10 General] DragonFire1024:
I still haven't been able to figure out what exactly set the lockscreen wallpapers or desktop wallpapers in Amazon photos. There are a couple receivers and other switches that has to do with it, but even toggling those still doesn't allow anything to change lock screen wallpapers. Somehow between the framework and the system user interface, there are some entries or values that allow it to happen I just haven't found them yet. In other words if you screw around too much with the internal components, Amazon photos will no longer set the lock screen wallpapers. And if you delete Amazon photos you can't change the lockscreen wallpapers without performing a hack on the systemUI.

They didn't actually make fire OS. But they did hack Android to bits. All they did was delete a few things here modify a few lines there and then called it fire OS. Much of the stuff I've been able to bring to you is all part of the Android system that I've either reactivated or have been able to piece back together after the hack job Amazon did. It almost seems like I just have to find all the pieces, which are still there and put them back in the proper places. There is nothing unique or original about this so-called fire OS aside from the fact their security is pretty darn good.

It also helps that I have maybe dozens of various ROMs for various devices over nearly ever Android version. So I have a lot to work with. Gives me more of an advantage because I can look inside various Frameworks and what not to see what's missing or what's commented out. If it weren't for all these rounds I've had, I probably wouldn't have been able to do much of what I've done.
[Fire HD 8 and HD 10 General] DragonFire1024:
Power Usage Summary: we are good to go. I need to tweak the values a tiny bit more, but you'll be able to see the 10 biggest battery hogs on the tablet, once the stats calibrate (more on that in a new thread a little later).

It looks like Amazon removed the stats because they use 'amazonusagestats'. However, I thought you weren't supposed to remove them? I do recall seeing the raw data where one of the comments said they should never be changed or removed (more on this later too. Amazon actually saved the day accidentally, for this to be possible).

It also appears the modifications to enable WiFi batched scanning support in the framework-res wasn't all that was missing. Amazon removed those from the power profile too.

I'm doing a test run as we speak. If everything pans out, you got battery stats. [MENTION=5749760]ggow[/MENTION] isn't this also an issue for the Fire 7s, even on a custom ROM? If so, not no more.
[Fire HD 8 and HD 10 General] ggow:
It's not an issue if you build a ROM from source because you're not using any of the amazon framework stuff at all. The standard interfaces that aosp provides in the framework works providing you include the power profile xml file in the overlay.
[Fire HD 8 and HD 10 General] tylerhole:
Ok, that's what I figured you were talking about, just wanted to clarify to make sure I'm on the same page.

I wasn't 100% how they came up with FireOS other than making a really bad version of Android, lol. Thanks for clarifying for me!

I can't speak for everyone, but I know I'm definitely thankful you have quite the collection of ROMs to pull from and give some sort of guidance on what to do to make things work.
[Fire HD 8 and HD 10 General] DragonFire1024:
Sorry for the delay. I wanted to get 24 hours out of the stats before I did anything. Of course I had to do something stupid and needed to reflash. However I think we'll be good to go with at least the first version.
[Fire HD 8 and HD 10 General] tylerhole:
No worries and that's good to hear about the first version being ready to rock.
[Fire HD 8 and HD 10 General] andyistic:
DragonFire1024 ...

How come the original framework-res.apk from 5620 is 15 mb, yet your modified version is only 8 mb?
[Fire HD 8 and HD 10 General] DragonFire1024:
I do not know. Only thing I can do with 5.6.2.0 is modify it (I am on 5.6.1.0). I'll see what size I have saved tomorrow.
[Fire HD 8 and HD 10 General] MeetFace:
Getting this (elevated command prompt):

https://pastebin.com/embed_js/XUkKJHZ3

I have no idea where to go from here =\
[Fire HD 8 and HD 10 General] sga999:
I had this problem yesterday when trying another Dragon fix. apktool versions 2.3.3 and 2.3.4 have this problem. Version 2.3.2 and earlier are good!

EDIT:

1. It looks like at least 2 other people posted in this thread about the same apktool problems. The symptom of the bad apktool is a very long error message about BRUT....see MeetFace's screen. It's hard to understand how this problem started with April's release 2.3.3 and continued with September's 2.3.4. You would think it would have been reported and fixed. There are bug reports about it.

2. Dragon, I noticed that several posts in this thread indicate they did not know they needed to use adbd insecure in order to get adb remount to work. You do mention it in this thread a few times, but it might be helpful to have it in the OP. Up to you, of course!
[Fire HD 8 and HD 10 General] DragonFire1024:
I didn't even notice that. Thanks for telling me. Fixed :)
[Fire HD 8 and HD 10 General] sga999:
About apktool version, I had trouble later, even with 2.3.2, That version helped me recompile, but later when trying to use 7zip to do some modifications, the results were bad. So this is just a heads-up to those who changed to 2.3.2 and expected it to work in all cases.
[Fire HD 8 and HD 10 General] :
Thank you for the wonderful tutorial, but I am having issues building the new framework-res. After I change the files and do apktool b framework-res, I get a brut.common.BrutException (Admin prompt). I will put the log into a pastebin as it is too long. No APK file is produced after this. Thank you!

https://pastebin.com/fMgTx3fK
[Fire HD 8 and HD 10 General] DragonFire1024:
Apktool has to be installed into c:\apktool and needs admin rights when doing so. You also should open the command window with admin rights as well. If you can't get admin rights, I don't think it will work.
[Fire HD 8 and HD 10 General] :
I have admin rights and it was installed into c:\apktool. I even tried it with an admin Cmd
[Fire HD 8 and HD 10 General] DragonFire1024:
I would reinstall apktool. Go back a version or two. There have been issues reported with the latest version.