Comments (95)
What is the big deal? You can class-dump files on your own from iOS Simulator. I already did that few minutes ago and I will post the project when it's ready and fully working. 👍
from customwatchfacetest.
Not sure what all the hubbub is with @DominikBucher12 but he is right: it's not that hard to class-dump the sim headers and get the project to compile. If you need any proof, you can grab the dylib I compiled. Since my school's on Thanksgiving break, I decided to pick up the project again to try to figure out how to inject the library into Carousel. All I've been able to do so far is make my watch crash. I pushed a new repo with the patched frameworks and project I'm working on if you want to see what I'm up to: https://github.com/Baddaboo/WatchYourFaceTest
from customwatchfacetest.
@DominikBucher12 YES!!! FINALLY!! Please share once you get it working!!!
from customwatchfacetest.
FWIW I even tried swizzling a clockkit function to see if I could get Carousel to execute a dlopen through a complication, but that route seems like a dead-end :/
from customwatchfacetest.
Not sure if anyone is still interested but here's the updated/working repo for use with Simulator.
https://github.com/justMaku/NTKCustomFace
from customwatchfacetest.
@VedBoon watchOS 2 beta has been made available by Apple for developers: https://developer.apple.com/watchos/pre-release/
OS in beta versions are meant for developers to test their apps BEFORE the OS is released so the apps are ready for prime time. Github is also meant for developers. There is absolutely no justification why the code and technique are not fully shared already. An no, the project presented by Hamza Sood is not a solution for jailbroken devices.
from customwatchfacetest.
any progress? :-/ its been almost a year since this was posted :(
from customwatchfacetest.
@DominikBucher12 Excellent, could we see a proof of concept? How far along do you think you are with it?
from customwatchfacetest.
Progress has been very hit-and-miss. I've tried to get Carousel to load the dylib, but debugserver has very little documentation on what it can actually do and there are many points at which I do something that causes my watch to lock up and stop responding to Xcode's debugger until I restart it
from customwatchfacetest.
@Baddaboo Thanks, your route now is a kind of good way.
from customwatchfacetest.
Few tips on injecting dylibs, a bit old perhaps http://blog.timac.org/?p=761
a bit of theory:
http://www.programering.com/a/MTN2MzMwATY.html
from customwatchfacetest.
I also can't find anything that would get a dylib called Carousel, and can't find the framework on my computer. Running El Capitan 6 and Watch OS 2 5
from customwatchfacetest.
It's a from the private framework, NanoTimeKit. We need to find a private header dump from a watch device to even build this. I have no clue how make Carousel pick it up though. I've never done jailbreak dev, just regular.
from customwatchfacetest.
@carbamide do you have any idea what Carousel even is? Maybe we can figure it out.
from customwatchfacetest.
Carousel is the equivalent of SpringBoard for WatchOS.
from customwatchfacetest.
Hello @carbamide, do you have a link to download NanoTimeKit header ?
from customwatchfacetest.
Seems like this is the dump we need? https://github.com/nickfrey/WatchOS-Headers/tree/master/Device/NanoTimeKit.framework
from customwatchfacetest.
Thank's @matthijsotterloo, but I allready include this framework in my project but it doesn't compile.
from customwatchfacetest.
Yes also tried that, it doesn't compile because it's missing NanoTimekit.h which is not included in this framework...
from customwatchfacetest.
As stated above, NanoTimeKit is an internal framework running on the Watch. To get headers you can either class dump the binary, or simply write them yourself.
I do not know how he has gotten Carousel to load the dylib, however. That is something I would be very interested in hearing, purely to satiate my curiosity.
from customwatchfacetest.
Carousel is the watchOS equivalent of SpringBoard. It's the app that displays the home screen, notification centre, glances, watch faces etc. I haven't open sourced how I got Carousel to load the dylib. This repo only contains the watch face code and what you'd need to hook once you've got code running in Carousel.
from customwatchfacetest.
@hamzasood Would you be willing to share what vector/general starting point you're using to get Carousal to load dylibs? Fully understand you don't want to share all your goodies, though this is something that seems very interesting and I'd love to look into it for myself, though I'm not sure where to start.
from customwatchfacetest.
+1 @codyd51
from customwatchfacetest.
@codyd51 I may have found at least a way to load the dylib on the simulator. At the moment I am trying to get the dylib to compile.
The NanoTimeKit.h file is pretty much just a file to import everything from the Framework. This can easily be done yourself.
from customwatchfacetest.
@DJLectr0 I finally decompiled the Carousel headers and compiled the dylib.... would really appreciate your thoughts on loading it.
from customwatchfacetest.
@DJLectr0 Hey, that's better than nothing! Mind divulging how you did that? Maybe we could go digging together and see what we can figure out :-)
from customwatchfacetest.
@VedBoon Sure. Could you also share your xcodeproject with me where you got it to compile? (Best would be private because of the NDA)
I thought of loading in the Simulator like when you load tweaks in the ios sim (http://sharedinstance.net/2013/10/running-tweaks-in-simulator/) so editing the lanchdaemons of the sim sdk to include the Dylib injection like in the article just instead of springboard the carousel plist.
from customwatchfacetest.
@DJLectr0 That post is sorely outdated and does not work on recent versions of the iOS sim. I cannot speak for the Watch sim as I have not tried it, but the current method for loading dylibs into the iOS sim is utilizing optool by @alexzielenski
from customwatchfacetest.
@codyd51 Ok did not know that :( So maybe try optool?
from customwatchfacetest.
@DJLectr0 Actually, I have. I totally forgot about this earlier, but @EthanArbuckle and I fooled around with loading some dylibs into the Watch sim's Prefs.app - nothing big, mind you; pushing dumb view controllers and changing color schemes. Neat, but it does not help the final goal of getting dylibs loaded onto an actual device.
from customwatchfacetest.
@codyd51 Well its a start ;) We could try to load a custom firmware or with the new independent apps look if we can use some methods from some private Frameworks to get it to load the dylib.
Another thought: If we can load dylibs we could theoretically change everything hookable in the system (e.g. Making whatsapp quick reply)
from customwatchfacetest.
Share your magix hamza
from customwatchfacetest.
@codyd51 When I get home, I will try to load some simple dylibs in the Simulator and then look at how to get the watch OS 2 Firmware
from customwatchfacetest.
(Addressing each sentence in order)
@DJLectr0 Loading a custom firmware isn't in the spirit of what we're trying to achieve IMHO. It's the argument of using Substrate over manually replacing binaries.
We can't use private frameworks while sandboxed.
Yes, that's kind of the whole idea regarding tweak development ;P
from customwatchfacetest.
from customwatchfacetest.
@codyd51 Yes I know, but if we could load a custom Firmware we could inject a dylib, which is what we are trying here. I know its really manual but it would be a nice start.
Hamzasood is also in an internal testing mode. Maybe this allows him to load dylibs?
I will also dig through the carousel headers, maybe there is something there.
from customwatchfacetest.
@DJLectr0 @codyd51 Maybe I didn't unsderstand. But we can try to load dylib to carusel with lldb like this http://www.ifans.com/forums/threads/dylib-injection-with-iphone-simulator.109242/
from customwatchfacetest.
@AlexeyBlezeko the problem is that we need to find a way to inject the dylib into carousel on an actual watch.
from customwatchfacetest.
@DJLectr0 Can we use gdb on actual watch?
from customwatchfacetest.
@AlexeyBelezeko Simple answer: no. The reason is twofold:
-
That would mean we need native code execution on the watch, which is the end goal in the first place
-
watchOS is just iOS 8.4 using Carousel as a launcher instead of SpringBoard. There is no working version of gdb on > iOS 8, so even if we had native code exec. we could not use gdb.
from customwatchfacetest.
@codyd51 Not quite true. The DeveloperDiskImage for iOS and watchOS both have debugserver. But it can only attach to processes with the get-task-allow entitlement.
from customwatchfacetest.
Ah! My mistake, then.
from customwatchfacetest.
@codyd51 How did you manage to load dylibs on the simulator. Using optool it throws no error but the Watch Simulator seems without changes.
from customwatchfacetest.
@VedBoon How did you get the UIKit headers? I cannot find nor extract them from Carousel.
from customwatchfacetest.
@DJLectr0 As of the watchOS 2 SDK, UIKit (at least the modified version for watchOS) is a supported framework you don't need to classdump https://developer.apple.com/library/prerelease/watchos/documentation/UIKit/Reference/UIKitFunctionReference/index.html
from customwatchfacetest.
@Baddaboo Ok, but to compile the NTK headers I need the full UIKit headers. The ones from the watch OS 2 SDK only are around 10, without UIView, UIControl, etc.
from customwatchfacetest.
@DJLectr0 Yeah I realized that right after I posted that comment. I quickly tried tossing in a few from the iOS framework but that didn't resolve anything. I know the standard UIKit has been shown to work on the watch, so maybe that's worth exploring
from customwatchfacetest.
@Baddaboo I thought of that as well since you only need the headers, not actual working code.
from customwatchfacetest.
@DJLectr0 You only need a handful of NTK and UIKit headers to get Xcode to stop complaining from building.
@codyd51 where you successful in patching debugserver? I received a "malformed object (unknown load command 9)" from codesign_allocate
from customwatchfacetest.
@VedBoon Oh ok. I think you need to xcode-select the beta to get the latest code-signing binary. I did this and it did the trick.
from customwatchfacetest.
@VedBoon At the moment I am trying to get the debugserver running on the simulator. It definitely sees the executable with NSTask. (Every other path it crashes and says invalid path), but I cant get any output from the Task and I think it immediately closes. With posix_spawn I get a status code of some random number. I also can't get a const char array to work. With breakpoints it seems always empty. system() just downright crashes on the watch.
from customwatchfacetest.
40 messages and no answer to the questions asked here by the community. What a shame.
What is the point of announcing the hack on Twitter then publishing the code on GitHub, a public OPEN-SOURCE web site to SHARE code, but not giving a single clue about how to load the dylib in Carousel, NanoTimeKit.h and the like?
from customwatchfacetest.
@DJLectr0 We don't have write/execute permissions for root, only read. Once we do have full permissions, it's a matter of replacing the debugserver with one that has been modified with a get-task-allow entitlement and having Carousel call dlopen to the dylib.
@tokamac this hasn't been open sourced yet because watchOS 2 isn't officially released. This is more for the ones that have already rooted/jailbroken their device and a teaser for everyone else.
from customwatchfacetest.
@tokamac the term "jailbroken" refers to having full root permissions on your idevice. Hamza sood and a number of other already do. This means they are capable of loading dylib's (such as this custom watch face). If they were to open source how to receive root permissions before the official watchOS 2, not beta, than apple will have time to patch. While you may not agree this justification, there is nothing that can be done, other than wait or try it for yourself.
from customwatchfacetest.
@VedBoon OK, do you think once watchOS 2 is released, if the technique to load a custom watchface will still need to jailbreak? It was my understanding after the news reported by the media that the device doesn't need to be jailbroken to display such a watch face, so I may be mistaken!
from customwatchfacetest.
@tokamac I cannot truly say and neither can the media. My best guess is yes. Any other alternative (such as custom firmware as suggested by @DJLectr0) wouldn't be as efficient.
from customwatchfacetest.
@VedBoon May I ask you to tell me how you dumped those headers and/or share this private repo with me?
from customwatchfacetest.
@iPh1ps99 I haven't dumped all of the watchOS 2 headers, however, you don't need to. Just write out the few NTK headers you actually need in order to compile the dylib. https://github.com/nickfrey/WatchOS-Headers/tree/master/Device/NanoTimeKit.framework and the comments in https://github.com/hamzasood/CustomWatchFaceTest/blob/master/CustomWatchFaceTest/OnozOmgFaceView.h will help.
from customwatchfacetest.
@VedBoon Can you also tell me how I get this missing <NanoTimeKit/NanoTimeKit.h> to work? How do I import this NanoTimeKit.framework from this other GIT page?
from customwatchfacetest.
Use this headers
https://github.com/CrazyJailHacker/NanoTimeKit-Headers
And copy it to:
/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/PrivateFrameworks/NanoTimeKit.framework/Headers
from customwatchfacetest.
@CrazyJailHacker Still shows me the same error... Do I have to add this somewhere to the linking targets or add this framework to the header search paths?
from customwatchfacetest.
@iPh1ps99 Make sure you pointing Framework Search Path to
/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/PrivateFrameworks
from customwatchfacetest.
@CrazyJailHacker This brings me back to some error I had before. It says it can't find UIView and UILabel (They don't exist in the UIKit from the WatchKit right?)
from customwatchfacetest.
Any movement on this? I'm still fighting the UIKit issue.
from customwatchfacetest.
Hi to Everybody,
I am new in xcode development. I read all this topic before ask this question. Can you tell me that I correctly understand how this particular CustomWatchFaceTest project works?
This CustomWatchFaceTest requires some hack (jailbreak or something like this). Even if I can compile and run this project I will need to make some non standard changes to my apple watch. And it will not be possible of course to officially publish this CustomWatchFace in the Apple Store.
Is everything mentioned by me above correct or not?
from customwatchfacetest.
Anyone who can share how this works now that watchOS 2.0 is official?
from customwatchfacetest.
OK so new here hey, been following this for a little while, I have managed to get the framework into Xcode but still getting the error any ideas on what could be causing this still if everything is there?
I also got this (don't know if it means anything of importance) "in file included from /(Directorywherestored)/CustomWatchFaceTest-master/CustomWatchFaceTest/OnozOmgFace.m:9:"
This is in relation to the NanoTimeKit.h file not found error.
Now with multiple UIview, and UIlables errors
from customwatchfacetest.
@hamzasood Is there a reason this can't be shared?
from customwatchfacetest.
@zlelik Yes. This is a hack.
from customwatchfacetest.
@MobWiMetro Thank you
from customwatchfacetest.
Any progress?
from customwatchfacetest.
very sad :(
from customwatchfacetest.
Anyone has succeeded?
from customwatchfacetest.
https://github.com/iPh1ps99/NanoTimeKit-Headers ?
from customwatchfacetest.
@SObS Believe we already tried NanoTimeKit-Headers still gave the same error, does anyone know if this can still work or if its even possible with the recent WatchOS updates?
from customwatchfacetest.
Since I saw these messages and realized that nobody had still figured this out, I revisited the project and tried a few little hacks here and there but I can't tell if I cleared up all the compiler errors or if there's a bigger problem I'm not seeing. Basically, you have to clean up the header files and create a tbd file for Xcode to recognize them. But now I'm at a point where Xcode attempts to compile the project, stall at linking and then crash
from customwatchfacetest.
@Baddaboo Ok just started this back up again got the frameworks that are needed loaded in, I'm still stuck at the NanoTimeKit not found (Got passed before but idk how lol), would we call this progress?
from customwatchfacetest.
@RepoEliteARO I'd say make sure that the NanoTimeKit headers you're using are for whatever version of WatchOS you're trying to compile for. I haven't tried the one that @SObS linked to, because the dump I'm using works just fine, but I think some others are running into issues because their headers are for WatchOS 1.0 and they're compiling for 2.0+. Other than that, make sure that your search path is set, the NanoTimeKit framework is included, and, uh, pray.
I'm at the point where ld keeps crashing and throwing:
clang: error: unable to execute command: Killed: 9
from customwatchfacetest.
@Baddaboo Alright thanks ill check out @SObS links and see what I can do, ill get back to you when things work. Ill fix my search paths and see what else I can get done. Any idea what would be causing that?
Update: Just did that fixed the missing "Nano not found" error (starting to remember now :P) now its spewing out a bunch of errors, think most are UIKit errors from what I'm seeing I may have missed something so...
from customwatchfacetest.
About UIKit(UIView) and etc: "Missing Headers & Frameworks: … For the most part, you just need to copy the tbd files from the iPhoneOS SDK into the appropriate places in the WatchOS SDK, as well as their headers, then edit the tbd files to include ‘armv7k’. I’m sure somebody will automate this repetitive and thankless job" from here http://blog.steventroughtonsmith.com/post/128957959685/native-uikit-apps-on-apple-watch
Not tried yet.
from customwatchfacetest.
What's the point you all try to compile it when it won't work? The main idea is that this code should be executed by carousel app, without it this code and project are useless. You can just comment out everything and compile an empty dylib to play with, and only after figuring out of how to load that dylib into carousel, it is worth to compile the whole code.
from customwatchfacetest.
@angelovAlex The bad thing is that we can't inject the compiled dylib into a real Watch without some tricks. Though I think we can inject the code into a simulator which would be pretty cool too :)
from customwatchfacetest.
It's been a year since this issue first appeared. Has there been anyone with a solution, or can @hamzasood shed some light on this topic?
from customwatchfacetest.
Any progress?
from customwatchfacetest.
Anything us noobs can do to help?
As a designer, I have great watch faces I could share with everyone if we get this to work!
from customwatchfacetest.
Anything us noobs can do to help?
@StevenTLBF Likely no. Plus I doubt that this will be usable on a physical device unless we see a watchOS "jailbreak."
from customwatchfacetest.
@Shugabuga Hamza demoed it on a physical device though.. fingers crossed that we can figure this out!
from customwatchfacetest.
@StevenTLBF I think he has an exploit, as his former projects that also required a jailbreak (especially his live wallpaper example) was demoed on actual devices before a JB if I recall.
Plus, how else would we modify Carousel, because if Carousel can be modified without a jailbreak, then that means that SpringBoard could be too.
from customwatchfacetest.
@hamzasood any light you can shed?
from customwatchfacetest.
:(
Is this of any help? https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/UsingDynamicLibraries.html
from customwatchfacetest.
@Baddaboo @Shugabuga Is this of any help? https://forums.macrumors.com/threads/including-dylib-in-application-bundle-carbon.609963/
from customwatchfacetest.
I don't think so. We need to include them in Carousel.app, which can't be modified AFAIK.
I know recently a dev was able to get the Hermés watchface running on a normal Apple Watch with only a jailbreak, but we'll see...
from customwatchfacetest.
@Shugabuga Where did you see the Hermés watch face on a normal Apple Watch? I'm intrigued.
from customwatchfacetest.
Here.
from customwatchfacetest.
@justMaku I am interested, so thanks for the link!
from customwatchfacetest.
Related Issues (2)
- NTKFaceStyle subclass HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from customwatchfacetest.