[MOD][TUTORIAL] Removing clock from status bar. - Continuum Themes and Apps

Credit for this goes to IMNUTS for showing me what I needed to do. Now that I have a grasp of why it worked, I'm posting it.
NOTE: Services.jar, the file you will be dealing with, is phone specific. Hence the reason for the tutorial, and not a flashable package.
What you will need. smali/baksmali
http://code.google.com/p/smali/
ADB set up
http://developer.android.com/sdk/index.html
You can find numerous tutorials on setting up ADB in your path, which you will need.
After you have setup ADB, you need to rename the smali-1.3.2.jar to smali.jar and baksmali-1.3.2.jar to baksmali.jar, then put them in your platform tools folder found in android-sdk
1. Now, grab your phone. Make sure USB Debugging is turned on (settings/applications/development)
2. Next, plug your phone in, open command prompt, and type in the following (with variance for where you put your sdk at).
cd c:\android-sdk/platform-tools
That example says that you have the android-sdk on your c drive (or whatever your primary drive is).
3. Now, type in the following command
adb pull /system/framework/services.jar
That will copy your services.jar over to your platform-tools folder in the sdk.
3a. make a copy of that file, somewhere safe, before you do anything else. Otherwise, if something goes wrong, your only option will be a
nandroid. And if you don't have that either, then you'll have to come into IRC so we can help you with your options from there. This won't brick you, but if you don't have a backup, it can be an annoyance.
4. Now, using 7zip, or winrar, open services.jar, and copy classes.dex into your platform-tools folder
5. Next, go back to command prompt. Type in the following
java -jar -Xmx512M baksmali.jar classes.dex
This will baksmali the classes.dex. When it is done, you will have a folder called 'out'.
6. Go into out/com/android/server/status and find the file called statusbarpolicy.smali. Open it using a text editor (I use notepad++)
7. Scroll down to where you see
.line 650
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V
8. Leave one space under that, then paste in the following
invoke-virtual {p2, v6, v7}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
And make a space under it, before the next line.
Your end resuult should look like this (including the lines before and after the section you are modifying)
iput-object v6, p0, Lcom/android/server/status/StatusBarPolicy;->mClockIcon:Landroid/os/IBinder;
.line 650
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->updateClock()V
invoke-virtual {p2, v6, v7}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
.line 653
9. Save the file, and close it.
10. Go back to command prompt and paste the following
java -jar -Xmx512M smali.jar out
This will produce a file called out.dex. Drag it somewhere out of platform tools, and rename it to classes.dex
11. Open services.jar again (if you closed it), and drag the new classes.dex into it, then close services.jar
12. in command prompt, paste the following
adb shell mount -o remount,rw /dev/block/stl9 /system
This will mount your system as rewritable,
13. The next command is
adb push services.jar /system/framework
That command will push the file to the proper directory. That has overwritten your services.jar on your phone, but it won't take effect until you reboot.
14. So, the final command you need to type is
adb reboot
It will take a few minutes to boot, as it does anytime you replace services.jar. Be patient. If it works, you will no longer have the clock on your status bar.

So did ya ever figure out exactly what the new code does to remove the clock and or if the new line added could say remove date also?
Just wondering cause i like your "layman's terms" great job btw
Sent from my SCH-I400 using xda premium

AWESOME!
Sent from my ADR6425LVW using Tapatalk

I'm glad you figured it out yourself you seem to be getting the hang of things
If anyone is more decompiling shy, then they can flash my mod package, which has the option to remove the clock from settings
Sent from my SCH-I400 using xda premium

Ciscogee, Yeah. That was the hold up on posting. I wanted to figure out what the line of code did. I'd have to investigate the removing date from the pull down. But if I'm reading this right, it should be about the same thing.
Abby, Thank you. I was hoping you'd like it. I still need your help on ADB...
Trailblazer, I appreciate that. It means a lot coming from someone with your level of knowledge. As for those who aren't comfortable decompiling and editing, I would WHOLLY endorse Trailblazer's mods. I just did it this way for a learning experience, and I thought I would share it, in an attempt to actually contribute something, for a change.

Related

[Q] Volume Rocker Wake: Bootlooping after editing android.policy.odex

Hello All,
I was trying to get the option of waking the phone using volume keys. I am on ICS (Asia Retail) on my MB865. Editing the Keylayout files did not work. It had worked for me before, but now they did not probably since my phone is locked by a password lock screen due to corporate policies. I tried to decompile android.policy.odex and change isWakeKeyWhenKeyguardShowing. But after I compiled it back and put the changed odex back to system/framwork. But strangely I got a boot loop. I tried a battery pull and also cleared cache and Dalvik cache. But could not get it to boot. Finally I had to restore /system from a backup.
I have detailed my steps below. Can anyone please point out what I am doing wrong here.
1. Get /system/framwork out and put it in a folder
2. Download smali-1.4.2 and baksmali-1.4.2 utilities.
3. I extracted android.policy.odex by java -jar baksmali.jar -d framework -x android.policy.odex
4. I changed the file KeyguardViewMediator.smali (removed lines for 0x18 and 0x19 under the switch case of the method isWakeKeyWhenKeyguardShowing(IZ)Z
5. Packed the odex file back by java -jar smali.jar -o android.policy.odex out
where "out" is the previously extracted folder
Then I replaced the android.policy.odex back to /system/framework
Please help! My power key is already showing some signs that it does not want to stay with me any more.
Thanks,
Sayantan
Re: Solved - Volume Rocker wake via android.policy.jar
Okay! I have been a total noob. I did not read enough about odexing and deodexing.. should have read more before I posted. Here's what I did (in short), thanks to Jordan Hotmann from http://www.jordanhotmann.com/2011/08/how-to-change-default-orientation-of.html
For detailed explanations, please visit the above website.
1. Downloaded smali and baksmali tools
2. Downloaded and installed dexopt-wrapper (just Google)
3. Extracted /system/framwork
4. Extracted android.policy.odex (used api level 15)
5. Modified the required files - KeyguardViewMediator.smali (removed lines for 0x18 and 0x19 under the switch case of the method isWakeKeyWhenKeyguardShowing(IZ)Z
6. Repacked the folder to classes.dex
7. Integrated classes.dex into android.policy and pushed the latter to /sdcard/
8. Created new odex file from android.policy.jar (dexopt-wrapper android.policy.jar new.odex BOOTCLASSPATH)
Got the BOOTCLASSPATH from init.rc which I pulled from the phone root directory
9. Copied the "signature" from the original .odex file to the newly created one (busybox dd if=/system/framework/android.policy.odex of=new.odex bs=1 count=20 skip=52 seek=52 conv=notrunc)
10. Replaced android.policy.odex
cd /system/framework/
busybox cp /sdcard/new.odex android.policy.odex
busybox chmod 644 android.policy.odex
(I already had my keylayout file modded. So not sure if they are actually required after the above mod)
Please take a nandroid backup before attempting this. I am not responsible for any damage being done to your phone as a result of this!
Thanks again to XDA forums and Devs here and Jordan Hotmann (from the link above)
Can't say about ICS but in JB we use the lab menu *#*#6686#*#* to have the functionality of the volume key waking the phone.
Right. I used the same when I was on the JB leak. It doesn't work on ICS. However, last time I was on ICS, changing the key layout files sufficed with the lock screen set to none. This time my phone has to have a password lock screen due to corporate policy and editing android.policy.jar seems to be the only way.
Regards,
Sayantan
Sent from my MB865 using xda app-developers app
Ok, in that case I learned something new to use in ICS as per your tutorial below :good:
Hi guys.
I stumbled upon this thread while researching info for modding framework-res.apk and android.policy.jar. I'm trying to make some changes to the power menu.
I'm pretty much a noob and so far I managed to get framework-res.apk to compile and install successfully, but android.policy.odex is giving me nightmares My rom is odexed, and no matter what I do I always end up stuck at boot.
So I tried to just baksmali and smali it again with no changes whatsoever, then dexopt-wrap from the phone exactly like the guide SMONDAL84 linked says, dd the old signature into the new odex file and finally move it to /system/framework.
Even that isn't working, so I wonder what am I doing wrong?

[GUIDE] Remove Blocking Mode notification (root/deodexed Samsung ROM required)

Hi Guys
As the Title says
Credits goes to exscape
Hope to bring you guys my rom soon to I9500
ORIGINAL LINK
Requirements:
* DEODEXED AND ROOTED Samsung Jelly Bean ROM (I use WanamLite XXDLIH v3.9, google it - I can't post the link)
* 7-zip (google it)
* Galaxy S III - not sure if other models than the i9300 will work, my guess is that they will. I can't test on other phones than my own, though, so you're on your own in that case! Also no idea if Note models will work, I've never used one.
* A Windows computer - unless the tools are available for other platforms.
* Java -- if you can do Start -> Run -> "java" -> OK without an error, you should be fine.
* A bit of patience
As always, this is on your own risk!
Steps to hack:
0) BACK UP YOUR PHONE! My suggestion would be to take a nandroid backup before getting started.
1) Get an apktool that works with JB APKs.
Here's the one I use (assemble the link): mediafire . com / ?ufzdylekbkloffy
(Sorry for doing that, but surely posting guides constitutes making helpful contributions? )
The ZIP contains two apktool versions, one for decoding and one for building.
Thing is, I'm not 100% sure on where I got the apktool JARs. I think one of them is the unmodified 1.4.2 JAR, and one is modified to work with ICS (and newer) APKs.
I couldn't get EITHER of them to both decode AND build, so I made two separate batch scripts.
I do promise that the thing's safe, but if you don't trust me, you can find them elsewhere - I'm just not sure exactly where. I found them by trial and error.
2) Unpack the tools to a directory, e.g. "apktool" on your desktop. (If you want to follow this guide to the letter, you need to use that folder too.)
3) Start a command prompt - Start -> Run -> enter "cmd" -> click OK
4) Connect your phone via USB, and make sure USB debugging is enabled on it (under Settings -> Developer Options)
5) Enter the following commands, exactly as specified, in order of course:
cd Desktop\apktool
adb pull /system/framework/framework-res.apk
java -jar apktool-BUILD.jar if framework-res.apk
adb pull /system/app/SecSettings.apk
apktool-d SecSettings.apk SecSettings-mod
You should now have a "SecSettings-mod" directory (under Desktop\apktool) with the contents of the APK.
6) Browse to SecSettings-mod\smali\com\android\settings\dormantmode, right-click "DormantModeNotiReceiver.smali" and Open With... -> Notepad (or right-click and "Edit", if that choice exists)
7) Click the Edit menu -> Find..., and search for "notificationCreate" (no quotes). The first hit should be ".method public notificationCreate [... etc]"; click Find Next.
The next hit should be something like
invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/ContextV
8) Comment that line out by adding a # as the very first character, so you end up with
# invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;-notificationCreate(Landroid/content/ContextV
9) A few lines down (10 or so), there's another invoke-virtual, for notificationClear. Comment this out as well, aagin by adding a # as the first character on the line.
When you're done, save and exit.
10) OK, we're getting there. Time to rebuild the modded APK.
Go back to the command prompt (or start a new one, see above).
Run this command:
apktool-b SecSettings-mod SecSettings-new.apk
This may take a LONG while, it takes a bit over 11 minutes for me (nearly all of it to build resources). Be patient!
When it's completed, open up both the ORIGINAL .apk and the modded one in separate 7-zip windows. Delete "AndroidManifest.xml" from the modified apk, then select and copy "META-INF" and "AndroidManifest.xml" from the original to the modified APK. Exit 7-zip.
11) Time to get the modded file over to your phone! Run these commands:
adb remount
adb push SecSettings-new.apk /system/app
adb shell
12) You should now have the file on your phone, and have an adb shell open. Almost there!
If you're not root (i.e. if the command line ends with $ rather than #), run "su".
Then:
cd /system/app
mv SecSettings.apk SecSettings.apk.OLD
mv SecSettings-new.apk SecSettings.apk
... and you're finally DONE

Help to change Settings.apk 5.1 (Lollipop)

Hi,
Im trying to edit the Settings.apk from my android, following a guide I found here, the only difference of this guide to my system was, the path of Settings is: /system/priv-app/Settings/Settings.apk
After that I was trying to do copy the file using the adb shell but gave me error of permision (even by doing: "adb shell" and then "su"), but I fixed it by copying it myself through the APP "RootExplorer"
The only problem is that after I do that and I restart hte phone, the Settings are gone. So I restored the original file and restarted the phone but the Settings keeps not appearing.
Tried wipe cache but no changes.
After search better, I found on google someone that had the same problem but after try to do all without use sign Settings.apk with ZipSign, worked... but not for me.
So I guess something changed from versions 4.x to 5.1
Could someone lend me a hand pls ? Pointing what Im doing wrong.
PS: I need reinstall the original ROM after this (so I get my settings back (with adb sidepull), so no data is lost)
The guide I followed:
Stuff You'll Need for the guide
Apktool (And therefore Java too)
A suitable Text Editor for your OS. For Windows, Notepad++ is best, for Linux I recommend Geany In this guide I will be using Geany on Ubuntu
Zipsigner on your device (for ease of use)
adb
NOTE: If you are using Linux, run everything, including apktool and your text editor/file manager as ROOT/SUDO
Do this first: Decompiling Settings.apk
Difficulty: ★★☆☆☆
1.) Open a command window in a suitable location, where apktool.jar is also located
1.) Pull your apk from your device
Code:
adb pull /system/app/Settings.apk
2.) Pull and install the framework from your device to apktool
Code:
adb pull /system/framework/framework-res.apk
Code:
java -jar apktool.jar if framework-res.apk
3.) Decompile your Settings.apk
Code:
java -jar apktool.jar d -s Settings.apk
(No source is needed)
Editing the Strings of your Settings apk
Difficulty: ★★☆☆☆
Editing the Settings option's icon
Difficulty: ★★★☆☆
Adding options to the settings headers
Difficulty: ★★★★☆
Adding dividers to settings
Difficulty: ★★★☆☆
Reordering Settings
Difficulty: ★★☆☆☆
Adding items to submenus
Want to add a "Credits" option to your "About device" menu? This is what you need
Difficulty: ★★★☆☆
Bonus: Forcing "Developer settings" to be available by default on 4.2
Difficulty: ★★☆☆☆
Do this last: Recompiling
Difficulty: ★★☆☆☆
1.) Re-open the command window that you used to decompile, in the same location
2.) Run the following code:
Code:
java -jar apktool.jar b Settings
3.) Push the new, unsigned apk to your device:
Code:
adb push Settings/dist/Settings.apk /sdcard/
4.) On the device, open Zipsigner and select the Settings.apk using the in/out button
5.) On the dropdown, select "platform"
6.) Press sign
7.) When it's done, run the following codes in the command window on the PC:
(Note: Some people might need to run 'adb root' first)
Code:
adb remount
Code:
adb shell cp /system/app/Settings.apk /system/app/Settings.bak
Code:
adb shell cp /sdcard/Settings-signed.apk /system/app/Settings.apk
8.) Reboot your device, you are done

[ROOT] [FRAMEWORK-RES MOD] Optimize your WiFi [MARCH 2018]

Hello everyone. I am excited to announce I've found a successful method to edit the contents of the Android System, also known as framework-res. This method has allowed me to make a massive amount of modifications to the framework system, including unlocking several features and or settings Amazon blocks us from using or accessing. The guide I am writing today, is just one example of that.
I've been contacted a few times here and there, users asking if I knew how to improve their WiFi reception as some feared Amazon may be intentionally slowing down connections. Until now, I was unable to determine all of the features or settings related to WiFi, that we have been blocked from seeing/using/accessing. This guide will show you how to unlock those settings and features to improve your WiFi reception.
!!!!*****WARNING*****!!!!
Modifying the framework can be extremely damaging to your device. Making the wrong edit, even in the slightest, can result in permanent damage to your device. DO NOT MAKE ANY OTHER EDITS TO THE FRAMEWORK, OTHER THAN THE ONES OUTLINED IN THIS GUIDE. IF YOU BRICK YOUR DEVICE, OR DAMAGE IT IN ANY WAY, I CANNOT BE HELD RESPONSIBLE. If you choose to go forward from here, you are responsible for any and all actions. If you aren't prepared for the possibility you may brick your tablet, this guide is not for you. NOTE: I've NEVER permanently bricked a device, but everyone's devices are different.
I have tested this method extensively and made extensive edits to the framework. I have bricked my tablets many times, sometimes several times a day. I risked and continue to risk losing my devices to damages by bringing you these next several guides. Please thank me when you've successfully completed this guide
Requirements:
-Rooted HD 10 or Fire 7 tablet
-Desktop PC with Android SDK installed
-APKtool
-Java (APKtool requires Java)
-Notepad++ (Install this first)
-7-Zip or like minded program
-adbd Insecure application
-A lot of patience and time
Notes:
-Works really well on the HD 10. Extensively tested.
-Works on the Fire 7, but with a much lower success rate. For some reason the Fire 7 gets very irritated very quickly, more often than not.
Instructions:
1. Go to the Java website and download the two files, JDK and JRE (not the JRE server) and install them. When doing so, make sure the installation path is just inside C:\ directory NOT C:\Program Files etc. It's much easier to have all your tools in the same directory for easy access. NOTE: You won't be able to use this guide without installing Java as it's required by APKtool.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2. Go to the APKtool website and download the tool and required files. They will also be placed into the C:\ directory. Installation instructions are in the same place. PLEASE READ THEM VERY CAREFULLY!
3. When you've completed the above tasks, plug your tablet into your PC. On your PC, open an ADB window. You need to pull one file from your tablet, framework-res.apk and send it to the APKtool folder in C:\APKtool (assuming that's where you installed APKtool). For this guide, your file(s) MUST be pulled from your device using ADB. DO NOT manually place them into the folder(s).
Code:
adb pull /system/framework/framework-res.apk C:\APKtool
4. Once the framework apk is in the APKtool folder, open another command prompt window from the APKtool folder by holding down shift on the keyboard + right click on the mouse and select "open command window here." In this new command window type:
Code:
APKtool
If you installed everything correctly, text will appear with a few commands you can issue APKtool.
5. Now we need to decompile the framework. In APKtool command window type the following command:
Code:
apktool d framework-res.apk
6. The framework-res.apk should then decompile into a folder inside your APKtool folder. Open the framework folder and navigate to:
Code:
/res/values/
7. Open the bools.xml file by right clicking on it and selecting Notepad++ as the editor. At this point quite a bit of code, or configurations will appear. Please look for the list of items below and change the values of them from 'false' to 'true':
Code:
"config_wifi_dual_band_support"
"config_wifi_background_scan_support"
"config_wifi_enable_disconnection_debounce"
"config_wifi_enable_5GHz_preference"
"config_wifi_framework_enable_associated_autojoin_scan"
"config_wifi_framework_enable_associated_network_selection"
"config_wifi_only_link_same_credential_configurations"
"config_wifi_batched_scan_supported"
"config_wimaxEnabled"
8. Now save the file and close Notepad++. Back in the framework folder, open the arrays.xml file. Look for the following line of code:
Code:
<string-array name="networkAttributes">
<item>wifi,1,1,2,-1,true</item>
<item>tedongle,49,49,1,-1,true</item>
9. In the first line above, wifi,1,1,2,-1,true, change the '2' to a '1'. Delete the second line completely, but leave the 'item' tags. Replace it with the following line of code:
Code:
<item>wifi_p2p,13,1,0,-1,true</item>
I have personally marked each of these configurations as true to test battery drainage, and there was very little if any at all. Though the configuration for "background" scanning is enabled, I don't believe it's the same background scanning like the aggressive ones manufacturers and providers place in the general WiFi settings.
10. Save the files and close them. Head back to the APKtool folder and open the command window again, if you closed it. Type the following command:
Code:
apktool b framework-res
11. You might see a few errors, but they can be ignored as long as the window tells you the APK was successfully created. If it was, go to the APKtool folder, tap on the framework-res folder, then tap on the 'dist' folder. Your new framework is inside. Right click on the NEW framework-res.apk and select "open archive." Go back to the main APKtool folder and right click on the ORIGINAL framework-res.apk and open it as an archive too.
12. Drag the 'res' folder from the newly generated APK to the old APK. If using 7-Zip, just click ok when the window pops up. Now do the same for the resources.arsc file and if usong 7-Zip, just select ok. If using WinRAR, you have to set the compression to STORE before you click ok.
13. Place the framework-res.apk you just dragged those files to, into your adb folder on your PC and plug your tablet into it. Download and install adbd insecure and check the box to make adbd insecure. Now open an ADB window. It's time to install the framework. In two commands, you'll be done. First type:
Code:
adb remount
adb push framework-res.apk /system/framework/framework-res.apk
After you installed the framework, if you don't go into a bootloop within 10 seconds or less, you have most likely been successful, but you still have to reboot. Once you do, You'll notice a new toggle in your advanced WiFi settings. For an added bonus, you can edit your build.prop to specify the range of WiFi channels in your country. If in the US, you will add the number '11' and if in Europe and Asia, you want to put a 13 or 14.
Code:
ro.wifi.channels=11
OR
Code:
ro.wifi.channels=13
Keep an eye on me the for the next week or more. I have a lot more goodies to share, and I keep finding more
DragonFire1024 said:
Hello everyone. I am excited to announce I've found a successful method to edit the contents of the Android System, also known as framework-res. This method has allowed me to make a massive amount of modifications to the framework system, including unlocking several features and or settings Amazon blocks us from using or accessing. The guide I am writing today, is just one example of that.
I've been contacted a few times here and there, users asking if I knew how to improve their WiFi reception as some feared Amazon may be intentionally slowing down connections. Until now, I was unable to determine all of the features or settings related to WiFi, that we have been blocked from seeing/using/accessing. This guide will show you how to unlock those settings and features to improve your WiFi reception.
!!!!*****WARNING*****!!!!
Modifying the framework can be extremely damaging to your device. Making the wrong edit, even in the slightest, can result in permanent damage to your device. DO NOT MAKE ANY OTHER EDITS TO THE FRAMEWORK, OTHER THAN THE ONES OUTLINED IN THIS GUIDE. IF YOU BRICK YOUR DEVICE, OR DAMAGE IT IN ANY WAY, I CANNOT BE HELD RESPONSIBLE. If you choose to go forward from here, you are responsible for any and all actions. If you aren't prepared for the possibility you may brick your tablet, this guide is not for you. NOTE: I've NEVER permanently bricked a device, but everyone's devices are different.
I have tested this method extensively and made extensive edits to the framework. I have bricked my tablets many times, sometimes several times a day. I risked and continue to risk losing my devices to damages by bringing you these next several guides. Please thank me when you've successfully completed this guide
Requirements:
-Rooted HD 10 or Fire 7 tablet
-Desktop PC with Android SDK installed
-APKtool
-Java (APKtool requires Java)
-Notepad++ (Install this first)
-7-Zip or like minded program
-A lot of patience and time
Notes:
-Works really well on the HD 10. Extensively tested.
-Works on the Fire 7, but with a much lower success rate. For some reason the Fire 7 gets very irritated very quickly, more often than not.
Instructions:
1. Go to the Java website and download the two files, JDK and JRE (not the JRE server) and install them. When doing so, make sure the installation path is just inside C:\ directory NOT C:\Program Files etc. It's much easier to have all your tools in the same directory for easy access. NOTE: You won't be able to use this guide without installing Java as it's required by APKtool.
2. Go to the APKtool website and download the tool and required files. They will also be placed into the C:\ directory. Installation instructions are in the same place. PLEASE READ THEM VERY CAREFULLY!
3. When you've completed the above tasks, plug your tablet into your PC. On your PC, open an ADB window. You need to pull one file from your tablet, framework-res.apk and send it to the APKtool folder in C:\APKtool (assuming that's where you installed APKtool). For this guide, your file(s) MUST be pulled from your device using ADB. DO NOT manually place them into the folder(s).
Code:
adb pull /system/framework/framework-res.apk C:\APKtool
4. Once the framework apk is in the APKtool folder, open another command prompt window from the APKtool folder by holding down shift on the keyboard + right click on the mouse and select "open command window here." In this new command window type:
Code:
APKtool
If you installed everything correctly, text will appear with a few commands you can issue APKtool.
5. Now we need to decompile the framework. In APKtool command window type the following command:
Code:
apktool d framework-res.apk
6. The framework-res.apk should then decompile into a folder inside your APKtool folder. Open the framework folder and navigate to:
Code:
/res/values/
7. Open the bools.xml file by right clicking on it and selecting Notepad++ as the editor. At this point quite a bit of code, or configurations will appear. Please look for the list of items below and change the values of them from 'false' to 'true':
Code:
"config_wifi_dual_band_support"
"config_wifi_background_scan_support"
"config_wifi_enable_disconnection_debounce"
"config_wifi_enable_5GHz_preference"
"config_wifi_framework_enable_associated_autojoin_scan"
"config_wifi_framework_enable_associated_network_selection"
"config_wifi_only_link_same_credential_configurations"
"config_wifi_batched_scan_supported"
"config_wimaxEnabled"
8. Now save the file and close Notepad++. Back in the framework folder, open the arrays.xml file. Look for the following line of code:
Code:
<string-array name="networkAttributes">
<item>wifi,1,1,2,-1,true</item>
<item>tedongle,49,49,1,-1,true</item>
9. In the first line above, wifi,1,1,2,-1,true, change the '2' to a '1'. Delete the second line completely, but leave the 'item' tags. Replace it with the following line of code:
Code:
<item>wifi_p2p,13,1,0,-1,true</item>
I have personally marked each of these configurations as true to test battery drainage, and there was very little if any at all. Though the configuration for "background" scanning is enabled, I don't believe it's the same background scanning like the aggressive ones manufacturers and providers place in the general WiFi settings.
10. Save the files and close them. Head back to the APKtool folder and open the command window again, if you closed it. Type the following command:
Code:
apktool b framework-res
11. You might see a few errors, but they can be ignored as long as the window tells you the APK was successfully created. If it was, go to the APKtool folder, tap on the framework-res folder, then tap on the 'dist' folder. Your new framework is inside. Right click on the NEW framework-res.apk and select "open archive." Go back to the main APKtool folder and right click on the ORIGINAL framework-res.apk and open it as an archive too.
12. Drag the 'res' folder from the newly generated APK to the old APK. If using 7-Zip, just click ok when the window pops up. Now do the same for the resources.arsc file and if usong 7-Zip, just select ok. If using WinRAR, you have to set the compression to STORE before you click ok.
13. Now open an ADB window. It's time to install the framework. In two commands, you'll be done. First type:
Code:
adb remount
adb push C:\apktool\framework-res.apk /system/framework/framework-res.apk
After you installed the framework, if you don't go into a bootloop within 10 seconds or less, you have most likely been successful, but you still have to reboot. Once you do, You'll notice a new toggle in your advanced WiFi settings. For an added bonus, you can edit your build.prop to specify the range of WiFi channels in your country. If in the US, you will add the number '11' and if in Europe and Asia, you want to put a 13 or 14.
Code:
ro.wifi.channels=11
OR
Code:
ro.wifi.channels=13
Keep an eye on me the for the next week or more. I have a lot more goodies to share, and I keep finding more
Click to expand...
Click to collapse
Would it be possible for you to post your modified framework-res file so those of us less skilled could just push your tested and working file. I would assume you will need a version for each OS aka one for 5600, 5601 and 5610
adm1jtg said:
Would it be possible for you to post your modified framework-res file so those of us less skilled could just push your tested and working file. I would assume you will need a version for each OS aka one for 5600, 5601 and 5610
Click to expand...
Click to collapse
I'm not so sure that a framework-res.apk from one tablet is good for another, but there's no reason that it wouldn't work.
I experience a lot of wifi issues on the 7th Gen HD 10, but I'm not sure if messing with the framework is worth the risk...
I can tell that the 5GHz range of the tablet is extremely bad, I basically have to be in the ssame room where my router is
and that 2.4GHz is sometimes very slow, while it works fine on my phone
adm1jtg said:
4. Once the framework apk is in the APKtool folder, open another command prompt window from the APKtool folder by holding down shift on the keyboard + right click on the mouse and select "open command window here." In this new command window type:
If you installed everything correctly, text will appear with a few commands you can issue APKtool.
5. Now we need to decompile the framework. In APKtool command window type the following command:
6. The framework-res.apk should then decompile into a folder inside your APKtool folder. Open the framework folder and navigate to:
7. Open the bools.xml file by right clicking on it and selecting Notepad++ as the editor. At this point quite a bit of code, or configurations will appear. Please look for the list of items below and change the values of them from 'false' to 'true':
8. Now save the file and close Notepad++. Back in the framework folder, open the arrays.xml file. Look for the following line of code:
9. In the first line above, wifi,1,1,2,-1,true, change the '2' to a '1'. Delete the second line completely, but leave the 'item' tags. Replace it with the following line of code:
I have personally marked each of these configurations as true to test battery drainage, and there was very little if any at all. Though the configuration for "background" scanning is enabled, I don't believe it's the same background scanning like the aggressive ones manufacturers and providers place in the general WiFi settings.
10. Save the files and close them. Head back to the APKtool folder and open the command window again, if you closed it. Type the following command:
11. You might see a few errors, but they can be ignored as long as the window tells you the APK was successfully created. If it was, go to the APKtool folder, tap on the framework-res folder, then tap on the 'dist' folder. Your new framework is inside. Right click on the NEW framework-res.apk and select "open archive." Go back to the main APKtool folder and right click on the ORIGINAL framework-res.apk and open it as an archive too.
12. Drag the 'res' folder from the newly generated APK to the old APK. If using 7-Zip, just click ok when the window pops up. Now do the same for the resources.arsc file and if usong 7-Zip, just select ok. If using WinRAR, you have to set the compression to STORE before you click ok.
13. Now open an ADB window. It's time to install the framework. In two commands, you'll be done. First type:
After you installed the framework, if you don't go into a bootloop within 10 seconds or less, you have most likely been successful, but you still have to reboot. Once you do, You'll notice a new toggle in your advanced WiFi settings. For an added bonus, you can edit your build.prop to specify the range of WiFi channels in your country. If in the US, you will add the number '11' and if in Europe and Asia, you want to put a 13 or 14.
OR
Keep an eye on me the for the next week or more. I have a lot more goodies to share, and I keep finding more
Would it be possible for you to post your modified framework-res file so those of us less skilled could just push your tested and working file. I would assume you will need a version for each OS aka one for 5600, 5601 and 5610
Click to expand...
Click to collapse
I can yes. But be aware if you aren't on the same version 5.6.0.1, then just reinstalling that APK may not work. I'm not entirely sure if the framework APK relies on version specific settings or not. In which case the worst that could happen is when you go to reboot you would be stuck at the boot logo and you would need to reflash stock firmware. I'll do upload it when I get home from work later.
Sent from my Samsung Galaxy S4 using XDA Labs
I'm posting the framework now. There are other tweaks as well, I just don't remember some. You can toggle the Wi-Fi GHZ in advanced Wi-Fi settings. I warn you though, this may not work. I've not tested this method so I'm not responsible for any bricks!
Sent from my Amazon KFSUWI using XDA Labs
freaky2xd said:
I experience a lot of wifi issues on the 7th Gen HD 10, but I'm not sure if messing with the framework is worth the risk...
I can tell that the 5GHz range of the tablet is extremely bad, I basically have to be in the ssame room where my router is
and that 2.4GHz is sometimes very slow, while it works fine on my phone
Click to expand...
Click to collapse
Posted above this reply. I can make a special modification for you later. As of now the setting is set to a 5ghz preference. I can change that later and I'll upload the revised framework this afternoon.
Sent from my Amazon KFSUWI using XDA Labs
adm1jtg said:
Hello everyone. I am excited to announce I've found a successful method to edit the contents of the Android System, also known as framework-res. This method has allowed me to make a massive amount of modifications to the framework system, including unlocking several features and or settings Amazon blocks us from using or accessing. The guide I am writing today, is just one example of that.
I've been contacted a few times here and there, users asking if I knew how to improve their WiFi reception as some feared Amazon may be intentionally slowing down connections. Until now, I was unable to determine all of the features or settings related to WiFi, that we have been blocked from seeing/using/accessing. This guide will show you how to unlock those settings and features to improve your WiFi reception.
!!!!*****WARNING*****!!!!
Modifying the framework can be extremely damaging to your device. Making the wrong edit, even in the slightest, can result in permanent damage to your device. DO NOT MAKE ANY OTHER EDITS TO THE FRAMEWORK, OTHER THAN THE ONES OUTLINED IN THIS GUIDE. IF YOU BRICK YOUR DEVICE, OR DAMAGE IT IN ANY WAY, I CANNOT BE HELD RESPONSIBLE. If you choose to go forward from here, you are responsible for any and all actions. If you aren't prepared for the possibility you may brick your tablet, this guide is not for you. NOTE: I've NEVER permanently bricked a device, but everyone's devices are different.
I have tested this method extensively and made extensive edits to the framework. I have bricked my tablets many times, sometimes several times a day. I risked and continue to risk losing my devices to damages by bringing you these next several guides. Please thank me when you've successfully completed this guide
Requirements:
-Rooted HD 10 or Fire 7 tablet
-Desktop PC with Android SDK installed
-APKtool
-Java (APKtool requires Java)
-Notepad++ (Install this first)
-7-Zip or like minded program
-A lot of patience and time
Notes:
-Works really well on the HD 10. Extensively tested.
-Works on the Fire 7, but with a much lower success rate. For some reason the Fire 7 gets very irritated very quickly, more often than not.
Instructions:
1. Go to the Java website and download the two files, JDK and JRE (not the JRE server) and install them. When doing so, make sure the installation path is just inside C: directory NOT C:\Program Files etc. It's much easier to have all your tools in the same directory for easy access. NOTE: You won't be able to use this guide without installing Java as it's required by APKtool.
2. Go to the APKtool website and download the tool and required files. They will also be placed into the C: directory. Installation instructions are in the same place. PLEASE READ THEM VERY CAREFULLY!
3. When you've completed the above tasks, plug your tablet into your PC. On your PC, open an ADB window. You need to pull one file from your tablet, framework-res.apk and send it to the APKtool folder in C:\APKtool (assuming that's where you installed APKtool). For this guide, your file(s) MUST be pulled from your device using ADB. DO NOT manually place them into the folder(s).
4. Once the framework apk is in the APKtool folder, open another command prompt window from the APKtool folder by holding down shift on the keyboard + right click on the mouse and select "open command window here." In this new command window type:
If you installed everything correctly, text will appear with a few commands you can issue APKtool.
5. Now we need to decompile the framework. In APKtool command window type the following command:
6. The framework-res.apk should then decompile into a folder inside your APKtool folder. Open the framework folder and navigate to:
7. Open the bools.xml file by right clicking on it and selecting Notepad++ as the editor. At this point quite a bit of code, or configurations will appear. Please look for the list of items below and change the values of them from 'false' to 'true':
8. Now save the file and close Notepad++. Back in the framework folder, open the arrays.xml file. Look for the following line of code:
9. In the first line above, wifi,1,1,2,-1,true, change the '2' to a '1'. Delete the second line completely, but leave the 'item' tags. Replace it with the following line of code:
I have personally marked each of these configurations as true to test battery drainage, and there was very little if any at all. Though the configuration for "background" scanning is enabled, I don't believe it's the same background scanning like the aggressive ones manufacturers and providers place in the general WiFi settings.
10. Save the files and close them. Head back to the APKtool folder and open the command window again, if you closed it. Type the following command:
11. You might see a few errors, but they can be ignored as long as the window tells you the APK was successfully created. If it was, go to the APKtool folder, tap on the framework-res folder, then tap on the 'dist' folder. Your new framework is inside. Right click on the NEW framework-res.apk and select "open archive." Go back to the main APKtool folder and right click on the ORIGINAL framework-res.apk and open it as an archive too.
12. Drag the 'res' folder from the newly generated APK to the old APK. If using 7-Zip, just click ok when the window pops up. Now do the same for the resources.arsc file and if usong 7-Zip, just select ok. If using WinRAR, you have to set the compression to STORE before you click ok.
13. Now open an ADB window. It's time to install the framework. In two commands, you'll be done. First type:
After you installed the framework, if you don't go into a bootloop within 10 seconds or less, you have most likely been successful, but you still have to reboot. Once you do, You'll notice a new toggle in your advanced WiFi settings. For an added bonus, you can edit your build.prop to specify the range of WiFi channels in your country. If in the US, you will add the number '11' and if in Europe and Asia, you want to put a 13 or 14.
OR
Would it be possible for you to post your modified framework-res file so those of us less skilled could just push your tested and working file. I would assume you will need a version for each OS aka one for 5600, 5601 and 5610
Click to expand...
Click to collapse
Posted. Look above this reply
Sent from my Amazon KFSUWI using XDA Labs
Thanks can't wait to try, unfortunately I won't have access to my tablet for the next 2 weeks but will definitely try first thing when I get it back.
DragonFire1024 said:
I'm posting the framework now. There are other tweaks as well, I just don't remember some. You can toggle the Wi-Fi GHZ in advanced Wi-Fi settings. I warn you though, this may not work. I've not tested this method so I'm not responsible for any bricks!
Sent from my Amazon KFSUWI using XDA Labs
Click to expand...
Click to collapse
Installed this on my tablet, it seems to have definitely fixed my issue where the tablet would stop stop loading when streaming videos. Thanks
I can't install the apk on my fire hd 10 os 5.6
endleesss said:
I can't install the apk on my fire hd 10 os 5.6
Click to expand...
Click to collapse
Are you trying to install it like a regular APK?
Sent from my Samsung Galaxy S4 using XDA Labs
In step 13, when I type 'adb remount' on adb window, it keeps showing me 'permission denied'.
I'm using os 5.6.1.0 on rooted fire hd 10 by the way.
zxcvbnm76 said:
In step 13, when I type 'adb remount' on adb window, it keeps showing me 'permission denied'.
I'm using os 5.6.1.0 on rooted fire hd 10 by the way.
Click to expand...
Click to collapse
Make sure the box is checked in adb insecure. You have to recheck the box each time you run a command, whether successful or not.
Sent from my Samsung Galaxy S4 using XDA Labs
DragonFire1024 said:
Make sure the box is checked in adb insecure. You have to recheck the box each time you run a command, whether successful or not.
Sent from my Samsung Galaxy S4 using XDA Labs
Click to expand...
Click to collapse
It worked! Thanks for your help.
@DragonFire1024 just got my hd 10 up and running with TONS of help from retyre. Currently on his 5610 img thats pre rooted and pre xposed. If you would be willing to make a 5160 framework-res for me with all your goodies I would be happy to help you test anything you like. If needed I can even upload the framework-res off my install to you for modding.
adm1jtg said:
@DragonFire1024 just got my hd 10 up and running with TONS of help from retyre. Currently on his 5610 img thats pre rooted and pre xposed. If you would be willing to make a 5160 framework-res for me with all your goodies I would be happy to help you test anything you like. If needed I can even upload the framework-res off my install to you for modding.
Click to expand...
Click to collapse
You'll likely have to send me a copy of yours to be on the safe side. There are some parts I cannot change or it gets stuck at the boot logo. If any of those are different from 5.6.0.1 to 5.6.1.0, then it would also get stuck. Send me your framework APK and I'll work on it. Almost done with the FireTabletSettings apk and then I'll overhaul my framework to include all mods instead of single mods and make it available. So my take a little time, but I'll do it
Sent from my Moto E4 using XDA Labs
DragonFire1024 said:
You'll likely have to send me a copy of yours to be on the safe side. There are some parts I cannot change or it gets stuck at the boot logo. If any of those are different from 5.6.0.1 to 5.6.1.0, then it would also get stuck. Send me your framework APK and I'll work on it. Almost done with the FireTabletSettings apk and then I'll overhaul my framework to include all mods instead of single mods and make it available. So my take a little time, but I'll do it
Sent from my Moto E4 using XDA Labs
Click to expand...
Click to collapse
https://bit.ly/2HOv0Rw (framework-res from 5.6.1.0) do you want the settings file as well? If so would it be SettingsProvider.apk you need?
Also have been toying with an idea... If I loaded RETYRE's image for system, clean, then adb pushed your settings and framework files to my system, then used flashfire for a raw system backup and posted the resulting image file, woudn't that be a good way to easily distribute your changes and his... with his and your permission to do so of course.
adm1jtg said:
https://bit.ly/2HOv0Rw (framework-res from 5.6.1.0) do you want the settings file as well? If so would it be SettingsProvider.apk you need?
Also have been toying with an idea... If I loaded RETYRE's image for system, clean, then adb pushed your settings and framework files to my system, then used flashfire for a raw system backup and posted the resulting image file, woudn't that be a good way to easily distribute your changes and his... with his and your permission to do so of course.
Click to expand...
Click to collapse
I would need FireTabletSettings.apk. I suppose it could be done like that, but I honestly don't know. You have my permission to try though. I'm almost done with Version one. I just need to do a few more things.
Sent from my Moto E4 using XDA Labs
adm1jtg said:
Also have been toying with an idea... If I loaded RETYRE's image for system, clean, then adb pushed your settings and framework files to my system, then used flashfire for a raw system backup and posted the resulting image file, woudn't that be a good way to easily distribute your changes and his... with his and your permission to do so of course.
Click to expand...
Click to collapse
While I don't have an issue with using my 5.6.1.0 image, I'm not sure merging these tweaks into the system.img and uploading a new 5.6.1.0 image would be my preferred approach. Instead, DragonFire1024 should upload his/her tweaks as a flashable .zip that one can flash with FlashFire.
Let's say you put up a modified system.img today and DragonFire1024 comes up with a couple of tweaks tomorrow. Will you create another system.img? If you have a good /system, would you want to dump an entirely new system.img just to get a few new tweaks?

[ROOT] [FRAMEWORK MOD] Enable 'Daydream' screensaver, change lock screen wallpapers!

Current as of March 29, 2018.
I've been saving this for a rainy day and it's raining at my house today I have been with XDA for about a year and a half now. I made a list of several goals I wanted to accomplish, mainly to do so without root. Though I have been successful at many tricks and hacks on these tablets WITHOUT root, sometimes, no matter how hard you try, some things can't currently be done without it. One of the goals I set was activating Android's stock Daydream screensaver. This is something that was built into Android and is a feature that is greatly underappreciated and many people just don't know it exists. It's also a feature Amazon blocks us from using. Another goal was to find a way to change the lock screen wallpapers after you got rid of Amazon Photos.
After several weeks of reading and researching, I finally discovered a working way to edit the framework and successfully install it back onto at least two of the Amazon tablets I own. In doing so I discovered how Amazon blocks the use of certain features and settings and in some cases, have been able to reverse their code and replace it with values that activate those things. As you can see in the screenshot below, the Daydream screensaver feature is installed onto the tablet. Using Activity Launcher, tap the top left pull down menu and select 'all activities. Scroll until you see the settings option and tap it. Then scroll until you see 'Daydream'. That's as far as you can go. If you tap it, the display settings is what pops up. Furthermore, if you disable or delete Amazon Photos, and you're stuck with their lock screen wallpapers for the rest of time, until now.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
In this case the settings don't redirect to another app like setting your lock screen wallpapers, which until now, required Amazon Photos to change. They simply take advantage of the framework, and block the use of the Daydream function through settings within it. That setting, among many more settings, are all allowed to be blocked and are options Android provides to manufacturers and service providers when they purchase the rights to a copy of an Android OS.
Today I am proud and very happy to announce through modding the FireOS framework on the Fire 7 and HD 10, I have successfully activated Android's stock Daydream screensaver, while at the same time, not destroying the fabric of FireOS. I have also found a way for you to once and for all, change your lock screen wallpapers WITHOUT the use of Amazon Photos.
In this TWO PART guide, I'll show you how to enable the use of the Daydream screensaver, install the 'Colors' add-on and show you how to change your lock screen wallpapers. The best part about Daydream, I have been able to track down the proper APK for Android's stock 'Colors' screensaver, also known as 'BasicDreams' and as you can see in the screenshot below, it surprisingly worked on both the Fire 7 and HD 8
The hardest part of all this, once Daydream was activated, was finding the proper APK to get this working. It took me about a week or more to track down the closest version of the 'BasicDreams' APK for our version of Lollipop and I provide it to you today as well. Follow the guide below on how to get Daydream activated and in part two, learn how to change your lock screen wallpapers WITHOUT the use of Amazon Photos.
*****WARNING*****
Editing or modifying the system framework can be very damaging to your device. I have spent an extensive amount of time studying it and ways to edit it. I am writing this guide now because I believe this method is the safest way to edit the framework without damaging your tablet. With that said, your results might not be the same. As such, from this point forward in this guide, I cannot be responsible for any damage that may occur to your device. Please only continue if 1) You are willing to risk a possible brick 2) If you are willing to flash back to the last version of FireOS that your tablet was on in case a brick does occur.
Part 1: Enable 'Daydream' Screensaver
Requirements:
- Rooted Amazon Fire 7 or HD 10.
- Windows PC with ADB installed.
- APKtool (Please note you need to install Java version 7 or greater in order to use APKtool).
- 7-Zip
- Proper 'BasicDreams' screensaver APK, provided at the bottom of this post.
- Notepad++
- ADB insecure
- Patience.
Instructions:
1. On your PC, Download and install 7-Zip, Java (INSTALL JAVA BEFORE YOU INSTALL APKTOOL!!), APKtool and Notepad++ and ADB Insecure, if you haven't done so already, from the links provided above. Download links and install instructions for APKtool can be found here. On your Fire 7 or HD 10, download and install ADB insecure from the link provided above. For APKtool, I recommend you create a folder named 'apktool' in your C:\ directory, as seen in the screenshot below:
2. Once you've installed those two things, plug your tablet into your PC and make sure you have ADB debugging enabled in developer options. (Tap settings, device options, tap serial number 7 times, tap developer opeions and enable ADB). Open an ADB window. We need to get a copy of your framework package by typing the command below into your ADB window and pressing enter. This command assumes you installed APKtool into your C:\ directory:
Code:
adb pull /system/framework/framework-res.apk C:\apktool
3. Now on your PC, you need to navigate to your APKtool folder in C:\. When the window opens, open a command window by holding down shift and right clicking on the APKtool folder window and select 'open command window here'. An example of how that command window would look is posted below:
4. Now we need to install the framework APK into APKtool so it's able to decompile it. In the APKtool command window, type the following command:
Code:
apktool if framework-res.apk
5. Time to decompile the framework so we can look inside of it and make ONLY one edit. Yes that's all it takes is one edit. Amazon only blocks out the Daydream screensaver by using one word. Type the following command in the APKtool window to decompile the framework APK:
Code:
apktool d framework-res.apk
6. Now go back to your APKtool folder on your PC. Another folder should have been created inside the APKtool folder. The folder will be called 'framework-res'. Open up the folder and double click the RES folder. Scroll down until you see the folder named 'values' and double click it. You then should then see a list of XML files, like in the screen shot posted below:
7. Right click on the file named 'bools.xml' and select 'Open with Notepad++'. Slowly scroll the page and look for the configuration setting as seen below. On my Fire 7 the configuration is on line 98:
Code:
<bool name="config_dreamsSupported">false</bool>
8. In the configuration it will say 'false'. Change it to 'true' (no quotation marks) so it looks like this:
Code:
<bool name="config_dreamsSupported">[B]true[/B]</bool>
9. Then save the file by clicking on the floppy disc icon at the top left of Notepad++. DO NOT MAKE ANY OTHER EDITS!! You can now close Notepad++ and open the command window for APKtool again. We have to recompile the framework. Do that by typing the following command into the APKtool command window:
Code:
apktool b framework-res
10. You might get an error or three as the APK recompiles. As long as APKtool builds the APK, ignore the errors. If any pop up during the rebuild process, at most there will be 3 that will say something about an 'ellipsis' and time formatting. They don't mean anything as far as I can tell. If there are more errors which are fatal for the framework APK building, APKtool will not complete the build process. If the build process successful, move onto the next step. Otherwise please repeat the process from step two and make sure you don't edit anything else.
11. Back on your PC, bring up the APKtool folder again. Open the 'framework-res' folder. A few new folders have been created by APKtool. The only one you need to worry about is 'dist'. Double click that folder. This is where APKtool puts rebuilt APKs. Right click on the 'framework-res.apk' file and choose '7-Zip' and 'open archive'. DO NOT CHOOSE UNZIP!!! (Unzipping or decompiling the APK improperly will result in undesirable consequences when you install it back on your tablet.)
12. A 7-Zip window will open up listing a few files. You can make it a little smaller and move it out of the way, but don't minimize it. Back at the APKtool folder (you should still be inside the dist folder), click the back or arrow up button until you are back in the main APKtool folder. Right click your OLD framework-res.apk file and select 7-Zip and 'open archive'. Again do NOT unzip or decompile the APK. You can make the 7-Zip window that opens, smaller if you like, but now make sure the two 7-zip windows are side by side, noting which one is the OLD and which is the NEW archive (the one with 'dist' in the directory is the NEW APK. See below):
13. Highlight the 'res' folder in the 7-Zip window containing the NEW archive. Now drag the 'res' folder from the new archive into the 7-Zip window containing the OLD archive. A window will appear asking if you "really want to copy the folder". Click yes. Now highlight the 'resources.arsc' file in the NEW archive window and then drag it to the OLD archive window and click yes when it asks you if you really want to copy it. You can now close both 7-Zip windows and navigate back to your APKtool window.
14. Now it's time to install the modified framework. Open ADB Insecure if you've already installed it. Grant it SuperUser rights and check the box next to "enable insecure adbd" and open an ADB command window. In order for this next step to be successful, you MUST have insecure adbd enabled. When you're ready, type the command:
Code:
adb remount
15. The window should reply with 'remount succeeded" as seen above. Now we are going to install the framework to the system. Don't worry about setting permissions for the framework. Because we are pushing the framework into the system via ADB and because the framework-res APK was already a system app, ADB will automatically set the proper permissions for the framework APK. This is the moment of truth! Type the following command below (this is assuming you installed APKtool into the C:\ directory). Once installed, within 5-10 seconds some buttons may appear different or be a different color. This is normal and generally signals a successfull installation. If within 5-10 seconds your tablet automatically reboots itself, that generally signals a soft brick. Here we go! Type the commands below, into your ADB command window one at a time:
Code:
adb push C:\apktool\framework-res.apk /system/framework/framework-res.apk
adb reboot
16. If your tablet rebooted successfully, congrats, you just activated Daydreams Before we install the Colors screensaver, go ahead and navigate to your display settings on the tablet. You'll notice a new tile, 'Daydream'. Tap on it and a new window opens. From here you can use the stock desk clock app for the screensaver, install 'Colors' or choose the Amazon screensaver. For Colors: Download the attached BasicDreams APK at the bottom of this post, but do NOT install it. Place the APK into your ADB folder. When done type the following command below. Again no need to worry about setting permissions to the APK as ADB will do it for us:
Code:
adb push BasicDreams.apk /system/app
adb reboot
17. When your tablet reboots, download and install Activity Launcher if you haven't done so already. Tap the pull down at the top left and select all activities. Scroll down until you see SystemUI and tap on it, then tap 'Dessert Case'. To stop the screensaver, tap and pull up near the navigation bar and swipe it closed. Navigate to your display settings again and tap on Daydream. You now have 3 screensavers!!! Tap the three dots at the top right for options on when the screensavers should turn on aka 'daydream'. You can also tap 'start now' to preview them.
So far, these are the only three I have been able to get working. I am still trying to get Photo Table to work, but I am pretty sure Gapps needs to be installed, and I haven't gotten that far to test it. I've tried other screensavers from the Play Store with no luck unfortunately. However if anyone finds anymore working ones, please post your results/finds
Thanks everyone who followed. This makes me quite happy to see this unique feature on these tablets as they are deserving of such a thing. It's disappointing Amazon lets such a great thing go to complete waste. This maybe an old feature, but a very cool and underappreciated one. I hope everyone enjoys this as much as I did unlocking it. I'll be honest; I never thought I would be able to learn basic coding. At least not enough to get this far and accomplish the things I have. Thanks for the support everyone
Watch for part two in the next couple days: Change your lock screen wallpapers...WITHOUT using Amazon photos!!
Part 2: Change your lock screen wallpapers
This guide will teach you how to change all of the stock FireOS wallpapers. This is much easier than activating Daydreams and you don't need Java or Apktool to make the edits.
This guide is mainly for individuals who want to or already disabled/uninstalled Amazon Photos. When you disable or uninstall Amazon Photos, you lose the ability to change your lock screen wallpapers. This guide will work for both the Fire 7 and HD 10.
Requirements:
- ROOTED Fire 7 or HD 10
- 7-Zip
- ADB insecure
- Your choice of any 7 wallpapers
- Windows PC with ADB
Instructions:
IMPORTANT: Make a copy of your SystemUI.apk at /system/priv-app/SystemUI and place it somewhere on your PC in case you have an unfavorable result, you won't have to reset your device.
1. Download and install 7-zip.
2. First we need to get a copy of your SystemUI. Plug your tablet into your PC, making sure ADB debugging is enabled in the developers menu. Open an ADB window on your PC and type the command below (the actions of moving the SystemUi.apk around should only be done via ADB. Never copy and past an APK from one device to another if you intend on editing it.)
Code:
adb pull /system/priv-app/SystemUI/SystemUI.apk
3. Running the above command will have resulted in making a copy of your SystemUI.apk and then placed it on your PC, into the same folder as ADB.
4. Create a folder on your desktop for the 7 wallpapers you desire. You can pick 7 different ones, or use the same wallpaper 7 times, but you can't choose any more or any less of a quantity. Putting anymore or less in the SystemUI will cause the tablet to bootloop. I have a collection of about 200 stock Android wallpapers from the first version, all the way to Nougat. It doesn't matter what size they are because you'll be resizing them anyways.
5. Once you've chosen your wallpapers, you'll have to resize them. For this guide I will be using Microsoft Paint. Navigate to the folder containing your new wallpapers and open the first one in Paint. Click the 'Resize' button at the top left of the screen, select Pixels and make sure the 'maintain aspect ratio' box is UNCHECKED. Your wallpaper MUST be the same size/resolution as Amazon's. Enter the values as listed and pictured below:
Code:
Horizontal: 1920
Vertical: 1200
6. Save the wallpaper as a .jpg. The name doesn't matter right now because we will be renaming them. If you are going to use 7 different wallpapers, you need to make a copy of the wallpaper you just resized. Open it in paint and again click resize, select Pixels and make sure 'maintain aspect ratio' is UNCHECKED. Reverse the dimensions:
Code:
Horizontal: 1200
Vertical: 1920
7. If you want to keep the same wallpaper on your lock screen all the time, repeat the above step with copies of the same wallpaper. Regardless if you use the same ones or different ones, you will have 14 wallpapers in the folder when done.
8. Navigate back to your ADB folder and locate SystemUI.apk. Right click on it and select the '7-Zip' option then 'open archive'. DO NOT UNZIP, EXTRACT OR DECOMPILE THE APK! Resize the window so you have a good amount of space to open the wallpaper folder we just made. Place the windows next to each other.
9. In the 7-zip, SystemUI archive window, double click on the 'res' folder then locate and double click the 'raw-hdpi-v4' folder. This is the location of the Amazon's default lock screen wallpapers. In your custom, wallpaper folder, you need to rename each wallpaper to match the names of Amazon's. It's important you do this step and that the names match. Otherwise when you reinstall the SystemUI, it will crash.
10. When you're done, in your custom wallpaper folder, click on 'Edit' a the top and 'select all'. Click on any of the wallpapers but don't let go! Start to drag them over to the 7-zip SystemUI window. Make sure you have all of them, then let go. When the box pops up asking you if you want to overwrite the other wallpapers just click yes. Close both windows and open an ADB window again.
11. Download and install ADB Insecure from the link at the beginning of this post. Open it and grant it root access if you don't have SuperSU set to automatic. Check the box to put ADB into insecure mode. In the ADB window, type the following commands, pressing enter after each one.
Code:
adb remount
adb push SystemUI.apk /system/priv-app/SystemUI/SystemUI.apk
adb reboot
12. That's all. If successful, your tablet will reboot and your custom lock screen wallpaper(s) should appear. If unsuccessful, your tablet will reboot, but with no SystemUI active. I'll write a small guide on recovering from a SystemUI crash without reflashing firmware if anyone has a problem. Until then enjoy your wallpapers. Just remember you have to repeat this guide each time you want to change them. Until I can figure out how Amazon Photos has such control over the lock screen, this is the only way to change your lock screen wallpapers if you uninstall Amazon Photos. Thank you for following everyone!
Definitely looking forward to trying this!
Still waiting for part 2. Also wondering if it's possible to modify the framework so that we can customize the power options.
oscarcx said:
Still waiting for part 2. Also wondering if it's possible to modify the framework so that we can customize the power options.
Click to expand...
Click to collapse
Got a little busier this weekend than I predicted. I will try to get part 2 up today or tonight.
Is it possible? Yes. However I'm having a difficult time with it. Those settings are a bit scattered and butchered so I'm having trouble figuring out which xml to edit. Amazon created their own xml files to override some of androids. It also doesn't help that a lot of values from the bools are repeated then scattered across various system apps. I know one issue is the power profile. Amazon did a good job of butchering that setting and it's proving difficult reconstruct. In other words the power profile is almost non existent.
DragonFire1024 said:
Got a little busier this weekend than I predicted. I will try to get part 2 up today or tonight.
Is it possible? Yes. However I'm having a difficult time with it. Those settings are a bit scattered and butchered so I'm having trouble figuring out which xml to edit. Amazon created their own xml files to override some of androids. It also doesn't help that a lot of values from the bools are repeated then scattered across various system apps. I know one issue is the power profile. Amazon did a good job of butchering that setting and it's proving difficult reconstruct. In other words the power profile is almost non existent.
Click to expand...
Click to collapse
No need to hurry. These are great discoveries so take your time to write the tutorial
In my opinion, your tutorial is kind of way too detailed. I know it's great for tech newbies, but by simplifying it a little bit could effectively save your time.
For the power option, if it's way too hard to customize it, maybe spending time on other stuff will be a better choice.
Anyways, thanks for your amazing work!
oscarcx said:
No need to hurry. These are great discoveries so take your time to write the tutorial
In my opinion, your tutorial is kind of way too detailed. I know it's great for tech newbies, but by simplifying it a little bit could effectively save your time.
For the power option, if it's way too hard to customize it, maybe spending time on other stuff will be a better choice.
Anyways, thanks for your amazing work!
Click to expand...
Click to collapse
I think it's more of putting pieces back in the right spots, for example, settings fragments. Some things are directed with Amazon's fragments and it's just a matter of finding the right android fragment and replacing it. In other cases, Amazon blocks out some features in an 'assets' file. Some things are also set in smali files/java and I know very little about smali, so have been reading up on that. Sometimes the fix is just a simple word change like the DayDream. I also recently discovered other settings or at least "project defaults " set by mediatek. I'm able to change some of those and supposedly add them to the build prop for more activation, but so far I haven't seen a difference.
Change your lock screen wallpapers everyone Part 2 is out!
DragonFire1024 said:
This guide will teach you how to change all of the stock FireOS wallpapers. This is much easier than activating Daydreams and you don't need Java or Apktool to make the edits.
(........................)
Thank you for following everyone!
Click to expand...
Click to collapse
Brilliant! Never thought of replacing those default wallpapers. At least this is a temporary solution.
I am wondering how the lockscreen wallpaper works and correct me if I am wrong. The app called "Special offer" is included in stock Fire OS and it has the ability to either change the wallpaper or overlay the wallpaper. Maybe it's a good idea to start from there but I am not sure about the legitimacy issue.
The lockscreen itself is weird though. Using Gravity Box, I can change some of the features but not all of them. Someone here told me that the lockscreen is deeply integrated into Fire OS.
oscarcx said:
Brilliant! Never thought of replacing those default wallpapers. At least this is a temporary solution.
I am wondering how the lockscreen wallpaper works and correct me if I am wrong. The app called "Special offer" is included in stock Fire OS and it has the ability to either change the wallpaper or overlay the wallpaper. Maybe it's a good idea to start from there but I am not sure about the legitimacy issue.
The lockscreen itself is weird though. Using Gravity Box, I can change some of the features but not all of them. Someone here told me that the lockscreen is deeply integrated into Fire OS.
Click to expand...
Click to collapse
There's a line in the build.prop file called "curlockscreen" with a value of 1. I have no idea exactly what it's for, but it might be related to disabling and/or modifying the lock screen.
lakitu47 said:
There's a line in the build.prop file called "curlockscreen" with a value of 1. I have no idea exactly what it's for, but it might be related to disabling and/or modifying the lock screen.
Click to expand...
Click to collapse
Just did a quick search on it and looks like it's the default lockscreen style
I decided to give Part 1 a try.
I got up to step 15 successfully, including having the Daydream tile.
I'm presuming that — to install BasicDreams.apk (in step 16) — you need to have another round of "adb remount"
Unfortunately, although "adb remount" worked when I did it the first time, trying to do it now results in an error:
remount of system failed: Invalid argument
remount failed
Trying to copy (with the "adb push BasicDreams.apk" command) results in an error:
adb: error: failed to copy '[PATH]/BasicDreams.apk' to '/system/app/BasicDreams.apk': remote Read-only file system
(Unsurprisingly, this is the same error if I try to do the "adb push BasicDreams.apk" thing without trying "adb remount")
In all cases, I'm re-enabling the "Enable insecure adbd" option from the "adbd insecure" app.
Any ideas how to fix this?
GamerOfRassilon said:
I decided to give Part 1 a try.
I got up to step 15 successfully, including having the Daydream tile.
I'm presuming that — to install BasicDreams.apk (in step 16) — you need to have another round of "adb remount"
Unfortunately, although "adb remount" worked when I did it the first time, trying to do it now results in an error:
remount of system failed: Invalid argument
remount failed
Trying to copy (with the "adb push BasicDreams.apk" command) results in an error:
adb: error: failed to copy '[PATH]/BasicDreams.apk' to '/system/app/BasicDreams.apk': remote Read-only file system
(Unsurprisingly, this is the same error if I try to do the "adb push BasicDreams.apk" thing without trying "adb remount")
In all cases, I'm re-enabling the "Enable insecure adbd" option from the "adbd insecure" app.
Any ideas how to fix this?
Click to expand...
Click to collapse
Make sure box is checked in adb insecure. After a reboot, you need to check the box again.
oscarcx said:
Just did a quick search on it and looks like it's the default lockscreen style
Click to expand...
Click to collapse
Yes but broken up internally. I do have a fix but I have to consult a developer before I announce it as it uses a piece of software from another rom.
GamerOfRassilon said:
I decided to give Part 1 a try.
I got up to step 15 successfully, including having the Daydream tile.
I'm presuming that — to install BasicDreams.apk (in step 16) — you need to have another round of "adb remount"
Unfortunately, although "adb remount" worked when I did it the first time, trying to do it now results in an error:
remount of system failed: Invalid argument
remount failed
Trying to copy (with the "adb push BasicDreams.apk" command) results in an error:
adb: error: failed to copy '[PATH]/BasicDreams.apk' to '/system/app/BasicDreams.apk': remote Read-only file system
(Unsurprisingly, this is the same error if I try to do the "adb push BasicDreams.apk" thing without trying "adb remount")
In all cases, I'm re-enabling the "Enable insecure adbd" option from the "adbd insecure" app.
Any ideas how to fix this?
Click to expand...
Click to collapse
How about,
adb shell
su
mount -o rw,remount /system
Instead of adb remount? It looks like an error in adb remount.
Supersonic27543 said:
How about,
adb shell
su
mount -o rw,remount /system
Instead of adb remount? It looks like an error in adb remount.
Click to expand...
Click to collapse
You can do that I suppose. I haven't tried. I side stepped that method because adb will make sure the APK has the permissions assigned properly amongst other anomalies I've come across. These are old APKs from original sources I work with. Most of the time i keep them safely inside their zipped ROM and sometimes you only get so many uses out of them if you move them around outside the system too much without proper permissions. In a matter of speaking they get lost and stop working. So I try to minimize the amount of time they remain away from home. With that said, it shouldn't be a problem.
Sent from my Samsung Galaxy S4 using XDA Labs
To follow up here:
1) I was certain I re-enabled adb insecure.
2) I tried "mount -o rw,remount /system", and got a similar error: "mount: Invalid argument". I also tried a command that worked in the past (that I'm pretty sure is doing the same thing): "mount -w -o remount /system" (no quotes, obviously), and also got the "mount: Invalid argument" error.
3) The error I had in this circumstance was similar to one I had on an unrelated matter regarding getting FlashFire working.
What I suspect is that somehow /system gets tired of being written to, and it "locks me out" for some reason. (There are two points when I have traditionally made use of "mount -w -o remount /system" — when I copy over the initial /system image via "dd if=/sdcard/system.img of=/dev/block/mmcblk0p13; sync" and when I disable OTA updates with "mv /system/priv-app/DeviceSoftwareOTA/DeviceSoftwareOTA.apk /system/priv-app/DeviceSoftwareOTA/DeviceSoftwareOTA.apk_" )
Another possibility is that I had somehow made a mistake in following this tutorial originally, typing "adb push [SOURCE]\framework-res.apk /system/framework-res.apk" instead of "adb push [SOURCE]\framework-res.apk /system/framework/framework-res.apk"
I deleted the errant framework-res.apk from /system, but I wonder if that somehow tripped up some kind of "don't muck with this" flag that wouldn't let me remount it.
4) Speaking of which, are you sure about this command in Step 16?
adb push BasicDreams.apk /system/app
Click to expand...
Click to collapse
I can't get it to work. In fact, if I use a file browser to go to /system , I just have a non-folder file named "app" that happens to be the same size as BasicDreams.apk . . .
I reflashed my /system and confirmed that I don't seem to have a folder named "app" in /system , so I can't quite figure out what that command is doing . . . Does it need to be:
adb push BasicDreams.apk /system/priv-app
? (I have a 2017 HD10, if it matters.)
5) For my second attempt, I tried to do as "clean" a re-install of my system as I could, avoiding the two instances of when I would remount /system in the past (flashing a straight system.img extracted from an update and freezing the OTA app with Titanium Backup). This time, remounting worked both times, as did the rest of the procedures (with the exception of the "BasicDreams.apk" problem, directly above).
GamerOfRassilon said:
To follow up here:
1) I was certain I re-enabled adb insecure.
2) I tried "mount -o rw,remount /system", and got a similar error: "mount: Invalid argument". I also tried a command that worked in the past (that I'm pretty sure is doing the same thing): "mount -w -o remount /system" (no quotes, obviously), and also got the "mount: Invalid argument" error.
3) The error I had in this circumstance was similar to one I had on an unrelated matter regarding getting FlashFire working.
What I suspect is that somehow /system gets tired of being written to, and it "locks me out" for some reason. (There are two points when I have traditionally made use of "mount -w -o remount /system" — when I copy over the initial /system image via "dd if=/sdcard/system.img of=/dev/block/mmcblk0p13; sync" and when I disable OTA updates with "mv /system/priv-app/DeviceSoftwareOTA/DeviceSoftwareOTA.apk /system/priv-app/DeviceSoftwareOTA/DeviceSoftwareOTA.apk_" )
Another possibility is that I had somehow made a mistake in following this tutorial originally, typing "adb push [SOURCE]\framework-res.apk /system/framework-res.apk" instead of "adb push [SOURCE]\framework-res.apk /system/framework/framework-res.apk"
I deleted the errant framework-res.apk from /system, but I wonder if that somehow tripped up some kind of "don't muck with this" flag that wouldn't let me remount it.
4) Speaking of which, are you sure about this command in Step 16?
I can't get it to work. In fact, if I use a file browser to go to /system , I just have a non-folder file named "app" that happens to be the same size as BasicDreams.apk . . .
I reflashed my /system and confirmed that I don't seem to have a folder named "app" in /system , so I can't quite figure out what that command is doing . . . Does it need to be:
adb push BasicDreams.apk /system/priv-app
? (I have a 2017 HD10, if it matters.)
5) For my second attempt, I tried to do as "clean" a re-install of my system as I could, avoiding the two instances of when I would remount /system in the past (flashing a straight system.img extracted from an update and freezing the OTA app with Titanium Backup). This time, remounting worked both times, as did the rest of the procedures (with the exception of the "BasicDreams.apk" problem, directly above).
Click to expand...
Click to collapse
I am not too sure why this is happening. I presume you edited the framework-res.apk? If so, use a root explorer, I use the actual Root Explorer, and navigate to /system/priv-app and create a folder named BasicDreams. If using root excplorer, Long press the folder, tapp three dots at top right, tap permissions, set to 0755 (rwxr-xr-x). Place the APK in the internal storage of your tablet. Open your root explorer and go to your internal storage. CUT the APK FIRST to /system then CUT it to the BasicDreams folder in /system/priv-app you just made. When done, if using root explorer, long press the APK, tap three dots on upper right and tap permissions. set permissions to 0644 (rw-r--r--). Reboot then go to settings, display, and see the Daydream menu.
DragonFire1024 said:
I am not too sure why this is happening. I presume you edited the framework-res.apk? If so, use a root explorer, I use the actual Root Explorer, and navigate to /system/priv-app and create a folder named BasicDreams. If using root excplorer, Long press the folder, tapp three dots at top right, tap permissions, set to 0755 (rwxr-xr-x). Place the APK in the internal storage of your tablet. Open your root explorer and go to your internal storage. CUT the APK FIRST to /system then CUT it to the BasicDreams folder in /system/priv-app you just made. When done, if using root explorer, long press the APK, tap three dots on upper right and tap permissions. set permissions to 0644 (rw-r--r--). Reboot then go to settings, display, and see the Daydream menu.
Click to expand...
Click to collapse
I did edit the framework-res.apk, yes.
I jumped through all those hoops, it it is — indeed — working! (I interpreted the instructions as "Cut and paste into /system, then cut and paste it from /system into the folder on /system/priv-app" . . . is that because the file needs to "touch" /system to work correctly? And I just COPY/pasted the first time into /system, to keep the original backed up on my SD card.)
GamerOfRassilon said:
I did edit the framework-res.apk, yes.
I jumped through all those hoops, it it is — indeed — working! (I interpreted the instructions as "Cut and paste into /system, then cut and paste it from /system into the folder on /system/priv-app" . . . is that because the file needs to "touch" /system to work correctly? And I just COPY/pasted the first time into /system, to keep the original backed up on my SD card.)
Click to expand...
Click to collapse
It touches the system just as a precaution. I've read in places it a way for the system to better accept APKs as a system app when you force install it like this. I don't know if it's true, but when manually adding a file, i take this step as a just in case route.

Categories

Resources